@vuetify/v0 0.1.2 → 0.1.4
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 +20 -3
- package/dist/adapter-BN-h5JbD.d.mts +344 -0
- package/dist/adapter-CJIj5ySf.d.mts +11 -0
- package/dist/adapter-D_0ptsPm.mjs +229 -0
- package/dist/adapters-BQ-Lr3PW.mjs +1 -0
- package/dist/adapters-DEXpW9If.mjs +1 -0
- package/dist/adapters-Q9WaOsJp.mjs +1 -0
- package/dist/adapters-SSDVth5e.mjs +1 -0
- package/dist/browser/index.js +5593 -4490
- package/dist/components/index.d.mts +20 -4
- package/dist/components/index.mjs +38 -6
- package/dist/{components-z56rRlS4.mjs → components-CMuzTJdK.mjs} +588 -90
- package/dist/composables/index.d.mts +17 -5
- package/dist/composables/index.mjs +36 -4
- package/dist/consola-DiUk9j3y.d.mts +15 -0
- package/dist/consola-GBy8XRuL.mjs +31 -0
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +3 -3
- package/dist/constants-B8pMSkcW.mjs +1 -0
- package/dist/createDataTable-BJnmvxfb.mjs +387 -0
- package/dist/createGroup-CPhp6FUh.mjs +363 -0
- package/dist/createPagination-cyOWlpfH.mjs +234 -0
- package/dist/createSelection-uqEbFgha.mjs +261 -0
- package/dist/createSingle-B59ya3aa.mjs +179 -0
- package/dist/createTokens-BlhLdHXE.mjs +682 -0
- package/dist/createTrinity-EeHQSsb6.mjs +149 -0
- package/dist/data-table/adapters/client/index.d.mts +3 -0
- package/dist/data-table/adapters/client/index.mjs +9 -0
- package/dist/data-table/adapters/index.d.mts +5 -0
- package/dist/data-table/adapters/index.mjs +12 -0
- package/dist/data-table/adapters/server/index.d.mts +3 -0
- package/dist/data-table/adapters/server/index.mjs +7 -0
- package/dist/data-table/adapters/virtual/index.d.mts +3 -0
- package/dist/data-table/adapters/virtual/index.mjs +9 -0
- package/dist/data-table/index.d.mts +7 -0
- package/dist/data-table/index.mjs +25 -0
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +19 -15
- package/dist/features/adapters/flagsmith/index.d.mts +16 -0
- package/dist/features/adapters/flagsmith/index.mjs +3 -0
- package/dist/features/adapters/launchdarkly/index.d.mts +15 -0
- package/dist/features/adapters/launchdarkly/index.mjs +3 -0
- package/dist/features/adapters/posthog/index.d.mts +15 -0
- package/dist/features/adapters/posthog/index.mjs +4 -0
- package/dist/features/index.d.mts +17 -0
- package/dist/features/index.mjs +18 -0
- package/dist/flagsmith-CHmpPGR7.mjs +40 -0
- package/dist/{globals-VwjZ5i4B.mjs → globals-B_GVfG06.mjs} +2 -2
- package/dist/index-7mWYFHA6.d.mts +251 -0
- package/dist/index-BDTbJClL.d.mts +11 -0
- package/dist/{index-DlxrzbvZ.d.mts → index-BFBN5Zl3.d.mts} +41 -1
- package/dist/index-BuOz3Rgm.d.mts +32 -0
- package/dist/{index-cPmI99rd.d.mts → index-Bv1VN_j5.d.mts} +1 -1
- package/dist/{index-PuLeBGZ3.d.mts → index-CQrDeqsK.d.mts} +894 -329
- package/dist/{index-CLKfXGEQ.d.mts → index-Dd0m0LIJ.d.mts} +2228 -1178
- package/dist/{index-CoO8LW8o.d.mts → index-UNwEBkQT.d.mts} +16 -2
- package/dist/index.d.mts +20 -8
- package/dist/index.mjs +39 -7
- package/dist/json/attributes.json +140 -0
- package/dist/json/importMap.json +36 -0
- package/dist/json/tags.json +75 -0
- package/dist/json/web-types.json +440 -1
- package/dist/launchdarkly-W8t8ZANX.mjs +28 -0
- package/dist/locale/adapters/index.d.mts +3 -0
- package/dist/locale/adapters/index.mjs +6 -0
- package/dist/locale/adapters/v0/index.d.mts +3 -0
- package/dist/locale/adapters/v0/index.mjs +5 -0
- package/dist/locale/index.d.mts +17 -0
- package/dist/locale/index.mjs +17 -0
- package/dist/logger/adapters/consola/index.d.mts +3 -0
- package/dist/logger/adapters/consola/index.mjs +3 -0
- package/dist/logger/adapters/index.d.mts +5 -0
- package/dist/logger/adapters/index.mjs +8 -0
- package/dist/logger/adapters/pino/index.d.mts +3 -0
- package/dist/logger/adapters/pino/index.mjs +5 -0
- package/dist/logger/adapters/v0/index.d.mts +3 -0
- package/dist/logger/adapters/v0/index.mjs +5 -0
- package/dist/logger/index.d.mts +17 -0
- package/dist/logger/index.mjs +10 -0
- package/dist/memory-BsZGbGnG.mjs +27 -0
- package/dist/memory-DVjquu_v.d.mts +25 -0
- package/dist/permissions/adapters/index.d.mts +18 -0
- package/dist/permissions/adapters/index.mjs +6 -0
- package/dist/permissions/adapters/v0/index.d.mts +18 -0
- package/dist/permissions/adapters/v0/index.mjs +5 -0
- package/dist/permissions/index.d.mts +17 -0
- package/dist/permissions/index.mjs +15 -0
- package/dist/pino-01x_NmWp.mjs +49 -0
- package/dist/pino-p-jDkNQd.d.mts +24 -0
- package/dist/posthog-BrGBPPir.mjs +50 -0
- package/dist/server-6cs14bj1.d.mts +20 -0
- package/dist/server-ClCwiLMA.mjs +45 -0
- package/dist/storage/adapters/index.d.mts +3 -0
- package/dist/storage/adapters/index.mjs +3 -0
- package/dist/storage/adapters/memory/index.d.mts +2 -0
- package/dist/storage/adapters/memory/index.mjs +3 -0
- package/dist/storage/index.d.mts +17 -0
- package/dist/storage/index.mjs +37 -0
- package/dist/theme/adapters/index.d.mts +17 -0
- package/dist/theme/adapters/index.mjs +6 -0
- package/dist/theme/adapters/v0/index.d.mts +17 -0
- package/dist/theme/adapters/v0/index.mjs +5 -0
- package/dist/theme/index.d.mts +17 -0
- package/dist/theme/index.mjs +16 -0
- package/dist/toArray-DIeXVX1C.mjs +38 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/{useClickOutside-Dp1MHIjr.mjs → useClickOutside-p8HP07At.mjs} +2437 -5442
- package/dist/useFeatures-C4JF3Hgr.mjs +122 -0
- package/dist/useLocale-DlbShzF-.mjs +85 -0
- package/dist/useLogger-CO9JwbSJ.mjs +283 -0
- package/dist/usePermissions-DQVT_4nD.mjs +128 -0
- package/dist/useTheme-Bcw1Ebyt.mjs +135 -0
- package/dist/utilities/index.d.mts +3 -3
- package/dist/utilities/index.mjs +3 -2
- package/dist/{utilities-B58TiS_S.mjs → utilities-BqS1sC1W.mjs} +27 -1
- package/dist/v0-B40YkIQ-.mjs +21 -0
- package/dist/v0-BOxb3nD1.d.mts +33 -0
- package/dist/v0-BogbIzpM.mjs +41 -0
- package/dist/v0-BtQCSBOG.mjs +37 -0
- package/dist/v0-C-9dv_1S.d.mts +10 -0
- package/dist/v0-CtjuUUPl.mjs +73 -0
- package/dist/v0-DHMoZ7dS.d.mts +22 -0
- package/dist/v0-ONBWyQYQ.mjs +83 -0
- package/dist/v0-RepwEY1F.d.mts +9 -0
- package/dist/virtual-B3IPkHC0.d.mts +9 -0
- package/dist/virtual-BP9WXRzN.mjs +44 -0
- package/package.json +37 -4
- package/dist/index-qSuLpob3.d.mts +0 -1544
- /package/dist/{adapter-L4Php1_S.d.mts → adapter-DcwxFryd.d.mts} +0 -0
- /package/dist/{constants-DHKqjdjH.mjs → adapters-BGJKsBrw.mjs} +0 -0
- /package/dist/{htmlElements-DO9n35bD.mjs → htmlElements-d8iBCGpO.mjs} +0 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import { t as
|
|
5
|
-
|
|
1
|
+
import "../index-BFBN5Zl3.mjs";
|
|
2
|
+
import { C as createFilter, D as createTrinity, E as ContextTrinity, S as Primitive, T as useFilter, _ as FilterItem, a as SortDirection, b as FilterQuery, c as PaginationContextOptions, d as createPagination, f as createPaginationContext, g as FilterFunction, h as FilterContextOptions, i as DataTableAdapterResult, l as PaginationOptions, m as FilterContext, n as DataTableAdapterContext, o as SortEntry, p as usePagination, r as DataTableAdapterInterface, s as PaginationContext, t as DataTableAdapter, u as PaginationTicket, v as FilterMode, w as createFilterContext, x as FilterResult, y as FilterOptions } from "../adapter-BN-h5JbD.mjs";
|
|
3
|
+
import { $ as useStep, $i as SelectionTicket, $n as UseHotkeyReturn, $r as BreakpointName, $t as NestedTicketInput, A as createTheme, Ai as GroupTicketInput, An as createLocaleFallback, Ar as TokenValue, At as PermissionContextOptions, B as StorageOptions, Bi as createBreadcrumbsContext, Bn as useElementIntersection, Br as DateContextOptions, Bt as createNested, C as ThemeContext, Ci as createOverflow, Cn as LocaleOptions, Cr as TokenAlias, Ct as useQueue, D as ThemeRecord, Di as GroupContextOptions, Dn as LocaleTicketInput, Dr as TokenOptions, Dt as ProxyModelOptions, E as ThemePluginOptions, Ei as GroupContext, En as LocaleTicket, Er as TokenContextOptions, Et as useProxyRegistry, Fi as BreadcrumbTicketInput, Fn as useLazy, Fr as EventHandler, Ft as createPermissionsContext, G as useStorage, Gi as SingleTicket, Gn as HydrationPluginOptions, Gr as createDatePlugin, Gt as NestedActiveMode, H as createStorage, Hi as SingleContext, Hn as HydrationContext, Hr as DatePluginOptions, Ht as useNested, I as ThemeAdapter, Ii as BreadcrumbsContext, In as IntersectionObserverEntry, Ir as useDocumentEventListener, It as createPermissionsPlugin, J as StepOptions, Ji as createSingleContext, Jn as createHydrationContext, Jr as ClickOutsideIgnoreTarget, Jt as NestedOpenMode, K as StepContext, Ki as SingleTicketInput, Kn as createFallbackHydration, Kr as useDate, Kt as NestedContext, Li as BreadcrumbsContextOptions, Ln as IntersectionObserverOptions, Lr as useEventListener, Lt as usePermissions, M as createThemePlugin, Mi as createGroupContext, Mn as useLocale, Mr as createTokensContext, Mt as PermissionPluginOptions, N as useTheme, Ni as useGroup, Nn as LazyContext, Nr as useTokens, Nt as PermissionTicket, O as ThemeTicket, Oi as GroupOptions, On as createLocale, Or as TokenPrimitive, Ot as useProxyModel, P as Vuetify0ThemeAdapter, Pi as BreadcrumbTicket, Pn as LazyOptions, Pr as CleanupFunction, Pt as createPermissions, Q as createStepContext, Qi as SelectionOptions, Qn as UseHotkeyOptions, Qr as useClickOutside, Qt as NestedTicket, R as StorageContext, Ri as BreadcrumbsOptions, Rn as UseElementIntersectionReturn, Rr as useWindowEventListener, Rt as PermissionAdapter, S as ThemeColors, Si as OverflowOptions, Sn as LocaleContextOptions, Sr as FlatTokenCollection, St as createQueueContext, T as ThemeOptions, Ti as useOverflow, Tn as LocaleRecord, Tr as TokenContext, Tt as ProxyRegistryOptions, U as createStorageContext, Ui as SingleContextOptions, Un as HydrationContextOptions, Ur as createDate, Ut as multipleOpenStrategy, V as StoragePluginOptions, Vi as useBreadcrumbs, Vn as useIntersectionObserver, Vr as DateOptions, Vt as createNestedContext, W as createStoragePlugin, Wi as SingleOptions, Wn as HydrationOptions, Wr as createDateContext, Wt as singleOpenStrategy, X as StepTicketInput, Xi as SelectionContext, Xn as useHydration, Xr as UseClickOutsideOptions, Xt as NestedRegistration, Y as StepTicket, Yi as useSingle, Yn as createHydrationPlugin, Yr as ClickOutsideTarget, Yt as NestedOptions, Z as createStep, Zi as SelectionContextOptions, Zn as PlatformContext, Zr as UseClickOutsideReturn, Zt as NestedSelectionMode, _ as TimelineTicket, _i as createContext, _n as createLoggerContext, _r as FeatureTicketInput, _t as QueueContextOptions, a as VirtualDirection, aa as RegistryContextOptions, ai as createBreakpointsContext, an as UseMutationObserverReturn, ar as FormTicketInput, at as StackTicketInput, b as useTimeline, bi as OverflowContext, bn as LogLevel, br as createFeaturesPlugin, bt as QueueTicketInput, c as VirtualState, ca as RegistryEventName, ci as toReactive, cn as useMediaQuery, cr as FormValue, ct as createStackPlugin, d as useVirtual, da as RegistryTicketInput, di as PluginContextConfig, dn as usePrefersReducedMotion, dr as useForm, dt as ResizeObserverOptions, ea as SelectionTicketInput, ei as BreakpointsContext, en as OpenStrategy, er as useHotkey, et as StackContext, f as ToggleScopeControls, fa as createRegistry, fi as PluginOptions, fn as LoggerContext, fr as FeatureContext, ft as UseElementSizeReturn, g as TimelineOptions, gi as CreateContextOptions, gn as createLogger, gr as FeatureTicket, gt as QueueContext, h as TimelineContextOptions, hi as ContextKey, hn as LoggerPluginOptions, hr as FeaturePluginOptions, ht as useResizeObserver, i as VirtualContextOptions, ia as RegistryContext, ii as createBreakpoints, in as UseMutationObserverOptions, ir as FormTicket, it as StackTicket, j as createThemeContext, ji as createGroup, jn as createLocalePlugin, jr as createTokens, jt as PermissionOptions, k as ThemeTicketInput, ki as GroupTicket, kn as createLocaleContext, kr as TokenTicket, kt as PermissionContext, l as createVirtual, la as RegistryOptions, li as toArray, ln as usePrefersContrast, lr as createForm, lt as useStack, m as TimelineContext, ma as useRegistry, mi as createPluginContext, mn as LoggerOptions, mr as FeatureOptions, mt as useElementSize, n as VirtualAnchor, na as createSelectionContext, ni as BreakpointsOptions, nn as MutationObserverRecord, nr as FormContextOptions, nt as StackOptions, o as VirtualItem, oa as RegistryEventCallback, oi as createBreakpointsPlugin, on as useMutationObserver, or as FormValidationResult, ot as createStack, p as useToggleScope, pa as createRegistryContext, pi as createPlugin, pn as LoggerContextOptions, pr as FeatureContextOptions, pt as UseResizeObserverReturn, q as StepContextOptions, qi as createSingle, qn as createHydration, qr as ClickOutsideElement, qt as NestedContextOptions, r as VirtualContext, ra as useSelection, ri as BreakpointsPluginOptions, rn as ObservableNodeList, rr as FormOptions, rt as StackPluginOptions, s as VirtualOptions, sa as RegistryEventMap, si as useBreakpoints, sn as MediaQueryContext, sr as FormValidationRule, st as createStackContext, t as ScrollToOptions, ta as createSelection, ti as BreakpointsContextOptions, tn as OpenStrategyContext, tr as FormContext, tt as StackContextOptions, u as createVirtualContext, ua as RegistryTicket, ui as Plugin, un as usePrefersDark, ur as createFormContext, ut as ResizeObserverEntry, v as createTimeline, vi as provideContext, vn as createLoggerPlugin, vr as createFeatures, vt as QueueOptions, w as ThemeContextOptions, wi as createOverflowContext, wn as LocalePluginOptions, wr as TokenCollection, wt as ProxyRegistryContext, x as Colors, xi as OverflowContextOptions, xn as LocaleContext, xr as useFeatures, xt as createQueue, y as createTimelineContext, yi as useContext, yn as useLogger, yr as createFeaturesContext, yt as QueueTicket, z as StorageContextOptions, zi as createBreadcrumbs, zn as UseIntersectionObserverReturn, zr as DateContext, zt as PermissionAdapterInterface } from "../index-Dd0m0LIJ.mjs";
|
|
4
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-6cs14bj1.mjs";
|
|
5
|
+
import { t as ClientAdapter } from "../v0-RepwEY1F.mjs";
|
|
6
|
+
import { t as VirtualAdapter } from "../virtual-B3IPkHC0.mjs";
|
|
7
|
+
import { a as DataTableGroup, c as DataTableSelection, d as createDataTable, f as createDataTableContext, i as DataTableExpansion, l as DataTableSort, n as DataTableContext, o as DataTableGrouping, p as useDataTable, r as DataTableContextOptions, s as DataTableOptions, t as DataTableColumn, u as SelectStrategy } from "../index-7mWYFHA6.mjs";
|
|
8
|
+
import { t as DateAdapter } from "../adapter-DcwxFryd.mjs";
|
|
9
|
+
import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-BuOz3Rgm.mjs";
|
|
10
|
+
import { n as LocaleAdapter, t as Vuetify0LocaleAdapter } from "../v0-DHMoZ7dS.mjs";
|
|
11
|
+
import { t as LoggerAdapter } from "../adapter-CJIj5ySf.mjs";
|
|
12
|
+
import { t as ConsolaLoggerAdapter } from "../consola-DiUk9j3y.mjs";
|
|
13
|
+
import { t as PinoLoggerAdapter } from "../pino-p-jDkNQd.mjs";
|
|
14
|
+
import { t as Vuetify0LoggerAdapter } from "../v0-BOxb3nD1.mjs";
|
|
15
|
+
import { t as MemoryAdapter } from "../memory-DVjquu_v.mjs";
|
|
16
|
+
import { n as StorageType, t as StorageAdapter } from "../index-BDTbJClL.mjs";
|
|
17
|
+
export { BreadcrumbTicket, BreadcrumbTicketInput, BreadcrumbsContext, BreadcrumbsContextOptions, BreadcrumbsOptions, BreakpointName, BreakpointsContext, BreakpointsContextOptions, BreakpointsOptions, BreakpointsPluginOptions, CleanupFunction, ClickOutsideElement, ClickOutsideIgnoreTarget, ClickOutsideTarget, ClientAdapter, Colors, ConsolaLoggerAdapter, ContextKey, ContextTrinity, CreateContextOptions, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, DateAdapter, DateContext, DateContextOptions, DateOptions, DatePluginOptions, EventHandler, FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterInterface, FeaturesAdapterValue, FilterContext, FilterContextOptions, FilterFunction, FilterItem, FilterMode, FilterOptions, FilterQuery, FilterResult, FlatTokenCollection, FormContext, FormContextOptions, FormOptions, FormTicket, FormTicketInput, FormValidationResult, FormValidationRule, FormValue, GroupContext, GroupContextOptions, GroupOptions, GroupTicket, GroupTicketInput, HydrationContext, HydrationContextOptions, HydrationOptions, HydrationPluginOptions, IntersectionObserverEntry, IntersectionObserverOptions, LazyContext, LazyOptions, LocaleAdapter, LocaleContext, LocaleContextOptions, LocaleOptions, LocalePluginOptions, LocaleRecord, LocaleTicket, LocaleTicketInput, LogLevel, LoggerAdapter, LoggerContext, LoggerContextOptions, LoggerOptions, LoggerPluginOptions, MediaQueryContext, MemoryAdapter, MutationObserverRecord, NestedActiveMode, NestedContext, NestedContextOptions, NestedOpenMode, NestedOptions, NestedRegistration, NestedSelectionMode, NestedTicket, NestedTicketInput, ObservableNodeList, OpenStrategy, OpenStrategyContext, OverflowContext, OverflowContextOptions, OverflowOptions, PaginationContext, PaginationContextOptions, PaginationOptions, PaginationTicket, PermissionAdapter, PermissionAdapterInterface, PermissionContext, PermissionContextOptions, PermissionOptions, PermissionPluginOptions, PermissionTicket, PinoLoggerAdapter, PlatformContext, Plugin, PluginContextConfig, PluginOptions, Primitive, ProxyModelOptions, ProxyRegistryContext, ProxyRegistryOptions, QueueContext, QueueContextOptions, QueueOptions, QueueTicket, QueueTicketInput, RegistryContext, RegistryContextOptions, RegistryEventCallback, RegistryEventMap, RegistryEventName, RegistryOptions, RegistryTicket, RegistryTicketInput, ResizeObserverEntry, ResizeObserverOptions, ScrollToOptions, SelectStrategy, SelectionContext, SelectionContextOptions, SelectionOptions, SelectionTicket, SelectionTicketInput, ServerAdapter, ServerAdapterOptions, SingleContext, SingleContextOptions, SingleOptions, SingleTicket, SingleTicketInput, SortDirection, SortEntry, StackContext, StackContextOptions, StackOptions, StackPluginOptions, StackTicket, StackTicketInput, StepContext, StepContextOptions, StepOptions, StepTicket, StepTicketInput, StorageAdapter, StorageContext, StorageContextOptions, StorageOptions, StoragePluginOptions, StorageType, ThemeAdapter, ThemeColors, ThemeContext, ThemeContextOptions, ThemeOptions, ThemePluginOptions, ThemeRecord, ThemeTicket, ThemeTicketInput, TimelineContext, TimelineContextOptions, TimelineOptions, TimelineTicket, ToggleScopeControls, TokenAlias, TokenCollection, TokenContext, TokenContextOptions, TokenOptions, TokenPrimitive, TokenTicket, TokenValue, UseClickOutsideOptions, UseClickOutsideReturn, UseElementIntersectionReturn, UseElementSizeReturn, UseHotkeyOptions, UseHotkeyReturn, UseIntersectionObserverReturn, UseMutationObserverOptions, UseMutationObserverReturn, UseResizeObserverReturn, VirtualAdapter, VirtualAnchor, VirtualContext, VirtualContextOptions, VirtualDirection, VirtualItem, VirtualOptions, VirtualState, Vuetify0LocaleAdapter, Vuetify0LoggerAdapter, Vuetify0ThemeAdapter, createBreadcrumbs, createBreadcrumbsContext, createBreakpoints, createBreakpointsContext, createBreakpointsPlugin, createContext, createDataTable, createDataTableContext, createDate, createDateContext, createDatePlugin, createFallbackHydration, createFeatures, createFeaturesContext, createFeaturesPlugin, createFilter, createFilterContext, createForm, createFormContext, createGroup, createGroupContext, createHydration, createHydrationContext, createHydrationPlugin, createLocale, createLocaleContext, createLocaleFallback, createLocalePlugin, createLogger, createLoggerContext, createLoggerPlugin, createNested, createNestedContext, createOverflow, createOverflowContext, createPagination, createPaginationContext, createPermissions, createPermissionsContext, createPermissionsPlugin, createPlugin, createPluginContext, createQueue, createQueueContext, createRegistry, createRegistryContext, createSelection, createSelectionContext, createSingle, createSingleContext, createStack, createStackContext, createStackPlugin, createStep, createStepContext, createStorage, createStorageContext, createStoragePlugin, createTheme, createThemeContext, createThemePlugin, createTimeline, createTimelineContext, createTokens, createTokensContext, createTrinity, createVirtual, createVirtualContext, multipleOpenStrategy, provideContext, singleOpenStrategy, toArray, toReactive, useBreadcrumbs, useBreakpoints, useClickOutside, useContext, useDataTable, useDate, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFeatures, useFilter, useForm, useGroup, useHotkey, useHydration, useIntersectionObserver, useLazy, useLocale, useLogger, useMediaQuery, useMutationObserver, useNested, useOverflow, usePagination, usePermissions, usePrefersContrast, usePrefersDark, usePrefersReducedMotion, useProxyModel, useProxyRegistry, useQueue, useRegistry, useResizeObserver, useSelection, useSingle, useStack, useStep, useStorage, useTheme, useTimeline, useToggleScope, useTokens, useVirtual, useWindowEventListener };
|
|
@@ -1,5 +1,37 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import
|
|
3
|
-
import "../
|
|
1
|
+
import "../globals-B_GVfG06.mjs";
|
|
2
|
+
import "../utilities-BqS1sC1W.mjs";
|
|
3
|
+
import { i as useContext, n as createContext, r as provideContext, t as createTrinity } from "../createTrinity-EeHQSsb6.mjs";
|
|
4
|
+
import { a as createPlugin, i as useLogger, n as createLoggerContext, o as createPluginContext, r as createLoggerPlugin, t as createLogger } from "../useLogger-CO9JwbSJ.mjs";
|
|
5
|
+
import { t as ConsolaLoggerAdapter } from "../consola-GBy8XRuL.mjs";
|
|
6
|
+
import { t as PinoLoggerAdapter } from "../pino-01x_NmWp.mjs";
|
|
7
|
+
import { t as Vuetify0LoggerAdapter } from "../v0-CtjuUUPl.mjs";
|
|
8
|
+
import "../adapters-DEXpW9If.mjs";
|
|
9
|
+
import { a as createRegistryContext, i as createRegistry, n as createTokensContext, o as useRegistry, r as useTokens, t as createTokens } from "../createTokens-BlhLdHXE.mjs";
|
|
10
|
+
import { n as createSelectionContext, r as useSelection, t as createSelection } from "../createSelection-uqEbFgha.mjs";
|
|
11
|
+
import { n as createSingleContext, r as useSingle, t as createSingle } from "../createSingle-B59ya3aa.mjs";
|
|
12
|
+
import { $ as createOverflow, A as singleOpenStrategy, B as createForm, C as createQueue, D as createNestedContext, E as createNested, F as usePrefersReducedMotion, G as createDatePlugin, H as useForm, I as useLazy, J as createBreakpointsContext, K as useDate, L as useElementIntersection, M as useMediaQuery, N as usePrefersContrast, O as useNested, P as usePrefersDark, Q as useProxyModel, R as useIntersectionObserver, S as useStack, T as useQueue, U as createDate, V as createFormContext, W as createDateContext, X as useBreakpoints, Y as createBreakpointsPlugin, Z as toReactive, _ as createStepContext, a as createVirtual, at as createHydration, b as createStackContext, c as useToggleScope, ct as useHydration, d as useTimeline, dt as useBreadcrumbs, et as createOverflowContext, f as createStorage, g as createStep, h as useStorage, i as useWindowEventListener, it as createFallbackHydration, j as useMutationObserver, k as multipleOpenStrategy, l as createTimeline, lt as createBreadcrumbs, m as createStoragePlugin, n as useDocumentEventListener, nt as useElementSize, o as createVirtualContext, ot as createHydrationContext, p as createStorageContext, q as createBreakpoints, r as useEventListener, rt as useResizeObserver, s as useVirtual, st as createHydrationPlugin, t as useClickOutside, tt as useOverflow, u as createTimelineContext, ut as createBreadcrumbsContext, v as useStep, w as createQueueContext, x as createStackPlugin, y as createStack, z as useHotkey } from "../useClickOutside-p8HP07At.mjs";
|
|
13
|
+
import { i as useProxyRegistry, n as createGroupContext, r as useGroup, t as createGroup } from "../createGroup-CPhp6FUh.mjs";
|
|
14
|
+
import { t as toArray } from "../toArray-DIeXVX1C.mjs";
|
|
15
|
+
import { t as Vuetify0LocaleAdapter } from "../v0-BtQCSBOG.mjs";
|
|
16
|
+
import "../adapters-Q9WaOsJp.mjs";
|
|
17
|
+
import { a as useLocale, i as createLocalePlugin, n as createLocaleContext, r as createLocaleFallback, t as createLocale } from "../useLocale-DlbShzF-.mjs";
|
|
18
|
+
import { n as createPaginationContext, r as usePagination, t as createPagination } from "../createPagination-cyOWlpfH.mjs";
|
|
19
|
+
import { i as useFilter, n as createFilter, r as createFilterContext, t as DataTableAdapter } from "../adapter-D_0ptsPm.mjs";
|
|
20
|
+
import { t as ClientAdapter } from "../v0-BogbIzpM.mjs";
|
|
21
|
+
import { t as ServerAdapter } from "../server-ClCwiLMA.mjs";
|
|
22
|
+
import { t as VirtualAdapter } from "../virtual-BP9WXRzN.mjs";
|
|
23
|
+
import "../adapters-SSDVth5e.mjs";
|
|
24
|
+
import { n as createDataTableContext, r as useDataTable, t as createDataTable } from "../createDataTable-BJnmvxfb.mjs";
|
|
25
|
+
import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-C4JF3Hgr.mjs";
|
|
26
|
+
import "../flagsmith-CHmpPGR7.mjs";
|
|
27
|
+
import "../launchdarkly-W8t8ZANX.mjs";
|
|
28
|
+
import "../posthog-BrGBPPir.mjs";
|
|
29
|
+
import { n as PermissionAdapter } from "../v0-B40YkIQ-.mjs";
|
|
30
|
+
import "../adapters-BQ-Lr3PW.mjs";
|
|
31
|
+
import { i as usePermissions, n as createPermissionsContext, r as createPermissionsPlugin, t as createPermissions } from "../usePermissions-DQVT_4nD.mjs";
|
|
32
|
+
import { t as MemoryAdapter } from "../memory-BsZGbGnG.mjs";
|
|
33
|
+
import { t as Vuetify0ThemeAdapter } from "../v0-ONBWyQYQ.mjs";
|
|
34
|
+
import "../adapters-BGJKsBrw.mjs";
|
|
35
|
+
import { i as useTheme, n as createThemeContext, r as createThemePlugin, t as createTheme } from "../useTheme-Bcw1Ebyt.mjs";
|
|
4
36
|
|
|
5
|
-
export { ConsolaLoggerAdapter, FeaturesAdapter, MemoryAdapter, PermissionAdapter, PinoLoggerAdapter, Vuetify0LocaleAdapter, Vuetify0LoggerAdapter, Vuetify0ThemeAdapter, createBreakpoints, createBreakpointsContext, createBreakpointsPlugin, createContext, createDate, createDateContext, createDatePlugin, createFallbackHydration, createFeatures, createFeaturesContext, createFeaturesPlugin, createFilter, createFilterContext, createForm, createFormContext, createGroup, createGroupContext, createHydration, createHydrationContext, createHydrationPlugin, createLocale, createLocaleContext, createLocaleFallback, createLocalePlugin, createLogger, createLoggerContext, createLoggerPlugin, createNested, createNestedContext, createOverflow, createOverflowContext, createPagination, createPaginationContext, createPermissions, createPermissionsContext, createPermissionsPlugin, createPlugin, createQueue, createQueueContext, createRegistry, createRegistryContext, createSelection, createSelectionContext, createSingle, createSingleContext, createStep, createStepContext, createStorage, createStorageContext, createStoragePlugin, createTheme, createThemeContext, createThemePlugin, createTimeline, createTimelineContext, createTokens, createTokensContext, createTrinity, multipleOpenStrategy, provideContext, singleOpenStrategy, toArray, toReactive, useBreakpoints, useClickOutside, useContext, useDate, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFeatures, useFilter,
|
|
37
|
+
export { ClientAdapter, ConsolaLoggerAdapter, DataTableAdapter, FeaturesAdapter, MemoryAdapter, PermissionAdapter, PinoLoggerAdapter, ServerAdapter, VirtualAdapter, Vuetify0LocaleAdapter, Vuetify0LoggerAdapter, Vuetify0ThemeAdapter, createBreadcrumbs, createBreadcrumbsContext, createBreakpoints, createBreakpointsContext, createBreakpointsPlugin, createContext, createDataTable, createDataTableContext, createDate, createDateContext, createDatePlugin, createFallbackHydration, createFeatures, createFeaturesContext, createFeaturesPlugin, createFilter, createFilterContext, createForm, createFormContext, createGroup, createGroupContext, createHydration, createHydrationContext, createHydrationPlugin, createLocale, createLocaleContext, createLocaleFallback, createLocalePlugin, createLogger, createLoggerContext, createLoggerPlugin, createNested, createNestedContext, createOverflow, createOverflowContext, createPagination, createPaginationContext, createPermissions, createPermissionsContext, createPermissionsPlugin, createPlugin, createPluginContext, createQueue, createQueueContext, createRegistry, createRegistryContext, createSelection, createSelectionContext, createSingle, createSingleContext, createStack, createStackContext, createStackPlugin, createStep, createStepContext, createStorage, createStorageContext, createStoragePlugin, createTheme, createThemeContext, createThemePlugin, createTimeline, createTimelineContext, createTokens, createTokensContext, createTrinity, createVirtual, createVirtualContext, multipleOpenStrategy, provideContext, singleOpenStrategy, toArray, toReactive, useBreadcrumbs, useBreakpoints, useClickOutside, useContext, useDataTable, useDate, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFeatures, useFilter, useForm, useGroup, useHotkey, useHydration, useIntersectionObserver, useLazy, useLocale, useLogger, useMediaQuery, useMutationObserver, useNested, useOverflow, usePagination, usePermissions, usePrefersContrast, usePrefersDark, usePrefersReducedMotion, useProxyModel, useProxyRegistry, useQueue, useRegistry, useResizeObserver, useSelection, useSingle, useStack, useStep, useStorage, useTheme, useTimeline, useToggleScope, useTokens, useVirtual, useWindowEventListener };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as LoggerAdapter } from "./adapter-CJIj5ySf.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/composables/useLogger/adapters/consola.d.ts
|
|
4
|
+
declare class ConsolaLoggerAdapter implements LoggerAdapter {
|
|
5
|
+
private consola;
|
|
6
|
+
constructor(consolaInstance: any);
|
|
7
|
+
debug(message: string, ...args: unknown[]): void;
|
|
8
|
+
info(message: string, ...args: unknown[]): void;
|
|
9
|
+
warn(message: string, ...args: unknown[]): void;
|
|
10
|
+
error(message: string, ...args: unknown[]): void;
|
|
11
|
+
trace(message: string, ...args: unknown[]): void;
|
|
12
|
+
fatal(message: string, ...args: unknown[]): void;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ConsolaLoggerAdapter as t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/composables/useLogger/adapters/consola.ts
|
|
2
|
+
var ConsolaLoggerAdapter = class {
|
|
3
|
+
consola;
|
|
4
|
+
constructor(consolaInstance) {
|
|
5
|
+
if (!consolaInstance) throw new Error("Consola instance is required for ConsolaLoggerAdapter");
|
|
6
|
+
this.consola = consolaInstance;
|
|
7
|
+
}
|
|
8
|
+
debug(message, ...args) {
|
|
9
|
+
this.consola.debug(message, ...args);
|
|
10
|
+
}
|
|
11
|
+
info(message, ...args) {
|
|
12
|
+
this.consola.info(message, ...args);
|
|
13
|
+
}
|
|
14
|
+
warn(message, ...args) {
|
|
15
|
+
this.consola.warn(message, ...args);
|
|
16
|
+
}
|
|
17
|
+
error(message, ...args) {
|
|
18
|
+
this.consola.error(message, ...args);
|
|
19
|
+
}
|
|
20
|
+
trace(message, ...args) {
|
|
21
|
+
if (this.consola.trace) this.consola.trace(message, ...args);
|
|
22
|
+
else this.consola.debug(message, ...args);
|
|
23
|
+
}
|
|
24
|
+
fatal(message, ...args) {
|
|
25
|
+
if (this.consola.fatal) this.consola.fatal(message, ...args);
|
|
26
|
+
else this.consola.error("[FATAL]", message, ...args);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ConsolaLoggerAdapter as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isSelfClosingTag, c as SUPPORTS_MATCH_MEDIA, d as SUPPORTS_TOUCH, f as __LOGGER_ENABLED__, i as SelfClosingElement, l as SUPPORTS_MUTATION_OBSERVER, n as HTMLElementName, o as IN_BROWSER, p as version, r as SELF_CLOSING_TAGS, s as SUPPORTS_INTERSECTION_OBSERVER, t as COMMON_ELEMENTS, u as SUPPORTS_OBSERVER } from "../index-
|
|
1
|
+
import { a as isSelfClosingTag, c as SUPPORTS_MATCH_MEDIA, d as SUPPORTS_TOUCH, f as __LOGGER_ENABLED__, i as SelfClosingElement, l as SUPPORTS_MUTATION_OBSERVER, n as HTMLElementName, o as IN_BROWSER, p as version, r as SELF_CLOSING_TAGS, s as SUPPORTS_INTERSECTION_OBSERVER, t as COMMON_ELEMENTS, u as SUPPORTS_OBSERVER } from "../index-Bv1VN_j5.mjs";
|
|
2
2
|
export { COMMON_ELEMENTS, HTMLElementName, IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, SelfClosingElement, __LOGGER_ENABLED__, isSelfClosingTag, version };
|
package/dist/constants/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SELF_CLOSING_TAGS, r as isSelfClosingTag, t as COMMON_ELEMENTS } from "../htmlElements-
|
|
2
|
-
import { a as SUPPORTS_OBSERVER, c as version, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, o as SUPPORTS_TOUCH, r as SUPPORTS_MATCH_MEDIA, s as __LOGGER_ENABLED__, t as IN_BROWSER } from "../globals-
|
|
3
|
-
import "../constants-
|
|
1
|
+
import { n as SELF_CLOSING_TAGS, r as isSelfClosingTag, t as COMMON_ELEMENTS } from "../htmlElements-d8iBCGpO.mjs";
|
|
2
|
+
import { a as SUPPORTS_OBSERVER, c as version, i as SUPPORTS_MUTATION_OBSERVER, n as SUPPORTS_INTERSECTION_OBSERVER, o as SUPPORTS_TOUCH, r as SUPPORTS_MATCH_MEDIA, s as __LOGGER_ENABLED__, t as IN_BROWSER } from "../globals-B_GVfG06.mjs";
|
|
3
|
+
import "../constants-B8pMSkcW.mjs";
|
|
4
4
|
|
|
5
5
|
export { COMMON_ELEMENTS, IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, __LOGGER_ENABLED__, isSelfClosingTag, version };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { l as isNullOrUndefined, p as isString, u as isNumber } from "./utilities-BqS1sC1W.mjs";
|
|
2
|
+
import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-EeHQSsb6.mjs";
|
|
3
|
+
import { t as createGroup } from "./createGroup-CPhp6FUh.mjs";
|
|
4
|
+
import { a as useLocale } from "./useLocale-DlbShzF-.mjs";
|
|
5
|
+
import { t as ClientAdapter } from "./v0-BogbIzpM.mjs";
|
|
6
|
+
import { computed, shallowReactive, shallowRef, toRef, watch } from "vue";
|
|
7
|
+
|
|
8
|
+
//#region src/composables/createDataTable/index.ts
|
|
9
|
+
/**
|
|
10
|
+
* @module createDataTable
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Composable data table that composes existing v0 primitives rather than
|
|
14
|
+
* reimplementing their logic. Uses createGroup's tri-state for sort direction
|
|
15
|
+
* and delegates the data pipeline (filter, sort, paginate) to an adapter.
|
|
16
|
+
*
|
|
17
|
+
* Key features:
|
|
18
|
+
* - Adapter pattern for pipeline strategy (client, server, virtual)
|
|
19
|
+
* - Sort via createGroup tri-state: selected=asc, mixed=desc, unselected=none
|
|
20
|
+
* - Selection strategies: single, page, all
|
|
21
|
+
* - Per-column custom sort/filter functions
|
|
22
|
+
* - Row selectability control via itemSelectable
|
|
23
|
+
* - Sort options: mandate, firstSortOrder
|
|
24
|
+
* - Row selection via lightweight Set (not registry-based)
|
|
25
|
+
* - Trinity pattern for dependency injection
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Creates a data table instance with sort controls, selection, and an
|
|
29
|
+
* adapter-driven data pipeline.
|
|
30
|
+
*
|
|
31
|
+
* Must be called inside a component `setup()` or a Vue effect scope.
|
|
32
|
+
* Calling at module scope in SSR environments causes request state leakage.
|
|
33
|
+
*
|
|
34
|
+
* @param options Data table options
|
|
35
|
+
* @returns Data table context with pipeline stages and controls
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* import { createDataTable } from '@vuetify/v0'
|
|
40
|
+
*
|
|
41
|
+
* const table = createDataTable({
|
|
42
|
+
* items: users,
|
|
43
|
+
* columns: [
|
|
44
|
+
* { key: 'name', title: 'Name', sortable: true, filterable: true },
|
|
45
|
+
* { key: 'email', title: 'Email', sortable: true, filterable: true },
|
|
46
|
+
* { key: 'age', title: 'Age', sortable: true },
|
|
47
|
+
* ],
|
|
48
|
+
* })
|
|
49
|
+
*
|
|
50
|
+
* // Search
|
|
51
|
+
* table.search('john')
|
|
52
|
+
*
|
|
53
|
+
* // Sort
|
|
54
|
+
* table.sort.toggle('name') // asc
|
|
55
|
+
* table.sort.toggle('name') // desc
|
|
56
|
+
* table.sort.toggle('name') // none
|
|
57
|
+
* console.log(table.sort.columns.value) // [{ key: 'name', direction: 'asc' }]
|
|
58
|
+
*
|
|
59
|
+
* // Paginate
|
|
60
|
+
* table.pagination.next()
|
|
61
|
+
*
|
|
62
|
+
* // Select rows
|
|
63
|
+
* table.selection.toggle('user-1')
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
function createDataTable(options) {
|
|
67
|
+
const { items: _items, columns, itemValue = "id", filter: filterOptions = {}, pagination: paginationOptions = {}, sortMultiple = false, mandate = false, firstSortOrder = "asc", selectStrategy = "page", itemSelectable, groupBy, enroll = false, expandMultiple = true, locale: initialLocale, adapter = new ClientAdapter() } = options;
|
|
68
|
+
const _query = shallowRef("");
|
|
69
|
+
function search(value) {
|
|
70
|
+
_query.value = value;
|
|
71
|
+
}
|
|
72
|
+
const { selectedId: selectedLocale } = useLocale();
|
|
73
|
+
const locale = toRef(() => {
|
|
74
|
+
const selected = selectedLocale?.value;
|
|
75
|
+
if (!/* @__PURE__ */ isNullOrUndefined(selected)) return String(selected);
|
|
76
|
+
return initialLocale;
|
|
77
|
+
});
|
|
78
|
+
const sortable = columns.filter((col) => col.sortable === true);
|
|
79
|
+
const group = createGroup({ multiple: sortMultiple });
|
|
80
|
+
group.onboard(sortable.map((col) => ({
|
|
81
|
+
id: col.key,
|
|
82
|
+
value: col.key
|
|
83
|
+
})));
|
|
84
|
+
const order = shallowReactive([]);
|
|
85
|
+
function toggle(key) {
|
|
86
|
+
if (!group.has(key)) return;
|
|
87
|
+
const isAsc = group.selectedIds.has(key);
|
|
88
|
+
const isDesc = group.mixed(key);
|
|
89
|
+
function clearOthers() {
|
|
90
|
+
if (!sortMultiple) {
|
|
91
|
+
group.mixedIds.clear();
|
|
92
|
+
order.length = 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function setAsc() {
|
|
96
|
+
group.unmix(key);
|
|
97
|
+
group.select(key);
|
|
98
|
+
}
|
|
99
|
+
function setDesc() {
|
|
100
|
+
group.unselect(key);
|
|
101
|
+
group.mix(key);
|
|
102
|
+
}
|
|
103
|
+
function setNone() {
|
|
104
|
+
group.unselect(key);
|
|
105
|
+
group.unmix(key);
|
|
106
|
+
const idx = order.indexOf(key);
|
|
107
|
+
if (idx !== -1) order.splice(idx, 1);
|
|
108
|
+
}
|
|
109
|
+
if (!isAsc && !isDesc) {
|
|
110
|
+
clearOthers();
|
|
111
|
+
if (firstSortOrder === "desc") setDesc();
|
|
112
|
+
else setAsc();
|
|
113
|
+
order.push(key);
|
|
114
|
+
} else if (isAsc) if (firstSortOrder === "desc" && !mandate) setNone();
|
|
115
|
+
else setDesc();
|
|
116
|
+
else if (firstSortOrder === "asc" && !mandate) setNone();
|
|
117
|
+
else setAsc();
|
|
118
|
+
}
|
|
119
|
+
const sortBy = computed(() => {
|
|
120
|
+
const result = [];
|
|
121
|
+
for (const key of order) if (group.selectedIds.has(key)) result.push({
|
|
122
|
+
key,
|
|
123
|
+
direction: "asc"
|
|
124
|
+
});
|
|
125
|
+
else if (group.mixed(key)) result.push({
|
|
126
|
+
key,
|
|
127
|
+
direction: "desc"
|
|
128
|
+
});
|
|
129
|
+
return result;
|
|
130
|
+
});
|
|
131
|
+
function direction(key) {
|
|
132
|
+
if (group.selectedIds.has(key)) return "asc";
|
|
133
|
+
if (group.mixed(key)) return "desc";
|
|
134
|
+
return "none";
|
|
135
|
+
}
|
|
136
|
+
function priority(key) {
|
|
137
|
+
return order.indexOf(key);
|
|
138
|
+
}
|
|
139
|
+
function reset() {
|
|
140
|
+
group.unselectAll();
|
|
141
|
+
group.mixedIds.clear();
|
|
142
|
+
order.length = 0;
|
|
143
|
+
}
|
|
144
|
+
const sort = {
|
|
145
|
+
toggle,
|
|
146
|
+
columns: sortBy,
|
|
147
|
+
order,
|
|
148
|
+
direction,
|
|
149
|
+
priority,
|
|
150
|
+
reset
|
|
151
|
+
};
|
|
152
|
+
const filterable = columns.filter((col) => col.filterable === true).map((col) => col.key);
|
|
153
|
+
const customSorts = {};
|
|
154
|
+
for (const col of columns) if (col.sort) customSorts[col.key] = col.sort;
|
|
155
|
+
const customColumnFilters = {};
|
|
156
|
+
for (const col of columns) if (col.filter) customColumnFilters[col.key] = col.filter;
|
|
157
|
+
const { allItems, filteredItems, sortedItems, items: visible, pagination, total, loading = toRef(() => false), error = toRef(() => null) } = adapter.setup({
|
|
158
|
+
items: _items,
|
|
159
|
+
search: _query,
|
|
160
|
+
filterableKeys: filterable,
|
|
161
|
+
sortBy,
|
|
162
|
+
locale,
|
|
163
|
+
filterOptions,
|
|
164
|
+
paginationOptions,
|
|
165
|
+
customSorts,
|
|
166
|
+
customColumnFilters
|
|
167
|
+
});
|
|
168
|
+
const selectedIds = shallowReactive(/* @__PURE__ */ new Set());
|
|
169
|
+
function rowId(item) {
|
|
170
|
+
const value = item[itemValue];
|
|
171
|
+
if (/* @__PURE__ */ isString(value) || /* @__PURE__ */ isNumber(value)) return value;
|
|
172
|
+
throw new Error(`[v0:data-table] itemValue "${itemValue}" must resolve to a string or number`);
|
|
173
|
+
}
|
|
174
|
+
const selectableIds = computed(() => {
|
|
175
|
+
if (!itemSelectable) return null;
|
|
176
|
+
const ids = /* @__PURE__ */ new Set();
|
|
177
|
+
for (const item of allItems.value) if (item[itemSelectable]) ids.add(rowId(item));
|
|
178
|
+
return ids;
|
|
179
|
+
});
|
|
180
|
+
function isSelectable(id) {
|
|
181
|
+
return !selectableIds.value || selectableIds.value.has(id);
|
|
182
|
+
}
|
|
183
|
+
const scopeItems = toRef(() => {
|
|
184
|
+
if (selectStrategy === "single") return [];
|
|
185
|
+
return selectStrategy === "all" ? sortedItems.value : visible.value;
|
|
186
|
+
});
|
|
187
|
+
const selectableScope = computed(() => {
|
|
188
|
+
if (!itemSelectable) return scopeItems.value;
|
|
189
|
+
return scopeItems.value.filter((item) => !!item[itemSelectable]);
|
|
190
|
+
});
|
|
191
|
+
const selection = {
|
|
192
|
+
selectedIds,
|
|
193
|
+
select(id) {
|
|
194
|
+
if (!isSelectable(id)) return;
|
|
195
|
+
if (selectStrategy === "single") selectedIds.clear();
|
|
196
|
+
selectedIds.add(id);
|
|
197
|
+
},
|
|
198
|
+
unselect(id) {
|
|
199
|
+
selectedIds.delete(id);
|
|
200
|
+
},
|
|
201
|
+
toggle(id) {
|
|
202
|
+
if (selectedIds.has(id)) selectedIds.delete(id);
|
|
203
|
+
else selection.select(id);
|
|
204
|
+
},
|
|
205
|
+
isSelected(id) {
|
|
206
|
+
return selectedIds.has(id);
|
|
207
|
+
},
|
|
208
|
+
isSelectable,
|
|
209
|
+
selectAll() {
|
|
210
|
+
for (const item of selectableScope.value) selectedIds.add(rowId(item));
|
|
211
|
+
},
|
|
212
|
+
unselectAll() {
|
|
213
|
+
selectedIds.clear();
|
|
214
|
+
},
|
|
215
|
+
toggleAll() {
|
|
216
|
+
if (selectStrategy === "single") return;
|
|
217
|
+
if (selection.isAllSelected.value) for (const item of selectableScope.value) selectedIds.delete(rowId(item));
|
|
218
|
+
else selection.selectAll();
|
|
219
|
+
},
|
|
220
|
+
isAllSelected: computed(() => {
|
|
221
|
+
const items = selectableScope.value;
|
|
222
|
+
if (items.length === 0) return false;
|
|
223
|
+
return items.every((item) => selectedIds.has(rowId(item)));
|
|
224
|
+
}),
|
|
225
|
+
isMixed: computed(() => {
|
|
226
|
+
const items = selectableScope.value;
|
|
227
|
+
if (items.length === 0) return false;
|
|
228
|
+
return items.some((item) => selectedIds.has(rowId(item))) && !selection.isAllSelected.value;
|
|
229
|
+
})
|
|
230
|
+
};
|
|
231
|
+
const expandedIds = shallowReactive(/* @__PURE__ */ new Set());
|
|
232
|
+
const expansion = {
|
|
233
|
+
expandedIds,
|
|
234
|
+
expand(id) {
|
|
235
|
+
if (!expandMultiple) expandedIds.clear();
|
|
236
|
+
expandedIds.add(id);
|
|
237
|
+
},
|
|
238
|
+
collapse(id) {
|
|
239
|
+
expandedIds.delete(id);
|
|
240
|
+
},
|
|
241
|
+
toggle(id) {
|
|
242
|
+
if (expandedIds.has(id)) expandedIds.delete(id);
|
|
243
|
+
else expansion.expand(id);
|
|
244
|
+
},
|
|
245
|
+
isExpanded(id) {
|
|
246
|
+
return expandedIds.has(id);
|
|
247
|
+
},
|
|
248
|
+
expandAll() {
|
|
249
|
+
if (!expandMultiple) return;
|
|
250
|
+
for (const item of visible.value) expandedIds.add(rowId(item));
|
|
251
|
+
},
|
|
252
|
+
collapseAll() {
|
|
253
|
+
expandedIds.clear();
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const openGroupKeys = shallowReactive(/* @__PURE__ */ new Set());
|
|
257
|
+
const groups = computed(() => {
|
|
258
|
+
if (!groupBy) return [];
|
|
259
|
+
const map = /* @__PURE__ */ new Map();
|
|
260
|
+
for (const item of sortedItems.value) {
|
|
261
|
+
const raw = item[groupBy];
|
|
262
|
+
const key = String(raw ?? "");
|
|
263
|
+
let entry = map.get(key);
|
|
264
|
+
if (!entry) {
|
|
265
|
+
entry = {
|
|
266
|
+
value: raw,
|
|
267
|
+
items: []
|
|
268
|
+
};
|
|
269
|
+
map.set(key, entry);
|
|
270
|
+
}
|
|
271
|
+
entry.items.push(item);
|
|
272
|
+
}
|
|
273
|
+
const result = [];
|
|
274
|
+
for (const [key, entry] of map) result.push({
|
|
275
|
+
key,
|
|
276
|
+
value: entry.value,
|
|
277
|
+
items: entry.items
|
|
278
|
+
});
|
|
279
|
+
return result;
|
|
280
|
+
});
|
|
281
|
+
if (enroll) {
|
|
282
|
+
for (const group$1 of groups.value) openGroupKeys.add(group$1.key);
|
|
283
|
+
if (groups.value.length === 0) {
|
|
284
|
+
const stop = watch(groups, (newGroups) => {
|
|
285
|
+
if (newGroups.length === 0) return;
|
|
286
|
+
for (const group$1 of newGroups) openGroupKeys.add(group$1.key);
|
|
287
|
+
stop();
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
items: visible,
|
|
293
|
+
allItems,
|
|
294
|
+
filteredItems,
|
|
295
|
+
sortedItems,
|
|
296
|
+
columns,
|
|
297
|
+
search,
|
|
298
|
+
query: _query,
|
|
299
|
+
sort,
|
|
300
|
+
pagination,
|
|
301
|
+
selection,
|
|
302
|
+
expansion,
|
|
303
|
+
grouping: {
|
|
304
|
+
groups,
|
|
305
|
+
toggle(groupKey) {
|
|
306
|
+
if (openGroupKeys.has(groupKey)) openGroupKeys.delete(groupKey);
|
|
307
|
+
else openGroupKeys.add(groupKey);
|
|
308
|
+
},
|
|
309
|
+
isOpen(groupKey) {
|
|
310
|
+
return openGroupKeys.has(groupKey);
|
|
311
|
+
},
|
|
312
|
+
open(groupKey) {
|
|
313
|
+
openGroupKeys.add(groupKey);
|
|
314
|
+
},
|
|
315
|
+
close(groupKey) {
|
|
316
|
+
openGroupKeys.delete(groupKey);
|
|
317
|
+
},
|
|
318
|
+
openAll() {
|
|
319
|
+
for (const group$1 of groups.value) openGroupKeys.add(group$1.key);
|
|
320
|
+
},
|
|
321
|
+
closeAll() {
|
|
322
|
+
openGroupKeys.clear();
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
total,
|
|
326
|
+
loading,
|
|
327
|
+
error
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Creates a data table context with dependency injection support.
|
|
332
|
+
*
|
|
333
|
+
* @param options Data table context options including namespace
|
|
334
|
+
* @returns A trinity tuple: [useDataTable, provideDataTable, defaultContext]
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* import { createDataTableContext } from '@vuetify/v0'
|
|
339
|
+
*
|
|
340
|
+
* const [useDataTable, provideDataTable, context] = createDataTableContext({
|
|
341
|
+
* namespace: 'app:users',
|
|
342
|
+
* items: users,
|
|
343
|
+
* columns: [
|
|
344
|
+
* { key: 'name', title: 'Name', sortable: true },
|
|
345
|
+
* ],
|
|
346
|
+
* })
|
|
347
|
+
*
|
|
348
|
+
* // Parent component
|
|
349
|
+
* provideDataTable()
|
|
350
|
+
*
|
|
351
|
+
* // Child component
|
|
352
|
+
* const table = useDataTable()
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
function createDataTableContext(_options) {
|
|
356
|
+
const { namespace = "v0:data-table", ...options } = _options;
|
|
357
|
+
const [useDataTableContext, _provideDataTableContext] = createContext(namespace);
|
|
358
|
+
const context = createDataTable(options);
|
|
359
|
+
function provideDataTableContext(_context = context, app) {
|
|
360
|
+
return _provideDataTableContext(_context, app);
|
|
361
|
+
}
|
|
362
|
+
return createTrinity(useDataTableContext, provideDataTableContext, context);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Returns the current data table context from dependency injection.
|
|
366
|
+
*
|
|
367
|
+
* @typeParam T - Must be provided explicitly; cannot be inferred from namespace.
|
|
368
|
+
* Prefer the `useX` function from {@link createDataTableContext} for type-safe injection.
|
|
369
|
+
*
|
|
370
|
+
* @param namespace The namespace for the data table context. @default 'v0:data-table'
|
|
371
|
+
* @returns The current data table context
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```vue
|
|
375
|
+
* <script setup lang="ts">
|
|
376
|
+
* import { useDataTable } from '@vuetify/v0'
|
|
377
|
+
*
|
|
378
|
+
* const table = useDataTable<User>()
|
|
379
|
+
* <\/script>
|
|
380
|
+
* ```
|
|
381
|
+
*/
|
|
382
|
+
function useDataTable(namespace = "v0:data-table") {
|
|
383
|
+
return useContext(namespace);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
//#endregion
|
|
387
|
+
export { createDataTableContext as n, useDataTable as r, createDataTable as t };
|