├── .eslintrc.cjs
├── .github
└── pull_request_template.md
├── .gitignore
├── .npmrc
├── .prettierrc
├── Contributing.md
├── LICENSE
├── README.md
├── ROADMAP.md
├── package-lock.json
├── package.json
├── src
├── SvelTable
│ ├── Cell.svelte
│ ├── CellRow.svelte
│ ├── Heading.svelte
│ ├── SvelTable.svelte
│ ├── store.ts
│ └── util
│ │ └── VirtualList.svelte
├── app.html
├── global.d.ts
└── routes
│ └── index.svelte
├── static
└── favicon.png
├── svelte.config.js
└── tsconfig.json
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
5 | plugins: ['svelte3', '@typescript-eslint'],
6 | ignorePatterns: ['*.cjs'],
7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8 | settings: {
9 | 'svelte3/typescript': () => require('typescript')
10 | },
11 | parserOptions: {
12 | sourceType: 'module',
13 | ecmaVersion: 2020
14 | },
15 | env: {
16 | browser: true,
17 | es2017: true,
18 | node: true
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## What does this do?
2 |
3 | Brief description goes here.
4 |
5 |
6 | ## Is there a [GitHub Issue](https://github.com/oslabs-beta/SvelTable/issues) that this is resolving?
7 |
8 | If so, please specify the #
9 |
10 | ## Checklist
11 |
12 | - [ ] Added tests
13 |
14 | - [ ] Uses TypeScript
15 |
16 | - [ ] Has been approved by two maintainers
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/Contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thank you for taking the time to consider contributing to our project. It's people like you that make the dev community great!
4 |
5 | Where do I start?
6 |
7 | If you have spotted a bug or have a feature request, please open an [issue post](https://github.com/oslabs-beta/SvelTable/issues/new). That way we can get further information from other users that have experienced the bug or confirm that the feature isn't already in development.
8 | All other questions should be posted to the project's [reddit.](https://www.reddit.com/r/sveltable/) Github is for bugs and feature requests only.
9 |
10 | # Fork
11 |
12 | If you decide to contribute, fork the project, and create a branch with a descriptive name of the feature you are adding or bug you are fixing. Also include the ticket number for the issue post you created.
13 |
14 | `git checkout -b 11-add-search-feature`
15 |
16 | # Testing
17 |
18 | We are currently using JEST for testing. If you are adding a feature, please make sure to include tests for the feature. Modify tests for that may be affected by your bug fix.
19 |
20 |
21 | # Implementation
22 |
23 | While writing your bug fix or feature please commit often and update the community on your progress so that the community can provide input.
24 |
25 | # Style
26 |
27 | The feature/bug fix must adhere to the general style of the project. You must also use typscript.
28 |
29 | # Make a Pull Request
30 |
31 | Before performing a pull request, make sure you checkout into your main branch. Make sure the main branch is up to date with the project. Update your feature branch from your local main.
32 |
33 | `git remote add upstream https://github.com/oslabs-beta/SvelTable.git`
34 |
35 | `git checkout main`
36 |
37 | `git pull upstream main`
38 |
39 | Push the feature then create a pull request on GitHub.
40 |
41 | We will review the pull request and make sure it passes all tests. If another pull request is merged before yours, you may be asked to rebase(update) your feature.
42 |
43 | # Merging a PR
44 |
45 | A pull request may only be merged if it passes all tests, is approved by at least two maintainers, and is up to date with the current main.
46 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 OSLabs Beta
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SvelTable
2 |
3 | SvelTable is a feature rich, data table component built with Svelte. Import your data objects and our table will take care of the rest.
4 |
5 | Current features include:
6 | * Full Table Search Bar
7 | * Individual Column Search Bars
8 | * Multi-Input Filtering
9 | * Column Sorting Alphabetically or Numerically
10 | * Column Resizing
11 |
12 | ## SetUp
13 | 1.) Use the package manager [npm](https://docs.npmjs.com/) to install SvelTable.
14 | ```bash
15 | npm install sveltable
16 | ```
17 | 2.) Import sveltable to your svelte file.
18 | ```bash
19 | import SvelTable from 'sveltable';
20 | ```
21 |
22 | 3.) Declare a data array inside script tag to import data to.
23 | ```bash
24 |
28 | ```
29 | 4.) Use dataSet method to render a SvelTable with your data.
30 | ```bash
31 |