vuetable-next 1.0.12 → 1.1.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/README.md +177 -84
- package/dist/index.js +1 -0
- package/dist/portable/components/useVuetableField.d.ts +2 -0
- package/dist/public.d.ts +76 -1
- package/dist/style.css +2 -2
- package/dist/types/components/Vuetable.vue.d.ts +171 -62
- package/dist/types/components/VuetableColGroup.vue.d.ts +8 -20
- package/dist/types/components/VuetableColGutter.vue.d.ts +1 -0
- package/dist/types/components/VuetableColumn.d.ts +39 -0
- package/dist/types/components/VuetableContext.d.ts +11 -0
- package/dist/types/components/VuetableFieldCheckboxMixin.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldHandle.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldMixin.vue.d.ts +1 -1
- package/dist/types/components/VuetableFieldSequence.vue.d.ts +1 -1
- package/dist/types/components/VuetableRenderBoundary.d.ts +4 -1
- package/dist/types/components/VuetableRowHeader.vue.d.ts +15 -3
- package/dist/types/components/useVuetableColumnGroups.d.ts +53 -0
- package/dist/types/components/useVuetableColumns.d.ts +12 -0
- package/dist/types/components/useVuetableField.d.ts +2 -0
- package/dist/types/components/useVuetableFixedColumns.d.ts +53 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/vue2.cjs +11 -7
- package/dist/vue2.cjs.map +1 -1
- package/dist/vue2.js +1295 -880
- package/dist/vue2.js.map +1 -1
- package/dist/vue3.cjs +2 -2
- package/dist/vue3.cjs.map +1 -1
- package/dist/vue3.js +1499 -1013
- package/dist/vue3.js.map +1 -1
- package/package.json +1 -1
- package/style.css +2 -2
package/README.md
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
# Vuetable Next
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**A familiar table API. A smoother path from Vue 2 to Vue 3.**
|
|
6
|
+
|
|
7
|
+
Data tables, custom fields, selection, pagination and expandable rows — across Vue generations.
|
|
8
|
+
|
|
9
|
+
[](#compatibility)
|
|
10
|
+
[](https://vuetable.com/guide/)
|
|
11
|
+
[](https://github.com/Artles777/vuetable-next/blob/main/LICENSE)
|
|
12
|
+
|
|
13
|
+
## Contents
|
|
14
|
+
|
|
15
|
+
- [Why Vuetable Next?](#why-vuetable-next)
|
|
16
|
+
- [Quick start](#quick-start): [install](#install) · [Vue 3](#vue-3) · [Vue 2.6](#vue-26) · [Vue 2.7](#vue-27)
|
|
17
|
+
- [Compatibility](#compatibility)
|
|
18
|
+
- [Features in 1.1.0](#features-in-110): [declarative columns](#declarative-columns-opt-in) · [grouped headers and slots](#grouped-headers-and-extra-rows-opt-in) · [fixed columns](#fixed-columns-opt-in)
|
|
19
|
+
- [Documentation and migration](#documentation-and-migration): [upstream API](#familiar-vuetable-2-documentation) · [performance](#vue-3-automatic-row-render-optimization) · [migration](#moving-an-existing-table) · [mixins and composables](#mixins-or-composables) · [TypeScript](#explicit-framework-entries-and-types)
|
|
20
|
+
- [Live demos](#live-demos) · [screenshots](#screenshots)
|
|
21
|
+
- [Development and checks](#development-and-checks) · [contributing](#contributing)
|
|
22
|
+
- [Limitations and security](#limitations-and-security) · [license and credits](#license-and-credits)
|
|
23
|
+
|
|
24
|
+
**First time here?** Start with your Vue version in [Quick start](#quick-start).
|
|
25
|
+
For task-oriented guides and complete API examples, open the [documentation index](https://github.com/Artles777/vuetable-next/blob/main/docs/README.md).
|
|
26
|
+
For release history, see the [changelog](https://github.com/Artles777/vuetable-next/blob/main/CHANGELOG.md).
|
|
27
|
+
|
|
28
|
+
---
|
|
23
29
|
|
|
24
30
|
## Why Vuetable Next?
|
|
25
31
|
|
|
@@ -36,61 +42,25 @@ familiar table API while supporting both Vue 2 and Vue 3 applications.
|
|
|
36
42
|
- **Keep dependencies shared.** Vue, `vue-demi` and Axios are external, not private copies embedded in the bundle.
|
|
37
43
|
- **Use TypeScript.** Portable root declarations work across supported Vue generations; the explicit Vue 3 entry provides richer generated types.
|
|
38
44
|
|
|
39
|
-
> **
|
|
45
|
+
> **Compatibility note:** releases from `1.0.11` onward include the Vue 2.6 / Vue 2.7 / Vue 3 packaging,
|
|
40
46
|
> public composables and portable declarations described here. The older
|
|
41
47
|
> `1.0.10` release does not contain these compatibility changes.
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Vue 3 · selection and expandable details
|
|
46
|
-
|
|
47
|
-

|
|
48
|
-
|
|
49
|
-
<details>
|
|
50
|
-
<summary><strong>See the same component on Vue 2.6 and Vue 2.7</strong></summary>
|
|
51
|
-
|
|
52
|
-
#### Vue 2.6 + Composition API
|
|
53
|
-
|
|
54
|
-

|
|
55
|
-
|
|
56
|
-
#### Vue 2.7 · native Composition API
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
</details>
|
|
61
|
-
|
|
62
|
-
These are real browser captures of the **same packed library** in three isolated
|
|
63
|
-
Vue applications. The surrounding dashboard and green theme are showcase styles,
|
|
64
|
-
not a theme automatically installed by the library. No live customer data is used.
|
|
65
|
-
|
|
66
|
-
## Compatibility
|
|
67
|
-
|
|
68
|
-
| Application runtime | Declared support | Tested runtime | Composition API plugin |
|
|
69
|
-
| --- | --- | --- | --- |
|
|
70
|
-
| Vue 2.6 | `^2.6.14` | `2.6.14` | Install `@vue/composition-api` |
|
|
71
|
-
| Vue 2.7 | Included in the Vue 2 range | `2.7.16` | Not needed |
|
|
72
|
-
| Vue 3 | `^3.5.3` | `3.5.46` | Not needed |
|
|
73
|
-
|
|
74
|
-
The package contains separately compiled Vue 2 and Vue 3 render functions.
|
|
75
|
-
`vue-demi` selects the correct build for the installed runtime; no application
|
|
76
|
-
alias or manual dependency patch is needed for normal root imports.
|
|
77
|
-
|
|
78
|
-
Checks cover actual rendering, reactive data updates, legacy field mixins, custom
|
|
79
|
-
fields, checkbox selection, events, detail-row parent access, component methods,
|
|
80
|
-
teardown, module resolution and public declarations. Vue 2.6 is also checked with
|
|
81
|
-
a webpack 4 consumer toolchain. This is not a claim that every upstream example
|
|
82
|
-
or every possible consumer integration has been exhaustively tested.
|
|
49
|
+
---
|
|
83
50
|
|
|
84
51
|
## Quick start
|
|
85
52
|
|
|
86
53
|
### Install
|
|
87
54
|
|
|
88
|
-
Install the
|
|
55
|
+
Install the latest stable release:
|
|
89
56
|
|
|
90
57
|
```sh
|
|
91
|
-
npm install vuetable-next
|
|
58
|
+
npm install vuetable-next@latest
|
|
92
59
|
```
|
|
93
60
|
|
|
61
|
+
`@latest` uses the package's current npm `latest` tag, so this command does not
|
|
62
|
+
need to change for each release. Your application's lockfile records the resolved version.
|
|
63
|
+
|
|
94
64
|
For Vue 2.6, also install the Composition API plugin:
|
|
95
65
|
|
|
96
66
|
```sh
|
|
@@ -104,10 +74,11 @@ npm install --legacy-peer-deps --package-lock=false
|
|
|
104
74
|
npm pack
|
|
105
75
|
```
|
|
106
76
|
|
|
107
|
-
Then install the generated archive from your application directory
|
|
77
|
+
Then install the generated archive from your application directory, replacing
|
|
78
|
+
`VERSION` with the version in the filename printed by `npm pack`:
|
|
108
79
|
|
|
109
80
|
```sh
|
|
110
|
-
npm install /absolute/path/to/vuetable-next/vuetable-next-
|
|
81
|
+
npm install /absolute/path/to/vuetable-next/vuetable-next-VERSION.tgz
|
|
111
82
|
```
|
|
112
83
|
|
|
113
84
|
`npm pack` runs the dual build and package checks through `prepack`. The archive
|
|
@@ -221,6 +192,91 @@ new Vue({ render: createElement => createElement(App) }).$mount("#app");
|
|
|
221
192
|
For global registration on either Vue 2 version, import `Vuetable` in your
|
|
222
193
|
entry point and call `Vue.use(Vuetable)` before creating the root instance.
|
|
223
194
|
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Compatibility
|
|
198
|
+
|
|
199
|
+
| Application runtime | Declared support | Tested runtime | Composition API plugin |
|
|
200
|
+
| --- | --- | --- | --- |
|
|
201
|
+
| Vue 2.6 | `^2.6.14` | `2.6.14` | Install `@vue/composition-api` |
|
|
202
|
+
| Vue 2.7 | Included in the Vue 2 range | `2.7.16` | Not needed |
|
|
203
|
+
| Vue 3 | `^3.5.3` | `3.5.46` | Not needed |
|
|
204
|
+
|
|
205
|
+
The package contains separately compiled Vue 2 and Vue 3 render functions.
|
|
206
|
+
`vue-demi` selects the correct build for the installed runtime; no application
|
|
207
|
+
alias or manual dependency patch is needed for normal root imports.
|
|
208
|
+
|
|
209
|
+
Checks cover actual rendering, reactive data updates, legacy field mixins, custom
|
|
210
|
+
fields, checkbox selection, events, detail-row parent access, component methods,
|
|
211
|
+
teardown, module resolution and public declarations. Vue 2.6 is also checked with
|
|
212
|
+
a webpack 4 consumer toolchain. This is not a claim that every upstream example
|
|
213
|
+
or every possible consumer integration has been exhaustively tested.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Features in 1.1.0
|
|
218
|
+
|
|
219
|
+
The new column, layout and pinning APIs are additive. Existing `fields` tables
|
|
220
|
+
keep working without migration. See [1.1.0 release notes](https://github.com/Artles777/vuetable-next/blob/main/CHANGELOG.md#110---2026-12-02).
|
|
221
|
+
|
|
222
|
+
### Declarative columns (opt-in)
|
|
223
|
+
|
|
224
|
+
For left/right column pinning, dynamic group headers and custom totals, see
|
|
225
|
+
[fixed columns](https://github.com/Artles777/vuetable-next/blob/main/docs/fixed-columns.md) and [table layout](https://github.com/Artles777/vuetable-next/blob/main/docs/table-layout.md).
|
|
226
|
+
|
|
227
|
+
Alongside the existing `fields` API, declarations can provide column metadata and
|
|
228
|
+
scoped templates. Import `Vuetable, { VuetableColumn }` from `vuetable-next`:
|
|
229
|
+
|
|
230
|
+
```vue
|
|
231
|
+
<Vuetable :data="rows" :api-mode="false">
|
|
232
|
+
<VuetableColumn field="name" label="Customer" sortable width="180px">
|
|
233
|
+
<template #default="{ row }"><strong>{{ row.name }}</strong></template>
|
|
234
|
+
</VuetableColumn>
|
|
235
|
+
</Vuetable>
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
See the [declarative columns guide](https://github.com/Artles777/vuetable-next/blob/main/docs/declarative-columns.md) for all three
|
|
239
|
+
runtime setups, both APIs, precedence and migration limits. This is additive,
|
|
240
|
+
not full Buefy compatibility; existing `fields` tables need no migration.
|
|
241
|
+
The [shared showcase](https://github.com/Artles777/vuetable-next/blob/main/demo/README.md#declarative-columns) has interactive controls.
|
|
242
|
+
|
|
243
|
+
### Grouped headers and extra rows (opt-in)
|
|
244
|
+
|
|
245
|
+
Keep the standard sortable header and add subheaders or totals with
|
|
246
|
+
`beforeHeader`, `afterHeader`, `beforeFooter` and `afterFooter`. Enable
|
|
247
|
+
`group-by="headerName"` for field objects or `group-by="group"` for declarative
|
|
248
|
+
columns. Visible groups calculate their own spans and expose semantic boundary
|
|
249
|
+
classes when columns are hidden or reordered.
|
|
250
|
+
|
|
251
|
+
See [table layout and grouped headers](https://github.com/Artles777/vuetable-next/blob/main/docs/table-layout.md) for slot scope,
|
|
252
|
+
precedence, gutter alignment and migration examples. Available starting with `1.1.0`.
|
|
253
|
+
|
|
254
|
+
### Fixed columns (opt-in)
|
|
255
|
+
|
|
256
|
+
Pin multiple columns on either side with `fixed: "left"` or `fixed: "right"`.
|
|
257
|
+
Pinned columns move to their edge by default; `fixedOrder` sets their rank from
|
|
258
|
+
that edge, and automatic ranks follow pin activation order. Choose
|
|
259
|
+
`fixed-mode="in-place"` to keep the original column positions.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
For example, with object fields:
|
|
263
|
+
|
|
264
|
+
```js
|
|
265
|
+
const fields = [
|
|
266
|
+
{ name: "customer", title: "Customer", fixed: "left", width: "180px" },
|
|
267
|
+
{ name: "campaign", title: "Campaign", width: "320px" },
|
|
268
|
+
{ name: "revenue", title: "Revenue", fixed: "right", fixedOrder: 1, width: "130px" }
|
|
269
|
+
];
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The same metadata works on `VuetableColumn`. Generated headers, grouped headers,
|
|
273
|
+
custom subheaders and totals can share pinning styles through the public slot
|
|
274
|
+
helpers. See the [fixed columns guide](https://github.com/Artles777/vuetable-next/blob/main/docs/fixed-columns.md) for ordering,
|
|
275
|
+
custom rows, theme variables and viewport limits, then try the
|
|
276
|
+
[scrolling playground](https://github.com/Artles777/vuetable-next/blob/main/demo/README.md#pinned-columns-playground).
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
224
280
|
## Documentation and migration
|
|
225
281
|
|
|
226
282
|
### Familiar Vuetable-2 documentation
|
|
@@ -275,11 +331,13 @@ The generic `Vuetable` remains fully dynamic and warning-free for arbitrary
|
|
|
275
331
|
prefixes/custom events. Vue 2 users keep the generic component:
|
|
276
332
|
importing the factory is safe, but calling it throws a Vue-3-only error.
|
|
277
333
|
|
|
278
|
-
For sorting state, inspect the live table ref’s `order`.
|
|
279
|
-
detaches the table’s local order and leaves the owner’s
|
|
280
|
-
unchanged
|
|
281
|
-
|
|
282
|
-
the table
|
|
334
|
+
For sorting state, inspect the live table ref’s `sortOrder` or `order`.
|
|
335
|
+
`clearSortOrder()` detaches the table’s local order and leaves the owner’s input
|
|
336
|
+
array unchanged. For legacy compatibility, when the parent explicitly supplies
|
|
337
|
+
`sortOrder`, its next update restores that input; replacing or extending the
|
|
338
|
+
input array also resynchronizes the table. Without a supplied `sortOrder`, local
|
|
339
|
+
sorting remains local. This behavior applies to Vue 2.6, Vue 2.7 and Vue 3 without
|
|
340
|
+
prop-mutation warnings.
|
|
283
341
|
|
|
284
342
|
### Moving an existing table
|
|
285
343
|
|
|
@@ -327,7 +385,7 @@ import {
|
|
|
327
385
|
} from "vuetable-next";
|
|
328
386
|
```
|
|
329
387
|
|
|
330
|
-
See [Mixins and composables](docs/mixins-and-composables.md) for paired component
|
|
388
|
+
See [Mixins and composables](https://github.com/Artles777/vuetable-next/blob/main/docs/mixins-and-composables.md) for paired component
|
|
331
389
|
examples, props, event wiring, pagination data, and complete Vue 2.6 / Vue 2.7 /
|
|
332
390
|
Vue 3 startup examples. Vue 2.6 registers `@vue/composition-api` once; Vue 2.7 and
|
|
333
391
|
Vue 3 do not need that plugin. Existing mixins remain public — no forced migration.
|
|
@@ -348,7 +406,9 @@ declarations are portable; `/vue3` exposes the richer generated Vue 3 types.
|
|
|
348
406
|
Portable composable refs support `.value`, reactive inputs and template usage.
|
|
349
407
|
For native Vue 3 branded `Ref`/`ComputedRef` types or direct-ref `watch()`
|
|
350
408
|
inference, import from `/vue3`; with the root entry, watch a getter instead.
|
|
351
|
-
See the [typing examples](docs/mixins-and-composables.md#typescript-ref-interop).
|
|
409
|
+
See the [typing examples](https://github.com/Artles777/vuetable-next/blob/main/docs/mixins-and-composables.md#typescript-ref-interop).
|
|
410
|
+
|
|
411
|
+
---
|
|
352
412
|
|
|
353
413
|
## Live demos
|
|
354
414
|
|
|
@@ -387,10 +447,37 @@ For source-level Vue 3 development, `npm run dev` starts the Vite demo. The lega
|
|
|
387
447
|
`dev:2` source demo is not the cross-version compatibility gate; use the packed
|
|
388
448
|
demo and consumer matrix for Vue 2 verification.
|
|
389
449
|
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Screenshots
|
|
453
|
+
|
|
454
|
+
### Vue 3 · selection and expandable details
|
|
455
|
+
|
|
456
|
+

|
|
457
|
+
|
|
458
|
+
<details>
|
|
459
|
+
<summary><strong>See the same component on Vue 2.6 and Vue 2.7</strong></summary>
|
|
460
|
+
|
|
461
|
+
#### Vue 2.6 + Composition API
|
|
462
|
+
|
|
463
|
+

|
|
464
|
+
|
|
465
|
+
#### Vue 2.7 · native Composition API
|
|
466
|
+
|
|
467
|
+

|
|
468
|
+
|
|
469
|
+
</details>
|
|
470
|
+
|
|
471
|
+
These are real browser captures of the **same packed library** in three isolated
|
|
472
|
+
Vue applications. The surrounding dashboard and green theme are showcase styles,
|
|
473
|
+
not a theme automatically installed by the library. No live customer data is used.
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
390
477
|
## Development and checks
|
|
391
478
|
|
|
392
479
|
Use Node.js 22 for the documented development workflow. See
|
|
393
|
-
[CONTRIBUTING.md](CONTRIBUTING.md) for complete setup, fork/collaborator Git
|
|
480
|
+
[CONTRIBUTING.md](https://github.com/Artles777/vuetable-next/blob/main/CONTRIBUTING.md) for complete setup, fork/collaborator Git
|
|
394
481
|
commands, linting, regression tests, package validation, the three-runtime matrix,
|
|
395
482
|
type checks, browser verification and pull request requirements.
|
|
396
483
|
|
|
@@ -407,6 +494,19 @@ package on each supported framework. The build produces framework-specific
|
|
|
407
494
|
render artifacts from shared component sources; generated files are not edited
|
|
408
495
|
by hand.
|
|
409
496
|
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## Contributing
|
|
500
|
+
|
|
501
|
+
Bug reports, focused fixes and documentation improvements are welcome. Both fork
|
|
502
|
+
contributors and repository collaborators should use feature branches and open
|
|
503
|
+
pull requests against **`main`**.
|
|
504
|
+
|
|
505
|
+
Read the [contribution guide](https://github.com/Artles777/vuetable-next/blob/main/CONTRIBUTING.md), include a reproduction and actual
|
|
506
|
+
validation results, and use the [pull request template](https://github.com/Artles777/vuetable-next/blob/main/.github/pull_request_template.md).
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
410
510
|
## Limitations and security
|
|
411
511
|
|
|
412
512
|
- Vue 2.6 needs Composition API; Vue 2.7 and Vue 3 do not.
|
|
@@ -415,18 +515,11 @@ by hand.
|
|
|
415
515
|
- Vue 2 has a known low-severity framework advisory, [GHSA-5j4c-8p2g-v4jx](https://github.com/advisories/GHSA-5j4c-8p2g-v4jx). Compatibility support does not make an end-of-life runtime security-supported.
|
|
416
516
|
- Consumer verification is not a blanket guarantee for every upstream example or application integration. Test your own custom renderers, API contracts and migration scenarios.
|
|
417
517
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
Bug reports, focused fixes and documentation improvements are welcome. Both fork
|
|
421
|
-
contributors and repository collaborators should use feature branches and open
|
|
422
|
-
pull requests against **`main`**.
|
|
423
|
-
|
|
424
|
-
Read the [contribution guide](CONTRIBUTING.md), include a reproduction and actual
|
|
425
|
-
validation results, and use the [pull request template](.github/pull_request_template.md).
|
|
518
|
+
---
|
|
426
519
|
|
|
427
520
|
## License and credits
|
|
428
521
|
|
|
429
|
-
[MIT](LICENSE) · Maintained by Artem Alesenko.
|
|
522
|
+
[MIT](https://github.com/Artles777/vuetable-next/blob/main/LICENSE) · Maintained by Artem Alesenko.
|
|
430
523
|
|
|
431
524
|
Based on [Vuetable-2](https://github.com/ratiw/vuetable-2). Thanks to its original
|
|
432
525
|
authors and contributors for the table API and documentation that this fork builds on.
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import selected from "./selector.cjs";
|
|
2
2
|
export const Vuetable = selected.Vuetable;
|
|
3
|
+
export const VuetableColumn = selected.VuetableColumn;
|
|
3
4
|
export const VuetableFieldMixin = selected.VuetableFieldMixin;
|
|
4
5
|
export const VuetableFieldCheckboxMixin = selected.VuetableFieldCheckboxMixin;
|
|
5
6
|
export const VuetablePaginationInfoMixin = selected.VuetablePaginationInfoMixin;
|
package/dist/public.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface VuetablePaginationData {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface VuetableField {
|
|
27
|
+
fixed?: VuetableFixedSide;
|
|
28
|
+
fixedOrder?: number;
|
|
27
29
|
name: string | object;
|
|
28
30
|
sortField?: string | null;
|
|
29
31
|
title?: string | ((value?: any) => string);
|
|
@@ -36,7 +38,9 @@ export interface VuetableField {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export interface VuetableProps {
|
|
39
|
-
|
|
41
|
+
fixedMode?: "edges" | "in-place";
|
|
42
|
+
groupBy?: string | null;
|
|
43
|
+
fields?: Array<string | VuetableField>;
|
|
40
44
|
apiMode?: boolean;
|
|
41
45
|
apiUrl?: string;
|
|
42
46
|
httpMethod?: "get" | "post";
|
|
@@ -110,6 +114,77 @@ export interface CreateVuetableOptions {
|
|
|
110
114
|
}
|
|
111
115
|
export declare function createVuetable(options?: CreateVuetableOptions): VuetableComponent<VuetableInstance>;
|
|
112
116
|
export declare const VuetableColGutter: VuetableComponent;
|
|
117
|
+
export interface VuetableColumnProps {
|
|
118
|
+
fixed?: VuetableFixedSide;
|
|
119
|
+
fixedOrder?: number;
|
|
120
|
+
group?: string | number | null;
|
|
121
|
+
field: string;
|
|
122
|
+
label?: string;
|
|
123
|
+
sortable?: boolean;
|
|
124
|
+
sortField?: string;
|
|
125
|
+
width?: string;
|
|
126
|
+
visible?: boolean;
|
|
127
|
+
headerClass?: string;
|
|
128
|
+
cellClass?: string;
|
|
129
|
+
class?: string | string[] | Record<string, boolean>;
|
|
130
|
+
}
|
|
131
|
+
export interface VuetableColumnDefinition {
|
|
132
|
+
fixed?: VuetableFixedSide;
|
|
133
|
+
fixedOrder?: number;
|
|
134
|
+
name: string | object;
|
|
135
|
+
title: string | ((value?: any) => string);
|
|
136
|
+
sortField: string | null;
|
|
137
|
+
visible: boolean;
|
|
138
|
+
width: string | null;
|
|
139
|
+
titleClass: any;
|
|
140
|
+
dataClass: any;
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
}
|
|
143
|
+
export interface VuetableColumnCellScope<Row = Record<string, any>> {
|
|
144
|
+
row: Row;
|
|
145
|
+
index: number;
|
|
146
|
+
column: VuetableColumnDefinition;
|
|
147
|
+
}
|
|
148
|
+
export interface VuetableColumnHeaderScope {
|
|
149
|
+
column: VuetableColumnDefinition;
|
|
150
|
+
index: number;
|
|
151
|
+
}
|
|
152
|
+
export type VuetableGroupValue = string | number | null;
|
|
153
|
+
export type VuetableFixedSide = "left" | "right";
|
|
154
|
+
export type VuetableCellRegion = "header" | "body" | "footer";
|
|
155
|
+
export interface VuetableCellProps {
|
|
156
|
+
class: string[];
|
|
157
|
+
style: Record<string, string>;
|
|
158
|
+
"data-vuetable-column"?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface VuetableHeaderGroup<Field = VuetableColumnDefinition> extends VuetableColumnGroup<Field> {
|
|
161
|
+
groupKey: string;
|
|
162
|
+
fixed?: VuetableFixedSide;
|
|
163
|
+
isGroupStart: boolean;
|
|
164
|
+
isGroupEnd: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface VuetableColumnGroup<Field = VuetableColumnDefinition> {
|
|
167
|
+
key: string;
|
|
168
|
+
value: VuetableGroupValue;
|
|
169
|
+
fields: Field[];
|
|
170
|
+
colspan: number;
|
|
171
|
+
startIndex: number;
|
|
172
|
+
endIndex: number;
|
|
173
|
+
}
|
|
174
|
+
export interface VuetableTableSlotScope<Field = VuetableColumnDefinition> extends Record<string, unknown> {
|
|
175
|
+
fields: Field[];
|
|
176
|
+
visibleFields: Field[];
|
|
177
|
+
groups: VuetableColumnGroup<Field>[];
|
|
178
|
+
headerGroups: VuetableHeaderGroup<Field>[];
|
|
179
|
+
getCellProps(field: Field, region?: VuetableCellRegion): VuetableCellProps;
|
|
180
|
+
getSpanProps(fields: Field[], region?: VuetableCellRegion): VuetableCellProps;
|
|
181
|
+
columnCount: number;
|
|
182
|
+
isFixedHeader: boolean;
|
|
183
|
+
scrollVisible: boolean;
|
|
184
|
+
scrollBarWidth: string;
|
|
185
|
+
}
|
|
186
|
+
export type VuetableTableScope<Field = VuetableColumnDefinition> = VuetableTableSlotScope<Field>;
|
|
187
|
+
export declare const VuetableColumn: VuetableComponent<{ $props: VuetableColumnProps }>;
|
|
113
188
|
export declare const VuetableFieldCheckbox: VuetableComponent;
|
|
114
189
|
export declare const VuetableFieldHandle: VuetableComponent;
|
|
115
190
|
export declare const VuetableFieldSequence: VuetableComponent;
|
package/dist/style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.vuetable-th-gutter[data-v-
|
|
1
|
+
.vuetable-th-gutter[data-v-c45e8fef]{padding:0!important;border-left:none!important;border-right:none!important}.vuetable-fixed-columns .vuetable-body-wrapper{overflow-x:auto}.vuetable .vuetable-fixed-column{z-index:var(--vuetable-fixed-z-index, 2);background:var(--vuetable-fixed-background, #fff)}.vuetable .vuetable-fixed-header{z-index:var(--vuetable-fixed-header-z-index, 3);background:var(--vuetable-fixed-header-background, var(--vuetable-fixed-background, #fff))}.vuetable .vuetable-fixed-footer{background:var(--vuetable-fixed-footer-background, var(--vuetable-fixed-background, #fff))}[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}
|
|
2
2
|
|
|
3
|
-
.vuetable-th-gutter[data-v-05d64983]{padding:0!important;border-left:none!important;border-right:none!important}[v-cloak][data-v-d3ef3e5c]{display:none}table.vuetable.fixed-header[data-v-d3ef3e5c]{table-layout:fixed}.vuetable th.sortable[data-v-d3ef3e5c]:hover{color:#2185d0;cursor:pointer}.vuetable-head-wrapper[data-v-d3ef3e5c]{overflow-x:hidden}.vuetable-head-wrapper table.vuetable[data-v-d3ef3e5c]{border-bottom-left-radius:0;border-bottom-right-radius:0}.vuetable-body-wrapper.fixed-header[data-v-d3ef3e5c]{position:relative;overflow-y:auto}.vuetable-body-wrapper table.vuetable.fixed-header[data-v-d3ef3e5c]{border-top:none!important;margin-top:0!important;border-top-left-radius:0;border-top-right-radius:0}.vuetable-empty-result[data-v-d3ef3e5c]{text-align:center}.vuetable-pagination[data-v-27f1ae20]{background:#f9fafb!important}.vuetable-pagination-info[data-v-89f2e9b6]{margin-top:auto;margin-bottom:auto}
|
|
3
|
+
.vuetable-th-gutter[data-v-05d64983]{padding:0!important;border-left:none!important;border-right:none!important}.vuetable-fixed-columns .vuetable-body-wrapper[data-v-d3ef3e5c]{overflow-x:auto}.vuetable .vuetable-fixed-column[data-v-d3ef3e5c]{z-index:var(--vuetable-fixed-z-index, 2);background:var(--vuetable-fixed-background, #fff)}.vuetable .vuetable-fixed-header[data-v-d3ef3e5c]{z-index:var(--vuetable-fixed-header-z-index, 3);background:var(--vuetable-fixed-header-background, var(--vuetable-fixed-background, #fff))}.vuetable .vuetable-fixed-footer[data-v-d3ef3e5c]{background:var(--vuetable-fixed-footer-background, var(--vuetable-fixed-background, #fff))}[v-cloak][data-v-d3ef3e5c]{display:none}table.vuetable.fixed-header[data-v-d3ef3e5c]{table-layout:fixed}.vuetable th.sortable[data-v-d3ef3e5c]:hover{color:#2185d0;cursor:pointer}.vuetable-head-wrapper[data-v-d3ef3e5c]{overflow-x:hidden}.vuetable-head-wrapper table.vuetable[data-v-d3ef3e5c]{border-bottom-left-radius:0;border-bottom-right-radius:0}.vuetable-body-wrapper.fixed-header[data-v-d3ef3e5c]{position:relative;overflow-y:auto}.vuetable-body-wrapper table.vuetable.fixed-header[data-v-d3ef3e5c]{border-top:none!important;margin-top:0!important;border-top-left-radius:0;border-top-right-radius:0}.vuetable-empty-result[data-v-d3ef3e5c]{text-align:center}.vuetable-pagination[data-v-27f1ae20]{background:#f9fafb!important}.vuetable-pagination-info[data-v-89f2e9b6]{margin-top:auto;margin-bottom:auto}
|