├── .browserslistrc
├── .editorconfig
├── .eslintrc.js
├── .github
└── ISSUE_TEMPLATE
│ ├── --all-other-issues.md
│ ├── --bug-report.md
│ └── --feature-request.md
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── babel.config.js
├── jest.config.js
├── package-lock.json
├── package.json
├── src
├── App.vue
├── components
│ ├── TBody
│ │ ├── TBody.js
│ │ ├── TBody.scss
│ │ ├── TBody.vue
│ │ └── VSelect.vue
│ ├── Thead.vue
│ └── VueTable.vue
├── data.js
├── helpers.js
├── index.js
├── main.js
└── mixins
│ └── VueTable
│ ├── callback.js
│ ├── copyPaste.js
│ ├── dragToFill.js
│ ├── handleTBody.js
│ ├── handleTHead.js
│ ├── moveOnTable.js
│ ├── scrollOnTable.js
│ └── undo.js
├── tests
└── unit
│ ├── .eslintrc.js
│ ├── Tbody
│ ├── Computed.spec.js
│ ├── Data.spec.js
│ └── Methods.spec.js
│ ├── Thead
│ ├── Computed.spec.js
│ ├── Data.spec.js
│ └── Methods.spec.js
│ ├── VSelect
│ ├── Data.spec.js
│ └── Methods.spec.js
│ └── VueTable
│ ├── Computed.spec.js
│ ├── Data.spec.js
│ └── Methods.spec.js
├── types
├── components
│ ├── TBody.d.ts
│ ├── Thead.d.ts
│ └── VueTable.d.ts
└── index.d.ts
└── vue.config.js
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 | not ie <= 8
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{js,jsx,ts,tsx,vue}]
2 | indent_style = space
3 | indent_size = 2
4 | end_of_line = lf
5 | trim_trailing_whitespace = true
6 | insert_final_newline = true
7 | max_line_length = 100
8 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true,
5 | },
6 | extends: ["plugin:vue/essential", "@vue/airbnb", "@vue/prettier"],
7 | parserOptions: {
8 | parser: "babel-eslint",
9 | },
10 | rules: {
11 | "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
12 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
13 | "padding-line-between-statements": [
14 | "error",
15 | { blankLine: "always", prev: "*", next: "return" },
16 | { blankLine: "always", prev: ["const", "let", "var"], next: "*" },
17 | {
18 | blankLine: "never",
19 | prev: ["const", "let", "var"],
20 | next: ["const", "let", "var"],
21 | },
22 | { blankLine: "always", prev: "*", next: "block-like" },
23 | { blankLine: "always", prev: "block-like", next: "*" },
24 | ],
25 | "vue/order-in-components": [
26 | "error",
27 | {
28 | order: [
29 | "el",
30 | "name",
31 | "parent",
32 | "functional",
33 | ["delimiters", "comments"],
34 | ["components", "directives", "filters"],
35 | "extends",
36 | "mixins",
37 | "inheritAttrs",
38 | "model",
39 | ["props", "propsData"],
40 | "data",
41 | "computed",
42 | "watch",
43 | "LIFECYCLE_HOOKS",
44 | "methods",
45 | "head",
46 | ["template", "render"],
47 | "renderError",
48 | ],
49 | },
50 | ],
51 | },
52 | overrides: [
53 | {
54 | files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"],
55 | env: {
56 | jest: true,
57 | },
58 | },
59 | ],
60 | };
61 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/--all-other-issues.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "❗️All other issues"
3 | about: Please create all other issues here.
4 | title: "[QUESTION]"
5 | labels: question
6 | assignees: joffreyBerrier
7 |
8 | ---
9 |
10 | **If you have a question. Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Additional context**
14 | Add any other context or screenshots about the question request here.
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/--bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F6A8Bug report"
3 | about: Create a report to help us improve
4 | title: "[BUG]"
5 | labels: bug
6 | assignees: joffreyBerrier
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Additional context**
27 | Add any other context about the problem here.
28 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/--feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F64BFeature request"
3 | about: Suggest an idea for this project
4 | title: "[FEATURE_REQUEST]"
5 | labels: question
6 | assignees: joffreyBerrier
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 |
4 | # local env files
5 | .env.local
6 | .env.*.local
7 |
8 | # Log files
9 | npm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.sw*
21 |
22 | # Dist folder
23 | dist/
24 |
25 | .env
26 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 14.15.4
4 | cache:
5 | yarn: true
6 | directories:
7 | - node_modules
8 | jobs:
9 | include:
10 | - stage: tdd
11 | script:
12 | - yarn build
13 | - yarn test:unit
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 GET SCALIA FRANCE
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 | # Vue3 version
2 | https://github.com/joffreyBerrier/vue-datepicker
3 |
4 | # :fire: Vue Spreadsheet 2.2.1 :fire:
5 | https://github.com/joffreyBerrier/vue-spreadsheet/releases/tag/2.2.1
6 |
7 | # Medium article (in french)
8 | https://medium.com/scalia/vuejs-spreadsheet-692cab2cb5c8
9 |
10 | # Medium article for publish your own component on npm
11 | https://medium.com/js-dojo/how-to-publish-a-vuejs-component-on-npm-aa703714b512
12 |
13 | # Sandbox example
14 |
15 | *Open this link on a new tab*
16 |
17 | [](https://codesandbox.io/s/vue-spreadsheet-wctsv?fontsize=14&hidenavigation=1&theme=dark&view=preview&file=/src/App.vue)
18 |
19 |
20 | ## Description
21 |
22 | :facepunch: An easier Spreadsheet in Vue.js :facepunch:
23 |
24 | Do not hesitate to :star: my repo
25 |
26 |
27 | ## Project setup
28 |
29 | ```
30 | yarn add vuejs-spreadsheet
31 |
32 | npm i vuejs-spreadsheet
33 | ```
34 |
35 | ```
36 |
47 | ```
48 |
49 | ## Contributing to development
50 |
51 | - First, fork the repo from github.
52 | - Clone your forked repo and run: `yarn` or `npm i`
53 | - You can use the `/example` folder to test out the component, or use `npm link` to another project (_cf. next sub section_).
54 | - Then, make your changes on any branch you want and push it.
55 | - Naming your branch with the gitflow convention:
56 | - Feature branches? [feature/]
57 | - Release branches? [release/]
58 | - Hotfix branches? [hotfix/]
59 | - Support branches? [support/]
60 | - Finally, open a pull request on the official repo, using the source branch from your forked repo.
61 |
62 | ### Debugging and testing from another project
63 |
64 | If you want to link the local project to another project 'B' with access to the sources, follow these intructions:
65 | - go to the root of this project's folder
66 | - update the package.json to point to the source entry point instead of the dist/ `main: 'src/index.js'`
67 | - run `npm link` (or `yarn link`).
68 | - go to the project you import the library
69 | - run `npm link vuejs-spreadsheet`
70 | - Now, in your `node_modules`, the vuejs-spreadsheet dependencies should be a symlink to this local folder!
71 |
72 | In order to make it work, you make change your webpack's configuration by using:
73 | ```
74 | config: {
75 | resolve: {
76 | symlinks: true,
77 | }
78 | }
79 | ```
80 |
81 | This will enable your project's B to compile this library using the babel / webpack configuration here, as if it was a real compiled _node_module_.
82 |
83 | _(This configuration may depend on your webpack builder)_
84 |
85 | ## Wiki :mortar_board:
86 |
87 | Data binding | Type | Description
88 | ---------------------------------------|------------|-------------------------
89 | v-model | Array | That contains data
90 |
91 | Props | Type | Description
92 | ---------------------------------------|------------|-------------------------
93 | :headers | Array | That contains headers
94 | :custom-options | Object | That contains Options
95 | :style-wrap-vue-table | Object | That contains style of the wrapper tableVue
96 | :disable-cells | Array | That contains the headerKey you want to disable
97 | :disable-sort-thead | Array | That contains the disabled th
98 | :loading | Boolean | True => Hidden TbodyData / show slot loader | false => contrary
99 | :parent-scroll-element | Object | That contains the HTML attribute which overflow-y: scroll (by-default is 'html')
100 | :select-position | Object | That contains a top and left position you want to add to the select
101 | :submenu-tbody | Array | That contains the submenu-tbody
102 | :submenu-thead | Array | That contains the submenu-thead
103 |
104 | Options | Type | Description
105 | ---------------------------------------|------------|-------------------------
106 | :fuse-options | Object | That contains an object of fuse configuration look on her website: http://fusejs.io/
107 | :new-data | Object | That contains the type of data when you have empty cell in a row
108 | :sort-header | Boolean | That activates sort button on header
109 | :tbody-index | Boolean | That displays the index of each row on the left of the table
110 | :trad | Object | That contains an object of translating
111 |
112 | Function | Type | Description
113 | ---------------------------------------|------------|-------------------------
114 | @tbody-all-checked-row | Function | Fired when the checkedAll row has checked
115 | @tbody-checked-row | Function | Fired when row has checked
116 | @tbody-change-data | Function | Fired when data undergo modifications
117 | @tbody-input-change | Function | When the **input changes**
118 | @tbody-input-keydown | Function | Trigger keydown when the **input changes**
119 | @tbody-select-change | Function | When the **select change**
120 | @handle-up-drag-size-header | Function | Fired when the header size changed
121 | @thead-td-sort | Function | When you press the button sort
122 | @tbody-undo-data | Function | When you hit Ctrl / Cmd + Z for undo
123 | @tbody-paste-data | Function | When you paste data to a cell
124 | @tbody-up-dragtofill | Function | Fired when pressed up on dragToFill
125 | @tbody-move-dragtofill | Function | Fired when moved on dragToFill
126 | @tbody-nav-backspace | Function | When you press backspace on cell (event, actualElement, actualCol, rowIndex, colIndex)
127 | @tbody-nav-multiple-backspace | Function | Fired when the multiple cell are delete
128 | @tbody-submenu-click-{#} | Function | {#} - Name of the function declared on **submenu-tbody**
129 |
130 |
131 | ### Example
132 | ``` javascript
133 |