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