@atscript/vue-table 0.1.58
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/as-action-form-dialog.cjs +221 -0
- package/dist/as-action-form-dialog.d.cts +6 -0
- package/dist/as-action-form-dialog.d.mts +7 -0
- package/dist/as-action-form-dialog.mjs +221 -0
- package/dist/as-action-menu-content-CXsdPn42.mjs +104 -0
- package/dist/as-action-menu-content-CyUfBrWH.cjs +109 -0
- package/dist/as-cell-array-CXeZzZqt.cjs +69 -0
- package/dist/as-cell-array-DOQKR6t5.mjs +64 -0
- package/dist/as-cell-array.cjs +3 -0
- package/dist/as-cell-array.d.cts +2 -0
- package/dist/as-cell-array.d.mts +2 -0
- package/dist/as-cell-array.mjs +3 -0
- package/dist/as-cell-array.vue-DZGM2VHh.d.mts +12 -0
- package/dist/as-cell-array.vue-pFs5GcCR.d.cts +12 -0
- package/dist/as-cell-date-CTrvxS1h.cjs +78 -0
- package/dist/as-cell-date-Cq49RHmL.mjs +73 -0
- package/dist/as-cell-date.cjs +3 -0
- package/dist/as-cell-date.d.cts +2 -0
- package/dist/as-cell-date.d.mts +2 -0
- package/dist/as-cell-date.mjs +3 -0
- package/dist/as-cell-date.vue-BBSps2B2.d.cts +12 -0
- package/dist/as-cell-date.vue-Zlt4mHWb.d.mts +12 -0
- package/dist/as-cell-json-BynWIs1d.mjs +37 -0
- package/dist/as-cell-json-DvHvQ6IL.cjs +42 -0
- package/dist/as-cell-json-popover-BWdNs1YU.cjs +70 -0
- package/dist/as-cell-json-popover-DUq25I0L.mjs +65 -0
- package/dist/as-cell-json.cjs +3 -0
- package/dist/as-cell-json.d.cts +2 -0
- package/dist/as-cell-json.d.mts +2 -0
- package/dist/as-cell-json.mjs +3 -0
- package/dist/as-cell-json.vue-C6wg4ARZ.d.cts +12 -0
- package/dist/as-cell-json.vue-CESWuCer.d.mts +12 -0
- package/dist/as-cell-number-0_WrSCzu.cjs +76 -0
- package/dist/as-cell-number-Bc1C97Vg.mjs +71 -0
- package/dist/as-cell-number.cjs +3 -0
- package/dist/as-cell-number.d.cts +2 -0
- package/dist/as-cell-number.d.mts +2 -0
- package/dist/as-cell-number.mjs +3 -0
- package/dist/as-cell-number.vue-1Oq7nVI3.d.mts +12 -0
- package/dist/as-cell-number.vue-CJ2K5zeM.d.cts +12 -0
- package/dist/as-cell-union-C1w3B38J.mjs +88 -0
- package/dist/as-cell-union-CFAI0utz.cjs +93 -0
- package/dist/as-cell-union.cjs +4 -0
- package/dist/as-cell-union.d.cts +2 -0
- package/dist/as-cell-union.d.mts +2 -0
- package/dist/as-cell-union.mjs +4 -0
- package/dist/as-cell-union.vue-CslPM_c2.d.cts +12 -0
- package/dist/as-cell-union.vue-NnDmQZOA.d.mts +12 -0
- package/dist/as-column-menu-CH9Htz0Q.cjs +220 -0
- package/dist/as-column-menu-DCfhorMP.mjs +215 -0
- package/dist/as-column-menu.cjs +2 -0
- package/dist/as-column-menu.d.cts +2 -0
- package/dist/as-column-menu.d.mts +2 -0
- package/dist/as-column-menu.mjs +2 -0
- package/dist/as-column-menu.vue-C9e6wJ3z.d.mts +47 -0
- package/dist/as-column-menu.vue-o0qFdzoL.d.cts +47 -0
- package/dist/as-config-dialog-d2k7_l0U.cjs +699 -0
- package/dist/as-config-dialog-vRklaKbi.mjs +688 -0
- package/dist/as-config-dialog.cjs +3 -0
- package/dist/as-config-dialog.d.cts +2 -0
- package/dist/as-config-dialog.d.mts +2 -0
- package/dist/as-config-dialog.mjs +3 -0
- package/dist/as-config-dialog.vue-C6Q62xF5.d.mts +7 -0
- package/dist/as-config-dialog.vue-DvvJi3xx.d.cts +7 -0
- package/dist/as-confirm-dialog-BLh3Ju4-.mjs +52 -0
- package/dist/as-confirm-dialog-BgpIEE2z.cjs +57 -0
- package/dist/as-confirm-dialog.cjs +3 -0
- package/dist/as-confirm-dialog.d.cts +2 -0
- package/dist/as-confirm-dialog.d.mts +2 -0
- package/dist/as-confirm-dialog.mjs +3 -0
- package/dist/as-confirm-dialog.vue-CXxLpzbu.d.cts +7 -0
- package/dist/as-confirm-dialog.vue-pas8jGhv.d.mts +7 -0
- package/dist/as-filter-dialog-C0HMpUPT.mjs +610 -0
- package/dist/as-filter-dialog-DcGvIV3h.cjs +621 -0
- package/dist/as-filter-dialog.cjs +15 -0
- package/dist/as-filter-dialog.d.cts +2 -0
- package/dist/as-filter-dialog.d.mts +2 -0
- package/dist/as-filter-dialog.mjs +15 -0
- package/dist/as-filter-dialog.vue-BV2J8PgZ.d.cts +7 -0
- package/dist/as-filter-dialog.vue-RDZjp4gJ.d.mts +7 -0
- package/dist/as-filter-field-B_tYzvvl.cjs +984 -0
- package/dist/as-filter-field-Bqvu2ASN.mjs +943 -0
- package/dist/as-filter-field.cjs +9 -0
- package/dist/as-filter-field.d.cts +2 -0
- package/dist/as-filter-field.d.mts +2 -0
- package/dist/as-filter-field.mjs +9 -0
- package/dist/as-filter-field.vue-ByQ8xIGq.d.cts +11 -0
- package/dist/as-filter-field.vue-QY8wi5S5.d.mts +11 -0
- package/dist/as-filter-input--nr72iwX.cjs +106 -0
- package/dist/as-filter-input-P1i0CW2-.mjs +101 -0
- package/dist/as-filter-input.cjs +2 -0
- package/dist/as-filter-input.d.cts +2 -0
- package/dist/as-filter-input.d.mts +2 -0
- package/dist/as-filter-input.mjs +2 -0
- package/dist/as-filter-input.vue-CBQ71eNg.d.mts +18 -0
- package/dist/as-filter-input.vue-CS4nOk_Q.d.cts +18 -0
- package/dist/as-filters-Bxa9ZEMm.mjs +44 -0
- package/dist/as-filters-xRT2qv56.cjs +49 -0
- package/dist/as-filters.cjs +10 -0
- package/dist/as-filters.d.cts +2 -0
- package/dist/as-filters.d.mts +2 -0
- package/dist/as-filters.mjs +10 -0
- package/dist/as-filters.vue-BsMgYUcX.d.mts +10 -0
- package/dist/as-filters.vue-fv-tRL2H.d.cts +10 -0
- package/dist/as-preset-dialog-BaTfwMnh.cjs +569 -0
- package/dist/as-preset-dialog-BdDRgwf_.mjs +564 -0
- package/dist/as-preset-dialog.cjs +4 -0
- package/dist/as-preset-dialog.d.cts +2 -0
- package/dist/as-preset-dialog.d.mts +2 -0
- package/dist/as-preset-dialog.mjs +4 -0
- package/dist/as-preset-dialog.vue-Bzv-ON9W.d.mts +7 -0
- package/dist/as-preset-dialog.vue-DP9fy00Y.d.cts +7 -0
- package/dist/as-preset-picker-BQbNEiy9.mjs +427 -0
- package/dist/as-preset-picker-Ce3crTQy.cjs +432 -0
- package/dist/as-preset-picker.cjs +4 -0
- package/dist/as-preset-picker.d.cts +2 -0
- package/dist/as-preset-picker.d.mts +2 -0
- package/dist/as-preset-picker.mjs +4 -0
- package/dist/as-preset-picker.vue-CTBk6leV.d.mts +7 -0
- package/dist/as-preset-picker.vue-DfXS3pGl.d.cts +7 -0
- package/dist/as-row-actions-B6Kob6gt.cjs +120 -0
- package/dist/as-row-actions-CeWBBGqh.mjs +115 -0
- package/dist/as-row-actions.cjs +4 -0
- package/dist/as-row-actions.d.cts +2 -0
- package/dist/as-row-actions.d.mts +2 -0
- package/dist/as-row-actions.mjs +4 -0
- package/dist/as-row-actions.vue-BPaQfGev.d.mts +11 -0
- package/dist/as-row-actions.vue-Bvcc2tUN.d.cts +11 -0
- package/dist/as-table-Cnw2fOqZ.mjs +204 -0
- package/dist/as-table-DlDFxdXI.cjs +209 -0
- package/dist/as-table-actions-BK1Thy2G.cjs +142 -0
- package/dist/as-table-actions-BpMiNFni.mjs +137 -0
- package/dist/as-table-actions.cjs +4 -0
- package/dist/as-table-actions.d.cts +2 -0
- package/dist/as-table-actions.d.mts +2 -0
- package/dist/as-table-actions.mjs +4 -0
- package/dist/as-table-actions.vue-B7Q-JA3z.d.cts +47 -0
- package/dist/as-table-actions.vue-Bs1Jl1ep.d.mts +47 -0
- package/dist/as-table-base-D0k4k7k_.mjs +646 -0
- package/dist/as-table-base-VIz-B_6_.cjs +651 -0
- package/dist/as-table-cell-value-B1CiJYFn.mjs +26 -0
- package/dist/as-table-cell-value-CuxRtFn9.cjs +31 -0
- package/dist/as-table-cell-value.cjs +3 -0
- package/dist/as-table-cell-value.d.cts +2 -0
- package/dist/as-table-cell-value.d.mts +2 -0
- package/dist/as-table-cell-value.mjs +3 -0
- package/dist/as-table-cell-value.vue-BgFDv2JQ.d.cts +12 -0
- package/dist/as-table-cell-value.vue-BuPCQ8YA.d.mts +12 -0
- package/dist/as-table-header-cell-C3zeZUZo.cjs +117 -0
- package/dist/as-table-header-cell-CBn_ioCe.mjs +112 -0
- package/dist/as-table-header-cell.cjs +3 -0
- package/dist/as-table-header-cell.d.cts +2 -0
- package/dist/as-table-header-cell.d.mts +2 -0
- package/dist/as-table-header-cell.mjs +3 -0
- package/dist/as-table-header-cell.vue-Bc_DSsGY.d.cts +31 -0
- package/dist/as-table-header-cell.vue-DNMOHfek.d.mts +31 -0
- package/dist/as-table-root-Br6WcGRo.cjs +263 -0
- package/dist/as-table-root-gG7pTIdD.mjs +258 -0
- package/dist/as-table-root.cjs +28 -0
- package/dist/as-table-root.d.cts +2 -0
- package/dist/as-table-root.d.mts +2 -0
- package/dist/as-table-root.mjs +28 -0
- package/dist/as-table-root.vue-5_OhVwse.d.mts +2258 -0
- package/dist/as-table-root.vue-CSqEtIll.d.cts +2258 -0
- package/dist/as-table-status-BjRGGuhC.mjs +683 -0
- package/dist/as-table-status-DWYoJIMC.cjs +724 -0
- package/dist/as-table.cjs +10 -0
- package/dist/as-table.d.cts +2 -0
- package/dist/as-table.d.mts +2 -0
- package/dist/as-table.mjs +10 -0
- package/dist/as-table.vue-BTYg-e3Z.d.mts +81 -0
- package/dist/as-table.vue-wdRARLIe.d.cts +81 -0
- package/dist/as-window-table-CKIfo3M_.mjs +709 -0
- package/dist/as-window-table-DE7_NyEP.cjs +714 -0
- package/dist/as-window-table.cjs +9 -0
- package/dist/as-window-table.d.cts +2 -0
- package/dist/as-window-table.d.mts +2 -0
- package/dist/as-window-table.mjs +9 -0
- package/dist/as-window-table.vue-Bf8xGC9M.d.mts +86 -0
- package/dist/as-window-table.vue-CA8qsrz4.d.cts +86 -0
- package/dist/format-cell-B2xMDYO9.mjs +27 -0
- package/dist/format-cell-D4mqaN0E.cjs +32 -0
- package/dist/get-cell-value-CZSVfDLg.cjs +19 -0
- package/dist/get-cell-value-DiH84HKL.mjs +14 -0
- package/dist/index.cjs +598 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +505 -0
- package/dist/preset-aspect-display-BYeiSgcc.mjs +43 -0
- package/dist/preset-aspect-display-y8aal_EF.cjs +72 -0
- package/dist/types-BvvXN72P.d.mts +531 -0
- package/dist/types-CNMmF6W2.d.cts +531 -0
- package/dist/use-cell-locale-1uQaFTLQ.mjs +23 -0
- package/dist/use-cell-locale-B480_QYK.cjs +34 -0
- package/dist/use-table-column-handlers-CGYAY2xH.cjs +65 -0
- package/dist/use-table-column-handlers-t6xi1yCE.mjs +54 -0
- package/dist/use-table-state-C4JbonEZ.mjs +1822 -0
- package/dist/use-table-state-MU-vuzui.cjs +1917 -0
- package/package.json +195 -0
- package/styles.d.ts +2 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import { a as useTableContext, o as useTableContextOptional, r as provideTableContext, t as createStaticTableState } from "./use-table-state-C4JbonEZ.mjs";
|
|
2
|
+
import { r as useTable } from "./as-filter-field-Bqvu2ASN.mjs";
|
|
3
|
+
import { n as useDialogTabKeyboard, t as as_config_dialog_default } from "./as-config-dialog-vRklaKbi.mjs";
|
|
4
|
+
import { t as as_filter_input_default } from "./as-filter-input-P1i0CW2-.mjs";
|
|
5
|
+
import { t as as_window_table_default } from "./as-window-table-CKIfo3M_.mjs";
|
|
6
|
+
import { t as as_filters_default } from "./as-filters-Bxa9ZEMm.mjs";
|
|
7
|
+
import { resolveValueHelp, valueHelpDictPaths } from "@atscript/ui";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, shallowRef, toDisplayString, unref, useModel, watch, withCtx } from "vue";
|
|
9
|
+
import { columnFilterType, conditionLabel, conditionsForType, dateShortcuts, defaultCondition, filledFilterCount, formatFilterCondition, isFilled, isSimpleEq, sameColumnSet } from "@atscript/ui-table";
|
|
10
|
+
import { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, TabsContent, TabsList, TabsRoot, TabsTrigger } from "reka-ui";
|
|
11
|
+
//#region src/composables/use-table-nav-bridge.ts
|
|
12
|
+
function isPassthroughKey(event) {
|
|
13
|
+
const key = event.key;
|
|
14
|
+
const meta = event.metaKey;
|
|
15
|
+
const ctrl = event.ctrlKey;
|
|
16
|
+
const alt = event.altKey;
|
|
17
|
+
if (key === " ") return true;
|
|
18
|
+
if (key.length === 1 && !meta && !ctrl && !alt) return true;
|
|
19
|
+
if ((key === "Home" || key === "End") && !meta && !ctrl && !alt) return true;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Construct a keyboard-bridge for an external `<input>` to drive table nav
|
|
24
|
+
* without losing focus. Without args, injects the nearest `<as-table-root>`
|
|
25
|
+
* context's state. With an explicit `state`, binds to that state. With
|
|
26
|
+
* `opts.enterAction`, the returned bridge's `onKeydown` defaults to that
|
|
27
|
+
* enter-action (per-call options still win).
|
|
28
|
+
*
|
|
29
|
+
* Each call returns a fresh bridge object — callers that need stable
|
|
30
|
+
* identity should bind once at setup and reuse the binding.
|
|
31
|
+
*/
|
|
32
|
+
function useTableNavBridge(state, opts) {
|
|
33
|
+
let target = state;
|
|
34
|
+
if (!target) {
|
|
35
|
+
const ctx = useTableContextOptional();
|
|
36
|
+
if (!ctx) throw new Error("[vue-table] useTableNavBridge() called outside of <as-table-root>.");
|
|
37
|
+
target = ctx.state;
|
|
38
|
+
}
|
|
39
|
+
const bound = target;
|
|
40
|
+
const defaultEnterAction = opts?.enterAction;
|
|
41
|
+
const modeOpt = opts?.mode;
|
|
42
|
+
const readMode = () => {
|
|
43
|
+
if (typeof modeOpt === "function") return modeOpt();
|
|
44
|
+
return modeOpt ?? "none";
|
|
45
|
+
};
|
|
46
|
+
function onKeydown(event, callOpts) {
|
|
47
|
+
if (isPassthroughKey(event)) return;
|
|
48
|
+
bound.handleNavKey(event, {
|
|
49
|
+
enterAction: callOpts?.enterAction ?? defaultEnterAction,
|
|
50
|
+
mode: callOpts?.mode ?? readMode()
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
onKeydown,
|
|
55
|
+
activeIndex: bound.activeIndex,
|
|
56
|
+
setActive: bound.setActive,
|
|
57
|
+
clearActive: bound.clearActive
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/internal/as-filter-conditions.vue?vue&type=script&setup=true&lang.ts
|
|
62
|
+
const _hoisted_1$2 = ["value", "onChange"];
|
|
63
|
+
const _hoisted_2$2 = ["value"];
|
|
64
|
+
const _hoisted_3$2 = ["disabled", "onClick"];
|
|
65
|
+
const _hoisted_4$2 = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "as-filter-shortcuts"
|
|
68
|
+
};
|
|
69
|
+
const _hoisted_5$2 = ["onClick"];
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/components/internal/as-filter-conditions.vue
|
|
72
|
+
var as_filter_conditions_default = /* @__PURE__ */ defineComponent({
|
|
73
|
+
__name: "as-filter-conditions",
|
|
74
|
+
props: /* @__PURE__ */ mergeModels({ column: {
|
|
75
|
+
type: Object,
|
|
76
|
+
required: true
|
|
77
|
+
} }, {
|
|
78
|
+
"modelValue": {
|
|
79
|
+
type: Array,
|
|
80
|
+
required: true
|
|
81
|
+
},
|
|
82
|
+
"modelModifiers": {}
|
|
83
|
+
}),
|
|
84
|
+
emits: ["update:modelValue"],
|
|
85
|
+
setup(__props) {
|
|
86
|
+
const props = __props;
|
|
87
|
+
const model = useModel(__props, "modelValue");
|
|
88
|
+
const filterType = computed(() => columnFilterType(props.column.type));
|
|
89
|
+
const availableConditions = computed(() => conditionsForType(filterType.value, props.column.nullable));
|
|
90
|
+
const defCondition = computed(() => defaultCondition(filterType.value));
|
|
91
|
+
const isDateType = computed(() => filterType.value === "date");
|
|
92
|
+
const shortcuts = computed(() => isDateType.value ? dateShortcuts() : []);
|
|
93
|
+
function updateCondition(index, update) {
|
|
94
|
+
model.value = model.value.map((c, i) => i === index ? {
|
|
95
|
+
...c,
|
|
96
|
+
...update
|
|
97
|
+
} : c);
|
|
98
|
+
}
|
|
99
|
+
function addCondition() {
|
|
100
|
+
model.value = [...model.value, {
|
|
101
|
+
type: defCondition.value,
|
|
102
|
+
value: []
|
|
103
|
+
}];
|
|
104
|
+
}
|
|
105
|
+
function removeCondition(index) {
|
|
106
|
+
const next = model.value.filter((_, i) => i !== index);
|
|
107
|
+
model.value = next.length > 0 ? next : [{
|
|
108
|
+
type: defCondition.value,
|
|
109
|
+
value: []
|
|
110
|
+
}];
|
|
111
|
+
}
|
|
112
|
+
function applyShortcut(dates) {
|
|
113
|
+
model.value = [{
|
|
114
|
+
type: "bw",
|
|
115
|
+
value: [dates[0], dates[1]]
|
|
116
|
+
}];
|
|
117
|
+
}
|
|
118
|
+
return (_ctx, _cache) => {
|
|
119
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
120
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(model.value, (cond, index) => {
|
|
121
|
+
return openBlock(), createElementBlock("div", {
|
|
122
|
+
key: index,
|
|
123
|
+
class: "as-filter-condition-row"
|
|
124
|
+
}, [
|
|
125
|
+
createElementVNode("select", {
|
|
126
|
+
class: "as-filter-condition-select",
|
|
127
|
+
value: cond.type,
|
|
128
|
+
onChange: ($event) => updateCondition(index, {
|
|
129
|
+
type: $event.target.value,
|
|
130
|
+
value: []
|
|
131
|
+
})
|
|
132
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(availableConditions.value, (ct) => {
|
|
133
|
+
return openBlock(), createElementBlock("option", {
|
|
134
|
+
key: ct,
|
|
135
|
+
value: ct
|
|
136
|
+
}, toDisplayString(unref(conditionLabel)(ct)), 9, _hoisted_2$2);
|
|
137
|
+
}), 128))], 40, _hoisted_1$2),
|
|
138
|
+
createVNode(as_filter_input_default, {
|
|
139
|
+
column: __props.column,
|
|
140
|
+
condition: cond,
|
|
141
|
+
"filter-type": filterType.value,
|
|
142
|
+
"onUpdate:condition": (c) => updateCondition(index, c)
|
|
143
|
+
}, null, 8, [
|
|
144
|
+
"column",
|
|
145
|
+
"condition",
|
|
146
|
+
"filter-type",
|
|
147
|
+
"onUpdate:condition"
|
|
148
|
+
]),
|
|
149
|
+
createElementVNode("button", {
|
|
150
|
+
type: "button",
|
|
151
|
+
class: "as-filter-condition-remove",
|
|
152
|
+
disabled: model.value.length <= 1,
|
|
153
|
+
style: normalizeStyle(model.value.length <= 1 ? "visibility:hidden" : ""),
|
|
154
|
+
"aria-label": "Remove condition",
|
|
155
|
+
onClick: ($event) => removeCondition(index)
|
|
156
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("span", {
|
|
157
|
+
class: "i-as-close",
|
|
158
|
+
"aria-hidden": "true"
|
|
159
|
+
}, null, -1)])], 12, _hoisted_3$2)
|
|
160
|
+
]);
|
|
161
|
+
}), 128)),
|
|
162
|
+
createElementVNode("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
class: "as-filter-add-condition",
|
|
165
|
+
onClick: addCondition
|
|
166
|
+
}, " + Add condition "),
|
|
167
|
+
isDateType.value && 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) => {
|
|
168
|
+
return openBlock(), createElementBlock("button", {
|
|
169
|
+
key: sc.label,
|
|
170
|
+
type: "button",
|
|
171
|
+
class: "as-filter-shortcut-btn",
|
|
172
|
+
onClick: ($event) => applyShortcut(sc.dates)
|
|
173
|
+
}, toDisplayString(sc.label), 9, _hoisted_5$2);
|
|
174
|
+
}), 128))])) : createCommentVNode("v-if", true)
|
|
175
|
+
], 64);
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/internal/as-filter-value-help.vue?vue&type=script&setup=true&lang.ts
|
|
181
|
+
const _hoisted_1$1 = { class: "as-filter-value-help" };
|
|
182
|
+
const _hoisted_2$1 = { class: "as-filter-value-help-toolbar" };
|
|
183
|
+
const _hoisted_3$1 = {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "as-filter-value-help-search-wrap"
|
|
186
|
+
};
|
|
187
|
+
const _hoisted_4$1 = ["value"];
|
|
188
|
+
const _hoisted_5$1 = { class: "as-filter-value-help-count" };
|
|
189
|
+
const _hoisted_6$1 = ["title"];
|
|
190
|
+
const _hoisted_7$1 = {
|
|
191
|
+
key: 0,
|
|
192
|
+
class: "as-filter-value-help-filters"
|
|
193
|
+
};
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/components/internal/as-filter-value-help.vue
|
|
196
|
+
var as_filter_value_help_default = /* @__PURE__ */ defineComponent({
|
|
197
|
+
__name: "as-filter-value-help",
|
|
198
|
+
props: /* @__PURE__ */ mergeModels({ column: {
|
|
199
|
+
type: Object,
|
|
200
|
+
required: true
|
|
201
|
+
} }, {
|
|
202
|
+
"modelValue": {
|
|
203
|
+
type: Array,
|
|
204
|
+
default: () => []
|
|
205
|
+
},
|
|
206
|
+
"modelModifiers": {}
|
|
207
|
+
}),
|
|
208
|
+
emits: ["update:modelValue"],
|
|
209
|
+
setup(__props) {
|
|
210
|
+
const props = __props;
|
|
211
|
+
const model = useModel(__props, "modelValue");
|
|
212
|
+
const info = props.column.valueHelpInfo;
|
|
213
|
+
const options = props.column.options;
|
|
214
|
+
function modelToValues(conds) {
|
|
215
|
+
const values = [];
|
|
216
|
+
for (const c of conds) if (isSimpleEq(c)) values.push(c.value[0]);
|
|
217
|
+
return values;
|
|
218
|
+
}
|
|
219
|
+
function valuesToModel(values) {
|
|
220
|
+
const next = [];
|
|
221
|
+
for (const v of values) next.push({
|
|
222
|
+
type: "eq",
|
|
223
|
+
value: [v]
|
|
224
|
+
});
|
|
225
|
+
return next;
|
|
226
|
+
}
|
|
227
|
+
const selectionRef = ref(modelToValues(model.value));
|
|
228
|
+
const resolved = shallowRef(null);
|
|
229
|
+
let innerState;
|
|
230
|
+
if (info) innerState = useTable(info.url, {
|
|
231
|
+
limit: 100,
|
|
232
|
+
queryOnMount: false,
|
|
233
|
+
provideContext: true,
|
|
234
|
+
rowValueFn: (row) => row[info.targetField],
|
|
235
|
+
selectionPersistence: "persist",
|
|
236
|
+
selectedRows: selectionRef
|
|
237
|
+
});
|
|
238
|
+
else if (options) {
|
|
239
|
+
const { state } = createStaticTableState({
|
|
240
|
+
rows: options.map((o) => ({
|
|
241
|
+
__value: o.key,
|
|
242
|
+
__label: o.label
|
|
243
|
+
})),
|
|
244
|
+
columns: [{
|
|
245
|
+
path: "__label",
|
|
246
|
+
label: "Value",
|
|
247
|
+
type: "text",
|
|
248
|
+
sortable: true,
|
|
249
|
+
filterable: false,
|
|
250
|
+
visible: true,
|
|
251
|
+
order: 0
|
|
252
|
+
}],
|
|
253
|
+
searchPaths: ["__label"],
|
|
254
|
+
selection: {
|
|
255
|
+
rowValueFn: (row) => row.__value,
|
|
256
|
+
selectedRows: selectionRef
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
innerState = state;
|
|
260
|
+
provideTableContext({
|
|
261
|
+
state,
|
|
262
|
+
client: {},
|
|
263
|
+
controls: {}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
if (info) onMounted(() => {
|
|
267
|
+
resolveValueHelp(info.url).then((r) => {
|
|
268
|
+
resolved.value = r;
|
|
269
|
+
}).catch(() => {});
|
|
270
|
+
});
|
|
271
|
+
if (info && innerState) {
|
|
272
|
+
const fkState = innerState;
|
|
273
|
+
let initialized = false;
|
|
274
|
+
const stop = watch([() => fkState.tableDef.value, resolved], ([def, r]) => {
|
|
275
|
+
if (!def || !r || initialized) return;
|
|
276
|
+
initialized = true;
|
|
277
|
+
stop();
|
|
278
|
+
const dictPaths = valueHelpDictPaths(r);
|
|
279
|
+
const dictCols = fkState.allColumns.value.filter((c) => dictPaths.has(c.path));
|
|
280
|
+
fkState.columnNames.value = dictCols.map((c) => c.path);
|
|
281
|
+
if (fkState.filterFields.value.length === 0) fkState.filterFields.value = dictCols.filter((c) => c.filterable).map((c) => c.path);
|
|
282
|
+
fkState.query();
|
|
283
|
+
}, { immediate: true });
|
|
284
|
+
}
|
|
285
|
+
const navBridge = innerState ? useTableNavBridge(innerState) : void 0;
|
|
286
|
+
if (innerState) watch(selectionRef, (v) => {
|
|
287
|
+
if (sameColumnSet(modelToValues(model.value), v)) return;
|
|
288
|
+
model.value = valuesToModel(v);
|
|
289
|
+
});
|
|
290
|
+
const searchable = computed(() => {
|
|
291
|
+
if (!innerState) return false;
|
|
292
|
+
return !!innerState.tableDef.value?.searchable;
|
|
293
|
+
});
|
|
294
|
+
const showFilters = ref(false);
|
|
295
|
+
watch(searchable, (v) => {
|
|
296
|
+
showFilters.value = !v;
|
|
297
|
+
}, { immediate: true });
|
|
298
|
+
const hasFilterableFields = computed(() => !!innerState && innerState.filterFields.value.length > 0);
|
|
299
|
+
const totalCount = computed(() => innerState?.totalCount.value ?? 0);
|
|
300
|
+
const hasActiveFilters = computed(() => innerState ? filledFilterCount(innerState.filters.value) > 0 : false);
|
|
301
|
+
function clearAllFilters() {
|
|
302
|
+
innerState?.resetFilters();
|
|
303
|
+
}
|
|
304
|
+
return (_ctx, _cache) => {
|
|
305
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
306
|
+
createElementVNode("div", _hoisted_2$1, [searchable.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [_cache[3] || (_cache[3] = createElementVNode("span", {
|
|
307
|
+
class: "as-filter-value-help-search-icon i-as-search",
|
|
308
|
+
"aria-hidden": "true"
|
|
309
|
+
}, null, -1)), createElementVNode("input", {
|
|
310
|
+
value: unref(innerState)?.searchTerm.value ?? "",
|
|
311
|
+
type: "text",
|
|
312
|
+
class: "as-filter-value-help-search",
|
|
313
|
+
placeholder: "Search...",
|
|
314
|
+
autocomplete: "off",
|
|
315
|
+
onInput: _cache[0] || (_cache[0] = (e) => {
|
|
316
|
+
if (unref(innerState)) unref(innerState).searchTerm.value = e.target.value;
|
|
317
|
+
}),
|
|
318
|
+
onKeydown: _cache[1] || (_cache[1] = (e) => unref(navBridge)?.onKeydown(e))
|
|
319
|
+
}, null, 40, _hoisted_4$1)])) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_5$1, [unref(info) && searchable.value && hasFilterableFields.value ? (openBlock(), createElementBlock("button", {
|
|
320
|
+
key: 0,
|
|
321
|
+
type: "button",
|
|
322
|
+
class: normalizeClass(["as-filter-value-help-filters-toggle", { "as-filter-value-help-filters-toggle-active": showFilters.value }]),
|
|
323
|
+
title: showFilters.value ? "Hide filters" : "Show filters",
|
|
324
|
+
onClick: _cache[2] || (_cache[2] = ($event) => showFilters.value = !showFilters.value)
|
|
325
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("span", {
|
|
326
|
+
class: "i-as-filter",
|
|
327
|
+
"aria-hidden": "true"
|
|
328
|
+
}, null, -1)])], 10, _hoisted_6$1)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(totalCount.value) + " records ", 1)])]),
|
|
329
|
+
unref(info) && showFilters.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
330
|
+
createVNode(as_filters_default),
|
|
331
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "as-spacer" }, null, -1)),
|
|
332
|
+
hasActiveFilters.value ? (openBlock(), createElementBlock("button", {
|
|
333
|
+
key: 0,
|
|
334
|
+
type: "button",
|
|
335
|
+
class: "as-filter-dialog-clear-all",
|
|
336
|
+
onClick: clearAllFilters
|
|
337
|
+
}, " Clear all ")) : createCommentVNode("v-if", true)
|
|
338
|
+
])) : createCommentVNode("v-if", true),
|
|
339
|
+
createCommentVNode(" Same window-table chrome for both branches. The enum branch's\n in-memory state was provided into context above via\n `provideTableContext`, so `<AsWindowTable>`'s `useTableContext()`\n resolves identically to the FK branch's `useTable(...)`-provided\n state. `select=\"multi\"` is the rendering-side source of truth (the\n `select` knob moved off the orchestrator/state during the actions\n refactor), so the checkbox column renders for value picking. "),
|
|
340
|
+
unref(innerState) ? (openBlock(), createBlock(as_window_table_default, {
|
|
341
|
+
key: 1,
|
|
342
|
+
select: "multi",
|
|
343
|
+
"column-menu": {
|
|
344
|
+
sort: true,
|
|
345
|
+
filters: !!unref(info),
|
|
346
|
+
hide: false
|
|
347
|
+
}
|
|
348
|
+
}, null, 8, ["column-menu"])) : createCommentVNode("v-if", true),
|
|
349
|
+
createCommentVNode(" FK only: nested filter / config dialogs for the inner table's\n column menu. Enum's column menu has filters/hide disabled, so\n the dialogs would never open. "),
|
|
350
|
+
unref(info) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(as_filter_dialog_default), createVNode(as_config_dialog_default)], 64)) : createCommentVNode("v-if", true)
|
|
351
|
+
]);
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/components/defaults/as-filter-dialog.vue?vue&type=script&setup=true&lang.ts
|
|
357
|
+
const _hoisted_1 = { class: "as-filter-dialog-header" };
|
|
358
|
+
const _hoisted_2 = { class: "as-filter-dialog-title-value" };
|
|
359
|
+
const _hoisted_3 = {
|
|
360
|
+
key: 1,
|
|
361
|
+
class: "as-filter-dialog-body"
|
|
362
|
+
};
|
|
363
|
+
const _hoisted_4 = {
|
|
364
|
+
key: 2,
|
|
365
|
+
class: "as-filter-dialog-chips-bar"
|
|
366
|
+
};
|
|
367
|
+
const _hoisted_5 = { class: "as-filter-dialog-chips-header" };
|
|
368
|
+
const _hoisted_6 = { class: "as-filter-dialog-chips-count" };
|
|
369
|
+
const _hoisted_7 = { class: "as-filter-dialog-chips" };
|
|
370
|
+
const _hoisted_8 = ["onClick"];
|
|
371
|
+
const _hoisted_9 = {
|
|
372
|
+
key: 0,
|
|
373
|
+
class: "as-filter-dialog-chips-more"
|
|
374
|
+
};
|
|
375
|
+
const CHIP_PREVIEW_LIMIT = 10;
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/components/defaults/as-filter-dialog.vue
|
|
378
|
+
var as_filter_dialog_default = /* @__PURE__ */ defineComponent({
|
|
379
|
+
__name: "as-filter-dialog",
|
|
380
|
+
setup(__props) {
|
|
381
|
+
const { state } = useTableContext();
|
|
382
|
+
const isOpen = computed({
|
|
383
|
+
get: () => state.filterDialogColumn.value !== null,
|
|
384
|
+
set: (val) => {
|
|
385
|
+
if (!val) state.closeFilterDialog();
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
const column = computed(() => state.filterDialogColumn.value);
|
|
389
|
+
const hasValueHelp = computed(() => !!column.value && (!!column.value.valueHelpInfo || column.value.options != null && column.value.options.length > 0));
|
|
390
|
+
const defCondition = computed(() => column.value ? defaultCondition(columnFilterType(column.value.type)) : "eq");
|
|
391
|
+
const valueHelpConditions = ref([]);
|
|
392
|
+
const freeConditions = ref([]);
|
|
393
|
+
const activeTab = ref("value-help");
|
|
394
|
+
watch(column, (col) => {
|
|
395
|
+
if (!col) return;
|
|
396
|
+
const existing = state.filters.value[col.path] ?? [];
|
|
397
|
+
if (hasValueHelp.value) {
|
|
398
|
+
valueHelpConditions.value = existing.filter(isSimpleEq);
|
|
399
|
+
freeConditions.value = existing.filter((c) => !isSimpleEq(c));
|
|
400
|
+
} else {
|
|
401
|
+
valueHelpConditions.value = [];
|
|
402
|
+
freeConditions.value = existing.length > 0 ? [...existing] : [];
|
|
403
|
+
}
|
|
404
|
+
if (freeConditions.value.length === 0) freeConditions.value = [{
|
|
405
|
+
type: defCondition.value,
|
|
406
|
+
value: []
|
|
407
|
+
}];
|
|
408
|
+
activeTab.value = hasValueHelp.value ? "value-help" : "conditions";
|
|
409
|
+
});
|
|
410
|
+
const chips = computed(() => {
|
|
411
|
+
const result = [];
|
|
412
|
+
valueHelpConditions.value.forEach((c, i) => {
|
|
413
|
+
if (isFilled(c)) result.push({
|
|
414
|
+
key: `vh:${i}:${String(c.value[0] ?? "")}`,
|
|
415
|
+
label: formatFilterCondition(c),
|
|
416
|
+
bucket: "value-help",
|
|
417
|
+
index: i
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
freeConditions.value.forEach((c, i) => {
|
|
421
|
+
if (isFilled(c)) result.push({
|
|
422
|
+
key: `fc:${i}:${c.type}:${String(c.value[0] ?? "")}`,
|
|
423
|
+
label: formatFilterCondition(c),
|
|
424
|
+
bucket: "free",
|
|
425
|
+
index: i
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
return result;
|
|
429
|
+
});
|
|
430
|
+
const visibleChips = computed(() => chips.value.slice(0, CHIP_PREVIEW_LIMIT));
|
|
431
|
+
const hiddenChipCount = computed(() => Math.max(0, chips.value.length - CHIP_PREVIEW_LIMIT));
|
|
432
|
+
const filledFreeCount = computed(() => {
|
|
433
|
+
let n = 0;
|
|
434
|
+
for (const c of freeConditions.value) if (isFilled(c)) n++;
|
|
435
|
+
return n;
|
|
436
|
+
});
|
|
437
|
+
function removeChip(chip) {
|
|
438
|
+
if (chip.bucket === "value-help") valueHelpConditions.value = valueHelpConditions.value.filter((_, i) => i !== chip.index);
|
|
439
|
+
else {
|
|
440
|
+
const next = freeConditions.value.filter((_, i) => i !== chip.index);
|
|
441
|
+
freeConditions.value = next.length > 0 ? next : [{
|
|
442
|
+
type: defCondition.value,
|
|
443
|
+
value: []
|
|
444
|
+
}];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function clearAll() {
|
|
448
|
+
valueHelpConditions.value = [];
|
|
449
|
+
freeConditions.value = [{
|
|
450
|
+
type: defCondition.value,
|
|
451
|
+
value: []
|
|
452
|
+
}];
|
|
453
|
+
}
|
|
454
|
+
function onApply() {
|
|
455
|
+
if (!column.value) return;
|
|
456
|
+
const merged = [...valueHelpConditions.value, ...freeConditions.value.filter(isFilled)];
|
|
457
|
+
if (merged.length > 0) state.setFieldFilter(column.value.path, merged);
|
|
458
|
+
else state.removeFieldFilter(column.value.path);
|
|
459
|
+
state.closeFilterDialog();
|
|
460
|
+
}
|
|
461
|
+
function onCancel() {
|
|
462
|
+
state.closeFilterDialog();
|
|
463
|
+
}
|
|
464
|
+
function focusActiveTabContent() {
|
|
465
|
+
const scope = document.querySelector(".as-filter-dialog-content [role='tabpanel'][data-state='active']") ?? document.querySelector(".as-filter-dialog-content");
|
|
466
|
+
if (!scope) return;
|
|
467
|
+
const search = scope.querySelector(".as-filter-value-help-search");
|
|
468
|
+
if (search) {
|
|
469
|
+
search.focus();
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const tbody = scope.querySelector("tbody[tabindex='0']");
|
|
473
|
+
if (tbody) {
|
|
474
|
+
tbody.focus();
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
scope.querySelector("input, select, textarea, [tabindex]:not([tabindex='-1'])")?.focus();
|
|
478
|
+
}
|
|
479
|
+
const { onDialogKeydown, focusActiveTabAfterMount } = useDialogTabKeyboard({
|
|
480
|
+
activeTab,
|
|
481
|
+
tabOrder: ["value-help", "conditions"],
|
|
482
|
+
isAvailable: (t) => t === "value-help" ? hasValueHelp.value : true,
|
|
483
|
+
focusActiveTab: focusActiveTabContent
|
|
484
|
+
});
|
|
485
|
+
function onOpenAutoFocus(event) {
|
|
486
|
+
event.preventDefault();
|
|
487
|
+
focusActiveTabAfterMount();
|
|
488
|
+
}
|
|
489
|
+
return (_ctx, _cache) => {
|
|
490
|
+
return openBlock(), createBlock(unref(DialogRoot), {
|
|
491
|
+
open: isOpen.value,
|
|
492
|
+
"onUpdate:open": _cache[4] || (_cache[4] = ($event) => isOpen.value = $event)
|
|
493
|
+
}, {
|
|
494
|
+
default: withCtx(() => [createVNode(unref(DialogPortal), null, {
|
|
495
|
+
default: withCtx(() => [createVNode(unref(DialogOverlay), { class: "as-filter-dialog-overlay" }), createVNode(unref(DialogContent), {
|
|
496
|
+
class: normalizeClass(["as-filter-dialog-content", { "as-filter-dialog-has-value-help": hasValueHelp.value }]),
|
|
497
|
+
onOpenAutoFocus,
|
|
498
|
+
onKeydown: unref(onDialogKeydown)
|
|
499
|
+
}, {
|
|
500
|
+
default: withCtx(() => [
|
|
501
|
+
createElementVNode("div", _hoisted_1, [createVNode(unref(DialogTitle), { class: "as-filter-dialog-title" }, {
|
|
502
|
+
default: withCtx(() => [_cache[5] || (_cache[5] = createElementVNode("span", { class: "as-filter-dialog-title-label" }, "Filter", -1)), createElementVNode("span", _hoisted_2, toDisplayString(column.value?.label), 1)]),
|
|
503
|
+
_: 1
|
|
504
|
+
}), createVNode(unref(DialogClose), {
|
|
505
|
+
class: "as-filter-dialog-close",
|
|
506
|
+
"aria-label": "Close"
|
|
507
|
+
}, {
|
|
508
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [createElementVNode("span", {
|
|
509
|
+
class: "i-as-close",
|
|
510
|
+
"aria-hidden": "true"
|
|
511
|
+
}, null, -1)])]),
|
|
512
|
+
_: 1
|
|
513
|
+
})]),
|
|
514
|
+
column.value && hasValueHelp.value ? (openBlock(), createBlock(unref(TabsRoot), {
|
|
515
|
+
key: 0,
|
|
516
|
+
modelValue: activeTab.value,
|
|
517
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => activeTab.value = $event),
|
|
518
|
+
class: "as-filter-dialog-tabs"
|
|
519
|
+
}, {
|
|
520
|
+
default: withCtx(() => [
|
|
521
|
+
createVNode(unref(TabsList), { class: "as-config-tabs-list" }, {
|
|
522
|
+
default: withCtx(() => [createVNode(unref(TabsTrigger), {
|
|
523
|
+
value: "value-help",
|
|
524
|
+
class: "as-config-tab-trigger"
|
|
525
|
+
}, {
|
|
526
|
+
default: withCtx(() => [_cache[7] || (_cache[7] = createTextVNode(" Values ", -1)), valueHelpConditions.value.length > 0 ? (openBlock(), createElementBlock("span", {
|
|
527
|
+
key: 0,
|
|
528
|
+
class: normalizeClass(["as-config-tab-count", { "as-config-tab-count-active": activeTab.value === "value-help" }])
|
|
529
|
+
}, toDisplayString(valueHelpConditions.value.length), 3)) : createCommentVNode("v-if", true)]),
|
|
530
|
+
_: 1
|
|
531
|
+
}), createVNode(unref(TabsTrigger), {
|
|
532
|
+
value: "conditions",
|
|
533
|
+
class: "as-config-tab-trigger"
|
|
534
|
+
}, {
|
|
535
|
+
default: withCtx(() => [_cache[8] || (_cache[8] = createTextVNode(" Conditions ", -1)), filledFreeCount.value > 0 ? (openBlock(), createElementBlock("span", {
|
|
536
|
+
key: 0,
|
|
537
|
+
class: normalizeClass(["as-config-tab-count", { "as-config-tab-count-active": activeTab.value === "conditions" }])
|
|
538
|
+
}, toDisplayString(filledFreeCount.value), 3)) : createCommentVNode("v-if", true)]),
|
|
539
|
+
_: 1
|
|
540
|
+
})]),
|
|
541
|
+
_: 1
|
|
542
|
+
}),
|
|
543
|
+
createVNode(unref(TabsContent), {
|
|
544
|
+
value: "value-help",
|
|
545
|
+
class: "as-filter-dialog-tab-content"
|
|
546
|
+
}, {
|
|
547
|
+
default: withCtx(() => [createVNode(as_filter_value_help_default, {
|
|
548
|
+
column: column.value,
|
|
549
|
+
modelValue: valueHelpConditions.value,
|
|
550
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => valueHelpConditions.value = $event)
|
|
551
|
+
}, null, 8, ["column", "modelValue"])]),
|
|
552
|
+
_: 1
|
|
553
|
+
}),
|
|
554
|
+
createVNode(unref(TabsContent), {
|
|
555
|
+
value: "conditions",
|
|
556
|
+
class: "as-filter-dialog-tab-content as-filter-dialog-tab-conditions"
|
|
557
|
+
}, {
|
|
558
|
+
default: withCtx(() => [createVNode(as_filter_conditions_default, {
|
|
559
|
+
column: column.value,
|
|
560
|
+
modelValue: freeConditions.value,
|
|
561
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => freeConditions.value = $event)
|
|
562
|
+
}, null, 8, ["column", "modelValue"])]),
|
|
563
|
+
_: 1
|
|
564
|
+
})
|
|
565
|
+
]),
|
|
566
|
+
_: 1
|
|
567
|
+
}, 8, ["modelValue"])) : column.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(as_filter_conditions_default, {
|
|
568
|
+
column: column.value,
|
|
569
|
+
modelValue: freeConditions.value,
|
|
570
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => freeConditions.value = $event)
|
|
571
|
+
}, null, 8, ["column", "modelValue"])])) : createCommentVNode("v-if", true),
|
|
572
|
+
chips.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [createElementVNode("div", _hoisted_5, [createElementVNode("span", null, [createElementVNode("span", _hoisted_6, toDisplayString(chips.value.length), 1), createTextVNode(" " + toDisplayString(chips.value.length === 1 ? "condition" : "conditions") + " applied ", 1)]), createElementVNode("button", {
|
|
573
|
+
type: "button",
|
|
574
|
+
class: "as-filter-dialog-clear-all",
|
|
575
|
+
onClick: clearAll
|
|
576
|
+
}, " Clear all ")]), createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleChips.value, (chip) => {
|
|
577
|
+
return openBlock(), createElementBlock("span", {
|
|
578
|
+
key: chip.key,
|
|
579
|
+
class: "as-filter-dialog-chip"
|
|
580
|
+
}, [createTextVNode(toDisplayString(chip.label) + " ", 1), createElementVNode("button", {
|
|
581
|
+
type: "button",
|
|
582
|
+
class: "as-filter-dialog-chip-remove",
|
|
583
|
+
"aria-label": "Remove",
|
|
584
|
+
onClick: ($event) => removeChip(chip)
|
|
585
|
+
}, [..._cache[9] || (_cache[9] = [createElementVNode("span", {
|
|
586
|
+
class: "i-as-close",
|
|
587
|
+
"aria-hidden": "true"
|
|
588
|
+
}, null, -1)])], 8, _hoisted_8)]);
|
|
589
|
+
}), 128)), hiddenChipCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_9, " +" + toDisplayString(hiddenChipCount.value) + " more ", 1)) : createCommentVNode("v-if", true)])])) : createCommentVNode("v-if", true),
|
|
590
|
+
createElementVNode("div", { class: "as-filter-dialog-footer" }, [createElementVNode("div", { class: "as-filter-dialog-footer-right" }, [createElementVNode("button", {
|
|
591
|
+
type: "button",
|
|
592
|
+
class: "as-filter-btn",
|
|
593
|
+
onClick: onCancel
|
|
594
|
+
}, "Cancel"), createElementVNode("button", {
|
|
595
|
+
type: "button",
|
|
596
|
+
class: "as-filter-btn-apply",
|
|
597
|
+
onClick: onApply
|
|
598
|
+
}, "Apply")])])
|
|
599
|
+
]),
|
|
600
|
+
_: 1
|
|
601
|
+
}, 8, ["class", "onKeydown"])]),
|
|
602
|
+
_: 1
|
|
603
|
+
})]),
|
|
604
|
+
_: 1
|
|
605
|
+
}, 8, ["open"]);
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
//#endregion
|
|
610
|
+
export { useTableNavBridge as n, as_filter_dialog_default as t };
|