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