@vuetify/v0 1.0.0-beta.1 → 1.0.0-beta.2
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 +2 -1
- package/dist/{adapter-DZeI0ZbW.d.mts → adapter-CQoi3rdC.d.mts} +1 -1
- package/dist/adapter-CVoWg0sw.mjs +99 -0
- package/dist/{adapter-DdTval2R.mjs → adapter-Cj7vxEdB.mjs} +5 -0
- package/dist/adapter-Cy7wXVFe.mjs +4 -0
- package/dist/{adapter-we-0GbFH.d.mts → adapter-D2ABPTpo.d.mts} +2 -2
- package/dist/{adapter-BO75n0Cn.d.mts → adapter-_srNCBEi.d.mts} +3 -3
- package/dist/browser/index.js +23559 -23242
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{components-B210m9Ye.mjs → components-DcOwIGXt.mjs} +294 -212
- package/dist/composables/index.d.mts +20 -20
- package/dist/composables/index.mjs +34 -28
- package/dist/composables-DxKmYiTj.mjs +4077 -0
- package/dist/{consola-CUNHyu8J.d.mts → consola-BPGkJp_q.d.mts} +1 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-B-Fo-uuL.mjs → createDataTable-CBfnCUKU.mjs} +14 -11
- package/dist/{createGroup-CpaW7zEJ.mjs → createGroup-BTG6xcyp.mjs} +2 -2
- package/dist/{adapter-BCVxBtDp.mjs → createPagination-B5dfqY-a.mjs} +3 -98
- package/dist/{createRegistry-8FryYQC-.mjs → createRegistry-Cb6ftNMU.mjs} +3 -2
- package/dist/{createSelection-DPOvmJ5q.mjs → createSelection-BMvXj84C.mjs} +7 -4
- package/dist/{createSingle-CYi0RuOy.mjs → createSingle-BCUJuV4D.mjs} +1 -1
- package/dist/{createTokens-DaJ_SYE7.mjs → createTokens-BSSQAfNX.mjs} +3 -4
- 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 +4 -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 +5 -5
- package/dist/data-table/index.mjs +5 -5
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +36 -33
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/flagsmith/index.mjs +47 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.mjs +37 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +46 -1
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +2 -2
- package/dist/{flagsmith-Cn_KVy6v.d.mts → flagsmith-CXzNBqm3.d.mts} +1 -1
- package/dist/{globals-BBqmW3dM.mjs → globals-C1X-9O7K.mjs} +1 -1
- package/dist/{index-DWAgQOBa.d.mts → index-Bmz8PZMY.d.mts} +3 -4
- package/dist/{index-BN06veYe.d.mts → index-CKyDkh8J.d.mts} +169 -88
- package/dist/{index-BpDzW6zC.d.mts → index-DLBPM47A.d.mts} +416 -346
- package/dist/{index-ZD3hw2Zo.d.mts → index-DRrHHgE7.d.mts} +4 -4
- package/dist/{index-y-dyBzAF.d.mts → index-LMiCHwZl.d.mts} +5 -1
- package/dist/{index-BIyQ3OxC.d.mts → index-rJ_lhMYJ.d.mts} +5 -5
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +36 -30
- package/dist/json/attributes.json +2 -2
- package/dist/json/web-types.json +3 -3
- package/dist/{launchdarkly-C3Knz7-v.d.mts → launchdarkly-DvhloBts.d.mts} +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -3
- 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/adapters/vue-i18n/index.mjs +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +3 -3
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +1 -2
- package/dist/logger/adapters/pino/index.d.mts +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 +2 -2
- package/dist/notifications/index.d.mts +6 -6
- package/dist/notifications/index.mjs +29 -29
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- 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/index.mjs +1 -2
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.mjs +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +2 -2
- package/dist/{pino-BaYY_KIN.d.mts → pino-B6BI1AOK.d.mts} +1 -1
- package/dist/{posthog-CR8R2ywM.d.mts → posthog-BOT5W7Ds.d.mts} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-CZ83nTn_.mjs → server-D5BJBjB0.mjs} +2 -1
- package/dist/{server-7vjHxjNc.d.mts → server-DbtTGb67.d.mts} +1 -1
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/index.mjs +1 -1
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/adapters/memory/index.mjs +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +2 -2
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +3 -4
- 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 +5 -4
- package/dist/types/index.d.mts +1 -1
- package/dist/{unhead-l-ZLWtSR.mjs → unhead-i8ji788n.mjs} +12 -8
- package/dist/useEventListener-BK_uaXZv.mjs +103 -0
- package/dist/{useFeatures-BWC23LA6.mjs → useFeatures-BKAK56af.mjs} +4 -8
- package/dist/{useLocale-yXLswxYa.mjs → useLocale-CTwn8uZk.mjs} +4 -5
- package/dist/{useLogger-JwRA-DZ7.mjs → useLogger-D7_hm4e8.mjs} +2 -3
- package/dist/{useNotifications-8qt26Ha9.mjs → useNotifications-B2YeotHN.mjs} +15 -8
- package/dist/{usePermissions-Bc1-N-lO.mjs → usePermissions-CWYXR7ji.mjs} +9 -8
- package/dist/{useClickOutside-BurEbsu3.mjs → useRovingFocus-BdnSUVrD.mjs} +4002 -8134
- package/dist/{useRules-Dg-pFO8r.mjs → useRules-CB2_tvd0.mjs} +2 -2
- package/dist/useStorage-BORz1d1g.mjs +162 -0
- package/dist/{useTheme-TpMOisy2.mjs → useTheme-ClUmdmvT.mjs} +12 -9
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.mjs +5 -1
- package/dist/{v0-COaQncfZ.mjs → v0-A4GLojAr.mjs} +2 -1
- package/dist/{v0-eRmUaRpH.mjs → v0-BU39ZO4s.mjs} +21 -10
- package/dist/{v0-WzS4GAIp.d.mts → v0-D7NA38Vu.d.mts} +1 -1
- package/dist/{v0-C7j3bzRU.mjs → v0-DL9JtgCO.mjs} +1 -1
- package/dist/{v0-QIjffi4E.d.mts → v0-DotXXGXU.d.mts} +1 -1
- package/dist/{v0-BfZc5TNn.mjs → v0-SwedwC_b.mjs} +3 -4
- package/dist/{v0-DWZ_N2GG.d.mts → v0-rSxMW8FJ.d.mts} +1 -1
- package/dist/{virtual-CrgGA-o6.d.mts → virtual-C-NsLue0.d.mts} +1 -1
- package/dist/{virtual-UumJ2BQ9.mjs → virtual-DFvOoeG6.mjs} +2 -1
- package/package.json +10 -7
- package/dist/adapters-B350nY4t.mjs +0 -4
- package/dist/adapters-BYLWDmYl.mjs +0 -5
- package/dist/adapters-D64TORDu.mjs +0 -2
- package/dist/adapters-DKWBbvCe.mjs +0 -4
- package/dist/adapters-Da2jxCo7.mjs +0 -2
- package/dist/flagsmith-Cu93hUIF.mjs +0 -48
- package/dist/launchdarkly-CLGtJCsI.mjs +0 -38
- package/dist/posthog-DPe6ewqN.mjs +0 -47
- /package/dist/{adapter-BEJXp-ie.d.mts → adapter-BYzU4Ey5.d.mts} +0 -0
- /package/dist/{adapter-B6IrPwib.d.mts → adapter-C5F2huij.d.mts} +0 -0
- /package/dist/{adapter-BSKx9WQ7.mjs → adapter-CTsckKAR.mjs} +0 -0
- /package/dist/{adapter-D8zizQVP.mjs → adapter-bwZo7b5p.mjs} +0 -0
- /package/dist/{index-DHmuwBdv.d.mts → index-B9YmdGZ3.d.mts} +0 -0
- /package/dist/{index-PvkxPev3.d.mts → index-BgCkepP_.d.mts} +0 -0
- /package/dist/{index-BOn0AAue.d.mts → index-CROz1VSV.d.mts} +0 -0
- /package/dist/{index-H_hl6-4b.d.mts → index-DXMlYoiQ.d.mts} +0 -0
- /package/dist/{index-C6NnIuDv.d.mts → index-DidZKN6S.d.mts} +0 -0
- /package/dist/{index-CKKoxA9V.d.mts → index-FtE8MXJ_.d.mts} +0 -0
- /package/dist/{memory-BMpJcQjQ.mjs → memory-BJjkQzxs.mjs} +0 -0
- /package/dist/{memory-D-JbdKXg.d.mts → memory-DbyZeNjg.d.mts} +0 -0
- /package/dist/{toArray-CD2-OxAz.mjs → toArray-C89ZaEuF.mjs} +0 -0
- /package/dist/{v0-Dvu8fMl3.mjs → v0-UNyykD27.mjs} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IN_BROWSER, c as SUPPORTS_MUTATION_OBSERVER, d as __LOGGER_ENABLED__, f as version, i as isSelfClosingTag, l as SUPPORTS_OBSERVER, n as SELF_CLOSING_TAGS, o as SUPPORTS_INTERSECTION_OBSERVER, r as SelfClosingElement, s as SUPPORTS_MATCH_MEDIA, t as HTMLElementName, u as SUPPORTS_TOUCH } from "../index-
|
|
1
|
+
import { a as IN_BROWSER, c as SUPPORTS_MUTATION_OBSERVER, d as __LOGGER_ENABLED__, f as version, i as isSelfClosingTag, l as SUPPORTS_OBSERVER, n as SELF_CLOSING_TAGS, o as SUPPORTS_INTERSECTION_OBSERVER, r as SelfClosingElement, s as SUPPORTS_MATCH_MEDIA, t as HTMLElementName, u as SUPPORTS_TOUCH } from "../index-BgCkepP_.mjs";
|
|
2
2
|
export { 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,3 +1,3 @@
|
|
|
1
1
|
import { n as isSelfClosingTag, t as SELF_CLOSING_TAGS } from "../htmlElements-CHXZfsZu.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-
|
|
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-C1X-9O7K.mjs";
|
|
3
3
|
export { IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, __LOGGER_ENABLED__, isSelfClosingTag, version };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isNullOrUndefined } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as createRegistry } from "./createRegistry-
|
|
4
|
-
import { a as useLocale } from "./useLocale-
|
|
5
|
-
import { t as createGroup } from "./createGroup-
|
|
6
|
-
import { t as ClientDataTableAdapter } from "./v0-
|
|
7
|
-
import "./adapters-BYLWDmYl.mjs";
|
|
3
|
+
import { t as createRegistry } from "./createRegistry-Cb6ftNMU.mjs";
|
|
4
|
+
import { a as useLocale } from "./useLocale-CTwn8uZk.mjs";
|
|
5
|
+
import { i as useProxyRegistry, t as createGroup } from "./createGroup-BTG6xcyp.mjs";
|
|
6
|
+
import { t as ClientDataTableAdapter } from "./v0-A4GLojAr.mjs";
|
|
8
7
|
import { computed, shallowReactive, shallowReadonly, shallowRef, toRef, watch } from "vue";
|
|
9
8
|
//#region src/composables/createDataTable/columns.ts
|
|
10
9
|
/**
|
|
@@ -85,6 +84,9 @@ function resolveHeaders(columns) {
|
|
|
85
84
|
* columns and `table.onboard([...])` / `table.register({...})` for rows.
|
|
86
85
|
* Row identity is the ticket id (caller-supplied or auto-generated); column
|
|
87
86
|
* identity is the caller-supplied `id` (required — no auto-generation).
|
|
87
|
+
* The row registry is non-reactive: iterate rows via `items` / `allItems`
|
|
88
|
+
* and update a row via `upsert(id, { value })` — never mutate a ticket's
|
|
89
|
+
* value in place or iterate raw `values()` in templates or computeds.
|
|
88
90
|
*
|
|
89
91
|
* Key features:
|
|
90
92
|
* - Adapter pattern for pipeline strategy (client, server, virtual)
|
|
@@ -160,8 +162,9 @@ function createDataTable(options = {}) {
|
|
|
160
162
|
const { filter: filterOptions = {}, pagination: paginationOptions = {}, sortMultiple = false, mandate = false, firstSortOrder = "asc", selectStrategy = "page", itemSelectable, groupBy, openAll = false, expandMultiple = true, locale: initialLocale, adapter = new ClientDataTableAdapter() } = options;
|
|
161
163
|
const registry = createRegistry({
|
|
162
164
|
events: true,
|
|
163
|
-
reactive:
|
|
165
|
+
reactive: false
|
|
164
166
|
});
|
|
167
|
+
const proxy = useProxyRegistry(registry);
|
|
165
168
|
const columns = createRegistry({
|
|
166
169
|
events: true,
|
|
167
170
|
reactive: true
|
|
@@ -283,7 +286,7 @@ function createDataTable(options = {}) {
|
|
|
283
286
|
for (const col of leaves.value) if (col.filter) filters[String(col.id)] = col.filter;
|
|
284
287
|
return filters;
|
|
285
288
|
});
|
|
286
|
-
const source = computed(() =>
|
|
289
|
+
const source = computed(() => proxy.values.map((t) => t.value));
|
|
287
290
|
const { allItems, filteredItems, sortedItems, items: visible, pagination, total, loading = toRef(() => false), error = toRef(() => null) } = adapter.setup({
|
|
288
291
|
items: source,
|
|
289
292
|
search: _query,
|
|
@@ -299,7 +302,7 @@ function createDataTable(options = {}) {
|
|
|
299
302
|
const selectableIds = computed(() => {
|
|
300
303
|
if (!itemSelectable) return null;
|
|
301
304
|
const ids = /* @__PURE__ */ new Set();
|
|
302
|
-
for (const ticket of
|
|
305
|
+
for (const ticket of proxy.values) {
|
|
303
306
|
const value = ticket.value;
|
|
304
307
|
if (!/* @__PURE__ */ isNullOrUndefined(value) && value[itemSelectable]) ids.add(ticket.id);
|
|
305
308
|
}
|
|
@@ -317,7 +320,7 @@ function createDataTable(options = {}) {
|
|
|
317
320
|
if (scope.length === 0) return [];
|
|
318
321
|
const set = new Set(scope);
|
|
319
322
|
const result = [];
|
|
320
|
-
for (const ticket of
|
|
323
|
+
for (const ticket of proxy.values) {
|
|
321
324
|
const value = ticket.value;
|
|
322
325
|
if (/* @__PURE__ */ isNullOrUndefined(value) || !set.has(value)) continue;
|
|
323
326
|
if (itemSelectable && !value[itemSelectable]) continue;
|
|
@@ -371,7 +374,7 @@ function createDataTable(options = {}) {
|
|
|
371
374
|
if (scope.length === 0) return [];
|
|
372
375
|
const set = new Set(scope);
|
|
373
376
|
const result = [];
|
|
374
|
-
for (const ticket of
|
|
377
|
+
for (const ticket of proxy.values) {
|
|
375
378
|
const value = ticket.value;
|
|
376
379
|
if (!/* @__PURE__ */ isNullOrUndefined(value) && set.has(value)) result.push(ticket);
|
|
377
380
|
}
|
|
@@ -490,7 +493,7 @@ function createDataTable(options = {}) {
|
|
|
490
493
|
loading,
|
|
491
494
|
error,
|
|
492
495
|
get size() {
|
|
493
|
-
return
|
|
496
|
+
return proxy.size;
|
|
494
497
|
}
|
|
495
498
|
};
|
|
496
499
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveIds, resolveIndexes, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as createSelection } from "./createSelection-
|
|
4
|
-
import { t as toArray } from "./toArray-
|
|
3
|
+
import { t as createSelection } from "./createSelection-BMvXj84C.mjs";
|
|
4
|
+
import { t as toArray } from "./toArray-C89ZaEuF.mjs";
|
|
5
5
|
import { computed, onScopeDispose, reactive, shallowReactive, shallowRef, toRef, toValue } from "vue";
|
|
6
6
|
//#region src/composables/useProxyRegistry/index.ts
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clamp,
|
|
1
|
+
import { clamp, isNaN, isObject, range } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as toArray } from "./toArray-
|
|
3
|
+
import { t as toArray } from "./toArray-C89ZaEuF.mjs";
|
|
4
4
|
import { computed, isRef, shallowRef, toRef, toValue } from "vue";
|
|
5
5
|
//#region src/composables/createFilter/index.ts
|
|
6
6
|
/**
|
|
@@ -383,99 +383,4 @@ function usePagination(namespace = "v0:pagination") {
|
|
|
383
383
|
return useContext(namespace);
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* @module createDataTable/adapters
|
|
389
|
-
*
|
|
390
|
-
* @remarks
|
|
391
|
-
* Defines the adapter interface and abstract base class for data table
|
|
392
|
-
* pipeline strategies. Adapters control how raw items are filtered, sorted,
|
|
393
|
-
* and sliced into visible items.
|
|
394
|
-
*
|
|
395
|
-
* The abstract DataTableAdapter provides shared filter and sort pipelines
|
|
396
|
-
* used by client-side adapters. Server adapters that delegate pipeline
|
|
397
|
-
* operations externally subclass DataTableAdapter directly.
|
|
398
|
-
*/
|
|
399
|
-
function getNestedValue(obj, parts) {
|
|
400
|
-
let result = obj;
|
|
401
|
-
for (const k of parts) {
|
|
402
|
-
if (/* @__PURE__ */ isNullOrUndefined(result)) return void 0;
|
|
403
|
-
result = result[k];
|
|
404
|
-
}
|
|
405
|
-
return result;
|
|
406
|
-
}
|
|
407
|
-
function compareValues(a, b, collator) {
|
|
408
|
-
if (a === b) return 0;
|
|
409
|
-
const aNil = /* @__PURE__ */ isNullOrUndefined(a);
|
|
410
|
-
const bNil = /* @__PURE__ */ isNullOrUndefined(b);
|
|
411
|
-
if (aNil && bNil) return 0;
|
|
412
|
-
if (aNil) return 1;
|
|
413
|
-
if (bNil) return -1;
|
|
414
|
-
if (/* @__PURE__ */ isString(a) && /* @__PURE__ */ isString(b)) return collator ? collator.compare(a, b) : a.localeCompare(b);
|
|
415
|
-
if (/* @__PURE__ */ isNumber(a) && /* @__PURE__ */ isNumber(b)) {
|
|
416
|
-
if (/* @__PURE__ */ isNaN(a)) return 1;
|
|
417
|
-
if (/* @__PURE__ */ isNaN(b)) return -1;
|
|
418
|
-
return a - b;
|
|
419
|
-
}
|
|
420
|
-
const sa = String(a);
|
|
421
|
-
const sb = String(b);
|
|
422
|
-
return collator ? collator.compare(sa, sb) : sa.localeCompare(sb);
|
|
423
|
-
}
|
|
424
|
-
var DataTableAdapter = class {
|
|
425
|
-
/** Create the filter pipeline stage */
|
|
426
|
-
filter(context) {
|
|
427
|
-
const filter = createFilter({
|
|
428
|
-
...context.filterOptions,
|
|
429
|
-
keys: [...toValue(context.filterableKeys)],
|
|
430
|
-
customFilter: context.filterOptions.customFilter ?? ((query, item) => {
|
|
431
|
-
const columnFilters = toValue(context.customColumnFilters);
|
|
432
|
-
const keys = toValue(context.filterableKeys);
|
|
433
|
-
if (!/* @__PURE__ */ isObject(item)) return false;
|
|
434
|
-
const q = String(/* @__PURE__ */ isArray(query) ? query[0] : query).toLowerCase();
|
|
435
|
-
if (!q) return true;
|
|
436
|
-
const obj = item;
|
|
437
|
-
for (const key of keys) {
|
|
438
|
-
const customFn = columnFilters[key];
|
|
439
|
-
if (customFn) {
|
|
440
|
-
if (customFn(obj[key], q)) return true;
|
|
441
|
-
} else {
|
|
442
|
-
const val = obj[key];
|
|
443
|
-
if (!/* @__PURE__ */ isNullOrUndefined(val) && String(val).toLowerCase().includes(q)) return true;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
return false;
|
|
447
|
-
})
|
|
448
|
-
});
|
|
449
|
-
const allItems = toRef(() => toValue(context.items));
|
|
450
|
-
const { items: filteredItems } = filter.apply(context.search, allItems);
|
|
451
|
-
return {
|
|
452
|
-
allItems,
|
|
453
|
-
filteredItems
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
/** Create the sort pipeline stage */
|
|
457
|
-
sort(filteredItems, sortBy, locale, customSorts) {
|
|
458
|
-
return computed(() => {
|
|
459
|
-
const entries = sortBy.value;
|
|
460
|
-
if (entries.length === 0) return filteredItems.value;
|
|
461
|
-
const sorts = toValue(customSorts) ?? {};
|
|
462
|
-
const collator = new Intl.Collator(locale?.value);
|
|
463
|
-
const resolved = entries.map(({ key, direction }) => ({
|
|
464
|
-
parts: key.split("."),
|
|
465
|
-
direction,
|
|
466
|
-
custom: sorts[key]
|
|
467
|
-
}));
|
|
468
|
-
return filteredItems.value.toSorted((a, b) => {
|
|
469
|
-
for (const { parts, direction, custom } of resolved) {
|
|
470
|
-
const aVal = parts.length === 1 ? a[parts[0]] : getNestedValue(a, parts);
|
|
471
|
-
const bVal = parts.length === 1 ? b[parts[0]] : getNestedValue(b, parts);
|
|
472
|
-
const cmp = custom ? custom(aVal, bVal) : compareValues(aVal, bVal, collator);
|
|
473
|
-
if (cmp !== 0) return direction === "desc" ? -cmp : cmp;
|
|
474
|
-
}
|
|
475
|
-
return 0;
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
//#endregion
|
|
481
|
-
export { createFilter as a, usePagination as i, createPagination as n, createFilterContext as o, createPaginationContext as r, useFilter as s, DataTableAdapter as t };
|
|
386
|
+
export { createFilterContext as a, createFilter as i, createPaginationContext as n, useFilter as o, usePagination as r, createPagination as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clamp, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { i as useLogger } from "./useLogger-
|
|
3
|
+
import { i as useLogger } from "./useLogger-D7_hm4e8.mjs";
|
|
4
4
|
import { shallowReactive } from "vue";
|
|
5
5
|
//#region src/composables/createRegistry/index.ts
|
|
6
6
|
/**
|
|
@@ -224,6 +224,7 @@ function createRegistry(options) {
|
|
|
224
224
|
} finally {
|
|
225
225
|
isBatching = false;
|
|
226
226
|
batched = [];
|
|
227
|
+
cache.clear();
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
230
|
function reindex() {
|
|
@@ -263,7 +264,7 @@ function createRegistry(options) {
|
|
|
263
264
|
return get(id);
|
|
264
265
|
}
|
|
265
266
|
const valueIsUndefined = /* @__PURE__ */ isUndefined(registration.value);
|
|
266
|
-
const index =
|
|
267
|
+
const index = size;
|
|
267
268
|
const value = valueIsUndefined ? index : registration.value;
|
|
268
269
|
const valueIsIndex = registration.valueIsIndex ?? valueIsUndefined;
|
|
269
270
|
if (valueIsIndex) indexDependentCount++;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isUndefined, resolveIds, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as createRegistry } from "./createRegistry-
|
|
3
|
+
import { t as createRegistry } from "./createRegistry-Cb6ftNMU.mjs";
|
|
4
4
|
import { computed, isRef, shallowReactive, toRaw, toRef, toValue } from "vue";
|
|
5
5
|
//#region src/composables/createModel/index.ts
|
|
6
6
|
/**
|
|
@@ -105,11 +105,14 @@ function createModel(_options = {}) {
|
|
|
105
105
|
}
|
|
106
106
|
function apply(values, _options) {
|
|
107
107
|
const value = values[0];
|
|
108
|
+
let written = false;
|
|
108
109
|
for (const id of selectedIds) {
|
|
109
110
|
const item = registry.get(id);
|
|
110
111
|
if (!item || !isRef(item.value)) continue;
|
|
111
|
-
item.value.value = value;
|
|
112
|
+
if (!/* @__PURE__ */ isUndefined(value)) item.value.value = value;
|
|
113
|
+
written = true;
|
|
112
114
|
}
|
|
115
|
+
if (written) return;
|
|
113
116
|
if (!toValue(multiple)) selectedIds.clear();
|
|
114
117
|
if (/* @__PURE__ */ isUndefined(value)) return;
|
|
115
118
|
const id = registry.browse(toRaw(value))?.values().next().value;
|
|
@@ -305,8 +308,8 @@ function createSelection(_options = {}) {
|
|
|
305
308
|
if (ids) for (const id of ids) targetIds.add(id);
|
|
306
309
|
}
|
|
307
310
|
if (isMultiple) {
|
|
308
|
-
for (const id of currentIds.
|
|
309
|
-
for (const id of targetIds.
|
|
311
|
+
for (const id of currentIds) if (!targetIds.has(id)) unselect(id);
|
|
312
|
+
for (const id of targetIds) if (!currentIds.has(id)) model.selectedIds.add(id);
|
|
310
313
|
} else {
|
|
311
314
|
const next = targetIds.values().next().value;
|
|
312
315
|
const last = currentIds.values().next().value;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
2
|
-
import { t as createSelection } from "./createSelection-
|
|
2
|
+
import { t as createSelection } from "./createSelection-BMvXj84C.mjs";
|
|
3
3
|
import { toRef } from "vue";
|
|
4
4
|
//#region src/composables/createSingle/index.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UNSAFE_KEYS, isObject, isString, isUndefined } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { i as useLogger } from "./useLogger-
|
|
4
|
-
import { t as createRegistry } from "./createRegistry-
|
|
3
|
+
import { i as useLogger } from "./useLogger-D7_hm4e8.mjs";
|
|
4
|
+
import { t as createRegistry } from "./createRegistry-Cb6ftNMU.mjs";
|
|
5
5
|
//#region src/composables/createTokens/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @module createTokens
|
|
@@ -175,8 +175,7 @@ function createTokens(tokens = {}, options = {}) {
|
|
|
175
175
|
/**
|
|
176
176
|
* Creates a new token context.
|
|
177
177
|
*
|
|
178
|
-
* @param
|
|
179
|
-
* @param tokens The tokens to use.
|
|
178
|
+
* @param options The options for the token context.
|
|
180
179
|
* @template Z The type of the token ticket.
|
|
181
180
|
* @template E The type of the token context.
|
|
182
181
|
* @returns A new token context.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ClientDataTableAdapter } from "../../../v0-
|
|
1
|
+
import { t as ClientDataTableAdapter } from "../../../v0-DotXXGXU.mjs";
|
|
2
2
|
export { ClientDataTableAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ClientDataTableAdapter } from "../../../v0-
|
|
1
|
+
import { t as ClientDataTableAdapter } from "../../../v0-A4GLojAr.mjs";
|
|
2
2
|
export { ClientDataTableAdapter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../../adapter-
|
|
2
|
-
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../server-
|
|
3
|
-
import { t as ClientDataTableAdapter } from "../../v0-
|
|
4
|
-
import { t as VirtualDataTableAdapter } from "../../virtual-
|
|
1
|
+
import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../../adapter-_srNCBEi.mjs";
|
|
2
|
+
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../server-DbtTGb67.mjs";
|
|
3
|
+
import { t as ClientDataTableAdapter } from "../../v0-DotXXGXU.mjs";
|
|
4
|
+
import { t as VirtualDataTableAdapter } from "../../virtual-C-NsLue0.mjs";
|
|
5
5
|
export { ClientDataTableAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterResult, ServerDataTableAdapter, ServerDataTableAdapterOptions, SortDirection, SortEntry, VirtualDataTableAdapter };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as DataTableAdapter } from "../../adapter-
|
|
2
|
-
import { t as ClientDataTableAdapter } from "../../v0-
|
|
3
|
-
import { t as ServerDataTableAdapter } from "../../server-
|
|
4
|
-
import { t as VirtualDataTableAdapter } from "../../virtual-
|
|
5
|
-
import "../../adapters-BYLWDmYl.mjs";
|
|
1
|
+
import { t as DataTableAdapter } from "../../adapter-CVoWg0sw.mjs";
|
|
2
|
+
import { t as ClientDataTableAdapter } from "../../v0-A4GLojAr.mjs";
|
|
3
|
+
import { t as ServerDataTableAdapter } from "../../server-D5BJBjB0.mjs";
|
|
4
|
+
import { t as VirtualDataTableAdapter } from "../../virtual-DFvOoeG6.mjs";
|
|
6
5
|
export { ClientDataTableAdapter, DataTableAdapter, ServerDataTableAdapter, VirtualDataTableAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../../server-
|
|
1
|
+
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../../../server-DbtTGb67.mjs";
|
|
2
2
|
export { ServerDataTableAdapter, ServerDataTableAdapterOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ServerDataTableAdapter } from "../../../server-
|
|
1
|
+
import { t as ServerDataTableAdapter } from "../../../server-D5BJBjB0.mjs";
|
|
2
2
|
export { ServerDataTableAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualDataTableAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualDataTableAdapter } from "../../../virtual-C-NsLue0.mjs";
|
|
2
2
|
export { VirtualDataTableAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualDataTableAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualDataTableAdapter } from "../../../virtual-DFvOoeG6.mjs";
|
|
2
2
|
export { VirtualDataTableAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../adapter-
|
|
2
|
-
import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-
|
|
3
|
-
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../server-
|
|
4
|
-
import { t as ClientDataTableAdapter } from "../v0-
|
|
5
|
-
import { t as VirtualDataTableAdapter } from "../virtual-
|
|
1
|
+
import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../adapter-_srNCBEi.mjs";
|
|
2
|
+
import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-DRrHHgE7.mjs";
|
|
3
|
+
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../server-DbtTGb67.mjs";
|
|
4
|
+
import { t as ClientDataTableAdapter } from "../v0-DotXXGXU.mjs";
|
|
5
|
+
import { t as VirtualDataTableAdapter } from "../virtual-C-NsLue0.mjs";
|
|
6
6
|
export { ClientDataTableAdapter, ColumnNode, DataTableAdapter, DataTableAdapterContext, DataTableAdapterResult, DataTableColumnTicket, DataTableColumnTicketInput, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, DataTableTicket, DataTableTicketInput, InternalHeader, SelectStrategy, ServerDataTableAdapter, ServerDataTableAdapterOptions, SortDirection, SortEntry, VirtualDataTableAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as DataTableAdapter } from "../adapter-
|
|
2
|
-
import { t as ClientDataTableAdapter } from "../v0-
|
|
3
|
-
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-
|
|
4
|
-
import { t as ServerDataTableAdapter } from "../server-
|
|
5
|
-
import { t as VirtualDataTableAdapter } from "../virtual-
|
|
1
|
+
import { t as DataTableAdapter } from "../adapter-CVoWg0sw.mjs";
|
|
2
|
+
import { t as ClientDataTableAdapter } from "../v0-A4GLojAr.mjs";
|
|
3
|
+
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-CBfnCUKU.mjs";
|
|
4
|
+
import { t as ServerDataTableAdapter } from "../server-D5BJBjB0.mjs";
|
|
5
|
+
import { t as VirtualDataTableAdapter } from "../virtual-DFvOoeG6.mjs";
|
|
6
6
|
export { ClientDataTableAdapter, DataTableAdapter, ServerDataTableAdapter, VirtualDataTableAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
|
package/dist/date/index.d.mts
CHANGED
package/dist/date/index.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../globals-
|
|
1
|
+
import { t as IN_BROWSER } from "../globals-C1X-9O7K.mjs";
|
|
2
2
|
import { isFunction, isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
|
|
3
|
+
import { t as DateAdapter } from "../adapter-Cy7wXVFe.mjs";
|
|
3
4
|
import { Temporal } from "@js-temporal/polyfill";
|
|
4
|
-
//#region src/composables/useDate/adapters/adapter.ts
|
|
5
|
-
var DateAdapter = class {};
|
|
6
|
-
//#endregion
|
|
7
5
|
//#region src/composables/useDate/adapters/v0.ts
|
|
8
6
|
/**
|
|
9
7
|
* @module V0DateAdapter
|
|
@@ -14,11 +12,16 @@ var DateAdapter = class {};
|
|
|
14
12
|
*
|
|
15
13
|
* Implements the full date-io IUtils interface for industry compatibility.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
15
|
+
* Uses the runtime's native Temporal implementation when present, falling back
|
|
16
|
+
* to the @js-temporal/polyfill optional peer. The polyfill import is static, so
|
|
17
|
+
* runtimes without native Temporal must have the peer installed to load this
|
|
18
|
+
* module.
|
|
18
19
|
*
|
|
19
20
|
* @see https://tc39.es/proposal-temporal/docs/
|
|
20
21
|
* @see https://github.com/dmtrKovalenko/date-io
|
|
21
22
|
*/
|
|
23
|
+
/** Resolved Temporal implementation — native when the runtime provides it, polyfill otherwise. */
|
|
24
|
+
const Temporal$1 = globalThis.Temporal ?? Temporal;
|
|
22
25
|
/** Single regex for token replacement in formatByString */
|
|
23
26
|
const FORMAT_TOKEN_REGEX = /YYYY|YY|MMMM|MMM|MM|M|dddd|ddd|DD|D|HH|H|hh|h|mm|m|ss|s|A|a/g;
|
|
24
27
|
/** Maximum cache size to prevent memory leaks */
|
|
@@ -102,7 +105,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
102
105
|
* hydration via `<ClientOnly>` (Nuxt) or `v-if` + `onMounted` pattern.
|
|
103
106
|
*/
|
|
104
107
|
date(value) {
|
|
105
|
-
if (/* @__PURE__ */ isNullOrUndefined(value)) return IN_BROWSER ? Temporal.Now.plainDateTimeISO() : Temporal.PlainDateTime.from({
|
|
108
|
+
if (/* @__PURE__ */ isNullOrUndefined(value)) return IN_BROWSER ? Temporal$1.Now.plainDateTimeISO() : Temporal$1.PlainDateTime.from({
|
|
106
109
|
year: 1970,
|
|
107
110
|
month: 1,
|
|
108
111
|
day: 1,
|
|
@@ -110,10 +113,10 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
110
113
|
minute: 0,
|
|
111
114
|
second: 0
|
|
112
115
|
});
|
|
113
|
-
if (value instanceof Temporal.PlainDateTime) return value;
|
|
114
|
-
if (value instanceof Temporal.PlainDate) return value.toPlainDateTime();
|
|
115
|
-
if (value instanceof Temporal.ZonedDateTime) return value.toPlainDateTime();
|
|
116
|
-
if (value instanceof Date) return Temporal.PlainDateTime.from({
|
|
116
|
+
if (value instanceof Temporal$1.PlainDateTime) return value;
|
|
117
|
+
if (value instanceof Temporal$1.PlainDate) return value.toPlainDateTime();
|
|
118
|
+
if (value instanceof Temporal$1.ZonedDateTime) return value.toPlainDateTime();
|
|
119
|
+
if (value instanceof Date) return Temporal$1.PlainDateTime.from({
|
|
117
120
|
year: value.getFullYear(),
|
|
118
121
|
month: value.getMonth() + 1,
|
|
119
122
|
day: value.getDate(),
|
|
@@ -123,7 +126,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
123
126
|
millisecond: value.getMilliseconds()
|
|
124
127
|
});
|
|
125
128
|
if (/* @__PURE__ */ isString(value)) try {
|
|
126
|
-
return Temporal.PlainDateTime.from(value);
|
|
129
|
+
return Temporal$1.PlainDateTime.from(value);
|
|
127
130
|
} catch {
|
|
128
131
|
try {
|
|
129
132
|
return this.parseISO(value);
|
|
@@ -133,7 +136,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
133
136
|
}
|
|
134
137
|
if (/* @__PURE__ */ isNumber(value)) {
|
|
135
138
|
const date = new Date(value);
|
|
136
|
-
return Temporal.PlainDateTime.from({
|
|
139
|
+
return Temporal$1.PlainDateTime.from({
|
|
137
140
|
year: date.getFullYear(),
|
|
138
141
|
month: date.getMonth() + 1,
|
|
139
142
|
day: date.getDate(),
|
|
@@ -149,9 +152,9 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
149
152
|
return new Date(value.year, value.month - 1, value.day, value.hour, value.minute, value.second, value.millisecond);
|
|
150
153
|
}
|
|
151
154
|
parseISO(dateString) {
|
|
152
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) return Temporal.PlainDate.from(dateString).toPlainDateTime();
|
|
153
|
-
if (dateString.includes("Z") || /[+-]\d{2}:\d{2}$/.test(dateString)) return Temporal.Instant.from(dateString).toZonedDateTimeISO("UTC").toPlainDateTime();
|
|
154
|
-
return Temporal.PlainDateTime.from(dateString);
|
|
155
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) return Temporal$1.PlainDate.from(dateString).toPlainDateTime();
|
|
156
|
+
if (dateString.includes("Z") || /[+-]\d{2}:\d{2}$/.test(dateString)) return Temporal$1.Instant.from(dateString).toZonedDateTimeISO("UTC").toPlainDateTime();
|
|
157
|
+
return Temporal$1.PlainDateTime.from(dateString);
|
|
155
158
|
}
|
|
156
159
|
toISO(date) {
|
|
157
160
|
return date.toPlainDate().toString();
|
|
@@ -181,16 +184,16 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
181
184
|
}
|
|
182
185
|
isValid(date) {
|
|
183
186
|
if (/* @__PURE__ */ isNullOrUndefined(date)) return false;
|
|
184
|
-
if (date instanceof Temporal.PlainDateTime) return true;
|
|
185
|
-
if (date instanceof Temporal.PlainDate) return true;
|
|
186
|
-
if (date instanceof Temporal.ZonedDateTime) return true;
|
|
187
|
+
if (date instanceof Temporal$1.PlainDateTime) return true;
|
|
188
|
+
if (date instanceof Temporal$1.PlainDate) return true;
|
|
189
|
+
if (date instanceof Temporal$1.ZonedDateTime) return true;
|
|
187
190
|
if (date instanceof Date) return !Number.isNaN(date.getTime());
|
|
188
191
|
if (/* @__PURE__ */ isString(date)) try {
|
|
189
|
-
Temporal.PlainDateTime.from(date);
|
|
192
|
+
Temporal$1.PlainDateTime.from(date);
|
|
190
193
|
return true;
|
|
191
194
|
} catch {
|
|
192
195
|
try {
|
|
193
|
-
Temporal.PlainDate.from(date);
|
|
196
|
+
Temporal$1.PlainDate.from(date);
|
|
194
197
|
return true;
|
|
195
198
|
} catch {
|
|
196
199
|
return false;
|
|
@@ -424,10 +427,10 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
424
427
|
return date.add({ years: amount });
|
|
425
428
|
}
|
|
426
429
|
isAfter(date, comparing) {
|
|
427
|
-
return Temporal.PlainDateTime.compare(date, comparing) > 0;
|
|
430
|
+
return Temporal$1.PlainDateTime.compare(date, comparing) > 0;
|
|
428
431
|
}
|
|
429
432
|
isAfterDay(date, comparing) {
|
|
430
|
-
return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) > 0;
|
|
433
|
+
return Temporal$1.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) > 0;
|
|
431
434
|
}
|
|
432
435
|
isAfterMonth(date, comparing) {
|
|
433
436
|
if (date.year !== comparing.year) return date.year > comparing.year;
|
|
@@ -437,10 +440,10 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
437
440
|
return date.year > comparing.year;
|
|
438
441
|
}
|
|
439
442
|
isBefore(date, comparing) {
|
|
440
|
-
return Temporal.PlainDateTime.compare(date, comparing) < 0;
|
|
443
|
+
return Temporal$1.PlainDateTime.compare(date, comparing) < 0;
|
|
441
444
|
}
|
|
442
445
|
isBeforeDay(date, comparing) {
|
|
443
|
-
return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) < 0;
|
|
446
|
+
return Temporal$1.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) < 0;
|
|
444
447
|
}
|
|
445
448
|
isBeforeMonth(date, comparing) {
|
|
446
449
|
if (date.year !== comparing.year) return date.year < comparing.year;
|
|
@@ -450,10 +453,10 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
450
453
|
return date.year < comparing.year;
|
|
451
454
|
}
|
|
452
455
|
isEqual(date, comparing) {
|
|
453
|
-
return Temporal.PlainDateTime.compare(date, comparing) === 0;
|
|
456
|
+
return Temporal$1.PlainDateTime.compare(date, comparing) === 0;
|
|
454
457
|
}
|
|
455
458
|
isSameDay(date, comparing) {
|
|
456
|
-
return Temporal.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) === 0;
|
|
459
|
+
return Temporal$1.PlainDate.compare(date.toPlainDate(), comparing.toPlainDate()) === 0;
|
|
457
460
|
}
|
|
458
461
|
isSameMonth(date, comparing) {
|
|
459
462
|
return date.year === comparing.year && date.month === comparing.month;
|
|
@@ -465,7 +468,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
465
468
|
return date.year === comparing.year && date.month === comparing.month && date.day === comparing.day && date.hour === comparing.hour;
|
|
466
469
|
}
|
|
467
470
|
isWithinRange(date, [start, end]) {
|
|
468
|
-
return Temporal.PlainDateTime.compare(date, start) >= 0 && Temporal.PlainDateTime.compare(date, end) <= 0;
|
|
471
|
+
return Temporal$1.PlainDateTime.compare(date, start) >= 0 && Temporal$1.PlainDateTime.compare(date, end) <= 0;
|
|
469
472
|
}
|
|
470
473
|
getYear(date) {
|
|
471
474
|
return date.year;
|
|
@@ -507,10 +510,10 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
507
510
|
const currentWeekEnd = this.addDays(currentWeekStart, 6);
|
|
508
511
|
let year = this.getYear(currentWeekStart);
|
|
509
512
|
if (year < this.getYear(currentWeekEnd)) {
|
|
510
|
-
const nextYearStart = new Temporal.PlainDateTime(year + 1, 1, 1);
|
|
513
|
+
const nextYearStart = new Temporal$1.PlainDateTime(year + 1, 1, 1);
|
|
511
514
|
if (7 - this.getDiff(nextYearStart, this.startOfWeek(nextYearStart), "days") >= md) year++;
|
|
512
515
|
}
|
|
513
|
-
const yearStart = new Temporal.PlainDateTime(year, 1, 1);
|
|
516
|
+
const yearStart = new Temporal$1.PlainDateTime(year, 1, 1);
|
|
514
517
|
const firstWeekSize = 7 - this.getDiff(yearStart, this.startOfWeek(yearStart), "days");
|
|
515
518
|
const weekOneStart = firstWeekSize >= md ? yearStart.add({ days: firstWeekSize }).add({ weeks: -1 }) : yearStart.add({ days: firstWeekSize });
|
|
516
519
|
return 1 + this.getDiff(currentWeekStart, weekOneStart, "weeks");
|
|
@@ -538,7 +541,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
538
541
|
}
|
|
539
542
|
getWeekdays(format = "narrow") {
|
|
540
543
|
const weekdays = [];
|
|
541
|
-
const refDate = Temporal.PlainDate.from("2015-01-04");
|
|
544
|
+
const refDate = Temporal$1.PlainDate.from("2015-01-04");
|
|
542
545
|
const formatter = this.getFormatter({ weekday: format });
|
|
543
546
|
for (let i = 0; i < 7; i++) {
|
|
544
547
|
const day = refDate.add({ days: (i + this.firstDayOfWeek) % 7 });
|
|
@@ -553,7 +556,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
553
556
|
const monthEnd = this.endOfMonth(date);
|
|
554
557
|
let current = this.startOfWeek(monthStart);
|
|
555
558
|
const end = this.endOfWeek(monthEnd);
|
|
556
|
-
while (Temporal.PlainDateTime.compare(current, end) <= 0) {
|
|
559
|
+
while (Temporal$1.PlainDateTime.compare(current, end) <= 0) {
|
|
557
560
|
const week = [];
|
|
558
561
|
for (let i = 0; i < 7; i++) {
|
|
559
562
|
week.push(current);
|
|
@@ -566,7 +569,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
566
569
|
getMonthArray(date) {
|
|
567
570
|
const year = date.year;
|
|
568
571
|
const months = [];
|
|
569
|
-
for (let month = 1; month <= 12; month++) months.push(Temporal.PlainDateTime.from({
|
|
572
|
+
for (let month = 1; month <= 12; month++) months.push(Temporal$1.PlainDateTime.from({
|
|
570
573
|
year,
|
|
571
574
|
month,
|
|
572
575
|
day: 1
|
|
@@ -577,7 +580,7 @@ var V0DateAdapter = class extends DateAdapter {
|
|
|
577
580
|
const years = [];
|
|
578
581
|
let current = start.year;
|
|
579
582
|
while (current <= end.year) {
|
|
580
|
-
years.push(Temporal.PlainDateTime.from({
|
|
583
|
+
years.push(Temporal$1.PlainDateTime.from({
|
|
581
584
|
year: current,
|
|
582
585
|
month: 1,
|
|
583
586
|
day: 1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FlagsmithFeaturesAdapter } from "../../../flagsmith-
|
|
1
|
+
import { t as FlagsmithFeaturesAdapter } from "../../../flagsmith-CXzNBqm3.mjs";
|
|
2
2
|
export { FlagsmithFeaturesAdapter };
|