@vuetify/v0 1.0.0-alpha.4 → 1.0.0-beta.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 +26 -5
- package/dist/{adapter-C9cR4AcY.mjs → adapter-BCVxBtDp.mjs} +11 -11
- package/dist/{adapter-Cr7Bl4la.d.mts → adapter-BO75n0Cn.d.mts} +7 -7
- package/dist/{adapter-C6JmOyYo.d.mts → adapter-DZeI0ZbW.d.mts} +1 -1
- package/dist/{adapter-DgBBe_BW.d.mts → adapter-we-0GbFH.d.mts} +2 -2
- package/dist/adapters-BHD1lc-K.mjs +4 -0
- package/dist/adapters-BYLWDmYl.mjs +5 -0
- package/dist/adapters-BxrTL8E3.mjs +4 -0
- package/dist/adapters-CBgBd7VE.mjs +2 -0
- package/dist/browser/index.js +2860 -908
- package/dist/components/index.d.mts +2 -3
- package/dist/components/index.mjs +2 -2
- package/dist/{components-BWxMSWr7.mjs → components-_uxZ_Zo3.mjs} +1054 -502
- package/dist/composables/index.d.mts +19 -18
- package/dist/composables/index.mjs +26 -26
- package/dist/{consola-Crr4qbeI.d.mts → consola-CUNHyu8J.d.mts} +1 -1
- package/dist/{consola-DYvbPNbF.mjs → consola-cad-VEV2.mjs} +5 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-DDr2yY-A.mjs → createDataTable-DlFQyBTN.mjs} +192 -101
- package/dist/{createGroup-BSGtfBUE.mjs → createGroup-DsKJMuRd.mjs} +2 -2
- package/dist/{createRegistry-Db_juawd.mjs → createRegistry-tJ1PPNIr.mjs} +2 -2
- package/dist/{createSelection-BeKZMxha.mjs → createSelection-DEqhvdoj.mjs} +2 -2
- package/dist/{createSingle-Dms2efxr.mjs → createSingle-ClzWqRCe.mjs} +2 -2
- package/dist/{createTokens-B1lwHZvO.mjs → createTokens-mNxs8DQ3.mjs} +3 -3
- package/dist/{createTrinity-BTCs1pYx.mjs → createTrinity-z-3q9QWR.mjs} +5 -2
- package/dist/data-table/adapters/client/index.d.mts +1 -1
- package/dist/data-table/adapters/client/index.mjs +1 -1
- package/dist/data-table/adapters/index.d.mts +4 -4
- package/dist/data-table/adapters/index.mjs +5 -5
- package/dist/data-table/adapters/server/index.d.mts +1 -1
- package/dist/data-table/adapters/server/index.mjs +1 -1
- package/dist/data-table/adapters/virtual/index.d.mts +1 -1
- package/dist/data-table/adapters/virtual/index.mjs +1 -1
- package/dist/data-table/index.d.mts +6 -6
- package/dist/data-table/index.mjs +5 -5
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +2 -2
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +1 -1
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +1 -1
- package/dist/{flagsmith-ygKMImos.d.mts → flagsmith-Cn_KVy6v.d.mts} +1 -1
- package/dist/{globals-BAe6tA_x.mjs → globals-DB-krEA-.mjs} +1 -1
- package/dist/{index-B3-FstpY.d.mts → index-ATZqco03.d.mts} +95 -2
- package/dist/{index-jQPkwo3G.d.mts → index-B3PDLk_Y.d.mts} +879 -454
- package/dist/{index-Cw04PFVO.d.mts → index-BIyQ3OxC.d.mts} +2 -168
- package/dist/{index-BfpLkDR_.d.mts → index-BN06veYe.d.mts} +947 -225
- package/dist/{index-CLR1QMM3.d.mts → index-DHmuwBdv.d.mts} +60 -1
- package/dist/index-DWAgQOBa.d.mts +170 -0
- package/dist/{index-BA7YU2xY.d.mts → index-ZD3hw2Zo.d.mts} +123 -62
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +29 -29
- package/dist/json/attributes.json +128 -0
- package/dist/json/importMap.json +24 -0
- package/dist/json/tags.json +57 -0
- package/dist/json/web-types.json +375 -2
- package/dist/{launchdarkly-BJR4vbbV.d.mts → launchdarkly-C3Knz7-v.d.mts} +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -2
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +2 -2
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/consola/index.mjs +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +4 -4
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/pino/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +5 -5
- package/dist/logger/index.mjs +4 -4
- package/dist/notifications/index.d.mts +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/palettes/ant/generate/index.mjs +6 -1
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/leonardo/generate/index.mjs +6 -2
- package/dist/palettes/material/generate/index.mjs +11 -2
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +1 -1
- package/dist/{pino-NmR7X0s4.d.mts → pino-BaYY_KIN.d.mts} +1 -1
- package/dist/{pino-CIcYlW3u.mjs → pino-BscMO3RR.mjs} +5 -2
- package/dist/{posthog-B3go2aCh.mjs → posthog-B5s_KGhy.mjs} +1 -1
- package/dist/{posthog-CQntUXFO.d.mts → posthog-CR8R2ywM.d.mts} +1 -1
- package/dist/rules/index.d.mts +2 -2
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-DQK305lc.d.mts → server-7vjHxjNc.d.mts} +1 -1
- package/dist/{server-ZFXbgQoY.mjs → server-CZ83nTn_.mjs} +1 -1
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +1 -1
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +3 -3
- package/dist/theme/adapters/unhead/index.d.mts +1 -1
- package/dist/theme/adapters/unhead/index.mjs +1 -1
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme/index.mjs +3 -3
- package/dist/types/index.d.mts +2 -2
- package/dist/{unhead-dPyVkgiJ.mjs → unhead-CG672gKh.mjs} +1 -1
- package/dist/{useClickOutside-B8naChaQ.mjs → useClickOutside-DoOgNtrj.mjs} +1583 -436
- package/dist/{useFeatures-x2iKp0C8.mjs → useFeatures-B-A-eOo-.mjs} +4 -4
- package/dist/{useLocale-BUms59Bw.mjs → useLocale-CbpoxbVU.mjs} +5 -5
- package/dist/{useLogger-DPSSa-YR.mjs → useLogger-CTgAedNH.mjs} +51 -7
- package/dist/{useNotifications-BPTmZWQy.mjs → useNotifications-BkKGUl_1.mjs} +6 -6
- package/dist/{usePermissions-CTi-3pBk.mjs → usePermissions-BYOrKcnk.mjs} +2 -2
- package/dist/{useRules-DNhljkyO.mjs → useRules-mD_DY9dy.mjs} +4 -3
- package/dist/{useTheme-3vW3kFNg.mjs → useTheme-B1lUya5B.mjs} +5 -5
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +116 -2
- package/dist/{v0-DadOcxFI.mjs → v0-Bx5Mi7qE.mjs} +1 -1
- package/dist/{v0-YJQoTLsp.mjs → v0-CG9o3on7.mjs} +1 -1
- package/dist/{v0-CotC1PiS.mjs → v0-CHK79mZX.mjs} +1 -1
- package/dist/{v0-DAlKpCR8.mjs → v0-COaQncfZ.mjs} +1 -1
- package/dist/{v0-CRGArJim.d.mts → v0-DWZ_N2GG.d.mts} +1 -1
- package/dist/{v0-DYsCJPIu.d.mts → v0-QIjffi4E.d.mts} +1 -1
- package/dist/{v0-DDELiSI6.d.mts → v0-WzS4GAIp.d.mts} +1 -1
- package/dist/{virtual-BqCRw0ly.d.mts → virtual-CrgGA-o6.d.mts} +1 -1
- package/dist/{virtual-Dnno49F8.mjs → virtual-UumJ2BQ9.mjs} +1 -1
- package/package.json +12 -3
- package/dist/adapters-B25KaYU4.mjs +0 -2
- package/dist/adapters-BcddLSNs.mjs +0 -4
- package/dist/adapters-Dv74Jk6A.mjs +0 -5
- package/dist/adapters-t6QC-zE8.mjs +0 -3
- /package/dist/{adapter-Dzyrlbz7.d.mts → adapter-B6IrPwib.d.mts} +0 -0
- /package/dist/{adapter-o8r-2vUn.d.mts → adapter-BEJXp-ie.d.mts} +0 -0
- /package/dist/{index-DWfPppPU.d.mts → index-BOn0AAue.d.mts} +0 -0
- /package/dist/{index-DewYtDsc.d.mts → index-C6NnIuDv.d.mts} +0 -0
- /package/dist/{index-DJQwYeyx.d.mts → index-PvkxPev3.d.mts} +0 -0
- /package/dist/{memory-B0w39kno.d.mts → memory-D-JbdKXg.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -28,7 +28,11 @@
|
|
|
28
28
|
|
|
29
29
|
Headless Vue 3 UI primitives and composables for building modern applications and design systems. `@vuetify/v0` is the foundation of the Vuetify ecosystem, offering lightweight, unstyled building blocks with full TypeScript support and accessibility features built-in.
|
|
30
30
|
|
|
31
|
-
> **Note:**
|
|
31
|
+
> **Note:** v0 is in beta — the API is stabilizing toward 1.0. Some APIs may still change before the stable release.
|
|
32
|
+
|
|
33
|
+
## Primary Sponsor
|
|
34
|
+
|
|
35
|
+
This spot is open. Vuetify0 accepts one Primary Sponsor at a time — $2,000/mo gets your logo on the Vuetify0 docs site (home page + desktop sidebar on every docs page) and this README. [Become the Primary Sponsor →](https://0.vuetifyjs.com/sponsor)
|
|
32
36
|
|
|
33
37
|
## Repository Structure
|
|
34
38
|
|
|
@@ -130,6 +134,7 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
130
134
|
| [ExpansionPanel](https://0.vuetifyjs.com/components/disclosure/expansion-panel) | Accordion-style collapsible panels |
|
|
131
135
|
| [Popover](https://0.vuetifyjs.com/components/disclosure/popover) | CSS anchor-positioned popup content |
|
|
132
136
|
| [Tabs](https://0.vuetifyjs.com/components/disclosure/tabs) | Tab panel navigation with keyboard support and lazy content rendering |
|
|
137
|
+
| [Tooltip](https://0.vuetifyjs.com/components/disclosure/tooltip) | Description tooltip with hover/focus triggers |
|
|
133
138
|
| [Treeview](https://0.vuetifyjs.com/components/disclosure/treeview) | Hierarchical tree with nested selection and expand/collapse |
|
|
134
139
|
|
|
135
140
|
#### Semantic
|
|
@@ -142,6 +147,7 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
|
|
|
142
147
|
| [Image](https://0.vuetifyjs.com/components/semantic/image) | Image with placeholder, error fallback, and lazy loading |
|
|
143
148
|
| [Overflow](https://0.vuetifyjs.com/components/semantic/overflow) | Responsive truncation primitive with overflow detection and indicator |
|
|
144
149
|
| [Pagination](https://0.vuetifyjs.com/components/semantic/pagination) | Page navigation with semantic `<nav>` wrapper |
|
|
150
|
+
| [Progress](https://0.vuetifyjs.com/components/semantic/progress) | Headless progress indicator with multi-segment and buffer support |
|
|
145
151
|
| [Snackbar](https://0.vuetifyjs.com/components/semantic/snackbar) | Toast notification with queue, positioning, and auto-dismiss |
|
|
146
152
|
| [Splitter](https://0.vuetifyjs.com/components/semantic/splitter) | Resizable panel layout with drag handles |
|
|
147
153
|
|
|
@@ -166,6 +172,7 @@ Base data structures that most other composables build upon:
|
|
|
166
172
|
|
|
167
173
|
#### Data
|
|
168
174
|
|
|
175
|
+
- [`createDataGrid`](https://0.vuetifyjs.com/composables/data/create-data-grid) - Headless data grid layering column layout, cell editing, row ordering, and row spanning on top of createDataTable
|
|
169
176
|
- [`createDataTable`](https://0.vuetifyjs.com/composables/data/create-data-table) - Data table with sort, filter, pagination, row selection, grouping, and adapter pattern
|
|
170
177
|
- [`createFilter`](https://0.vuetifyjs.com/composables/data/create-filter) - Reactive array filtering with multiple modes
|
|
171
178
|
- [`createKanban`](https://0.vuetifyjs.com/composables/data/create-kanban) - Two-level sortable orchestrator (columns + items)
|
|
@@ -189,6 +196,8 @@ Selection management composables built on `createRegistry`:
|
|
|
189
196
|
- [`createForm`](https://0.vuetifyjs.com/composables/forms/create-form) - Form validation and state management with async rules
|
|
190
197
|
- [`createInput`](https://0.vuetifyjs.com/composables/forms/create-input) - Shared form field state: validation, dirty/pristine, ARIA IDs
|
|
191
198
|
- [`createNumberField`](https://0.vuetifyjs.com/composables/forms/create-number-field) - Numeric input state with formatting, stepping, and validation
|
|
199
|
+
- [`createNumeric`](https://0.vuetifyjs.com/composables/forms/create-numeric) - Pure numeric math primitive: clamp, snap, step, percentage, and circular wrapping
|
|
200
|
+
- [`createOtp`](https://0.vuetifyjs.com/composables/forms/create-otp) - OTP / verification code state with pattern-gated entry and decisional completion hook
|
|
192
201
|
- [`createValidation`](https://0.vuetifyjs.com/composables/forms/create-validation) - Field-level validation with sync/async rules
|
|
193
202
|
- [`createCombobox`](https://0.vuetifyjs.com/composables/forms/create-combobox) - Combobox state management with filtering and virtual focus
|
|
194
203
|
- [`createRating`](https://0.vuetifyjs.com/composables/forms/create-rating) - Bounded rating value with discrete items and half-step support
|
|
@@ -199,15 +208,17 @@ Selection management composables built on `createRegistry`:
|
|
|
199
208
|
- [`useProxyModel`](https://0.vuetifyjs.com/composables/reactivity/use-proxy-model) - Bridge selection context to component v-model
|
|
200
209
|
- [`useProxyRegistry`](https://0.vuetifyjs.com/composables/reactivity/use-proxy-registry) - Convert registry Map to reactive object
|
|
201
210
|
|
|
202
|
-
####
|
|
211
|
+
#### Semantic
|
|
203
212
|
|
|
204
|
-
- [`createBreadcrumbs`](https://0.vuetifyjs.com/composables/
|
|
205
|
-
- [`createOverflow`](https://0.vuetifyjs.com/composables/
|
|
213
|
+
- [`createBreadcrumbs`](https://0.vuetifyjs.com/composables/semantic/create-breadcrumbs) - Breadcrumb navigation model with depth tracking and path traversal
|
|
214
|
+
- [`createOverflow`](https://0.vuetifyjs.com/composables/semantic/create-overflow) - Container overflow measurement for item capacity
|
|
215
|
+
- [`createProgress`](https://0.vuetifyjs.com/composables/semantic/create-progress) - Progress state with multi-segment and buffer tracking
|
|
206
216
|
|
|
207
217
|
#### Transformers
|
|
208
218
|
|
|
209
219
|
- [`toArray`](https://0.vuetifyjs.com/composables/transformers/to-array) - Array transformation utilities
|
|
210
220
|
- [`toElement`](https://0.vuetifyjs.com/composables/transformers/to-element) - Normalize refs, selectors, and elements to DOM elements
|
|
221
|
+
- [`toHighlight`](https://0.vuetifyjs.com/composables/transformers/to-highlight) - Split text into matched and unmatched chunks for query highlighting
|
|
211
222
|
- [`toReactive`](https://0.vuetifyjs.com/composables/transformers/to-reactive) - Reactive object conversion
|
|
212
223
|
|
|
213
224
|
#### System
|
|
@@ -248,6 +259,7 @@ Plugin-capable composables following the trinity pattern:
|
|
|
248
259
|
- [`useStack`](https://0.vuetifyjs.com/composables/plugins/use-stack) - Overlay z-index stacking with automatic scrim coordination
|
|
249
260
|
- [`useStorage`](https://0.vuetifyjs.com/composables/plugins/use-storage) - Storage adapter (localStorage/sessionStorage/memory)
|
|
250
261
|
- [`useTheme`](https://0.vuetifyjs.com/composables/plugins/use-theme) - Theme management with CSS variable injection
|
|
262
|
+
- [`useTooltip`](https://0.vuetifyjs.com/composables/plugins/use-tooltip) - Region-scoped tooltip delay coordination
|
|
251
263
|
|
|
252
264
|
## Design Principles
|
|
253
265
|
|
|
@@ -292,7 +304,16 @@ pnpm validate
|
|
|
292
304
|
|
|
293
305
|
## Contributing
|
|
294
306
|
|
|
295
|
-
|
|
307
|
+
Vuetify0 is in beta — open for feedback, bug reports, and contributions. See the [Roadmap](https://0.vuetifyjs.com/roadmap#beta) for what's planned and how to get involved.
|
|
308
|
+
|
|
309
|
+
## Supporting Vuetify
|
|
310
|
+
|
|
311
|
+
Vuetify0 is an MIT-licensed open source project. Its ongoing development is made possible by the support of sponsors and backers. If you'd like to join them, please consider:
|
|
312
|
+
|
|
313
|
+
- [Sponsor on GitHub](https://github.com/sponsors/johnleider)
|
|
314
|
+
- [Donate via Open Collective](https://opencollective.com/vuetify)
|
|
315
|
+
|
|
316
|
+
For direct support plans and fixed-scope project builds, see [Vuetify Services](https://0.vuetifyjs.com/services).
|
|
296
317
|
|
|
297
318
|
## License
|
|
298
319
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clamp, isArray, isNaN, isNullOrUndefined, isNumber, isObject, isString, range } from "./utilities/index.mjs";
|
|
2
|
-
import { i as useContext, t as createTrinity } from "./createTrinity-
|
|
2
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
3
|
import { t as toArray } from "./toArray-CD2-OxAz.mjs";
|
|
4
4
|
import { computed, isRef, shallowRef, toRef, toValue } from "vue";
|
|
5
5
|
//#region src/composables/createFilter/index.ts
|
|
@@ -424,16 +424,18 @@ function compareValues(a, b, collator) {
|
|
|
424
424
|
var DataTableAdapter = class {
|
|
425
425
|
/** Create the filter pipeline stage */
|
|
426
426
|
filter(context) {
|
|
427
|
-
const filter = createFilter(
|
|
427
|
+
const filter = createFilter({
|
|
428
428
|
...context.filterOptions,
|
|
429
|
-
keys: [...context.filterableKeys],
|
|
430
|
-
customFilter: (query, item) => {
|
|
429
|
+
keys: [...toValue(context.filterableKeys)],
|
|
430
|
+
customFilter: context.filterOptions.customFilter ?? ((query, item) => {
|
|
431
|
+
const columnFilters = toValue(context.customColumnFilters);
|
|
432
|
+
const keys = toValue(context.filterableKeys);
|
|
431
433
|
if (!/* @__PURE__ */ isObject(item)) return false;
|
|
432
434
|
const q = String(/* @__PURE__ */ isArray(query) ? query[0] : query).toLowerCase();
|
|
433
435
|
if (!q) return true;
|
|
434
436
|
const obj = item;
|
|
435
|
-
for (const key of
|
|
436
|
-
const customFn =
|
|
437
|
+
for (const key of keys) {
|
|
438
|
+
const customFn = columnFilters[key];
|
|
437
439
|
if (customFn) {
|
|
438
440
|
if (customFn(obj[key], q)) return true;
|
|
439
441
|
} else {
|
|
@@ -442,10 +444,7 @@ var DataTableAdapter = class {
|
|
|
442
444
|
}
|
|
443
445
|
}
|
|
444
446
|
return false;
|
|
445
|
-
}
|
|
446
|
-
} : {
|
|
447
|
-
...context.filterOptions,
|
|
448
|
-
keys: [...context.filterableKeys]
|
|
447
|
+
})
|
|
449
448
|
});
|
|
450
449
|
const allItems = toRef(() => toValue(context.items));
|
|
451
450
|
const { items: filteredItems } = filter.apply(context.search, allItems);
|
|
@@ -459,11 +458,12 @@ var DataTableAdapter = class {
|
|
|
459
458
|
return computed(() => {
|
|
460
459
|
const entries = sortBy.value;
|
|
461
460
|
if (entries.length === 0) return filteredItems.value;
|
|
461
|
+
const sorts = toValue(customSorts) ?? {};
|
|
462
462
|
const collator = new Intl.Collator(locale?.value);
|
|
463
463
|
const resolved = entries.map(({ key, direction }) => ({
|
|
464
464
|
parts: key.split("."),
|
|
465
465
|
direction,
|
|
466
|
-
custom:
|
|
466
|
+
custom: sorts[key]
|
|
467
467
|
}));
|
|
468
468
|
return filteredItems.value.toSorted((a, b) => {
|
|
469
469
|
for (const { parts, direction, custom } of resolved) {
|
|
@@ -249,8 +249,8 @@ interface DataTableAdapterContext<T extends Record<string, unknown>> {
|
|
|
249
249
|
items: MaybeRefOrGetter<T[]>;
|
|
250
250
|
/** Search query ref */
|
|
251
251
|
search: ShallowRef<string>;
|
|
252
|
-
/** Column
|
|
253
|
-
filterableKeys: readonly string[]
|
|
252
|
+
/** Column ids eligible for filtering (reactive — tracks the columns registry) */
|
|
253
|
+
filterableKeys: MaybeRefOrGetter<readonly string[]>;
|
|
254
254
|
/** Current sort state derived from sort controls */
|
|
255
255
|
sortBy: Readonly<Ref<SortEntry[]>>;
|
|
256
256
|
/** Locale for sorting (reactive, from useLocale or options) */
|
|
@@ -259,10 +259,10 @@ interface DataTableAdapterContext<T extends Record<string, unknown>> {
|
|
|
259
259
|
filterOptions: Omit<FilterOptions, 'keys'>;
|
|
260
260
|
/** Pagination options (size excluded, derived from pipeline) */
|
|
261
261
|
paginationOptions: Omit<PaginationOptions, 'size'>;
|
|
262
|
-
/** Per-column custom sort comparators */
|
|
263
|
-
customSorts: Partial<Record<
|
|
264
|
-
/** Per-column custom filter functions */
|
|
265
|
-
customColumnFilters: Partial<Record<
|
|
262
|
+
/** Per-column custom sort comparators (reactive — tracks the columns registry). Keys are column ids, which may be `keyof T` or derived strings. */
|
|
263
|
+
customSorts: MaybeRefOrGetter<Partial<Record<string, (a: unknown, b: unknown) => number>>>;
|
|
264
|
+
/** Per-column custom filter functions (reactive — tracks the columns registry). Keys are column ids, which may be `keyof T` or derived strings. */
|
|
265
|
+
customColumnFilters: MaybeRefOrGetter<Partial<Record<string, (value: unknown, query: string) => boolean>>>;
|
|
266
266
|
}
|
|
267
267
|
/** Outputs returned by the adapter to createDataTable */
|
|
268
268
|
interface DataTableAdapterResult<T extends Record<string, unknown>> {
|
|
@@ -290,7 +290,7 @@ declare abstract class DataTableAdapter<T extends Record<string, unknown>> {
|
|
|
290
290
|
filteredItems: _$vue.ComputedRef<T[]>;
|
|
291
291
|
};
|
|
292
292
|
/** Create the sort pipeline stage */
|
|
293
|
-
protected sort(filteredItems: Readonly<Ref<readonly T[]>>, sortBy: Readonly<Ref<SortEntry[]>>, locale?: Readonly<Ref<string | undefined>>, customSorts?: Partial<Record<string, (a: unknown, b: unknown) => number
|
|
293
|
+
protected sort(filteredItems: Readonly<Ref<readonly T[]>>, sortBy: Readonly<Ref<SortEntry[]>>, locale?: Readonly<Ref<string | undefined>>, customSorts?: MaybeRefOrGetter<Partial<Record<string, (a: unknown, b: unknown) => number>>>): Readonly<Ref<readonly T[]>>;
|
|
294
294
|
abstract setup(context: DataTableAdapterContext<T>): DataTableAdapterResult<T>;
|
|
295
295
|
}
|
|
296
296
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ID } from "./index-
|
|
2
|
-
import { c as TokenTicket, i as TokenContext } from "./index-
|
|
1
|
+
import { a as ID } from "./index-DHmuwBdv.mjs";
|
|
2
|
+
import { c as TokenTicket, i as TokenContext } from "./index-DWAgQOBa.mjs";
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useLocale/adapters/adapter.d.ts
|