@opengis/filter 0.1.10 → 0.1.12
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/components/filter/filter.vue.d.ts +6 -3
- package/dist/components/filter/filter.vue.d.ts.map +1 -1
- package/dist/components/filter/layouts/inline-filter-layout.vue.d.ts.map +1 -1
- package/dist/components/filter/layouts/popover-filter-layout.vue.d.ts +5 -2
- package/dist/components/filter/layouts/popover-filter-layout.vue.d.ts.map +1 -1
- package/dist/components/filter/layouts/popover-inline-filter-layout.vue.d.ts +51 -0
- package/dist/components/filter/layouts/popover-inline-filter-layout.vue.d.ts.map +1 -0
- package/dist/components/filter-field/fields/button-field.vue.d.ts +24 -0
- package/dist/components/filter-field/fields/button-field.vue.d.ts.map +1 -0
- package/dist/components/filter-field/fields/date-input-inline.vue.d.ts.map +1 -1
- package/dist/components/filter-field/fields/popover-field.vue.d.ts.map +1 -1
- package/dist/components/filter-field/layouts/vertical-layout.vue.d.ts.map +1 -1
- package/dist/composable/useLocale.d.ts.map +1 -1
- package/dist/composable/useStyle.d.ts +1 -1
- package/dist/composable/useStyle.d.ts.map +1 -1
- package/dist/index.js +1876 -1547
- package/dist/index.umd.cjs +1 -1
- package/dist/types/filter.d.ts +6 -2
- package/dist/types/filter.d.ts.map +1 -1
- package/package.json +57 -58
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createElementBlock as w, openBlock as
|
|
2
|
-
import { notify as
|
|
3
|
-
const
|
|
4
|
-
const v =
|
|
5
|
-
for (const [
|
|
6
|
-
v[
|
|
1
|
+
import { createElementBlock as w, openBlock as s, createElementVNode as r, defineComponent as W, ref as $, withModifiers as re, normalizeClass as U, createCommentVNode as V, toDisplayString as S, computed as L, watch as I, createStaticVNode as ze, Fragment as T, renderList as X, unref as e, createBlock as E, createVNode as Q, createTextVNode as G, withDirectives as Y, vShow as J, getCurrentInstance as Ne, vModelText as ee, onBeforeUnmount as pe, onMounted as ce, isRef as Pe, Teleport as ge, normalizeStyle as be, renderSlot as ue, nextTick as me, withCtx as oe, resolveDynamicComponent as ne, mergeProps as Z, toRaw as de, cloneVNode as Ye, useSlots as fe, reactive as We, withKeys as $e, createSlots as qe, normalizeProps as Qe, guardReactiveProps as He } from "vue";
|
|
2
|
+
import { notify as Ae } from "@opengis/core";
|
|
3
|
+
const te = (c, n) => {
|
|
4
|
+
const v = c.__vccOpts || c;
|
|
5
|
+
for (const [t, u] of n)
|
|
6
|
+
v[t] = u;
|
|
7
7
|
return v;
|
|
8
|
-
},
|
|
8
|
+
}, Ge = {}, Xe = {
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
10
|
width: "15px",
|
|
11
11
|
height: "24",
|
|
@@ -17,26 +17,26 @@ const G = (t, n) => {
|
|
|
17
17
|
"stroke-linejoin": "round",
|
|
18
18
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"
|
|
19
19
|
};
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
|
|
20
|
+
function Ze(c, n) {
|
|
21
|
+
return s(), w("svg", Xe, n[0] || (n[0] = [
|
|
22
|
+
r("path", {
|
|
23
23
|
stroke: "none",
|
|
24
24
|
d: "M0 0h24v24H0z",
|
|
25
25
|
fill: "none"
|
|
26
26
|
}, null, -1),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
])
|
|
27
|
+
r("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
|
|
28
|
+
r("path", { d: "M20 4v5h-5" }, null, -1)
|
|
29
|
+
]));
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const Je = /* @__PURE__ */ te(Ge, [["render", Ze]]), et = { class: "flex items-center justify-between w-full text-sm" }, tt = { class: "flex items-center cursor-pointer w-full" }, lt = {
|
|
32
32
|
key: 0,
|
|
33
33
|
width: "16",
|
|
34
34
|
height: "auto",
|
|
35
35
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
36
|
-
},
|
|
36
|
+
}, ot = ["value"], nt = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, at = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, rt = {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
|
|
39
|
-
},
|
|
39
|
+
}, he = /* @__PURE__ */ W({
|
|
40
40
|
__name: "list-item",
|
|
41
41
|
props: {
|
|
42
42
|
layout: {},
|
|
@@ -49,44 +49,44 @@ const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-ce
|
|
|
49
49
|
highlighted: { type: Boolean }
|
|
50
50
|
},
|
|
51
51
|
emits: ["itemClick"],
|
|
52
|
-
setup(
|
|
53
|
-
const
|
|
54
|
-
function
|
|
55
|
-
|
|
52
|
+
setup(c, { expose: n, emit: v }) {
|
|
53
|
+
const t = c, u = v;
|
|
54
|
+
function l() {
|
|
55
|
+
u("itemClick", t.value);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
return n({ el:
|
|
59
|
-
class: "flex items-center w-full rounded-
|
|
57
|
+
const g = $(null);
|
|
58
|
+
return n({ el: g }), (a, f) => (s(), w("div", {
|
|
59
|
+
class: "flex items-center w-full rounded-sm group hover:bg-gray-100",
|
|
60
60
|
ref_key: "el",
|
|
61
|
-
ref:
|
|
61
|
+
ref: g
|
|
62
62
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
r("div", et, [
|
|
64
|
+
r("div", tt, [
|
|
65
|
+
r("label", {
|
|
66
66
|
for: "radio-9740",
|
|
67
|
-
class:
|
|
68
|
-
["inline", "popover"].includes(
|
|
69
|
-
{ "bg-blue-100":
|
|
67
|
+
class: U([
|
|
68
|
+
["inline", "popover"].includes(a.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
|
|
69
|
+
{ "bg-blue-100": a.highlighted }
|
|
70
70
|
]),
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: re(l, ["stop", "prevent"])
|
|
72
72
|
}, [
|
|
73
|
-
|
|
74
|
-
class:
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
r("div", {
|
|
74
|
+
class: U(["w-[18px] h-[18px] border flex items-center justify-center", [
|
|
75
|
+
a.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
|
|
76
|
+
a.color ? `bg-[${a.color}] border-[#ffffff]` : a.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
|
|
77
77
|
]])
|
|
78
78
|
}, [
|
|
79
|
-
|
|
79
|
+
a.isSelected ? (s(), w("img", lt)) : V("", !0)
|
|
80
80
|
], 2),
|
|
81
|
-
|
|
81
|
+
r("input", {
|
|
82
82
|
type: "checkbox",
|
|
83
83
|
class: "hidden",
|
|
84
84
|
id: "radio-9740",
|
|
85
|
-
value:
|
|
86
|
-
}, null, 8,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
value: a.value
|
|
86
|
+
}, null, 8, ot),
|
|
87
|
+
r("div", nt, [
|
|
88
|
+
r("span", at, S(a.label ?? "Відсутні данні"), 1),
|
|
89
|
+
a.count ? (s(), w("div", rt, " (" + S(a.count) + ") ", 1)) : V("", !0)
|
|
90
90
|
])
|
|
91
91
|
], 2)
|
|
92
92
|
])
|
|
@@ -94,70 +94,70 @@ const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-ce
|
|
|
94
94
|
], 512));
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
function
|
|
97
|
+
function xe(c, n) {
|
|
98
98
|
const {
|
|
99
99
|
options: v = [],
|
|
100
|
-
limit:
|
|
101
|
-
} =
|
|
102
|
-
function
|
|
103
|
-
return Array.isArray(
|
|
100
|
+
limit: t = 20
|
|
101
|
+
} = c;
|
|
102
|
+
function u(h) {
|
|
103
|
+
return Array.isArray(h) ? h[0] : h;
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
107
|
-
const x =
|
|
108
|
-
return { autoValueKey:
|
|
105
|
+
const l = $(u(c.modelValue)), g = $(""), a = $(!1), f = $([]), y = $("id"), m = $("text"), d = $(!1), i = $(c.layout !== "popover" && v.length > t);
|
|
106
|
+
function C(h) {
|
|
107
|
+
const x = h.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((A) => A in x) ?? "id", F = ["text", "label", "name", "title"].find((A) => A in x) ?? "text";
|
|
108
|
+
return { autoValueKey: D, autoLabelKey: F };
|
|
109
109
|
}
|
|
110
110
|
if (v.length > 0) {
|
|
111
|
-
const
|
|
112
|
-
|
|
111
|
+
const h = C(v);
|
|
112
|
+
y.value = h.autoValueKey, m.value = h.autoLabelKey;
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
return
|
|
114
|
+
const k = L(() => {
|
|
115
|
+
const h = f.value;
|
|
116
|
+
return c.layout === "popover" || d.value ? h : h.slice(0, t);
|
|
117
117
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, { immediate: !0 }), f.value = [...v].sort((
|
|
121
|
-
function
|
|
122
|
-
return
|
|
118
|
+
I(() => c.modelValue, (h) => {
|
|
119
|
+
l.value = u(h);
|
|
120
|
+
}, { immediate: !0 }), f.value = [...v].sort((h, x) => c.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : c.sort === "name" ? String(h[m.value] ?? "").localeCompare(String(x[m.value] ?? "")) : 0);
|
|
121
|
+
function _(h) {
|
|
122
|
+
return l.value === h[y.value];
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
124
|
+
function o(h) {
|
|
125
|
+
l.value = h[y.value], n("update:modelValue", l.value), n("change", { name: c.name, value: l.value });
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
127
|
+
function b() {
|
|
128
|
+
l.value = void 0, n("update:modelValue", l.value), n("clear", c.name);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
130
|
+
function p() {
|
|
131
|
+
d.value = !d.value;
|
|
132
132
|
}
|
|
133
133
|
return {
|
|
134
|
-
innerValue:
|
|
135
|
-
searchTerm:
|
|
136
|
-
filteredOptions:
|
|
137
|
-
isSelected:
|
|
138
|
-
selectItem:
|
|
139
|
-
clear:
|
|
140
|
-
toggleShowAll:
|
|
141
|
-
isReqProc:
|
|
142
|
-
showAll:
|
|
143
|
-
isEnableShowAll:
|
|
144
|
-
labelKey:
|
|
145
|
-
valueKey:
|
|
134
|
+
innerValue: l,
|
|
135
|
+
searchTerm: g,
|
|
136
|
+
filteredOptions: k,
|
|
137
|
+
isSelected: _,
|
|
138
|
+
selectItem: o,
|
|
139
|
+
clear: b,
|
|
140
|
+
toggleShowAll: p,
|
|
141
|
+
isReqProc: a,
|
|
142
|
+
showAll: d,
|
|
143
|
+
isEnableShowAll: i,
|
|
144
|
+
labelKey: m,
|
|
145
|
+
valueKey: y,
|
|
146
146
|
allOptions: f
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const st = {}, it = {
|
|
150
150
|
class: "w-48 mx-auto",
|
|
151
151
|
viewBox: "0 0 178 90",
|
|
152
152
|
fill: "none",
|
|
153
153
|
xmlns: "http://www.w3.org/2000/svg"
|
|
154
154
|
};
|
|
155
|
-
function
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
])
|
|
155
|
+
function ut(c, n) {
|
|
156
|
+
return s(), w("svg", it, n[0] || (n[0] = [
|
|
157
|
+
ze('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
158
|
+
]));
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const we = /* @__PURE__ */ te(st, [["render", ut]]), dt = {}, ct = {
|
|
161
161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
162
162
|
width: "24",
|
|
163
163
|
height: "24",
|
|
@@ -169,17 +169,17 @@ const ge = /* @__PURE__ */ G(tt, [["render", at]]), nt = {}, ot = {
|
|
|
169
169
|
"stroke-linejoin": "round",
|
|
170
170
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
|
|
171
171
|
};
|
|
172
|
-
function
|
|
173
|
-
return
|
|
174
|
-
|
|
172
|
+
function ft(c, n) {
|
|
173
|
+
return s(), w("svg", ct, n[0] || (n[0] = [
|
|
174
|
+
r("path", {
|
|
175
175
|
stroke: "none",
|
|
176
176
|
d: "M0 0h24v24H0z",
|
|
177
177
|
fill: "none"
|
|
178
178
|
}, null, -1),
|
|
179
|
-
|
|
180
|
-
])
|
|
179
|
+
r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
180
|
+
]));
|
|
181
181
|
}
|
|
182
|
-
const
|
|
182
|
+
const ve = /* @__PURE__ */ te(dt, [["render", ft]]), pt = {}, mt = {
|
|
183
183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
184
184
|
width: "24",
|
|
185
185
|
height: "24",
|
|
@@ -191,26 +191,26 @@ const de = /* @__PURE__ */ G(nt, [["render", rt]]), st = {}, it = {
|
|
|
191
191
|
"stroke-linejoin": "round",
|
|
192
192
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
|
|
193
193
|
};
|
|
194
|
-
function
|
|
195
|
-
return
|
|
196
|
-
|
|
194
|
+
function vt(c, n) {
|
|
195
|
+
return s(), w("svg", mt, n[0] || (n[0] = [
|
|
196
|
+
r("path", {
|
|
197
197
|
stroke: "none",
|
|
198
198
|
d: "M0 0h24v24H0z",
|
|
199
199
|
fill: "none"
|
|
200
200
|
}, null, -1),
|
|
201
|
-
|
|
202
|
-
])
|
|
201
|
+
r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
202
|
+
]));
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const ke = /* @__PURE__ */ te(pt, [["render", vt]]), yt = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "w-full"
|
|
207
|
-
},
|
|
207
|
+
}, gt = { class: "flex flex-col items-center justify-center p-5 text-center" }, bt = {
|
|
208
208
|
key: 0,
|
|
209
209
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
210
|
-
},
|
|
210
|
+
}, ht = {
|
|
211
211
|
key: 1,
|
|
212
212
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
213
|
-
},
|
|
213
|
+
}, xt = /* @__PURE__ */ W({
|
|
214
214
|
__name: "radio",
|
|
215
215
|
props: {
|
|
216
216
|
id: {},
|
|
@@ -238,161 +238,161 @@ const be = /* @__PURE__ */ G(st, [["render", ut]]), ct = {
|
|
|
238
238
|
ua: {}
|
|
239
239
|
},
|
|
240
240
|
emits: ["update:modelValue", "change", "clear"],
|
|
241
|
-
setup(
|
|
242
|
-
const
|
|
243
|
-
innerValue:
|
|
244
|
-
filteredOptions:
|
|
241
|
+
setup(c, { expose: n, emit: v }) {
|
|
242
|
+
const t = c, u = $(null), l = v, {
|
|
243
|
+
innerValue: g,
|
|
244
|
+
filteredOptions: a,
|
|
245
245
|
isSelected: f,
|
|
246
|
-
selectItem:
|
|
247
|
-
clear:
|
|
248
|
-
toggleShowAll:
|
|
249
|
-
isReqProc:
|
|
250
|
-
showAll:
|
|
251
|
-
isEnableShowAll:
|
|
252
|
-
labelKey:
|
|
253
|
-
valueKey:
|
|
254
|
-
allOptions:
|
|
255
|
-
} =
|
|
256
|
-
...
|
|
257
|
-
modelValue:
|
|
258
|
-
},
|
|
246
|
+
selectItem: y,
|
|
247
|
+
clear: m,
|
|
248
|
+
toggleShowAll: d,
|
|
249
|
+
isReqProc: i,
|
|
250
|
+
showAll: C,
|
|
251
|
+
isEnableShowAll: k,
|
|
252
|
+
labelKey: _,
|
|
253
|
+
valueKey: o,
|
|
254
|
+
allOptions: b
|
|
255
|
+
} = xe({
|
|
256
|
+
...t,
|
|
257
|
+
modelValue: t.modelValue ?? t.default ?? ""
|
|
258
|
+
}, l);
|
|
259
259
|
return n({
|
|
260
|
-
clear:
|
|
261
|
-
inputTextRef:
|
|
262
|
-
}),
|
|
263
|
-
() =>
|
|
264
|
-
(
|
|
265
|
-
|
|
260
|
+
clear: m,
|
|
261
|
+
inputTextRef: u
|
|
262
|
+
}), I(
|
|
263
|
+
() => t.modelValue,
|
|
264
|
+
(p) => {
|
|
265
|
+
p === void 0 && (g.value = void 0);
|
|
266
266
|
}
|
|
267
|
-
), (
|
|
268
|
-
class:
|
|
267
|
+
), (p, h) => (s(), w("div", {
|
|
268
|
+
class: U([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
|
|
269
269
|
}, [
|
|
270
|
-
|
|
271
|
-
class:
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
r("div", {
|
|
271
|
+
class: U([
|
|
272
|
+
p.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
273
|
+
p.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
274
274
|
])
|
|
275
275
|
}, [
|
|
276
|
-
(
|
|
277
|
-
layout:
|
|
278
|
-
key: x[e(
|
|
276
|
+
(s(!0), w(T, null, X(e(a), (x) => (s(), E(he, {
|
|
277
|
+
layout: p.layout,
|
|
278
|
+
key: x[e(o)],
|
|
279
279
|
count: x.count,
|
|
280
|
-
label: x[e(
|
|
280
|
+
label: x[e(_)],
|
|
281
281
|
color: x.color,
|
|
282
282
|
type: "radio",
|
|
283
|
-
value: x[e(
|
|
283
|
+
value: x[e(o)],
|
|
284
284
|
"is-selected": e(f)(x),
|
|
285
|
-
onItemClick: (
|
|
285
|
+
onItemClick: (D) => e(y)(x)
|
|
286
286
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
|
287
287
|
], 2),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
288
|
+
p.type === "select" && e(a).length === 0 && !e(i) ? (s(), w("div", yt, [
|
|
289
|
+
r("div", gt, [
|
|
290
|
+
Q(we),
|
|
291
|
+
h[4] || (h[4] = r("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
292
|
+
r("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
293
|
+
r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
294
294
|
], -1))
|
|
295
295
|
])
|
|
296
|
-
])) :
|
|
297
|
-
|
|
298
|
-
!e(
|
|
296
|
+
])) : V("", !0),
|
|
297
|
+
p.layout !== "popover" && p.type !== "select" ? (s(), w(T, { key: 1 }, [
|
|
298
|
+
!e(C) && e(k) ? (s(), w("div", {
|
|
299
299
|
key: 0,
|
|
300
|
-
onClick:
|
|
301
|
-
(...x) => e(
|
|
300
|
+
onClick: h[0] || (h[0] = //@ts-ignore
|
|
301
|
+
(...x) => e(d) && e(d)(...x)),
|
|
302
302
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
303
303
|
}, [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
])) :
|
|
307
|
-
e(
|
|
304
|
+
h[5] || (h[5] = G(" Показати більше ", -1)),
|
|
305
|
+
Q(ve)
|
|
306
|
+
])) : V("", !0),
|
|
307
|
+
e(C) ? (s(), w("div", {
|
|
308
308
|
key: 1,
|
|
309
|
-
onClick:
|
|
310
|
-
(...x) => e(
|
|
309
|
+
onClick: h[1] || (h[1] = //@ts-ignore
|
|
310
|
+
(...x) => e(d) && e(d)(...x)),
|
|
311
311
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
312
312
|
}, [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
])) :
|
|
316
|
-
], 64)) :
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
h[6] || (h[6] = G(" Показати менше ", -1)),
|
|
314
|
+
Q(ke)
|
|
315
|
+
])) : V("", !0)
|
|
316
|
+
], 64)) : V("", !0),
|
|
317
|
+
p.cleanable ? (s(), w(T, { key: 2 }, [
|
|
318
|
+
p.layout === "inline" ? (s(), w("div", bt, [
|
|
319
|
+
G(S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(b).length) + " обрано ", 1),
|
|
320
|
+
Y(r("button", {
|
|
321
321
|
class: "text-gray-600 hover:text-gray-800",
|
|
322
|
-
onClick:
|
|
323
|
-
(...x) => e(
|
|
322
|
+
onClick: h[2] || (h[2] = //@ts-ignore
|
|
323
|
+
(...x) => e(m) && e(m)(...x))
|
|
324
324
|
}, " Очистити ", 512), [
|
|
325
|
-
[
|
|
325
|
+
[J, e(g) !== "" && e(g) !== void 0]
|
|
326
326
|
])
|
|
327
|
-
])) :
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
])) : V("", !0),
|
|
328
|
+
p.layout === "popover" ? (s(), w("div", ht, [
|
|
329
|
+
r("span", null, S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(b).length) + " обрано", 1),
|
|
330
|
+
Y(r("button", {
|
|
331
331
|
class: "text-gray-600 hover:text-gray-800",
|
|
332
|
-
onClick:
|
|
333
|
-
(...x) => e(
|
|
332
|
+
onClick: h[3] || (h[3] = //@ts-ignore
|
|
333
|
+
(...x) => e(m) && e(m)(...x))
|
|
334
334
|
}, " Очистити ", 512), [
|
|
335
|
-
[
|
|
335
|
+
[J, e(g) !== "" && e(g) !== void 0]
|
|
336
336
|
])
|
|
337
|
-
])) :
|
|
338
|
-
], 64)) :
|
|
337
|
+
])) : V("", !0)
|
|
338
|
+
], 64)) : V("", !0)
|
|
339
339
|
], 2));
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
-
function
|
|
342
|
+
function Fe(c, n) {
|
|
343
343
|
const {
|
|
344
344
|
options: v = [],
|
|
345
|
-
limit:
|
|
346
|
-
} =
|
|
347
|
-
function
|
|
348
|
-
return Array.isArray(
|
|
345
|
+
limit: t = 20
|
|
346
|
+
} = c;
|
|
347
|
+
function u(h) {
|
|
348
|
+
return Array.isArray(h) ? h : h ? [h] : [];
|
|
349
349
|
}
|
|
350
|
-
const
|
|
351
|
-
function
|
|
352
|
-
const x =
|
|
353
|
-
return { autoValueKey:
|
|
350
|
+
const l = $(u(c.modelValue)), g = $(""), a = $(!1), f = $([]), y = $("id"), m = $("text"), d = $(!1), i = $(c.layout !== "popover" && v.length > t);
|
|
351
|
+
function C(h) {
|
|
352
|
+
const x = h.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((A) => A in x) ?? "id", F = ["text", "label", "name", "title"].find((A) => A in x) ?? "text";
|
|
353
|
+
return { autoValueKey: D, autoLabelKey: F };
|
|
354
354
|
}
|
|
355
355
|
if (v.length > 0) {
|
|
356
|
-
const
|
|
357
|
-
|
|
356
|
+
const h = C(v);
|
|
357
|
+
y.value = h.autoValueKey, m.value = h.autoLabelKey;
|
|
358
358
|
}
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
return
|
|
359
|
+
const k = L(() => {
|
|
360
|
+
const h = f.value;
|
|
361
|
+
return c.layout === "popover" || d.value ? h : h.slice(0, t);
|
|
362
362
|
});
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}, { immediate: !0 }), f.value = [...v].sort((
|
|
366
|
-
function
|
|
367
|
-
return
|
|
363
|
+
I(() => c.modelValue, (h) => {
|
|
364
|
+
l.value = u(h);
|
|
365
|
+
}, { immediate: !0 }), f.value = [...v].sort((h, x) => c.sort === "count" ? x.count && h.count ? x.count - h.count : 0 : c.sort === "name" ? String(h[m.value]).localeCompare(String(x[m.value])) : 0);
|
|
366
|
+
function _(h) {
|
|
367
|
+
return l.value && l.value.includes(h[y.value]);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const x =
|
|
371
|
-
|
|
369
|
+
function o(h) {
|
|
370
|
+
const x = l.value.includes(h[y.value]);
|
|
371
|
+
l.value = x ? l.value.filter((D) => D !== h[y.value]) : [...l.value, h[y.value]], n("update:modelValue", l.value), n("change", { name: c.name, value: l.value });
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
373
|
+
function b() {
|
|
374
|
+
l.value = [], n("update:modelValue", l.value), n("clear", c.name);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
376
|
+
function p() {
|
|
377
|
+
d.value = !d.value;
|
|
378
378
|
}
|
|
379
379
|
return {
|
|
380
|
-
innerValue:
|
|
381
|
-
searchTerm:
|
|
382
|
-
filteredOptions:
|
|
383
|
-
isSelected:
|
|
384
|
-
selectItem:
|
|
385
|
-
clear:
|
|
386
|
-
toggleShowAll:
|
|
387
|
-
isReqProc:
|
|
388
|
-
showAll:
|
|
389
|
-
isEnableShowAll:
|
|
390
|
-
labelKey:
|
|
391
|
-
valueKey:
|
|
380
|
+
innerValue: l,
|
|
381
|
+
searchTerm: g,
|
|
382
|
+
filteredOptions: k,
|
|
383
|
+
isSelected: _,
|
|
384
|
+
selectItem: o,
|
|
385
|
+
clear: b,
|
|
386
|
+
toggleShowAll: p,
|
|
387
|
+
isReqProc: a,
|
|
388
|
+
showAll: d,
|
|
389
|
+
isEnableShowAll: i,
|
|
390
|
+
labelKey: m,
|
|
391
|
+
valueKey: y,
|
|
392
392
|
allOptions: f
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const Se = {
|
|
396
396
|
en: {
|
|
397
397
|
search: "Search",
|
|
398
398
|
more: "Show more",
|
|
@@ -428,24 +428,24 @@ const Ce = {
|
|
|
428
428
|
next: "Настпуний період"
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
|
-
function
|
|
432
|
-
const n =
|
|
433
|
-
return (
|
|
431
|
+
function wt(c) {
|
|
432
|
+
const n = c.split(".")[1], v = typeof window < "u" && window.localStorage ? localStorage.locale : null;
|
|
433
|
+
return (Se[v || navigator.language] || Se.uk)[n];
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
const
|
|
437
|
-
return
|
|
435
|
+
function se() {
|
|
436
|
+
const c = Ne();
|
|
437
|
+
return c.appContext.config.globalProperties.$i18n ? c.appContext.config.globalProperties.$t : wt;
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const kt = {
|
|
440
440
|
key: 0,
|
|
441
441
|
class: "w-full"
|
|
442
|
-
},
|
|
442
|
+
}, Ct = { class: "flex flex-col items-center justify-center p-5 text-center" }, _t = { class: "max-w-sm mx-auto mt-6" }, Vt = { class: "font-medium text-gray-800 dark:text-neutral-200" }, $t = {
|
|
443
443
|
key: 0,
|
|
444
444
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
445
|
-
},
|
|
445
|
+
}, At = {
|
|
446
446
|
key: 1,
|
|
447
447
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
448
|
-
},
|
|
448
|
+
}, Be = /* @__PURE__ */ W({
|
|
449
449
|
__name: "checkbox",
|
|
450
450
|
props: {
|
|
451
451
|
id: {},
|
|
@@ -473,105 +473,105 @@ const yt = {
|
|
|
473
473
|
ua: {}
|
|
474
474
|
},
|
|
475
475
|
emits: ["update:modelValue", "change", "clear"],
|
|
476
|
-
setup(
|
|
477
|
-
const
|
|
478
|
-
innerValue:
|
|
479
|
-
filteredOptions:
|
|
476
|
+
setup(c, { expose: n, emit: v }) {
|
|
477
|
+
const t = se(), u = c, l = v, {
|
|
478
|
+
innerValue: g,
|
|
479
|
+
filteredOptions: a,
|
|
480
480
|
isSelected: f,
|
|
481
|
-
selectItem:
|
|
482
|
-
clear:
|
|
483
|
-
toggleShowAll:
|
|
484
|
-
isReqProc:
|
|
485
|
-
showAll:
|
|
486
|
-
isEnableShowAll:
|
|
487
|
-
labelKey:
|
|
488
|
-
valueKey:
|
|
489
|
-
allOptions:
|
|
490
|
-
} =
|
|
491
|
-
...
|
|
492
|
-
modelValue:
|
|
493
|
-
},
|
|
494
|
-
return
|
|
495
|
-
() =>
|
|
496
|
-
(
|
|
497
|
-
|
|
481
|
+
selectItem: y,
|
|
482
|
+
clear: m,
|
|
483
|
+
toggleShowAll: d,
|
|
484
|
+
isReqProc: i,
|
|
485
|
+
showAll: C,
|
|
486
|
+
isEnableShowAll: k,
|
|
487
|
+
labelKey: _,
|
|
488
|
+
valueKey: o,
|
|
489
|
+
allOptions: b
|
|
490
|
+
} = Fe({
|
|
491
|
+
...u,
|
|
492
|
+
modelValue: u.modelValue
|
|
493
|
+
}, l);
|
|
494
|
+
return I(
|
|
495
|
+
() => u.modelValue,
|
|
496
|
+
(p) => {
|
|
497
|
+
p === void 0 && (g.value = []);
|
|
498
498
|
}
|
|
499
499
|
), n({
|
|
500
|
-
clear:
|
|
501
|
-
}), (
|
|
502
|
-
class:
|
|
500
|
+
clear: m
|
|
501
|
+
}), (p, h) => (s(), w("div", {
|
|
502
|
+
class: U([p.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
503
503
|
}, [
|
|
504
|
-
|
|
505
|
-
class:
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
r("div", {
|
|
505
|
+
class: U([
|
|
506
|
+
p.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
507
|
+
p.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
508
508
|
])
|
|
509
509
|
}, [
|
|
510
|
-
(
|
|
511
|
-
layout:
|
|
510
|
+
(s(!0), w(T, null, X(e(a), (x) => (s(), E(he, {
|
|
511
|
+
layout: p.layout,
|
|
512
512
|
count: x.count,
|
|
513
|
-
label: x[e(
|
|
513
|
+
label: x[e(_)],
|
|
514
514
|
color: x.color,
|
|
515
515
|
type: "checkbox",
|
|
516
|
-
value: x[e(
|
|
516
|
+
value: x[e(o)],
|
|
517
517
|
"is-selected": e(f)(x),
|
|
518
|
-
onItemClick: (
|
|
518
|
+
onItemClick: (D) => e(y)(x)
|
|
519
519
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
|
|
520
520
|
], 2),
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
521
|
+
p.type === "select" && e(a).length === 0 && !e(i) ? (s(), w("div", kt, [
|
|
522
|
+
r("div", Ct, [
|
|
523
|
+
Q(we),
|
|
524
|
+
r("div", _t, [
|
|
525
|
+
r("p", Vt, S(e(t)("filter.notfound")), 1),
|
|
526
|
+
h[4] || (h[4] = r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
|
|
527
527
|
])
|
|
528
528
|
])
|
|
529
|
-
])) :
|
|
530
|
-
|
|
531
|
-
!e(
|
|
529
|
+
])) : V("", !0),
|
|
530
|
+
p.layout !== "popover" && p.type !== "select" ? (s(), w(T, { key: 1 }, [
|
|
531
|
+
!e(C) && e(k) ? (s(), w("div", {
|
|
532
532
|
key: 0,
|
|
533
|
-
onClick:
|
|
534
|
-
(...x) => e(
|
|
533
|
+
onClick: h[0] || (h[0] = //@ts-ignore
|
|
534
|
+
(...x) => e(d) && e(d)(...x)),
|
|
535
535
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
536
536
|
}, [
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
])) :
|
|
540
|
-
e(
|
|
537
|
+
G(S(e(t)("filter.more")) + " ", 1),
|
|
538
|
+
Q(ve)
|
|
539
|
+
])) : V("", !0),
|
|
540
|
+
e(C) ? (s(), w("div", {
|
|
541
541
|
key: 1,
|
|
542
|
-
onClick:
|
|
543
|
-
(...x) => e(
|
|
542
|
+
onClick: h[1] || (h[1] = //@ts-ignore
|
|
543
|
+
(...x) => e(d) && e(d)(...x)),
|
|
544
544
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
545
545
|
}, [
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
])) :
|
|
549
|
-
], 64)) :
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
546
|
+
G(S(e(t)("filter.less")) + " ", 1),
|
|
547
|
+
Q(ke)
|
|
548
|
+
])) : V("", !0)
|
|
549
|
+
], 64)) : V("", !0),
|
|
550
|
+
p.cleanable ? (s(), w(T, { key: 2 }, [
|
|
551
|
+
p.layout === "inline" ? (s(), w("div", $t, [
|
|
552
|
+
G(S(e(g).length) + " / " + S(e(b).length) + " " + S(e(t)("filter.selected")) + " ", 1),
|
|
553
|
+
Y(r("button", {
|
|
554
554
|
class: "text-gray-600 hover:text-gray-800",
|
|
555
|
-
onClick:
|
|
556
|
-
(...x) => e(
|
|
557
|
-
},
|
|
558
|
-
[
|
|
555
|
+
onClick: h[2] || (h[2] = //@ts-ignore
|
|
556
|
+
(...x) => e(m) && e(m)(...x))
|
|
557
|
+
}, S(e(t)("filter.clear")), 513), [
|
|
558
|
+
[J, e(g).length !== 0]
|
|
559
559
|
])
|
|
560
|
-
])) :
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
560
|
+
])) : V("", !0),
|
|
561
|
+
p.layout === "popover" ? (s(), w("div", At, [
|
|
562
|
+
r("span", null, S(e(g).length) + " / " + S(e(b).length) + " " + S(e(t)("filter.selected")), 1),
|
|
563
|
+
Y(r("button", {
|
|
564
564
|
class: "text-gray-600 hover:text-gray-800",
|
|
565
|
-
onClick:
|
|
566
|
-
(...x) => e(
|
|
567
|
-
},
|
|
568
|
-
[
|
|
565
|
+
onClick: h[3] || (h[3] = //@ts-ignore
|
|
566
|
+
(...x) => e(m) && e(m)(...x))
|
|
567
|
+
}, S(e(t)("filter.clear")), 513), [
|
|
568
|
+
[J, e(g).length !== 0]
|
|
569
569
|
])
|
|
570
|
-
])) :
|
|
571
|
-
], 64)) :
|
|
570
|
+
])) : V("", !0)
|
|
571
|
+
], 64)) : V("", !0)
|
|
572
572
|
], 2));
|
|
573
573
|
}
|
|
574
|
-
}),
|
|
574
|
+
}), St = {}, Bt = {
|
|
575
575
|
xmlns: "http://www.w3.org/2000/svg",
|
|
576
576
|
width: "15px",
|
|
577
577
|
height: "15px",
|
|
@@ -583,18 +583,18 @@ const yt = {
|
|
|
583
583
|
"stroke-linejoin": "round",
|
|
584
584
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
585
585
|
};
|
|
586
|
-
function
|
|
587
|
-
return
|
|
588
|
-
|
|
586
|
+
function Dt(c, n) {
|
|
587
|
+
return s(), w("svg", Bt, n[0] || (n[0] = [
|
|
588
|
+
r("path", {
|
|
589
589
|
stroke: "none",
|
|
590
590
|
d: "M0 0h24v24H0z",
|
|
591
591
|
fill: "none"
|
|
592
592
|
}, null, -1),
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
])
|
|
593
|
+
r("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
|
|
594
|
+
r("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
595
|
+
]));
|
|
596
596
|
}
|
|
597
|
-
const
|
|
597
|
+
const Me = /* @__PURE__ */ te(St, [["render", Dt]]), jt = {}, Rt = {
|
|
598
598
|
xmlns: "http://www.w3.org/2000/svg",
|
|
599
599
|
viewBox: "0 0 24 24",
|
|
600
600
|
fill: "none",
|
|
@@ -606,24 +606,24 @@ const je = /* @__PURE__ */ G(wt, [["render", Vt]]), $t = {}, St = {
|
|
|
606
606
|
width: "15px",
|
|
607
607
|
height: "15px"
|
|
608
608
|
};
|
|
609
|
-
function
|
|
610
|
-
return
|
|
611
|
-
|
|
609
|
+
function Kt(c, n) {
|
|
610
|
+
return s(), w("svg", Rt, n[0] || (n[0] = [
|
|
611
|
+
r("path", {
|
|
612
612
|
stroke: "none",
|
|
613
613
|
d: "M0 0h24v24H0z",
|
|
614
614
|
fill: "none"
|
|
615
615
|
}, null, -1),
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
])
|
|
616
|
+
r("path", { d: "M18 6l-12 12" }, null, -1),
|
|
617
|
+
r("path", { d: "M6 6l12 12" }, null, -1)
|
|
618
|
+
]));
|
|
619
619
|
}
|
|
620
|
-
const
|
|
621
|
-
class
|
|
620
|
+
const Ce = /* @__PURE__ */ te(jt, [["render", Kt]]);
|
|
621
|
+
class Le {
|
|
622
622
|
static getWidthClass(n) {
|
|
623
|
-
return typeof n == "number" ? `max-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
|
|
623
|
+
return typeof n == "number" ? `max-w-[${n}px] min-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
const
|
|
626
|
+
const Ft = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Mt = ["placeholder"], Lt = /* @__PURE__ */ W({
|
|
627
627
|
__name: "text-input",
|
|
628
628
|
props: {
|
|
629
629
|
id: {},
|
|
@@ -651,81 +651,81 @@ const Dt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
651
651
|
ua: {}
|
|
652
652
|
},
|
|
653
653
|
emits: ["update:modelValue", "change", "clear"],
|
|
654
|
-
setup(
|
|
655
|
-
const v =
|
|
656
|
-
|
|
654
|
+
setup(c, { emit: n }) {
|
|
655
|
+
const v = c, t = $((v.placeholder || v.label || v.title || v.name || "search").toString()), u = n, l = $(v.modelValue?.toString() ?? "");
|
|
656
|
+
I(
|
|
657
657
|
() => v.modelValue,
|
|
658
|
-
(
|
|
659
|
-
|
|
658
|
+
(y) => {
|
|
659
|
+
y !== l.value && (l.value = y?.toString() ?? "");
|
|
660
660
|
}
|
|
661
661
|
);
|
|
662
|
-
let
|
|
663
|
-
function
|
|
664
|
-
if (
|
|
662
|
+
let g = null;
|
|
663
|
+
function a() {
|
|
664
|
+
if (l.value = l.value.trimStart(), l.value.length === 0) {
|
|
665
665
|
f();
|
|
666
666
|
return;
|
|
667
667
|
}
|
|
668
|
-
|
|
669
|
-
|
|
668
|
+
g && clearTimeout(g), g = setTimeout(() => {
|
|
669
|
+
u("update:modelValue", l.value), u("change", { name: v.name, value: l.value });
|
|
670
670
|
}, 300);
|
|
671
671
|
}
|
|
672
672
|
function f() {
|
|
673
|
-
|
|
673
|
+
l.value = "", u("update:modelValue", ""), u("clear", v.name);
|
|
674
674
|
}
|
|
675
|
-
return (
|
|
676
|
-
class:
|
|
677
|
-
"vs-form-text relative bg-white rounded-
|
|
678
|
-
|
|
675
|
+
return (y, m) => (s(), w("div", {
|
|
676
|
+
class: U([
|
|
677
|
+
"vs-form-text relative bg-white rounded-sm [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-sm [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
|
|
678
|
+
y.layout === "inline" ? e(Le).getWidthClass(y.width) : "mb-2" + (y.layout === "popover" ? " m-2" : "")
|
|
679
679
|
])
|
|
680
680
|
}, [
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
r("div", Ft, [
|
|
682
|
+
Q(Me)
|
|
683
683
|
]),
|
|
684
|
-
|
|
684
|
+
l.value !== "" ? (s(), w("div", {
|
|
685
685
|
key: 0,
|
|
686
686
|
onClick: f,
|
|
687
687
|
class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
|
|
688
688
|
}, [
|
|
689
|
-
|
|
690
|
-
])) :
|
|
691
|
-
|
|
689
|
+
Q(Ce)
|
|
690
|
+
])) : V("", !0),
|
|
691
|
+
Y(r("input", {
|
|
692
692
|
type: "text",
|
|
693
|
-
"onUpdate:modelValue":
|
|
694
|
-
onInput:
|
|
695
|
-
placeholder:
|
|
696
|
-
class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-
|
|
697
|
-
}, null, 40,
|
|
698
|
-
[
|
|
693
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => l.value = d),
|
|
694
|
+
onInput: a,
|
|
695
|
+
placeholder: t.value,
|
|
696
|
+
class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-sm text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
697
|
+
}, null, 40, Mt), [
|
|
698
|
+
[ee, l.value]
|
|
699
699
|
])
|
|
700
700
|
], 2));
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
function
|
|
704
|
-
return
|
|
705
|
-
const v = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${
|
|
706
|
-
return
|
|
703
|
+
function Ee(c = { color: "blue" }) {
|
|
704
|
+
return L(() => {
|
|
705
|
+
const v = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${c.color}-500 focus:border-transparent`;
|
|
706
|
+
return c?.size === "sm" ? `${v}h-[32px]` : `${v}h-[38px]`;
|
|
707
707
|
});
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Et() {
|
|
710
710
|
return "rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]";
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Ot() {
|
|
713
713
|
return "font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100";
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
return
|
|
715
|
+
function Oe(c) {
|
|
716
|
+
return c === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : c === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border bg-white-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
|
|
717
717
|
}
|
|
718
|
-
const
|
|
718
|
+
const Tt = {
|
|
719
719
|
key: 0,
|
|
720
720
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
721
|
-
},
|
|
721
|
+
}, It = ["placeholder", "disabled"], Ut = {
|
|
722
722
|
key: 0,
|
|
723
723
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
724
|
-
},
|
|
724
|
+
}, zt = {
|
|
725
725
|
key: 0,
|
|
726
726
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
727
|
-
},
|
|
728
|
-
const
|
|
727
|
+
}, Nt = ["placeholder", "disabled"], Pt = ["disabled"];
|
|
728
|
+
const Yt = /* @__PURE__ */ W({
|
|
729
729
|
__name: "range-input",
|
|
730
730
|
props: {
|
|
731
731
|
id: {},
|
|
@@ -753,211 +753,211 @@ const It = /* @__PURE__ */ U({
|
|
|
753
753
|
ua: {}
|
|
754
754
|
},
|
|
755
755
|
emits: ["update:modelValue", "change", "clear"],
|
|
756
|
-
setup(
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
), f = v,
|
|
760
|
-
get: () =>
|
|
761
|
-
set: (
|
|
762
|
-
|
|
756
|
+
setup(c, { expose: n, emit: v }) {
|
|
757
|
+
const t = Ee(), u = Et(), l = se(), g = c, a = $(
|
|
758
|
+
g.modelValue ?? g.default ?? []
|
|
759
|
+
), f = v, y = L({
|
|
760
|
+
get: () => g.modelValue ?? a.value,
|
|
761
|
+
set: (i) => {
|
|
762
|
+
g.modelValue !== void 0 ? f("update:modelValue", i) : a.value = i;
|
|
763
763
|
}
|
|
764
764
|
});
|
|
765
|
-
function
|
|
766
|
-
f("change", { name:
|
|
765
|
+
function m() {
|
|
766
|
+
f("change", { name: g.name, value: y.value || a.value });
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
|
|
768
|
+
function d() {
|
|
769
|
+
a.value = [], y.value = a.value, f("clear", g.name);
|
|
770
770
|
}
|
|
771
|
-
return
|
|
772
|
-
|
|
771
|
+
return I(() => g.modelValue, (i) => {
|
|
772
|
+
i !== void 0 && g.layout !== "popover" ? (a.value = i, f("update:modelValue", i)) : a.value = [];
|
|
773
773
|
}), n({
|
|
774
|
-
clear:
|
|
775
|
-
currentValue:
|
|
776
|
-
}), (
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
class:
|
|
774
|
+
clear: d,
|
|
775
|
+
currentValue: y
|
|
776
|
+
}), (i, C) => (s(), w(T, null, [
|
|
777
|
+
r("div", null, [
|
|
778
|
+
r("div", {
|
|
779
|
+
class: U(i.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
|
780
780
|
}, [
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
r("div", null, [
|
|
782
|
+
i.layout !== "vertical" ? (s(), w("label", Tt, S(e(l)("filter.from")), 1)) : V("", !0),
|
|
783
|
+
Y(r("input", {
|
|
784
784
|
type: "number",
|
|
785
|
-
class:
|
|
786
|
-
placeholder:
|
|
785
|
+
class: U(e(t)),
|
|
786
|
+
placeholder: i.placeholder?.[0] ?? "min",
|
|
787
787
|
step: "1",
|
|
788
788
|
style: { outline: "none" },
|
|
789
|
-
"onUpdate:modelValue":
|
|
790
|
-
disabled:
|
|
791
|
-
}, null, 10,
|
|
792
|
-
[
|
|
789
|
+
"onUpdate:modelValue": C[0] || (C[0] = (k) => y.value[0] = k),
|
|
790
|
+
disabled: i.disabled
|
|
791
|
+
}, null, 10, It), [
|
|
792
|
+
[ee, y.value[0]]
|
|
793
793
|
])
|
|
794
794
|
]),
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
795
|
+
i.layout === "vertical" ? (s(), w("label", Ut, " - ")) : V("", !0),
|
|
796
|
+
r("div", null, [
|
|
797
|
+
i.layout !== "vertical" ? (s(), w("label", zt, S(e(l)("filter.to")), 1)) : V("", !0),
|
|
798
|
+
Y(r("input", {
|
|
799
799
|
type: "number",
|
|
800
|
-
class:
|
|
801
|
-
placeholder:
|
|
800
|
+
class: U(e(t)),
|
|
801
|
+
placeholder: i.placeholder?.[1] ?? "max",
|
|
802
802
|
min: "0",
|
|
803
803
|
max: "1000000000000000",
|
|
804
804
|
step: "1",
|
|
805
805
|
style: { outline: "none" },
|
|
806
|
-
"onUpdate:modelValue":
|
|
807
|
-
disabled:
|
|
808
|
-
}, null, 10,
|
|
809
|
-
[
|
|
806
|
+
"onUpdate:modelValue": C[1] || (C[1] = (k) => y.value[1] = k),
|
|
807
|
+
disabled: i.disabled
|
|
808
|
+
}, null, 10, Nt), [
|
|
809
|
+
[ee, y.value[1]]
|
|
810
810
|
])
|
|
811
811
|
]),
|
|
812
|
-
["popover", "inline", "vertical"].includes(
|
|
812
|
+
["popover", "inline", "vertical"].includes(i.layout) ? (s(), w("button", {
|
|
813
813
|
key: 1,
|
|
814
|
-
onClick:
|
|
815
|
-
class:
|
|
816
|
-
},
|
|
817
|
-
["popover", "inline"].includes(
|
|
814
|
+
onClick: m,
|
|
815
|
+
class: U(e(u) + (i.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
|
816
|
+
}, S(i.layout === "vertical" ? "Ok" : e(l)("filter.apply")), 3)) : V("", !0),
|
|
817
|
+
["popover", "inline"].includes(i.layout) ? (s(), w("button", {
|
|
818
818
|
key: 2,
|
|
819
|
-
disabled: !(
|
|
820
|
-
onClick:
|
|
821
|
-
class:
|
|
822
|
-
},
|
|
819
|
+
disabled: !(y.value[0] || y.value[1]),
|
|
820
|
+
onClick: d,
|
|
821
|
+
class: U(e(u) + " hover:bg-gray-100")
|
|
822
|
+
}, S(e(l)("filter.clear")), 11, Pt)) : V("", !0)
|
|
823
823
|
], 2)
|
|
824
824
|
]),
|
|
825
|
-
(
|
|
825
|
+
(i.cleanable && a.value.length, V("", !0))
|
|
826
826
|
], 64));
|
|
827
827
|
}
|
|
828
828
|
});
|
|
829
|
-
function
|
|
830
|
-
return String(
|
|
829
|
+
function Wt(c) {
|
|
830
|
+
return String(c).charAt(0).toUpperCase() + String(c).slice(1);
|
|
831
831
|
}
|
|
832
|
-
class
|
|
832
|
+
class H {
|
|
833
833
|
static format(n) {
|
|
834
|
-
const v = n.getFullYear(),
|
|
835
|
-
return `${v}-${
|
|
834
|
+
const v = n.getFullYear(), t = (n.getMonth() + 1).toString().padStart(2, "0"), u = n.getDate().toString().padStart(2, "0");
|
|
835
|
+
return `${v}-${t}-${u}`;
|
|
836
836
|
}
|
|
837
837
|
static getShiftedDay(n, v = 0) {
|
|
838
|
-
const
|
|
839
|
-
return
|
|
838
|
+
const t = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
839
|
+
return t.setDate(t.getDate() + v), this.format(t);
|
|
840
840
|
}
|
|
841
|
-
static getLastWeekRange(n, v,
|
|
841
|
+
static getLastWeekRange(n, v, t = 0) {
|
|
842
842
|
if (n && v) {
|
|
843
|
-
const
|
|
844
|
-
return
|
|
843
|
+
const y = new Date(n), m = new Date(v);
|
|
844
|
+
return y.setDate(y.getDate() + t * 7), m.setDate(m.getDate() + t * 7), [this.format(y), this.format(m)];
|
|
845
845
|
}
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
const f = new Date(
|
|
849
|
-
return f.setDate(
|
|
850
|
-
}
|
|
851
|
-
static getMonthRange(n, v,
|
|
852
|
-
let
|
|
853
|
-
n ?
|
|
854
|
-
const
|
|
855
|
-
return [this.format(
|
|
856
|
-
}
|
|
857
|
-
static getQuarterRange(n, v,
|
|
858
|
-
const
|
|
859
|
-
let
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
return [this.format(
|
|
846
|
+
const u = /* @__PURE__ */ new Date(), l = u.getDay(), g = l === 0 ? 13 : l - 1 + 7, a = new Date(u);
|
|
847
|
+
a.setDate(u.getDate() - g + t * 7);
|
|
848
|
+
const f = new Date(a);
|
|
849
|
+
return f.setDate(a.getDate() + 6), [this.format(a), this.format(f)];
|
|
850
|
+
}
|
|
851
|
+
static getMonthRange(n, v, t = 0) {
|
|
852
|
+
let u;
|
|
853
|
+
n ? u = new Date(n) : u = /* @__PURE__ */ new Date(), u = new Date(u.getFullYear(), u.getMonth() + t, 1);
|
|
854
|
+
const l = u, g = new Date(u.getFullYear(), u.getMonth() + 1, 0);
|
|
855
|
+
return [this.format(l), this.format(g)];
|
|
856
|
+
}
|
|
857
|
+
static getQuarterRange(n, v, t = 0) {
|
|
858
|
+
const u = n || v, l = u ? new Date(u) : /* @__PURE__ */ new Date();
|
|
859
|
+
let g = Math.floor(l.getMonth() / 3);
|
|
860
|
+
g += t;
|
|
861
|
+
const a = (g % 4 + 4) % 4 * 3, f = l.getFullYear() + Math.floor(g / 4), y = new Date(f, a, 1), m = new Date(f, a + 3, 0);
|
|
862
|
+
return [this.format(y), this.format(m)];
|
|
863
863
|
}
|
|
864
864
|
static getYear(n, v = 0) {
|
|
865
|
-
let
|
|
866
|
-
return n && /^\d{4}$/.test(n) ?
|
|
865
|
+
let t;
|
|
866
|
+
return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + v);
|
|
867
867
|
}
|
|
868
868
|
static getYearRange(n, v = 0) {
|
|
869
|
-
let
|
|
870
|
-
return n && /^\d{4}$/.test(n) ?
|
|
871
|
-
this.format(new Date(
|
|
872
|
-
this.format(new Date(
|
|
869
|
+
let t;
|
|
870
|
+
return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
|
|
871
|
+
this.format(new Date(t + v, 0, 1)),
|
|
872
|
+
this.format(new Date(t + v + 1, 0, 0))
|
|
873
873
|
];
|
|
874
874
|
}
|
|
875
875
|
static getRangeFromDaysBefore(n) {
|
|
876
|
-
const v = /* @__PURE__ */ new Date(),
|
|
877
|
-
return
|
|
876
|
+
const v = /* @__PURE__ */ new Date(), t = new Date(v.getTime());
|
|
877
|
+
return t.setDate(v.getDate() - n), [this.format(t), this.format(v)];
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
function Te(
|
|
880
|
+
function Te(c, n) {
|
|
881
881
|
const {
|
|
882
882
|
popoverRef: v
|
|
883
|
-
} =
|
|
884
|
-
|
|
885
|
-
),
|
|
886
|
-
function
|
|
887
|
-
const
|
|
888
|
-
return
|
|
889
|
-
}
|
|
890
|
-
function f(
|
|
891
|
-
|
|
892
|
-
const
|
|
893
|
-
switch (
|
|
883
|
+
} = c, t = se(), u = $(""), l = $(
|
|
884
|
+
c.modelValue ?? c.default ?? []
|
|
885
|
+
), g = $(0);
|
|
886
|
+
function a() {
|
|
887
|
+
const b = H.getRangeFromDaysBefore(g.value);
|
|
888
|
+
return l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value), b;
|
|
889
|
+
}
|
|
890
|
+
function f(b) {
|
|
891
|
+
u.value = b, v.value?.close();
|
|
892
|
+
const p = [];
|
|
893
|
+
switch (u.value) {
|
|
894
894
|
case "today":
|
|
895
|
-
|
|
895
|
+
p.push(H.getShiftedDay()), p.push(H.getShiftedDay());
|
|
896
896
|
break;
|
|
897
897
|
case "week":
|
|
898
|
-
|
|
898
|
+
p.push(...H.getLastWeekRange());
|
|
899
899
|
break;
|
|
900
900
|
case "month":
|
|
901
|
-
|
|
901
|
+
p.push(...H.getMonthRange());
|
|
902
902
|
break;
|
|
903
903
|
case "quarter":
|
|
904
|
-
|
|
904
|
+
p.push(...H.getQuarterRange());
|
|
905
905
|
break;
|
|
906
906
|
case "year":
|
|
907
|
-
|
|
907
|
+
p.push(...H.getYearRange());
|
|
908
908
|
break;
|
|
909
909
|
case "last_7_days":
|
|
910
|
-
|
|
910
|
+
g.value = 7, a();
|
|
911
911
|
break;
|
|
912
912
|
case "range":
|
|
913
|
-
|
|
913
|
+
g.value = 7, p.push(...a());
|
|
914
914
|
break;
|
|
915
915
|
}
|
|
916
|
-
|
|
916
|
+
l.value = [...p], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
const
|
|
920
|
-
switch (
|
|
918
|
+
function y() {
|
|
919
|
+
const b = [];
|
|
920
|
+
switch (u.value) {
|
|
921
921
|
case "today":
|
|
922
|
-
|
|
922
|
+
b.push(H.getShiftedDay(l.value[0], 1));
|
|
923
923
|
break;
|
|
924
924
|
case "week":
|
|
925
|
-
|
|
925
|
+
b.push(...H.getLastWeekRange(l.value[0], l.value[1], 1));
|
|
926
926
|
break;
|
|
927
927
|
case "month":
|
|
928
|
-
|
|
928
|
+
b.push(...H.getMonthRange(l.value[0], l.value[1], 1));
|
|
929
929
|
break;
|
|
930
930
|
case "quarter":
|
|
931
|
-
|
|
931
|
+
b.push(...H.getQuarterRange(l.value[0], l.value[1], 1));
|
|
932
932
|
break;
|
|
933
933
|
case "year":
|
|
934
|
-
|
|
934
|
+
b.push(...H.getYearRange(l.value[0], 1));
|
|
935
935
|
break;
|
|
936
936
|
}
|
|
937
|
-
|
|
937
|
+
l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
const
|
|
941
|
-
switch (
|
|
939
|
+
function m() {
|
|
940
|
+
const b = [];
|
|
941
|
+
switch (u.value) {
|
|
942
942
|
case "today":
|
|
943
|
-
|
|
943
|
+
b.push(H.getShiftedDay(l.value[0], -1));
|
|
944
944
|
break;
|
|
945
945
|
case "week":
|
|
946
|
-
|
|
946
|
+
b.push(...H.getLastWeekRange(l.value[0], l.value[1], -1));
|
|
947
947
|
break;
|
|
948
948
|
case "month":
|
|
949
|
-
|
|
949
|
+
b.push(...H.getMonthRange(l.value[0], l.value[1], -1));
|
|
950
950
|
break;
|
|
951
951
|
case "quarter":
|
|
952
|
-
|
|
952
|
+
b.push(...H.getQuarterRange(l.value[0], l.value[1], -1));
|
|
953
953
|
break;
|
|
954
954
|
case "year":
|
|
955
|
-
|
|
955
|
+
b.push(...H.getYearRange(l.value[0], -1));
|
|
956
956
|
break;
|
|
957
957
|
}
|
|
958
|
-
|
|
958
|
+
l.value = [...b], n("change", { name: c.name, value: l.value }), n("update:modelValue", l.value);
|
|
959
959
|
}
|
|
960
|
-
const
|
|
960
|
+
const d = [
|
|
961
961
|
"Січень",
|
|
962
962
|
"Лютий",
|
|
963
963
|
"Березень",
|
|
@@ -971,79 +971,79 @@ function Te(t, n) {
|
|
|
971
971
|
"Листопад",
|
|
972
972
|
"Грудень"
|
|
973
973
|
];
|
|
974
|
-
function
|
|
975
|
-
const [
|
|
976
|
-
return `${x}.${
|
|
974
|
+
function i(b) {
|
|
975
|
+
const [p, h, x] = b.split("-");
|
|
976
|
+
return `${x}.${h}.${p}`;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
const
|
|
980
|
-
return new Intl.DateTimeFormat(localStorage.locale, { month:
|
|
978
|
+
function C(b, p = "long") {
|
|
979
|
+
const h = new Date(Date.UTC(2e3, b - 1, 1));
|
|
980
|
+
return new Intl.DateTimeFormat(localStorage.locale, { month: p, timeZone: "UTC" }).format(h);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
983
|
-
const { value:
|
|
984
|
-
switch (
|
|
982
|
+
function k(b) {
|
|
983
|
+
const { value: p } = l;
|
|
984
|
+
switch (b) {
|
|
985
985
|
case "today":
|
|
986
|
-
return
|
|
986
|
+
return i(p[0]);
|
|
987
987
|
case "range":
|
|
988
988
|
return "Період";
|
|
989
989
|
case "week":
|
|
990
|
-
return
|
|
990
|
+
return p[0] && p[1] ? `${i(p[0])} – ${i(p[1])}` : "";
|
|
991
991
|
case "quarter":
|
|
992
|
-
if (
|
|
993
|
-
const
|
|
994
|
-
return `${Math.floor(
|
|
992
|
+
if (p[0]) {
|
|
993
|
+
const h = new Date(p[0]), x = h.getFullYear(), D = h.getMonth();
|
|
994
|
+
return `${Math.floor(D / 3) + 1} ${t("filter.quarter")} ${x}`;
|
|
995
995
|
}
|
|
996
996
|
return "";
|
|
997
997
|
case "month":
|
|
998
|
-
if (
|
|
999
|
-
const [
|
|
1000
|
-
return `${
|
|
998
|
+
if (p[0]) {
|
|
999
|
+
const [h, x] = p[0].split("-");
|
|
1000
|
+
return `${C(parseInt(x, 10))} ${h}`;
|
|
1001
1001
|
}
|
|
1002
1002
|
return "";
|
|
1003
1003
|
case "year":
|
|
1004
|
-
return
|
|
1004
|
+
return p[0] || "";
|
|
1005
1005
|
case "last_7_days":
|
|
1006
1006
|
return "За останні дні";
|
|
1007
1007
|
default:
|
|
1008
|
-
return
|
|
1008
|
+
return c.label ?? "";
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1012
|
-
function
|
|
1013
|
-
|
|
1011
|
+
const _ = L(() => u.value ? k(u.value) : c.label ?? "");
|
|
1012
|
+
function o() {
|
|
1013
|
+
u.value = "", l.value = [], n("update:modelValue", []), n("clear", c.name);
|
|
1014
1014
|
}
|
|
1015
1015
|
return {
|
|
1016
|
-
activeMode:
|
|
1017
|
-
innerValue:
|
|
1018
|
-
daysBefore:
|
|
1019
|
-
onDaysBeforeChange:
|
|
1016
|
+
activeMode: u,
|
|
1017
|
+
innerValue: l,
|
|
1018
|
+
daysBefore: g,
|
|
1019
|
+
onDaysBeforeChange: a,
|
|
1020
1020
|
onSelectChange: f,
|
|
1021
|
-
nextClick:
|
|
1022
|
-
prevClick:
|
|
1023
|
-
ukMonths:
|
|
1024
|
-
formatDisplayDate:
|
|
1025
|
-
getModeLabel:
|
|
1026
|
-
currentLabel:
|
|
1027
|
-
clear:
|
|
1021
|
+
nextClick: y,
|
|
1022
|
+
prevClick: m,
|
|
1023
|
+
ukMonths: d,
|
|
1024
|
+
formatDisplayDate: i,
|
|
1025
|
+
getModeLabel: k,
|
|
1026
|
+
currentLabel: _,
|
|
1027
|
+
clear: o
|
|
1028
1028
|
};
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1030
|
+
const qt = {
|
|
1031
1031
|
key: 0,
|
|
1032
1032
|
class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
|
|
1033
|
-
},
|
|
1033
|
+
}, Qt = {
|
|
1034
1034
|
key: 0,
|
|
1035
|
-
class: "flex gap-1 !w-[75%] rounded-
|
|
1036
|
-
},
|
|
1035
|
+
class: "flex gap-1 !w-[75%] rounded-sm"
|
|
1036
|
+
}, Ht = ["max", "disabled"], Gt = ["min", "disabled"], Xt = {
|
|
1037
1037
|
key: 0,
|
|
1038
1038
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1039
|
-
},
|
|
1039
|
+
}, Zt = ["max", "disabled"], Jt = {
|
|
1040
1040
|
key: 0,
|
|
1041
1041
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1042
|
-
},
|
|
1042
|
+
}, el = {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1045
|
-
},
|
|
1046
|
-
const
|
|
1045
|
+
}, tl = ["min", "disabled"], ll = { class: "flex gap-1 pt-2" }, ol = ["onClick"];
|
|
1046
|
+
const nl = /* @__PURE__ */ W({
|
|
1047
1047
|
__name: "date-input",
|
|
1048
1048
|
props: {
|
|
1049
1049
|
id: {},
|
|
@@ -1071,241 +1071,241 @@ const Zt = /* @__PURE__ */ U({
|
|
|
1071
1071
|
ua: {}
|
|
1072
1072
|
},
|
|
1073
1073
|
emits: ["update:modelValue", "change", "clear"],
|
|
1074
|
-
setup(
|
|
1075
|
-
const
|
|
1074
|
+
setup(c, { expose: n, emit: v }) {
|
|
1075
|
+
const t = c, u = Ee(), l = Ot(), g = v, a = $(null), {
|
|
1076
1076
|
activeMode: f,
|
|
1077
|
-
innerValue:
|
|
1078
|
-
onSelectChange:
|
|
1079
|
-
nextClick:
|
|
1080
|
-
prevClick:
|
|
1081
|
-
clear:
|
|
1077
|
+
innerValue: y,
|
|
1078
|
+
onSelectChange: m,
|
|
1079
|
+
nextClick: d,
|
|
1080
|
+
prevClick: i,
|
|
1081
|
+
clear: C
|
|
1082
1082
|
} = Te({
|
|
1083
|
-
...
|
|
1084
|
-
popoverRef:
|
|
1085
|
-
},
|
|
1086
|
-
return
|
|
1087
|
-
|
|
1083
|
+
...t,
|
|
1084
|
+
popoverRef: a
|
|
1085
|
+
}, g);
|
|
1086
|
+
return I(() => t.modelValue, (k) => {
|
|
1087
|
+
k !== void 0 ? (y.value = k, g("update:modelValue", k)) : (f.value = "", y.value = []);
|
|
1088
1088
|
}), n({
|
|
1089
|
-
clear:
|
|
1090
|
-
popoverRef:
|
|
1091
|
-
}), (
|
|
1092
|
-
|
|
1093
|
-
e(f) !== "" && e(f) === "range" ? (
|
|
1094
|
-
|
|
1089
|
+
clear: C,
|
|
1090
|
+
popoverRef: a
|
|
1091
|
+
}), (k, _) => (s(), w(T, null, [
|
|
1092
|
+
k.layout === "inline" ? (s(), w("div", qt, [
|
|
1093
|
+
e(f) !== "" && e(f) === "range" ? (s(), w("div", Qt, [
|
|
1094
|
+
Y(r("input", {
|
|
1095
1095
|
type: "date",
|
|
1096
|
-
max: e(
|
|
1096
|
+
max: e(y)[1],
|
|
1097
1097
|
locale: "uk-UA",
|
|
1098
|
-
"onUpdate:modelValue":
|
|
1099
|
-
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-
|
|
1100
|
-
disabled:
|
|
1101
|
-
}, null, 8,
|
|
1102
|
-
[
|
|
1098
|
+
"onUpdate:modelValue": _[0] || (_[0] = (o) => e(y)[0] = o),
|
|
1099
|
+
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
|
|
1100
|
+
disabled: k.disabled
|
|
1101
|
+
}, null, 8, Ht), [
|
|
1102
|
+
[ee, e(y)[0]]
|
|
1103
1103
|
]),
|
|
1104
|
-
|
|
1104
|
+
Y(r("input", {
|
|
1105
1105
|
type: "date",
|
|
1106
|
-
min: e(
|
|
1106
|
+
min: e(y)[0],
|
|
1107
1107
|
locale: "uk-UA",
|
|
1108
|
-
"onUpdate:modelValue":
|
|
1109
|
-
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-
|
|
1110
|
-
disabled:
|
|
1111
|
-
}, null, 8,
|
|
1112
|
-
[
|
|
1108
|
+
"onUpdate:modelValue": _[1] || (_[1] = (o) => e(y)[1] = o),
|
|
1109
|
+
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
|
|
1110
|
+
disabled: k.disabled
|
|
1111
|
+
}, null, 8, Gt), [
|
|
1112
|
+
[ee, e(y)[1]]
|
|
1113
1113
|
])
|
|
1114
|
-
])) :
|
|
1115
|
-
])) :
|
|
1116
|
-
|
|
1117
|
-
class:
|
|
1114
|
+
])) : V("", !0)
|
|
1115
|
+
])) : V("", !0),
|
|
1116
|
+
r("div", {
|
|
1117
|
+
class: U(k.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
|
|
1118
1118
|
}, [
|
|
1119
|
-
|
|
1120
|
-
class:
|
|
1119
|
+
r("div", {
|
|
1120
|
+
class: U(k.layout !== "popover" ? "w-[48%]" : "")
|
|
1121
1121
|
}, [
|
|
1122
|
-
|
|
1123
|
-
|
|
1122
|
+
k.layout === "popover" ? (s(), w("label", Xt, "Від")) : V("", !0),
|
|
1123
|
+
Y(r("input", {
|
|
1124
1124
|
type: "date",
|
|
1125
|
-
max: e(
|
|
1125
|
+
max: e(y)[1],
|
|
1126
1126
|
locale: "uk-UA",
|
|
1127
|
-
"onUpdate:modelValue":
|
|
1128
|
-
class:
|
|
1129
|
-
disabled:
|
|
1130
|
-
}, null, 10,
|
|
1131
|
-
[
|
|
1127
|
+
"onUpdate:modelValue": _[2] || (_[2] = (o) => e(y)[0] = o),
|
|
1128
|
+
class: U(e(u)),
|
|
1129
|
+
disabled: k.disabled
|
|
1130
|
+
}, null, 10, Zt), [
|
|
1131
|
+
[ee, e(y)[0]]
|
|
1132
1132
|
])
|
|
1133
1133
|
], 2),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
class:
|
|
1134
|
+
k.layout !== "popover" ? (s(), w("label", Jt, " - ")) : V("", !0),
|
|
1135
|
+
r("div", {
|
|
1136
|
+
class: U(k.layout !== "popover" ? "w-[48%]" : "")
|
|
1137
1137
|
}, [
|
|
1138
|
-
|
|
1139
|
-
|
|
1138
|
+
k.layout === "popover" ? (s(), w("label", el, "До")) : V("", !0),
|
|
1139
|
+
Y(r("input", {
|
|
1140
1140
|
type: "date",
|
|
1141
|
-
min: e(
|
|
1141
|
+
min: e(y)[0],
|
|
1142
1142
|
locale: "uk-UA",
|
|
1143
|
-
"onUpdate:modelValue":
|
|
1144
|
-
class:
|
|
1145
|
-
disabled:
|
|
1146
|
-
}, null, 10,
|
|
1147
|
-
[
|
|
1143
|
+
"onUpdate:modelValue": _[3] || (_[3] = (o) => e(y)[1] = o),
|
|
1144
|
+
class: U(e(u)),
|
|
1145
|
+
disabled: k.disabled
|
|
1146
|
+
}, null, 10, tl), [
|
|
1147
|
+
[ee, e(y)[1]]
|
|
1148
1148
|
])
|
|
1149
1149
|
], 2)
|
|
1150
1150
|
], 2),
|
|
1151
|
-
|
|
1152
|
-
(
|
|
1153
|
-
key:
|
|
1154
|
-
class:
|
|
1155
|
-
onClick: (
|
|
1156
|
-
},
|
|
1157
|
-
|
|
1158
|
-
class:
|
|
1159
|
-
onClick:
|
|
1160
|
-
(...
|
|
1151
|
+
r("div", ll, [
|
|
1152
|
+
(s(), w(T, null, X(["today", "week", "month", "quarter", "year"], (o) => r("button", {
|
|
1153
|
+
key: o,
|
|
1154
|
+
class: U(e(l) + (e(f) === o ? " bg-blue-100" : "")),
|
|
1155
|
+
onClick: (b) => e(m)(o)
|
|
1156
|
+
}, S(e(Wt)(o)), 11, ol)), 64)),
|
|
1157
|
+
r("button", {
|
|
1158
|
+
class: U(e(l)),
|
|
1159
|
+
onClick: _[4] || (_[4] = //@ts-ignore
|
|
1160
|
+
(...o) => e(i) && e(i)(...o))
|
|
1161
1161
|
}, " <", 2),
|
|
1162
|
-
|
|
1163
|
-
class:
|
|
1164
|
-
onClick:
|
|
1165
|
-
(...
|
|
1162
|
+
r("button", {
|
|
1163
|
+
class: U(e(l)),
|
|
1164
|
+
onClick: _[5] || (_[5] = //@ts-ignore
|
|
1165
|
+
(...o) => e(d) && e(d)(...o))
|
|
1166
1166
|
}, " >", 2)
|
|
1167
1167
|
]),
|
|
1168
|
-
(
|
|
1168
|
+
(k.cleanable, V("", !0))
|
|
1169
1169
|
], 64));
|
|
1170
1170
|
}
|
|
1171
1171
|
});
|
|
1172
|
-
function
|
|
1172
|
+
function al(c, n) {
|
|
1173
1173
|
const {
|
|
1174
1174
|
api: v,
|
|
1175
|
-
options:
|
|
1176
|
-
limit:
|
|
1177
|
-
dataKey:
|
|
1178
|
-
} =
|
|
1179
|
-
function
|
|
1180
|
-
return
|
|
1181
|
-
}
|
|
1182
|
-
const f =
|
|
1183
|
-
function
|
|
1184
|
-
const O =
|
|
1185
|
-
return { autoValueKey:
|
|
1186
|
-
}
|
|
1187
|
-
if (
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
}
|
|
1191
|
-
const
|
|
1192
|
-
if (v) return
|
|
1193
|
-
const
|
|
1194
|
-
if (
|
|
1195
|
-
if (!
|
|
1196
|
-
return
|
|
1197
|
-
const O =
|
|
1198
|
-
return
|
|
1175
|
+
options: t = [],
|
|
1176
|
+
limit: u = 20,
|
|
1177
|
+
dataKey: l = "data"
|
|
1178
|
+
} = c, g = c.multi;
|
|
1179
|
+
function a(B) {
|
|
1180
|
+
return g ? Array.isArray(B) ? B : B ? [B] : [] : Array.isArray(B) ? B[0] : B;
|
|
1181
|
+
}
|
|
1182
|
+
const f = $(a(c.modelValue)), y = $(""), m = $(!1), d = $(t), i = $("id"), C = $("text"), k = $(!1), _ = $(c.layout !== "popover" && t.length > u), o = $([]), b = $(0);
|
|
1183
|
+
function p(B) {
|
|
1184
|
+
const O = B.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((ie) => ie in O) ?? "id", N = ["text", "label", "name", "title"].find((ie) => ie in O) ?? "text";
|
|
1185
|
+
return { autoValueKey: q, autoLabelKey: N };
|
|
1186
|
+
}
|
|
1187
|
+
if (t.length > 0) {
|
|
1188
|
+
const B = p(t);
|
|
1189
|
+
i.value = B.autoValueKey, C.value = B.autoLabelKey;
|
|
1190
|
+
}
|
|
1191
|
+
const h = L(() => {
|
|
1192
|
+
if (v) return d.value;
|
|
1193
|
+
const B = d.value;
|
|
1194
|
+
if (c.layout === "popover") return B;
|
|
1195
|
+
if (!y.value)
|
|
1196
|
+
return k.value ? B : B.slice(0, u);
|
|
1197
|
+
const O = y.value.toLowerCase();
|
|
1198
|
+
return B.filter((q) => q[C.value].toLowerCase().includes(O));
|
|
1199
1199
|
});
|
|
1200
1200
|
let x = null;
|
|
1201
|
-
async function B
|
|
1201
|
+
async function D(B) {
|
|
1202
1202
|
if (v) {
|
|
1203
|
-
|
|
1203
|
+
m.value = !0;
|
|
1204
1204
|
try {
|
|
1205
1205
|
const O = new URL(v, window.location.origin);
|
|
1206
|
-
O.searchParams.set("json", "1"), O.searchParams.set("key",
|
|
1207
|
-
const
|
|
1208
|
-
if (!
|
|
1209
|
-
|
|
1206
|
+
O.searchParams.set("json", "1"), O.searchParams.set("key", B), O.searchParams.set("limit", u.toString());
|
|
1207
|
+
const q = await fetch(O.toString());
|
|
1208
|
+
if (!q.ok) {
|
|
1209
|
+
Ae({ type: "error", title: "Error", message: "Failed to fetch remote options" }), d.value = [];
|
|
1210
1210
|
return;
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
if (!
|
|
1214
|
-
|
|
1212
|
+
const N = await q.json();
|
|
1213
|
+
if (!N[l]) {
|
|
1214
|
+
Ae({ type: "error", title: "Error", message: N }), d.value = [];
|
|
1215
1215
|
return;
|
|
1216
1216
|
}
|
|
1217
|
-
if (
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1217
|
+
if (d.value = N[l], d.value.length > 0) {
|
|
1218
|
+
const ie = p(d.value);
|
|
1219
|
+
i.value = ie.autoValueKey, C.value = ie.autoLabelKey;
|
|
1220
1220
|
}
|
|
1221
|
-
|
|
1221
|
+
b.value = N.total;
|
|
1222
1222
|
} catch (O) {
|
|
1223
1223
|
console.error("Failed to fetch remote options:", O);
|
|
1224
1224
|
} finally {
|
|
1225
|
-
|
|
1225
|
+
m.value = !1;
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
|
|
1229
|
+
I(y, (B) => {
|
|
1230
1230
|
v && (x && clearTimeout(x), x = setTimeout(() => {
|
|
1231
|
-
B
|
|
1231
|
+
D(B);
|
|
1232
1232
|
}, 200));
|
|
1233
|
-
}),
|
|
1234
|
-
f.value =
|
|
1233
|
+
}), I(() => c.modelValue, (B) => {
|
|
1234
|
+
f.value = a(B);
|
|
1235
1235
|
}, { immediate: !0 });
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1236
|
+
function F(B) {
|
|
1237
|
+
return g && Array.isArray(f.value) ? f.value.includes(B[i.value]) : f.value && f.value === B[i.value];
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
if (
|
|
1241
|
-
const O = f.value.includes(
|
|
1242
|
-
f.value = O ? f.value.filter((
|
|
1239
|
+
function A(B) {
|
|
1240
|
+
if (g && !Array.isArray(f.value) && (f.value = []), g && Array.isArray(f.value)) {
|
|
1241
|
+
const O = f.value.includes(B[i.value]);
|
|
1242
|
+
f.value = O ? f.value.filter((q) => q !== B[i.value]) : [...f.value, B[i.value]], o.value = O ? o.value.filter((q) => q !== B[C.value]) : [...o.value, B[C.value]];
|
|
1243
1243
|
} else
|
|
1244
|
-
f.value =
|
|
1245
|
-
n("update:modelValue", f.value), n("change", { name:
|
|
1244
|
+
f.value = B[i.value], o.value = B[C.value];
|
|
1245
|
+
n("update:modelValue", f.value), n("change", { name: c.name, value: f.value });
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
|
|
1247
|
+
function R() {
|
|
1248
|
+
g ? (f.value = [], o.value = []) : (f.value = void 0, o.value = []), n("update:modelValue", f.value), n("clear", c.name);
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1251
|
-
x && clearTimeout(x),
|
|
1250
|
+
function j() {
|
|
1251
|
+
x && clearTimeout(x), y.value = "", k.value = !1;
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1254
|
-
|
|
1253
|
+
function M() {
|
|
1254
|
+
k.value = !k.value;
|
|
1255
1255
|
}
|
|
1256
|
-
|
|
1256
|
+
pe(() => {
|
|
1257
1257
|
x && clearTimeout(x);
|
|
1258
1258
|
});
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
|
|
1259
|
+
const K = $(-1);
|
|
1260
|
+
I(h, () => {
|
|
1261
|
+
K.value = h.value.length > 0 ? 0 : -1;
|
|
1262
1262
|
});
|
|
1263
|
-
function
|
|
1264
|
-
const O =
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1267
|
-
else if (
|
|
1268
|
-
|
|
1269
|
-
else if (
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1263
|
+
function z(B) {
|
|
1264
|
+
const O = h.value.length;
|
|
1265
|
+
if (B.key === "ArrowDown")
|
|
1266
|
+
B.preventDefault(), K.value = (K.value + 1) % O;
|
|
1267
|
+
else if (B.key === "ArrowUp")
|
|
1268
|
+
B.preventDefault(), K.value = (K.value - 1 + O) % O;
|
|
1269
|
+
else if (B.key === "Enter" && (B.preventDefault(), K.value >= 0 && K.value < h.value.length)) {
|
|
1270
|
+
const q = h.value[K.value];
|
|
1271
|
+
A(q);
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1275
|
-
v &&
|
|
1274
|
+
function P() {
|
|
1275
|
+
v && d.value.length === 0 && y.value.length === 0 && D(y.value);
|
|
1276
1276
|
}
|
|
1277
1277
|
return {
|
|
1278
1278
|
innerValue: f,
|
|
1279
|
-
searchTerm:
|
|
1280
|
-
filteredOptions:
|
|
1281
|
-
isSelected:
|
|
1282
|
-
selectItem:
|
|
1283
|
-
clear:
|
|
1284
|
-
resetSearch:
|
|
1285
|
-
toggleShowAll:
|
|
1286
|
-
isReqProc:
|
|
1287
|
-
showAll:
|
|
1288
|
-
isEnableShowAll:
|
|
1289
|
-
labelKey:
|
|
1290
|
-
valueKey:
|
|
1291
|
-
allOptions:
|
|
1292
|
-
highlightedIndex:
|
|
1293
|
-
onKeyDown:
|
|
1294
|
-
selectedLabels:
|
|
1295
|
-
totalCount:
|
|
1296
|
-
loadData:
|
|
1279
|
+
searchTerm: y,
|
|
1280
|
+
filteredOptions: h,
|
|
1281
|
+
isSelected: F,
|
|
1282
|
+
selectItem: A,
|
|
1283
|
+
clear: R,
|
|
1284
|
+
resetSearch: j,
|
|
1285
|
+
toggleShowAll: M,
|
|
1286
|
+
isReqProc: m,
|
|
1287
|
+
showAll: k,
|
|
1288
|
+
isEnableShowAll: _,
|
|
1289
|
+
labelKey: C,
|
|
1290
|
+
valueKey: i,
|
|
1291
|
+
allOptions: d,
|
|
1292
|
+
highlightedIndex: K,
|
|
1293
|
+
onKeyDown: z,
|
|
1294
|
+
selectedLabels: o,
|
|
1295
|
+
totalCount: b,
|
|
1296
|
+
loadData: P
|
|
1297
1297
|
};
|
|
1298
1298
|
}
|
|
1299
|
-
const
|
|
1299
|
+
const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, sl = ["placeholder"], il = {
|
|
1300
1300
|
key: 0,
|
|
1301
1301
|
class: "w-full"
|
|
1302
|
-
},
|
|
1302
|
+
}, ul = { class: "flex flex-col items-center justify-center p-5 text-center" }, dl = { class: "max-w-sm mx-auto mt-6" }, cl = { class: "font-medium text-gray-800 dark:text-neutral-200" }, fl = {
|
|
1303
1303
|
key: 0,
|
|
1304
1304
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1305
|
-
},
|
|
1305
|
+
}, pl = {
|
|
1306
1306
|
key: 1,
|
|
1307
1307
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1308
|
-
},
|
|
1308
|
+
}, ml = /* @__PURE__ */ W({
|
|
1309
1309
|
__name: "select",
|
|
1310
1310
|
props: {
|
|
1311
1311
|
id: {},
|
|
@@ -1333,154 +1333,154 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1333
1333
|
ua: {}
|
|
1334
1334
|
},
|
|
1335
1335
|
emits: ["update:modelValue", "change", "clear"],
|
|
1336
|
-
setup(
|
|
1337
|
-
const
|
|
1338
|
-
innerValue:
|
|
1336
|
+
setup(c, { expose: n, emit: v }) {
|
|
1337
|
+
const t = se(), u = c, l = v, g = $(null), {
|
|
1338
|
+
innerValue: a,
|
|
1339
1339
|
filteredOptions: f,
|
|
1340
|
-
isSelected:
|
|
1341
|
-
selectItem:
|
|
1342
|
-
clear:
|
|
1343
|
-
resetSearch:
|
|
1344
|
-
toggleShowAll:
|
|
1345
|
-
isReqProc:
|
|
1346
|
-
showAll:
|
|
1347
|
-
isEnableShowAll:
|
|
1348
|
-
searchTerm:
|
|
1349
|
-
labelKey:
|
|
1350
|
-
valueKey:
|
|
1340
|
+
isSelected: y,
|
|
1341
|
+
selectItem: m,
|
|
1342
|
+
clear: d,
|
|
1343
|
+
resetSearch: i,
|
|
1344
|
+
toggleShowAll: C,
|
|
1345
|
+
isReqProc: k,
|
|
1346
|
+
showAll: _,
|
|
1347
|
+
isEnableShowAll: o,
|
|
1348
|
+
searchTerm: b,
|
|
1349
|
+
labelKey: p,
|
|
1350
|
+
valueKey: h,
|
|
1351
1351
|
highlightedIndex: x,
|
|
1352
|
-
onKeyDown:
|
|
1353
|
-
selectedLabels:
|
|
1354
|
-
totalCount:
|
|
1355
|
-
loadData:
|
|
1356
|
-
} =
|
|
1357
|
-
...
|
|
1358
|
-
modelValue:
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
}),
|
|
1363
|
-
() =>
|
|
1364
|
-
(
|
|
1365
|
-
|
|
1352
|
+
onKeyDown: D,
|
|
1353
|
+
selectedLabels: F,
|
|
1354
|
+
totalCount: A,
|
|
1355
|
+
loadData: R
|
|
1356
|
+
} = al({
|
|
1357
|
+
...u,
|
|
1358
|
+
modelValue: u.modelValue
|
|
1359
|
+
}, l);
|
|
1360
|
+
ce(() => {
|
|
1361
|
+
i(), u.layout !== "inline" && (R(), g.value && u.layout === "popover" && g.value.focus());
|
|
1362
|
+
}), I(
|
|
1363
|
+
() => u.modelValue,
|
|
1364
|
+
(M) => {
|
|
1365
|
+
M === void 0 && (u.multi ? a.value = [] : a.value = void 0);
|
|
1366
1366
|
}
|
|
1367
1367
|
);
|
|
1368
|
-
const
|
|
1369
|
-
return
|
|
1370
|
-
|
|
1368
|
+
const j = $([]);
|
|
1369
|
+
return I(x, (M) => {
|
|
1370
|
+
M >= 0 && j.value[M] && j.value[M]?.scrollIntoView({
|
|
1371
1371
|
block: "nearest",
|
|
1372
1372
|
behavior: "smooth"
|
|
1373
1373
|
});
|
|
1374
|
-
}),
|
|
1375
|
-
|
|
1374
|
+
}), I(f, () => {
|
|
1375
|
+
j.value = [];
|
|
1376
1376
|
}), n({
|
|
1377
|
-
clear:
|
|
1378
|
-
inputTextRef:
|
|
1379
|
-
selectedLabels:
|
|
1380
|
-
loadData:
|
|
1381
|
-
}), (
|
|
1382
|
-
class:
|
|
1377
|
+
clear: d,
|
|
1378
|
+
inputTextRef: g,
|
|
1379
|
+
selectedLabels: F,
|
|
1380
|
+
loadData: R
|
|
1381
|
+
}), (M, K) => (s(), w("div", {
|
|
1382
|
+
class: U([M.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
1383
1383
|
}, [
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
"onUpdate:modelValue":
|
|
1387
|
-
onKeydown:
|
|
1388
|
-
(...
|
|
1384
|
+
r("div", rl, [
|
|
1385
|
+
Y(r("input", {
|
|
1386
|
+
"onUpdate:modelValue": K[0] || (K[0] = (z) => Pe(b) ? b.value = z : null),
|
|
1387
|
+
onKeydown: K[1] || (K[1] = //@ts-ignore
|
|
1388
|
+
(...z) => e(D) && e(D)(...z)),
|
|
1389
1389
|
class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500 text-gray-700",
|
|
1390
|
-
placeholder: e(
|
|
1390
|
+
placeholder: e(t)("filter.search"),
|
|
1391
1391
|
type: "text",
|
|
1392
1392
|
ref_key: "inputTextRef",
|
|
1393
|
-
ref:
|
|
1394
|
-
}, null, 40,
|
|
1395
|
-
[
|
|
1393
|
+
ref: g
|
|
1394
|
+
}, null, 40, sl), [
|
|
1395
|
+
[ee, e(b)]
|
|
1396
1396
|
]),
|
|
1397
|
-
|
|
1398
|
-
e(
|
|
1397
|
+
Q(Me, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
|
|
1398
|
+
e(b) != "" ? (s(), E(Ce, {
|
|
1399
1399
|
key: 0,
|
|
1400
|
-
onClick:
|
|
1400
|
+
onClick: K[2] || (K[2] = (z) => b.value = ""),
|
|
1401
1401
|
class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
|
|
1402
|
-
})) :
|
|
1402
|
+
})) : V("", !0)
|
|
1403
1403
|
]),
|
|
1404
|
-
|
|
1405
|
-
class:
|
|
1406
|
-
|
|
1407
|
-
|
|
1404
|
+
r("div", {
|
|
1405
|
+
class: U([
|
|
1406
|
+
M.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
1407
|
+
M.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
1408
1408
|
])
|
|
1409
1409
|
}, [
|
|
1410
|
-
(
|
|
1411
|
-
layout:
|
|
1412
|
-
count:
|
|
1413
|
-
label:
|
|
1414
|
-
color:
|
|
1415
|
-
type:
|
|
1416
|
-
value:
|
|
1417
|
-
"is-selected": e(
|
|
1418
|
-
highlighted:
|
|
1419
|
-
onItemClick: (
|
|
1410
|
+
(s(!0), w(T, null, X(e(f), (z, P) => (s(), E(he, {
|
|
1411
|
+
layout: M.layout,
|
|
1412
|
+
count: z.count,
|
|
1413
|
+
label: z[e(p)],
|
|
1414
|
+
color: z.color,
|
|
1415
|
+
type: M.multi ? "checkbox" : "radio",
|
|
1416
|
+
value: z[e(h)],
|
|
1417
|
+
"is-selected": e(y)(z),
|
|
1418
|
+
highlighted: P === e(x),
|
|
1419
|
+
onItemClick: (B) => e(m)(z),
|
|
1420
1420
|
ref_for: !0,
|
|
1421
|
-
ref: (
|
|
1421
|
+
ref: (B) => j.value[P] = B?.el
|
|
1422
1422
|
}, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
|
|
1423
1423
|
], 2),
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1424
|
+
M.type === "select" && e(f).length === 0 && !e(k) ? (s(), w("div", il, [
|
|
1425
|
+
r("div", ul, [
|
|
1426
|
+
Q(we),
|
|
1427
|
+
r("div", dl, [
|
|
1428
|
+
r("p", cl, S(e(t)("filter.notfound")), 1),
|
|
1429
|
+
K[7] || (K[7] = r("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
|
|
1430
1430
|
])
|
|
1431
1431
|
])
|
|
1432
|
-
])) :
|
|
1433
|
-
|
|
1434
|
-
!e(
|
|
1432
|
+
])) : V("", !0),
|
|
1433
|
+
M.layout !== "popover" && M.type !== "select" ? (s(), w(T, { key: 1 }, [
|
|
1434
|
+
!e(_) && e(o) ? (s(), w("div", {
|
|
1435
1435
|
key: 0,
|
|
1436
|
-
onClick:
|
|
1437
|
-
(...
|
|
1436
|
+
onClick: K[3] || (K[3] = //@ts-ignore
|
|
1437
|
+
(...z) => e(C) && e(C)(...z)),
|
|
1438
1438
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
1439
1439
|
}, [
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
])) :
|
|
1443
|
-
e(
|
|
1440
|
+
G(S(e(t)("filter.more")) + " ", 1),
|
|
1441
|
+
Q(ve)
|
|
1442
|
+
])) : V("", !0),
|
|
1443
|
+
e(_) ? (s(), w("div", {
|
|
1444
1444
|
key: 1,
|
|
1445
|
-
onClick:
|
|
1446
|
-
(...
|
|
1445
|
+
onClick: K[4] || (K[4] = //@ts-ignore
|
|
1446
|
+
(...z) => e(C) && e(C)(...z)),
|
|
1447
1447
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
1448
1448
|
}, [
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
])) :
|
|
1452
|
-
], 64)) :
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1449
|
+
G(S(e(t)("filter.less")) + " ", 1),
|
|
1450
|
+
Q(ke)
|
|
1451
|
+
])) : V("", !0)
|
|
1452
|
+
], 64)) : V("", !0),
|
|
1453
|
+
M.cleanable ? (s(), w(T, { key: 2 }, [
|
|
1454
|
+
M.layout === "inline" ? (s(), w("div", fl, [
|
|
1455
|
+
G(S(M.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(A)) + " " + S(e(t)("filter.selected")) + " ", 1),
|
|
1456
|
+
Y(r("button", {
|
|
1457
1457
|
class: "text-gray-600 hover:text-gray-800",
|
|
1458
|
-
onClick:
|
|
1459
|
-
(...
|
|
1460
|
-
},
|
|
1461
|
-
[
|
|
1458
|
+
onClick: K[5] || (K[5] = //@ts-ignore
|
|
1459
|
+
(...z) => e(d) && e(d)(...z))
|
|
1460
|
+
}, S(e(t)("filter.clear")), 513), [
|
|
1461
|
+
[J, e(a) !== "" && e(a) !== void 0 || e(a)]
|
|
1462
1462
|
])
|
|
1463
|
-
])) :
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1463
|
+
])) : V("", !0),
|
|
1464
|
+
M.layout === "popover" ? (s(), w("div", pl, [
|
|
1465
|
+
r("span", null, S(M.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(A)) + " " + S(e(t)("filter.selected")), 1),
|
|
1466
|
+
Y(r("button", {
|
|
1467
1467
|
class: "text-gray-600 hover:text-gray-800",
|
|
1468
|
-
onClick:
|
|
1469
|
-
(...
|
|
1470
|
-
},
|
|
1471
|
-
[
|
|
1468
|
+
onClick: K[6] || (K[6] = //@ts-ignore
|
|
1469
|
+
(...z) => e(d) && e(d)(...z))
|
|
1470
|
+
}, S(e(t)("filter.clear")), 513), [
|
|
1471
|
+
[J, e(a) !== "" && e(a) !== void 0 || e(a)]
|
|
1472
1472
|
])
|
|
1473
|
-
])) :
|
|
1474
|
-
], 64)) :
|
|
1473
|
+
])) : V("", !0)
|
|
1474
|
+
], 64)) : V("", !0)
|
|
1475
1475
|
], 2));
|
|
1476
1476
|
}
|
|
1477
|
-
}),
|
|
1477
|
+
}), vl = ["for", "onClick"], yl = ["id", "name", "value"], gl = { class: "block" }, bl = {
|
|
1478
1478
|
key: 0,
|
|
1479
1479
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1480
|
-
},
|
|
1480
|
+
}, hl = {
|
|
1481
1481
|
key: 1,
|
|
1482
1482
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1483
|
-
},
|
|
1483
|
+
}, xl = /* @__PURE__ */ W({
|
|
1484
1484
|
__name: "tag-field",
|
|
1485
1485
|
props: {
|
|
1486
1486
|
id: {},
|
|
@@ -1508,77 +1508,77 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1508
1508
|
ua: {}
|
|
1509
1509
|
},
|
|
1510
1510
|
emits: ["update:modelValue", "change", "clear"],
|
|
1511
|
-
setup(
|
|
1512
|
-
const
|
|
1513
|
-
innerValue:
|
|
1514
|
-
isSelected:
|
|
1515
|
-
selectItem:
|
|
1511
|
+
setup(c, { expose: n, emit: v }) {
|
|
1512
|
+
const t = c, u = v, {
|
|
1513
|
+
innerValue: l,
|
|
1514
|
+
isSelected: g,
|
|
1515
|
+
selectItem: a,
|
|
1516
1516
|
clear: f,
|
|
1517
|
-
labelKey:
|
|
1518
|
-
valueKey:
|
|
1519
|
-
allOptions:
|
|
1520
|
-
} =
|
|
1521
|
-
...
|
|
1522
|
-
modelValue:
|
|
1523
|
-
},
|
|
1524
|
-
...
|
|
1525
|
-
modelValue:
|
|
1526
|
-
},
|
|
1517
|
+
labelKey: y,
|
|
1518
|
+
valueKey: m,
|
|
1519
|
+
allOptions: d
|
|
1520
|
+
} = t.multi ? Fe({
|
|
1521
|
+
...t,
|
|
1522
|
+
modelValue: t.modelValue ?? t.default ?? []
|
|
1523
|
+
}, u) : xe({
|
|
1524
|
+
...t,
|
|
1525
|
+
modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
|
|
1526
|
+
}, u);
|
|
1527
1527
|
return n({
|
|
1528
1528
|
clear: f
|
|
1529
|
-
}),
|
|
1530
|
-
() =>
|
|
1531
|
-
(
|
|
1532
|
-
|
|
1529
|
+
}), I(
|
|
1530
|
+
() => t.modelValue,
|
|
1531
|
+
(i) => {
|
|
1532
|
+
i === void 0 && (t.multi ? l.value = [] : l.value = void 0);
|
|
1533
1533
|
}
|
|
1534
|
-
), (
|
|
1535
|
-
|
|
1536
|
-
class:
|
|
1534
|
+
), (i, C) => (s(), w(T, null, [
|
|
1535
|
+
r("div", {
|
|
1536
|
+
class: U(["grid grid-cols-3 gap-2 mx-[1px]", i.layout === "popover" ? "m-1" : "mb-1"])
|
|
1537
1537
|
}, [
|
|
1538
|
-
(
|
|
1539
|
-
key: `item-${
|
|
1540
|
-
for: `item-${
|
|
1541
|
-
onClick:
|
|
1542
|
-
class:
|
|
1538
|
+
(s(!0), w(T, null, X(e(d), (k) => (s(), w("label", {
|
|
1539
|
+
key: `item-${k[e(m)]}`,
|
|
1540
|
+
for: `item-${k[e(m)]}`,
|
|
1541
|
+
onClick: re((_) => e(a)(k), ["stop", "prevent"]),
|
|
1542
|
+
class: U([e(g)(k) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-sm dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
|
|
1543
1543
|
}, [
|
|
1544
|
-
|
|
1544
|
+
r("input", {
|
|
1545
1545
|
type: "checkbox",
|
|
1546
|
-
id: `item-${
|
|
1546
|
+
id: `item-${k[e(m)]}`,
|
|
1547
1547
|
class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
|
|
1548
|
-
name: `item-${
|
|
1549
|
-
value:
|
|
1550
|
-
}, null, 8,
|
|
1551
|
-
|
|
1552
|
-
], 10,
|
|
1548
|
+
name: `item-${k[e(m)]}`,
|
|
1549
|
+
value: k[e(m)]
|
|
1550
|
+
}, null, 8, yl),
|
|
1551
|
+
r("span", gl, S(k[e(y)]), 1)
|
|
1552
|
+
], 10, vl))), 128))
|
|
1553
1553
|
], 2),
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1554
|
+
i.cleanable ? (s(), w(T, { key: 0 }, [
|
|
1555
|
+
i.layout === "inline" ? (s(), w("div", bl, [
|
|
1556
|
+
G(S(i.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(d).length) + " обрано ", 1),
|
|
1557
|
+
Y(r("button", {
|
|
1558
1558
|
class: "text-gray-600 hover:text-gray-800",
|
|
1559
|
-
onClick:
|
|
1560
|
-
(...
|
|
1559
|
+
onClick: C[0] || (C[0] = //@ts-ignore
|
|
1560
|
+
(...k) => e(f) && e(f)(...k))
|
|
1561
1561
|
}, " Очистити ", 512), [
|
|
1562
|
-
[
|
|
1562
|
+
[J, e(l) !== "" && e(l) !== void 0 || e(l)]
|
|
1563
1563
|
])
|
|
1564
|
-
])) :
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1564
|
+
])) : V("", !0),
|
|
1565
|
+
i.layout === "popover" ? (s(), w("div", hl, [
|
|
1566
|
+
r("span", null, S(i.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(d).length) + " обрано", 1),
|
|
1567
|
+
Y(r("button", {
|
|
1568
1568
|
class: "text-gray-600 hover:text-gray-800",
|
|
1569
|
-
onClick:
|
|
1570
|
-
(...
|
|
1569
|
+
onClick: C[1] || (C[1] = //@ts-ignore
|
|
1570
|
+
(...k) => e(f) && e(f)(...k))
|
|
1571
1571
|
}, " Очистити ", 512), [
|
|
1572
|
-
[
|
|
1572
|
+
[J, e(l) !== void 0 && e(l) !== "" || e(l)]
|
|
1573
1573
|
])
|
|
1574
|
-
])) :
|
|
1575
|
-
], 64)) :
|
|
1574
|
+
])) : V("", !0)
|
|
1575
|
+
], 64)) : V("", !0)
|
|
1576
1576
|
], 64));
|
|
1577
1577
|
}
|
|
1578
|
-
}),
|
|
1578
|
+
}), wl = ["disabled", "title"], kl = { class: "flex w-full items-center justify-between gap-2 overflow-hidden text-left" }, Cl = { class: "truncate text-ellipsis text-sm" }, _l = {
|
|
1579
1579
|
key: 0,
|
|
1580
|
-
class: "
|
|
1581
|
-
},
|
|
1580
|
+
class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-sm bg-blue-100 px-2 text-[11px] font-semibold text-blue-600"
|
|
1581
|
+
}, Vl = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, $l = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, _e = /* @__PURE__ */ W({
|
|
1582
1582
|
__name: "popover-field",
|
|
1583
1583
|
props: {
|
|
1584
1584
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -1595,80 +1595,91 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1595
1595
|
mode: {},
|
|
1596
1596
|
layout: {}
|
|
1597
1597
|
},
|
|
1598
|
-
setup(
|
|
1599
|
-
const v =
|
|
1600
|
-
function p() {
|
|
1601
|
-
const C = o.value, d = f.value;
|
|
1602
|
-
if (!C || !d) return;
|
|
1603
|
-
const x = C.getBoundingClientRect(), B = d.offsetWidth, R = window.innerWidth, K = x.bottom + 8;
|
|
1604
|
-
let { left: X } = x;
|
|
1605
|
-
X + B > R && (X = Math.max(R - B - 10, 10)), a.value = { top: K, left: X };
|
|
1606
|
-
}
|
|
1598
|
+
setup(c, { expose: n }) {
|
|
1599
|
+
const v = c, t = L(() => Oe(v.mode)), u = $(!1), l = $({ top: 0, left: 0 }), g = $(null), a = $(null), f = $(null);
|
|
1607
1600
|
function y() {
|
|
1608
|
-
|
|
1609
|
-
|
|
1601
|
+
const x = a.value, D = f.value;
|
|
1602
|
+
if (!x || !D) return;
|
|
1603
|
+
const F = x.getBoundingClientRect(), A = D.offsetWidth, R = window.innerWidth, j = F.bottom + 8;
|
|
1604
|
+
let { left: M } = F;
|
|
1605
|
+
M + A > R && (M = Math.max(R - A - 10, 10)), l.value = { top: j, left: M };
|
|
1606
|
+
}
|
|
1607
|
+
function m() {
|
|
1608
|
+
u.value = !u.value, u.value && me(() => {
|
|
1609
|
+
y(), v.fieldRef?.inputTextRef && v.fieldRef?.inputTextRef?.focus?.(), v.fieldRef?.loadData && v.fieldRef?.loadData?.();
|
|
1610
1610
|
});
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1613
|
-
!
|
|
1612
|
+
function d(x) {
|
|
1613
|
+
!g.value?.contains(x.target) && !f.value?.contains(x.target) && !a.value?.contains(x.target) && (u.value = !1);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1615
|
+
function i(x) {
|
|
1616
|
+
x.key === "Escape" && (u.value = !1);
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1618
|
+
const C = $(!1), k = $("ua"), _ = (x) => {
|
|
1619
|
+
x.detail.key === "locale" && (k.value = x.detail.newValue);
|
|
1620
1620
|
};
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}),
|
|
1624
|
-
window.removeEventListener("resize",
|
|
1621
|
+
ce(() => {
|
|
1622
|
+
C.value = !0, k.value = localStorage.locale, window.addEventListener("storage", _), document.addEventListener("click", d, !0), document.addEventListener("keydown", i), window.addEventListener("scroll", y, !0);
|
|
1623
|
+
}), pe(() => {
|
|
1624
|
+
window.removeEventListener("resize", _), document.removeEventListener("click", d, !0), document.removeEventListener("keydown", i), window.removeEventListener("scroll", y, !0);
|
|
1625
1625
|
});
|
|
1626
|
-
function
|
|
1627
|
-
|
|
1626
|
+
function o() {
|
|
1627
|
+
u.value = !1;
|
|
1628
|
+
}
|
|
1629
|
+
n({ close: o });
|
|
1630
|
+
function b(x) {
|
|
1631
|
+
return Array.isArray(x) ? x.filter((D) => D != null && D !== "").length : x && typeof x == "object" ? Object.values(x).filter((D) => D != null && D !== "").length : typeof x == "string" ? x.trim() === "" ? 0 : 1 : typeof x == "number" ? Number.isNaN(x) ? 0 : 1 : x === null || x !== void 0 ? 1 : 0;
|
|
1628
1632
|
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
+
const p = L(() => {
|
|
1634
|
+
const x = v.fieldRef?.selectedLabels, D = b(x);
|
|
1635
|
+
return D > 0 ? D : b(v.currentValue);
|
|
1636
|
+
}), h = L(() => {
|
|
1637
|
+
const x = v.fieldRef?.selectedLabels;
|
|
1638
|
+
return !x || ["inline"].includes(v.layout || "") ? v[k.value] || (v.label ?? "") : Array.isArray(x) ? x.length > 0 ? x.join(", ") : v.label ?? "" : String(x);
|
|
1633
1639
|
});
|
|
1634
|
-
return (
|
|
1635
|
-
|
|
1636
|
-
onClick:
|
|
1637
|
-
disabled:
|
|
1640
|
+
return (x, D) => (s(), w("div", null, [
|
|
1641
|
+
r("button", {
|
|
1642
|
+
onClick: m,
|
|
1643
|
+
disabled: x.disabled,
|
|
1638
1644
|
ref_key: "triggerRef",
|
|
1639
|
-
ref:
|
|
1640
|
-
title:
|
|
1641
|
-
class:
|
|
1645
|
+
ref: a,
|
|
1646
|
+
title: x.label,
|
|
1647
|
+
class: U([
|
|
1648
|
+
t.value,
|
|
1649
|
+
x.width ? e(Le).getWidthClass(x.width) : "w-full",
|
|
1650
|
+
x.layout === "inline" && p.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
|
|
1651
|
+
]),
|
|
1652
|
+
type: "button"
|
|
1642
1653
|
}, [
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
(
|
|
1648
|
-
], 10,
|
|
1649
|
-
|
|
1654
|
+
r("span", kl, [
|
|
1655
|
+
r("span", Cl, S(h.value), 1),
|
|
1656
|
+
x.layout === "inline" && p.value > 0 ? (s(), w("span", _l, S(p.value), 1)) : V("", !0)
|
|
1657
|
+
]),
|
|
1658
|
+
Q(ve, { class: "ml-2 h-4 w-4 text-neutral-500" })
|
|
1659
|
+
], 10, wl),
|
|
1660
|
+
C.value ? (s(), E(ge, {
|
|
1650
1661
|
key: 0,
|
|
1651
1662
|
to: "body"
|
|
1652
1663
|
}, [
|
|
1653
|
-
|
|
1664
|
+
Y(r("div", {
|
|
1654
1665
|
ref_key: "popperRef",
|
|
1655
1666
|
ref: f,
|
|
1656
1667
|
class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
|
|
1657
|
-
style:
|
|
1668
|
+
style: be({ top: `${l.value.top}px`, left: `${l.value.left}px` }),
|
|
1658
1669
|
"data-inside-popover": ""
|
|
1659
1670
|
}, [
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1671
|
+
r("div", Vl, [
|
|
1672
|
+
r("div", $l, [
|
|
1673
|
+
ue(x.$slots, "default")
|
|
1663
1674
|
])
|
|
1664
1675
|
])
|
|
1665
1676
|
], 4), [
|
|
1666
|
-
[
|
|
1677
|
+
[J, u.value]
|
|
1667
1678
|
])
|
|
1668
|
-
])) :
|
|
1679
|
+
])) : V("", !0)
|
|
1669
1680
|
]));
|
|
1670
1681
|
}
|
|
1671
|
-
}),
|
|
1682
|
+
}), Al = {}, Sl = {
|
|
1672
1683
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1673
1684
|
width: "24",
|
|
1674
1685
|
height: "24",
|
|
@@ -1680,12 +1691,12 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1680
1691
|
"stroke-linejoin": "round",
|
|
1681
1692
|
class: "text-blue-600 w-[16px] h-[16px]"
|
|
1682
1693
|
};
|
|
1683
|
-
function
|
|
1684
|
-
return
|
|
1685
|
-
|
|
1686
|
-
])
|
|
1694
|
+
function Bl(c, n) {
|
|
1695
|
+
return s(), w("svg", Sl, n[0] || (n[0] = [
|
|
1696
|
+
r("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
|
1697
|
+
]));
|
|
1687
1698
|
}
|
|
1688
|
-
const
|
|
1699
|
+
const ae = /* @__PURE__ */ te(Al, [["render", Bl]]), Dl = {}, jl = {
|
|
1689
1700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1690
1701
|
width: "15px",
|
|
1691
1702
|
height: "24",
|
|
@@ -1697,17 +1708,17 @@ const ee = /* @__PURE__ */ G(xl, [["render", kl]]), wl = {}, Cl = {
|
|
|
1697
1708
|
"stroke-linejoin": "round",
|
|
1698
1709
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
|
|
1699
1710
|
};
|
|
1700
|
-
function
|
|
1701
|
-
return
|
|
1702
|
-
|
|
1711
|
+
function Rl(c, n) {
|
|
1712
|
+
return s(), w("svg", jl, n[0] || (n[0] = [
|
|
1713
|
+
r("path", {
|
|
1703
1714
|
stroke: "none",
|
|
1704
1715
|
d: "M0 0h24v24H0z",
|
|
1705
1716
|
fill: "none"
|
|
1706
1717
|
}, null, -1),
|
|
1707
|
-
|
|
1708
|
-
])
|
|
1718
|
+
r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1719
|
+
]));
|
|
1709
1720
|
}
|
|
1710
|
-
const
|
|
1721
|
+
const Kl = /* @__PURE__ */ te(Dl, [["render", Rl]]), Fl = {}, Ml = {
|
|
1711
1722
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1712
1723
|
width: "15px",
|
|
1713
1724
|
height: "24",
|
|
@@ -1719,21 +1730,21 @@ const $l = /* @__PURE__ */ G(wl, [["render", Vl]]), Sl = {}, Al = {
|
|
|
1719
1730
|
"stroke-linejoin": "round",
|
|
1720
1731
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
|
|
1721
1732
|
};
|
|
1722
|
-
function
|
|
1723
|
-
return
|
|
1724
|
-
|
|
1733
|
+
function Ll(c, n) {
|
|
1734
|
+
return s(), w("svg", Ml, n[0] || (n[0] = [
|
|
1735
|
+
r("path", {
|
|
1725
1736
|
stroke: "none",
|
|
1726
1737
|
d: "M0 0h24v24H0z",
|
|
1727
1738
|
fill: "none"
|
|
1728
1739
|
}, null, -1),
|
|
1729
|
-
|
|
1730
|
-
])
|
|
1740
|
+
r("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1741
|
+
]));
|
|
1731
1742
|
}
|
|
1732
|
-
const
|
|
1743
|
+
const El = /* @__PURE__ */ te(Fl, [["render", Ll]]), Ol = { class: "flex" }, Tl = { class: "mb-1" }, Il = { class: "mb-1" }, Ul = { class: "inline-flex rounded-sm shrink-0 pl-1" }, zl = ["title"], Nl = { class: "inline-flex rounded-sm shrink-0 pl-1" }, Pl = ["title"], Yl = {
|
|
1733
1744
|
key: 1,
|
|
1734
|
-
class: "flex gap-1 !w-[75%] rounded-
|
|
1735
|
-
},
|
|
1736
|
-
const
|
|
1745
|
+
class: "flex gap-1 !w-[75%] rounded-sm"
|
|
1746
|
+
}, Wl = ["max", "disabled"], ql = ["min", "disabled"];
|
|
1747
|
+
const Ql = /* @__PURE__ */ W({
|
|
1737
1748
|
__name: "date-input-inline",
|
|
1738
1749
|
props: {
|
|
1739
1750
|
id: {},
|
|
@@ -1761,176 +1772,258 @@ const Ul = /* @__PURE__ */ U({
|
|
|
1761
1772
|
ua: {}
|
|
1762
1773
|
},
|
|
1763
1774
|
emits: ["update:modelValue", "change", "clear"],
|
|
1764
|
-
setup(
|
|
1765
|
-
const
|
|
1766
|
-
activeMode:
|
|
1775
|
+
setup(c, { expose: n, emit: v }) {
|
|
1776
|
+
const t = se(), u = c, l = v, g = $(null), {
|
|
1777
|
+
activeMode: a,
|
|
1767
1778
|
innerValue: f,
|
|
1768
|
-
onSelectChange:
|
|
1769
|
-
nextClick:
|
|
1770
|
-
prevClick:
|
|
1771
|
-
currentLabel:
|
|
1772
|
-
clear:
|
|
1779
|
+
onSelectChange: y,
|
|
1780
|
+
nextClick: m,
|
|
1781
|
+
prevClick: d,
|
|
1782
|
+
currentLabel: i,
|
|
1783
|
+
clear: C
|
|
1773
1784
|
} = Te({
|
|
1774
|
-
...
|
|
1775
|
-
popoverRef:
|
|
1776
|
-
},
|
|
1777
|
-
return
|
|
1778
|
-
|
|
1785
|
+
...u,
|
|
1786
|
+
popoverRef: g
|
|
1787
|
+
}, l);
|
|
1788
|
+
return I(() => u.modelValue, (k) => {
|
|
1789
|
+
k !== void 0 ? (f.value = k, l("update:modelValue", k)) : (a.value = "", f.value = []);
|
|
1779
1790
|
}), n({
|
|
1780
|
-
clear:
|
|
1781
|
-
popoverRef:
|
|
1782
|
-
}), (
|
|
1783
|
-
|
|
1784
|
-
|
|
1791
|
+
clear: C,
|
|
1792
|
+
popoverRef: g
|
|
1793
|
+
}), (k, _) => (s(), w(T, null, [
|
|
1794
|
+
r("div", Ol, [
|
|
1795
|
+
Q(_e, {
|
|
1785
1796
|
ref_key: "popoverRef",
|
|
1786
|
-
ref:
|
|
1787
|
-
label: e(
|
|
1797
|
+
ref: g,
|
|
1798
|
+
label: e(i),
|
|
1788
1799
|
"current-value": e(f),
|
|
1789
|
-
mode:
|
|
1790
|
-
|
|
1791
|
-
|
|
1800
|
+
mode: k.mode,
|
|
1801
|
+
width: typeof k.width == "number" && e(f).length ? k.width - 70 : k.width,
|
|
1802
|
+
onClear: e(C),
|
|
1803
|
+
layout: k.layout
|
|
1792
1804
|
}, {
|
|
1793
|
-
default:
|
|
1794
|
-
|
|
1795
|
-
|
|
1805
|
+
default: oe(() => [
|
|
1806
|
+
r("div", null, [
|
|
1807
|
+
r("button", {
|
|
1796
1808
|
type: "button",
|
|
1797
|
-
onClick:
|
|
1798
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1809
|
+
onClick: _[0] || (_[0] = (o) => e(y)("range")),
|
|
1810
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1799
1811
|
}, [
|
|
1800
|
-
|
|
1801
|
-
e(
|
|
1812
|
+
G(S(e(t)("filter.period")) + " ", 1),
|
|
1813
|
+
e(a) === "range" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1802
1814
|
])
|
|
1803
1815
|
]),
|
|
1804
|
-
|
|
1805
|
-
|
|
1816
|
+
_[12] || (_[12] = r("div", null, [
|
|
1817
|
+
r("div", { class: "pt-1 mt-1 border-t" })
|
|
1806
1818
|
], -1)),
|
|
1807
|
-
|
|
1808
|
-
|
|
1819
|
+
r("div", null, [
|
|
1820
|
+
r("button", {
|
|
1809
1821
|
type: "button",
|
|
1810
|
-
onClick:
|
|
1811
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1822
|
+
onClick: _[1] || (_[1] = (o) => e(y)("today")),
|
|
1823
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1812
1824
|
}, [
|
|
1813
|
-
|
|
1814
|
-
e(
|
|
1825
|
+
G(S(e(t)("filter.today")) + " ", 1),
|
|
1826
|
+
e(a) === "today" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1815
1827
|
])
|
|
1816
1828
|
]),
|
|
1817
|
-
|
|
1818
|
-
|
|
1829
|
+
r("div", null, [
|
|
1830
|
+
r("button", {
|
|
1819
1831
|
type: "button",
|
|
1820
|
-
onClick:
|
|
1821
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1832
|
+
onClick: _[2] || (_[2] = (o) => e(y)("week")),
|
|
1833
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1822
1834
|
}, [
|
|
1823
|
-
|
|
1824
|
-
e(
|
|
1835
|
+
G(S(e(t)("filter.week")) + " ", 1),
|
|
1836
|
+
e(a) === "week" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1825
1837
|
])
|
|
1826
1838
|
]),
|
|
1827
|
-
|
|
1828
|
-
|
|
1839
|
+
r("div", null, [
|
|
1840
|
+
r("button", {
|
|
1829
1841
|
type: "button",
|
|
1830
|
-
onClick:
|
|
1831
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1842
|
+
onClick: _[3] || (_[3] = (o) => e(y)("month")),
|
|
1843
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1832
1844
|
}, [
|
|
1833
|
-
|
|
1834
|
-
e(
|
|
1845
|
+
G(S(e(t)("filter.month")) + " ", 1),
|
|
1846
|
+
e(a) === "month" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1835
1847
|
])
|
|
1836
1848
|
]),
|
|
1837
|
-
|
|
1838
|
-
|
|
1849
|
+
r("div", null, [
|
|
1850
|
+
r("button", {
|
|
1839
1851
|
type: "button",
|
|
1840
|
-
onClick:
|
|
1841
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1852
|
+
onClick: _[4] || (_[4] = (o) => e(y)("quarter")),
|
|
1853
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1842
1854
|
}, [
|
|
1843
|
-
|
|
1844
|
-
e(
|
|
1855
|
+
G(S(e(t)("filter.quarter")) + " ", 1),
|
|
1856
|
+
e(a) === "quarter" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1845
1857
|
])
|
|
1846
1858
|
]),
|
|
1847
|
-
|
|
1848
|
-
|
|
1859
|
+
r("div", Tl, [
|
|
1860
|
+
r("button", {
|
|
1849
1861
|
type: "button",
|
|
1850
|
-
onClick:
|
|
1851
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1862
|
+
onClick: _[5] || (_[5] = (o) => e(y)("year")),
|
|
1863
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1852
1864
|
}, [
|
|
1853
|
-
|
|
1854
|
-
e(
|
|
1865
|
+
G(S(e(t)("filter.year")) + " ", 1),
|
|
1866
|
+
e(a) === "year" ? (s(), E(ae, { key: 0 })) : V("", !0)
|
|
1855
1867
|
])
|
|
1856
1868
|
]),
|
|
1857
|
-
|
|
1858
|
-
|
|
1869
|
+
r("div", Il, [
|
|
1870
|
+
r("button", {
|
|
1859
1871
|
type: "button",
|
|
1860
|
-
onClick:
|
|
1861
|
-
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-
|
|
1872
|
+
onClick: _[6] || (_[6] = (o) => e(C)()),
|
|
1873
|
+
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
1862
1874
|
}, [
|
|
1863
|
-
|
|
1864
|
-
e(f)[0] ?
|
|
1875
|
+
G(S(e(t)("filter.alltime")) + " ", 1),
|
|
1876
|
+
e(f)[0] ? V("", !0) : (s(), E(ae, { key: 0 }))
|
|
1865
1877
|
])
|
|
1866
1878
|
])
|
|
1867
1879
|
]),
|
|
1868
|
-
_: 1
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1880
|
+
_: 1,
|
|
1881
|
+
__: [12]
|
|
1882
|
+
}, 8, ["label", "current-value", "mode", "width", "onClear", "layout"]),
|
|
1883
|
+
e(a) !== "" && e(a) !== "range" && e(a) !== "last_7_days" ? (s(), w(T, { key: 0 }, [
|
|
1884
|
+
r("div", Ul, [
|
|
1885
|
+
r("button", {
|
|
1873
1886
|
type: "button",
|
|
1874
|
-
title: e(
|
|
1887
|
+
title: e(t)("filter.prev"),
|
|
1875
1888
|
class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
|
|
1876
|
-
onClick:
|
|
1877
|
-
(...
|
|
1889
|
+
onClick: _[7] || (_[7] = //@ts-ignore
|
|
1890
|
+
(...o) => e(d) && e(d)(...o))
|
|
1878
1891
|
}, [
|
|
1879
|
-
|
|
1880
|
-
], 8,
|
|
1892
|
+
Q(Kl)
|
|
1893
|
+
], 8, zl)
|
|
1881
1894
|
]),
|
|
1882
|
-
|
|
1883
|
-
|
|
1895
|
+
r("div", Nl, [
|
|
1896
|
+
r("button", {
|
|
1884
1897
|
type: "button",
|
|
1885
|
-
title: e(
|
|
1898
|
+
title: e(t)("filter.next"),
|
|
1886
1899
|
class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
|
|
1887
|
-
onClick:
|
|
1888
|
-
(...
|
|
1900
|
+
onClick: _[8] || (_[8] = //@ts-ignore
|
|
1901
|
+
(...o) => e(m) && e(m)(...o))
|
|
1889
1902
|
}, [
|
|
1890
|
-
|
|
1891
|
-
], 8,
|
|
1903
|
+
Q(El)
|
|
1904
|
+
], 8, Pl)
|
|
1892
1905
|
])
|
|
1893
|
-
], 64)) :
|
|
1894
|
-
e(
|
|
1895
|
-
|
|
1906
|
+
], 64)) : V("", !0),
|
|
1907
|
+
e(a) !== "" && e(a) === "range" ? (s(), w("div", Yl, [
|
|
1908
|
+
Y(r("input", {
|
|
1896
1909
|
type: "date",
|
|
1897
1910
|
max: e(f)[1],
|
|
1898
1911
|
locale: "uk-UA",
|
|
1899
|
-
"onUpdate:modelValue":
|
|
1900
|
-
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-
|
|
1901
|
-
disabled:
|
|
1902
|
-
}, null, 8,
|
|
1903
|
-
[
|
|
1912
|
+
"onUpdate:modelValue": _[9] || (_[9] = (o) => e(f)[0] = o),
|
|
1913
|
+
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
|
|
1914
|
+
disabled: k.disabled
|
|
1915
|
+
}, null, 8, Wl), [
|
|
1916
|
+
[ee, e(f)[0]]
|
|
1904
1917
|
]),
|
|
1905
|
-
|
|
1918
|
+
Y(r("input", {
|
|
1906
1919
|
type: "date",
|
|
1907
1920
|
min: e(f)[0],
|
|
1908
1921
|
locale: "uk-UA",
|
|
1909
|
-
"onUpdate:modelValue":
|
|
1910
|
-
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-
|
|
1911
|
-
disabled:
|
|
1912
|
-
}, null, 8,
|
|
1913
|
-
[
|
|
1922
|
+
"onUpdate:modelValue": _[10] || (_[10] = (o) => e(f)[1] = o),
|
|
1923
|
+
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
|
|
1924
|
+
disabled: k.disabled
|
|
1925
|
+
}, null, 8, ql), [
|
|
1926
|
+
[ee, e(f)[1]]
|
|
1914
1927
|
])
|
|
1915
|
-
])) :
|
|
1928
|
+
])) : V("", !0)
|
|
1916
1929
|
]),
|
|
1917
|
-
(
|
|
1930
|
+
(k.cleanable, V("", !0))
|
|
1918
1931
|
], 64));
|
|
1919
1932
|
}
|
|
1920
|
-
}),
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1933
|
+
}), Hl = { class: "flex flex-wrap items-center gap-2" }, Gl = ["disabled", "onClick"], Xl = {
|
|
1934
|
+
key: 0,
|
|
1935
|
+
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1936
|
+
}, Zl = /* @__PURE__ */ W({
|
|
1937
|
+
__name: "button-field",
|
|
1938
|
+
props: {
|
|
1939
|
+
id: {},
|
|
1940
|
+
name: {},
|
|
1941
|
+
title: {},
|
|
1942
|
+
type: {},
|
|
1943
|
+
label: {},
|
|
1944
|
+
width: {},
|
|
1945
|
+
options: { default: () => [] },
|
|
1946
|
+
placeholder: {},
|
|
1947
|
+
api: {},
|
|
1948
|
+
data: {},
|
|
1949
|
+
default: {},
|
|
1950
|
+
modelValue: {},
|
|
1951
|
+
disabled: { type: Boolean, default: !1 },
|
|
1952
|
+
layout: { default: "inline" },
|
|
1953
|
+
cleanable: { type: Boolean },
|
|
1954
|
+
limit: {},
|
|
1955
|
+
multi: { type: Boolean },
|
|
1956
|
+
dataKey: {},
|
|
1957
|
+
valueKey: {},
|
|
1958
|
+
mode: {},
|
|
1959
|
+
labelKey: {},
|
|
1960
|
+
sort: {},
|
|
1961
|
+
ua: {}
|
|
1962
|
+
},
|
|
1963
|
+
emits: ["update:modelValue", "change", "clear"],
|
|
1964
|
+
setup(c, { expose: n, emit: v }) {
|
|
1965
|
+
const t = c, u = v, {
|
|
1966
|
+
innerValue: l,
|
|
1967
|
+
isSelected: g,
|
|
1968
|
+
selectItem: a,
|
|
1969
|
+
clear: f,
|
|
1970
|
+
labelKey: y,
|
|
1971
|
+
valueKey: m,
|
|
1972
|
+
allOptions: d
|
|
1973
|
+
} = xe({
|
|
1974
|
+
...t,
|
|
1975
|
+
modelValue: t.modelValue ?? t.default ?? ""
|
|
1976
|
+
}, u), i = L(() => l.value !== void 0 && !(typeof l.value == "string" && l.value === "")), C = L(() => i.value ? 1 : 0);
|
|
1977
|
+
function k(o) {
|
|
1978
|
+
return g(o) ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200";
|
|
1979
|
+
}
|
|
1980
|
+
function _(o) {
|
|
1981
|
+
t.disabled || a(o);
|
|
1982
|
+
}
|
|
1983
|
+
return n({
|
|
1984
|
+
clear: f
|
|
1985
|
+
}), I(
|
|
1986
|
+
() => t.modelValue,
|
|
1987
|
+
(o) => {
|
|
1988
|
+
o === void 0 && (l.value = void 0);
|
|
1989
|
+
}
|
|
1990
|
+
), (o, b) => (s(), w(T, null, [
|
|
1991
|
+
r("div", Hl, [
|
|
1992
|
+
(s(!0), w(T, null, X(e(d), (p) => (s(), w("button", {
|
|
1993
|
+
key: p[e(m)],
|
|
1994
|
+
type: "button",
|
|
1995
|
+
class: U(["px-3 py-1.5 text-sm font-medium rounded-md transition-colors", k(p)]),
|
|
1996
|
+
disabled: o.disabled,
|
|
1997
|
+
onClick: (h) => _(p)
|
|
1998
|
+
}, S(p[e(y)]), 11, Gl))), 128))
|
|
1999
|
+
]),
|
|
2000
|
+
o.cleanable && o.layout === "popover" ? (s(), w("div", Xl, [
|
|
2001
|
+
r("span", null, S(C.value) + " з " + S(e(d).length) + " обрано", 1),
|
|
2002
|
+
Y(r("button", {
|
|
2003
|
+
class: "text-gray-600 hover:text-gray-800",
|
|
2004
|
+
onClick: b[0] || (b[0] = //@ts-ignore
|
|
2005
|
+
(...p) => e(f) && e(f)(...p))
|
|
2006
|
+
}, " Очистити ", 512), [
|
|
2007
|
+
[J, i.value]
|
|
2008
|
+
])
|
|
2009
|
+
])) : V("", !0)
|
|
2010
|
+
], 64));
|
|
2011
|
+
}
|
|
2012
|
+
}), De = {
|
|
2013
|
+
radio: xt,
|
|
2014
|
+
checkbox: Be,
|
|
2015
|
+
check: Be,
|
|
2016
|
+
text: Lt,
|
|
2017
|
+
range: Yt,
|
|
2018
|
+
date: nl,
|
|
2019
|
+
select: ml,
|
|
2020
|
+
tag: xl,
|
|
2021
|
+
button: Zl,
|
|
2022
|
+
"date:inline": Ql
|
|
1930
2023
|
};
|
|
1931
|
-
function
|
|
2024
|
+
function Ve(c, n) {
|
|
1932
2025
|
let v;
|
|
1933
|
-
switch (
|
|
2026
|
+
switch (c.toLowerCase()) {
|
|
1934
2027
|
case "autocomplete":
|
|
1935
2028
|
v = "select";
|
|
1936
2029
|
break;
|
|
@@ -1938,14 +2031,14 @@ function he(t, n) {
|
|
|
1938
2031
|
v = "checkbox";
|
|
1939
2032
|
break;
|
|
1940
2033
|
default:
|
|
1941
|
-
v =
|
|
2034
|
+
v = c?.toString().toLowerCase();
|
|
1942
2035
|
}
|
|
1943
2036
|
return v === "date" && n && n === "inline" && (v = "date:inline"), {
|
|
1944
|
-
component:
|
|
2037
|
+
component: De[v] || De.text,
|
|
1945
2038
|
type: v
|
|
1946
2039
|
};
|
|
1947
2040
|
}
|
|
1948
|
-
const
|
|
2041
|
+
const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, eo = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, to = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, lo = { class: "flex items-center" }, oo = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, no = { class: "filter-layout__body" }, ao = /* @__PURE__ */ W({
|
|
1949
2042
|
__name: "vertical-layout",
|
|
1950
2043
|
props: {
|
|
1951
2044
|
id: {},
|
|
@@ -1973,69 +2066,69 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
1973
2066
|
ua: {}
|
|
1974
2067
|
},
|
|
1975
2068
|
emits: ["update:modelValue", "change", "clear"],
|
|
1976
|
-
setup(
|
|
1977
|
-
const
|
|
1978
|
-
get: () =>
|
|
1979
|
-
set: (
|
|
2069
|
+
setup(c, { expose: n, emit: v }) {
|
|
2070
|
+
const t = c, u = v, l = $(), g = Ve(t.type, t.layout), a = L({
|
|
2071
|
+
get: () => t.modelValue,
|
|
2072
|
+
set: (d) => u("update:modelValue", d)
|
|
1980
2073
|
});
|
|
1981
|
-
function f(
|
|
1982
|
-
|
|
2074
|
+
function f(d) {
|
|
2075
|
+
u("clear", d);
|
|
1983
2076
|
}
|
|
1984
|
-
function
|
|
1985
|
-
|
|
2077
|
+
function y(d, i) {
|
|
2078
|
+
u("change", { name: d, value: i }), t.modelValue !== void 0 && u("update:modelValue", i);
|
|
1986
2079
|
}
|
|
1987
|
-
function
|
|
1988
|
-
|
|
2080
|
+
function m() {
|
|
2081
|
+
u("clear", t.name);
|
|
1989
2082
|
}
|
|
1990
|
-
return
|
|
1991
|
-
() =>
|
|
1992
|
-
(
|
|
1993
|
-
|
|
2083
|
+
return I(
|
|
2084
|
+
() => t.default,
|
|
2085
|
+
(d) => {
|
|
2086
|
+
a.value = d;
|
|
1994
2087
|
}
|
|
1995
|
-
),
|
|
1996
|
-
() =>
|
|
1997
|
-
(
|
|
1998
|
-
|
|
2088
|
+
), I(
|
|
2089
|
+
() => t.modelValue,
|
|
2090
|
+
(d) => {
|
|
2091
|
+
a.value = d;
|
|
1999
2092
|
}
|
|
2000
2093
|
), n({
|
|
2001
|
-
filterRef:
|
|
2002
|
-
}), (
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2094
|
+
filterRef: l
|
|
2095
|
+
}), (d, i) => (s(), w("div", Jl, [
|
|
2096
|
+
r("div", eo, [
|
|
2097
|
+
r("div", to, [
|
|
2098
|
+
r("div", lo, [
|
|
2099
|
+
r("span", oo, S(d.label), 1)
|
|
2007
2100
|
]),
|
|
2008
|
-
typeof
|
|
2101
|
+
typeof a.value == "string" && a.value.trim() !== "" || Array.isArray(a.value) && a.value.length > 0 && a.value.some((C) => C !== void 0) || a.value === null ? (s(), E(Je, {
|
|
2009
2102
|
key: 0,
|
|
2010
|
-
onClick:
|
|
2011
|
-
})) :
|
|
2103
|
+
onClick: m
|
|
2104
|
+
})) : V("", !0)
|
|
2012
2105
|
]),
|
|
2013
|
-
|
|
2014
|
-
e(
|
|
2015
|
-
type: e(
|
|
2016
|
-
onChange:
|
|
2017
|
-
onClear:
|
|
2106
|
+
r("div", no, [
|
|
2107
|
+
e(g)?.type !== "select" ? (s(), E(ne(e(g)?.component), Z({ key: 0 }, t, {
|
|
2108
|
+
type: e(g)?.type,
|
|
2109
|
+
onChange: i[0] || (i[0] = (C) => y(C.name, C.value)),
|
|
2110
|
+
onClear: i[1] || (i[1] = (C) => f(C)),
|
|
2018
2111
|
ref_key: "filterRef",
|
|
2019
|
-
ref:
|
|
2020
|
-
}), null, 16, ["type"])) : (
|
|
2112
|
+
ref: l
|
|
2113
|
+
}), null, 16, ["type"])) : (s(), E(_e, {
|
|
2021
2114
|
key: 1,
|
|
2022
|
-
"current-value":
|
|
2023
|
-
label:
|
|
2024
|
-
mode:
|
|
2025
|
-
onClear:
|
|
2026
|
-
fieldRef:
|
|
2115
|
+
"current-value": a.value,
|
|
2116
|
+
label: d.label,
|
|
2117
|
+
mode: d.mode,
|
|
2118
|
+
onClear: m,
|
|
2119
|
+
fieldRef: l.value,
|
|
2027
2120
|
width: void 0,
|
|
2028
|
-
disabled:
|
|
2121
|
+
disabled: d.disabled,
|
|
2029
2122
|
layout: "vertical"
|
|
2030
2123
|
}, {
|
|
2031
|
-
default:
|
|
2032
|
-
(
|
|
2124
|
+
default: oe(() => [
|
|
2125
|
+
(s(), E(ne(e(g)?.component), Z({
|
|
2033
2126
|
ref_key: "filterRef",
|
|
2034
|
-
ref:
|
|
2035
|
-
},
|
|
2036
|
-
type: e(
|
|
2037
|
-
onChange:
|
|
2038
|
-
onClear:
|
|
2127
|
+
ref: l
|
|
2128
|
+
}, t, {
|
|
2129
|
+
type: e(g)?.type,
|
|
2130
|
+
onChange: i[2] || (i[2] = (C) => y(C.name, C.value)),
|
|
2131
|
+
onClear: i[3] || (i[3] = (C) => f(C))
|
|
2039
2132
|
}), null, 16, ["type"]))
|
|
2040
2133
|
]),
|
|
2041
2134
|
_: 1
|
|
@@ -2044,7 +2137,7 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2044
2137
|
])
|
|
2045
2138
|
]));
|
|
2046
2139
|
}
|
|
2047
|
-
}),
|
|
2140
|
+
}), je = /* @__PURE__ */ W({
|
|
2048
2141
|
__name: "inline-layout",
|
|
2049
2142
|
props: {
|
|
2050
2143
|
id: {},
|
|
@@ -2072,63 +2165,63 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2072
2165
|
ua: {}
|
|
2073
2166
|
},
|
|
2074
2167
|
emits: ["update:modelValue", "change", "clear"],
|
|
2075
|
-
setup(
|
|
2076
|
-
const
|
|
2077
|
-
get: () =>
|
|
2078
|
-
set: (
|
|
2168
|
+
setup(c, { expose: n, emit: v }) {
|
|
2169
|
+
const t = c, u = v, l = $(), g = Ve(t.type, t.layout), a = L({
|
|
2170
|
+
get: () => t.modelValue,
|
|
2171
|
+
set: (m) => u("update:modelValue", m)
|
|
2079
2172
|
});
|
|
2080
|
-
function f(
|
|
2081
|
-
|
|
2173
|
+
function f(m = t.name) {
|
|
2174
|
+
u("clear", m);
|
|
2082
2175
|
}
|
|
2083
|
-
function
|
|
2084
|
-
|
|
2176
|
+
function y(m, d) {
|
|
2177
|
+
u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
|
|
2085
2178
|
}
|
|
2086
|
-
return
|
|
2087
|
-
() =>
|
|
2088
|
-
(
|
|
2089
|
-
|
|
2179
|
+
return I(
|
|
2180
|
+
() => t.default,
|
|
2181
|
+
(m) => {
|
|
2182
|
+
a.value = m;
|
|
2090
2183
|
}
|
|
2091
|
-
),
|
|
2092
|
-
() =>
|
|
2093
|
-
(
|
|
2094
|
-
|
|
2184
|
+
), I(
|
|
2185
|
+
() => t.modelValue,
|
|
2186
|
+
(m) => {
|
|
2187
|
+
a.value = m;
|
|
2095
2188
|
}
|
|
2096
2189
|
), n({
|
|
2097
|
-
filterRef:
|
|
2098
|
-
}), (
|
|
2099
|
-
type: e(
|
|
2100
|
-
onChange:
|
|
2101
|
-
onClear:
|
|
2102
|
-
disabled:
|
|
2103
|
-
modelValue:
|
|
2104
|
-
"onUpdate:modelValue":
|
|
2105
|
-
}), null, 16, ["type", "disabled", "modelValue"])) : (
|
|
2190
|
+
filterRef: l
|
|
2191
|
+
}), (m, d) => ["text", "date", "button"].includes(m.type.toLocaleLowerCase()) ? (s(), E(ne(e(g)?.component), Z({ key: 0 }, t, {
|
|
2192
|
+
type: e(g)?.type,
|
|
2193
|
+
onChange: d[0] || (d[0] = (i) => y(i.name, i.value)),
|
|
2194
|
+
onClear: d[1] || (d[1] = (i) => f(i)),
|
|
2195
|
+
disabled: m.disabled,
|
|
2196
|
+
modelValue: a.value,
|
|
2197
|
+
"onUpdate:modelValue": d[2] || (d[2] = (i) => a.value = i)
|
|
2198
|
+
}), null, 16, ["type", "disabled", "modelValue"])) : (s(), E(_e, {
|
|
2106
2199
|
key: 1,
|
|
2107
|
-
"current-value":
|
|
2108
|
-
label:
|
|
2109
|
-
mode:
|
|
2200
|
+
"current-value": a.value,
|
|
2201
|
+
label: m.label,
|
|
2202
|
+
mode: m.mode,
|
|
2110
2203
|
onClear: f,
|
|
2111
|
-
fieldRef:
|
|
2112
|
-
width:
|
|
2113
|
-
disabled:
|
|
2204
|
+
fieldRef: l.value,
|
|
2205
|
+
width: t.width,
|
|
2206
|
+
disabled: m.disabled,
|
|
2114
2207
|
layout: "inline"
|
|
2115
2208
|
}, {
|
|
2116
|
-
default:
|
|
2117
|
-
(
|
|
2209
|
+
default: oe(() => [
|
|
2210
|
+
(s(), E(ne(e(g)?.component), Z({
|
|
2118
2211
|
ref_key: "filterRef",
|
|
2119
|
-
ref:
|
|
2120
|
-
},
|
|
2121
|
-
modelValue:
|
|
2122
|
-
"onUpdate:modelValue":
|
|
2123
|
-
type: e(
|
|
2124
|
-
onChange:
|
|
2125
|
-
onClear:
|
|
2212
|
+
ref: l
|
|
2213
|
+
}, t, {
|
|
2214
|
+
modelValue: a.value,
|
|
2215
|
+
"onUpdate:modelValue": d[3] || (d[3] = (i) => a.value = i),
|
|
2216
|
+
type: e(g)?.type,
|
|
2217
|
+
onChange: d[4] || (d[4] = (i) => y(i.name, i.value)),
|
|
2218
|
+
onClear: d[5] || (d[5] = (i) => f(i))
|
|
2126
2219
|
}), null, 16, ["modelValue", "type"]))
|
|
2127
2220
|
]),
|
|
2128
2221
|
_: 1
|
|
2129
2222
|
}, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
|
|
2130
2223
|
}
|
|
2131
|
-
}),
|
|
2224
|
+
}), ro = /* @__PURE__ */ W({
|
|
2132
2225
|
__name: "popover-layout",
|
|
2133
2226
|
props: {
|
|
2134
2227
|
id: {},
|
|
@@ -2156,45 +2249,45 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2156
2249
|
ua: {}
|
|
2157
2250
|
},
|
|
2158
2251
|
emits: ["update:modelValue", "change", "clear"],
|
|
2159
|
-
setup(
|
|
2160
|
-
const
|
|
2161
|
-
get: () =>
|
|
2162
|
-
set: (
|
|
2252
|
+
setup(c, { expose: n, emit: v }) {
|
|
2253
|
+
const t = c, u = v, l = $(), g = $(Ve(t.type, t.layout)), a = L({
|
|
2254
|
+
get: () => t.modelValue,
|
|
2255
|
+
set: (m) => u("update:modelValue", m)
|
|
2163
2256
|
});
|
|
2164
|
-
function f(
|
|
2165
|
-
|
|
2257
|
+
function f(m) {
|
|
2258
|
+
u("clear", m);
|
|
2166
2259
|
}
|
|
2167
|
-
function
|
|
2168
|
-
|
|
2260
|
+
function y(m, d) {
|
|
2261
|
+
u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
|
|
2169
2262
|
}
|
|
2170
|
-
return
|
|
2171
|
-
() =>
|
|
2172
|
-
(
|
|
2173
|
-
|
|
2263
|
+
return I(
|
|
2264
|
+
() => t.default,
|
|
2265
|
+
(m) => {
|
|
2266
|
+
a.value = m;
|
|
2174
2267
|
}
|
|
2175
|
-
),
|
|
2176
|
-
() =>
|
|
2177
|
-
(
|
|
2178
|
-
|
|
2268
|
+
), I(
|
|
2269
|
+
() => t.modelValue,
|
|
2270
|
+
(m) => {
|
|
2271
|
+
a.value = m;
|
|
2179
2272
|
}
|
|
2180
|
-
),
|
|
2181
|
-
() =>
|
|
2182
|
-
(
|
|
2183
|
-
|
|
2273
|
+
), I(
|
|
2274
|
+
() => t,
|
|
2275
|
+
(m) => {
|
|
2276
|
+
a.value = m;
|
|
2184
2277
|
}
|
|
2185
2278
|
), n({
|
|
2186
|
-
filterRef:
|
|
2187
|
-
}), (
|
|
2188
|
-
type:
|
|
2189
|
-
modelValue:
|
|
2190
|
-
"onUpdate:modelValue":
|
|
2191
|
-
onChange:
|
|
2192
|
-
onClear:
|
|
2279
|
+
filterRef: l
|
|
2280
|
+
}), (m, d) => (s(), E(ne(g.value?.component), Z(t, {
|
|
2281
|
+
type: g.value?.type,
|
|
2282
|
+
modelValue: a.value,
|
|
2283
|
+
"onUpdate:modelValue": d[0] || (d[0] = (i) => a.value = i),
|
|
2284
|
+
onChange: d[1] || (d[1] = (i) => y(i.name, i.value)),
|
|
2285
|
+
onClear: d[2] || (d[2] = (i) => f(i)),
|
|
2193
2286
|
ref_key: "filterRef",
|
|
2194
|
-
ref:
|
|
2287
|
+
ref: l
|
|
2195
2288
|
}), null, 16, ["type", "modelValue"]));
|
|
2196
2289
|
}
|
|
2197
|
-
}), le = /* @__PURE__ */
|
|
2290
|
+
}), le = /* @__PURE__ */ W({
|
|
2198
2291
|
__name: "filter-field",
|
|
2199
2292
|
props: {
|
|
2200
2293
|
id: {},
|
|
@@ -2222,182 +2315,182 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2222
2315
|
ua: {}
|
|
2223
2316
|
},
|
|
2224
2317
|
emits: ["update:modelValue", "change", "clear"],
|
|
2225
|
-
setup(
|
|
2226
|
-
const
|
|
2227
|
-
get: () =>
|
|
2228
|
-
set: (
|
|
2318
|
+
setup(c, { expose: n, emit: v }) {
|
|
2319
|
+
const t = c, u = v, l = $(), g = L({
|
|
2320
|
+
get: () => t.modelValue,
|
|
2321
|
+
set: (m) => u("update:modelValue", m)
|
|
2229
2322
|
});
|
|
2230
|
-
function
|
|
2231
|
-
|
|
2323
|
+
function a(m) {
|
|
2324
|
+
u("clear", m);
|
|
2232
2325
|
}
|
|
2233
|
-
function f(
|
|
2234
|
-
|
|
2326
|
+
function f(m, d) {
|
|
2327
|
+
u("change", { name: m, value: d }), t.modelValue !== void 0 && u("update:modelValue", d);
|
|
2235
2328
|
}
|
|
2236
|
-
|
|
2237
|
-
() =>
|
|
2238
|
-
(
|
|
2239
|
-
|
|
2329
|
+
I(
|
|
2330
|
+
() => t.default,
|
|
2331
|
+
(m) => {
|
|
2332
|
+
g.value = m;
|
|
2240
2333
|
}
|
|
2241
|
-
),
|
|
2242
|
-
() =>
|
|
2243
|
-
(
|
|
2244
|
-
|
|
2334
|
+
), I(
|
|
2335
|
+
() => t.modelValue,
|
|
2336
|
+
(m) => {
|
|
2337
|
+
g.value = m;
|
|
2245
2338
|
}
|
|
2246
2339
|
), n({
|
|
2247
|
-
filterRef:
|
|
2340
|
+
filterRef: l
|
|
2248
2341
|
});
|
|
2249
|
-
function
|
|
2250
|
-
switch (
|
|
2342
|
+
function y() {
|
|
2343
|
+
switch (t.layout) {
|
|
2251
2344
|
case "inline":
|
|
2252
|
-
return
|
|
2345
|
+
return je;
|
|
2253
2346
|
case "vertical":
|
|
2254
|
-
return
|
|
2347
|
+
return ao;
|
|
2255
2348
|
case "popover":
|
|
2256
|
-
return
|
|
2349
|
+
return ro;
|
|
2257
2350
|
default:
|
|
2258
|
-
return
|
|
2351
|
+
return je;
|
|
2259
2352
|
}
|
|
2260
2353
|
}
|
|
2261
|
-
return (
|
|
2262
|
-
onChange:
|
|
2263
|
-
onClear:
|
|
2264
|
-
modelValue:
|
|
2265
|
-
"onUpdate:modelValue":
|
|
2354
|
+
return (m, d) => (s(), E(ne(y()), Z(t, {
|
|
2355
|
+
onChange: d[0] || (d[0] = (i) => f(i.name, i.value)),
|
|
2356
|
+
onClear: d[1] || (d[1] = (i) => a(i)),
|
|
2357
|
+
modelValue: g.value,
|
|
2358
|
+
"onUpdate:modelValue": d[2] || (d[2] = (i) => g.value = i)
|
|
2266
2359
|
}), null, 16, ["modelValue"]));
|
|
2267
2360
|
}
|
|
2268
2361
|
});
|
|
2269
|
-
function
|
|
2362
|
+
function ye(c, n) {
|
|
2270
2363
|
const {
|
|
2271
2364
|
slots: v
|
|
2272
|
-
} =
|
|
2273
|
-
function
|
|
2274
|
-
delete
|
|
2275
|
-
data:
|
|
2276
|
-
name:
|
|
2365
|
+
} = c, t = $(c.value ?? {}), u = L(() => (de(v?.default?.()) ?? []).flatMap((b) => Array.isArray(b.children) ? b.children : [b]));
|
|
2366
|
+
function l(o) {
|
|
2367
|
+
delete t.value[o], n("clear", {
|
|
2368
|
+
data: de(t.value),
|
|
2369
|
+
name: o
|
|
2277
2370
|
});
|
|
2278
2371
|
}
|
|
2279
|
-
function
|
|
2280
|
-
|
|
2281
|
-
...
|
|
2282
|
-
[
|
|
2372
|
+
function g(o, b) {
|
|
2373
|
+
b === void 0 ? l(o) : t.value = {
|
|
2374
|
+
...t.value,
|
|
2375
|
+
[o]: b
|
|
2283
2376
|
}, n("change", {
|
|
2284
|
-
data:
|
|
2285
|
-
name:
|
|
2286
|
-
value:
|
|
2377
|
+
data: de(t.value),
|
|
2378
|
+
name: o,
|
|
2379
|
+
value: b
|
|
2287
2380
|
});
|
|
2288
2381
|
}
|
|
2289
|
-
const
|
|
2290
|
-
const
|
|
2291
|
-
return
|
|
2292
|
-
...
|
|
2293
|
-
layout:
|
|
2382
|
+
const a = L(() => u.value.map((o) => {
|
|
2383
|
+
const b = o.props?.name;
|
|
2384
|
+
return Ye(o, {
|
|
2385
|
+
...o.props,
|
|
2386
|
+
layout: c.view,
|
|
2294
2387
|
showClean: !0,
|
|
2295
|
-
modelValue:
|
|
2296
|
-
"onUpdate:modelValue": (
|
|
2297
|
-
b
|
|
2388
|
+
modelValue: t.value[b],
|
|
2389
|
+
"onUpdate:modelValue": (p) => {
|
|
2390
|
+
g(b, p);
|
|
2298
2391
|
},
|
|
2299
|
-
onClear: () =>
|
|
2392
|
+
onClear: () => l(b)
|
|
2300
2393
|
});
|
|
2301
|
-
})), f =
|
|
2394
|
+
})), f = L(
|
|
2302
2395
|
() => new Map(
|
|
2303
|
-
|
|
2304
|
-
const
|
|
2305
|
-
return
|
|
2306
|
-
}).filter((
|
|
2396
|
+
a.value.map((o) => {
|
|
2397
|
+
const b = o.props?.name;
|
|
2398
|
+
return b ? [b, o] : null;
|
|
2399
|
+
}).filter((o) => o !== null)
|
|
2307
2400
|
)
|
|
2308
2401
|
);
|
|
2309
|
-
function
|
|
2310
|
-
|
|
2311
|
-
data:
|
|
2402
|
+
function y(o = !1) {
|
|
2403
|
+
t.value = {}, o || n("clearAll", {
|
|
2404
|
+
data: de(t.value),
|
|
2312
2405
|
name: "ALL"
|
|
2313
2406
|
});
|
|
2314
2407
|
}
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2317
|
-
await
|
|
2408
|
+
const m = $(""), d = L(() => c.schema?.value ? Object.entries(t.value).filter(([o, b]) => c.schema && !(o in c.schema.value) ? !1 : Array.isArray(b) ? b.some((p) => p !== "" && p !== void 0) : b !== "" && b !== void 0).length : 0), i = $();
|
|
2409
|
+
I(m, async () => {
|
|
2410
|
+
await me(), i?.value?.filterRef?.inputTextRef && i.value.filterRef.inputTextRef.focus();
|
|
2318
2411
|
});
|
|
2319
|
-
const
|
|
2320
|
-
if (
|
|
2321
|
-
let
|
|
2322
|
-
if (
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2412
|
+
const C = L(() => c.schema?.value ? Object.fromEntries(Object.entries(c.schema?.value).slice(0, c.limit)) : {}), k = L(() => {
|
|
2413
|
+
if (a.value.length === 0) return [];
|
|
2414
|
+
let o = 0;
|
|
2415
|
+
if (c.schema?.value) {
|
|
2416
|
+
const b = Object.entries(c.schema.value).length;
|
|
2417
|
+
c.limit && b < c.limit ? o = c.limit - b : o = 0;
|
|
2325
2418
|
}
|
|
2326
|
-
return
|
|
2327
|
-
}),
|
|
2419
|
+
return a.value.slice(0, o);
|
|
2420
|
+
}), _ = L(() => a.value.length === 0 ? [] : c.view !== "inline" ? a.value : a.value.slice(k.value.length));
|
|
2328
2421
|
return {
|
|
2329
|
-
activeFilter:
|
|
2330
|
-
activeFilterCount:
|
|
2331
|
-
onFilterChange:
|
|
2332
|
-
clearFilter:
|
|
2333
|
-
clearAllFilters:
|
|
2334
|
-
limitedSchema:
|
|
2335
|
-
filtersSlot:
|
|
2336
|
-
limitedFiltersSlot:
|
|
2337
|
-
popoverFiltersSlot:
|
|
2422
|
+
activeFilter: t,
|
|
2423
|
+
activeFilterCount: d,
|
|
2424
|
+
onFilterChange: g,
|
|
2425
|
+
clearFilter: l,
|
|
2426
|
+
clearAllFilters: y,
|
|
2427
|
+
limitedSchema: C,
|
|
2428
|
+
filtersSlot: a,
|
|
2429
|
+
limitedFiltersSlot: k,
|
|
2430
|
+
popoverFiltersSlot: _,
|
|
2338
2431
|
vnodeMap: f,
|
|
2339
|
-
selectedFilter:
|
|
2340
|
-
filterRef:
|
|
2432
|
+
selectedFilter: m,
|
|
2433
|
+
filterRef: i
|
|
2341
2434
|
};
|
|
2342
2435
|
}
|
|
2343
|
-
const
|
|
2436
|
+
const so = /* @__PURE__ */ W({
|
|
2344
2437
|
__name: "popover",
|
|
2345
2438
|
emits: ["open", "close"],
|
|
2346
|
-
setup(
|
|
2347
|
-
const v =
|
|
2348
|
-
function
|
|
2439
|
+
setup(c, { emit: n }) {
|
|
2440
|
+
const v = $(!1), t = $(null), u = $(null), l = $(null), g = $({ top: "0px", left: "0px", position: "absolute" });
|
|
2441
|
+
function a() {
|
|
2349
2442
|
v.value = !v.value;
|
|
2350
2443
|
}
|
|
2351
2444
|
function f() {
|
|
2352
|
-
const
|
|
2353
|
-
if (!
|
|
2354
|
-
const
|
|
2355
|
-
let
|
|
2356
|
-
|
|
2445
|
+
const C = l.value, k = t.value;
|
|
2446
|
+
if (!C || !k) return;
|
|
2447
|
+
const _ = C.getBoundingClientRect(), o = k.offsetWidth, b = window.innerWidth - _.left;
|
|
2448
|
+
let p = _.left + window.scrollX;
|
|
2449
|
+
o > b && (p = window.innerWidth - o - 8, p < 8 && (p = 8)), g.value = {
|
|
2357
2450
|
position: "absolute",
|
|
2358
|
-
top: `${
|
|
2359
|
-
left: `${
|
|
2451
|
+
top: `${_.bottom + window.scrollY + 8}px`,
|
|
2452
|
+
left: `${p}px`
|
|
2360
2453
|
};
|
|
2361
2454
|
}
|
|
2362
|
-
const
|
|
2363
|
-
function
|
|
2364
|
-
const
|
|
2365
|
-
!
|
|
2455
|
+
const y = L(() => Object.entries(g.value).map((C) => C.join(":")).join(";"));
|
|
2456
|
+
function m(C) {
|
|
2457
|
+
const k = C.target;
|
|
2458
|
+
!l.value?.contains(C.target) && !t.value?.contains(C.target) && !k.closest("[data-inside-popover]") && (v.value = !1);
|
|
2366
2459
|
}
|
|
2367
|
-
const
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
}),
|
|
2371
|
-
|
|
2372
|
-
}),
|
|
2373
|
-
|
|
2460
|
+
const d = $(!1);
|
|
2461
|
+
ce(() => {
|
|
2462
|
+
d.value = !0;
|
|
2463
|
+
}), ce(() => {
|
|
2464
|
+
l.value = u.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", a), document.addEventListener("click", m), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0);
|
|
2465
|
+
}), pe(() => {
|
|
2466
|
+
l.value?.removeEventListener("click", a), document.removeEventListener("click", m), window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
|
|
2374
2467
|
});
|
|
2375
|
-
const
|
|
2376
|
-
return
|
|
2377
|
-
|
|
2378
|
-
}), (
|
|
2468
|
+
const i = n;
|
|
2469
|
+
return I(v, async (C) => {
|
|
2470
|
+
C ? (i("open"), await me(), f()) : i("close");
|
|
2471
|
+
}), (C, k) => (s(), w("div", {
|
|
2379
2472
|
ref_key: "wrapperRef",
|
|
2380
|
-
ref:
|
|
2473
|
+
ref: u
|
|
2381
2474
|
}, [
|
|
2382
|
-
|
|
2383
|
-
|
|
2475
|
+
ue(C.$slots, "trigger"),
|
|
2476
|
+
d.value ? (s(), E(ge, {
|
|
2384
2477
|
key: 0,
|
|
2385
2478
|
to: "body"
|
|
2386
2479
|
}, [
|
|
2387
|
-
|
|
2480
|
+
Y(r("div", {
|
|
2388
2481
|
ref_key: "popoverRef",
|
|
2389
|
-
ref:
|
|
2482
|
+
ref: t,
|
|
2390
2483
|
class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
|
|
2391
|
-
style:
|
|
2484
|
+
style: be(y.value)
|
|
2392
2485
|
}, [
|
|
2393
|
-
|
|
2486
|
+
ue(C.$slots, "default")
|
|
2394
2487
|
], 4), [
|
|
2395
|
-
[
|
|
2488
|
+
[J, v.value]
|
|
2396
2489
|
])
|
|
2397
|
-
])) :
|
|
2490
|
+
])) : V("", !0)
|
|
2398
2491
|
], 512));
|
|
2399
2492
|
}
|
|
2400
|
-
}),
|
|
2493
|
+
}), io = {}, uo = {
|
|
2401
2494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2402
2495
|
width: "24",
|
|
2403
2496
|
height: "24",
|
|
@@ -2409,179 +2502,194 @@ const Hl = /* @__PURE__ */ U({
|
|
|
2409
2502
|
"stroke-linejoin": "round",
|
|
2410
2503
|
class: "lucide lucide-filter h-4 w-4"
|
|
2411
2504
|
};
|
|
2412
|
-
function
|
|
2413
|
-
return
|
|
2414
|
-
|
|
2415
|
-
])
|
|
2505
|
+
function co(c, n) {
|
|
2506
|
+
return s(), w("svg", uo, n[0] || (n[0] = [
|
|
2507
|
+
r("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
|
|
2508
|
+
]));
|
|
2416
2509
|
}
|
|
2417
|
-
const
|
|
2510
|
+
const Ie = /* @__PURE__ */ te(io, [["render", co]]), fo = { class: "flex items-center gap-2 overflow-hidden" }, po = {
|
|
2418
2511
|
key: 0,
|
|
2419
|
-
class: "inline-flex
|
|
2420
|
-
},
|
|
2512
|
+
class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-500 px-1 text-[11px] font-semibold text-white"
|
|
2513
|
+
}, mo = { class: "flex" }, vo = { class: "w-64 border-r border-gray-200" }, yo = { class: "p-2" }, go = ["onClick"], bo = { class: "flex items-center gap-2" }, ho = { class: "text-sm font-medium" }, xo = {
|
|
2421
2514
|
key: 0,
|
|
2422
|
-
class: "inline-flex
|
|
2423
|
-
},
|
|
2515
|
+
class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"
|
|
2516
|
+
}, wo = ["onClick"], ko = { class: "flex items-center gap-2" }, Co = { class: "text-sm font-medium" }, _o = {
|
|
2424
2517
|
key: 0,
|
|
2425
|
-
class: "inline-flex
|
|
2426
|
-
},
|
|
2518
|
+
class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-100 px-1 text-[11px] font-semibold text-blue-600"
|
|
2519
|
+
}, Vo = {
|
|
2427
2520
|
key: 0,
|
|
2428
2521
|
class: "p-2 border-t"
|
|
2429
|
-
},
|
|
2522
|
+
}, $o = { class: "flex-1 min-h-[300px] overflow-y-auto" }, Ao = {
|
|
2430
2523
|
key: 0,
|
|
2431
2524
|
class: "flex items-center justify-center h-full text-gray-500"
|
|
2432
|
-
},
|
|
2525
|
+
}, Ue = /* @__PURE__ */ W({
|
|
2433
2526
|
__name: "popover-filter-layout",
|
|
2434
2527
|
props: {
|
|
2528
|
+
badgeCount: {},
|
|
2435
2529
|
schema: {},
|
|
2436
2530
|
view: {},
|
|
2437
2531
|
value: {},
|
|
2438
2532
|
history: { type: Boolean },
|
|
2439
2533
|
mode: {},
|
|
2440
|
-
limit: { default: 3 }
|
|
2534
|
+
limit: { default: 3 },
|
|
2535
|
+
width: {},
|
|
2536
|
+
title: {},
|
|
2537
|
+
disabled: { type: Boolean },
|
|
2538
|
+
defaultPanelWidth: {}
|
|
2441
2539
|
},
|
|
2442
2540
|
emits: ["change", "clear", "clearAll"],
|
|
2443
|
-
setup(
|
|
2444
|
-
const
|
|
2445
|
-
activeFilter:
|
|
2446
|
-
activeFilterCount:
|
|
2447
|
-
onFilterChange:
|
|
2448
|
-
clearFilter:
|
|
2449
|
-
clearAllFilters:
|
|
2450
|
-
popoverFiltersSlot:
|
|
2451
|
-
selectedFilter:
|
|
2452
|
-
filterRef:
|
|
2453
|
-
} =
|
|
2454
|
-
...
|
|
2455
|
-
schema:
|
|
2456
|
-
slots:
|
|
2457
|
-
}, b);
|
|
2458
|
-
function
|
|
2541
|
+
setup(c, { expose: n, emit: v }) {
|
|
2542
|
+
const t = c, u = Oe(t.mode), l = fe(), g = v, a = $({}), f = L(() => a?.value ? t.view !== "inline" ? a?.value : Object.fromEntries(Object.entries(a?.value).slice(t.limit)) : {}), {
|
|
2543
|
+
activeFilter: y,
|
|
2544
|
+
activeFilterCount: m,
|
|
2545
|
+
onFilterChange: d,
|
|
2546
|
+
clearFilter: i,
|
|
2547
|
+
clearAllFilters: C,
|
|
2548
|
+
popoverFiltersSlot: k,
|
|
2549
|
+
selectedFilter: _,
|
|
2550
|
+
filterRef: o
|
|
2551
|
+
} = ye({
|
|
2552
|
+
...t,
|
|
2553
|
+
schema: a,
|
|
2554
|
+
slots: l
|
|
2555
|
+
}, g), b = L(() => t.badgeCount ?? m.value);
|
|
2556
|
+
function p(D) {
|
|
2557
|
+
return Array.isArray(D) ? D.filter((F) => F != null && F !== "").length : D && typeof D == "object" ? Object.values(D).filter((F) => F != null && F !== "").length : D === null || D !== void 0 && D !== "" ? 1 : 0;
|
|
2558
|
+
}
|
|
2559
|
+
function h(D) {
|
|
2560
|
+
return y.value ? p(y.value[D]) : 0;
|
|
2561
|
+
}
|
|
2562
|
+
function x() {
|
|
2459
2563
|
if (f.value) {
|
|
2460
|
-
const [
|
|
2461
|
-
|
|
2462
|
-
} else
|
|
2564
|
+
const [D] = Object.keys(f.value);
|
|
2565
|
+
_.value = D;
|
|
2566
|
+
} else k.value.length > 0 ? _.value = k.value[0].props.name : _.value = "";
|
|
2463
2567
|
}
|
|
2464
|
-
return
|
|
2465
|
-
() =>
|
|
2466
|
-
(
|
|
2467
|
-
|
|
2568
|
+
return I(
|
|
2569
|
+
() => t.schema,
|
|
2570
|
+
(D) => {
|
|
2571
|
+
a.value = D ?? {};
|
|
2468
2572
|
},
|
|
2469
2573
|
{ deep: !0, immediate: !0 }
|
|
2470
2574
|
), n({
|
|
2471
|
-
clearFilter:
|
|
2472
|
-
clearAllFilters:
|
|
2473
|
-
}), (
|
|
2474
|
-
onOpen:
|
|
2475
|
-
onClose:
|
|
2575
|
+
clearFilter: i,
|
|
2576
|
+
clearAllFilters: C
|
|
2577
|
+
}), (D, F) => (s(), E(so, {
|
|
2578
|
+
onOpen: x,
|
|
2579
|
+
onClose: F[5] || (F[5] = (A) => _.value = "")
|
|
2476
2580
|
}, {
|
|
2477
|
-
trigger:
|
|
2478
|
-
|
|
2581
|
+
trigger: oe(() => [
|
|
2582
|
+
r("button", {
|
|
2479
2583
|
"data-popover-trigger": "",
|
|
2480
2584
|
"aria-haspopup": "dialog",
|
|
2481
2585
|
"aria-expanded": "false",
|
|
2482
|
-
class:
|
|
2483
|
-
e(
|
|
2484
|
-
|
|
2586
|
+
class: U([
|
|
2587
|
+
e(u),
|
|
2588
|
+
"flex items-center justify-between gap-2",
|
|
2589
|
+
b.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500" : "text-neutral-700 hover:border-neutral-400"
|
|
2590
|
+
]),
|
|
2485
2591
|
type: "button"
|
|
2486
2592
|
}, [
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2593
|
+
r("span", fo, [
|
|
2594
|
+
Q(Ie, { class: "h-4 w-4" }),
|
|
2595
|
+
F[6] || (F[6] = r("span", { class: "text-sm font-medium" }, "Фільтр", -1))
|
|
2596
|
+
]),
|
|
2597
|
+
b.value > 0 ? (s(), w("span", po, S(b.value), 1)) : V("", !0)
|
|
2490
2598
|
], 2)
|
|
2491
2599
|
]),
|
|
2492
|
-
default:
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2600
|
+
default: oe(() => [
|
|
2601
|
+
r("div", mo, [
|
|
2602
|
+
r("div", vo, [
|
|
2603
|
+
F[7] || (F[7] = r("div", { class: "p-4 border-b" }, [
|
|
2604
|
+
r("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
|
|
2497
2605
|
], -1)),
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
key:
|
|
2606
|
+
r("div", yo, [
|
|
2607
|
+
D.schema ? (s(!0), w(T, { key: 0 }, X(Object.entries(f.value), ([A, R]) => (s(), w("button", {
|
|
2608
|
+
key: A,
|
|
2501
2609
|
onClick: () => {
|
|
2502
|
-
|
|
2610
|
+
_.value = A;
|
|
2503
2611
|
},
|
|
2504
|
-
class:
|
|
2505
|
-
"w-full
|
|
2506
|
-
e(
|
|
2612
|
+
class: U([
|
|
2613
|
+
"flex w-full items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
|
|
2614
|
+
e(_) === A ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
|
|
2507
2615
|
])
|
|
2508
2616
|
}, [
|
|
2509
|
-
|
|
2510
|
-
|
|
2617
|
+
r("div", bo, [
|
|
2618
|
+
r("span", ho, S(R.label), 1)
|
|
2511
2619
|
]),
|
|
2512
|
-
(
|
|
2513
|
-
], 10,
|
|
2514
|
-
(
|
|
2515
|
-
key: "slot-" +
|
|
2516
|
-
onClick: (
|
|
2517
|
-
class:
|
|
2518
|
-
"
|
|
2519
|
-
e(
|
|
2620
|
+
h(A) > 0 ? (s(), w("div", xo, S(h(A)), 1)) : V("", !0)
|
|
2621
|
+
], 10, go))), 128)) : V("", !0),
|
|
2622
|
+
(s(!0), w(T, null, X(e(k), (A, R) => (s(), w("button", {
|
|
2623
|
+
key: "slot-" + R,
|
|
2624
|
+
onClick: (j) => _.value = A.props.name,
|
|
2625
|
+
class: U([
|
|
2626
|
+
"flex items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
|
|
2627
|
+
e(_) === A.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
|
|
2520
2628
|
])
|
|
2521
2629
|
}, [
|
|
2522
|
-
|
|
2523
|
-
|
|
2630
|
+
r("div", ko, [
|
|
2631
|
+
r("span", Co, S(A.props.label), 1)
|
|
2524
2632
|
]),
|
|
2525
|
-
|
|
2526
|
-
], 10,
|
|
2633
|
+
h(A.props.name) > 0 ? (s(), w("div", _o, S(h(A.props.name)), 1)) : V("", !0)
|
|
2634
|
+
], 10, wo))), 128))
|
|
2527
2635
|
]),
|
|
2528
|
-
e(
|
|
2529
|
-
|
|
2636
|
+
e(m) > 0 ? (s(), w("div", Vo, [
|
|
2637
|
+
r("button", {
|
|
2530
2638
|
class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
2531
|
-
onClick:
|
|
2639
|
+
onClick: F[0] || (F[0] = (A) => e(C)()),
|
|
2532
2640
|
"data-inside-popover": ""
|
|
2533
2641
|
}, " Очистити всі ")
|
|
2534
|
-
])) :
|
|
2642
|
+
])) : V("", !0)
|
|
2535
2643
|
]),
|
|
2536
|
-
|
|
2537
|
-
e(
|
|
2538
|
-
|
|
2539
|
-
])
|
|
2540
|
-
e(
|
|
2541
|
-
f.value ? (
|
|
2542
|
-
e(
|
|
2543
|
-
key:
|
|
2644
|
+
r("div", $o, [
|
|
2645
|
+
e(_) === "" ? (s(), w("div", Ao, F[8] || (F[8] = [
|
|
2646
|
+
r("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
|
|
2647
|
+
]))) : V("", !0),
|
|
2648
|
+
e(_) ? (s(), w(T, { key: 1 }, [
|
|
2649
|
+
f.value ? (s(!0), w(T, { key: 0 }, X(Object.entries(f.value), ([A, R]) => (s(), w(T, null, [
|
|
2650
|
+
e(_) === A ? (s(), E(le, Z({
|
|
2651
|
+
key: A,
|
|
2544
2652
|
layout: "popover",
|
|
2545
2653
|
ref_for: !0,
|
|
2546
2654
|
ref_key: "filterRef",
|
|
2547
|
-
ref:
|
|
2548
|
-
}, { ref_for: !0 },
|
|
2549
|
-
onChange:
|
|
2550
|
-
onClear:
|
|
2551
|
-
e(
|
|
2655
|
+
ref: o
|
|
2656
|
+
}, { ref_for: !0 }, R, {
|
|
2657
|
+
onChange: F[1] || (F[1] = (j) => e(d)(j.name, j.value)),
|
|
2658
|
+
onClear: F[2] || (F[2] = (j) => {
|
|
2659
|
+
e(i)(j), e(d)(j, void 0);
|
|
2552
2660
|
}),
|
|
2553
|
-
modelValue: e(
|
|
2554
|
-
"onUpdate:modelValue": (
|
|
2661
|
+
modelValue: e(y)[A],
|
|
2662
|
+
"onUpdate:modelValue": (j) => e(y)[A] = j,
|
|
2555
2663
|
cleanable: !0
|
|
2556
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) :
|
|
2557
|
-
], 64))), 256)) :
|
|
2558
|
-
(
|
|
2559
|
-
key: "slot-" +
|
|
2664
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
|
|
2665
|
+
], 64))), 256)) : V("", !0),
|
|
2666
|
+
(s(!0), w(T, null, X(e(k), (A, R) => (s(), w(T, {
|
|
2667
|
+
key: "slot-" + R
|
|
2560
2668
|
}, [
|
|
2561
|
-
e(
|
|
2669
|
+
e(_) === A.props.name ? (s(), E(le, Z({
|
|
2562
2670
|
key: 0,
|
|
2563
2671
|
layout: "popover"
|
|
2564
|
-
}, { ref_for: !0 },
|
|
2672
|
+
}, { ref_for: !0 }, A.props, {
|
|
2565
2673
|
ref_for: !0,
|
|
2566
2674
|
ref_key: "filterRef",
|
|
2567
|
-
ref:
|
|
2568
|
-
onChange:
|
|
2569
|
-
onClear:
|
|
2570
|
-
e(
|
|
2675
|
+
ref: o,
|
|
2676
|
+
onChange: F[3] || (F[3] = (j) => e(d)(j.name, j.value)),
|
|
2677
|
+
onClear: F[4] || (F[4] = (j) => {
|
|
2678
|
+
e(i)(j), e(d)(j, void 0);
|
|
2571
2679
|
}),
|
|
2572
|
-
modelValue: e(
|
|
2573
|
-
"onUpdate:modelValue": (
|
|
2680
|
+
modelValue: e(y)[A.props.name],
|
|
2681
|
+
"onUpdate:modelValue": (j) => e(y)[A.props.name] = j,
|
|
2574
2682
|
cleanable: !0
|
|
2575
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) :
|
|
2683
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
|
|
2576
2684
|
], 64))), 128))
|
|
2577
|
-
], 64)) :
|
|
2685
|
+
], 64)) : V("", !0)
|
|
2578
2686
|
])
|
|
2579
2687
|
])
|
|
2580
2688
|
]),
|
|
2581
2689
|
_: 1
|
|
2582
2690
|
}));
|
|
2583
2691
|
}
|
|
2584
|
-
}),
|
|
2692
|
+
}), So = { class: "flex gap-1 items-center flex-wrap" }, Re = /* @__PURE__ */ W({
|
|
2585
2693
|
__name: "inline-filter-layout",
|
|
2586
2694
|
props: {
|
|
2587
2695
|
schema: {},
|
|
@@ -2589,93 +2697,109 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
|
|
|
2589
2697
|
value: {},
|
|
2590
2698
|
history: { type: Boolean },
|
|
2591
2699
|
mode: {},
|
|
2592
|
-
limit: { default: 3 }
|
|
2700
|
+
limit: { default: 3 },
|
|
2701
|
+
width: {},
|
|
2702
|
+
title: {},
|
|
2703
|
+
disabled: { type: Boolean },
|
|
2704
|
+
defaultPanelWidth: {}
|
|
2593
2705
|
},
|
|
2594
2706
|
emits: ["change", "clear", "clearAll"],
|
|
2595
|
-
setup(
|
|
2596
|
-
const
|
|
2597
|
-
activeFilter:
|
|
2598
|
-
activeFilterCount:
|
|
2599
|
-
onFilterChange:
|
|
2600
|
-
clearFilter:
|
|
2601
|
-
clearAllFilters:
|
|
2602
|
-
limitedSchema:
|
|
2603
|
-
filtersSlot:
|
|
2604
|
-
limitedFiltersSlot:
|
|
2605
|
-
} =
|
|
2707
|
+
setup(c, { expose: n, emit: v }) {
|
|
2708
|
+
const t = se(), u = c, l = v, g = fe(), a = $({}), f = L(() => Object.keys(u.schema).length > u.limit), {
|
|
2709
|
+
activeFilter: y,
|
|
2710
|
+
activeFilterCount: m,
|
|
2711
|
+
onFilterChange: d,
|
|
2712
|
+
clearFilter: i,
|
|
2713
|
+
clearAllFilters: C,
|
|
2714
|
+
limitedSchema: k,
|
|
2715
|
+
filtersSlot: _,
|
|
2716
|
+
limitedFiltersSlot: o
|
|
2717
|
+
} = ye(
|
|
2606
2718
|
{
|
|
2607
|
-
...
|
|
2608
|
-
schema:
|
|
2609
|
-
slots:
|
|
2719
|
+
...u,
|
|
2720
|
+
schema: a,
|
|
2721
|
+
slots: g
|
|
2610
2722
|
},
|
|
2611
|
-
|
|
2612
|
-
)
|
|
2613
|
-
function
|
|
2614
|
-
|
|
2723
|
+
l
|
|
2724
|
+
);
|
|
2725
|
+
function b(A) {
|
|
2726
|
+
return Array.isArray(A) ? A.some((R) => R !== "" && R !== void 0 && R !== null) : A === null ? !0 : A && typeof A == "object" ? Object.values(A).some((R) => R !== "" && R !== void 0 && R !== null) : A !== "" && A !== void 0;
|
|
2615
2727
|
}
|
|
2616
|
-
|
|
2617
|
-
() =>
|
|
2618
|
-
(
|
|
2619
|
-
|
|
2728
|
+
const p = L(() => {
|
|
2729
|
+
const A = Object.keys(k.value ?? {}), R = o.value.map((j) => j.props?.name).filter((j) => typeof j == "string");
|
|
2730
|
+
return /* @__PURE__ */ new Set([...A, ...R]);
|
|
2731
|
+
}), h = L(() => Object.entries(y.value ?? {}).filter(([A, R]) => p.value.has(A) && b(R)).length), x = L(() => {
|
|
2732
|
+
const A = m.value ?? 0, R = h.value ?? 0;
|
|
2733
|
+
return Math.max(A - R, 0);
|
|
2734
|
+
}), D = $();
|
|
2735
|
+
function F() {
|
|
2736
|
+
D.value && D.value.clearAllFilters(!0), C();
|
|
2737
|
+
}
|
|
2738
|
+
return I(
|
|
2739
|
+
() => u.schema,
|
|
2740
|
+
(A) => {
|
|
2741
|
+
a.value = A;
|
|
2620
2742
|
},
|
|
2621
2743
|
{ deep: !0, immediate: !0 }
|
|
2622
2744
|
), n({
|
|
2623
|
-
clearFilter:
|
|
2624
|
-
clearAllFilters:
|
|
2625
|
-
}), (
|
|
2626
|
-
|
|
2627
|
-
key:
|
|
2628
|
-
mode:
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2745
|
+
clearFilter: i,
|
|
2746
|
+
clearAllFilters: C
|
|
2747
|
+
}), (A, R) => (s(), w("div", So, [
|
|
2748
|
+
A.schema ? (s(!0), w(T, { key: 0 }, X(Object.entries(e(k)), ([j, M]) => (s(), E(le, Z({
|
|
2749
|
+
key: j,
|
|
2750
|
+
mode: A.mode,
|
|
2751
|
+
width: A.width ? A.width : M?.width
|
|
2752
|
+
}, { ref_for: !0 }, M, {
|
|
2753
|
+
onChange: R[0] || (R[0] = (K) => e(d)(K.name, K.value)),
|
|
2754
|
+
onClear: e(i),
|
|
2632
2755
|
layout: "inline",
|
|
2633
2756
|
cleanable: !0,
|
|
2634
|
-
modelValue: e(
|
|
2635
|
-
"onUpdate:modelValue": (K) => e(
|
|
2636
|
-
}), null, 16, ["mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) :
|
|
2637
|
-
(
|
|
2638
|
-
key: "slot-" +
|
|
2757
|
+
modelValue: e(y)[j],
|
|
2758
|
+
"onUpdate:modelValue": (K) => e(y)[j] = K
|
|
2759
|
+
}), null, 16, ["mode", "width", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
|
|
2760
|
+
(s(!0), w(T, null, X(e(o), (j, M) => (s(), E(le, Z({
|
|
2761
|
+
key: "slot-" + M,
|
|
2639
2762
|
layout: "inline"
|
|
2640
|
-
}, { ref_for: !0 },
|
|
2641
|
-
onChange:
|
|
2642
|
-
onClear:
|
|
2643
|
-
e(
|
|
2763
|
+
}, { ref_for: !0 }, j.props, {
|
|
2764
|
+
onChange: R[1] || (R[1] = (K) => e(d)(K.name, K.value)),
|
|
2765
|
+
onClear: R[2] || (R[2] = (K) => {
|
|
2766
|
+
e(i)(K), e(d)(K, void 0);
|
|
2644
2767
|
}),
|
|
2645
2768
|
cleanable: !0,
|
|
2646
|
-
modelValue: e(
|
|
2647
|
-
"onUpdate:modelValue": (K) => e(
|
|
2769
|
+
modelValue: e(y)[j.props.name],
|
|
2770
|
+
"onUpdate:modelValue": (K) => e(y)[j.props.name] = K
|
|
2648
2771
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
|
2649
|
-
f.value ? (
|
|
2650
|
-
schema:
|
|
2651
|
-
limit:
|
|
2652
|
-
onChange:
|
|
2653
|
-
onClearAll:
|
|
2654
|
-
onClear:
|
|
2655
|
-
mode:
|
|
2772
|
+
f.value ? (s(), E(Ue, Z({ key: 1 }, u, {
|
|
2773
|
+
schema: A.schema,
|
|
2774
|
+
limit: A.limit,
|
|
2775
|
+
onChange: R[3] || (R[3] = (j) => e(d)(j.name, j.value)),
|
|
2776
|
+
onClearAll: R[4] || (R[4] = (j) => e(C)()),
|
|
2777
|
+
onClear: R[5] || (R[5] = (j) => e(i)(j.name)),
|
|
2778
|
+
mode: A.mode,
|
|
2656
2779
|
ref_key: "popoverRef",
|
|
2657
|
-
ref:
|
|
2658
|
-
cleanable: !0
|
|
2780
|
+
ref: D,
|
|
2781
|
+
cleanable: !0,
|
|
2782
|
+
"badge-count": x.value
|
|
2659
2783
|
}), {
|
|
2660
|
-
default:
|
|
2661
|
-
(
|
|
2662
|
-
key: "slot-" +
|
|
2784
|
+
default: oe(() => [
|
|
2785
|
+
(s(!0), w(T, null, X(e(_), (j, M) => (s(), E(ne(j), Z({
|
|
2786
|
+
key: "slot-" + M,
|
|
2663
2787
|
layout: "popover"
|
|
2664
|
-
}, { ref_for: !0 },
|
|
2788
|
+
}, { ref_for: !0 }, j.props, { cleanable: !0 }), null, 16))), 128))
|
|
2665
2789
|
]),
|
|
2666
2790
|
_: 1
|
|
2667
|
-
}, 16, ["schema", "limit", "mode"])) :
|
|
2668
|
-
e(
|
|
2791
|
+
}, 16, ["schema", "limit", "mode", "badge-count"])) : V("", !0),
|
|
2792
|
+
e(m) > 0 ? (s(), w("button", {
|
|
2669
2793
|
key: 2,
|
|
2670
|
-
onClick:
|
|
2671
|
-
class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-
|
|
2672
|
-
},
|
|
2794
|
+
onClick: F,
|
|
2795
|
+
class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-sm bg-white-100 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
|
|
2796
|
+
}, S(e(t)("filter.clear")), 1)) : V("", !0)
|
|
2673
2797
|
]));
|
|
2674
2798
|
}
|
|
2675
|
-
}),
|
|
2799
|
+
}), Bo = {
|
|
2676
2800
|
key: 0,
|
|
2677
2801
|
class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
|
|
2678
|
-
},
|
|
2802
|
+
}, Do = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, jo = /* @__PURE__ */ W({
|
|
2679
2803
|
__name: "vertical-filter-layout",
|
|
2680
2804
|
props: {
|
|
2681
2805
|
schema: {},
|
|
@@ -2683,60 +2807,251 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
|
|
|
2683
2807
|
value: {},
|
|
2684
2808
|
history: { type: Boolean },
|
|
2685
2809
|
mode: {},
|
|
2686
|
-
limit: { default: 3 }
|
|
2810
|
+
limit: { default: 3 },
|
|
2811
|
+
width: {},
|
|
2812
|
+
title: {},
|
|
2813
|
+
disabled: { type: Boolean },
|
|
2814
|
+
defaultPanelWidth: {}
|
|
2687
2815
|
},
|
|
2688
2816
|
emits: ["change", "clear", "clearAll"],
|
|
2689
|
-
setup(
|
|
2690
|
-
const
|
|
2691
|
-
activeFilter:
|
|
2692
|
-
activeFilterCount:
|
|
2817
|
+
setup(c, { expose: n, emit: v }) {
|
|
2818
|
+
const t = c, u = v, l = fe(), {
|
|
2819
|
+
activeFilter: g,
|
|
2820
|
+
activeFilterCount: a,
|
|
2693
2821
|
onFilterChange: f,
|
|
2694
|
-
clearFilter:
|
|
2695
|
-
clearAllFilters:
|
|
2696
|
-
filtersSlot:
|
|
2697
|
-
} =
|
|
2698
|
-
...
|
|
2699
|
-
slots:
|
|
2700
|
-
},
|
|
2822
|
+
clearFilter: y,
|
|
2823
|
+
clearAllFilters: m,
|
|
2824
|
+
filtersSlot: d
|
|
2825
|
+
} = ye({
|
|
2826
|
+
...t,
|
|
2827
|
+
slots: l
|
|
2828
|
+
}, u);
|
|
2701
2829
|
return n({
|
|
2702
|
-
clearFilter:
|
|
2703
|
-
clearAllFilters:
|
|
2704
|
-
}), (
|
|
2705
|
-
|
|
2706
|
-
e(
|
|
2830
|
+
clearFilter: y,
|
|
2831
|
+
clearAllFilters: m
|
|
2832
|
+
}), (i, C) => i.view === "vertical" ? (s(), w("div", Bo, [
|
|
2833
|
+
r("div", Do, [
|
|
2834
|
+
e(a) > 0 ? (s(), w("button", {
|
|
2707
2835
|
key: 0,
|
|
2708
|
-
onClick:
|
|
2836
|
+
onClick: C[0] || (C[0] = (k) => e(m)()),
|
|
2709
2837
|
"data-popover-trigger": "",
|
|
2710
2838
|
"aria-haspopup": "dialog",
|
|
2711
2839
|
"aria-expanded": "false",
|
|
2712
2840
|
class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
|
|
2713
2841
|
type: "button"
|
|
2714
|
-
}, " Очистити ")) :
|
|
2715
|
-
|
|
2716
|
-
onChange:
|
|
2717
|
-
onClear:
|
|
2718
|
-
e(
|
|
2842
|
+
}, " Очистити ")) : V("", !0),
|
|
2843
|
+
i.schema ? (s(!0), w(T, { key: 1 }, X(Object.entries(i.schema), ([k, _]) => (s(), E(le, Z({ layout: "vertical" }, { ref_for: !0 }, _, {
|
|
2844
|
+
onChange: C[1] || (C[1] = (o) => e(f)(o.name, o.value)),
|
|
2845
|
+
onClear: C[2] || (C[2] = (o) => {
|
|
2846
|
+
e(y)(o), e(f)(o, void 0);
|
|
2719
2847
|
}),
|
|
2720
|
-
modelValue: e(
|
|
2721
|
-
"onUpdate:modelValue": (
|
|
2848
|
+
modelValue: e(g)[k],
|
|
2849
|
+
"onUpdate:modelValue": (o) => e(g)[k] = o,
|
|
2722
2850
|
showClean: !0
|
|
2723
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 256)) :
|
|
2724
|
-
(
|
|
2725
|
-
key: "slot-" +
|
|
2851
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 256)) : V("", !0),
|
|
2852
|
+
(s(!0), w(T, null, X(e(d), (k, _) => (s(), E(le, Z({
|
|
2853
|
+
key: "slot-" + _,
|
|
2726
2854
|
layout: "vertical"
|
|
2727
|
-
}, { ref_for: !0 },
|
|
2728
|
-
onChange:
|
|
2729
|
-
onClear:
|
|
2730
|
-
e(
|
|
2855
|
+
}, { ref_for: !0 }, k.props, {
|
|
2856
|
+
onChange: C[3] || (C[3] = (o) => e(f)(o.name, o.value)),
|
|
2857
|
+
onClear: C[4] || (C[4] = (o) => {
|
|
2858
|
+
e(y)(o), e(f)(o, void 0);
|
|
2731
2859
|
}),
|
|
2732
|
-
modelValue: e(
|
|
2733
|
-
"onUpdate:modelValue": (
|
|
2860
|
+
modelValue: e(g)[k.props.name],
|
|
2861
|
+
"onUpdate:modelValue": (o) => e(g)[k.props.name] = o,
|
|
2734
2862
|
showClean: !0
|
|
2735
2863
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
2736
2864
|
])
|
|
2737
|
-
])) :
|
|
2865
|
+
])) : V("", !0);
|
|
2738
2866
|
}
|
|
2739
|
-
}),
|
|
2867
|
+
}), Ro = ["onKeydown"], Ko = ["disabled"], Fo = {
|
|
2868
|
+
key: 0,
|
|
2869
|
+
class: "ml-2 inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-full bg-blue-500 px-1.5 text-[11px] font-semibold text-white"
|
|
2870
|
+
}, Mo = { class: "rounded-2xl border border-slate-300/35 bg-white/95 p-4 shadow-2xl backdrop-blur-sm" }, Lo = { class: "mb-3 flex items-center justify-between" }, Eo = { class: "text-[15px] font-semibold text-slate-800" }, Oo = { "aria-hidden": "true" }, To = { class: "flex max-h-80 flex-col gap-1 overflow-y-auto" }, Io = {
|
|
2871
|
+
key: 0,
|
|
2872
|
+
class: "mt-3 flex justify-end"
|
|
2873
|
+
}, Uo = /* @__PURE__ */ W({
|
|
2874
|
+
__name: "popover-inline-filter-layout",
|
|
2875
|
+
props: {
|
|
2876
|
+
schema: {},
|
|
2877
|
+
view: {},
|
|
2878
|
+
value: {},
|
|
2879
|
+
history: { type: Boolean },
|
|
2880
|
+
mode: {},
|
|
2881
|
+
limit: { default: 10 },
|
|
2882
|
+
width: { default: 220 },
|
|
2883
|
+
title: {},
|
|
2884
|
+
disabled: { type: Boolean },
|
|
2885
|
+
defaultPanelWidth: {}
|
|
2886
|
+
},
|
|
2887
|
+
emits: ["change", "clear", "clearAll"],
|
|
2888
|
+
setup(c, { emit: n }) {
|
|
2889
|
+
const v = se(), t = c, u = n, l = $({}), g = fe(), {
|
|
2890
|
+
activeFilter: a,
|
|
2891
|
+
activeFilterCount: f,
|
|
2892
|
+
onFilterChange: y,
|
|
2893
|
+
clearFilter: m,
|
|
2894
|
+
clearAllFilters: d,
|
|
2895
|
+
filtersSlot: i
|
|
2896
|
+
} = ye(
|
|
2897
|
+
{
|
|
2898
|
+
...t,
|
|
2899
|
+
schema: l.value,
|
|
2900
|
+
slots: g
|
|
2901
|
+
},
|
|
2902
|
+
u
|
|
2903
|
+
), C = $(null), k = $(null), _ = We({ open: !1, top: 0, left: 0 }), o = L(() => _.open), b = L(() => !!t.disabled), p = L(() => l.value || {}), h = L(() => t.title ?? "Фільтр"), x = L(() => !!g.trigger), D = L(() => [
|
|
2904
|
+
"inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-transparent bg-slate-200/70 px-3 text-sm font-medium text-slate-700 transition-colors hover:bg-blue-100 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-slate-200/70 disabled:hover:text-slate-700",
|
|
2905
|
+
b.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
2906
|
+
]), F = L(() => _.open ? {
|
|
2907
|
+
position: "absolute",
|
|
2908
|
+
top: `${_.top}px`,
|
|
2909
|
+
left: `${_.left}px`,
|
|
2910
|
+
transform: "translateX(-50%)",
|
|
2911
|
+
zIndex: 1e3
|
|
2912
|
+
} : { display: "none" });
|
|
2913
|
+
function A() {
|
|
2914
|
+
_.open = !1;
|
|
2915
|
+
}
|
|
2916
|
+
function R() {
|
|
2917
|
+
if (!C.value) return;
|
|
2918
|
+
const P = C.value.getBoundingClientRect();
|
|
2919
|
+
_.top = P.bottom + window.scrollY + 8, _.left = P.left + P.width / 2 + window.scrollX;
|
|
2920
|
+
}
|
|
2921
|
+
function j() {
|
|
2922
|
+
_.open = !_.open, _.open && me(R);
|
|
2923
|
+
}
|
|
2924
|
+
function M() {
|
|
2925
|
+
b.value || j();
|
|
2926
|
+
}
|
|
2927
|
+
function K() {
|
|
2928
|
+
_.open && R();
|
|
2929
|
+
}
|
|
2930
|
+
function z() {
|
|
2931
|
+
d();
|
|
2932
|
+
}
|
|
2933
|
+
return ce(() => {
|
|
2934
|
+
window.addEventListener("resize", K), window.addEventListener("scroll", K, !0);
|
|
2935
|
+
}), pe(() => {
|
|
2936
|
+
window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
|
|
2937
|
+
}), I(
|
|
2938
|
+
() => t.schema,
|
|
2939
|
+
(P) => {
|
|
2940
|
+
if (!P) {
|
|
2941
|
+
l.value = {};
|
|
2942
|
+
return;
|
|
2943
|
+
}
|
|
2944
|
+
if (Array.isArray(P)) {
|
|
2945
|
+
const B = P.filter((O) => O && (O.name || O.id)).map((O) => {
|
|
2946
|
+
const q = O.name || O.id;
|
|
2947
|
+
return [q, { ...O, name: q }];
|
|
2948
|
+
});
|
|
2949
|
+
l.value = Object.fromEntries(B);
|
|
2950
|
+
return;
|
|
2951
|
+
}
|
|
2952
|
+
l.value = P;
|
|
2953
|
+
},
|
|
2954
|
+
{ deep: !0, immediate: !0 }
|
|
2955
|
+
), I(
|
|
2956
|
+
() => t.disabled,
|
|
2957
|
+
(P) => {
|
|
2958
|
+
P && A();
|
|
2959
|
+
}
|
|
2960
|
+
), (P, B) => (s(), w("div", {
|
|
2961
|
+
class: "relative inline-flex",
|
|
2962
|
+
ref_key: "anchor",
|
|
2963
|
+
ref: C
|
|
2964
|
+
}, [
|
|
2965
|
+
x.value ? (s(), w("span", {
|
|
2966
|
+
key: 0,
|
|
2967
|
+
class: U(["inline-flex", b.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
|
|
2968
|
+
role: "button",
|
|
2969
|
+
tabindex: "0",
|
|
2970
|
+
"data-popover-trigger": "",
|
|
2971
|
+
onClick: re(M, ["prevent", "stop"]),
|
|
2972
|
+
onKeydown: [
|
|
2973
|
+
$e(re(M, ["prevent", "stop"]), ["enter"]),
|
|
2974
|
+
$e(re(M, ["prevent", "stop"]), ["space"])
|
|
2975
|
+
]
|
|
2976
|
+
}, [
|
|
2977
|
+
ue(P.$slots, "trigger", {
|
|
2978
|
+
toggle: M,
|
|
2979
|
+
open: o.value,
|
|
2980
|
+
disabled: b.value,
|
|
2981
|
+
activeCount: e(f)
|
|
2982
|
+
})
|
|
2983
|
+
], 42, Ro)) : (s(), w("button", {
|
|
2984
|
+
key: 1,
|
|
2985
|
+
class: U(D.value),
|
|
2986
|
+
type: "button",
|
|
2987
|
+
disabled: b.value,
|
|
2988
|
+
onClick: re(M, ["prevent", "stop"]),
|
|
2989
|
+
"data-popover-trigger": ""
|
|
2990
|
+
}, [
|
|
2991
|
+
Q(Ie, { class: "h-4 w-4" }),
|
|
2992
|
+
e(f) > 0 ? (s(), w("div", Fo, S(e(f)), 1)) : V("", !0)
|
|
2993
|
+
], 10, Ko)),
|
|
2994
|
+
(s(), E(ge, { to: "body" }, [
|
|
2995
|
+
o.value ? (s(), w("div", {
|
|
2996
|
+
key: 0,
|
|
2997
|
+
class: U(["absolute", typeof P.width == "number" ? `min-w-[${P.width + 32 + (Object.keys(p.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
|
|
2998
|
+
style: be(F.value),
|
|
2999
|
+
ref_key: "panel",
|
|
3000
|
+
ref: k,
|
|
3001
|
+
onClick: B[4] || (B[4] = re(() => {
|
|
3002
|
+
}, ["stop"]))
|
|
3003
|
+
}, [
|
|
3004
|
+
r("div", Mo, [
|
|
3005
|
+
r("div", Lo, [
|
|
3006
|
+
r("h3", Eo, S(h.value), 1),
|
|
3007
|
+
r("button", {
|
|
3008
|
+
type: "button",
|
|
3009
|
+
class: "inline-flex h-6 w-6 items-center justify-center rounded-full border-0 bg-slate-300/40 text-slate-600 transition-colors hover:bg-blue-200/60 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200",
|
|
3010
|
+
onClick: A
|
|
3011
|
+
}, [
|
|
3012
|
+
r("span", Oo, [
|
|
3013
|
+
Q(Ce, { class: "h-4 w-4" })
|
|
3014
|
+
]),
|
|
3015
|
+
B[5] || (B[5] = r("span", { class: "sr-only" }, "Закрити", -1))
|
|
3016
|
+
])
|
|
3017
|
+
]),
|
|
3018
|
+
r("div", To, [
|
|
3019
|
+
Object.keys(p.value).length ? (s(!0), w(T, { key: 0 }, X(Object.entries(p.value), ([O, q]) => (s(), E(le, Z({ key: O }, { ref_for: !0 }, { ...q, layout: "inline" }, {
|
|
3020
|
+
width: P.width ? P.width : q?.width,
|
|
3021
|
+
cleanable: !0,
|
|
3022
|
+
modelValue: e(a)[O],
|
|
3023
|
+
"onUpdate:modelValue": (N) => e(a)[O] = N,
|
|
3024
|
+
onChange: B[0] || (B[0] = (N) => e(y)(N.name, N.value)),
|
|
3025
|
+
onClear: B[1] || (B[1] = (N) => {
|
|
3026
|
+
e(m)(N), e(y)(N, void 0);
|
|
3027
|
+
})
|
|
3028
|
+
}), null, 16, ["width", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
|
|
3029
|
+
(s(!0), w(T, null, X(e(i), (O, q) => (s(), E(le, Z({
|
|
3030
|
+
key: "slot-" + q,
|
|
3031
|
+
ref_for: !0
|
|
3032
|
+
}, { ...O.props, layout: "inline" }, {
|
|
3033
|
+
cleanable: !0,
|
|
3034
|
+
modelValue: e(a)[O.props.name],
|
|
3035
|
+
"onUpdate:modelValue": (N) => e(a)[O.props.name] = N,
|
|
3036
|
+
onChange: B[2] || (B[2] = (N) => e(y)(N.name, N.value)),
|
|
3037
|
+
onClear: B[3] || (B[3] = (N) => {
|
|
3038
|
+
e(m)(N), e(y)(N, void 0);
|
|
3039
|
+
})
|
|
3040
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
3041
|
+
]),
|
|
3042
|
+
e(f) > 0 ? (s(), w("div", Io, [
|
|
3043
|
+
r("button", {
|
|
3044
|
+
type: "button",
|
|
3045
|
+
class: "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none",
|
|
3046
|
+
onClick: z
|
|
3047
|
+
}, S(e(v)("filter.clear")), 1)
|
|
3048
|
+
])) : V("", !0)
|
|
3049
|
+
])
|
|
3050
|
+
], 6)) : V("", !0)
|
|
3051
|
+
]))
|
|
3052
|
+
], 512));
|
|
3053
|
+
}
|
|
3054
|
+
}), Ke = /* @__PURE__ */ W({
|
|
2740
3055
|
__name: "filter",
|
|
2741
3056
|
props: {
|
|
2742
3057
|
schema: {},
|
|
@@ -2744,126 +3059,140 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
|
|
|
2744
3059
|
value: {},
|
|
2745
3060
|
history: { type: Boolean },
|
|
2746
3061
|
mode: {},
|
|
2747
|
-
limit: { default: 3 }
|
|
3062
|
+
limit: { default: 3 },
|
|
3063
|
+
width: { default: 220 },
|
|
3064
|
+
title: {},
|
|
3065
|
+
disabled: { type: Boolean },
|
|
3066
|
+
defaultPanelWidth: {}
|
|
2748
3067
|
},
|
|
2749
3068
|
emits: ["change", "clear", "clearAll"],
|
|
2750
|
-
setup(
|
|
2751
|
-
const
|
|
2752
|
-
function o
|
|
2753
|
-
if (Array.isArray(
|
|
2754
|
-
return
|
|
2755
|
-
if (
|
|
2756
|
-
const
|
|
2757
|
-
for (const
|
|
2758
|
-
|
|
2759
|
-
return
|
|
3069
|
+
setup(c, { expose: n, emit: v }) {
|
|
3070
|
+
const t = c, u = $(t.value ?? {}), l = v, g = $(), a = fe();
|
|
3071
|
+
function f(o) {
|
|
3072
|
+
if (Array.isArray(o))
|
|
3073
|
+
return o.map((b) => f(b));
|
|
3074
|
+
if (o !== null && typeof o == "object") {
|
|
3075
|
+
const b = de(o), p = {};
|
|
3076
|
+
for (const h in b)
|
|
3077
|
+
p[h] = f(b[h]);
|
|
3078
|
+
return p;
|
|
2760
3079
|
}
|
|
2761
|
-
return
|
|
3080
|
+
return o;
|
|
2762
3081
|
}
|
|
2763
|
-
function
|
|
2764
|
-
|
|
2765
|
-
...
|
|
2766
|
-
[
|
|
2767
|
-
} : delete
|
|
2768
|
-
data:
|
|
2769
|
-
name:
|
|
2770
|
-
value:
|
|
3082
|
+
function y(o, b) {
|
|
3083
|
+
b !== void 0 ? u.value = {
|
|
3084
|
+
...u.value,
|
|
3085
|
+
[o]: b
|
|
3086
|
+
} : delete u.value[o], l("change", {
|
|
3087
|
+
data: f(u.value),
|
|
3088
|
+
name: o,
|
|
3089
|
+
value: f(b)
|
|
2771
3090
|
});
|
|
2772
3091
|
}
|
|
2773
|
-
function
|
|
2774
|
-
delete
|
|
2775
|
-
data:
|
|
2776
|
-
name:
|
|
2777
|
-
}),
|
|
2778
|
-
data:
|
|
2779
|
-
name:
|
|
3092
|
+
function m(o) {
|
|
3093
|
+
delete u.value[o], l("clear", {
|
|
3094
|
+
data: f(u.value),
|
|
3095
|
+
name: o
|
|
3096
|
+
}), l("change", {
|
|
3097
|
+
data: f(u.value),
|
|
3098
|
+
name: o,
|
|
2780
3099
|
value: null
|
|
2781
3100
|
});
|
|
2782
3101
|
}
|
|
2783
|
-
function
|
|
2784
|
-
|
|
2785
|
-
data:
|
|
3102
|
+
function d() {
|
|
3103
|
+
u.value = {}, l("clear", {
|
|
3104
|
+
data: f(u.value),
|
|
2786
3105
|
name: "ALL"
|
|
2787
|
-
}),
|
|
2788
|
-
data:
|
|
3106
|
+
}), l("change", {
|
|
3107
|
+
data: f(u.value),
|
|
2789
3108
|
name: "ALL",
|
|
2790
3109
|
value: null
|
|
2791
3110
|
});
|
|
2792
3111
|
}
|
|
2793
|
-
const i =
|
|
2794
|
-
function
|
|
2795
|
-
switch (
|
|
3112
|
+
const i = $({});
|
|
3113
|
+
function C() {
|
|
3114
|
+
switch (t.view) {
|
|
2796
3115
|
case "inline":
|
|
2797
|
-
return
|
|
3116
|
+
return Re;
|
|
2798
3117
|
case "vertical":
|
|
2799
|
-
return
|
|
3118
|
+
return jo;
|
|
2800
3119
|
case "popover":
|
|
2801
|
-
return
|
|
3120
|
+
return Ue;
|
|
3121
|
+
case "popover-inline":
|
|
3122
|
+
return Uo;
|
|
2802
3123
|
default:
|
|
2803
|
-
return
|
|
3124
|
+
return Re;
|
|
2804
3125
|
}
|
|
2805
3126
|
}
|
|
2806
|
-
|
|
2807
|
-
() =>
|
|
2808
|
-
(
|
|
2809
|
-
if (!
|
|
3127
|
+
I(
|
|
3128
|
+
() => t.schema,
|
|
3129
|
+
(o) => {
|
|
3130
|
+
if (!o) {
|
|
2810
3131
|
i.value = {};
|
|
2811
3132
|
return;
|
|
2812
3133
|
}
|
|
2813
|
-
if (Array.isArray(
|
|
3134
|
+
if (Array.isArray(o) && !o.length) {
|
|
2814
3135
|
i.value = {};
|
|
2815
3136
|
return;
|
|
2816
3137
|
}
|
|
2817
|
-
Array.isArray(
|
|
2818
|
-
name:
|
|
2819
|
-
type: { datepicker: "date" }[
|
|
2820
|
-
label:
|
|
2821
|
-
}),
|
|
2822
|
-
Object.assign(
|
|
2823
|
-
}), i.value = { ...
|
|
3138
|
+
Array.isArray(o) ? i.value = o.filter((b) => b.type).reduce((b, p) => (Object.assign(p, {
|
|
3139
|
+
name: p.id || p.name,
|
|
3140
|
+
type: { datepicker: "date" }[p.type.toLowerCase()] || p.type.toLowerCase(),
|
|
3141
|
+
label: p.label || p.ua
|
|
3142
|
+
}), b[p.name] = p, p.data && !p.api && !p.options && Object.assign(p, { api: `/api/suggest/${p.data}` }), b), {}) : (Object.entries(o).forEach(([b, p]) => {
|
|
3143
|
+
Object.assign(p, { name: b || p.name || p.id, type: p.type.toLowerCase() });
|
|
3144
|
+
}), i.value = { ...o });
|
|
2824
3145
|
},
|
|
2825
3146
|
{ immediate: !0, deep: !0 }
|
|
2826
3147
|
);
|
|
2827
|
-
function k(
|
|
2828
|
-
|
|
3148
|
+
function k(o) {
|
|
3149
|
+
g.value.clearFilter(o), m(o);
|
|
2829
3150
|
}
|
|
2830
|
-
function
|
|
2831
|
-
|
|
3151
|
+
function _() {
|
|
3152
|
+
g.value.clearAllFilters(), d();
|
|
2832
3153
|
}
|
|
2833
|
-
return
|
|
2834
|
-
() =>
|
|
2835
|
-
(
|
|
2836
|
-
if (
|
|
2837
|
-
const
|
|
2838
|
-
Object.keys(
|
|
3154
|
+
return I(
|
|
3155
|
+
() => u.value,
|
|
3156
|
+
(o) => {
|
|
3157
|
+
if (t.history) {
|
|
3158
|
+
const b = new URL(window.location.href), p = new URLSearchParams(window.location.search);
|
|
3159
|
+
Object.keys(o).length > 0 ? p.set(
|
|
2839
3160
|
"filter",
|
|
2840
|
-
Object.entries(
|
|
2841
|
-
) :
|
|
3161
|
+
Object.entries(o).filter(([, h]) => h).map(([h, x]) => `${h}=${x}`).join("|")
|
|
3162
|
+
) : p.delete("filter"), b.search = decodeURI(p.toString()), window.history.pushState({}, "", b);
|
|
2842
3163
|
}
|
|
2843
3164
|
}
|
|
2844
3165
|
), n({
|
|
2845
|
-
clearAllFilters:
|
|
3166
|
+
clearAllFilters: _,
|
|
2846
3167
|
clearFilter: k
|
|
2847
|
-
}), (
|
|
3168
|
+
}), (o, b) => (s(), E(ne(C()), Z(t, {
|
|
2848
3169
|
schema: i.value,
|
|
2849
|
-
onChange:
|
|
2850
|
-
onClear:
|
|
2851
|
-
onClearAll:
|
|
3170
|
+
onChange: b[0] || (b[0] = (p) => y(p.name, p.value)),
|
|
3171
|
+
onClear: b[1] || (b[1] = (p) => m(p.name)),
|
|
3172
|
+
onClearAll: d,
|
|
2852
3173
|
ref_key: "filterRef",
|
|
2853
|
-
ref:
|
|
2854
|
-
}), {
|
|
2855
|
-
default:
|
|
2856
|
-
|
|
3174
|
+
ref: g
|
|
3175
|
+
}), qe({
|
|
3176
|
+
default: oe(() => [
|
|
3177
|
+
ue(o.$slots, "default")
|
|
2857
3178
|
]),
|
|
2858
|
-
_:
|
|
2859
|
-
},
|
|
3179
|
+
_: 2
|
|
3180
|
+
}, [
|
|
3181
|
+
e(a).trigger ? {
|
|
3182
|
+
name: "trigger",
|
|
3183
|
+
fn: oe((p) => [
|
|
3184
|
+
ue(o.$slots, "trigger", Qe(He(p)))
|
|
3185
|
+
]),
|
|
3186
|
+
key: "0"
|
|
3187
|
+
} : void 0
|
|
3188
|
+
]), 1040, ["schema"]));
|
|
2860
3189
|
}
|
|
2861
3190
|
});
|
|
2862
|
-
|
|
2863
|
-
n.component("Filter",
|
|
3191
|
+
Ke.install = function(n) {
|
|
3192
|
+
n.component("Filter", Ke), n.component("FilterField", le);
|
|
2864
3193
|
};
|
|
2865
3194
|
export {
|
|
2866
|
-
|
|
3195
|
+
Ke as Filter,
|
|
2867
3196
|
le as FilterField,
|
|
2868
|
-
|
|
3197
|
+
Ke as default
|
|
2869
3198
|
};
|