@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BQchKxUr.cjs");
|
|
2
2
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
3
|
-
const require_as_select_cell = require("./as-select-cell-
|
|
3
|
+
const require_as_select_cell = require("./as-select-cell-Dc3lArvR.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
6
6
|
let _vueuse_core = require("@vueuse/core");
|
|
@@ -372,7 +372,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
372
372
|
const selectAllState = (0, vue.computed)(() => {
|
|
373
373
|
if (!showSelectAllCheckbox.value) return void 0;
|
|
374
374
|
const { selectable, selected } = rowHooks.value;
|
|
375
|
-
return require_use_table_state.toSelectAllState(selected, selectable);
|
|
375
|
+
return require_use_table_state.toSelectAllState(selected, selectable, !!ctx?.state.querySelection.value);
|
|
376
376
|
});
|
|
377
377
|
const emit = __emit;
|
|
378
378
|
const slots = (0, vue.useSlots)();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
2
|
import { t as formatCellValue } from "./format-cell-D1Ziv96Q.mjs";
|
|
3
|
-
import { createElementBlock, defineComponent, normalizeClass, openBlock, toDisplayString
|
|
3
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, toDisplayString } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/defaults/as-table-cell-value.vue
|
|
6
6
|
var as_table_cell_value_default = /* @__PURE__ */ defineComponent({
|
|
@@ -17,8 +17,19 @@ var as_table_cell_value_default = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
},
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const props = __props;
|
|
20
|
+
/** Union columns show the option label (`@ui.literalLabel`); anything else formats by type. */
|
|
21
|
+
function display() {
|
|
22
|
+
const value = getCellValue(props.row, props.column.path);
|
|
23
|
+
const options = props.column.options;
|
|
24
|
+
if (options?.length && value !== null && typeof value !== "object") {
|
|
25
|
+
const key = String(value);
|
|
26
|
+
const hit = options.find((o) => o.key === key);
|
|
27
|
+
if (hit) return hit.label;
|
|
28
|
+
}
|
|
29
|
+
return formatCellValue(value, props.column.type);
|
|
30
|
+
}
|
|
20
31
|
return (_ctx, _cache) => {
|
|
21
|
-
return openBlock(), createElementBlock("td", { class: normalizeClass({ "as-cell-number": props.column.type === "number" }) }, toDisplayString(
|
|
32
|
+
return openBlock(), createElementBlock("td", { class: normalizeClass({ "as-cell-number": props.column.type === "number" }) }, toDisplayString(display()), 3);
|
|
22
33
|
};
|
|
23
34
|
}
|
|
24
35
|
});
|
|
@@ -17,8 +17,19 @@ var as_table_cell_value_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
17
17
|
},
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const props = __props;
|
|
20
|
+
/** Union columns show the option label (`@ui.literalLabel`); anything else formats by type. */
|
|
21
|
+
function display() {
|
|
22
|
+
const value = require_get_cell_value.getCellValue(props.row, props.column.path);
|
|
23
|
+
const options = props.column.options;
|
|
24
|
+
if (options?.length && value !== null && typeof value !== "object") {
|
|
25
|
+
const key = String(value);
|
|
26
|
+
const hit = options.find((o) => o.key === key);
|
|
27
|
+
if (hit) return hit.label;
|
|
28
|
+
}
|
|
29
|
+
return require_format_cell.formatCellValue(value, props.column.type);
|
|
30
|
+
}
|
|
20
31
|
return (_ctx, _cache) => {
|
|
21
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", { class: (0, vue.normalizeClass)({ "as-cell-number": props.column.type === "number" }) }, (0, vue.toDisplayString)((
|
|
32
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", { class: (0, vue.normalizeClass)({ "as-cell-number": props.column.type === "number" }) }, (0, vue.toDisplayString)(display()), 3);
|
|
22
33
|
};
|
|
23
34
|
}
|
|
24
35
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_cell_value = require("./as-table-cell-value-
|
|
1
|
+
const require_as_table_cell_value = require("./as-table-cell-value-VWlXc5dA.cjs");
|
|
2
2
|
module.exports = require_as_table_cell_value.as_table_cell_value_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-cell-value.vue-
|
|
1
|
+
import { t as _default } from "./as-table-cell-value.vue-UkAuJanv.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-cell-value.vue-
|
|
1
|
+
import { t as _default } from "./as-table-cell-value.vue-BXIH_yfq.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_cell_value_default } from "./as-table-cell-value-
|
|
1
|
+
import { t as as_table_cell_value_default } from "./as-table-cell-value-D-S127gr.mjs";
|
|
2
2
|
export { as_table_cell_value_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_component = require("./use-table-component-
|
|
1
|
+
const require_use_table_component = require("./use-table-component-CsdvdGJT.cjs");
|
|
2
2
|
const require_as_column_menu = require("./as-column-menu-ChB7hzmr.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
1
|
+
import { t as useTableComponent } from "./use-table-component-Dy397695.mjs";
|
|
2
2
|
import { t as as_column_menu_default } from "./as-column-menu-CBtUfYEE.mjs";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { isFilled } from "@atscript/ui-table";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_header_cell = require("./as-table-header-cell-
|
|
1
|
+
const require_as_table_header_cell = require("./as-table-header-cell-DB7Cdskr.cjs");
|
|
2
2
|
module.exports = require_as_table_header_cell.as_table_header_cell_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-header-cell.vue-
|
|
1
|
+
import { t as _default } from "./as-table-header-cell.vue-D2s9YLSJ.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-header-cell.vue-
|
|
1
|
+
import { t as _default } from "./as-table-header-cell.vue-DfDNma_Z.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_header_cell_default } from "./as-table-header-cell-
|
|
1
|
+
import { t as as_table_header_cell_default } from "./as-table-header-cell-ahzAeHXj.mjs";
|
|
2
2
|
export { as_table_header_cell_default as default };
|
package/dist/{as-table-header-cell.vue-DU5h-2C_.d.cts → as-table-header-cell.vue-D2s9YLSJ.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as ColumnMenuConfig } from "./intent-scope-CGch9yhy.cjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
import { ColumnDef } from "@atscript/ui";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
package/dist/{as-table-header-cell.vue-KkANwimG.d.mts → as-table-header-cell.vue-DfDNma_Z.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as ColumnMenuConfig } from "./intent-scope-CvD4YOvf.mjs";
|
|
2
2
|
import { ColumnDef } from "@atscript/ui";
|
|
3
3
|
import * as vue from "vue";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as warnUnsupportedFilter, i as useRegisterMainActionListener, s as warnFieldsDropped, t as createStaticTableState } from "./use-table-state-
|
|
2
|
-
import { n as finalizeTableState, r as useTable } from "./use-table-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
1
|
+
import { c as warnUnsupportedFilter, i as useRegisterMainActionListener, s as warnFieldsDropped, t as createStaticTableState } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
|
+
import { n as finalizeTableState, r as useTable } from "./use-table-BYNBpLJt.mjs";
|
|
3
|
+
import { n as useCellLocale, t as provideCellLocale } from "./use-cell-locale-BTJZ6UcP.mjs";
|
|
4
|
+
import { t as useTableNavBridge } from "./use-table-nav-bridge-CJBERyPB.mjs";
|
|
5
|
+
import { t as useHasEmitListener } from "./use-has-emit-listener-CsF2w9iT.mjs";
|
|
6
|
+
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-DMiGquH1.mjs";
|
|
6
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineAsyncComponent, defineComponent, mergeModels, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useModel, watch } from "vue";
|
|
7
|
-
import { DEV } from "@atscript/ui-table";
|
|
8
|
+
import { DEV, stableValueKey } from "@atscript/ui-table";
|
|
8
9
|
//#endregion
|
|
9
10
|
//#region src/components/as-table-root.vue
|
|
10
11
|
var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
@@ -67,6 +68,10 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
67
68
|
type: Number,
|
|
68
69
|
required: false
|
|
69
70
|
},
|
|
71
|
+
timeZone: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
70
75
|
forceFilters: {
|
|
71
76
|
type: null,
|
|
72
77
|
required: false
|
|
@@ -101,6 +106,10 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
101
106
|
required: false,
|
|
102
107
|
default: "trim"
|
|
103
108
|
},
|
|
109
|
+
selectAllMatching: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
104
113
|
blockSize: {
|
|
105
114
|
type: Number,
|
|
106
115
|
required: false
|
|
@@ -157,6 +166,11 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
157
166
|
default: () => []
|
|
158
167
|
},
|
|
159
168
|
"selectedRowsModifiers": {},
|
|
169
|
+
"querySelection": {
|
|
170
|
+
type: [Object, null],
|
|
171
|
+
default: null
|
|
172
|
+
},
|
|
173
|
+
"querySelectionModifiers": {},
|
|
160
174
|
"urlQuery": {
|
|
161
175
|
type: null,
|
|
162
176
|
default: () => void 0
|
|
@@ -167,7 +181,8 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
167
181
|
"main-action",
|
|
168
182
|
"action",
|
|
169
183
|
"unsupported-filter",
|
|
170
|
-
"fields-dropped"
|
|
184
|
+
"fields-dropped",
|
|
185
|
+
"selection-reset"
|
|
171
186
|
], [
|
|
172
187
|
"update:filterFields",
|
|
173
188
|
"update:columnNames",
|
|
@@ -175,6 +190,7 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
175
190
|
"update:sorters",
|
|
176
191
|
"update:ignoreSortersWhenSearched",
|
|
177
192
|
"update:selectedRows",
|
|
193
|
+
"update:querySelection",
|
|
178
194
|
"update:urlQuery"
|
|
179
195
|
]),
|
|
180
196
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -198,6 +214,11 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
198
214
|
const ignoreSortersWhenSearched = useModel(__props, "ignoreSortersWhenSearched");
|
|
199
215
|
const selectedRows = useModel(__props, "selectedRows");
|
|
200
216
|
/**
|
|
217
|
+
* The "every row matching the query" selection (`state.querySelection`):
|
|
218
|
+
* `null` while the selection is `selectedRows`. Since 0.1.147.
|
|
219
|
+
*/
|
|
220
|
+
const querySelection = useModel(__props, "querySelection");
|
|
221
|
+
/**
|
|
201
222
|
* Bidirectional URL bridge bound via `v-model:url-query`. When unbound the
|
|
202
223
|
* feature is off (zero overhead); when bound the first query is gated on
|
|
203
224
|
* tableDef settle + URL hydration so the table fetches once.
|
|
@@ -235,7 +256,8 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
235
256
|
queryOnMount: props.queryOnMount,
|
|
236
257
|
selection: {
|
|
237
258
|
rowValueFn: props.rowValueFn,
|
|
238
|
-
selectedRows
|
|
259
|
+
selectedRows,
|
|
260
|
+
querySelection
|
|
239
261
|
},
|
|
240
262
|
model: {
|
|
241
263
|
filterFields,
|
|
@@ -259,15 +281,21 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
259
281
|
watch(() => props.rows, () => localState.query({ silent: true }));
|
|
260
282
|
return localState;
|
|
261
283
|
}
|
|
284
|
+
const parentLocale = useCellLocale();
|
|
285
|
+
provideCellLocale(() => ({
|
|
286
|
+
language: parentLocale.locale.value,
|
|
287
|
+
timezone: props.timeZone ?? parentLocale.timezone.value
|
|
288
|
+
}));
|
|
262
289
|
const hasUnsupportedFilterListener = useHasEmitListener("onUnsupportedFilter");
|
|
263
290
|
const hasFieldsDroppedListener = useHasEmitListener("onFieldsDropped");
|
|
264
291
|
const state = localMode ? createLocalState() : useTable(props.url, {
|
|
265
292
|
limit: props.limit,
|
|
266
293
|
rowValueFn: props.rowValueFn,
|
|
267
294
|
selectionPersistence: props.selectionPersistence,
|
|
268
|
-
forceFilters: props.forceFilters,
|
|
269
|
-
forceSorters: props.forceSorters,
|
|
270
|
-
alwaysSelected: props.alwaysSelected,
|
|
295
|
+
forceFilters: () => props.forceFilters,
|
|
296
|
+
forceSorters: () => props.forceSorters,
|
|
297
|
+
alwaysSelected: () => props.alwaysSelected,
|
|
298
|
+
timeZone: () => props.timeZone,
|
|
271
299
|
queryFn: props.queryFn,
|
|
272
300
|
queryOnMount: props.queryOnMount,
|
|
273
301
|
blockQuery: () => props.blockQuery === true,
|
|
@@ -290,6 +318,8 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
290
318
|
sorters,
|
|
291
319
|
ignoreSortersWhenSearched,
|
|
292
320
|
selectedRows,
|
|
321
|
+
querySelection,
|
|
322
|
+
onSelectionReset: (event) => emit("selection-reset", event),
|
|
293
323
|
urlQueryReady: urlQueryActive ? urlQueryReady : void 0,
|
|
294
324
|
onUrlQueryChange: urlQueryActive ? (s) => urlQuery.value = s : void 0,
|
|
295
325
|
urlQuerySync: props.urlQuerySync,
|
|
@@ -298,9 +328,42 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
298
328
|
preset: props.preset,
|
|
299
329
|
displayColumns: props.displayColumns
|
|
300
330
|
});
|
|
331
|
+
/** A column's key in a `displayColumns` / `columns` list. */
|
|
332
|
+
const listKey = (c) => c.key ?? c.path;
|
|
333
|
+
if (DEV) {
|
|
334
|
+
const setupOnly = [
|
|
335
|
+
"url",
|
|
336
|
+
"queryFn",
|
|
337
|
+
"preset",
|
|
338
|
+
"urlQuerySync",
|
|
339
|
+
"displayColumns",
|
|
340
|
+
"limit",
|
|
341
|
+
"clientFactory",
|
|
342
|
+
...localMode ? ["columns"] : []
|
|
343
|
+
];
|
|
344
|
+
const sameValue = (a, b) => {
|
|
345
|
+
if (typeof a === "function" || typeof b === "function") return typeof a === typeof b;
|
|
346
|
+
if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((c, i) => listKey(c) === listKey(b[i]));
|
|
347
|
+
try {
|
|
348
|
+
return stableValueKey(a ?? null) === stableValueKey(b ?? null);
|
|
349
|
+
} catch {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const warned = /* @__PURE__ */ new Set();
|
|
354
|
+
for (const name of setupOnly) watch(() => props[name], (next, prev) => {
|
|
355
|
+
if (next === prev || warned.has(name) || sameValue(next, prev)) return;
|
|
356
|
+
warned.add(name);
|
|
357
|
+
console.warn(`[vue-table] <AsTableRoot>: :${name} ${typeof next === "function" || typeof prev === "function" ? "provided/removed" : "changed"} after mount; it is read once — key the component (:key) to switch it.`);
|
|
358
|
+
});
|
|
359
|
+
}
|
|
301
360
|
watch(() => props.rowActions, (value) => {
|
|
302
361
|
state.rowActions.value = value;
|
|
303
362
|
}, { immediate: true });
|
|
363
|
+
watch(() => props.selectAllMatching === true, (value) => {
|
|
364
|
+
state.allowSelectAllMatching.value = value;
|
|
365
|
+
if (!value && state.querySelection.value) state.clearSelection();
|
|
366
|
+
}, { immediate: true });
|
|
304
367
|
if (urlQueryActive && !localMode) {
|
|
305
368
|
let lastSeenQuery;
|
|
306
369
|
watch([
|
|
@@ -367,6 +430,10 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
367
430
|
ignoreSortersWhenSearched: unref(state).ignoreSortersWhenSearched.value,
|
|
368
431
|
selectedRows: unref(state).selectedRows.value,
|
|
369
432
|
selectedCount: unref(state).selectedCount.value,
|
|
433
|
+
selection: unref(state).selection.value,
|
|
434
|
+
canSelectAllMatching: unref(state).canSelectAllMatching.value,
|
|
435
|
+
selectAllMatching: unref(state).selectAllMatching,
|
|
436
|
+
clearSelection: unref(state).clearSelection,
|
|
370
437
|
navBridge: unref(navBridge),
|
|
371
438
|
query: unref(state).query,
|
|
372
439
|
queryNext: unref(state).queryNext,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_use_table = require("./use-table-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BQchKxUr.cjs");
|
|
2
|
+
const require_use_table = require("./use-table-C9qI-TL6.cjs");
|
|
3
|
+
const require_use_cell_locale = require("./use-cell-locale-Dv514-Al.cjs");
|
|
4
|
+
const require_use_table_nav_bridge = require("./use-table-nav-bridge-Gm4ZfOjJ.cjs");
|
|
5
|
+
const require_use_has_emit_listener = require("./use-has-emit-listener-gD1aWp6N.cjs");
|
|
6
|
+
const require_as_confirm_dialog = require("./as-confirm-dialog-cSEHVFBq.cjs");
|
|
6
7
|
let vue = require("vue");
|
|
7
8
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
8
9
|
//#endregion
|
|
@@ -67,6 +68,10 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
67
68
|
type: Number,
|
|
68
69
|
required: false
|
|
69
70
|
},
|
|
71
|
+
timeZone: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
70
75
|
forceFilters: {
|
|
71
76
|
type: null,
|
|
72
77
|
required: false
|
|
@@ -101,6 +106,10 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
101
106
|
required: false,
|
|
102
107
|
default: "trim"
|
|
103
108
|
},
|
|
109
|
+
selectAllMatching: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
104
113
|
blockSize: {
|
|
105
114
|
type: Number,
|
|
106
115
|
required: false
|
|
@@ -157,6 +166,11 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
157
166
|
default: () => []
|
|
158
167
|
},
|
|
159
168
|
"selectedRowsModifiers": {},
|
|
169
|
+
"querySelection": {
|
|
170
|
+
type: [Object, null],
|
|
171
|
+
default: null
|
|
172
|
+
},
|
|
173
|
+
"querySelectionModifiers": {},
|
|
160
174
|
"urlQuery": {
|
|
161
175
|
type: null,
|
|
162
176
|
default: () => void 0
|
|
@@ -167,7 +181,8 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
167
181
|
"main-action",
|
|
168
182
|
"action",
|
|
169
183
|
"unsupported-filter",
|
|
170
|
-
"fields-dropped"
|
|
184
|
+
"fields-dropped",
|
|
185
|
+
"selection-reset"
|
|
171
186
|
], [
|
|
172
187
|
"update:filterFields",
|
|
173
188
|
"update:columnNames",
|
|
@@ -175,6 +190,7 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
175
190
|
"update:sorters",
|
|
176
191
|
"update:ignoreSortersWhenSearched",
|
|
177
192
|
"update:selectedRows",
|
|
193
|
+
"update:querySelection",
|
|
178
194
|
"update:urlQuery"
|
|
179
195
|
]),
|
|
180
196
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -198,6 +214,11 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
198
214
|
const ignoreSortersWhenSearched = (0, vue.useModel)(__props, "ignoreSortersWhenSearched");
|
|
199
215
|
const selectedRows = (0, vue.useModel)(__props, "selectedRows");
|
|
200
216
|
/**
|
|
217
|
+
* The "every row matching the query" selection (`state.querySelection`):
|
|
218
|
+
* `null` while the selection is `selectedRows`. Since 0.1.147.
|
|
219
|
+
*/
|
|
220
|
+
const querySelection = (0, vue.useModel)(__props, "querySelection");
|
|
221
|
+
/**
|
|
201
222
|
* Bidirectional URL bridge bound via `v-model:url-query`. When unbound the
|
|
202
223
|
* feature is off (zero overhead); when bound the first query is gated on
|
|
203
224
|
* tableDef settle + URL hydration so the table fetches once.
|
|
@@ -235,7 +256,8 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
235
256
|
queryOnMount: props.queryOnMount,
|
|
236
257
|
selection: {
|
|
237
258
|
rowValueFn: props.rowValueFn,
|
|
238
|
-
selectedRows
|
|
259
|
+
selectedRows,
|
|
260
|
+
querySelection
|
|
239
261
|
},
|
|
240
262
|
model: {
|
|
241
263
|
filterFields,
|
|
@@ -259,15 +281,21 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
259
281
|
(0, vue.watch)(() => props.rows, () => localState.query({ silent: true }));
|
|
260
282
|
return localState;
|
|
261
283
|
}
|
|
284
|
+
const parentLocale = require_use_cell_locale.useCellLocale();
|
|
285
|
+
require_use_cell_locale.provideCellLocale(() => ({
|
|
286
|
+
language: parentLocale.locale.value,
|
|
287
|
+
timezone: props.timeZone ?? parentLocale.timezone.value
|
|
288
|
+
}));
|
|
262
289
|
const hasUnsupportedFilterListener = require_use_has_emit_listener.useHasEmitListener("onUnsupportedFilter");
|
|
263
290
|
const hasFieldsDroppedListener = require_use_has_emit_listener.useHasEmitListener("onFieldsDropped");
|
|
264
291
|
const state = localMode ? createLocalState() : require_use_table.useTable(props.url, {
|
|
265
292
|
limit: props.limit,
|
|
266
293
|
rowValueFn: props.rowValueFn,
|
|
267
294
|
selectionPersistence: props.selectionPersistence,
|
|
268
|
-
forceFilters: props.forceFilters,
|
|
269
|
-
forceSorters: props.forceSorters,
|
|
270
|
-
alwaysSelected: props.alwaysSelected,
|
|
295
|
+
forceFilters: () => props.forceFilters,
|
|
296
|
+
forceSorters: () => props.forceSorters,
|
|
297
|
+
alwaysSelected: () => props.alwaysSelected,
|
|
298
|
+
timeZone: () => props.timeZone,
|
|
271
299
|
queryFn: props.queryFn,
|
|
272
300
|
queryOnMount: props.queryOnMount,
|
|
273
301
|
blockQuery: () => props.blockQuery === true,
|
|
@@ -290,6 +318,8 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
290
318
|
sorters,
|
|
291
319
|
ignoreSortersWhenSearched,
|
|
292
320
|
selectedRows,
|
|
321
|
+
querySelection,
|
|
322
|
+
onSelectionReset: (event) => emit("selection-reset", event),
|
|
293
323
|
urlQueryReady: urlQueryActive ? urlQueryReady : void 0,
|
|
294
324
|
onUrlQueryChange: urlQueryActive ? (s) => urlQuery.value = s : void 0,
|
|
295
325
|
urlQuerySync: props.urlQuerySync,
|
|
@@ -298,9 +328,42 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
298
328
|
preset: props.preset,
|
|
299
329
|
displayColumns: props.displayColumns
|
|
300
330
|
});
|
|
331
|
+
/** A column's key in a `displayColumns` / `columns` list. */
|
|
332
|
+
const listKey = (c) => c.key ?? c.path;
|
|
333
|
+
if (_atscript_ui_table.DEV) {
|
|
334
|
+
const setupOnly = [
|
|
335
|
+
"url",
|
|
336
|
+
"queryFn",
|
|
337
|
+
"preset",
|
|
338
|
+
"urlQuerySync",
|
|
339
|
+
"displayColumns",
|
|
340
|
+
"limit",
|
|
341
|
+
"clientFactory",
|
|
342
|
+
...localMode ? ["columns"] : []
|
|
343
|
+
];
|
|
344
|
+
const sameValue = (a, b) => {
|
|
345
|
+
if (typeof a === "function" || typeof b === "function") return typeof a === typeof b;
|
|
346
|
+
if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((c, i) => listKey(c) === listKey(b[i]));
|
|
347
|
+
try {
|
|
348
|
+
return (0, _atscript_ui_table.stableValueKey)(a ?? null) === (0, _atscript_ui_table.stableValueKey)(b ?? null);
|
|
349
|
+
} catch {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
const warned = /* @__PURE__ */ new Set();
|
|
354
|
+
for (const name of setupOnly) (0, vue.watch)(() => props[name], (next, prev) => {
|
|
355
|
+
if (next === prev || warned.has(name) || sameValue(next, prev)) return;
|
|
356
|
+
warned.add(name);
|
|
357
|
+
console.warn(`[vue-table] <AsTableRoot>: :${name} ${typeof next === "function" || typeof prev === "function" ? "provided/removed" : "changed"} after mount; it is read once — key the component (:key) to switch it.`);
|
|
358
|
+
});
|
|
359
|
+
}
|
|
301
360
|
(0, vue.watch)(() => props.rowActions, (value) => {
|
|
302
361
|
state.rowActions.value = value;
|
|
303
362
|
}, { immediate: true });
|
|
363
|
+
(0, vue.watch)(() => props.selectAllMatching === true, (value) => {
|
|
364
|
+
state.allowSelectAllMatching.value = value;
|
|
365
|
+
if (!value && state.querySelection.value) state.clearSelection();
|
|
366
|
+
}, { immediate: true });
|
|
304
367
|
if (urlQueryActive && !localMode) {
|
|
305
368
|
let lastSeenQuery;
|
|
306
369
|
(0, vue.watch)([
|
|
@@ -367,6 +430,10 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
367
430
|
ignoreSortersWhenSearched: (0, vue.unref)(state).ignoreSortersWhenSearched.value,
|
|
368
431
|
selectedRows: (0, vue.unref)(state).selectedRows.value,
|
|
369
432
|
selectedCount: (0, vue.unref)(state).selectedCount.value,
|
|
433
|
+
selection: (0, vue.unref)(state).selection.value,
|
|
434
|
+
canSelectAllMatching: (0, vue.unref)(state).canSelectAllMatching.value,
|
|
435
|
+
selectAllMatching: (0, vue.unref)(state).selectAllMatching,
|
|
436
|
+
clearSelection: (0, vue.unref)(state).clearSelection,
|
|
370
437
|
navBridge: (0, vue.unref)(navBridge),
|
|
371
438
|
query: (0, vue.unref)(state).query,
|
|
372
439
|
queryNext: (0, vue.unref)(state).queryNext,
|
package/dist/as-table-root.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_root = require("./as-table-root-
|
|
1
|
+
const require_as_table_root = require("./as-table-root-Nsk-9XaH.cjs");
|
|
2
2
|
module.exports = require_as_table_root.as_table_root_default;
|
package/dist/as-table-root.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-root.vue-
|
|
1
|
+
import { t as _default } from "./as-table-root.vue-DXXcBPu_.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-table-root.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-root.vue-
|
|
1
|
+
import { t as _default } from "./as-table-root.vue-D56WcudY.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-table-root.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_root_default } from "./as-table-root-
|
|
1
|
+
import { t as as_table_root_default } from "./as-table-root-BnkF5-rh.mjs";
|
|
2
2
|
export { as_table_root_default as default };
|