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