vuetable-next 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -0
- package/.idea/easycode.ignore +13 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jsLinters/eslint.xml +6 -0
- package/.idea/material_theme_project_new.xml +13 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/vuetable-next.iml +12 -0
- package/.vscode/extensions.json +3 -0
- package/LICENSE +21 -0
- package/README.md +102 -0
- package/auto-imports.d.ts +21 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/dist/vuetable-next.js +6061 -0
- package/dist/vuetable-next.js.map +1 -0
- package/dist/vuetable-next.umd.cjs +36 -0
- package/dist/vuetable-next.umd.cjs.map +1 -0
- package/eslint.config.js +122 -0
- package/index.html +161 -0
- package/package.json +80 -0
- package/public/vite.svg +1 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/Vuetable.vue +1212 -0
- package/src/components/VuetableColGroup.vue +66 -0
- package/src/components/VuetableColGutter.vue +25 -0
- package/src/components/VuetableCssSemanticUI.ts +36 -0
- package/src/components/VuetableFieldCheckbox.vue +87 -0
- package/src/components/VuetableFieldCheckboxMixin.vue +46 -0
- package/src/components/VuetableFieldHandle.vue +41 -0
- package/src/components/VuetableFieldMixin.vue +30 -0
- package/src/components/VuetableFieldSequence.vue +43 -0
- package/src/components/VuetablePagination.vue +119 -0
- package/src/components/VuetablePaginationDropdown.vue +88 -0
- package/src/components/VuetablePaginationInfo.vue +51 -0
- package/src/components/VuetablePaginationInfoMixin.vue +64 -0
- package/src/components/VuetablePaginationMixin.vue +107 -0
- package/src/components/VuetableRowHeader.vue +190 -0
- package/src/components/useVuetablePagination.ts +56 -0
- package/src/components/useVuetablePaginationInfo.ts +40 -0
- package/src/data/fields.ts +102 -0
- package/src/data/lang.ts +4 -0
- package/src/index.ts +59 -0
- package/src/main.ts +396 -0
- package/src/style.css +79 -0
- package/src/vite-env.d.ts +1 -0
- package/test/Vuetable.AJAX.test.ts +291 -0
- package/test/Vuetable.Composable.test.ts +151 -0
- package/test/Vuetable.Computed.test.ts +211 -0
- package/test/Vuetable.Features.test.ts +145 -0
- package/test/Vuetable.FieldsDefinition.test.ts +236 -0
- package/test/Vuetable.HTML.test.ts +16 -0
- package/test/Vuetable.Methods.test.ts +373 -0
- package/test/__snapshots__/Vuetable.HTML.test.ts.snap +85 -0
- package/tsconfig.app.json +32 -0
- package/tsconfig.json +16 -0
- package/tsconfig.node.json +13 -0
- package/vite.config.ts +29 -0
- package/vitest.config.ts +17 -0
package/.eslintignore
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MaterialThemeProjectNewConfig">
|
|
4
|
+
<option name="metadata">
|
|
5
|
+
<MTProjectMetadataState>
|
|
6
|
+
<option name="migrated" value="true" />
|
|
7
|
+
<option name="pristineConfig" value="false" />
|
|
8
|
+
<option name="userId" value="1e55fdc5:1871a417bd3:-8000" />
|
|
9
|
+
<option name="version" value="8.13.2" />
|
|
10
|
+
</MTProjectMetadataState>
|
|
11
|
+
</option>
|
|
12
|
+
</component>
|
|
13
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/vuetable-next.iml" filepath="$PROJECT_DIR$/.idea/vuetable-next.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Artem Alesenko
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Vuetable-next
|
|
2
|
+
> Simple table for displaying data!
|
|
3
|
+
>
|
|
4
|
+
> Suitable for data visualization of any complexity with minimal time consumption.
|
|
5
|
+
## 🤸♀️Get started in 30 seconds
|
|
6
|
+
#### 1. Install vuetable-next from:
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D vuetable-next
|
|
9
|
+
# or
|
|
10
|
+
yarn add -D vuetable-next
|
|
11
|
+
# or
|
|
12
|
+
pnpm i -D vuetable-next
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
#### 2. Initialize to the current project:
|
|
16
|
+
## 👦Vue 3
|
|
17
|
+
### Global Registration
|
|
18
|
+
```ts
|
|
19
|
+
import Vuetable from "vuetable-next";
|
|
20
|
+
import { createApp } from "vue";
|
|
21
|
+
|
|
22
|
+
const app = createApp({...});
|
|
23
|
+
app.use(Vuetable);
|
|
24
|
+
```
|
|
25
|
+
### Local Registration
|
|
26
|
+
```vue
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import Vuetable from "vuetable-next";
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<Vuetable
|
|
33
|
+
ref="table"
|
|
34
|
+
v-bind="{/* local props & attrs */}">
|
|
35
|
+
</Vuetable>
|
|
36
|
+
<template>
|
|
37
|
+
```
|
|
38
|
+
## 👨Vue 2.7
|
|
39
|
+
### Global Registration
|
|
40
|
+
```ts
|
|
41
|
+
import Vuetable from "vuetable-next";
|
|
42
|
+
import Vue from "vue";
|
|
43
|
+
|
|
44
|
+
Vue.use(Vuetable);
|
|
45
|
+
```
|
|
46
|
+
### Local Registration
|
|
47
|
+
```vue
|
|
48
|
+
<script setup>
|
|
49
|
+
import Vuetable from "vuetable-next";
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<Vuetable
|
|
54
|
+
ref="table"
|
|
55
|
+
v-bind="{/* local props & attrs */}">
|
|
56
|
+
</Vuetable>
|
|
57
|
+
<template>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 👴Vue 2.6
|
|
61
|
+
### Global Registration
|
|
62
|
+
```ts
|
|
63
|
+
import VueCompositionAPI from "@vue/composition-api";
|
|
64
|
+
import Vuetable from "vuetable-next";
|
|
65
|
+
import Vue from "vue";
|
|
66
|
+
|
|
67
|
+
Vue.use(VueCompositionAPI);
|
|
68
|
+
Vue.use(Vuetable);
|
|
69
|
+
```
|
|
70
|
+
### Local Registration
|
|
71
|
+
```vue
|
|
72
|
+
<script>
|
|
73
|
+
import VueCompositionAPI from "@vue/composition-api";
|
|
74
|
+
import Vuetable from "vuetable-next";
|
|
75
|
+
import Vue from "vue";
|
|
76
|
+
Vue.use(VueCompositionAPI);
|
|
77
|
+
|
|
78
|
+
export default {
|
|
79
|
+
components: { Vuetable }
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<Vuetable
|
|
85
|
+
ref="table"
|
|
86
|
+
v-bind="{/* local props & attrs */}">
|
|
87
|
+
</Vuetable>
|
|
88
|
+
<template>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Also you have the ability to access certain components if you need them:
|
|
92
|
+
```javascript
|
|
93
|
+
Vuetable: Vuetable.default/Vuetable.Vuetable,
|
|
94
|
+
VuetablePagination: Vuetable.VuetablePagination,
|
|
95
|
+
VuetablePaginationInfo: Vuetable.VuetablePaginationInfo,
|
|
96
|
+
VuetablePaginationDropdown: Vuetable.VuetablePaginationDropdown
|
|
97
|
+
```
|
|
98
|
+
# Contributions
|
|
99
|
+
Any contribution to the code must be done to the `next` branch.
|
|
100
|
+
|
|
101
|
+
# License
|
|
102
|
+
Vuetable is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
export {}
|
|
7
|
+
declare global {
|
|
8
|
+
const afterAll: typeof import('vitest')['afterAll']
|
|
9
|
+
const afterEach: typeof import('vitest')['afterEach']
|
|
10
|
+
const assert: typeof import('vitest')['assert']
|
|
11
|
+
const beforeAll: typeof import('vitest')['beforeAll']
|
|
12
|
+
const beforeEach: typeof import('vitest')['beforeEach']
|
|
13
|
+
const chai: typeof import('vitest')['chai']
|
|
14
|
+
const describe: typeof import('vitest')['describe']
|
|
15
|
+
const expect: typeof import('vitest')['expect']
|
|
16
|
+
const it: typeof import('vitest')['it']
|
|
17
|
+
const suite: typeof import('vitest')['suite']
|
|
18
|
+
const test: typeof import('vitest')['test']
|
|
19
|
+
const vi: typeof import('vitest')['vi']
|
|
20
|
+
const vitest: typeof import('vitest')['vitest']
|
|
21
|
+
}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vuetable-th-gutter[data-v-b704a04a]{padding:0!important;border-left:none!important;border-right:none!important}[v-cloak]{display:none}table.vuetable.fixed-header{table-layout:fixed}.vuetable th.sortable:hover{color:#2185d0;cursor:pointer}.vuetable-head-wrapper{overflow-x:hidden}.vuetable-head-wrapper table.vuetable{border-bottom-left-radius:0;border-bottom-right-radius:0}.vuetable-body-wrapper.fixed-header{position:relative;overflow-y:auto}.vuetable-body-wrapper table.vuetable.fixed-header{border-top:none!important;margin-top:0!important;border-top-left-radius:0;border-top-right-radius:0}.vuetable-empty-result{text-align:center}.vuetable-pagination{background:#f9fafb!important}.vuetable-pagination-info{margin-top:auto;margin-bottom:auto}
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|