@atscript/vue-table 0.1.96 → 0.1.98
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/dist/as-action-form-dialog.cjs +1 -1
- package/dist/as-action-form-dialog.mjs +1 -1
- package/dist/{as-cell-array-DOQKR6t5.mjs → as-cell-array-2qmJ1lT2.mjs} +2 -2
- package/dist/{as-cell-array-CXeZzZqt.cjs → as-cell-array-iPeUnk2G.cjs} +2 -2
- package/dist/as-cell-array.cjs +1 -1
- package/dist/as-cell-array.d.mts +1 -1
- package/dist/as-cell-array.mjs +1 -1
- package/dist/{as-cell-date-DPWBlhyM.mjs → as-cell-date-BwFgi6O0.mjs} +2 -2
- package/dist/{as-cell-date-D0rowX5E.cjs → as-cell-date-DyixWKuS.cjs} +2 -2
- package/dist/as-cell-date.cjs +1 -1
- package/dist/as-cell-date.d.mts +1 -1
- package/dist/as-cell-date.mjs +1 -1
- package/dist/{as-cell-json-BynWIs1d.mjs → as-cell-json--95Xq6yq.mjs} +2 -2
- package/dist/{as-cell-json-DvHvQ6IL.cjs → as-cell-json-Bvv2P7YV.cjs} +2 -2
- package/dist/as-cell-json.cjs +1 -1
- package/dist/as-cell-json.d.mts +1 -1
- package/dist/as-cell-json.mjs +1 -1
- package/dist/{as-cell-number-Bc1C97Vg.mjs → as-cell-number-DKRaS9pM.mjs} +2 -2
- package/dist/{as-cell-number-0_WrSCzu.cjs → as-cell-number-DuPMOesI.cjs} +2 -2
- package/dist/as-cell-number.cjs +1 -1
- package/dist/as-cell-number.d.mts +1 -1
- package/dist/as-cell-number.mjs +1 -1
- package/dist/{as-cell-union-CFAI0utz.cjs → as-cell-union-CT0rIvQq.cjs} +3 -3
- package/dist/{as-cell-union-C1w3B38J.mjs → as-cell-union-sAOSdepj.mjs} +3 -3
- package/dist/as-cell-union.cjs +1 -1
- package/dist/as-cell-union.d.mts +1 -1
- package/dist/as-cell-union.mjs +1 -1
- package/dist/as-column-menu.cjs +1 -1
- package/dist/as-column-menu.d.cts +1 -1
- package/dist/as-column-menu.d.mts +1 -1
- package/dist/as-column-menu.mjs +1 -1
- package/dist/{as-column-menu.vue-C9e6wJ3z.d.mts → as-column-menu.vue-BtXVQywl.d.cts} +2 -2
- package/dist/{as-column-menu.vue-o0qFdzoL.d.cts → as-column-menu.vue-D3Z5BVLx.d.mts} +2 -2
- package/dist/{as-config-dialog-BB6BDa1E.mjs → as-config-dialog-COwDabdW.mjs} +15 -13
- package/dist/{as-config-dialog-BCvtSxi6.cjs → as-config-dialog-vOUtx5zq.cjs} +14 -12
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.d.mts +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.d.mts +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-O62-CnIQ.cjs → as-filter-dialog-BcPI27cn.cjs} +19 -70
- package/dist/{as-filter-dialog-KGyPqr2P.mjs → as-filter-dialog-DuFgEjqE.mjs} +20 -65
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.d.mts +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-jL7cnKUR.cjs → as-filter-field-B8idz2UD.cjs} +3 -473
- package/dist/{as-filter-field-CkiRXHVx.mjs → as-filter-field-Dsk1l3Et.mjs} +7 -441
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.d.mts +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/as-filter-input.cjs +1 -1
- package/dist/as-filter-input.d.mts +1 -1
- package/dist/as-filter-input.mjs +1 -1
- package/dist/{as-filters-BJM-NjUn.mjs → as-filters-BS7kWJfI.mjs} +5 -3
- package/dist/{as-filters-BFpZKtAU.cjs → as-filters-BzdQ4HUx.cjs} +4 -2
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.d.mts +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-preset-dialog-1Xl8DIiN.cjs → as-preset-dialog-DOdrDDKy.cjs} +7 -8
- package/dist/{as-preset-dialog-DXbqMVI1.mjs → as-preset-dialog-DoEpCt2j.mjs} +7 -8
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.d.mts +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-CkaaKzYB.cjs → as-preset-picker-2DkH7QfW.cjs} +1 -1
- package/dist/{as-preset-picker-DJTF47_V.mjs → as-preset-picker-ByUCQpnX.mjs} +1 -1
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.d.mts +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-row-actions-C78cvaf3.cjs → as-row-actions-05pQX_om.cjs} +1 -1
- package/dist/{as-row-actions-CpEMa5NU.mjs → as-row-actions-D7YgGt0x.mjs} +1 -1
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.d.mts +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-table-v42bV1ea.cjs → as-table-DyuL_hUo.cjs} +6 -5
- package/dist/{as-table-DDyvnBFL.mjs → as-table-H5uKWieH.mjs} +4 -3
- package/dist/{as-table-actions-DtCjMMCI.cjs → as-table-actions-CsdY2_BG.cjs} +1 -1
- package/dist/{as-table-actions-D2-MBvoy.mjs → as-table-actions-DCEGQiHi.mjs} +1 -1
- package/dist/as-table-actions.cjs +1 -1
- package/dist/as-table-actions.d.cts +1 -1
- package/dist/as-table-actions.d.mts +1 -1
- package/dist/as-table-actions.mjs +1 -1
- package/dist/{as-table-actions.vue-BuqEk4zM.d.cts → as-table-actions.vue-33oeDXOg.d.cts} +2 -2
- package/dist/{as-table-actions.vue-q8hQPcZp.d.mts → as-table-actions.vue-DMf6-R5o.d.mts} +2 -2
- package/dist/{as-table-base-CSrtmIN2.mjs → as-table-base-DReD74pJ.mjs} +2 -2
- package/dist/{as-table-base-CHzULili.cjs → as-table-base-GEf95oXP.cjs} +2 -2
- package/dist/{as-table-cell-value-B1CiJYFn.mjs → as-table-cell-value-Byrb_Zyh.mjs} +2 -2
- package/dist/{as-table-cell-value-CuxRtFn9.cjs → as-table-cell-value-CcWR5oG4.cjs} +2 -2
- package/dist/as-table-cell-value.cjs +1 -1
- package/dist/as-table-cell-value.d.mts +1 -1
- package/dist/as-table-cell-value.mjs +1 -1
- package/dist/{as-table-header-cell-CBn_ioCe.mjs → as-table-header-cell-BUf8wvrw.mjs} +6 -4
- package/dist/{as-table-header-cell-C3zeZUZo.cjs → as-table-header-cell-DWONx2MI.cjs} +5 -3
- package/dist/as-table-header-cell.cjs +1 -1
- package/dist/as-table-header-cell.d.cts +1 -1
- package/dist/as-table-header-cell.d.mts +1 -1
- package/dist/as-table-header-cell.mjs +1 -1
- package/dist/{as-table-header-cell.vue-Bc_DSsGY.d.cts → as-table-header-cell.vue-CzqTEpyk.d.cts} +1 -1
- package/dist/{as-table-header-cell.vue-DNMOHfek.d.mts → as-table-header-cell.vue-Dj_Tl7dZ.d.mts} +1 -1
- package/dist/{as-table-root-zJdmNnsC.cjs → as-table-root-Cg2zkxR5.cjs} +8 -20
- package/dist/{as-table-root-Bc23Z7we.mjs → as-table-root-DpQUTbQ8.mjs} +4 -16
- package/dist/as-table-root.cjs +1 -1
- package/dist/as-table-root.d.cts +1 -1
- package/dist/as-table-root.d.mts +1 -1
- package/dist/as-table-root.mjs +1 -1
- package/dist/{as-table-root.vue-DtjHgOVP.d.mts → as-table-root.vue-Boq6pDr1.d.mts} +15 -6
- package/dist/{as-table-root.vue-DL3BnZOe.d.cts → as-table-root.vue-CYmnf5SH.d.cts} +15 -6
- package/dist/{as-table-status-DKXFSCzE.cjs → as-table-status-DZP8dFpm.cjs} +17 -74
- package/dist/{as-table-status-B11orhFu.mjs → as-table-status-Dinns93w.mjs} +19 -64
- package/dist/as-table.cjs +1 -1
- package/dist/as-table.d.cts +1 -1
- package/dist/as-table.d.mts +1 -1
- package/dist/as-table.mjs +1 -1
- package/dist/{as-table.vue-CLBXcYRv.d.cts → as-table.vue-CE_7OC_h.d.mts} +5 -5
- package/dist/{as-table.vue-Co7gHZ8C.d.mts → as-table.vue-kFORh8Vg.d.cts} +5 -5
- package/dist/{as-window-table-CDTjX7W5.mjs → as-window-table-BwF2t4Zy.mjs} +5 -3
- package/dist/{as-window-table-DuwMCDUh.cjs → as-window-table-CCRJKpoE.cjs} +7 -5
- package/dist/as-window-table.cjs +1 -1
- package/dist/as-window-table.d.cts +1 -1
- package/dist/as-window-table.d.mts +1 -1
- package/dist/as-window-table.mjs +1 -1
- package/dist/{as-window-table.vue-CLXZuY3h.d.cts → as-window-table.vue-C60NtRtq.d.cts} +4 -4
- package/dist/{as-window-table.vue-BA2S6YQr.d.mts → as-window-table.vue-C88OoW5d.d.mts} +4 -4
- package/dist/index.cjs +46 -44
- package/dist/index.d.cts +19 -17
- package/dist/index.d.mts +23 -21
- package/dist/index.mjs +35 -35
- package/dist/{types-BvvXN72P.d.mts → types-BPFBxUS_.d.cts} +2 -4
- package/dist/{types-CNMmF6W2.d.cts → types-BWeFiZKk.d.mts} +2 -4
- package/dist/use-has-emit-listener-BTMDIv2e.mjs +14 -0
- package/dist/use-has-emit-listener-hhOH8CBI.cjs +19 -0
- package/dist/use-seed-on-open-DO3A1kIb.mjs +30 -0
- package/dist/use-seed-on-open-Dg9I89fU.cjs +35 -0
- package/dist/use-table-CLsp2mAu.cjs +475 -0
- package/dist/use-table-CRsFMyJb.mjs +440 -0
- package/dist/{use-table-column-handlers-CGYAY2xH.cjs → use-table-column-handlers-BgC4gUJV.cjs} +0 -19
- package/dist/{use-table-column-handlers-t6xi1yCE.mjs → use-table-column-handlers-cm0GxR2u.mjs} +1 -14
- package/dist/use-table-component-BbETnUuy.mjs +12 -0
- package/dist/use-table-component-CirEOQ_P.cjs +17 -0
- package/dist/use-table-nav-bridge-Bh1tpG0X.cjs +57 -0
- package/dist/use-table-nav-bridge-i8AjtjIt.mjs +52 -0
- package/dist/use-table-selection-C84z4OZy.mjs +59 -0
- package/dist/use-table-selection-Cmiu1h4S.cjs +70 -0
- package/package.json +10 -7
- /package/dist/{as-action-menu-content-CSPPMACR.cjs → as-action-menu-content-BChqFX3E.cjs} +0 -0
- /package/dist/{as-action-menu-content-DXWuttt_.mjs → as-action-menu-content-D2yf0zD2.mjs} +0 -0
- /package/dist/{as-cell-array.vue-DZGM2VHh.d.mts → as-cell-array.vue-D4vS7C_D.d.mts} +0 -0
- /package/dist/{as-cell-date.vue-Zlt4mHWb.d.mts → as-cell-date.vue-Chs7WTZ9.d.mts} +0 -0
- /package/dist/{as-cell-json-popover-BWdNs1YU.cjs → as-cell-json-popover-BM2QLgfk.cjs} +0 -0
- /package/dist/{as-cell-json-popover-DUq25I0L.mjs → as-cell-json-popover-Dkdv5Y9E.mjs} +0 -0
- /package/dist/{as-cell-json.vue-CESWuCer.d.mts → as-cell-json.vue-C0_LDvQw.d.mts} +0 -0
- /package/dist/{as-cell-number.vue-1Oq7nVI3.d.mts → as-cell-number.vue-BBF0OuU8.d.mts} +0 -0
- /package/dist/{as-cell-union.vue-NnDmQZOA.d.mts → as-cell-union.vue-CL-Lf-Rm.d.mts} +0 -0
- /package/dist/{as-column-menu-CH9Htz0Q.cjs → as-column-menu-fZVbJ9lU.cjs} +0 -0
- /package/dist/{as-column-menu-DCfhorMP.mjs → as-column-menu-kTIQfLTi.mjs} +0 -0
- /package/dist/{as-config-dialog.vue-C6Q62xF5.d.mts → as-config-dialog.vue-BvFZZRuY.d.mts} +0 -0
- /package/dist/{as-confirm-dialog-Xtw2wE1X.cjs → as-confirm-dialog-C6HAGzrj.cjs} +0 -0
- /package/dist/{as-confirm-dialog-DL0mCEeX.mjs → as-confirm-dialog-ClVKU1Dm.mjs} +0 -0
- /package/dist/{as-confirm-dialog.vue-pas8jGhv.d.mts → as-confirm-dialog.vue-Cz52-v6c.d.mts} +0 -0
- /package/dist/{as-filter-dialog.vue-RDZjp4gJ.d.mts → as-filter-dialog.vue-likNLqzF.d.mts} +0 -0
- /package/dist/{as-filter-field.vue-QY8wi5S5.d.mts → as-filter-field.vue-BbXLhd6O.d.mts} +0 -0
- /package/dist/{as-filter-input-P1i0CW2-.mjs → as-filter-input-BM23TNeh.mjs} +0 -0
- /package/dist/{as-filter-input--nr72iwX.cjs → as-filter-input-DJu2k9gO.cjs} +0 -0
- /package/dist/{as-filter-input.vue-CBQ71eNg.d.mts → as-filter-input.vue-B9ma2l9j.d.mts} +0 -0
- /package/dist/{as-filters.vue-BsMgYUcX.d.mts → as-filters.vue-DmECMd1v.d.mts} +0 -0
- /package/dist/{as-preset-dialog.vue-Bzv-ON9W.d.mts → as-preset-dialog.vue-BRjjfPty.d.mts} +0 -0
- /package/dist/{as-preset-picker.vue-CTBk6leV.d.mts → as-preset-picker.vue-BPjsiaVt.d.mts} +0 -0
- /package/dist/{as-row-actions.vue-BPaQfGev.d.mts → as-row-actions.vue-DUSDuoR2.d.mts} +0 -0
- /package/dist/{as-table-cell-value.vue-BuPCQ8YA.d.mts → as-table-cell-value.vue-kfNgVhzn.d.mts} +0 -0
- /package/dist/{format-cell-B2xMDYO9.mjs → format-cell-CNQ6BpvR.mjs} +0 -0
- /package/dist/{format-cell-D4mqaN0E.cjs → format-cell-CSbJgz5B.cjs} +0 -0
- /package/dist/{get-cell-value-CZSVfDLg.cjs → get-cell-value-4rHKP-TG.cjs} +0 -0
- /package/dist/{get-cell-value-DiH84HKL.mjs → get-cell-value-C8LLc_Rr.mjs} +0 -0
- /package/dist/{preset-aspect-display-BYeiSgcc.mjs → preset-aspect-display-IICxAlVo.mjs} +0 -0
- /package/dist/{preset-aspect-display-y8aal_EF.cjs → preset-aspect-display-TWwf6j1B.cjs} +0 -0
- /package/dist/{use-cell-locale-B480_QYK.cjs → use-cell-locale-BGBRQB7s.cjs} +0 -0
- /package/dist/{use-cell-locale-1uQaFTLQ.mjs → use-cell-locale-MQXoONh5.mjs} +0 -0
|
@@ -1,445 +1,11 @@
|
|
|
1
|
-
import { a as useTableContext
|
|
2
|
-
import {
|
|
3
|
-
import { t as as_table_base_default } from "./as-table-base-
|
|
4
|
-
import { ValueHelpClient,
|
|
5
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent,
|
|
6
|
-
import {
|
|
1
|
+
import { a as useTableContext } from "./use-table-state-CuZ2OXoY.mjs";
|
|
2
|
+
import { n as useTable } from "./use-table-CRsFMyJb.mjs";
|
|
3
|
+
import { t as as_table_base_default } from "./as-table-base-DReD74pJ.mjs";
|
|
4
|
+
import { ValueHelpClient, getMetaEntry, resolveValueHelp, valueHelpDictPaths } from "@atscript/ui";
|
|
5
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, onBeforeUnmount, openBlock, ref, renderList, shallowRef, toDisplayString, unref, useId, watch, withCtx, withKeys, withModifiers } from "vue";
|
|
6
|
+
import { arraysEqual, columnFilterType, debounce, formatFilterCondition, isFilled, isSimpleEq, parseFilterInput } from "@atscript/ui-table";
|
|
7
7
|
import { until } from "@vueuse/core";
|
|
8
8
|
import { ComboboxAnchor, ComboboxContent, ComboboxInput, ComboboxRoot, ComboboxViewport } from "reka-ui";
|
|
9
|
-
//#region src/composables/as-presets-app.ts
|
|
10
|
-
/**
|
|
11
|
-
* App-wide injection key for the presets system. The host app calls
|
|
12
|
-
* `app.provide(AS_PRESETS_APP, '<your-app>')` once at boot; every
|
|
13
|
-
* `<AsTableRoot>`, `usePresets`, and `useAppPrefs` call below it pulls the
|
|
14
|
-
* value via `inject(AS_PRESETS_APP)` unless an explicit `app` option
|
|
15
|
-
* overrides it.
|
|
16
|
-
*
|
|
17
|
-
* The string identifies the application namespace on the server side —
|
|
18
|
-
* one Moost backend can serve many apps; rows are scoped by `(app,
|
|
19
|
-
* tableKey)`.
|
|
20
|
-
*/
|
|
21
|
-
const AS_PRESETS_APP = Symbol("AS_PRESETS_APP");
|
|
22
|
-
/**
|
|
23
|
-
* Resolve the app name with these precedence rules:
|
|
24
|
-
*
|
|
25
|
-
* 1. `explicit` argument (composable option) — wins.
|
|
26
|
-
* 2. `inject(AS_PRESETS_APP)` from the Vue tree.
|
|
27
|
-
* 3. Throws — composable can't run without an app namespace.
|
|
28
|
-
*
|
|
29
|
-
* Throws a clear error when neither is available so misconfiguration
|
|
30
|
-
* surfaces at setup time, not when the first network round-trip fails.
|
|
31
|
-
*/
|
|
32
|
-
function injectPresetsApp(explicit) {
|
|
33
|
-
if (explicit && explicit.length > 0) return explicit;
|
|
34
|
-
const fromProvide = inject(AS_PRESETS_APP, void 0);
|
|
35
|
-
if (fromProvide && fromProvide.length > 0) return fromProvide;
|
|
36
|
-
throw new Error("[vue-table] AS_PRESETS_APP not provided. Call `app.provide(AS_PRESETS_APP, '<your-app>')` once at boot, or pass `app` to the composable.");
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/composables/use-local-draft.ts
|
|
40
|
-
const DEFAULT_DEBOUNCE_MS = 300;
|
|
41
|
-
/**
|
|
42
|
-
* localStorage overlay manager for table presets. One overlay per
|
|
43
|
-
* `(app, tableKey)`; switching presets clears it (caller's responsibility
|
|
44
|
-
* — this composable only tracks state, not which preset is active).
|
|
45
|
-
*/
|
|
46
|
-
function useLocalDraft(opts) {
|
|
47
|
-
const key = `as-table-draft:${opts.app}:${opts.tableKey}`;
|
|
48
|
-
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
49
|
-
const storage = resolveStorage(opts.storage);
|
|
50
|
-
function isEnabled() {
|
|
51
|
-
if (typeof opts.enabled === "boolean") return opts.enabled;
|
|
52
|
-
if (isRef(opts.enabled)) return Boolean(opts.enabled.value);
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
function readDraft() {
|
|
56
|
-
if (!storage) return null;
|
|
57
|
-
try {
|
|
58
|
-
const raw = storage.getItem(key);
|
|
59
|
-
if (!raw) return null;
|
|
60
|
-
const parsed = JSON.parse(raw);
|
|
61
|
-
if (!parsed || typeof parsed !== "object") return null;
|
|
62
|
-
return parsed;
|
|
63
|
-
} catch (err) {
|
|
64
|
-
console.warn("[vue-table] useLocalDraft: corrupted localStorage entry, ignoring", err);
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function writeDraft(draft) {
|
|
69
|
-
if (!storage) return;
|
|
70
|
-
try {
|
|
71
|
-
storage.setItem(key, JSON.stringify(draft));
|
|
72
|
-
} catch (err) {
|
|
73
|
-
console.warn("[vue-table] useLocalDraft: localStorage write failed", err);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function clear() {
|
|
77
|
-
if (!storage) return;
|
|
78
|
-
try {
|
|
79
|
-
storage.removeItem(key);
|
|
80
|
-
} catch {}
|
|
81
|
-
}
|
|
82
|
-
function hydrate(applied) {
|
|
83
|
-
if (!isEnabled()) return applied;
|
|
84
|
-
const draft = readDraft();
|
|
85
|
-
if (!draft || isEmptyDraft(draft)) return applied;
|
|
86
|
-
const overlay = deserializeDraft(draft, opts.availableAspects);
|
|
87
|
-
return {
|
|
88
|
-
...applied,
|
|
89
|
-
...overlay
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function watchAndPersist(currentSnapshot, activePresetSnapshot) {
|
|
93
|
-
let lastDraftSerialized = "";
|
|
94
|
-
let lastPresetRef = null;
|
|
95
|
-
let lastPresetSerialized = "";
|
|
96
|
-
function flush(current, preset) {
|
|
97
|
-
if (!isEnabled()) return;
|
|
98
|
-
const draft = serializeDraft(current, opts.availableAspects);
|
|
99
|
-
if (isEmptyDraft(draft)) {
|
|
100
|
-
clear();
|
|
101
|
-
lastDraftSerialized = "";
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
const draftSerialized = stableStringify(draft);
|
|
105
|
-
if (preset !== lastPresetRef) {
|
|
106
|
-
lastPresetRef = preset;
|
|
107
|
-
lastPresetSerialized = stableStringify(serializeDraft(preset, opts.availableAspects));
|
|
108
|
-
}
|
|
109
|
-
if (draftSerialized === lastPresetSerialized) {
|
|
110
|
-
clear();
|
|
111
|
-
lastDraftSerialized = "";
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (draftSerialized === lastDraftSerialized) return;
|
|
115
|
-
lastDraftSerialized = draftSerialized;
|
|
116
|
-
writeDraft(draft);
|
|
117
|
-
}
|
|
118
|
-
const flushDebounced = debounce(((current, preset) => flush(current, preset)), debounceMs);
|
|
119
|
-
const stop = watch(() => [currentSnapshot(), activePresetSnapshot()], ([current, preset]) => flushDebounced(current, preset), { flush: "post" });
|
|
120
|
-
return () => {
|
|
121
|
-
flushDebounced.cancel();
|
|
122
|
-
stop();
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
hydrate,
|
|
127
|
-
watchAndPersist,
|
|
128
|
-
clear,
|
|
129
|
-
readDraft
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function resolveStorage(provided) {
|
|
133
|
-
if (provided !== void 0) return provided;
|
|
134
|
-
try {
|
|
135
|
-
return globalThis.localStorage ?? null;
|
|
136
|
-
} catch {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/composables/use-presets.ts
|
|
142
|
-
/**
|
|
143
|
-
* Public dev-facing composable for table presets. Powers `<AsPresetPicker>`
|
|
144
|
-
* internally and is exported for devs who want to wire bespoke surfaces.
|
|
145
|
-
*
|
|
146
|
-
* Stateful: holds reactive `presets` / `userConf` / `capabilities` and
|
|
147
|
-
* supports optimistic mutators that re-list after each successful write.
|
|
148
|
-
*
|
|
149
|
-
* Active-preset selection (`activePresetId`) is **owned by the caller** —
|
|
150
|
-
* the composable provides the ref but doesn't auto-resolve it on mount;
|
|
151
|
-
* that's the table-state's responsibility (Slice 4) since it depends on
|
|
152
|
-
* `userConf.defaultPresetId` resolution + Standard fallback.
|
|
153
|
-
*/
|
|
154
|
-
function usePresets(opts) {
|
|
155
|
-
const app = injectPresetsApp(opts.app);
|
|
156
|
-
if (!opts.tableKey) throw new Error("[vue-table] usePresets: `tableKey` is required");
|
|
157
|
-
const client = new PresetsClient({
|
|
158
|
-
url: opts.url,
|
|
159
|
-
app,
|
|
160
|
-
tableKey: opts.tableKey,
|
|
161
|
-
clientFactory: opts.clientFactory
|
|
162
|
-
});
|
|
163
|
-
const systemPresetsResolved = computed(() => resolveSystemPresets(opts.systemPresets));
|
|
164
|
-
const presets = shallowRef([]);
|
|
165
|
-
const userConf = shallowRef(null);
|
|
166
|
-
const capabilities = ref(null);
|
|
167
|
-
const loading = ref(false);
|
|
168
|
-
const error = ref(null);
|
|
169
|
-
const denied = ref(false);
|
|
170
|
-
const activePresetId = ref(null);
|
|
171
|
-
const available = computed(() => !denied.value);
|
|
172
|
-
const presetsById = computed(() => {
|
|
173
|
-
const map = /* @__PURE__ */ new Map();
|
|
174
|
-
for (const row of presets.value) map.set(row.id, row);
|
|
175
|
-
return map;
|
|
176
|
-
});
|
|
177
|
-
const systemPresetsById = computed(() => {
|
|
178
|
-
const map = /* @__PURE__ */ new Map();
|
|
179
|
-
for (const sp of systemPresetsResolved.value) map.set(sp.id, sp);
|
|
180
|
-
return map;
|
|
181
|
-
});
|
|
182
|
-
const activePreset = computed(() => {
|
|
183
|
-
const id = activePresetId.value;
|
|
184
|
-
if (!id) return null;
|
|
185
|
-
if (isSystemPresetId(id)) {
|
|
186
|
-
const entry = systemPresetsById.value.get(id);
|
|
187
|
-
return entry ? {
|
|
188
|
-
kind: "system",
|
|
189
|
-
entry
|
|
190
|
-
} : null;
|
|
191
|
-
}
|
|
192
|
-
const entry = presetsById.value.get(id);
|
|
193
|
-
return entry ? {
|
|
194
|
-
kind: "stored",
|
|
195
|
-
entry
|
|
196
|
-
} : null;
|
|
197
|
-
});
|
|
198
|
-
const currentUser = computed(() => {
|
|
199
|
-
const fromCaps = capabilities.value?.userId;
|
|
200
|
-
if (typeof fromCaps === "string" && fromCaps.length > 0) return fromCaps;
|
|
201
|
-
for (const row of presets.value) if (row.public !== true && typeof row.user === "string" && row.user.length > 0) return row.user;
|
|
202
|
-
return null;
|
|
203
|
-
});
|
|
204
|
-
function isOwned(id) {
|
|
205
|
-
if (isSystemPresetId(id)) return false;
|
|
206
|
-
const row = presetsById.value.get(id);
|
|
207
|
-
if (!row) return false;
|
|
208
|
-
if (row.public !== true) return true;
|
|
209
|
-
const me = currentUser.value;
|
|
210
|
-
return me !== null && row.user === me;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @param opts.capabilities — set `false` for refresh-after-mutation calls
|
|
214
|
-
* (fav-toggle, save, rename, delete, public-toggle, set-default) where
|
|
215
|
-
* role-derived capabilities can't have changed. Default `true`, used
|
|
216
|
-
* only on the initial mount load.
|
|
217
|
-
*/
|
|
218
|
-
let batchDepth = 0;
|
|
219
|
-
let reloadPending = false;
|
|
220
|
-
async function maybeReloadAfterMutation() {
|
|
221
|
-
if (batchDepth > 0) {
|
|
222
|
-
reloadPending = true;
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
await reload({ capabilities: false });
|
|
226
|
-
}
|
|
227
|
-
async function batch(fn) {
|
|
228
|
-
batchDepth++;
|
|
229
|
-
try {
|
|
230
|
-
return await fn();
|
|
231
|
-
} finally {
|
|
232
|
-
batchDepth--;
|
|
233
|
-
if (batchDepth === 0 && reloadPending) {
|
|
234
|
-
reloadPending = false;
|
|
235
|
-
await reload({ capabilities: false });
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
async function reload(opts = {}) {
|
|
240
|
-
loading.value = true;
|
|
241
|
-
error.value = null;
|
|
242
|
-
try {
|
|
243
|
-
const result = await client.list(opts);
|
|
244
|
-
if (result.denied) {
|
|
245
|
-
denied.value = true;
|
|
246
|
-
presets.value = [];
|
|
247
|
-
userConf.value = null;
|
|
248
|
-
capabilities.value = null;
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
denied.value = false;
|
|
252
|
-
presets.value = result.presets;
|
|
253
|
-
userConf.value = result.userConf;
|
|
254
|
-
if (result.capabilities !== void 0) capabilities.value = result.capabilities;
|
|
255
|
-
} catch (err) {
|
|
256
|
-
if (isAuthError(err)) {
|
|
257
|
-
denied.value = true;
|
|
258
|
-
presets.value = [];
|
|
259
|
-
userConf.value = null;
|
|
260
|
-
capabilities.value = null;
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
error.value = err;
|
|
264
|
-
console.warn("[vue-table] usePresets load failed:", err);
|
|
265
|
-
} finally {
|
|
266
|
-
loading.value = false;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
async function savePreset(snapshot) {
|
|
270
|
-
const id = activePresetId.value;
|
|
271
|
-
if (!id) throw new Error("[vue-table] usePresets.savePreset: no active preset");
|
|
272
|
-
if (isSystemPresetId(id)) throw new Error("[vue-table] usePresets.savePreset: system presets cannot be overwritten");
|
|
273
|
-
const row = presetsById.value.get(id);
|
|
274
|
-
const label = row?.label ?? (row?.data)?.label ?? "";
|
|
275
|
-
if (!label) throw new Error("[vue-table] usePresets.savePreset: existing preset has no label");
|
|
276
|
-
await client.savePreset(id, label, snapshot);
|
|
277
|
-
await maybeReloadAfterMutation();
|
|
278
|
-
}
|
|
279
|
-
async function savePresetAs(label, snapshot, saveOpts = {}) {
|
|
280
|
-
const result = await client.savePresetAs(label, snapshot, saveOpts);
|
|
281
|
-
await maybeReloadAfterMutation();
|
|
282
|
-
activePresetId.value = result.id;
|
|
283
|
-
return result.id;
|
|
284
|
-
}
|
|
285
|
-
async function renamePreset(id, label) {
|
|
286
|
-
if (isSystemPresetId(id)) throw new Error("[vue-table] usePresets.renamePreset: system presets cannot be renamed");
|
|
287
|
-
await client.renamePreset(id, label);
|
|
288
|
-
await maybeReloadAfterMutation();
|
|
289
|
-
}
|
|
290
|
-
async function deletePreset(id) {
|
|
291
|
-
if (isSystemPresetId(id)) throw new Error("[vue-table] usePresets.deletePreset: system presets cannot be deleted");
|
|
292
|
-
await client.deletePreset(id);
|
|
293
|
-
if (activePresetId.value === id) activePresetId.value = STANDARD_PRESET_ID;
|
|
294
|
-
await maybeReloadAfterMutation();
|
|
295
|
-
}
|
|
296
|
-
async function togglePublic(id) {
|
|
297
|
-
if (isSystemPresetId(id)) throw new Error("[vue-table] usePresets.togglePublic: system presets are not public");
|
|
298
|
-
const row = presetsById.value.get(id);
|
|
299
|
-
if (!row) return;
|
|
300
|
-
await client.setPublic(id, row.public !== true);
|
|
301
|
-
await maybeReloadAfterMutation();
|
|
302
|
-
}
|
|
303
|
-
async function setDefault(id) {
|
|
304
|
-
const user = currentUser.value ?? void 0;
|
|
305
|
-
await client.upsertUserConf(userConf.value, { defaultPresetId: id ?? void 0 }, user);
|
|
306
|
-
await maybeReloadAfterMutation();
|
|
307
|
-
}
|
|
308
|
-
async function toggleFav(id) {
|
|
309
|
-
const current = (userConf.value?.data)?.favPresetIds;
|
|
310
|
-
const set = new Set(current ?? []);
|
|
311
|
-
if (set.has(id)) set.delete(id);
|
|
312
|
-
else set.add(id);
|
|
313
|
-
await setFavorites([...set]);
|
|
314
|
-
}
|
|
315
|
-
async function setFavorites(ids) {
|
|
316
|
-
const user = currentUser.value ?? void 0;
|
|
317
|
-
await client.upsertUserConf(userConf.value, { favPresetIds: ids }, user);
|
|
318
|
-
if (userConf.value) userConf.value = {
|
|
319
|
-
...userConf.value,
|
|
320
|
-
data: {
|
|
321
|
-
...userConf.value.data,
|
|
322
|
-
favPresetIds: ids
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
await maybeReloadAfterMutation();
|
|
326
|
-
}
|
|
327
|
-
if (opts.autoLoad !== false) reload();
|
|
328
|
-
return {
|
|
329
|
-
presets,
|
|
330
|
-
presetsById,
|
|
331
|
-
userConf,
|
|
332
|
-
capabilities,
|
|
333
|
-
systemPresets: systemPresetsResolved,
|
|
334
|
-
systemPresetsById,
|
|
335
|
-
available,
|
|
336
|
-
loading,
|
|
337
|
-
error,
|
|
338
|
-
currentUser,
|
|
339
|
-
activePresetId,
|
|
340
|
-
activePreset,
|
|
341
|
-
isOwned,
|
|
342
|
-
reload,
|
|
343
|
-
batch,
|
|
344
|
-
savePreset,
|
|
345
|
-
savePresetAs,
|
|
346
|
-
renamePreset,
|
|
347
|
-
deletePreset,
|
|
348
|
-
togglePublic,
|
|
349
|
-
setDefault,
|
|
350
|
-
toggleFav,
|
|
351
|
-
setFavorites
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
|
-
//#region src/composables/use-table.ts
|
|
356
|
-
/** Thin alias over `resetMetaCache` — retained so existing test code keeps working. */
|
|
357
|
-
function clearTableCache() {
|
|
358
|
-
resetMetaCache();
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Main entry composable for table setup.
|
|
362
|
-
*
|
|
363
|
-
* @param url — Table endpoint URL (e.g. "/db/tables/products")
|
|
364
|
-
*/
|
|
365
|
-
function useTable(url, opts) {
|
|
366
|
-
const entry = getMetaEntry(url, opts?.clientFactory);
|
|
367
|
-
if (!entry.tableDef) entry.tableDef = Promise.all([entry.meta, entry.type]).then(([meta, type]) => createTableDef(meta, type));
|
|
368
|
-
const { client } = entry;
|
|
369
|
-
const defPromise = entry.tableDef;
|
|
370
|
-
const preset = opts?.preset;
|
|
371
|
-
const presetsHandle = preset ? usePresets({
|
|
372
|
-
url: preset.url,
|
|
373
|
-
tableKey: preset.tableKey,
|
|
374
|
-
app: preset.app,
|
|
375
|
-
clientFactory: opts?.clientFactory,
|
|
376
|
-
systemPresets: preset.systemPresets
|
|
377
|
-
}) : null;
|
|
378
|
-
const draftHandle = preset ? useLocalDraft({
|
|
379
|
-
app: injectPresetsApp(preset.app),
|
|
380
|
-
tableKey: preset.tableKey,
|
|
381
|
-
enabled: preset.persistDrafts ?? false,
|
|
382
|
-
availableAspects: preset.aspects ?? DEFAULT_AVAILABLE_ASPECTS
|
|
383
|
-
}) : null;
|
|
384
|
-
const { state, internals } = createTableState({
|
|
385
|
-
client,
|
|
386
|
-
limit: opts?.limit,
|
|
387
|
-
selection: {
|
|
388
|
-
rowValueFn: opts?.rowValueFn,
|
|
389
|
-
selectedRows: opts?.selectedRows
|
|
390
|
-
},
|
|
391
|
-
model: {
|
|
392
|
-
filterFields: opts?.filterFields,
|
|
393
|
-
columnNames: opts?.columnNames,
|
|
394
|
-
columnWidths: opts?.columnWidths,
|
|
395
|
-
sorters: opts?.sorters
|
|
396
|
-
},
|
|
397
|
-
query: {
|
|
398
|
-
fn: opts?.queryFn,
|
|
399
|
-
forceFilters: opts?.forceFilters,
|
|
400
|
-
forceSorters: opts?.forceSorters,
|
|
401
|
-
alwaysSelected: opts?.alwaysSelected,
|
|
402
|
-
blockQuery: opts?.blockQuery,
|
|
403
|
-
queryOnMount: opts?.queryOnMount,
|
|
404
|
-
urlQueryReady: opts?.urlQueryReady,
|
|
405
|
-
onUrlQueryChange: opts?.onUrlQueryChange,
|
|
406
|
-
urlQuerySync: opts?.urlQuerySync
|
|
407
|
-
},
|
|
408
|
-
window: {
|
|
409
|
-
blockSize: opts?.blockSize,
|
|
410
|
-
dragReleaseDebounceMs: opts?.dragReleaseDebounceMs
|
|
411
|
-
},
|
|
412
|
-
actions: {
|
|
413
|
-
refreshOnAction: opts?.refreshOnAction,
|
|
414
|
-
onResolved: opts?.onActionResolved
|
|
415
|
-
},
|
|
416
|
-
preset: {
|
|
417
|
-
presetsHandle,
|
|
418
|
-
draftHandle,
|
|
419
|
-
availableAspects: preset?.aspects,
|
|
420
|
-
persistDrafts: preset?.persistDrafts ?? false
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
useTableSelection(state, { mode: opts?.selectionPersistence ?? "trim" });
|
|
424
|
-
if (opts?.provideContext !== false) provideTableContext({
|
|
425
|
-
state,
|
|
426
|
-
client,
|
|
427
|
-
controls: opts?.controls ?? {},
|
|
428
|
-
types: opts?.types,
|
|
429
|
-
components: opts?.components,
|
|
430
|
-
formTypes: opts?.formTypes,
|
|
431
|
-
formComponents: opts?.formComponents
|
|
432
|
-
});
|
|
433
|
-
defPromise.then((def) => {
|
|
434
|
-
internals.init(def);
|
|
435
|
-
}).catch((err) => {
|
|
436
|
-
state.metadataError.value = err instanceof Error ? err : new Error(String(err));
|
|
437
|
-
}).finally(() => {
|
|
438
|
-
state.loadingMetadata.value = false;
|
|
439
|
-
});
|
|
440
|
-
return state;
|
|
441
|
-
}
|
|
442
|
-
//#endregion
|
|
443
9
|
//#region src/composables/use-drag-scroll.ts
|
|
444
10
|
/**
|
|
445
11
|
* Pointer-drag horizontal scroll for a container. Listens for pointerdown on
|
|
@@ -941,4 +507,4 @@ var as_filter_field_default = /* @__PURE__ */ defineComponent({
|
|
|
941
507
|
}
|
|
942
508
|
});
|
|
943
509
|
//#endregion
|
|
944
|
-
export {
|
|
510
|
+
export { as_filter_field_default as t };
|
package/dist/as-filter-field.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_filter_field = require("./as-filter-field-
|
|
1
|
+
const require_as_filter_field = require("./as-filter-field-B8idz2UD.cjs");
|
|
2
2
|
module.exports = require_as_filter_field.as_filter_field_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-filter-field.vue-
|
|
1
|
+
import { t as _default } from "./as-filter-field.vue-BbXLhd6O.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-filter-field.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_filter_field_default } from "./as-filter-field-
|
|
1
|
+
import { t as as_filter_field_default } from "./as-filter-field-Dsk1l3Et.mjs";
|
|
2
2
|
export { as_filter_field_default as default };
|
package/dist/as-filter-input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_filter_input = require("./as-filter-input
|
|
1
|
+
const require_as_filter_input = require("./as-filter-input-DJu2k9gO.cjs");
|
|
2
2
|
module.exports = require_as_filter_input.as_filter_input_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-filter-input.vue-
|
|
1
|
+
import { t as _default } from "./as-filter-input.vue-B9ma2l9j.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-filter-input.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_filter_input_default } from "./as-filter-input-
|
|
1
|
+
import { t as as_filter_input_default } from "./as-filter-input-BM23TNeh.mjs";
|
|
2
2
|
export { as_filter_input_default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { a as useTableContext } from "./use-table-state-CuZ2OXoY.mjs";
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
2
|
+
import { t as useTableComponent } from "./use-table-component-BbETnUuy.mjs";
|
|
3
|
+
import { t as as_filter_field_default } from "./as-filter-field-Dsk1l3Et.mjs";
|
|
4
|
+
import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref } from "vue";
|
|
4
5
|
//#endregion
|
|
5
6
|
//#region src/components/as-filters.vue
|
|
6
7
|
var as_filters_default = /* @__PURE__ */ defineComponent({
|
|
@@ -12,6 +13,7 @@ var as_filters_default = /* @__PURE__ */ defineComponent({
|
|
|
12
13
|
setup(__props) {
|
|
13
14
|
const props = __props;
|
|
14
15
|
const { state } = useTableContext();
|
|
16
|
+
const FilterField = useTableComponent("filterField", as_filter_field_default);
|
|
15
17
|
const columnMap = computed(() => {
|
|
16
18
|
const tableDef = state.tableDef.value;
|
|
17
19
|
if (!tableDef) return /* @__PURE__ */ new Map();
|
|
@@ -32,7 +34,7 @@ var as_filters_default = /* @__PURE__ */ defineComponent({
|
|
|
32
34
|
});
|
|
33
35
|
return (_ctx, _cache) => {
|
|
34
36
|
return openBlock(true), createElementBlock(Fragment, null, renderList(activeColumns.value, (col) => {
|
|
35
|
-
return openBlock(), createBlock(
|
|
37
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(FilterField)), mergeProps({
|
|
36
38
|
key: col.path,
|
|
37
39
|
column: col
|
|
38
40
|
}, { ref_for: true }, _ctx.$attrs), null, 16, ["column"]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_use_table_state = require("./use-table-state-DFQ30m-j.cjs");
|
|
2
|
-
const
|
|
2
|
+
const require_use_table_component = require("./use-table-component-CirEOQ_P.cjs");
|
|
3
|
+
const require_as_filter_field = require("./as-filter-field-B8idz2UD.cjs");
|
|
3
4
|
let vue = require("vue");
|
|
4
5
|
//#endregion
|
|
5
6
|
//#region src/components/as-filters.vue
|
|
@@ -12,6 +13,7 @@ var as_filters_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
12
13
|
setup(__props) {
|
|
13
14
|
const props = __props;
|
|
14
15
|
const { state } = require_use_table_state.useTableContext();
|
|
16
|
+
const FilterField = require_use_table_component.useTableComponent("filterField", require_as_filter_field.as_filter_field_default);
|
|
15
17
|
const columnMap = (0, vue.computed)(() => {
|
|
16
18
|
const tableDef = state.tableDef.value;
|
|
17
19
|
if (!tableDef) return /* @__PURE__ */ new Map();
|
|
@@ -32,7 +34,7 @@ var as_filters_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
32
34
|
});
|
|
33
35
|
return (_ctx, _cache) => {
|
|
34
36
|
return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(activeColumns.value, (col) => {
|
|
35
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)(
|
|
37
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(FilterField)), (0, vue.mergeProps)({
|
|
36
38
|
key: col.path,
|
|
37
39
|
column: col
|
|
38
40
|
}, { ref_for: true }, _ctx.$attrs), null, 16, ["column"]);
|
package/dist/as-filters.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_filters = require("./as-filters-
|
|
1
|
+
const require_as_filters = require("./as-filters-BzdQ4HUx.cjs");
|
|
2
2
|
module.exports = require_as_filters.as_filters_default;
|
package/dist/as-filters.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-filters.vue-
|
|
1
|
+
import { t as _default } from "./as-filters.vue-DmECMd1v.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-filters.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_filters_default } from "./as-filters-
|
|
1
|
+
import { t as as_filters_default } from "./as-filters-BS7kWJfI.mjs";
|
|
2
2
|
export { as_filters_default as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_use_table_state = require("./use-table-state-DFQ30m-j.cjs");
|
|
2
|
-
const
|
|
2
|
+
const require_use_seed_on_open = require("./use-seed-on-open-Dg9I89fU.cjs");
|
|
3
|
+
const require_preset_aspect_display = require("./preset-aspect-display-TWwf6j1B.cjs");
|
|
3
4
|
let vue = require("vue");
|
|
4
5
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
5
6
|
let reka_ui = require("reka-ui");
|
|
@@ -129,13 +130,11 @@ var as_preset_dialog_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
129
130
|
pendingActiveId.value = state.preset.activeId.value;
|
|
130
131
|
pendingDeleteIds.value = /* @__PURE__ */ new Set();
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
(0, vue.nextTick)(() => searchInputRef.value?.focus());
|
|
138
|
-
}
|
|
133
|
+
require_use_seed_on_open.useSeedOnOpen(isOpen, () => {
|
|
134
|
+
syncPendingFromServer();
|
|
135
|
+
searchQuery.value = "";
|
|
136
|
+
cancelRename();
|
|
137
|
+
(0, vue.nextTick)(() => searchInputRef.value?.focus());
|
|
139
138
|
});
|
|
140
139
|
(0, vue.watch)([
|
|
141
140
|
serverFavIds,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as useTableContext } from "./use-table-state-CuZ2OXoY.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { t as useSeedOnOpen } from "./use-seed-on-open-DO3A1kIb.mjs";
|
|
3
|
+
import { a as readPresetLabel, i as ownerNameOf, n as ASPECT_LABELS, r as aspectsOf, t as ASPECT_ICONS } from "./preset-aspect-display-IICxAlVo.mjs";
|
|
3
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, nextTick, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
5
|
import { isSystemPresetId, setsEqual } from "@atscript/ui-table";
|
|
5
6
|
import { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle } from "reka-ui";
|
|
@@ -129,13 +130,11 @@ var as_preset_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
129
130
|
pendingActiveId.value = state.preset.activeId.value;
|
|
130
131
|
pendingDeleteIds.value = /* @__PURE__ */ new Set();
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
nextTick(() => searchInputRef.value?.focus());
|
|
138
|
-
}
|
|
133
|
+
useSeedOnOpen(isOpen, () => {
|
|
134
|
+
syncPendingFromServer();
|
|
135
|
+
searchQuery.value = "";
|
|
136
|
+
cancelRename();
|
|
137
|
+
nextTick(() => searchInputRef.value?.focus());
|
|
139
138
|
});
|
|
140
139
|
watch([
|
|
141
140
|
serverFavIds,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_preset_dialog = require("./as-preset-dialog-
|
|
1
|
+
const require_as_preset_dialog = require("./as-preset-dialog-DOdrDDKy.cjs");
|
|
2
2
|
module.exports = require_as_preset_dialog.as_preset_dialog_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-preset-dialog.vue-
|
|
1
|
+
import { t as _default } from "./as-preset-dialog.vue-BRjjfPty.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_preset_dialog_default } from "./as-preset-dialog-
|
|
1
|
+
import { t as as_preset_dialog_default } from "./as-preset-dialog-DoEpCt2j.mjs";
|
|
2
2
|
export { as_preset_dialog_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_table_state = require("./use-table-state-DFQ30m-j.cjs");
|
|
2
|
-
const require_preset_aspect_display = require("./preset-aspect-display-
|
|
2
|
+
const require_preset_aspect_display = require("./preset-aspect-display-TWwf6j1B.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
5
5
|
let reka_ui = require("reka-ui");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as useTableContext } from "./use-table-state-CuZ2OXoY.mjs";
|
|
2
|
-
import { a as readPresetLabel, i as ownerNameOf, n as ASPECT_LABELS, r as aspectsOf, t as ASPECT_ICONS } from "./preset-aspect-display-
|
|
2
|
+
import { a as readPresetLabel, i as ownerNameOf, n as ASPECT_LABELS, r as aspectsOf, t as ASPECT_ICONS } from "./preset-aspect-display-IICxAlVo.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onScopeDispose, openBlock, ref, renderList, toDisplayString, unref, vModelCheckbox, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { isSystemPresetId } from "@atscript/ui-table";
|
|
5
5
|
import { DropdownMenuContent, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger } from "reka-ui";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_preset_picker = require("./as-preset-picker-
|
|
1
|
+
const require_as_preset_picker = require("./as-preset-picker-2DkH7QfW.cjs");
|
|
2
2
|
module.exports = require_as_preset_picker.as_preset_picker_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-preset-picker.vue-
|
|
1
|
+
import { t as _default } from "./as-preset-picker.vue-BPjsiaVt.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_preset_picker_default } from "./as-preset-picker-
|
|
1
|
+
import { t as as_preset_picker_default } from "./as-preset-picker-ByUCQpnX.mjs";
|
|
2
2
|
export { as_preset_picker_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_table_state = require("./use-table-state-DFQ30m-j.cjs");
|
|
2
|
-
const require_as_action_menu_content = require("./as-action-menu-content-
|
|
2
|
+
const require_as_action_menu_content = require("./as-action-menu-content-BChqFX3E.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let reka_ui = require("reka-ui");
|
|
5
5
|
//#region src/components/defaults/as-row-actions.vue?vue&type=script&setup=true&lang.ts
|