@atscript/vue-table 0.1.132 → 0.1.134

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 (163) hide show
  1. package/dist/as-action-form-dialog.cjs +42 -30
  2. package/dist/as-action-form-dialog.mjs +42 -30
  3. package/dist/{as-action-menu-content-C5qx9MPE.cjs → as-action-menu-content-C_D_Fepo.cjs} +1 -1
  4. package/dist/{as-action-menu-content-4UfcabUe.mjs → as-action-menu-content-rim8hAO9.mjs} +1 -1
  5. package/dist/{as-cell-array-2qmJ1lT2.mjs → as-cell-array-BWHkJX3I.mjs} +2 -2
  6. package/dist/{as-cell-array-iPeUnk2G.cjs → as-cell-array-D-8Pqlgo.cjs} +2 -2
  7. package/dist/as-cell-array.cjs +1 -1
  8. package/dist/as-cell-array.mjs +1 -1
  9. package/dist/{as-cell-date-DyixWKuS.cjs → as-cell-date-DviMJEqs.cjs} +2 -2
  10. package/dist/{as-cell-date-BwFgi6O0.mjs → as-cell-date-mGlnDeLP.mjs} +2 -2
  11. package/dist/as-cell-date.cjs +1 -1
  12. package/dist/as-cell-date.mjs +1 -1
  13. package/dist/{as-cell-json--95Xq6yq.mjs → as-cell-json-2I081xnO.mjs} +2 -2
  14. package/dist/{as-cell-json-Bvv2P7YV.cjs → as-cell-json-CaVB6e7V.cjs} +2 -2
  15. package/dist/as-cell-json.cjs +1 -1
  16. package/dist/as-cell-json.mjs +1 -1
  17. package/dist/{as-cell-number-DuPMOesI.cjs → as-cell-number-BnYbxOiG.cjs} +2 -2
  18. package/dist/{as-cell-number-DKRaS9pM.mjs → as-cell-number-CP2AZI9g.mjs} +2 -2
  19. package/dist/as-cell-number.cjs +1 -1
  20. package/dist/as-cell-number.mjs +1 -1
  21. package/dist/{as-cell-union-DJNsEKTi.cjs → as-cell-union-BjMP91PS.cjs} +3 -3
  22. package/dist/{as-cell-union-C9FukGqF.mjs → as-cell-union-NHpDCXty.mjs} +3 -3
  23. package/dist/as-cell-union.cjs +1 -1
  24. package/dist/as-cell-union.mjs +1 -1
  25. package/dist/as-column-menu.cjs +1 -1
  26. package/dist/as-column-menu.d.cts +1 -1
  27. package/dist/as-column-menu.d.mts +1 -1
  28. package/dist/as-column-menu.mjs +1 -1
  29. package/dist/{as-column-menu.vue-u_DNy3f-.d.cts → as-column-menu.vue-De7SRhj6.d.cts} +1 -1
  30. package/dist/{as-column-menu.vue-DL5N9mKR.d.mts → as-column-menu.vue-Dg0H1dOd.d.mts} +1 -1
  31. package/dist/{as-config-dialog-BehfqIGd.mjs → as-config-dialog-BUBHiVlf.mjs} +56 -35
  32. package/dist/{as-config-dialog-BOYWPYYH.cjs → as-config-dialog-DvBptYMS.cjs} +55 -34
  33. package/dist/as-config-dialog.cjs +1 -1
  34. package/dist/as-config-dialog.mjs +1 -1
  35. package/dist/{as-confirm-dialog-UwhDHysk.cjs → as-confirm-dialog-ByMfIG0A.cjs} +12 -9
  36. package/dist/{as-confirm-dialog-bpN4A-KN.mjs → as-confirm-dialog-G4ZoL_Xo.mjs} +12 -9
  37. package/dist/as-confirm-dialog.cjs +1 -1
  38. package/dist/as-confirm-dialog.mjs +1 -1
  39. package/dist/{as-filter-dialog-D1qzq-8b.mjs → as-filter-dialog-BJWH8cvc.mjs} +34 -26
  40. package/dist/{as-filter-dialog-Dh2Ylthb.cjs → as-filter-dialog-C2oyT0yt.cjs} +33 -25
  41. package/dist/as-filter-dialog.cjs +1 -1
  42. package/dist/as-filter-dialog.mjs +1 -1
  43. package/dist/{as-filter-field-DirBmnbb.mjs → as-filter-field-B2skq4K0.mjs} +4 -4
  44. package/dist/{as-filter-field-DRsDJdpx.cjs → as-filter-field-DxGfasQj.cjs} +4 -4
  45. package/dist/as-filter-field.cjs +1 -1
  46. package/dist/as-filter-field.mjs +1 -1
  47. package/dist/as-filter-input.cjs +1 -1
  48. package/dist/as-filter-input.mjs +1 -1
  49. package/dist/as-filters-Bhte22La.cjs +130 -0
  50. package/dist/as-filters-DogNVlqr.mjs +125 -0
  51. package/dist/as-filters.cjs +1 -1
  52. package/dist/as-filters.d.cts +1 -1
  53. package/dist/as-filters.d.mts +1 -1
  54. package/dist/as-filters.mjs +1 -1
  55. package/dist/as-filters.vue-BG_ysCkC.d.mts +65 -0
  56. package/dist/as-filters.vue-DcxDnWAU.d.cts +65 -0
  57. package/dist/{as-preset-dialog-CDqCAR7N.mjs → as-preset-dialog-BwHV6Y77.mjs} +71 -21
  58. package/dist/{as-preset-dialog-DpM06jqR.cjs → as-preset-dialog-D2a6nxEX.cjs} +75 -25
  59. package/dist/as-preset-dialog.cjs +1 -1
  60. package/dist/as-preset-dialog.mjs +1 -1
  61. package/dist/{as-preset-picker-CISaxEZ0.mjs → as-preset-picker-B0JnyAPA.mjs} +39 -15
  62. package/dist/{as-preset-picker-jUS_YDX8.cjs → as-preset-picker-DbkmapBx.cjs} +45 -21
  63. package/dist/as-preset-picker.cjs +1 -1
  64. package/dist/as-preset-picker.mjs +1 -1
  65. package/dist/{as-row-actions-xqJeAdQl.mjs → as-row-actions-BkIsJVBm.mjs} +24 -11
  66. package/dist/{as-row-actions-Bm6Bzyno.cjs → as-row-actions-CRg8LHGk.cjs} +24 -11
  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-Bvcc2tUN.d.cts → as-row-actions.vue-VpJsBAJ4.d.mts} +8 -0
  72. package/dist/{as-row-actions.vue-DUSDuoR2.d.mts → as-row-actions.vue-dn_DKcMm.d.cts} +8 -0
  73. package/dist/{as-table-CDSG2yED.mjs → as-table-BEvsX87E.mjs} +26 -8
  74. package/dist/{as-table-actions-DMxeaczm.mjs → as-table-actions-B5upF1bQ.mjs} +69 -18
  75. package/dist/{as-table-actions-gV4lqqxc.cjs → as-table-actions-B6sKd4sl.cjs} +68 -17
  76. package/dist/as-table-actions.cjs +1 -1
  77. package/dist/as-table-actions.d.cts +1 -1
  78. package/dist/as-table-actions.d.mts +1 -1
  79. package/dist/as-table-actions.mjs +1 -1
  80. package/dist/{as-table-actions.vue-B-cgiCXP.d.cts → as-table-actions.vue-CoxhpIlJ.d.mts} +2 -2
  81. package/dist/{as-table-actions.vue-ClMa0OD1.d.mts → as-table-actions.vue-Kic8m28V.d.cts} +2 -2
  82. package/dist/{as-table-base-BaTE3VSN.mjs → as-table-base-BxKBdIdS.mjs} +142 -47
  83. package/dist/{as-table-base-RG2TEIgV.cjs → as-table-base-DLuhKz69.cjs} +142 -47
  84. package/dist/{as-table-cell-value-D1JkTQt0.cjs → as-table-cell-value-BAi5yadc.cjs} +2 -2
  85. package/dist/{as-table-cell-value-CPcFxSOj.mjs → as-table-cell-value-BVcfhhCb.mjs} +2 -2
  86. package/dist/as-table-cell-value.cjs +1 -1
  87. package/dist/as-table-cell-value.mjs +1 -1
  88. package/dist/{as-table-header-cell-CIqlO6Lw.cjs → as-table-header-cell-Bv6q5iKA.cjs} +2 -2
  89. package/dist/{as-table-header-cell-Bdhl5Lox.mjs → as-table-header-cell-Xd3cvnII.mjs} +2 -2
  90. package/dist/as-table-header-cell.cjs +1 -1
  91. package/dist/as-table-header-cell.d.cts +1 -1
  92. package/dist/as-table-header-cell.d.mts +1 -1
  93. package/dist/as-table-header-cell.mjs +1 -1
  94. package/dist/{as-table-header-cell.vue-BCszzxtU.d.mts → as-table-header-cell.vue-AS6u4e6v.d.cts} +2 -2
  95. package/dist/{as-table-header-cell.vue-BzTzfGRo.d.cts → as-table-header-cell.vue-zKOmlzhT.d.mts} +2 -2
  96. package/dist/{as-table-root-BLReUbRH.mjs → as-table-root-C1A6JkwL.mjs} +112 -10
  97. package/dist/{as-table-root-DLJ_3Jf4.cjs → as-table-root-DlYjnZax.cjs} +112 -10
  98. package/dist/as-table-root.cjs +1 -1
  99. package/dist/as-table-root.d.cts +1 -1
  100. package/dist/as-table-root.d.mts +1 -1
  101. package/dist/as-table-root.mjs +1 -1
  102. package/dist/{as-table-root.vue-QMT93qPk.d.mts → as-table-root.vue-CWk9YgpG.d.mts} +257 -41
  103. package/dist/{as-table-root.vue-D0T3n-Vm.d.cts → as-table-root.vue-D94eypcL.d.cts} +258 -42
  104. package/dist/{as-table-status-Du4WLF4k.cjs → as-table-status-B2HPerJT.cjs} +54 -38
  105. package/dist/{as-table-status-DGTZlpyq.mjs → as-table-status-QzlBdSiR.mjs} +54 -38
  106. package/dist/{as-table-BWUPzjRn.cjs → as-table-vJbZyZVx.cjs} +26 -8
  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-table.vue-Ds7MEp37.d.cts → as-table.vue-BB1vaNL6.d.cts} +28 -4
  112. package/dist/{as-table.vue-Ce5606ZO.d.mts → as-table.vue-BUDFTCpo.d.mts} +28 -4
  113. package/dist/{as-window-table-DWujiUQy.mjs → as-window-table-BH0tDDnr.mjs} +107 -24
  114. package/dist/{as-window-table-jD_y9yet.cjs → as-window-table-Bl_q72WL.cjs} +107 -24
  115. package/dist/as-window-table.cjs +1 -1
  116. package/dist/as-window-table.d.cts +1 -1
  117. package/dist/as-window-table.d.mts +1 -1
  118. package/dist/as-window-table.mjs +1 -1
  119. package/dist/{as-window-table.vue-DfZF1Mux.d.mts → as-window-table.vue-Be2IA0Eb.d.cts} +27 -4
  120. package/dist/{as-window-table.vue-Bhf9BK8E.d.cts → as-window-table.vue-CLqFM2ff.d.mts} +27 -4
  121. package/dist/error-message-CfKpn_5w.cjs +18 -0
  122. package/dist/error-message-gNEXnnbb.mjs +13 -0
  123. package/dist/index.cjs +237 -41
  124. package/dist/index.d.cts +10 -10
  125. package/dist/index.d.mts +10 -10
  126. package/dist/index.mjs +230 -43
  127. package/dist/{types-ByU4O0Yf.d.mts → types--ex8BJIO.d.cts} +263 -5
  128. package/dist/{types-CTMxE_zA.d.cts → types-CBGaTR2Z.d.mts} +263 -5
  129. package/dist/{use-table-CyFcVtUN.mjs → use-table-BFhbfWgY.mjs} +48 -23
  130. package/dist/{use-table-component-K6xj1obF.mjs → use-table-component-CRmLHdqi.mjs} +1 -1
  131. package/dist/{use-table-component-DO_kvKSf.cjs → use-table-component-DS5NJPzs.cjs} +1 -1
  132. package/dist/{use-table-nav-bridge-uOQUDooh.cjs → use-table-nav-bridge-DS14D_rG.cjs} +1 -1
  133. package/dist/{use-table-nav-bridge-DeGeaQX-.mjs → use-table-nav-bridge-DzJN5v9a.mjs} +1 -1
  134. package/dist/{use-table-nvBq1dZ4.cjs → use-table-nvuZdgUd.cjs} +51 -20
  135. package/dist/{use-table-state-BxX3SpeW.mjs → use-table-state-mBXx11aH.mjs} +501 -105
  136. package/dist/{use-table-state-Oi2ds4_a.cjs → use-table-state-mhm-YWnu.cjs} +541 -109
  137. package/package.json +9 -9
  138. package/dist/as-filters-DCZTHjf5.cjs +0 -51
  139. package/dist/as-filters-beIud9sF.mjs +0 -46
  140. package/dist/as-filters.vue-DmECMd1v.d.mts +0 -10
  141. package/dist/as-filters.vue-fv-tRL2H.d.cts +0 -10
  142. package/dist/preset-aspect-display-IICxAlVo.mjs +0 -43
  143. package/dist/preset-aspect-display-TWwf6j1B.cjs +0 -72
  144. /package/dist/{as-cell-json-popover-Dkdv5Y9E.mjs → as-cell-json-popover-CH5bAcLE.mjs} +0 -0
  145. /package/dist/{as-cell-json-popover-BM2QLgfk.cjs → as-cell-json-popover-vty5vMjW.cjs} +0 -0
  146. /package/dist/{as-column-menu-kTIQfLTi.mjs → as-column-menu-BMTS3DO2.mjs} +0 -0
  147. /package/dist/{as-column-menu-fZVbJ9lU.cjs → as-column-menu-D_8NxujZ.cjs} +0 -0
  148. /package/dist/{as-filter-input-BM23TNeh.mjs → as-filter-input-C8KmOus8.mjs} +0 -0
  149. /package/dist/{as-filter-input-DJu2k9gO.cjs → as-filter-input-DUqpkTkg.cjs} +0 -0
  150. /package/dist/{format-cell-D1Ziv96Q.mjs → format-cell-Bx7wNc4X.mjs} +0 -0
  151. /package/dist/{format-cell-vCNTh4WZ.cjs → format-cell-DaxV6WIJ.cjs} +0 -0
  152. /package/dist/{get-cell-value-4rHKP-TG.cjs → get-cell-value-CJT4fk4y.cjs} +0 -0
  153. /package/dist/{get-cell-value-C8LLc_Rr.mjs → get-cell-value-Cb3X8nUn.mjs} +0 -0
  154. /package/dist/{use-cell-locale-MQXoONh5.mjs → use-cell-locale-CxQOQsns.mjs} +0 -0
  155. /package/dist/{use-cell-locale-BGBRQB7s.cjs → use-cell-locale-caG2Fzpc.cjs} +0 -0
  156. /package/dist/{use-has-emit-listener-hhOH8CBI.cjs → use-has-emit-listener-BaGFZDyM.cjs} +0 -0
  157. /package/dist/{use-has-emit-listener-BTMDIv2e.mjs → use-has-emit-listener-DrBbsLHQ.mjs} +0 -0
  158. /package/dist/{use-seed-on-open-Dg9I89fU.cjs → use-seed-on-open-9TSm1Vbv.cjs} +0 -0
  159. /package/dist/{use-seed-on-open-DO3A1kIb.mjs → use-seed-on-open-DSh4XFyp.mjs} +0 -0
  160. /package/dist/{use-table-column-handlers-ehreEzcx.cjs → use-table-column-handlers-BMrP0WY2.cjs} +0 -0
  161. /package/dist/{use-table-column-handlers-CpiiIniD.mjs → use-table-column-handlers-Bx3JERqs.mjs} +0 -0
  162. /package/dist/{use-table-selection-Cmiu1h4S.cjs → use-table-selection-DtCV3rhu.cjs} +0 -0
  163. /package/dist/{use-table-selection-C84z4OZy.mjs → use-table-selection-ULbKT2xW.mjs} +0 -0
@@ -1,5 +1,5 @@
1
- const require_use_table_state = require("./use-table-state-Oi2ds4_a.cjs");
2
- const require_as_action_menu_content = require("./as-action-menu-content-C5qx9MPE.cjs");
1
+ const require_use_table_state = require("./use-table-state-mhm-YWnu.cjs");
2
+ const require_as_action_menu_content = require("./as-action-menu-content-C_D_Fepo.cjs");
3
3
  let vue = require("vue");
4
4
  let reka_ui = require("reka-ui");
5
5
  //#region src/components/as-table-actions.vue?vue&type=script&setup=true&lang.ts
@@ -8,6 +8,12 @@ const _hoisted_1 = {
8
8
  class: "as-table-actions"
9
9
  };
10
10
  const _hoisted_2 = { class: "as-table-actions-btn-label" };
11
+ const _hoisted_3 = ["aria-label", "aria-busy"];
12
+ const _hoisted_4 = {
13
+ class: "sr-only",
14
+ role: "status",
15
+ "aria-live": "polite"
16
+ };
11
17
  //#endregion
12
18
  //#region src/components/as-table-actions.vue
13
19
  var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -40,7 +46,7 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
40
46
  const preferredId = (0, vue.computed)(() => state.tableDef.value?.preferredId ?? []);
41
47
  const resolved = (0, vue.computed)(() => {
42
48
  const r = resolveBuckets();
43
- const defaultHref = r.defaultAction ? require_use_table_state.actionHref(state, r.defaultAction, r.ids[0]) : void 0;
49
+ const defaultHref = r.defaultAction ? require_use_table_state.rowActionHref(state, r.defaultAction, r.ids[0], r.row) : void 0;
44
50
  return {
45
51
  ...r,
46
52
  defaultHref,
@@ -61,17 +67,21 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
61
67
  });
62
68
  if (effectiveLevel === "row") {
63
69
  const source = explicit === "auto" && selectedCount === 1 ? state.selectedRows.value[0] : state.getActiveRow();
64
- const filtered = require_use_table_state.applyRowGate({
70
+ const policy = state.rowActionsPolicy.value;
71
+ const filtered = policy.apply(require_use_table_state.applyRowGate({
65
72
  default: state.actions.default.row,
66
73
  others: state.actions.others.row,
67
74
  rows: explicit === "auto" && selectedCount === 1 ? state.actions.rows : []
68
- }, source);
75
+ }, source));
76
+ const row = source;
77
+ const extra = policy.extra(row);
69
78
  return collapseSingle({
70
79
  defaultAction: filtered.default,
71
- otherActions: filtered.others,
80
+ otherActions: extra.length > 0 ? [...filtered.others, ...extra] : filtered.others,
72
81
  trailingRowActions: filtered.rows,
73
82
  level: "row",
74
- ids: require_use_table_state.collectIdentifiers(state, [source], pid)
83
+ ids: require_use_table_state.collectIdentifiers(state, [source], pid),
84
+ row
75
85
  });
76
86
  }
77
87
  const filtered = require_use_table_state.applyRowsGate({
@@ -91,7 +101,8 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
91
101
  function promptCtx() {
92
102
  return {
93
103
  identifiers: resolved.value.ids,
94
- preferredId: preferredId.value
104
+ preferredId: preferredId.value,
105
+ row: resolved.value.row
95
106
  };
96
107
  }
97
108
  async function invokeWith(action, event) {
@@ -99,9 +110,46 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
99
110
  }
100
111
  /** Resolved navigate href for `action` against the toolbar's current ids. */
101
112
  function hrefFor(action) {
102
- return require_use_table_state.actionHref(state, action, resolved.value.ids[0]);
113
+ return require_use_table_state.rowActionHref(state, action, resolved.value.ids[0], resolved.value.row);
103
114
  }
104
115
  const { onTriggerClick, onTriggerAuxClick, openNewTab } = require_use_table_state.createNavigateGestures(state, promptCtx, hrefFor);
116
+ const running = (0, vue.computed)(() => state.actions.invoking.value);
117
+ function isRunning(action) {
118
+ return action !== void 0 && running.value.has(action.name);
119
+ }
120
+ /** Accessible name for a trigger, suffixed while its action is in flight. */
121
+ function triggerLabel(action) {
122
+ const label = require_use_table_state.ariaLabelFor(action);
123
+ return isRunning(action) ? `${label}, running` : label;
124
+ }
125
+ const menuBusy = (0, vue.computed)(() => resolved.value.otherActions.some((a) => isRunning(a)) || resolved.value.trailingRowActions.some((a) => isRunning(a)));
126
+ const liveMessage = (0, vue.ref)("");
127
+ const startedLabels = /* @__PURE__ */ new Map();
128
+ function labelOfName(name) {
129
+ const cached = startedLabels.get(name);
130
+ if (cached !== void 0) return cached;
131
+ for (const bucket of [
132
+ state.actions.table,
133
+ state.actions.row,
134
+ state.actions.rows
135
+ ]) for (const a of bucket) if (a.name === name) return require_use_table_state.ariaLabelFor(a);
136
+ return name;
137
+ }
138
+ (0, vue.watch)(running, (next, prev) => {
139
+ const before = prev ?? /* @__PURE__ */ new Set();
140
+ for (const name of next) {
141
+ if (before.has(name)) continue;
142
+ const label = labelOfName(name);
143
+ startedLabels.set(name, label);
144
+ liveMessage.value = `${label} running`;
145
+ }
146
+ for (const name of before) {
147
+ if (next.has(name)) continue;
148
+ const label = labelOfName(name);
149
+ startedLabels.delete(name);
150
+ liveMessage.value = `${label} ${state.actions.lastResult.value.get(name)?.ok ? "finished" : "failed"}`;
151
+ }
152
+ });
105
153
  return (_ctx, _cache) => {
106
154
  return hasAny.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1, [(0, vue.renderSlot)(_ctx.$slots, "default", {
107
155
  defaultAction: resolved.value.defaultAction,
@@ -116,8 +164,9 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
116
164
  type: resolved.value.defaultAsLink ? void 0 : "button",
117
165
  class: (0, vue.normalizeClass)(["as-table-actions-btn", (0, vue.unref)(require_use_table_state.intentClass)("as-table-actions", resolved.value.defaultAction)]),
118
166
  "data-default": "",
119
- "aria-label": (0, vue.unref)(require_use_table_state.ariaLabelFor)(resolved.value.defaultAction),
167
+ "aria-label": triggerLabel(resolved.value.defaultAction),
120
168
  title: (0, vue.unref)(require_use_table_state.ariaLabelFor)(resolved.value.defaultAction),
169
+ "aria-busy": isRunning(resolved.value.defaultAction) ? "true" : void 0,
121
170
  onClick: _cache[0] || (_cache[0] = ($event) => (0, vue.unref)(onTriggerClick)(resolved.value.defaultAction, resolved.value.defaultHref, resolved.value.defaultAsLink, $event)),
122
171
  onAuxclick: _cache[1] || (_cache[1] = ($event) => (0, vue.unref)(onTriggerAuxClick)(resolved.value.defaultAction, resolved.value.defaultHref, resolved.value.defaultAsLink, $event))
123
172
  }, {
@@ -132,21 +181,23 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
132
181
  "type",
133
182
  "class",
134
183
  "aria-label",
135
- "title"
184
+ "title",
185
+ "aria-busy"
136
186
  ])) : (0, vue.createCommentVNode)("v-if", true), resolved.value.otherActions.length > 0 || resolved.value.trailingRowActions.length > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.DropdownMenuRoot), {
137
187
  key: 1,
138
188
  modal: false
139
189
  }, {
140
190
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.DropdownMenuTrigger), { "as-child": "" }, {
141
- default: (0, vue.withCtx)(() => [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("button", {
191
+ default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("button", {
142
192
  type: "button",
143
193
  class: "as-table-actions-more",
144
- "aria-label": "More actions",
145
- title: "More actions"
146
- }, [(0, vue.createElementVNode)("span", {
194
+ "aria-label": menuBusy.value ? "More actions, running" : "More actions",
195
+ title: "More actions",
196
+ "aria-busy": menuBusy.value ? "true" : void 0
197
+ }, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", {
147
198
  class: "i-as-menu",
148
199
  "aria-hidden": "true"
149
- })], -1)])]),
200
+ }, null, -1)])], 8, _hoisted_3)]),
150
201
  _: 1
151
202
  }), (0, vue.createVNode)((0, vue.unref)(reka_ui.DropdownMenuPortal), null, {
152
203
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)(require_as_action_menu_content.as_action_menu_content_default, {
@@ -163,7 +214,7 @@ var as_table_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
163
214
  _: 3
164
215
  })]),
165
216
  _: 3
166
- })) : (0, vue.createCommentVNode)("v-if", true)])])) : (0, vue.createCommentVNode)("v-if", true);
217
+ })) : (0, vue.createCommentVNode)("v-if", true)]), (0, vue.createElementVNode)("span", _hoisted_4, (0, vue.toDisplayString)(liveMessage.value), 1)])) : (0, vue.createCommentVNode)("v-if", true);
167
218
  };
168
219
  }
169
220
  });
@@ -1,2 +1,2 @@
1
- const require_as_table_actions = require("./as-table-actions-gV4lqqxc.cjs");
1
+ const require_as_table_actions = require("./as-table-actions-B6sKd4sl.cjs");
2
2
  module.exports = require_as_table_actions.as_table_actions_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-actions.vue-B-cgiCXP.cjs";
1
+ import { t as _default } from "./as-table-actions.vue-Kic8m28V.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-actions.vue-ClMa0OD1.mjs";
1
+ import { t as _default } from "./as-table-actions.vue-CoxhpIlJ.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_table_actions_default } from "./as-table-actions-DMxeaczm.mjs";
1
+ import { t as as_table_actions_default } from "./as-table-actions-B5upF1bQ.mjs";
2
2
  export { as_table_actions_default as default };
@@ -1,4 +1,4 @@
1
- import { h as TVueTableActionInfo } from "./types-CTMxE_zA.cjs";
1
+ import { S as TVueTableActionInfo } from "./types-CBGaTR2Z.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/as-table-actions.vue.d.ts
@@ -18,7 +18,7 @@ declare var __VLS_1: {
18
18
  defaultAction: TVueTableActionInfo | undefined;
19
19
  otherActions: TVueTableActionInfo[];
20
20
  trailingRowActions: TVueTableActionInfo[];
21
- level: "row" | "table" | "rows";
21
+ level: "rows" | "table" | "row";
22
22
  ids: Record<string, unknown>[];
23
23
  invoke: typeof invokeWith;
24
24
  }, __VLS_12: {
@@ -1,4 +1,4 @@
1
- import { h as TVueTableActionInfo } from "./types-ByU4O0Yf.mjs";
1
+ import { S as TVueTableActionInfo } from "./types--ex8BJIO.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/as-table-actions.vue.d.ts
@@ -18,7 +18,7 @@ declare var __VLS_1: {
18
18
  defaultAction: TVueTableActionInfo | undefined;
19
19
  otherActions: TVueTableActionInfo[];
20
20
  trailingRowActions: TVueTableActionInfo[];
21
- level: "row" | "table" | "rows";
21
+ level: "rows" | "table" | "row";
22
22
  ids: Record<string, unknown>[];
23
23
  invoke: typeof invokeWith;
24
24
  }, __VLS_12: {
@@ -1,6 +1,6 @@
1
- import { o as useTableContextOptional } from "./use-table-state-BxX3SpeW.mjs";
2
- import { t as getCellValue } from "./get-cell-value-C8LLc_Rr.mjs";
3
- import { a as useCellComponents, 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-DGTZlpyq.mjs";
1
+ import { o as useTableContextOptional, p as onSelectControlKeydown } from "./use-table-state-mBXx11aH.mjs";
2
+ import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
3
+ import { a as useCellComponents, 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-QzlBdSiR.mjs";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, watch, withCtx } from "vue";
5
5
  import { DEFAULT_ROW_HEIGHT_PX, filledFilterCount } from "@atscript/ui-table";
6
6
  import { useParentElement, useResizeObserver } from "@vueuse/core";
@@ -160,6 +160,7 @@ const _hoisted_6 = [
160
160
  "id",
161
161
  "aria-rowindex",
162
162
  "aria-selected",
163
+ "data-selectable",
163
164
  "onClick",
164
165
  "onDblclick"
165
166
  ];
@@ -168,16 +169,24 @@ const _hoisted_7 = {
168
169
  class: "as-td-select",
169
170
  role: "gridcell"
170
171
  };
171
- const _hoisted_8 = {
172
+ const _hoisted_8 = [
173
+ "tabindex",
174
+ "aria-checked",
175
+ "aria-disabled",
176
+ "aria-label",
177
+ "title",
178
+ "onKeydown"
179
+ ];
180
+ const _hoisted_9 = {
172
181
  key: 0,
173
182
  class: "as-table-checkbox-tick",
174
183
  "aria-hidden": "true"
175
184
  };
176
- const _hoisted_9 = {
185
+ const _hoisted_10 = {
177
186
  key: 0,
178
187
  role: "gridcell"
179
188
  };
180
- const _hoisted_10 = {
189
+ const _hoisted_11 = {
181
190
  key: 3,
182
191
  class: "as-td-filler",
183
192
  role: "gridcell"
@@ -289,6 +298,14 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
289
298
  type: Boolean,
290
299
  required: false,
291
300
  default: false
301
+ },
302
+ rowClass: {
303
+ type: Function,
304
+ required: false
305
+ },
306
+ rowAttrs: {
307
+ type: Function,
308
+ required: false
292
309
  }
293
310
  },
294
311
  emits: [
@@ -314,14 +331,69 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
314
331
  const isListbox = computed(() => props.renderMode === "listbox");
315
332
  const isRekaWrapped = computed(() => isCombobox.value || isListbox.value);
316
333
  const hasValue = computed(() => isRekaWrapped.value || props.select !== "none");
334
+ const SELECTABLE = Object.freeze({ ok: true });
335
+ const DEFAULT_ROW_META = Object.freeze({
336
+ selectable: SELECTABLE,
337
+ cls: void 0,
338
+ attrs: void 0
339
+ });
340
+ const rowHooks = computed(() => {
341
+ const rows = props.rows;
342
+ if (!isStandalone.value) return {
343
+ metas: [],
344
+ selectable: rows.length,
345
+ selected: 0
346
+ };
347
+ const gated = !!ctx?.state.rowSelectable.value;
348
+ if (!gated && !props.rowClass && !props.rowAttrs) {
349
+ let selected = 0;
350
+ for (const row of rows) if (isPkSelected(row)) selected++;
351
+ return {
352
+ metas: [],
353
+ selectable: rows.length,
354
+ selected
355
+ };
356
+ }
357
+ let selectable = 0;
358
+ let selected = 0;
359
+ return {
360
+ metas: rows.map((row, index) => {
361
+ const hookCtx = {
362
+ index,
363
+ get selected() {
364
+ return isPkSelected(row);
365
+ }
366
+ };
367
+ const verdict = gated ? ctx.state.isRowSelectable(row, index) : SELECTABLE;
368
+ if (verdict.ok) {
369
+ selectable++;
370
+ if (isPkSelected(row)) selected++;
371
+ }
372
+ return {
373
+ selectable: verdict,
374
+ cls: props.rowClass?.(row, hookCtx),
375
+ attrs: props.rowAttrs?.(row, hookCtx)
376
+ };
377
+ }),
378
+ selectable,
379
+ selected
380
+ };
381
+ });
382
+ function metaFor(index) {
383
+ return rowHooks.value.metas[index] ?? DEFAULT_ROW_META;
384
+ }
385
+ /** Accessible name for a row's selection control, carrying the disabled reason. */
386
+ function selectLabel(verdict) {
387
+ if (verdict.ok) return "Select row";
388
+ return verdict.reason ? `Select row, ${verdict.reason}` : "Select row, not selectable";
389
+ }
317
390
  const hasActiveFilters = computed(() => props.filters ? filledFilterCount(props.filters) > 0 : false);
318
391
  const showSelectAllCheckbox = computed(() => isStandalone.value && props.select === "multi" && !!props.selectedRows);
319
392
  const selectAllState = computed(() => {
320
393
  if (!showSelectAllCheckbox.value) return void 0;
321
- const sel = props.selectedRows ?? [];
322
- if (sel.length === 0) return "none";
323
- if (sel.length === props.rows.length && props.rows.length > 0) return "all";
324
- return "some";
394
+ if ((props.selectedRows ?? []).length === 0) return "none";
395
+ const { selectable, selected } = rowHooks.value;
396
+ return selectable > 0 && selected >= selectable ? "all" : "some";
325
397
  });
326
398
  const emit = __emit;
327
399
  const slots = useSlots();
@@ -360,6 +432,11 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
360
432
  if (!isStandalone.value || !ctx) return;
361
433
  ctx.state.handleNavKey(event, { mode: props.select });
362
434
  }
435
+ /** Space on a row's selection control toggles just that row. */
436
+ function onSelectCellKeydown(event, index) {
437
+ if (!ctx) return;
438
+ onSelectControlKeydown(event, index, props.select, ctx.state);
439
+ }
363
440
  const scrollContainerRef = ref(null);
364
441
  function alignActiveRow(idx) {
365
442
  if (!ctx) return;
@@ -597,50 +674,68 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
597
674
  "aria-activedescendant": ariaActiveDescendant.value,
598
675
  onKeydown: onTbodyKeydown
599
676
  }, {
600
- default: withCtx(({ item, index, spaceBefore }) => [createElementVNode("tr", {
601
- id: rowIdFor(index),
602
- role: "row",
603
- "aria-rowindex": index + 2,
604
- "aria-selected": ariaSelectedFor(item),
605
- class: normalizeClass({ "as-table-row-active": isActiveRow(index) }),
606
- style: normalizeStyle({
607
- height: __props.virtualRowHeight ? `${__props.virtualRowHeight}px` : void 0,
608
- transform: spaceBefore ? `translateY(${spaceBefore}px)` : void 0
609
- }),
610
- onClick: ($event) => onRowClick(item, $event, index),
611
- onDblclick: ($event) => onRowDblClick(item, $event, index)
612
- }, [
613
- hasValue.value ? (openBlock(), createElementBlock("td", _hoisted_7, [createElementVNode("span", { class: normalizeClass(["as-table-checkbox", { "as-table-checkbox-checked": isPkSelected(item) }]) }, [isPkSelected(item) ? (openBlock(), createElementBlock("span", _hoisted_8)) : createCommentVNode("v-if", true)], 2)])) : createCommentVNode("v-if", true),
614
- unref(hasAnyCellBindings) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.columns, (col) => {
615
- return openBlock(), createElementBlock(Fragment, { key: col.path }, [(openBlock(true), createElementBlock(Fragment, null, renderList([unref(cellResolver)(col, item, index)], (bindings) => {
616
- return openBlock(), createElementBlock(Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", mergeProps({
617
- key: 0,
618
- role: "gridcell"
619
- }, { ref_for: true }, bindings), [renderSlot(_ctx.$slots, `cell-${col.path}`, {
677
+ default: withCtx(({ item, index, spaceBefore }) => [createCommentVNode("\n `meta` is resolved ONCE per row (the row's hook results + its\n selectability verdict); `v-bind=\"meta.attrs\"` comes FIRST so every\n framework binding after it wins — consumer attrs can decorate a\n row but can never rewrite its id / role / aria / data contract.\n "), (openBlock(true), createElementBlock(Fragment, null, renderList([metaFor(index)], (meta) => {
678
+ return openBlock(), createElementBlock("tr", mergeProps({
679
+ key: 0,
680
+ ref_for: true
681
+ }, meta.attrs, {
682
+ id: rowIdFor(index),
683
+ role: "row",
684
+ "aria-rowindex": index + 2,
685
+ "aria-selected": ariaSelectedFor(item),
686
+ "data-selectable": meta.selectable.ok ? void 0 : "false",
687
+ class: [{ "as-table-row-active": isActiveRow(index) }, meta.cls],
688
+ style: {
689
+ height: __props.virtualRowHeight ? `${__props.virtualRowHeight}px` : void 0,
690
+ transform: spaceBefore ? `translateY(${spaceBefore}px)` : void 0
691
+ },
692
+ onClick: ($event) => onRowClick(item, $event, index),
693
+ onDblclick: ($event) => onRowDblClick(item, $event, index)
694
+ }), [
695
+ hasValue.value ? (openBlock(), createElementBlock("td", _hoisted_7, [createElementVNode("span", {
696
+ class: normalizeClass(["as-table-checkbox", {
697
+ "as-table-checkbox-checked": isPkSelected(item),
698
+ "as-table-checkbox-disabled": !meta.selectable.ok
699
+ }]),
700
+ role: "checkbox",
701
+ tabindex: meta.selectable.ok ? 0 : void 0,
702
+ "aria-checked": isPkSelected(item) ? "true" : "false",
703
+ "aria-disabled": meta.selectable.ok ? void 0 : "true",
704
+ "aria-label": selectLabel(meta.selectable),
705
+ title: meta.selectable.reason,
706
+ onKeydown: ($event) => onSelectCellKeydown($event, index)
707
+ }, [isPkSelected(item) ? (openBlock(), createElementBlock("span", _hoisted_9)) : createCommentVNode("v-if", true)], 42, _hoisted_8)])) : createCommentVNode("v-if", true),
708
+ unref(hasAnyCellBindings) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.columns, (col) => {
709
+ return openBlock(), createElementBlock(Fragment, { key: col.path }, [(openBlock(true), createElementBlock(Fragment, null, renderList([unref(cellResolver)(col, item, index)], (bindings) => {
710
+ return openBlock(), createElementBlock(Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", mergeProps({
711
+ key: 0,
712
+ role: "gridcell"
713
+ }, { ref_for: true }, bindings), [renderSlot(_ctx.$slots, `cell-${col.path}`, {
714
+ row: item,
715
+ value: unref(getCellValue)(item, col.path),
716
+ column: col
717
+ })], 16)) : (openBlock(), createBlock(resolveDynamicComponent(unref(cellComponents)[col.path]), mergeProps({
718
+ key: 1,
719
+ row: item,
720
+ column: col,
721
+ role: "gridcell"
722
+ }, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
723
+ }), 128))], 64);
724
+ }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.columns, (col) => {
725
+ return openBlock(), createElementBlock(Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", _hoisted_10, [renderSlot(_ctx.$slots, `cell-${col.path}`, {
620
726
  row: item,
621
727
  value: unref(getCellValue)(item, col.path),
622
728
  column: col
623
- })], 16)) : (openBlock(), createBlock(resolveDynamicComponent(unref(cellComponents)[col.path]), mergeProps({
729
+ })])) : (openBlock(), createBlock(resolveDynamicComponent(unref(cellComponents)[col.path]), {
624
730
  key: 1,
625
731
  row: item,
626
732
  column: col,
627
733
  role: "gridcell"
628
- }, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
629
- }), 128))], 64);
630
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.columns, (col) => {
631
- return openBlock(), createElementBlock(Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", _hoisted_9, [renderSlot(_ctx.$slots, `cell-${col.path}`, {
632
- row: item,
633
- value: unref(getCellValue)(item, col.path),
634
- column: col
635
- })])) : (openBlock(), createBlock(resolveDynamicComponent(unref(cellComponents)[col.path]), {
636
- key: 1,
637
- row: item,
638
- column: col,
639
- role: "gridcell"
640
- }, null, 8, ["row", "column"]))], 64);
641
- }), 128)),
642
- __props.stretch ? (openBlock(), createElementBlock("td", _hoisted_10)) : createCommentVNode("v-if", true)
643
- ], 46, _hoisted_6)]),
734
+ }, null, 8, ["row", "column"]))], 64);
735
+ }), 128)),
736
+ __props.stretch ? (openBlock(), createElementBlock("td", _hoisted_11)) : createCommentVNode("v-if", true)
737
+ ], 16, _hoisted_6);
738
+ }), 128))]),
644
739
  _: 3
645
740
  }, 8, [
646
741
  "options",