@opengis/filter 0.0.17 → 0.1.1
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/README.md +32 -40
- package/filter.js +407 -407
- package/filter.umd.cjs +1 -1
- package/package.json +1 -1
package/filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, ref as _, createElementBlock as w, openBlock as f, createElementVNode as u, withModifiers as _e, normalizeClass as D, createCommentVNode as V, toDisplayString as F, computed as I, watch as M, createStaticVNode as Le, Fragment as R, renderList as W, unref as e, createBlock as S, createVNode as N, createTextVNode as z, withDirectives as T, vShow as X, vModelText as G, onMounted as
|
|
1
|
+
import { defineComponent as O, ref as _, createElementBlock as w, openBlock as f, createElementVNode as u, withModifiers as _e, normalizeClass as D, createCommentVNode as V, toDisplayString as F, computed as I, watch as M, createStaticVNode as Le, Fragment as R, renderList as W, unref as e, createBlock as S, createVNode as N, createTextVNode as z, withDirectives as T, vShow as X, vModelText as G, onMounted as ae, onBeforeUnmount as ce, Teleport as $e, normalizeStyle as Ae, renderSlot as ue, nextTick as fe, isRef as Ee, withCtx as le, resolveDynamicComponent as ee, mergeProps as P, toRaw as Z, cloneVNode as Ie, useSlots as pe } from "vue";
|
|
2
2
|
const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = { class: "flex items-center cursor-pointer w-full" }, Ue = {
|
|
3
3
|
key: 0,
|
|
4
4
|
width: "16",
|
|
@@ -20,16 +20,16 @@ const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = {
|
|
|
20
20
|
highlighted: { type: Boolean }
|
|
21
21
|
},
|
|
22
22
|
emits: ["itemClick"],
|
|
23
|
-
setup(i, { expose:
|
|
23
|
+
setup(i, { expose: a, emit: v }) {
|
|
24
24
|
const t = i, s = v;
|
|
25
25
|
function r() {
|
|
26
26
|
s("itemClick", t.value);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
return
|
|
28
|
+
const c = _(null);
|
|
29
|
+
return a({ el: c }), (m, d) => (f(), w("div", {
|
|
30
30
|
class: "flex items-center w-full rounded-lg group hover:bg-gray-100",
|
|
31
31
|
ref_key: "el",
|
|
32
|
-
ref:
|
|
32
|
+
ref: c
|
|
33
33
|
}, [
|
|
34
34
|
u("div", Te, [
|
|
35
35
|
u("div", Oe, [
|
|
@@ -65,7 +65,7 @@ const Te = { class: "flex items-center justify-between w-full text-sm" }, Oe = {
|
|
|
65
65
|
], 512));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
function Be(i,
|
|
68
|
+
function Be(i, a) {
|
|
69
69
|
const {
|
|
70
70
|
options: v = [],
|
|
71
71
|
limit: t = 20
|
|
@@ -73,7 +73,7 @@ function Be(i, n) {
|
|
|
73
73
|
function s(l) {
|
|
74
74
|
return Array.isArray(l) ? l[0] : l;
|
|
75
75
|
}
|
|
76
|
-
const r = _(s(i.modelValue)),
|
|
76
|
+
const r = _(s(i.modelValue)), c = _(""), m = _(!1), d = _([]), x = _("id"), p = _("text"), n = _(!1), o = _(i.layout !== "popover" && v.length > t);
|
|
77
77
|
function h(l) {
|
|
78
78
|
const b = l.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find((Y) => Y in b) ?? "id", A = ["text", "label", "name", "title"].find((Y) => Y in b) ?? "text";
|
|
79
79
|
return { autoValueKey: K, autoLabelKey: A };
|
|
@@ -83,43 +83,43 @@ function Be(i, n) {
|
|
|
83
83
|
x.value = l.autoValueKey, p.value = l.autoLabelKey;
|
|
84
84
|
}
|
|
85
85
|
const g = I(() => {
|
|
86
|
-
const l =
|
|
87
|
-
return i.layout === "popover" ||
|
|
86
|
+
const l = d.value;
|
|
87
|
+
return i.layout === "popover" || n.value ? l : l.slice(0, t);
|
|
88
88
|
});
|
|
89
89
|
M(() => i.modelValue, (l) => {
|
|
90
90
|
r.value = s(l);
|
|
91
|
-
}, { immediate: !0 }),
|
|
91
|
+
}, { immediate: !0 }), d.value = [...v].sort((l, b) => i.sort === "count" ? b.count && l.count ? b.count - l.count : 0 : i.sort === "name" ? String(l[p.value] ?? "").localeCompare(String(b[p.value] ?? "")) : 0);
|
|
92
92
|
function k(l) {
|
|
93
93
|
return r.value === l[x.value];
|
|
94
94
|
}
|
|
95
95
|
function y(l) {
|
|
96
|
-
r.value = l[x.value],
|
|
96
|
+
r.value = l[x.value], a("update:modelValue", r.value), a("change", { name: i.name, value: r.value });
|
|
97
97
|
}
|
|
98
98
|
function $() {
|
|
99
|
-
r.value = void 0,
|
|
99
|
+
r.value = void 0, a("update:modelValue", r.value), a("clear", i.name);
|
|
100
100
|
}
|
|
101
101
|
function C() {
|
|
102
|
-
|
|
102
|
+
n.value = !n.value;
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
105
105
|
innerValue: r,
|
|
106
|
-
searchTerm:
|
|
106
|
+
searchTerm: c,
|
|
107
107
|
filteredOptions: g,
|
|
108
108
|
isSelected: k,
|
|
109
109
|
selectItem: y,
|
|
110
110
|
clear: $,
|
|
111
111
|
toggleShowAll: C,
|
|
112
112
|
isReqProc: m,
|
|
113
|
-
showAll:
|
|
113
|
+
showAll: n,
|
|
114
114
|
isEnableShowAll: o,
|
|
115
115
|
labelKey: p,
|
|
116
116
|
valueKey: x,
|
|
117
|
-
allOptions:
|
|
117
|
+
allOptions: d
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
const J = (i,
|
|
120
|
+
const J = (i, a) => {
|
|
121
121
|
const v = i.__vccOpts || i;
|
|
122
|
-
for (const [t, s] of
|
|
122
|
+
for (const [t, s] of a)
|
|
123
123
|
v[t] = s;
|
|
124
124
|
return v;
|
|
125
125
|
}, Pe = {}, We = {
|
|
@@ -128,8 +128,8 @@ const J = (i, n) => {
|
|
|
128
128
|
fill: "none",
|
|
129
129
|
xmlns: "http://www.w3.org/2000/svg"
|
|
130
130
|
};
|
|
131
|
-
function qe(i,
|
|
132
|
-
return f(), w("svg", We,
|
|
131
|
+
function qe(i, a) {
|
|
132
|
+
return f(), w("svg", We, a[0] || (a[0] = [
|
|
133
133
|
Le('<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)
|
|
134
134
|
]));
|
|
135
135
|
}
|
|
@@ -145,8 +145,8 @@ const ve = /* @__PURE__ */ J(Pe, [["render", qe]]), Qe = {}, Ge = {
|
|
|
145
145
|
"stroke-linejoin": "round",
|
|
146
146
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
|
|
147
147
|
};
|
|
148
|
-
function Xe(i,
|
|
149
|
-
return f(), w("svg", Ge,
|
|
148
|
+
function Xe(i, a) {
|
|
149
|
+
return f(), w("svg", Ge, a[0] || (a[0] = [
|
|
150
150
|
u("path", {
|
|
151
151
|
stroke: "none",
|
|
152
152
|
d: "M0 0h24v24H0z",
|
|
@@ -167,8 +167,8 @@ const ie = /* @__PURE__ */ J(Qe, [["render", Xe]]), Je = {}, Ze = {
|
|
|
167
167
|
"stroke-linejoin": "round",
|
|
168
168
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
|
|
169
169
|
};
|
|
170
|
-
function et(i,
|
|
171
|
-
return f(), w("svg", Ze,
|
|
170
|
+
function et(i, a) {
|
|
171
|
+
return f(), w("svg", Ze, a[0] || (a[0] = [
|
|
172
172
|
u("path", {
|
|
173
173
|
stroke: "none",
|
|
174
174
|
d: "M0 0h24v24H0z",
|
|
@@ -183,10 +183,10 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
183
183
|
}, lt = { class: "flex flex-col items-center justify-center p-5 text-center" }, ot = {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
186
|
-
},
|
|
186
|
+
}, nt = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
189
|
-
},
|
|
189
|
+
}, at = /* @__PURE__ */ O({
|
|
190
190
|
__name: "radio",
|
|
191
191
|
props: {
|
|
192
192
|
id: {},
|
|
@@ -212,14 +212,14 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
212
212
|
sort: {}
|
|
213
213
|
},
|
|
214
214
|
emits: ["update:modelValue", "change", "clear"],
|
|
215
|
-
setup(i, { expose:
|
|
215
|
+
setup(i, { expose: a, emit: v }) {
|
|
216
216
|
const t = i, s = _(null), r = v, {
|
|
217
|
-
innerValue:
|
|
217
|
+
innerValue: c,
|
|
218
218
|
filteredOptions: m,
|
|
219
|
-
isSelected:
|
|
219
|
+
isSelected: d,
|
|
220
220
|
selectItem: x,
|
|
221
221
|
clear: p,
|
|
222
|
-
toggleShowAll:
|
|
222
|
+
toggleShowAll: n,
|
|
223
223
|
isReqProc: o,
|
|
224
224
|
showAll: h,
|
|
225
225
|
isEnableShowAll: g,
|
|
@@ -230,13 +230,13 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
230
230
|
...t,
|
|
231
231
|
modelValue: t.modelValue ?? t.default ?? ""
|
|
232
232
|
}, r);
|
|
233
|
-
return
|
|
233
|
+
return a({
|
|
234
234
|
clear: p,
|
|
235
235
|
inputTextRef: s
|
|
236
236
|
}), M(
|
|
237
237
|
() => t.modelValue,
|
|
238
238
|
(C) => {
|
|
239
|
-
C === void 0 && (
|
|
239
|
+
C === void 0 && (c.value = void 0);
|
|
240
240
|
}
|
|
241
241
|
), (C, l) => (f(), w("div", {
|
|
242
242
|
class: D([C.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
|
|
@@ -255,7 +255,7 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
255
255
|
color: b.color,
|
|
256
256
|
type: "radio",
|
|
257
257
|
value: b[e(y)],
|
|
258
|
-
"is-selected": e(
|
|
258
|
+
"is-selected": e(d)(b),
|
|
259
259
|
onItemClick: (K) => e(x)(b)
|
|
260
260
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
|
261
261
|
], 2),
|
|
@@ -272,7 +272,7 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
272
272
|
!e(h) && e(g) ? (f(), w("div", {
|
|
273
273
|
key: 0,
|
|
274
274
|
onClick: l[0] || (l[0] = //@ts-ignore
|
|
275
|
-
(...b) => e(
|
|
275
|
+
(...b) => e(n) && e(n)(...b)),
|
|
276
276
|
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"
|
|
277
277
|
}, [
|
|
278
278
|
l[5] || (l[5] = z(" Показати більше ", -1)),
|
|
@@ -281,7 +281,7 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
281
281
|
e(h) ? (f(), w("div", {
|
|
282
282
|
key: 1,
|
|
283
283
|
onClick: l[1] || (l[1] = //@ts-ignore
|
|
284
|
-
(...b) => e(
|
|
284
|
+
(...b) => e(n) && e(n)(...b)),
|
|
285
285
|
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"
|
|
286
286
|
}, [
|
|
287
287
|
l[6] || (l[6] = z(" Показати менше ", -1)),
|
|
@@ -290,30 +290,30 @@ const ye = /* @__PURE__ */ J(Je, [["render", et]]), tt = {
|
|
|
290
290
|
], 64)) : V("", !0),
|
|
291
291
|
C.cleanable ? (f(), w(R, { key: 2 }, [
|
|
292
292
|
C.layout === "inline" ? (f(), w("div", ot, [
|
|
293
|
-
z(F(e(
|
|
293
|
+
z(F(e(c) || e(c) === null ? 1 : 0) + " з " + F(e($).length) + " обрано ", 1),
|
|
294
294
|
T(u("button", {
|
|
295
295
|
class: "text-gray-600 hover:text-gray-800",
|
|
296
296
|
onClick: l[2] || (l[2] = //@ts-ignore
|
|
297
297
|
(...b) => e(p) && e(p)(...b))
|
|
298
298
|
}, " Очистити ", 512), [
|
|
299
|
-
[X, e(
|
|
299
|
+
[X, e(c) !== "" && e(c) !== void 0]
|
|
300
300
|
])
|
|
301
301
|
])) : V("", !0),
|
|
302
|
-
C.layout === "popover" ? (f(), w("div",
|
|
303
|
-
u("span", null, F(e(
|
|
302
|
+
C.layout === "popover" ? (f(), w("div", nt, [
|
|
303
|
+
u("span", null, F(e(c) || e(c) === null ? 1 : 0) + " з " + F(e($).length) + " обрано", 1),
|
|
304
304
|
T(u("button", {
|
|
305
305
|
class: "text-gray-600 hover:text-gray-800",
|
|
306
306
|
onClick: l[3] || (l[3] = //@ts-ignore
|
|
307
307
|
(...b) => e(p) && e(p)(...b))
|
|
308
308
|
}, " Очистити ", 512), [
|
|
309
|
-
[X, e(
|
|
309
|
+
[X, e(c) !== "" && e(c) !== void 0]
|
|
310
310
|
])
|
|
311
311
|
])) : V("", !0)
|
|
312
312
|
], 64)) : V("", !0)
|
|
313
313
|
], 2));
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
|
-
function Se(i,
|
|
316
|
+
function Se(i, a) {
|
|
317
317
|
const {
|
|
318
318
|
options: v = [],
|
|
319
319
|
limit: t = 20
|
|
@@ -321,7 +321,7 @@ function Se(i, n) {
|
|
|
321
321
|
function s(l) {
|
|
322
322
|
return Array.isArray(l) ? l : l ? [l] : [];
|
|
323
323
|
}
|
|
324
|
-
const r = _(s(i.modelValue)),
|
|
324
|
+
const r = _(s(i.modelValue)), c = _(""), m = _(!1), d = _([]), x = _("id"), p = _("text"), n = _(!1), o = _(i.layout !== "popover" && v.length > t);
|
|
325
325
|
function h(l) {
|
|
326
326
|
const b = l.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find((Y) => Y in b) ?? "id", A = ["text", "label", "name", "title"].find((Y) => Y in b) ?? "text";
|
|
327
327
|
return { autoValueKey: K, autoLabelKey: A };
|
|
@@ -331,39 +331,39 @@ function Se(i, n) {
|
|
|
331
331
|
x.value = l.autoValueKey, p.value = l.autoLabelKey;
|
|
332
332
|
}
|
|
333
333
|
const g = I(() => {
|
|
334
|
-
const l =
|
|
335
|
-
return i.layout === "popover" ||
|
|
334
|
+
const l = d.value;
|
|
335
|
+
return i.layout === "popover" || n.value ? l : l.slice(0, t);
|
|
336
336
|
});
|
|
337
337
|
M(() => i.modelValue, (l) => {
|
|
338
338
|
r.value = s(l);
|
|
339
|
-
}, { immediate: !0 }),
|
|
339
|
+
}, { immediate: !0 }), d.value = [...v].sort((l, b) => i.sort === "count" ? b.count && l.count ? b.count - l.count : 0 : i.sort === "name" ? String(l[p.value]).localeCompare(String(b[p.value])) : 0);
|
|
340
340
|
function k(l) {
|
|
341
341
|
return r.value && r.value.includes(l[x.value]);
|
|
342
342
|
}
|
|
343
343
|
function y(l) {
|
|
344
344
|
const b = r.value.includes(l[x.value]);
|
|
345
|
-
r.value = b ? r.value.filter((K) => K !== l[x.value]) : [...r.value, l[x.value]],
|
|
345
|
+
r.value = b ? r.value.filter((K) => K !== l[x.value]) : [...r.value, l[x.value]], a("update:modelValue", r.value), a("change", { name: i.name, value: r.value });
|
|
346
346
|
}
|
|
347
347
|
function $() {
|
|
348
|
-
r.value = [],
|
|
348
|
+
r.value = [], a("update:modelValue", r.value), a("clear", i.name);
|
|
349
349
|
}
|
|
350
350
|
function C() {
|
|
351
|
-
|
|
351
|
+
n.value = !n.value;
|
|
352
352
|
}
|
|
353
353
|
return {
|
|
354
354
|
innerValue: r,
|
|
355
|
-
searchTerm:
|
|
355
|
+
searchTerm: c,
|
|
356
356
|
filteredOptions: g,
|
|
357
357
|
isSelected: k,
|
|
358
358
|
selectItem: y,
|
|
359
359
|
clear: $,
|
|
360
360
|
toggleShowAll: C,
|
|
361
361
|
isReqProc: m,
|
|
362
|
-
showAll:
|
|
362
|
+
showAll: n,
|
|
363
363
|
isEnableShowAll: o,
|
|
364
364
|
labelKey: p,
|
|
365
365
|
valueKey: x,
|
|
366
|
-
allOptions:
|
|
366
|
+
allOptions: d
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
const rt = {
|
|
@@ -401,15 +401,15 @@ const rt = {
|
|
|
401
401
|
sort: {}
|
|
402
402
|
},
|
|
403
403
|
emits: ["update:modelValue", "change", "clear"],
|
|
404
|
-
setup(i, { expose:
|
|
404
|
+
setup(i, { expose: a, emit: v }) {
|
|
405
405
|
const t = i, s = v, {
|
|
406
406
|
innerValue: r,
|
|
407
|
-
filteredOptions:
|
|
407
|
+
filteredOptions: c,
|
|
408
408
|
isSelected: m,
|
|
409
|
-
selectItem:
|
|
409
|
+
selectItem: d,
|
|
410
410
|
clear: x,
|
|
411
411
|
toggleShowAll: p,
|
|
412
|
-
isReqProc:
|
|
412
|
+
isReqProc: n,
|
|
413
413
|
showAll: o,
|
|
414
414
|
isEnableShowAll: h,
|
|
415
415
|
labelKey: g,
|
|
@@ -424,7 +424,7 @@ const rt = {
|
|
|
424
424
|
($) => {
|
|
425
425
|
$ === void 0 && (r.value = []);
|
|
426
426
|
}
|
|
427
|
-
),
|
|
427
|
+
), a({
|
|
428
428
|
clear: x
|
|
429
429
|
}), ($, C) => (f(), w("div", {
|
|
430
430
|
class: D([$.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
@@ -435,7 +435,7 @@ const rt = {
|
|
|
435
435
|
$.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
436
436
|
])
|
|
437
437
|
}, [
|
|
438
|
-
(f(!0), w(R, null, W(e(
|
|
438
|
+
(f(!0), w(R, null, W(e(c), (l) => (f(), S(me, {
|
|
439
439
|
layout: $.layout,
|
|
440
440
|
count: l.count,
|
|
441
441
|
label: l[e(g)],
|
|
@@ -443,10 +443,10 @@ const rt = {
|
|
|
443
443
|
type: "checkbox",
|
|
444
444
|
value: l[e(k)],
|
|
445
445
|
"is-selected": e(m)(l),
|
|
446
|
-
onItemClick: (b) => e(
|
|
446
|
+
onItemClick: (b) => e(d)(l)
|
|
447
447
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
|
|
448
448
|
], 2),
|
|
449
|
-
$.type === "select" && e(
|
|
449
|
+
$.type === "select" && e(c).length === 0 && !e(n) ? (f(), w("div", rt, [
|
|
450
450
|
u("div", st, [
|
|
451
451
|
N(ve),
|
|
452
452
|
C[4] || (C[4] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
@@ -511,8 +511,8 @@ const rt = {
|
|
|
511
511
|
"stroke-linejoin": "round",
|
|
512
512
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
513
513
|
};
|
|
514
|
-
function ft(i,
|
|
515
|
-
return f(), w("svg", ct,
|
|
514
|
+
function ft(i, a) {
|
|
515
|
+
return f(), w("svg", ct, a[0] || (a[0] = [
|
|
516
516
|
u("path", {
|
|
517
517
|
stroke: "none",
|
|
518
518
|
d: "M0 0h24v24H0z",
|
|
@@ -534,8 +534,8 @@ const De = /* @__PURE__ */ J(dt, [["render", ft]]), pt = {}, mt = {
|
|
|
534
534
|
width: "15px",
|
|
535
535
|
height: "15px"
|
|
536
536
|
};
|
|
537
|
-
function vt(i,
|
|
538
|
-
return f(), w("svg", mt,
|
|
537
|
+
function vt(i, a) {
|
|
538
|
+
return f(), w("svg", mt, a[0] || (a[0] = [
|
|
539
539
|
u("path", {
|
|
540
540
|
stroke: "none",
|
|
541
541
|
d: "M0 0h24v24H0z",
|
|
@@ -547,8 +547,8 @@ function vt(i, n) {
|
|
|
547
547
|
}
|
|
548
548
|
const Re = /* @__PURE__ */ J(pt, [["render", vt]]);
|
|
549
549
|
class de {
|
|
550
|
-
static getWidthClass(
|
|
551
|
-
return typeof
|
|
550
|
+
static getWidthClass(a) {
|
|
551
|
+
return typeof a == "number" ? `max-w-[${a}px]` : typeof a == "string" ? a.endsWith("%") || a.endsWith("px") ? `max-w-[${a}]` : `max-w-${a}` : "w-full";
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, gt = ["placeholder"], bt = /* @__PURE__ */ O({
|
|
@@ -577,24 +577,24 @@ const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
577
577
|
sort: {}
|
|
578
578
|
},
|
|
579
579
|
emits: ["update:modelValue", "change", "clear"],
|
|
580
|
-
setup(i, { emit:
|
|
581
|
-
const v = i, t = _((v.placeHolder || v.label || v.name).toString()), s =
|
|
580
|
+
setup(i, { emit: a }) {
|
|
581
|
+
const v = i, t = _((v.placeHolder || v.label || v.name).toString()), s = a, r = _(v.modelValue ?? "");
|
|
582
582
|
M(
|
|
583
583
|
() => v.modelValue,
|
|
584
|
-
(
|
|
585
|
-
|
|
584
|
+
(d) => {
|
|
585
|
+
d !== r.value && (r.value = d ?? "");
|
|
586
586
|
}
|
|
587
587
|
);
|
|
588
|
-
function
|
|
588
|
+
function c() {
|
|
589
589
|
s("update:modelValue", r.value), s("change", { name: v.name, value: r.value });
|
|
590
590
|
}
|
|
591
591
|
function m() {
|
|
592
592
|
r.value = "", s("update:modelValue", ""), s("clear", v.name);
|
|
593
593
|
}
|
|
594
|
-
return (
|
|
594
|
+
return (d, x) => (f(), w("div", {
|
|
595
595
|
class: D([
|
|
596
596
|
"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",
|
|
597
|
-
|
|
597
|
+
d.layout === "inline" ? e(de).getWidthClass(d.width) : "mb-2" + (d.layout === "popover" ? " m-2" : "")
|
|
598
598
|
])
|
|
599
599
|
}, [
|
|
600
600
|
u("div", yt, [
|
|
@@ -610,7 +610,7 @@ const yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
610
610
|
T(u("input", {
|
|
611
611
|
type: "text",
|
|
612
612
|
"onUpdate:modelValue": x[0] || (x[0] = (p) => r.value = p),
|
|
613
|
-
onInput:
|
|
613
|
+
onInput: c,
|
|
614
614
|
placeholder: t.value,
|
|
615
615
|
class: "!pr-7 !pl-8 bg-white h-[38px] 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"
|
|
616
616
|
}, null, 40, gt), [
|
|
@@ -670,76 +670,76 @@ const At = /* @__PURE__ */ O({
|
|
|
670
670
|
sort: {}
|
|
671
671
|
},
|
|
672
672
|
emits: ["update:modelValue", "change", "clear"],
|
|
673
|
-
setup(i, { expose:
|
|
674
|
-
const t = Me(), s = ht(), r = i,
|
|
673
|
+
setup(i, { expose: a, emit: v }) {
|
|
674
|
+
const t = Me(), s = ht(), r = i, c = _(
|
|
675
675
|
r.modelValue ?? r.default ?? []
|
|
676
|
-
), m = v,
|
|
677
|
-
get: () => r.modelValue ??
|
|
678
|
-
set: (
|
|
679
|
-
r.modelValue !== void 0 ? m("update:modelValue",
|
|
676
|
+
), m = v, d = I({
|
|
677
|
+
get: () => r.modelValue ?? c.value,
|
|
678
|
+
set: (n) => {
|
|
679
|
+
r.modelValue !== void 0 ? m("update:modelValue", n) : c.value = n;
|
|
680
680
|
}
|
|
681
681
|
});
|
|
682
682
|
function x() {
|
|
683
|
-
m("change", { name: r.name, value:
|
|
683
|
+
m("change", { name: r.name, value: d.value || c.value });
|
|
684
684
|
}
|
|
685
685
|
function p() {
|
|
686
|
-
|
|
686
|
+
c.value = [], d.value = c.value, m("clear", r.name);
|
|
687
687
|
}
|
|
688
|
-
return M(() => r.modelValue, (
|
|
689
|
-
|
|
690
|
-
}),
|
|
688
|
+
return M(() => r.modelValue, (n) => {
|
|
689
|
+
n !== void 0 && r.layout !== "popover" ? (c.value = n, m("update:modelValue", n)) : c.value = [];
|
|
690
|
+
}), a({
|
|
691
691
|
clear: p,
|
|
692
|
-
currentValue:
|
|
693
|
-
}), (
|
|
692
|
+
currentValue: d
|
|
693
|
+
}), (n, o) => (f(), w(R, null, [
|
|
694
694
|
u("div", null, [
|
|
695
695
|
u("div", {
|
|
696
|
-
class: D(
|
|
696
|
+
class: D(n.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
|
697
697
|
}, [
|
|
698
698
|
u("div", null, [
|
|
699
|
-
|
|
699
|
+
n.layout !== "vertical" ? (f(), w("label", kt, "Від")) : V("", !0),
|
|
700
700
|
T(u("input", {
|
|
701
701
|
type: "number",
|
|
702
702
|
class: D(e(t)),
|
|
703
|
-
placeholder:
|
|
703
|
+
placeholder: n.placeHolder?.[0] ?? "min",
|
|
704
704
|
step: "1",
|
|
705
705
|
style: { outline: "none" },
|
|
706
|
-
"onUpdate:modelValue": o[0] || (o[0] = (h) =>
|
|
707
|
-
disabled:
|
|
706
|
+
"onUpdate:modelValue": o[0] || (o[0] = (h) => d.value[0] = h),
|
|
707
|
+
disabled: n.disabled
|
|
708
708
|
}, null, 10, wt), [
|
|
709
|
-
[G,
|
|
709
|
+
[G, d.value[0]]
|
|
710
710
|
])
|
|
711
711
|
]),
|
|
712
|
-
|
|
712
|
+
n.layout === "vertical" ? (f(), w("label", Ct, " - ")) : V("", !0),
|
|
713
713
|
u("div", null, [
|
|
714
|
-
|
|
714
|
+
n.layout !== "vertical" ? (f(), w("label", Vt, "До")) : V("", !0),
|
|
715
715
|
T(u("input", {
|
|
716
716
|
type: "number",
|
|
717
717
|
class: D(e(t)),
|
|
718
|
-
placeholder:
|
|
718
|
+
placeholder: n.placeHolder?.[1] ?? "max",
|
|
719
719
|
min: "0",
|
|
720
720
|
max: "1000000000000000",
|
|
721
721
|
step: "1",
|
|
722
722
|
style: { outline: "none" },
|
|
723
|
-
"onUpdate:modelValue": o[1] || (o[1] = (h) =>
|
|
724
|
-
disabled:
|
|
723
|
+
"onUpdate:modelValue": o[1] || (o[1] = (h) => d.value[1] = h),
|
|
724
|
+
disabled: n.disabled
|
|
725
725
|
}, null, 10, _t), [
|
|
726
|
-
[G,
|
|
726
|
+
[G, d.value[1]]
|
|
727
727
|
])
|
|
728
728
|
]),
|
|
729
|
-
["popover", "inline", "vertical"].includes(
|
|
729
|
+
["popover", "inline", "vertical"].includes(n.layout) ? (f(), w("button", {
|
|
730
730
|
key: 1,
|
|
731
731
|
onClick: x,
|
|
732
|
-
class: D(e(s) + (
|
|
733
|
-
}, F(
|
|
734
|
-
["popover", "inline"].includes(
|
|
732
|
+
class: D(e(s) + (n.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
|
733
|
+
}, F(n.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : V("", !0),
|
|
734
|
+
["popover", "inline"].includes(n.layout) ? (f(), w("button", {
|
|
735
735
|
key: 2,
|
|
736
|
-
disabled: !(
|
|
736
|
+
disabled: !(d.value[0] || d.value[1]),
|
|
737
737
|
onClick: p,
|
|
738
738
|
class: D(e(s) + " hover:bg-gray-100")
|
|
739
739
|
}, "Очистити", 10, $t)) : V("", !0)
|
|
740
740
|
], 2)
|
|
741
741
|
]),
|
|
742
|
-
(
|
|
742
|
+
(n.cleanable && c.value.length, V("", !0))
|
|
743
743
|
], 64));
|
|
744
744
|
}
|
|
745
745
|
}), Bt = ["disabled", "title"], St = {
|
|
@@ -756,10 +756,10 @@ const At = /* @__PURE__ */ O({
|
|
|
756
756
|
mode: {},
|
|
757
757
|
layout: {}
|
|
758
758
|
},
|
|
759
|
-
setup(i, { expose:
|
|
760
|
-
const v = i, t = I(() => Ke(v.mode)), s = _(!1), r = _({ top: 0, left: 0 }),
|
|
759
|
+
setup(i, { expose: a }) {
|
|
760
|
+
const v = i, t = I(() => Ke(v.mode)), s = _(!1), r = _({ top: 0, left: 0 }), c = _(null), m = _(null), d = _(null);
|
|
761
761
|
function x() {
|
|
762
|
-
const y = m.value, $ =
|
|
762
|
+
const y = m.value, $ = d.value;
|
|
763
763
|
if (!y || !$) return;
|
|
764
764
|
const C = y.getBoundingClientRect(), l = $.offsetWidth, b = window.innerWidth, K = C.bottom + 8;
|
|
765
765
|
let { left: A } = C;
|
|
@@ -770,24 +770,24 @@ const At = /* @__PURE__ */ O({
|
|
|
770
770
|
x(), v.fieldRef?.inputTextRef && v.fieldRef?.inputTextRef.focus();
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
!
|
|
773
|
+
function n(y) {
|
|
774
|
+
!c.value?.contains(y.target) && !d.value?.contains(y.target) && (s.value = !1);
|
|
775
775
|
}
|
|
776
776
|
function o(y) {
|
|
777
777
|
y.key === "Escape" && (s.value = !1);
|
|
778
778
|
}
|
|
779
779
|
const h = _(!1);
|
|
780
|
-
|
|
780
|
+
ae(() => {
|
|
781
781
|
h.value = !0;
|
|
782
|
-
}),
|
|
783
|
-
document.addEventListener("click",
|
|
782
|
+
}), ae(() => {
|
|
783
|
+
document.addEventListener("click", n, !0), document.addEventListener("keydown", o), window.addEventListener("scroll", x, !0);
|
|
784
784
|
}), ce(() => {
|
|
785
|
-
document.removeEventListener("click",
|
|
785
|
+
document.removeEventListener("click", n, !0), document.removeEventListener("keydown", o), window.removeEventListener("scroll", x, !0);
|
|
786
786
|
});
|
|
787
787
|
function g() {
|
|
788
788
|
s.value = !1;
|
|
789
789
|
}
|
|
790
|
-
|
|
790
|
+
a({ close: g });
|
|
791
791
|
const k = I(() => {
|
|
792
792
|
const y = v.fieldRef?.selectedLabels;
|
|
793
793
|
return y ? Array.isArray(y) ? y.length > 0 ? y.join(", ") : v.label ?? "" : String(y) : v.label ?? "";
|
|
@@ -813,7 +813,7 @@ const At = /* @__PURE__ */ O({
|
|
|
813
813
|
}, [
|
|
814
814
|
T(u("div", {
|
|
815
815
|
ref_key: "popperRef",
|
|
816
|
-
ref:
|
|
816
|
+
ref: d,
|
|
817
817
|
class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
|
|
818
818
|
style: Ae({ top: `${r.value.top}px`, left: `${r.value.left}px` }),
|
|
819
819
|
"data-inside-popover": ""
|
|
@@ -834,62 +834,62 @@ function Mt(i) {
|
|
|
834
834
|
return String(i).charAt(0).toUpperCase() + String(i).slice(1);
|
|
835
835
|
}
|
|
836
836
|
class H {
|
|
837
|
-
static format(
|
|
838
|
-
const v =
|
|
837
|
+
static format(a) {
|
|
838
|
+
const v = a.getFullYear(), t = (a.getMonth() + 1).toString().padStart(2, "0"), s = a.getDate().toString().padStart(2, "0");
|
|
839
839
|
return `${v}-${t}-${s}`;
|
|
840
840
|
}
|
|
841
|
-
static getShiftedDay(
|
|
842
|
-
const t =
|
|
841
|
+
static getShiftedDay(a, v = 0) {
|
|
842
|
+
const t = a ? new Date(a) : /* @__PURE__ */ new Date();
|
|
843
843
|
return t.setDate(t.getDate() + v), this.format(t);
|
|
844
844
|
}
|
|
845
|
-
static getLastWeekRange(
|
|
846
|
-
if (
|
|
847
|
-
const x = new Date(
|
|
845
|
+
static getLastWeekRange(a, v, t = 0) {
|
|
846
|
+
if (a && v) {
|
|
847
|
+
const x = new Date(a), p = new Date(v);
|
|
848
848
|
return x.setDate(x.getDate() + t * 7), p.setDate(p.getDate() + t * 7), [this.format(x), this.format(p)];
|
|
849
849
|
}
|
|
850
|
-
const s = /* @__PURE__ */ new Date(), r = s.getDay(),
|
|
851
|
-
m.setDate(s.getDate() -
|
|
852
|
-
const
|
|
853
|
-
return
|
|
850
|
+
const s = /* @__PURE__ */ new Date(), r = s.getDay(), c = r === 0 ? 13 : r - 1 + 7, m = new Date(s);
|
|
851
|
+
m.setDate(s.getDate() - c + t * 7);
|
|
852
|
+
const d = new Date(m);
|
|
853
|
+
return d.setDate(m.getDate() + 6), [this.format(m), this.format(d)];
|
|
854
854
|
}
|
|
855
|
-
static getMonthRange(
|
|
855
|
+
static getMonthRange(a, v, t = 0) {
|
|
856
856
|
let s;
|
|
857
|
-
|
|
858
|
-
const r = s,
|
|
859
|
-
return [this.format(r), this.format(
|
|
860
|
-
}
|
|
861
|
-
static getQuarterRange(
|
|
862
|
-
const s =
|
|
863
|
-
let
|
|
864
|
-
|
|
865
|
-
const m = (
|
|
857
|
+
a ? s = new Date(a) : s = /* @__PURE__ */ new Date(), s = new Date(s.getFullYear(), s.getMonth() + t, 1);
|
|
858
|
+
const r = s, c = new Date(s.getFullYear(), s.getMonth() + 1, 0);
|
|
859
|
+
return [this.format(r), this.format(c)];
|
|
860
|
+
}
|
|
861
|
+
static getQuarterRange(a, v, t = 0) {
|
|
862
|
+
const s = a || v, r = s ? new Date(s) : /* @__PURE__ */ new Date();
|
|
863
|
+
let c = Math.floor(r.getMonth() / 3);
|
|
864
|
+
c += t;
|
|
865
|
+
const m = (c % 4 + 4) % 4 * 3, d = r.getFullYear() + Math.floor(c / 4), x = new Date(d, m, 1), p = new Date(d, m + 3, 0);
|
|
866
866
|
return [this.format(x), this.format(p)];
|
|
867
867
|
}
|
|
868
|
-
static getYear(
|
|
868
|
+
static getYear(a, v = 0) {
|
|
869
869
|
let t;
|
|
870
|
-
return
|
|
870
|
+
return a && /^\d{4}$/.test(a) ? t = parseInt(a, 10) : a ? t = new Date(a).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + v);
|
|
871
871
|
}
|
|
872
|
-
static getYearRange(
|
|
872
|
+
static getYearRange(a, v = 0) {
|
|
873
873
|
let t;
|
|
874
|
-
return
|
|
874
|
+
return a && /^\d{4}$/.test(a) ? t = parseInt(a, 10) : a ? t = new Date(a).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
|
|
875
875
|
this.format(new Date(t + v, 0, 1)),
|
|
876
876
|
this.format(new Date(t + v + 1, 0, 0))
|
|
877
877
|
];
|
|
878
878
|
}
|
|
879
|
-
static getRangeFromDaysBefore(
|
|
879
|
+
static getRangeFromDaysBefore(a) {
|
|
880
880
|
const v = /* @__PURE__ */ new Date(), t = new Date(v.getTime());
|
|
881
|
-
return t.setDate(v.getDate() -
|
|
881
|
+
return t.setDate(v.getDate() - a), [this.format(t), this.format(v)];
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function Fe(i,
|
|
884
|
+
function Fe(i, a) {
|
|
885
885
|
const {
|
|
886
886
|
popoverRef: v
|
|
887
887
|
} = i, t = _(""), s = _(
|
|
888
888
|
i.modelValue ?? i.default ?? []
|
|
889
889
|
), r = _(0);
|
|
890
|
-
function
|
|
890
|
+
function c() {
|
|
891
891
|
const k = H.getRangeFromDaysBefore(r.value);
|
|
892
|
-
return s.value = [...k],
|
|
892
|
+
return s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value), k;
|
|
893
893
|
}
|
|
894
894
|
function m(k) {
|
|
895
895
|
t.value = k, v.value?.close();
|
|
@@ -911,15 +911,15 @@ function Fe(i, n) {
|
|
|
911
911
|
y.push(...H.getYearRange());
|
|
912
912
|
break;
|
|
913
913
|
case "last_7_days":
|
|
914
|
-
r.value = 7,
|
|
914
|
+
r.value = 7, c();
|
|
915
915
|
break;
|
|
916
916
|
case "range":
|
|
917
|
-
r.value = 7, y.push(...
|
|
917
|
+
r.value = 7, y.push(...c());
|
|
918
918
|
break;
|
|
919
919
|
}
|
|
920
|
-
s.value = [...y],
|
|
920
|
+
s.value = [...y], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function d() {
|
|
923
923
|
const k = [];
|
|
924
924
|
switch (t.value) {
|
|
925
925
|
case "today":
|
|
@@ -938,7 +938,7 @@ function Fe(i, n) {
|
|
|
938
938
|
k.push(...H.getYearRange(s.value[0], 1));
|
|
939
939
|
break;
|
|
940
940
|
}
|
|
941
|
-
s.value = [...k],
|
|
941
|
+
s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
|
|
942
942
|
}
|
|
943
943
|
function x() {
|
|
944
944
|
const k = [];
|
|
@@ -959,7 +959,7 @@ function Fe(i, n) {
|
|
|
959
959
|
k.push(...H.getYearRange(s.value[0], -1));
|
|
960
960
|
break;
|
|
961
961
|
}
|
|
962
|
-
s.value = [...k],
|
|
962
|
+
s.value = [...k], a("change", { name: i.name, value: s.value }), a("update:modelValue", s.value);
|
|
963
963
|
}
|
|
964
964
|
const p = [
|
|
965
965
|
"Січень",
|
|
@@ -975,7 +975,7 @@ function Fe(i, n) {
|
|
|
975
975
|
"Листопад",
|
|
976
976
|
"Грудень"
|
|
977
977
|
];
|
|
978
|
-
function
|
|
978
|
+
function n(k) {
|
|
979
979
|
const [y, $, C] = k.split("-");
|
|
980
980
|
return `${C}.${$}.${y}`;
|
|
981
981
|
}
|
|
@@ -983,11 +983,11 @@ function Fe(i, n) {
|
|
|
983
983
|
const { value: y } = s;
|
|
984
984
|
switch (k) {
|
|
985
985
|
case "today":
|
|
986
|
-
return
|
|
986
|
+
return n(y[0]);
|
|
987
987
|
case "range":
|
|
988
988
|
return "Період";
|
|
989
989
|
case "week":
|
|
990
|
-
return y[0] && y[1] ? `${
|
|
990
|
+
return y[0] && y[1] ? `${n(y[0])} – ${n(y[1])}` : "";
|
|
991
991
|
case "quarter":
|
|
992
992
|
if (y[0]) {
|
|
993
993
|
const $ = new Date(y[0]), C = $.getFullYear(), l = $.getMonth();
|
|
@@ -1010,18 +1010,18 @@ function Fe(i, n) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
const h = I(() => t.value ? o(t.value) : i.label ?? "");
|
|
1012
1012
|
function g() {
|
|
1013
|
-
t.value = "", s.value = [],
|
|
1013
|
+
t.value = "", s.value = [], a("update:modelValue", []), a("clear", i.name);
|
|
1014
1014
|
}
|
|
1015
1015
|
return {
|
|
1016
1016
|
activeMode: t,
|
|
1017
1017
|
innerValue: s,
|
|
1018
1018
|
daysBefore: r,
|
|
1019
|
-
onDaysBeforeChange:
|
|
1019
|
+
onDaysBeforeChange: c,
|
|
1020
1020
|
onSelectChange: m,
|
|
1021
|
-
nextClick:
|
|
1021
|
+
nextClick: d,
|
|
1022
1022
|
prevClick: x,
|
|
1023
1023
|
ukMonths: p,
|
|
1024
|
-
formatDisplayDate:
|
|
1024
|
+
formatDisplayDate: n,
|
|
1025
1025
|
getModeLabel: o,
|
|
1026
1026
|
currentLabel: h,
|
|
1027
1027
|
clear: g
|
|
@@ -1069,26 +1069,26 @@ const Ht = /* @__PURE__ */ O({
|
|
|
1069
1069
|
sort: {}
|
|
1070
1070
|
},
|
|
1071
1071
|
emits: ["update:modelValue", "change", "clear"],
|
|
1072
|
-
setup(i, { expose:
|
|
1073
|
-
const t = i, s = Me(), r = xt(),
|
|
1074
|
-
activeMode:
|
|
1072
|
+
setup(i, { expose: a, emit: v }) {
|
|
1073
|
+
const t = i, s = Me(), r = xt(), c = v, m = _(null), {
|
|
1074
|
+
activeMode: d,
|
|
1075
1075
|
innerValue: x,
|
|
1076
1076
|
onSelectChange: p,
|
|
1077
|
-
nextClick:
|
|
1077
|
+
nextClick: n,
|
|
1078
1078
|
prevClick: o,
|
|
1079
1079
|
clear: h
|
|
1080
1080
|
} = Fe({
|
|
1081
1081
|
...t,
|
|
1082
1082
|
popoverRef: m
|
|
1083
|
-
},
|
|
1083
|
+
}, c);
|
|
1084
1084
|
return M(() => t.modelValue, (g) => {
|
|
1085
|
-
g !== void 0 ? (x.value = g,
|
|
1086
|
-
}),
|
|
1085
|
+
g !== void 0 ? (x.value = g, c("update:modelValue", g)) : (d.value = "", x.value = []);
|
|
1086
|
+
}), a({
|
|
1087
1087
|
clear: h,
|
|
1088
1088
|
popoverRef: m
|
|
1089
1089
|
}), (g, k) => (f(), w(R, null, [
|
|
1090
1090
|
g.layout === "inline" ? (f(), w("div", Kt, [
|
|
1091
|
-
e(
|
|
1091
|
+
e(d) !== "" && e(d) === "range" ? (f(), w("div", Ft, [
|
|
1092
1092
|
T(u("input", {
|
|
1093
1093
|
type: "date",
|
|
1094
1094
|
max: e(x)[1],
|
|
@@ -1149,7 +1149,7 @@ const Ht = /* @__PURE__ */ O({
|
|
|
1149
1149
|
u("div", zt, [
|
|
1150
1150
|
(f(), w(R, null, W(["today", "week", "month", "quarter", "year"], (y) => u("button", {
|
|
1151
1151
|
key: y,
|
|
1152
|
-
class: D(e(r) + (e(
|
|
1152
|
+
class: D(e(r) + (e(d) === y ? " bg-blue-100" : "")),
|
|
1153
1153
|
onClick: ($) => e(p)(y)
|
|
1154
1154
|
}, F(e(Mt)(y)), 11, Nt)), 64)),
|
|
1155
1155
|
u("button", {
|
|
@@ -1160,26 +1160,26 @@ const Ht = /* @__PURE__ */ O({
|
|
|
1160
1160
|
u("button", {
|
|
1161
1161
|
class: D(e(r)),
|
|
1162
1162
|
onClick: k[5] || (k[5] = //@ts-ignore
|
|
1163
|
-
(...y) => e(
|
|
1163
|
+
(...y) => e(n) && e(n)(...y))
|
|
1164
1164
|
}, " >", 2)
|
|
1165
1165
|
]),
|
|
1166
1166
|
(g.cleanable, V("", !0))
|
|
1167
1167
|
], 64));
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
|
-
function Yt(i,
|
|
1170
|
+
function Yt(i, a) {
|
|
1171
1171
|
const {
|
|
1172
1172
|
api: v,
|
|
1173
1173
|
options: t = [],
|
|
1174
1174
|
limit: s = 20,
|
|
1175
1175
|
dataKey: r = "data"
|
|
1176
|
-
} = i,
|
|
1176
|
+
} = i, c = i.multi;
|
|
1177
1177
|
function m(B) {
|
|
1178
|
-
return
|
|
1178
|
+
return c ? Array.isArray(B) ? B : B ? [B] : [] : Array.isArray(B) ? B[0] : B;
|
|
1179
1179
|
}
|
|
1180
|
-
const
|
|
1180
|
+
const d = _(m(i.modelValue)), x = _(""), p = _(!1), n = _([]), o = _("id"), h = _("text"), g = _(!1), k = _(i.layout !== "popover" && t.length > s), y = _([]), $ = _(0);
|
|
1181
1181
|
function C(B) {
|
|
1182
|
-
const U = B.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((
|
|
1182
|
+
const U = B.find(Boolean) ?? {}, q = ["id", "value", "code", "key"].find((ne) => ne in U) ?? "id", se = ["text", "label", "name", "title"].find((ne) => ne in U) ?? "text";
|
|
1183
1183
|
return { autoValueKey: q, autoLabelKey: se };
|
|
1184
1184
|
}
|
|
1185
1185
|
if (t.length > 0) {
|
|
@@ -1187,8 +1187,8 @@ function Yt(i, n) {
|
|
|
1187
1187
|
o.value = B.autoValueKey, h.value = B.autoLabelKey;
|
|
1188
1188
|
}
|
|
1189
1189
|
const l = I(() => {
|
|
1190
|
-
if (v) return
|
|
1191
|
-
const B =
|
|
1190
|
+
if (v) return n.value;
|
|
1191
|
+
const B = n.value;
|
|
1192
1192
|
if (i.layout === "popover") return B;
|
|
1193
1193
|
if (!x.value)
|
|
1194
1194
|
return g.value ? B : B.slice(0, s);
|
|
@@ -1206,9 +1206,9 @@ function Yt(i, n) {
|
|
|
1206
1206
|
if (!q.ok)
|
|
1207
1207
|
throw new Error(`HTTP error! status: ${q.status}`);
|
|
1208
1208
|
const se = await q.json();
|
|
1209
|
-
if (
|
|
1210
|
-
const
|
|
1211
|
-
o.value =
|
|
1209
|
+
if (n.value = se[r], n.value.length > 0) {
|
|
1210
|
+
const ne = C(n.value);
|
|
1211
|
+
o.value = ne.autoValueKey, h.value = ne.autoLabelKey;
|
|
1212
1212
|
}
|
|
1213
1213
|
$.value = se.total;
|
|
1214
1214
|
} catch (U) {
|
|
@@ -1223,21 +1223,21 @@ function Yt(i, n) {
|
|
|
1223
1223
|
K(B);
|
|
1224
1224
|
}, 200));
|
|
1225
1225
|
}), M(() => i.modelValue, (B) => {
|
|
1226
|
-
|
|
1227
|
-
}, { immediate: !0 }), v ? K("") :
|
|
1226
|
+
d.value = m(B);
|
|
1227
|
+
}, { immediate: !0 }), v ? K("") : n.value = t;
|
|
1228
1228
|
function A(B) {
|
|
1229
|
-
return
|
|
1229
|
+
return c && Array.isArray(d.value) ? d.value.includes(B[o.value]) : d.value && d.value === B[o.value];
|
|
1230
1230
|
}
|
|
1231
1231
|
function Y(B) {
|
|
1232
|
-
if (
|
|
1233
|
-
const U =
|
|
1234
|
-
|
|
1232
|
+
if (c && !Array.isArray(d.value) && (d.value = []), c && Array.isArray(d.value)) {
|
|
1233
|
+
const U = d.value.includes(B[o.value]);
|
|
1234
|
+
d.value = U ? d.value.filter((q) => q !== B[o.value]) : [...d.value, B[o.value]], y.value = U ? y.value.filter((q) => q !== B[h.value]) : [...y.value, B[h.value]];
|
|
1235
1235
|
} else
|
|
1236
|
-
|
|
1237
|
-
|
|
1236
|
+
d.value = B[o.value], y.value = B[h.value];
|
|
1237
|
+
a("update:modelValue", d.value), a("change", { name: i.name, value: d.value });
|
|
1238
1238
|
}
|
|
1239
1239
|
function L() {
|
|
1240
|
-
|
|
1240
|
+
c ? (d.value = [], y.value = []) : (d.value = void 0, y.value = []), a("update:modelValue", d.value), a("clear", i.name);
|
|
1241
1241
|
}
|
|
1242
1242
|
function j() {
|
|
1243
1243
|
b && clearTimeout(b), x.value = "", g.value = !1;
|
|
@@ -1264,7 +1264,7 @@ function Yt(i, n) {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
return {
|
|
1267
|
-
innerValue:
|
|
1267
|
+
innerValue: d,
|
|
1268
1268
|
searchTerm: x,
|
|
1269
1269
|
filteredOptions: l,
|
|
1270
1270
|
isSelected: A,
|
|
@@ -1277,7 +1277,7 @@ function Yt(i, n) {
|
|
|
1277
1277
|
isEnableShowAll: k,
|
|
1278
1278
|
labelKey: h,
|
|
1279
1279
|
valueKey: o,
|
|
1280
|
-
allOptions:
|
|
1280
|
+
allOptions: n,
|
|
1281
1281
|
highlightedIndex: Q,
|
|
1282
1282
|
onKeyDown: re,
|
|
1283
1283
|
selectedLabels: y,
|
|
@@ -1319,14 +1319,14 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1319
1319
|
sort: {}
|
|
1320
1320
|
},
|
|
1321
1321
|
emits: ["update:modelValue", "change", "clear"],
|
|
1322
|
-
setup(i, { expose:
|
|
1322
|
+
setup(i, { expose: a, emit: v }) {
|
|
1323
1323
|
const t = i, s = v, r = _(null), {
|
|
1324
|
-
innerValue:
|
|
1324
|
+
innerValue: c,
|
|
1325
1325
|
filteredOptions: m,
|
|
1326
|
-
isSelected:
|
|
1326
|
+
isSelected: d,
|
|
1327
1327
|
selectItem: x,
|
|
1328
1328
|
clear: p,
|
|
1329
|
-
resetSearch:
|
|
1329
|
+
resetSearch: n,
|
|
1330
1330
|
toggleShowAll: o,
|
|
1331
1331
|
isReqProc: h,
|
|
1332
1332
|
showAll: g,
|
|
@@ -1342,12 +1342,12 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1342
1342
|
...t,
|
|
1343
1343
|
modelValue: t.modelValue
|
|
1344
1344
|
}, s);
|
|
1345
|
-
|
|
1346
|
-
|
|
1345
|
+
ae(() => {
|
|
1346
|
+
n();
|
|
1347
1347
|
}), M(
|
|
1348
1348
|
() => t.modelValue,
|
|
1349
1349
|
(L) => {
|
|
1350
|
-
L === void 0 && (t.multi ?
|
|
1350
|
+
L === void 0 && (t.multi ? c.value = [] : c.value = void 0);
|
|
1351
1351
|
}
|
|
1352
1352
|
);
|
|
1353
1353
|
const Y = _([]);
|
|
@@ -1358,7 +1358,7 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1358
1358
|
});
|
|
1359
1359
|
}), M(m, () => {
|
|
1360
1360
|
Y.value = [];
|
|
1361
|
-
}),
|
|
1361
|
+
}), a({
|
|
1362
1362
|
clear: p,
|
|
1363
1363
|
inputTextRef: r,
|
|
1364
1364
|
selectedLabels: K
|
|
@@ -1397,7 +1397,7 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1397
1397
|
color: E.color,
|
|
1398
1398
|
type: L.multi ? "checkbox" : "radio",
|
|
1399
1399
|
value: E[e(C)],
|
|
1400
|
-
"is-selected": e(
|
|
1400
|
+
"is-selected": e(d)(E),
|
|
1401
1401
|
highlighted: Q === e(l),
|
|
1402
1402
|
onItemClick: (re) => e(x)(E),
|
|
1403
1403
|
ref_for: !0,
|
|
@@ -1435,23 +1435,23 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1435
1435
|
], 64)) : V("", !0),
|
|
1436
1436
|
L.cleanable ? (f(), w(R, { key: 2 }, [
|
|
1437
1437
|
L.layout === "inline" ? (f(), w("div", Qt, [
|
|
1438
|
-
z(F(L.multi && Array.isArray(e(
|
|
1438
|
+
z(F(L.multi && Array.isArray(e(c)) ? e(c)?.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + F(e(A)) + " обрано ", 1),
|
|
1439
1439
|
T(u("button", {
|
|
1440
1440
|
class: "text-gray-600 hover:text-gray-800",
|
|
1441
1441
|
onClick: j[5] || (j[5] = //@ts-ignore
|
|
1442
1442
|
(...E) => e(p) && e(p)(...E))
|
|
1443
1443
|
}, " Очистити ", 512), [
|
|
1444
|
-
[X, e(
|
|
1444
|
+
[X, e(c) !== "" && e(c) !== void 0 || e(c)]
|
|
1445
1445
|
])
|
|
1446
1446
|
])) : V("", !0),
|
|
1447
1447
|
L.layout === "popover" ? (f(), w("div", Gt, [
|
|
1448
|
-
u("span", null, F(L.multi && Array.isArray(e(
|
|
1448
|
+
u("span", null, F(L.multi && Array.isArray(e(c)) ? e(c)?.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + F(e(A)) + " обрано", 1),
|
|
1449
1449
|
T(u("button", {
|
|
1450
1450
|
class: "text-gray-600 hover:text-gray-800",
|
|
1451
1451
|
onClick: j[6] || (j[6] = //@ts-ignore
|
|
1452
1452
|
(...E) => e(p) && e(p)(...E))
|
|
1453
1453
|
}, " Очистити ", 512), [
|
|
1454
|
-
[X, e(
|
|
1454
|
+
[X, e(c) !== "" && e(c) !== void 0 || e(c)]
|
|
1455
1455
|
])
|
|
1456
1456
|
])) : V("", !0)
|
|
1457
1457
|
], 64)) : V("", !0)
|
|
@@ -1489,15 +1489,15 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1489
1489
|
sort: {}
|
|
1490
1490
|
},
|
|
1491
1491
|
emits: ["update:modelValue", "change", "clear"],
|
|
1492
|
-
setup(i, { expose:
|
|
1492
|
+
setup(i, { expose: a, emit: v }) {
|
|
1493
1493
|
const t = i, s = v, {
|
|
1494
1494
|
innerValue: r,
|
|
1495
|
-
isSelected:
|
|
1495
|
+
isSelected: c,
|
|
1496
1496
|
selectItem: m,
|
|
1497
|
-
clear:
|
|
1497
|
+
clear: d,
|
|
1498
1498
|
labelKey: x,
|
|
1499
1499
|
valueKey: p,
|
|
1500
|
-
allOptions:
|
|
1500
|
+
allOptions: n
|
|
1501
1501
|
} = t.multi ? Se({
|
|
1502
1502
|
...t,
|
|
1503
1503
|
modelValue: t.modelValue ?? t.default ?? []
|
|
@@ -1505,8 +1505,8 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1505
1505
|
...t,
|
|
1506
1506
|
modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
|
|
1507
1507
|
}, s);
|
|
1508
|
-
return
|
|
1509
|
-
clear:
|
|
1508
|
+
return a({
|
|
1509
|
+
clear: d
|
|
1510
1510
|
}), M(
|
|
1511
1511
|
() => t.modelValue,
|
|
1512
1512
|
(o) => {
|
|
@@ -1516,11 +1516,11 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1516
1516
|
u("div", {
|
|
1517
1517
|
class: D(["grid grid-cols-3 gap-2 mx-[1px]", o.layout === "popover" ? "m-1" : "mb-1"])
|
|
1518
1518
|
}, [
|
|
1519
|
-
(f(!0), w(R, null, W(e(
|
|
1519
|
+
(f(!0), w(R, null, W(e(n), (g) => (f(), w("label", {
|
|
1520
1520
|
key: `item-${g[e(p)]}`,
|
|
1521
1521
|
for: `item-${g[e(p)]}`,
|
|
1522
1522
|
onClick: _e((k) => e(m)(g), ["stop", "prevent"]),
|
|
1523
|
-
class: D([e(
|
|
1523
|
+
class: D([e(c)(g) ? "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%)]"])
|
|
1524
1524
|
}, [
|
|
1525
1525
|
u("input", {
|
|
1526
1526
|
type: "checkbox",
|
|
@@ -1534,21 +1534,21 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1534
1534
|
], 2),
|
|
1535
1535
|
o.cleanable ? (f(), w(R, { key: 0 }, [
|
|
1536
1536
|
o.layout === "inline" ? (f(), w("div", tl, [
|
|
1537
|
-
z(F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(
|
|
1537
|
+
z(F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(n).length) + " обрано ", 1),
|
|
1538
1538
|
T(u("button", {
|
|
1539
1539
|
class: "text-gray-600 hover:text-gray-800",
|
|
1540
1540
|
onClick: h[0] || (h[0] = //@ts-ignore
|
|
1541
|
-
(...g) => e(
|
|
1541
|
+
(...g) => e(d) && e(d)(...g))
|
|
1542
1542
|
}, " Очистити ", 512), [
|
|
1543
1543
|
[X, e(r) !== "" && e(r) !== void 0 || e(r)]
|
|
1544
1544
|
])
|
|
1545
1545
|
])) : V("", !0),
|
|
1546
1546
|
o.layout === "popover" ? (f(), w("div", ll, [
|
|
1547
|
-
u("span", null, F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(
|
|
1547
|
+
u("span", null, F(o.multi && Array.isArray(e(r)) ? e(r)?.length : e(r) !== void 0 && (e(r) || e(r) === null) ? 1 : 0) + " з " + F(e(n).length) + " обрано", 1),
|
|
1548
1548
|
T(u("button", {
|
|
1549
1549
|
class: "text-gray-600 hover:text-gray-800",
|
|
1550
1550
|
onClick: h[1] || (h[1] = //@ts-ignore
|
|
1551
|
-
(...g) => e(
|
|
1551
|
+
(...g) => e(d) && e(d)(...g))
|
|
1552
1552
|
}, " Очистити ", 512), [
|
|
1553
1553
|
[X, e(r) !== void 0 && e(r) !== "" || e(r)]
|
|
1554
1554
|
])
|
|
@@ -1556,7 +1556,7 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1556
1556
|
], 64)) : V("", !0)
|
|
1557
1557
|
], 64));
|
|
1558
1558
|
}
|
|
1559
|
-
}),
|
|
1559
|
+
}), nl = {}, al = {
|
|
1560
1560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1561
1561
|
width: "24",
|
|
1562
1562
|
height: "24",
|
|
@@ -1568,12 +1568,12 @@ const Pt = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1568
1568
|
"stroke-linejoin": "round",
|
|
1569
1569
|
class: "text-blue-600 w-[16px] h-[16px]"
|
|
1570
1570
|
};
|
|
1571
|
-
function rl(i,
|
|
1572
|
-
return f(), w("svg",
|
|
1571
|
+
function rl(i, a) {
|
|
1572
|
+
return f(), w("svg", al, a[0] || (a[0] = [
|
|
1573
1573
|
u("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
|
1574
1574
|
]));
|
|
1575
1575
|
}
|
|
1576
|
-
const te = /* @__PURE__ */ J(
|
|
1576
|
+
const te = /* @__PURE__ */ J(nl, [["render", rl]]), sl = {}, ul = {
|
|
1577
1577
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1578
1578
|
width: "15px",
|
|
1579
1579
|
height: "24",
|
|
@@ -1585,8 +1585,8 @@ const te = /* @__PURE__ */ J(al, [["render", rl]]), sl = {}, ul = {
|
|
|
1585
1585
|
"stroke-linejoin": "round",
|
|
1586
1586
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
|
|
1587
1587
|
};
|
|
1588
|
-
function il(i,
|
|
1589
|
-
return f(), w("svg", ul,
|
|
1588
|
+
function il(i, a) {
|
|
1589
|
+
return f(), w("svg", ul, a[0] || (a[0] = [
|
|
1590
1590
|
u("path", {
|
|
1591
1591
|
stroke: "none",
|
|
1592
1592
|
d: "M0 0h24v24H0z",
|
|
@@ -1607,8 +1607,8 @@ const dl = /* @__PURE__ */ J(sl, [["render", il]]), cl = {}, fl = {
|
|
|
1607
1607
|
"stroke-linejoin": "round",
|
|
1608
1608
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
|
|
1609
1609
|
};
|
|
1610
|
-
function pl(i,
|
|
1611
|
-
return f(), w("svg", fl,
|
|
1610
|
+
function pl(i, a) {
|
|
1611
|
+
return f(), w("svg", fl, a[0] || (a[0] = [
|
|
1612
1612
|
u("path", {
|
|
1613
1613
|
stroke: "none",
|
|
1614
1614
|
d: "M0 0h24v24H0z",
|
|
@@ -1647,22 +1647,22 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1647
1647
|
sort: {}
|
|
1648
1648
|
},
|
|
1649
1649
|
emits: ["update:modelValue", "change", "clear"],
|
|
1650
|
-
setup(i, { expose:
|
|
1650
|
+
setup(i, { expose: a, emit: v }) {
|
|
1651
1651
|
const t = i, s = v, r = _(null), {
|
|
1652
|
-
activeMode:
|
|
1652
|
+
activeMode: c,
|
|
1653
1653
|
innerValue: m,
|
|
1654
|
-
onSelectChange:
|
|
1654
|
+
onSelectChange: d,
|
|
1655
1655
|
nextClick: x,
|
|
1656
1656
|
prevClick: p,
|
|
1657
|
-
currentLabel:
|
|
1657
|
+
currentLabel: n,
|
|
1658
1658
|
clear: o
|
|
1659
1659
|
} = Fe({
|
|
1660
1660
|
...t,
|
|
1661
1661
|
popoverRef: r
|
|
1662
1662
|
}, s);
|
|
1663
1663
|
return M(() => t.modelValue, (h) => {
|
|
1664
|
-
h !== void 0 ? (m.value = h, s("update:modelValue", h)) : (
|
|
1665
|
-
}),
|
|
1664
|
+
h !== void 0 ? (m.value = h, s("update:modelValue", h)) : (c.value = "", m.value = []);
|
|
1665
|
+
}), a({
|
|
1666
1666
|
clear: o,
|
|
1667
1667
|
popoverRef: r
|
|
1668
1668
|
}), (h, g) => (f(), w(R, null, [
|
|
@@ -1670,7 +1670,7 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1670
1670
|
N(ge, {
|
|
1671
1671
|
ref_key: "popoverRef",
|
|
1672
1672
|
ref: r,
|
|
1673
|
-
label: e(
|
|
1673
|
+
label: e(n),
|
|
1674
1674
|
"current-value": e(m),
|
|
1675
1675
|
mode: h.mode,
|
|
1676
1676
|
onClear: e(o),
|
|
@@ -1680,11 +1680,11 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1680
1680
|
u("div", null, [
|
|
1681
1681
|
u("button", {
|
|
1682
1682
|
type: "button",
|
|
1683
|
-
onClick: g[0] || (g[0] = (k) => e(
|
|
1683
|
+
onClick: g[0] || (g[0] = (k) => e(d)("range")),
|
|
1684
1684
|
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"
|
|
1685
1685
|
}, [
|
|
1686
1686
|
g[12] || (g[12] = z(" Період ", -1)),
|
|
1687
|
-
e(
|
|
1687
|
+
e(c) === "range" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1688
1688
|
])
|
|
1689
1689
|
]),
|
|
1690
1690
|
g[19] || (g[19] = u("div", null, [
|
|
@@ -1693,51 +1693,51 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1693
1693
|
u("div", null, [
|
|
1694
1694
|
u("button", {
|
|
1695
1695
|
type: "button",
|
|
1696
|
-
onClick: g[1] || (g[1] = (k) => e(
|
|
1696
|
+
onClick: g[1] || (g[1] = (k) => e(d)("today")),
|
|
1697
1697
|
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"
|
|
1698
1698
|
}, [
|
|
1699
1699
|
g[13] || (g[13] = z(" Сьогодні ", -1)),
|
|
1700
|
-
e(
|
|
1700
|
+
e(c) === "today" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1701
1701
|
])
|
|
1702
1702
|
]),
|
|
1703
1703
|
u("div", null, [
|
|
1704
1704
|
u("button", {
|
|
1705
1705
|
type: "button",
|
|
1706
|
-
onClick: g[2] || (g[2] = (k) => e(
|
|
1706
|
+
onClick: g[2] || (g[2] = (k) => e(d)("week")),
|
|
1707
1707
|
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"
|
|
1708
1708
|
}, [
|
|
1709
1709
|
g[14] || (g[14] = z(" Тиждень ", -1)),
|
|
1710
|
-
e(
|
|
1710
|
+
e(c) === "week" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1711
1711
|
])
|
|
1712
1712
|
]),
|
|
1713
1713
|
u("div", null, [
|
|
1714
1714
|
u("button", {
|
|
1715
1715
|
type: "button",
|
|
1716
|
-
onClick: g[3] || (g[3] = (k) => e(
|
|
1716
|
+
onClick: g[3] || (g[3] = (k) => e(d)("month")),
|
|
1717
1717
|
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"
|
|
1718
1718
|
}, [
|
|
1719
1719
|
g[15] || (g[15] = z(" Місяць ", -1)),
|
|
1720
|
-
e(
|
|
1720
|
+
e(c) === "month" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1721
1721
|
])
|
|
1722
1722
|
]),
|
|
1723
1723
|
u("div", null, [
|
|
1724
1724
|
u("button", {
|
|
1725
1725
|
type: "button",
|
|
1726
|
-
onClick: g[4] || (g[4] = (k) => e(
|
|
1726
|
+
onClick: g[4] || (g[4] = (k) => e(d)("quarter")),
|
|
1727
1727
|
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"
|
|
1728
1728
|
}, [
|
|
1729
1729
|
g[16] || (g[16] = z(" Квартал ", -1)),
|
|
1730
|
-
e(
|
|
1730
|
+
e(c) === "quarter" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1731
1731
|
])
|
|
1732
1732
|
]),
|
|
1733
1733
|
u("div", yl, [
|
|
1734
1734
|
u("button", {
|
|
1735
1735
|
type: "button",
|
|
1736
|
-
onClick: g[5] || (g[5] = (k) => e(
|
|
1736
|
+
onClick: g[5] || (g[5] = (k) => e(d)("year")),
|
|
1737
1737
|
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"
|
|
1738
1738
|
}, [
|
|
1739
1739
|
g[17] || (g[17] = z(" Рік ", -1)),
|
|
1740
|
-
e(
|
|
1740
|
+
e(c) === "year" ? (f(), S(te, { key: 0 })) : V("", !0)
|
|
1741
1741
|
])
|
|
1742
1742
|
]),
|
|
1743
1743
|
u("div", gl, [
|
|
@@ -1754,7 +1754,7 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1754
1754
|
_: 1,
|
|
1755
1755
|
__: [19]
|
|
1756
1756
|
}, 8, ["label", "current-value", "mode", "onClear", "layout"]),
|
|
1757
|
-
e(
|
|
1757
|
+
e(c) !== "" && e(c) !== "range" && e(c) !== "last_7_days" ? (f(), w(R, { key: 0 }, [
|
|
1758
1758
|
u("div", bl, [
|
|
1759
1759
|
u("button", {
|
|
1760
1760
|
type: "button",
|
|
@@ -1778,7 +1778,7 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1778
1778
|
])
|
|
1779
1779
|
])
|
|
1780
1780
|
], 64)) : V("", !0),
|
|
1781
|
-
e(
|
|
1781
|
+
e(c) !== "" && e(c) === "range" ? (f(), w("div", xl, [
|
|
1782
1782
|
T(u("input", {
|
|
1783
1783
|
type: "date",
|
|
1784
1784
|
max: e(m)[1],
|
|
@@ -1805,7 +1805,7 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1805
1805
|
], 64));
|
|
1806
1806
|
}
|
|
1807
1807
|
}), ke = {
|
|
1808
|
-
radio:
|
|
1808
|
+
radio: at,
|
|
1809
1809
|
checkbox: xe,
|
|
1810
1810
|
check: xe,
|
|
1811
1811
|
text: bt,
|
|
@@ -1815,7 +1815,7 @@ const Cl = /* @__PURE__ */ O({
|
|
|
1815
1815
|
tag: ol,
|
|
1816
1816
|
"date:inline": Cl
|
|
1817
1817
|
};
|
|
1818
|
-
function be(i,
|
|
1818
|
+
function be(i, a) {
|
|
1819
1819
|
let v;
|
|
1820
1820
|
switch (i.toLowerCase()) {
|
|
1821
1821
|
case "autocomplete":
|
|
@@ -1827,7 +1827,7 @@ function be(i, n) {
|
|
|
1827
1827
|
default:
|
|
1828
1828
|
v = i?.toString().toLowerCase();
|
|
1829
1829
|
}
|
|
1830
|
-
return v === "date" &&
|
|
1830
|
+
return v === "date" && a && a === "inline" && (v = "date:inline"), {
|
|
1831
1831
|
component: ke[v] || ke.text,
|
|
1832
1832
|
type: v
|
|
1833
1833
|
};
|
|
@@ -1844,8 +1844,8 @@ const Vl = {}, _l = {
|
|
|
1844
1844
|
"stroke-linejoin": "round",
|
|
1845
1845
|
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"
|
|
1846
1846
|
};
|
|
1847
|
-
function $l(i,
|
|
1848
|
-
return f(), w("svg", _l,
|
|
1847
|
+
function $l(i, a) {
|
|
1848
|
+
return f(), w("svg", _l, a[0] || (a[0] = [
|
|
1849
1849
|
u("path", {
|
|
1850
1850
|
stroke: "none",
|
|
1851
1851
|
d: "M0 0h24v24H0z",
|
|
@@ -1881,37 +1881,37 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
1881
1881
|
sort: {}
|
|
1882
1882
|
},
|
|
1883
1883
|
emits: ["update:modelValue", "change", "clear"],
|
|
1884
|
-
setup(i, { expose:
|
|
1885
|
-
const t = i, s = v, r = _(),
|
|
1884
|
+
setup(i, { expose: a, emit: v }) {
|
|
1885
|
+
const t = i, s = v, r = _(), c = be(t.type, t.layout), m = I({
|
|
1886
1886
|
get: () => t.modelValue,
|
|
1887
|
-
set: (
|
|
1887
|
+
set: (n) => s("update:modelValue", n)
|
|
1888
1888
|
});
|
|
1889
|
-
function
|
|
1890
|
-
s("clear",
|
|
1889
|
+
function d(n) {
|
|
1890
|
+
s("clear", n);
|
|
1891
1891
|
}
|
|
1892
|
-
function x(
|
|
1893
|
-
s("change", { name:
|
|
1892
|
+
function x(n, o) {
|
|
1893
|
+
s("change", { name: n, value: o }), t.modelValue !== void 0 && s("update:modelValue", o);
|
|
1894
1894
|
}
|
|
1895
1895
|
function p() {
|
|
1896
1896
|
r.value && r.value.clear(), s("clear", t.name);
|
|
1897
1897
|
}
|
|
1898
1898
|
return M(
|
|
1899
1899
|
() => t.default,
|
|
1900
|
-
(
|
|
1901
|
-
m.value =
|
|
1900
|
+
(n) => {
|
|
1901
|
+
m.value = n;
|
|
1902
1902
|
}
|
|
1903
1903
|
), M(
|
|
1904
1904
|
() => t.modelValue,
|
|
1905
|
-
(
|
|
1906
|
-
m.value =
|
|
1905
|
+
(n) => {
|
|
1906
|
+
m.value = n;
|
|
1907
1907
|
}
|
|
1908
|
-
),
|
|
1908
|
+
), a({
|
|
1909
1909
|
filterRef: r
|
|
1910
|
-
}), (
|
|
1910
|
+
}), (n, o) => (f(), w("div", Bl, [
|
|
1911
1911
|
u("div", Sl, [
|
|
1912
1912
|
u("div", Dl, [
|
|
1913
1913
|
u("div", Rl, [
|
|
1914
|
-
u("span", Ml, F(
|
|
1914
|
+
u("span", Ml, F(n.label), 1)
|
|
1915
1915
|
]),
|
|
1916
1916
|
typeof m.value == "string" && m.value.trim() !== "" || Array.isArray(m.value) && m.value.length > 0 && m.value.some((h) => h !== void 0) || m.value === null ? (f(), S(Al, {
|
|
1917
1917
|
key: 0,
|
|
@@ -1919,31 +1919,31 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
1919
1919
|
})) : V("", !0)
|
|
1920
1920
|
]),
|
|
1921
1921
|
u("div", Kl, [
|
|
1922
|
-
e(
|
|
1923
|
-
type: e(
|
|
1922
|
+
e(c)?.type !== "select" ? (f(), S(ee(e(c)?.component), P({ key: 0 }, t, {
|
|
1923
|
+
type: e(c)?.type,
|
|
1924
1924
|
onChange: o[0] || (o[0] = (h) => x(h.name, h.value)),
|
|
1925
|
-
onClear: o[1] || (o[1] = (h) =>
|
|
1925
|
+
onClear: o[1] || (o[1] = (h) => d(h)),
|
|
1926
1926
|
ref_key: "filterRef",
|
|
1927
1927
|
ref: r
|
|
1928
1928
|
}), null, 16, ["type"])) : (f(), S(ge, {
|
|
1929
1929
|
key: 1,
|
|
1930
1930
|
"current-value": m.value,
|
|
1931
|
-
label:
|
|
1932
|
-
mode:
|
|
1931
|
+
label: n.label,
|
|
1932
|
+
mode: n.mode,
|
|
1933
1933
|
onClear: p,
|
|
1934
1934
|
fieldRef: r.value,
|
|
1935
1935
|
width: void 0,
|
|
1936
|
-
disabled:
|
|
1936
|
+
disabled: n.disabled,
|
|
1937
1937
|
layout: "vertical"
|
|
1938
1938
|
}, {
|
|
1939
1939
|
default: le(() => [
|
|
1940
|
-
(f(), S(ee(e(
|
|
1940
|
+
(f(), S(ee(e(c)?.component), P({
|
|
1941
1941
|
ref_key: "filterRef",
|
|
1942
1942
|
ref: r
|
|
1943
1943
|
}, t, {
|
|
1944
|
-
type: e(
|
|
1944
|
+
type: e(c)?.type,
|
|
1945
1945
|
onChange: o[2] || (o[2] = (h) => x(h.name, h.value)),
|
|
1946
|
-
onClear: o[3] || (o[3] = (h) =>
|
|
1946
|
+
onClear: o[3] || (o[3] = (h) => d(h))
|
|
1947
1947
|
}), null, 16, ["type"]))
|
|
1948
1948
|
]),
|
|
1949
1949
|
_: 1
|
|
@@ -1978,60 +1978,60 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
1978
1978
|
sort: {}
|
|
1979
1979
|
},
|
|
1980
1980
|
emits: ["update:modelValue", "change", "clear"],
|
|
1981
|
-
setup(i, { expose:
|
|
1982
|
-
const t = i, s = v, r = _(),
|
|
1981
|
+
setup(i, { expose: a, emit: v }) {
|
|
1982
|
+
const t = i, s = v, r = _(), c = be(t.type, t.layout), m = I({
|
|
1983
1983
|
get: () => t.modelValue,
|
|
1984
|
-
set: (
|
|
1984
|
+
set: (n) => s("update:modelValue", n)
|
|
1985
1985
|
});
|
|
1986
|
-
function
|
|
1987
|
-
s("clear",
|
|
1986
|
+
function d(n) {
|
|
1987
|
+
s("clear", n);
|
|
1988
1988
|
}
|
|
1989
|
-
function x(
|
|
1990
|
-
s("change", { name:
|
|
1989
|
+
function x(n, o) {
|
|
1990
|
+
s("change", { name: n, value: o }), t.modelValue !== void 0 && s("update:modelValue", o);
|
|
1991
1991
|
}
|
|
1992
1992
|
function p() {
|
|
1993
1993
|
r.value && r.value.clear(), s("clear", t.name);
|
|
1994
1994
|
}
|
|
1995
1995
|
return M(
|
|
1996
1996
|
() => t.default,
|
|
1997
|
-
(
|
|
1998
|
-
m.value =
|
|
1997
|
+
(n) => {
|
|
1998
|
+
m.value = n;
|
|
1999
1999
|
}
|
|
2000
2000
|
), M(
|
|
2001
2001
|
() => t.modelValue,
|
|
2002
|
-
(
|
|
2003
|
-
m.value =
|
|
2002
|
+
(n) => {
|
|
2003
|
+
m.value = n;
|
|
2004
2004
|
}
|
|
2005
|
-
),
|
|
2005
|
+
), a({
|
|
2006
2006
|
filterRef: r
|
|
2007
|
-
}), (
|
|
2008
|
-
type: e(
|
|
2007
|
+
}), (n, o) => ["text", "date"].includes(n.type.toLocaleLowerCase()) ? (f(), S(ee(e(c)?.component), P({ key: 0 }, t, {
|
|
2008
|
+
type: e(c)?.type,
|
|
2009
2009
|
onChange: o[0] || (o[0] = (h) => x(h.name, h.value)),
|
|
2010
|
-
onClear: o[1] || (o[1] = (h) =>
|
|
2011
|
-
disabled:
|
|
2010
|
+
onClear: o[1] || (o[1] = (h) => d(h)),
|
|
2011
|
+
disabled: n.disabled,
|
|
2012
2012
|
modelValue: m.value,
|
|
2013
2013
|
"onUpdate:modelValue": o[2] || (o[2] = (h) => m.value = h)
|
|
2014
2014
|
}), null, 16, ["type", "disabled", "modelValue"])) : (f(), S(ge, {
|
|
2015
2015
|
key: 1,
|
|
2016
2016
|
"current-value": m.value,
|
|
2017
|
-
label:
|
|
2018
|
-
mode:
|
|
2017
|
+
label: n.label,
|
|
2018
|
+
mode: n.mode,
|
|
2019
2019
|
onClear: p,
|
|
2020
2020
|
fieldRef: r.value,
|
|
2021
2021
|
width: t.width,
|
|
2022
|
-
disabled:
|
|
2022
|
+
disabled: n.disabled,
|
|
2023
2023
|
layout: "inline"
|
|
2024
2024
|
}, {
|
|
2025
2025
|
default: le(() => [
|
|
2026
|
-
(f(), S(ee(e(
|
|
2026
|
+
(f(), S(ee(e(c)?.component), P({
|
|
2027
2027
|
ref_key: "filterRef",
|
|
2028
2028
|
ref: r
|
|
2029
2029
|
}, t, {
|
|
2030
2030
|
modelValue: m.value,
|
|
2031
2031
|
"onUpdate:modelValue": o[3] || (o[3] = (h) => m.value = h),
|
|
2032
|
-
type: e(
|
|
2032
|
+
type: e(c)?.type,
|
|
2033
2033
|
onChange: o[4] || (o[4] = (h) => x(h.name, h.value)),
|
|
2034
|
-
onClear: o[5] || (o[5] = (h) =>
|
|
2034
|
+
onClear: o[5] || (o[5] = (h) => d(h))
|
|
2035
2035
|
}), null, 16, ["modelValue", "type"]))
|
|
2036
2036
|
]),
|
|
2037
2037
|
_: 1
|
|
@@ -2063,16 +2063,16 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
2063
2063
|
sort: {}
|
|
2064
2064
|
},
|
|
2065
2065
|
emits: ["update:modelValue", "change", "clear"],
|
|
2066
|
-
setup(i, { expose:
|
|
2067
|
-
const t = i, s = v, r = _(),
|
|
2066
|
+
setup(i, { expose: a, emit: v }) {
|
|
2067
|
+
const t = i, s = v, r = _(), c = _(be(t.type, t.layout)), m = I({
|
|
2068
2068
|
get: () => t.modelValue,
|
|
2069
2069
|
set: (p) => s("update:modelValue", p)
|
|
2070
2070
|
});
|
|
2071
|
-
function
|
|
2071
|
+
function d(p) {
|
|
2072
2072
|
s("clear", p);
|
|
2073
2073
|
}
|
|
2074
|
-
function x(p,
|
|
2075
|
-
s("change", { name: p, value:
|
|
2074
|
+
function x(p, n) {
|
|
2075
|
+
s("change", { name: p, value: n }), t.modelValue !== void 0 && s("update:modelValue", n);
|
|
2076
2076
|
}
|
|
2077
2077
|
return M(
|
|
2078
2078
|
() => t.default,
|
|
@@ -2089,19 +2089,19 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
2089
2089
|
(p) => {
|
|
2090
2090
|
m.value = p;
|
|
2091
2091
|
}
|
|
2092
|
-
),
|
|
2092
|
+
), a({
|
|
2093
2093
|
filterRef: r
|
|
2094
|
-
}), (p,
|
|
2095
|
-
type:
|
|
2094
|
+
}), (p, n) => (f(), S(ee(c.value?.component), P(t, {
|
|
2095
|
+
type: c.value?.type,
|
|
2096
2096
|
modelValue: m.value,
|
|
2097
|
-
"onUpdate:modelValue":
|
|
2098
|
-
onChange:
|
|
2099
|
-
onClear:
|
|
2097
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
|
|
2098
|
+
onChange: n[1] || (n[1] = (o) => x(o.name, o.value)),
|
|
2099
|
+
onClear: n[2] || (n[2] = (o) => d(o)),
|
|
2100
2100
|
ref_key: "filterRef",
|
|
2101
2101
|
ref: r
|
|
2102
2102
|
}), null, 16, ["type", "modelValue"]));
|
|
2103
2103
|
}
|
|
2104
|
-
}),
|
|
2104
|
+
}), oe = /* @__PURE__ */ O({
|
|
2105
2105
|
__name: "filter-field",
|
|
2106
2106
|
props: {
|
|
2107
2107
|
id: {},
|
|
@@ -2127,28 +2127,28 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
2127
2127
|
sort: { default: "name" }
|
|
2128
2128
|
},
|
|
2129
2129
|
emits: ["update:modelValue", "change", "clear"],
|
|
2130
|
-
setup(i, { expose:
|
|
2131
|
-
const t = i, s = v, r = _(),
|
|
2130
|
+
setup(i, { expose: a, emit: v }) {
|
|
2131
|
+
const t = i, s = v, r = _(), c = I({
|
|
2132
2132
|
get: () => t.modelValue,
|
|
2133
2133
|
set: (p) => s("update:modelValue", p)
|
|
2134
2134
|
});
|
|
2135
2135
|
function m(p) {
|
|
2136
2136
|
s("clear", p);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2139
|
-
s("change", { name: p, value:
|
|
2138
|
+
function d(p, n) {
|
|
2139
|
+
s("change", { name: p, value: n }), t.modelValue !== void 0 && s("update:modelValue", n);
|
|
2140
2140
|
}
|
|
2141
2141
|
M(
|
|
2142
2142
|
() => t.default,
|
|
2143
2143
|
(p) => {
|
|
2144
|
-
|
|
2144
|
+
c.value = p;
|
|
2145
2145
|
}
|
|
2146
2146
|
), M(
|
|
2147
2147
|
() => t.modelValue,
|
|
2148
2148
|
(p) => {
|
|
2149
|
-
|
|
2149
|
+
c.value = p;
|
|
2150
2150
|
}
|
|
2151
|
-
),
|
|
2151
|
+
), a({
|
|
2152
2152
|
filterRef: r
|
|
2153
2153
|
});
|
|
2154
2154
|
function x() {
|
|
@@ -2163,33 +2163,33 @@ const Al = /* @__PURE__ */ J(Vl, [["render", $l]]), Bl = { style: { display: "in
|
|
|
2163
2163
|
return we;
|
|
2164
2164
|
}
|
|
2165
2165
|
}
|
|
2166
|
-
return (p,
|
|
2167
|
-
onChange:
|
|
2168
|
-
onClear:
|
|
2169
|
-
modelValue:
|
|
2170
|
-
"onUpdate:modelValue":
|
|
2166
|
+
return (p, n) => (f(), S(ee(x()), P(t, {
|
|
2167
|
+
onChange: n[0] || (n[0] = (o) => d(o.name, o.value)),
|
|
2168
|
+
onClear: n[1] || (n[1] = (o) => m(o)),
|
|
2169
|
+
modelValue: c.value,
|
|
2170
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => c.value = o)
|
|
2171
2171
|
}), null, 16, ["modelValue"]));
|
|
2172
2172
|
}
|
|
2173
2173
|
});
|
|
2174
|
-
function he(i,
|
|
2174
|
+
function he(i, a) {
|
|
2175
2175
|
const {
|
|
2176
2176
|
slots: v
|
|
2177
2177
|
} = i, t = _(i.value ?? {}), s = I(() => (Z(v?.default?.()) ?? []).flatMap((l) => Array.isArray(l.children) ? l.children : [l]));
|
|
2178
2178
|
function r(C) {
|
|
2179
|
-
delete t.value[C],
|
|
2179
|
+
delete t.value[C], a("clear", {
|
|
2180
2180
|
data: Z(t.value),
|
|
2181
2181
|
name: C
|
|
2182
2182
|
});
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2185
|
-
l === void 0 ? (r(C),
|
|
2184
|
+
function c(C, l) {
|
|
2185
|
+
l === void 0 ? (r(C), a("change", {
|
|
2186
2186
|
data: Z(t.value),
|
|
2187
2187
|
name: C,
|
|
2188
2188
|
undefined: void 0
|
|
2189
2189
|
})) : t.value = {
|
|
2190
2190
|
...t.value,
|
|
2191
2191
|
[C]: l
|
|
2192
|
-
},
|
|
2192
|
+
}, a("change", {
|
|
2193
2193
|
data: Z(t.value),
|
|
2194
2194
|
name: C,
|
|
2195
2195
|
value: l
|
|
@@ -2203,11 +2203,11 @@ function he(i, n) {
|
|
|
2203
2203
|
showClean: !0,
|
|
2204
2204
|
modelValue: t[l],
|
|
2205
2205
|
"onUpdate:modelValue": (b) => {
|
|
2206
|
-
|
|
2206
|
+
c(l, b);
|
|
2207
2207
|
},
|
|
2208
2208
|
onClear: () => r(l)
|
|
2209
2209
|
});
|
|
2210
|
-
})),
|
|
2210
|
+
})), d = I(
|
|
2211
2211
|
() => new Map(
|
|
2212
2212
|
m.value.map((C) => {
|
|
2213
2213
|
const l = C.props?.name;
|
|
@@ -2216,12 +2216,12 @@ function he(i, n) {
|
|
|
2216
2216
|
)
|
|
2217
2217
|
);
|
|
2218
2218
|
function x() {
|
|
2219
|
-
t.value = {},
|
|
2219
|
+
t.value = {}, a("clearAll", {
|
|
2220
2220
|
data: Z(t.value),
|
|
2221
2221
|
name: "ALL"
|
|
2222
2222
|
});
|
|
2223
2223
|
}
|
|
2224
|
-
const p = _(""),
|
|
2224
|
+
const p = _(""), n = I(() => i.schema?.value ? Object.entries(t.value).filter(([C, l]) => i.schema && !(C in i.schema.value) ? !1 : Array.isArray(l) ? l.some((b) => b !== "" && b !== void 0) : l !== "" && l !== void 0).length : 0), o = _();
|
|
2225
2225
|
M(p, async () => {
|
|
2226
2226
|
await fe(), o?.value?.filterRef?.inputTextRef && o.value.filterRef.inputTextRef.focus();
|
|
2227
2227
|
});
|
|
@@ -2242,8 +2242,8 @@ function he(i, n) {
|
|
|
2242
2242
|
}
|
|
2243
2243
|
return {
|
|
2244
2244
|
activeFilter: t,
|
|
2245
|
-
activeFilterCount:
|
|
2246
|
-
onFilterChange:
|
|
2245
|
+
activeFilterCount: n,
|
|
2246
|
+
onFilterChange: c,
|
|
2247
2247
|
clearFilter: r,
|
|
2248
2248
|
clearAllFilters: x,
|
|
2249
2249
|
limitedSchema: h,
|
|
@@ -2251,7 +2251,7 @@ function he(i, n) {
|
|
|
2251
2251
|
filtersSlot: m,
|
|
2252
2252
|
limitedFiltersSlot: k,
|
|
2253
2253
|
popoverFiltersSlot: y,
|
|
2254
|
-
vnodeMap:
|
|
2254
|
+
vnodeMap: d,
|
|
2255
2255
|
onPopoverOpen: $,
|
|
2256
2256
|
selectedFilter: p,
|
|
2257
2257
|
filterRef: o
|
|
@@ -2260,17 +2260,17 @@ function he(i, n) {
|
|
|
2260
2260
|
const Ll = /* @__PURE__ */ O({
|
|
2261
2261
|
__name: "popover",
|
|
2262
2262
|
emits: ["open", "close"],
|
|
2263
|
-
setup(i, { emit:
|
|
2264
|
-
const v = _(!1), t = _(null), s = _(null), r = _(null),
|
|
2263
|
+
setup(i, { emit: a }) {
|
|
2264
|
+
const v = _(!1), t = _(null), s = _(null), r = _(null), c = _({ top: "0px", left: "0px", position: "absolute" });
|
|
2265
2265
|
function m() {
|
|
2266
2266
|
v.value = !v.value;
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function d() {
|
|
2269
2269
|
const o = r.value, h = t.value;
|
|
2270
2270
|
if (!o || !h) return;
|
|
2271
2271
|
const g = o.getBoundingClientRect(), k = h.offsetWidth, y = window.innerWidth - g.left;
|
|
2272
2272
|
let $ = g.left + window.scrollX;
|
|
2273
|
-
k > y && ($ = window.innerWidth - k - 8, $ < 8 && ($ = 8)),
|
|
2273
|
+
k > y && ($ = window.innerWidth - k - 8, $ < 8 && ($ = 8)), c.value = {
|
|
2274
2274
|
position: "absolute",
|
|
2275
2275
|
top: `${g.bottom + window.scrollY + 8}px`,
|
|
2276
2276
|
left: `${$}px`
|
|
@@ -2281,16 +2281,16 @@ const Ll = /* @__PURE__ */ O({
|
|
|
2281
2281
|
!r.value?.contains(o.target) && !t.value?.contains(o.target) && !h.closest("[data-inside-popover]") && (v.value = !1);
|
|
2282
2282
|
}
|
|
2283
2283
|
const p = _(!1);
|
|
2284
|
-
|
|
2284
|
+
ae(() => {
|
|
2285
2285
|
p.value = !0;
|
|
2286
|
-
}),
|
|
2287
|
-
r.value = s.value?.querySelector("[data-popover-trigger]") || null, r.value?.addEventListener("click", m), document.addEventListener("click", x), window.addEventListener("resize",
|
|
2286
|
+
}), ae(() => {
|
|
2287
|
+
r.value = s.value?.querySelector("[data-popover-trigger]") || null, r.value?.addEventListener("click", m), document.addEventListener("click", x), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
2288
2288
|
}), ce(() => {
|
|
2289
|
-
r.value?.removeEventListener("click", m), document.removeEventListener("click", x), window.removeEventListener("resize",
|
|
2289
|
+
r.value?.removeEventListener("click", m), document.removeEventListener("click", x), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0);
|
|
2290
2290
|
});
|
|
2291
|
-
const
|
|
2291
|
+
const n = a;
|
|
2292
2292
|
return M(v, async (o) => {
|
|
2293
|
-
o ? (
|
|
2293
|
+
o ? (n("open"), await fe(), d()) : n("close");
|
|
2294
2294
|
}), (o, h) => (f(), w("div", {
|
|
2295
2295
|
ref_key: "wrapperRef",
|
|
2296
2296
|
ref: s
|
|
@@ -2304,7 +2304,7 @@ const Ll = /* @__PURE__ */ O({
|
|
|
2304
2304
|
ref_key: "popoverRef",
|
|
2305
2305
|
ref: t,
|
|
2306
2306
|
class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
|
|
2307
|
-
style: Ae(
|
|
2307
|
+
style: Ae(c.value)
|
|
2308
2308
|
}, [
|
|
2309
2309
|
ue(o.$slots, "default")
|
|
2310
2310
|
], 4), [
|
|
@@ -2325,8 +2325,8 @@ const Ll = /* @__PURE__ */ O({
|
|
|
2325
2325
|
"stroke-linejoin": "round",
|
|
2326
2326
|
class: "lucide lucide-filter h-4 w-4"
|
|
2327
2327
|
};
|
|
2328
|
-
function Tl(i,
|
|
2329
|
-
return f(), w("svg", Il,
|
|
2328
|
+
function Tl(i, a) {
|
|
2329
|
+
return f(), w("svg", Il, a[0] || (a[0] = [
|
|
2330
2330
|
u("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
|
|
2331
2331
|
]));
|
|
2332
2332
|
}
|
|
@@ -2356,12 +2356,12 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2356
2356
|
limit: { default: 3 }
|
|
2357
2357
|
},
|
|
2358
2358
|
emits: ["change", "clear", "clearAll"],
|
|
2359
|
-
setup(i, { expose:
|
|
2360
|
-
const t = i, s = Ke(t.mode), r = pe(),
|
|
2361
|
-
activeFilter:
|
|
2359
|
+
setup(i, { expose: a, emit: v }) {
|
|
2360
|
+
const t = i, s = Ke(t.mode), r = pe(), c = v, m = _({}), {
|
|
2361
|
+
activeFilter: d,
|
|
2362
2362
|
activeFilterCount: x,
|
|
2363
2363
|
onFilterChange: p,
|
|
2364
|
-
clearFilter:
|
|
2364
|
+
clearFilter: n,
|
|
2365
2365
|
clearAllFilters: o,
|
|
2366
2366
|
popoverSchema: h,
|
|
2367
2367
|
popoverFiltersSlot: g,
|
|
@@ -2372,15 +2372,15 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2372
2372
|
...t,
|
|
2373
2373
|
schema: m,
|
|
2374
2374
|
slots: r
|
|
2375
|
-
},
|
|
2375
|
+
}, c);
|
|
2376
2376
|
return M(
|
|
2377
2377
|
() => t.schema,
|
|
2378
2378
|
(C) => {
|
|
2379
2379
|
m.value = C;
|
|
2380
2380
|
},
|
|
2381
2381
|
{ deep: !0, immediate: !0 }
|
|
2382
|
-
),
|
|
2383
|
-
clearFilter:
|
|
2382
|
+
), a({
|
|
2383
|
+
clearFilter: n,
|
|
2384
2384
|
clearAllFilters: o
|
|
2385
2385
|
}), (C, l) => (f(), S(Ll, {
|
|
2386
2386
|
onOpen: e(k),
|
|
@@ -2421,7 +2421,7 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2421
2421
|
u("div", Pl, [
|
|
2422
2422
|
u("span", Wl, F(K.label), 1)
|
|
2423
2423
|
]),
|
|
2424
|
-
(Array.isArray(e(
|
|
2424
|
+
(Array.isArray(e(d)[b]) ? e(d)[b]?.length > 0 : e(d)[b] || e(d)[b] === null) ? (f(), w("div", ql)) : V("", !0)
|
|
2425
2425
|
], 10, Yl))), 128)) : V("", !0),
|
|
2426
2426
|
(f(!0), w(R, null, W(e(g), (b, K) => (f(), w("button", {
|
|
2427
2427
|
key: "slot-" + K,
|
|
@@ -2434,7 +2434,7 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2434
2434
|
u("div", Gl, [
|
|
2435
2435
|
u("span", Xl, F(b.props.label), 1)
|
|
2436
2436
|
]),
|
|
2437
|
-
e(
|
|
2437
|
+
e(d)[b.props.name]?.length > 0 ? (f(), w("div", Jl)) : V("", !0)
|
|
2438
2438
|
], 10, Ql))), 128))
|
|
2439
2439
|
]),
|
|
2440
2440
|
e(x) > 0 ? (f(), w("div", Zl, [
|
|
@@ -2452,7 +2452,7 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2452
2452
|
]))) : V("", !0),
|
|
2453
2453
|
e(y) ? (f(), w(R, { key: 1 }, [
|
|
2454
2454
|
e(h) ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(h)), ([b, K]) => (f(), w(R, null, [
|
|
2455
|
-
e(y) === b ? (f(), S(
|
|
2455
|
+
e(y) === b ? (f(), S(oe, P({
|
|
2456
2456
|
name: b,
|
|
2457
2457
|
key: b,
|
|
2458
2458
|
layout: "popover",
|
|
@@ -2462,17 +2462,17 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2462
2462
|
}, { ref_for: !0 }, K, {
|
|
2463
2463
|
onChange: l[1] || (l[1] = (A) => e(p)(A.name, A.value)),
|
|
2464
2464
|
onClear: l[2] || (l[2] = (A) => {
|
|
2465
|
-
e(
|
|
2465
|
+
e(n)(A), e(p)(A, void 0);
|
|
2466
2466
|
}),
|
|
2467
|
-
modelValue: e(
|
|
2468
|
-
"onUpdate:modelValue": (A) => e(
|
|
2467
|
+
modelValue: e(d)[b],
|
|
2468
|
+
"onUpdate:modelValue": (A) => e(d)[b] = A,
|
|
2469
2469
|
cleanable: !0
|
|
2470
2470
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : V("", !0)
|
|
2471
2471
|
], 64))), 256)) : V("", !0),
|
|
2472
2472
|
(f(!0), w(R, null, W(e(g), (b, K) => (f(), w(R, {
|
|
2473
2473
|
key: "slot-" + K
|
|
2474
2474
|
}, [
|
|
2475
|
-
e(y) === b.props.name ? (f(), S(
|
|
2475
|
+
e(y) === b.props.name ? (f(), S(oe, P({
|
|
2476
2476
|
key: 0,
|
|
2477
2477
|
layout: "popover"
|
|
2478
2478
|
}, { ref_for: !0 }, b.props, {
|
|
@@ -2481,10 +2481,10 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2481
2481
|
ref: $,
|
|
2482
2482
|
onChange: l[3] || (l[3] = (A) => e(p)(A.name, A.value)),
|
|
2483
2483
|
onClear: l[4] || (l[4] = (A) => {
|
|
2484
|
-
e(
|
|
2484
|
+
e(n)(A), e(p)(A, void 0);
|
|
2485
2485
|
}),
|
|
2486
|
-
modelValue: e(
|
|
2487
|
-
"onUpdate:modelValue": (A) => e(
|
|
2486
|
+
modelValue: e(d)[b.props.name],
|
|
2487
|
+
"onUpdate:modelValue": (A) => e(d)[b.props.name] = A,
|
|
2488
2488
|
cleanable: !0
|
|
2489
2489
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
|
|
2490
2490
|
], 64))), 128))
|
|
@@ -2506,14 +2506,14 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2506
2506
|
limit: { default: 3 }
|
|
2507
2507
|
},
|
|
2508
2508
|
emits: ["change", "clear", "clearAll"],
|
|
2509
|
-
setup(i, { emit:
|
|
2510
|
-
const v = i, t =
|
|
2511
|
-
activeFilter:
|
|
2509
|
+
setup(i, { emit: a }) {
|
|
2510
|
+
const v = i, t = a, s = pe(), r = _({}), {
|
|
2511
|
+
activeFilter: c,
|
|
2512
2512
|
activeFilterCount: m,
|
|
2513
|
-
onFilterChange:
|
|
2513
|
+
onFilterChange: d,
|
|
2514
2514
|
clearFilter: x,
|
|
2515
2515
|
clearAllFilters: p,
|
|
2516
|
-
limitedSchema:
|
|
2516
|
+
limitedSchema: n,
|
|
2517
2517
|
popoverSchema: o,
|
|
2518
2518
|
filtersSlot: h,
|
|
2519
2519
|
limitedFiltersSlot: g,
|
|
@@ -2536,36 +2536,36 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2536
2536
|
},
|
|
2537
2537
|
{ deep: !0, immediate: !0 }
|
|
2538
2538
|
), (C, l) => (f(), w("div", lo, [
|
|
2539
|
-
C.schema ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(
|
|
2539
|
+
C.schema ? (f(!0), w(R, { key: 0 }, W(Object.entries(e(n)), ([b, K]) => (f(), S(oe, P({
|
|
2540
2540
|
key: b,
|
|
2541
2541
|
name: b,
|
|
2542
2542
|
mode: C.mode
|
|
2543
2543
|
}, { ref_for: !0 }, K, {
|
|
2544
|
-
onChange: l[0] || (l[0] = (A) => e(
|
|
2544
|
+
onChange: l[0] || (l[0] = (A) => e(d)(A.name, A.value)),
|
|
2545
2545
|
onClear: l[1] || (l[1] = (A) => {
|
|
2546
|
-
e(x)(A), e(
|
|
2546
|
+
e(x)(A), e(d)(A, void 0);
|
|
2547
2547
|
}),
|
|
2548
2548
|
layout: "inline",
|
|
2549
2549
|
cleanable: !0,
|
|
2550
|
-
modelValue: e(
|
|
2551
|
-
"onUpdate:modelValue": (A) => e(
|
|
2550
|
+
modelValue: e(c)[b],
|
|
2551
|
+
"onUpdate:modelValue": (A) => e(c)[b] = A
|
|
2552
2552
|
}), null, 16, ["name", "mode", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
|
|
2553
|
-
(f(!0), w(R, null, W(e(g), (b, K) => (f(), S(
|
|
2553
|
+
(f(!0), w(R, null, W(e(g), (b, K) => (f(), S(oe, P({
|
|
2554
2554
|
key: "slot-" + K,
|
|
2555
2555
|
layout: "inline"
|
|
2556
2556
|
}, { ref_for: !0 }, b.props, {
|
|
2557
|
-
onChange: l[2] || (l[2] = (A) => e(
|
|
2557
|
+
onChange: l[2] || (l[2] = (A) => e(d)(A.name, A.value)),
|
|
2558
2558
|
onClear: l[3] || (l[3] = (A) => {
|
|
2559
|
-
e(x)(A), e(
|
|
2559
|
+
e(x)(A), e(d)(A, void 0);
|
|
2560
2560
|
}),
|
|
2561
2561
|
cleanable: !0,
|
|
2562
|
-
modelValue: e(
|
|
2563
|
-
"onUpdate:modelValue": (A) => e(
|
|
2562
|
+
modelValue: e(c)[b.props.name],
|
|
2563
|
+
"onUpdate:modelValue": (A) => e(c)[b.props.name] = A
|
|
2564
2564
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
|
2565
2565
|
Object.entries(e(o)).length > 0 || e(k).length > 0 ? (f(), S(je, P({ key: 1 }, v, {
|
|
2566
2566
|
schema: e(o),
|
|
2567
2567
|
limit: 0,
|
|
2568
|
-
onChange: l[4] || (l[4] = (b) => e(
|
|
2568
|
+
onChange: l[4] || (l[4] = (b) => e(d)(b.name, b.value)),
|
|
2569
2569
|
onClearAll: e(p),
|
|
2570
2570
|
onClear: l[5] || (l[5] = (b) => e(x)(b.name)),
|
|
2571
2571
|
mode: C.mode,
|
|
@@ -2591,7 +2591,7 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2591
2591
|
}), oo = {
|
|
2592
2592
|
key: 0,
|
|
2593
2593
|
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"
|
|
2594
|
-
},
|
|
2594
|
+
}, no = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, ao = /* @__PURE__ */ O({
|
|
2595
2595
|
__name: "vertical-filter-layout",
|
|
2596
2596
|
props: {
|
|
2597
2597
|
schema: {},
|
|
@@ -2602,21 +2602,21 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2602
2602
|
limit: { default: 3 }
|
|
2603
2603
|
},
|
|
2604
2604
|
emits: ["change", "clear", "clearAll"],
|
|
2605
|
-
setup(i, { emit:
|
|
2606
|
-
const v = i, t =
|
|
2605
|
+
setup(i, { emit: a }) {
|
|
2606
|
+
const v = i, t = a, s = pe(), {
|
|
2607
2607
|
activeFilter: r,
|
|
2608
|
-
activeFilterCount:
|
|
2608
|
+
activeFilterCount: c,
|
|
2609
2609
|
onFilterChange: m,
|
|
2610
|
-
clearFilter:
|
|
2610
|
+
clearFilter: d,
|
|
2611
2611
|
clearAllFilters: x,
|
|
2612
2612
|
filtersSlot: p
|
|
2613
2613
|
} = he({
|
|
2614
2614
|
...v,
|
|
2615
2615
|
slots: s
|
|
2616
2616
|
}, t);
|
|
2617
|
-
return (
|
|
2618
|
-
u("div",
|
|
2619
|
-
e(
|
|
2617
|
+
return (n, o) => n.view === "vertical" ? (f(), w("div", oo, [
|
|
2618
|
+
u("div", no, [
|
|
2619
|
+
e(c) > 0 ? (f(), w("button", {
|
|
2620
2620
|
key: 0,
|
|
2621
2621
|
onClick: o[0] || (o[0] = //@ts-ignore
|
|
2622
2622
|
(...h) => e(x) && e(x)(...h)),
|
|
@@ -2626,25 +2626,25 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2626
2626
|
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",
|
|
2627
2627
|
type: "button"
|
|
2628
2628
|
}, " Очистити ")) : V("", !0),
|
|
2629
|
-
|
|
2629
|
+
n.schema ? (f(!0), w(R, { key: 1 }, W(Object.entries(n.schema), ([h, g]) => (f(), S(oe, P({
|
|
2630
2630
|
name: h,
|
|
2631
2631
|
layout: "vertical"
|
|
2632
2632
|
}, { ref_for: !0 }, g, {
|
|
2633
2633
|
onChange: o[1] || (o[1] = (k) => e(m)(k.name, k.value)),
|
|
2634
2634
|
onClear: o[2] || (o[2] = (k) => {
|
|
2635
|
-
e(
|
|
2635
|
+
e(d)(k), e(m)(k, void 0);
|
|
2636
2636
|
}),
|
|
2637
2637
|
modelValue: e(r)[h],
|
|
2638
2638
|
"onUpdate:modelValue": (k) => e(r)[h] = k,
|
|
2639
2639
|
showClean: !0
|
|
2640
2640
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : V("", !0),
|
|
2641
|
-
(f(!0), w(R, null, W(e(p), (h, g) => (f(), S(
|
|
2641
|
+
(f(!0), w(R, null, W(e(p), (h, g) => (f(), S(oe, P({
|
|
2642
2642
|
key: "slot-" + g,
|
|
2643
2643
|
layout: "vertical"
|
|
2644
2644
|
}, { ref_for: !0 }, h.props, {
|
|
2645
2645
|
onChange: o[3] || (o[3] = (k) => e(m)(k.name, k.value)),
|
|
2646
2646
|
onClear: o[4] || (o[4] = (k) => {
|
|
2647
|
-
e(
|
|
2647
|
+
e(d)(k), e(m)(k, void 0);
|
|
2648
2648
|
}),
|
|
2649
2649
|
modelValue: e(r)[h.props.name],
|
|
2650
2650
|
"onUpdate:modelValue": (k) => e(r)[h.props.name] = k,
|
|
@@ -2664,19 +2664,19 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2664
2664
|
limit: { default: 3 }
|
|
2665
2665
|
},
|
|
2666
2666
|
emits: ["change", "clear", "clearAll"],
|
|
2667
|
-
setup(i, { emit:
|
|
2668
|
-
const v = i, t = _(v.value ?? {}), s =
|
|
2669
|
-
function r(p,
|
|
2667
|
+
setup(i, { emit: a }) {
|
|
2668
|
+
const v = i, t = _(v.value ?? {}), s = a;
|
|
2669
|
+
function r(p, n) {
|
|
2670
2670
|
t.value = {
|
|
2671
2671
|
...t.value,
|
|
2672
|
-
[p]:
|
|
2672
|
+
[p]: n
|
|
2673
2673
|
}, s("change", {
|
|
2674
2674
|
data: Z(t.value),
|
|
2675
2675
|
name: p,
|
|
2676
|
-
value:
|
|
2676
|
+
value: n
|
|
2677
2677
|
});
|
|
2678
2678
|
}
|
|
2679
|
-
function
|
|
2679
|
+
function c(p) {
|
|
2680
2680
|
delete t.value[p], s("clear", {
|
|
2681
2681
|
data: Z(t.value),
|
|
2682
2682
|
name: p
|
|
@@ -2692,13 +2692,13 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2692
2692
|
value: null
|
|
2693
2693
|
});
|
|
2694
2694
|
}
|
|
2695
|
-
const
|
|
2695
|
+
const d = _({});
|
|
2696
2696
|
function x() {
|
|
2697
2697
|
switch (v.view) {
|
|
2698
2698
|
case "inline":
|
|
2699
2699
|
return Ce;
|
|
2700
2700
|
case "vertical":
|
|
2701
|
-
return
|
|
2701
|
+
return ao;
|
|
2702
2702
|
case "popover":
|
|
2703
2703
|
return je;
|
|
2704
2704
|
default:
|
|
@@ -2709,22 +2709,22 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2709
2709
|
() => v.schema,
|
|
2710
2710
|
(p) => {
|
|
2711
2711
|
if (!p) {
|
|
2712
|
-
|
|
2712
|
+
d.value = {};
|
|
2713
2713
|
return;
|
|
2714
2714
|
}
|
|
2715
2715
|
if (Array.isArray(p) && !p.length) {
|
|
2716
|
-
|
|
2716
|
+
d.value = {};
|
|
2717
2717
|
return;
|
|
2718
2718
|
}
|
|
2719
|
-
Array.isArray(p) ?
|
|
2720
|
-
Object.assign(o, { name:
|
|
2721
|
-
}),
|
|
2719
|
+
Array.isArray(p) ? d.value = p.filter((n) => n.type).reduce((n, o) => (Object.assign(o, { name: o.id || o.name, type: o.type.toLowerCase() }), n[o.name] = o, o.data && !o.api && !o.options && Object.assign(o, { api: `/api/suggest/${o.data}` }), n), {}) : (Object.entries(p).forEach(([n, o]) => {
|
|
2720
|
+
Object.assign(o, { name: n || o.name || o.id, type: o.type.toLowerCase() });
|
|
2721
|
+
}), d.value = { ...p });
|
|
2722
2722
|
},
|
|
2723
2723
|
{ immediate: !0, deep: !0 }
|
|
2724
|
-
), (p,
|
|
2725
|
-
schema:
|
|
2726
|
-
onChange:
|
|
2727
|
-
onClear:
|
|
2724
|
+
), (p, n) => (f(), S(ee(x()), P(v, {
|
|
2725
|
+
schema: d.value,
|
|
2726
|
+
onChange: n[0] || (n[0] = (o) => r(o.name, o.value)),
|
|
2727
|
+
onClear: n[1] || (n[1] = (o) => c(o.name)),
|
|
2728
2728
|
onClearAll: m
|
|
2729
2729
|
}), {
|
|
2730
2730
|
default: le(() => [
|
|
@@ -2734,11 +2734,11 @@ const Ol = /* @__PURE__ */ J(El, [["render", Tl]]), Ul = {
|
|
|
2734
2734
|
}, 16, ["schema"]));
|
|
2735
2735
|
}
|
|
2736
2736
|
});
|
|
2737
|
-
Ve.install = function(
|
|
2738
|
-
|
|
2737
|
+
Ve.install = function(a) {
|
|
2738
|
+
a.component("Filter", Ve), a.component("FilterField", oe);
|
|
2739
2739
|
};
|
|
2740
2740
|
export {
|
|
2741
2741
|
Ve as Filter,
|
|
2742
|
-
|
|
2742
|
+
oe as FilterField,
|
|
2743
2743
|
Ve as default
|
|
2744
2744
|
};
|