@atscript/vue-table 0.1.147 → 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 +1 -1
- package/dist/as-action-form-dialog.mjs +1 -1
- package/dist/{as-action-menu-content-35yQWbLF.mjs → as-action-menu-content-BBwL1YZU.mjs} +1 -1
- package/dist/{as-action-menu-content-BJ0tn6jq.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.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.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.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.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.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-B6iuKmIj.d.cts → as-column-menu.vue-4zJmC_M6.d.mts} +2 -2
- package/dist/{as-column-menu.vue-wxb2f92k.d.mts → as-column-menu.vue-CS_8jHG3.d.cts} +2 -2
- package/dist/{as-config-dialog-BJkBzaku.cjs → as-config-dialog-CnIvMsK0.cjs} +10 -5
- package/dist/{as-config-dialog-D503Ek_m.mjs → as-config-dialog-ZKMnfirD.mjs} +10 -5
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.d.mts +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-CJfDnaiU.mjs → as-confirm-dialog-DMiGquH1.mjs} +1 -1
- package/dist/{as-confirm-dialog-C5xPbkox.cjs → as-confirm-dialog-cSEHVFBq.cjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.d.mts +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-CxjO-Ge5.mjs → as-filter-dialog-DNFR30fV.mjs} +61 -38
- package/dist/{as-filter-dialog-Co0WfWOe.cjs → as-filter-dialog-KjvJdaMg.cjs} +60 -37
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.d.mts +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-FTrxFkTw.cjs → as-filter-field-BsucQwbm.cjs} +247 -35
- package/dist/{as-filter-field-ByPlGyWz.mjs → as-filter-field-DE6MJMx7.mjs} +227 -39
- package/dist/as-filter-field.cjs +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-CksJOtqw.d.cts → as-filter-input.vue-BLTzA2Iy.d.cts} +9 -0
- package/dist/{as-filter-input.vue-DMwr0ArL.d.mts → as-filter-input.vue-CmWQGQCv.d.mts} +9 -0
- package/dist/{as-filters-W3iMELuL.cjs → as-filters-CYC_SXaA.cjs} +4 -4
- package/dist/{as-filters-CJZJiOXb.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-CLOVEpWZ.mjs → as-preset-dialog-CY5dPfZa.mjs} +2 -2
- package/dist/{as-preset-dialog-Dvvx0jmU.cjs → as-preset-dialog-tM-jrQgs.cjs} +2 -2
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.d.mts +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-DFLhbm59.cjs → as-preset-picker-CjSXtx83.cjs} +2 -2
- package/dist/{as-preset-picker-CwFObhME.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-BRsEs8oe.mjs → as-residual-filter-DHfbtTQj.mjs} +4 -5
- package/dist/{as-residual-filter-sZlsFPDS.cjs → as-residual-filter-XkXnMQNu.cjs} +4 -5
- package/dist/as-residual-filter.cjs +1 -1
- package/dist/as-residual-filter.d.mts +1 -1
- package/dist/as-residual-filter.mjs +1 -1
- package/dist/{as-row-actions-DyjIXePd.mjs → as-row-actions-BNQ7jrie.mjs} +2 -2
- package/dist/{as-row-actions-DFv2cSrP.cjs → as-row-actions-q_oMmUz1.cjs} +2 -2
- 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-BHrZBXVU.d.cts → as-row-actions.vue-BB8ATWBY.d.mts} +1 -1
- package/dist/{as-row-actions.vue-D4MylwCW.d.mts → as-row-actions.vue-CnjcRD0P.d.cts} +1 -1
- package/dist/{as-select-cell-CoQJjhnq.cjs → as-select-cell-Dc3lArvR.cjs} +5 -5
- package/dist/{as-select-cell-Dl8fohIj.mjs → as-select-cell-DjcPorVb.mjs} +5 -5
- package/dist/{as-selection-banner-DBtLjulh.mjs → as-selection-banner-Ca9DWVdW.mjs} +1 -1
- package/dist/{as-selection-banner-BI5gKHqW.cjs → as-selection-banner-CxPXBztW.cjs} +1 -1
- package/dist/{as-table-B1FowaPF.cjs → as-table-BIAkCI4g.cjs} +4 -4
- package/dist/{as-table-Cpvfv9zA.mjs → as-table-Bcz-WOTS.mjs} +4 -4
- package/dist/{as-table-actions-BlbAps1h.mjs → as-table-actions-DPq5SrGa.mjs} +2 -2
- package/dist/{as-table-actions-B0xaicfv.cjs → as-table-actions-TaI-NeVv.cjs} +2 -2
- 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-7ml3JiOO.d.mts → as-table-actions.vue-C2szPEXd.d.mts} +2 -2
- package/dist/{as-table-actions.vue-BKRqHprR.d.cts → as-table-actions.vue-CBD_tEpe.d.cts} +2 -2
- package/dist/{as-table-base-EzKaChOp.mjs → as-table-base-CsK79vYe.mjs} +2 -2
- package/dist/{as-table-base-LZ26YlWp.cjs → as-table-base-Dvey_Gie.cjs} +2 -2
- 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.mts +1 -1
- package/dist/as-table-cell-value.mjs +1 -1
- package/dist/{as-table-header-cell-gHhCdxJX.cjs → as-table-header-cell-DB7Cdskr.cjs} +1 -1
- package/dist/{as-table-header-cell-DrVzYaof.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-BCk4NPYT.d.cts → as-table-header-cell.vue-D2s9YLSJ.d.cts} +1 -1
- package/dist/{as-table-header-cell.vue-BZU8s9CT.d.mts → as-table-header-cell.vue-DfDNma_Z.d.mts} +1 -1
- package/dist/{as-table-root-BYHXuNPI.mjs → as-table-root-BnkF5-rh.mjs} +49 -9
- package/dist/{as-table-root-K6fWKHtF.cjs → as-table-root-Nsk-9XaH.cjs} +48 -8
- 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-Bm2DxAqU.d.mts → as-table-root.vue-D56WcudY.d.mts} +313 -1638
- package/dist/{as-table-root.vue-CF03c4vu.d.cts → as-table-root.vue-DXXcBPu_.d.cts} +313 -1638
- 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-CygDqZMU.mjs → as-window-table-DjplqWzr.mjs} +4 -4
- package/dist/{as-window-table-_flc8o64.cjs → as-window-table-ubm2u8_i.cjs} +4 -4
- 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 +68 -90
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +69 -91
- package/dist/{intent-scope-BXPEN5kJ.d.cts → intent-scope-CGch9yhy.d.cts} +13 -0
- package/dist/{intent-scope-Ck7RZ0dK.d.mts → intent-scope-CvD4YOvf.d.mts} +13 -0
- package/dist/use-condition-format-5LcuInDy.mjs +34 -0
- package/dist/use-condition-format-DrgfX6xL.cjs +39 -0
- package/dist/{use-table-DP6Y0kbl.mjs → use-table-BYNBpLJt.mjs} +23 -2
- package/dist/{use-table-CydIJZbx.cjs → use-table-C9qI-TL6.cjs} +22 -1
- package/dist/{use-table-component-aqfGzECx.cjs → use-table-component-CsdvdGJT.cjs} +1 -1
- package/dist/{use-table-component-DNGUvhf7.mjs → use-table-component-Dy397695.mjs} +1 -1
- package/dist/{use-table-nav-bridge-BhOPIT2R.mjs → use-table-nav-bridge-CJBERyPB.mjs} +1 -1
- package/dist/{use-table-nav-bridge-B7A30yja.cjs → use-table-nav-bridge-Gm4ZfOjJ.cjs} +1 -1
- package/dist/{use-table-state-sDnqOi3b.cjs → use-table-state-BQchKxUr.cjs} +53 -6
- package/dist/{use-table-state-1OZfdhQi.mjs → use-table-state-CIoWhwTD.mjs} +54 -7
- package/package.json +11 -11
- package/dist/as-filter-input-BM23TNeh.mjs +0 -101
- package/dist/as-filter-input-DJu2k9gO.cjs +0 -106
- /package/dist/{as-cell-array.vue-Dj3nZop3.d.mts → as-cell-array.vue-D4vS7C_D.d.mts} +0 -0
- /package/dist/{as-cell-date.vue-BPuyH7q3.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-D8J7YwVV.d.mts → as-cell-json.vue-C0_LDvQw.d.mts} +0 -0
- /package/dist/{as-cell-number.vue-sUoZvuat.d.mts → as-cell-number.vue-BBF0OuU8.d.mts} +0 -0
- /package/dist/{as-cell-union.vue-DZBejMxR.d.mts → as-cell-union.vue-CL-Lf-Rm.d.mts} +0 -0
- /package/dist/{as-config-dialog.vue-D2AVR1a5.d.mts → as-config-dialog.vue-BvFZZRuY.d.mts} +0 -0
- /package/dist/{as-confirm-dialog.vue-BxAaCuYf.d.mts → as-confirm-dialog.vue-Cz52-v6c.d.mts} +0 -0
- /package/dist/{as-filter-dialog.vue-WYXGtymZ.d.mts → as-filter-dialog.vue-likNLqzF.d.mts} +0 -0
- /package/dist/{as-filter-field.vue-DTpuDkHh.d.mts → as-filter-field.vue-BbXLhd6O.d.mts} +0 -0
- /package/dist/{as-filters.vue-dHbGmcbr.d.mts → as-filters.vue-Bu4wK0iD.d.mts} +0 -0
- /package/dist/{as-preset-dialog.vue-BrnvBWxJ.d.mts → 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-Cev_8Wy7.d.mts → as-residual-filter.vue-DbeOOtR7.d.mts} +0 -0
- /package/dist/{as-table-cell-value.vue-kfNgVhzn.d.mts → as-table-cell-value.vue-BXIH_yfq.d.mts} +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,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BQchKxUr.cjs");
|
|
2
2
|
let _atscript_ui = require("@atscript/ui");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_db_client = require("@atscript/db-client");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as rowsLabel, a as useTableContext, j as intentToScope } from "./use-table-state-
|
|
1
|
+
import { L as rowsLabel, a as useTableContext, j as intentToScope } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
2
|
import { META_LABEL, UI_FORM_SUBMIT_TEXT, createFormData, createFormDef, getFieldMeta } from "@atscript/ui";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withCtx } from "vue";
|
|
4
4
|
import { formatIdentifier } from "@atscript/db-client";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as intentClass, F as isPlainLeftClick, M as isActionDisabled, N as isLinkTrigger, P as isModClick, T as ariaLabelFor, w as ariaDisabled } from "./use-table-state-
|
|
1
|
+
import { A as intentClass, F as isPlainLeftClick, M as isActionDisabled, N as isLinkTrigger, P as isModClick, T as ariaLabelFor, w as ariaDisabled } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
2
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, withCtx } from "vue";
|
|
3
3
|
import { DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from "reka-ui";
|
|
4
4
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_as_cell_json_popover = require("./as-cell-json-popover-
|
|
2
|
+
const require_as_cell_json_popover = require("./as-cell-json-popover-vty5vMjW.cjs");
|
|
3
|
+
let _atscript_ui = require("@atscript/ui");
|
|
3
4
|
let vue = require("vue");
|
|
4
5
|
//#region src/components/defaults/as-cell-array.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
const _hoisted_1 = {
|
|
@@ -45,7 +46,7 @@ var as_cell_array_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
45
46
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
46
47
|
key: i,
|
|
47
48
|
class: "as-cell-chip"
|
|
48
|
-
}, (0, vue.toDisplayString)(item), 1);
|
|
49
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(_atscript_ui.optionLabel)(__props.column, item) ?? item), 1);
|
|
49
50
|
}), 128))])) : view.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_cell_json_popover.as_cell_json_popover_default, {
|
|
50
51
|
key: 1,
|
|
51
52
|
value: view.value.items
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-
|
|
3
|
-
import {
|
|
2
|
+
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-CH5bAcLE.mjs";
|
|
3
|
+
import { optionLabel } from "@atscript/ui";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
4
5
|
//#region src/components/defaults/as-cell-array.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
const _hoisted_1 = {
|
|
6
7
|
key: 0,
|
|
@@ -45,7 +46,7 @@ var as_cell_array_default = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
return openBlock(), createElementBlock("span", {
|
|
46
47
|
key: i,
|
|
47
48
|
class: "as-cell-chip"
|
|
48
|
-
}, toDisplayString(item), 1);
|
|
49
|
+
}, toDisplayString(unref(optionLabel)(__props.column, item) ?? item), 1);
|
|
49
50
|
}), 128))])) : view.value ? (openBlock(), createBlock(as_cell_json_popover_default, {
|
|
50
51
|
key: 1,
|
|
51
52
|
value: view.value.items
|
package/dist/as-cell-array.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_cell_array = require("./as-cell-array-
|
|
1
|
+
const require_as_cell_array = require("./as-cell-array-CB4Nt6Fo.cjs");
|
|
2
2
|
module.exports = require_as_cell_array.as_cell_array_default;
|
package/dist/as-cell-array.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-cell-array.vue-
|
|
1
|
+
import { t as _default } from "./as-cell-array.vue-D4vS7C_D.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-cell-array.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_cell_array_default } from "./as-cell-array-
|
|
1
|
+
import { t as as_cell_array_default } from "./as-cell-array-CnoVd9ps.mjs";
|
|
2
2
|
export { as_cell_array_default as default };
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_use_cell_locale = require("./use-cell-locale-
|
|
2
|
+
const require_use_cell_locale = require("./use-cell-locale-Dv514-Al.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
|
+
let _atscript_ui_table = require("@atscript/ui-table");
|
|
4
5
|
let _vueuse_core = require("@vueuse/core");
|
|
5
|
-
//#region src/utils/intl-cache.ts
|
|
6
|
-
const dateTimeCache = /* @__PURE__ */ new Map();
|
|
7
|
-
function getDateTimeFormat(locale, opts = {}) {
|
|
8
|
-
const key = `${locale}|${opts.timeZone ?? ""}|${opts.year ?? ""}|${opts.month ?? ""}|${opts.day ?? ""}|${opts.hour ?? ""}|${opts.minute ?? ""}`;
|
|
9
|
-
let f = dateTimeCache.get(key);
|
|
10
|
-
if (!f) {
|
|
11
|
-
f = new Intl.DateTimeFormat(locale, opts);
|
|
12
|
-
dateTimeCache.set(key, f);
|
|
13
|
-
}
|
|
14
|
-
return f;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
6
|
//#region src/components/defaults/as-cell-date.vue?vue&type=script&setup=true&lang.ts
|
|
18
7
|
const _hoisted_1 = ["title"];
|
|
19
8
|
//#endregion
|
|
@@ -66,7 +55,7 @@ var as_cell_date_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
66
55
|
...base,
|
|
67
56
|
timeZone: tz
|
|
68
57
|
} : base;
|
|
69
|
-
return getDateTimeFormat(locale.value, opts).format(d);
|
|
58
|
+
return (0, _atscript_ui_table.getDateTimeFormat)(locale.value, opts).format(d);
|
|
70
59
|
});
|
|
71
60
|
return (_ctx, _cache) => {
|
|
72
61
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", { title: date.value?.toISOString() ?? "" }, (0, vue.toDisplayString)(formatted.value), 9, _hoisted_1);
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { n as useCellLocale } from "./use-cell-locale-
|
|
2
|
+
import { n as useCellLocale } from "./use-cell-locale-BTJZ6UcP.mjs";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, openBlock, toDisplayString } from "vue";
|
|
4
|
+
import { getDateTimeFormat } from "@atscript/ui-table";
|
|
4
5
|
import { formatTimeAgoIntl } from "@vueuse/core";
|
|
5
|
-
//#region src/utils/intl-cache.ts
|
|
6
|
-
const dateTimeCache = /* @__PURE__ */ new Map();
|
|
7
|
-
function getDateTimeFormat(locale, opts = {}) {
|
|
8
|
-
const key = `${locale}|${opts.timeZone ?? ""}|${opts.year ?? ""}|${opts.month ?? ""}|${opts.day ?? ""}|${opts.hour ?? ""}|${opts.minute ?? ""}`;
|
|
9
|
-
let f = dateTimeCache.get(key);
|
|
10
|
-
if (!f) {
|
|
11
|
-
f = new Intl.DateTimeFormat(locale, opts);
|
|
12
|
-
dateTimeCache.set(key, f);
|
|
13
|
-
}
|
|
14
|
-
return f;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
6
|
//#region src/components/defaults/as-cell-date.vue?vue&type=script&setup=true&lang.ts
|
|
18
7
|
const _hoisted_1 = ["title"];
|
|
19
8
|
//#endregion
|
package/dist/as-cell-date.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_cell_date = require("./as-cell-date-
|
|
1
|
+
const require_as_cell_date = require("./as-cell-date-DrnhvCr4.cjs");
|
|
2
2
|
module.exports = require_as_cell_date.as_cell_date_default;
|
package/dist/as-cell-date.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-cell-date.vue-
|
|
1
|
+
import { t as _default } from "./as-cell-date.vue-Chs7WTZ9.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-cell-date.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_cell_date_default } from "./as-cell-date-
|
|
1
|
+
import { t as as_cell_date_default } from "./as-cell-date-dhIM7hWA.mjs";
|
|
2
2
|
export { as_cell_date_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-
|
|
2
|
+
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-CH5bAcLE.mjs";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, withCtx } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/defaults/as-cell-json.vue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_as_cell_json_popover = require("./as-cell-json-popover-
|
|
2
|
+
const require_as_cell_json_popover = require("./as-cell-json-popover-vty5vMjW.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/defaults/as-cell-json.vue
|
package/dist/as-cell-json.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_cell_json = require("./as-cell-json-
|
|
1
|
+
const require_as_cell_json = require("./as-cell-json-CzHTpkjS.cjs");
|
|
2
2
|
module.exports = require_as_cell_json.as_cell_json_default;
|
package/dist/as-cell-json.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-cell-json.vue-
|
|
1
|
+
import { t as _default } from "./as-cell-json.vue-C0_LDvQw.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-cell-json.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_cell_json_default } from "./as-cell-json-
|
|
1
|
+
import { t as as_cell_json_default } from "./as-cell-json-ChN_NDhO.mjs";
|
|
2
2
|
export { as_cell_json_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_use_cell_locale = require("./use-cell-locale-
|
|
2
|
+
const require_use_cell_locale = require("./use-cell-locale-Dv514-Al.cjs");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
//#region src/components/defaults/as-cell-number.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { n as useCellLocale } from "./use-cell-locale-
|
|
2
|
+
import { n as useCellLocale } from "./use-cell-locale-BTJZ6UcP.mjs";
|
|
3
3
|
import { formatDecimalForDisplay } from "@atscript/ui";
|
|
4
4
|
import { computed, createElementBlock, defineComponent, openBlock, toDisplayString } from "vue";
|
|
5
5
|
//#region src/components/defaults/as-cell-number.vue?vue&type=script&setup=true&lang.ts
|
package/dist/as-cell-number.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_cell_number = require("./as-cell-number-
|
|
1
|
+
const require_as_cell_number = require("./as-cell-number-C4JMqvqa.cjs");
|
|
2
2
|
module.exports = require_as_cell_number.as_cell_number_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-cell-number.vue-
|
|
1
|
+
import { t as _default } from "./as-cell-number.vue-BBF0OuU8.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-cell-number.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_cell_number_default } from "./as-cell-number-
|
|
1
|
+
import { t as as_cell_number_default } from "./as-cell-number-D-mSaE_G.mjs";
|
|
2
2
|
export { as_cell_number_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-
|
|
2
|
+
import { t as as_cell_json_popover_default } from "./as-cell-json-popover-CH5bAcLE.mjs";
|
|
3
3
|
import { t as formatCellValue } from "./format-cell-D1Ziv96Q.mjs";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
5
5
|
//#region src/components/defaults/as-cell-union.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_as_cell_json_popover = require("./as-cell-json-popover-
|
|
2
|
+
const require_as_cell_json_popover = require("./as-cell-json-popover-vty5vMjW.cjs");
|
|
3
3
|
const require_format_cell = require("./format-cell-vCNTh4WZ.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
//#region src/components/defaults/as-cell-union.vue?vue&type=script&setup=true&lang.ts
|
package/dist/as-cell-union.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_cell_union = require("./as-cell-union-
|
|
1
|
+
const require_as_cell_union = require("./as-cell-union-DpCEHLzN.cjs");
|
|
2
2
|
module.exports = require_as_cell_union.as_cell_union_default;
|
package/dist/as-cell-union.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-cell-union.vue-
|
|
1
|
+
import { t as _default } from "./as-cell-union.vue-CL-Lf-Rm.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-cell-union.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_cell_union_default } from "./as-cell-union-
|
|
1
|
+
import { t as as_cell_union_default } from "./as-cell-union-C9Bbnkrg.mjs";
|
|
2
2
|
export { as_cell_union_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-column-menu.vue-
|
|
1
|
+
import { t as _default } from "./as-column-menu.vue-CS_8jHG3.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-column-menu.vue-
|
|
1
|
+
import { t as _default } from "./as-column-menu.vue-4zJmC_M6.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as ColumnMenuConfig } from "./intent-scope-
|
|
2
|
-
import * as vue from "vue";
|
|
1
|
+
import { u as ColumnMenuConfig } from "./intent-scope-CvD4YOvf.mjs";
|
|
3
2
|
import { ColumnDef } from "@atscript/ui";
|
|
3
|
+
import * as vue from "vue";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
|
5
5
|
|
|
6
6
|
//#region src/components/defaults/as-column-menu.vue.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as ColumnMenuConfig } from "./intent-scope-
|
|
2
|
-
import { ColumnDef } from "@atscript/ui";
|
|
1
|
+
import { u as ColumnMenuConfig } from "./intent-scope-CGch9yhy.cjs";
|
|
3
2
|
import * as vue from "vue";
|
|
3
|
+
import { ColumnDef } from "@atscript/ui";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
|
5
5
|
|
|
6
6
|
//#region src/components/defaults/as-column-menu.vue.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_use_table_component = require("./use-table-component-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BQchKxUr.cjs");
|
|
2
|
+
const require_use_table_component = require("./use-table-component-CsdvdGJT.cjs");
|
|
3
3
|
const require_use_seed_on_open = require("./use-seed-on-open-Dg9I89fU.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
@@ -391,7 +391,7 @@ var as_sorters_config_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
391
391
|
const props = __props;
|
|
392
392
|
const externalModel = (0, vue.useModel)(__props, "modelValue");
|
|
393
393
|
const forceSortersList = (0, vue.computed)(() => props.forceSorters?.map((s) => s.field) ?? void 0);
|
|
394
|
-
const selected = (0, vue.ref)([...forceSortersList.value ?? [], ...externalModel.value.map((s) => s.field)]);
|
|
394
|
+
const selected = (0, vue.ref)([...new Set([...forceSortersList.value ?? [], ...externalModel.value.map((s) => s.field)])]);
|
|
395
395
|
const directionMap = (0, vue.reactive)(/* @__PURE__ */ new Map());
|
|
396
396
|
for (const s of externalModel.value) directionMap.set(s.field, s.direction);
|
|
397
397
|
for (const s of props.forceSorters ?? []) directionMap.set(s.field, s.direction);
|
|
@@ -407,7 +407,7 @@ var as_sorters_config_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
407
407
|
updateExternalModel();
|
|
408
408
|
}
|
|
409
409
|
function updateExternalModel() {
|
|
410
|
-
externalModel.value = selected.value.map((field) => ({
|
|
410
|
+
externalModel.value = selected.value.filter((field) => !forceMap.has(field)).map((field) => ({
|
|
411
411
|
field,
|
|
412
412
|
direction: directionMap.get(field) ?? "asc"
|
|
413
413
|
}));
|
|
@@ -677,9 +677,14 @@ var as_config_dialog_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
677
677
|
}, {
|
|
678
678
|
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(SortersConfig)), {
|
|
679
679
|
columns: sortableColumns.value,
|
|
680
|
+
"force-sorters": (0, vue.unref)(state).forceSorters.value,
|
|
680
681
|
modelValue: sortersModel.value,
|
|
681
682
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sortersModel.value = $event)
|
|
682
|
-
}, null, 8, [
|
|
683
|
+
}, null, 8, [
|
|
684
|
+
"columns",
|
|
685
|
+
"force-sorters",
|
|
686
|
+
"modelValue"
|
|
687
|
+
]))]),
|
|
683
688
|
_: 1
|
|
684
689
|
})
|
|
685
690
|
]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as useTableContext } from "./use-table-state-
|
|
2
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
1
|
+
import { a as useTableContext } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
|
+
import { t as useTableComponent } from "./use-table-component-Dy397695.mjs";
|
|
3
3
|
import { t as useSeedOnOpen } from "./use-seed-on-open-DO3A1kIb.mjs";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, nextTick, normalizeClass, normalizeProps, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useModel, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
5
5
|
import { arraysEqual, isColumnFilterable, sortersEqual } from "@atscript/ui-table";
|
|
@@ -391,7 +391,7 @@ var as_sorters_config_default = /* @__PURE__ */ defineComponent({
|
|
|
391
391
|
const props = __props;
|
|
392
392
|
const externalModel = useModel(__props, "modelValue");
|
|
393
393
|
const forceSortersList = computed(() => props.forceSorters?.map((s) => s.field) ?? void 0);
|
|
394
|
-
const selected = ref([...forceSortersList.value ?? [], ...externalModel.value.map((s) => s.field)]);
|
|
394
|
+
const selected = ref([...new Set([...forceSortersList.value ?? [], ...externalModel.value.map((s) => s.field)])]);
|
|
395
395
|
const directionMap = reactive(/* @__PURE__ */ new Map());
|
|
396
396
|
for (const s of externalModel.value) directionMap.set(s.field, s.direction);
|
|
397
397
|
for (const s of props.forceSorters ?? []) directionMap.set(s.field, s.direction);
|
|
@@ -407,7 +407,7 @@ var as_sorters_config_default = /* @__PURE__ */ defineComponent({
|
|
|
407
407
|
updateExternalModel();
|
|
408
408
|
}
|
|
409
409
|
function updateExternalModel() {
|
|
410
|
-
externalModel.value = selected.value.map((field) => ({
|
|
410
|
+
externalModel.value = selected.value.filter((field) => !forceMap.has(field)).map((field) => ({
|
|
411
411
|
field,
|
|
412
412
|
direction: directionMap.get(field) ?? "asc"
|
|
413
413
|
}));
|
|
@@ -677,9 +677,14 @@ var as_config_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
677
677
|
}, {
|
|
678
678
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(SortersConfig)), {
|
|
679
679
|
columns: sortableColumns.value,
|
|
680
|
+
"force-sorters": unref(state).forceSorters.value,
|
|
680
681
|
modelValue: sortersModel.value,
|
|
681
682
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sortersModel.value = $event)
|
|
682
|
-
}, null, 8, [
|
|
683
|
+
}, null, 8, [
|
|
684
|
+
"columns",
|
|
685
|
+
"force-sorters",
|
|
686
|
+
"modelValue"
|
|
687
|
+
]))]),
|
|
683
688
|
_: 1
|
|
684
689
|
})
|
|
685
690
|
]),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_config_dialog = require("./as-config-dialog-
|
|
1
|
+
const require_as_config_dialog = require("./as-config-dialog-CnIvMsK0.cjs");
|
|
2
2
|
module.exports = require_as_config_dialog.as_config_dialog_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-config-dialog.vue-
|
|
1
|
+
import { t as _default } from "./as-config-dialog.vue-BvFZZRuY.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_config_dialog_default } from "./as-config-dialog-
|
|
1
|
+
import { t as as_config_dialog_default } from "./as-config-dialog-ZKMnfirD.mjs";
|
|
2
2
|
export { as_config_dialog_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as useTableContext } from "./use-table-state-
|
|
1
|
+
import { a as useTableContext } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
2
|
import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
3
3
|
import { AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogRoot, AlertDialogTitle } from "reka-ui";
|
|
4
4
|
//#region src/components/defaults/as-confirm-dialog.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BQchKxUr.cjs");
|
|
2
2
|
let vue = require("vue");
|
|
3
3
|
let reka_ui = require("reka-ui");
|
|
4
4
|
//#region src/components/defaults/as-confirm-dialog.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_confirm_dialog = require("./as-confirm-dialog-
|
|
1
|
+
const require_as_confirm_dialog = require("./as-confirm-dialog-cSEHVFBq.cjs");
|
|
2
2
|
module.exports = require_as_confirm_dialog.as_confirm_dialog_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-confirm-dialog.vue-
|
|
1
|
+
import { t as _default } from "./as-confirm-dialog.vue-Cz52-v6c.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-
|
|
1
|
+
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-DMiGquH1.mjs";
|
|
2
2
|
export { as_confirm_dialog_default as default };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { a as useTableContext, r as provideTableContext, t as createStaticTableState } from "./use-table-state-
|
|
2
|
-
import { r as useTable } from "./use-table-
|
|
3
|
-
import { t as useTableNavBridge } from "./use-table-nav-bridge-
|
|
4
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
5
|
-
import { n as useDialogTabKeyboard, t as as_config_dialog_default } from "./as-config-dialog-
|
|
1
|
+
import { a as useTableContext, o as useTableContextOptional, r as provideTableContext, t as createStaticTableState } from "./use-table-state-CIoWhwTD.mjs";
|
|
2
|
+
import { r as useTable } from "./use-table-BYNBpLJt.mjs";
|
|
3
|
+
import { t as useTableNavBridge } from "./use-table-nav-bridge-CJBERyPB.mjs";
|
|
4
|
+
import { t as useTableComponent } from "./use-table-component-Dy397695.mjs";
|
|
5
|
+
import { n as useDialogTabKeyboard, t as as_config_dialog_default } from "./as-config-dialog-ZKMnfirD.mjs";
|
|
6
6
|
import { t as useSeedOnOpen } from "./use-seed-on-open-DO3A1kIb.mjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
7
|
+
import { t as useConditionFormat } from "./use-condition-format-5LcuInDy.mjs";
|
|
8
|
+
import { a as valueColumn, i as hasValuePicker, n as createDistinctPager, r as declineIfRejected } from "./as-filter-field-DE6MJMx7.mjs";
|
|
9
|
+
import { t as as_filter_input_default } from "./as-filter-input-DmOW_jzK.mjs";
|
|
10
|
+
import { t as as_window_table_default } from "./as-window-table-DjplqWzr.mjs";
|
|
11
|
+
import { t as as_filters_default } from "./as-filters-DErM2bFq.mjs";
|
|
10
12
|
import { resolveValueHelp, valueHelpDictPaths } from "@atscript/ui";
|
|
11
13
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, resolveDynamicComponent, shallowRef, toDisplayString, unref, useModel, watch, withCtx } from "vue";
|
|
12
|
-
import { columnDefaultCondition,
|
|
14
|
+
import { columnDefaultCondition, columnFilter, conditionLabel, filledFilterCount, isColumnFilterable, isFilled, isSimpleEq, isTemporalKind, sameColumnSet, temporalShortcuts } from "@atscript/ui-table";
|
|
13
15
|
import { DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, TabsContent, TabsList, TabsRoot, TabsTrigger } from "reka-ui";
|
|
14
16
|
//#region src/components/internal/as-filter-conditions.vue?vue&type=script&setup=true&lang.ts
|
|
15
17
|
const _hoisted_1$2 = ["value", "onChange"];
|
|
@@ -39,11 +41,12 @@ var as_filter_conditions_default = /* @__PURE__ */ defineComponent({
|
|
|
39
41
|
const props = __props;
|
|
40
42
|
const FilterInput = useTableComponent("filterInput", as_filter_input_default);
|
|
41
43
|
const model = useModel(__props, "modelValue");
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
44
|
+
const spec = computed(() => columnFilter(props.column));
|
|
45
|
+
const filterType = computed(() => spec.value.kind);
|
|
46
|
+
const availableConditions = computed(() => spec.value.conditions);
|
|
47
|
+
const defCondition = computed(() => spec.value.defaultCondition);
|
|
48
|
+
const allShortcuts = temporalShortcuts();
|
|
49
|
+
const shortcuts = computed(() => isTemporalKind(filterType.value) ? allShortcuts : []);
|
|
47
50
|
function updateCondition(index, update) {
|
|
48
51
|
model.value = model.value.map((c, i) => i === index ? {
|
|
49
52
|
...c,
|
|
@@ -63,11 +66,11 @@ var as_filter_conditions_default = /* @__PURE__ */ defineComponent({
|
|
|
63
66
|
value: []
|
|
64
67
|
}];
|
|
65
68
|
}
|
|
66
|
-
function applyShortcut(
|
|
67
|
-
model.value =
|
|
68
|
-
type:
|
|
69
|
-
value: [
|
|
70
|
-
}
|
|
69
|
+
function applyShortcut(sc) {
|
|
70
|
+
model.value = sc.conditions.map((c) => ({
|
|
71
|
+
type: c.type,
|
|
72
|
+
value: [...c.value]
|
|
73
|
+
}));
|
|
71
74
|
}
|
|
72
75
|
return (_ctx, _cache) => {
|
|
73
76
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -87,7 +90,7 @@ var as_filter_conditions_default = /* @__PURE__ */ defineComponent({
|
|
|
87
90
|
return openBlock(), createElementBlock("option", {
|
|
88
91
|
key: ct,
|
|
89
92
|
value: ct
|
|
90
|
-
}, toDisplayString(unref(conditionLabel)(ct)), 9, _hoisted_2$2);
|
|
93
|
+
}, toDisplayString(unref(conditionLabel)(ct, filterType.value)), 9, _hoisted_2$2);
|
|
91
94
|
}), 128))], 40, _hoisted_1$2),
|
|
92
95
|
(openBlock(), createBlock(resolveDynamicComponent(unref(FilterInput)), {
|
|
93
96
|
column: __props.column,
|
|
@@ -118,12 +121,12 @@ var as_filter_conditions_default = /* @__PURE__ */ defineComponent({
|
|
|
118
121
|
class: "as-filter-add-condition",
|
|
119
122
|
onClick: addCondition
|
|
120
123
|
}, " + Add condition "),
|
|
121
|
-
|
|
124
|
+
shortcuts.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$2, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "as-filter-shortcuts-label" }, "Quick:", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(shortcuts.value, (sc) => {
|
|
122
125
|
return openBlock(), createElementBlock("button", {
|
|
123
|
-
key: sc.
|
|
126
|
+
key: sc.id,
|
|
124
127
|
type: "button",
|
|
125
128
|
class: "as-filter-shortcut-btn",
|
|
126
|
-
onClick: ($event) => applyShortcut(sc
|
|
129
|
+
onClick: ($event) => applyShortcut(sc)
|
|
127
130
|
}, toDisplayString(sc.label), 9, _hoisted_5$2);
|
|
128
131
|
}), 128))])) : createCommentVNode("v-if", true)
|
|
129
132
|
], 64);
|
|
@@ -163,7 +166,9 @@ var as_filter_value_help_default = /* @__PURE__ */ defineComponent({
|
|
|
163
166
|
setup(__props) {
|
|
164
167
|
const props = __props;
|
|
165
168
|
const model = useModel(__props, "modelValue");
|
|
169
|
+
const outer = useTableContextOptional();
|
|
166
170
|
const info = props.column.valueHelpInfo;
|
|
171
|
+
const distinct = props.column.distinct;
|
|
167
172
|
const options = props.column.options;
|
|
168
173
|
function modelToValues(conds) {
|
|
169
174
|
const values = [];
|
|
@@ -187,22 +192,36 @@ var as_filter_value_help_default = /* @__PURE__ */ defineComponent({
|
|
|
187
192
|
provideContext: true,
|
|
188
193
|
rowValueFn: (row) => row[info.targetField],
|
|
189
194
|
selectionPersistence: "persist",
|
|
190
|
-
selectedRows: selectionRef
|
|
195
|
+
selectedRows: selectionRef,
|
|
196
|
+
forceFilters: info.filter,
|
|
197
|
+
alwaysSelected: [info.targetField]
|
|
191
198
|
});
|
|
192
|
-
else if (
|
|
199
|
+
else if (distinct) {
|
|
200
|
+
const fetchPage = createDistinctPager(outer?.state, props.column);
|
|
201
|
+
const { state } = createStaticTableState({
|
|
202
|
+
rows: [],
|
|
203
|
+
columns: [valueColumn(false)],
|
|
204
|
+
searchPaths: ["__label"],
|
|
205
|
+
limit: 100,
|
|
206
|
+
selection: {
|
|
207
|
+
rowValueFn: (row) => row.__value,
|
|
208
|
+
selectedRows: selectionRef
|
|
209
|
+
},
|
|
210
|
+
remote: ({ searchTerm }, page, size) => fetchPage(searchTerm.trim(), page, size)
|
|
211
|
+
});
|
|
212
|
+
innerState = state;
|
|
213
|
+
provideTableContext({
|
|
214
|
+
state,
|
|
215
|
+
client: {},
|
|
216
|
+
controls: {}
|
|
217
|
+
});
|
|
218
|
+
} else if (options) {
|
|
193
219
|
const { state } = createStaticTableState({
|
|
194
220
|
rows: options.map((o) => ({
|
|
195
221
|
__value: o.key,
|
|
196
222
|
__label: o.label
|
|
197
223
|
})),
|
|
198
|
-
columns: [
|
|
199
|
-
path: "__label",
|
|
200
|
-
label: "Value",
|
|
201
|
-
type: "text",
|
|
202
|
-
sortable: true,
|
|
203
|
-
filterable: false,
|
|
204
|
-
order: 0
|
|
205
|
-
}],
|
|
224
|
+
columns: [valueColumn(true)],
|
|
206
225
|
searchPaths: ["__label"],
|
|
207
226
|
selection: {
|
|
208
227
|
rowValueFn: (row) => row.__value,
|
|
@@ -219,7 +238,9 @@ var as_filter_value_help_default = /* @__PURE__ */ defineComponent({
|
|
|
219
238
|
if (info) onMounted(() => {
|
|
220
239
|
resolveValueHelp(info.url).then((r) => {
|
|
221
240
|
resolved.value = r;
|
|
222
|
-
}).catch(() => {
|
|
241
|
+
}).catch((err) => {
|
|
242
|
+
declineIfRejected(outer?.state, info, err);
|
|
243
|
+
});
|
|
223
244
|
});
|
|
224
245
|
if (info && innerState) {
|
|
225
246
|
const fkState = innerState;
|
|
@@ -229,7 +250,8 @@ var as_filter_value_help_default = /* @__PURE__ */ defineComponent({
|
|
|
229
250
|
initialized = true;
|
|
230
251
|
stop();
|
|
231
252
|
const dictPaths = valueHelpDictPaths(r);
|
|
232
|
-
const
|
|
253
|
+
const pinned = new Set(info.pinned);
|
|
254
|
+
const dictCols = fkState.allColumns.value.filter((c) => dictPaths.has(c.path) && !pinned.has(c.path));
|
|
233
255
|
fkState.columnNames.value = dictCols.map((c) => c.path);
|
|
234
256
|
if (fkState.filterFields.value.length === 0) fkState.filterFields.value = dictCols.filter(isColumnFilterable).map((c) => c.path);
|
|
235
257
|
fkState.query();
|
|
@@ -332,6 +354,7 @@ var as_filter_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
332
354
|
__name: "as-filter-dialog",
|
|
333
355
|
setup(__props) {
|
|
334
356
|
const { state } = useTableContext();
|
|
357
|
+
const { formatCondition } = useConditionFormat(state);
|
|
335
358
|
const FilterValueHelp = useTableComponent("filterValueHelp", as_filter_value_help_default);
|
|
336
359
|
const isOpen = computed({
|
|
337
360
|
get: () => state.filterDialogColumn.value !== null,
|
|
@@ -340,7 +363,7 @@ var as_filter_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
340
363
|
}
|
|
341
364
|
});
|
|
342
365
|
const column = computed(() => state.filterDialogColumn.value);
|
|
343
|
-
const hasValueHelp = computed(() => !!column.value && column.value.filterable && (
|
|
366
|
+
const hasValueHelp = computed(() => !!column.value && column.value.filterable && hasValuePicker(state, column.value));
|
|
344
367
|
const defCondition = computed(() => column.value ? columnDefaultCondition(column.value) : "eq");
|
|
345
368
|
const valueHelpConditions = ref([]);
|
|
346
369
|
const freeConditions = ref([]);
|
|
@@ -366,7 +389,7 @@ var as_filter_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
366
389
|
valueHelpConditions.value.forEach((c, i) => {
|
|
367
390
|
if (isFilled(c)) result.push({
|
|
368
391
|
key: `vh:${i}:${String(c.value[0] ?? "")}`,
|
|
369
|
-
label:
|
|
392
|
+
label: formatCondition(column.value, c),
|
|
370
393
|
bucket: "value-help",
|
|
371
394
|
index: i
|
|
372
395
|
});
|
|
@@ -374,7 +397,7 @@ var as_filter_dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
374
397
|
freeConditions.value.forEach((c, i) => {
|
|
375
398
|
if (isFilled(c)) result.push({
|
|
376
399
|
key: `fc:${i}:${c.type}:${String(c.value[0] ?? "")}`,
|
|
377
|
-
label:
|
|
400
|
+
label: formatCondition(column.value, c),
|
|
378
401
|
bucket: "free",
|
|
379
402
|
index: i
|
|
380
403
|
});
|