@atscript/vue-table 0.1.146 → 0.1.147

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 (167) hide show
  1. package/dist/as-action-form-dialog.cjs +3 -2
  2. package/dist/as-action-form-dialog.mjs +3 -2
  3. package/dist/{as-action-menu-content-DoZnQP0I.mjs → as-action-menu-content-35yQWbLF.mjs} +1 -1
  4. package/dist/{as-action-menu-content-FQ2miGid.cjs → as-action-menu-content-BJ0tn6jq.cjs} +1 -1
  5. package/dist/as-cell-array.d.cts +1 -1
  6. package/dist/as-cell-array.d.mts +1 -1
  7. package/dist/as-cell-date.d.cts +1 -1
  8. package/dist/as-cell-date.d.mts +1 -1
  9. package/dist/as-cell-json.d.cts +1 -1
  10. package/dist/as-cell-json.d.mts +1 -1
  11. package/dist/as-cell-number.d.cts +1 -1
  12. package/dist/as-cell-number.d.mts +1 -1
  13. package/dist/as-cell-union.d.cts +1 -1
  14. package/dist/as-cell-union.d.mts +1 -1
  15. package/dist/as-column-menu.d.cts +1 -1
  16. package/dist/as-column-menu.d.mts +1 -1
  17. package/dist/{as-column-menu.vue-ByTECTbX.d.cts → as-column-menu.vue-B6iuKmIj.d.cts} +1 -1
  18. package/dist/{as-column-menu.vue-TChT482i.d.mts → as-column-menu.vue-wxb2f92k.d.mts} +1 -1
  19. package/dist/{as-config-dialog-CpW1Qemf.cjs → as-config-dialog-BJkBzaku.cjs} +2 -2
  20. package/dist/{as-config-dialog-ObHtungs.mjs → as-config-dialog-D503Ek_m.mjs} +2 -2
  21. package/dist/as-config-dialog.cjs +1 -1
  22. package/dist/as-config-dialog.d.cts +1 -1
  23. package/dist/as-config-dialog.d.mts +1 -1
  24. package/dist/as-config-dialog.mjs +1 -1
  25. package/dist/{as-confirm-dialog-D3Vu1Rb_.cjs → as-confirm-dialog-C5xPbkox.cjs} +1 -1
  26. package/dist/{as-confirm-dialog-zg7jmS3u.mjs → as-confirm-dialog-CJfDnaiU.mjs} +1 -1
  27. package/dist/as-confirm-dialog.cjs +1 -1
  28. package/dist/as-confirm-dialog.d.cts +1 -1
  29. package/dist/as-confirm-dialog.d.mts +1 -1
  30. package/dist/as-confirm-dialog.mjs +1 -1
  31. package/dist/{as-filter-dialog-C4EyRr2_.cjs → as-filter-dialog-Co0WfWOe.cjs} +7 -7
  32. package/dist/{as-filter-dialog-CWy0mjZl.mjs → as-filter-dialog-CxjO-Ge5.mjs} +7 -7
  33. package/dist/as-filter-dialog.cjs +1 -1
  34. package/dist/as-filter-dialog.d.cts +1 -1
  35. package/dist/as-filter-dialog.d.mts +1 -1
  36. package/dist/as-filter-dialog.mjs +1 -1
  37. package/dist/{as-filter-field-CW1_GHZT.mjs → as-filter-field-ByPlGyWz.mjs} +3 -3
  38. package/dist/{as-filter-field-BQ9UlV0y.cjs → as-filter-field-FTrxFkTw.cjs} +3 -3
  39. package/dist/as-filter-field.cjs +1 -1
  40. package/dist/as-filter-field.d.cts +1 -1
  41. package/dist/as-filter-field.d.mts +1 -1
  42. package/dist/as-filter-field.mjs +1 -1
  43. package/dist/as-filter-input.d.cts +1 -1
  44. package/dist/as-filter-input.d.mts +1 -1
  45. package/dist/{as-filters-BLFSS_VP.mjs → as-filters-CJZJiOXb.mjs} +4 -4
  46. package/dist/{as-filters-DUfFkXAo.cjs → as-filters-W3iMELuL.cjs} +4 -4
  47. package/dist/as-filters.cjs +1 -1
  48. package/dist/as-filters.mjs +1 -1
  49. package/dist/{as-preset-dialog-CI2Hw8vi.mjs → as-preset-dialog-CLOVEpWZ.mjs} +1 -1
  50. package/dist/{as-preset-dialog-BlXqTZiT.cjs → as-preset-dialog-Dvvx0jmU.cjs} +1 -1
  51. package/dist/as-preset-dialog.cjs +1 -1
  52. package/dist/as-preset-dialog.d.cts +1 -1
  53. package/dist/as-preset-dialog.d.mts +1 -1
  54. package/dist/as-preset-dialog.mjs +1 -1
  55. package/dist/{as-preset-picker-CbZDGPaf.mjs → as-preset-picker-CwFObhME.mjs} +1 -1
  56. package/dist/{as-preset-picker-CVgyZBG7.cjs → as-preset-picker-DFLhbm59.cjs} +1 -1
  57. package/dist/as-preset-picker.cjs +1 -1
  58. package/dist/as-preset-picker.mjs +1 -1
  59. package/dist/{as-residual-filter-CUTouIn5.mjs → as-residual-filter-BRsEs8oe.mjs} +1 -1
  60. package/dist/{as-residual-filter-C8n7kdGW.cjs → as-residual-filter-sZlsFPDS.cjs} +1 -1
  61. package/dist/as-residual-filter.cjs +1 -1
  62. package/dist/as-residual-filter.d.cts +1 -1
  63. package/dist/as-residual-filter.d.mts +1 -1
  64. package/dist/as-residual-filter.mjs +1 -1
  65. package/dist/{as-row-actions-DfUL9sYB.cjs → as-row-actions-DFv2cSrP.cjs} +7 -5
  66. package/dist/{as-row-actions-ed1P6GEJ.mjs → as-row-actions-DyjIXePd.mjs} +7 -5
  67. package/dist/as-row-actions.cjs +1 -1
  68. package/dist/as-row-actions.d.cts +1 -1
  69. package/dist/as-row-actions.d.mts +1 -1
  70. package/dist/as-row-actions.mjs +1 -1
  71. package/dist/{as-row-actions.vue-Ba3VO9W-.d.cts → as-row-actions.vue-BHrZBXVU.d.cts} +1 -1
  72. package/dist/{as-row-actions.vue-CKOnE0eb.d.mts → as-row-actions.vue-D4MylwCW.d.mts} +1 -1
  73. package/dist/{as-select-cell-DwMfqBMV.cjs → as-select-cell-CoQJjhnq.cjs} +10 -5
  74. package/dist/{as-select-cell-BMptU5sQ.mjs → as-select-cell-Dl8fohIj.mjs} +10 -5
  75. package/dist/as-selection-banner-BI5gKHqW.cjs +206 -0
  76. package/dist/as-selection-banner-DBtLjulh.mjs +189 -0
  77. package/dist/as-table-B1FowaPF.cjs +215 -0
  78. package/dist/as-table-Cpvfv9zA.mjs +210 -0
  79. package/dist/{as-table-actions-DplblFlK.cjs → as-table-actions-B0xaicfv.cjs} +32 -6
  80. package/dist/{as-table-actions-DQco4pGu.mjs → as-table-actions-BlbAps1h.mjs} +32 -6
  81. package/dist/as-table-actions.cjs +1 -1
  82. package/dist/as-table-actions.d.cts +1 -1
  83. package/dist/as-table-actions.d.mts +1 -1
  84. package/dist/as-table-actions.mjs +1 -1
  85. package/dist/{as-table-actions.vue-BYphfAe2.d.cts → as-table-actions.vue-7ml3JiOO.d.mts} +9 -2
  86. package/dist/{as-table-actions.vue-C6hzRtS7.d.mts → as-table-actions.vue-BKRqHprR.d.cts} +9 -2
  87. package/dist/{as-table-base-lfyjPgsO.mjs → as-table-base-EzKaChOp.mjs} +3 -3
  88. package/dist/{as-table-base-CNAn-vpa.cjs → as-table-base-LZ26YlWp.cjs} +3 -3
  89. package/dist/as-table-cell-value.d.cts +1 -1
  90. package/dist/as-table-cell-value.d.mts +1 -1
  91. package/dist/{as-table-header-cell-Csv1KQDa.mjs → as-table-header-cell-DrVzYaof.mjs} +1 -1
  92. package/dist/{as-table-header-cell-BwaOPYwI.cjs → as-table-header-cell-gHhCdxJX.cjs} +1 -1
  93. package/dist/as-table-header-cell.cjs +1 -1
  94. package/dist/as-table-header-cell.d.cts +1 -1
  95. package/dist/as-table-header-cell.d.mts +1 -1
  96. package/dist/as-table-header-cell.mjs +1 -1
  97. package/dist/{as-table-header-cell.vue-DU5h-2C_.d.cts → as-table-header-cell.vue-BCk4NPYT.d.cts} +1 -1
  98. package/dist/{as-table-header-cell.vue-KkANwimG.d.mts → as-table-header-cell.vue-BZU8s9CT.d.mts} +1 -1
  99. package/dist/{as-table-root-BreMYhnv.mjs → as-table-root-BYHXuNPI.mjs} +33 -6
  100. package/dist/{as-table-root-DXewWV9h.cjs → as-table-root-K6fWKHtF.cjs} +33 -6
  101. package/dist/as-table-root.cjs +1 -1
  102. package/dist/as-table-root.d.cts +1 -1
  103. package/dist/as-table-root.d.mts +1 -1
  104. package/dist/as-table-root.mjs +1 -1
  105. package/dist/{as-table-root.vue-XtDgUjO2.d.mts → as-table-root.vue-Bm2DxAqU.d.mts} +319 -9
  106. package/dist/{as-table-root.vue-Bjzp8TJl.d.cts → as-table-root.vue-CF03c4vu.d.cts} +320 -10
  107. package/dist/as-table.cjs +1 -1
  108. package/dist/as-table.d.cts +1 -1
  109. package/dist/as-table.d.mts +1 -1
  110. package/dist/as-table.mjs +1 -1
  111. package/dist/{as-window-table-JOTOi_Nm.mjs → as-window-table-CygDqZMU.mjs} +99 -53
  112. package/dist/{as-window-table-Bj1dXOS6.cjs → as-window-table-_flc8o64.cjs} +101 -55
  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/index.cjs +23 -19
  118. package/dist/index.d.cts +19 -21
  119. package/dist/index.d.mts +19 -21
  120. package/dist/index.mjs +20 -20
  121. package/dist/{types-D1NxhrpW.d.cts → intent-scope-BXPEN5kJ.d.cts} +202 -35
  122. package/dist/{types-BEZ4_erB.d.mts → intent-scope-Ck7RZ0dK.d.mts} +202 -35
  123. package/dist/{use-table-W0KmaJ6L.cjs → use-table-CydIJZbx.cjs} +5 -3
  124. package/dist/{use-table-BTsNGBVx.mjs → use-table-DP6Y0kbl.mjs} +5 -3
  125. package/dist/{use-table-component-DRMXTk9M.mjs → use-table-component-DNGUvhf7.mjs} +1 -1
  126. package/dist/{use-table-component-BvAC82_c.cjs → use-table-component-aqfGzECx.cjs} +1 -1
  127. package/dist/{use-table-nav-bridge-CPI1tql6.cjs → use-table-nav-bridge-B7A30yja.cjs} +1 -1
  128. package/dist/{use-table-nav-bridge-Bw0NFDSf.mjs → use-table-nav-bridge-BhOPIT2R.mjs} +1 -1
  129. package/dist/{use-table-selection-ULbKT2xW.mjs → use-table-selection-CdaOPo1d.mjs} +8 -3
  130. package/dist/{use-table-selection-DtCV3rhu.cjs → use-table-selection-Cs7-gjHg.cjs} +8 -3
  131. package/dist/{use-table-state-DuY-Mf8e.mjs → use-table-state-1OZfdhQi.mjs} +414 -41
  132. package/dist/{use-table-state-Ddr2UZzB.cjs → use-table-state-sDnqOi3b.cjs} +447 -38
  133. package/package.json +11 -10
  134. package/dist/as-table-BjKzKB0a.cjs +0 -207
  135. package/dist/as-table-DGWfzV4w.mjs +0 -202
  136. package/dist/as-table.vue-BULJe49x.d.cts +0 -115
  137. package/dist/as-table.vue-DgCtlV4u.d.mts +0 -115
  138. package/dist/as-window-table.vue-CYFgK10g.d.mts +0 -132
  139. package/dist/as-window-table.vue-ijutqrJ0.d.cts +0 -132
  140. package/dist/use-table-column-handlers-BitvioH4.mjs +0 -85
  141. package/dist/use-table-column-handlers-DksXpbON.cjs +0 -96
  142. /package/dist/{as-cell-array.vue-pFs5GcCR.d.cts → as-cell-array.vue-C4BTM8YW.d.cts} +0 -0
  143. /package/dist/{as-cell-array.vue-ow34clSF.d.mts → as-cell-array.vue-Dj3nZop3.d.mts} +0 -0
  144. /package/dist/{as-cell-date.vue-B4JCr1qP.d.mts → as-cell-date.vue-BPuyH7q3.d.mts} +0 -0
  145. /package/dist/{as-cell-date.vue-BBSps2B2.d.cts → as-cell-date.vue-BcMgxBfm.d.cts} +0 -0
  146. /package/dist/{as-cell-json.vue-B-T3TuFj.d.mts → as-cell-json.vue-D8J7YwVV.d.mts} +0 -0
  147. /package/dist/{as-cell-json.vue-C6wg4ARZ.d.cts → as-cell-json.vue-pwE9uJdv.d.cts} +0 -0
  148. /package/dist/{as-cell-number.vue-CJ2K5zeM.d.cts → as-cell-number.vue-pbgVCIWT.d.cts} +0 -0
  149. /package/dist/{as-cell-number.vue-CNH2fbCB.d.mts → as-cell-number.vue-sUoZvuat.d.mts} +0 -0
  150. /package/dist/{as-cell-union.vue-CslPM_c2.d.cts → as-cell-union.vue-BK_M7opL.d.cts} +0 -0
  151. /package/dist/{as-cell-union.vue-CZwN81H4.d.mts → as-cell-union.vue-DZBejMxR.d.mts} +0 -0
  152. /package/dist/{as-config-dialog.vue-BKo2GpzN.d.mts → as-config-dialog.vue-C-Jw_rb7.d.cts} +0 -0
  153. /package/dist/{as-config-dialog.vue-DvvJi3xx.d.cts → as-config-dialog.vue-D2AVR1a5.d.mts} +0 -0
  154. /package/dist/{as-confirm-dialog.vue-BN_yzu3h.d.mts → as-confirm-dialog.vue-BxAaCuYf.d.mts} +0 -0
  155. /package/dist/{as-confirm-dialog.vue-CXxLpzbu.d.cts → as-confirm-dialog.vue-D8hJ5qPY.d.cts} +0 -0
  156. /package/dist/{as-filter-dialog.vue-BV2J8PgZ.d.cts → as-filter-dialog.vue-CyD6qtuX.d.cts} +0 -0
  157. /package/dist/{as-filter-dialog.vue-Bl8OIKOf.d.mts → as-filter-dialog.vue-WYXGtymZ.d.mts} +0 -0
  158. /package/dist/{as-filter-field.vue-DD0IZXS1.d.mts → as-filter-field.vue-DTpuDkHh.d.mts} +0 -0
  159. /package/dist/{as-filter-field.vue-ByQ8xIGq.d.cts → as-filter-field.vue-ajAFhraz.d.cts} +0 -0
  160. /package/dist/{as-filter-input.vue-CS4nOk_Q.d.cts → as-filter-input.vue-CksJOtqw.d.cts} +0 -0
  161. /package/dist/{as-filter-input.vue-CFZ33B--.d.mts → as-filter-input.vue-DMwr0ArL.d.mts} +0 -0
  162. /package/dist/{as-preset-dialog.vue-ChM7H7B4.d.mts → as-preset-dialog.vue-BEM-L4BY.d.cts} +0 -0
  163. /package/dist/{as-preset-dialog.vue-DP9fy00Y.d.cts → as-preset-dialog.vue-BrnvBWxJ.d.mts} +0 -0
  164. /package/dist/{as-residual-filter.vue-Dfw1l2wS.d.cts → as-residual-filter.vue-CGXCipEn.d.cts} +0 -0
  165. /package/dist/{as-residual-filter.vue-N89YqlCz.d.mts → as-residual-filter.vue-Cev_8Wy7.d.mts} +0 -0
  166. /package/dist/{as-table-cell-value.vue-C0VR9GRK.d.cts → as-table-cell-value.vue-UkAuJanv.d.cts} +0 -0
  167. /package/dist/{as-table-cell-value.vue-DphckGq-.d.mts → as-table-cell-value.vue-kfNgVhzn.d.mts} +0 -0
@@ -1,132 +0,0 @@
1
- import { S as RowSelectableHook, T as SelectOn, b as RowDeleteOpt, g as RowActionsColumnPlacement, p as QueryErrorKind, r as ColumnMenuConfig, s as EnterAction, v as RowAttrsHook, y as RowClassHook } from "./types-BEZ4_erB.mjs";
2
- import * as vue from "vue";
3
- import { SelectionMode } from "@atscript/ui-table";
4
-
5
- //#region src/components/as-window-table.vue.d.ts
6
- type Row = Record<string, unknown>;
7
- type __VLS_Props = {
8
- /** Pixel height of one row. Defaults to `DEFAULT_ROW_HEIGHT_PX`. */rowHeight?: number; /** Number of rows the viewport advances per wheel-tick. */
9
- wheelRowsPerTick?: number;
10
- /**
11
- * Selection mode — rendering concern owned by the renderer. `"multi"`
12
- * shows a leading checkbox column and turns row clicks into selection
13
- * toggles; `"none"` (default) hides the column and routes clicks
14
- * through the main-action path. Independent of `state.selectedRows` —
15
- * flipping `select` to `"none"` hides the checkbox UI but leaves the
16
- * user's selected pks in place, surviving a future re-enable.
17
- */
18
- select?: SelectionMode; /** See {@link SelectOn}. Since 0.1.142. */
19
- selectOn?: SelectOn;
20
- /**
21
- * Force exactly N rows tall. Equivalent to setting both `min-rows` and
22
- * `max-rows` to N — overrides both when set. The table reserves N rows
23
- * worth of height even when empty.
24
- */
25
- rows?: number;
26
- /**
27
- * Minimum row count. The table is at least this tall even when empty
28
- * or when fewer rows would fit the available area.
29
- */
30
- minRows?: number;
31
- /**
32
- * Maximum row count. The table caps at this many rows tall even if the
33
- * available area would fit more. Useful for value-help dialogs.
34
- */
35
- maxRows?: number;
36
- columnMenu?: ColumnMenuConfig; /** Allow header drag-and-drop column reorder. Default true. */
37
- reorderable?: boolean; /** Allow header drag-resize. Default true. */
38
- resizable?: boolean; /** Pixel floor for the resize clamp. Default 48. */
39
- columnMinWidth?: number;
40
- /**
41
- * Override Enter-key semantics. Default `"main-action"`. Pass
42
- * `"toggle-select"` to make Enter mirror Space (pick/unpick the active
43
- * row) — used by value-help dialog tables where Enter shouldn't fire a
44
- * main action.
45
- */
46
- enterAction?: EnterAction;
47
- /**
48
- * Built-in row-delete: `false` (off, default), `true` (on with defaults),
49
- * or a `RowDeleteOpt` overriding label/icon/intent/promptText. The
50
- * synthesised `__remove` action only appears when the consumer opts in
51
- * AND `tableDef.canRemove === true`. Pushed into `state.rowDelete` via
52
- * a watcher — the action set live-updates as the prop flips.
53
- */
54
- rowDelete?: boolean | RowDeleteOpt;
55
- /**
56
- * Synthesised row-actions pseudo-column, as on `<AsTable>`. `'first'` /
57
- * `'last'` prepend or append a fixed `__actions` column rendering
58
- * `controls.rowActions` (the `@DbAction` row actions, per-row gated by
59
- * `$actions`). `'merge-select'` only renders it when `select === "none"`,
60
- * sharing the leading gutter with the checkbox column.
61
- *
62
- * The column is locked: no header dropdown, no resize, no drag-reorder,
63
- * NOT in the `columnNames` v-model. Hidden entirely when
64
- * `state.actions.row` is empty. Since 0.1.138.
65
- */
66
- rowActionsColumn?: RowActionsColumnPlacement | false;
67
- /**
68
- * Render without a header row. Omits `<thead>` entirely (not
69
- * `display:none`); column widths are carried by the `<colgroup>`, so data
70
- * columns keep their annotated/seeded widths. Header-driven interactions
71
- * (sort/filter/reorder/resize) are unavailable in headless mode.
72
- */
73
- headless?: boolean;
74
- /**
75
- * Per-row selectability. Return `false` — or a string, surfaced as the
76
- * disabled reason on the row's selection control — to make a row not
77
- * selectable. Enforced on every path: row click, Space/Enter toggle, and
78
- * the header select-all. Since 0.1.133.
79
- *
80
- * @example
81
- * `:row-selectable="(row) => row.locked ? 'Locked by another user' : true"`
82
- */
83
- rowSelectable?: RowSelectableHook;
84
- /**
85
- * Extra classes for the row element — string, array, or
86
- * `{ class: boolean }` map, merged with the framework's own row classes.
87
- * Since 0.1.133.
88
- */
89
- rowClass?: RowClassHook;
90
- /**
91
- * Extra attributes for the row element. The framework's own `id`, `role`,
92
- * `aria-*`, `data-*`, `class` and `style` always win, so a hook can
93
- * decorate a row but never rewrite its accessibility contract.
94
- * Since 0.1.133.
95
- */
96
- rowAttrs?: RowAttrsHook;
97
- };
98
- declare var __VLS_13: string, __VLS_14: any, __VLS_16: {};
99
- type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any } & {
100
- 'query-loading'?: (props: typeof __VLS_16) => any;
101
- };
102
- declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
103
- "row-click": (row: Row, event: MouseEvent) => any;
104
- "row-dblclick": (row: Row, event: MouseEvent) => any;
105
- "main-action": (row: Row, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
106
- error: (error: Error, kind: QueryErrorKind) => any;
107
- }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
108
- "onRow-click"?: ((row: Row, event: MouseEvent) => any) | undefined;
109
- "onRow-dblclick"?: ((row: Row, event: MouseEvent) => any) | undefined;
110
- "onMain-action"?: ((row: Row, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
111
- onError?: ((error: Error, kind: QueryErrorKind) => any) | undefined;
112
- }>, {
113
- reorderable: boolean;
114
- resizable: boolean;
115
- columnMinWidth: number;
116
- select: SelectionMode;
117
- selectOn: SelectOn;
118
- rowDelete: boolean | RowDeleteOpt;
119
- rowActionsColumn: RowActionsColumnPlacement | false;
120
- headless: boolean;
121
- rowHeight: number;
122
- wheelRowsPerTick: number;
123
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
124
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
125
- declare const _default: typeof __VLS_export;
126
- type __VLS_WithSlots<T, S> = T & {
127
- new (): {
128
- $slots: S;
129
- };
130
- };
131
- //#endregion
132
- export { _default as t };
@@ -1,132 +0,0 @@
1
- import { S as RowSelectableHook, T as SelectOn, b as RowDeleteOpt, g as RowActionsColumnPlacement, p as QueryErrorKind, r as ColumnMenuConfig, s as EnterAction, v as RowAttrsHook, y as RowClassHook } from "./types-D1NxhrpW.cjs";
2
- import * as vue from "vue";
3
- import { SelectionMode } from "@atscript/ui-table";
4
-
5
- //#region src/components/as-window-table.vue.d.ts
6
- type Row = Record<string, unknown>;
7
- type __VLS_Props = {
8
- /** Pixel height of one row. Defaults to `DEFAULT_ROW_HEIGHT_PX`. */rowHeight?: number; /** Number of rows the viewport advances per wheel-tick. */
9
- wheelRowsPerTick?: number;
10
- /**
11
- * Selection mode — rendering concern owned by the renderer. `"multi"`
12
- * shows a leading checkbox column and turns row clicks into selection
13
- * toggles; `"none"` (default) hides the column and routes clicks
14
- * through the main-action path. Independent of `state.selectedRows` —
15
- * flipping `select` to `"none"` hides the checkbox UI but leaves the
16
- * user's selected pks in place, surviving a future re-enable.
17
- */
18
- select?: SelectionMode; /** See {@link SelectOn}. Since 0.1.142. */
19
- selectOn?: SelectOn;
20
- /**
21
- * Force exactly N rows tall. Equivalent to setting both `min-rows` and
22
- * `max-rows` to N — overrides both when set. The table reserves N rows
23
- * worth of height even when empty.
24
- */
25
- rows?: number;
26
- /**
27
- * Minimum row count. The table is at least this tall even when empty
28
- * or when fewer rows would fit the available area.
29
- */
30
- minRows?: number;
31
- /**
32
- * Maximum row count. The table caps at this many rows tall even if the
33
- * available area would fit more. Useful for value-help dialogs.
34
- */
35
- maxRows?: number;
36
- columnMenu?: ColumnMenuConfig; /** Allow header drag-and-drop column reorder. Default true. */
37
- reorderable?: boolean; /** Allow header drag-resize. Default true. */
38
- resizable?: boolean; /** Pixel floor for the resize clamp. Default 48. */
39
- columnMinWidth?: number;
40
- /**
41
- * Override Enter-key semantics. Default `"main-action"`. Pass
42
- * `"toggle-select"` to make Enter mirror Space (pick/unpick the active
43
- * row) — used by value-help dialog tables where Enter shouldn't fire a
44
- * main action.
45
- */
46
- enterAction?: EnterAction;
47
- /**
48
- * Built-in row-delete: `false` (off, default), `true` (on with defaults),
49
- * or a `RowDeleteOpt` overriding label/icon/intent/promptText. The
50
- * synthesised `__remove` action only appears when the consumer opts in
51
- * AND `tableDef.canRemove === true`. Pushed into `state.rowDelete` via
52
- * a watcher — the action set live-updates as the prop flips.
53
- */
54
- rowDelete?: boolean | RowDeleteOpt;
55
- /**
56
- * Synthesised row-actions pseudo-column, as on `<AsTable>`. `'first'` /
57
- * `'last'` prepend or append a fixed `__actions` column rendering
58
- * `controls.rowActions` (the `@DbAction` row actions, per-row gated by
59
- * `$actions`). `'merge-select'` only renders it when `select === "none"`,
60
- * sharing the leading gutter with the checkbox column.
61
- *
62
- * The column is locked: no header dropdown, no resize, no drag-reorder,
63
- * NOT in the `columnNames` v-model. Hidden entirely when
64
- * `state.actions.row` is empty. Since 0.1.138.
65
- */
66
- rowActionsColumn?: RowActionsColumnPlacement | false;
67
- /**
68
- * Render without a header row. Omits `<thead>` entirely (not
69
- * `display:none`); column widths are carried by the `<colgroup>`, so data
70
- * columns keep their annotated/seeded widths. Header-driven interactions
71
- * (sort/filter/reorder/resize) are unavailable in headless mode.
72
- */
73
- headless?: boolean;
74
- /**
75
- * Per-row selectability. Return `false` — or a string, surfaced as the
76
- * disabled reason on the row's selection control — to make a row not
77
- * selectable. Enforced on every path: row click, Space/Enter toggle, and
78
- * the header select-all. Since 0.1.133.
79
- *
80
- * @example
81
- * `:row-selectable="(row) => row.locked ? 'Locked by another user' : true"`
82
- */
83
- rowSelectable?: RowSelectableHook;
84
- /**
85
- * Extra classes for the row element — string, array, or
86
- * `{ class: boolean }` map, merged with the framework's own row classes.
87
- * Since 0.1.133.
88
- */
89
- rowClass?: RowClassHook;
90
- /**
91
- * Extra attributes for the row element. The framework's own `id`, `role`,
92
- * `aria-*`, `data-*`, `class` and `style` always win, so a hook can
93
- * decorate a row but never rewrite its accessibility contract.
94
- * Since 0.1.133.
95
- */
96
- rowAttrs?: RowAttrsHook;
97
- };
98
- declare var __VLS_13: string, __VLS_14: any, __VLS_16: {};
99
- type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any } & {
100
- 'query-loading'?: (props: typeof __VLS_16) => any;
101
- };
102
- declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
103
- "row-click": (row: Row, event: MouseEvent) => any;
104
- "row-dblclick": (row: Row, event: MouseEvent) => any;
105
- "main-action": (row: Row, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
106
- error: (error: Error, kind: QueryErrorKind) => any;
107
- }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
108
- "onRow-click"?: ((row: Row, event: MouseEvent) => any) | undefined;
109
- "onRow-dblclick"?: ((row: Row, event: MouseEvent) => any) | undefined;
110
- "onMain-action"?: ((row: Row, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
111
- onError?: ((error: Error, kind: QueryErrorKind) => any) | undefined;
112
- }>, {
113
- reorderable: boolean;
114
- resizable: boolean;
115
- columnMinWidth: number;
116
- select: SelectionMode;
117
- selectOn: SelectOn;
118
- rowDelete: boolean | RowDeleteOpt;
119
- rowActionsColumn: RowActionsColumnPlacement | false;
120
- headless: boolean;
121
- rowHeight: number;
122
- wheelRowsPerTick: number;
123
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
124
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
125
- declare const _default: typeof __VLS_export;
126
- type __VLS_WithSlots<T, S> = T & {
127
- new (): {
128
- $slots: S;
129
- };
130
- };
131
- //#endregion
132
- export { _default as t };
@@ -1,85 +0,0 @@
1
- import { F as ROW_ACTIONS_TYPE, P as ROW_ACTIONS_PATH } from "./use-table-state-DuY-Mf8e.mjs";
2
- import { computed, watch } from "vue";
3
- import { reorderColumnNames } from "@atscript/ui-table";
4
- //#region src/composables/use-row-actions-column.ts
5
- /**
6
- * The synthesised row-actions pseudo-column, shared by `<AsTable>` and
7
- * `<AsWindowTable>`. Returns the renderer's effective column list — the base
8
- * columns with a fixed `__actions` column prepended / appended per
9
- * `placement` — and opts the table into per-row `$actions` while the column
10
- * is shown.
11
- */
12
- function useRowActionsColumn(state, opts) {
13
- watch(() => {
14
- const placement = opts.placement();
15
- if (!placement) return false;
16
- if (placement === "merge-select" && opts.select() !== "none") return false;
17
- return state.actions.cellRow.length > 0;
18
- }, (on) => {
19
- state.includeActions.value = on;
20
- }, { immediate: true });
21
- const actionsCol = computed(() => {
22
- const acts = state.actions.row;
23
- return {
24
- path: ROW_ACTIONS_PATH,
25
- label: "",
26
- type: ROW_ACTIONS_TYPE,
27
- sortable: false,
28
- filterable: false,
29
- nullable: false,
30
- order: 0,
31
- fixed: true,
32
- width: acts.length === 1 && !acts[0]?.icon ? "8em" : "4em"
33
- };
34
- });
35
- return computed(() => {
36
- const base = opts.columns();
37
- const placement = opts.placement();
38
- if (placement === false || placement === void 0) return base;
39
- if (state.actions.row.length === 0) return base;
40
- if (placement === "first") return [actionsCol.value, ...base];
41
- if (placement === "last") return [...base, actionsCol.value];
42
- if (opts.select() === "none") return [actionsCol.value, ...base];
43
- return base;
44
- });
45
- }
46
- //#endregion
47
- //#region src/composables/use-table-column-handlers.ts
48
- /**
49
- * Pure pass-through handlers shared between the pagination renderer
50
- * (`<AsTable>`) and the window renderer (`<AsWindowTableBase>`). Selection
51
- * and row-mouse handlers stay in their owning components because their
52
- * semantics diverge meaningfully (window has no "all" state; standalone
53
- * vs Reka renderModes need different gating).
54
- */
55
- function useTableColumnHandlers(state) {
56
- return {
57
- onSort(column, direction) {
58
- state.sorters.value = direction === null ? [] : [{
59
- field: column.path,
60
- direction
61
- }];
62
- },
63
- onHide(column) {
64
- state.columnNames.value = state.columnNames.value.filter((n) => n !== column.path);
65
- },
66
- onFilter(column) {
67
- state.openFilterDialog(column);
68
- },
69
- onFiltersOff(column) {
70
- state.removeFieldFilter(column.path);
71
- },
72
- onResetWidth(column) {
73
- state.resetColumnWidth(column.path);
74
- },
75
- onReorder(fromPath, toPath, position) {
76
- state.columnNames.value = reorderColumnNames(state.columnNames.value, fromPath, toPath, position);
77
- },
78
- onClearFilters() {
79
- state.resetFilters();
80
- if (state.searchTerm.value) state.searchTerm.value = "";
81
- }
82
- };
83
- }
84
- //#endregion
85
- export { useRowActionsColumn as n, useTableColumnHandlers as t };
@@ -1,96 +0,0 @@
1
- const require_use_table_state = require("./use-table-state-Ddr2UZzB.cjs");
2
- let vue = require("vue");
3
- let _atscript_ui_table = require("@atscript/ui-table");
4
- //#region src/composables/use-row-actions-column.ts
5
- /**
6
- * The synthesised row-actions pseudo-column, shared by `<AsTable>` and
7
- * `<AsWindowTable>`. Returns the renderer's effective column list — the base
8
- * columns with a fixed `__actions` column prepended / appended per
9
- * `placement` — and opts the table into per-row `$actions` while the column
10
- * is shown.
11
- */
12
- function useRowActionsColumn(state, opts) {
13
- (0, vue.watch)(() => {
14
- const placement = opts.placement();
15
- if (!placement) return false;
16
- if (placement === "merge-select" && opts.select() !== "none") return false;
17
- return state.actions.cellRow.length > 0;
18
- }, (on) => {
19
- state.includeActions.value = on;
20
- }, { immediate: true });
21
- const actionsCol = (0, vue.computed)(() => {
22
- const acts = state.actions.row;
23
- return {
24
- path: require_use_table_state.ROW_ACTIONS_PATH,
25
- label: "",
26
- type: require_use_table_state.ROW_ACTIONS_TYPE,
27
- sortable: false,
28
- filterable: false,
29
- nullable: false,
30
- order: 0,
31
- fixed: true,
32
- width: acts.length === 1 && !acts[0]?.icon ? "8em" : "4em"
33
- };
34
- });
35
- return (0, vue.computed)(() => {
36
- const base = opts.columns();
37
- const placement = opts.placement();
38
- if (placement === false || placement === void 0) return base;
39
- if (state.actions.row.length === 0) return base;
40
- if (placement === "first") return [actionsCol.value, ...base];
41
- if (placement === "last") return [...base, actionsCol.value];
42
- if (opts.select() === "none") return [actionsCol.value, ...base];
43
- return base;
44
- });
45
- }
46
- //#endregion
47
- //#region src/composables/use-table-column-handlers.ts
48
- /**
49
- * Pure pass-through handlers shared between the pagination renderer
50
- * (`<AsTable>`) and the window renderer (`<AsWindowTableBase>`). Selection
51
- * and row-mouse handlers stay in their owning components because their
52
- * semantics diverge meaningfully (window has no "all" state; standalone
53
- * vs Reka renderModes need different gating).
54
- */
55
- function useTableColumnHandlers(state) {
56
- return {
57
- onSort(column, direction) {
58
- state.sorters.value = direction === null ? [] : [{
59
- field: column.path,
60
- direction
61
- }];
62
- },
63
- onHide(column) {
64
- state.columnNames.value = state.columnNames.value.filter((n) => n !== column.path);
65
- },
66
- onFilter(column) {
67
- state.openFilterDialog(column);
68
- },
69
- onFiltersOff(column) {
70
- state.removeFieldFilter(column.path);
71
- },
72
- onResetWidth(column) {
73
- state.resetColumnWidth(column.path);
74
- },
75
- onReorder(fromPath, toPath, position) {
76
- state.columnNames.value = (0, _atscript_ui_table.reorderColumnNames)(state.columnNames.value, fromPath, toPath, position);
77
- },
78
- onClearFilters() {
79
- state.resetFilters();
80
- if (state.searchTerm.value) state.searchTerm.value = "";
81
- }
82
- };
83
- }
84
- //#endregion
85
- Object.defineProperty(exports, "useRowActionsColumn", {
86
- enumerable: true,
87
- get: function() {
88
- return useRowActionsColumn;
89
- }
90
- });
91
- Object.defineProperty(exports, "useTableColumnHandlers", {
92
- enumerable: true,
93
- get: function() {
94
- return useTableColumnHandlers;
95
- }
96
- });