@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_preset_aspect_display = require("./preset-aspect-display-TWwf6j1B.cjs");
1
+ const require_use_table_state = require("./use-table-state-mhm-YWnu.cjs");
2
+ const require_error_message = require("./error-message-CfKpn_5w.cjs");
3
3
  let vue = require("vue");
4
4
  let _atscript_ui_table = require("@atscript/ui-table");
5
5
  let reka_ui = require("reka-ui");
@@ -80,6 +80,27 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
80
80
  document.addEventListener("focusin", stickFocus, true);
81
81
  });
82
82
  const aspects = (0, vue.computed)(() => state.preset.availableAspects);
83
+ const dismissed = (0, vue.shallowRef)(null);
84
+ function clearError() {
85
+ dismissed.value = state.preset.lastError.value;
86
+ }
87
+ const errorText = (0, vue.computed)(() => {
88
+ const err = state.preset.lastError.value;
89
+ if (!err || err === dismissed.value) return "";
90
+ return require_error_message.errorMessage(err, "Could not save the preset.");
91
+ });
92
+ /**
93
+ * The one error block. The menu and the Save-as popover are mutually
94
+ * exclusive branches, so it renders through a local function instead of
95
+ * being duplicated in both templates.
96
+ */
97
+ function ErrorNote() {
98
+ if (!errorText.value) return null;
99
+ return (0, vue.h)("div", {
100
+ class: "as-preset-picker-error",
101
+ role: "alert"
102
+ }, errorText.value);
103
+ }
83
104
  function resetSaveAsForm() {
84
105
  const base = activePresetLabel.value;
85
106
  saveAsLabel.value = base ? `Copy of ${base}` : "";
@@ -89,23 +110,20 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
89
110
  for (const a of aspects.value) initial[a] = claimed.has(a);
90
111
  saveAsAspectsMask.value = initial;
91
112
  }
92
- const activePresetClaimedAspects = (0, vue.computed)(() => {
93
- const id = state.preset.activeId.value;
94
- if (!id || (0, _atscript_ui_table.isSystemPresetId)(id)) return new Set(aspects.value);
95
- const row = state.preset.presetsById.value.get(id);
96
- if (!row) return new Set(aspects.value);
97
- return new Set(require_preset_aspect_display.aspectsOf(row, aspects.value));
98
- });
113
+ const activePresetClaimedAspects = (0, vue.computed)(() => new Set(state.preset.ownedAspects(state.preset.activeId.value)));
99
114
  function openSaveAs() {
100
115
  resetSaveAsForm();
116
+ clearError();
101
117
  saveAsOpen.value = true;
102
118
  }
103
119
  function cancelSaveAs() {
120
+ clearError();
104
121
  saveAsOpen.value = false;
105
122
  }
106
123
  async function commitSaveAs() {
107
124
  const label = saveAsLabel.value.trim();
108
125
  if (!label) return;
126
+ clearError();
109
127
  try {
110
128
  await state.preset.saveAs(label, {
111
129
  aspects: saveAsAspectsMask.value,
@@ -113,10 +131,10 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
113
131
  });
114
132
  saveAsOpen.value = false;
115
133
  open.value = false;
116
- } catch (_err) {}
134
+ } catch {}
117
135
  }
118
136
  function authorMeta(row) {
119
- const name = require_preset_aspect_display.ownerNameOf(row);
137
+ const name = require_use_table_state.ownerNameOf(row);
120
138
  return name ? `· ${name}` : "";
121
139
  }
122
140
  function systemItem(p, fav) {
@@ -125,16 +143,16 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
125
143
  label: p.label,
126
144
  system: true,
127
145
  fav,
128
- aspects: [...state.preset.availableAspects]
146
+ aspects: state.preset.ownedAspects(p.id)
129
147
  };
130
148
  }
131
149
  function storedItem(row, fav, meta) {
132
150
  return {
133
151
  id: row.id,
134
- label: require_preset_aspect_display.readPresetLabel(row),
152
+ label: require_use_table_state.readPresetLabel(row),
135
153
  fav,
136
154
  meta,
137
- aspects: require_preset_aspect_display.aspectsOf(row, state.preset.availableAspects)
155
+ aspects: state.preset.ownedAspects(row.id)
138
156
  };
139
157
  }
140
158
  const favIds = (0, vue.computed)(() => {
@@ -183,17 +201,18 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
183
201
  if (!id) return "Standard";
184
202
  if ((0, _atscript_ui_table.isSystemPresetId)(id)) return state.preset.systemPresetsById.value.get(id)?.label ?? "Standard";
185
203
  const row = state.preset.presetsById.value.get(id);
186
- return row ? require_preset_aspect_display.readPresetLabel(row) : "—";
204
+ return row ? require_use_table_state.readPresetLabel(row) : "—";
187
205
  });
188
206
  function applyId(id) {
189
207
  state.preset.apply(id);
190
208
  open.value = false;
191
209
  }
192
210
  async function saveActive() {
211
+ clearError();
193
212
  try {
194
213
  await state.preset.saveActive();
195
214
  open.value = false;
196
- } catch (_err) {}
215
+ } catch {}
197
216
  }
198
217
  function resetActive() {
199
218
  state.preset.resetActive();
@@ -227,7 +246,10 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
227
246
  }
228
247
  (0, vue.watch)(open, (isOpen) => {
229
248
  if (isOpen) window.addEventListener("keydown", onMenuKeydown);
230
- else window.removeEventListener("keydown", onMenuKeydown);
249
+ else {
250
+ window.removeEventListener("keydown", onMenuKeydown);
251
+ clearError();
252
+ }
231
253
  });
232
254
  (0, vue.onScopeDispose)(() => window.removeEventListener("keydown", onMenuKeydown));
233
255
  return (_ctx, _cache) => {
@@ -278,9 +300,9 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
278
300
  key: a,
279
301
  class: "as-preset-picker-item-aspect-chip",
280
302
  "data-on": item.aspects.includes(a) ? "" : void 0,
281
- title: (0, vue.unref)(require_preset_aspect_display.ASPECT_LABELS)[a]
303
+ title: (0, vue.unref)(require_use_table_state.ASPECT_LABELS)[a]
282
304
  }, [(0, vue.createElementVNode)("span", {
283
- class: (0, vue.normalizeClass)((0, vue.unref)(require_preset_aspect_display.ASPECT_ICONS)[a]),
305
+ class: (0, vue.normalizeClass)((0, vue.unref)(require_use_table_state.ASPECT_ICONS)[a]),
284
306
  "aria-hidden": "true"
285
307
  }, null, 2)], 8, _hoisted_9);
286
308
  }), 128))])
@@ -291,6 +313,7 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
291
313
  }), 128)),
292
314
  (0, vue.createCommentVNode)(" Action row "),
293
315
  (0, vue.createVNode)((0, vue.unref)(reka_ui.DropdownMenuSeparator), { class: "as-preset-picker-separator" }),
316
+ (0, vue.createVNode)(ErrorNote),
294
317
  (0, vue.unref)(state).preset.isDirty.value && (0, vue.unref)(state).preset.canSaveActive.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.DropdownMenuItem), {
295
318
  key: 0,
296
319
  class: "as-preset-picker-action as-preset-picker-action-primary",
@@ -386,10 +409,10 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
386
409
  onChange: (ev) => toggleAspect(a, ev)
387
410
  }, null, 40, _hoisted_13),
388
411
  (0, vue.createElementVNode)("span", {
389
- class: (0, vue.normalizeClass)([(0, vue.unref)(require_preset_aspect_display.ASPECT_ICONS)[a], "as-preset-picker-popover-aspect-icon"]),
412
+ class: (0, vue.normalizeClass)([(0, vue.unref)(require_use_table_state.ASPECT_ICONS)[a], "as-preset-picker-popover-aspect-icon"]),
390
413
  "aria-hidden": "true"
391
414
  }, null, 2),
392
- (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(require_preset_aspect_display.ASPECT_LABELS)[a]), 1)
415
+ (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(require_use_table_state.ASPECT_LABELS)[a]), 1)
393
416
  ]);
394
417
  }), 128))]),
395
418
  (0, vue.unref)(state).preset.capabilities.value === null || (0, vue.unref)(state).preset.capabilities.value.canPublish ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [_cache[15] || (_cache[15] = (0, vue.createElementVNode)("div", { class: "as-preset-picker-popover-separator" }, null, -1)), (0, vue.createElementVNode)("label", _hoisted_14, [
@@ -403,6 +426,7 @@ var as_preset_picker_default = /* @__PURE__ */ (0, vue.defineComponent)({
403
426
  }, null, -1)),
404
427
  _cache[14] || (_cache[14] = (0, vue.createTextVNode)(" Make public ", -1))
405
428
  ])], 64)) : (0, vue.createCommentVNode)("v-if", true),
429
+ (0, vue.createVNode)(ErrorNote),
406
430
  (0, vue.createElementVNode)("div", _hoisted_15, [(0, vue.createElementVNode)("button", {
407
431
  type: "button",
408
432
  class: "as-preset-picker-popover-cancel",
@@ -1,2 +1,2 @@
1
- const require_as_preset_picker = require("./as-preset-picker-jUS_YDX8.cjs");
1
+ const require_as_preset_picker = require("./as-preset-picker-DbkmapBx.cjs");
2
2
  module.exports = require_as_preset_picker.as_preset_picker_default;
@@ -1,2 +1,2 @@
1
- import { t as as_preset_picker_default } from "./as-preset-picker-CISaxEZ0.mjs";
1
+ import { t as as_preset_picker_default } from "./as-preset-picker-B0JnyAPA.mjs";
2
2
  export { as_preset_picker_default as default };
@@ -1,5 +1,5 @@
1
- import { a as useTableContext, c as actionHref, d as ariaLabelFor, h as intentClass, l as applyRowGate, m as extractIdentifier, p as createNavigateGestures, y as triggerAction } from "./use-table-state-BxX3SpeW.mjs";
2
- import { t as as_action_menu_content_default } from "./as-action-menu-content-4UfcabUe.mjs";
1
+ import { T as triggerAction, _ as ariaLabelFor, a as useTableContext, b as extractIdentifier, h as applyRowGate, m as rowActionHref, x as intentClass, y as createNavigateGestures } from "./use-table-state-mBXx11aH.mjs";
2
+ import { t as as_action_menu_content_default } from "./as-action-menu-content-rim8hAO9.mjs";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
4
4
  import { DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
5
5
  //#region src/components/defaults/as-row-actions.vue?vue&type=script&setup=true&lang.ts
@@ -31,6 +31,10 @@ var as_row_actions_default = /* @__PURE__ */ defineComponent({
31
31
  pk: {
32
32
  type: Object,
33
33
  required: false
34
+ },
35
+ actions: {
36
+ type: Array,
37
+ required: false
34
38
  }
35
39
  },
36
40
  setup(__props) {
@@ -45,19 +49,27 @@ var as_row_actions_default = /* @__PURE__ */ defineComponent({
45
49
  const id = identifierOf();
46
50
  return {
47
51
  identifiers: id === void 0 ? [] : [id],
48
- preferredId: state.tableDef.value?.preferredId ?? []
52
+ preferredId: state.tableDef.value?.preferredId ?? [],
53
+ row: props.row
49
54
  };
50
55
  }
51
56
  const view = computed(() => {
52
- const sourceDefault = state.actions.default.row;
53
- const filtered = applyRowGate({
57
+ const explicit = props.actions;
58
+ const sourceDefault = explicit ? void 0 : state.actions.default.row;
59
+ const policy = state.rowActionsPolicy.value;
60
+ const filtered = explicit ? {
61
+ default: void 0,
62
+ others: explicit,
63
+ rows: []
64
+ } : policy.apply(applyRowGate({
54
65
  default: sourceDefault,
55
66
  others: state.actions.others.row,
56
67
  rows: state.actions.rows
57
- }, props.row);
58
- const total = (filtered.default ? 1 : 0) + filtered.others.length + filtered.rows.length;
59
- const single = total === 1 ? filtered.default ?? filtered.others[0] ?? filtered.rows[0] : void 0;
60
- const singleHref = single ? actionHref(state, single, identifierOf()) : void 0;
68
+ }, props.row));
69
+ const extra = explicit ? [] : policy.extra(props.row);
70
+ const total = (filtered.default ? 1 : 0) + filtered.others.length + filtered.rows.length + extra.length;
71
+ const single = total === 1 ? filtered.default ?? filtered.others[0] ?? filtered.rows[0] ?? extra[0] : void 0;
72
+ const singleHref = single ? hrefFor(single) : void 0;
61
73
  return {
62
74
  total,
63
75
  default: filtered.default,
@@ -70,7 +82,8 @@ var as_row_actions_default = /* @__PURE__ */ defineComponent({
70
82
  menuGroups: [
71
83
  filtered.default ? [filtered.default] : [],
72
84
  filtered.others,
73
- filtered.rows
85
+ filtered.rows,
86
+ extra
74
87
  ]
75
88
  };
76
89
  });
@@ -78,7 +91,7 @@ var as_row_actions_default = /* @__PURE__ */ defineComponent({
78
91
  await triggerAction(state, action, promptCtx(), event);
79
92
  }
80
93
  function hrefFor(action) {
81
- return actionHref(state, action, identifierOf());
94
+ return rowActionHref(state, action, identifierOf(), props.row);
82
95
  }
83
96
  const { onTriggerClick, onTriggerAuxClick, openNewTab } = createNavigateGestures(state, promptCtx, hrefFor);
84
97
  return (_ctx, _cache) => {
@@ -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/defaults/as-row-actions.vue?vue&type=script&setup=true&lang.ts
@@ -31,6 +31,10 @@ var as_row_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
31
31
  pk: {
32
32
  type: Object,
33
33
  required: false
34
+ },
35
+ actions: {
36
+ type: Array,
37
+ required: false
34
38
  }
35
39
  },
36
40
  setup(__props) {
@@ -45,19 +49,27 @@ var as_row_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
45
49
  const id = identifierOf();
46
50
  return {
47
51
  identifiers: id === void 0 ? [] : [id],
48
- preferredId: state.tableDef.value?.preferredId ?? []
52
+ preferredId: state.tableDef.value?.preferredId ?? [],
53
+ row: props.row
49
54
  };
50
55
  }
51
56
  const view = (0, vue.computed)(() => {
52
- const sourceDefault = state.actions.default.row;
53
- const filtered = require_use_table_state.applyRowGate({
57
+ const explicit = props.actions;
58
+ const sourceDefault = explicit ? void 0 : state.actions.default.row;
59
+ const policy = state.rowActionsPolicy.value;
60
+ const filtered = explicit ? {
61
+ default: void 0,
62
+ others: explicit,
63
+ rows: []
64
+ } : policy.apply(require_use_table_state.applyRowGate({
54
65
  default: sourceDefault,
55
66
  others: state.actions.others.row,
56
67
  rows: state.actions.rows
57
- }, props.row);
58
- const total = (filtered.default ? 1 : 0) + filtered.others.length + filtered.rows.length;
59
- const single = total === 1 ? filtered.default ?? filtered.others[0] ?? filtered.rows[0] : void 0;
60
- const singleHref = single ? require_use_table_state.actionHref(state, single, identifierOf()) : void 0;
68
+ }, props.row));
69
+ const extra = explicit ? [] : policy.extra(props.row);
70
+ const total = (filtered.default ? 1 : 0) + filtered.others.length + filtered.rows.length + extra.length;
71
+ const single = total === 1 ? filtered.default ?? filtered.others[0] ?? filtered.rows[0] ?? extra[0] : void 0;
72
+ const singleHref = single ? hrefFor(single) : void 0;
61
73
  return {
62
74
  total,
63
75
  default: filtered.default,
@@ -70,7 +82,8 @@ var as_row_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
70
82
  menuGroups: [
71
83
  filtered.default ? [filtered.default] : [],
72
84
  filtered.others,
73
- filtered.rows
85
+ filtered.rows,
86
+ extra
74
87
  ]
75
88
  };
76
89
  });
@@ -78,7 +91,7 @@ var as_row_actions_default = /* @__PURE__ */ (0, vue.defineComponent)({
78
91
  await require_use_table_state.triggerAction(state, action, promptCtx(), event);
79
92
  }
80
93
  function hrefFor(action) {
81
- return require_use_table_state.actionHref(state, action, identifierOf());
94
+ return require_use_table_state.rowActionHref(state, action, identifierOf(), props.row);
82
95
  }
83
96
  const { onTriggerClick, onTriggerAuxClick, openNewTab } = require_use_table_state.createNavigateGestures(state, promptCtx, hrefFor);
84
97
  return (_ctx, _cache) => {
@@ -1,2 +1,2 @@
1
- const require_as_row_actions = require("./as-row-actions-Bm6Bzyno.cjs");
1
+ const require_as_row_actions = require("./as-row-actions-CRg8LHGk.cjs");
2
2
  module.exports = require_as_row_actions.as_row_actions_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-row-actions.vue-Bvcc2tUN.cjs";
1
+ import { t as _default } from "./as-row-actions.vue-dn_DKcMm.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-row-actions.vue-DUSDuoR2.mjs";
1
+ import { t as _default } from "./as-row-actions.vue-VpJsBAJ4.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_row_actions_default } from "./as-row-actions-xqJeAdQl.mjs";
1
+ import { t as as_row_actions_default } from "./as-row-actions-BkIsJVBm.mjs";
2
2
  export { as_row_actions_default as default };
@@ -1,9 +1,17 @@
1
+ import { S as TVueTableActionInfo } from "./types-CBGaTR2Z.mjs";
1
2
  import * as vue from "vue";
2
3
 
3
4
  //#region src/components/defaults/as-row-actions.vue.d.ts
4
5
  type __VLS_Props = {
5
6
  row?: Record<string, unknown>;
6
7
  pk?: Record<string, unknown>;
8
+ /**
9
+ * Render exactly these actions, bypassing the server's action set AND the
10
+ * root's `:row-actions` policy. For a standalone `<AsRowActions>` that must
11
+ * show a hand-picked list; omit it inside the table so the shared policy
12
+ * applies. Since 0.1.134.
13
+ */
14
+ actions?: TVueTableActionInfo[];
7
15
  };
8
16
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
9
17
  declare const _default: typeof __VLS_export;
@@ -1,9 +1,17 @@
1
+ import { S as TVueTableActionInfo } from "./types--ex8BJIO.cjs";
1
2
  import * as vue from "vue";
2
3
 
3
4
  //#region src/components/defaults/as-row-actions.vue.d.ts
4
5
  type __VLS_Props = {
5
6
  row?: Record<string, unknown>;
6
7
  pk?: Record<string, unknown>;
8
+ /**
9
+ * Render exactly these actions, bypassing the server's action set AND the
10
+ * root's `:row-actions` policy. For a standalone `<AsRowActions>` that must
11
+ * show a hand-picked list; omit it inside the table so the shared policy
12
+ * applies. Since 0.1.134.
13
+ */
14
+ actions?: TVueTableActionInfo[];
7
15
  };
8
16
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
9
17
  declare const _default: typeof __VLS_export;
@@ -1,10 +1,9 @@
1
- import { a as useTableContext, b as ROW_ACTIONS_PATH, i as useRegisterMainActionListener, x as ROW_ACTIONS_TYPE } from "./use-table-state-BxX3SpeW.mjs";
2
- import { t as useSelectModeReset } from "./use-table-selection-C84z4OZy.mjs";
3
- import { t as useHasEmitListener } from "./use-has-emit-listener-BTMDIv2e.mjs";
4
- import { t as useTableColumnHandlers } from "./use-table-column-handlers-CpiiIniD.mjs";
5
- import { t as as_table_base_default } from "./as-table-base-BaTE3VSN.mjs";
1
+ import { D as ROW_ACTIONS_TYPE, E as ROW_ACTIONS_PATH, a as useTableContext, i as useRegisterMainActionListener } from "./use-table-state-mBXx11aH.mjs";
2
+ import { t as useSelectModeReset } from "./use-table-selection-ULbKT2xW.mjs";
3
+ import { t as useHasEmitListener } from "./use-has-emit-listener-DrBbsLHQ.mjs";
4
+ import { t as useTableColumnHandlers } from "./use-table-column-handlers-Bx3JERqs.mjs";
5
+ import { t as as_table_base_default } from "./as-table-base-BxKBdIdS.mjs";
6
6
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, renderSlot, unref, watch, withCtx } from "vue";
7
- import { rowsToPks } from "@atscript/ui-table";
8
7
  //#region src/components/as-table.vue?vue&type=script&setup=true&lang.ts
9
8
  const _hoisted_1 = { class: "as-table-outer-wrap" };
10
9
  const _hoisted_2 = {
@@ -76,6 +75,18 @@ var as_table_default = /* @__PURE__ */ defineComponent({
76
75
  type: Boolean,
77
76
  required: false,
78
77
  default: false
78
+ },
79
+ rowSelectable: {
80
+ type: Function,
81
+ required: false
82
+ },
83
+ rowClass: {
84
+ type: Function,
85
+ required: false
86
+ },
87
+ rowAttrs: {
88
+ type: Function,
89
+ required: false
79
90
  }
80
91
  },
81
92
  emits: [
@@ -90,6 +101,9 @@ var as_table_default = /* @__PURE__ */ defineComponent({
90
101
  watch(() => props.rowDelete, (val) => {
91
102
  state.rowDelete.value = val;
92
103
  }, { immediate: true });
104
+ watch(() => props.rowSelectable, (val) => {
105
+ state.rowSelectable.value = val;
106
+ }, { immediate: true });
93
107
  useSelectModeReset(state, () => props.select);
94
108
  watch(() => {
95
109
  const placement = props.rowActionsColumn;
@@ -99,7 +113,7 @@ var as_table_default = /* @__PURE__ */ defineComponent({
99
113
  }, (on) => {
100
114
  state.includeActions.value = on;
101
115
  }, { immediate: true });
102
- const effectiveRows = computed(() => props.rows ?? state.results.value);
116
+ const effectiveRows = computed(() => state.applyLocalSort(props.rows ?? state.results.value));
103
117
  const actionsCol = computed(() => {
104
118
  const acts = state.actions.row;
105
119
  return {
@@ -126,7 +140,7 @@ var as_table_default = /* @__PURE__ */ defineComponent({
126
140
  useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), useHasEmitListener("onMainAction"));
127
141
  const { onSort, onHide, onFilter, onFiltersOff, onResetWidth, onReorder, onClearFilters } = useTableColumnHandlers(state);
128
142
  function handleSelectAll() {
129
- state.selectedRows.value = rowsToPks(effectiveRows.value, state.rowValueFn);
143
+ state.selectAll(effectiveRows.value);
130
144
  }
131
145
  function handleDeselectAll() {
132
146
  state.selectedRows.value = [];
@@ -155,6 +169,8 @@ var as_table_default = /* @__PURE__ */ defineComponent({
155
169
  resizable: __props.resizable,
156
170
  "column-min-width": __props.columnMinWidth,
157
171
  "column-widths": unref(state).columnWidths.value,
172
+ "row-class": __props.rowClass,
173
+ "row-attrs": __props.rowAttrs,
158
174
  onSort: unref(onSort),
159
175
  onHide: unref(onHide),
160
176
  onFilter: unref(onFilter),
@@ -193,6 +209,8 @@ var as_table_default = /* @__PURE__ */ defineComponent({
193
209
  "resizable",
194
210
  "column-min-width",
195
211
  "column-widths",
212
+ "row-class",
213
+ "row-attrs",
196
214
  "onSort",
197
215
  "onHide",
198
216
  "onFilter",
@@ -1,6 +1,6 @@
1
- import { a as useTableContext, c as actionHref, d as ariaLabelFor, f as collectIdentifiers, h as intentClass, l as applyRowGate, p as createNavigateGestures, u as applyRowsGate, y as triggerAction } from "./use-table-state-BxX3SpeW.mjs";
2
- import { t as as_action_menu_content_default } from "./as-action-menu-content-4UfcabUe.mjs";
3
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
1
+ import { T as triggerAction, _ as ariaLabelFor, a as useTableContext, g as applyRowsGate, h as applyRowGate, m as rowActionHref, v as collectIdentifiers, x as intentClass, y as createNavigateGestures } from "./use-table-state-mBXx11aH.mjs";
2
+ import { t as as_action_menu_content_default } from "./as-action-menu-content-rim8hAO9.mjs";
3
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, watch, withCtx } from "vue";
4
4
  import { DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
5
5
  //#region src/components/as-table-actions.vue?vue&type=script&setup=true&lang.ts
6
6
  const _hoisted_1 = {
@@ -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__ */ defineComponent({
@@ -40,7 +46,7 @@ var as_table_actions_default = /* @__PURE__ */ defineComponent({
40
46
  const preferredId = computed(() => state.tableDef.value?.preferredId ?? []);
41
47
  const resolved = computed(() => {
42
48
  const r = resolveBuckets();
43
- const defaultHref = r.defaultAction ? actionHref(state, r.defaultAction, r.ids[0]) : void 0;
49
+ const defaultHref = r.defaultAction ? 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__ */ 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 = applyRowGate({
70
+ const policy = state.rowActionsPolicy.value;
71
+ const filtered = policy.apply(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: collectIdentifiers(state, [source], pid)
83
+ ids: collectIdentifiers(state, [source], pid),
84
+ row
75
85
  });
76
86
  }
77
87
  const filtered = applyRowsGate({
@@ -91,7 +101,8 @@ var as_table_actions_default = /* @__PURE__ */ 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__ */ defineComponent({
99
110
  }
100
111
  /** Resolved navigate href for `action` against the toolbar's current ids. */
101
112
  function hrefFor(action) {
102
- return actionHref(state, action, resolved.value.ids[0]);
113
+ return rowActionHref(state, action, resolved.value.ids[0], resolved.value.row);
103
114
  }
104
115
  const { onTriggerClick, onTriggerAuxClick, openNewTab } = createNavigateGestures(state, promptCtx, hrefFor);
116
+ const running = 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 = ariaLabelFor(action);
123
+ return isRunning(action) ? `${label}, running` : label;
124
+ }
125
+ const menuBusy = computed(() => resolved.value.otherActions.some((a) => isRunning(a)) || resolved.value.trailingRowActions.some((a) => isRunning(a)));
126
+ const liveMessage = 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 ariaLabelFor(a);
136
+ return name;
137
+ }
138
+ 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 ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "default", {
107
155
  defaultAction: resolved.value.defaultAction,
@@ -116,8 +164,9 @@ var as_table_actions_default = /* @__PURE__ */ defineComponent({
116
164
  type: resolved.value.defaultAsLink ? void 0 : "button",
117
165
  class: normalizeClass(["as-table-actions-btn", unref(intentClass)("as-table-actions", resolved.value.defaultAction)]),
118
166
  "data-default": "",
119
- "aria-label": unref(ariaLabelFor)(resolved.value.defaultAction),
167
+ "aria-label": triggerLabel(resolved.value.defaultAction),
120
168
  title: unref(ariaLabelFor)(resolved.value.defaultAction),
169
+ "aria-busy": isRunning(resolved.value.defaultAction) ? "true" : void 0,
121
170
  onClick: _cache[0] || (_cache[0] = ($event) => unref(onTriggerClick)(resolved.value.defaultAction, resolved.value.defaultHref, resolved.value.defaultAsLink, $event)),
122
171
  onAuxclick: _cache[1] || (_cache[1] = ($event) => unref(onTriggerAuxClick)(resolved.value.defaultAction, resolved.value.defaultHref, resolved.value.defaultAsLink, $event))
123
172
  }, {
@@ -132,21 +181,23 @@ var as_table_actions_default = /* @__PURE__ */ defineComponent({
132
181
  "type",
133
182
  "class",
134
183
  "aria-label",
135
- "title"
184
+ "title",
185
+ "aria-busy"
136
186
  ])) : createCommentVNode("v-if", true), resolved.value.otherActions.length > 0 || resolved.value.trailingRowActions.length > 0 ? (openBlock(), createBlock(unref(DropdownMenuRoot), {
137
187
  key: 1,
138
188
  modal: false
139
189
  }, {
140
190
  default: withCtx(() => [createVNode(unref(DropdownMenuTrigger), { "as-child": "" }, {
141
- default: withCtx(() => [..._cache[2] || (_cache[2] = [createElementVNode("button", {
191
+ default: withCtx(() => [createElementVNode("button", {
142
192
  type: "button",
143
193
  class: "as-table-actions-more",
144
- "aria-label": "More actions",
145
- title: "More actions"
146
- }, [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] = [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
  }), createVNode(unref(DropdownMenuPortal), null, {
152
203
  default: withCtx(() => [createVNode(as_action_menu_content_default, {
@@ -163,7 +214,7 @@ var as_table_actions_default = /* @__PURE__ */ defineComponent({
163
214
  _: 3
164
215
  })]),
165
216
  _: 3
166
- })) : createCommentVNode("v-if", true)])])) : createCommentVNode("v-if", true);
217
+ })) : createCommentVNode("v-if", true)]), createElementVNode("span", _hoisted_4, toDisplayString(liveMessage.value), 1)])) : createCommentVNode("v-if", true);
167
218
  };
168
219
  }
169
220
  });