@atscript/vue-table 0.1.146 → 0.1.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/as-action-form-dialog.cjs +3 -2
- package/dist/as-action-form-dialog.mjs +3 -2
- package/dist/{as-action-menu-content-DoZnQP0I.mjs → as-action-menu-content-BBwL1YZU.mjs} +1 -1
- package/dist/{as-action-menu-content-FQ2miGid.cjs → as-action-menu-content-DAOjkslC.cjs} +1 -1
- package/dist/{as-cell-array-CCZ0Ajj9.cjs → as-cell-array-CB4Nt6Fo.cjs} +3 -2
- package/dist/{as-cell-array-Bgc4GYZf.mjs → as-cell-array-CnoVd9ps.mjs} +4 -3
- package/dist/as-cell-array.cjs +1 -1
- package/dist/as-cell-array.d.cts +1 -1
- package/dist/as-cell-array.d.mts +1 -1
- package/dist/as-cell-array.mjs +1 -1
- package/dist/{as-cell-date-RU5JPJhI.cjs → as-cell-date-DrnhvCr4.cjs} +3 -14
- package/dist/{as-cell-date-B9mu0OOD.mjs → as-cell-date-dhIM7hWA.mjs} +2 -13
- package/dist/as-cell-date.cjs +1 -1
- package/dist/as-cell-date.d.cts +1 -1
- package/dist/as-cell-date.d.mts +1 -1
- package/dist/as-cell-date.mjs +1 -1
- package/dist/{as-cell-json-ByEGYRST.mjs → as-cell-json-ChN_NDhO.mjs} +1 -1
- package/dist/{as-cell-json-w5YJxNuF.cjs → as-cell-json-CzHTpkjS.cjs} +1 -1
- package/dist/as-cell-json.cjs +1 -1
- package/dist/as-cell-json.d.cts +1 -1
- package/dist/as-cell-json.d.mts +1 -1
- package/dist/as-cell-json.mjs +1 -1
- package/dist/{as-cell-number-DGJCTXDf.cjs → as-cell-number-C4JMqvqa.cjs} +1 -1
- package/dist/{as-cell-number-CNDT6gfw.mjs → as-cell-number-D-mSaE_G.mjs} +1 -1
- package/dist/as-cell-number.cjs +1 -1
- package/dist/as-cell-number.d.cts +1 -1
- package/dist/as-cell-number.d.mts +1 -1
- package/dist/as-cell-number.mjs +1 -1
- package/dist/{as-cell-union-DMnoa7RM.mjs → as-cell-union-C9Bbnkrg.mjs} +1 -1
- package/dist/{as-cell-union-LOGvhPeK.cjs → as-cell-union-DpCEHLzN.cjs} +1 -1
- package/dist/as-cell-union.cjs +1 -1
- package/dist/as-cell-union.d.cts +1 -1
- package/dist/as-cell-union.d.mts +1 -1
- package/dist/as-cell-union.mjs +1 -1
- package/dist/as-column-menu.d.cts +1 -1
- package/dist/as-column-menu.d.mts +1 -1
- package/dist/{as-column-menu.vue-ByTECTbX.d.cts → as-column-menu.vue-4zJmC_M6.d.mts} +2 -2
- package/dist/{as-column-menu.vue-TChT482i.d.mts → as-column-menu.vue-CS_8jHG3.d.cts} +2 -2
- package/dist/{as-config-dialog-CpW1Qemf.cjs → as-config-dialog-CnIvMsK0.cjs} +10 -5
- package/dist/{as-config-dialog-ObHtungs.mjs → as-config-dialog-ZKMnfirD.mjs} +10 -5
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.d.cts +1 -1
- package/dist/as-config-dialog.d.mts +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-zg7jmS3u.mjs → as-confirm-dialog-DMiGquH1.mjs} +1 -1
- package/dist/{as-confirm-dialog-D3Vu1Rb_.cjs → as-confirm-dialog-cSEHVFBq.cjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.d.cts +1 -1
- package/dist/as-confirm-dialog.d.mts +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-CWy0mjZl.mjs → as-filter-dialog-DNFR30fV.mjs} +61 -38
- package/dist/{as-filter-dialog-C4EyRr2_.cjs → as-filter-dialog-KjvJdaMg.cjs} +60 -37
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.d.cts +1 -1
- package/dist/as-filter-dialog.d.mts +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-BQ9UlV0y.cjs → as-filter-field-BsucQwbm.cjs} +247 -35
- package/dist/{as-filter-field-CW1_GHZT.mjs → as-filter-field-DE6MJMx7.mjs} +227 -39
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.d.cts +1 -1
- package/dist/as-filter-field.d.mts +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/as-filter-input-ChJ8JE6-.cjs +254 -0
- package/dist/as-filter-input-DmOW_jzK.mjs +249 -0
- package/dist/as-filter-input.cjs +1 -1
- package/dist/as-filter-input.d.cts +1 -1
- package/dist/as-filter-input.d.mts +1 -1
- package/dist/as-filter-input.mjs +1 -1
- package/dist/{as-filter-input.vue-CFZ33B--.d.mts → as-filter-input.vue-BLTzA2Iy.d.cts} +10 -1
- package/dist/{as-filter-input.vue-CS4nOk_Q.d.cts → as-filter-input.vue-CmWQGQCv.d.mts} +10 -1
- package/dist/{as-filters-DUfFkXAo.cjs → as-filters-CYC_SXaA.cjs} +4 -4
- package/dist/{as-filters-BLFSS_VP.mjs → as-filters-DErM2bFq.mjs} +4 -4
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.d.mts +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-preset-dialog-CI2Hw8vi.mjs → as-preset-dialog-CY5dPfZa.mjs} +2 -2
- package/dist/{as-preset-dialog-BlXqTZiT.cjs → as-preset-dialog-tM-jrQgs.cjs} +2 -2
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.d.cts +1 -1
- package/dist/as-preset-dialog.d.mts +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-CVgyZBG7.cjs → as-preset-picker-CjSXtx83.cjs} +2 -2
- package/dist/{as-preset-picker-CbZDGPaf.mjs → as-preset-picker-DkZ7sinz.mjs} +2 -2
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.d.mts +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-residual-filter-CUTouIn5.mjs → as-residual-filter-DHfbtTQj.mjs} +4 -5
- package/dist/{as-residual-filter-C8n7kdGW.cjs → as-residual-filter-XkXnMQNu.cjs} +4 -5
- package/dist/as-residual-filter.cjs +1 -1
- package/dist/as-residual-filter.d.cts +1 -1
- package/dist/as-residual-filter.d.mts +1 -1
- package/dist/as-residual-filter.mjs +1 -1
- package/dist/{as-row-actions-ed1P6GEJ.mjs → as-row-actions-BNQ7jrie.mjs} +7 -5
- package/dist/{as-row-actions-DfUL9sYB.cjs → as-row-actions-q_oMmUz1.cjs} +7 -5
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.d.cts +1 -1
- package/dist/as-row-actions.d.mts +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-row-actions.vue-Ba3VO9W-.d.cts → as-row-actions.vue-BB8ATWBY.d.mts} +1 -1
- package/dist/{as-row-actions.vue-CKOnE0eb.d.mts → as-row-actions.vue-CnjcRD0P.d.cts} +1 -1
- package/dist/{as-select-cell-DwMfqBMV.cjs → as-select-cell-Dc3lArvR.cjs} +11 -6
- package/dist/{as-select-cell-BMptU5sQ.mjs → as-select-cell-DjcPorVb.mjs} +11 -6
- package/dist/as-selection-banner-Ca9DWVdW.mjs +189 -0
- package/dist/as-selection-banner-CxPXBztW.cjs +206 -0
- package/dist/as-table-BIAkCI4g.cjs +215 -0
- package/dist/as-table-Bcz-WOTS.mjs +210 -0
- package/dist/{as-table-actions-DQco4pGu.mjs → as-table-actions-DPq5SrGa.mjs} +32 -6
- package/dist/{as-table-actions-DplblFlK.cjs → as-table-actions-TaI-NeVv.cjs} +32 -6
- package/dist/as-table-actions.cjs +1 -1
- package/dist/as-table-actions.d.cts +1 -1
- package/dist/as-table-actions.d.mts +1 -1
- package/dist/as-table-actions.mjs +1 -1
- package/dist/{as-table-actions.vue-BYphfAe2.d.cts → as-table-actions.vue-C2szPEXd.d.mts} +8 -1
- package/dist/{as-table-actions.vue-C6hzRtS7.d.mts → as-table-actions.vue-CBD_tEpe.d.cts} +8 -1
- package/dist/{as-table-base-lfyjPgsO.mjs → as-table-base-CsK79vYe.mjs} +3 -3
- package/dist/{as-table-base-CNAn-vpa.cjs → as-table-base-Dvey_Gie.cjs} +3 -3
- package/dist/{as-table-cell-value-DoH8Mieo.mjs → as-table-cell-value-D-S127gr.mjs} +13 -2
- package/dist/{as-table-cell-value-COyZnwUj.cjs → as-table-cell-value-VWlXc5dA.cjs} +12 -1
- package/dist/as-table-cell-value.cjs +1 -1
- package/dist/as-table-cell-value.d.cts +1 -1
- package/dist/as-table-cell-value.d.mts +1 -1
- package/dist/as-table-cell-value.mjs +1 -1
- package/dist/{as-table-header-cell-BwaOPYwI.cjs → as-table-header-cell-DB7Cdskr.cjs} +1 -1
- package/dist/{as-table-header-cell-Csv1KQDa.mjs → as-table-header-cell-ahzAeHXj.mjs} +1 -1
- package/dist/as-table-header-cell.cjs +1 -1
- package/dist/as-table-header-cell.d.cts +1 -1
- package/dist/as-table-header-cell.d.mts +1 -1
- package/dist/as-table-header-cell.mjs +1 -1
- package/dist/{as-table-header-cell.vue-DU5h-2C_.d.cts → as-table-header-cell.vue-D2s9YLSJ.d.cts} +1 -1
- package/dist/{as-table-header-cell.vue-KkANwimG.d.mts → as-table-header-cell.vue-DfDNma_Z.d.mts} +1 -1
- package/dist/{as-table-root-BreMYhnv.mjs → as-table-root-BnkF5-rh.mjs} +78 -11
- package/dist/{as-table-root-DXewWV9h.cjs → as-table-root-Nsk-9XaH.cjs} +77 -10
- package/dist/as-table-root.cjs +1 -1
- package/dist/as-table-root.d.cts +1 -1
- package/dist/as-table-root.d.mts +1 -1
- package/dist/as-table-root.mjs +1 -1
- package/dist/{as-table-root.vue-XtDgUjO2.d.mts → as-table-root.vue-D56WcudY.d.mts} +515 -1530
- package/dist/{as-table-root.vue-Bjzp8TJl.d.cts → as-table-root.vue-DXXcBPu_.d.cts} +511 -1526
- package/dist/as-table.cjs +1 -1
- package/dist/as-table.d.cts +1 -1
- package/dist/as-table.d.mts +1 -1
- package/dist/as-table.mjs +1 -1
- package/dist/{as-window-table-JOTOi_Nm.mjs → as-window-table-DjplqWzr.mjs} +100 -54
- package/dist/{as-window-table-Bj1dXOS6.cjs → as-window-table-ubm2u8_i.cjs} +102 -56
- package/dist/as-window-table.cjs +1 -1
- package/dist/as-window-table.d.cts +1 -1
- package/dist/as-window-table.d.mts +1 -1
- package/dist/as-window-table.mjs +1 -1
- package/dist/index.cjs +73 -91
- package/dist/index.d.cts +19 -21
- package/dist/index.d.mts +21 -23
- package/dist/index.mjs +71 -93
- package/dist/{types-D1NxhrpW.d.cts → intent-scope-CGch9yhy.d.cts} +215 -35
- package/dist/{types-BEZ4_erB.d.mts → intent-scope-CvD4YOvf.d.mts} +215 -35
- package/dist/use-condition-format-5LcuInDy.mjs +34 -0
- package/dist/use-condition-format-DrgfX6xL.cjs +39 -0
- package/dist/{use-table-BTsNGBVx.mjs → use-table-BYNBpLJt.mjs} +27 -4
- package/dist/{use-table-W0KmaJ6L.cjs → use-table-C9qI-TL6.cjs} +26 -3
- package/dist/{use-table-component-BvAC82_c.cjs → use-table-component-CsdvdGJT.cjs} +1 -1
- package/dist/{use-table-component-DRMXTk9M.mjs → use-table-component-Dy397695.mjs} +1 -1
- package/dist/{use-table-nav-bridge-Bw0NFDSf.mjs → use-table-nav-bridge-CJBERyPB.mjs} +1 -1
- package/dist/{use-table-nav-bridge-CPI1tql6.cjs → use-table-nav-bridge-Gm4ZfOjJ.cjs} +1 -1
- package/dist/{use-table-selection-ULbKT2xW.mjs → use-table-selection-CdaOPo1d.mjs} +8 -3
- package/dist/{use-table-selection-DtCV3rhu.cjs → use-table-selection-Cs7-gjHg.cjs} +8 -3
- package/dist/{use-table-state-Ddr2UZzB.cjs → use-table-state-BQchKxUr.cjs} +499 -43
- package/dist/{use-table-state-DuY-Mf8e.mjs → use-table-state-CIoWhwTD.mjs} +466 -46
- package/package.json +11 -10
- package/dist/as-filter-input-BM23TNeh.mjs +0 -101
- package/dist/as-filter-input-DJu2k9gO.cjs +0 -106
- package/dist/as-table-BjKzKB0a.cjs +0 -207
- package/dist/as-table-DGWfzV4w.mjs +0 -202
- package/dist/as-table.vue-BULJe49x.d.cts +0 -115
- package/dist/as-table.vue-DgCtlV4u.d.mts +0 -115
- package/dist/as-window-table.vue-CYFgK10g.d.mts +0 -132
- package/dist/as-window-table.vue-ijutqrJ0.d.cts +0 -132
- package/dist/use-table-column-handlers-BitvioH4.mjs +0 -85
- package/dist/use-table-column-handlers-DksXpbON.cjs +0 -96
- /package/dist/{as-cell-array.vue-pFs5GcCR.d.cts → as-cell-array.vue-C4BTM8YW.d.cts} +0 -0
- /package/dist/{as-cell-array.vue-ow34clSF.d.mts → as-cell-array.vue-D4vS7C_D.d.mts} +0 -0
- /package/dist/{as-cell-date.vue-BBSps2B2.d.cts → as-cell-date.vue-BcMgxBfm.d.cts} +0 -0
- /package/dist/{as-cell-date.vue-B4JCr1qP.d.mts → as-cell-date.vue-Chs7WTZ9.d.mts} +0 -0
- /package/dist/{as-cell-json-popover-Dkdv5Y9E.mjs → as-cell-json-popover-CH5bAcLE.mjs} +0 -0
- /package/dist/{as-cell-json-popover-BM2QLgfk.cjs → as-cell-json-popover-vty5vMjW.cjs} +0 -0
- /package/dist/{as-cell-json.vue-B-T3TuFj.d.mts → as-cell-json.vue-C0_LDvQw.d.mts} +0 -0
- /package/dist/{as-cell-json.vue-C6wg4ARZ.d.cts → as-cell-json.vue-pwE9uJdv.d.cts} +0 -0
- /package/dist/{as-cell-number.vue-CNH2fbCB.d.mts → as-cell-number.vue-BBF0OuU8.d.mts} +0 -0
- /package/dist/{as-cell-number.vue-CJ2K5zeM.d.cts → as-cell-number.vue-pbgVCIWT.d.cts} +0 -0
- /package/dist/{as-cell-union.vue-CslPM_c2.d.cts → as-cell-union.vue-BK_M7opL.d.cts} +0 -0
- /package/dist/{as-cell-union.vue-CZwN81H4.d.mts → as-cell-union.vue-CL-Lf-Rm.d.mts} +0 -0
- /package/dist/{as-config-dialog.vue-BKo2GpzN.d.mts → as-config-dialog.vue-BvFZZRuY.d.mts} +0 -0
- /package/dist/{as-config-dialog.vue-DvvJi3xx.d.cts → as-config-dialog.vue-C-Jw_rb7.d.cts} +0 -0
- /package/dist/{as-confirm-dialog.vue-BN_yzu3h.d.mts → as-confirm-dialog.vue-Cz52-v6c.d.mts} +0 -0
- /package/dist/{as-confirm-dialog.vue-CXxLpzbu.d.cts → as-confirm-dialog.vue-D8hJ5qPY.d.cts} +0 -0
- /package/dist/{as-filter-dialog.vue-BV2J8PgZ.d.cts → as-filter-dialog.vue-CyD6qtuX.d.cts} +0 -0
- /package/dist/{as-filter-dialog.vue-Bl8OIKOf.d.mts → as-filter-dialog.vue-likNLqzF.d.mts} +0 -0
- /package/dist/{as-filter-field.vue-DD0IZXS1.d.mts → as-filter-field.vue-BbXLhd6O.d.mts} +0 -0
- /package/dist/{as-filter-field.vue-ByQ8xIGq.d.cts → as-filter-field.vue-ajAFhraz.d.cts} +0 -0
- /package/dist/{as-filters.vue-dHbGmcbr.d.mts → as-filters.vue-Bu4wK0iD.d.mts} +0 -0
- /package/dist/{as-preset-dialog.vue-ChM7H7B4.d.mts → as-preset-dialog.vue-BEM-L4BY.d.cts} +0 -0
- /package/dist/{as-preset-dialog.vue-DP9fy00Y.d.cts → as-preset-dialog.vue-BRjjfPty.d.mts} +0 -0
- /package/dist/{as-preset-picker.vue-OaAV2v9z.d.mts → as-preset-picker.vue-DAUZOlOD.d.mts} +0 -0
- /package/dist/{as-residual-filter.vue-Dfw1l2wS.d.cts → as-residual-filter.vue-CGXCipEn.d.cts} +0 -0
- /package/dist/{as-residual-filter.vue-N89YqlCz.d.mts → as-residual-filter.vue-DbeOOtR7.d.mts} +0 -0
- /package/dist/{as-table-cell-value.vue-DphckGq-.d.mts → as-table-cell-value.vue-BXIH_yfq.d.mts} +0 -0
- /package/dist/{as-table-cell-value.vue-C0VR9GRK.d.cts → as-table-cell-value.vue-UkAuJanv.d.cts} +0 -0
- /package/dist/{error-message-CfKpn_5w.cjs → error-message-CoUcpWal.cjs} +0 -0
- /package/dist/{error-message-gNEXnnbb.mjs → error-message-rziSiSjs.mjs} +0 -0
- /package/dist/{use-cell-locale-MQXoONh5.mjs → use-cell-locale-BTJZ6UcP.mjs} +0 -0
- /package/dist/{use-cell-locale-BGBRQB7s.cjs → use-cell-locale-Dv514-Al.cjs} +0 -0
- /package/dist/{use-has-emit-listener-DrBbsLHQ.mjs → use-has-emit-listener-CsF2w9iT.mjs} +0 -0
- /package/dist/{use-has-emit-listener-BaGFZDyM.cjs → use-has-emit-listener-gD1aWp6N.cjs} +0 -0
|
@@ -186,6 +186,24 @@ function rowsActionGate(rows) {
|
|
|
186
186
|
return text;
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
+
/** Disabled reason of a non-query-target action in a query selection. Since 0.1.147. */
|
|
190
|
+
const QUERY_TARGET_UNSUPPORTED_REASON = "Not available for all matching rows — select rows individually";
|
|
191
|
+
/**
|
|
192
|
+
* The gate a query selection ("every row matching the query") puts on the
|
|
193
|
+
* `'rows'` actions: enabled iff the action takes a query target
|
|
194
|
+
* (`queryTarget`) of at least `count` rows; otherwise kept DISABLED with the
|
|
195
|
+
* reason ({@link QUERY_TARGET_UNSUPPORTED_REASON}, or "At most {max} rows").
|
|
196
|
+
* The loaded rows' `$actions` are deliberately not consulted — a sample of
|
|
197
|
+
* the matching rows cannot speak for the rest; the server gates every row
|
|
198
|
+
* when the action runs. Since 0.1.147.
|
|
199
|
+
*/
|
|
200
|
+
function queryTargetGate(count) {
|
|
201
|
+
return (a) => {
|
|
202
|
+
if (!a.queryTarget) return QUERY_TARGET_UNSUPPORTED_REASON;
|
|
203
|
+
const max = a.queryTarget.maxRows;
|
|
204
|
+
return count > max ? `At most ${rowsLabel(max)}` : true;
|
|
205
|
+
};
|
|
206
|
+
}
|
|
189
207
|
/**
|
|
190
208
|
* Apply the BULK union gate to a `{default, others, rows}` triple. See
|
|
191
209
|
* {@link rowsActionGate} for the union semantics; identity-stable (returns
|
|
@@ -212,47 +230,111 @@ function intentToScope(intent) {
|
|
|
212
230
|
default: return;
|
|
213
231
|
}
|
|
214
232
|
}
|
|
233
|
+
/** The value at a dot `path` of `row` (a flat dotted key wins). */
|
|
234
|
+
function valueAt(row, path) {
|
|
235
|
+
return Object.hasOwn(row, path) ? row[path] : require_get_cell_value.getCellValue(row, path);
|
|
236
|
+
}
|
|
237
|
+
/** Write `value` at a dot `path` of `out`, creating the nested objects. */
|
|
238
|
+
function setAt(out, path, value) {
|
|
239
|
+
(0, _atscript_ui.setByPath)({ value: out }, path, value);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The fields an action identifier is built from — `tableDef.identifierFields`
|
|
243
|
+
* (`preferredId` plus every delegated action's `idMap` path), falling back to
|
|
244
|
+
* `preferredId` for a hand-built `TableDef` without it. Since 0.1.147.
|
|
245
|
+
*/
|
|
246
|
+
function identifierFieldsOf(def) {
|
|
247
|
+
return def?.identifierFields ?? def?.preferredId ?? [];
|
|
248
|
+
}
|
|
215
249
|
/**
|
|
216
250
|
* Build the identifier object to forward to `client.action` / `client.remove`.
|
|
217
251
|
*
|
|
218
252
|
* Per `@atscript/db-client` invariant #11, identifier bodies are object-only
|
|
219
253
|
* — never bare scalars, even for single-field PK tables. This helper accepts:
|
|
220
|
-
* - a row-shaped object (default `rowValueFn`) → picks `
|
|
221
|
-
*
|
|
254
|
+
* - a row-shaped object (default `rowValueFn`) → picks the `fields` (a dot
|
|
255
|
+
* path keeps the row's nesting: `ref.key` → `{ ref: { key } }`);
|
|
256
|
+
* - a scalar value when `fields` has exactly one entry (consumers that
|
|
222
257
|
* override `rowValueFn` to return the PK scalar) → wraps it.
|
|
223
258
|
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
259
|
+
* `fields` is usually `identifierFields` (see {@link identifierFieldsOf}), so
|
|
260
|
+
* the identifier carries what a delegated action maps from; each action then
|
|
261
|
+
* takes the part it needs ({@link actionIdentifiers}).
|
|
262
|
+
*
|
|
263
|
+
* Returns `undefined` when `fields` is empty, the source is
|
|
264
|
+
* `null`/`undefined`, or a scalar can't be paired with a single field.
|
|
227
265
|
*/
|
|
228
|
-
function extractIdentifier(source,
|
|
266
|
+
function extractIdentifier(source, fields) {
|
|
229
267
|
if (source === void 0 || source === null) return void 0;
|
|
230
|
-
if (
|
|
268
|
+
if (fields.length === 0) return void 0;
|
|
231
269
|
if (typeof source === "object" && !Array.isArray(source)) {
|
|
232
270
|
const row = source;
|
|
233
271
|
const out = {};
|
|
234
|
-
for (const k of
|
|
272
|
+
for (const k of fields) setAt(out, k, valueAt(row, k));
|
|
235
273
|
return out;
|
|
236
274
|
}
|
|
237
|
-
if (
|
|
275
|
+
if (fields.length === 1) return { [fields[0]]: source };
|
|
238
276
|
}
|
|
239
277
|
/**
|
|
240
278
|
* Map a list of sources (full row objects or scalar `rowValueFn` values)
|
|
241
279
|
* through `extractIdentifier`. Scalar sources resolve to their loaded row via
|
|
242
280
|
* `state.rowOf` so consumers that override `rowValueFn` to return a scalar
|
|
243
281
|
* can still reconstruct multi-field identifiers; a scalar whose row is not
|
|
244
|
-
* loaded falls back to itself (a single
|
|
282
|
+
* loaded falls back to itself (a single field wraps it — or, when `fields`
|
|
283
|
+
* has several, the table's single-field `preferredId` does).
|
|
245
284
|
*/
|
|
246
|
-
function collectIdentifiers(state, sources,
|
|
247
|
-
if (
|
|
285
|
+
function collectIdentifiers(state, sources, fields) {
|
|
286
|
+
if (fields.length === 0 || sources.length === 0) return [];
|
|
248
287
|
const out = [];
|
|
249
288
|
for (const s of sources) {
|
|
250
289
|
if (s === void 0 || s === null) continue;
|
|
251
|
-
const
|
|
290
|
+
const row = state.rowOf(s);
|
|
291
|
+
const id = extractIdentifier(row ?? s, fields) ?? (row ? void 0 : extractIdentifier(s, preferredIdOf(state)));
|
|
252
292
|
if (id) out.push(id);
|
|
253
293
|
}
|
|
254
294
|
return out;
|
|
255
295
|
}
|
|
296
|
+
/** The fields `action` is addressed by: its `idMap` paths, else `preferredId`. */
|
|
297
|
+
function actionFields(action, preferredId) {
|
|
298
|
+
return action.idMap ? Object.values(action.idMap) : preferredId;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* The identifiers `action` is sent, from the table's identifiers (built
|
|
302
|
+
* from `identifierFields`): a delegated action (`idMap`) keeps exactly its
|
|
303
|
+
* map's paths — the client maps them to the owner's identification — any
|
|
304
|
+
* other action exactly the `preferredId` fields, the identification the
|
|
305
|
+
* server validates. No fields → no identifiers. Identifiers already in that
|
|
306
|
+
* shape come back as the same array. Since 0.1.147.
|
|
307
|
+
*/
|
|
308
|
+
function actionIdentifiers(action, ids, preferredId) {
|
|
309
|
+
const fields = actionFields(action, preferredId);
|
|
310
|
+
if (fields.length === 0) return [];
|
|
311
|
+
const flat = !fields.some((f) => f.includes("."));
|
|
312
|
+
const exact = (id) => {
|
|
313
|
+
return Object.keys(id).length === fields.length && fields.every((f) => f in id);
|
|
314
|
+
};
|
|
315
|
+
if (flat && ids.every(exact)) return ids;
|
|
316
|
+
return project(ids, fields, setAt);
|
|
317
|
+
}
|
|
318
|
+
/** `ids` cut down to `fields`, each written with `write`. */
|
|
319
|
+
function project(ids, fields, write) {
|
|
320
|
+
return ids.map((id) => {
|
|
321
|
+
const out = {};
|
|
322
|
+
for (const f of fields) write(out, f, valueAt(id, f));
|
|
323
|
+
return out;
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* A query target's `exclude` for `action`: like {@link actionIdentifiers},
|
|
328
|
+
* but keyed by the flat (dotted) field names — the shape the server matches
|
|
329
|
+
* exclusions by.
|
|
330
|
+
*/
|
|
331
|
+
function excludeIdentifiers(action, ids, preferredId) {
|
|
332
|
+
const fields = actionFields(action, preferredId);
|
|
333
|
+
if (fields.length === 0) return [];
|
|
334
|
+
return project(ids, fields, (out, f, v) => {
|
|
335
|
+
out[f] = v;
|
|
336
|
+
});
|
|
337
|
+
}
|
|
256
338
|
/**
|
|
257
339
|
* Accessible name of an action trigger. A disabled action appends its reason
|
|
258
340
|
* (`"Ship, Order already shipped"` — the same `label, reason` shape as the
|
|
@@ -330,7 +412,7 @@ function isModClick(e) {
|
|
|
330
412
|
*/
|
|
331
413
|
function actionHref(state, action, id) {
|
|
332
414
|
if (action.processor !== "navigate" || action.inputForm) return void 0;
|
|
333
|
-
const href = (0, _atscript_ui.navigateHrefFor)(action, id, state
|
|
415
|
+
const href = (0, _atscript_ui.navigateHrefFor)(action, id, preferredIdOf(state));
|
|
334
416
|
return href === void 0 ? void 0 : state.resolveHref(href);
|
|
335
417
|
}
|
|
336
418
|
/**
|
|
@@ -378,6 +460,14 @@ function createNavigateGestures(state, promptCtx, hrefFor) {
|
|
|
378
460
|
}
|
|
379
461
|
};
|
|
380
462
|
}
|
|
463
|
+
/** The table's `preferredId` (empty before its definition loads). */
|
|
464
|
+
function preferredIdOf(state) {
|
|
465
|
+
return state.tableDef.value?.preferredId ?? [];
|
|
466
|
+
}
|
|
467
|
+
/** Row count a prompt speaks about — `count` when set, else the identifiers. */
|
|
468
|
+
function countOf(ctx) {
|
|
469
|
+
return ctx.count ?? ctx.identifiers.length;
|
|
470
|
+
}
|
|
381
471
|
/**
|
|
382
472
|
* Run `state.prompt()` if the action declares a `promptText`. Resolves
|
|
383
473
|
* `true` on accept, or `true` immediately when no prompt is needed.
|
|
@@ -386,18 +476,32 @@ function createNavigateGestures(state, promptCtx, hrefFor) {
|
|
|
386
476
|
* picks `singular` when there is at most one identifier, `plural` otherwise.
|
|
387
477
|
* Substitutions:
|
|
388
478
|
* - `$1` → `formatIdentifier(ctx.identifiers[0], ctx.preferredId)`
|
|
389
|
-
* - `$N` → `
|
|
479
|
+
* - `$N` → the row count (`ctx.count`, else `ctx.identifiers.length`)
|
|
480
|
+
*
|
|
481
|
+
* A query-targeted run (`ctx.target`) is always confirmed: an action without
|
|
482
|
+
* a `promptText` asks "Run “{label}” on {N} rows?".
|
|
390
483
|
*/
|
|
391
484
|
async function confirmAction(state, action, ctx) {
|
|
392
485
|
const raw = action.promptText;
|
|
393
|
-
|
|
394
|
-
|
|
486
|
+
const count = countOf(ctx);
|
|
487
|
+
if (!raw) {
|
|
488
|
+
if (!ctx.target) return true;
|
|
489
|
+
return state.prompt(targetPrompt(action, count), { scope: intentToScope(action.intent) });
|
|
490
|
+
}
|
|
395
491
|
const message = substitute(Array.isArray(raw) ? count <= 1 ? raw[0] : raw[1] : raw, ctx);
|
|
396
492
|
return state.prompt(message, { scope: intentToScope(action.intent) });
|
|
397
493
|
}
|
|
398
494
|
/** Substitute `$1` and `$N` into a prompt-text template. */
|
|
399
495
|
function substitute(template, ctx) {
|
|
400
|
-
return template.replace(/\$1/g, () => (0, _atscript_db_client.formatIdentifier)(ctx.identifiers[0], ctx.preferredId)).replace(/\$N/g, () => String(ctx
|
|
496
|
+
return template.replace(/\$1/g, () => (0, _atscript_db_client.formatIdentifier)(ctx.identifiers[0], ctx.preferredId)).replace(/\$N/g, () => String(countOf(ctx)));
|
|
497
|
+
}
|
|
498
|
+
/** `N row(s)`. */
|
|
499
|
+
function rowsLabel(count) {
|
|
500
|
+
return `${count} ${count === 1 ? "row" : "rows"}`;
|
|
501
|
+
}
|
|
502
|
+
/** Default confirmation of a query-targeted run without a `promptText`. */
|
|
503
|
+
function targetPrompt(action, count) {
|
|
504
|
+
return `Run “${action.label || action.name}” on ${rowsLabel(count)}?`;
|
|
401
505
|
}
|
|
402
506
|
/**
|
|
403
507
|
* Dispatch user-initiated invocation: actions with `inputForm` open the form
|
|
@@ -409,7 +513,11 @@ function substitute(template, ctx) {
|
|
|
409
513
|
*/
|
|
410
514
|
async function triggerAction(state, action, ctx, event) {
|
|
411
515
|
if (isActionDisabled(action)) return;
|
|
412
|
-
|
|
516
|
+
if (ctx.target) {
|
|
517
|
+
await triggerTargetAction(state, action, ctx, ctx.target, event);
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
const pk = pkForLevel(action.level, actionIdentifiers(action, ctx.identifiers, ctx.preferredId));
|
|
413
521
|
if (action.inputForm) {
|
|
414
522
|
const input = await state.requestActionInput(action, ctx);
|
|
415
523
|
if (input === null) return;
|
|
@@ -427,6 +535,42 @@ async function triggerAction(state, action, ctx, event) {
|
|
|
427
535
|
});
|
|
428
536
|
}
|
|
429
537
|
/**
|
|
538
|
+
* The query-target path of {@link triggerAction}: count the matching rows
|
|
539
|
+
* (`state.actions.countTarget` — a failure settles as the action's error
|
|
540
|
+
* result), confirm with that count (the input form, which shows it, or the
|
|
541
|
+
* prompt), then run with `expectCount` so a set that changed in between is
|
|
542
|
+
* re-confirmed once with its new count instead of silently run.
|
|
543
|
+
*/
|
|
544
|
+
async function triggerTargetAction(state, action, ctx, selection, event) {
|
|
545
|
+
if (action.level !== "rows" || !action.queryTarget) return;
|
|
546
|
+
const exclude = excludeIdentifiers(action, selection.exclude, ctx.preferredId);
|
|
547
|
+
const target = {
|
|
548
|
+
filter: selection.filter,
|
|
549
|
+
search: selection.search,
|
|
550
|
+
index: selection.index,
|
|
551
|
+
exclude: exclude.length > 0 ? exclude : void 0
|
|
552
|
+
};
|
|
553
|
+
const matched = await state.actions.countTarget(action, target, event);
|
|
554
|
+
if (matched === void 0) return;
|
|
555
|
+
const counted = {
|
|
556
|
+
...ctx,
|
|
557
|
+
identifiers: [],
|
|
558
|
+
count: matched
|
|
559
|
+
};
|
|
560
|
+
let input;
|
|
561
|
+
if (action.inputForm) {
|
|
562
|
+
input = await state.requestActionInput(action, counted);
|
|
563
|
+
if (input === null) return;
|
|
564
|
+
} else if (!await confirmAction(state, action, counted)) return;
|
|
565
|
+
state.actions.invoke(action, void 0, {
|
|
566
|
+
event,
|
|
567
|
+
input,
|
|
568
|
+
target,
|
|
569
|
+
expectCount: matched,
|
|
570
|
+
confirmTargetChange: (now) => state.prompt(`The rows matching the query changed. ${targetPrompt(action, now)}`, { scope: intentToScope(action.intent) })
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
430
574
|
* Pick the `pk` argument to forward to `state.actions.invoke` based on the
|
|
431
575
|
* action's level. `'table'` → `undefined`; `'row'` → first identifier;
|
|
432
576
|
* `'rows'` → full array.
|
|
@@ -557,6 +701,24 @@ const REMOVE_DEFAULTS = {
|
|
|
557
701
|
intent: "negative",
|
|
558
702
|
promptText: ["Delete item $1?", "Delete $N items?"]
|
|
559
703
|
};
|
|
704
|
+
/** `true` for a {@link TDbActionTargetSummary}-shaped handler return. */
|
|
705
|
+
function isTargetSummary(data) {
|
|
706
|
+
if (typeof data !== "object" || data === null) return false;
|
|
707
|
+
const d = data;
|
|
708
|
+
return typeof d.matched === "number" && typeof d.processed === "number" && Array.isArray(d.skipped) && Array.isArray(d.failed);
|
|
709
|
+
}
|
|
710
|
+
/** The new match count of a 409 `TARGET_CHANGED` refusal, else `undefined`. */
|
|
711
|
+
function targetChangedCount(err) {
|
|
712
|
+
const e = err;
|
|
713
|
+
return e?.name === "ActionTargetError" && e.code === "TARGET_CHANGED" && typeof e.matched === "number" ? e.matched : void 0;
|
|
714
|
+
}
|
|
715
|
+
/** `data.message` when the handler returned one. */
|
|
716
|
+
function messageOf(data) {
|
|
717
|
+
return typeof data === "object" && data !== null && "message" in data ? data.message : void 0;
|
|
718
|
+
}
|
|
719
|
+
function toError(err) {
|
|
720
|
+
return err instanceof Error ? err : new Error(String(err));
|
|
721
|
+
}
|
|
560
722
|
function createActions(opts) {
|
|
561
723
|
const invoking = (0, vue.shallowRef)(/* @__PURE__ */ new Set());
|
|
562
724
|
const lastResult = (0, vue.shallowRef)(/* @__PURE__ */ new Map());
|
|
@@ -606,12 +768,16 @@ function createActions(opts) {
|
|
|
606
768
|
};
|
|
607
769
|
break;
|
|
608
770
|
default: {
|
|
771
|
+
if (callOpts?.target) {
|
|
772
|
+
result = await invokeOnTarget(action, callOpts.target, callOpts);
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
609
775
|
const data = await opts.client.action(action.name, pk, callOpts?.input);
|
|
610
776
|
result = {
|
|
611
777
|
ok: true,
|
|
612
778
|
kind: "backend",
|
|
613
779
|
data,
|
|
614
|
-
message:
|
|
780
|
+
message: messageOf(data)
|
|
615
781
|
};
|
|
616
782
|
break;
|
|
617
783
|
}
|
|
@@ -620,15 +786,62 @@ function createActions(opts) {
|
|
|
620
786
|
result = {
|
|
621
787
|
ok: false,
|
|
622
788
|
kind: "error",
|
|
623
|
-
error:
|
|
789
|
+
error: toError(err)
|
|
624
790
|
};
|
|
625
791
|
}
|
|
626
792
|
setLastResult(name, result);
|
|
627
793
|
setInvoking(name, false);
|
|
628
794
|
if (callOpts?.suppressRefresh !== true && opts.refreshOnAction() !== false && result.ok && (result.kind === "backend" || result.kind === "remove")) opts.scheduleQuery("query");
|
|
795
|
+
if (result.ok && result.kind === "backend" && result.target) opts.onTargetSettled?.();
|
|
629
796
|
if (opts.onResolved) opts.onResolved(action, idsForAction(action.level, pk), result, callOpts?.event);
|
|
630
797
|
return result;
|
|
631
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* `client.actionOnQuery` with the confirmed `expectCount`; a 409
|
|
801
|
+
* `TARGET_CHANGED` asks `confirmTargetChange` once with the new count and,
|
|
802
|
+
* on yes, runs again expecting it. Throws what the client throws.
|
|
803
|
+
*/
|
|
804
|
+
async function invokeOnTarget(action, target, callOpts) {
|
|
805
|
+
let expectCount = callOpts.expectCount;
|
|
806
|
+
const run = () => opts.client.actionOnQuery(action.name, {
|
|
807
|
+
...target,
|
|
808
|
+
expectCount
|
|
809
|
+
}, callOpts.input);
|
|
810
|
+
let data;
|
|
811
|
+
try {
|
|
812
|
+
data = await run();
|
|
813
|
+
} catch (err) {
|
|
814
|
+
const now = targetChangedCount(err);
|
|
815
|
+
if (now === void 0 || !await callOpts.confirmTargetChange?.(now)) throw err;
|
|
816
|
+
expectCount = now;
|
|
817
|
+
data = await run();
|
|
818
|
+
}
|
|
819
|
+
const summary = isTargetSummary(data) ? data : void 0;
|
|
820
|
+
return {
|
|
821
|
+
ok: true,
|
|
822
|
+
kind: "backend",
|
|
823
|
+
data,
|
|
824
|
+
message: messageOf(data),
|
|
825
|
+
target: {
|
|
826
|
+
matched: summary?.matched ?? expectCount ?? 0,
|
|
827
|
+
summary
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
async function countTarget(action, target, event) {
|
|
832
|
+
try {
|
|
833
|
+
return (await opts.client.countActionTarget(action.name, target)).matched;
|
|
834
|
+
} catch (err) {
|
|
835
|
+
const result = {
|
|
836
|
+
ok: false,
|
|
837
|
+
kind: "error",
|
|
838
|
+
error: toError(err)
|
|
839
|
+
};
|
|
840
|
+
setLastResult(action.name, result);
|
|
841
|
+
opts.onResolved?.(action, [], result, event);
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
632
845
|
return {
|
|
633
846
|
actions: {
|
|
634
847
|
get table() {
|
|
@@ -650,6 +863,7 @@ function createActions(opts) {
|
|
|
650
863
|
return groups.value.cellRow;
|
|
651
864
|
},
|
|
652
865
|
invoke,
|
|
866
|
+
countTarget,
|
|
653
867
|
invoking,
|
|
654
868
|
lastResult
|
|
655
869
|
},
|
|
@@ -727,10 +941,12 @@ const SELECTABLE = Object.freeze({ ok: true });
|
|
|
727
941
|
const NOT_SELECTABLE = Object.freeze({ ok: false });
|
|
728
942
|
/**
|
|
729
943
|
* The header tri-state from how many of the rows in scope are eligible and
|
|
730
|
-
* how many of those are selected.
|
|
944
|
+
* how many of those are selected. In a query selection (`queryMode`) the
|
|
945
|
+
* header is never `"none"`: rows outside the loaded ones stay selected, so a
|
|
946
|
+
* page whose rows are all excluded still reads `"some"`.
|
|
731
947
|
*/
|
|
732
|
-
function toSelectAllState(selected, selectable) {
|
|
733
|
-
if (selected === 0) return "none";
|
|
948
|
+
function toSelectAllState(selected, selectable, queryMode = false) {
|
|
949
|
+
if (selected === 0 && !queryMode) return "none";
|
|
734
950
|
return selected >= selectable ? "all" : "some";
|
|
735
951
|
}
|
|
736
952
|
/** Normalise a {@link RowSelectableHook} return value. `""` carries no reason. */
|
|
@@ -743,8 +959,27 @@ function verdictOf(value) {
|
|
|
743
959
|
}
|
|
744
960
|
function createSelectionApi(opts, getActiveRow, activeIndex, windowCache) {
|
|
745
961
|
const selectedRows = opts?.selectedRows ?? (0, vue.shallowRef)([]);
|
|
746
|
-
const
|
|
962
|
+
const querySelection = opts?.querySelection ?? (0, vue.shallowRef)(null);
|
|
963
|
+
const selectedCount = (0, vue.computed)(() => {
|
|
964
|
+
const q = querySelection.value;
|
|
965
|
+
return q ? Math.max(0, q.total - q.excluded.length) : selectedRows.value.length;
|
|
966
|
+
});
|
|
967
|
+
const selection = (0, vue.computed)(() => {
|
|
968
|
+
const q = querySelection.value;
|
|
969
|
+
return q ? {
|
|
970
|
+
mode: "query",
|
|
971
|
+
query: q.query,
|
|
972
|
+
excluded: q.excluded,
|
|
973
|
+
total: q.total,
|
|
974
|
+
count: selectedCount.value
|
|
975
|
+
} : {
|
|
976
|
+
mode: "ids",
|
|
977
|
+
ids: selectedRows.value,
|
|
978
|
+
count: selectedCount.value
|
|
979
|
+
};
|
|
980
|
+
});
|
|
747
981
|
const rowValueFn = opts?.rowValueFn ?? ((row) => row);
|
|
982
|
+
const identityOf = opts?.identityOf ?? ((value) => value);
|
|
748
983
|
const rowByValue = (0, vue.computed)(() => {
|
|
749
984
|
const map = /* @__PURE__ */ new Map();
|
|
750
985
|
for (const row of windowCache.value.values()) map.set(rowValueFn(row), row);
|
|
@@ -757,6 +992,10 @@ function createSelectionApi(opts, getActiveRow, activeIndex, windowCache) {
|
|
|
757
992
|
}
|
|
758
993
|
const selectedRowObjects = (0, vue.computed)(() => {
|
|
759
994
|
const out = [];
|
|
995
|
+
if (querySelection.value) {
|
|
996
|
+
for (const row of windowCache.value.values()) if (!excludedSet.value.has(identityOf(rowValueFn(row)))) out.push(row);
|
|
997
|
+
return out;
|
|
998
|
+
}
|
|
760
999
|
for (const value of selectedRows.value) {
|
|
761
1000
|
const row = rowOf(value);
|
|
762
1001
|
if (row) out.push(row);
|
|
@@ -764,8 +1003,27 @@ function createSelectionApi(opts, getActiveRow, activeIndex, windowCache) {
|
|
|
764
1003
|
return out;
|
|
765
1004
|
});
|
|
766
1005
|
const selectedSet = (0, vue.computed)(() => new Set(selectedRows.value));
|
|
1006
|
+
/** Identity keys of the excluded values (see `identityOf`). */
|
|
1007
|
+
const excludedSet = (0, vue.computed)(() => new Set((querySelection.value?.excluded ?? []).map(identityOf)));
|
|
767
1008
|
function isPkSelected(pk) {
|
|
768
|
-
return selectedSet.value.has(pk);
|
|
1009
|
+
return querySelection.value ? !excludedSet.value.has(identityOf(pk)) : selectedSet.value.has(pk);
|
|
1010
|
+
}
|
|
1011
|
+
/** Replace the query selection's `excluded` list (a no-op when unchanged). */
|
|
1012
|
+
function setExcluded(next) {
|
|
1013
|
+
const q = querySelection.value;
|
|
1014
|
+
if (q && next !== q.excluded) querySelection.value = {
|
|
1015
|
+
...q,
|
|
1016
|
+
excluded: next
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
function enterQuerySelection(query, total) {
|
|
1020
|
+
if (selectedRows.value.length > 0) selectedRows.value = [];
|
|
1021
|
+
querySelection.value = {
|
|
1022
|
+
query,
|
|
1023
|
+
signature: (0, _atscript_ui_table.selectionSignature)(query),
|
|
1024
|
+
excluded: [],
|
|
1025
|
+
total
|
|
1026
|
+
};
|
|
769
1027
|
}
|
|
770
1028
|
const rowSelectable = (0, vue.ref)();
|
|
771
1029
|
function isRowSelectable(row, index) {
|
|
@@ -788,32 +1046,57 @@ function createSelectionApi(opts, getActiveRow, activeIndex, windowCache) {
|
|
|
788
1046
|
for (let i = 0; i < rows.length; i++) if (isRowSelectable(rows[i], i).ok) n++;
|
|
789
1047
|
return n;
|
|
790
1048
|
}
|
|
791
|
-
function eligiblePks(rows) {
|
|
792
|
-
return (0, _atscript_ui_table.rowsToPks)(selectableRows(rows), rowValueFn);
|
|
1049
|
+
function eligiblePks(rows, indexOf) {
|
|
1050
|
+
return (0, _atscript_ui_table.rowsToPks)(indexOf ? rows.filter((row, i) => isRowSelectable(row, indexOf(i)).ok) : selectableRows(rows), rowValueFn);
|
|
793
1051
|
}
|
|
794
1052
|
function addPks(pks) {
|
|
1053
|
+
if (querySelection.value) {
|
|
1054
|
+
const drop = new Set(pks.map(identityOf));
|
|
1055
|
+
const excluded = querySelection.value.excluded;
|
|
1056
|
+
const next = excluded.filter((pk) => !drop.has(identityOf(pk)));
|
|
1057
|
+
setExcluded(next.length === excluded.length ? excluded : next);
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
795
1060
|
const current = selectedSet.value;
|
|
796
1061
|
const added = [...new Set(pks)].filter((pk) => !current.has(pk));
|
|
797
1062
|
if (added.length > 0) selectedRows.value = [...selectedRows.value, ...added];
|
|
798
1063
|
}
|
|
799
1064
|
function removePks(pks) {
|
|
1065
|
+
if (querySelection.value) {
|
|
1066
|
+
const seen = new Set(excludedSet.value);
|
|
1067
|
+
const added = [];
|
|
1068
|
+
for (const pk of pks) {
|
|
1069
|
+
const key = identityOf(pk);
|
|
1070
|
+
if (seen.has(key)) continue;
|
|
1071
|
+
seen.add(key);
|
|
1072
|
+
added.push(pk);
|
|
1073
|
+
}
|
|
1074
|
+
if (added.length > 0) setExcluded([...querySelection.value.excluded, ...added]);
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
800
1077
|
const drop = new Set(pks);
|
|
801
1078
|
const next = selectedRows.value.filter((pk) => !drop.has(pk));
|
|
802
1079
|
if (next.length !== selectedRows.value.length) selectedRows.value = next;
|
|
803
1080
|
}
|
|
804
1081
|
function selectAll(rows, indexOf) {
|
|
805
|
-
addPks((
|
|
1082
|
+
addPks(eligiblePks(rows, indexOf));
|
|
806
1083
|
}
|
|
807
1084
|
function deselectAll(rows) {
|
|
808
1085
|
removePks(eligiblePks(rows));
|
|
809
1086
|
}
|
|
810
|
-
function toggleAll(rows) {
|
|
811
|
-
const pks = eligiblePks(rows);
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
1087
|
+
function toggleAll(rows, indexOf) {
|
|
1088
|
+
const pks = eligiblePks(rows, indexOf);
|
|
1089
|
+
const all = pks.every(isPkSelected);
|
|
1090
|
+
if (querySelection.value) {
|
|
1091
|
+
if (all) clearSelection();
|
|
1092
|
+
else addPks(pks);
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
if (pks.length > 0 && all) removePks(pks);
|
|
814
1096
|
else addPks(pks);
|
|
815
1097
|
}
|
|
816
1098
|
function clearSelection() {
|
|
1099
|
+
if (querySelection.value) querySelection.value = null;
|
|
817
1100
|
if (selectedRows.value.length > 0) selectedRows.value = [];
|
|
818
1101
|
}
|
|
819
1102
|
function toggleActiveSelection(mode) {
|
|
@@ -821,10 +1104,18 @@ function createSelectionApi(opts, getActiveRow, activeIndex, windowCache) {
|
|
|
821
1104
|
const row = getActiveRow();
|
|
822
1105
|
if (row === void 0) return;
|
|
823
1106
|
if (!isRowSelectable(row, activeIndex.value).ok) return;
|
|
1107
|
+
const q = querySelection.value;
|
|
1108
|
+
if (q) {
|
|
1109
|
+
setExcluded((0, _atscript_ui_table.togglePk)(q.excluded, rowValueFn(row), "multi", identityOf));
|
|
1110
|
+
return;
|
|
1111
|
+
}
|
|
824
1112
|
selectedRows.value = (0, _atscript_ui_table.togglePk)(selectedRows.value, rowValueFn(row), mode);
|
|
825
1113
|
}
|
|
826
1114
|
return {
|
|
827
1115
|
selectedRows,
|
|
1116
|
+
querySelection,
|
|
1117
|
+
selection,
|
|
1118
|
+
enterQuerySelection,
|
|
828
1119
|
selectedCount,
|
|
829
1120
|
selectedSet,
|
|
830
1121
|
rowValueFn,
|
|
@@ -1868,7 +2159,8 @@ function sameResidualFilters(a, b) {
|
|
|
1868
2159
|
*/
|
|
1869
2160
|
function warnUnsupportedFilter(issue) {
|
|
1870
2161
|
if (!_atscript_ui_table.DEV) return;
|
|
1871
|
-
|
|
2162
|
+
const why = issue.reason === "syntax" ? "It does not parse" : "Field filters cannot express it";
|
|
2163
|
+
console.warn(`[vue-table] URL filter left out (${issue.reason}): ${issue.raw ?? JSON.stringify(issue.expr)}. ${why}, so the table shows more rows than the URL described.`);
|
|
1872
2164
|
}
|
|
1873
2165
|
/**
|
|
1874
2166
|
* The report for fields the table left out when nobody handles it
|
|
@@ -1907,6 +2199,8 @@ function createTableState(opts) {
|
|
|
1907
2199
|
});
|
|
1908
2200
|
const rowDelete = (0, vue.ref)(false);
|
|
1909
2201
|
const includeActions = (0, vue.ref)(false);
|
|
2202
|
+
const selectMode = (0, vue.ref)("none");
|
|
2203
|
+
const allowSelectAllMatching = (0, vue.ref)(false);
|
|
1910
2204
|
const rowActions = (0, vue.ref)(void 0);
|
|
1911
2205
|
/**
|
|
1912
2206
|
* The per-screen row-action policy, compiled once per config change instead
|
|
@@ -2012,7 +2306,8 @@ function createTableState(opts) {
|
|
|
2012
2306
|
return formSlot.request({
|
|
2013
2307
|
action,
|
|
2014
2308
|
identifiers: ctx.identifiers,
|
|
2015
|
-
preferredId: ctx.preferredId
|
|
2309
|
+
preferredId: ctx.preferredId,
|
|
2310
|
+
count: ctx.count
|
|
2016
2311
|
});
|
|
2017
2312
|
}
|
|
2018
2313
|
const actionFormDisplay = formSlot.display;
|
|
@@ -2064,10 +2359,33 @@ function createTableState(opts) {
|
|
|
2064
2359
|
}
|
|
2065
2360
|
/** Reads the value a sorter orders by — a display column's `sortValue` wins. */
|
|
2066
2361
|
const sortValueOf = createSortValueReader(opts.displayColumns);
|
|
2362
|
+
/** The app-authored scope, read live — the query, local sort and chrome all go through these. */
|
|
2363
|
+
const forceFilters = (0, vue.computed)(() => (0, vue.toValue)(queryOpts?.forceFilters));
|
|
2364
|
+
const timeZone = (0, vue.computed)(() => (0, vue.toValue)(queryOpts?.timeZone));
|
|
2365
|
+
const weekStart = (0, vue.computed)(() => (0, vue.toValue)(queryOpts?.weekStart));
|
|
2366
|
+
/**
|
|
2367
|
+
* Turns a typed filter value into what the server accepts (date periods in
|
|
2368
|
+
* `timeZone`, boolean text → boolean). Rebuilt when the columns, the zone or
|
|
2369
|
+
* the week start change; "today" is read at each query build.
|
|
2370
|
+
*/
|
|
2371
|
+
const encodeCondition = (0, vue.computed)(() => (0, _atscript_ui_table.createColumnValueEncoder)(allColumns.value, {
|
|
2372
|
+
timeZone: timeZone.value,
|
|
2373
|
+
weekStart: weekStart.value
|
|
2374
|
+
}));
|
|
2375
|
+
const forceSorters = (0, vue.computed)(() => (0, vue.toValue)(queryOpts?.forceSorters) ?? []);
|
|
2376
|
+
/** Whether a date filter is set — the only filters a zone or week-start change affects. */
|
|
2377
|
+
function hasFilledTemporalFilter() {
|
|
2378
|
+
for (const c of allColumns.value) {
|
|
2379
|
+
if (!c.valueKind || !(0, _atscript_ui_table.isTemporalKind)((0, _atscript_ui_table.columnFilterKind)(c))) continue;
|
|
2380
|
+
if (filters.value[c.path]?.some(_atscript_ui_table.isFilled)) return true;
|
|
2381
|
+
}
|
|
2382
|
+
return false;
|
|
2383
|
+
}
|
|
2067
2384
|
function applyLocalSort(rows) {
|
|
2068
2385
|
if (queryOpts?.preSorted) return rows;
|
|
2069
2386
|
if (splitSorters.value.local.length === 0 || sortersIgnored()) return rows;
|
|
2070
|
-
|
|
2387
|
+
const forced = forceSorters.value;
|
|
2388
|
+
return (0, _atscript_ui_table.sortRowsLocally)(rows, forced.length ? (0, _atscript_ui_table.mergeSorters)(forced, sorters.value) : sorters.value, sortValueOf);
|
|
2071
2389
|
}
|
|
2072
2390
|
/**
|
|
2073
2391
|
* The query's view of the model, gated to the fields this caller can use.
|
|
@@ -2110,8 +2428,10 @@ function createTableState(opts) {
|
|
|
2110
2428
|
const available = tableDef.value?.fetchableFields ?? knownFields.value?.columns ?? /* @__PURE__ */ new Set();
|
|
2111
2429
|
const extra = /* @__PURE__ */ new Set();
|
|
2112
2430
|
for (const c of columns.value) for (const p of c.selectWith ?? []) if (available.has(p)) extra.add(p);
|
|
2113
|
-
|
|
2114
|
-
|
|
2431
|
+
for (const p of (0, vue.toValue)(queryOpts?.alwaysSelected) ?? []) if (available.has(p)) extra.add(p);
|
|
2432
|
+
const def = tableDef.value;
|
|
2433
|
+
if (def?.identifierFields && def.identifierFields !== def.preferredId) {
|
|
2434
|
+
for (const p of def.identifierFields) if (available.has(p) && !def.preferredId.includes(p)) extra.add(p);
|
|
2115
2435
|
}
|
|
2116
2436
|
const model = queryModel.value;
|
|
2117
2437
|
if (_atscript_ui_table.DEV && model.stripped.length > 0) {
|
|
@@ -2127,10 +2447,11 @@ function createTableState(opts) {
|
|
|
2127
2447
|
visibleColumnPaths: (buildOpts?.columnPaths ?? model.columnNames).filter((p) => !localPaths.has(p) && (!known || known.columns.has(p))),
|
|
2128
2448
|
extraSelect: extra.size ? [...extra] : void 0,
|
|
2129
2449
|
sorters: model.sorters,
|
|
2130
|
-
forceSorters:
|
|
2450
|
+
forceSorters: forceSorters.value,
|
|
2131
2451
|
filters: model.filters,
|
|
2452
|
+
encodeCondition: encodeCondition.value,
|
|
2132
2453
|
residualFilters: model.residual,
|
|
2133
|
-
forceFilters:
|
|
2454
|
+
forceFilters: forceFilters.value,
|
|
2134
2455
|
search: searchTerm.value || void 0,
|
|
2135
2456
|
ignoreSorters: sortersIgnored(),
|
|
2136
2457
|
includeActions: buildOpts?.includeActions ?? includeActions.value
|
|
@@ -2187,14 +2508,79 @@ function createTableState(opts) {
|
|
|
2187
2508
|
if (idx < 0) return void 0;
|
|
2188
2509
|
return navMode.value === "window" ? dataAt(idx) : results.value[idx];
|
|
2189
2510
|
}
|
|
2190
|
-
|
|
2511
|
+
/**
|
|
2512
|
+
* A query selection's exclusions compare row objects (the default
|
|
2513
|
+
* `rowValueFn`) by their identifier — a refetch replaces every row object.
|
|
2514
|
+
*/
|
|
2515
|
+
let identityDef = null;
|
|
2516
|
+
let identityCache = /* @__PURE__ */ new WeakMap();
|
|
2517
|
+
function selectionIdentity(value) {
|
|
2518
|
+
const def = tableDef.value;
|
|
2519
|
+
if (value === null || typeof value !== "object") return value;
|
|
2520
|
+
if (def !== identityDef) {
|
|
2521
|
+
identityDef = def;
|
|
2522
|
+
identityCache = /* @__PURE__ */ new WeakMap();
|
|
2523
|
+
}
|
|
2524
|
+
if (identityCache.has(value)) return identityCache.get(value);
|
|
2525
|
+
const id = extractIdentifier(value, identifierFieldsOf(def));
|
|
2526
|
+
const key = id ? JSON.stringify(Object.values(id)) : value;
|
|
2527
|
+
identityCache.set(value, key);
|
|
2528
|
+
return key;
|
|
2529
|
+
}
|
|
2530
|
+
const selection = createSelectionApi({
|
|
2531
|
+
...selectionOpts,
|
|
2532
|
+
identityOf: selectionIdentity
|
|
2533
|
+
}, getActiveRow, activeIndex, windowCache);
|
|
2534
|
+
const { selectedRows, querySelection, selection: tableSelection, selectedCount, rowValueFn, rowByValue, rowOf, selectedRowObjects, isPkSelected, rowSelectable, isRowSelectable, selectableRows, selectableCount, selectAll, deselectAll, toggleAll, clearSelection, toggleActiveSelection } = selection;
|
|
2535
|
+
const loadedEligiblePks = (0, vue.computed)(() => {
|
|
2536
|
+
const out = [];
|
|
2537
|
+
const offset = navMode.value === "window" ? 0 : resultsStart.value;
|
|
2538
|
+
const gated = !!rowSelectable.value;
|
|
2539
|
+
for (const [abs, row] of windowCache.value) if (!gated || isRowSelectable(row, abs - offset).ok) out.push(rowValueFn(row));
|
|
2540
|
+
return out;
|
|
2541
|
+
});
|
|
2542
|
+
const loadedSelectedCount = (0, vue.computed)(() => {
|
|
2543
|
+
let n = 0;
|
|
2544
|
+
for (const pk of loadedEligiblePks.value) if (isPkSelected(pk)) n++;
|
|
2545
|
+
return n;
|
|
2546
|
+
});
|
|
2547
|
+
const hasQueryTargetAction = (0, vue.computed)(() => tableDef.value?.actions.rows.some((a) => !!a.queryTarget) ?? false);
|
|
2548
|
+
const canSelectAllMatching = (0, vue.computed)(() => allowSelectAllMatching.value && selectMode.value === "multi" && !queryOpts?.fn && totalCount.value > windowCache.value.size && hasQueryTargetAction.value);
|
|
2549
|
+
/** The filter / search / index of the query the table would send now. */
|
|
2550
|
+
function currentSelectionQuery() {
|
|
2551
|
+
return (0, _atscript_ui_table.selectionQueryOf)(buildCurrentQuery({ includeActions: false }));
|
|
2552
|
+
}
|
|
2553
|
+
function selectAllMatching() {
|
|
2554
|
+
if (!canSelectAllMatching.value) return;
|
|
2555
|
+
selection.enterQuerySelection(currentSelectionQuery(), totalCount.value);
|
|
2556
|
+
}
|
|
2557
|
+
const holdingQuerySelection = (0, vue.computed)(() => querySelection.value !== null);
|
|
2558
|
+
(0, vue.watch)(() => holdingQuerySelection.value ? (0, _atscript_ui_table.selectionSignature)(currentSelectionQuery()) : null, (live) => {
|
|
2559
|
+
const q = querySelection.value;
|
|
2560
|
+
if (live === null || !q || live === q.signature) return;
|
|
2561
|
+
querySelection.value = null;
|
|
2562
|
+
selectionOpts?.onSelectionReset?.({ reason: "scope" });
|
|
2563
|
+
});
|
|
2564
|
+
(0, vue.watch)([totalCount, querying], ([count, busy]) => {
|
|
2565
|
+
const q = querySelection.value;
|
|
2566
|
+
if (!q || busy || queryError.value || count === q.total) return;
|
|
2567
|
+
if (count === 0 && windowCache.value.size === 0) return;
|
|
2568
|
+
querySelection.value = {
|
|
2569
|
+
...q,
|
|
2570
|
+
total: count
|
|
2571
|
+
};
|
|
2572
|
+
});
|
|
2573
|
+
(0, vue.watch)(selectedRows, (rows) => {
|
|
2574
|
+
if (rows.length > 0 && querySelection.value) querySelection.value = null;
|
|
2575
|
+
});
|
|
2191
2576
|
const { actions } = createActions({
|
|
2192
2577
|
tableDef,
|
|
2193
2578
|
client,
|
|
2194
2579
|
rowDelete: () => rowDelete.value,
|
|
2195
2580
|
scheduleQuery,
|
|
2196
2581
|
refreshOnAction: () => opts.actions?.refreshOnAction?.(),
|
|
2197
|
-
onResolved: opts.actions?.onResolved
|
|
2582
|
+
onResolved: opts.actions?.onResolved,
|
|
2583
|
+
onTargetSettled: clearSelection
|
|
2198
2584
|
});
|
|
2199
2585
|
let stateRef = null;
|
|
2200
2586
|
const { hasMainActionListener, hasMainActionAvailable, registerMainActionListener, requestMainAction } = createMainActionRegistry({
|
|
@@ -2206,7 +2592,7 @@ function createTableState(opts) {
|
|
|
2206
2592
|
const action = resolveRowActions(stateRef, row, { withRows: false }).default;
|
|
2207
2593
|
if (!action) return;
|
|
2208
2594
|
const preferredId = tableDef.value?.preferredId ?? [];
|
|
2209
|
-
const identifiers = collectIdentifiers(stateRef, [row],
|
|
2595
|
+
const identifiers = collectIdentifiers(stateRef, [row], identifierFieldsOf(tableDef.value));
|
|
2210
2596
|
triggerAction(stateRef, action, {
|
|
2211
2597
|
identifiers,
|
|
2212
2598
|
preferredId,
|
|
@@ -2350,6 +2736,9 @@ function createTableState(opts) {
|
|
|
2350
2736
|
metadataError,
|
|
2351
2737
|
lastError,
|
|
2352
2738
|
mustRefresh,
|
|
2739
|
+
forceFilters,
|
|
2740
|
+
forceSorters,
|
|
2741
|
+
timeZone,
|
|
2353
2742
|
searchTerm,
|
|
2354
2743
|
ignoreSortersWhenSearched,
|
|
2355
2744
|
configDialogOpen,
|
|
@@ -2357,6 +2746,14 @@ function createTableState(opts) {
|
|
|
2357
2746
|
filterDialogColumn,
|
|
2358
2747
|
selectedRows,
|
|
2359
2748
|
selectedCount,
|
|
2749
|
+
querySelection,
|
|
2750
|
+
selection: tableSelection,
|
|
2751
|
+
allowSelectAllMatching,
|
|
2752
|
+
selectMode,
|
|
2753
|
+
loadedEligiblePks,
|
|
2754
|
+
loadedSelectedCount,
|
|
2755
|
+
canSelectAllMatching,
|
|
2756
|
+
selectAllMatching,
|
|
2360
2757
|
rowValueFn,
|
|
2361
2758
|
rowByValue,
|
|
2362
2759
|
rowOf,
|
|
@@ -2634,6 +3031,27 @@ function createTableState(opts) {
|
|
|
2634
3031
|
resetPagination();
|
|
2635
3032
|
debouncedFilterQuery();
|
|
2636
3033
|
});
|
|
3034
|
+
const readScope = () => ({
|
|
3035
|
+
filter: (0, _atscript_ui_table.stableValueKey)(forceFilters.value ?? null),
|
|
3036
|
+
sorters: (0, _atscript_ui_table.stableValueKey)(forceSorters.value),
|
|
3037
|
+
selected: ((0, vue.toValue)(queryOpts?.alwaysSelected) ?? []).join("\0"),
|
|
3038
|
+
zone: `${timeZone.value ?? ""}|${weekStart.value ?? ""}`
|
|
3039
|
+
});
|
|
3040
|
+
let scope = readScope();
|
|
3041
|
+
(0, vue.watch)(() => Object.values(readScope()).join(""), () => {
|
|
3042
|
+
const prev = scope;
|
|
3043
|
+
scope = readScope();
|
|
3044
|
+
if (!queryDetected) return;
|
|
3045
|
+
const filterChanged = scope.filter !== prev.filter;
|
|
3046
|
+
if (!filterChanged && scope.sorters === prev.sorters && scope.selected === prev.selected && (scope.zone === prev.zone || !hasFilledTemporalFilter())) return;
|
|
3047
|
+
mustRefresh.value = true;
|
|
3048
|
+
if (hydratingFromUrl) {
|
|
3049
|
+
if (filterChanged && urlQuerySync?.pagination === false) resetPagination();
|
|
3050
|
+
return;
|
|
3051
|
+
}
|
|
3052
|
+
if (filterChanged) resetPagination();
|
|
3053
|
+
scheduleQuery();
|
|
3054
|
+
});
|
|
2637
3055
|
(0, vue.watch)(() => sorters.value, (next, prev) => {
|
|
2638
3056
|
if (hydratingFromUrl) return;
|
|
2639
3057
|
if ((0, _atscript_ui_table.sortersEqual)(prev, next)) return;
|
|
@@ -2742,6 +3160,7 @@ function createStaticTableState(opts) {
|
|
|
2742
3160
|
itemsPerPage: size,
|
|
2743
3161
|
pages: 1
|
|
2744
3162
|
});
|
|
3163
|
+
if (opts.remote) return opts.remote({ searchTerm: _state.searchTerm.value }, page, size);
|
|
2745
3164
|
fetcher ??= buildStaticQueryFn(opts, _state);
|
|
2746
3165
|
return fetcher(q, page, size);
|
|
2747
3166
|
};
|
|
@@ -2766,6 +3185,7 @@ function createStaticTableState(opts) {
|
|
|
2766
3185
|
flatMap: /* @__PURE__ */ new Map(),
|
|
2767
3186
|
fetchableFields: new Set(opts.columns.map((c) => c.path)),
|
|
2768
3187
|
primaryKeys: [],
|
|
3188
|
+
identifierFields: [],
|
|
2769
3189
|
preferredId: [],
|
|
2770
3190
|
crud: {
|
|
2771
3191
|
query: [],
|
|
@@ -2883,6 +3303,12 @@ Object.defineProperty(exports, "INTERACTIVE_SELECTOR", {
|
|
|
2883
3303
|
return INTERACTIVE_SELECTOR;
|
|
2884
3304
|
}
|
|
2885
3305
|
});
|
|
3306
|
+
Object.defineProperty(exports, "QUERY_TARGET_UNSUPPORTED_REASON", {
|
|
3307
|
+
enumerable: true,
|
|
3308
|
+
get: function() {
|
|
3309
|
+
return QUERY_TARGET_UNSUPPORTED_REASON;
|
|
3310
|
+
}
|
|
3311
|
+
});
|
|
2886
3312
|
Object.defineProperty(exports, "ROW_ACTIONS_PATH", {
|
|
2887
3313
|
enumerable: true,
|
|
2888
3314
|
get: function() {
|
|
@@ -2895,6 +3321,18 @@ Object.defineProperty(exports, "ROW_ACTIONS_TYPE", {
|
|
|
2895
3321
|
return ROW_ACTIONS_TYPE;
|
|
2896
3322
|
}
|
|
2897
3323
|
});
|
|
3324
|
+
Object.defineProperty(exports, "actionIdentifiers", {
|
|
3325
|
+
enumerable: true,
|
|
3326
|
+
get: function() {
|
|
3327
|
+
return actionIdentifiers;
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
Object.defineProperty(exports, "applyGate", {
|
|
3331
|
+
enumerable: true,
|
|
3332
|
+
get: function() {
|
|
3333
|
+
return applyGate;
|
|
3334
|
+
}
|
|
3335
|
+
});
|
|
2898
3336
|
Object.defineProperty(exports, "applyRowsGate", {
|
|
2899
3337
|
enumerable: true,
|
|
2900
3338
|
get: function() {
|
|
@@ -2943,6 +3381,12 @@ Object.defineProperty(exports, "extractIdentifier", {
|
|
|
2943
3381
|
return extractIdentifier;
|
|
2944
3382
|
}
|
|
2945
3383
|
});
|
|
3384
|
+
Object.defineProperty(exports, "identifierFieldsOf", {
|
|
3385
|
+
enumerable: true,
|
|
3386
|
+
get: function() {
|
|
3387
|
+
return identifierFieldsOf;
|
|
3388
|
+
}
|
|
3389
|
+
});
|
|
2946
3390
|
Object.defineProperty(exports, "intentClass", {
|
|
2947
3391
|
enumerable: true,
|
|
2948
3392
|
get: function() {
|
|
@@ -2997,6 +3441,12 @@ Object.defineProperty(exports, "provideTableContext", {
|
|
|
2997
3441
|
return provideTableContext;
|
|
2998
3442
|
}
|
|
2999
3443
|
});
|
|
3444
|
+
Object.defineProperty(exports, "queryTargetGate", {
|
|
3445
|
+
enumerable: true,
|
|
3446
|
+
get: function() {
|
|
3447
|
+
return queryTargetGate;
|
|
3448
|
+
}
|
|
3449
|
+
});
|
|
3000
3450
|
Object.defineProperty(exports, "readPresetLabel", {
|
|
3001
3451
|
enumerable: true,
|
|
3002
3452
|
get: function() {
|
|
@@ -3015,6 +3465,12 @@ Object.defineProperty(exports, "rowActionHref", {
|
|
|
3015
3465
|
return rowActionHref;
|
|
3016
3466
|
}
|
|
3017
3467
|
});
|
|
3468
|
+
Object.defineProperty(exports, "rowsLabel", {
|
|
3469
|
+
enumerable: true,
|
|
3470
|
+
get: function() {
|
|
3471
|
+
return rowsLabel;
|
|
3472
|
+
}
|
|
3473
|
+
});
|
|
3018
3474
|
Object.defineProperty(exports, "toSelectAllState", {
|
|
3019
3475
|
enumerable: true,
|
|
3020
3476
|
get: function() {
|