@atscript/vue-table 0.1.137 → 0.1.139

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.
Files changed (149) hide show
  1. package/dist/as-action-form-dialog.cjs +1 -1
  2. package/dist/as-action-form-dialog.mjs +1 -1
  3. package/dist/{as-action-menu-content-CVlExEpl.mjs → as-action-menu-content-D7NIwc9X.mjs} +1 -1
  4. package/dist/{as-action-menu-content-D8f60mY-.cjs → as-action-menu-content-DXuyDZ_X.cjs} +1 -1
  5. package/dist/{as-cell-array-BWHkJX3I.mjs → as-cell-array-Bgc4GYZf.mjs} +1 -1
  6. package/dist/{as-cell-array-D-8Pqlgo.cjs → as-cell-array-CCZ0Ajj9.cjs} +1 -1
  7. package/dist/as-cell-array.cjs +1 -1
  8. package/dist/as-cell-array.mjs +1 -1
  9. package/dist/{as-cell-date-mGlnDeLP.mjs → as-cell-date-B9mu0OOD.mjs} +1 -1
  10. package/dist/{as-cell-date-DviMJEqs.cjs → as-cell-date-RU5JPJhI.cjs} +1 -1
  11. package/dist/as-cell-date.cjs +1 -1
  12. package/dist/as-cell-date.mjs +1 -1
  13. package/dist/{as-cell-json-2I081xnO.mjs → as-cell-json-ByEGYRST.mjs} +1 -1
  14. package/dist/{as-cell-json-CaVB6e7V.cjs → as-cell-json-w5YJxNuF.cjs} +1 -1
  15. package/dist/as-cell-json.cjs +1 -1
  16. package/dist/as-cell-json.mjs +1 -1
  17. package/dist/{as-cell-number-CP2AZI9g.mjs → as-cell-number-CNDT6gfw.mjs} +1 -1
  18. package/dist/{as-cell-number-BnYbxOiG.cjs → as-cell-number-DGJCTXDf.cjs} +1 -1
  19. package/dist/as-cell-number.cjs +1 -1
  20. package/dist/as-cell-number.mjs +1 -1
  21. package/dist/{as-cell-union-NHpDCXty.mjs → as-cell-union-DMnoa7RM.mjs} +2 -2
  22. package/dist/{as-cell-union-BjMP91PS.cjs → as-cell-union-LOGvhPeK.cjs} +2 -2
  23. package/dist/as-cell-union.cjs +1 -1
  24. package/dist/as-cell-union.mjs +1 -1
  25. package/dist/{as-column-menu-BMTS3DO2.mjs → as-column-menu-CBtUfYEE.mjs} +2 -2
  26. package/dist/{as-column-menu-D_8NxujZ.cjs → as-column-menu-ChB7hzmr.cjs} +1 -1
  27. package/dist/as-column-menu.cjs +1 -1
  28. package/dist/as-column-menu.d.cts +1 -1
  29. package/dist/as-column-menu.d.mts +1 -1
  30. package/dist/as-column-menu.mjs +1 -1
  31. package/dist/{as-column-menu.vue-olu6BNEU.d.cts → as-column-menu.vue-Cul3eIz_.d.cts} +1 -1
  32. package/dist/{as-column-menu.vue-DIuEvru6.d.mts → as-column-menu.vue-Dw2m8ZqD.d.mts} +1 -1
  33. package/dist/{as-config-dialog-DHdpmRo9.mjs → as-config-dialog-DrcYlrOh.mjs} +5 -5
  34. package/dist/{as-config-dialog-BrVhIV_e.cjs → as-config-dialog-j_-oUmN7.cjs} +4 -4
  35. package/dist/as-config-dialog.cjs +1 -1
  36. package/dist/as-config-dialog.mjs +1 -1
  37. package/dist/{as-confirm-dialog-iytk-urB.cjs → as-confirm-dialog-CStjIWN0.cjs} +1 -1
  38. package/dist/{as-confirm-dialog-BG5vlbvV.mjs → as-confirm-dialog-Pnt60ALy.mjs} +1 -1
  39. package/dist/as-confirm-dialog.cjs +1 -1
  40. package/dist/as-confirm-dialog.mjs +1 -1
  41. package/dist/{as-filter-dialog-DoynFox2.cjs → as-filter-dialog-B6_NvvlM.cjs} +14 -14
  42. package/dist/{as-filter-dialog-DAvtsH3d.mjs → as-filter-dialog-CUzahpd_.mjs} +15 -15
  43. package/dist/as-filter-dialog.cjs +1 -1
  44. package/dist/as-filter-dialog.mjs +1 -1
  45. package/dist/{as-filter-field-DB5WFT4l.mjs → as-filter-field-3DJh_ICs.mjs} +5 -6
  46. package/dist/{as-filter-field-CBMDjApB.cjs → as-filter-field-DCUMuu0M.cjs} +4 -5
  47. package/dist/as-filter-field.cjs +1 -1
  48. package/dist/as-filter-field.mjs +1 -1
  49. package/dist/as-filter-input.cjs +1 -1
  50. package/dist/as-filter-input.mjs +1 -1
  51. package/dist/{as-filters-CiPv-dKs.cjs → as-filters-CHLPYHNP.cjs} +3 -3
  52. package/dist/{as-filters-DfBH5YH9.mjs → as-filters-D0DWDyiv.mjs} +3 -3
  53. package/dist/as-filters.cjs +1 -1
  54. package/dist/as-filters.mjs +1 -1
  55. package/dist/{as-preset-dialog-C0f_6VxJ.mjs → as-preset-dialog-H98DeOMM.mjs} +3 -3
  56. package/dist/{as-preset-dialog-D8o2ChtM.cjs → as-preset-dialog-RLW0gZDj.cjs} +3 -3
  57. package/dist/as-preset-dialog.cjs +1 -1
  58. package/dist/as-preset-dialog.mjs +1 -1
  59. package/dist/{as-preset-picker-CDItDinB.mjs → as-preset-picker-Cw7LB7o1.mjs} +2 -2
  60. package/dist/{as-preset-picker-DonMQ8Ia.cjs → as-preset-picker-yWXEhWEq.cjs} +2 -2
  61. package/dist/as-preset-picker.cjs +1 -1
  62. package/dist/as-preset-picker.mjs +1 -1
  63. package/dist/{as-row-actions-B8YANdb4.mjs → as-row-actions-BvJWHf3j.mjs} +2 -2
  64. package/dist/{as-row-actions-CAiCfw8d.cjs → as-row-actions-D_TqnP3S.cjs} +2 -2
  65. package/dist/as-row-actions.cjs +1 -1
  66. package/dist/as-row-actions.d.cts +1 -1
  67. package/dist/as-row-actions.d.mts +1 -1
  68. package/dist/as-row-actions.mjs +1 -1
  69. package/dist/{as-row-actions.vue-DZrASzp7.d.mts → as-row-actions.vue-DxXodLGq.d.mts} +1 -1
  70. package/dist/{as-row-actions.vue-Cac2kfwO.d.cts → as-row-actions.vue-WRrzvdbJ.d.cts} +1 -1
  71. package/dist/{as-table-BNfZcSra.cjs → as-table-CVD1zLva.cjs} +8 -34
  72. package/dist/{as-table-DtfWLLlb.mjs → as-table-D5mMZKKg.mjs} +8 -34
  73. package/dist/{as-table-actions-z5xUWtvK.mjs → as-table-actions-C6moFlxt.mjs} +2 -2
  74. package/dist/{as-table-actions-8yf2QIER.cjs → as-table-actions-D91sNgel.cjs} +2 -2
  75. package/dist/as-table-actions.cjs +1 -1
  76. package/dist/as-table-actions.d.cts +1 -1
  77. package/dist/as-table-actions.d.mts +1 -1
  78. package/dist/as-table-actions.mjs +1 -1
  79. package/dist/{as-table-actions.vue-66cjnFZI.d.mts → as-table-actions.vue-CPVhj2ZC.d.mts} +2 -2
  80. package/dist/{as-table-actions.vue-B7ttOxKU.d.cts → as-table-actions.vue-DB3LW-eI.d.cts} +2 -2
  81. package/dist/{as-table-base-D7mO_Zmv.mjs → as-table-base-CEpvNFBd.mjs} +2 -2
  82. package/dist/{as-table-base-CdtyDOra.cjs → as-table-base-CyBOmUK9.cjs} +2 -2
  83. package/dist/{as-table-cell-value-BAi5yadc.cjs → as-table-cell-value-Ct0KnyKc.cjs} +1 -1
  84. package/dist/{as-table-cell-value-BVcfhhCb.mjs → as-table-cell-value-D1eLiQKJ.mjs} +1 -1
  85. package/dist/as-table-cell-value.cjs +1 -1
  86. package/dist/as-table-cell-value.mjs +1 -1
  87. package/dist/{as-table-header-cell-Cl8waY_g.mjs → as-table-header-cell-CUs-sSBm.mjs} +2 -2
  88. package/dist/{as-table-header-cell-CiRLNVJz.cjs → as-table-header-cell-D7pW2sV3.cjs} +2 -2
  89. package/dist/as-table-header-cell.cjs +1 -1
  90. package/dist/as-table-header-cell.d.cts +1 -1
  91. package/dist/as-table-header-cell.d.mts +1 -1
  92. package/dist/as-table-header-cell.mjs +1 -1
  93. package/dist/{as-table-header-cell.vue-DhCxDIn1.d.mts → as-table-header-cell.vue-BDhs3PNi.d.mts} +1 -1
  94. package/dist/{as-table-header-cell.vue-DmncmpeQ.d.cts → as-table-header-cell.vue-DFaRLZZA.d.cts} +1 -1
  95. package/dist/{as-table-root-Bza3ZGJZ.mjs → as-table-root-C61wrFd9.mjs} +15 -29
  96. package/dist/{as-table-root-C6a6iO6M.cjs → as-table-root-C7Tr_9W-.cjs} +16 -30
  97. package/dist/as-table-root.cjs +1 -1
  98. package/dist/as-table-root.d.cts +1 -1
  99. package/dist/as-table-root.d.mts +1 -1
  100. package/dist/as-table-root.mjs +1 -1
  101. package/dist/{as-table-root.vue-zWOmt_ug.d.mts → as-table-root.vue-Bza3D5F1.d.mts} +22 -5
  102. package/dist/{as-table-root.vue-BllmTRXj.d.cts → as-table-root.vue-D5Xyux8I.d.cts} +22 -5
  103. package/dist/{as-table-status-CbKmSKAy.cjs → as-table-status-B-MjDXNZ.cjs} +5 -5
  104. package/dist/{as-table-status-D9YuoBOm.mjs → as-table-status-D08b0cqn.mjs} +5 -5
  105. package/dist/as-table.cjs +1 -1
  106. package/dist/as-table.d.cts +1 -1
  107. package/dist/as-table.d.mts +1 -1
  108. package/dist/as-table.mjs +1 -1
  109. package/dist/{as-table.vue-Cd1Hc5v9.d.mts → as-table.vue-BuZGgKuM.d.cts} +5 -5
  110. package/dist/{as-table.vue-Bzp4UOqz.d.cts → as-table.vue-CPfERNtx.d.mts} +5 -5
  111. package/dist/{as-window-table-OB4B1knU.cjs → as-window-table-BfSud7yB.cjs} +30 -13
  112. package/dist/{as-window-table-D5grrLFG.mjs → as-window-table-CjYMF0aX.mjs} +30 -13
  113. package/dist/as-window-table.cjs +1 -1
  114. package/dist/as-window-table.d.cts +1 -1
  115. package/dist/as-window-table.d.mts +1 -1
  116. package/dist/as-window-table.mjs +1 -1
  117. package/dist/{as-window-table.vue-CcDoghqs.d.mts → as-window-table.vue-3egLvwAy.d.mts} +15 -2
  118. package/dist/{as-window-table.vue-Db--CSWD.d.cts → as-window-table.vue-BIjQuSie.d.cts} +15 -2
  119. package/dist/index.cjs +40 -41
  120. package/dist/index.d.cts +8 -8
  121. package/dist/index.d.mts +8 -8
  122. package/dist/index.mjs +41 -42
  123. package/dist/{types-CuOHiH-S.d.mts → types-B6N5NDx_.d.cts} +27 -11
  124. package/dist/{types-n40LWFm_.d.cts → types-CgdpcJdd.d.mts} +27 -11
  125. package/dist/{use-table-DRN4nlZs.mjs → use-table-DUwUfjSZ.mjs} +3 -2
  126. package/dist/{use-table-JU7BAX4e.cjs → use-table-c4ku22Mx.cjs} +3 -2
  127. package/dist/use-table-column-handlers-Do0Z-R9D.cjs +96 -0
  128. package/dist/use-table-column-handlers-eKHCfUm_.mjs +85 -0
  129. package/dist/{use-table-component-DIWiP_Vs.cjs → use-table-component-DbQDINoa.cjs} +1 -1
  130. package/dist/{use-table-component-VUFlxIk-.mjs → use-table-component-wfU13P3L.mjs} +1 -1
  131. package/dist/{use-table-nav-bridge-BBtXE70x.cjs → use-table-nav-bridge-BLLVGR1r.cjs} +1 -1
  132. package/dist/{use-table-nav-bridge-DT8oU-6r.mjs → use-table-nav-bridge-DRrvQxXq.mjs} +1 -1
  133. package/dist/{use-table-state-CqU1N4Q9.mjs → use-table-state-BEwXQayO.mjs} +53 -7
  134. package/dist/{use-table-state-CoVe_8NI.cjs → use-table-state-Cnxv0w_E.cjs} +57 -5
  135. package/package.json +7 -7
  136. package/dist/use-table-column-handlers-BMrP0WY2.cjs +0 -45
  137. package/dist/use-table-column-handlers-Bx3JERqs.mjs +0 -40
  138. /package/dist/{as-cell-json-popover-vty5vMjW.cjs → as-cell-json-popover-BM2QLgfk.cjs} +0 -0
  139. /package/dist/{as-cell-json-popover-CH5bAcLE.mjs → as-cell-json-popover-Dkdv5Y9E.mjs} +0 -0
  140. /package/dist/{as-filter-input-C8KmOus8.mjs → as-filter-input-BM23TNeh.mjs} +0 -0
  141. /package/dist/{as-filter-input-DUqpkTkg.cjs → as-filter-input-DJu2k9gO.cjs} +0 -0
  142. /package/dist/{error-message-CfKpn_5w.cjs → error-message-CglODWl4.cjs} +0 -0
  143. /package/dist/{error-message-gNEXnnbb.mjs → error-message-hPSAu8Ug.mjs} +0 -0
  144. /package/dist/{format-cell-Bx7wNc4X.mjs → format-cell-D1Ziv96Q.mjs} +0 -0
  145. /package/dist/{format-cell-DaxV6WIJ.cjs → format-cell-vCNTh4WZ.cjs} +0 -0
  146. /package/dist/{use-cell-locale-caG2Fzpc.cjs → use-cell-locale-BGBRQB7s.cjs} +0 -0
  147. /package/dist/{use-cell-locale-CxQOQsns.mjs → use-cell-locale-MQXoONh5.mjs} +0 -0
  148. /package/dist/{use-seed-on-open-DSh4XFyp.mjs → use-seed-on-open-DO3A1kIb.mjs} +0 -0
  149. /package/dist/{use-seed-on-open-9TSm1Vbv.cjs → use-seed-on-open-Dg9I89fU.cjs} +0 -0
@@ -1,10 +1,10 @@
1
- import { C as TVueTableActionInfo, S as TAsTableControls, T as TableNavBridge, a as ConfirmOptions, d as PresetConfig, m as RowActionsConfig, p as ReactiveTableState, t as ActionResult, u as NavKeyOptions, w as TableActionsState, x as TAsCellTypeComponents } from "./types-CuOHiH-S.mjs";
1
+ import { C as TAsTableControls, E as TableNavBridge, S as TAsCellTypeComponents, T as TableActionsState, a as ConfirmOptions, d as PresetConfig, h as RowActionsConfig, p as ReactiveTableState, t as ActionResult, u as NavKeyOptions, w as TVueTableActionInfo } from "./types-CgdpcJdd.mjs";
2
2
  import * as _atscript_ui0 from "@atscript/ui";
3
3
  import { ClientFactory, ClientFactory as ClientFactory$1, ColumnDef, SortControl, TableDef, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
4
4
  import * as vue from "vue";
5
5
  import { AllowedComponentProps, AnchorHTMLAttributes, App, Component as Component$1, ComponentCustomProps, ComponentPublicInstance, ComputedRef, DefineComponent, InjectionKey, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, UnwrapRef, VNode, VNodeProps, WritableComputedRef } from "vue";
6
6
  import * as _atscript_ui_table0 from "@atscript/ui-table";
7
- import { AppConfData, AppConfData as AppConfData$1, AsPresetEntryRow, AsPresetEntryRow as AsPresetEntryRow$1, ColumnWidthsMap, CsvOptions, CsvOptions as CsvOptions$1, DisplayColumnDef, DisplayColumnDef as DisplayColumnDef$1, ExportAbortError, ExportScalar, ExportScalar as ExportScalar$1, FilterCondition, PRESET_ASPECTS, PresetAspect, PresetAspect as PresetAspect$1, PresetCapabilities, PresetCapabilities as PresetCapabilities$1, PresetData, PresetDraft, PresetSnapshot, PresetSnapshot as PresetSnapshot$1, PresetSnapshotWire, QueryOptions, STANDARD_PRESET_ID as STANDARD_PRESET_ID$1, SYSTEM_PRESET_PREFIX, SelectionMode, SystemPreset, SystemPreset as SystemPreset$1, SystemPresetInput, SystemPresetInput as SystemPresetInput$1, UrlQuerySync, UrlQuerySync as UrlQuerySync$1, UserConfData, isSystemPresetId as isSystemPresetId$1, resolveSystemPresets as resolveSystemPresets$1 } from "@atscript/ui-table";
7
+ import { AppConfData, AppConfData as AppConfData$1, AsPresetEntryRow, AsPresetEntryRow as AsPresetEntryRow$1, ColumnWidthsMap, CsvOptions, CsvOptions as CsvOptions$1, DisplayColumnDef, DisplayColumnDef as DisplayColumnDef$1, ExportAbortError, ExportScalar, ExportScalar as ExportScalar$1, FilterCondition, PRESET_ASPECTS, PresetAspect, PresetAspect as PresetAspect$1, PresetCapabilities, PresetCapabilities as PresetCapabilities$1, PresetData, PresetDraft, PresetSnapshot, PresetSnapshot as PresetSnapshot$1, PresetSnapshotWire, QueryOptions, STANDARD_PRESET_ID as STANDARD_PRESET_ID$1, SYSTEM_PRESET_PREFIX, SelectionMode, SystemPreset, SystemPreset as SystemPreset$1, SystemPresetInput, SystemPresetInput as SystemPresetInput$1, UnsupportedFilter, UrlQuerySync, UrlQuerySync as UrlQuerySync$1, UserConfData, isSystemPresetId as isSystemPresetId$1, resolveSystemPresets as resolveSystemPresets$1 } from "@atscript/ui-table";
8
8
  import { Client, PageResult } from "@atscript/db-client";
9
9
  import { TAsTypeComponents } from "@atscript/vue-form";
10
10
  import { FilterExpr, Uniquery } from "@uniqu/core";
@@ -278,6 +278,14 @@ interface TableQueryOptions {
278
278
  * behaviour). Static — captured at setup; to change sync, re-mount.
279
279
  */
280
280
  urlQuerySync?: UrlQuerySync;
281
+ /**
282
+ * Receives each piece of a restored URL's filter that field filters cannot
283
+ * express (a cross-field OR, an unknown operator, …) and that was left out
284
+ * of the restored state — the table then shows a broader result than the
285
+ * link described. When omitted, each one is reported with a dev-mode
286
+ * `console.warn`. Since 0.1.139.
287
+ */
288
+ onUnsupportedFilter?: (issue: UnsupportedFilter) => void;
281
289
  }
282
290
  interface TableWindowOptions {
283
291
  /** Page-alignment unit for `loadRange` and the `queryNext` extension. */
@@ -543,6 +551,12 @@ interface UseTableOptions {
543
551
  * Default (omitted): full sync.
544
552
  */
545
553
  urlQuerySync?: UrlQuerySync;
554
+ /**
555
+ * Receives each piece of a restored URL's filter that was left out because
556
+ * field filters cannot express it — see `TableQueryOptions.onUnsupportedFilter`.
557
+ * Since 0.1.139.
558
+ */
559
+ onUnsupportedFilter?: (issue: UnsupportedFilter) => void;
546
560
  /**
547
561
  * Preset feature config — opt-in. Omit to disable presets entirely
548
562
  * (`<AsPresetPicker>` / `<AsPresetDialog>` render nothing). When set,
@@ -2176,7 +2190,8 @@ interface UseTableUrlQueryOptions {
2176
2190
  * write therefore agree in both directions: a key the parser ignores (a host
2177
2191
  * flag, an unrecognised `$control`) is never removed, and a key the parser
2178
2192
  * reads is the bridge's to remove. Every write merges into the current
2179
- * `route.query`, in place.
2193
+ * `route.query`: foreign keys stay where they are, the table's own keys are
2194
+ * written as one block in the table's order.
2180
2195
  *
2181
2196
  * Without a `prefix` the bridge cannot tell a plain `field=value` filter from
2182
2197
  * a page-owned flag of the same shape, so a plain key that was already in the
@@ -2525,10 +2540,13 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2525
2540
  "update:selectedRows": (value: unknown[]) => any;
2526
2541
  "update:urlQuery": (value: string | undefined) => any;
2527
2542
  } & {
2528
- "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2529
2543
  action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any;
2544
+ "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2545
+ "unsupported-filter": (issue: UnsupportedFilter) => any;
2530
2546
  }, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
2547
+ onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2531
2548
  "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
2549
+ "onUnsupported-filter"?: ((issue: UnsupportedFilter) => any) | undefined;
2532
2550
  "onUpdate:filterFields"?: ((value: string[]) => any) | undefined;
2533
2551
  "onUpdate:columnNames"?: ((value: string[]) => any) | undefined;
2534
2552
  "onUpdate:columnWidths"?: ((value: ColumnWidthsMap) => any) | undefined;
@@ -2536,7 +2554,6 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2536
2554
  "onUpdate:ignoreSortersWhenSearched"?: ((value: boolean) => any) | undefined;
2537
2555
  "onUpdate:selectedRows"?: ((value: unknown[]) => any) | undefined;
2538
2556
  "onUpdate:urlQuery"?: ((value: string | undefined) => any) | undefined;
2539
- onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2540
2557
  }>, {
2541
2558
  localSort: boolean;
2542
2559
  queryOnMount: boolean;
@@ -1,4 +1,4 @@
1
- import { C as TVueTableActionInfo, S as TAsTableControls, T as TableNavBridge, a as ConfirmOptions, d as PresetConfig, m as RowActionsConfig, p as ReactiveTableState, t as ActionResult, u as NavKeyOptions, w as TableActionsState, x as TAsCellTypeComponents } from "./types-n40LWFm_.cjs";
1
+ import { C as TAsTableControls, E as TableNavBridge, S as TAsCellTypeComponents, T as TableActionsState, a as ConfirmOptions, d as PresetConfig, h as RowActionsConfig, p as ReactiveTableState, t as ActionResult, u as NavKeyOptions, w as TVueTableActionInfo } from "./types-B6N5NDx_.cjs";
2
2
  import * as vue from "vue";
3
3
  import { AllowedComponentProps, AnchorHTMLAttributes, App, Component as Component$1, ComponentCustomProps, ComponentPublicInstance, ComputedRef, DefineComponent, InjectionKey, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, UnwrapRef, VNode, VNodeProps, WritableComputedRef } from "vue";
4
4
  import { Client, PageResult } from "@atscript/db-client";
@@ -6,7 +6,7 @@ import { FilterExpr, Uniquery } from "@uniqu/core";
6
6
  import * as _atscript_ui0 from "@atscript/ui";
7
7
  import { ClientFactory, ClientFactory as ClientFactory$1, ColumnDef, SortControl, TableDef, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
8
8
  import * as _atscript_ui_table0 from "@atscript/ui-table";
9
- import { AppConfData, AppConfData as AppConfData$1, AsPresetEntryRow, AsPresetEntryRow as AsPresetEntryRow$1, ColumnWidthsMap, CsvOptions, CsvOptions as CsvOptions$1, DisplayColumnDef, DisplayColumnDef as DisplayColumnDef$1, ExportAbortError, ExportScalar, ExportScalar as ExportScalar$1, FilterCondition, PRESET_ASPECTS, PresetAspect, PresetAspect as PresetAspect$1, PresetCapabilities, PresetCapabilities as PresetCapabilities$1, PresetData, PresetDraft, PresetSnapshot, PresetSnapshot as PresetSnapshot$1, PresetSnapshotWire, QueryOptions, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionMode, SystemPreset, SystemPreset as SystemPreset$1, SystemPresetInput, SystemPresetInput as SystemPresetInput$1, UrlQuerySync, UrlQuerySync as UrlQuerySync$1, UserConfData, isSystemPresetId, resolveSystemPresets } from "@atscript/ui-table";
9
+ import { AppConfData, AppConfData as AppConfData$1, AsPresetEntryRow, AsPresetEntryRow as AsPresetEntryRow$1, ColumnWidthsMap, CsvOptions, CsvOptions as CsvOptions$1, DisplayColumnDef, DisplayColumnDef as DisplayColumnDef$1, ExportAbortError, ExportScalar, ExportScalar as ExportScalar$1, FilterCondition, PRESET_ASPECTS, PresetAspect, PresetAspect as PresetAspect$1, PresetCapabilities, PresetCapabilities as PresetCapabilities$1, PresetData, PresetDraft, PresetSnapshot, PresetSnapshot as PresetSnapshot$1, PresetSnapshotWire, QueryOptions, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionMode, SystemPreset, SystemPreset as SystemPreset$1, SystemPresetInput, SystemPresetInput as SystemPresetInput$1, UnsupportedFilter, UrlQuerySync, UrlQuerySync as UrlQuerySync$1, UserConfData, isSystemPresetId, resolveSystemPresets } from "@atscript/ui-table";
10
10
  import { TAsTypeComponents } from "@atscript/vue-form";
11
11
 
12
12
  //#region src/composables/state/create-selection.d.ts
@@ -278,6 +278,14 @@ interface TableQueryOptions {
278
278
  * behaviour). Static — captured at setup; to change sync, re-mount.
279
279
  */
280
280
  urlQuerySync?: UrlQuerySync;
281
+ /**
282
+ * Receives each piece of a restored URL's filter that field filters cannot
283
+ * express (a cross-field OR, an unknown operator, …) and that was left out
284
+ * of the restored state — the table then shows a broader result than the
285
+ * link described. When omitted, each one is reported with a dev-mode
286
+ * `console.warn`. Since 0.1.139.
287
+ */
288
+ onUnsupportedFilter?: (issue: UnsupportedFilter) => void;
281
289
  }
282
290
  interface TableWindowOptions {
283
291
  /** Page-alignment unit for `loadRange` and the `queryNext` extension. */
@@ -543,6 +551,12 @@ interface UseTableOptions {
543
551
  * Default (omitted): full sync.
544
552
  */
545
553
  urlQuerySync?: UrlQuerySync;
554
+ /**
555
+ * Receives each piece of a restored URL's filter that was left out because
556
+ * field filters cannot express it — see `TableQueryOptions.onUnsupportedFilter`.
557
+ * Since 0.1.139.
558
+ */
559
+ onUnsupportedFilter?: (issue: UnsupportedFilter) => void;
546
560
  /**
547
561
  * Preset feature config — opt-in. Omit to disable presets entirely
548
562
  * (`<AsPresetPicker>` / `<AsPresetDialog>` render nothing). When set,
@@ -2176,7 +2190,8 @@ interface UseTableUrlQueryOptions {
2176
2190
  * write therefore agree in both directions: a key the parser ignores (a host
2177
2191
  * flag, an unrecognised `$control`) is never removed, and a key the parser
2178
2192
  * reads is the bridge's to remove. Every write merges into the current
2179
- * `route.query`, in place.
2193
+ * `route.query`: foreign keys stay where they are, the table's own keys are
2194
+ * written as one block in the table's order.
2180
2195
  *
2181
2196
  * Without a `prefix` the bridge cannot tell a plain `field=value` filter from
2182
2197
  * a page-owned flag of the same shape, so a plain key that was already in the
@@ -2525,10 +2540,13 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2525
2540
  "update:selectedRows": (value: unknown[]) => any;
2526
2541
  "update:urlQuery": (value: string | undefined) => any;
2527
2542
  } & {
2528
- "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2529
2543
  action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any;
2544
+ "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2545
+ "unsupported-filter": (issue: UnsupportedFilter) => any;
2530
2546
  }, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
2547
+ onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2531
2548
  "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
2549
+ "onUnsupported-filter"?: ((issue: UnsupportedFilter) => any) | undefined;
2532
2550
  "onUpdate:filterFields"?: ((value: string[]) => any) | undefined;
2533
2551
  "onUpdate:columnNames"?: ((value: string[]) => any) | undefined;
2534
2552
  "onUpdate:columnWidths"?: ((value: ColumnWidthsMap) => any) | undefined;
@@ -2536,7 +2554,6 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2536
2554
  "onUpdate:ignoreSortersWhenSearched"?: ((value: boolean) => any) | undefined;
2537
2555
  "onUpdate:selectedRows"?: ((value: unknown[]) => any) | undefined;
2538
2556
  "onUpdate:urlQuery"?: ((value: string | undefined) => any) | undefined;
2539
- onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2540
2557
  }>, {
2541
2558
  localSort: boolean;
2542
2559
  queryOnMount: boolean;
@@ -1,8 +1,8 @@
1
- const require_use_table_state = require("./use-table-state-CoVe_8NI.cjs");
2
- const require_use_table_component = require("./use-table-component-DIWiP_Vs.cjs");
3
- const require_as_table_header_cell = require("./as-table-header-cell-CiRLNVJz.cjs");
4
- const require_as_row_actions = require("./as-row-actions-CAiCfw8d.cjs");
5
- const require_as_table_cell_value = require("./as-table-cell-value-BAi5yadc.cjs");
1
+ const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
2
+ const require_use_table_component = require("./use-table-component-DbQDINoa.cjs");
3
+ const require_as_table_header_cell = require("./as-table-header-cell-D7pW2sV3.cjs");
4
+ const require_as_row_actions = require("./as-row-actions-D_TqnP3S.cjs");
5
+ const require_as_table_cell_value = require("./as-table-cell-value-Ct0KnyKc.cjs");
6
6
  let _atscript_ui = require("@atscript/ui");
7
7
  let vue = require("vue");
8
8
  //#region src/composables/use-cell-resolver.ts
@@ -1,8 +1,8 @@
1
- import { o as useTableContextOptional } from "./use-table-state-CqU1N4Q9.mjs";
2
- import { t as useTableComponent } from "./use-table-component-VUFlxIk-.mjs";
3
- import { t as as_table_header_cell_default } from "./as-table-header-cell-Cl8waY_g.mjs";
4
- import { t as as_row_actions_default } from "./as-row-actions-B8YANdb4.mjs";
5
- import { t as as_table_cell_value_default } from "./as-table-cell-value-BVcfhhCb.mjs";
1
+ import { o as useTableContextOptional } from "./use-table-state-BEwXQayO.mjs";
2
+ import { t as useTableComponent } from "./use-table-component-wfU13P3L.mjs";
3
+ import { t as as_table_header_cell_default } from "./as-table-header-cell-CUs-sSBm.mjs";
4
+ import { t as as_row_actions_default } from "./as-row-actions-BvJWHf3j.mjs";
5
+ import { t as as_table_cell_value_default } from "./as-table-cell-value-D1eLiQKJ.mjs";
6
6
  import { UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_FN_ATTR, UI_TABLE_FN_CLASSES, UI_TABLE_FN_STYLES, UI_TABLE_STYLES, getFieldMeta, parseStaticAttrs, resolveAttrs, resolveFieldProp } from "@atscript/ui";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, withModifiers } from "vue";
8
8
  //#region src/composables/use-cell-resolver.ts
package/dist/as-table.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_table = require("./as-table-BNfZcSra.cjs");
1
+ const require_as_table = require("./as-table-CVD1zLva.cjs");
2
2
  module.exports = require_as_table.as_table_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table.vue-Bzp4UOqz.cjs";
1
+ import { t as _default } from "./as-table.vue-BuZGgKuM.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table.vue-Cd1Hc5v9.mjs";
1
+ import { t as _default } from "./as-table.vue-CPfERNtx.mjs";
2
2
  export { _default as default };
package/dist/as-table.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_table_default } from "./as-table-DtfWLLlb.mjs";
1
+ import { t as as_table_default } from "./as-table-D5mMZKKg.mjs";
2
2
  export { as_table_default as default };
@@ -1,6 +1,6 @@
1
- import { _ as RowDeleteOpt, g as RowClassHook, h as RowAttrsHook, r as ColumnMenuConfig, y as RowSelectableHook } from "./types-CuOHiH-S.mjs";
2
- import { ColumnDef } from "@atscript/ui";
1
+ import { _ as RowClassHook, b as RowSelectableHook, g as RowAttrsHook, m as RowActionsColumnPlacement, r as ColumnMenuConfig, v as RowDeleteOpt } from "./types-B6N5NDx_.cjs";
3
2
  import * as vue from "vue";
3
+ import { ColumnDef } from "@atscript/ui";
4
4
  import { SelectionMode } from "@atscript/ui-table";
5
5
 
6
6
  //#region src/components/as-table.vue.d.ts
@@ -46,7 +46,7 @@ type __VLS_Props = {
46
46
  * Wrapper-only prop — not forwarded by `<AsTableRoot>`. Raw consumers
47
47
  * compose their own column layout.
48
48
  */
49
- rowActionsColumn?: "first" | "last" | "merge-select" | false;
49
+ rowActionsColumn?: RowActionsColumnPlacement | false;
50
50
  /**
51
51
  * Render without a header row. Omits `<thead>` entirely (not
52
52
  * `display:none`); column widths are carried by the `<colgroup>`, so data
@@ -92,14 +92,14 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.C
92
92
  "onRow-dblclick"?: ((row: Record<string, unknown>, event: MouseEvent) => any) | undefined;
93
93
  "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
94
94
  }>, {
95
+ select: SelectionMode;
95
96
  stickyHeader: boolean;
96
97
  virtualOverscan: number;
97
98
  reorderable: boolean;
98
99
  resizable: boolean;
99
100
  columnMinWidth: number;
100
- select: SelectionMode;
101
101
  rowDelete: boolean | RowDeleteOpt;
102
- rowActionsColumn: "first" | "last" | "merge-select" | false;
102
+ rowActionsColumn: RowActionsColumnPlacement | false;
103
103
  headless: boolean;
104
104
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
105
105
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,6 +1,6 @@
1
- import { _ as RowDeleteOpt, g as RowClassHook, h as RowAttrsHook, r as ColumnMenuConfig, y as RowSelectableHook } from "./types-n40LWFm_.cjs";
2
- import * as vue from "vue";
1
+ import { _ as RowClassHook, b as RowSelectableHook, g as RowAttrsHook, m as RowActionsColumnPlacement, r as ColumnMenuConfig, v as RowDeleteOpt } from "./types-CgdpcJdd.mjs";
3
2
  import { ColumnDef } from "@atscript/ui";
3
+ import * as vue from "vue";
4
4
  import { SelectionMode } from "@atscript/ui-table";
5
5
 
6
6
  //#region src/components/as-table.vue.d.ts
@@ -46,7 +46,7 @@ type __VLS_Props = {
46
46
  * Wrapper-only prop — not forwarded by `<AsTableRoot>`. Raw consumers
47
47
  * compose their own column layout.
48
48
  */
49
- rowActionsColumn?: "first" | "last" | "merge-select" | false;
49
+ rowActionsColumn?: RowActionsColumnPlacement | false;
50
50
  /**
51
51
  * Render without a header row. Omits `<thead>` entirely (not
52
52
  * `display:none`); column widths are carried by the `<colgroup>`, so data
@@ -92,14 +92,14 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.C
92
92
  "onRow-dblclick"?: ((row: Record<string, unknown>, event: MouseEvent) => any) | undefined;
93
93
  "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
94
94
  }>, {
95
+ select: SelectionMode;
95
96
  stickyHeader: boolean;
96
97
  virtualOverscan: number;
97
98
  reorderable: boolean;
98
99
  resizable: boolean;
99
100
  columnMinWidth: number;
100
- select: SelectionMode;
101
101
  rowDelete: boolean | RowDeleteOpt;
102
- rowActionsColumn: "first" | "last" | "merge-select" | false;
102
+ rowActionsColumn: RowActionsColumnPlacement | false;
103
103
  headless: boolean;
104
104
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
105
105
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,9 +1,9 @@
1
- const require_use_table_state = require("./use-table-state-CoVe_8NI.cjs");
1
+ const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
2
2
  const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
3
3
  const require_use_table_selection = require("./use-table-selection-DtCV3rhu.cjs");
4
4
  const require_use_has_emit_listener = require("./use-has-emit-listener-BaGFZDyM.cjs");
5
- const require_as_table_status = require("./as-table-status-CbKmSKAy.cjs");
6
- const require_use_table_column_handlers = require("./use-table-column-handlers-BMrP0WY2.cjs");
5
+ const require_use_table_column_handlers = require("./use-table-column-handlers-Do0Z-R9D.cjs");
6
+ const require_as_table_status = require("./as-table-status-B-MjDXNZ.cjs");
7
7
  let vue = require("vue");
8
8
  let _atscript_ui_table = require("@atscript/ui-table");
9
9
  let _vueuse_core = require("@vueuse/core");
@@ -208,6 +208,10 @@ const _hoisted_8 = {
208
208
  var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
209
209
  __name: "as-window-table-base",
210
210
  props: {
211
+ columns: {
212
+ type: Array,
213
+ required: false
214
+ },
211
215
  rowHeight: {
212
216
  type: Number,
213
217
  required: true
@@ -270,8 +274,9 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
270
274
  const slots = (0, vue.useSlots)();
271
275
  const { state } = require_use_table_state.useTableContext();
272
276
  const { resolve: cellResolver, hasAnyCellBindings } = require_as_table_status.useCellResolver(() => state.tableDef.value);
273
- const cellComponents = require_as_table_status.useCellComponents(() => state.columns.value);
274
- const headerColumns = (0, vue.computed)(() => state.localSortAvailable.value ? state.columns.value : state.columns.value.map((c) => c.local && c.sortable ? {
277
+ const columns = (0, vue.computed)(() => props.columns ?? state.columns.value);
278
+ const cellComponents = require_as_table_status.useCellComponents(() => columns.value);
279
+ const headerColumns = (0, vue.computed)(() => state.localSortAvailable.value ? columns.value : columns.value.map((c) => c.local && c.sortable ? {
275
280
  ...c,
276
281
  sortable: false
277
282
  } : c));
@@ -283,7 +288,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
283
288
  });
284
289
  const cellSlotFlags = (0, vue.computed)(() => {
285
290
  const out = {};
286
- for (const c of state.columns.value) out[c.path] = !!slots[`cell-${c.path}`];
291
+ for (const c of columns.value) out[c.path] = !!slots[`cell-${c.path}`];
287
292
  return out;
288
293
  });
289
294
  const rowStyle = (0, vue.computed)(() => ({ height: `${props.rowHeight}px` }));
@@ -456,7 +461,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
456
461
  (0, vue.onMounted)(() => {
457
462
  (0, vue.nextTick)(() => recompute());
458
463
  });
459
- (0, vue.watch)(() => [props.rowHeight, state.columns.value], scheduleRecompute);
464
+ (0, vue.watch)(() => [props.rowHeight, columns.value], scheduleRecompute);
460
465
  return (_ctx, _cache) => {
461
466
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$1, [(0, vue.createElementVNode)("div", {
462
467
  ref_key: "wrapperRef",
@@ -470,7 +475,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
470
475
  "aria-multiselectable": __props.select === "multi" ? "true" : void 0
471
476
  }, [
472
477
  (0, vue.createVNode)(require_as_table_status.as_table_colgroup_default, {
473
- columns: (0, vue.unref)(state).columns.value,
478
+ columns: columns.value,
474
479
  "column-widths": (0, vue.unref)(state).columnWidths.value,
475
480
  "has-select": hasValue.value,
476
481
  "with-filler": true
@@ -502,7 +507,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
502
507
  onReorder: (0, vue.unref)(onReorder),
503
508
  onResize: (0, vue.unref)(state).setColumnWidth,
504
509
  onSelectAllToggle
505
- }, (0, vue.createSlots)({ _: 2 }, [(0, vue.renderList)((0, vue.unref)(state).columns.value, (col) => {
510
+ }, (0, vue.createSlots)({ _: 2 }, [(0, vue.renderList)(columns.value, (col) => {
506
511
  return {
507
512
  name: `header-${col.path}`,
508
513
  fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, `header-${col.path}`, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))])
@@ -569,7 +574,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
569
574
  "aria-disabled": slot.selectable.ok ? void 0 : "true",
570
575
  onKeydown: ($event) => onSelectCellKeydown($event, (0, vue.unref)(state).topIndex.value + slot.s)
571
576
  }, [slot.selected ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_7)) : (0, vue.createCommentVNode)("v-if", true)], 42, _hoisted_6)])) : (0, vue.createCommentVNode)("v-if", true),
572
- (0, vue.unref)(hasAnyCellBindings) ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, (0, vue.renderList)((0, vue.unref)(state).columns.value, (col) => {
577
+ (0, vue.unref)(hasAnyCellBindings) ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, (0, vue.renderList)(columns.value, (col) => {
573
578
  return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: col.path }, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)([(0, vue.unref)(cellResolver)(col, slot.row, (0, vue.unref)(state).topIndex.value + slot.s)], (bindings) => {
574
579
  return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", (0, vue.mergeProps)({
575
580
  key: 0,
@@ -585,7 +590,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
585
590
  role: "gridcell"
586
591
  }, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
587
592
  }), 128))], 64);
588
- }), 128)) : ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, (0, vue.renderList)((0, vue.unref)(state).columns.value, (col) => {
593
+ }), 128)) : ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, (0, vue.renderList)(columns.value, (col) => {
589
594
  return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", _hoisted_8, [(0, vue.renderSlot)(_ctx.$slots, `cell-${col.path}`, {
590
595
  row: slot.row,
591
596
  value: (0, vue.unref)(require_get_cell_value.getCellValue)(slot.row, col.path),
@@ -603,7 +608,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
603
608
  }, null, -1))
604
609
  ], 16, _hoisted_4)) : ((0, vue.openBlock)(), (0, vue.createBlock)(as_window_skeleton_row_default, {
605
610
  key: 1,
606
- columns: (0, vue.unref)(state).columns.value,
611
+ columns: columns.value,
607
612
  "row-height": __props.rowHeight,
608
613
  "has-select": hasValue.value,
609
614
  errored: slot.errored
@@ -620,7 +625,7 @@ var as_window_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
620
625
  "query-error": (0, vue.unref)(state).queryError.value,
621
626
  "is-empty": (0, vue.unref)(state).totalCount.value === 0,
622
627
  querying: (0, vue.unref)(state).querying.value,
623
- columns: (0, vue.unref)(state).columns.value,
628
+ columns: columns.value,
624
629
  "search-term": (0, vue.unref)(state).searchTerm.value,
625
630
  "has-active-filters": hasActiveFilters.value,
626
631
  "on-clear-filters": (0, vue.unref)(onClearFilters),
@@ -718,6 +723,11 @@ var as_window_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
718
723
  required: false,
719
724
  default: false
720
725
  },
726
+ rowActionsColumn: {
727
+ type: [String, Boolean],
728
+ required: false,
729
+ default: false
730
+ },
721
731
  headless: {
722
732
  type: Boolean,
723
733
  required: false,
@@ -753,6 +763,11 @@ var as_window_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
753
763
  state.rowSelectable.value = val;
754
764
  }, { immediate: true });
755
765
  require_use_table_selection.useSelectModeReset(state, () => props.select);
766
+ const effectiveColumns = require_use_table_column_handlers.useRowActionsColumn(state, {
767
+ placement: () => props.rowActionsColumn,
768
+ select: () => props.select,
769
+ columns: () => state.columns.value
770
+ });
756
771
  require_use_table_state.useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), require_use_has_emit_listener.useHasEmitListener("onMainAction"));
757
772
  const containerRef = (0, vue.ref)(null);
758
773
  function onMetrics({ fits, rowHeightPx, chromePx }) {
@@ -779,6 +794,7 @@ var as_window_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
779
794
  ref: containerRef,
780
795
  class: "as-table-outer-wrap"
781
796
  }, [(0, vue.createVNode)(as_window_table_base_default, {
797
+ columns: (0, vue.unref)(effectiveColumns),
782
798
  "row-height": __props.rowHeight,
783
799
  "wheel-rows-per-tick": __props.wheelRowsPerTick,
784
800
  "column-menu": __props.columnMenu,
@@ -799,6 +815,7 @@ var as_window_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
799
815
  fn: (0, vue.withCtx)((slotProps) => [(0, vue.renderSlot)(_ctx.$slots, name, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(slotProps ?? {})))])
800
816
  };
801
817
  })]), 1032, [
818
+ "columns",
802
819
  "row-height",
803
820
  "wheel-rows-per-tick",
804
821
  "column-menu",
@@ -1,9 +1,9 @@
1
- import { a as useTableContext, i as useRegisterMainActionListener, p as onSelectControlKeydown } from "./use-table-state-CqU1N4Q9.mjs";
1
+ import { a as useTableContext, i as useRegisterMainActionListener, m as onSelectControlKeydown } from "./use-table-state-BEwXQayO.mjs";
2
2
  import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
3
3
  import { t as useSelectModeReset } from "./use-table-selection-ULbKT2xW.mjs";
4
4
  import { t as useHasEmitListener } from "./use-has-emit-listener-DrBbsLHQ.mjs";
5
- import { a as useCellComponents, i as useRafBatch, n as as_table_header_default, o as useCellResolver, r as as_table_colgroup_default, t as as_table_status_default } from "./as-table-status-D9YuoBOm.mjs";
6
- import { t as useTableColumnHandlers } from "./use-table-column-handlers-Bx3JERqs.mjs";
5
+ import { n as useRowActionsColumn, t as useTableColumnHandlers } from "./use-table-column-handlers-eKHCfUm_.mjs";
6
+ import { a as useCellComponents, i as useRafBatch, n as as_table_header_default, o as useCellResolver, r as as_table_colgroup_default, t as as_table_status_default } from "./as-table-status-D08b0cqn.mjs";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, watch, withCtx, withModifiers } from "vue";
8
8
  import { DEFAULT_ROW_HEIGHT_PX, clampTopIndex, filledFilterCount } from "@atscript/ui-table";
9
9
  import { useElementSize, useResizeObserver } from "@vueuse/core";
@@ -208,6 +208,10 @@ const _hoisted_8 = {
208
208
  var as_window_table_base_default = /* @__PURE__ */ defineComponent({
209
209
  __name: "as-window-table-base",
210
210
  props: {
211
+ columns: {
212
+ type: Array,
213
+ required: false
214
+ },
211
215
  rowHeight: {
212
216
  type: Number,
213
217
  required: true
@@ -270,8 +274,9 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
270
274
  const slots = useSlots();
271
275
  const { state } = useTableContext();
272
276
  const { resolve: cellResolver, hasAnyCellBindings } = useCellResolver(() => state.tableDef.value);
273
- const cellComponents = useCellComponents(() => state.columns.value);
274
- const headerColumns = computed(() => state.localSortAvailable.value ? state.columns.value : state.columns.value.map((c) => c.local && c.sortable ? {
277
+ const columns = computed(() => props.columns ?? state.columns.value);
278
+ const cellComponents = useCellComponents(() => columns.value);
279
+ const headerColumns = computed(() => state.localSortAvailable.value ? columns.value : columns.value.map((c) => c.local && c.sortable ? {
275
280
  ...c,
276
281
  sortable: false
277
282
  } : c));
@@ -283,7 +288,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
283
288
  });
284
289
  const cellSlotFlags = computed(() => {
285
290
  const out = {};
286
- for (const c of state.columns.value) out[c.path] = !!slots[`cell-${c.path}`];
291
+ for (const c of columns.value) out[c.path] = !!slots[`cell-${c.path}`];
287
292
  return out;
288
293
  });
289
294
  const rowStyle = computed(() => ({ height: `${props.rowHeight}px` }));
@@ -456,7 +461,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
456
461
  onMounted(() => {
457
462
  nextTick(() => recompute());
458
463
  });
459
- watch(() => [props.rowHeight, state.columns.value], scheduleRecompute);
464
+ watch(() => [props.rowHeight, columns.value], scheduleRecompute);
460
465
  return (_ctx, _cache) => {
461
466
  return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", {
462
467
  ref_key: "wrapperRef",
@@ -470,7 +475,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
470
475
  "aria-multiselectable": __props.select === "multi" ? "true" : void 0
471
476
  }, [
472
477
  createVNode(as_table_colgroup_default, {
473
- columns: unref(state).columns.value,
478
+ columns: columns.value,
474
479
  "column-widths": unref(state).columnWidths.value,
475
480
  "has-select": hasValue.value,
476
481
  "with-filler": true
@@ -502,7 +507,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
502
507
  onReorder: unref(onReorder),
503
508
  onResize: unref(state).setColumnWidth,
504
509
  onSelectAllToggle
505
- }, createSlots({ _: 2 }, [renderList(unref(state).columns.value, (col) => {
510
+ }, createSlots({ _: 2 }, [renderList(columns.value, (col) => {
506
511
  return {
507
512
  name: `header-${col.path}`,
508
513
  fn: withCtx((scope) => [renderSlot(_ctx.$slots, `header-${col.path}`, normalizeProps(guardReactiveProps(scope)))])
@@ -569,7 +574,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
569
574
  "aria-disabled": slot.selectable.ok ? void 0 : "true",
570
575
  onKeydown: ($event) => onSelectCellKeydown($event, unref(state).topIndex.value + slot.s)
571
576
  }, [slot.selected ? (openBlock(), createElementBlock("span", _hoisted_7)) : createCommentVNode("v-if", true)], 42, _hoisted_6)])) : createCommentVNode("v-if", true),
572
- unref(hasAnyCellBindings) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(state).columns.value, (col) => {
577
+ unref(hasAnyCellBindings) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(columns.value, (col) => {
573
578
  return openBlock(), createElementBlock(Fragment, { key: col.path }, [(openBlock(true), createElementBlock(Fragment, null, renderList([unref(cellResolver)(col, slot.row, unref(state).topIndex.value + slot.s)], (bindings) => {
574
579
  return openBlock(), createElementBlock(Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", mergeProps({
575
580
  key: 0,
@@ -585,7 +590,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
585
590
  role: "gridcell"
586
591
  }, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
587
592
  }), 128))], 64);
588
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(unref(state).columns.value, (col) => {
593
+ }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(columns.value, (col) => {
589
594
  return openBlock(), createElementBlock(Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", _hoisted_8, [renderSlot(_ctx.$slots, `cell-${col.path}`, {
590
595
  row: slot.row,
591
596
  value: unref(getCellValue)(slot.row, col.path),
@@ -603,7 +608,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
603
608
  }, null, -1))
604
609
  ], 16, _hoisted_4)) : (openBlock(), createBlock(as_window_skeleton_row_default, {
605
610
  key: 1,
606
- columns: unref(state).columns.value,
611
+ columns: columns.value,
607
612
  "row-height": __props.rowHeight,
608
613
  "has-select": hasValue.value,
609
614
  errored: slot.errored
@@ -620,7 +625,7 @@ var as_window_table_base_default = /* @__PURE__ */ defineComponent({
620
625
  "query-error": unref(state).queryError.value,
621
626
  "is-empty": unref(state).totalCount.value === 0,
622
627
  querying: unref(state).querying.value,
623
- columns: unref(state).columns.value,
628
+ columns: columns.value,
624
629
  "search-term": unref(state).searchTerm.value,
625
630
  "has-active-filters": hasActiveFilters.value,
626
631
  "on-clear-filters": unref(onClearFilters),
@@ -718,6 +723,11 @@ var as_window_table_default = /* @__PURE__ */ defineComponent({
718
723
  required: false,
719
724
  default: false
720
725
  },
726
+ rowActionsColumn: {
727
+ type: [String, Boolean],
728
+ required: false,
729
+ default: false
730
+ },
721
731
  headless: {
722
732
  type: Boolean,
723
733
  required: false,
@@ -753,6 +763,11 @@ var as_window_table_default = /* @__PURE__ */ defineComponent({
753
763
  state.rowSelectable.value = val;
754
764
  }, { immediate: true });
755
765
  useSelectModeReset(state, () => props.select);
766
+ const effectiveColumns = useRowActionsColumn(state, {
767
+ placement: () => props.rowActionsColumn,
768
+ select: () => props.select,
769
+ columns: () => state.columns.value
770
+ });
756
771
  useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), useHasEmitListener("onMainAction"));
757
772
  const containerRef = ref(null);
758
773
  function onMetrics({ fits, rowHeightPx, chromePx }) {
@@ -779,6 +794,7 @@ var as_window_table_default = /* @__PURE__ */ defineComponent({
779
794
  ref: containerRef,
780
795
  class: "as-table-outer-wrap"
781
796
  }, [createVNode(as_window_table_base_default, {
797
+ columns: unref(effectiveColumns),
782
798
  "row-height": __props.rowHeight,
783
799
  "wheel-rows-per-tick": __props.wheelRowsPerTick,
784
800
  "column-menu": __props.columnMenu,
@@ -799,6 +815,7 @@ var as_window_table_default = /* @__PURE__ */ defineComponent({
799
815
  fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps ?? {})))])
800
816
  };
801
817
  })]), 1032, [
818
+ "columns",
802
819
  "row-height",
803
820
  "wheel-rows-per-tick",
804
821
  "column-menu",
@@ -1,2 +1,2 @@
1
- const require_as_window_table = require("./as-window-table-OB4B1knU.cjs");
1
+ const require_as_window_table = require("./as-window-table-BfSud7yB.cjs");
2
2
  module.exports = require_as_window_table.as_window_table_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-window-table.vue-Db--CSWD.cjs";
1
+ import { t as _default } from "./as-window-table.vue-BIjQuSie.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-window-table.vue-CcDoghqs.mjs";
1
+ import { t as _default } from "./as-window-table.vue-3egLvwAy.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_window_table_default } from "./as-window-table-D5grrLFG.mjs";
1
+ import { t as as_window_table_default } from "./as-window-table-CjYMF0aX.mjs";
2
2
  export { as_window_table_default as default };
@@ -1,4 +1,4 @@
1
- import { _ as RowDeleteOpt, f as QueryErrorKind, g as RowClassHook, h as RowAttrsHook, o as EnterAction, r as ColumnMenuConfig, y as RowSelectableHook } from "./types-CuOHiH-S.mjs";
1
+ import { _ as RowClassHook, b as RowSelectableHook, f as QueryErrorKind, g as RowAttrsHook, m as RowActionsColumnPlacement, o as EnterAction, r as ColumnMenuConfig, v as RowDeleteOpt } from "./types-CgdpcJdd.mjs";
2
2
  import * as vue from "vue";
3
3
  import { SelectionMode } from "@atscript/ui-table";
4
4
 
@@ -51,6 +51,18 @@ type __VLS_Props = {
51
51
  * a watcher — the action set live-updates as the prop flips.
52
52
  */
53
53
  rowDelete?: boolean | RowDeleteOpt;
54
+ /**
55
+ * Synthesised row-actions pseudo-column, as on `<AsTable>`. `'first'` /
56
+ * `'last'` prepend or append a fixed `__actions` column rendering
57
+ * `controls.rowActions` (the `@DbAction` row actions, per-row gated by
58
+ * `$actions`). `'merge-select'` only renders it when `select === "none"`,
59
+ * sharing the leading gutter with the checkbox column.
60
+ *
61
+ * The column is locked: no header dropdown, no resize, no drag-reorder,
62
+ * NOT in the `columnNames` v-model. Hidden entirely when
63
+ * `state.actions.row` is empty. Since 0.1.138.
64
+ */
65
+ rowActionsColumn?: RowActionsColumnPlacement | false;
54
66
  /**
55
67
  * Render without a header row. Omits `<thead>` entirely (not
56
68
  * `display:none`); column widths are carried by the `<colgroup>`, so data
@@ -97,11 +109,12 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.C
97
109
  "onMain-action"?: ((row: Row, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
98
110
  onError?: ((error: Error, kind: QueryErrorKind) => any) | undefined;
99
111
  }>, {
112
+ select: SelectionMode;
100
113
  reorderable: boolean;
101
114
  resizable: boolean;
102
115
  columnMinWidth: number;
103
- select: SelectionMode;
104
116
  rowDelete: boolean | RowDeleteOpt;
117
+ rowActionsColumn: RowActionsColumnPlacement | false;
105
118
  headless: boolean;
106
119
  rowHeight: number;
107
120
  wheelRowsPerTick: number;