@atscript/vue-table 0.1.135 → 0.1.137
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-action-menu-content-qATZy3cu.mjs → as-action-menu-content-CVlExEpl.mjs} +1 -1
- package/dist/{as-action-menu-content-D8VzLK9e.cjs → as-action-menu-content-D8f60mY-.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-BaIGUOhP.d.mts → as-column-menu.vue-DIuEvru6.d.mts} +1 -1
- package/dist/{as-column-menu.vue-CDlI4-Cz.d.cts → as-column-menu.vue-olu6BNEU.d.cts} +1 -1
- package/dist/{as-config-dialog-CP362FP3.cjs → as-config-dialog-BrVhIV_e.cjs} +2 -2
- package/dist/{as-config-dialog-BMQxSqzl.mjs → as-config-dialog-DHdpmRo9.mjs} +2 -2
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-Dp_njNXz.mjs → as-confirm-dialog-BG5vlbvV.mjs} +1 -1
- package/dist/{as-confirm-dialog-D41XaN_P.cjs → as-confirm-dialog-iytk-urB.cjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-kAXGDwsk.mjs → as-filter-dialog-DAvtsH3d.mjs} +7 -7
- package/dist/{as-filter-dialog-BCUqpKPd.cjs → as-filter-dialog-DoynFox2.cjs} +7 -7
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-D3jSbSwB.cjs → as-filter-field-CBMDjApB.cjs} +3 -3
- package/dist/{as-filter-field-WnV2axh8.mjs → as-filter-field-DB5WFT4l.mjs} +3 -3
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/{as-filters-Dp93OWRS.cjs → as-filters-CiPv-dKs.cjs} +3 -3
- package/dist/{as-filters-Bc44srvA.mjs → as-filters-DfBH5YH9.mjs} +3 -3
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-preset-dialog-Bx4nRuyk.mjs → as-preset-dialog-C0f_6VxJ.mjs} +1 -1
- package/dist/{as-preset-dialog-pusPD935.cjs → as-preset-dialog-D8o2ChtM.cjs} +1 -1
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-BRQdflJz.mjs → as-preset-picker-CDItDinB.mjs} +1 -1
- package/dist/{as-preset-picker-nAx3MYl7.cjs → as-preset-picker-DonMQ8Ia.cjs} +1 -1
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-row-actions-gxmuZkYI.mjs → as-row-actions-B8YANdb4.mjs} +2 -2
- package/dist/{as-row-actions-PD-sFmDs.cjs → as-row-actions-CAiCfw8d.cjs} +2 -2
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.d.cts +1 -1
- package/dist/as-row-actions.d.mts +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-row-actions.vue-AXXt5kQS.d.mts → as-row-actions.vue-Cac2kfwO.d.cts} +1 -1
- package/dist/{as-row-actions.vue-D0MXQoeg.d.cts → as-row-actions.vue-DZrASzp7.d.mts} +1 -1
- package/dist/{as-table-ucLFACn0.cjs → as-table-BNfZcSra.cjs} +2 -2
- package/dist/{as-table-BIV1W3O9.mjs → as-table-DtfWLLlb.mjs} +2 -2
- package/dist/{as-table-actions-D_PUqMYy.cjs → as-table-actions-8yf2QIER.cjs} +2 -2
- package/dist/{as-table-actions-DQ5Nn8Jc.mjs → as-table-actions-z5xUWtvK.mjs} +2 -2
- 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-iKw4tsJh.d.cts → as-table-actions.vue-66cjnFZI.d.mts} +2 -2
- package/dist/{as-table-actions.vue-kndyFTyi.d.mts → as-table-actions.vue-B7ttOxKU.d.cts} +2 -2
- package/dist/{as-table-base-M6_12pPq.cjs → as-table-base-CdtyDOra.cjs} +2 -2
- package/dist/{as-table-base-kHOKCI7T.mjs → as-table-base-D7mO_Zmv.mjs} +2 -2
- package/dist/{as-table-header-cell-Ct_GPLVu.cjs → as-table-header-cell-CiRLNVJz.cjs} +1 -1
- package/dist/{as-table-header-cell-CZyy4q1s.mjs → as-table-header-cell-Cl8waY_g.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-BNsOEsof.d.mts → as-table-header-cell.vue-DhCxDIn1.d.mts} +1 -1
- package/dist/{as-table-header-cell.vue-DqjorECQ.d.cts → as-table-header-cell.vue-DmncmpeQ.d.cts} +1 -1
- package/dist/{as-table-root-DGYw0kPC.mjs → as-table-root-Bza3ZGJZ.mjs} +20 -13
- package/dist/{as-table-root-EyN1JHuS.cjs → as-table-root-C6a6iO6M.cjs} +20 -13
- 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-Do0j4ibu.d.cts → as-table-root.vue-BllmTRXj.d.cts} +5 -5
- package/dist/{as-table-root.vue-D0XFmTEL.d.mts → as-table-root.vue-zWOmt_ug.d.mts} +5 -5
- package/dist/{as-table-status-DMFZuZfJ.cjs → as-table-status-CbKmSKAy.cjs} +4 -4
- package/dist/{as-table-status-CYzRbU71.mjs → as-table-status-D9YuoBOm.mjs} +4 -4
- 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-QQ1aXpJC.d.cts → as-table.vue-Bzp4UOqz.d.cts} +7 -7
- package/dist/{as-table.vue-Dl0nGtMF.d.mts → as-table.vue-Cd1Hc5v9.d.mts} +7 -7
- package/dist/{as-window-table-B9Y4Xgwm.mjs → as-window-table-D5grrLFG.mjs} +2 -2
- package/dist/{as-window-table-Bxq7cYW5.cjs → as-window-table-OB4B1knU.cjs} +2 -2
- 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-avZGJlCe.d.cts → as-window-table.vue-CcDoghqs.d.mts} +6 -6
- package/dist/{as-window-table.vue-CdfbFgGs.d.mts → as-window-table.vue-Db--CSWD.d.cts} +6 -6
- package/dist/index.cjs +17 -17
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +17 -17
- package/dist/{types-CyAmAg10.d.cts → types-CuOHiH-S.d.mts} +24 -8
- package/dist/{types-yS6-QFfT.d.mts → types-n40LWFm_.d.cts} +24 -8
- package/dist/{use-table-BVptAnaS.mjs → use-table-DRN4nlZs.mjs} +1 -1
- package/dist/{use-table-Bm2a0g9D.cjs → use-table-JU7BAX4e.cjs} +1 -1
- package/dist/{use-table-component-Bpy5mg_P.cjs → use-table-component-DIWiP_Vs.cjs} +1 -1
- package/dist/{use-table-component-DYzKgCC4.mjs → use-table-component-VUFlxIk-.mjs} +1 -1
- package/dist/{use-table-nav-bridge-qyvyRm6S.cjs → use-table-nav-bridge-BBtXE70x.cjs} +1 -1
- package/dist/{use-table-nav-bridge-LCL6vq9F.mjs → use-table-nav-bridge-DT8oU-6r.mjs} +1 -1
- package/dist/{use-table-state-jljSQQ8m.cjs → use-table-state-CoVe_8NI.cjs} +6 -5
- package/dist/{use-table-state-CwfgWmuk.mjs → use-table-state-CqU1N4Q9.mjs} +7 -6
- package/package.json +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
1
2
|
import { Component, ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
|
3
|
+
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
2
4
|
import { ClientError, PageResult, TDbActionInfo, TDbActionProcessor, TDbDeleteResult } from "@atscript/db-client";
|
|
3
5
|
import { Uniquery } from "@uniqu/core";
|
|
4
|
-
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
5
|
-
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
6
6
|
|
|
7
7
|
//#region src/composables/state/intent-scope.d.ts
|
|
8
8
|
interface ActionBuckets {
|
|
@@ -403,6 +403,14 @@ type TAsCellTypeComponents = {
|
|
|
403
403
|
ref: Component; /** Synthesised row-actions pseudo-column (`:rowActionsColumn` opt-in). */
|
|
404
404
|
__actions?: Component;
|
|
405
405
|
} & Record<string, Component>;
|
|
406
|
+
/**
|
|
407
|
+
* How `applyUrlQuery` treats filters and sorters the URL does not mention.
|
|
408
|
+
* @since 0.1.137
|
|
409
|
+
*/
|
|
410
|
+
interface ApplyUrlQueryOptions {
|
|
411
|
+
/** `"merge"` (default) keeps them, `"replace"` clears them. */
|
|
412
|
+
mode?: "merge" | "replace";
|
|
413
|
+
}
|
|
406
414
|
/**
|
|
407
415
|
* Reactive table state — Vue implementation of the framework-agnostic
|
|
408
416
|
* TableStateData + TableStateMethods interfaces.
|
|
@@ -650,12 +658,20 @@ interface ReactiveTableState extends TableStateMethods {
|
|
|
650
658
|
releaseActionForm: () => void;
|
|
651
659
|
/**
|
|
652
660
|
* Hydrate state from a URL query string produced by `stateToUrlQueryString`.
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
661
|
+
* Writes filters / sorters / search / pagination decoded from the URL and
|
|
662
|
+
* unions decoded filter fields into `filterFields`. Echo-guarded against the
|
|
663
|
+
* bridge's own emissions. Does NOT call `query()` — root watchers refetch in
|
|
664
|
+
* reaction to the writes.
|
|
665
|
+
*
|
|
666
|
+
* `mode` decides what happens to filters and sorters the URL does NOT
|
|
667
|
+
* mention (search and pagination always take the URL's value):
|
|
668
|
+
* - `"merge"` (default) — they survive. This is mount-time deep-link
|
|
669
|
+
* hydration, where the URL overlays a preset baseline it must not wipe.
|
|
670
|
+
* - `"replace"` (since 0.1.137) — they are cleared, within whatever the
|
|
671
|
+
* `urlQuerySync` gates actually serialize. This is history navigation,
|
|
672
|
+
* where the URL is a complete snapshot of the synced aspects.
|
|
657
673
|
*/
|
|
658
|
-
applyUrlQuery: (urlString: string) => void;
|
|
674
|
+
applyUrlQuery: (urlString: string, opts?: ApplyUrlQueryOptions) => void;
|
|
659
675
|
/**
|
|
660
676
|
* Build the Uniquery the table's own fetch would send right now — same
|
|
661
677
|
* filters, sorters, search, force-filters and `$select` projection. Used by
|
|
@@ -817,4 +833,4 @@ interface PresetSurface {
|
|
|
817
833
|
lastError: Ref<Error | null>;
|
|
818
834
|
}
|
|
819
835
|
//#endregion
|
|
820
|
-
export {
|
|
836
|
+
export { TVueTableActionInfo as C, extractIdentifier as E, TAsTableControls as S, TableNavBridge as T, RowDeleteOpt as _, ConfirmOptions as a, RowSelectableVerdict as b, LocalRowAction as c, PresetConfig as d, QueryErrorKind as f, RowClassHook as g, RowAttrsHook as h, ConfigTab as i, MainActionRequest as l, RowActionsConfig as m, ApplyUrlQueryOptions as n, EnterAction as o, ReactiveTableState as p, ColumnMenuConfig as r, InvokeOpts as s, ActionResult as t, NavKeyOptions as u, RowHookContext as v, TableActionsState as w, TAsCellTypeComponents as x, RowSelectableHook as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
2
1
|
import { Component, ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
|
3
|
-
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
4
2
|
import { ClientError, PageResult, TDbActionInfo, TDbActionProcessor, TDbDeleteResult } from "@atscript/db-client";
|
|
5
3
|
import { Uniquery } from "@uniqu/core";
|
|
4
|
+
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
5
|
+
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
6
6
|
|
|
7
7
|
//#region src/composables/state/intent-scope.d.ts
|
|
8
8
|
interface ActionBuckets {
|
|
@@ -403,6 +403,14 @@ type TAsCellTypeComponents = {
|
|
|
403
403
|
ref: Component; /** Synthesised row-actions pseudo-column (`:rowActionsColumn` opt-in). */
|
|
404
404
|
__actions?: Component;
|
|
405
405
|
} & Record<string, Component>;
|
|
406
|
+
/**
|
|
407
|
+
* How `applyUrlQuery` treats filters and sorters the URL does not mention.
|
|
408
|
+
* @since 0.1.137
|
|
409
|
+
*/
|
|
410
|
+
interface ApplyUrlQueryOptions {
|
|
411
|
+
/** `"merge"` (default) keeps them, `"replace"` clears them. */
|
|
412
|
+
mode?: "merge" | "replace";
|
|
413
|
+
}
|
|
406
414
|
/**
|
|
407
415
|
* Reactive table state — Vue implementation of the framework-agnostic
|
|
408
416
|
* TableStateData + TableStateMethods interfaces.
|
|
@@ -650,12 +658,20 @@ interface ReactiveTableState extends TableStateMethods {
|
|
|
650
658
|
releaseActionForm: () => void;
|
|
651
659
|
/**
|
|
652
660
|
* Hydrate state from a URL query string produced by `stateToUrlQueryString`.
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
661
|
+
* Writes filters / sorters / search / pagination decoded from the URL and
|
|
662
|
+
* unions decoded filter fields into `filterFields`. Echo-guarded against the
|
|
663
|
+
* bridge's own emissions. Does NOT call `query()` — root watchers refetch in
|
|
664
|
+
* reaction to the writes.
|
|
665
|
+
*
|
|
666
|
+
* `mode` decides what happens to filters and sorters the URL does NOT
|
|
667
|
+
* mention (search and pagination always take the URL's value):
|
|
668
|
+
* - `"merge"` (default) — they survive. This is mount-time deep-link
|
|
669
|
+
* hydration, where the URL overlays a preset baseline it must not wipe.
|
|
670
|
+
* - `"replace"` (since 0.1.137) — they are cleared, within whatever the
|
|
671
|
+
* `urlQuerySync` gates actually serialize. This is history navigation,
|
|
672
|
+
* where the URL is a complete snapshot of the synced aspects.
|
|
657
673
|
*/
|
|
658
|
-
applyUrlQuery: (urlString: string) => void;
|
|
674
|
+
applyUrlQuery: (urlString: string, opts?: ApplyUrlQueryOptions) => void;
|
|
659
675
|
/**
|
|
660
676
|
* Build the Uniquery the table's own fetch would send right now — same
|
|
661
677
|
* filters, sorters, search, force-filters and `$select` projection. Used by
|
|
@@ -817,4 +833,4 @@ interface PresetSurface {
|
|
|
817
833
|
lastError: Ref<Error | null>;
|
|
818
834
|
}
|
|
819
835
|
//#endregion
|
|
820
|
-
export {
|
|
836
|
+
export { TVueTableActionInfo as C, extractIdentifier as E, TAsTableControls as S, TableNavBridge as T, RowDeleteOpt as _, ConfirmOptions as a, RowSelectableVerdict as b, LocalRowAction as c, PresetConfig as d, QueryErrorKind as f, RowClassHook as g, RowAttrsHook as h, ConfigTab as i, MainActionRequest as l, RowActionsConfig as m, ApplyUrlQueryOptions as n, EnterAction as o, ReactiveTableState as p, ColumnMenuConfig as r, InvokeOpts as s, ActionResult as t, NavKeyOptions as u, RowHookContext as v, TableActionsState as w, TAsCellTypeComponents as x, RowSelectableHook as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createTableState, r as provideTableContext, s as DEFAULT_AVAILABLE_ASPECTS } from "./use-table-state-
|
|
1
|
+
import { n as createTableState, r as provideTableContext, s as DEFAULT_AVAILABLE_ASPECTS } from "./use-table-state-CqU1N4Q9.mjs";
|
|
2
2
|
import { n as useTableSelection } from "./use-table-selection-ULbKT2xW.mjs";
|
|
3
3
|
import { createTableDef, getMetaEntry, resetMetaCache } from "@atscript/ui";
|
|
4
4
|
import { computed, inject, isRef, ref, shallowRef, toValue, watch } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-CoVe_8NI.cjs");
|
|
2
2
|
const require_use_table_selection = require("./use-table-selection-DtCV3rhu.cjs");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
let vue = require("vue");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-CoVe_8NI.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-CqU1N4Q9.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-CqU1N4Q9.mjs";
|
|
2
2
|
//#region src/composables/use-table-nav-bridge.ts
|
|
3
3
|
function isPassthroughKey(event) {
|
|
4
4
|
const key = event.key;
|
|
@@ -2111,8 +2111,9 @@ function createTableState(opts) {
|
|
|
2111
2111
|
lastEmittedUrl = next;
|
|
2112
2112
|
queryOpts.onUrlQueryChange(next);
|
|
2113
2113
|
}
|
|
2114
|
-
function applyUrlQuery(urlString) {
|
|
2114
|
+
function applyUrlQuery(urlString, opts) {
|
|
2115
2115
|
if (urlsEquivalent(urlString, lastEmittedUrl)) return;
|
|
2116
|
+
const replace = opts?.mode === "replace";
|
|
2116
2117
|
const cols = allColumns.value;
|
|
2117
2118
|
const parsed = (0, _atscript_ui_table.urlQueryStringToState)(urlString, {
|
|
2118
2119
|
knownFields: cols.length > 0 ? cols.map((c) => c.path) : void 0,
|
|
@@ -2125,16 +2126,16 @@ function createTableState(opts) {
|
|
|
2125
2126
|
hydratingFromUrl = true;
|
|
2126
2127
|
const filtersGate = (0, _atscript_ui_table.resolveAspectGate)(urlQuerySync?.filters);
|
|
2127
2128
|
if (filtersGate !== "none") {
|
|
2128
|
-
const next = {
|
|
2129
|
+
const next = {};
|
|
2130
|
+
for (const path in filters.value) if (!replace || !(0, _atscript_ui_table.gateOwns)(filtersGate, path)) next[path] = filters.value[path];
|
|
2129
2131
|
for (const path in parsed.filters) next[path] = parsed.filters[path];
|
|
2130
2132
|
filters.value = next;
|
|
2131
2133
|
}
|
|
2132
2134
|
const sortersGate = (0, _atscript_ui_table.resolveAspectGate)(urlQuerySync?.sorters);
|
|
2133
2135
|
let urlSortersChanged = false;
|
|
2134
2136
|
if (sortersGate !== "none") {
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
const merged = [...sorters.value.filter((s) => !urlFields.has(s.field)), ...parsed.sorters];
|
|
2137
|
+
const urlSortFields = new Set(parsed.sorters.map((s) => s.field));
|
|
2138
|
+
const merged = [...sorters.value.filter((s) => !(replace ? (0, _atscript_ui_table.gateOwns)(sortersGate, s.field) : urlSortFields.has(s.field))), ...parsed.sorters];
|
|
2138
2139
|
if (!(0, _atscript_ui_table.sortersEqual)(sorters.value, merged)) {
|
|
2139
2140
|
sorters.value = merged;
|
|
2140
2141
|
urlSortersChanged = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
2
|
import { navigateHrefFor } from "@atscript/ui";
|
|
3
3
|
import { computed, inject, nextTick, onBeforeUnmount, onScopeDispose, provide, ref, shallowRef, toValue, watch } from "vue";
|
|
4
|
-
import { STANDARD_PRESET_ID, blockStartFor, buildTableQuery, cellAsString, debounce, derivePresetAspects, fromWireSnapshot, isDirtyAgainst, isFilled, isSystemPresetId, mergeDisplayColumns, mergeSorters, pageAlignedBlocksFor, planFetch, reconcileColumnWidthDefaults, resolveAspectGate, resolveSystemPresets, rowsToPks, sameColumnSet, sortRowsLocally, sortersEqual, stateToUrlQueryString, togglePk, urlQueryStringToState, walkBackwardAbsorb, walkForwardAbsorb } from "@atscript/ui-table";
|
|
4
|
+
import { STANDARD_PRESET_ID, blockStartFor, buildTableQuery, cellAsString, debounce, derivePresetAspects, fromWireSnapshot, gateOwns, isDirtyAgainst, isFilled, isSystemPresetId, mergeDisplayColumns, mergeSorters, pageAlignedBlocksFor, planFetch, reconcileColumnWidthDefaults, resolveAspectGate, resolveSystemPresets, rowsToPks, sameColumnSet, sortRowsLocally, sortersEqual, stateToUrlQueryString, togglePk, urlQueryStringToState, walkBackwardAbsorb, walkForwardAbsorb } from "@atscript/ui-table";
|
|
5
5
|
import { formatIdentifier } from "@atscript/db-client";
|
|
6
6
|
//#region src/types.ts
|
|
7
7
|
/** UI-side sentinel for the synthesised row-delete processor. */
|
|
@@ -2111,8 +2111,9 @@ function createTableState(opts) {
|
|
|
2111
2111
|
lastEmittedUrl = next;
|
|
2112
2112
|
queryOpts.onUrlQueryChange(next);
|
|
2113
2113
|
}
|
|
2114
|
-
function applyUrlQuery(urlString) {
|
|
2114
|
+
function applyUrlQuery(urlString, opts) {
|
|
2115
2115
|
if (urlsEquivalent(urlString, lastEmittedUrl)) return;
|
|
2116
|
+
const replace = opts?.mode === "replace";
|
|
2116
2117
|
const cols = allColumns.value;
|
|
2117
2118
|
const parsed = urlQueryStringToState(urlString, {
|
|
2118
2119
|
knownFields: cols.length > 0 ? cols.map((c) => c.path) : void 0,
|
|
@@ -2125,16 +2126,16 @@ function createTableState(opts) {
|
|
|
2125
2126
|
hydratingFromUrl = true;
|
|
2126
2127
|
const filtersGate = resolveAspectGate(urlQuerySync?.filters);
|
|
2127
2128
|
if (filtersGate !== "none") {
|
|
2128
|
-
const next = {
|
|
2129
|
+
const next = {};
|
|
2130
|
+
for (const path in filters.value) if (!replace || !gateOwns(filtersGate, path)) next[path] = filters.value[path];
|
|
2129
2131
|
for (const path in parsed.filters) next[path] = parsed.filters[path];
|
|
2130
2132
|
filters.value = next;
|
|
2131
2133
|
}
|
|
2132
2134
|
const sortersGate = resolveAspectGate(urlQuerySync?.sorters);
|
|
2133
2135
|
let urlSortersChanged = false;
|
|
2134
2136
|
if (sortersGate !== "none") {
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
const merged = [...sorters.value.filter((s) => !urlFields.has(s.field)), ...parsed.sorters];
|
|
2137
|
+
const urlSortFields = new Set(parsed.sorters.map((s) => s.field));
|
|
2138
|
+
const merged = [...sorters.value.filter((s) => !(replace ? gateOwns(sortersGate, s.field) : urlSortFields.has(s.field))), ...parsed.sorters];
|
|
2138
2139
|
if (!sortersEqual(sorters.value, merged)) {
|
|
2139
2140
|
sorters.value = merged;
|
|
2140
2141
|
urlSortersChanged = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-table",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.137",
|
|
4
4
|
"description": "Type-driven table components for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -162,12 +162,12 @@
|
|
|
162
162
|
"access": "public"
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
|
-
"@atscript/ui": "^0.1.
|
|
166
|
-
"@atscript/ui-table": "^0.1.
|
|
167
|
-
"@atscript/vue-form": "^0.1.
|
|
165
|
+
"@atscript/ui": "^0.1.137",
|
|
166
|
+
"@atscript/ui-table": "^0.1.137",
|
|
167
|
+
"@atscript/vue-form": "^0.1.137"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|
|
170
|
-
"@atscript/db-client": "^0.1.
|
|
170
|
+
"@atscript/db-client": "^0.1.131",
|
|
171
171
|
"@atscript/typescript": "^0.1.93",
|
|
172
172
|
"@tanstack/vue-virtual": "^3.13.26",
|
|
173
173
|
"@uniqu/core": "^0.1.8",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"vunor": "^0.3.0"
|
|
184
184
|
},
|
|
185
185
|
"peerDependencies": {
|
|
186
|
-
"@atscript/db-client": "^0.1.
|
|
186
|
+
"@atscript/db-client": "^0.1.131",
|
|
187
187
|
"@tanstack/vue-virtual": "^3.13.26",
|
|
188
188
|
"@vueuse/core": "^14.3.0",
|
|
189
189
|
"reka-ui": "^2.9.8",
|