@opengis/partsmap 0.1.2 → 0.1.3
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/index.js +1690 -1688
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { defineComponent as Y, ref as V, watch as
|
2
|
-
const
|
1
|
+
import { defineComponent as Y, ref as V, watch as R, createBlock as j, openBlock as p, resolveDynamicComponent as oe, mergeProps as Z, withCtx as re, renderSlot as ee, computed as E, useSlots as we, createElementBlock as k, createCommentVNode as S, Fragment as K, renderList as q, unref as e, createElementVNode as a, normalizeClass as F, toDisplayString as L, createVNode as I, createTextVNode as W, toRaw as fe, cloneVNode as Ze, nextTick as ke, onMounted as ue, onBeforeUnmount as he, Teleport as Oe, withDirectives as P, normalizeStyle as Ce, vShow as X, vModelText as te, withModifiers as Ie, isRef as Je, createStaticVNode as Pe, resolveDirective as Xe, getCurrentInstance as et } from "vue";
|
2
|
+
const tt = { class: "flex items-center justify-between w-full text-sm" }, lt = { class: "flex items-center cursor-pointer w-full" }, at = {
|
3
3
|
key: 0,
|
4
4
|
width: "16",
|
5
5
|
height: "auto",
|
6
6
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
7
|
-
},
|
7
|
+
}, ot = ["value"], rt = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, nt = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, it = {
|
8
8
|
key: 0,
|
9
9
|
class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
|
10
|
-
},
|
10
|
+
}, _e = /* @__PURE__ */ Y({
|
11
11
|
__name: "list-item",
|
12
12
|
props: {
|
13
13
|
layout: {},
|
@@ -20,44 +20,44 @@ const Je = { class: "flex items-center justify-between w-full text-sm" }, Xe = {
|
|
20
20
|
highlighted: { type: Boolean }
|
21
21
|
},
|
22
22
|
emits: ["itemClick"],
|
23
|
-
setup(i, { expose:
|
24
|
-
const
|
25
|
-
function
|
26
|
-
|
23
|
+
setup(i, { expose: o, emit: d }) {
|
24
|
+
const r = i, t = d;
|
25
|
+
function s() {
|
26
|
+
t("itemClick", r.value);
|
27
27
|
}
|
28
|
-
const
|
29
|
-
return
|
28
|
+
const v = V(null);
|
29
|
+
return o({ el: v }), (g, b) => (p(), k("div", {
|
30
30
|
class: "flex items-center w-full rounded-lg group hover:bg-gray-100",
|
31
31
|
ref_key: "el",
|
32
|
-
ref:
|
32
|
+
ref: v
|
33
33
|
}, [
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
a("div", tt, [
|
35
|
+
a("div", lt, [
|
36
|
+
a("label", {
|
37
37
|
for: "radio-9740",
|
38
|
-
class:
|
39
|
-
["inline", "popover"].includes(
|
40
|
-
{ "bg-blue-100":
|
38
|
+
class: F([
|
39
|
+
["inline", "popover"].includes(g.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",
|
40
|
+
{ "bg-blue-100": g.highlighted }
|
41
41
|
]),
|
42
|
-
onClick:
|
42
|
+
onClick: Ie(s, ["stop", "prevent"])
|
43
43
|
}, [
|
44
|
-
|
45
|
-
class:
|
46
|
-
|
47
|
-
|
44
|
+
a("div", {
|
45
|
+
class: F(["w-[18px] h-[18px] border flex items-center justify-center", [
|
46
|
+
g.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
|
47
|
+
g.color ? `bg-[${g.color}] border-[#ffffff]` : g.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
|
48
48
|
]])
|
49
49
|
}, [
|
50
|
-
|
50
|
+
g.isSelected ? (p(), k("img", at)) : S("", !0)
|
51
51
|
], 2),
|
52
|
-
|
52
|
+
a("input", {
|
53
53
|
type: "checkbox",
|
54
54
|
class: "hidden",
|
55
55
|
id: "radio-9740",
|
56
|
-
value:
|
57
|
-
}, null, 8,
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
value: g.value
|
57
|
+
}, null, 8, ot),
|
58
|
+
a("div", rt, [
|
59
|
+
a("span", nt, L(g.label ?? "Відсутні данні"), 1),
|
60
|
+
g.count ? (p(), k("div", it, " (" + L(g.count) + ") ", 1)) : S("", !0)
|
61
61
|
])
|
62
62
|
], 2)
|
63
63
|
])
|
@@ -65,75 +65,75 @@ const Je = { class: "flex items-center justify-between w-full text-sm" }, Xe = {
|
|
65
65
|
], 512));
|
66
66
|
}
|
67
67
|
});
|
68
|
-
function
|
68
|
+
function Te(i, o) {
|
69
69
|
const {
|
70
70
|
options: d = [],
|
71
|
-
limit:
|
71
|
+
limit: r = 20
|
72
72
|
} = i;
|
73
|
-
function
|
74
|
-
return Array.isArray(
|
73
|
+
function t(n) {
|
74
|
+
return Array.isArray(n) ? n[0] : n;
|
75
75
|
}
|
76
|
-
const
|
77
|
-
function
|
78
|
-
const
|
79
|
-
return { autoValueKey:
|
76
|
+
const s = V(t(i.modelValue)), v = V(""), g = V(!1), b = V([]), w = V("id"), m = V("text"), f = V(!1), y = V(i.layout !== "popover" && d.length > r);
|
77
|
+
function _(n) {
|
78
|
+
const C = n.find(Boolean) ?? {}, M = ["id", "value", "code", "key"].find((A) => A in C) ?? "id", $ = ["text", "label", "name", "title"].find((A) => A in C) ?? "text";
|
79
|
+
return { autoValueKey: M, autoLabelKey: $ };
|
80
80
|
}
|
81
81
|
if (d.length > 0) {
|
82
|
-
const
|
83
|
-
|
82
|
+
const n = _(d);
|
83
|
+
w.value = n.autoValueKey, m.value = n.autoLabelKey;
|
84
84
|
}
|
85
85
|
const c = E(() => {
|
86
|
-
const
|
87
|
-
return i.layout === "popover" || f.value ?
|
86
|
+
const n = b.value;
|
87
|
+
return i.layout === "popover" || f.value ? n : n.slice(0, r);
|
88
88
|
});
|
89
|
-
|
90
|
-
|
91
|
-
}, { immediate: !0 }),
|
92
|
-
function
|
93
|
-
return
|
89
|
+
R(() => i.modelValue, (n) => {
|
90
|
+
s.value = t(n);
|
91
|
+
}, { immediate: !0 }), b.value = [...d].sort((n, C) => i.sort === "count" ? C.count && n.count ? C.count - n.count : 0 : i.sort === "name" ? String(n[m.value] ?? "").localeCompare(String(C[m.value] ?? "")) : 0);
|
92
|
+
function u(n) {
|
93
|
+
return s.value === n[w.value];
|
94
94
|
}
|
95
|
-
function
|
96
|
-
|
95
|
+
function l(n) {
|
96
|
+
s.value = n[w.value], o("update:modelValue", s.value), o("change", { name: i.name, value: s.value });
|
97
97
|
}
|
98
98
|
function x() {
|
99
|
-
|
99
|
+
s.value = void 0, o("update:modelValue", s.value), o("clear", i.name);
|
100
100
|
}
|
101
|
-
function
|
101
|
+
function h() {
|
102
102
|
f.value = !f.value;
|
103
103
|
}
|
104
104
|
return {
|
105
|
-
innerValue:
|
106
|
-
searchTerm:
|
105
|
+
innerValue: s,
|
106
|
+
searchTerm: v,
|
107
107
|
filteredOptions: c,
|
108
|
-
isSelected:
|
109
|
-
selectItem:
|
108
|
+
isSelected: u,
|
109
|
+
selectItem: l,
|
110
110
|
clear: x,
|
111
|
-
toggleShowAll:
|
112
|
-
isReqProc:
|
111
|
+
toggleShowAll: h,
|
112
|
+
isReqProc: g,
|
113
113
|
showAll: f,
|
114
114
|
isEnableShowAll: y,
|
115
|
-
labelKey:
|
116
|
-
valueKey:
|
117
|
-
allOptions:
|
115
|
+
labelKey: m,
|
116
|
+
valueKey: w,
|
117
|
+
allOptions: b
|
118
118
|
};
|
119
119
|
}
|
120
|
-
const le = (i,
|
120
|
+
const le = (i, o) => {
|
121
121
|
const d = i.__vccOpts || i;
|
122
|
-
for (const [
|
123
|
-
d[
|
122
|
+
for (const [r, t] of o)
|
123
|
+
d[r] = t;
|
124
124
|
return d;
|
125
|
-
},
|
125
|
+
}, st = {}, ut = {
|
126
126
|
class: "w-48 mx-auto",
|
127
127
|
viewBox: "0 0 178 90",
|
128
128
|
fill: "none",
|
129
129
|
xmlns: "http://www.w3.org/2000/svg"
|
130
130
|
};
|
131
|
-
function
|
132
|
-
return p(),
|
131
|
+
function dt(i, o) {
|
132
|
+
return p(), k("svg", ut, o[0] || (o[0] = [
|
133
133
|
Pe('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
134
134
|
]));
|
135
135
|
}
|
136
|
-
const Ve = /* @__PURE__ */ le(
|
136
|
+
const Ve = /* @__PURE__ */ le(st, [["render", dt]]), ct = {}, pt = {
|
137
137
|
xmlns: "http://www.w3.org/2000/svg",
|
138
138
|
width: "24",
|
139
139
|
height: "24",
|
@@ -145,17 +145,17 @@ const Ve = /* @__PURE__ */ le(rt, [["render", it]]), st = {}, ut = {
|
|
145
145
|
"stroke-linejoin": "round",
|
146
146
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
|
147
147
|
};
|
148
|
-
function
|
149
|
-
return p(),
|
150
|
-
|
148
|
+
function ft(i, o) {
|
149
|
+
return p(), k("svg", pt, o[0] || (o[0] = [
|
150
|
+
a("path", {
|
151
151
|
stroke: "none",
|
152
152
|
d: "M0 0h24v24H0z",
|
153
153
|
fill: "none"
|
154
154
|
}, null, -1),
|
155
|
-
|
155
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
156
156
|
]));
|
157
157
|
}
|
158
|
-
const be = /* @__PURE__ */ le(
|
158
|
+
const be = /* @__PURE__ */ le(ct, [["render", ft]]), vt = {}, mt = {
|
159
159
|
xmlns: "http://www.w3.org/2000/svg",
|
160
160
|
width: "24",
|
161
161
|
height: "24",
|
@@ -167,26 +167,26 @@ const be = /* @__PURE__ */ le(st, [["render", dt]]), ct = {}, pt = {
|
|
167
167
|
"stroke-linejoin": "round",
|
168
168
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
|
169
169
|
};
|
170
|
-
function
|
171
|
-
return p(),
|
172
|
-
|
170
|
+
function gt(i, o) {
|
171
|
+
return p(), k("svg", mt, o[0] || (o[0] = [
|
172
|
+
a("path", {
|
173
173
|
stroke: "none",
|
174
174
|
d: "M0 0h24v24H0z",
|
175
175
|
fill: "none"
|
176
176
|
}, null, -1),
|
177
|
-
|
177
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
178
178
|
]));
|
179
179
|
}
|
180
|
-
const Se = /* @__PURE__ */ le(
|
180
|
+
const Se = /* @__PURE__ */ le(vt, [["render", gt]]), ht = {
|
181
181
|
key: 0,
|
182
182
|
class: "w-full"
|
183
|
-
},
|
183
|
+
}, bt = { class: "flex flex-col items-center justify-center p-5 text-center" }, yt = {
|
184
184
|
key: 0,
|
185
185
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
186
|
-
},
|
186
|
+
}, xt = {
|
187
187
|
key: 1,
|
188
188
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
189
|
-
},
|
189
|
+
}, wt = /* @__PURE__ */ Y({
|
190
190
|
__name: "radio",
|
191
191
|
props: {
|
192
192
|
id: {},
|
@@ -212,170 +212,170 @@ const Se = /* @__PURE__ */ le(ct, [["render", ft]]), vt = {
|
|
212
212
|
sort: {}
|
213
213
|
},
|
214
214
|
emits: ["update:modelValue", "change", "clear"],
|
215
|
-
setup(i, { expose:
|
216
|
-
const
|
217
|
-
innerValue:
|
218
|
-
filteredOptions:
|
219
|
-
isSelected:
|
220
|
-
selectItem:
|
221
|
-
clear:
|
215
|
+
setup(i, { expose: o, emit: d }) {
|
216
|
+
const r = i, t = V(null), s = d, {
|
217
|
+
innerValue: v,
|
218
|
+
filteredOptions: g,
|
219
|
+
isSelected: b,
|
220
|
+
selectItem: w,
|
221
|
+
clear: m,
|
222
222
|
toggleShowAll: f,
|
223
223
|
isReqProc: y,
|
224
|
-
showAll:
|
224
|
+
showAll: _,
|
225
225
|
isEnableShowAll: c,
|
226
|
-
labelKey:
|
227
|
-
valueKey:
|
226
|
+
labelKey: u,
|
227
|
+
valueKey: l,
|
228
228
|
allOptions: x
|
229
|
-
} =
|
230
|
-
...
|
231
|
-
modelValue:
|
232
|
-
},
|
233
|
-
return
|
234
|
-
clear:
|
235
|
-
inputTextRef:
|
236
|
-
}),
|
237
|
-
() =>
|
238
|
-
(
|
239
|
-
|
229
|
+
} = Te({
|
230
|
+
...r,
|
231
|
+
modelValue: r.modelValue ?? r.default ?? ""
|
232
|
+
}, s);
|
233
|
+
return o({
|
234
|
+
clear: m,
|
235
|
+
inputTextRef: t
|
236
|
+
}), R(
|
237
|
+
() => r.modelValue,
|
238
|
+
(h) => {
|
239
|
+
h === void 0 && (v.value = void 0);
|
240
240
|
}
|
241
|
-
), (
|
242
|
-
class:
|
241
|
+
), (h, n) => (p(), k("div", {
|
242
|
+
class: F([h.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
|
243
243
|
}, [
|
244
|
-
|
245
|
-
class:
|
246
|
-
|
247
|
-
|
244
|
+
a("div", {
|
245
|
+
class: F([
|
246
|
+
h.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
247
|
+
h.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
248
248
|
])
|
249
249
|
}, [
|
250
|
-
(p(!0),
|
251
|
-
layout:
|
252
|
-
key:
|
253
|
-
count:
|
254
|
-
label:
|
255
|
-
color:
|
250
|
+
(p(!0), k(K, null, q(e(g), (C) => (p(), j(_e, {
|
251
|
+
layout: h.layout,
|
252
|
+
key: C[e(l)],
|
253
|
+
count: C.count,
|
254
|
+
label: C[e(u)],
|
255
|
+
color: C.color,
|
256
256
|
type: "radio",
|
257
|
-
value:
|
258
|
-
"is-selected": e(
|
259
|
-
onItemClick: (
|
257
|
+
value: C[e(l)],
|
258
|
+
"is-selected": e(b)(C),
|
259
|
+
onItemClick: (M) => e(w)(C)
|
260
260
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
261
261
|
], 2),
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
262
|
+
h.type === "select" && e(g).length === 0 && !e(y) ? (p(), k("div", ht, [
|
263
|
+
a("div", bt, [
|
264
|
+
I(Ve),
|
265
|
+
n[4] || (n[4] = a("div", { class: "max-w-sm mx-auto mt-6" }, [
|
266
|
+
a("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
267
|
+
a("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
268
268
|
], -1))
|
269
269
|
])
|
270
270
|
])) : S("", !0),
|
271
|
-
|
272
|
-
!e(
|
271
|
+
h.layout !== "popover" && h.type !== "select" ? (p(), k(K, { key: 1 }, [
|
272
|
+
!e(_) && e(c) ? (p(), k("div", {
|
273
273
|
key: 0,
|
274
|
-
onClick:
|
275
|
-
(...
|
274
|
+
onClick: n[0] || (n[0] = //@ts-ignore
|
275
|
+
(...C) => e(f) && e(f)(...C)),
|
276
276
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
277
277
|
}, [
|
278
|
-
|
279
|
-
|
278
|
+
n[5] || (n[5] = W(" Показати більше ", -1)),
|
279
|
+
I(be)
|
280
280
|
])) : S("", !0),
|
281
|
-
e(
|
281
|
+
e(_) ? (p(), k("div", {
|
282
282
|
key: 1,
|
283
|
-
onClick:
|
284
|
-
(...
|
283
|
+
onClick: n[1] || (n[1] = //@ts-ignore
|
284
|
+
(...C) => e(f) && e(f)(...C)),
|
285
285
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
286
286
|
}, [
|
287
|
-
|
288
|
-
|
287
|
+
n[6] || (n[6] = W(" Показати менше ", -1)),
|
288
|
+
I(Se)
|
289
289
|
])) : S("", !0)
|
290
290
|
], 64)) : S("", !0),
|
291
|
-
|
292
|
-
|
293
|
-
W(
|
294
|
-
|
291
|
+
h.cleanable ? (p(), k(K, { key: 2 }, [
|
292
|
+
h.layout === "inline" ? (p(), k("div", yt, [
|
293
|
+
W(L(e(v) || e(v) === null ? 1 : 0) + " з " + L(e(x).length) + " обрано ", 1),
|
294
|
+
P(a("button", {
|
295
295
|
class: "text-gray-600 hover:text-gray-800",
|
296
|
-
onClick:
|
297
|
-
(...
|
296
|
+
onClick: n[2] || (n[2] = //@ts-ignore
|
297
|
+
(...C) => e(m) && e(m)(...C))
|
298
298
|
}, " Очистити ", 512), [
|
299
|
-
[X, e(
|
299
|
+
[X, e(v) !== "" && e(v) !== void 0]
|
300
300
|
])
|
301
301
|
])) : S("", !0),
|
302
|
-
|
303
|
-
|
304
|
-
|
302
|
+
h.layout === "popover" ? (p(), k("div", xt, [
|
303
|
+
a("span", null, L(e(v) || e(v) === null ? 1 : 0) + " з " + L(e(x).length) + " обрано", 1),
|
304
|
+
P(a("button", {
|
305
305
|
class: "text-gray-600 hover:text-gray-800",
|
306
|
-
onClick:
|
307
|
-
(...
|
306
|
+
onClick: n[3] || (n[3] = //@ts-ignore
|
307
|
+
(...C) => e(m) && e(m)(...C))
|
308
308
|
}, " Очистити ", 512), [
|
309
|
-
[X, e(
|
309
|
+
[X, e(v) !== "" && e(v) !== void 0]
|
310
310
|
])
|
311
311
|
])) : S("", !0)
|
312
312
|
], 64)) : S("", !0)
|
313
313
|
], 2));
|
314
314
|
}
|
315
315
|
});
|
316
|
-
function
|
316
|
+
function He(i, o) {
|
317
317
|
const {
|
318
318
|
options: d = [],
|
319
|
-
limit:
|
319
|
+
limit: r = 20
|
320
320
|
} = i;
|
321
|
-
function
|
322
|
-
return Array.isArray(
|
321
|
+
function t(n) {
|
322
|
+
return Array.isArray(n) ? n : n ? [n] : [];
|
323
323
|
}
|
324
|
-
const
|
325
|
-
function
|
326
|
-
const
|
327
|
-
return { autoValueKey:
|
324
|
+
const s = V(t(i.modelValue)), v = V(""), g = V(!1), b = V([]), w = V("id"), m = V("text"), f = V(!1), y = V(i.layout !== "popover" && d.length > r);
|
325
|
+
function _(n) {
|
326
|
+
const C = n.find(Boolean) ?? {}, M = ["id", "value", "code", "key"].find((A) => A in C) ?? "id", $ = ["text", "label", "name", "title"].find((A) => A in C) ?? "text";
|
327
|
+
return { autoValueKey: M, autoLabelKey: $ };
|
328
328
|
}
|
329
329
|
if (d.length > 0) {
|
330
|
-
const
|
331
|
-
|
330
|
+
const n = _(d);
|
331
|
+
w.value = n.autoValueKey, m.value = n.autoLabelKey;
|
332
332
|
}
|
333
333
|
const c = E(() => {
|
334
|
-
const
|
335
|
-
return i.layout === "popover" || f.value ?
|
334
|
+
const n = b.value;
|
335
|
+
return i.layout === "popover" || f.value ? n : n.slice(0, r);
|
336
336
|
});
|
337
|
-
|
338
|
-
|
339
|
-
}, { immediate: !0 }),
|
340
|
-
function
|
341
|
-
return
|
337
|
+
R(() => i.modelValue, (n) => {
|
338
|
+
s.value = t(n);
|
339
|
+
}, { immediate: !0 }), b.value = [...d].sort((n, C) => i.sort === "count" ? C.count && n.count ? C.count - n.count : 0 : i.sort === "name" ? String(n[m.value]).localeCompare(String(C[m.value])) : 0);
|
340
|
+
function u(n) {
|
341
|
+
return s.value && s.value.includes(n[w.value]);
|
342
342
|
}
|
343
|
-
function
|
344
|
-
const
|
345
|
-
|
343
|
+
function l(n) {
|
344
|
+
const C = s.value.includes(n[w.value]);
|
345
|
+
s.value = C ? s.value.filter((M) => M !== n[w.value]) : [...s.value, n[w.value]], o("update:modelValue", s.value), o("change", { name: i.name, value: s.value });
|
346
346
|
}
|
347
347
|
function x() {
|
348
|
-
|
348
|
+
s.value = [], o("update:modelValue", s.value), o("clear", i.name);
|
349
349
|
}
|
350
|
-
function
|
350
|
+
function h() {
|
351
351
|
f.value = !f.value;
|
352
352
|
}
|
353
353
|
return {
|
354
|
-
innerValue:
|
355
|
-
searchTerm:
|
354
|
+
innerValue: s,
|
355
|
+
searchTerm: v,
|
356
356
|
filteredOptions: c,
|
357
|
-
isSelected:
|
358
|
-
selectItem:
|
357
|
+
isSelected: u,
|
358
|
+
selectItem: l,
|
359
359
|
clear: x,
|
360
|
-
toggleShowAll:
|
361
|
-
isReqProc:
|
360
|
+
toggleShowAll: h,
|
361
|
+
isReqProc: g,
|
362
362
|
showAll: f,
|
363
363
|
isEnableShowAll: y,
|
364
|
-
labelKey:
|
365
|
-
valueKey:
|
366
|
-
allOptions:
|
364
|
+
labelKey: m,
|
365
|
+
valueKey: w,
|
366
|
+
allOptions: b
|
367
367
|
};
|
368
368
|
}
|
369
|
-
const
|
369
|
+
const kt = {
|
370
370
|
key: 0,
|
371
371
|
class: "w-full"
|
372
|
-
},
|
372
|
+
}, Ct = { class: "flex flex-col items-center justify-center p-5 text-center" }, _t = {
|
373
373
|
key: 0,
|
374
374
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
375
|
-
},
|
375
|
+
}, Vt = {
|
376
376
|
key: 1,
|
377
377
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
378
|
-
},
|
378
|
+
}, je = /* @__PURE__ */ Y({
|
379
379
|
__name: "checkbox",
|
380
380
|
props: {
|
381
381
|
id: {},
|
@@ -401,105 +401,105 @@ const yt = {
|
|
401
401
|
sort: {}
|
402
402
|
},
|
403
403
|
emits: ["update:modelValue", "change", "clear"],
|
404
|
-
setup(i, { expose:
|
405
|
-
const
|
406
|
-
innerValue:
|
407
|
-
filteredOptions:
|
408
|
-
isSelected:
|
409
|
-
selectItem:
|
410
|
-
clear:
|
411
|
-
toggleShowAll:
|
404
|
+
setup(i, { expose: o, emit: d }) {
|
405
|
+
const r = i, t = d, {
|
406
|
+
innerValue: s,
|
407
|
+
filteredOptions: v,
|
408
|
+
isSelected: g,
|
409
|
+
selectItem: b,
|
410
|
+
clear: w,
|
411
|
+
toggleShowAll: m,
|
412
412
|
isReqProc: f,
|
413
413
|
showAll: y,
|
414
|
-
isEnableShowAll:
|
414
|
+
isEnableShowAll: _,
|
415
415
|
labelKey: c,
|
416
|
-
valueKey:
|
417
|
-
allOptions:
|
418
|
-
} =
|
419
|
-
...
|
420
|
-
modelValue:
|
421
|
-
},
|
422
|
-
return
|
423
|
-
() =>
|
416
|
+
valueKey: u,
|
417
|
+
allOptions: l
|
418
|
+
} = He({
|
419
|
+
...r,
|
420
|
+
modelValue: r.modelValue
|
421
|
+
}, t);
|
422
|
+
return R(
|
423
|
+
() => r.modelValue,
|
424
424
|
(x) => {
|
425
|
-
x === void 0 && (
|
425
|
+
x === void 0 && (s.value = []);
|
426
426
|
}
|
427
|
-
),
|
428
|
-
clear:
|
429
|
-
}), (x,
|
430
|
-
class:
|
427
|
+
), o({
|
428
|
+
clear: w
|
429
|
+
}), (x, h) => (p(), k("div", {
|
430
|
+
class: F([x.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
431
431
|
}, [
|
432
|
-
|
433
|
-
class:
|
432
|
+
a("div", {
|
433
|
+
class: F([
|
434
434
|
x.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
435
435
|
x.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
436
436
|
])
|
437
437
|
}, [
|
438
|
-
(p(!0),
|
438
|
+
(p(!0), k(K, null, q(e(v), (n) => (p(), j(_e, {
|
439
439
|
layout: x.layout,
|
440
|
-
count:
|
441
|
-
label:
|
442
|
-
color:
|
440
|
+
count: n.count,
|
441
|
+
label: n[e(c)],
|
442
|
+
color: n.color,
|
443
443
|
type: "checkbox",
|
444
|
-
value:
|
445
|
-
"is-selected": e(
|
446
|
-
onItemClick: (
|
444
|
+
value: n[e(u)],
|
445
|
+
"is-selected": e(g)(n),
|
446
|
+
onItemClick: (C) => e(b)(n)
|
447
447
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
|
448
448
|
], 2),
|
449
|
-
x.type === "select" && e(
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
449
|
+
x.type === "select" && e(v).length === 0 && !e(f) ? (p(), k("div", kt, [
|
450
|
+
a("div", Ct, [
|
451
|
+
I(Ve),
|
452
|
+
h[4] || (h[4] = a("div", { class: "max-w-sm mx-auto mt-6" }, [
|
453
|
+
a("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
454
|
+
a("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
455
455
|
], -1))
|
456
456
|
])
|
457
457
|
])) : S("", !0),
|
458
|
-
x.layout !== "popover" && x.type !== "select" ? (p(),
|
459
|
-
!e(y) && e(
|
458
|
+
x.layout !== "popover" && x.type !== "select" ? (p(), k(K, { key: 1 }, [
|
459
|
+
!e(y) && e(_) ? (p(), k("div", {
|
460
460
|
key: 0,
|
461
|
-
onClick:
|
462
|
-
(...
|
461
|
+
onClick: h[0] || (h[0] = //@ts-ignore
|
462
|
+
(...n) => e(m) && e(m)(...n)),
|
463
463
|
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"
|
464
464
|
}, [
|
465
|
-
|
466
|
-
|
465
|
+
h[5] || (h[5] = W(" Показати більше ", -1)),
|
466
|
+
I(be)
|
467
467
|
])) : S("", !0),
|
468
|
-
e(y) ? (p(),
|
468
|
+
e(y) ? (p(), k("div", {
|
469
469
|
key: 1,
|
470
|
-
onClick:
|
471
|
-
(...
|
470
|
+
onClick: h[1] || (h[1] = //@ts-ignore
|
471
|
+
(...n) => e(m) && e(m)(...n)),
|
472
472
|
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"
|
473
473
|
}, [
|
474
|
-
|
475
|
-
|
474
|
+
h[6] || (h[6] = W(" Показати менше ", -1)),
|
475
|
+
I(Se)
|
476
476
|
])) : S("", !0)
|
477
477
|
], 64)) : S("", !0),
|
478
|
-
x.cleanable ? (p(),
|
479
|
-
x.layout === "inline" ? (p(),
|
480
|
-
W(
|
481
|
-
|
478
|
+
x.cleanable ? (p(), k(K, { key: 2 }, [
|
479
|
+
x.layout === "inline" ? (p(), k("div", _t, [
|
480
|
+
W(L(e(s).length) + " з " + L(e(l).length) + " обрано ", 1),
|
481
|
+
P(a("button", {
|
482
482
|
class: "text-gray-600 hover:text-gray-800",
|
483
|
-
onClick:
|
484
|
-
(...
|
483
|
+
onClick: h[2] || (h[2] = //@ts-ignore
|
484
|
+
(...n) => e(w) && e(w)(...n))
|
485
485
|
}, " Очистити ", 512), [
|
486
|
-
[X, e(
|
486
|
+
[X, e(s).length !== 0]
|
487
487
|
])
|
488
488
|
])) : S("", !0),
|
489
|
-
x.layout === "popover" ? (p(),
|
490
|
-
|
491
|
-
|
489
|
+
x.layout === "popover" ? (p(), k("div", Vt, [
|
490
|
+
a("span", null, L(e(s).length) + " з " + L(e(l).length) + " обрано", 1),
|
491
|
+
P(a("button", {
|
492
492
|
class: "text-gray-600 hover:text-gray-800",
|
493
|
-
onClick:
|
494
|
-
(...
|
493
|
+
onClick: h[3] || (h[3] = //@ts-ignore
|
494
|
+
(...n) => e(w) && e(w)(...n))
|
495
495
|
}, " Очистити ", 512), [
|
496
|
-
[X, e(
|
496
|
+
[X, e(s).length !== 0]
|
497
497
|
])
|
498
498
|
])) : S("", !0)
|
499
499
|
], 64)) : S("", !0)
|
500
500
|
], 2));
|
501
501
|
}
|
502
|
-
}),
|
502
|
+
}), St = {}, Mt = {
|
503
503
|
xmlns: "http://www.w3.org/2000/svg",
|
504
504
|
width: "15px",
|
505
505
|
height: "15px",
|
@@ -511,18 +511,18 @@ const yt = {
|
|
511
511
|
"stroke-linejoin": "round",
|
512
512
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
513
513
|
};
|
514
|
-
function
|
515
|
-
return p(),
|
516
|
-
|
514
|
+
function Bt(i, o) {
|
515
|
+
return p(), k("svg", Mt, o[0] || (o[0] = [
|
516
|
+
a("path", {
|
517
517
|
stroke: "none",
|
518
518
|
d: "M0 0h24v24H0z",
|
519
519
|
fill: "none"
|
520
520
|
}, null, -1),
|
521
|
-
|
522
|
-
|
521
|
+
a("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
|
522
|
+
a("path", { d: "M21 21l-6 -6" }, null, -1)
|
523
523
|
]));
|
524
524
|
}
|
525
|
-
const
|
525
|
+
const Ee = /* @__PURE__ */ le(St, [["render", Bt]]), $t = {}, At = {
|
526
526
|
xmlns: "http://www.w3.org/2000/svg",
|
527
527
|
viewBox: "0 0 24 24",
|
528
528
|
fill: "none",
|
@@ -534,24 +534,24 @@ const He = /* @__PURE__ */ le(_t, [["render", Vt]]), St = {}, Mt = {
|
|
534
534
|
width: "15px",
|
535
535
|
height: "15px"
|
536
536
|
};
|
537
|
-
function
|
538
|
-
return p(),
|
539
|
-
|
537
|
+
function Rt(i, o) {
|
538
|
+
return p(), k("svg", At, o[0] || (o[0] = [
|
539
|
+
a("path", {
|
540
540
|
stroke: "none",
|
541
541
|
d: "M0 0h24v24H0z",
|
542
542
|
fill: "none"
|
543
543
|
}, null, -1),
|
544
|
-
|
545
|
-
|
544
|
+
a("path", { d: "M18 6l-12 12" }, null, -1),
|
545
|
+
a("path", { d: "M6 6l12 12" }, null, -1)
|
546
546
|
]));
|
547
547
|
}
|
548
|
-
const
|
548
|
+
const Ye = /* @__PURE__ */ le($t, [["render", Rt]]);
|
549
549
|
class ye {
|
550
|
-
static getWidthClass(
|
551
|
-
return typeof
|
550
|
+
static getWidthClass(o) {
|
551
|
+
return typeof o == "number" ? `max-w-[${o}px]` : typeof o == "string" ? o.endsWith("%") || o.endsWith("px") ? `max-w-[${o}]` : `max-w-${o}` : "w-full";
|
552
552
|
}
|
553
553
|
}
|
554
|
-
const
|
554
|
+
const Dt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, zt = ["placeholder"], jt = /* @__PURE__ */ Y({
|
555
555
|
__name: "text-input",
|
556
556
|
props: {
|
557
557
|
id: {},
|
@@ -577,73 +577,73 @@ const $t = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
577
577
|
sort: {}
|
578
578
|
},
|
579
579
|
emits: ["update:modelValue", "change", "clear"],
|
580
|
-
setup(i, { emit:
|
581
|
-
const d = i,
|
582
|
-
|
580
|
+
setup(i, { emit: o }) {
|
581
|
+
const d = i, r = V((d.placeHolder || d.label || d.name || "search").toString()), t = o, s = V(d.modelValue ?? "");
|
582
|
+
R(
|
583
583
|
() => d.modelValue,
|
584
|
-
(
|
585
|
-
|
584
|
+
(b) => {
|
585
|
+
b !== s.value && (s.value = b ?? "");
|
586
586
|
}
|
587
587
|
);
|
588
|
-
function
|
589
|
-
|
588
|
+
function v() {
|
589
|
+
t("update:modelValue", s.value), t("change", { name: d.name, value: s.value });
|
590
590
|
}
|
591
|
-
function
|
592
|
-
|
591
|
+
function g() {
|
592
|
+
s.value = "", t("update:modelValue", ""), t("clear", d.name), t("change", { name: d.name, value: null });
|
593
593
|
}
|
594
|
-
return (
|
595
|
-
class:
|
594
|
+
return (b, w) => (p(), k("div", {
|
595
|
+
class: F([
|
596
596
|
"vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
|
597
|
-
|
597
|
+
b.layout === "inline" ? e(ye).getWidthClass(b.width) : "mb-2" + (b.layout === "popover" ? " m-2" : "")
|
598
598
|
])
|
599
599
|
}, [
|
600
|
-
|
601
|
-
|
600
|
+
a("div", Dt, [
|
601
|
+
I(Ee)
|
602
602
|
]),
|
603
|
-
|
603
|
+
s.value !== "" ? (p(), k("div", {
|
604
604
|
key: 0,
|
605
|
-
onClick:
|
605
|
+
onClick: g,
|
606
606
|
class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
|
607
607
|
}, [
|
608
|
-
|
608
|
+
I(Ye)
|
609
609
|
])) : S("", !0),
|
610
|
-
|
610
|
+
P(a("input", {
|
611
611
|
type: "text",
|
612
|
-
"onUpdate:modelValue":
|
613
|
-
onInput:
|
614
|
-
placeholder:
|
612
|
+
"onUpdate:modelValue": w[0] || (w[0] = (m) => s.value = m),
|
613
|
+
onInput: v,
|
614
|
+
placeholder: r.value,
|
615
615
|
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"
|
616
|
-
}, null, 40,
|
617
|
-
[te,
|
616
|
+
}, null, 40, zt), [
|
617
|
+
[te, s.value]
|
618
618
|
])
|
619
619
|
], 2));
|
620
620
|
}
|
621
621
|
});
|
622
|
-
function
|
622
|
+
function We(i = { color: "blue" }) {
|
623
623
|
return E(() => {
|
624
|
-
const
|
625
|
-
return (i == null ? void 0 : i.size) === "sm" ? `${
|
624
|
+
const o = `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`;
|
625
|
+
return (i == null ? void 0 : i.size) === "sm" ? `${o}h-[32px]` : `${o}h-[38px]`;
|
626
626
|
});
|
627
627
|
}
|
628
|
-
function
|
628
|
+
function Ft() {
|
629
629
|
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]";
|
630
630
|
}
|
631
|
-
function
|
631
|
+
function Kt() {
|
632
632
|
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";
|
633
633
|
}
|
634
|
-
function
|
634
|
+
function qe(i) {
|
635
635
|
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]";
|
636
636
|
}
|
637
|
-
const
|
637
|
+
const Lt = {
|
638
638
|
key: 0,
|
639
639
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
640
|
-
},
|
640
|
+
}, Ut = ["placeholder", "disabled"], Ot = {
|
641
641
|
key: 0,
|
642
642
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
643
|
-
},
|
643
|
+
}, It = {
|
644
644
|
key: 0,
|
645
645
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
646
|
-
},
|
646
|
+
}, Pt = ["placeholder", "disabled"], Tt = ["disabled"], Ht = /* @__PURE__ */ Y({
|
647
647
|
__name: "range-input",
|
648
648
|
props: {
|
649
649
|
id: {},
|
@@ -669,85 +669,85 @@ const jt = {
|
|
669
669
|
sort: {}
|
670
670
|
},
|
671
671
|
emits: ["update:modelValue", "change", "clear"],
|
672
|
-
setup(i, { expose:
|
673
|
-
const
|
674
|
-
|
675
|
-
),
|
676
|
-
get: () =>
|
672
|
+
setup(i, { expose: o, emit: d }) {
|
673
|
+
const r = We(), t = Ft(), s = i, v = V(
|
674
|
+
s.modelValue ?? s.default ?? []
|
675
|
+
), g = d, b = E({
|
676
|
+
get: () => s.modelValue ?? v.value,
|
677
677
|
set: (f) => {
|
678
|
-
|
678
|
+
s.modelValue !== void 0 ? g("update:modelValue", f) : v.value = f;
|
679
679
|
}
|
680
680
|
});
|
681
|
-
function
|
682
|
-
|
681
|
+
function w() {
|
682
|
+
g("change", { name: s.name, value: b.value || v.value });
|
683
683
|
}
|
684
|
-
function
|
685
|
-
|
684
|
+
function m() {
|
685
|
+
v.value = [], b.value = v.value, g("clear", s.name);
|
686
686
|
}
|
687
|
-
return
|
688
|
-
f !== void 0 &&
|
689
|
-
}),
|
690
|
-
clear:
|
691
|
-
currentValue:
|
687
|
+
return R(() => s.modelValue, (f) => {
|
688
|
+
f !== void 0 && s.layout !== "popover" ? (v.value = f, g("update:modelValue", f)) : v.value = [];
|
689
|
+
}), o({
|
690
|
+
clear: m,
|
691
|
+
currentValue: b
|
692
692
|
}), (f, y) => {
|
693
|
-
var
|
694
|
-
return p(),
|
695
|
-
|
696
|
-
|
697
|
-
class:
|
693
|
+
var _, c;
|
694
|
+
return p(), k(K, null, [
|
695
|
+
a("div", null, [
|
696
|
+
a("div", {
|
697
|
+
class: F(f.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
698
698
|
}, [
|
699
|
-
|
700
|
-
f.layout !== "vertical" ? (p(),
|
701
|
-
|
699
|
+
a("div", null, [
|
700
|
+
f.layout !== "vertical" ? (p(), k("label", Lt, "Від")) : S("", !0),
|
701
|
+
P(a("input", {
|
702
702
|
type: "number",
|
703
|
-
class:
|
704
|
-
placeholder: ((
|
703
|
+
class: F(e(r)),
|
704
|
+
placeholder: ((_ = f.placeHolder) == null ? void 0 : _[0]) ?? "min",
|
705
705
|
step: "1",
|
706
706
|
style: { outline: "none" },
|
707
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
707
|
+
"onUpdate:modelValue": y[0] || (y[0] = (u) => b.value[0] = u),
|
708
708
|
disabled: f.disabled
|
709
|
-
}, null, 10,
|
710
|
-
[te,
|
709
|
+
}, null, 10, Ut), [
|
710
|
+
[te, b.value[0]]
|
711
711
|
])
|
712
712
|
]),
|
713
|
-
f.layout === "vertical" ? (p(),
|
714
|
-
|
715
|
-
f.layout !== "vertical" ? (p(),
|
716
|
-
|
713
|
+
f.layout === "vertical" ? (p(), k("label", Ot, " - ")) : S("", !0),
|
714
|
+
a("div", null, [
|
715
|
+
f.layout !== "vertical" ? (p(), k("label", It, "До")) : S("", !0),
|
716
|
+
P(a("input", {
|
717
717
|
type: "number",
|
718
|
-
class:
|
718
|
+
class: F(e(r)),
|
719
719
|
placeholder: ((c = f.placeHolder) == null ? void 0 : c[1]) ?? "max",
|
720
720
|
min: "0",
|
721
721
|
max: "1000000000000000",
|
722
722
|
step: "1",
|
723
723
|
style: { outline: "none" },
|
724
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
724
|
+
"onUpdate:modelValue": y[1] || (y[1] = (u) => b.value[1] = u),
|
725
725
|
disabled: f.disabled
|
726
|
-
}, null, 10,
|
727
|
-
[te,
|
726
|
+
}, null, 10, Pt), [
|
727
|
+
[te, b.value[1]]
|
728
728
|
])
|
729
729
|
]),
|
730
|
-
["popover", "inline", "vertical"].includes(f.layout) ? (p(),
|
730
|
+
["popover", "inline", "vertical"].includes(f.layout) ? (p(), k("button", {
|
731
731
|
key: 1,
|
732
|
-
onClick:
|
733
|
-
class:
|
734
|
-
},
|
735
|
-
["popover", "inline"].includes(f.layout) ? (p(),
|
732
|
+
onClick: w,
|
733
|
+
class: F(e(t) + (f.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
734
|
+
}, L(f.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : S("", !0),
|
735
|
+
["popover", "inline"].includes(f.layout) ? (p(), k("button", {
|
736
736
|
key: 2,
|
737
|
-
disabled: !(
|
738
|
-
onClick:
|
739
|
-
class:
|
740
|
-
}, "Очистити", 10,
|
737
|
+
disabled: !(b.value[0] || b.value[1]),
|
738
|
+
onClick: m,
|
739
|
+
class: F(e(t) + " hover:bg-gray-100")
|
740
|
+
}, "Очистити", 10, Tt)) : S("", !0)
|
741
741
|
], 2)
|
742
742
|
]),
|
743
|
-
(f.cleanable &&
|
743
|
+
(f.cleanable && v.value.length, S("", !0))
|
744
744
|
], 64);
|
745
745
|
};
|
746
746
|
}
|
747
|
-
}),
|
747
|
+
}), Et = ["disabled", "title"], Yt = {
|
748
748
|
key: 0,
|
749
749
|
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"
|
750
|
-
},
|
750
|
+
}, Wt = { 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" }, qt = { 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" }, Me = /* @__PURE__ */ Y({
|
751
751
|
__name: "popover-field",
|
752
752
|
props: {
|
753
753
|
disabled: { type: Boolean, default: !1 },
|
@@ -758,216 +758,216 @@ const jt = {
|
|
758
758
|
mode: {},
|
759
759
|
layout: {}
|
760
760
|
},
|
761
|
-
setup(i, { expose:
|
762
|
-
const d = i,
|
763
|
-
function
|
764
|
-
const
|
765
|
-
if (!
|
766
|
-
const
|
767
|
-
let { left:
|
768
|
-
|
761
|
+
setup(i, { expose: o }) {
|
762
|
+
const d = i, r = E(() => qe(d.mode)), t = V(!1), s = V({ top: 0, left: 0 }), v = V(null), g = V(null), b = V(null);
|
763
|
+
function w() {
|
764
|
+
const l = g.value, x = b.value;
|
765
|
+
if (!l || !x) return;
|
766
|
+
const h = l.getBoundingClientRect(), n = x.offsetWidth, C = window.innerWidth, M = h.bottom + 8;
|
767
|
+
let { left: $ } = h;
|
768
|
+
$ + n > C && ($ = Math.max(C - n - 10, 10)), s.value = { top: M, left: $ };
|
769
769
|
}
|
770
|
-
function
|
771
|
-
|
772
|
-
var
|
773
|
-
|
770
|
+
function m() {
|
771
|
+
t.value = !t.value, t.value && ke(() => {
|
772
|
+
var l, x;
|
773
|
+
w(), (l = d.fieldRef) != null && l.inputTextRef && ((x = d.fieldRef) == null || x.inputTextRef.focus());
|
774
774
|
});
|
775
775
|
}
|
776
|
-
function f(
|
777
|
-
var x,
|
778
|
-
!((x =
|
776
|
+
function f(l) {
|
777
|
+
var x, h;
|
778
|
+
!((x = v.value) != null && x.contains(l.target)) && !((h = b.value) != null && h.contains(l.target)) && (t.value = !1);
|
779
779
|
}
|
780
|
-
function y(
|
781
|
-
|
780
|
+
function y(l) {
|
781
|
+
l.key === "Escape" && (t.value = !1);
|
782
782
|
}
|
783
|
-
const
|
783
|
+
const _ = V(!1);
|
784
784
|
ue(() => {
|
785
|
-
|
785
|
+
_.value = !0;
|
786
786
|
}), ue(() => {
|
787
|
-
document.addEventListener("click", f, !0), document.addEventListener("keydown", y), window.addEventListener("scroll",
|
787
|
+
document.addEventListener("click", f, !0), document.addEventListener("keydown", y), window.addEventListener("scroll", w, !0);
|
788
788
|
}), he(() => {
|
789
|
-
document.removeEventListener("click", f, !0), document.removeEventListener("keydown", y), window.removeEventListener("scroll",
|
789
|
+
document.removeEventListener("click", f, !0), document.removeEventListener("keydown", y), window.removeEventListener("scroll", w, !0);
|
790
790
|
});
|
791
791
|
function c() {
|
792
|
-
|
792
|
+
t.value = !1;
|
793
793
|
}
|
794
|
-
|
795
|
-
const
|
794
|
+
o({ close: c });
|
795
|
+
const u = E(() => {
|
796
796
|
var x;
|
797
|
-
const
|
798
|
-
return
|
797
|
+
const l = (x = d.fieldRef) == null ? void 0 : x.selectedLabels;
|
798
|
+
return l ? Array.isArray(l) ? l.length > 0 ? l.join(", ") : d.label ?? "" : String(l) : d.label ?? "";
|
799
799
|
});
|
800
|
-
return (
|
801
|
-
|
802
|
-
onClick:
|
803
|
-
disabled:
|
800
|
+
return (l, x) => (p(), k("div", null, [
|
801
|
+
a("button", {
|
802
|
+
onClick: m,
|
803
|
+
disabled: l.disabled,
|
804
804
|
ref_key: "triggerRef",
|
805
|
-
ref:
|
806
|
-
title:
|
807
|
-
class:
|
805
|
+
ref: g,
|
806
|
+
title: l.label,
|
807
|
+
class: F(r.value + " " + (l.width ? e(ye).getWidthClass(l.width) : "w-full"))
|
808
808
|
}, [
|
809
|
-
|
810
|
-
class:
|
811
|
-
},
|
812
|
-
|
813
|
-
(Array.isArray(
|
814
|
-
], 10,
|
815
|
-
|
809
|
+
a("span", {
|
810
|
+
class: F(["truncate text-ellipsis block", l.width ? e(ye).getWidthClass(l.width - 50) : "w-full"])
|
811
|
+
}, L(u.value), 3),
|
812
|
+
I(be, { class: "h-4 w-4" }),
|
813
|
+
(Array.isArray(l.currentValue) ? l.currentValue === null || l.currentValue.length > 0 : l.currentValue === null || l.currentValue) && l.layout === "inline" ? (p(), k("span", Yt)) : S("", !0)
|
814
|
+
], 10, Et),
|
815
|
+
_.value ? (p(), j(Oe, {
|
816
816
|
key: 0,
|
817
817
|
to: "body"
|
818
818
|
}, [
|
819
|
-
|
819
|
+
P(a("div", {
|
820
820
|
ref_key: "popperRef",
|
821
|
-
ref:
|
821
|
+
ref: b,
|
822
822
|
class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
|
823
|
-
style:
|
823
|
+
style: Ce({ top: `${s.value.top}px`, left: `${s.value.left}px` }),
|
824
824
|
"data-inside-popover": ""
|
825
825
|
}, [
|
826
|
-
|
827
|
-
|
828
|
-
ee(
|
826
|
+
a("div", Wt, [
|
827
|
+
a("div", qt, [
|
828
|
+
ee(l.$slots, "default")
|
829
829
|
])
|
830
830
|
])
|
831
831
|
], 4), [
|
832
|
-
[X,
|
832
|
+
[X, t.value]
|
833
833
|
])
|
834
834
|
])) : S("", !0)
|
835
835
|
]));
|
836
836
|
}
|
837
837
|
});
|
838
|
-
function
|
838
|
+
function Nt(i) {
|
839
839
|
return String(i).charAt(0).toUpperCase() + String(i).slice(1);
|
840
840
|
}
|
841
841
|
class N {
|
842
|
-
static format(
|
843
|
-
const d =
|
844
|
-
return `${d}-${
|
845
|
-
}
|
846
|
-
static getShiftedDay(
|
847
|
-
const
|
848
|
-
return
|
849
|
-
}
|
850
|
-
static getLastWeekRange(
|
851
|
-
if (
|
852
|
-
const
|
853
|
-
return
|
842
|
+
static format(o) {
|
843
|
+
const d = o.getFullYear(), r = (o.getMonth() + 1).toString().padStart(2, "0"), t = o.getDate().toString().padStart(2, "0");
|
844
|
+
return `${d}-${r}-${t}`;
|
845
|
+
}
|
846
|
+
static getShiftedDay(o, d = 0) {
|
847
|
+
const r = o ? new Date(o) : /* @__PURE__ */ new Date();
|
848
|
+
return r.setDate(r.getDate() + d), this.format(r);
|
849
|
+
}
|
850
|
+
static getLastWeekRange(o, d, r = 0) {
|
851
|
+
if (o && d) {
|
852
|
+
const w = new Date(o), m = new Date(d);
|
853
|
+
return w.setDate(w.getDate() + r * 7), m.setDate(m.getDate() + r * 7), [this.format(w), this.format(m)];
|
854
854
|
}
|
855
|
-
const
|
856
|
-
|
857
|
-
const
|
858
|
-
return
|
859
|
-
}
|
860
|
-
static getMonthRange(
|
861
|
-
let
|
862
|
-
|
863
|
-
const
|
864
|
-
return [this.format(
|
865
|
-
}
|
866
|
-
static getQuarterRange(
|
867
|
-
const
|
868
|
-
let
|
869
|
-
|
870
|
-
const
|
871
|
-
return [this.format(
|
872
|
-
}
|
873
|
-
static getYear(
|
874
|
-
let
|
875
|
-
return
|
876
|
-
}
|
877
|
-
static getYearRange(
|
878
|
-
let
|
879
|
-
return
|
880
|
-
this.format(new Date(
|
881
|
-
this.format(new Date(
|
855
|
+
const t = /* @__PURE__ */ new Date(), s = t.getDay(), v = s === 0 ? 13 : s - 1 + 7, g = new Date(t);
|
856
|
+
g.setDate(t.getDate() - v + r * 7);
|
857
|
+
const b = new Date(g);
|
858
|
+
return b.setDate(g.getDate() + 6), [this.format(g), this.format(b)];
|
859
|
+
}
|
860
|
+
static getMonthRange(o, d, r = 0) {
|
861
|
+
let t;
|
862
|
+
o ? t = new Date(o) : t = /* @__PURE__ */ new Date(), t = new Date(t.getFullYear(), t.getMonth() + r, 1);
|
863
|
+
const s = t, v = new Date(t.getFullYear(), t.getMonth() + 1, 0);
|
864
|
+
return [this.format(s), this.format(v)];
|
865
|
+
}
|
866
|
+
static getQuarterRange(o, d, r = 0) {
|
867
|
+
const t = o || d, s = t ? new Date(t) : /* @__PURE__ */ new Date();
|
868
|
+
let v = Math.floor(s.getMonth() / 3);
|
869
|
+
v += r;
|
870
|
+
const g = (v % 4 + 4) % 4 * 3, b = s.getFullYear() + Math.floor(v / 4), w = new Date(b, g, 1), m = new Date(b, g + 3, 0);
|
871
|
+
return [this.format(w), this.format(m)];
|
872
|
+
}
|
873
|
+
static getYear(o, d = 0) {
|
874
|
+
let r;
|
875
|
+
return o && /^\d{4}$/.test(o) ? r = parseInt(o, 10) : o ? r = new Date(o).getFullYear() : r = (/* @__PURE__ */ new Date()).getFullYear(), String(r + d);
|
876
|
+
}
|
877
|
+
static getYearRange(o, d = 0) {
|
878
|
+
let r;
|
879
|
+
return o && /^\d{4}$/.test(o) ? r = parseInt(o, 10) : o ? r = new Date(o).getFullYear() : r = (/* @__PURE__ */ new Date()).getFullYear(), [
|
880
|
+
this.format(new Date(r + d, 0, 1)),
|
881
|
+
this.format(new Date(r + d + 1, 0, 0))
|
882
882
|
];
|
883
883
|
}
|
884
|
-
static getRangeFromDaysBefore(
|
885
|
-
const d = /* @__PURE__ */ new Date(),
|
886
|
-
return
|
884
|
+
static getRangeFromDaysBefore(o) {
|
885
|
+
const d = /* @__PURE__ */ new Date(), r = new Date(d.getTime());
|
886
|
+
return r.setDate(d.getDate() - o), [this.format(r), this.format(d)];
|
887
887
|
}
|
888
888
|
}
|
889
|
-
function
|
889
|
+
function Ne(i, o) {
|
890
890
|
const {
|
891
891
|
popoverRef: d
|
892
|
-
} = i,
|
892
|
+
} = i, r = V(""), t = V(
|
893
893
|
i.modelValue ?? i.default ?? []
|
894
|
-
),
|
895
|
-
function
|
896
|
-
const
|
897
|
-
return
|
894
|
+
), s = V(0);
|
895
|
+
function v() {
|
896
|
+
const u = N.getRangeFromDaysBefore(s.value);
|
897
|
+
return t.value = [...u], o("change", { name: i.name, value: t.value }), o("update:modelValue", t.value), u;
|
898
898
|
}
|
899
|
-
function
|
899
|
+
function g(u) {
|
900
900
|
var x;
|
901
|
-
|
902
|
-
const
|
903
|
-
switch (
|
901
|
+
r.value = u, (x = d.value) == null || x.close();
|
902
|
+
const l = [];
|
903
|
+
switch (r.value) {
|
904
904
|
case "today":
|
905
|
-
|
905
|
+
l.push(N.getShiftedDay()), l.push(N.getShiftedDay());
|
906
906
|
break;
|
907
907
|
case "week":
|
908
|
-
|
908
|
+
l.push(...N.getLastWeekRange());
|
909
909
|
break;
|
910
910
|
case "month":
|
911
|
-
|
911
|
+
l.push(...N.getMonthRange());
|
912
912
|
break;
|
913
913
|
case "quarter":
|
914
|
-
|
914
|
+
l.push(...N.getQuarterRange());
|
915
915
|
break;
|
916
916
|
case "year":
|
917
|
-
|
917
|
+
l.push(...N.getYearRange());
|
918
918
|
break;
|
919
919
|
case "last_7_days":
|
920
|
-
|
920
|
+
s.value = 7, v();
|
921
921
|
break;
|
922
922
|
case "range":
|
923
|
-
|
923
|
+
s.value = 7, l.push(...v());
|
924
924
|
break;
|
925
925
|
}
|
926
|
-
|
926
|
+
t.value = [...l], o("change", { name: i.name, value: t.value }), o("update:modelValue", t.value);
|
927
927
|
}
|
928
|
-
function
|
929
|
-
const
|
930
|
-
switch (
|
928
|
+
function b() {
|
929
|
+
const u = [];
|
930
|
+
switch (r.value) {
|
931
931
|
case "today":
|
932
|
-
|
932
|
+
u.push(N.getShiftedDay(t.value[0], 1));
|
933
933
|
break;
|
934
934
|
case "week":
|
935
|
-
|
935
|
+
u.push(...N.getLastWeekRange(t.value[0], t.value[1], 1));
|
936
936
|
break;
|
937
937
|
case "month":
|
938
|
-
|
938
|
+
u.push(...N.getMonthRange(t.value[0], t.value[1], 1));
|
939
939
|
break;
|
940
940
|
case "quarter":
|
941
|
-
|
941
|
+
u.push(...N.getQuarterRange(t.value[0], t.value[1], 1));
|
942
942
|
break;
|
943
943
|
case "year":
|
944
|
-
|
944
|
+
u.push(...N.getYearRange(t.value[0], 1));
|
945
945
|
break;
|
946
946
|
}
|
947
|
-
|
947
|
+
t.value = [...u], o("change", { name: i.name, value: t.value }), o("update:modelValue", t.value);
|
948
948
|
}
|
949
|
-
function
|
950
|
-
const
|
951
|
-
switch (
|
949
|
+
function w() {
|
950
|
+
const u = [];
|
951
|
+
switch (r.value) {
|
952
952
|
case "today":
|
953
|
-
|
953
|
+
u.push(N.getShiftedDay(t.value[0], -1));
|
954
954
|
break;
|
955
955
|
case "week":
|
956
|
-
|
956
|
+
u.push(...N.getLastWeekRange(t.value[0], t.value[1], -1));
|
957
957
|
break;
|
958
958
|
case "month":
|
959
|
-
|
959
|
+
u.push(...N.getMonthRange(t.value[0], t.value[1], -1));
|
960
960
|
break;
|
961
961
|
case "quarter":
|
962
|
-
|
962
|
+
u.push(...N.getQuarterRange(t.value[0], t.value[1], -1));
|
963
963
|
break;
|
964
964
|
case "year":
|
965
|
-
|
965
|
+
u.push(...N.getYearRange(t.value[0], -1));
|
966
966
|
break;
|
967
967
|
}
|
968
|
-
|
968
|
+
t.value = [...u], o("change", { name: i.name, value: t.value }), o("update:modelValue", t.value);
|
969
969
|
}
|
970
|
-
const
|
970
|
+
const m = [
|
971
971
|
"Січень",
|
972
972
|
"Лютий",
|
973
973
|
"Березень",
|
@@ -981,74 +981,74 @@ function qe(i, r) {
|
|
981
981
|
"Листопад",
|
982
982
|
"Грудень"
|
983
983
|
];
|
984
|
-
function f(
|
985
|
-
const [
|
986
|
-
return `${
|
984
|
+
function f(u) {
|
985
|
+
const [l, x, h] = u.split("-");
|
986
|
+
return `${h}.${x}.${l}`;
|
987
987
|
}
|
988
|
-
function y(
|
989
|
-
const { value:
|
990
|
-
switch (
|
988
|
+
function y(u) {
|
989
|
+
const { value: l } = t;
|
990
|
+
switch (u) {
|
991
991
|
case "today":
|
992
|
-
return f(
|
992
|
+
return f(l[0]);
|
993
993
|
case "range":
|
994
994
|
return "Період";
|
995
995
|
case "week":
|
996
|
-
return
|
996
|
+
return l[0] && l[1] ? `${f(l[0])} – ${f(l[1])}` : "";
|
997
997
|
case "quarter":
|
998
|
-
if (
|
999
|
-
const x = new Date(
|
1000
|
-
return `${Math.floor(
|
998
|
+
if (l[0]) {
|
999
|
+
const x = new Date(l[0]), h = x.getFullYear(), n = x.getMonth();
|
1000
|
+
return `${Math.floor(n / 3) + 1} квартал ${h}`;
|
1001
1001
|
}
|
1002
1002
|
return "";
|
1003
1003
|
case "month":
|
1004
|
-
if (
|
1005
|
-
const [x,
|
1006
|
-
return `${
|
1004
|
+
if (l[0]) {
|
1005
|
+
const [x, h] = l[0].split("-");
|
1006
|
+
return `${m[parseInt(h, 10) - 1]} ${x}`;
|
1007
1007
|
}
|
1008
1008
|
return "";
|
1009
1009
|
case "year":
|
1010
|
-
return
|
1010
|
+
return l[0] || "";
|
1011
1011
|
case "last_7_days":
|
1012
1012
|
return "За останні дні";
|
1013
1013
|
default:
|
1014
1014
|
return i.label ?? "";
|
1015
1015
|
}
|
1016
1016
|
}
|
1017
|
-
const
|
1017
|
+
const _ = E(() => r.value ? y(r.value) : i.label ?? "");
|
1018
1018
|
function c() {
|
1019
|
-
|
1019
|
+
r.value = "", t.value = [], o("update:modelValue", []), o("clear", i.name);
|
1020
1020
|
}
|
1021
1021
|
return {
|
1022
|
-
activeMode:
|
1023
|
-
innerValue:
|
1024
|
-
daysBefore:
|
1025
|
-
onDaysBeforeChange:
|
1026
|
-
onSelectChange:
|
1027
|
-
nextClick:
|
1028
|
-
prevClick:
|
1029
|
-
ukMonths:
|
1022
|
+
activeMode: r,
|
1023
|
+
innerValue: t,
|
1024
|
+
daysBefore: s,
|
1025
|
+
onDaysBeforeChange: v,
|
1026
|
+
onSelectChange: g,
|
1027
|
+
nextClick: b,
|
1028
|
+
prevClick: w,
|
1029
|
+
ukMonths: m,
|
1030
1030
|
formatDisplayDate: f,
|
1031
1031
|
getModeLabel: y,
|
1032
|
-
currentLabel:
|
1032
|
+
currentLabel: _,
|
1033
1033
|
clear: c
|
1034
1034
|
};
|
1035
1035
|
}
|
1036
|
-
const
|
1036
|
+
const Gt = {
|
1037
1037
|
key: 0,
|
1038
1038
|
class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
|
1039
|
-
},
|
1039
|
+
}, Qt = {
|
1040
1040
|
key: 0,
|
1041
1041
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
1042
|
-
},
|
1042
|
+
}, Zt = ["max", "disabled"], Jt = ["min", "disabled"], Xt = {
|
1043
1043
|
key: 0,
|
1044
1044
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
1045
|
-
},
|
1045
|
+
}, el = ["max", "disabled"], tl = {
|
1046
1046
|
key: 0,
|
1047
1047
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
1048
|
-
},
|
1048
|
+
}, ll = {
|
1049
1049
|
key: 0,
|
1050
1050
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
1051
|
-
},
|
1051
|
+
}, al = ["min", "disabled"], ol = { class: "flex gap-1 pt-2" }, rl = ["onClick"], nl = /* @__PURE__ */ Y({
|
1052
1052
|
__name: "date-input",
|
1053
1053
|
props: {
|
1054
1054
|
id: {},
|
@@ -1074,231 +1074,231 @@ const Wt = {
|
|
1074
1074
|
sort: {}
|
1075
1075
|
},
|
1076
1076
|
emits: ["update:modelValue", "change", "clear"],
|
1077
|
-
setup(i, { expose:
|
1078
|
-
const
|
1079
|
-
activeMode:
|
1080
|
-
innerValue:
|
1081
|
-
onSelectChange:
|
1077
|
+
setup(i, { expose: o, emit: d }) {
|
1078
|
+
const r = i, t = We(), s = Kt(), v = d, g = V(null), {
|
1079
|
+
activeMode: b,
|
1080
|
+
innerValue: w,
|
1081
|
+
onSelectChange: m,
|
1082
1082
|
nextClick: f,
|
1083
1083
|
prevClick: y,
|
1084
|
-
clear:
|
1085
|
-
} =
|
1086
|
-
...
|
1087
|
-
popoverRef:
|
1088
|
-
},
|
1089
|
-
return
|
1090
|
-
c !== void 0 ? (
|
1091
|
-
}),
|
1092
|
-
clear:
|
1093
|
-
popoverRef:
|
1094
|
-
}), (c,
|
1095
|
-
c.layout === "inline" ? (p(),
|
1096
|
-
e(
|
1097
|
-
|
1084
|
+
clear: _
|
1085
|
+
} = Ne({
|
1086
|
+
...r,
|
1087
|
+
popoverRef: g
|
1088
|
+
}, v);
|
1089
|
+
return R(() => r.modelValue, (c) => {
|
1090
|
+
c !== void 0 ? (w.value = c, v("update:modelValue", c)) : (b.value = "", w.value = []);
|
1091
|
+
}), o({
|
1092
|
+
clear: _,
|
1093
|
+
popoverRef: g
|
1094
|
+
}), (c, u) => (p(), k(K, null, [
|
1095
|
+
c.layout === "inline" ? (p(), k("div", Gt, [
|
1096
|
+
e(b) !== "" && e(b) === "range" ? (p(), k("div", Qt, [
|
1097
|
+
P(a("input", {
|
1098
1098
|
type: "date",
|
1099
|
-
max: e(
|
1099
|
+
max: e(w)[1],
|
1100
1100
|
locale: "uk-UA",
|
1101
|
-
"onUpdate:modelValue":
|
1101
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => e(w)[0] = l),
|
1102
1102
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
|
1103
1103
|
disabled: c.disabled
|
1104
|
-
}, null, 8,
|
1105
|
-
[te, e(
|
1104
|
+
}, null, 8, Zt), [
|
1105
|
+
[te, e(w)[0]]
|
1106
1106
|
]),
|
1107
|
-
|
1107
|
+
P(a("input", {
|
1108
1108
|
type: "date",
|
1109
|
-
min: e(
|
1109
|
+
min: e(w)[0],
|
1110
1110
|
locale: "uk-UA",
|
1111
|
-
"onUpdate:modelValue":
|
1111
|
+
"onUpdate:modelValue": u[1] || (u[1] = (l) => e(w)[1] = l),
|
1112
1112
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
|
1113
1113
|
disabled: c.disabled
|
1114
|
-
}, null, 8,
|
1115
|
-
[te, e(
|
1114
|
+
}, null, 8, Jt), [
|
1115
|
+
[te, e(w)[1]]
|
1116
1116
|
])
|
1117
1117
|
])) : S("", !0)
|
1118
1118
|
])) : S("", !0),
|
1119
|
-
|
1120
|
-
class:
|
1119
|
+
a("div", {
|
1120
|
+
class: F(c.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
|
1121
1121
|
}, [
|
1122
|
-
|
1123
|
-
class:
|
1122
|
+
a("div", {
|
1123
|
+
class: F(c.layout !== "popover" ? "w-[48%]" : "")
|
1124
1124
|
}, [
|
1125
|
-
c.layout === "popover" ? (p(),
|
1126
|
-
|
1125
|
+
c.layout === "popover" ? (p(), k("label", Xt, "Від")) : S("", !0),
|
1126
|
+
P(a("input", {
|
1127
1127
|
type: "date",
|
1128
|
-
max: e(
|
1128
|
+
max: e(w)[1],
|
1129
1129
|
locale: "uk-UA",
|
1130
|
-
"onUpdate:modelValue":
|
1131
|
-
class:
|
1130
|
+
"onUpdate:modelValue": u[2] || (u[2] = (l) => e(w)[0] = l),
|
1131
|
+
class: F(e(t)),
|
1132
1132
|
disabled: c.disabled
|
1133
|
-
}, null, 10,
|
1134
|
-
[te, e(
|
1133
|
+
}, null, 10, el), [
|
1134
|
+
[te, e(w)[0]]
|
1135
1135
|
])
|
1136
1136
|
], 2),
|
1137
|
-
c.layout !== "popover" ? (p(),
|
1138
|
-
|
1139
|
-
class:
|
1137
|
+
c.layout !== "popover" ? (p(), k("label", tl, " - ")) : S("", !0),
|
1138
|
+
a("div", {
|
1139
|
+
class: F(c.layout !== "popover" ? "w-[48%]" : "")
|
1140
1140
|
}, [
|
1141
|
-
c.layout === "popover" ? (p(),
|
1142
|
-
|
1141
|
+
c.layout === "popover" ? (p(), k("label", ll, "До")) : S("", !0),
|
1142
|
+
P(a("input", {
|
1143
1143
|
type: "date",
|
1144
|
-
min: e(
|
1144
|
+
min: e(w)[0],
|
1145
1145
|
locale: "uk-UA",
|
1146
|
-
"onUpdate:modelValue":
|
1147
|
-
class:
|
1146
|
+
"onUpdate:modelValue": u[3] || (u[3] = (l) => e(w)[1] = l),
|
1147
|
+
class: F(e(t)),
|
1148
1148
|
disabled: c.disabled
|
1149
|
-
}, null, 10,
|
1150
|
-
[te, e(
|
1149
|
+
}, null, 10, al), [
|
1150
|
+
[te, e(w)[1]]
|
1151
1151
|
])
|
1152
1152
|
], 2)
|
1153
1153
|
], 2),
|
1154
|
-
|
1155
|
-
(p(),
|
1156
|
-
key:
|
1157
|
-
class:
|
1158
|
-
onClick: (x) => e(
|
1159
|
-
},
|
1160
|
-
|
1161
|
-
class:
|
1162
|
-
onClick:
|
1163
|
-
(...
|
1154
|
+
a("div", ol, [
|
1155
|
+
(p(), k(K, null, q(["today", "week", "month", "quarter", "year"], (l) => a("button", {
|
1156
|
+
key: l,
|
1157
|
+
class: F(e(s) + (e(b) === l ? " bg-blue-100" : "")),
|
1158
|
+
onClick: (x) => e(m)(l)
|
1159
|
+
}, L(e(Nt)(l)), 11, rl)), 64)),
|
1160
|
+
a("button", {
|
1161
|
+
class: F(e(s)),
|
1162
|
+
onClick: u[4] || (u[4] = //@ts-ignore
|
1163
|
+
(...l) => e(y) && e(y)(...l))
|
1164
1164
|
}, " <", 2),
|
1165
|
-
|
1166
|
-
class:
|
1167
|
-
onClick:
|
1168
|
-
(...
|
1165
|
+
a("button", {
|
1166
|
+
class: F(e(s)),
|
1167
|
+
onClick: u[5] || (u[5] = //@ts-ignore
|
1168
|
+
(...l) => e(f) && e(f)(...l))
|
1169
1169
|
}, " >", 2)
|
1170
1170
|
]),
|
1171
1171
|
(c.cleanable, S("", !0))
|
1172
1172
|
], 64));
|
1173
1173
|
}
|
1174
1174
|
});
|
1175
|
-
function
|
1175
|
+
function il(i, o) {
|
1176
1176
|
const {
|
1177
1177
|
api: d,
|
1178
|
-
options:
|
1179
|
-
limit:
|
1180
|
-
dataKey:
|
1181
|
-
} = i,
|
1182
|
-
function
|
1183
|
-
return
|
1184
|
-
}
|
1185
|
-
const
|
1186
|
-
function
|
1187
|
-
const O =
|
1188
|
-
return { autoValueKey:
|
1189
|
-
}
|
1190
|
-
if (
|
1191
|
-
const
|
1192
|
-
y.value =
|
1193
|
-
}
|
1194
|
-
const
|
1178
|
+
options: r = [],
|
1179
|
+
limit: t = 20,
|
1180
|
+
dataKey: s = "data"
|
1181
|
+
} = i, v = i.multi;
|
1182
|
+
function g(B) {
|
1183
|
+
return v ? Array.isArray(B) ? B : B ? [B] : [] : Array.isArray(B) ? B[0] : B;
|
1184
|
+
}
|
1185
|
+
const b = V(g(i.modelValue)), w = V(""), m = V(!1), f = V([]), y = V("id"), _ = V("text"), c = V(!1), u = V(i.layout !== "popover" && r.length > t), l = V([]), x = V(0);
|
1186
|
+
function h(B) {
|
1187
|
+
const O = B.find(Boolean) ?? {}, Q = ["id", "value", "code", "key"].find((ae) => ae in O) ?? "id", ie = ["text", "label", "name", "title"].find((ae) => ae in O) ?? "text";
|
1188
|
+
return { autoValueKey: Q, autoLabelKey: ie };
|
1189
|
+
}
|
1190
|
+
if (r.length > 0) {
|
1191
|
+
const B = h(r);
|
1192
|
+
y.value = B.autoValueKey, _.value = B.autoLabelKey;
|
1193
|
+
}
|
1194
|
+
const n = E(() => {
|
1195
1195
|
if (d) return f.value;
|
1196
|
-
const
|
1197
|
-
if (i.layout === "popover") return
|
1198
|
-
if (!
|
1199
|
-
return c.value ?
|
1200
|
-
const O =
|
1201
|
-
return
|
1196
|
+
const B = f.value;
|
1197
|
+
if (i.layout === "popover") return B;
|
1198
|
+
if (!w.value)
|
1199
|
+
return c.value ? B : B.slice(0, t);
|
1200
|
+
const O = w.value.toLowerCase();
|
1201
|
+
return B.filter((Q) => Q[_.value].toLowerCase().includes(O));
|
1202
1202
|
});
|
1203
|
-
let
|
1204
|
-
async function B
|
1203
|
+
let C = null;
|
1204
|
+
async function M(B) {
|
1205
1205
|
if (d) {
|
1206
|
-
|
1206
|
+
m.value = !0;
|
1207
1207
|
try {
|
1208
1208
|
const O = new URL(d, window.location.origin);
|
1209
|
-
O.searchParams.set("json", "1"), O.searchParams.set("key",
|
1210
|
-
const
|
1211
|
-
if (!
|
1212
|
-
throw new Error(`HTTP error! status: ${
|
1213
|
-
const ie = await
|
1214
|
-
if (f.value = ie[
|
1215
|
-
const ae =
|
1216
|
-
y.value = ae.autoValueKey,
|
1209
|
+
O.searchParams.set("json", "1"), O.searchParams.set("key", B), O.searchParams.set("limit", t.toString());
|
1210
|
+
const Q = await fetch(O.toString());
|
1211
|
+
if (!Q.ok)
|
1212
|
+
throw new Error(`HTTP error! status: ${Q.status}`);
|
1213
|
+
const ie = await Q.json();
|
1214
|
+
if (f.value = ie[s], f.value.length > 0) {
|
1215
|
+
const ae = h(f.value);
|
1216
|
+
y.value = ae.autoValueKey, _.value = ae.autoLabelKey;
|
1217
1217
|
}
|
1218
1218
|
x.value = ie.total;
|
1219
1219
|
} catch (O) {
|
1220
1220
|
console.error("Failed to fetch remote options:", O);
|
1221
1221
|
} finally {
|
1222
|
-
|
1222
|
+
m.value = !1;
|
1223
1223
|
}
|
1224
1224
|
}
|
1225
1225
|
}
|
1226
|
-
|
1227
|
-
d && (
|
1228
|
-
B
|
1226
|
+
R(w, (B) => {
|
1227
|
+
d && (C && clearTimeout(C), C = setTimeout(() => {
|
1228
|
+
M(B);
|
1229
1229
|
}, 200));
|
1230
|
-
}),
|
1231
|
-
|
1232
|
-
}, { immediate: !0 }), d ?
|
1233
|
-
function
|
1234
|
-
return
|
1235
|
-
}
|
1236
|
-
function
|
1237
|
-
if (
|
1238
|
-
const O =
|
1239
|
-
|
1230
|
+
}), R(() => i.modelValue, (B) => {
|
1231
|
+
b.value = g(B);
|
1232
|
+
}, { immediate: !0 }), d ? M("") : f.value = r;
|
1233
|
+
function $(B) {
|
1234
|
+
return v && Array.isArray(b.value) ? b.value.includes(B[y.value]) : b.value && b.value === B[y.value];
|
1235
|
+
}
|
1236
|
+
function A(B) {
|
1237
|
+
if (v && !Array.isArray(b.value) && (b.value = []), v && Array.isArray(b.value)) {
|
1238
|
+
const O = b.value.includes(B[y.value]);
|
1239
|
+
b.value = O ? b.value.filter((Q) => Q !== B[y.value]) : [...b.value, B[y.value]], l.value = O ? l.value.filter((Q) => Q !== B[_.value]) : [...l.value, B[_.value]];
|
1240
1240
|
} else
|
1241
|
-
|
1242
|
-
|
1241
|
+
b.value = B[y.value], l.value = B[_.value];
|
1242
|
+
o("update:modelValue", b.value), o("change", { name: i.name, value: b.value });
|
1243
1243
|
}
|
1244
1244
|
function T() {
|
1245
|
-
|
1245
|
+
v ? (b.value = [], l.value = []) : (b.value = void 0, l.value = []), o("update:modelValue", b.value), o("clear", i.name);
|
1246
1246
|
}
|
1247
1247
|
function U() {
|
1248
|
-
|
1248
|
+
C && clearTimeout(C), w.value = "", c.value = !1;
|
1249
1249
|
}
|
1250
1250
|
function de() {
|
1251
1251
|
c.value = !c.value;
|
1252
1252
|
}
|
1253
1253
|
he(() => {
|
1254
|
-
|
1254
|
+
C && clearTimeout(C);
|
1255
1255
|
});
|
1256
1256
|
const J = V(-1);
|
1257
|
-
|
1258
|
-
J.value =
|
1257
|
+
R(n, () => {
|
1258
|
+
J.value = n.value.length > 0 ? 0 : -1;
|
1259
1259
|
});
|
1260
|
-
function H(
|
1261
|
-
const O =
|
1262
|
-
if (
|
1263
|
-
|
1264
|
-
else if (
|
1265
|
-
|
1266
|
-
else if (
|
1267
|
-
const
|
1268
|
-
|
1260
|
+
function H(B) {
|
1261
|
+
const O = n.value.length;
|
1262
|
+
if (B.key === "ArrowDown")
|
1263
|
+
B.preventDefault(), J.value = (J.value + 1) % O;
|
1264
|
+
else if (B.key === "ArrowUp")
|
1265
|
+
B.preventDefault(), J.value = (J.value - 1 + O) % O;
|
1266
|
+
else if (B.key === "Enter" && (B.preventDefault(), J.value >= 0 && J.value < n.value.length)) {
|
1267
|
+
const Q = n.value[J.value];
|
1268
|
+
A(Q);
|
1269
1269
|
}
|
1270
1270
|
}
|
1271
1271
|
return {
|
1272
|
-
innerValue:
|
1273
|
-
searchTerm:
|
1274
|
-
filteredOptions:
|
1275
|
-
isSelected:
|
1276
|
-
selectItem:
|
1272
|
+
innerValue: b,
|
1273
|
+
searchTerm: w,
|
1274
|
+
filteredOptions: n,
|
1275
|
+
isSelected: $,
|
1276
|
+
selectItem: A,
|
1277
1277
|
clear: T,
|
1278
1278
|
resetSearch: U,
|
1279
1279
|
toggleShowAll: de,
|
1280
|
-
isReqProc:
|
1280
|
+
isReqProc: m,
|
1281
1281
|
showAll: c,
|
1282
|
-
isEnableShowAll:
|
1283
|
-
labelKey:
|
1282
|
+
isEnableShowAll: u,
|
1283
|
+
labelKey: _,
|
1284
1284
|
valueKey: y,
|
1285
1285
|
allOptions: f,
|
1286
1286
|
highlightedIndex: J,
|
1287
1287
|
onKeyDown: H,
|
1288
|
-
selectedLabels:
|
1288
|
+
selectedLabels: l,
|
1289
1289
|
totalCount: x
|
1290
1290
|
};
|
1291
1291
|
}
|
1292
|
-
const
|
1292
|
+
const sl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, ul = {
|
1293
1293
|
key: 0,
|
1294
1294
|
class: "w-full"
|
1295
|
-
},
|
1295
|
+
}, dl = { class: "flex flex-col items-center justify-center p-5 text-center" }, cl = {
|
1296
1296
|
key: 0,
|
1297
1297
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
1298
|
-
},
|
1298
|
+
}, pl = {
|
1299
1299
|
key: 1,
|
1300
1300
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
1301
|
-
},
|
1301
|
+
}, fl = /* @__PURE__ */ Y({
|
1302
1302
|
__name: "select",
|
1303
1303
|
props: {
|
1304
1304
|
id: {},
|
@@ -1324,155 +1324,155 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
1324
1324
|
sort: {}
|
1325
1325
|
},
|
1326
1326
|
emits: ["update:modelValue", "change", "clear"],
|
1327
|
-
setup(i, { expose:
|
1328
|
-
const
|
1329
|
-
innerValue:
|
1330
|
-
filteredOptions:
|
1331
|
-
isSelected:
|
1332
|
-
selectItem:
|
1333
|
-
clear:
|
1327
|
+
setup(i, { expose: o, emit: d }) {
|
1328
|
+
const r = i, t = d, s = V(null), {
|
1329
|
+
innerValue: v,
|
1330
|
+
filteredOptions: g,
|
1331
|
+
isSelected: b,
|
1332
|
+
selectItem: w,
|
1333
|
+
clear: m,
|
1334
1334
|
resetSearch: f,
|
1335
1335
|
toggleShowAll: y,
|
1336
|
-
isReqProc:
|
1336
|
+
isReqProc: _,
|
1337
1337
|
showAll: c,
|
1338
|
-
isEnableShowAll:
|
1339
|
-
searchTerm:
|
1338
|
+
isEnableShowAll: u,
|
1339
|
+
searchTerm: l,
|
1340
1340
|
labelKey: x,
|
1341
|
-
valueKey:
|
1342
|
-
highlightedIndex:
|
1343
|
-
onKeyDown:
|
1344
|
-
selectedLabels:
|
1345
|
-
totalCount:
|
1346
|
-
} =
|
1347
|
-
...
|
1348
|
-
modelValue:
|
1349
|
-
},
|
1341
|
+
valueKey: h,
|
1342
|
+
highlightedIndex: n,
|
1343
|
+
onKeyDown: C,
|
1344
|
+
selectedLabels: M,
|
1345
|
+
totalCount: $
|
1346
|
+
} = il({
|
1347
|
+
...r,
|
1348
|
+
modelValue: r.modelValue
|
1349
|
+
}, t);
|
1350
1350
|
ue(() => {
|
1351
1351
|
f();
|
1352
|
-
}),
|
1353
|
-
() =>
|
1352
|
+
}), R(
|
1353
|
+
() => r.modelValue,
|
1354
1354
|
(T) => {
|
1355
|
-
T === void 0 && (
|
1355
|
+
T === void 0 && (r.multi ? v.value = [] : v.value = void 0);
|
1356
1356
|
}
|
1357
1357
|
);
|
1358
|
-
const
|
1359
|
-
return
|
1358
|
+
const A = V([]);
|
1359
|
+
return R(n, (T) => {
|
1360
1360
|
var U;
|
1361
|
-
T >= 0 &&
|
1361
|
+
T >= 0 && A.value[T] && ((U = A.value[T]) == null || U.scrollIntoView({
|
1362
1362
|
block: "nearest",
|
1363
1363
|
behavior: "smooth"
|
1364
1364
|
}));
|
1365
|
-
}),
|
1366
|
-
|
1367
|
-
}),
|
1368
|
-
clear:
|
1369
|
-
inputTextRef:
|
1370
|
-
selectedLabels:
|
1365
|
+
}), R(g, () => {
|
1366
|
+
A.value = [];
|
1367
|
+
}), o({
|
1368
|
+
clear: m,
|
1369
|
+
inputTextRef: s,
|
1370
|
+
selectedLabels: M
|
1371
1371
|
}), (T, U) => {
|
1372
1372
|
var de, J;
|
1373
|
-
return p(),
|
1374
|
-
class:
|
1373
|
+
return p(), k("div", {
|
1374
|
+
class: F([T.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
1375
1375
|
}, [
|
1376
|
-
|
1377
|
-
|
1378
|
-
"onUpdate:modelValue": U[0] || (U[0] = (H) =>
|
1376
|
+
a("div", sl, [
|
1377
|
+
P(a("input", {
|
1378
|
+
"onUpdate:modelValue": U[0] || (U[0] = (H) => Je(l) ? l.value = H : null),
|
1379
1379
|
onKeydown: U[1] || (U[1] = //@ts-ignore
|
1380
|
-
(...H) => e(
|
1380
|
+
(...H) => e(C) && e(C)(...H)),
|
1381
1381
|
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",
|
1382
1382
|
placeholder: "Пошук",
|
1383
1383
|
type: "text",
|
1384
1384
|
ref_key: "inputTextRef",
|
1385
|
-
ref:
|
1385
|
+
ref: s
|
1386
1386
|
}, null, 544), [
|
1387
|
-
[te, e(
|
1387
|
+
[te, e(l)]
|
1388
1388
|
]),
|
1389
|
-
|
1390
|
-
|
1391
|
-
onClick: U[2] || (U[2] = (H) =>
|
1389
|
+
I(Ee, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
|
1390
|
+
I(Ye, {
|
1391
|
+
onClick: U[2] || (U[2] = (H) => l.value = ""),
|
1392
1392
|
class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
|
1393
1393
|
})
|
1394
1394
|
]),
|
1395
|
-
|
1396
|
-
class:
|
1395
|
+
a("div", {
|
1396
|
+
class: F([
|
1397
1397
|
T.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
1398
1398
|
T.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
1399
1399
|
])
|
1400
1400
|
}, [
|
1401
|
-
(p(!0),
|
1401
|
+
(p(!0), k(K, null, q(e(g), (H, B) => (p(), j(_e, {
|
1402
1402
|
layout: T.layout,
|
1403
1403
|
count: H.count,
|
1404
1404
|
label: H[e(x)],
|
1405
1405
|
color: H.color,
|
1406
1406
|
type: T.multi ? "checkbox" : "radio",
|
1407
|
-
value: H[e(
|
1408
|
-
"is-selected": e(
|
1409
|
-
highlighted:
|
1410
|
-
onItemClick: (O) => e(
|
1407
|
+
value: H[e(h)],
|
1408
|
+
"is-selected": e(b)(H),
|
1409
|
+
highlighted: B === e(n),
|
1410
|
+
onItemClick: (O) => e(w)(H),
|
1411
1411
|
ref_for: !0,
|
1412
|
-
ref: (O) =>
|
1412
|
+
ref: (O) => A.value[B] = O == null ? void 0 : O.el
|
1413
1413
|
}, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
|
1414
1414
|
], 2),
|
1415
|
-
T.type === "select" && e(
|
1416
|
-
|
1417
|
-
|
1418
|
-
U[7] || (U[7] =
|
1419
|
-
|
1420
|
-
|
1415
|
+
T.type === "select" && e(g).length === 0 && !e(_) ? (p(), k("div", ul, [
|
1416
|
+
a("div", dl, [
|
1417
|
+
I(Ve),
|
1418
|
+
U[7] || (U[7] = a("div", { class: "max-w-sm mx-auto mt-6" }, [
|
1419
|
+
a("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
1420
|
+
a("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
1421
1421
|
], -1))
|
1422
1422
|
])
|
1423
1423
|
])) : S("", !0),
|
1424
|
-
T.layout !== "popover" && T.type !== "select" ? (p(),
|
1425
|
-
!e(c) && e(
|
1424
|
+
T.layout !== "popover" && T.type !== "select" ? (p(), k(K, { key: 1 }, [
|
1425
|
+
!e(c) && e(u) ? (p(), k("div", {
|
1426
1426
|
key: 0,
|
1427
1427
|
onClick: U[3] || (U[3] = //@ts-ignore
|
1428
1428
|
(...H) => e(y) && e(y)(...H)),
|
1429
1429
|
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"
|
1430
1430
|
}, [
|
1431
1431
|
U[8] || (U[8] = W(" Показати більше ", -1)),
|
1432
|
-
|
1432
|
+
I(be)
|
1433
1433
|
])) : S("", !0),
|
1434
|
-
e(c) ? (p(),
|
1434
|
+
e(c) ? (p(), k("div", {
|
1435
1435
|
key: 1,
|
1436
1436
|
onClick: U[4] || (U[4] = //@ts-ignore
|
1437
1437
|
(...H) => e(y) && e(y)(...H)),
|
1438
1438
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
1439
1439
|
}, [
|
1440
1440
|
U[9] || (U[9] = W(" Показати менше ", -1)),
|
1441
|
-
|
1441
|
+
I(Se)
|
1442
1442
|
])) : S("", !0)
|
1443
1443
|
], 64)) : S("", !0),
|
1444
|
-
T.cleanable ? (p(),
|
1445
|
-
T.layout === "inline" ? (p(),
|
1446
|
-
W(
|
1447
|
-
|
1444
|
+
T.cleanable ? (p(), k(K, { key: 2 }, [
|
1445
|
+
T.layout === "inline" ? (p(), k("div", cl, [
|
1446
|
+
W(L(T.multi && Array.isArray(e(v)) ? (de = e(v)) == null ? void 0 : de.length : e(v) !== void 0 && (e(v) || e(v) === null) ? 1 : 0) + " з " + L(e($)) + " обрано ", 1),
|
1447
|
+
P(a("button", {
|
1448
1448
|
class: "text-gray-600 hover:text-gray-800",
|
1449
1449
|
onClick: U[5] || (U[5] = //@ts-ignore
|
1450
|
-
(...H) => e(
|
1450
|
+
(...H) => e(m) && e(m)(...H))
|
1451
1451
|
}, " Очистити ", 512), [
|
1452
|
-
[X, e(
|
1452
|
+
[X, e(v) !== "" && e(v) !== void 0 || e(v)]
|
1453
1453
|
])
|
1454
1454
|
])) : S("", !0),
|
1455
|
-
T.layout === "popover" ? (p(),
|
1456
|
-
|
1457
|
-
|
1455
|
+
T.layout === "popover" ? (p(), k("div", pl, [
|
1456
|
+
a("span", null, L(T.multi && Array.isArray(e(v)) ? (J = e(v)) == null ? void 0 : J.length : e(v) !== void 0 && (e(v) || e(v) === null) ? 1 : 0) + " з " + L(e($)) + " обрано", 1),
|
1457
|
+
P(a("button", {
|
1458
1458
|
class: "text-gray-600 hover:text-gray-800",
|
1459
1459
|
onClick: U[6] || (U[6] = //@ts-ignore
|
1460
|
-
(...H) => e(
|
1460
|
+
(...H) => e(m) && e(m)(...H))
|
1461
1461
|
}, " Очистити ", 512), [
|
1462
|
-
[X, e(
|
1462
|
+
[X, e(v) !== "" && e(v) !== void 0 || e(v)]
|
1463
1463
|
])
|
1464
1464
|
])) : S("", !0)
|
1465
1465
|
], 64)) : S("", !0)
|
1466
1466
|
], 2);
|
1467
1467
|
};
|
1468
1468
|
}
|
1469
|
-
}),
|
1469
|
+
}), vl = ["for", "onClick"], ml = ["id", "name", "value"], gl = { class: "block" }, hl = {
|
1470
1470
|
key: 0,
|
1471
1471
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
1472
|
-
},
|
1472
|
+
}, bl = {
|
1473
1473
|
key: 1,
|
1474
1474
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
1475
|
-
},
|
1475
|
+
}, yl = /* @__PURE__ */ Y({
|
1476
1476
|
__name: "tag-field",
|
1477
1477
|
props: {
|
1478
1478
|
id: {},
|
@@ -1498,77 +1498,77 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
1498
1498
|
sort: {}
|
1499
1499
|
},
|
1500
1500
|
emits: ["update:modelValue", "change", "clear"],
|
1501
|
-
setup(i, { expose:
|
1502
|
-
const
|
1503
|
-
innerValue:
|
1504
|
-
isSelected:
|
1505
|
-
selectItem:
|
1506
|
-
clear:
|
1507
|
-
labelKey:
|
1508
|
-
valueKey:
|
1501
|
+
setup(i, { expose: o, emit: d }) {
|
1502
|
+
const r = i, t = d, {
|
1503
|
+
innerValue: s,
|
1504
|
+
isSelected: v,
|
1505
|
+
selectItem: g,
|
1506
|
+
clear: b,
|
1507
|
+
labelKey: w,
|
1508
|
+
valueKey: m,
|
1509
1509
|
allOptions: f
|
1510
|
-
} =
|
1511
|
-
...
|
1512
|
-
modelValue:
|
1513
|
-
},
|
1514
|
-
...
|
1515
|
-
modelValue:
|
1516
|
-
},
|
1517
|
-
return
|
1518
|
-
clear:
|
1519
|
-
}),
|
1520
|
-
() =>
|
1510
|
+
} = r.multi ? He({
|
1511
|
+
...r,
|
1512
|
+
modelValue: r.modelValue ?? r.default ?? []
|
1513
|
+
}, t) : Te({
|
1514
|
+
...r,
|
1515
|
+
modelValue: r.modelValue !== void 0 ? r.modelValue : r.default ?? ""
|
1516
|
+
}, t);
|
1517
|
+
return o({
|
1518
|
+
clear: b
|
1519
|
+
}), R(
|
1520
|
+
() => r.modelValue,
|
1521
1521
|
(y) => {
|
1522
|
-
y === void 0 && (
|
1522
|
+
y === void 0 && (r.multi ? s.value = [] : s.value = void 0);
|
1523
1523
|
}
|
1524
|
-
), (y,
|
1525
|
-
var c,
|
1526
|
-
return p(),
|
1527
|
-
|
1528
|
-
class:
|
1524
|
+
), (y, _) => {
|
1525
|
+
var c, u;
|
1526
|
+
return p(), k(K, null, [
|
1527
|
+
a("div", {
|
1528
|
+
class: F(["grid grid-cols-3 gap-2 mx-[1px]", y.layout === "popover" ? "m-1" : "mb-1"])
|
1529
1529
|
}, [
|
1530
|
-
(p(!0),
|
1531
|
-
key: `item-${
|
1532
|
-
for: `item-${
|
1533
|
-
onClick:
|
1534
|
-
class:
|
1530
|
+
(p(!0), k(K, null, q(e(f), (l) => (p(), k("label", {
|
1531
|
+
key: `item-${l[e(m)]}`,
|
1532
|
+
for: `item-${l[e(m)]}`,
|
1533
|
+
onClick: Ie((x) => e(g)(l), ["stop", "prevent"]),
|
1534
|
+
class: F([e(v)(l) ? "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%)]"])
|
1535
1535
|
}, [
|
1536
|
-
|
1536
|
+
a("input", {
|
1537
1537
|
type: "checkbox",
|
1538
|
-
id: `item-${
|
1538
|
+
id: `item-${l[e(m)]}`,
|
1539
1539
|
class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
|
1540
|
-
name: `item-${
|
1541
|
-
value:
|
1542
|
-
}, null, 8,
|
1543
|
-
|
1544
|
-
], 10,
|
1540
|
+
name: `item-${l[e(m)]}`,
|
1541
|
+
value: l[e(m)]
|
1542
|
+
}, null, 8, ml),
|
1543
|
+
a("span", gl, L(l[e(w)]), 1)
|
1544
|
+
], 10, vl))), 128))
|
1545
1545
|
], 2),
|
1546
|
-
y.cleanable ? (p(),
|
1547
|
-
y.layout === "inline" ? (p(),
|
1548
|
-
W(
|
1549
|
-
|
1546
|
+
y.cleanable ? (p(), k(K, { key: 0 }, [
|
1547
|
+
y.layout === "inline" ? (p(), k("div", hl, [
|
1548
|
+
W(L(y.multi && Array.isArray(e(s)) ? (c = e(s)) == null ? void 0 : c.length : e(s) !== void 0 && (e(s) || e(s) === null) ? 1 : 0) + " з " + L(e(f).length) + " обрано ", 1),
|
1549
|
+
P(a("button", {
|
1550
1550
|
class: "text-gray-600 hover:text-gray-800",
|
1551
|
-
onClick:
|
1552
|
-
(...
|
1551
|
+
onClick: _[0] || (_[0] = //@ts-ignore
|
1552
|
+
(...l) => e(b) && e(b)(...l))
|
1553
1553
|
}, " Очистити ", 512), [
|
1554
|
-
[X, e(
|
1554
|
+
[X, e(s) !== "" && e(s) !== void 0 || e(s)]
|
1555
1555
|
])
|
1556
1556
|
])) : S("", !0),
|
1557
|
-
y.layout === "popover" ? (p(),
|
1558
|
-
|
1559
|
-
|
1557
|
+
y.layout === "popover" ? (p(), k("div", bl, [
|
1558
|
+
a("span", null, L(y.multi && Array.isArray(e(s)) ? (u = e(s)) == null ? void 0 : u.length : e(s) !== void 0 && (e(s) || e(s) === null) ? 1 : 0) + " з " + L(e(f).length) + " обрано", 1),
|
1559
|
+
P(a("button", {
|
1560
1560
|
class: "text-gray-600 hover:text-gray-800",
|
1561
|
-
onClick:
|
1562
|
-
(...
|
1561
|
+
onClick: _[1] || (_[1] = //@ts-ignore
|
1562
|
+
(...l) => e(b) && e(b)(...l))
|
1563
1563
|
}, " Очистити ", 512), [
|
1564
|
-
[X, e(
|
1564
|
+
[X, e(s) !== void 0 && e(s) !== "" || e(s)]
|
1565
1565
|
])
|
1566
1566
|
])) : S("", !0)
|
1567
1567
|
], 64)) : S("", !0)
|
1568
1568
|
], 64);
|
1569
1569
|
};
|
1570
1570
|
}
|
1571
|
-
}),
|
1571
|
+
}), xl = {}, wl = {
|
1572
1572
|
xmlns: "http://www.w3.org/2000/svg",
|
1573
1573
|
width: "24",
|
1574
1574
|
height: "24",
|
@@ -1580,12 +1580,12 @@ const rl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
1580
1580
|
"stroke-linejoin": "round",
|
1581
1581
|
class: "text-blue-600 w-[16px] h-[16px]"
|
1582
1582
|
};
|
1583
|
-
function
|
1584
|
-
return p(),
|
1585
|
-
|
1583
|
+
function kl(i, o) {
|
1584
|
+
return p(), k("svg", wl, o[0] || (o[0] = [
|
1585
|
+
a("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
1586
1586
|
]));
|
1587
1587
|
}
|
1588
|
-
const se = /* @__PURE__ */ le(
|
1588
|
+
const se = /* @__PURE__ */ le(xl, [["render", kl]]), Cl = {}, _l = {
|
1589
1589
|
xmlns: "http://www.w3.org/2000/svg",
|
1590
1590
|
width: "15px",
|
1591
1591
|
height: "24",
|
@@ -1597,17 +1597,17 @@ const se = /* @__PURE__ */ le(hl, [["render", yl]]), xl = {}, wl = {
|
|
1597
1597
|
"stroke-linejoin": "round",
|
1598
1598
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
|
1599
1599
|
};
|
1600
|
-
function
|
1601
|
-
return p(),
|
1602
|
-
|
1600
|
+
function Vl(i, o) {
|
1601
|
+
return p(), k("svg", _l, o[0] || (o[0] = [
|
1602
|
+
a("path", {
|
1603
1603
|
stroke: "none",
|
1604
1604
|
d: "M0 0h24v24H0z",
|
1605
1605
|
fill: "none"
|
1606
1606
|
}, null, -1),
|
1607
|
-
|
1607
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
1608
1608
|
]));
|
1609
1609
|
}
|
1610
|
-
const
|
1610
|
+
const Sl = /* @__PURE__ */ le(Cl, [["render", Vl]]), Ml = {}, Bl = {
|
1611
1611
|
xmlns: "http://www.w3.org/2000/svg",
|
1612
1612
|
width: "15px",
|
1613
1613
|
height: "24",
|
@@ -1619,20 +1619,20 @@ const _l = /* @__PURE__ */ le(xl, [["render", kl]]), Cl = {}, Vl = {
|
|
1619
1619
|
"stroke-linejoin": "round",
|
1620
1620
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
|
1621
1621
|
};
|
1622
|
-
function
|
1623
|
-
return p(),
|
1624
|
-
|
1622
|
+
function $l(i, o) {
|
1623
|
+
return p(), k("svg", Bl, o[0] || (o[0] = [
|
1624
|
+
a("path", {
|
1625
1625
|
stroke: "none",
|
1626
1626
|
d: "M0 0h24v24H0z",
|
1627
1627
|
fill: "none"
|
1628
1628
|
}, null, -1),
|
1629
|
-
|
1629
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
1630
1630
|
]));
|
1631
1631
|
}
|
1632
|
-
const
|
1632
|
+
const Al = /* @__PURE__ */ le(Ml, [["render", $l]]), Rl = { class: "flex" }, Dl = { class: "mb-1" }, zl = { class: "mb-1" }, jl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Fl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Kl = {
|
1633
1633
|
key: 1,
|
1634
1634
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
1635
|
-
},
|
1635
|
+
}, Ll = ["max", "disabled"], Ul = ["min", "disabled"], Ol = /* @__PURE__ */ Y({
|
1636
1636
|
__name: "date-input-inline",
|
1637
1637
|
props: {
|
1638
1638
|
id: {},
|
@@ -1658,175 +1658,175 @@ const Ml = /* @__PURE__ */ le(Cl, [["render", Sl]]), Bl = { class: "flex" }, $l
|
|
1658
1658
|
sort: {}
|
1659
1659
|
},
|
1660
1660
|
emits: ["update:modelValue", "change", "clear"],
|
1661
|
-
setup(i, { expose:
|
1662
|
-
const
|
1663
|
-
activeMode:
|
1664
|
-
innerValue:
|
1665
|
-
onSelectChange:
|
1666
|
-
nextClick:
|
1667
|
-
prevClick:
|
1661
|
+
setup(i, { expose: o, emit: d }) {
|
1662
|
+
const r = i, t = d, s = V(null), {
|
1663
|
+
activeMode: v,
|
1664
|
+
innerValue: g,
|
1665
|
+
onSelectChange: b,
|
1666
|
+
nextClick: w,
|
1667
|
+
prevClick: m,
|
1668
1668
|
currentLabel: f,
|
1669
1669
|
clear: y
|
1670
|
-
} =
|
1671
|
-
...
|
1672
|
-
popoverRef:
|
1673
|
-
},
|
1674
|
-
return
|
1675
|
-
|
1676
|
-
}),
|
1670
|
+
} = Ne({
|
1671
|
+
...r,
|
1672
|
+
popoverRef: s
|
1673
|
+
}, t);
|
1674
|
+
return R(() => r.modelValue, (_) => {
|
1675
|
+
_ !== void 0 ? (g.value = _, t("update:modelValue", _)) : (v.value = "", g.value = []);
|
1676
|
+
}), o({
|
1677
1677
|
clear: y,
|
1678
|
-
popoverRef:
|
1679
|
-
}), (
|
1680
|
-
|
1681
|
-
|
1678
|
+
popoverRef: s
|
1679
|
+
}), (_, c) => (p(), k(K, null, [
|
1680
|
+
a("div", Rl, [
|
1681
|
+
I(Me, {
|
1682
1682
|
ref_key: "popoverRef",
|
1683
|
-
ref:
|
1683
|
+
ref: s,
|
1684
1684
|
label: e(f),
|
1685
|
-
"current-value": e(
|
1686
|
-
mode:
|
1685
|
+
"current-value": e(g),
|
1686
|
+
mode: _.mode,
|
1687
1687
|
onClear: e(y),
|
1688
|
-
layout:
|
1688
|
+
layout: _.layout
|
1689
1689
|
}, {
|
1690
1690
|
default: re(() => [
|
1691
|
-
|
1692
|
-
|
1691
|
+
a("div", null, [
|
1692
|
+
a("button", {
|
1693
1693
|
type: "button",
|
1694
|
-
onClick: c[0] || (c[0] = (
|
1694
|
+
onClick: c[0] || (c[0] = (u) => e(b)("range")),
|
1695
1695
|
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"
|
1696
1696
|
}, [
|
1697
1697
|
c[12] || (c[12] = W(" Період ", -1)),
|
1698
|
-
e(
|
1698
|
+
e(v) === "range" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1699
1699
|
])
|
1700
1700
|
]),
|
1701
|
-
c[19] || (c[19] =
|
1702
|
-
|
1701
|
+
c[19] || (c[19] = a("div", null, [
|
1702
|
+
a("div", { class: "pt-1 mt-1 border-t" })
|
1703
1703
|
], -1)),
|
1704
|
-
|
1705
|
-
|
1704
|
+
a("div", null, [
|
1705
|
+
a("button", {
|
1706
1706
|
type: "button",
|
1707
|
-
onClick: c[1] || (c[1] = (
|
1707
|
+
onClick: c[1] || (c[1] = (u) => e(b)("today")),
|
1708
1708
|
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"
|
1709
1709
|
}, [
|
1710
1710
|
c[13] || (c[13] = W(" Сьогодні ", -1)),
|
1711
|
-
e(
|
1711
|
+
e(v) === "today" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1712
1712
|
])
|
1713
1713
|
]),
|
1714
|
-
|
1715
|
-
|
1714
|
+
a("div", null, [
|
1715
|
+
a("button", {
|
1716
1716
|
type: "button",
|
1717
|
-
onClick: c[2] || (c[2] = (
|
1717
|
+
onClick: c[2] || (c[2] = (u) => e(b)("week")),
|
1718
1718
|
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"
|
1719
1719
|
}, [
|
1720
1720
|
c[14] || (c[14] = W(" Тиждень ", -1)),
|
1721
|
-
e(
|
1721
|
+
e(v) === "week" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1722
1722
|
])
|
1723
1723
|
]),
|
1724
|
-
|
1725
|
-
|
1724
|
+
a("div", null, [
|
1725
|
+
a("button", {
|
1726
1726
|
type: "button",
|
1727
|
-
onClick: c[3] || (c[3] = (
|
1727
|
+
onClick: c[3] || (c[3] = (u) => e(b)("month")),
|
1728
1728
|
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"
|
1729
1729
|
}, [
|
1730
1730
|
c[15] || (c[15] = W(" Місяць ", -1)),
|
1731
|
-
e(
|
1731
|
+
e(v) === "month" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1732
1732
|
])
|
1733
1733
|
]),
|
1734
|
-
|
1735
|
-
|
1734
|
+
a("div", null, [
|
1735
|
+
a("button", {
|
1736
1736
|
type: "button",
|
1737
|
-
onClick: c[4] || (c[4] = (
|
1737
|
+
onClick: c[4] || (c[4] = (u) => e(b)("quarter")),
|
1738
1738
|
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"
|
1739
1739
|
}, [
|
1740
1740
|
c[16] || (c[16] = W(" Квартал ", -1)),
|
1741
|
-
e(
|
1741
|
+
e(v) === "quarter" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1742
1742
|
])
|
1743
1743
|
]),
|
1744
|
-
|
1745
|
-
|
1744
|
+
a("div", Dl, [
|
1745
|
+
a("button", {
|
1746
1746
|
type: "button",
|
1747
|
-
onClick: c[5] || (c[5] = (
|
1747
|
+
onClick: c[5] || (c[5] = (u) => e(b)("year")),
|
1748
1748
|
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"
|
1749
1749
|
}, [
|
1750
1750
|
c[17] || (c[17] = W(" Рік ", -1)),
|
1751
|
-
e(
|
1751
|
+
e(v) === "year" ? (p(), j(se, { key: 0 })) : S("", !0)
|
1752
1752
|
])
|
1753
1753
|
]),
|
1754
|
-
|
1755
|
-
|
1754
|
+
a("div", zl, [
|
1755
|
+
a("button", {
|
1756
1756
|
type: "button",
|
1757
|
-
onClick: c[6] || (c[6] = (
|
1757
|
+
onClick: c[6] || (c[6] = (u) => e(y)()),
|
1758
1758
|
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"
|
1759
1759
|
}, [
|
1760
1760
|
c[18] || (c[18] = W(" Весь час ", -1)),
|
1761
|
-
e(
|
1761
|
+
e(g)[0] ? S("", !0) : (p(), j(se, { key: 0 }))
|
1762
1762
|
])
|
1763
1763
|
])
|
1764
1764
|
]),
|
1765
1765
|
_: 1,
|
1766
1766
|
__: [19]
|
1767
1767
|
}, 8, ["label", "current-value", "mode", "onClear", "layout"]),
|
1768
|
-
e(
|
1769
|
-
|
1770
|
-
|
1768
|
+
e(v) !== "" && e(v) !== "range" && e(v) !== "last_7_days" ? (p(), k(K, { key: 0 }, [
|
1769
|
+
a("div", jl, [
|
1770
|
+
a("button", {
|
1771
1771
|
type: "button",
|
1772
1772
|
title: "Попередній період",
|
1773
1773
|
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",
|
1774
1774
|
onClick: c[7] || (c[7] = //@ts-ignore
|
1775
|
-
(...
|
1775
|
+
(...u) => e(m) && e(m)(...u))
|
1776
1776
|
}, [
|
1777
|
-
|
1777
|
+
I(Sl)
|
1778
1778
|
])
|
1779
1779
|
]),
|
1780
|
-
|
1781
|
-
|
1780
|
+
a("div", Fl, [
|
1781
|
+
a("button", {
|
1782
1782
|
type: "button",
|
1783
1783
|
title: "Наступний період",
|
1784
1784
|
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",
|
1785
1785
|
onClick: c[8] || (c[8] = //@ts-ignore
|
1786
|
-
(...
|
1786
|
+
(...u) => e(w) && e(w)(...u))
|
1787
1787
|
}, [
|
1788
|
-
|
1788
|
+
I(Al)
|
1789
1789
|
])
|
1790
1790
|
])
|
1791
1791
|
], 64)) : S("", !0),
|
1792
|
-
e(
|
1793
|
-
|
1792
|
+
e(v) !== "" && e(v) === "range" ? (p(), k("div", Kl, [
|
1793
|
+
P(a("input", {
|
1794
1794
|
type: "date",
|
1795
|
-
max: e(
|
1795
|
+
max: e(g)[1],
|
1796
1796
|
locale: "uk-UA",
|
1797
|
-
"onUpdate:modelValue": c[9] || (c[9] = (
|
1797
|
+
"onUpdate:modelValue": c[9] || (c[9] = (u) => e(g)[0] = u),
|
1798
1798
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
|
1799
|
-
disabled:
|
1800
|
-
}, null, 8,
|
1801
|
-
[te, e(
|
1799
|
+
disabled: _.disabled
|
1800
|
+
}, null, 8, Ll), [
|
1801
|
+
[te, e(g)[0]]
|
1802
1802
|
]),
|
1803
|
-
|
1803
|
+
P(a("input", {
|
1804
1804
|
type: "date",
|
1805
|
-
min: e(
|
1805
|
+
min: e(g)[0],
|
1806
1806
|
locale: "uk-UA",
|
1807
|
-
"onUpdate:modelValue": c[10] || (c[10] = (
|
1807
|
+
"onUpdate:modelValue": c[10] || (c[10] = (u) => e(g)[1] = u),
|
1808
1808
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
|
1809
|
-
disabled:
|
1810
|
-
}, null, 8,
|
1811
|
-
[te, e(
|
1809
|
+
disabled: _.disabled
|
1810
|
+
}, null, 8, Ul), [
|
1811
|
+
[te, e(g)[1]]
|
1812
1812
|
])
|
1813
1813
|
])) : S("", !0)
|
1814
1814
|
]),
|
1815
|
-
(
|
1815
|
+
(_.cleanable, S("", !0))
|
1816
1816
|
], 64));
|
1817
1817
|
}
|
1818
|
-
}),
|
1819
|
-
radio:
|
1820
|
-
checkbox:
|
1821
|
-
check:
|
1822
|
-
text:
|
1823
|
-
range:
|
1824
|
-
date:
|
1825
|
-
select:
|
1826
|
-
tag:
|
1827
|
-
"date:inline":
|
1818
|
+
}), Fe = {
|
1819
|
+
radio: wt,
|
1820
|
+
checkbox: je,
|
1821
|
+
check: je,
|
1822
|
+
text: jt,
|
1823
|
+
range: Ht,
|
1824
|
+
date: nl,
|
1825
|
+
select: fl,
|
1826
|
+
tag: yl,
|
1827
|
+
"date:inline": Ol
|
1828
1828
|
};
|
1829
|
-
function Be(i,
|
1829
|
+
function Be(i, o) {
|
1830
1830
|
let d;
|
1831
1831
|
switch (i.toLowerCase()) {
|
1832
1832
|
case "autocomplete":
|
@@ -1838,12 +1838,12 @@ function Be(i, r) {
|
|
1838
1838
|
default:
|
1839
1839
|
d = i == null ? void 0 : i.toString().toLowerCase();
|
1840
1840
|
}
|
1841
|
-
return d === "date" &&
|
1842
|
-
component:
|
1841
|
+
return d === "date" && o && o === "inline" && (d = "date:inline"), {
|
1842
|
+
component: Fe[d] || Fe.text,
|
1843
1843
|
type: d
|
1844
1844
|
};
|
1845
1845
|
}
|
1846
|
-
const
|
1846
|
+
const Il = {}, Pl = {
|
1847
1847
|
xmlns: "http://www.w3.org/2000/svg",
|
1848
1848
|
width: "15px",
|
1849
1849
|
height: "24",
|
@@ -1855,18 +1855,18 @@ const Ll = {}, Ul = {
|
|
1855
1855
|
"stroke-linejoin": "round",
|
1856
1856
|
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"
|
1857
1857
|
};
|
1858
|
-
function
|
1859
|
-
return p(),
|
1860
|
-
|
1858
|
+
function Tl(i, o) {
|
1859
|
+
return p(), k("svg", Pl, o[0] || (o[0] = [
|
1860
|
+
a("path", {
|
1861
1861
|
stroke: "none",
|
1862
1862
|
d: "M0 0h24v24H0z",
|
1863
1863
|
fill: "none"
|
1864
1864
|
}, null, -1),
|
1865
|
-
|
1866
|
-
|
1865
|
+
a("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),
|
1866
|
+
a("path", { d: "M20 4v5h-5" }, null, -1)
|
1867
1867
|
]));
|
1868
1868
|
}
|
1869
|
-
const
|
1869
|
+
const Hl = /* @__PURE__ */ le(Il, [["render", Tl]]), El = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Yl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, Wl = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, ql = { class: "flex items-center" }, Nl = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, Gl = { class: "filter-layout__body" }, Ql = /* @__PURE__ */ Y({
|
1870
1870
|
__name: "vertical-layout",
|
1871
1871
|
props: {
|
1872
1872
|
id: {},
|
@@ -1892,73 +1892,73 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
1892
1892
|
sort: {}
|
1893
1893
|
},
|
1894
1894
|
emits: ["update:modelValue", "change", "clear"],
|
1895
|
-
setup(i, { expose:
|
1896
|
-
const
|
1897
|
-
get: () =>
|
1898
|
-
set: (f) =>
|
1895
|
+
setup(i, { expose: o, emit: d }) {
|
1896
|
+
const r = i, t = d, s = V(), v = Be(r.type, r.layout), g = E({
|
1897
|
+
get: () => r.modelValue,
|
1898
|
+
set: (f) => t("update:modelValue", f)
|
1899
1899
|
});
|
1900
|
-
function
|
1901
|
-
|
1900
|
+
function b(f) {
|
1901
|
+
t("clear", f);
|
1902
1902
|
}
|
1903
|
-
function
|
1904
|
-
|
1903
|
+
function w(f, y) {
|
1904
|
+
t("change", { name: f, value: y }), r.modelValue !== void 0 && t("update:modelValue", y);
|
1905
1905
|
}
|
1906
|
-
function
|
1907
|
-
|
1906
|
+
function m() {
|
1907
|
+
s.value && s.value.clear(), t("clear", r.name);
|
1908
1908
|
}
|
1909
|
-
return
|
1910
|
-
() =>
|
1909
|
+
return R(
|
1910
|
+
() => r.default,
|
1911
1911
|
(f) => {
|
1912
|
-
|
1912
|
+
g.value = f;
|
1913
1913
|
}
|
1914
|
-
),
|
1915
|
-
() =>
|
1914
|
+
), R(
|
1915
|
+
() => r.modelValue,
|
1916
1916
|
(f) => {
|
1917
|
-
|
1917
|
+
g.value = f;
|
1918
1918
|
}
|
1919
|
-
),
|
1920
|
-
filterRef:
|
1919
|
+
), o({
|
1920
|
+
filterRef: s
|
1921
1921
|
}), (f, y) => {
|
1922
|
-
var
|
1923
|
-
return p(),
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1922
|
+
var _, c, u;
|
1923
|
+
return p(), k("div", El, [
|
1924
|
+
a("div", Yl, [
|
1925
|
+
a("div", Wl, [
|
1926
|
+
a("div", ql, [
|
1927
|
+
a("span", Nl, L(f.label), 1)
|
1928
1928
|
]),
|
1929
|
-
typeof
|
1929
|
+
typeof g.value == "string" && g.value.trim() !== "" || Array.isArray(g.value) && g.value.length > 0 && g.value.some((l) => l !== void 0) || g.value === null ? (p(), j(Hl, {
|
1930
1930
|
key: 0,
|
1931
|
-
onClick:
|
1931
|
+
onClick: m
|
1932
1932
|
})) : S("", !0)
|
1933
1933
|
]),
|
1934
|
-
|
1935
|
-
((
|
1936
|
-
type: (
|
1937
|
-
onChange: y[0] || (y[0] = (
|
1938
|
-
onClear: y[1] || (y[1] = (
|
1934
|
+
a("div", Gl, [
|
1935
|
+
((_ = e(v)) == null ? void 0 : _.type) !== "select" ? (p(), j(oe((c = e(v)) == null ? void 0 : c.component), Z({ key: 0 }, r, {
|
1936
|
+
type: (u = e(v)) == null ? void 0 : u.type,
|
1937
|
+
onChange: y[0] || (y[0] = (l) => w(l.name, l.value)),
|
1938
|
+
onClear: y[1] || (y[1] = (l) => b(l)),
|
1939
1939
|
ref_key: "filterRef",
|
1940
|
-
ref:
|
1941
|
-
}), null, 16, ["type"])) : (p(),
|
1940
|
+
ref: s
|
1941
|
+
}), null, 16, ["type"])) : (p(), j(Me, {
|
1942
1942
|
key: 1,
|
1943
|
-
"current-value":
|
1943
|
+
"current-value": g.value,
|
1944
1944
|
label: f.label,
|
1945
1945
|
mode: f.mode,
|
1946
|
-
onClear:
|
1947
|
-
fieldRef:
|
1946
|
+
onClear: m,
|
1947
|
+
fieldRef: s.value,
|
1948
1948
|
width: void 0,
|
1949
1949
|
disabled: f.disabled,
|
1950
1950
|
layout: "vertical"
|
1951
1951
|
}, {
|
1952
1952
|
default: re(() => {
|
1953
|
-
var
|
1953
|
+
var l, x;
|
1954
1954
|
return [
|
1955
|
-
(p(),
|
1955
|
+
(p(), j(oe((l = e(v)) == null ? void 0 : l.component), Z({
|
1956
1956
|
ref_key: "filterRef",
|
1957
|
-
ref:
|
1958
|
-
},
|
1959
|
-
type: (x = e(
|
1960
|
-
onChange: y[2] || (y[2] = (
|
1961
|
-
onClear: y[3] || (y[3] = (
|
1957
|
+
ref: s
|
1958
|
+
}, r, {
|
1959
|
+
type: (x = e(v)) == null ? void 0 : x.type,
|
1960
|
+
onChange: y[2] || (y[2] = (h) => w(h.name, h.value)),
|
1961
|
+
onClear: y[3] || (y[3] = (h) => b(h))
|
1962
1962
|
}), null, 16, ["type"]))
|
1963
1963
|
];
|
1964
1964
|
}),
|
@@ -1969,7 +1969,7 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
1969
1969
|
]);
|
1970
1970
|
};
|
1971
1971
|
}
|
1972
|
-
}),
|
1972
|
+
}), Ke = /* @__PURE__ */ Y({
|
1973
1973
|
__name: "inline-layout",
|
1974
1974
|
props: {
|
1975
1975
|
id: {},
|
@@ -1995,61 +1995,61 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
1995
1995
|
sort: {}
|
1996
1996
|
},
|
1997
1997
|
emits: ["update:modelValue", "change", "clear"],
|
1998
|
-
setup(i, { expose:
|
1999
|
-
const
|
2000
|
-
get: () =>
|
2001
|
-
set: (
|
1998
|
+
setup(i, { expose: o, emit: d }) {
|
1999
|
+
const r = i, t = d, s = V(), v = Be(r.type, r.layout), g = E({
|
2000
|
+
get: () => r.modelValue,
|
2001
|
+
set: (m) => t("update:modelValue", m)
|
2002
2002
|
});
|
2003
|
-
function
|
2004
|
-
|
2003
|
+
function b(m = r.name) {
|
2004
|
+
t("clear", m);
|
2005
2005
|
}
|
2006
|
-
function
|
2007
|
-
|
2006
|
+
function w(m, f) {
|
2007
|
+
t("change", { name: m, value: f }), r.modelValue !== void 0 && t("update:modelValue", f);
|
2008
2008
|
}
|
2009
|
-
return
|
2010
|
-
() =>
|
2011
|
-
(
|
2012
|
-
|
2009
|
+
return R(
|
2010
|
+
() => r.default,
|
2011
|
+
(m) => {
|
2012
|
+
g.value = m;
|
2013
2013
|
}
|
2014
|
-
),
|
2015
|
-
() =>
|
2016
|
-
(
|
2017
|
-
|
2014
|
+
), R(
|
2015
|
+
() => r.modelValue,
|
2016
|
+
(m) => {
|
2017
|
+
g.value = m;
|
2018
2018
|
}
|
2019
|
-
),
|
2020
|
-
filterRef:
|
2021
|
-
}), (
|
2022
|
-
var y,
|
2023
|
-
return ["text", "date"].includes(
|
2024
|
-
type: (
|
2025
|
-
onChange: f[0] || (f[0] = (c) =>
|
2026
|
-
onClear: f[1] || (f[1] = (c) =>
|
2027
|
-
disabled:
|
2028
|
-
modelValue:
|
2029
|
-
"onUpdate:modelValue": f[2] || (f[2] = (c) =>
|
2030
|
-
}), null, 16, ["type", "disabled", "modelValue"])) : (p(),
|
2019
|
+
), o({
|
2020
|
+
filterRef: s
|
2021
|
+
}), (m, f) => {
|
2022
|
+
var y, _;
|
2023
|
+
return ["text", "date"].includes(m.type.toLocaleLowerCase()) ? (p(), j(oe((y = e(v)) == null ? void 0 : y.component), Z({ key: 0 }, r, {
|
2024
|
+
type: (_ = e(v)) == null ? void 0 : _.type,
|
2025
|
+
onChange: f[0] || (f[0] = (c) => w(c.name, c.value)),
|
2026
|
+
onClear: f[1] || (f[1] = (c) => b(c)),
|
2027
|
+
disabled: m.disabled,
|
2028
|
+
modelValue: g.value,
|
2029
|
+
"onUpdate:modelValue": f[2] || (f[2] = (c) => g.value = c)
|
2030
|
+
}), null, 16, ["type", "disabled", "modelValue"])) : (p(), j(Me, {
|
2031
2031
|
key: 1,
|
2032
|
-
"current-value":
|
2033
|
-
label:
|
2034
|
-
mode:
|
2035
|
-
onClear:
|
2036
|
-
fieldRef:
|
2037
|
-
width:
|
2038
|
-
disabled:
|
2032
|
+
"current-value": g.value,
|
2033
|
+
label: m.label,
|
2034
|
+
mode: m.mode,
|
2035
|
+
onClear: b,
|
2036
|
+
fieldRef: s.value,
|
2037
|
+
width: r.width,
|
2038
|
+
disabled: m.disabled,
|
2039
2039
|
layout: "inline"
|
2040
2040
|
}, {
|
2041
2041
|
default: re(() => {
|
2042
|
-
var c,
|
2042
|
+
var c, u;
|
2043
2043
|
return [
|
2044
|
-
(p(),
|
2044
|
+
(p(), j(oe((c = e(v)) == null ? void 0 : c.component), Z({
|
2045
2045
|
ref_key: "filterRef",
|
2046
|
-
ref:
|
2047
|
-
},
|
2048
|
-
modelValue:
|
2049
|
-
"onUpdate:modelValue": f[3] || (f[3] = (
|
2050
|
-
type: (
|
2051
|
-
onChange: f[4] || (f[4] = (
|
2052
|
-
onClear: f[5] || (f[5] = (
|
2046
|
+
ref: s
|
2047
|
+
}, r, {
|
2048
|
+
modelValue: g.value,
|
2049
|
+
"onUpdate:modelValue": f[3] || (f[3] = (l) => g.value = l),
|
2050
|
+
type: (u = e(v)) == null ? void 0 : u.type,
|
2051
|
+
onChange: f[4] || (f[4] = (l) => w(l.name, l.value)),
|
2052
|
+
onClear: f[5] || (f[5] = (l) => b(l))
|
2053
2053
|
}), null, 16, ["modelValue", "type"]))
|
2054
2054
|
];
|
2055
2055
|
}),
|
@@ -2057,7 +2057,7 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
2057
2057
|
}, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
|
2058
2058
|
};
|
2059
2059
|
}
|
2060
|
-
}),
|
2060
|
+
}), Zl = /* @__PURE__ */ Y({
|
2061
2061
|
__name: "popover-layout",
|
2062
2062
|
props: {
|
2063
2063
|
id: {},
|
@@ -2083,44 +2083,44 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
2083
2083
|
sort: {}
|
2084
2084
|
},
|
2085
2085
|
emits: ["update:modelValue", "change", "clear"],
|
2086
|
-
setup(i, { expose:
|
2087
|
-
const
|
2088
|
-
get: () =>
|
2089
|
-
set: (
|
2086
|
+
setup(i, { expose: o, emit: d }) {
|
2087
|
+
const r = i, t = d, s = V(), v = V(Be(r.type, r.layout)), g = E({
|
2088
|
+
get: () => r.modelValue,
|
2089
|
+
set: (m) => t("update:modelValue", m)
|
2090
2090
|
});
|
2091
|
-
function
|
2092
|
-
|
2091
|
+
function b(m) {
|
2092
|
+
t("clear", m);
|
2093
2093
|
}
|
2094
|
-
function
|
2095
|
-
|
2094
|
+
function w(m, f) {
|
2095
|
+
t("change", { name: m, value: f }), r.modelValue !== void 0 && t("update:modelValue", f);
|
2096
2096
|
}
|
2097
|
-
return
|
2098
|
-
() =>
|
2099
|
-
(
|
2100
|
-
|
2097
|
+
return R(
|
2098
|
+
() => r.default,
|
2099
|
+
(m) => {
|
2100
|
+
g.value = m;
|
2101
2101
|
}
|
2102
|
-
),
|
2103
|
-
() =>
|
2104
|
-
(
|
2105
|
-
|
2102
|
+
), R(
|
2103
|
+
() => r.modelValue,
|
2104
|
+
(m) => {
|
2105
|
+
g.value = m;
|
2106
2106
|
}
|
2107
|
-
),
|
2108
|
-
() =>
|
2109
|
-
(
|
2110
|
-
|
2107
|
+
), R(
|
2108
|
+
() => r,
|
2109
|
+
(m) => {
|
2110
|
+
g.value = m;
|
2111
2111
|
}
|
2112
|
-
),
|
2113
|
-
filterRef:
|
2114
|
-
}), (
|
2115
|
-
var y,
|
2116
|
-
return p(),
|
2117
|
-
type: (
|
2118
|
-
modelValue:
|
2119
|
-
"onUpdate:modelValue": f[0] || (f[0] = (c) =>
|
2120
|
-
onChange: f[1] || (f[1] = (c) =>
|
2121
|
-
onClear: f[2] || (f[2] = (c) =>
|
2112
|
+
), o({
|
2113
|
+
filterRef: s
|
2114
|
+
}), (m, f) => {
|
2115
|
+
var y, _;
|
2116
|
+
return p(), j(oe((y = v.value) == null ? void 0 : y.component), Z(r, {
|
2117
|
+
type: (_ = v.value) == null ? void 0 : _.type,
|
2118
|
+
modelValue: g.value,
|
2119
|
+
"onUpdate:modelValue": f[0] || (f[0] = (c) => g.value = c),
|
2120
|
+
onChange: f[1] || (f[1] = (c) => w(c.name, c.value)),
|
2121
|
+
onClear: f[2] || (f[2] = (c) => b(c)),
|
2122
2122
|
ref_key: "filterRef",
|
2123
|
-
ref:
|
2123
|
+
ref: s
|
2124
2124
|
}), null, 16, ["type", "modelValue"]);
|
2125
2125
|
};
|
2126
2126
|
}
|
@@ -2150,199 +2150,199 @@ const Pl = /* @__PURE__ */ le(Ll, [["render", Ol]]), Il = { style: { display: "i
|
|
2150
2150
|
sort: { default: "name" }
|
2151
2151
|
},
|
2152
2152
|
emits: ["update:modelValue", "change", "clear"],
|
2153
|
-
setup(i, { expose:
|
2154
|
-
const
|
2155
|
-
get: () =>
|
2156
|
-
set: (
|
2153
|
+
setup(i, { expose: o, emit: d }) {
|
2154
|
+
const r = i, t = d, s = V(), v = E({
|
2155
|
+
get: () => r.modelValue,
|
2156
|
+
set: (m) => t("update:modelValue", m)
|
2157
2157
|
});
|
2158
|
-
function
|
2159
|
-
|
2158
|
+
function g(m) {
|
2159
|
+
t("clear", m);
|
2160
2160
|
}
|
2161
|
-
function
|
2162
|
-
|
2161
|
+
function b(m, f) {
|
2162
|
+
t("change", { name: m, value: f }), r.modelValue !== void 0 && t("update:modelValue", f);
|
2163
2163
|
}
|
2164
|
-
|
2165
|
-
() =>
|
2166
|
-
(
|
2167
|
-
|
2164
|
+
R(
|
2165
|
+
() => r.default,
|
2166
|
+
(m) => {
|
2167
|
+
v.value = m;
|
2168
2168
|
}
|
2169
|
-
),
|
2170
|
-
() =>
|
2171
|
-
(
|
2172
|
-
|
2169
|
+
), R(
|
2170
|
+
() => r.modelValue,
|
2171
|
+
(m) => {
|
2172
|
+
v.value = m;
|
2173
2173
|
}
|
2174
|
-
),
|
2175
|
-
filterRef:
|
2174
|
+
), o({
|
2175
|
+
filterRef: s
|
2176
2176
|
});
|
2177
|
-
function
|
2178
|
-
switch (
|
2177
|
+
function w() {
|
2178
|
+
switch (r.layout) {
|
2179
2179
|
case "inline":
|
2180
|
-
return
|
2180
|
+
return Ke;
|
2181
2181
|
case "vertical":
|
2182
|
-
return
|
2182
|
+
return Ql;
|
2183
2183
|
case "popover":
|
2184
|
-
return
|
2184
|
+
return Zl;
|
2185
2185
|
default:
|
2186
|
-
return
|
2186
|
+
return Ke;
|
2187
2187
|
}
|
2188
2188
|
}
|
2189
|
-
return (
|
2190
|
-
onChange: f[0] || (f[0] = (y) =>
|
2191
|
-
onClear: f[1] || (f[1] = (y) =>
|
2192
|
-
modelValue:
|
2193
|
-
"onUpdate:modelValue": f[2] || (f[2] = (y) =>
|
2189
|
+
return (m, f) => (p(), j(oe(w()), Z(r, {
|
2190
|
+
onChange: f[0] || (f[0] = (y) => b(y.name, y.value)),
|
2191
|
+
onClear: f[1] || (f[1] = (y) => g(y)),
|
2192
|
+
modelValue: v.value,
|
2193
|
+
"onUpdate:modelValue": f[2] || (f[2] = (y) => v.value = y)
|
2194
2194
|
}), null, 16, ["modelValue"]));
|
2195
2195
|
}
|
2196
2196
|
});
|
2197
|
-
function $e(i,
|
2197
|
+
function $e(i, o) {
|
2198
2198
|
const {
|
2199
2199
|
slots: d
|
2200
|
-
} = i,
|
2201
|
-
var
|
2202
|
-
return (fe((
|
2200
|
+
} = i, r = V(i.value ?? {}), t = E(() => {
|
2201
|
+
var h;
|
2202
|
+
return (fe((h = d == null ? void 0 : d.default) == null ? void 0 : h.call(d)) ?? []).flatMap((n) => Array.isArray(n.children) ? n.children : [n]);
|
2203
2203
|
});
|
2204
|
-
function
|
2205
|
-
delete
|
2206
|
-
data: fe(
|
2207
|
-
name:
|
2204
|
+
function s(h) {
|
2205
|
+
delete r.value[h], o("clear", {
|
2206
|
+
data: fe(r.value),
|
2207
|
+
name: h
|
2208
2208
|
});
|
2209
2209
|
}
|
2210
|
-
function
|
2211
|
-
|
2212
|
-
...
|
2213
|
-
[
|
2214
|
-
},
|
2215
|
-
data: fe(
|
2216
|
-
name:
|
2217
|
-
value:
|
2210
|
+
function v(h, n) {
|
2211
|
+
n === void 0 ? s(h) : r.value = {
|
2212
|
+
...r.value,
|
2213
|
+
[h]: n
|
2214
|
+
}, o("change", {
|
2215
|
+
data: fe(r.value),
|
2216
|
+
name: h,
|
2217
|
+
value: n
|
2218
2218
|
});
|
2219
2219
|
}
|
2220
|
-
const
|
2221
|
-
var
|
2222
|
-
const
|
2223
|
-
return
|
2224
|
-
...
|
2220
|
+
const g = E(() => t.value.map((h) => {
|
2221
|
+
var C;
|
2222
|
+
const n = (C = h.props) == null ? void 0 : C.name;
|
2223
|
+
return Ze(h, {
|
2224
|
+
...h.props,
|
2225
2225
|
layout: i.view,
|
2226
2226
|
showClean: !0,
|
2227
|
-
modelValue:
|
2228
|
-
"onUpdate:modelValue": (
|
2229
|
-
|
2227
|
+
modelValue: r[n],
|
2228
|
+
"onUpdate:modelValue": (M) => {
|
2229
|
+
v(n, M);
|
2230
2230
|
},
|
2231
|
-
onClear: () => n
|
2231
|
+
onClear: () => s(n)
|
2232
2232
|
});
|
2233
|
-
})),
|
2233
|
+
})), b = E(
|
2234
2234
|
() => new Map(
|
2235
|
-
|
2236
|
-
var
|
2237
|
-
const
|
2238
|
-
return
|
2239
|
-
}).filter((
|
2235
|
+
g.value.map((h) => {
|
2236
|
+
var C;
|
2237
|
+
const n = (C = h.props) == null ? void 0 : C.name;
|
2238
|
+
return n ? [n, h] : null;
|
2239
|
+
}).filter((h) => h !== null)
|
2240
2240
|
)
|
2241
2241
|
);
|
2242
|
-
function
|
2243
|
-
|
2244
|
-
data: fe(
|
2242
|
+
function w(h = !1) {
|
2243
|
+
r.value = {}, h || o("clearAll", {
|
2244
|
+
data: fe(r.value),
|
2245
2245
|
name: "ALL"
|
2246
2246
|
});
|
2247
2247
|
}
|
2248
|
-
const
|
2249
|
-
var
|
2250
|
-
return (
|
2248
|
+
const m = V(""), f = E(() => {
|
2249
|
+
var h;
|
2250
|
+
return (h = i.schema) != null && h.value ? Object.entries(r.value).filter(([n, C]) => i.schema && !(n in i.schema.value) ? !1 : Array.isArray(C) ? C.some((M) => M !== "" && M !== void 0) : C !== "" && C !== void 0).length : 0;
|
2251
2251
|
}), y = V();
|
2252
|
-
|
2253
|
-
var
|
2254
|
-
await ke(), (
|
2252
|
+
R(m, async () => {
|
2253
|
+
var h, n;
|
2254
|
+
await ke(), (n = (h = y == null ? void 0 : y.value) == null ? void 0 : h.filterRef) != null && n.inputTextRef && y.value.filterRef.inputTextRef.focus();
|
2255
2255
|
});
|
2256
|
-
const
|
2257
|
-
var
|
2258
|
-
return (
|
2256
|
+
const _ = E(() => {
|
2257
|
+
var h, n;
|
2258
|
+
return (h = i.schema) != null && h.value ? Object.fromEntries(Object.entries((n = i.schema) == null ? void 0 : n.value).slice(0, i.limit)) : {};
|
2259
2259
|
}), c = E(() => {
|
2260
|
-
var
|
2261
|
-
return (
|
2262
|
-
}),
|
2263
|
-
var
|
2264
|
-
if (
|
2265
|
-
let
|
2266
|
-
if ((
|
2267
|
-
const
|
2268
|
-
|
2260
|
+
var h, n, C;
|
2261
|
+
return (h = i.schema) != null && h.value ? i.view !== "inline" ? (n = i.schema) == null ? void 0 : n.value : Object.fromEntries(Object.entries((C = i.schema) == null ? void 0 : C.value).slice(i.limit)) : {};
|
2262
|
+
}), u = E(() => {
|
2263
|
+
var n;
|
2264
|
+
if (g.value.length === 0) return [];
|
2265
|
+
let h = 0;
|
2266
|
+
if ((n = i.schema) != null && n.value) {
|
2267
|
+
const C = Object.entries(i.schema.value).length;
|
2268
|
+
C < i.limit ? h = i.limit - C : h = 0;
|
2269
2269
|
}
|
2270
|
-
return
|
2271
|
-
}),
|
2270
|
+
return g.value.slice(0, h);
|
2271
|
+
}), l = E(() => g.value.length === 0 ? [] : i.view !== "inline" ? g.value : g.value.slice(u.value.length));
|
2272
2272
|
function x() {
|
2273
2273
|
if (c.value) {
|
2274
|
-
const [
|
2275
|
-
|
2276
|
-
} else
|
2274
|
+
const [h] = Object.keys(c.value);
|
2275
|
+
m.value = h;
|
2276
|
+
} else l.value.length > 0 ? m.value = l.value[0].props.name : m.value = "";
|
2277
2277
|
}
|
2278
2278
|
return {
|
2279
|
-
activeFilter:
|
2279
|
+
activeFilter: r,
|
2280
2280
|
activeFilterCount: f,
|
2281
|
-
onFilterChange:
|
2282
|
-
clearFilter:
|
2283
|
-
clearAllFilters:
|
2284
|
-
limitedSchema:
|
2281
|
+
onFilterChange: v,
|
2282
|
+
clearFilter: s,
|
2283
|
+
clearAllFilters: w,
|
2284
|
+
limitedSchema: _,
|
2285
2285
|
popoverSchema: c,
|
2286
|
-
filtersSlot:
|
2287
|
-
limitedFiltersSlot:
|
2288
|
-
popoverFiltersSlot:
|
2289
|
-
vnodeMap:
|
2286
|
+
filtersSlot: g,
|
2287
|
+
limitedFiltersSlot: u,
|
2288
|
+
popoverFiltersSlot: l,
|
2289
|
+
vnodeMap: b,
|
2290
2290
|
onPopoverOpen: x,
|
2291
|
-
selectedFilter:
|
2291
|
+
selectedFilter: m,
|
2292
2292
|
filterRef: y
|
2293
2293
|
};
|
2294
2294
|
}
|
2295
|
-
const
|
2295
|
+
const Jl = /* @__PURE__ */ Y({
|
2296
2296
|
__name: "popover",
|
2297
2297
|
emits: ["open", "close"],
|
2298
|
-
setup(i, { emit:
|
2299
|
-
const d = V(!1),
|
2300
|
-
function
|
2298
|
+
setup(i, { emit: o }) {
|
2299
|
+
const d = V(!1), r = V(null), t = V(null), s = V(null), v = V({ top: "0px", left: "0px", position: "absolute" });
|
2300
|
+
function g() {
|
2301
2301
|
d.value = !d.value;
|
2302
2302
|
}
|
2303
|
-
function
|
2304
|
-
const y =
|
2305
|
-
if (!y || !
|
2306
|
-
const c = y.getBoundingClientRect(),
|
2303
|
+
function b() {
|
2304
|
+
const y = s.value, _ = r.value;
|
2305
|
+
if (!y || !_) return;
|
2306
|
+
const c = y.getBoundingClientRect(), u = _.offsetWidth, l = window.innerWidth - c.left;
|
2307
2307
|
let x = c.left + window.scrollX;
|
2308
|
-
|
2308
|
+
u > l && (x = window.innerWidth - u - 8, x < 8 && (x = 8)), v.value = {
|
2309
2309
|
position: "absolute",
|
2310
2310
|
top: `${c.bottom + window.scrollY + 8}px`,
|
2311
2311
|
left: `${x}px`
|
2312
2312
|
};
|
2313
2313
|
}
|
2314
|
-
function
|
2315
|
-
var c,
|
2316
|
-
const
|
2317
|
-
!((c =
|
2314
|
+
function w(y) {
|
2315
|
+
var c, u;
|
2316
|
+
const _ = y.target;
|
2317
|
+
!((c = s.value) != null && c.contains(y.target)) && !((u = r.value) != null && u.contains(y.target)) && !_.closest("[data-inside-popover]") && (d.value = !1);
|
2318
2318
|
}
|
2319
|
-
const
|
2319
|
+
const m = V(!1);
|
2320
2320
|
ue(() => {
|
2321
|
-
|
2321
|
+
m.value = !0;
|
2322
2322
|
}), ue(() => {
|
2323
|
-
var y,
|
2324
|
-
|
2323
|
+
var y, _;
|
2324
|
+
s.value = ((y = t.value) == null ? void 0 : y.querySelector("[data-popover-trigger]")) || null, (_ = s.value) == null || _.addEventListener("click", g), document.addEventListener("click", w), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0);
|
2325
2325
|
}), he(() => {
|
2326
2326
|
var y;
|
2327
|
-
(y =
|
2327
|
+
(y = s.value) == null || y.removeEventListener("click", g), document.removeEventListener("click", w), window.removeEventListener("resize", b), window.removeEventListener("scroll", b, !0);
|
2328
2328
|
});
|
2329
|
-
const f =
|
2330
|
-
return
|
2331
|
-
y ? (f("open"), await ke(),
|
2332
|
-
}), (y,
|
2329
|
+
const f = o;
|
2330
|
+
return R(d, async (y) => {
|
2331
|
+
y ? (f("open"), await ke(), b()) : f("close");
|
2332
|
+
}), (y, _) => (p(), k("div", {
|
2333
2333
|
ref_key: "wrapperRef",
|
2334
|
-
ref:
|
2334
|
+
ref: t
|
2335
2335
|
}, [
|
2336
2336
|
ee(y.$slots, "trigger"),
|
2337
|
-
|
2337
|
+
m.value ? (p(), j(Oe, {
|
2338
2338
|
key: 0,
|
2339
2339
|
to: "body"
|
2340
2340
|
}, [
|
2341
|
-
|
2341
|
+
P(a("div", {
|
2342
2342
|
ref_key: "popoverRef",
|
2343
|
-
ref:
|
2343
|
+
ref: r,
|
2344
2344
|
class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
|
2345
|
-
style:
|
2345
|
+
style: Ce(v.value)
|
2346
2346
|
}, [
|
2347
2347
|
ee(y.$slots, "default")
|
2348
2348
|
], 4), [
|
@@ -2351,7 +2351,7 @@ const Gl = /* @__PURE__ */ Y({
|
|
2351
2351
|
])) : S("", !0)
|
2352
2352
|
], 512));
|
2353
2353
|
}
|
2354
|
-
}),
|
2354
|
+
}), Xl = {}, ea = {
|
2355
2355
|
xmlns: "http://www.w3.org/2000/svg",
|
2356
2356
|
width: "24",
|
2357
2357
|
height: "24",
|
@@ -2363,27 +2363,27 @@ const Gl = /* @__PURE__ */ Y({
|
|
2363
2363
|
"stroke-linejoin": "round",
|
2364
2364
|
class: "lucide lucide-filter h-4 w-4"
|
2365
2365
|
};
|
2366
|
-
function
|
2367
|
-
return p(),
|
2368
|
-
|
2366
|
+
function ta(i, o) {
|
2367
|
+
return p(), k("svg", ea, o[0] || (o[0] = [
|
2368
|
+
a("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
|
2369
2369
|
]));
|
2370
2370
|
}
|
2371
|
-
const
|
2371
|
+
const la = /* @__PURE__ */ le(Xl, [["render", ta]]), aa = {
|
2372
2372
|
key: 0,
|
2373
2373
|
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"
|
2374
|
-
},
|
2374
|
+
}, oa = { class: "flex" }, ra = { class: "w-64 border-r border-gray-200" }, na = { class: "p-2" }, ia = ["onClick"], sa = { class: "flex items-center gap-2" }, ua = { class: "text-sm font-medium" }, da = {
|
2375
2375
|
key: 0,
|
2376
2376
|
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"
|
2377
|
-
},
|
2377
|
+
}, ca = ["onClick"], pa = { class: "flex items-center gap-2" }, fa = { class: "text-sm font-medium" }, va = {
|
2378
2378
|
key: 0,
|
2379
2379
|
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"
|
2380
|
-
},
|
2380
|
+
}, ma = {
|
2381
2381
|
key: 0,
|
2382
2382
|
class: "p-2 border-t"
|
2383
|
-
},
|
2383
|
+
}, ga = { class: "flex-1 min-h-[300px] overflow-y-auto" }, ha = {
|
2384
2384
|
key: 0,
|
2385
2385
|
class: "flex items-center justify-center h-full text-gray-500"
|
2386
|
-
},
|
2386
|
+
}, Ge = /* @__PURE__ */ Y({
|
2387
2387
|
__name: "popover-filter-layout",
|
2388
2388
|
props: {
|
2389
2389
|
schema: {},
|
@@ -2394,140 +2394,140 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2394
2394
|
limit: { default: 3 }
|
2395
2395
|
},
|
2396
2396
|
emits: ["change", "clear", "clearAll"],
|
2397
|
-
setup(i, { expose:
|
2398
|
-
const
|
2399
|
-
activeFilter:
|
2400
|
-
activeFilterCount:
|
2401
|
-
onFilterChange:
|
2397
|
+
setup(i, { expose: o, emit: d }) {
|
2398
|
+
const r = i, t = qe(r.mode), s = we(), v = d, g = V({}), {
|
2399
|
+
activeFilter: b,
|
2400
|
+
activeFilterCount: w,
|
2401
|
+
onFilterChange: m,
|
2402
2402
|
clearFilter: f,
|
2403
2403
|
clearAllFilters: y,
|
2404
|
-
popoverSchema:
|
2404
|
+
popoverSchema: _,
|
2405
2405
|
popoverFiltersSlot: c,
|
2406
|
-
onPopoverOpen:
|
2407
|
-
selectedFilter:
|
2406
|
+
onPopoverOpen: u,
|
2407
|
+
selectedFilter: l,
|
2408
2408
|
filterRef: x
|
2409
2409
|
} = $e({
|
2410
|
-
...
|
2411
|
-
schema:
|
2412
|
-
slots:
|
2413
|
-
},
|
2414
|
-
return
|
2415
|
-
() =>
|
2416
|
-
(
|
2417
|
-
|
2410
|
+
...r,
|
2411
|
+
schema: g,
|
2412
|
+
slots: s
|
2413
|
+
}, v);
|
2414
|
+
return R(
|
2415
|
+
() => r.schema,
|
2416
|
+
(h) => {
|
2417
|
+
g.value = h;
|
2418
2418
|
},
|
2419
2419
|
{ deep: !0, immediate: !0 }
|
2420
|
-
),
|
2420
|
+
), o({
|
2421
2421
|
clearFilter: f,
|
2422
2422
|
clearAllFilters: y
|
2423
|
-
}), (
|
2424
|
-
onOpen: e(
|
2425
|
-
onClose:
|
2423
|
+
}), (h, n) => (p(), j(Jl, {
|
2424
|
+
onOpen: e(u),
|
2425
|
+
onClose: n[5] || (n[5] = (C) => l.value = "")
|
2426
2426
|
}, {
|
2427
2427
|
trigger: re(() => [
|
2428
|
-
|
2428
|
+
a("button", {
|
2429
2429
|
"data-popover-trigger": "",
|
2430
2430
|
"aria-haspopup": "dialog",
|
2431
2431
|
"aria-expanded": "false",
|
2432
|
-
class:
|
2433
|
-
e(
|
2432
|
+
class: F(
|
2433
|
+
e(t) + (e(w) > 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")
|
2434
2434
|
),
|
2435
2435
|
type: "button"
|
2436
2436
|
}, [
|
2437
|
-
|
2438
|
-
|
2439
|
-
e(
|
2437
|
+
I(la),
|
2438
|
+
n[6] || (n[6] = W(" Фільтр ", -1)),
|
2439
|
+
e(w) > 0 ? (p(), k("div", aa, L(e(w)), 1)) : S("", !0)
|
2440
2440
|
], 2)
|
2441
2441
|
]),
|
2442
2442
|
default: re(() => [
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2443
|
+
a("div", oa, [
|
2444
|
+
a("div", ra, [
|
2445
|
+
n[7] || (n[7] = a("div", { class: "p-4 border-b" }, [
|
2446
|
+
a("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
|
2447
2447
|
], -1)),
|
2448
|
-
|
2449
|
-
|
2450
|
-
var
|
2451
|
-
return p(),
|
2452
|
-
key:
|
2448
|
+
a("div", na, [
|
2449
|
+
h.schema ? (p(!0), k(K, { key: 0 }, q(Object.entries(e(_)), ([C, M]) => {
|
2450
|
+
var $;
|
2451
|
+
return p(), k("button", {
|
2452
|
+
key: C,
|
2453
2453
|
onClick: () => {
|
2454
|
-
|
2454
|
+
l.value = C;
|
2455
2455
|
},
|
2456
|
-
class:
|
2456
|
+
class: F([
|
2457
2457
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
2458
|
-
e(
|
2458
|
+
e(l) === C ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
2459
2459
|
])
|
2460
2460
|
}, [
|
2461
|
-
|
2462
|
-
|
2461
|
+
a("div", sa, [
|
2462
|
+
a("span", ua, L(M.label), 1)
|
2463
2463
|
]),
|
2464
|
-
(Array.isArray(e(
|
2465
|
-
], 10,
|
2464
|
+
(Array.isArray(e(b)[C]) ? (($ = e(b)[C]) == null ? void 0 : $.length) > 0 : e(b)[C] || e(b)[C] === null) ? (p(), k("div", da)) : S("", !0)
|
2465
|
+
], 10, ia);
|
2466
2466
|
}), 128)) : S("", !0),
|
2467
|
-
(p(!0),
|
2468
|
-
var
|
2469
|
-
return p(),
|
2470
|
-
key: "slot-" +
|
2471
|
-
onClick: (
|
2472
|
-
class:
|
2467
|
+
(p(!0), k(K, null, q(e(c), (C, M) => {
|
2468
|
+
var $;
|
2469
|
+
return p(), k("button", {
|
2470
|
+
key: "slot-" + M,
|
2471
|
+
onClick: (A) => l.value = C.props.name,
|
2472
|
+
class: F([
|
2473
2473
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
2474
|
-
e(
|
2474
|
+
e(l) === C.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
2475
2475
|
])
|
2476
2476
|
}, [
|
2477
|
-
|
2478
|
-
|
2477
|
+
a("div", pa, [
|
2478
|
+
a("span", fa, L(C.props.label), 1)
|
2479
2479
|
]),
|
2480
|
-
((
|
2481
|
-
], 10,
|
2480
|
+
(($ = e(b)[C.props.name]) == null ? void 0 : $.length) > 0 ? (p(), k("div", va)) : S("", !0)
|
2481
|
+
], 10, ca);
|
2482
2482
|
}), 128))
|
2483
2483
|
]),
|
2484
|
-
e(
|
2485
|
-
|
2484
|
+
e(w) > 0 ? (p(), k("div", ma, [
|
2485
|
+
a("button", {
|
2486
2486
|
class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
2487
|
-
onClick:
|
2487
|
+
onClick: n[0] || (n[0] = (C) => e(y)()),
|
2488
2488
|
"data-inside-popover": ""
|
2489
2489
|
}, " Очистити всі ")
|
2490
2490
|
])) : S("", !0)
|
2491
2491
|
]),
|
2492
|
-
|
2493
|
-
e(
|
2494
|
-
|
2492
|
+
a("div", ga, [
|
2493
|
+
e(l) === "" ? (p(), k("div", ha, n[8] || (n[8] = [
|
2494
|
+
a("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
|
2495
2495
|
]))) : S("", !0),
|
2496
|
-
e(
|
2497
|
-
e(
|
2498
|
-
e(
|
2499
|
-
name:
|
2500
|
-
key:
|
2496
|
+
e(l) ? (p(), k(K, { key: 1 }, [
|
2497
|
+
e(_) ? (p(!0), k(K, { key: 0 }, q(Object.entries(e(_)), ([C, M]) => (p(), k(K, null, [
|
2498
|
+
e(l) === C ? (p(), j(ne, Z({
|
2499
|
+
name: C,
|
2500
|
+
key: C,
|
2501
2501
|
layout: "popover",
|
2502
2502
|
ref_for: !0,
|
2503
2503
|
ref_key: "filterRef",
|
2504
2504
|
ref: x
|
2505
|
-
}, { ref_for: !0 },
|
2506
|
-
onChange:
|
2507
|
-
onClear:
|
2508
|
-
e(f)(
|
2505
|
+
}, { ref_for: !0 }, M, {
|
2506
|
+
onChange: n[1] || (n[1] = ($) => e(m)($.name, $.value)),
|
2507
|
+
onClear: n[2] || (n[2] = ($) => {
|
2508
|
+
e(f)($), e(m)($, void 0);
|
2509
2509
|
}),
|
2510
|
-
modelValue: e(
|
2511
|
-
"onUpdate:modelValue": (
|
2510
|
+
modelValue: e(b)[C],
|
2511
|
+
"onUpdate:modelValue": ($) => e(b)[C] = $,
|
2512
2512
|
cleanable: !0
|
2513
2513
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : S("", !0)
|
2514
2514
|
], 64))), 256)) : S("", !0),
|
2515
|
-
(p(!0),
|
2516
|
-
key: "slot-" +
|
2515
|
+
(p(!0), k(K, null, q(e(c), (C, M) => (p(), k(K, {
|
2516
|
+
key: "slot-" + M
|
2517
2517
|
}, [
|
2518
|
-
e(
|
2518
|
+
e(l) === C.props.name ? (p(), j(ne, Z({
|
2519
2519
|
key: 0,
|
2520
2520
|
layout: "popover"
|
2521
|
-
}, { ref_for: !0 },
|
2521
|
+
}, { ref_for: !0 }, C.props, {
|
2522
2522
|
ref_for: !0,
|
2523
2523
|
ref_key: "filterRef",
|
2524
2524
|
ref: x,
|
2525
|
-
onChange:
|
2526
|
-
onClear:
|
2527
|
-
e(f)(
|
2525
|
+
onChange: n[3] || (n[3] = ($) => e(m)($.name, $.value)),
|
2526
|
+
onClear: n[4] || (n[4] = ($) => {
|
2527
|
+
e(f)($), e(m)($, void 0);
|
2528
2528
|
}),
|
2529
|
-
modelValue: e(
|
2530
|
-
"onUpdate:modelValue": (
|
2529
|
+
modelValue: e(b)[C.props.name],
|
2530
|
+
"onUpdate:modelValue": ($) => e(b)[C.props.name] = $,
|
2531
2531
|
cleanable: !0
|
2532
2532
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : S("", !0)
|
2533
2533
|
], 64))), 128))
|
@@ -2538,7 +2538,7 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2538
2538
|
_: 1
|
2539
2539
|
}, 8, ["onOpen"]));
|
2540
2540
|
}
|
2541
|
-
}),
|
2541
|
+
}), ba = { class: "flex gap-1 items-center flex-wrap" }, Le = /* @__PURE__ */ Y({
|
2542
2542
|
__name: "inline-filter-layout",
|
2543
2543
|
props: {
|
2544
2544
|
schema: {},
|
@@ -2549,93 +2549,93 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2549
2549
|
limit: { default: 3 }
|
2550
2550
|
},
|
2551
2551
|
emits: ["change", "clear", "clearAll"],
|
2552
|
-
setup(i, { expose:
|
2553
|
-
const
|
2554
|
-
activeFilter:
|
2555
|
-
activeFilterCount:
|
2556
|
-
onFilterChange:
|
2557
|
-
clearFilter:
|
2552
|
+
setup(i, { expose: o, emit: d }) {
|
2553
|
+
const r = i, t = d, s = we(), v = V({}), {
|
2554
|
+
activeFilter: g,
|
2555
|
+
activeFilterCount: b,
|
2556
|
+
onFilterChange: w,
|
2557
|
+
clearFilter: m,
|
2558
2558
|
clearAllFilters: f,
|
2559
2559
|
limitedSchema: y,
|
2560
|
-
popoverSchema:
|
2560
|
+
popoverSchema: _,
|
2561
2561
|
filtersSlot: c,
|
2562
|
-
limitedFiltersSlot:
|
2563
|
-
popoverFiltersSlot:
|
2562
|
+
limitedFiltersSlot: u,
|
2563
|
+
popoverFiltersSlot: l
|
2564
2564
|
} = $e(
|
2565
2565
|
{
|
2566
|
-
...
|
2567
|
-
schema:
|
2568
|
-
slots:
|
2566
|
+
...r,
|
2567
|
+
schema: v,
|
2568
|
+
slots: s
|
2569
2569
|
},
|
2570
|
-
|
2570
|
+
t
|
2571
2571
|
), x = V();
|
2572
|
-
function
|
2572
|
+
function h() {
|
2573
2573
|
x.value && x.value.clearAllFilters(!0), f();
|
2574
2574
|
}
|
2575
|
-
return
|
2576
|
-
() =>
|
2577
|
-
(
|
2578
|
-
|
2575
|
+
return R(
|
2576
|
+
() => r.schema,
|
2577
|
+
(n) => {
|
2578
|
+
v.value = n;
|
2579
2579
|
},
|
2580
2580
|
{ deep: !0, immediate: !0 }
|
2581
|
-
),
|
2582
|
-
clearFilter:
|
2581
|
+
), o({
|
2582
|
+
clearFilter: m,
|
2583
2583
|
clearAllFilters: f
|
2584
|
-
}), (
|
2585
|
-
|
2586
|
-
key:
|
2587
|
-
name:
|
2588
|
-
mode:
|
2589
|
-
}, { ref_for: !0 },
|
2590
|
-
onChange:
|
2591
|
-
onClear: e(
|
2584
|
+
}), (n, C) => (p(), k("div", ba, [
|
2585
|
+
n.schema ? (p(!0), k(K, { key: 0 }, q(Object.entries(e(y)), ([M, $]) => (p(), j(ne, Z({
|
2586
|
+
key: M,
|
2587
|
+
name: M,
|
2588
|
+
mode: n.mode
|
2589
|
+
}, { ref_for: !0 }, $, {
|
2590
|
+
onChange: C[0] || (C[0] = (A) => e(w)(A.name, A.value)),
|
2591
|
+
onClear: e(m),
|
2592
2592
|
layout: "inline",
|
2593
2593
|
cleanable: !0,
|
2594
|
-
modelValue: e(
|
2595
|
-
"onUpdate:modelValue": (
|
2594
|
+
modelValue: e(g)[M],
|
2595
|
+
"onUpdate:modelValue": (A) => e(g)[M] = A
|
2596
2596
|
}), null, 16, ["name", "mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : S("", !0),
|
2597
|
-
(p(!0),
|
2598
|
-
key: "slot-" +
|
2597
|
+
(p(!0), k(K, null, q(e(u), (M, $) => (p(), j(ne, Z({
|
2598
|
+
key: "slot-" + $,
|
2599
2599
|
layout: "inline"
|
2600
|
-
}, { ref_for: !0 },
|
2601
|
-
onChange:
|
2602
|
-
onClear:
|
2603
|
-
e(
|
2600
|
+
}, { ref_for: !0 }, M.props, {
|
2601
|
+
onChange: C[1] || (C[1] = (A) => e(w)(A.name, A.value)),
|
2602
|
+
onClear: C[2] || (C[2] = (A) => {
|
2603
|
+
e(m)(A), e(w)(A, void 0);
|
2604
2604
|
}),
|
2605
2605
|
cleanable: !0,
|
2606
|
-
modelValue: e(
|
2607
|
-
"onUpdate:modelValue": (
|
2606
|
+
modelValue: e(g)[M.props.name],
|
2607
|
+
"onUpdate:modelValue": (A) => e(g)[M.props.name] = A
|
2608
2608
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
2609
|
-
Object.entries(e(
|
2610
|
-
schema: e(
|
2609
|
+
Object.entries(e(_)).length > 0 || e(l).length > 0 ? (p(), j(Ge, Z({ key: 1 }, r, {
|
2610
|
+
schema: e(_),
|
2611
2611
|
limit: 0,
|
2612
|
-
onChange:
|
2613
|
-
onClearAll:
|
2614
|
-
onClear:
|
2615
|
-
mode:
|
2612
|
+
onChange: C[3] || (C[3] = (M) => e(w)(M.name, M.value)),
|
2613
|
+
onClearAll: C[4] || (C[4] = (M) => e(f)()),
|
2614
|
+
onClear: C[5] || (C[5] = (M) => e(m)(M.name)),
|
2615
|
+
mode: n.mode,
|
2616
2616
|
ref_key: "popoverRef",
|
2617
2617
|
ref: x,
|
2618
2618
|
cleanable: !0
|
2619
2619
|
}), {
|
2620
2620
|
default: re(() => [
|
2621
|
-
(p(!0),
|
2622
|
-
key: "slot-" +
|
2621
|
+
(p(!0), k(K, null, q(e(c), (M, $) => (p(), j(oe(M), Z({
|
2622
|
+
key: "slot-" + $,
|
2623
2623
|
layout: "popover"
|
2624
|
-
}, { ref_for: !0 },
|
2624
|
+
}, { ref_for: !0 }, M.props, { cleanable: !0 }), null, 16))), 128))
|
2625
2625
|
]),
|
2626
2626
|
_: 1
|
2627
2627
|
}, 16, ["schema", "mode"])) : S("", !0),
|
2628
|
-
e(
|
2628
|
+
e(b) > 0 ? (p(), k("button", {
|
2629
2629
|
key: 2,
|
2630
|
-
onClick:
|
2630
|
+
onClick: h,
|
2631
2631
|
class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
|
2632
2632
|
}, " Очистити ")) : S("", !0)
|
2633
2633
|
]));
|
2634
2634
|
}
|
2635
|
-
}),
|
2635
|
+
}), ya = {
|
2636
2636
|
key: 0,
|
2637
2637
|
class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
|
2638
|
-
},
|
2638
|
+
}, xa = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, wa = /* @__PURE__ */ Y({
|
2639
2639
|
__name: "vertical-filter-layout",
|
2640
2640
|
props: {
|
2641
2641
|
schema: {},
|
@@ -2646,54 +2646,54 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2646
2646
|
limit: { default: 3 }
|
2647
2647
|
},
|
2648
2648
|
emits: ["change", "clear", "clearAll"],
|
2649
|
-
setup(i, { expose:
|
2650
|
-
const
|
2651
|
-
activeFilter:
|
2652
|
-
activeFilterCount:
|
2653
|
-
onFilterChange:
|
2654
|
-
clearFilter:
|
2655
|
-
clearAllFilters:
|
2649
|
+
setup(i, { expose: o, emit: d }) {
|
2650
|
+
const r = i, t = d, s = we(), {
|
2651
|
+
activeFilter: v,
|
2652
|
+
activeFilterCount: g,
|
2653
|
+
onFilterChange: b,
|
2654
|
+
clearFilter: w,
|
2655
|
+
clearAllFilters: m,
|
2656
2656
|
filtersSlot: f
|
2657
2657
|
} = $e({
|
2658
|
-
...
|
2659
|
-
slots:
|
2660
|
-
},
|
2661
|
-
return
|
2662
|
-
clearFilter:
|
2663
|
-
clearAllFilters:
|
2664
|
-
}), (y,
|
2665
|
-
|
2666
|
-
e(
|
2658
|
+
...r,
|
2659
|
+
slots: s
|
2660
|
+
}, t);
|
2661
|
+
return o({
|
2662
|
+
clearFilter: w,
|
2663
|
+
clearAllFilters: m
|
2664
|
+
}), (y, _) => y.view === "vertical" ? (p(), k("div", ya, [
|
2665
|
+
a("div", xa, [
|
2666
|
+
e(g) > 0 ? (p(), k("button", {
|
2667
2667
|
key: 0,
|
2668
|
-
onClick:
|
2668
|
+
onClick: _[0] || (_[0] = (c) => e(m)()),
|
2669
2669
|
"data-popover-trigger": "",
|
2670
2670
|
"aria-haspopup": "dialog",
|
2671
2671
|
"aria-expanded": "false",
|
2672
2672
|
class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
|
2673
2673
|
type: "button"
|
2674
2674
|
}, " Очистити ")) : S("", !0),
|
2675
|
-
y.schema ? (p(!0),
|
2675
|
+
y.schema ? (p(!0), k(K, { key: 1 }, q(Object.entries(y.schema), ([c, u]) => (p(), j(ne, Z({
|
2676
2676
|
name: c,
|
2677
2677
|
layout: "vertical"
|
2678
|
-
}, { ref_for: !0 },
|
2679
|
-
onChange:
|
2680
|
-
onClear:
|
2681
|
-
e(
|
2678
|
+
}, { ref_for: !0 }, u, {
|
2679
|
+
onChange: _[1] || (_[1] = (l) => e(b)(l.name, l.value)),
|
2680
|
+
onClear: _[2] || (_[2] = (l) => {
|
2681
|
+
e(w)(l), e(b)(l, void 0);
|
2682
2682
|
}),
|
2683
|
-
modelValue: e(
|
2684
|
-
"onUpdate:modelValue": (
|
2683
|
+
modelValue: e(v)[c],
|
2684
|
+
"onUpdate:modelValue": (l) => e(v)[c] = l,
|
2685
2685
|
showClean: !0
|
2686
2686
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : S("", !0),
|
2687
|
-
(p(!0),
|
2688
|
-
key: "slot-" +
|
2687
|
+
(p(!0), k(K, null, q(e(f), (c, u) => (p(), j(ne, Z({
|
2688
|
+
key: "slot-" + u,
|
2689
2689
|
layout: "vertical"
|
2690
2690
|
}, { ref_for: !0 }, c.props, {
|
2691
|
-
onChange:
|
2692
|
-
onClear:
|
2693
|
-
e(
|
2691
|
+
onChange: _[3] || (_[3] = (l) => e(b)(l.name, l.value)),
|
2692
|
+
onClear: _[4] || (_[4] = (l) => {
|
2693
|
+
e(w)(l), e(b)(l, void 0);
|
2694
2694
|
}),
|
2695
|
-
modelValue: e(
|
2696
|
-
"onUpdate:modelValue": (
|
2695
|
+
modelValue: e(v)[c.props.name],
|
2696
|
+
"onUpdate:modelValue": (l) => e(v)[c.props.name] = l,
|
2697
2697
|
showClean: !0
|
2698
2698
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
|
2699
2699
|
])
|
@@ -2710,98 +2710,98 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2710
2710
|
limit: { default: 3 }
|
2711
2711
|
},
|
2712
2712
|
emits: ["change", "clear", "clearAll"],
|
2713
|
-
setup(i, { expose:
|
2714
|
-
const
|
2715
|
-
function
|
2716
|
-
if (Array.isArray(
|
2717
|
-
return
|
2718
|
-
if (
|
2719
|
-
const
|
2720
|
-
for (const
|
2721
|
-
x[
|
2713
|
+
setup(i, { expose: o, emit: d }) {
|
2714
|
+
const r = i, t = V(r.value ?? {}), s = d, v = V();
|
2715
|
+
function g(u) {
|
2716
|
+
if (Array.isArray(u))
|
2717
|
+
return u.map((l) => g(l));
|
2718
|
+
if (u !== null && typeof u == "object") {
|
2719
|
+
const l = fe(u), x = {};
|
2720
|
+
for (const h in l)
|
2721
|
+
x[h] = g(l[h]);
|
2722
2722
|
return x;
|
2723
2723
|
}
|
2724
|
-
return
|
2724
|
+
return u;
|
2725
2725
|
}
|
2726
|
-
function
|
2727
|
-
|
2728
|
-
...
|
2729
|
-
[
|
2730
|
-
} : delete
|
2731
|
-
data:
|
2732
|
-
name:
|
2733
|
-
value:
|
2726
|
+
function b(u, l) {
|
2727
|
+
l !== void 0 ? t.value = {
|
2728
|
+
...t.value,
|
2729
|
+
[u]: l
|
2730
|
+
} : delete t.value[u], s("change", {
|
2731
|
+
data: g(t.value),
|
2732
|
+
name: u,
|
2733
|
+
value: g(l)
|
2734
2734
|
});
|
2735
2735
|
}
|
2736
|
-
function
|
2737
|
-
delete
|
2738
|
-
data:
|
2739
|
-
name:
|
2740
|
-
}),
|
2741
|
-
data:
|
2742
|
-
name:
|
2736
|
+
function w(u) {
|
2737
|
+
delete t.value[u], s("clear", {
|
2738
|
+
data: g(t.value),
|
2739
|
+
name: u
|
2740
|
+
}), s("change", {
|
2741
|
+
data: g(t.value),
|
2742
|
+
name: u,
|
2743
2743
|
value: null
|
2744
2744
|
});
|
2745
2745
|
}
|
2746
|
-
function
|
2747
|
-
|
2748
|
-
data:
|
2746
|
+
function m() {
|
2747
|
+
t.value = {}, s("clear", {
|
2748
|
+
data: g(t.value),
|
2749
2749
|
name: "ALL"
|
2750
|
-
}),
|
2751
|
-
data:
|
2750
|
+
}), s("change", {
|
2751
|
+
data: g(t.value),
|
2752
2752
|
name: "ALL",
|
2753
2753
|
value: null
|
2754
2754
|
});
|
2755
2755
|
}
|
2756
2756
|
const f = V({});
|
2757
2757
|
function y() {
|
2758
|
-
switch (
|
2758
|
+
switch (r.view) {
|
2759
2759
|
case "inline":
|
2760
|
-
return
|
2760
|
+
return Le;
|
2761
2761
|
case "vertical":
|
2762
|
-
return
|
2762
|
+
return wa;
|
2763
2763
|
case "popover":
|
2764
|
-
return
|
2764
|
+
return Ge;
|
2765
2765
|
default:
|
2766
|
-
return
|
2766
|
+
return Le;
|
2767
2767
|
}
|
2768
2768
|
}
|
2769
|
-
|
2770
|
-
() =>
|
2771
|
-
(
|
2772
|
-
if (!
|
2769
|
+
R(
|
2770
|
+
() => r.schema,
|
2771
|
+
(u) => {
|
2772
|
+
if (!u) {
|
2773
2773
|
f.value = {};
|
2774
2774
|
return;
|
2775
2775
|
}
|
2776
|
-
if (Array.isArray(
|
2776
|
+
if (Array.isArray(u) && !u.length) {
|
2777
2777
|
f.value = {};
|
2778
2778
|
return;
|
2779
2779
|
}
|
2780
|
-
Array.isArray(
|
2781
|
-
Object.assign(x, { name:
|
2782
|
-
}), f.value = { ...
|
2780
|
+
Array.isArray(u) ? f.value = u.filter((l) => l.type).reduce((l, x) => (Object.assign(x, { name: x.id || x.name, type: x.type.toLowerCase() }), l[x.name] = x, x.data && !x.api && !x.options && Object.assign(x, { api: `/api/suggest/${x.data}` }), l), {}) : (Object.entries(u).forEach(([l, x]) => {
|
2781
|
+
Object.assign(x, { name: l || x.name || x.id, type: x.type.toLowerCase() });
|
2782
|
+
}), f.value = { ...u });
|
2783
2783
|
},
|
2784
2784
|
{ immediate: !0, deep: !0 }
|
2785
2785
|
);
|
2786
|
-
function
|
2787
|
-
|
2786
|
+
function _(u) {
|
2787
|
+
v.value.clearFilter(u), w(u);
|
2788
2788
|
}
|
2789
2789
|
function c() {
|
2790
|
-
|
2790
|
+
v.value.clearAllFilters(), m();
|
2791
2791
|
}
|
2792
|
-
return
|
2792
|
+
return o({
|
2793
2793
|
clearAllFilters: c,
|
2794
|
-
clearFilter:
|
2795
|
-
}), (
|
2794
|
+
clearFilter: _
|
2795
|
+
}), (u, l) => (p(), j(oe(y()), Z(r, {
|
2796
2796
|
schema: f.value,
|
2797
|
-
onChange:
|
2798
|
-
onClear:
|
2799
|
-
onClearAll:
|
2797
|
+
onChange: l[0] || (l[0] = (x) => b(x.name, x.value)),
|
2798
|
+
onClear: l[1] || (l[1] = (x) => w(x.name)),
|
2799
|
+
onClearAll: m,
|
2800
2800
|
ref_key: "filterRef",
|
2801
|
-
ref:
|
2801
|
+
ref: v
|
2802
2802
|
}), {
|
2803
2803
|
default: re(() => [
|
2804
|
-
ee(
|
2804
|
+
ee(u.$slots, "default")
|
2805
2805
|
]),
|
2806
2806
|
_: 3
|
2807
2807
|
}, 16, ["schema"]));
|
@@ -2810,16 +2810,16 @@ const Xl = /* @__PURE__ */ le(Ql, [["render", Jl]]), ea = {
|
|
2810
2810
|
xe.install = function(i) {
|
2811
2811
|
i.component("Filter", xe), i.component("FilterField", ne);
|
2812
2812
|
};
|
2813
|
-
function
|
2814
|
-
const { page:
|
2815
|
-
|
2813
|
+
function ka(i) {
|
2814
|
+
const { page: o, id: d, filter: r } = i, t = new URL(window.location.href), s = new URLSearchParams(window.location.search);
|
2815
|
+
o ? s.set("page", o.toString()) : s.delete("page"), d ? s.set("id", d.toString()) : s.delete("id"), r ? s.set("filter", r) : s.delete("filter"), t.search = decodeURI(s.toString()), window.history.pushState({}, "", t);
|
2816
2816
|
}
|
2817
|
-
const
|
2817
|
+
const Ca = { class: "flex items-center justify-between w-full gap-x-1" }, _a = { class: "flex items-center" }, Va = ["disabled"], Sa = { class: "flex items-center gap-x-1" }, Ma = ["onClick"], Ba = ["disabled"], $a = { class: "flex justify-center items-center gap-x-5 ml-3" }, Aa = { class: "relative" }, Ra = {
|
2818
2818
|
class: "hs-dropdown-menu z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 right-0 dark:divide-neutral-700 absolute bottom-[100%]",
|
2819
2819
|
role: "menu",
|
2820
2820
|
"aria-orientation": "vertical",
|
2821
2821
|
"aria-labelledby": "dropdown-button"
|
2822
|
-
},
|
2822
|
+
}, Da = ["onClick"], za = {
|
2823
2823
|
key: 0,
|
2824
2824
|
xmlns: "http://www.w3.org/2000/svg",
|
2825
2825
|
viewBox: "0 0 24 24",
|
@@ -2831,7 +2831,7 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
2831
2831
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check text-blue-600",
|
2832
2832
|
width: "14",
|
2833
2833
|
height: "14"
|
2834
|
-
},
|
2834
|
+
}, ja = /* @__PURE__ */ Y({
|
2835
2835
|
__name: "pagination",
|
2836
2836
|
props: {
|
2837
2837
|
total: {},
|
@@ -2839,38 +2839,38 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
2839
2839
|
pageSize: {}
|
2840
2840
|
},
|
2841
2841
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "pageSizeChange"],
|
2842
|
-
setup(i, { emit:
|
2843
|
-
const d = i,
|
2844
|
-
|
2845
|
-
|
2842
|
+
setup(i, { emit: o }) {
|
2843
|
+
const d = i, r = o, t = V(d.currentPage), s = V(d.pageSize), v = V(!1);
|
2844
|
+
R(() => d.pageSize, (_) => {
|
2845
|
+
s.value = _;
|
2846
2846
|
});
|
2847
|
-
const
|
2847
|
+
const g = E(() => Math.ceil(d.total / d.pageSize)), b = E(() => {
|
2848
2848
|
const c = Math.floor(3.5);
|
2849
|
-
let
|
2850
|
-
|
2849
|
+
let u = t.value - c, l = t.value + c;
|
2850
|
+
u < 1 && (l += 1 - u, u = 1), l > g.value && (u -= l - g.value, l = g.value), u = Math.max(1, u);
|
2851
2851
|
const x = [];
|
2852
|
-
for (let
|
2853
|
-
x.push(
|
2852
|
+
for (let h = u; h <= l; h += 1)
|
2853
|
+
x.push(h);
|
2854
2854
|
return x;
|
2855
|
-
}),
|
2856
|
-
|
2857
|
-
},
|
2858
|
-
|
2859
|
-
}, f = (
|
2860
|
-
|
2861
|
-
}, y = (
|
2862
|
-
|
2855
|
+
}), w = () => {
|
2856
|
+
t.value > 1 && (t.value -= 1, r("update:currentPage", t.value));
|
2857
|
+
}, m = () => {
|
2858
|
+
t.value < g.value && (t.value += 1, r("update:currentPage", t.value));
|
2859
|
+
}, f = (_) => {
|
2860
|
+
t.value = _, r("update:currentPage", _), r("pageChange", _);
|
2861
|
+
}, y = (_ = s.value) => {
|
2862
|
+
s.value = _, v.value = !1, r("update:pageSize", s.value), r("update:currentPage", 1), r("pageSizeChange", s.value);
|
2863
2863
|
};
|
2864
|
-
return (
|
2865
|
-
|
2866
|
-
|
2864
|
+
return (_, c) => (p(), k("nav", Ca, [
|
2865
|
+
a("div", _a, [
|
2866
|
+
a("button", {
|
2867
2867
|
type: "button",
|
2868
2868
|
"aria-label": "Previous",
|
2869
|
-
onClick:
|
2870
|
-
disabled:
|
2869
|
+
onClick: w,
|
2870
|
+
disabled: t.value === 1,
|
2871
2871
|
class: "border-white last:rounded-e-lg text-base h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 border text-sm rounded-lg bg-white text-gray-800 hover:shadow-sm hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50 dark:bg-neutral-700 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800 py-2"
|
2872
2872
|
}, c[1] || (c[1] = [
|
2873
|
-
|
2873
|
+
a("svg", {
|
2874
2874
|
xmlns: "http://www.w3.org/2000/svg",
|
2875
2875
|
viewBox: "0 0 24 24",
|
2876
2876
|
fill: "none",
|
@@ -2882,38 +2882,38 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
2882
2882
|
height: "16",
|
2883
2883
|
width: "16"
|
2884
2884
|
}, [
|
2885
|
-
|
2885
|
+
a("path", {
|
2886
2886
|
stroke: "none",
|
2887
2887
|
d: "M0 0h24v24H0z",
|
2888
2888
|
fill: "none"
|
2889
2889
|
}),
|
2890
|
-
|
2890
|
+
a("path", { d: "M6 9l6 6l6 -6" })
|
2891
2891
|
], -1),
|
2892
|
-
|
2892
|
+
a("span", {
|
2893
2893
|
"aria-hidden": "true",
|
2894
2894
|
class: "sr-only"
|
2895
2895
|
}, "Previous", -1)
|
2896
|
-
]), 8,
|
2897
|
-
|
2898
|
-
(p(!0),
|
2896
|
+
]), 8, Va),
|
2897
|
+
a("div", Sa, [
|
2898
|
+
(p(!0), k(K, null, q(b.value, (u) => (p(), k("button", {
|
2899
2899
|
type: "button",
|
2900
|
-
key:
|
2901
|
-
onClick: (
|
2902
|
-
class:
|
2903
|
-
},
|
2900
|
+
key: u,
|
2901
|
+
onClick: (l) => f(u),
|
2902
|
+
class: F(t.value === u ? "flex justify-center items-center rounded-lg text-sm dark:text-neutral-300 py-2 px-3 focus:outline-none disabled:opacity-50 disabled:pointer-events-none bg-[#e5e7eb] dark:bg-[#242424] border border-gray-200 text-base h-[38px] min-w-[38px]" : "flex justify-center items-center rounded-lg text-sm dark:text-neutral-400 hover:bg-gray-100 py-2 px-3 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 text-base h-[38px] min-w-[38px]")
|
2903
|
+
}, L(u), 11, Ma))), 128))
|
2904
2904
|
]),
|
2905
|
-
|
2905
|
+
a("button", {
|
2906
2906
|
type: "button",
|
2907
2907
|
"aria-label": "Next",
|
2908
|
-
onClick:
|
2909
|
-
disabled:
|
2908
|
+
onClick: m,
|
2909
|
+
disabled: t.value === g.value,
|
2910
2910
|
class: "border-white last:rounded-e-lg text-base h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 border text-sm rounded-lg bg-white text-gray-800 hover:shadow-sm hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50 dark:bg-neutral-700 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800 py-2"
|
2911
2911
|
}, c[2] || (c[2] = [
|
2912
|
-
|
2912
|
+
a("span", {
|
2913
2913
|
"aria-hidden": "true",
|
2914
2914
|
class: "sr-only"
|
2915
2915
|
}, "Next", -1),
|
2916
|
-
|
2916
|
+
a("svg", {
|
2917
2917
|
xmlns: "http://www.w3.org/2000/svg",
|
2918
2918
|
viewBox: "0 0 24 24",
|
2919
2919
|
fill: "none",
|
@@ -2925,47 +2925,47 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
2925
2925
|
height: "16",
|
2926
2926
|
width: "16"
|
2927
2927
|
}, [
|
2928
|
-
|
2928
|
+
a("path", {
|
2929
2929
|
stroke: "none",
|
2930
2930
|
d: "M0 0h24v24H0z",
|
2931
2931
|
fill: "none"
|
2932
2932
|
}),
|
2933
|
-
|
2933
|
+
a("path", { d: "M6 9l6 6l6 -6" })
|
2934
2934
|
], -1)
|
2935
|
-
]), 8,
|
2935
|
+
]), 8, Ba)
|
2936
2936
|
]),
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
(p(),
|
2937
|
+
a("div", $a, [
|
2938
|
+
a("div", Aa, [
|
2939
|
+
P(a("div", Ra, [
|
2940
|
+
(p(), k(K, null, q([10, 20, 30], (u) => a("button", {
|
2941
2941
|
type: "button",
|
2942
|
-
key:
|
2943
|
-
onClick: (
|
2942
|
+
key: u,
|
2943
|
+
onClick: (l) => y(u),
|
2944
2944
|
class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-neutral-300 dark:focus:bg-neutral-700"
|
2945
2945
|
}, [
|
2946
|
-
W(
|
2947
|
-
|
2948
|
-
|
2946
|
+
W(L(u) + " ", 1),
|
2947
|
+
s.value === u ? (p(), k("svg", za, c[3] || (c[3] = [
|
2948
|
+
a("path", {
|
2949
2949
|
stroke: "none",
|
2950
2950
|
d: "M0 0h24v24H0z",
|
2951
2951
|
fill: "none"
|
2952
2952
|
}, null, -1),
|
2953
|
-
|
2953
|
+
a("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
2954
2954
|
]))) : S("", !0)
|
2955
|
-
], 8,
|
2955
|
+
], 8, Da)), 64))
|
2956
2956
|
], 512), [
|
2957
|
-
[X,
|
2957
|
+
[X, v.value]
|
2958
2958
|
]),
|
2959
|
-
|
2959
|
+
a("button", {
|
2960
2960
|
type: "button",
|
2961
2961
|
class: "py-3 px-3.5 inline-flex items-center gap-x-1 text-sm rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 text-base h-[38px] min-w-[38px]",
|
2962
2962
|
"aria-haspopup": "menu",
|
2963
2963
|
"aria-expanded": "false",
|
2964
2964
|
"aria-label": "Dropdown",
|
2965
|
-
onClick: c[0] || (c[0] = (
|
2965
|
+
onClick: c[0] || (c[0] = (u) => v.value = !v.value)
|
2966
2966
|
}, [
|
2967
|
-
W(
|
2968
|
-
c[4] || (c[4] =
|
2967
|
+
W(L(s.value) + " ", 1),
|
2968
|
+
c[4] || (c[4] = a("svg", {
|
2969
2969
|
xmlns: "http://www.w3.org/2000/svg",
|
2970
2970
|
viewBox: "0 0 24 24",
|
2971
2971
|
fill: "none",
|
@@ -2977,24 +2977,24 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
2977
2977
|
height: "16",
|
2978
2978
|
width: "16"
|
2979
2979
|
}, [
|
2980
|
-
|
2980
|
+
a("path", {
|
2981
2981
|
stroke: "none",
|
2982
2982
|
d: "M0 0h24v24H0z",
|
2983
2983
|
fill: "none"
|
2984
2984
|
}),
|
2985
|
-
|
2985
|
+
a("path", { d: "M6 9l6 6l6 -6" })
|
2986
2986
|
], -1))
|
2987
2987
|
])
|
2988
2988
|
])
|
2989
2989
|
])
|
2990
2990
|
]));
|
2991
2991
|
}
|
2992
|
-
}), ve = (i,
|
2992
|
+
}), ve = (i, o) => {
|
2993
2993
|
const d = i.__vccOpts || i;
|
2994
|
-
for (const [
|
2995
|
-
d[
|
2994
|
+
for (const [r, t] of o)
|
2995
|
+
d[r] = t;
|
2996
2996
|
return d;
|
2997
|
-
},
|
2997
|
+
}, Fa = {}, Ka = {
|
2998
2998
|
class: "w-48 mx-auto mb-4",
|
2999
2999
|
width: "178",
|
3000
3000
|
height: "90",
|
@@ -3002,12 +3002,12 @@ const xa = { class: "flex items-center justify-between w-full gap-x-1" }, wa = {
|
|
3002
3002
|
fill: "none",
|
3003
3003
|
xmlns: "http://www.w3.org/2000/svg"
|
3004
3004
|
};
|
3005
|
-
function
|
3006
|
-
return p(),
|
3005
|
+
function La(i, o) {
|
3006
|
+
return p(), k("svg", Ka, o[0] || (o[0] = [
|
3007
3007
|
Pe('<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-stone-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-stone-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-stone-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-stone-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-stone-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter2)"><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-stone-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-stone-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-stone-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-stone-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter2" 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)
|
3008
3008
|
]));
|
3009
3009
|
}
|
3010
|
-
const
|
3010
|
+
const Ua = /* @__PURE__ */ ve(Fa, [["render", La]]), Oa = {}, Ia = {
|
3011
3011
|
xmlns: "http://www.w3.org/2000/svg",
|
3012
3012
|
width: "21",
|
3013
3013
|
height: "20",
|
@@ -3019,19 +3019,19 @@ const Fa = /* @__PURE__ */ ve(Da, [["render", ja]]), Ka = {}, La = {
|
|
3019
3019
|
"stroke-linejoin": "round",
|
3020
3020
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"
|
3021
3021
|
};
|
3022
|
-
function
|
3023
|
-
return p(),
|
3024
|
-
|
3022
|
+
function Pa(i, o) {
|
3023
|
+
return p(), k("svg", Ia, o[0] || (o[0] = [
|
3024
|
+
a("path", {
|
3025
3025
|
stroke: "none",
|
3026
3026
|
d: "M0 0h24v24H0z",
|
3027
3027
|
fill: "none"
|
3028
3028
|
}, null, -1),
|
3029
|
-
|
3030
|
-
|
3031
|
-
|
3029
|
+
a("path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1),
|
3030
|
+
a("path", { d: "M15 4v16" }, null, -1),
|
3031
|
+
a("path", { d: "M9 10l2 2l-2 2" }, null, -1)
|
3032
3032
|
]));
|
3033
3033
|
}
|
3034
|
-
const
|
3034
|
+
const Ta = /* @__PURE__ */ ve(Oa, [["render", Pa]]), Ha = {}, Ea = {
|
3035
3035
|
xmlns: "http://www.w3.org/2000/svg",
|
3036
3036
|
width: "21",
|
3037
3037
|
height: "20",
|
@@ -3043,19 +3043,19 @@ const Oa = /* @__PURE__ */ ve(Ka, [["render", Ua]]), Pa = {}, Ia = {
|
|
3043
3043
|
"stroke-linejoin": "round",
|
3044
3044
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"
|
3045
3045
|
};
|
3046
|
-
function
|
3047
|
-
return p(),
|
3048
|
-
|
3046
|
+
function Ya(i, o) {
|
3047
|
+
return p(), k("svg", Ea, o[0] || (o[0] = [
|
3048
|
+
a("path", {
|
3049
3049
|
stroke: "none",
|
3050
3050
|
d: "M0 0h24v24H0z",
|
3051
3051
|
fill: "none"
|
3052
3052
|
}, null, -1),
|
3053
|
-
|
3054
|
-
|
3055
|
-
|
3053
|
+
a("path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1),
|
3054
|
+
a("path", { d: "M15 4v16" }, null, -1),
|
3055
|
+
a("path", { d: "M10 10l-2 2l2 2" }, null, -1)
|
3056
3056
|
]));
|
3057
3057
|
}
|
3058
|
-
const
|
3058
|
+
const Wa = /* @__PURE__ */ ve(Ha, [["render", Ya]]), qa = {}, Na = {
|
3059
3059
|
xmlns: "http://www.w3.org/2000/svg",
|
3060
3060
|
width: "24",
|
3061
3061
|
height: "24",
|
@@ -3067,19 +3067,19 @@ const Ha = /* @__PURE__ */ ve(Pa, [["render", Ta]]), Ea = {}, Ya = {
|
|
3067
3067
|
"stroke-linejoin": "round",
|
3068
3068
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map"
|
3069
3069
|
};
|
3070
|
-
function
|
3071
|
-
return p(),
|
3072
|
-
|
3070
|
+
function Ga(i, o) {
|
3071
|
+
return p(), k("svg", Na, o[0] || (o[0] = [
|
3072
|
+
a("path", {
|
3073
3073
|
stroke: "none",
|
3074
3074
|
d: "M0 0h24v24H0z",
|
3075
3075
|
fill: "none"
|
3076
3076
|
}, null, -1),
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3077
|
+
a("path", { d: "M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" }, null, -1),
|
3078
|
+
a("path", { d: "M9 4v13" }, null, -1),
|
3079
|
+
a("path", { d: "M15 7v13" }, null, -1)
|
3080
3080
|
]));
|
3081
3081
|
}
|
3082
|
-
const
|
3082
|
+
const Qa = /* @__PURE__ */ ve(qa, [["render", Ga]]), Za = {}, Ja = {
|
3083
3083
|
xmlns: "http://www.w3.org/2000/svg",
|
3084
3084
|
width: "24",
|
3085
3085
|
height: "24",
|
@@ -3091,34 +3091,34 @@ const qa = /* @__PURE__ */ ve(Ea, [["render", Wa]]), Na = {}, Ga = {
|
|
3091
3091
|
"stroke-linejoin": "round",
|
3092
3092
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-table"
|
3093
3093
|
};
|
3094
|
-
function
|
3095
|
-
return p(),
|
3096
|
-
|
3094
|
+
function Xa(i, o) {
|
3095
|
+
return p(), k("svg", Ja, o[0] || (o[0] = [
|
3096
|
+
a("path", {
|
3097
3097
|
stroke: "none",
|
3098
3098
|
d: "M0 0h24v24H0z",
|
3099
3099
|
fill: "none"
|
3100
3100
|
}, null, -1),
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3101
|
+
a("path", { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, null, -1),
|
3102
|
+
a("path", { d: "M3 10h18" }, null, -1),
|
3103
|
+
a("path", { d: "M10 3v18" }, null, -1)
|
3104
3104
|
]));
|
3105
3105
|
}
|
3106
|
-
const
|
3107
|
-
function
|
3106
|
+
const eo = /* @__PURE__ */ ve(Za, [["render", Xa]]);
|
3107
|
+
function to(i, o) {
|
3108
3108
|
let d;
|
3109
|
-
return function(...
|
3110
|
-
clearTimeout(d), d = setTimeout(() => i(...
|
3109
|
+
return function(...r) {
|
3110
|
+
clearTimeout(d), d = setTimeout(() => i(...r), o);
|
3111
3111
|
};
|
3112
3112
|
}
|
3113
|
-
function
|
3114
|
-
|
3113
|
+
function lo(i, o, d) {
|
3114
|
+
o && (o.addSource("vector", {
|
3115
3115
|
type: "vector",
|
3116
3116
|
tiles: [
|
3117
3117
|
`http://${window.location.host}/api/vtile/${i}/ua/{z}/{x}/{y}.vmt?pointZoom=12`
|
3118
3118
|
],
|
3119
3119
|
minzoom: 0,
|
3120
3120
|
maxzoom: 12
|
3121
|
-
}),
|
3121
|
+
}), o.addLayer({
|
3122
3122
|
id: "vector-circle",
|
3123
3123
|
type: "circle",
|
3124
3124
|
maxzoom: 12,
|
@@ -3131,7 +3131,7 @@ function Xa(i, r, d) {
|
|
3131
3131
|
"circle-stroke-width": 1,
|
3132
3132
|
"circle-radius": ["interpolate", ["linear"], ["zoom"], 10, 5, 15, 12]
|
3133
3133
|
}
|
3134
|
-
}),
|
3134
|
+
}), o.addLayer({
|
3135
3135
|
id: "vector-fill",
|
3136
3136
|
type: "fill",
|
3137
3137
|
minzoom: 12,
|
@@ -3169,10 +3169,10 @@ const ge = [
|
|
3169
3169
|
url: "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
|
3170
3170
|
preview: "https://mt1.google.com/vt/lyrs=s&x=2422&y=1400&z=12"
|
3171
3171
|
}
|
3172
|
-
],
|
3172
|
+
], ao = { class: "relative w-auto h-full" }, oo = { class: "absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg z-10 border" }, ro = { class: "flex justify-start items-center gap-2" }, no = { class: "ml-1 text-[0.875rem]" }, io = {
|
3173
3173
|
class: "vs-map-slot-layers z-10 select-none",
|
3174
3174
|
style: { display: "flex" }
|
3175
|
-
},
|
3175
|
+
}, so = ["title", "onClick"], uo = ["src"], co = { class: "absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] hidden whitespace-nowrap left-1/2 -translate-x-1/2" }, po = /* @__PURE__ */ Y({
|
3176
3176
|
__name: "map",
|
3177
3177
|
props: {
|
3178
3178
|
table: {},
|
@@ -3184,10 +3184,10 @@ const ge = [
|
|
3184
3184
|
map: {}
|
3185
3185
|
},
|
3186
3186
|
emits: ["update:modelValue", "update:map"],
|
3187
|
-
setup(i, { emit:
|
3188
|
-
const d = i,
|
3189
|
-
let
|
3190
|
-
const
|
3187
|
+
setup(i, { emit: o }) {
|
3188
|
+
const d = i, r = o;
|
3189
|
+
let t, s;
|
3190
|
+
const v = V(null), g = V(!1), b = V(ge[0].name), w = ge[0], m = V(null), f = V(null), y = [
|
3191
3191
|
"#2563EB",
|
3192
3192
|
// Primary Blue
|
3193
3193
|
"#60A5FA",
|
@@ -3209,25 +3209,25 @@ const ge = [
|
|
3209
3209
|
"#D1D5DB"
|
3210
3210
|
// Light Gray
|
3211
3211
|
];
|
3212
|
-
let
|
3212
|
+
let _;
|
3213
3213
|
const c = [30, 48];
|
3214
3214
|
return ue(async () => {
|
3215
|
-
|
3216
|
-
|
3217
|
-
}),
|
3215
|
+
_ = (await fetch(`/api/data/${d.table}/${d.colorAttr}`).then((l) => l.json())).rows, _.forEach((l, x) => {
|
3216
|
+
l.color || Object.assign(l, { color: y[x % 10] });
|
3217
|
+
}), s = new maplibregl.Popup({
|
3218
3218
|
closeButton: !1,
|
3219
3219
|
closeOnClick: !1
|
3220
|
-
}),
|
3221
|
-
container:
|
3220
|
+
}), t = new maplibregl.Map({
|
3221
|
+
container: v.value,
|
3222
3222
|
style: {
|
3223
3223
|
version: 8,
|
3224
3224
|
sources: {
|
3225
|
-
[
|
3225
|
+
[w.name]: { type: "raster", tiles: [w.url], tileSize: 256 }
|
3226
3226
|
},
|
3227
3227
|
layers: [{
|
3228
|
-
id:
|
3228
|
+
id: w.name,
|
3229
3229
|
type: "raster",
|
3230
|
-
source:
|
3230
|
+
source: w.name,
|
3231
3231
|
minzoom: 0,
|
3232
3232
|
maxzoom: 19
|
3233
3233
|
}]
|
@@ -3238,36 +3238,36 @@ const ge = [
|
|
3238
3238
|
minZoom: 3,
|
3239
3239
|
maxZoom: 18,
|
3240
3240
|
attributionControl: !1
|
3241
|
-
}),
|
3242
|
-
console.log("Zoom is changing:",
|
3243
|
-
}),
|
3244
|
-
|
3245
|
-
const
|
3246
|
-
|
3247
|
-
}),
|
3248
|
-
const x =
|
3249
|
-
x.length &&
|
3250
|
-
}),
|
3251
|
-
var
|
3252
|
-
const x =
|
3241
|
+
}), r("update:map", t), t.addControl(new maplibregl.NavigationControl(), "top-right"), t.on("zoom", () => {
|
3242
|
+
console.log("Zoom is changing:", t.getZoom());
|
3243
|
+
}), t.on("load", () => {
|
3244
|
+
t == null || t.resize(), g.value = !0;
|
3245
|
+
const l = _.filter((h) => h.id).reduce((h, n) => [n.id, n.color].concat(h), []), x = ["match", ["get", d.colorAttr], ...l, "#808080"];
|
3246
|
+
lo(d.table, t, x);
|
3247
|
+
}), t.on("click", (l) => {
|
3248
|
+
const x = t.queryRenderedFeatures(l.point);
|
3249
|
+
x.length && r("update:modelValue", x[0].properties.id);
|
3250
|
+
}), t.on("mousemove", (l) => {
|
3251
|
+
var M;
|
3252
|
+
const x = t.queryRenderedFeatures(l.point);
|
3253
3253
|
if (!x || !x.length) {
|
3254
|
-
|
3254
|
+
s.remove(), t.getCanvas().style.cursor = "";
|
3255
3255
|
return;
|
3256
3256
|
}
|
3257
|
-
|
3258
|
-
const
|
3259
|
-
f.value =
|
3257
|
+
t.getCanvas().style.cursor = "pointer";
|
3258
|
+
const h = x[0], { coordinates: n } = h.geometry, C = h.geometry.type === "Point" ? n : n[0][0];
|
3259
|
+
f.value = h.properties, s.setLngLat(C).setHTML((M = m.value) == null ? void 0 : M.innerHTML).addTo(t);
|
3260
3260
|
});
|
3261
|
-
}),
|
3262
|
-
|
3263
|
-
}),
|
3264
|
-
|
3265
|
-
}),
|
3266
|
-
const
|
3267
|
-
|
3268
|
-
}),
|
3269
|
-
const x = ge.find((
|
3270
|
-
x && (
|
3261
|
+
}), R(() => d.center, (u) => {
|
3262
|
+
t && t.setCenter(u || c);
|
3263
|
+
}), R(() => d.zoom, (u) => {
|
3264
|
+
t && t.setZoom(u);
|
3265
|
+
}), R(() => d.filter, (u) => {
|
3266
|
+
const l = `http://${window.location.host}/api/vtile/${d.table}/ua/{z}/{x}/{y}.vmt?pointZoom=12&filter=${u}`;
|
3267
|
+
t.getSource("vector").setTiles([l]);
|
3268
|
+
}), R(b, (u, l) => {
|
3269
|
+
const x = ge.find((h) => h.name === u);
|
3270
|
+
x && (t.removeLayer(l), t.removeSource(l), t.addSource(u, { type: "raster", tiles: [x.url], tileSize: 256 }), t.addLayer({
|
3271
3271
|
id: x.name,
|
3272
3272
|
type: "raster",
|
3273
3273
|
source: x.name,
|
@@ -3275,70 +3275,98 @@ const ge = [
|
|
3275
3275
|
maxzoom: 19
|
3276
3276
|
}, "vector-circle"));
|
3277
3277
|
}), he(() => {
|
3278
|
-
|
3279
|
-
}), (
|
3280
|
-
const x =
|
3281
|
-
return
|
3282
|
-
|
3278
|
+
t && t.remove();
|
3279
|
+
}), (u, l) => {
|
3280
|
+
const x = Xe("tooltip");
|
3281
|
+
return P((p(), k("div", ao, [
|
3282
|
+
a("div", {
|
3283
3283
|
ref_key: "mapContainer",
|
3284
|
-
ref:
|
3284
|
+
ref: v,
|
3285
3285
|
class: "map-container w-auto relative"
|
3286
3286
|
}, null, 512),
|
3287
|
-
|
3288
|
-
(p(!0),
|
3287
|
+
a("div", oo, [
|
3288
|
+
(p(!0), k(K, null, q(e(_), (h) => (p(), k("div", {
|
3289
3289
|
class: "legend-item",
|
3290
|
-
key:
|
3290
|
+
key: h.id
|
3291
3291
|
}, [
|
3292
|
-
|
3293
|
-
|
3292
|
+
a("div", ro, [
|
3293
|
+
a("div", {
|
3294
3294
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
3295
|
-
style:
|
3295
|
+
style: Ce("background-color:" + h.color)
|
3296
3296
|
}, null, 4),
|
3297
|
-
|
3297
|
+
a("div", no, L(h.text), 1)
|
3298
3298
|
])
|
3299
3299
|
]))), 128))
|
3300
3300
|
]),
|
3301
|
-
|
3301
|
+
a("div", {
|
3302
3302
|
ref_key: "popupDiv",
|
3303
|
-
ref:
|
3303
|
+
ref: m,
|
3304
3304
|
style: { display: "none" }
|
3305
3305
|
}, [
|
3306
|
-
ee(
|
3306
|
+
ee(u.$slots, "default", { hoverData: f.value })
|
3307
3307
|
], 512),
|
3308
|
-
|
3309
|
-
(p(!0),
|
3310
|
-
key:
|
3311
|
-
title:
|
3312
|
-
class:
|
3313
|
-
onClick: (
|
3308
|
+
a("div", io, [
|
3309
|
+
(p(!0), k(K, null, q(e(ge), (h) => P((p(), k("div", {
|
3310
|
+
key: h.name,
|
3311
|
+
title: h.label || h.name,
|
3312
|
+
class: F(["vs-map-slot-layers__layer relative", { focused: b.value === h.name }]),
|
3313
|
+
onClick: (n) => b.value = h.name
|
3314
3314
|
}, [
|
3315
|
-
|
3316
|
-
src:
|
3315
|
+
a("img", {
|
3316
|
+
src: h.preview,
|
3317
3317
|
class: "vs-map-slot-layers__image"
|
3318
|
-
}, null, 8,
|
3319
|
-
|
3320
|
-
], 10,
|
3321
|
-
[x,
|
3318
|
+
}, null, 8, uo),
|
3319
|
+
a("div", co, L(h.label), 1)
|
3320
|
+
], 10, so)), [
|
3321
|
+
[x, h.label || h.name]
|
3322
3322
|
])), 128))
|
3323
3323
|
])
|
3324
3324
|
], 512)), [
|
3325
|
-
[X,
|
3325
|
+
[X, g.value]
|
3326
3326
|
]);
|
3327
3327
|
};
|
3328
3328
|
}
|
3329
|
-
}),
|
3329
|
+
}), Qe = {
|
3330
|
+
mounted(i, o) {
|
3331
|
+
if (typeof document > "u") return;
|
3332
|
+
let d = null;
|
3333
|
+
const r = () => {
|
3334
|
+
d = document.createElement("div"), d.textContent = o.value, Object.assign(d.style, {
|
3335
|
+
position: "absolute",
|
3336
|
+
background: "#333",
|
3337
|
+
color: "#fff",
|
3338
|
+
padding: "4px 8px",
|
3339
|
+
borderRadius: "4px",
|
3340
|
+
fontSize: "12px",
|
3341
|
+
whiteSpace: "nowrap",
|
3342
|
+
pointerEvents: "none",
|
3343
|
+
zIndex: "9999"
|
3344
|
+
}), document.body.appendChild(d);
|
3345
|
+
const s = i.getBoundingClientRect();
|
3346
|
+
d.style.left = `${s.left + window.scrollX}px`, d.style.top = `${s.top + window.scrollY - d.offsetHeight - 5}px`;
|
3347
|
+
}, t = () => {
|
3348
|
+
d && d.parentNode && (d.parentNode.removeChild(d), d = null);
|
3349
|
+
};
|
3350
|
+
i.addEventListener("mouseenter", r), i.addEventListener("mouseleave", t), Object.assign(i, { tooltipHandlers: { showTooltip: r, hideTooltip: t } });
|
3351
|
+
},
|
3352
|
+
unmounted(i) {
|
3353
|
+
if (typeof document > "u") return;
|
3354
|
+
const o = i.tooltipHandlers;
|
3355
|
+
o && (i.removeEventListener("mouseenter", o.showTooltip), i.removeEventListener("mouseleave", o.hideTooltip));
|
3356
|
+
}
|
3357
|
+
}, fo = { class: "pt-[20px]" }, vo = { class: "w-full gap-5 inline-flex mb-[6px] pr-3" }, mo = { class: "flex items-center" }, go = ["title"], ho = { class: "max-[1000px]:flex gap-2 min-[1001px]:hidden" }, bo = { class: "flex" }, yo = {
|
3330
3358
|
key: 0,
|
3331
3359
|
class: "py-[15px] pb-[24px] pl-2"
|
3332
|
-
},
|
3360
|
+
}, xo = { class: "font-bold text-2xl mr-[10px]" }, wo = { class: "text-sm text-stone-500 font-medium" }, ko = {
|
3333
3361
|
class: "wrapperTable flex flex-col",
|
3334
3362
|
style: { height: "calc(100vh - 302px)" }
|
3335
|
-
},
|
3363
|
+
}, Co = {
|
3336
3364
|
key: 1,
|
3337
3365
|
class: "text-center py-28"
|
3338
|
-
},
|
3366
|
+
}, _o = { key: 1 }, Vo = {
|
3339
3367
|
key: 2,
|
3340
3368
|
class: "my-5 pr-2"
|
3341
|
-
},
|
3369
|
+
}, So = { class: "flex justify-between" }, Mo = { class: "w-full lg:w-1/2 relative" }, Ue = /* @__PURE__ */ Y({
|
3342
3370
|
__name: "vs-parts-map",
|
3343
3371
|
props: {
|
3344
3372
|
title: {},
|
@@ -3354,239 +3382,213 @@ const ge = [
|
|
3354
3382
|
history: { type: Boolean }
|
3355
3383
|
},
|
3356
3384
|
emits: ["change:filter", "update:map"],
|
3357
|
-
setup(i, { emit:
|
3358
|
-
var
|
3359
|
-
|
3360
|
-
|
3385
|
+
setup(i, { emit: o }) {
|
3386
|
+
var ie, ae, Ae, Re, De, ze;
|
3387
|
+
const d = et();
|
3388
|
+
d && !(d != null && d.appContext.directives.tooltip) && (d.appContext.directives.tooltip = Qe);
|
3389
|
+
function r(D) {
|
3390
|
+
return (D.type === "Point" ? D.coordinates : null) || (D.type.includes("Multi") ? D.coordinates[0][0][0] : D.coordinates[0][0]);
|
3361
3391
|
}
|
3362
|
-
const
|
3363
|
-
|
3364
|
-
const
|
3365
|
-
function
|
3366
|
-
return Object.entries(
|
3392
|
+
const t = i, s = o, v = V(0);
|
3393
|
+
v.value = t.initTotal ?? ((ie = t.rows) == null ? void 0 : ie.length) ?? 0;
|
3394
|
+
const g = V(""), b = V(null), w = V(!0), m = V(((ae = t.rows) == null ? void 0 : ae.length) === 1), f = V(0), y = V(t.rows), _ = V(1), c = V(20), u = V(t.filters || []), l = V(""), x = V({}), h = V(((Ae = t.rows) == null ? void 0 : Ae.length) === 1 ? t.rows[0] : {}), n = V(((Re = t.rows) == null ? void 0 : Re.length) === 1 ? t.rows[0].id : ""), C = V(((De = t.rows) == null ? void 0 : De.length) === 1 ? r(t.rows[0].geom) : t.center || null), M = V(((ze = t.rows) == null ? void 0 : ze.length) === 1 ? 14 : t.zoom || 5);
|
3395
|
+
function $(D) {
|
3396
|
+
return Object.entries(D).filter(([, z]) => z).map(([z, ce]) => `${z}=${ce}`).join("|");
|
3367
3397
|
}
|
3368
|
-
async function
|
3369
|
-
const
|
3370
|
-
|
3398
|
+
async function A() {
|
3399
|
+
const D = $(x.value);
|
3400
|
+
l.value = D;
|
3371
3401
|
try {
|
3372
|
-
const
|
3373
|
-
search:
|
3374
|
-
limit:
|
3375
|
-
page:
|
3376
|
-
filter:
|
3377
|
-
}, ce = new URL(`/api/data/${
|
3378
|
-
if (
|
3402
|
+
const z = {
|
3403
|
+
search: g.value,
|
3404
|
+
limit: c.value.toString(),
|
3405
|
+
page: _.value.toString(),
|
3406
|
+
filter: D
|
3407
|
+
}, ce = new URL(`/api/data/${t.table}`, window.location.origin) + (n.value ? `/${n.value}` : ""), G = new URLSearchParams(z).toString(), pe = await fetch(`${ce.toString()}?${G}`).then((me) => me.json());
|
3408
|
+
if (n.value) {
|
3379
3409
|
const [me] = pe.rows;
|
3380
|
-
|
3410
|
+
h.value = me, C.value = r(me.geom), M.value = 14, m.value = !0;
|
3381
3411
|
} else
|
3382
|
-
|
3383
|
-
|
3384
|
-
} catch (
|
3385
|
-
console.error(
|
3412
|
+
m.value = !1, M.value = t.zoom || 5, y.value = pe == null ? void 0 : pe.rows;
|
3413
|
+
v.value = pe.filtered, ka({ page: _.value, filter: D, id: n.value });
|
3414
|
+
} catch (z) {
|
3415
|
+
console.error(z.message);
|
3386
3416
|
}
|
3387
3417
|
}
|
3388
|
-
const
|
3389
|
-
function
|
3390
|
-
|
3418
|
+
const T = to(A, 300);
|
3419
|
+
function U(D) {
|
3420
|
+
c.value = D, _.value = 1, A();
|
3391
3421
|
}
|
3392
|
-
function
|
3393
|
-
|
3422
|
+
function de(D) {
|
3423
|
+
_.value = D, A();
|
3394
3424
|
}
|
3395
|
-
function
|
3396
|
-
|
3425
|
+
function J(D) {
|
3426
|
+
x.value = D.data, _.value = 1, n.value ? n.value = "" : A(), s("change:filter", D);
|
3397
3427
|
}
|
3398
|
-
async function
|
3399
|
-
if (
|
3400
|
-
const
|
3401
|
-
|
3428
|
+
async function H() {
|
3429
|
+
if (t.filters) return;
|
3430
|
+
const z = await (await fetch(`/api/filter/${t.table}`)).json();
|
3431
|
+
u.value = z.list;
|
3402
3432
|
}
|
3403
|
-
function
|
3404
|
-
|
3433
|
+
function B() {
|
3434
|
+
x.value = {}, g.value = "", A();
|
3405
3435
|
}
|
3406
3436
|
ue(async () => {
|
3407
|
-
|
3408
|
-
const
|
3409
|
-
|
3437
|
+
f.value = window.innerWidth, f.value < 1e3 && (w.value = !1);
|
3438
|
+
const D = new URLSearchParams(window.location.search);
|
3439
|
+
_.value = Number(D.get("page")) || 1, c.value = Number(D.get("limit")) || c.value, n.value = D.get("id") || "", m.value = !!n.value, H(), !y.value && !n.value && A();
|
3410
3440
|
});
|
3411
|
-
function
|
3412
|
-
|
3441
|
+
function O() {
|
3442
|
+
m.value = !1, h.value = null, n.value = "", A();
|
3413
3443
|
}
|
3414
|
-
function
|
3415
|
-
|
3444
|
+
function Q(D) {
|
3445
|
+
n.value = D.id;
|
3416
3446
|
}
|
3417
|
-
return
|
3418
|
-
|
3419
|
-
}),
|
3420
|
-
|
3421
|
-
}),
|
3422
|
-
|
3423
|
-
}), (
|
3447
|
+
return R(b, (D) => {
|
3448
|
+
s("update:map", D);
|
3449
|
+
}), R(g, (D) => {
|
3450
|
+
D || A();
|
3451
|
+
}), R(n, () => {
|
3452
|
+
A();
|
3453
|
+
}), (D, z) => {
|
3424
3454
|
var ce;
|
3425
|
-
return p(),
|
3426
|
-
ee(
|
3427
|
-
title:
|
3428
|
-
total:
|
3455
|
+
return p(), k("section", fo, [
|
3456
|
+
ee(D.$slots, "header", {
|
3457
|
+
title: t.title,
|
3458
|
+
total: v.value
|
3429
3459
|
}),
|
3430
|
-
|
3431
|
-
|
3460
|
+
a("div", vo, [
|
3461
|
+
I(e(ne), {
|
3432
3462
|
type: "text",
|
3433
|
-
modelValue:
|
3434
|
-
"onUpdate:modelValue":
|
3463
|
+
modelValue: g.value,
|
3464
|
+
"onUpdate:modelValue": z[0] || (z[0] = (G) => g.value = G),
|
3435
3465
|
name: "search",
|
3436
3466
|
label: "Пошук",
|
3437
|
-
onChange: e(
|
3467
|
+
onChange: e(T)
|
3438
3468
|
}, null, 8, ["modelValue", "onChange"]),
|
3439
|
-
|
3469
|
+
u.value.length ? (p(), j(e(xe), {
|
3440
3470
|
key: 0,
|
3441
|
-
schema:
|
3471
|
+
schema: u.value,
|
3442
3472
|
view: "inline",
|
3443
|
-
onChange:
|
3473
|
+
onChange: J,
|
3444
3474
|
limit: 5,
|
3445
|
-
value:
|
3475
|
+
value: x.value,
|
3446
3476
|
ref: "filterRef"
|
3447
3477
|
}, null, 8, ["schema", "value"])) : S("", !0),
|
3448
|
-
|
3449
|
-
|
3478
|
+
a("div", mo, [
|
3479
|
+
a("button", {
|
3450
3480
|
type: "button",
|
3451
3481
|
class: "map-visible-button py-2 px-2 hidden min-[1001px]:inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",
|
3452
|
-
title:
|
3453
|
-
onClick:
|
3482
|
+
title: w.value ? "Приховати карту" : "Показати карту",
|
3483
|
+
onClick: z[1] || (z[1] = (G) => w.value = !w.value)
|
3454
3484
|
}, [
|
3455
|
-
|
3456
|
-
|
3457
|
-
], 8,
|
3458
|
-
|
3459
|
-
|
3460
|
-
onClick:
|
3485
|
+
w.value ? (p(), j(Ta, { key: 0 })) : (p(), j(Wa, { key: 1 })),
|
3486
|
+
z[8] || (z[8] = a("span", { class: "sr-only" }, "Відкрити мапу", -1))
|
3487
|
+
], 8, go),
|
3488
|
+
a("div", ho, [
|
3489
|
+
a("button", {
|
3490
|
+
onClick: z[2] || (z[2] = (G) => w.value = !1),
|
3461
3491
|
class: "py-2 px-2 h-[38px] inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"
|
3462
3492
|
}, [
|
3463
|
-
|
3493
|
+
I(eo)
|
3464
3494
|
]),
|
3465
|
-
|
3466
|
-
onClick:
|
3495
|
+
a("button", {
|
3496
|
+
onClick: z[3] || (z[3] = (G) => w.value = !0),
|
3467
3497
|
class: "py-2 px-2 h-[38px] inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"
|
3468
3498
|
}, [
|
3469
|
-
|
3499
|
+
I(Qa)
|
3470
3500
|
])
|
3471
3501
|
])
|
3472
3502
|
])
|
3473
3503
|
]),
|
3474
|
-
|
3475
|
-
|
3476
|
-
class:
|
3504
|
+
a("div", bo, [
|
3505
|
+
a("div", {
|
3506
|
+
class: F([
|
3477
3507
|
"relative overflow-hidden shrink-0",
|
3478
|
-
|
3479
|
-
|
3508
|
+
w.value ? "w-2/4 mr-0" : "w-full mr-3",
|
3509
|
+
m.value ? "hidden" : ""
|
3480
3510
|
])
|
3481
3511
|
}, [
|
3482
|
-
(ce =
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3512
|
+
(ce = D.$slots) != null && ce.header ? S("", !0) : (p(), k("h1", yo, [
|
3513
|
+
a("span", xo, L(t.title), 1),
|
3514
|
+
a("span", wo, L(v.value), 1),
|
3515
|
+
z[9] || (z[9] = a("span", { class: "text-sm text-stone-500 font-medium" }, " об'єктів", -1))
|
3486
3516
|
])),
|
3487
|
-
|
3488
|
-
|
3517
|
+
a("div", ko, [
|
3518
|
+
v.value >= 1 ? ee(D.$slots, "table", {
|
3489
3519
|
key: 0,
|
3490
|
-
rows:
|
3491
|
-
selectRow:
|
3492
|
-
}) : (p(),
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3520
|
+
rows: y.value,
|
3521
|
+
selectRow: Q
|
3522
|
+
}) : (p(), k("div", Co, [
|
3523
|
+
I(Ua),
|
3524
|
+
z[10] || (z[10] = a("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1)),
|
3525
|
+
z[11] || (z[11] = a("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1)),
|
3526
|
+
a("button", {
|
3497
3527
|
type: "button",
|
3498
3528
|
class: "mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",
|
3499
|
-
onClick:
|
3529
|
+
onClick: B
|
3500
3530
|
}, " Очистити дані пошуку ")
|
3501
3531
|
]))
|
3502
3532
|
]),
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3507
|
-
total:
|
3508
|
-
currentPage:
|
3509
|
-
pageSize:
|
3510
|
-
onPageChange:
|
3511
|
-
onPageSizeChange:
|
3533
|
+
v.value >= 1 ? (p(), k("hr", _o)) : S("", !0),
|
3534
|
+
v.value >= 1 ? (p(), k("div", Vo, [
|
3535
|
+
a("div", So, [
|
3536
|
+
I(ja, {
|
3537
|
+
total: v.value,
|
3538
|
+
currentPage: _.value ?? 1,
|
3539
|
+
pageSize: c.value,
|
3540
|
+
onPageChange: z[4] || (z[4] = (G) => de(G)),
|
3541
|
+
onPageSizeChange: z[5] || (z[5] = (G) => U(G))
|
3512
3542
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
3513
3543
|
])
|
3514
3544
|
])) : S("", !0)
|
3515
3545
|
], 2),
|
3516
|
-
|
3546
|
+
m.value ? (p(), k("div", {
|
3517
3547
|
key: 0,
|
3518
|
-
class:
|
3519
|
-
|
3548
|
+
class: F(
|
3549
|
+
w.value ? "lg:static lg:w-1/2 mr-0 pb-5" : "pb-5 mr-3"
|
3520
3550
|
),
|
3521
3551
|
style: { height: "calc(100vh - 152px)" }
|
3522
3552
|
}, [
|
3523
|
-
ee(
|
3524
|
-
table:
|
3525
|
-
selectedRow:
|
3526
|
-
closeObjCard:
|
3553
|
+
ee(D.$slots, "details", {
|
3554
|
+
table: t.table,
|
3555
|
+
selectedRow: h.value,
|
3556
|
+
closeObjCard: O
|
3527
3557
|
})
|
3528
3558
|
], 2)) : S("", !0),
|
3529
|
-
|
3530
|
-
|
3531
|
-
table:
|
3532
|
-
map:
|
3533
|
-
"onUpdate:map":
|
3534
|
-
zoom:
|
3535
|
-
colorAttr:
|
3536
|
-
filter:
|
3537
|
-
center:
|
3538
|
-
modelValue:
|
3539
|
-
"onUpdate:modelValue":
|
3559
|
+
P(a("div", Mo, [
|
3560
|
+
I(po, {
|
3561
|
+
table: t.table,
|
3562
|
+
map: b.value,
|
3563
|
+
"onUpdate:map": z[6] || (z[6] = (G) => b.value = G),
|
3564
|
+
zoom: M.value,
|
3565
|
+
colorAttr: t.colorAttr,
|
3566
|
+
filter: l.value,
|
3567
|
+
center: C.value,
|
3568
|
+
modelValue: n.value,
|
3569
|
+
"onUpdate:modelValue": z[7] || (z[7] = (G) => n.value = G)
|
3540
3570
|
}, {
|
3541
|
-
default: re(({ hoverData:
|
3542
|
-
ee(
|
3571
|
+
default: re(({ hoverData: G }) => [
|
3572
|
+
ee(D.$slots, "popup", { data: G })
|
3543
3573
|
]),
|
3544
3574
|
_: 3
|
3545
3575
|
}, 8, ["table", "map", "zoom", "colorAttr", "filter", "center", "modelValue"]),
|
3546
|
-
ee(
|
3547
|
-
table:
|
3548
|
-
map:
|
3549
|
-
selectedRow:
|
3576
|
+
ee(D.$slots, "default", {
|
3577
|
+
table: t.table,
|
3578
|
+
map: b.value,
|
3579
|
+
selectedRow: h.value
|
3550
3580
|
})
|
3551
3581
|
], 512), [
|
3552
|
-
[X,
|
3582
|
+
[X, w.value]
|
3553
3583
|
])
|
3554
3584
|
])
|
3555
3585
|
]);
|
3556
3586
|
};
|
3557
3587
|
}
|
3558
|
-
})
|
3559
|
-
|
3560
|
-
|
3561
|
-
let d = null;
|
3562
|
-
const l = () => {
|
3563
|
-
d = document.createElement("div"), d.textContent = r.value, Object.assign(d.style, {
|
3564
|
-
position: "absolute",
|
3565
|
-
background: "#333",
|
3566
|
-
color: "#fff",
|
3567
|
-
padding: "4px 8px",
|
3568
|
-
borderRadius: "4px",
|
3569
|
-
fontSize: "12px",
|
3570
|
-
whiteSpace: "nowrap",
|
3571
|
-
pointerEvents: "none",
|
3572
|
-
zIndex: "9999"
|
3573
|
-
}), document.body.appendChild(d);
|
3574
|
-
const n = i.getBoundingClientRect();
|
3575
|
-
d.style.left = `${n.left + window.scrollX}px`, d.style.top = `${n.top + window.scrollY - d.offsetHeight - 5}px`;
|
3576
|
-
}, a = () => {
|
3577
|
-
d && d.parentNode && (d.parentNode.removeChild(d), d = null);
|
3578
|
-
};
|
3579
|
-
i.addEventListener("mouseenter", l), i.addEventListener("mouseleave", a), Object.assign(i, { tooltipHandlers: { showTooltip: l, hideTooltip: a } });
|
3580
|
-
},
|
3581
|
-
unmounted(i) {
|
3582
|
-
if (typeof document > "u") return;
|
3583
|
-
const r = i.tooltipHandlers;
|
3584
|
-
r && (i.removeEventListener("mouseenter", r.showTooltip), i.removeEventListener("mouseleave", r.hideTooltip));
|
3585
|
-
}
|
3586
|
-
};
|
3587
|
-
Le.install = (i) => {
|
3588
|
-
i.component("VsPartsMap", Le), i._context.directives.tooltip || i.directive("tooltip", Vo);
|
3588
|
+
});
|
3589
|
+
Ue.install = (i) => {
|
3590
|
+
i.component("VsPartsMap", Ue), i._context.directives.tooltip || i.directive("tooltip", Qe);
|
3589
3591
|
};
|
3590
3592
|
export {
|
3591
|
-
|
3593
|
+
Ue as default
|
3592
3594
|
};
|