vuetable-next 1.0.11 → 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 +226 -79
- package/dist/index.js +2 -0
- package/dist/portable/components/useVuetableField.d.ts +2 -0
- package/dist/public.d.ts +82 -1
- package/dist/style.css +2 -2
- package/dist/types/components/Vuetable.vue.d.ts +207 -106
- 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 +17 -0
- package/dist/types/components/VuetableRowHeader.vue.d.ts +15 -3
- package/dist/types/components/createVuetable.d.ts +6 -0
- 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 +8 -0
- package/dist/vue2.cjs +12 -8
- package/dist/vue2.cjs.map +1 -1
- package/dist/vue2.js +1406 -894
- package/dist/vue2.js.map +1 -1
- package/dist/vue3.cjs +2 -2
- package/dist/vue3.cjs.map +1 -1
- package/dist/vue3.js +1565 -967
- 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
|
|
@@ -233,6 +289,56 @@ The table API is intended to stay familiar on Vue 2 and Vue 3. Framework-level
|
|
|
233
289
|
differences still apply: use Vue 3 slot/render-function conventions in your own
|
|
234
290
|
components, and follow the setup instructions for your installed Vue version.
|
|
235
291
|
|
|
292
|
+
### Vue 3: automatic row-render optimization
|
|
293
|
+
|
|
294
|
+
The standard `Vuetable` avoids rebuilding unchanged rows when parent updates
|
|
295
|
+
only replace event listeners, including inline callbacks. No factory, special
|
|
296
|
+
registration or application-side listener caching is required. The outer
|
|
297
|
+
component can still update to keep listeners and root attributes current.
|
|
298
|
+
Reactive rows, fields and values read by formatters continue to update normally.
|
|
299
|
+
External slots are updated conservatively so their content cannot become stale;
|
|
300
|
+
this is not a promise to skip renders when table content actually changes.
|
|
301
|
+
|
|
302
|
+
`createVuetable()` remains optional for declaring a fixed component-event
|
|
303
|
+
contract. It is not required for the standard listener-only optimization.
|
|
304
|
+
|
|
305
|
+
```ts
|
|
306
|
+
import { createVuetable } from "vuetable-next";
|
|
307
|
+
|
|
308
|
+
const AuditTable = createVuetable({
|
|
309
|
+
eventPrefix: "audit:",
|
|
310
|
+
events: ["custom-action"]
|
|
311
|
+
});
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Define the component once at module scope, outside `render()` and `setup()`, then
|
|
315
|
+
register it locally or use it directly in `<script setup>`. Keep existing table
|
|
316
|
+
props, slots and refs; listen with `@audit:row-clicked` or `@audit:custom-action`.
|
|
317
|
+
`events` contains **additional unprefixed** names passed to `fireEvent()`; the
|
|
318
|
+
default prefix is `vuetable:`. Vue handles latest listeners, `.once`, errors and
|
|
319
|
+
native DOM listeners normally. With an empty prefix, declaring `click` makes
|
|
320
|
+
`@click` a component event only, not a root DOM click listener.
|
|
321
|
+
|
|
322
|
+
The prefix is fixed for each factory component: overriding its `eventPrefix`
|
|
323
|
+
prop is unsupported and warns in development. Undeclared factory events also
|
|
324
|
+
warn in development. Create another factory for a different prefix or event set.
|
|
325
|
+
Factory results are local components, not plugins (`app.use()` is unsupported).
|
|
326
|
+
For the generic component, single-word listeners such as `onCustom` are ambiguous:
|
|
327
|
+
they fall through to the root DOM element as well as receiving component events.
|
|
328
|
+
Use the factory with `events: ["custom"]` when a listener must be component-only.
|
|
329
|
+
Explicit Vue DOM listeners such as `on:custom-event` remain DOM listeners.
|
|
330
|
+
The generic `Vuetable` remains fully dynamic and warning-free for arbitrary
|
|
331
|
+
prefixes/custom events. Vue 2 users keep the generic component:
|
|
332
|
+
importing the factory is safe, but calling it throws a Vue-3-only error.
|
|
333
|
+
|
|
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.
|
|
341
|
+
|
|
236
342
|
### Moving an existing table
|
|
237
343
|
|
|
238
344
|
1. Replace the `vuetable-2` dependency with the verified `vuetable-next` release or archive.
|
|
@@ -279,7 +385,7 @@ import {
|
|
|
279
385
|
} from "vuetable-next";
|
|
280
386
|
```
|
|
281
387
|
|
|
282
|
-
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
|
|
283
389
|
examples, props, event wiring, pagination data, and complete Vue 2.6 / Vue 2.7 /
|
|
284
390
|
Vue 3 startup examples. Vue 2.6 registers `@vue/composition-api` once; Vue 2.7 and
|
|
285
391
|
Vue 3 do not need that plugin. Existing mixins remain public — no forced migration.
|
|
@@ -300,7 +406,9 @@ declarations are portable; `/vue3` exposes the richer generated Vue 3 types.
|
|
|
300
406
|
Portable composable refs support `.value`, reactive inputs and template usage.
|
|
301
407
|
For native Vue 3 branded `Ref`/`ComputedRef` types or direct-ref `watch()`
|
|
302
408
|
inference, import from `/vue3`; with the root entry, watch a getter instead.
|
|
303
|
-
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
|
+
---
|
|
304
412
|
|
|
305
413
|
## Live demos
|
|
306
414
|
|
|
@@ -329,14 +437,47 @@ Try selecting and clearing rows, replacing data, opening details, and reloading.
|
|
|
329
437
|
The live state panel shows the runtime version, selected IDs, emitted custom
|
|
330
438
|
events and any captured runtime errors.
|
|
331
439
|
|
|
440
|
+
On the Vue 3 page, choose **Factory playground** (`/vue-3/factory/`) for the
|
|
441
|
+
interactive `createVuetable()` demo: sortable and paginated orders, checkboxes,
|
|
442
|
+
details, custom row actions, and measured generic-versus-factory listener updates
|
|
443
|
+
(both avoid rebuilding unchanged rows in the listener-only scenario).
|
|
444
|
+
It uses the same freshly packed archive; Vue 2 pages keep the generic component.
|
|
445
|
+
|
|
332
446
|
For source-level Vue 3 development, `npm run dev` starts the Vite demo. The legacy
|
|
333
447
|
`dev:2` source demo is not the cross-version compatibility gate; use the packed
|
|
334
448
|
demo and consumer matrix for Vue 2 verification.
|
|
335
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
|
+
|
|
336
477
|
## Development and checks
|
|
337
478
|
|
|
338
479
|
Use Node.js 22 for the documented development workflow. See
|
|
339
|
-
[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
|
|
340
481
|
commands, linting, regression tests, package validation, the three-runtime matrix,
|
|
341
482
|
type checks, browser verification and pull request requirements.
|
|
342
483
|
|
|
@@ -353,6 +494,19 @@ package on each supported framework. The build produces framework-specific
|
|
|
353
494
|
render artifacts from shared component sources; generated files are not edited
|
|
354
495
|
by hand.
|
|
355
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
|
+
|
|
356
510
|
## Limitations and security
|
|
357
511
|
|
|
358
512
|
- Vue 2.6 needs Composition API; Vue 2.7 and Vue 3 do not.
|
|
@@ -361,18 +515,11 @@ by hand.
|
|
|
361
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.
|
|
362
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.
|
|
363
517
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
Bug reports, focused fixes and documentation improvements are welcome. Both fork
|
|
367
|
-
contributors and repository collaborators should use feature branches and open
|
|
368
|
-
pull requests against **`main`**.
|
|
369
|
-
|
|
370
|
-
Read the [contribution guide](CONTRIBUTING.md), include a reproduction and actual
|
|
371
|
-
validation results, and use the [pull request template](.github/pull_request_template.md).
|
|
518
|
+
---
|
|
372
519
|
|
|
373
520
|
## License and credits
|
|
374
521
|
|
|
375
|
-
[MIT](LICENSE) · Maintained by Artem Alesenko.
|
|
522
|
+
[MIT](https://github.com/Artles777/vuetable-next/blob/main/LICENSE) · Maintained by Artem Alesenko.
|
|
376
523
|
|
|
377
524
|
Based on [Vuetable-2](https://github.com/ratiw/vuetable-2). Thanks to its original
|
|
378
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;
|
|
@@ -17,4 +18,5 @@ export const useVuetableField = selected.useVuetableField;
|
|
|
17
18
|
export const useVuetableFieldCheckbox = selected.useVuetableFieldCheckbox;
|
|
18
19
|
export const useVuetablePagination = selected.useVuetablePagination;
|
|
19
20
|
export const useVuetablePaginationInfo = selected.useVuetablePaginationInfo;
|
|
21
|
+
export const createVuetable = selected.createVuetable;
|
|
20
22
|
export default selected.default;
|
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,11 +38,14 @@ 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";
|
|
43
47
|
loadOnStart?: boolean;
|
|
48
|
+
eventPrefix?: string;
|
|
44
49
|
data?: any;
|
|
45
50
|
perPage?: number;
|
|
46
51
|
initialPage?: number;
|
|
@@ -103,7 +108,83 @@ export declare function install(app: {
|
|
|
103
108
|
}): void;
|
|
104
109
|
|
|
105
110
|
export declare const Vuetable: VuetableComponent<VuetableInstance> & { install: typeof install };
|
|
111
|
+
export interface CreateVuetableOptions {
|
|
112
|
+
eventPrefix?: string;
|
|
113
|
+
events?: string[];
|
|
114
|
+
}
|
|
115
|
+
export declare function createVuetable(options?: CreateVuetableOptions): VuetableComponent<VuetableInstance>;
|
|
106
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 }>;
|
|
107
188
|
export declare const VuetableFieldCheckbox: VuetableComponent;
|
|
108
189
|
export declare const VuetableFieldHandle: VuetableComponent;
|
|
109
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}
|