@atscript/vue-table 0.1.132 → 0.1.133
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 +42 -30
- package/dist/as-action-form-dialog.mjs +42 -30
- package/dist/{as-action-menu-content-4UfcabUe.mjs → as-action-menu-content-4D7CJNgr.mjs} +1 -1
- package/dist/{as-action-menu-content-C5qx9MPE.cjs → as-action-menu-content-DiS37BYK.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.vue-DL5N9mKR.d.mts → as-column-menu.vue-CZ8XqHl0.d.cts} +2 -2
- package/dist/{as-column-menu.vue-u_DNy3f-.d.cts → as-column-menu.vue-Cuelpv3p.d.mts} +2 -2
- package/dist/{as-config-dialog-BehfqIGd.mjs → as-config-dialog-BKsm8OHR.mjs} +30 -22
- package/dist/{as-config-dialog-BOYWPYYH.cjs → as-config-dialog-Bt8oP8qg.cjs} +29 -21
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-bpN4A-KN.mjs → as-confirm-dialog-BV01t7dn.mjs} +12 -9
- package/dist/{as-confirm-dialog-UwhDHysk.cjs → as-confirm-dialog-Cw7KErhz.cjs} +12 -9
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-Dh2Ylthb.cjs → as-filter-dialog-Bxii-mYH.cjs} +31 -23
- package/dist/{as-filter-dialog-D1qzq-8b.mjs → as-filter-dialog-Ckrl79kU.mjs} +32 -24
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-DirBmnbb.mjs → as-filter-field-C-IFnj8K.mjs} +4 -4
- package/dist/{as-filter-field-DRsDJdpx.cjs → as-filter-field-xBr6TtKo.cjs} +4 -4
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/as-filters-DJEQj7_p.mjs +125 -0
- package/dist/as-filters-DuCk8nkk.cjs +130 -0
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.d.cts +1 -1
- package/dist/as-filters.d.mts +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/as-filters.vue-BG_ysCkC.d.mts +65 -0
- package/dist/as-filters.vue-DcxDnWAU.d.cts +65 -0
- package/dist/{as-preset-dialog-CDqCAR7N.mjs → as-preset-dialog-CCIacZ2C.mjs} +70 -20
- package/dist/{as-preset-dialog-DpM06jqR.cjs → as-preset-dialog-jZeyXJeJ.cjs} +74 -24
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-jUS_YDX8.cjs → as-preset-picker-4xXU1KQz.cjs} +45 -21
- package/dist/{as-preset-picker-CISaxEZ0.mjs → as-preset-picker-DGSqQl9A.mjs} +39 -15
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-row-actions-Bm6Bzyno.cjs → as-row-actions-B_OHWIAt.cjs} +2 -2
- package/dist/{as-row-actions-xqJeAdQl.mjs → as-row-actions-pukI1JT7.mjs} +2 -2
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-table-BWUPzjRn.cjs → as-table-BejpMVid.cjs} +22 -4
- package/dist/{as-table-CDSG2yED.mjs → as-table-D5_bQ0p5.mjs} +22 -4
- package/dist/{as-table-actions-DMxeaczm.mjs → as-table-actions-DKYK_mTO.mjs} +57 -11
- package/dist/{as-table-actions-gV4lqqxc.cjs → as-table-actions-qb0gQz2D.cjs} +56 -10
- 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-B-cgiCXP.d.cts → as-table-actions.vue-CckRRsL6.d.cts} +2 -2
- package/dist/{as-table-actions.vue-ClMa0OD1.d.mts → as-table-actions.vue-DsqauvXR.d.mts} +2 -2
- package/dist/{as-table-base-BaTE3VSN.mjs → as-table-base-B0arhJI8.mjs} +141 -46
- package/dist/{as-table-base-RG2TEIgV.cjs → as-table-base-Dfw012G5.cjs} +141 -46
- package/dist/{as-table-header-cell-CIqlO6Lw.cjs → as-table-header-cell-Bb4ddLmQ.cjs} +1 -1
- package/dist/{as-table-header-cell-Bdhl5Lox.mjs → as-table-header-cell-q-c_QklI.mjs} +1 -1
- 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-BCszzxtU.d.mts → as-table-header-cell.vue-BjVOEFqz.d.mts} +1 -1
- package/dist/{as-table-header-cell.vue-BzTzfGRo.d.cts → as-table-header-cell.vue-qS1Xfc-U.d.cts} +1 -1
- package/dist/{as-table-root-BLReUbRH.mjs → as-table-root-Bpsrp0Vz.mjs} +5 -5
- package/dist/{as-table-root-DLJ_3Jf4.cjs → as-table-root-CUDO9ybm.cjs} +5 -5
- 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-QMT93qPk.d.mts → as-table-root.vue-BPU92_Ns.d.mts} +55 -12
- package/dist/{as-table-root.vue-D0T3n-Vm.d.cts → as-table-root.vue-szvjZsCn.d.cts} +55 -12
- package/dist/{as-table-status-DGTZlpyq.mjs → as-table-status-B9jlzPPV.mjs} +53 -37
- package/dist/{as-table-status-Du4WLF4k.cjs → as-table-status-BgDexT2x.cjs} +53 -37
- 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-Ds7MEp37.d.cts → as-table.vue-4WhMA8AM.d.mts} +27 -3
- package/dist/{as-table.vue-Ce5606ZO.d.mts → as-table.vue-_urybtQj.d.cts} +27 -3
- package/dist/{as-window-table-jD_y9yet.cjs → as-window-table-CXq6UuUx.cjs} +98 -19
- package/dist/{as-window-table-DWujiUQy.mjs → as-window-table-S1XWpDHQ.mjs} +98 -19
- 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-DfZF1Mux.d.mts → as-window-table.vue-CWsJvOkL.d.mts} +25 -2
- package/dist/{as-window-table.vue-Bhf9BK8E.d.cts → as-window-table.vue-h1bdyMv7.d.cts} +25 -2
- package/dist/error-message-CglODWl4.cjs +18 -0
- package/dist/error-message-hPSAu8Ug.mjs +13 -0
- package/dist/index.cjs +61 -29
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +62 -30
- package/dist/{types-CTMxE_zA.d.cts → types-BZ0HssRY.d.cts} +126 -4
- package/dist/{types-ByU4O0Yf.d.mts → types-CXz-4dPz.d.mts} +126 -4
- package/dist/{use-table-CyFcVtUN.mjs → use-table-Bk-jSxOM.mjs} +26 -11
- package/dist/{use-table-nvBq1dZ4.cjs → use-table-CdFFqaEx.cjs} +24 -9
- package/dist/{use-table-component-DO_kvKSf.cjs → use-table-component-DlLganVc.cjs} +1 -1
- package/dist/{use-table-component-K6xj1obF.mjs → use-table-component-KuzZxAP8.mjs} +1 -1
- package/dist/{use-table-nav-bridge-DeGeaQX-.mjs → use-table-nav-bridge-B9SSEajW.mjs} +1 -1
- package/dist/{use-table-nav-bridge-uOQUDooh.cjs → use-table-nav-bridge-CVUmTjDr.cjs} +1 -1
- package/dist/{use-table-state-Oi2ds4_a.cjs → use-table-state-D6dHOFrA.cjs} +329 -53
- package/dist/{use-table-state-BxX3SpeW.mjs → use-table-state-DLJbW753.mjs} +295 -55
- package/package.json +9 -9
- package/dist/as-filters-DCZTHjf5.cjs +0 -51
- package/dist/as-filters-beIud9sF.mjs +0 -46
- package/dist/as-filters.vue-DmECMd1v.d.mts +0 -10
- package/dist/as-filters.vue-fv-tRL2H.d.cts +0 -10
- package/dist/preset-aspect-display-IICxAlVo.mjs +0 -43
- package/dist/preset-aspect-display-TWwf6j1B.cjs +0 -72
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-D6dHOFrA.cjs");
|
|
2
2
|
const require_use_table_selection = require("./use-table-selection-Cmiu1h4S.cjs");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
let vue = require("vue");
|
|
@@ -37,11 +37,16 @@ function injectPresetsApp(explicit) {
|
|
|
37
37
|
const DEFAULT_DEBOUNCE_MS = 300;
|
|
38
38
|
/**
|
|
39
39
|
* localStorage overlay manager for table presets. One overlay per
|
|
40
|
-
* `(app, tableKey)`; switching presets clears it (caller's
|
|
41
|
-
* — this composable only tracks state, not which preset is
|
|
40
|
+
* `(app, scope, tableKey)`; switching presets clears it (caller's
|
|
41
|
+
* responsibility — this composable only tracks state, not which preset is
|
|
42
|
+
* active).
|
|
42
43
|
*/
|
|
43
44
|
function useLocalDraft(opts) {
|
|
44
|
-
|
|
45
|
+
/** Resolved per call — `scope` is reactive. */
|
|
46
|
+
function storageKey() {
|
|
47
|
+
const scope = (0, vue.toValue)(opts.scope);
|
|
48
|
+
return scope ? `as-table-draft:${opts.app}:${scope}:${opts.tableKey}` : `as-table-draft:${opts.app}:${opts.tableKey}`;
|
|
49
|
+
}
|
|
45
50
|
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
46
51
|
const storage = resolveStorage(opts.storage);
|
|
47
52
|
function isEnabled() {
|
|
@@ -52,7 +57,7 @@ function useLocalDraft(opts) {
|
|
|
52
57
|
function readDraft() {
|
|
53
58
|
if (!storage) return null;
|
|
54
59
|
try {
|
|
55
|
-
const raw = storage.getItem(
|
|
60
|
+
const raw = storage.getItem(storageKey());
|
|
56
61
|
if (!raw) return null;
|
|
57
62
|
const parsed = JSON.parse(raw);
|
|
58
63
|
if (!parsed || typeof parsed !== "object") return null;
|
|
@@ -65,7 +70,7 @@ function useLocalDraft(opts) {
|
|
|
65
70
|
function writeDraft(draft) {
|
|
66
71
|
if (!storage) return;
|
|
67
72
|
try {
|
|
68
|
-
storage.setItem(
|
|
73
|
+
storage.setItem(storageKey(), JSON.stringify(draft));
|
|
69
74
|
} catch (err) {
|
|
70
75
|
console.warn("[vue-table] useLocalDraft: localStorage write failed", err);
|
|
71
76
|
}
|
|
@@ -73,7 +78,7 @@ function useLocalDraft(opts) {
|
|
|
73
78
|
function clear() {
|
|
74
79
|
if (!storage) return;
|
|
75
80
|
try {
|
|
76
|
-
storage.removeItem(
|
|
81
|
+
storage.removeItem(storageKey());
|
|
77
82
|
} catch {}
|
|
78
83
|
}
|
|
79
84
|
function hydrate(applied) {
|
|
@@ -114,9 +119,17 @@ function useLocalDraft(opts) {
|
|
|
114
119
|
}
|
|
115
120
|
const flushDebounced = (0, _atscript_ui_table.debounce)(((current, preset) => flush(current, preset)), debounceMs);
|
|
116
121
|
const stop = (0, vue.watch)(() => [currentSnapshot(), activePresetSnapshot()], ([current, preset]) => flushDebounced(current, preset), { flush: "post" });
|
|
122
|
+
const stopScope = (0, vue.watch)(() => (0, vue.toValue)(opts.scope), () => {
|
|
123
|
+
flushDebounced.cancel();
|
|
124
|
+
lastPresetRef = null;
|
|
125
|
+
lastPresetSerialized = "";
|
|
126
|
+
const existing = readDraft();
|
|
127
|
+
lastDraftSerialized = existing && !(0, _atscript_ui_table.isEmptyDraft)(existing) ? (0, _atscript_ui_table.stableStringify)(existing) : "";
|
|
128
|
+
}, { flush: "post" });
|
|
117
129
|
return () => {
|
|
118
130
|
flushDebounced.cancel();
|
|
119
131
|
stop();
|
|
132
|
+
stopScope();
|
|
120
133
|
};
|
|
121
134
|
}
|
|
122
135
|
return {
|
|
@@ -250,7 +263,7 @@ function usePresets(opts) {
|
|
|
250
263
|
userConf.value = result.userConf;
|
|
251
264
|
if (result.capabilities !== void 0) capabilities.value = result.capabilities;
|
|
252
265
|
} catch (err) {
|
|
253
|
-
if ((0, _atscript_ui_table.
|
|
266
|
+
if ((0, _atscript_ui_table.isUnavailableError)(err)) {
|
|
254
267
|
denied.value = true;
|
|
255
268
|
presets.value = [];
|
|
256
269
|
userConf.value = null;
|
|
@@ -376,7 +389,8 @@ function useTable(url, opts) {
|
|
|
376
389
|
app: injectPresetsApp(preset.app),
|
|
377
390
|
tableKey: preset.tableKey,
|
|
378
391
|
enabled: preset.persistDrafts ?? false,
|
|
379
|
-
availableAspects: preset.aspects ?? require_use_table_state.DEFAULT_AVAILABLE_ASPECTS
|
|
392
|
+
availableAspects: preset.aspects ?? require_use_table_state.DEFAULT_AVAILABLE_ASPECTS,
|
|
393
|
+
scope: preset.draftScope
|
|
380
394
|
}) : null;
|
|
381
395
|
const { state, internals } = require_use_table_state.createTableState({
|
|
382
396
|
client,
|
|
@@ -417,6 +431,7 @@ function useTable(url, opts) {
|
|
|
417
431
|
presetsHandle,
|
|
418
432
|
draftHandle,
|
|
419
433
|
availableAspects: preset?.aspects,
|
|
434
|
+
systemAspects: preset?.systemAspects,
|
|
420
435
|
persistDrafts: preset?.persistDrafts ?? false
|
|
421
436
|
}
|
|
422
437
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-D6dHOFrA.cjs");
|
|
2
2
|
//#region src/composables/use-table-component.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve a single skin-slot component from the injected `controls` map,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as useTableContextOptional } from "./use-table-state-
|
|
1
|
+
import { o as useTableContextOptional } from "./use-table-state-DLJbW753.mjs";
|
|
2
2
|
//#region src/composables/use-table-component.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve a single skin-slot component from the injected `controls` map,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as useTableContextOptional } from "./use-table-state-
|
|
1
|
+
import { o as useTableContextOptional } from "./use-table-state-DLJbW753.mjs";
|
|
2
2
|
//#region src/composables/use-table-nav-bridge.ts
|
|
3
3
|
function isPassthroughKey(event) {
|
|
4
4
|
const key = event.key;
|