@opengis/partsmap 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +835 -844
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as Q, ref as V, computed as W, watch as j, openBlock as f, createBlock as P, resolveDynamicComponent as xe, mergeProps as ie, withCtx as we, renderSlot as fe, createElementBlock as w, createElementVNode as l, toDisplayString as O, createCommentVNode as S, unref as e, useSlots as Fe, normalizeClass as U, createVNode as Y, createTextVNode as ee, Fragment as I, renderList as ae, toRaw as $e, onMounted as Ce, onBeforeUnmount as Me, Teleport as Qe, withDirectives as N, normalizeStyle as Le, vShow as ce, cloneVNode as dt, nextTick as Ae, vModelText as ve, isRef as pt, withModifiers as Ge, createStaticVNode as Je, getCurrentInstance as Xe, resolveDirective as ft, vModelCheckbox as vt } from "vue";
|
|
2
|
+
const mt = { class: "flex items-center justify-between w-full text-sm" }, ht = { class: "flex items-center cursor-pointer w-full" }, gt = {
|
|
3
3
|
key: 0,
|
|
4
4
|
width: "16",
|
|
5
5
|
height: "auto",
|
|
6
6
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
7
|
-
},
|
|
7
|
+
}, yt = ["value"], bt = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, xt = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, wt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
|
|
10
|
-
},
|
|
10
|
+
}, Pe = /* @__PURE__ */ Q({
|
|
11
11
|
__name: "list-item",
|
|
12
12
|
props: {
|
|
13
13
|
layout: {},
|
|
@@ -31,33 +31,33 @@ const gt = { class: "flex items-center justify-between w-full text-sm" }, yt = {
|
|
|
31
31
|
ref_key: "el",
|
|
32
32
|
ref: u
|
|
33
33
|
}, [
|
|
34
|
-
l("div",
|
|
35
|
-
l("div",
|
|
34
|
+
l("div", mt, [
|
|
35
|
+
l("div", ht, [
|
|
36
36
|
l("label", {
|
|
37
37
|
for: "radio-9740",
|
|
38
|
-
class:
|
|
38
|
+
class: U([
|
|
39
39
|
["inline", "popover"].includes(h.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
40
|
{ "bg-blue-100": h.highlighted }
|
|
41
41
|
]),
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: Ge(c, ["stop", "prevent"])
|
|
43
43
|
}, [
|
|
44
44
|
l("div", {
|
|
45
|
-
class:
|
|
45
|
+
class: U(["w-[18px] h-[18px] border flex items-center justify-center", [
|
|
46
46
|
h.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
|
|
47
47
|
h.color ? `bg-[${h.color}] border-[#ffffff]` : h.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
|
|
48
48
|
]])
|
|
49
49
|
}, [
|
|
50
|
-
h.isSelected ? (f(), w("img",
|
|
50
|
+
h.isSelected ? (f(), w("img", gt)) : S("", !0)
|
|
51
51
|
], 2),
|
|
52
52
|
l("input", {
|
|
53
53
|
type: "checkbox",
|
|
54
54
|
class: "hidden",
|
|
55
55
|
id: "radio-9740",
|
|
56
56
|
value: h.value
|
|
57
|
-
}, null, 8,
|
|
58
|
-
l("div",
|
|
59
|
-
l("span",
|
|
60
|
-
h.count ? (f(), w("div",
|
|
57
|
+
}, null, 8, yt),
|
|
58
|
+
l("div", bt, [
|
|
59
|
+
l("span", xt, O(h.label ?? "Відсутні данні"), 1),
|
|
60
|
+
h.count ? (f(), w("div", wt, " (" + O(h.count) + ") ", 1)) : S("", !0)
|
|
61
61
|
])
|
|
62
62
|
], 2)
|
|
63
63
|
])
|
|
@@ -65,7 +65,7 @@ const gt = { class: "flex items-center justify-between w-full text-sm" }, yt = {
|
|
|
65
65
|
], 512));
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
function
|
|
68
|
+
function et(i, r) {
|
|
69
69
|
const {
|
|
70
70
|
options: n = [],
|
|
71
71
|
limit: o = 20
|
|
@@ -75,18 +75,18 @@ function lt(i, r) {
|
|
|
75
75
|
}
|
|
76
76
|
const c = V(t(i.modelValue)), u = V(""), h = V(!1), m = V([]), x = V("id"), g = V("text"), d = V(!1), y = V(i.layout !== "popover" && n.length > o);
|
|
77
77
|
function _(s) {
|
|
78
|
-
const k = s.find(Boolean) ?? {},
|
|
79
|
-
return { autoValueKey:
|
|
78
|
+
const k = s.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((R) => R in k) ?? "id", A = ["text", "label", "name", "title"].find((R) => R in k) ?? "text";
|
|
79
|
+
return { autoValueKey: B, autoLabelKey: A };
|
|
80
80
|
}
|
|
81
81
|
if (n.length > 0) {
|
|
82
82
|
const s = _(n);
|
|
83
83
|
x.value = s.autoValueKey, g.value = s.autoLabelKey;
|
|
84
84
|
}
|
|
85
|
-
const v =
|
|
85
|
+
const v = W(() => {
|
|
86
86
|
const s = m.value;
|
|
87
87
|
return i.layout === "popover" || d.value ? s : s.slice(0, o);
|
|
88
88
|
});
|
|
89
|
-
|
|
89
|
+
j(() => i.modelValue, (s) => {
|
|
90
90
|
c.value = t(s);
|
|
91
91
|
}, { immediate: !0 }), m.value = [...n].sort((s, k) => i.sort === "count" ? k.count && s.count ? k.count - s.count : 0 : i.sort === "name" ? String(s[g.value] ?? "").localeCompare(String(k[g.value] ?? "")) : 0);
|
|
92
92
|
function p(s) {
|
|
@@ -117,23 +117,23 @@ function lt(i, r) {
|
|
|
117
117
|
allOptions: m
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const me = (i, r) => {
|
|
121
121
|
const n = i.__vccOpts || i;
|
|
122
122
|
for (const [o, t] of r)
|
|
123
123
|
n[o] = t;
|
|
124
124
|
return n;
|
|
125
|
-
},
|
|
125
|
+
}, kt = {}, _t = {
|
|
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 f(), w("svg",
|
|
133
|
-
|
|
131
|
+
function Ct(i, r) {
|
|
132
|
+
return f(), w("svg", _t, r[0] || (r[0] = [
|
|
133
|
+
Je('<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
|
|
136
|
+
const Ke = /* @__PURE__ */ me(kt, [["render", Ct]]), Vt = {}, St = {
|
|
137
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
138
138
|
width: "24",
|
|
139
139
|
height: "24",
|
|
@@ -145,8 +145,8 @@ const Ie = /* @__PURE__ */ ve(Ct, [["render", St]]), $t = {}, Mt = {
|
|
|
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 f(), w("svg",
|
|
148
|
+
function $t(i, r) {
|
|
149
|
+
return f(), w("svg", St, r[0] || (r[0] = [
|
|
150
150
|
l("path", {
|
|
151
151
|
stroke: "none",
|
|
152
152
|
d: "M0 0h24v24H0z",
|
|
@@ -155,7 +155,7 @@ function Bt(i, r) {
|
|
|
155
155
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
156
156
|
]));
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const Re = /* @__PURE__ */ me(Vt, [["render", $t]]), Mt = {}, Bt = {
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
160
160
|
width: "24",
|
|
161
161
|
height: "24",
|
|
@@ -167,8 +167,8 @@ const De = /* @__PURE__ */ ve($t, [["render", Bt]]), zt = {}, At = {
|
|
|
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 f(), w("svg",
|
|
170
|
+
function zt(i, r) {
|
|
171
|
+
return f(), w("svg", Bt, r[0] || (r[0] = [
|
|
172
172
|
l("path", {
|
|
173
173
|
stroke: "none",
|
|
174
174
|
d: "M0 0h24v24H0z",
|
|
@@ -177,16 +177,16 @@ function jt(i, r) {
|
|
|
177
177
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
178
178
|
]));
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const Ue = /* @__PURE__ */ me(Mt, [["render", zt]]), At = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "w-full"
|
|
183
|
-
},
|
|
183
|
+
}, Rt = { class: "flex flex-col items-center justify-center p-5 text-center" }, jt = {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
186
|
-
},
|
|
186
|
+
}, Dt = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
189
|
-
},
|
|
189
|
+
}, Ft = /* @__PURE__ */ Q({
|
|
190
190
|
__name: "radio",
|
|
191
191
|
props: {
|
|
192
192
|
id: {},
|
|
@@ -226,28 +226,28 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
226
226
|
labelKey: p,
|
|
227
227
|
valueKey: a,
|
|
228
228
|
allOptions: C
|
|
229
|
-
} =
|
|
229
|
+
} = et({
|
|
230
230
|
...o,
|
|
231
231
|
modelValue: o.modelValue ?? o.default ?? ""
|
|
232
232
|
}, c);
|
|
233
233
|
return r({
|
|
234
234
|
clear: g,
|
|
235
235
|
inputTextRef: t
|
|
236
|
-
}),
|
|
236
|
+
}), j(
|
|
237
237
|
() => o.modelValue,
|
|
238
238
|
(b) => {
|
|
239
239
|
b === void 0 && (u.value = void 0);
|
|
240
240
|
}
|
|
241
241
|
), (b, s) => (f(), w("div", {
|
|
242
|
-
class:
|
|
242
|
+
class: U([b.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
|
|
243
243
|
}, [
|
|
244
244
|
l("div", {
|
|
245
|
-
class:
|
|
245
|
+
class: U([
|
|
246
246
|
b.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
247
247
|
b.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
248
248
|
])
|
|
249
249
|
}, [
|
|
250
|
-
(f(!0), w(
|
|
250
|
+
(f(!0), w(I, null, ae(e(h), (k) => (f(), P(Pe, {
|
|
251
251
|
layout: b.layout,
|
|
252
252
|
key: k[e(a)],
|
|
253
253
|
count: k.count,
|
|
@@ -256,19 +256,19 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
256
256
|
type: "radio",
|
|
257
257
|
value: k[e(a)],
|
|
258
258
|
"is-selected": e(m)(k),
|
|
259
|
-
onItemClick: (
|
|
259
|
+
onItemClick: (B) => e(x)(k)
|
|
260
260
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
|
261
261
|
], 2),
|
|
262
|
-
b.type === "select" && e(h).length === 0 && !e(y) ? (f(), w("div",
|
|
263
|
-
l("div",
|
|
264
|
-
Y(
|
|
262
|
+
b.type === "select" && e(h).length === 0 && !e(y) ? (f(), w("div", At, [
|
|
263
|
+
l("div", Rt, [
|
|
264
|
+
Y(Ke),
|
|
265
265
|
s[4] || (s[4] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
266
266
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
267
267
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
268
268
|
], -1))
|
|
269
269
|
])
|
|
270
270
|
])) : S("", !0),
|
|
271
|
-
b.layout !== "popover" && b.type !== "select" ? (f(), w(
|
|
271
|
+
b.layout !== "popover" && b.type !== "select" ? (f(), w(I, { key: 1 }, [
|
|
272
272
|
!e(_) && e(v) ? (f(), w("div", {
|
|
273
273
|
key: 0,
|
|
274
274
|
onClick: s[0] || (s[0] = //@ts-ignore
|
|
@@ -276,7 +276,7 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
276
276
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
277
277
|
}, [
|
|
278
278
|
s[5] || (s[5] = ee(" Показати більше ", -1)),
|
|
279
|
-
Y(
|
|
279
|
+
Y(Re)
|
|
280
280
|
])) : S("", !0),
|
|
281
281
|
e(_) ? (f(), w("div", {
|
|
282
282
|
key: 1,
|
|
@@ -285,12 +285,12 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
285
285
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
286
286
|
}, [
|
|
287
287
|
s[6] || (s[6] = ee(" Показати менше ", -1)),
|
|
288
|
-
Y(
|
|
288
|
+
Y(Ue)
|
|
289
289
|
])) : S("", !0)
|
|
290
290
|
], 64)) : S("", !0),
|
|
291
|
-
b.cleanable ? (f(), w(
|
|
292
|
-
b.layout === "inline" ? (f(), w("div",
|
|
293
|
-
ee(
|
|
291
|
+
b.cleanable ? (f(), w(I, { key: 2 }, [
|
|
292
|
+
b.layout === "inline" ? (f(), w("div", jt, [
|
|
293
|
+
ee(O(e(u) || e(u) === null ? 1 : 0) + " з " + O(e(C).length) + " обрано ", 1),
|
|
294
294
|
N(l("button", {
|
|
295
295
|
class: "text-gray-600 hover:text-gray-800",
|
|
296
296
|
onClick: s[2] || (s[2] = //@ts-ignore
|
|
@@ -299,8 +299,8 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
299
299
|
[ce, e(u) !== "" && e(u) !== void 0]
|
|
300
300
|
])
|
|
301
301
|
])) : S("", !0),
|
|
302
|
-
b.layout === "popover" ? (f(), w("div",
|
|
303
|
-
l("span", null,
|
|
302
|
+
b.layout === "popover" ? (f(), w("div", Dt, [
|
|
303
|
+
l("span", null, O(e(u) || e(u) === null ? 1 : 0) + " з " + O(e(C).length) + " обрано", 1),
|
|
304
304
|
N(l("button", {
|
|
305
305
|
class: "text-gray-600 hover:text-gray-800",
|
|
306
306
|
onClick: s[3] || (s[3] = //@ts-ignore
|
|
@@ -313,7 +313,7 @@ const Oe = /* @__PURE__ */ ve(zt, [["render", jt]]), Rt = {
|
|
|
313
313
|
], 2));
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
|
-
function
|
|
316
|
+
function tt(i, r) {
|
|
317
317
|
const {
|
|
318
318
|
options: n = [],
|
|
319
319
|
limit: o = 20
|
|
@@ -323,18 +323,18 @@ function at(i, r) {
|
|
|
323
323
|
}
|
|
324
324
|
const c = V(t(i.modelValue)), u = V(""), h = V(!1), m = V([]), x = V("id"), g = V("text"), d = V(!1), y = V(i.layout !== "popover" && n.length > o);
|
|
325
325
|
function _(s) {
|
|
326
|
-
const k = s.find(Boolean) ?? {},
|
|
327
|
-
return { autoValueKey:
|
|
326
|
+
const k = s.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((R) => R in k) ?? "id", A = ["text", "label", "name", "title"].find((R) => R in k) ?? "text";
|
|
327
|
+
return { autoValueKey: B, autoLabelKey: A };
|
|
328
328
|
}
|
|
329
329
|
if (n.length > 0) {
|
|
330
330
|
const s = _(n);
|
|
331
331
|
x.value = s.autoValueKey, g.value = s.autoLabelKey;
|
|
332
332
|
}
|
|
333
|
-
const v =
|
|
333
|
+
const v = W(() => {
|
|
334
334
|
const s = m.value;
|
|
335
335
|
return i.layout === "popover" || d.value ? s : s.slice(0, o);
|
|
336
336
|
});
|
|
337
|
-
|
|
337
|
+
j(() => i.modelValue, (s) => {
|
|
338
338
|
c.value = t(s);
|
|
339
339
|
}, { immediate: !0 }), m.value = [...n].sort((s, k) => i.sort === "count" ? k.count && s.count ? k.count - s.count : 0 : i.sort === "name" ? String(s[g.value]).localeCompare(String(k[g.value])) : 0);
|
|
340
340
|
function p(s) {
|
|
@@ -342,7 +342,7 @@ function at(i, r) {
|
|
|
342
342
|
}
|
|
343
343
|
function a(s) {
|
|
344
344
|
const k = c.value.includes(s[x.value]);
|
|
345
|
-
c.value = k ? c.value.filter((
|
|
345
|
+
c.value = k ? c.value.filter((B) => B !== s[x.value]) : [...c.value, s[x.value]], r("update:modelValue", c.value), r("change", { name: i.name, value: c.value });
|
|
346
346
|
}
|
|
347
347
|
function C() {
|
|
348
348
|
c.value = [], r("update:modelValue", c.value), r("clear", i.name);
|
|
@@ -366,16 +366,16 @@ function at(i, r) {
|
|
|
366
366
|
allOptions: m
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Lt = {
|
|
370
370
|
key: 0,
|
|
371
371
|
class: "w-full"
|
|
372
|
-
},
|
|
372
|
+
}, Pt = { class: "flex flex-col items-center justify-center p-5 text-center" }, Kt = {
|
|
373
373
|
key: 0,
|
|
374
374
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
375
|
-
},
|
|
375
|
+
}, Ut = {
|
|
376
376
|
key: 1,
|
|
377
377
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
378
|
-
},
|
|
378
|
+
}, He = /* @__PURE__ */ Q({
|
|
379
379
|
__name: "checkbox",
|
|
380
380
|
props: {
|
|
381
381
|
id: {},
|
|
@@ -415,11 +415,11 @@ const Kt = {
|
|
|
415
415
|
labelKey: v,
|
|
416
416
|
valueKey: p,
|
|
417
417
|
allOptions: a
|
|
418
|
-
} =
|
|
418
|
+
} = tt({
|
|
419
419
|
...o,
|
|
420
420
|
modelValue: o.modelValue
|
|
421
421
|
}, t);
|
|
422
|
-
return
|
|
422
|
+
return j(
|
|
423
423
|
() => o.modelValue,
|
|
424
424
|
(C) => {
|
|
425
425
|
C === void 0 && (c.value = []);
|
|
@@ -427,15 +427,15 @@ const Kt = {
|
|
|
427
427
|
), r({
|
|
428
428
|
clear: x
|
|
429
429
|
}), (C, b) => (f(), w("div", {
|
|
430
|
-
class:
|
|
430
|
+
class: U([C.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
431
431
|
}, [
|
|
432
432
|
l("div", {
|
|
433
|
-
class:
|
|
433
|
+
class: U([
|
|
434
434
|
C.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
435
435
|
C.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
436
436
|
])
|
|
437
437
|
}, [
|
|
438
|
-
(f(!0), w(
|
|
438
|
+
(f(!0), w(I, null, ae(e(u), (s) => (f(), P(Pe, {
|
|
439
439
|
layout: C.layout,
|
|
440
440
|
count: s.count,
|
|
441
441
|
label: s[e(v)],
|
|
@@ -446,16 +446,16 @@ const Kt = {
|
|
|
446
446
|
onItemClick: (k) => e(m)(s)
|
|
447
447
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
|
|
448
448
|
], 2),
|
|
449
|
-
C.type === "select" && e(u).length === 0 && !e(d) ? (f(), w("div",
|
|
450
|
-
l("div",
|
|
451
|
-
Y(
|
|
449
|
+
C.type === "select" && e(u).length === 0 && !e(d) ? (f(), w("div", Lt, [
|
|
450
|
+
l("div", Pt, [
|
|
451
|
+
Y(Ke),
|
|
452
452
|
b[4] || (b[4] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
453
453
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
454
454
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
455
455
|
], -1))
|
|
456
456
|
])
|
|
457
457
|
])) : S("", !0),
|
|
458
|
-
C.layout !== "popover" && C.type !== "select" ? (f(), w(
|
|
458
|
+
C.layout !== "popover" && C.type !== "select" ? (f(), w(I, { key: 1 }, [
|
|
459
459
|
!e(y) && e(_) ? (f(), w("div", {
|
|
460
460
|
key: 0,
|
|
461
461
|
onClick: b[0] || (b[0] = //@ts-ignore
|
|
@@ -463,7 +463,7 @@ const Kt = {
|
|
|
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
465
|
b[5] || (b[5] = ee(" Показати більше ", -1)),
|
|
466
|
-
Y(
|
|
466
|
+
Y(Re)
|
|
467
467
|
])) : S("", !0),
|
|
468
468
|
e(y) ? (f(), w("div", {
|
|
469
469
|
key: 1,
|
|
@@ -472,12 +472,12 @@ const Kt = {
|
|
|
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
474
|
b[6] || (b[6] = ee(" Показати менше ", -1)),
|
|
475
|
-
Y(
|
|
475
|
+
Y(Ue)
|
|
476
476
|
])) : S("", !0)
|
|
477
477
|
], 64)) : S("", !0),
|
|
478
|
-
C.cleanable ? (f(), w(
|
|
479
|
-
C.layout === "inline" ? (f(), w("div",
|
|
480
|
-
ee(
|
|
478
|
+
C.cleanable ? (f(), w(I, { key: 2 }, [
|
|
479
|
+
C.layout === "inline" ? (f(), w("div", Kt, [
|
|
480
|
+
ee(O(e(c).length) + " з " + O(e(a).length) + " обрано ", 1),
|
|
481
481
|
N(l("button", {
|
|
482
482
|
class: "text-gray-600 hover:text-gray-800",
|
|
483
483
|
onClick: b[2] || (b[2] = //@ts-ignore
|
|
@@ -486,8 +486,8 @@ const Kt = {
|
|
|
486
486
|
[ce, e(c).length !== 0]
|
|
487
487
|
])
|
|
488
488
|
])) : S("", !0),
|
|
489
|
-
C.layout === "popover" ? (f(), w("div",
|
|
490
|
-
l("span", null,
|
|
489
|
+
C.layout === "popover" ? (f(), w("div", Ut, [
|
|
490
|
+
l("span", null, O(e(c).length) + " з " + O(e(a).length) + " обрано", 1),
|
|
491
491
|
N(l("button", {
|
|
492
492
|
class: "text-gray-600 hover:text-gray-800",
|
|
493
493
|
onClick: b[3] || (b[3] = //@ts-ignore
|
|
@@ -499,7 +499,7 @@ const Kt = {
|
|
|
499
499
|
], 64)) : S("", !0)
|
|
500
500
|
], 2));
|
|
501
501
|
}
|
|
502
|
-
}),
|
|
502
|
+
}), It = {}, Ot = {
|
|
503
503
|
xmlns: "http://www.w3.org/2000/svg",
|
|
504
504
|
width: "15px",
|
|
505
505
|
height: "15px",
|
|
@@ -511,8 +511,8 @@ const Kt = {
|
|
|
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 f(), w("svg",
|
|
514
|
+
function Tt(i, r) {
|
|
515
|
+
return f(), w("svg", Ot, r[0] || (r[0] = [
|
|
516
516
|
l("path", {
|
|
517
517
|
stroke: "none",
|
|
518
518
|
d: "M0 0h24v24H0z",
|
|
@@ -522,7 +522,7 @@ function Et(i, r) {
|
|
|
522
522
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
523
523
|
]));
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const lt = /* @__PURE__ */ me(It, [["render", Tt]]), Ht = {}, Et = {
|
|
526
526
|
xmlns: "http://www.w3.org/2000/svg",
|
|
527
527
|
viewBox: "0 0 24 24",
|
|
528
528
|
fill: "none",
|
|
@@ -534,8 +534,8 @@ const ot = /* @__PURE__ */ ve(Tt, [["render", Et]]), Nt = {}, Wt = {
|
|
|
534
534
|
width: "15px",
|
|
535
535
|
height: "15px"
|
|
536
536
|
};
|
|
537
|
-
function
|
|
538
|
-
return f(), w("svg",
|
|
537
|
+
function Nt(i, r) {
|
|
538
|
+
return f(), w("svg", Et, r[0] || (r[0] = [
|
|
539
539
|
l("path", {
|
|
540
540
|
stroke: "none",
|
|
541
541
|
d: "M0 0h24v24H0z",
|
|
@@ -545,13 +545,13 @@ function Zt(i, r) {
|
|
|
545
545
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
546
546
|
]));
|
|
547
547
|
}
|
|
548
|
-
const
|
|
549
|
-
class
|
|
548
|
+
const at = /* @__PURE__ */ me(Ht, [["render", Nt]]);
|
|
549
|
+
class je {
|
|
550
550
|
static getWidthClass(r) {
|
|
551
551
|
return typeof r == "number" ? `max-w-[${r}px]` : typeof r == "string" ? r.endsWith("%") || r.endsWith("px") ? `max-w-[${r}]` : `max-w-${r}` : "w-full";
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
const
|
|
554
|
+
const Wt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Zt = ["placeholder"], Yt = /* @__PURE__ */ Q({
|
|
555
555
|
__name: "text-input",
|
|
556
556
|
props: {
|
|
557
557
|
id: {},
|
|
@@ -579,7 +579,7 @@ const Yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
579
579
|
emits: ["update:modelValue", "change", "clear"],
|
|
580
580
|
setup(i, { emit: r }) {
|
|
581
581
|
const n = i, o = V((n.placeHolder || n.label || n.name || "search").toString()), t = r, c = V(n.modelValue ?? "");
|
|
582
|
-
|
|
582
|
+
j(
|
|
583
583
|
() => n.modelValue,
|
|
584
584
|
(m) => {
|
|
585
585
|
m !== c.value && (c.value = m ?? "");
|
|
@@ -592,20 +592,20 @@ const Yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
592
592
|
c.value = "", t("update:modelValue", ""), t("clear", n.name), t("change", { name: n.name, value: null });
|
|
593
593
|
}
|
|
594
594
|
return (m, x) => (f(), w("div", {
|
|
595
|
-
class:
|
|
595
|
+
class: U([
|
|
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
|
-
m.layout === "inline" ? e(
|
|
597
|
+
m.layout === "inline" ? e(je).getWidthClass(m.width) : "mb-2" + (m.layout === "popover" ? " m-2" : "")
|
|
598
598
|
])
|
|
599
599
|
}, [
|
|
600
|
-
l("div",
|
|
601
|
-
Y(
|
|
600
|
+
l("div", Wt, [
|
|
601
|
+
Y(lt)
|
|
602
602
|
]),
|
|
603
603
|
c.value !== "" ? (f(), w("div", {
|
|
604
604
|
key: 0,
|
|
605
605
|
onClick: h,
|
|
606
606
|
class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
|
|
607
607
|
}, [
|
|
608
|
-
Y(
|
|
608
|
+
Y(at)
|
|
609
609
|
])) : S("", !0),
|
|
610
610
|
N(l("input", {
|
|
611
611
|
type: "text",
|
|
@@ -613,37 +613,37 @@ const Yt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
613
613
|
onInput: u,
|
|
614
614
|
placeholder: o.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
|
-
[
|
|
616
|
+
}, null, 40, Zt), [
|
|
617
|
+
[ve, c.value]
|
|
618
618
|
])
|
|
619
619
|
], 2));
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function ot(i = { color: "blue" }) {
|
|
623
|
+
return W(() => {
|
|
624
624
|
const r = `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
625
|
return (i == null ? void 0 : i.size) === "sm" ? `${r}h-[32px]` : `${r}h-[38px]`;
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function qt() {
|
|
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 Qt() {
|
|
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 rt(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 Gt = {
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
640
|
-
},
|
|
640
|
+
}, Jt = ["placeholder", "disabled"], Xt = {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
643
|
-
},
|
|
643
|
+
}, el = {
|
|
644
644
|
key: 0,
|
|
645
645
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
646
|
-
},
|
|
646
|
+
}, tl = ["placeholder", "disabled"], ll = ["disabled"], al = /* @__PURE__ */ Q({
|
|
647
647
|
__name: "range-input",
|
|
648
648
|
props: {
|
|
649
649
|
id: {},
|
|
@@ -670,9 +670,9 @@ const Xt = {
|
|
|
670
670
|
},
|
|
671
671
|
emits: ["update:modelValue", "change", "clear"],
|
|
672
672
|
setup(i, { expose: r, emit: n }) {
|
|
673
|
-
const o =
|
|
673
|
+
const o = ot(), t = qt(), c = i, u = V(
|
|
674
674
|
c.modelValue ?? c.default ?? []
|
|
675
|
-
), h = n, m =
|
|
675
|
+
), h = n, m = W({
|
|
676
676
|
get: () => c.modelValue ?? u.value,
|
|
677
677
|
set: (d) => {
|
|
678
678
|
c.modelValue !== void 0 ? h("update:modelValue", d) : u.value = d;
|
|
@@ -684,38 +684,38 @@ const Xt = {
|
|
|
684
684
|
function g() {
|
|
685
685
|
u.value = [], m.value = u.value, h("clear", c.name);
|
|
686
686
|
}
|
|
687
|
-
return
|
|
687
|
+
return j(() => c.modelValue, (d) => {
|
|
688
688
|
d !== void 0 && c.layout !== "popover" ? (u.value = d, h("update:modelValue", d)) : u.value = [];
|
|
689
689
|
}), r({
|
|
690
690
|
clear: g,
|
|
691
691
|
currentValue: m
|
|
692
692
|
}), (d, y) => {
|
|
693
693
|
var _, v;
|
|
694
|
-
return f(), w(
|
|
694
|
+
return f(), w(I, null, [
|
|
695
695
|
l("div", null, [
|
|
696
696
|
l("div", {
|
|
697
|
-
class:
|
|
697
|
+
class: U(d.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
|
698
698
|
}, [
|
|
699
699
|
l("div", null, [
|
|
700
|
-
d.layout !== "vertical" ? (f(), w("label",
|
|
700
|
+
d.layout !== "vertical" ? (f(), w("label", Gt, "Від")) : S("", !0),
|
|
701
701
|
N(l("input", {
|
|
702
702
|
type: "number",
|
|
703
|
-
class:
|
|
703
|
+
class: U(e(o)),
|
|
704
704
|
placeholder: ((_ = d.placeHolder) == null ? void 0 : _[0]) ?? "min",
|
|
705
705
|
step: "1",
|
|
706
706
|
style: { outline: "none" },
|
|
707
707
|
"onUpdate:modelValue": y[0] || (y[0] = (p) => m.value[0] = p),
|
|
708
708
|
disabled: d.disabled
|
|
709
|
-
}, null, 10,
|
|
710
|
-
[
|
|
709
|
+
}, null, 10, Jt), [
|
|
710
|
+
[ve, m.value[0]]
|
|
711
711
|
])
|
|
712
712
|
]),
|
|
713
|
-
d.layout === "vertical" ? (f(), w("label",
|
|
713
|
+
d.layout === "vertical" ? (f(), w("label", Xt, " - ")) : S("", !0),
|
|
714
714
|
l("div", null, [
|
|
715
|
-
d.layout !== "vertical" ? (f(), w("label",
|
|
715
|
+
d.layout !== "vertical" ? (f(), w("label", el, "До")) : S("", !0),
|
|
716
716
|
N(l("input", {
|
|
717
717
|
type: "number",
|
|
718
|
-
class:
|
|
718
|
+
class: U(e(o)),
|
|
719
719
|
placeholder: ((v = d.placeHolder) == null ? void 0 : v[1]) ?? "max",
|
|
720
720
|
min: "0",
|
|
721
721
|
max: "1000000000000000",
|
|
@@ -723,31 +723,31 @@ const Xt = {
|
|
|
723
723
|
style: { outline: "none" },
|
|
724
724
|
"onUpdate:modelValue": y[1] || (y[1] = (p) => m.value[1] = p),
|
|
725
725
|
disabled: d.disabled
|
|
726
|
-
}, null, 10,
|
|
727
|
-
[
|
|
726
|
+
}, null, 10, tl), [
|
|
727
|
+
[ve, m.value[1]]
|
|
728
728
|
])
|
|
729
729
|
]),
|
|
730
730
|
["popover", "inline", "vertical"].includes(d.layout) ? (f(), w("button", {
|
|
731
731
|
key: 1,
|
|
732
732
|
onClick: x,
|
|
733
|
-
class:
|
|
734
|
-
},
|
|
733
|
+
class: U(e(t) + (d.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
|
734
|
+
}, O(d.layout === "vertical" ? "Ok" : "Застосувати"), 3)) : S("", !0),
|
|
735
735
|
["popover", "inline"].includes(d.layout) ? (f(), w("button", {
|
|
736
736
|
key: 2,
|
|
737
737
|
disabled: !(m.value[0] || m.value[1]),
|
|
738
738
|
onClick: g,
|
|
739
|
-
class:
|
|
740
|
-
}, "Очистити", 10,
|
|
739
|
+
class: U(e(t) + " hover:bg-gray-100")
|
|
740
|
+
}, "Очистити", 10, ll)) : S("", !0)
|
|
741
741
|
], 2)
|
|
742
742
|
]),
|
|
743
743
|
(d.cleanable && u.value.length, S("", !0))
|
|
744
744
|
], 64);
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), ol = ["disabled", "title"], rl = {
|
|
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
|
+
}, nl = { 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" }, il = { 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" }, Ie = /* @__PURE__ */ Q({
|
|
751
751
|
__name: "popover-field",
|
|
752
752
|
props: {
|
|
753
753
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -759,16 +759,16 @@ const Xt = {
|
|
|
759
759
|
layout: {}
|
|
760
760
|
},
|
|
761
761
|
setup(i, { expose: r }) {
|
|
762
|
-
const n = i, o =
|
|
762
|
+
const n = i, o = W(() => rt(n.mode)), t = V(!1), c = V({ top: 0, left: 0 }), u = V(null), h = V(null), m = V(null);
|
|
763
763
|
function x() {
|
|
764
764
|
const a = h.value, C = m.value;
|
|
765
765
|
if (!a || !C) return;
|
|
766
|
-
const b = a.getBoundingClientRect(), s = C.offsetWidth, k = window.innerWidth,
|
|
766
|
+
const b = a.getBoundingClientRect(), s = C.offsetWidth, k = window.innerWidth, B = b.bottom + 8;
|
|
767
767
|
let { left: A } = b;
|
|
768
|
-
A + s > k && (A = Math.max(k - s - 10, 10)), c.value = { top:
|
|
768
|
+
A + s > k && (A = Math.max(k - s - 10, 10)), c.value = { top: B, left: A };
|
|
769
769
|
}
|
|
770
770
|
function g() {
|
|
771
|
-
t.value = !t.value, t.value &&
|
|
771
|
+
t.value = !t.value, t.value && Ae(() => {
|
|
772
772
|
var a, C;
|
|
773
773
|
x(), (a = n.fieldRef) != null && a.inputTextRef && ((C = n.fieldRef) == null || C.inputTextRef.focus());
|
|
774
774
|
});
|
|
@@ -781,18 +781,18 @@ const Xt = {
|
|
|
781
781
|
a.key === "Escape" && (t.value = !1);
|
|
782
782
|
}
|
|
783
783
|
const _ = V(!1);
|
|
784
|
-
|
|
784
|
+
Ce(() => {
|
|
785
785
|
_.value = !0;
|
|
786
|
-
}),
|
|
786
|
+
}), Ce(() => {
|
|
787
787
|
document.addEventListener("click", d, !0), document.addEventListener("keydown", y), window.addEventListener("scroll", x, !0);
|
|
788
|
-
}),
|
|
788
|
+
}), Me(() => {
|
|
789
789
|
document.removeEventListener("click", d, !0), document.removeEventListener("keydown", y), window.removeEventListener("scroll", x, !0);
|
|
790
790
|
});
|
|
791
791
|
function v() {
|
|
792
792
|
t.value = !1;
|
|
793
793
|
}
|
|
794
794
|
r({ close: v });
|
|
795
|
-
const p =
|
|
795
|
+
const p = W(() => {
|
|
796
796
|
var C;
|
|
797
797
|
const a = (C = n.fieldRef) == null ? void 0 : C.selectedLabels;
|
|
798
798
|
return a ? Array.isArray(a) ? a.length > 0 ? a.join(", ") : n.label ?? "" : String(a) : n.label ?? "";
|
|
@@ -804,15 +804,15 @@ const Xt = {
|
|
|
804
804
|
ref_key: "triggerRef",
|
|
805
805
|
ref: h,
|
|
806
806
|
title: a.label,
|
|
807
|
-
class:
|
|
807
|
+
class: U(o.value + " " + (a.width ? e(je).getWidthClass(a.width) : "w-full"))
|
|
808
808
|
}, [
|
|
809
809
|
l("span", {
|
|
810
|
-
class:
|
|
811
|
-
},
|
|
812
|
-
Y(
|
|
813
|
-
(Array.isArray(a.currentValue) ? a.currentValue === null || a.currentValue.length > 0 : a.currentValue === null || a.currentValue) && a.layout === "inline" ? (f(), w("span",
|
|
814
|
-
], 10,
|
|
815
|
-
_.value ? (f(),
|
|
810
|
+
class: U(["truncate text-ellipsis block", a.width ? e(je).getWidthClass(a.width - 50) : "w-full"])
|
|
811
|
+
}, O(p.value), 3),
|
|
812
|
+
Y(Re, { class: "h-4 w-4" }),
|
|
813
|
+
(Array.isArray(a.currentValue) ? a.currentValue === null || a.currentValue.length > 0 : a.currentValue === null || a.currentValue) && a.layout === "inline" ? (f(), w("span", rl)) : S("", !0)
|
|
814
|
+
], 10, ol),
|
|
815
|
+
_.value ? (f(), P(Qe, {
|
|
816
816
|
key: 0,
|
|
817
817
|
to: "body"
|
|
818
818
|
}, [
|
|
@@ -820,12 +820,12 @@ const Xt = {
|
|
|
820
820
|
ref_key: "popperRef",
|
|
821
821
|
ref: m,
|
|
822
822
|
class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
|
|
823
|
-
style:
|
|
823
|
+
style: Le({ top: `${c.value.top}px`, left: `${c.value.left}px` }),
|
|
824
824
|
"data-inside-popover": ""
|
|
825
825
|
}, [
|
|
826
|
-
l("div",
|
|
827
|
-
l("div",
|
|
828
|
-
|
|
826
|
+
l("div", nl, [
|
|
827
|
+
l("div", il, [
|
|
828
|
+
fe(a.$slots, "default")
|
|
829
829
|
])
|
|
830
830
|
])
|
|
831
831
|
], 4), [
|
|
@@ -835,10 +835,10 @@ const Xt = {
|
|
|
835
835
|
]));
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
|
-
function
|
|
838
|
+
function sl(i) {
|
|
839
839
|
return String(i).charAt(0).toUpperCase() + String(i).slice(1);
|
|
840
840
|
}
|
|
841
|
-
class
|
|
841
|
+
class ne {
|
|
842
842
|
static format(r) {
|
|
843
843
|
const n = r.getFullYear(), o = (r.getMonth() + 1).toString().padStart(2, "0"), t = r.getDate().toString().padStart(2, "0");
|
|
844
844
|
return `${n}-${o}-${t}`;
|
|
@@ -886,14 +886,14 @@ class re {
|
|
|
886
886
|
return o.setDate(n.getDate() - r), [this.format(o), this.format(n)];
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function nt(i, r) {
|
|
890
890
|
const {
|
|
891
891
|
popoverRef: n
|
|
892
892
|
} = i, o = V(""), t = V(
|
|
893
893
|
i.modelValue ?? i.default ?? []
|
|
894
894
|
), c = V(0);
|
|
895
895
|
function u() {
|
|
896
|
-
const p =
|
|
896
|
+
const p = ne.getRangeFromDaysBefore(c.value);
|
|
897
897
|
return t.value = [...p], r("change", { name: i.name, value: t.value }), r("update:modelValue", t.value), p;
|
|
898
898
|
}
|
|
899
899
|
function h(p) {
|
|
@@ -902,19 +902,19 @@ function st(i, r) {
|
|
|
902
902
|
const a = [];
|
|
903
903
|
switch (o.value) {
|
|
904
904
|
case "today":
|
|
905
|
-
a.push(
|
|
905
|
+
a.push(ne.getShiftedDay()), a.push(ne.getShiftedDay());
|
|
906
906
|
break;
|
|
907
907
|
case "week":
|
|
908
|
-
a.push(...
|
|
908
|
+
a.push(...ne.getLastWeekRange());
|
|
909
909
|
break;
|
|
910
910
|
case "month":
|
|
911
|
-
a.push(...
|
|
911
|
+
a.push(...ne.getMonthRange());
|
|
912
912
|
break;
|
|
913
913
|
case "quarter":
|
|
914
|
-
a.push(...
|
|
914
|
+
a.push(...ne.getQuarterRange());
|
|
915
915
|
break;
|
|
916
916
|
case "year":
|
|
917
|
-
a.push(...
|
|
917
|
+
a.push(...ne.getYearRange());
|
|
918
918
|
break;
|
|
919
919
|
case "last_7_days":
|
|
920
920
|
c.value = 7, u();
|
|
@@ -929,19 +929,19 @@ function st(i, r) {
|
|
|
929
929
|
const p = [];
|
|
930
930
|
switch (o.value) {
|
|
931
931
|
case "today":
|
|
932
|
-
p.push(
|
|
932
|
+
p.push(ne.getShiftedDay(t.value[0], 1));
|
|
933
933
|
break;
|
|
934
934
|
case "week":
|
|
935
|
-
p.push(...
|
|
935
|
+
p.push(...ne.getLastWeekRange(t.value[0], t.value[1], 1));
|
|
936
936
|
break;
|
|
937
937
|
case "month":
|
|
938
|
-
p.push(...
|
|
938
|
+
p.push(...ne.getMonthRange(t.value[0], t.value[1], 1));
|
|
939
939
|
break;
|
|
940
940
|
case "quarter":
|
|
941
|
-
p.push(...
|
|
941
|
+
p.push(...ne.getQuarterRange(t.value[0], t.value[1], 1));
|
|
942
942
|
break;
|
|
943
943
|
case "year":
|
|
944
|
-
p.push(...
|
|
944
|
+
p.push(...ne.getYearRange(t.value[0], 1));
|
|
945
945
|
break;
|
|
946
946
|
}
|
|
947
947
|
t.value = [...p], r("change", { name: i.name, value: t.value }), r("update:modelValue", t.value);
|
|
@@ -950,19 +950,19 @@ function st(i, r) {
|
|
|
950
950
|
const p = [];
|
|
951
951
|
switch (o.value) {
|
|
952
952
|
case "today":
|
|
953
|
-
p.push(
|
|
953
|
+
p.push(ne.getShiftedDay(t.value[0], -1));
|
|
954
954
|
break;
|
|
955
955
|
case "week":
|
|
956
|
-
p.push(...
|
|
956
|
+
p.push(...ne.getLastWeekRange(t.value[0], t.value[1], -1));
|
|
957
957
|
break;
|
|
958
958
|
case "month":
|
|
959
|
-
p.push(...
|
|
959
|
+
p.push(...ne.getMonthRange(t.value[0], t.value[1], -1));
|
|
960
960
|
break;
|
|
961
961
|
case "quarter":
|
|
962
|
-
p.push(...
|
|
962
|
+
p.push(...ne.getQuarterRange(t.value[0], t.value[1], -1));
|
|
963
963
|
break;
|
|
964
964
|
case "year":
|
|
965
|
-
p.push(...
|
|
965
|
+
p.push(...ne.getYearRange(t.value[0], -1));
|
|
966
966
|
break;
|
|
967
967
|
}
|
|
968
968
|
t.value = [...p], r("change", { name: i.name, value: t.value }), r("update:modelValue", t.value);
|
|
@@ -1014,7 +1014,7 @@ function st(i, r) {
|
|
|
1014
1014
|
return i.label ?? "";
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
const _ =
|
|
1017
|
+
const _ = W(() => o.value ? y(o.value) : i.label ?? "");
|
|
1018
1018
|
function v() {
|
|
1019
1019
|
o.value = "", t.value = [], r("update:modelValue", []), r("clear", i.name);
|
|
1020
1020
|
}
|
|
@@ -1033,22 +1033,22 @@ function st(i, r) {
|
|
|
1033
1033
|
clear: v
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const ul = {
|
|
1037
1037
|
key: 0,
|
|
1038
1038
|
class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
|
|
1039
|
-
},
|
|
1039
|
+
}, cl = {
|
|
1040
1040
|
key: 0,
|
|
1041
1041
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
|
1042
|
-
},
|
|
1042
|
+
}, dl = ["max", "disabled"], pl = ["min", "disabled"], fl = {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1045
|
-
},
|
|
1045
|
+
}, vl = ["max", "disabled"], ml = {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1048
|
-
},
|
|
1048
|
+
}, hl = {
|
|
1049
1049
|
key: 0,
|
|
1050
1050
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1051
|
-
},
|
|
1051
|
+
}, gl = ["min", "disabled"], yl = { class: "flex gap-1 pt-2" }, bl = ["onClick"], xl = /* @__PURE__ */ Q({
|
|
1052
1052
|
__name: "date-input",
|
|
1053
1053
|
props: {
|
|
1054
1054
|
id: {},
|
|
@@ -1075,25 +1075,25 @@ const dl = {
|
|
|
1075
1075
|
},
|
|
1076
1076
|
emits: ["update:modelValue", "change", "clear"],
|
|
1077
1077
|
setup(i, { expose: r, emit: n }) {
|
|
1078
|
-
const o = i, t =
|
|
1078
|
+
const o = i, t = ot(), c = Qt(), u = n, h = V(null), {
|
|
1079
1079
|
activeMode: m,
|
|
1080
1080
|
innerValue: x,
|
|
1081
1081
|
onSelectChange: g,
|
|
1082
1082
|
nextClick: d,
|
|
1083
1083
|
prevClick: y,
|
|
1084
1084
|
clear: _
|
|
1085
|
-
} =
|
|
1085
|
+
} = nt({
|
|
1086
1086
|
...o,
|
|
1087
1087
|
popoverRef: h
|
|
1088
1088
|
}, u);
|
|
1089
|
-
return
|
|
1089
|
+
return j(() => o.modelValue, (v) => {
|
|
1090
1090
|
v !== void 0 ? (x.value = v, u("update:modelValue", v)) : (m.value = "", x.value = []);
|
|
1091
1091
|
}), r({
|
|
1092
1092
|
clear: _,
|
|
1093
1093
|
popoverRef: h
|
|
1094
|
-
}), (v, p) => (f(), w(
|
|
1095
|
-
v.layout === "inline" ? (f(), w("div",
|
|
1096
|
-
e(m) !== "" && e(m) === "range" ? (f(), w("div",
|
|
1094
|
+
}), (v, p) => (f(), w(I, null, [
|
|
1095
|
+
v.layout === "inline" ? (f(), w("div", ul, [
|
|
1096
|
+
e(m) !== "" && e(m) === "range" ? (f(), w("div", cl, [
|
|
1097
1097
|
N(l("input", {
|
|
1098
1098
|
type: "date",
|
|
1099
1099
|
max: e(x)[1],
|
|
@@ -1101,8 +1101,8 @@ const dl = {
|
|
|
1101
1101
|
"onUpdate:modelValue": p[0] || (p[0] = (a) => e(x)[0] = a),
|
|
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: v.disabled
|
|
1104
|
-
}, null, 8,
|
|
1105
|
-
[
|
|
1104
|
+
}, null, 8, dl), [
|
|
1105
|
+
[ve, e(x)[0]]
|
|
1106
1106
|
]),
|
|
1107
1107
|
N(l("input", {
|
|
1108
1108
|
type: "date",
|
|
@@ -1111,59 +1111,59 @@ const dl = {
|
|
|
1111
1111
|
"onUpdate:modelValue": p[1] || (p[1] = (a) => e(x)[1] = a),
|
|
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: v.disabled
|
|
1114
|
-
}, null, 8,
|
|
1115
|
-
[
|
|
1114
|
+
}, null, 8, pl), [
|
|
1115
|
+
[ve, e(x)[1]]
|
|
1116
1116
|
])
|
|
1117
1117
|
])) : S("", !0)
|
|
1118
1118
|
])) : S("", !0),
|
|
1119
1119
|
l("div", {
|
|
1120
|
-
class:
|
|
1120
|
+
class: U(v.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
|
|
1121
1121
|
}, [
|
|
1122
1122
|
l("div", {
|
|
1123
|
-
class:
|
|
1123
|
+
class: U(v.layout !== "popover" ? "w-[48%]" : "")
|
|
1124
1124
|
}, [
|
|
1125
|
-
v.layout === "popover" ? (f(), w("label",
|
|
1125
|
+
v.layout === "popover" ? (f(), w("label", fl, "Від")) : S("", !0),
|
|
1126
1126
|
N(l("input", {
|
|
1127
1127
|
type: "date",
|
|
1128
1128
|
max: e(x)[1],
|
|
1129
1129
|
locale: "uk-UA",
|
|
1130
1130
|
"onUpdate:modelValue": p[2] || (p[2] = (a) => e(x)[0] = a),
|
|
1131
|
-
class:
|
|
1131
|
+
class: U(e(t)),
|
|
1132
1132
|
disabled: v.disabled
|
|
1133
|
-
}, null, 10,
|
|
1134
|
-
[
|
|
1133
|
+
}, null, 10, vl), [
|
|
1134
|
+
[ve, e(x)[0]]
|
|
1135
1135
|
])
|
|
1136
1136
|
], 2),
|
|
1137
|
-
v.layout !== "popover" ? (f(), w("label",
|
|
1137
|
+
v.layout !== "popover" ? (f(), w("label", ml, " - ")) : S("", !0),
|
|
1138
1138
|
l("div", {
|
|
1139
|
-
class:
|
|
1139
|
+
class: U(v.layout !== "popover" ? "w-[48%]" : "")
|
|
1140
1140
|
}, [
|
|
1141
|
-
v.layout === "popover" ? (f(), w("label",
|
|
1141
|
+
v.layout === "popover" ? (f(), w("label", hl, "До")) : S("", !0),
|
|
1142
1142
|
N(l("input", {
|
|
1143
1143
|
type: "date",
|
|
1144
1144
|
min: e(x)[0],
|
|
1145
1145
|
locale: "uk-UA",
|
|
1146
1146
|
"onUpdate:modelValue": p[3] || (p[3] = (a) => e(x)[1] = a),
|
|
1147
|
-
class:
|
|
1147
|
+
class: U(e(t)),
|
|
1148
1148
|
disabled: v.disabled
|
|
1149
|
-
}, null, 10,
|
|
1150
|
-
[
|
|
1149
|
+
}, null, 10, gl), [
|
|
1150
|
+
[ve, e(x)[1]]
|
|
1151
1151
|
])
|
|
1152
1152
|
], 2)
|
|
1153
1153
|
], 2),
|
|
1154
|
-
l("div",
|
|
1155
|
-
(f(), w(
|
|
1154
|
+
l("div", yl, [
|
|
1155
|
+
(f(), w(I, null, ae(["today", "week", "month", "quarter", "year"], (a) => l("button", {
|
|
1156
1156
|
key: a,
|
|
1157
|
-
class:
|
|
1157
|
+
class: U(e(c) + (e(m) === a ? " bg-blue-100" : "")),
|
|
1158
1158
|
onClick: (C) => e(g)(a)
|
|
1159
|
-
},
|
|
1159
|
+
}, O(e(sl)(a)), 11, bl)), 64)),
|
|
1160
1160
|
l("button", {
|
|
1161
|
-
class:
|
|
1161
|
+
class: U(e(c)),
|
|
1162
1162
|
onClick: p[4] || (p[4] = //@ts-ignore
|
|
1163
1163
|
(...a) => e(y) && e(y)(...a))
|
|
1164
1164
|
}, " <", 2),
|
|
1165
1165
|
l("button", {
|
|
1166
|
-
class:
|
|
1166
|
+
class: U(e(c)),
|
|
1167
1167
|
onClick: p[5] || (p[5] = //@ts-ignore
|
|
1168
1168
|
(...a) => e(d) && e(d)(...a))
|
|
1169
1169
|
}, " >", 2)
|
|
@@ -1172,50 +1172,50 @@ const dl = {
|
|
|
1172
1172
|
], 64));
|
|
1173
1173
|
}
|
|
1174
1174
|
});
|
|
1175
|
-
function
|
|
1175
|
+
function wl(i, r) {
|
|
1176
1176
|
const {
|
|
1177
1177
|
api: n,
|
|
1178
1178
|
options: o = [],
|
|
1179
1179
|
limit: t = 20,
|
|
1180
1180
|
dataKey: c = "data"
|
|
1181
1181
|
} = i, u = i.multi;
|
|
1182
|
-
function h(
|
|
1183
|
-
return u ? Array.isArray(
|
|
1182
|
+
function h(z) {
|
|
1183
|
+
return u ? Array.isArray(z) ? z : z ? [z] : [] : Array.isArray(z) ? z[0] : z;
|
|
1184
1184
|
}
|
|
1185
1185
|
const m = V(h(i.modelValue)), x = V(""), g = V(!1), d = V([]), y = V("id"), _ = V("text"), v = V(!1), p = V(i.layout !== "popover" && o.length > t), a = V([]), C = V(0);
|
|
1186
|
-
function b(
|
|
1187
|
-
const H =
|
|
1188
|
-
return { autoValueKey:
|
|
1186
|
+
function b(z) {
|
|
1187
|
+
const H = z.find(Boolean) ?? {}, J = ["id", "value", "code", "key"].find((de) => de in H) ?? "id", he = ["text", "label", "name", "title"].find((de) => de in H) ?? "text";
|
|
1188
|
+
return { autoValueKey: J, autoLabelKey: he };
|
|
1189
1189
|
}
|
|
1190
1190
|
if (o.length > 0) {
|
|
1191
|
-
const
|
|
1192
|
-
y.value =
|
|
1191
|
+
const z = b(o);
|
|
1192
|
+
y.value = z.autoValueKey, _.value = z.autoLabelKey;
|
|
1193
1193
|
}
|
|
1194
|
-
const s =
|
|
1194
|
+
const s = W(() => {
|
|
1195
1195
|
if (n) return d.value;
|
|
1196
|
-
const
|
|
1197
|
-
if (i.layout === "popover") return
|
|
1196
|
+
const z = d.value;
|
|
1197
|
+
if (i.layout === "popover") return z;
|
|
1198
1198
|
if (!x.value)
|
|
1199
|
-
return v.value ?
|
|
1199
|
+
return v.value ? z : z.slice(0, t);
|
|
1200
1200
|
const H = x.value.toLowerCase();
|
|
1201
|
-
return
|
|
1201
|
+
return z.filter((J) => J[_.value].toLowerCase().includes(H));
|
|
1202
1202
|
});
|
|
1203
1203
|
let k = null;
|
|
1204
|
-
async function z
|
|
1204
|
+
async function B(z) {
|
|
1205
1205
|
if (n) {
|
|
1206
1206
|
g.value = !0;
|
|
1207
1207
|
try {
|
|
1208
1208
|
const H = new URL(n, window.location.origin);
|
|
1209
|
-
H.searchParams.set("json", "1"), H.searchParams.set("key",
|
|
1210
|
-
const
|
|
1211
|
-
if (!
|
|
1212
|
-
throw new Error(`HTTP error! status: ${
|
|
1213
|
-
const
|
|
1214
|
-
if (d.value =
|
|
1215
|
-
const
|
|
1216
|
-
y.value =
|
|
1209
|
+
H.searchParams.set("json", "1"), H.searchParams.set("key", z), H.searchParams.set("limit", t.toString());
|
|
1210
|
+
const J = await fetch(H.toString());
|
|
1211
|
+
if (!J.ok)
|
|
1212
|
+
throw new Error(`HTTP error! status: ${J.status}`);
|
|
1213
|
+
const he = await J.json();
|
|
1214
|
+
if (d.value = he[c], d.value.length > 0) {
|
|
1215
|
+
const de = b(d.value);
|
|
1216
|
+
y.value = de.autoValueKey, _.value = de.autoLabelKey;
|
|
1217
1217
|
}
|
|
1218
|
-
C.value =
|
|
1218
|
+
C.value = he.total;
|
|
1219
1219
|
} catch (H) {
|
|
1220
1220
|
console.error("Failed to fetch remote options:", H);
|
|
1221
1221
|
} finally {
|
|
@@ -1223,49 +1223,49 @@ function _l(i, r) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
|
|
1226
|
+
j(x, (z) => {
|
|
1227
1227
|
n && (k && clearTimeout(k), k = setTimeout(() => {
|
|
1228
|
-
z
|
|
1228
|
+
B(z);
|
|
1229
1229
|
}, 200));
|
|
1230
|
-
}),
|
|
1231
|
-
m.value = h(
|
|
1232
|
-
}, { immediate: !0 }), n ?
|
|
1233
|
-
function A(
|
|
1234
|
-
return u && Array.isArray(m.value) ? m.value.includes(
|
|
1230
|
+
}), j(() => i.modelValue, (z) => {
|
|
1231
|
+
m.value = h(z);
|
|
1232
|
+
}, { immediate: !0 }), n ? B("") : d.value = o;
|
|
1233
|
+
function A(z) {
|
|
1234
|
+
return u && Array.isArray(m.value) ? m.value.includes(z[y.value]) : m.value && m.value === z[y.value];
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function R(z) {
|
|
1237
1237
|
if (u && !Array.isArray(m.value) && (m.value = []), u && Array.isArray(m.value)) {
|
|
1238
|
-
const H = m.value.includes(
|
|
1239
|
-
m.value = H ? m.value.filter((
|
|
1238
|
+
const H = m.value.includes(z[y.value]);
|
|
1239
|
+
m.value = H ? m.value.filter((J) => J !== z[y.value]) : [...m.value, z[y.value]], a.value = H ? a.value.filter((J) => J !== z[_.value]) : [...a.value, z[_.value]];
|
|
1240
1240
|
} else
|
|
1241
|
-
m.value =
|
|
1241
|
+
m.value = z[y.value], a.value = z[_.value];
|
|
1242
1242
|
r("update:modelValue", m.value), r("change", { name: i.name, value: m.value });
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1244
|
+
function T() {
|
|
1245
1245
|
u ? (m.value = [], a.value = []) : (m.value = void 0, a.value = []), r("update:modelValue", m.value), r("clear", i.name);
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function K() {
|
|
1248
1248
|
k && clearTimeout(k), x.value = "", v.value = !1;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function pe() {
|
|
1251
1251
|
v.value = !v.value;
|
|
1252
1252
|
}
|
|
1253
|
-
|
|
1253
|
+
Me(() => {
|
|
1254
1254
|
k && clearTimeout(k);
|
|
1255
1255
|
});
|
|
1256
1256
|
const oe = V(-1);
|
|
1257
|
-
|
|
1257
|
+
j(s, () => {
|
|
1258
1258
|
oe.value = s.value.length > 0 ? 0 : -1;
|
|
1259
1259
|
});
|
|
1260
|
-
function
|
|
1260
|
+
function L(z) {
|
|
1261
1261
|
const H = s.value.length;
|
|
1262
|
-
if (
|
|
1263
|
-
|
|
1264
|
-
else if (
|
|
1265
|
-
|
|
1266
|
-
else if (
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1262
|
+
if (z.key === "ArrowDown")
|
|
1263
|
+
z.preventDefault(), oe.value = (oe.value + 1) % H;
|
|
1264
|
+
else if (z.key === "ArrowUp")
|
|
1265
|
+
z.preventDefault(), oe.value = (oe.value - 1 + H) % H;
|
|
1266
|
+
else if (z.key === "Enter" && (z.preventDefault(), oe.value >= 0 && oe.value < s.value.length)) {
|
|
1267
|
+
const J = s.value[oe.value];
|
|
1268
|
+
R(J);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
return {
|
|
@@ -1273,10 +1273,10 @@ function _l(i, r) {
|
|
|
1273
1273
|
searchTerm: x,
|
|
1274
1274
|
filteredOptions: s,
|
|
1275
1275
|
isSelected: A,
|
|
1276
|
-
selectItem:
|
|
1277
|
-
clear:
|
|
1278
|
-
resetSearch:
|
|
1279
|
-
toggleShowAll:
|
|
1276
|
+
selectItem: R,
|
|
1277
|
+
clear: T,
|
|
1278
|
+
resetSearch: K,
|
|
1279
|
+
toggleShowAll: pe,
|
|
1280
1280
|
isReqProc: g,
|
|
1281
1281
|
showAll: v,
|
|
1282
1282
|
isEnableShowAll: p,
|
|
@@ -1284,21 +1284,21 @@ function _l(i, r) {
|
|
|
1284
1284
|
valueKey: y,
|
|
1285
1285
|
allOptions: d,
|
|
1286
1286
|
highlightedIndex: oe,
|
|
1287
|
-
onKeyDown:
|
|
1287
|
+
onKeyDown: L,
|
|
1288
1288
|
selectedLabels: a,
|
|
1289
1289
|
totalCount: C
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
const
|
|
1292
|
+
const kl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, _l = {
|
|
1293
1293
|
key: 0,
|
|
1294
1294
|
class: "w-full"
|
|
1295
|
-
},
|
|
1295
|
+
}, Cl = { class: "flex flex-col items-center justify-center p-5 text-center" }, Vl = {
|
|
1296
1296
|
key: 0,
|
|
1297
1297
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1298
|
-
},
|
|
1298
|
+
}, Sl = {
|
|
1299
1299
|
key: 1,
|
|
1300
1300
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1301
|
-
},
|
|
1301
|
+
}, $l = /* @__PURE__ */ Q({
|
|
1302
1302
|
__name: "select",
|
|
1303
1303
|
props: {
|
|
1304
1304
|
id: {},
|
|
@@ -1341,123 +1341,123 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1341
1341
|
valueKey: b,
|
|
1342
1342
|
highlightedIndex: s,
|
|
1343
1343
|
onKeyDown: k,
|
|
1344
|
-
selectedLabels:
|
|
1344
|
+
selectedLabels: B,
|
|
1345
1345
|
totalCount: A
|
|
1346
|
-
} =
|
|
1346
|
+
} = wl({
|
|
1347
1347
|
...o,
|
|
1348
1348
|
modelValue: o.modelValue
|
|
1349
1349
|
}, t);
|
|
1350
|
-
|
|
1350
|
+
Ce(() => {
|
|
1351
1351
|
d();
|
|
1352
|
-
}),
|
|
1352
|
+
}), j(
|
|
1353
1353
|
() => o.modelValue,
|
|
1354
|
-
(
|
|
1355
|
-
|
|
1354
|
+
(T) => {
|
|
1355
|
+
T === void 0 && (o.multi ? u.value = [] : u.value = void 0);
|
|
1356
1356
|
}
|
|
1357
1357
|
);
|
|
1358
|
-
const
|
|
1359
|
-
return
|
|
1360
|
-
var
|
|
1361
|
-
|
|
1358
|
+
const R = V([]);
|
|
1359
|
+
return j(s, (T) => {
|
|
1360
|
+
var K;
|
|
1361
|
+
T >= 0 && R.value[T] && ((K = R.value[T]) == null || K.scrollIntoView({
|
|
1362
1362
|
block: "nearest",
|
|
1363
1363
|
behavior: "smooth"
|
|
1364
1364
|
}));
|
|
1365
|
-
}),
|
|
1366
|
-
|
|
1365
|
+
}), j(h, () => {
|
|
1366
|
+
R.value = [];
|
|
1367
1367
|
}), r({
|
|
1368
1368
|
clear: g,
|
|
1369
1369
|
inputTextRef: c,
|
|
1370
|
-
selectedLabels:
|
|
1371
|
-
}), (
|
|
1372
|
-
var
|
|
1370
|
+
selectedLabels: B
|
|
1371
|
+
}), (T, K) => {
|
|
1372
|
+
var pe, oe;
|
|
1373
1373
|
return f(), w("div", {
|
|
1374
|
-
class:
|
|
1374
|
+
class: U([T.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
1375
1375
|
}, [
|
|
1376
|
-
l("div",
|
|
1376
|
+
l("div", kl, [
|
|
1377
1377
|
N(l("input", {
|
|
1378
|
-
"onUpdate:modelValue":
|
|
1379
|
-
onKeydown:
|
|
1380
|
-
(...
|
|
1378
|
+
"onUpdate:modelValue": K[0] || (K[0] = (L) => pt(a) ? a.value = L : null),
|
|
1379
|
+
onKeydown: K[1] || (K[1] = //@ts-ignore
|
|
1380
|
+
(...L) => e(k) && e(k)(...L)),
|
|
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
1385
|
ref: c
|
|
1386
1386
|
}, null, 544), [
|
|
1387
|
-
[
|
|
1387
|
+
[ve, e(a)]
|
|
1388
1388
|
]),
|
|
1389
|
-
Y(
|
|
1390
|
-
Y(
|
|
1391
|
-
onClick:
|
|
1389
|
+
Y(lt, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
|
|
1390
|
+
Y(at, {
|
|
1391
|
+
onClick: K[2] || (K[2] = (L) => a.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
1395
|
l("div", {
|
|
1396
|
-
class:
|
|
1397
|
-
|
|
1398
|
-
|
|
1396
|
+
class: U([
|
|
1397
|
+
T.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
|
|
1398
|
+
T.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
|
|
1399
1399
|
])
|
|
1400
1400
|
}, [
|
|
1401
|
-
(f(!0), w(
|
|
1402
|
-
layout:
|
|
1403
|
-
count:
|
|
1404
|
-
label:
|
|
1405
|
-
color:
|
|
1406
|
-
type:
|
|
1407
|
-
value:
|
|
1408
|
-
"is-selected": e(m)(
|
|
1409
|
-
highlighted:
|
|
1410
|
-
onItemClick: (H) => e(x)(
|
|
1401
|
+
(f(!0), w(I, null, ae(e(h), (L, z) => (f(), P(Pe, {
|
|
1402
|
+
layout: T.layout,
|
|
1403
|
+
count: L.count,
|
|
1404
|
+
label: L[e(C)],
|
|
1405
|
+
color: L.color,
|
|
1406
|
+
type: T.multi ? "checkbox" : "radio",
|
|
1407
|
+
value: L[e(b)],
|
|
1408
|
+
"is-selected": e(m)(L),
|
|
1409
|
+
highlighted: z === e(s),
|
|
1410
|
+
onItemClick: (H) => e(x)(L),
|
|
1411
1411
|
ref_for: !0,
|
|
1412
|
-
ref: (H) =>
|
|
1412
|
+
ref: (H) => R.value[z] = H == null ? void 0 : H.el
|
|
1413
1413
|
}, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
|
|
1414
1414
|
], 2),
|
|
1415
|
-
|
|
1416
|
-
l("div",
|
|
1417
|
-
Y(
|
|
1418
|
-
|
|
1415
|
+
T.type === "select" && e(h).length === 0 && !e(_) ? (f(), w("div", _l, [
|
|
1416
|
+
l("div", Cl, [
|
|
1417
|
+
Y(Ke),
|
|
1418
|
+
K[7] || (K[7] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
1419
1419
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
1420
1420
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
1421
1421
|
], -1))
|
|
1422
1422
|
])
|
|
1423
1423
|
])) : S("", !0),
|
|
1424
|
-
|
|
1424
|
+
T.layout !== "popover" && T.type !== "select" ? (f(), w(I, { key: 1 }, [
|
|
1425
1425
|
!e(v) && e(p) ? (f(), w("div", {
|
|
1426
1426
|
key: 0,
|
|
1427
|
-
onClick:
|
|
1428
|
-
(...
|
|
1427
|
+
onClick: K[3] || (K[3] = //@ts-ignore
|
|
1428
|
+
(...L) => e(y) && e(y)(...L)),
|
|
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
|
-
|
|
1432
|
-
Y(
|
|
1431
|
+
K[8] || (K[8] = ee(" Показати більше ", -1)),
|
|
1432
|
+
Y(Re)
|
|
1433
1433
|
])) : S("", !0),
|
|
1434
1434
|
e(v) ? (f(), w("div", {
|
|
1435
1435
|
key: 1,
|
|
1436
|
-
onClick:
|
|
1437
|
-
(...
|
|
1436
|
+
onClick: K[4] || (K[4] = //@ts-ignore
|
|
1437
|
+
(...L) => e(y) && e(y)(...L)),
|
|
1438
1438
|
class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
|
|
1439
1439
|
}, [
|
|
1440
|
-
|
|
1441
|
-
Y(
|
|
1440
|
+
K[9] || (K[9] = ee(" Показати менше ", -1)),
|
|
1441
|
+
Y(Ue)
|
|
1442
1442
|
])) : S("", !0)
|
|
1443
1443
|
], 64)) : S("", !0),
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
ee(
|
|
1444
|
+
T.cleanable ? (f(), w(I, { key: 2 }, [
|
|
1445
|
+
T.layout === "inline" ? (f(), w("div", Vl, [
|
|
1446
|
+
ee(O(T.multi && Array.isArray(e(u)) ? (pe = e(u)) == null ? void 0 : pe.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + O(e(A)) + " обрано ", 1),
|
|
1447
1447
|
N(l("button", {
|
|
1448
1448
|
class: "text-gray-600 hover:text-gray-800",
|
|
1449
|
-
onClick:
|
|
1450
|
-
(...
|
|
1449
|
+
onClick: K[5] || (K[5] = //@ts-ignore
|
|
1450
|
+
(...L) => e(g) && e(g)(...L))
|
|
1451
1451
|
}, " Очистити ", 512), [
|
|
1452
1452
|
[ce, e(u) !== "" && e(u) !== void 0 || e(u)]
|
|
1453
1453
|
])
|
|
1454
1454
|
])) : S("", !0),
|
|
1455
|
-
|
|
1456
|
-
l("span", null,
|
|
1455
|
+
T.layout === "popover" ? (f(), w("div", Sl, [
|
|
1456
|
+
l("span", null, O(T.multi && Array.isArray(e(u)) ? (oe = e(u)) == null ? void 0 : oe.length : e(u) !== void 0 && (e(u) || e(u) === null) ? 1 : 0) + " з " + O(e(A)) + " обрано", 1),
|
|
1457
1457
|
N(l("button", {
|
|
1458
1458
|
class: "text-gray-600 hover:text-gray-800",
|
|
1459
|
-
onClick:
|
|
1460
|
-
(...
|
|
1459
|
+
onClick: K[6] || (K[6] = //@ts-ignore
|
|
1460
|
+
(...L) => e(g) && e(g)(...L))
|
|
1461
1461
|
}, " Очистити ", 512), [
|
|
1462
1462
|
[ce, e(u) !== "" && e(u) !== void 0 || e(u)]
|
|
1463
1463
|
])
|
|
@@ -1466,13 +1466,13 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1466
1466
|
], 2);
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
|
-
}),
|
|
1469
|
+
}), Ml = ["for", "onClick"], Bl = ["id", "name", "value"], zl = { class: "block" }, Al = {
|
|
1470
1470
|
key: 0,
|
|
1471
1471
|
class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
|
|
1472
|
-
},
|
|
1472
|
+
}, Rl = {
|
|
1473
1473
|
key: 1,
|
|
1474
1474
|
class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
|
|
1475
|
-
},
|
|
1475
|
+
}, jl = /* @__PURE__ */ Q({
|
|
1476
1476
|
__name: "tag-field",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
id: {},
|
|
@@ -1507,31 +1507,31 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1507
1507
|
labelKey: x,
|
|
1508
1508
|
valueKey: g,
|
|
1509
1509
|
allOptions: d
|
|
1510
|
-
} = o.multi ?
|
|
1510
|
+
} = o.multi ? tt({
|
|
1511
1511
|
...o,
|
|
1512
1512
|
modelValue: o.modelValue ?? o.default ?? []
|
|
1513
|
-
}, t) :
|
|
1513
|
+
}, t) : et({
|
|
1514
1514
|
...o,
|
|
1515
1515
|
modelValue: o.modelValue !== void 0 ? o.modelValue : o.default ?? ""
|
|
1516
1516
|
}, t);
|
|
1517
1517
|
return r({
|
|
1518
1518
|
clear: m
|
|
1519
|
-
}),
|
|
1519
|
+
}), j(
|
|
1520
1520
|
() => o.modelValue,
|
|
1521
1521
|
(y) => {
|
|
1522
1522
|
y === void 0 && (o.multi ? c.value = [] : c.value = void 0);
|
|
1523
1523
|
}
|
|
1524
1524
|
), (y, _) => {
|
|
1525
1525
|
var v, p;
|
|
1526
|
-
return f(), w(
|
|
1526
|
+
return f(), w(I, null, [
|
|
1527
1527
|
l("div", {
|
|
1528
|
-
class:
|
|
1528
|
+
class: U(["grid grid-cols-3 gap-2 mx-[1px]", y.layout === "popover" ? "m-1" : "mb-1"])
|
|
1529
1529
|
}, [
|
|
1530
|
-
(f(!0), w(
|
|
1530
|
+
(f(!0), w(I, null, ae(e(d), (a) => (f(), w("label", {
|
|
1531
1531
|
key: `item-${a[e(g)]}`,
|
|
1532
1532
|
for: `item-${a[e(g)]}`,
|
|
1533
|
-
onClick:
|
|
1534
|
-
class:
|
|
1533
|
+
onClick: Ge((C) => e(h)(a), ["stop", "prevent"]),
|
|
1534
|
+
class: U([e(u)(a) ? "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
|
l("input", {
|
|
1537
1537
|
type: "checkbox",
|
|
@@ -1539,13 +1539,13 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
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
1540
|
name: `item-${a[e(g)]}`,
|
|
1541
1541
|
value: a[e(g)]
|
|
1542
|
-
}, null, 8,
|
|
1543
|
-
l("span",
|
|
1544
|
-
], 10,
|
|
1542
|
+
}, null, 8, Bl),
|
|
1543
|
+
l("span", zl, O(a[e(x)]), 1)
|
|
1544
|
+
], 10, Ml))), 128))
|
|
1545
1545
|
], 2),
|
|
1546
|
-
y.cleanable ? (f(), w(
|
|
1547
|
-
y.layout === "inline" ? (f(), w("div",
|
|
1548
|
-
ee(
|
|
1546
|
+
y.cleanable ? (f(), w(I, { key: 0 }, [
|
|
1547
|
+
y.layout === "inline" ? (f(), w("div", Al, [
|
|
1548
|
+
ee(O(y.multi && Array.isArray(e(c)) ? (v = e(c)) == null ? void 0 : v.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + O(e(d).length) + " обрано ", 1),
|
|
1549
1549
|
N(l("button", {
|
|
1550
1550
|
class: "text-gray-600 hover:text-gray-800",
|
|
1551
1551
|
onClick: _[0] || (_[0] = //@ts-ignore
|
|
@@ -1554,8 +1554,8 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1554
1554
|
[ce, e(c) !== "" && e(c) !== void 0 || e(c)]
|
|
1555
1555
|
])
|
|
1556
1556
|
])) : S("", !0),
|
|
1557
|
-
y.layout === "popover" ? (f(), w("div",
|
|
1558
|
-
l("span", null,
|
|
1557
|
+
y.layout === "popover" ? (f(), w("div", Rl, [
|
|
1558
|
+
l("span", null, O(y.multi && Array.isArray(e(c)) ? (p = e(c)) == null ? void 0 : p.length : e(c) !== void 0 && (e(c) || e(c) === null) ? 1 : 0) + " з " + O(e(d).length) + " обрано", 1),
|
|
1559
1559
|
N(l("button", {
|
|
1560
1560
|
class: "text-gray-600 hover:text-gray-800",
|
|
1561
1561
|
onClick: _[1] || (_[1] = //@ts-ignore
|
|
@@ -1568,7 +1568,7 @@ const Cl = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1568
1568
|
], 64);
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
}),
|
|
1571
|
+
}), Dl = {}, Fl = {
|
|
1572
1572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1573
1573
|
width: "24",
|
|
1574
1574
|
height: "24",
|
|
@@ -1580,12 +1580,12 @@ const Cl = { 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 f(), w("svg",
|
|
1583
|
+
function Ll(i, r) {
|
|
1584
|
+
return f(), w("svg", Fl, r[0] || (r[0] = [
|
|
1585
1585
|
l("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
|
1586
1586
|
]));
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1588
|
+
const _e = /* @__PURE__ */ me(Dl, [["render", Ll]]), Pl = {}, Kl = {
|
|
1589
1589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1590
1590
|
width: "15px",
|
|
1591
1591
|
height: "24",
|
|
@@ -1597,8 +1597,8 @@ const Ce = /* @__PURE__ */ ve(Ll, [["render", Kl]]), Ul = {}, Il = {
|
|
|
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 f(), w("svg",
|
|
1600
|
+
function Ul(i, r) {
|
|
1601
|
+
return f(), w("svg", Kl, r[0] || (r[0] = [
|
|
1602
1602
|
l("path", {
|
|
1603
1603
|
stroke: "none",
|
|
1604
1604
|
d: "M0 0h24v24H0z",
|
|
@@ -1607,7 +1607,7 @@ function Ol(i, r) {
|
|
|
1607
1607
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1608
1608
|
]));
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const Il = /* @__PURE__ */ me(Pl, [["render", Ul]]), Ol = {}, Tl = {
|
|
1611
1611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1612
1612
|
width: "15px",
|
|
1613
1613
|
height: "24",
|
|
@@ -1619,8 +1619,8 @@ const Tl = /* @__PURE__ */ ve(Ul, [["render", Ol]]), Hl = {}, El = {
|
|
|
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 f(), w("svg",
|
|
1622
|
+
function Hl(i, r) {
|
|
1623
|
+
return f(), w("svg", Tl, r[0] || (r[0] = [
|
|
1624
1624
|
l("path", {
|
|
1625
1625
|
stroke: "none",
|
|
1626
1626
|
d: "M0 0h24v24H0z",
|
|
@@ -1629,10 +1629,10 @@ function Nl(i, r) {
|
|
|
1629
1629
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1630
1630
|
]));
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1632
|
+
const El = /* @__PURE__ */ me(Ol, [["render", Hl]]), Nl = { class: "flex" }, Wl = { class: "mb-1" }, Zl = { class: "mb-1" }, Yl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, ql = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Ql = {
|
|
1633
1633
|
key: 1,
|
|
1634
1634
|
class: "flex gap-1 !w-[75%] rounded-lg"
|
|
1635
|
-
},
|
|
1635
|
+
}, Gl = ["max", "disabled"], Jl = ["min", "disabled"], Xl = /* @__PURE__ */ Q({
|
|
1636
1636
|
__name: "date-input-inline",
|
|
1637
1637
|
props: {
|
|
1638
1638
|
id: {},
|
|
@@ -1667,18 +1667,18 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
1667
1667
|
prevClick: g,
|
|
1668
1668
|
currentLabel: d,
|
|
1669
1669
|
clear: y
|
|
1670
|
-
} =
|
|
1670
|
+
} = nt({
|
|
1671
1671
|
...o,
|
|
1672
1672
|
popoverRef: c
|
|
1673
1673
|
}, t);
|
|
1674
|
-
return
|
|
1674
|
+
return j(() => o.modelValue, (_) => {
|
|
1675
1675
|
_ !== void 0 ? (h.value = _, t("update:modelValue", _)) : (u.value = "", h.value = []);
|
|
1676
1676
|
}), r({
|
|
1677
1677
|
clear: y,
|
|
1678
1678
|
popoverRef: c
|
|
1679
|
-
}), (_, v) => (f(), w(
|
|
1680
|
-
l("div",
|
|
1681
|
-
Y(
|
|
1679
|
+
}), (_, v) => (f(), w(I, null, [
|
|
1680
|
+
l("div", Nl, [
|
|
1681
|
+
Y(Ie, {
|
|
1682
1682
|
ref_key: "popoverRef",
|
|
1683
1683
|
ref: c,
|
|
1684
1684
|
label: e(d),
|
|
@@ -1695,7 +1695,7 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
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
|
v[12] || (v[12] = ee(" Період ", -1)),
|
|
1698
|
-
e(u) === "range" ? (f(),
|
|
1698
|
+
e(u) === "range" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1699
1699
|
])
|
|
1700
1700
|
]),
|
|
1701
1701
|
v[19] || (v[19] = l("div", null, [
|
|
@@ -1708,7 +1708,7 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
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
|
v[13] || (v[13] = ee(" Сьогодні ", -1)),
|
|
1711
|
-
e(u) === "today" ? (f(),
|
|
1711
|
+
e(u) === "today" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1712
1712
|
])
|
|
1713
1713
|
]),
|
|
1714
1714
|
l("div", null, [
|
|
@@ -1718,7 +1718,7 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
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
|
v[14] || (v[14] = ee(" Тиждень ", -1)),
|
|
1721
|
-
e(u) === "week" ? (f(),
|
|
1721
|
+
e(u) === "week" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1722
1722
|
])
|
|
1723
1723
|
]),
|
|
1724
1724
|
l("div", null, [
|
|
@@ -1728,7 +1728,7 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
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
|
v[15] || (v[15] = ee(" Місяць ", -1)),
|
|
1731
|
-
e(u) === "month" ? (f(),
|
|
1731
|
+
e(u) === "month" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1732
1732
|
])
|
|
1733
1733
|
]),
|
|
1734
1734
|
l("div", null, [
|
|
@@ -1738,35 +1738,35 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
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
|
v[16] || (v[16] = ee(" Квартал ", -1)),
|
|
1741
|
-
e(u) === "quarter" ? (f(),
|
|
1741
|
+
e(u) === "quarter" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1742
1742
|
])
|
|
1743
1743
|
]),
|
|
1744
|
-
l("div",
|
|
1744
|
+
l("div", Wl, [
|
|
1745
1745
|
l("button", {
|
|
1746
1746
|
type: "button",
|
|
1747
1747
|
onClick: v[5] || (v[5] = (p) => e(m)("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
|
v[17] || (v[17] = ee(" Рік ", -1)),
|
|
1751
|
-
e(u) === "year" ? (f(),
|
|
1751
|
+
e(u) === "year" ? (f(), P(_e, { key: 0 })) : S("", !0)
|
|
1752
1752
|
])
|
|
1753
1753
|
]),
|
|
1754
|
-
l("div",
|
|
1754
|
+
l("div", Zl, [
|
|
1755
1755
|
l("button", {
|
|
1756
1756
|
type: "button",
|
|
1757
1757
|
onClick: v[6] || (v[6] = (p) => 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
|
v[18] || (v[18] = ee(" Весь час ", -1)),
|
|
1761
|
-
e(h)[0] ? S("", !0) : (f(),
|
|
1761
|
+
e(h)[0] ? S("", !0) : (f(), P(_e, { 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(u) !== "" && e(u) !== "range" && e(u) !== "last_7_days" ? (f(), w(
|
|
1769
|
-
l("div",
|
|
1768
|
+
e(u) !== "" && e(u) !== "range" && e(u) !== "last_7_days" ? (f(), w(I, { key: 0 }, [
|
|
1769
|
+
l("div", Yl, [
|
|
1770
1770
|
l("button", {
|
|
1771
1771
|
type: "button",
|
|
1772
1772
|
title: "Попередній період",
|
|
@@ -1774,10 +1774,10 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
1774
1774
|
onClick: v[7] || (v[7] = //@ts-ignore
|
|
1775
1775
|
(...p) => e(g) && e(g)(...p))
|
|
1776
1776
|
}, [
|
|
1777
|
-
Y(
|
|
1777
|
+
Y(Il)
|
|
1778
1778
|
])
|
|
1779
1779
|
]),
|
|
1780
|
-
l("div",
|
|
1780
|
+
l("div", ql, [
|
|
1781
1781
|
l("button", {
|
|
1782
1782
|
type: "button",
|
|
1783
1783
|
title: "Наступний період",
|
|
@@ -1785,11 +1785,11 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
1785
1785
|
onClick: v[8] || (v[8] = //@ts-ignore
|
|
1786
1786
|
(...p) => e(x) && e(x)(...p))
|
|
1787
1787
|
}, [
|
|
1788
|
-
Y(
|
|
1788
|
+
Y(El)
|
|
1789
1789
|
])
|
|
1790
1790
|
])
|
|
1791
1791
|
], 64)) : S("", !0),
|
|
1792
|
-
e(u) !== "" && e(u) === "range" ? (f(), w("div",
|
|
1792
|
+
e(u) !== "" && e(u) === "range" ? (f(), w("div", Ql, [
|
|
1793
1793
|
N(l("input", {
|
|
1794
1794
|
type: "date",
|
|
1795
1795
|
max: e(h)[1],
|
|
@@ -1797,8 +1797,8 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
1797
1797
|
"onUpdate:modelValue": v[9] || (v[9] = (p) => e(h)[0] = p),
|
|
1798
1798
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
|
|
1799
1799
|
disabled: _.disabled
|
|
1800
|
-
}, null, 8,
|
|
1801
|
-
[
|
|
1800
|
+
}, null, 8, Gl), [
|
|
1801
|
+
[ve, e(h)[0]]
|
|
1802
1802
|
]),
|
|
1803
1803
|
N(l("input", {
|
|
1804
1804
|
type: "date",
|
|
@@ -1807,26 +1807,26 @@ const Wl = /* @__PURE__ */ ve(Hl, [["render", Nl]]), Zl = { class: "flex" }, Yl
|
|
|
1807
1807
|
"onUpdate:modelValue": v[10] || (v[10] = (p) => e(h)[1] = p),
|
|
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
1809
|
disabled: _.disabled
|
|
1810
|
-
}, null, 8,
|
|
1811
|
-
[
|
|
1810
|
+
}, null, 8, Jl), [
|
|
1811
|
+
[ve, e(h)[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
|
+
}), Ee = {
|
|
1819
|
+
radio: Ft,
|
|
1820
|
+
checkbox: He,
|
|
1821
|
+
check: He,
|
|
1822
|
+
text: Yt,
|
|
1823
|
+
range: al,
|
|
1824
|
+
date: xl,
|
|
1825
|
+
select: $l,
|
|
1826
|
+
tag: jl,
|
|
1827
|
+
"date:inline": Xl
|
|
1828
1828
|
};
|
|
1829
|
-
function
|
|
1829
|
+
function Oe(i, r) {
|
|
1830
1830
|
let n;
|
|
1831
1831
|
switch (i.toLowerCase()) {
|
|
1832
1832
|
case "autocomplete":
|
|
@@ -1839,11 +1839,11 @@ function He(i, r) {
|
|
|
1839
1839
|
n = i == null ? void 0 : i.toString().toLowerCase();
|
|
1840
1840
|
}
|
|
1841
1841
|
return n === "date" && r && r === "inline" && (n = "date:inline"), {
|
|
1842
|
-
component:
|
|
1842
|
+
component: Ee[n] || Ee.text,
|
|
1843
1843
|
type: n
|
|
1844
1844
|
};
|
|
1845
1845
|
}
|
|
1846
|
-
const
|
|
1846
|
+
const ea = {}, ta = {
|
|
1847
1847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1848
1848
|
width: "15px",
|
|
1849
1849
|
height: "24",
|
|
@@ -1855,8 +1855,8 @@ const la = {}, aa = {
|
|
|
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 f(), w("svg",
|
|
1858
|
+
function la(i, r) {
|
|
1859
|
+
return f(), w("svg", ta, r[0] || (r[0] = [
|
|
1860
1860
|
l("path", {
|
|
1861
1861
|
stroke: "none",
|
|
1862
1862
|
d: "M0 0h24v24H0z",
|
|
@@ -1866,7 +1866,7 @@ function oa(i, r) {
|
|
|
1866
1866
|
l("path", { d: "M20 4v5h-5" }, null, -1)
|
|
1867
1867
|
]));
|
|
1868
1868
|
}
|
|
1869
|
-
const
|
|
1869
|
+
const aa = /* @__PURE__ */ me(ea, [["render", la]]), oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, ra = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, na = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, ia = { class: "flex items-center" }, sa = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, ua = { class: "filter-layout__body" }, ca = /* @__PURE__ */ Q({
|
|
1870
1870
|
__name: "vertical-layout",
|
|
1871
1871
|
props: {
|
|
1872
1872
|
id: {},
|
|
@@ -1893,7 +1893,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1893
1893
|
},
|
|
1894
1894
|
emits: ["update:modelValue", "change", "clear"],
|
|
1895
1895
|
setup(i, { expose: r, emit: n }) {
|
|
1896
|
-
const o = i, t = n, c = V(), u =
|
|
1896
|
+
const o = i, t = n, c = V(), u = Oe(o.type, o.layout), h = W({
|
|
1897
1897
|
get: () => o.modelValue,
|
|
1898
1898
|
set: (d) => t("update:modelValue", d)
|
|
1899
1899
|
});
|
|
@@ -1906,12 +1906,12 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1906
1906
|
function g() {
|
|
1907
1907
|
c.value && c.value.clear(), t("clear", o.name);
|
|
1908
1908
|
}
|
|
1909
|
-
return
|
|
1909
|
+
return j(
|
|
1910
1910
|
() => o.default,
|
|
1911
1911
|
(d) => {
|
|
1912
1912
|
h.value = d;
|
|
1913
1913
|
}
|
|
1914
|
-
),
|
|
1914
|
+
), j(
|
|
1915
1915
|
() => o.modelValue,
|
|
1916
1916
|
(d) => {
|
|
1917
1917
|
h.value = d;
|
|
@@ -1920,25 +1920,25 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1920
1920
|
filterRef: c
|
|
1921
1921
|
}), (d, y) => {
|
|
1922
1922
|
var _, v, p;
|
|
1923
|
-
return f(), w("div",
|
|
1924
|
-
l("div",
|
|
1925
|
-
l("div",
|
|
1926
|
-
l("div",
|
|
1927
|
-
l("span",
|
|
1923
|
+
return f(), w("div", oa, [
|
|
1924
|
+
l("div", ra, [
|
|
1925
|
+
l("div", na, [
|
|
1926
|
+
l("div", ia, [
|
|
1927
|
+
l("span", sa, O(d.label), 1)
|
|
1928
1928
|
]),
|
|
1929
|
-
typeof h.value == "string" && h.value.trim() !== "" || Array.isArray(h.value) && h.value.length > 0 && h.value.some((a) => a !== void 0) || h.value === null ? (f(),
|
|
1929
|
+
typeof h.value == "string" && h.value.trim() !== "" || Array.isArray(h.value) && h.value.length > 0 && h.value.some((a) => a !== void 0) || h.value === null ? (f(), P(aa, {
|
|
1930
1930
|
key: 0,
|
|
1931
1931
|
onClick: g
|
|
1932
1932
|
})) : S("", !0)
|
|
1933
1933
|
]),
|
|
1934
|
-
l("div",
|
|
1935
|
-
((_ = e(u)) == null ? void 0 : _.type) !== "select" ? (f(),
|
|
1934
|
+
l("div", ua, [
|
|
1935
|
+
((_ = e(u)) == null ? void 0 : _.type) !== "select" ? (f(), P(xe((v = e(u)) == null ? void 0 : v.component), ie({ key: 0 }, o, {
|
|
1936
1936
|
type: (p = e(u)) == null ? void 0 : p.type,
|
|
1937
1937
|
onChange: y[0] || (y[0] = (a) => x(a.name, a.value)),
|
|
1938
1938
|
onClear: y[1] || (y[1] = (a) => m(a)),
|
|
1939
1939
|
ref_key: "filterRef",
|
|
1940
1940
|
ref: c
|
|
1941
|
-
}), null, 16, ["type"])) : (f(),
|
|
1941
|
+
}), null, 16, ["type"])) : (f(), P(Ie, {
|
|
1942
1942
|
key: 1,
|
|
1943
1943
|
"current-value": h.value,
|
|
1944
1944
|
label: d.label,
|
|
@@ -1952,7 +1952,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1952
1952
|
default: we(() => {
|
|
1953
1953
|
var a, C;
|
|
1954
1954
|
return [
|
|
1955
|
-
(f(),
|
|
1955
|
+
(f(), P(xe((a = e(u)) == null ? void 0 : a.component), ie({
|
|
1956
1956
|
ref_key: "filterRef",
|
|
1957
1957
|
ref: c
|
|
1958
1958
|
}, o, {
|
|
@@ -1969,7 +1969,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1969
1969
|
]);
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
1972
|
-
}),
|
|
1972
|
+
}), Ne = /* @__PURE__ */ Q({
|
|
1973
1973
|
__name: "inline-layout",
|
|
1974
1974
|
props: {
|
|
1975
1975
|
id: {},
|
|
@@ -1996,7 +1996,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
1996
1996
|
},
|
|
1997
1997
|
emits: ["update:modelValue", "change", "clear"],
|
|
1998
1998
|
setup(i, { expose: r, emit: n }) {
|
|
1999
|
-
const o = i, t = n, c = V(), u =
|
|
1999
|
+
const o = i, t = n, c = V(), u = Oe(o.type, o.layout), h = W({
|
|
2000
2000
|
get: () => o.modelValue,
|
|
2001
2001
|
set: (g) => t("update:modelValue", g)
|
|
2002
2002
|
});
|
|
@@ -2006,12 +2006,12 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2006
2006
|
function x(g, d) {
|
|
2007
2007
|
t("change", { name: g, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2008
2008
|
}
|
|
2009
|
-
return
|
|
2009
|
+
return j(
|
|
2010
2010
|
() => o.default,
|
|
2011
2011
|
(g) => {
|
|
2012
2012
|
h.value = g;
|
|
2013
2013
|
}
|
|
2014
|
-
),
|
|
2014
|
+
), j(
|
|
2015
2015
|
() => o.modelValue,
|
|
2016
2016
|
(g) => {
|
|
2017
2017
|
h.value = g;
|
|
@@ -2020,14 +2020,14 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2020
2020
|
filterRef: c
|
|
2021
2021
|
}), (g, d) => {
|
|
2022
2022
|
var y, _;
|
|
2023
|
-
return ["text", "date"].includes(g.type.toLocaleLowerCase()) ? (f(),
|
|
2023
|
+
return ["text", "date"].includes(g.type.toLocaleLowerCase()) ? (f(), P(xe((y = e(u)) == null ? void 0 : y.component), ie({ key: 0 }, o, {
|
|
2024
2024
|
type: (_ = e(u)) == null ? void 0 : _.type,
|
|
2025
2025
|
onChange: d[0] || (d[0] = (v) => x(v.name, v.value)),
|
|
2026
2026
|
onClear: d[1] || (d[1] = (v) => m(v)),
|
|
2027
2027
|
disabled: g.disabled,
|
|
2028
2028
|
modelValue: h.value,
|
|
2029
2029
|
"onUpdate:modelValue": d[2] || (d[2] = (v) => h.value = v)
|
|
2030
|
-
}), null, 16, ["type", "disabled", "modelValue"])) : (f(),
|
|
2030
|
+
}), null, 16, ["type", "disabled", "modelValue"])) : (f(), P(Ie, {
|
|
2031
2031
|
key: 1,
|
|
2032
2032
|
"current-value": h.value,
|
|
2033
2033
|
label: g.label,
|
|
@@ -2041,7 +2041,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2041
2041
|
default: we(() => {
|
|
2042
2042
|
var v, p;
|
|
2043
2043
|
return [
|
|
2044
|
-
(f(),
|
|
2044
|
+
(f(), P(xe((v = e(u)) == null ? void 0 : v.component), ie({
|
|
2045
2045
|
ref_key: "filterRef",
|
|
2046
2046
|
ref: c
|
|
2047
2047
|
}, o, {
|
|
@@ -2057,7 +2057,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2057
2057
|
}, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
|
|
2058
2058
|
};
|
|
2059
2059
|
}
|
|
2060
|
-
}),
|
|
2060
|
+
}), da = /* @__PURE__ */ Q({
|
|
2061
2061
|
__name: "popover-layout",
|
|
2062
2062
|
props: {
|
|
2063
2063
|
id: {},
|
|
@@ -2084,7 +2084,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2084
2084
|
},
|
|
2085
2085
|
emits: ["update:modelValue", "change", "clear"],
|
|
2086
2086
|
setup(i, { expose: r, emit: n }) {
|
|
2087
|
-
const o = i, t = n, c = V(), u = V(
|
|
2087
|
+
const o = i, t = n, c = V(), u = V(Oe(o.type, o.layout)), h = W({
|
|
2088
2088
|
get: () => o.modelValue,
|
|
2089
2089
|
set: (g) => t("update:modelValue", g)
|
|
2090
2090
|
});
|
|
@@ -2094,17 +2094,17 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2094
2094
|
function x(g, d) {
|
|
2095
2095
|
t("change", { name: g, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2096
2096
|
}
|
|
2097
|
-
return
|
|
2097
|
+
return j(
|
|
2098
2098
|
() => o.default,
|
|
2099
2099
|
(g) => {
|
|
2100
2100
|
h.value = g;
|
|
2101
2101
|
}
|
|
2102
|
-
),
|
|
2102
|
+
), j(
|
|
2103
2103
|
() => o.modelValue,
|
|
2104
2104
|
(g) => {
|
|
2105
2105
|
h.value = g;
|
|
2106
2106
|
}
|
|
2107
|
-
),
|
|
2107
|
+
), j(
|
|
2108
2108
|
() => o,
|
|
2109
2109
|
(g) => {
|
|
2110
2110
|
h.value = g;
|
|
@@ -2113,7 +2113,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2113
2113
|
filterRef: c
|
|
2114
2114
|
}), (g, d) => {
|
|
2115
2115
|
var y, _;
|
|
2116
|
-
return f(),
|
|
2116
|
+
return f(), P(xe((y = u.value) == null ? void 0 : y.component), ie(o, {
|
|
2117
2117
|
type: (_ = u.value) == null ? void 0 : _.type,
|
|
2118
2118
|
modelValue: h.value,
|
|
2119
2119
|
"onUpdate:modelValue": d[0] || (d[0] = (v) => h.value = v),
|
|
@@ -2124,7 +2124,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2124
2124
|
}), null, 16, ["type", "modelValue"]);
|
|
2125
2125
|
};
|
|
2126
2126
|
}
|
|
2127
|
-
}), ke = /* @__PURE__ */
|
|
2127
|
+
}), ke = /* @__PURE__ */ Q({
|
|
2128
2128
|
__name: "filter-field",
|
|
2129
2129
|
props: {
|
|
2130
2130
|
id: {},
|
|
@@ -2151,7 +2151,7 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2151
2151
|
},
|
|
2152
2152
|
emits: ["update:modelValue", "change", "clear"],
|
|
2153
2153
|
setup(i, { expose: r, emit: n }) {
|
|
2154
|
-
const o = i, t = n, c = V(), u =
|
|
2154
|
+
const o = i, t = n, c = V(), u = W({
|
|
2155
2155
|
get: () => o.modelValue,
|
|
2156
2156
|
set: (g) => t("update:modelValue", g)
|
|
2157
2157
|
});
|
|
@@ -2161,12 +2161,12 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2161
2161
|
function m(g, d) {
|
|
2162
2162
|
t("change", { name: g, value: d }), o.modelValue !== void 0 && t("update:modelValue", d);
|
|
2163
2163
|
}
|
|
2164
|
-
|
|
2164
|
+
j(
|
|
2165
2165
|
() => o.default,
|
|
2166
2166
|
(g) => {
|
|
2167
2167
|
u.value = g;
|
|
2168
2168
|
}
|
|
2169
|
-
),
|
|
2169
|
+
), j(
|
|
2170
2170
|
() => o.modelValue,
|
|
2171
2171
|
(g) => {
|
|
2172
2172
|
u.value = g;
|
|
@@ -2177,16 +2177,16 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2177
2177
|
function x() {
|
|
2178
2178
|
switch (o.layout) {
|
|
2179
2179
|
case "inline":
|
|
2180
|
-
return
|
|
2180
|
+
return Ne;
|
|
2181
2181
|
case "vertical":
|
|
2182
|
-
return
|
|
2182
|
+
return ca;
|
|
2183
2183
|
case "popover":
|
|
2184
|
-
return
|
|
2184
|
+
return da;
|
|
2185
2185
|
default:
|
|
2186
|
-
return
|
|
2186
|
+
return Ne;
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
|
-
return (g, d) => (f(),
|
|
2189
|
+
return (g, d) => (f(), P(xe(x()), ie(o, {
|
|
2190
2190
|
onChange: d[0] || (d[0] = (y) => m(y.name, y.value)),
|
|
2191
2191
|
onClear: d[1] || (d[1] = (y) => h(y)),
|
|
2192
2192
|
modelValue: u.value,
|
|
@@ -2194,16 +2194,16 @@ const ra = /* @__PURE__ */ ve(la, [["render", oa]]), na = { style: { display: "i
|
|
|
2194
2194
|
}), null, 16, ["modelValue"]));
|
|
2195
2195
|
}
|
|
2196
2196
|
});
|
|
2197
|
-
function
|
|
2197
|
+
function Te(i, r) {
|
|
2198
2198
|
const {
|
|
2199
2199
|
slots: n
|
|
2200
|
-
} = i, o = V(i.value ?? {}), t =
|
|
2200
|
+
} = i, o = V(i.value ?? {}), t = W(() => {
|
|
2201
2201
|
var b;
|
|
2202
|
-
return (
|
|
2202
|
+
return ($e((b = n == null ? void 0 : n.default) == null ? void 0 : b.call(n)) ?? []).flatMap((s) => Array.isArray(s.children) ? s.children : [s]);
|
|
2203
2203
|
});
|
|
2204
2204
|
function c(b) {
|
|
2205
2205
|
delete o.value[b], r("clear", {
|
|
2206
|
-
data:
|
|
2206
|
+
data: $e(o.value),
|
|
2207
2207
|
name: b
|
|
2208
2208
|
});
|
|
2209
2209
|
}
|
|
@@ -2212,25 +2212,25 @@ function Ee(i, r) {
|
|
|
2212
2212
|
...o.value,
|
|
2213
2213
|
[b]: s
|
|
2214
2214
|
}, r("change", {
|
|
2215
|
-
data:
|
|
2215
|
+
data: $e(o.value),
|
|
2216
2216
|
name: b,
|
|
2217
2217
|
value: s
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
|
-
const h =
|
|
2220
|
+
const h = W(() => t.value.map((b) => {
|
|
2221
2221
|
var k;
|
|
2222
2222
|
const s = (k = b.props) == null ? void 0 : k.name;
|
|
2223
|
-
return
|
|
2223
|
+
return dt(b, {
|
|
2224
2224
|
...b.props,
|
|
2225
2225
|
layout: i.view,
|
|
2226
2226
|
showClean: !0,
|
|
2227
2227
|
modelValue: o[s],
|
|
2228
|
-
"onUpdate:modelValue": (
|
|
2229
|
-
u(s,
|
|
2228
|
+
"onUpdate:modelValue": (B) => {
|
|
2229
|
+
u(s, B);
|
|
2230
2230
|
},
|
|
2231
2231
|
onClear: () => c(s)
|
|
2232
2232
|
});
|
|
2233
|
-
})), m =
|
|
2233
|
+
})), m = W(
|
|
2234
2234
|
() => new Map(
|
|
2235
2235
|
h.value.map((b) => {
|
|
2236
2236
|
var k;
|
|
@@ -2241,25 +2241,25 @@ function Ee(i, r) {
|
|
|
2241
2241
|
);
|
|
2242
2242
|
function x(b = !1) {
|
|
2243
2243
|
o.value = {}, b || r("clearAll", {
|
|
2244
|
-
data:
|
|
2244
|
+
data: $e(o.value),
|
|
2245
2245
|
name: "ALL"
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
|
-
const g = V(""), d =
|
|
2248
|
+
const g = V(""), d = W(() => {
|
|
2249
2249
|
var b;
|
|
2250
|
-
return (b = i.schema) != null && b.value ? Object.entries(o.value).filter(([s, k]) => i.schema && !(s in i.schema.value) ? !1 : Array.isArray(k) ? k.some((
|
|
2250
|
+
return (b = i.schema) != null && b.value ? Object.entries(o.value).filter(([s, k]) => i.schema && !(s in i.schema.value) ? !1 : Array.isArray(k) ? k.some((B) => B !== "" && B !== void 0) : k !== "" && k !== void 0).length : 0;
|
|
2251
2251
|
}), y = V();
|
|
2252
|
-
|
|
2252
|
+
j(g, async () => {
|
|
2253
2253
|
var b, s;
|
|
2254
|
-
await
|
|
2254
|
+
await Ae(), (s = (b = y == null ? void 0 : y.value) == null ? void 0 : b.filterRef) != null && s.inputTextRef && y.value.filterRef.inputTextRef.focus();
|
|
2255
2255
|
});
|
|
2256
|
-
const _ =
|
|
2256
|
+
const _ = W(() => {
|
|
2257
2257
|
var b, s;
|
|
2258
2258
|
return (b = i.schema) != null && b.value ? Object.fromEntries(Object.entries((s = i.schema) == null ? void 0 : s.value).slice(0, i.limit)) : {};
|
|
2259
|
-
}), v =
|
|
2259
|
+
}), v = W(() => {
|
|
2260
2260
|
var b, s, k;
|
|
2261
2261
|
return (b = i.schema) != null && b.value ? i.view !== "inline" ? (s = i.schema) == null ? void 0 : s.value : Object.fromEntries(Object.entries((k = i.schema) == null ? void 0 : k.value).slice(i.limit)) : {};
|
|
2262
|
-
}), p =
|
|
2262
|
+
}), p = W(() => {
|
|
2263
2263
|
var s;
|
|
2264
2264
|
if (h.value.length === 0) return [];
|
|
2265
2265
|
let b = 0;
|
|
@@ -2268,7 +2268,7 @@ function Ee(i, r) {
|
|
|
2268
2268
|
k < i.limit ? b = i.limit - k : b = 0;
|
|
2269
2269
|
}
|
|
2270
2270
|
return h.value.slice(0, b);
|
|
2271
|
-
}), a =
|
|
2271
|
+
}), a = W(() => h.value.length === 0 ? [] : i.view !== "inline" ? h.value : h.value.slice(p.value.length));
|
|
2272
2272
|
function C() {
|
|
2273
2273
|
if (v.value) {
|
|
2274
2274
|
const [b] = Object.keys(v.value);
|
|
@@ -2292,7 +2292,7 @@ function Ee(i, r) {
|
|
|
2292
2292
|
filterRef: y
|
|
2293
2293
|
};
|
|
2294
2294
|
}
|
|
2295
|
-
const
|
|
2295
|
+
const pa = /* @__PURE__ */ Q({
|
|
2296
2296
|
__name: "popover",
|
|
2297
2297
|
emits: ["open", "close"],
|
|
2298
2298
|
setup(i, { emit: r }) {
|
|
@@ -2317,24 +2317,24 @@ const va = /* @__PURE__ */ G({
|
|
|
2317
2317
|
!((v = c.value) != null && v.contains(y.target)) && !((p = o.value) != null && p.contains(y.target)) && !_.closest("[data-inside-popover]") && (n.value = !1);
|
|
2318
2318
|
}
|
|
2319
2319
|
const g = V(!1);
|
|
2320
|
-
|
|
2320
|
+
Ce(() => {
|
|
2321
2321
|
g.value = !0;
|
|
2322
|
-
}),
|
|
2322
|
+
}), Ce(() => {
|
|
2323
2323
|
var y, _;
|
|
2324
2324
|
c.value = ((y = t.value) == null ? void 0 : y.querySelector("[data-popover-trigger]")) || null, (_ = c.value) == null || _.addEventListener("click", h), document.addEventListener("click", x), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0);
|
|
2325
|
-
}),
|
|
2325
|
+
}), Me(() => {
|
|
2326
2326
|
var y;
|
|
2327
2327
|
(y = c.value) == null || y.removeEventListener("click", h), document.removeEventListener("click", x), window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
2328
2328
|
});
|
|
2329
2329
|
const d = r;
|
|
2330
|
-
return
|
|
2331
|
-
y ? (d("open"), await
|
|
2330
|
+
return j(n, async (y) => {
|
|
2331
|
+
y ? (d("open"), await Ae(), m()) : d("close");
|
|
2332
2332
|
}), (y, _) => (f(), w("div", {
|
|
2333
2333
|
ref_key: "wrapperRef",
|
|
2334
2334
|
ref: t
|
|
2335
2335
|
}, [
|
|
2336
|
-
|
|
2337
|
-
g.value ? (f(),
|
|
2336
|
+
fe(y.$slots, "trigger"),
|
|
2337
|
+
g.value ? (f(), P(Qe, {
|
|
2338
2338
|
key: 0,
|
|
2339
2339
|
to: "body"
|
|
2340
2340
|
}, [
|
|
@@ -2342,16 +2342,16 @@ const va = /* @__PURE__ */ G({
|
|
|
2342
2342
|
ref_key: "popoverRef",
|
|
2343
2343
|
ref: o,
|
|
2344
2344
|
class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
|
|
2345
|
-
style:
|
|
2345
|
+
style: Le(u.value)
|
|
2346
2346
|
}, [
|
|
2347
|
-
|
|
2347
|
+
fe(y.$slots, "default")
|
|
2348
2348
|
], 4), [
|
|
2349
2349
|
[ce, n.value]
|
|
2350
2350
|
])
|
|
2351
2351
|
])) : S("", !0)
|
|
2352
2352
|
], 512));
|
|
2353
2353
|
}
|
|
2354
|
-
}),
|
|
2354
|
+
}), fa = {}, va = {
|
|
2355
2355
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2356
2356
|
width: "24",
|
|
2357
2357
|
height: "24",
|
|
@@ -2363,27 +2363,27 @@ const va = /* @__PURE__ */ G({
|
|
|
2363
2363
|
"stroke-linejoin": "round",
|
|
2364
2364
|
class: "lucide lucide-filter h-4 w-4"
|
|
2365
2365
|
};
|
|
2366
|
-
function
|
|
2367
|
-
return f(), w("svg",
|
|
2366
|
+
function ma(i, r) {
|
|
2367
|
+
return f(), w("svg", va, r[0] || (r[0] = [
|
|
2368
2368
|
l("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 ha = /* @__PURE__ */ me(fa, [["render", ma]]), ga = {
|
|
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
|
+
}, ya = { class: "flex" }, ba = { class: "w-64 border-r border-gray-200" }, xa = { class: "p-2" }, wa = ["onClick"], ka = { class: "flex items-center gap-2" }, _a = { class: "text-sm font-medium" }, Ca = {
|
|
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
|
+
}, Va = ["onClick"], Sa = { class: "flex items-center gap-2" }, $a = { class: "text-sm font-medium" }, Ma = {
|
|
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
|
+
}, Ba = {
|
|
2381
2381
|
key: 0,
|
|
2382
2382
|
class: "p-2 border-t"
|
|
2383
|
-
},
|
|
2383
|
+
}, za = { class: "flex-1 min-h-[300px] overflow-y-auto" }, Aa = {
|
|
2384
2384
|
key: 0,
|
|
2385
2385
|
class: "flex items-center justify-center h-full text-gray-500"
|
|
2386
|
-
},
|
|
2386
|
+
}, it = /* @__PURE__ */ Q({
|
|
2387
2387
|
__name: "popover-filter-layout",
|
|
2388
2388
|
props: {
|
|
2389
2389
|
schema: {},
|
|
@@ -2395,7 +2395,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2395
2395
|
},
|
|
2396
2396
|
emits: ["change", "clear", "clearAll"],
|
|
2397
2397
|
setup(i, { expose: r, emit: n }) {
|
|
2398
|
-
const o = i, t =
|
|
2398
|
+
const o = i, t = rt(o.mode), c = Fe(), u = n, h = V({}), {
|
|
2399
2399
|
activeFilter: m,
|
|
2400
2400
|
activeFilterCount: x,
|
|
2401
2401
|
onFilterChange: g,
|
|
@@ -2406,12 +2406,12 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2406
2406
|
onPopoverOpen: p,
|
|
2407
2407
|
selectedFilter: a,
|
|
2408
2408
|
filterRef: C
|
|
2409
|
-
} =
|
|
2409
|
+
} = Te({
|
|
2410
2410
|
...o,
|
|
2411
2411
|
schema: h,
|
|
2412
2412
|
slots: c
|
|
2413
2413
|
}, u);
|
|
2414
|
-
return
|
|
2414
|
+
return j(
|
|
2415
2415
|
() => o.schema,
|
|
2416
2416
|
(b) => {
|
|
2417
2417
|
h.value = b;
|
|
@@ -2420,7 +2420,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2420
2420
|
), r({
|
|
2421
2421
|
clearFilter: d,
|
|
2422
2422
|
clearAllFilters: y
|
|
2423
|
-
}), (b, s) => (f(),
|
|
2423
|
+
}), (b, s) => (f(), P(pa, {
|
|
2424
2424
|
onOpen: e(p),
|
|
2425
2425
|
onClose: s[5] || (s[5] = (k) => a.value = "")
|
|
2426
2426
|
}, {
|
|
@@ -2429,59 +2429,59 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2429
2429
|
"data-popover-trigger": "",
|
|
2430
2430
|
"aria-haspopup": "dialog",
|
|
2431
2431
|
"aria-expanded": "false",
|
|
2432
|
-
class:
|
|
2432
|
+
class: U(
|
|
2433
2433
|
e(t) + (e(x) > 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
|
-
Y(
|
|
2437
|
+
Y(ha),
|
|
2438
2438
|
s[6] || (s[6] = ee(" Фільтр ", -1)),
|
|
2439
|
-
e(x) > 0 ? (f(), w("div",
|
|
2439
|
+
e(x) > 0 ? (f(), w("div", ga, O(e(x)), 1)) : S("", !0)
|
|
2440
2440
|
], 2)
|
|
2441
2441
|
]),
|
|
2442
2442
|
default: we(() => [
|
|
2443
|
-
l("div",
|
|
2444
|
-
l("div",
|
|
2443
|
+
l("div", ya, [
|
|
2444
|
+
l("div", ba, [
|
|
2445
2445
|
s[7] || (s[7] = l("div", { class: "p-4 border-b" }, [
|
|
2446
2446
|
l("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
|
|
2447
2447
|
], -1)),
|
|
2448
|
-
l("div",
|
|
2449
|
-
b.schema ? (f(!0), w(
|
|
2448
|
+
l("div", xa, [
|
|
2449
|
+
b.schema ? (f(!0), w(I, { key: 0 }, ae(Object.entries(e(_)), ([k, B]) => {
|
|
2450
2450
|
var A;
|
|
2451
2451
|
return f(), w("button", {
|
|
2452
2452
|
key: k,
|
|
2453
2453
|
onClick: () => {
|
|
2454
2454
|
a.value = k;
|
|
2455
2455
|
},
|
|
2456
|
-
class:
|
|
2456
|
+
class: U([
|
|
2457
2457
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
2458
2458
|
e(a) === k ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
2459
2459
|
])
|
|
2460
2460
|
}, [
|
|
2461
|
-
l("div",
|
|
2462
|
-
l("span",
|
|
2461
|
+
l("div", ka, [
|
|
2462
|
+
l("span", _a, O(B.label), 1)
|
|
2463
2463
|
]),
|
|
2464
|
-
(Array.isArray(e(m)[k]) ? ((A = e(m)[k]) == null ? void 0 : A.length) > 0 : e(m)[k] || e(m)[k] === null) ? (f(), w("div",
|
|
2465
|
-
], 10,
|
|
2464
|
+
(Array.isArray(e(m)[k]) ? ((A = e(m)[k]) == null ? void 0 : A.length) > 0 : e(m)[k] || e(m)[k] === null) ? (f(), w("div", Ca)) : S("", !0)
|
|
2465
|
+
], 10, wa);
|
|
2466
2466
|
}), 128)) : S("", !0),
|
|
2467
|
-
(f(!0), w(
|
|
2467
|
+
(f(!0), w(I, null, ae(e(v), (k, B) => {
|
|
2468
2468
|
var A;
|
|
2469
2469
|
return f(), w("button", {
|
|
2470
|
-
key: "slot-" +
|
|
2471
|
-
onClick: (
|
|
2472
|
-
class:
|
|
2470
|
+
key: "slot-" + B,
|
|
2471
|
+
onClick: (R) => a.value = k.props.name,
|
|
2472
|
+
class: U([
|
|
2473
2473
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
2474
2474
|
e(a) === k.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
2475
2475
|
])
|
|
2476
2476
|
}, [
|
|
2477
|
-
l("div",
|
|
2478
|
-
l("span",
|
|
2477
|
+
l("div", Sa, [
|
|
2478
|
+
l("span", $a, O(k.props.label), 1)
|
|
2479
2479
|
]),
|
|
2480
|
-
((A = e(m)[k.props.name]) == null ? void 0 : A.length) > 0 ? (f(), w("div",
|
|
2481
|
-
], 10,
|
|
2480
|
+
((A = e(m)[k.props.name]) == null ? void 0 : A.length) > 0 ? (f(), w("div", Ma)) : S("", !0)
|
|
2481
|
+
], 10, Va);
|
|
2482
2482
|
}), 128))
|
|
2483
2483
|
]),
|
|
2484
|
-
e(x) > 0 ? (f(), w("div",
|
|
2484
|
+
e(x) > 0 ? (f(), w("div", Ba, [
|
|
2485
2485
|
l("button", {
|
|
2486
2486
|
class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
|
|
2487
2487
|
onClick: s[0] || (s[0] = (k) => e(y)()),
|
|
@@ -2489,20 +2489,20 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2489
2489
|
}, " Очистити всі ")
|
|
2490
2490
|
])) : S("", !0)
|
|
2491
2491
|
]),
|
|
2492
|
-
l("div",
|
|
2493
|
-
e(a) === "" ? (f(), w("div",
|
|
2492
|
+
l("div", za, [
|
|
2493
|
+
e(a) === "" ? (f(), w("div", Aa, s[8] || (s[8] = [
|
|
2494
2494
|
l("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
|
|
2495
2495
|
]))) : S("", !0),
|
|
2496
|
-
e(a) ? (f(), w(
|
|
2497
|
-
e(_) ? (f(!0), w(
|
|
2498
|
-
e(a) === k ? (f(),
|
|
2496
|
+
e(a) ? (f(), w(I, { key: 1 }, [
|
|
2497
|
+
e(_) ? (f(!0), w(I, { key: 0 }, ae(Object.entries(e(_)), ([k, B]) => (f(), w(I, null, [
|
|
2498
|
+
e(a) === k ? (f(), P(ke, ie({
|
|
2499
2499
|
name: k,
|
|
2500
2500
|
key: k,
|
|
2501
2501
|
layout: "popover",
|
|
2502
2502
|
ref_for: !0,
|
|
2503
2503
|
ref_key: "filterRef",
|
|
2504
2504
|
ref: C
|
|
2505
|
-
}, { ref_for: !0 },
|
|
2505
|
+
}, { ref_for: !0 }, B, {
|
|
2506
2506
|
onChange: s[1] || (s[1] = (A) => e(g)(A.name, A.value)),
|
|
2507
2507
|
onClear: s[2] || (s[2] = (A) => {
|
|
2508
2508
|
e(d)(A), e(g)(A, void 0);
|
|
@@ -2512,10 +2512,10 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2512
2512
|
cleanable: !0
|
|
2513
2513
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"])) : S("", !0)
|
|
2514
2514
|
], 64))), 256)) : S("", !0),
|
|
2515
|
-
(f(!0), w(
|
|
2516
|
-
key: "slot-" +
|
|
2515
|
+
(f(!0), w(I, null, ae(e(v), (k, B) => (f(), w(I, {
|
|
2516
|
+
key: "slot-" + B
|
|
2517
2517
|
}, [
|
|
2518
|
-
e(a) === k.props.name ? (f(),
|
|
2518
|
+
e(a) === k.props.name ? (f(), P(ke, ie({
|
|
2519
2519
|
key: 0,
|
|
2520
2520
|
layout: "popover"
|
|
2521
2521
|
}, { ref_for: !0 }, k.props, {
|
|
@@ -2538,7 +2538,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2538
2538
|
_: 1
|
|
2539
2539
|
}, 8, ["onOpen"]));
|
|
2540
2540
|
}
|
|
2541
|
-
}),
|
|
2541
|
+
}), Ra = { class: "flex gap-1 items-center flex-wrap" }, We = /* @__PURE__ */ Q({
|
|
2542
2542
|
__name: "inline-filter-layout",
|
|
2543
2543
|
props: {
|
|
2544
2544
|
schema: {},
|
|
@@ -2550,7 +2550,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2550
2550
|
},
|
|
2551
2551
|
emits: ["change", "clear", "clearAll"],
|
|
2552
2552
|
setup(i, { expose: r, emit: n }) {
|
|
2553
|
-
const o = i, t = n, c =
|
|
2553
|
+
const o = i, t = n, c = Fe(), u = V({}), {
|
|
2554
2554
|
activeFilter: h,
|
|
2555
2555
|
activeFilterCount: m,
|
|
2556
2556
|
onFilterChange: x,
|
|
@@ -2561,7 +2561,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2561
2561
|
filtersSlot: v,
|
|
2562
2562
|
limitedFiltersSlot: p,
|
|
2563
2563
|
popoverFiltersSlot: a
|
|
2564
|
-
} =
|
|
2564
|
+
} = Te(
|
|
2565
2565
|
{
|
|
2566
2566
|
...o,
|
|
2567
2567
|
schema: u,
|
|
@@ -2572,7 +2572,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2572
2572
|
function b() {
|
|
2573
2573
|
C.value && C.value.clearAllFilters(!0), d();
|
|
2574
2574
|
}
|
|
2575
|
-
return
|
|
2575
|
+
return j(
|
|
2576
2576
|
() => o.schema,
|
|
2577
2577
|
(s) => {
|
|
2578
2578
|
u.value = s;
|
|
@@ -2581,47 +2581,47 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2581
2581
|
), r({
|
|
2582
2582
|
clearFilter: g,
|
|
2583
2583
|
clearAllFilters: d
|
|
2584
|
-
}), (s, k) => (f(), w("div",
|
|
2585
|
-
s.schema ? (f(!0), w(
|
|
2586
|
-
key:
|
|
2587
|
-
name:
|
|
2584
|
+
}), (s, k) => (f(), w("div", Ra, [
|
|
2585
|
+
s.schema ? (f(!0), w(I, { key: 0 }, ae(Object.entries(e(y)), ([B, A]) => (f(), P(ke, ie({
|
|
2586
|
+
key: B,
|
|
2587
|
+
name: B,
|
|
2588
2588
|
mode: s.mode
|
|
2589
2589
|
}, { ref_for: !0 }, A, {
|
|
2590
|
-
onChange: k[0] || (k[0] = (
|
|
2590
|
+
onChange: k[0] || (k[0] = (R) => e(x)(R.name, R.value)),
|
|
2591
2591
|
onClear: e(g),
|
|
2592
2592
|
layout: "inline",
|
|
2593
2593
|
cleanable: !0,
|
|
2594
|
-
modelValue: e(h)[
|
|
2595
|
-
"onUpdate:modelValue": (
|
|
2594
|
+
modelValue: e(h)[B],
|
|
2595
|
+
"onUpdate:modelValue": (R) => e(h)[B] = R
|
|
2596
2596
|
}), null, 16, ["name", "mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : S("", !0),
|
|
2597
|
-
(f(!0), w(
|
|
2597
|
+
(f(!0), w(I, null, ae(e(p), (B, A) => (f(), P(ke, ie({
|
|
2598
2598
|
key: "slot-" + A,
|
|
2599
2599
|
layout: "inline"
|
|
2600
|
-
}, { ref_for: !0 },
|
|
2601
|
-
onChange: k[1] || (k[1] = (
|
|
2602
|
-
onClear: k[2] || (k[2] = (
|
|
2603
|
-
e(g)(
|
|
2600
|
+
}, { ref_for: !0 }, B.props, {
|
|
2601
|
+
onChange: k[1] || (k[1] = (R) => e(x)(R.name, R.value)),
|
|
2602
|
+
onClear: k[2] || (k[2] = (R) => {
|
|
2603
|
+
e(g)(R), e(x)(R, void 0);
|
|
2604
2604
|
}),
|
|
2605
2605
|
cleanable: !0,
|
|
2606
|
-
modelValue: e(h)[
|
|
2607
|
-
"onUpdate:modelValue": (
|
|
2606
|
+
modelValue: e(h)[B.props.name],
|
|
2607
|
+
"onUpdate:modelValue": (R) => e(h)[B.props.name] = R
|
|
2608
2608
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
|
2609
|
-
Object.entries(e(_)).length > 0 || e(a).length > 0 ? (f(),
|
|
2609
|
+
Object.entries(e(_)).length > 0 || e(a).length > 0 ? (f(), P(it, ie({ key: 1 }, o, {
|
|
2610
2610
|
schema: e(_),
|
|
2611
2611
|
limit: 0,
|
|
2612
|
-
onChange: k[3] || (k[3] = (
|
|
2613
|
-
onClearAll: k[4] || (k[4] = (
|
|
2614
|
-
onClear: k[5] || (k[5] = (
|
|
2612
|
+
onChange: k[3] || (k[3] = (B) => e(x)(B.name, B.value)),
|
|
2613
|
+
onClearAll: k[4] || (k[4] = (B) => e(d)()),
|
|
2614
|
+
onClear: k[5] || (k[5] = (B) => e(g)(B.name)),
|
|
2615
2615
|
mode: s.mode,
|
|
2616
2616
|
ref_key: "popoverRef",
|
|
2617
2617
|
ref: C,
|
|
2618
2618
|
cleanable: !0
|
|
2619
2619
|
}), {
|
|
2620
2620
|
default: we(() => [
|
|
2621
|
-
(f(!0), w(
|
|
2621
|
+
(f(!0), w(I, null, ae(e(v), (B, A) => (f(), P(xe(B), ie({
|
|
2622
2622
|
key: "slot-" + A,
|
|
2623
2623
|
layout: "popover"
|
|
2624
|
-
}, { ref_for: !0 },
|
|
2624
|
+
}, { ref_for: !0 }, B.props, { cleanable: !0 }), null, 16))), 128))
|
|
2625
2625
|
]),
|
|
2626
2626
|
_: 1
|
|
2627
2627
|
}, 16, ["schema", "mode"])) : S("", !0),
|
|
@@ -2632,10 +2632,10 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2632
2632
|
}, " Очистити ")) : S("", !0)
|
|
2633
2633
|
]));
|
|
2634
2634
|
}
|
|
2635
|
-
}),
|
|
2635
|
+
}), ja = {
|
|
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
|
+
}, Da = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, Fa = /* @__PURE__ */ Q({
|
|
2639
2639
|
__name: "vertical-filter-layout",
|
|
2640
2640
|
props: {
|
|
2641
2641
|
schema: {},
|
|
@@ -2647,22 +2647,22 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2647
2647
|
},
|
|
2648
2648
|
emits: ["change", "clear", "clearAll"],
|
|
2649
2649
|
setup(i, { expose: r, emit: n }) {
|
|
2650
|
-
const o = i, t = n, c =
|
|
2650
|
+
const o = i, t = n, c = Fe(), {
|
|
2651
2651
|
activeFilter: u,
|
|
2652
2652
|
activeFilterCount: h,
|
|
2653
2653
|
onFilterChange: m,
|
|
2654
2654
|
clearFilter: x,
|
|
2655
2655
|
clearAllFilters: g,
|
|
2656
2656
|
filtersSlot: d
|
|
2657
|
-
} =
|
|
2657
|
+
} = Te({
|
|
2658
2658
|
...o,
|
|
2659
2659
|
slots: c
|
|
2660
2660
|
}, t);
|
|
2661
2661
|
return r({
|
|
2662
2662
|
clearFilter: x,
|
|
2663
2663
|
clearAllFilters: g
|
|
2664
|
-
}), (y, _) => y.view === "vertical" ? (f(), w("div",
|
|
2665
|
-
l("div",
|
|
2664
|
+
}), (y, _) => y.view === "vertical" ? (f(), w("div", ja, [
|
|
2665
|
+
l("div", Da, [
|
|
2666
2666
|
e(h) > 0 ? (f(), w("button", {
|
|
2667
2667
|
key: 0,
|
|
2668
2668
|
onClick: _[0] || (_[0] = (v) => e(g)()),
|
|
@@ -2672,7 +2672,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
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 ? (f(!0), w(
|
|
2675
|
+
y.schema ? (f(!0), w(I, { key: 1 }, ae(Object.entries(y.schema), ([v, p]) => (f(), P(ke, ie({
|
|
2676
2676
|
name: v,
|
|
2677
2677
|
layout: "vertical"
|
|
2678
2678
|
}, { ref_for: !0 }, p, {
|
|
@@ -2684,7 +2684,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2684
2684
|
"onUpdate:modelValue": (a) => e(u)[v] = a,
|
|
2685
2685
|
showClean: !0
|
|
2686
2686
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : S("", !0),
|
|
2687
|
-
(f(!0), w(
|
|
2687
|
+
(f(!0), w(I, null, ae(e(d), (v, p) => (f(), P(ke, ie({
|
|
2688
2688
|
key: "slot-" + p,
|
|
2689
2689
|
layout: "vertical"
|
|
2690
2690
|
}, { ref_for: !0 }, v.props, {
|
|
@@ -2699,7 +2699,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2699
2699
|
])
|
|
2700
2700
|
])) : S("", !0);
|
|
2701
2701
|
}
|
|
2702
|
-
}),
|
|
2702
|
+
}), De = /* @__PURE__ */ Q({
|
|
2703
2703
|
__name: "filter",
|
|
2704
2704
|
props: {
|
|
2705
2705
|
schema: {},
|
|
@@ -2716,7 +2716,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2716
2716
|
if (Array.isArray(p))
|
|
2717
2717
|
return p.map((a) => h(a));
|
|
2718
2718
|
if (p !== null && typeof p == "object") {
|
|
2719
|
-
const a =
|
|
2719
|
+
const a = $e(p), C = {};
|
|
2720
2720
|
for (const b in a)
|
|
2721
2721
|
C[b] = h(a[b]);
|
|
2722
2722
|
return C;
|
|
@@ -2757,16 +2757,16 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2757
2757
|
function y() {
|
|
2758
2758
|
switch (o.view) {
|
|
2759
2759
|
case "inline":
|
|
2760
|
-
return
|
|
2760
|
+
return We;
|
|
2761
2761
|
case "vertical":
|
|
2762
|
-
return
|
|
2762
|
+
return Fa;
|
|
2763
2763
|
case "popover":
|
|
2764
|
-
return
|
|
2764
|
+
return it;
|
|
2765
2765
|
default:
|
|
2766
|
-
return
|
|
2766
|
+
return We;
|
|
2767
2767
|
}
|
|
2768
2768
|
}
|
|
2769
|
-
|
|
2769
|
+
j(
|
|
2770
2770
|
() => o.schema,
|
|
2771
2771
|
(p) => {
|
|
2772
2772
|
if (!p) {
|
|
@@ -2792,7 +2792,7 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2792
2792
|
return r({
|
|
2793
2793
|
clearAllFilters: v,
|
|
2794
2794
|
clearFilter: _
|
|
2795
|
-
}), (p, a) => (f(),
|
|
2795
|
+
}), (p, a) => (f(), P(xe(y()), ie(o, {
|
|
2796
2796
|
schema: d.value,
|
|
2797
2797
|
onChange: a[0] || (a[0] = (C) => m(C.name, C.value)),
|
|
2798
2798
|
onClear: a[1] || (a[1] = (C) => x(C.name)),
|
|
@@ -2801,20 +2801,20 @@ const ya = /* @__PURE__ */ ve(ma, [["render", ga]]), ba = {
|
|
|
2801
2801
|
ref: u
|
|
2802
2802
|
}), {
|
|
2803
2803
|
default: we(() => [
|
|
2804
|
-
|
|
2804
|
+
fe(p.$slots, "default")
|
|
2805
2805
|
]),
|
|
2806
2806
|
_: 3
|
|
2807
2807
|
}, 16, ["schema"]));
|
|
2808
2808
|
}
|
|
2809
2809
|
});
|
|
2810
|
-
|
|
2811
|
-
i.component("Filter",
|
|
2810
|
+
De.install = function(i) {
|
|
2811
|
+
i.component("Filter", De), i.component("FilterField", ke);
|
|
2812
2812
|
};
|
|
2813
|
-
function
|
|
2813
|
+
function La(i) {
|
|
2814
2814
|
const { page: r, id: n, filter: o, filterByView: t } = i, c = new URL(window.location.href), u = new URLSearchParams(window.location.search);
|
|
2815
2815
|
r ? u.set("page", r.toString()) : u.delete("page"), n ? u.set("id", n.toString()) : u.delete("id"), o ? u.set("filter", o) : u.delete("filter"), typeof t == "boolean" ? u.set("bbox", t ? "1" : "0") : u.delete("bbox"), c.search = decodeURI(u.toString()), window.history.pushState({}, "", c);
|
|
2816
2816
|
}
|
|
2817
|
-
const
|
|
2817
|
+
const Pa = { class: "flex items-center justify-between w-full gap-x-1" }, Ka = { class: "flex items-center" }, Ua = ["disabled"], Ia = /* @__PURE__ */ l("svg", {
|
|
2818
2818
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2819
2819
|
viewBox: "0 0 24 24",
|
|
2820
2820
|
fill: "none",
|
|
@@ -2832,16 +2832,16 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2832
2832
|
fill: "none"
|
|
2833
2833
|
}),
|
|
2834
2834
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2835
|
-
], -1),
|
|
2835
|
+
], -1), Oa = /* @__PURE__ */ l("span", {
|
|
2836
2836
|
"aria-hidden": "true",
|
|
2837
2837
|
class: "sr-only"
|
|
2838
|
-
}, "Previous", -1),
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
],
|
|
2838
|
+
}, "Previous", -1), Ta = [
|
|
2839
|
+
Ia,
|
|
2840
|
+
Oa
|
|
2841
|
+
], Ha = { class: "flex items-center gap-x-1" }, Ea = ["onClick"], Na = ["disabled"], Wa = /* @__PURE__ */ l("span", {
|
|
2842
2842
|
"aria-hidden": "true",
|
|
2843
2843
|
class: "sr-only"
|
|
2844
|
-
}, "Next", -1),
|
|
2844
|
+
}, "Next", -1), Za = /* @__PURE__ */ l("svg", {
|
|
2845
2845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2846
2846
|
viewBox: "0 0 24 24",
|
|
2847
2847
|
fill: "none",
|
|
@@ -2859,15 +2859,15 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2859
2859
|
fill: "none"
|
|
2860
2860
|
}),
|
|
2861
2861
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2862
|
-
], -1),
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
],
|
|
2862
|
+
], -1), Ya = [
|
|
2863
|
+
Wa,
|
|
2864
|
+
Za
|
|
2865
|
+
], qa = { class: "flex justify-center items-center gap-x-5 ml-3" }, Qa = { class: "relative" }, Ga = {
|
|
2866
2866
|
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%]",
|
|
2867
2867
|
role: "menu",
|
|
2868
2868
|
"aria-orientation": "vertical",
|
|
2869
2869
|
"aria-labelledby": "dropdown-button"
|
|
2870
|
-
},
|
|
2870
|
+
}, Ja = ["onClick"], Xa = {
|
|
2871
2871
|
key: 0,
|
|
2872
2872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2873
2873
|
viewBox: "0 0 24 24",
|
|
@@ -2879,14 +2879,14 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2879
2879
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check text-blue-600",
|
|
2880
2880
|
width: "14",
|
|
2881
2881
|
height: "14"
|
|
2882
|
-
},
|
|
2882
|
+
}, eo = /* @__PURE__ */ l("path", {
|
|
2883
2883
|
stroke: "none",
|
|
2884
2884
|
d: "M0 0h24v24H0z",
|
|
2885
2885
|
fill: "none"
|
|
2886
|
-
}, null, -1),
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
],
|
|
2886
|
+
}, null, -1), to = /* @__PURE__ */ l("path", { d: "M5 12l5 5l10 -10" }, null, -1), lo = [
|
|
2887
|
+
eo,
|
|
2888
|
+
to
|
|
2889
|
+
], ao = /* @__PURE__ */ l("svg", {
|
|
2890
2890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2891
2891
|
viewBox: "0 0 24 24",
|
|
2892
2892
|
fill: "none",
|
|
@@ -2904,7 +2904,7 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2904
2904
|
fill: "none"
|
|
2905
2905
|
}),
|
|
2906
2906
|
/* @__PURE__ */ l("path", { d: "M6 9l6 6l6 -6" })
|
|
2907
|
-
], -1),
|
|
2907
|
+
], -1), oo = /* @__PURE__ */ Q({
|
|
2908
2908
|
__name: "pagination",
|
|
2909
2909
|
props: {
|
|
2910
2910
|
total: {},
|
|
@@ -2914,10 +2914,10 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2914
2914
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "pageSizeChange"],
|
|
2915
2915
|
setup(i, { emit: r }) {
|
|
2916
2916
|
const n = i, o = r, t = V(n.currentPage), c = V(n.pageSize), u = V(!1);
|
|
2917
|
-
|
|
2917
|
+
j(() => n.pageSize, (_) => {
|
|
2918
2918
|
c.value = _;
|
|
2919
2919
|
});
|
|
2920
|
-
const h =
|
|
2920
|
+
const h = W(() => Math.ceil(n.total / n.pageSize)), m = W(() => {
|
|
2921
2921
|
const v = Math.floor(3.5);
|
|
2922
2922
|
let p = t.value - v, a = t.value + v;
|
|
2923
2923
|
p < 1 && (a += 1 - p, p = 1), a > h.value && (p -= a - h.value, a = h.value), p = Math.max(1, p);
|
|
@@ -2934,24 +2934,24 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2934
2934
|
}, y = (_ = c.value) => {
|
|
2935
2935
|
c.value = _, u.value = !1, o("update:pageSize", c.value), o("update:currentPage", 1), o("pageSizeChange", c.value);
|
|
2936
2936
|
};
|
|
2937
|
-
return
|
|
2937
|
+
return j(() => n.currentPage, (_) => {
|
|
2938
2938
|
t.value = _;
|
|
2939
|
-
}), (_, v) => (f(), w("nav",
|
|
2940
|
-
l("div",
|
|
2939
|
+
}), (_, v) => (f(), w("nav", Pa, [
|
|
2940
|
+
l("div", Ka, [
|
|
2941
2941
|
l("button", {
|
|
2942
2942
|
type: "button",
|
|
2943
2943
|
"aria-label": "Previous",
|
|
2944
2944
|
onClick: x,
|
|
2945
2945
|
disabled: t.value === 1,
|
|
2946
2946
|
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"
|
|
2947
|
-
},
|
|
2948
|
-
l("div",
|
|
2949
|
-
(f(!0), w(
|
|
2947
|
+
}, Ta, 8, Ua),
|
|
2948
|
+
l("div", Ha, [
|
|
2949
|
+
(f(!0), w(I, null, ae(m.value, (p) => (f(), w("button", {
|
|
2950
2950
|
type: "button",
|
|
2951
2951
|
key: p,
|
|
2952
2952
|
onClick: (a) => d(p),
|
|
2953
|
-
class:
|
|
2954
|
-
},
|
|
2953
|
+
class: U(t.value === p ? "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]")
|
|
2954
|
+
}, O(p), 11, Ea))), 128))
|
|
2955
2955
|
]),
|
|
2956
2956
|
l("button", {
|
|
2957
2957
|
type: "button",
|
|
@@ -2959,20 +2959,20 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2959
2959
|
onClick: g,
|
|
2960
2960
|
disabled: t.value === h.value,
|
|
2961
2961
|
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"
|
|
2962
|
-
},
|
|
2962
|
+
}, Ya, 8, Na)
|
|
2963
2963
|
]),
|
|
2964
|
-
l("div",
|
|
2965
|
-
l("div",
|
|
2966
|
-
N(l("div",
|
|
2967
|
-
(f(), w(
|
|
2964
|
+
l("div", qa, [
|
|
2965
|
+
l("div", Qa, [
|
|
2966
|
+
N(l("div", Ga, [
|
|
2967
|
+
(f(), w(I, null, ae([10, 20, 30], (p) => l("button", {
|
|
2968
2968
|
type: "button",
|
|
2969
2969
|
key: p,
|
|
2970
2970
|
onClick: (a) => y(p),
|
|
2971
2971
|
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"
|
|
2972
2972
|
}, [
|
|
2973
|
-
ee(
|
|
2974
|
-
c.value === p ? (f(), w("svg",
|
|
2975
|
-
], 8,
|
|
2973
|
+
ee(O(p) + " ", 1),
|
|
2974
|
+
c.value === p ? (f(), w("svg", Xa, lo)) : S("", !0)
|
|
2975
|
+
], 8, Ja)), 64))
|
|
2976
2976
|
], 512), [
|
|
2977
2977
|
[ce, u.value]
|
|
2978
2978
|
]),
|
|
@@ -2984,32 +2984,32 @@ const Ua = { class: "flex items-center justify-between w-full gap-x-1" }, Ia = {
|
|
|
2984
2984
|
"aria-label": "Dropdown",
|
|
2985
2985
|
onClick: v[0] || (v[0] = (p) => u.value = !u.value)
|
|
2986
2986
|
}, [
|
|
2987
|
-
ee(
|
|
2988
|
-
|
|
2987
|
+
ee(O(c.value) + " ", 1),
|
|
2988
|
+
ao
|
|
2989
2989
|
])
|
|
2990
2990
|
])
|
|
2991
2991
|
])
|
|
2992
2992
|
]));
|
|
2993
2993
|
}
|
|
2994
|
-
}),
|
|
2994
|
+
}), Be = (i, r) => {
|
|
2995
2995
|
const n = i.__vccOpts || i;
|
|
2996
2996
|
for (const [o, t] of r)
|
|
2997
2997
|
n[o] = t;
|
|
2998
2998
|
return n;
|
|
2999
|
-
},
|
|
2999
|
+
}, ro = {}, no = {
|
|
3000
3000
|
class: "w-48 mx-auto mb-4",
|
|
3001
3001
|
width: "178",
|
|
3002
3002
|
height: "90",
|
|
3003
3003
|
viewBox: "0 0 178 90",
|
|
3004
3004
|
fill: "none",
|
|
3005
3005
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3006
|
-
},
|
|
3007
|
-
|
|
3006
|
+
}, io = /* @__PURE__ */ Je('<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), so = [
|
|
3007
|
+
io
|
|
3008
3008
|
];
|
|
3009
|
-
function
|
|
3010
|
-
return f(), w("svg",
|
|
3009
|
+
function uo(i, r) {
|
|
3010
|
+
return f(), w("svg", no, so);
|
|
3011
3011
|
}
|
|
3012
|
-
const
|
|
3012
|
+
const co = /* @__PURE__ */ Be(ro, [["render", uo]]), po = {}, fo = {
|
|
3013
3013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3014
3014
|
width: "21",
|
|
3015
3015
|
height: "20",
|
|
@@ -3020,20 +3020,20 @@ const fo = /* @__PURE__ */ Ae(io, [["render", po]]), vo = {}, mo = {
|
|
|
3020
3020
|
"stroke-linecap": "round",
|
|
3021
3021
|
"stroke-linejoin": "round",
|
|
3022
3022
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"
|
|
3023
|
-
},
|
|
3023
|
+
}, vo = /* @__PURE__ */ l("path", {
|
|
3024
3024
|
stroke: "none",
|
|
3025
3025
|
d: "M0 0h24v24H0z",
|
|
3026
3026
|
fill: "none"
|
|
3027
|
-
}, null, -1),
|
|
3027
|
+
}, null, -1), mo = /* @__PURE__ */ l("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), ho = /* @__PURE__ */ l("path", { d: "M15 4v16" }, null, -1), go = /* @__PURE__ */ l("path", { d: "M9 10l2 2l-2 2" }, null, -1), yo = [
|
|
3028
|
+
vo,
|
|
3029
|
+
mo,
|
|
3028
3030
|
ho,
|
|
3029
|
-
go
|
|
3030
|
-
yo,
|
|
3031
|
-
bo
|
|
3031
|
+
go
|
|
3032
3032
|
];
|
|
3033
|
-
function
|
|
3034
|
-
return f(), w("svg",
|
|
3033
|
+
function bo(i, r) {
|
|
3034
|
+
return f(), w("svg", fo, yo);
|
|
3035
3035
|
}
|
|
3036
|
-
const
|
|
3036
|
+
const xo = /* @__PURE__ */ Be(po, [["render", bo]]), wo = {}, ko = {
|
|
3037
3037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3038
3038
|
width: "21",
|
|
3039
3039
|
height: "20",
|
|
@@ -3044,20 +3044,20 @@ const ko = /* @__PURE__ */ Ae(vo, [["render", wo]]), _o = {}, Co = {
|
|
|
3044
3044
|
"stroke-linecap": "round",
|
|
3045
3045
|
"stroke-linejoin": "round",
|
|
3046
3046
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"
|
|
3047
|
-
},
|
|
3047
|
+
}, _o = /* @__PURE__ */ l("path", {
|
|
3048
3048
|
stroke: "none",
|
|
3049
3049
|
d: "M0 0h24v24H0z",
|
|
3050
3050
|
fill: "none"
|
|
3051
|
-
}, null, -1),
|
|
3051
|
+
}, null, -1), Co = /* @__PURE__ */ l("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), Vo = /* @__PURE__ */ l("path", { d: "M15 4v16" }, null, -1), So = /* @__PURE__ */ l("path", { d: "M10 10l-2 2l2 2" }, null, -1), $o = [
|
|
3052
|
+
_o,
|
|
3053
|
+
Co,
|
|
3052
3054
|
Vo,
|
|
3053
|
-
So
|
|
3054
|
-
$o,
|
|
3055
|
-
Mo
|
|
3055
|
+
So
|
|
3056
3056
|
];
|
|
3057
|
-
function
|
|
3058
|
-
return f(), w("svg",
|
|
3057
|
+
function Mo(i, r) {
|
|
3058
|
+
return f(), w("svg", ko, $o);
|
|
3059
3059
|
}
|
|
3060
|
-
const
|
|
3060
|
+
const Bo = /* @__PURE__ */ Be(wo, [["render", Mo]]), zo = {}, Ao = {
|
|
3061
3061
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3062
3062
|
width: "24",
|
|
3063
3063
|
height: "24",
|
|
@@ -3068,20 +3068,20 @@ const Ao = /* @__PURE__ */ Ae(_o, [["render", zo]]), jo = {}, Ro = {
|
|
|
3068
3068
|
"stroke-linecap": "round",
|
|
3069
3069
|
"stroke-linejoin": "round",
|
|
3070
3070
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map"
|
|
3071
|
-
},
|
|
3071
|
+
}, Ro = /* @__PURE__ */ l("path", {
|
|
3072
3072
|
stroke: "none",
|
|
3073
3073
|
d: "M0 0h24v24H0z",
|
|
3074
3074
|
fill: "none"
|
|
3075
|
-
}, null, -1),
|
|
3075
|
+
}, null, -1), jo = /* @__PURE__ */ l("path", { d: "M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" }, null, -1), Do = /* @__PURE__ */ l("path", { d: "M9 4v13" }, null, -1), Fo = /* @__PURE__ */ l("path", { d: "M15 7v13" }, null, -1), Lo = [
|
|
3076
|
+
Ro,
|
|
3077
|
+
jo,
|
|
3076
3078
|
Do,
|
|
3077
|
-
Fo
|
|
3078
|
-
Lo,
|
|
3079
|
-
Po
|
|
3079
|
+
Fo
|
|
3080
3080
|
];
|
|
3081
|
-
function
|
|
3082
|
-
return f(), w("svg",
|
|
3081
|
+
function Po(i, r) {
|
|
3082
|
+
return f(), w("svg", Ao, Lo);
|
|
3083
3083
|
}
|
|
3084
|
-
const
|
|
3084
|
+
const Ko = /* @__PURE__ */ Be(zo, [["render", Po]]), Uo = {}, Io = {
|
|
3085
3085
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3086
3086
|
width: "24",
|
|
3087
3087
|
height: "24",
|
|
@@ -3092,33 +3092,33 @@ const Io = /* @__PURE__ */ Ae(jo, [["render", Uo]]), Oo = {}, To = {
|
|
|
3092
3092
|
"stroke-linecap": "round",
|
|
3093
3093
|
"stroke-linejoin": "round",
|
|
3094
3094
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-table"
|
|
3095
|
-
},
|
|
3095
|
+
}, Oo = /* @__PURE__ */ l("path", {
|
|
3096
3096
|
stroke: "none",
|
|
3097
3097
|
d: "M0 0h24v24H0z",
|
|
3098
3098
|
fill: "none"
|
|
3099
|
-
}, null, -1),
|
|
3099
|
+
}, null, -1), To = /* @__PURE__ */ l("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), Ho = /* @__PURE__ */ l("path", { d: "M3 10h18" }, null, -1), Eo = /* @__PURE__ */ l("path", { d: "M10 3v18" }, null, -1), No = [
|
|
3100
|
+
Oo,
|
|
3101
|
+
To,
|
|
3100
3102
|
Ho,
|
|
3101
|
-
Eo
|
|
3102
|
-
No,
|
|
3103
|
-
Wo
|
|
3103
|
+
Eo
|
|
3104
3104
|
];
|
|
3105
|
-
function
|
|
3106
|
-
return f(), w("svg",
|
|
3105
|
+
function Wo(i, r) {
|
|
3106
|
+
return f(), w("svg", Io, No);
|
|
3107
3107
|
}
|
|
3108
|
-
const
|
|
3109
|
-
function
|
|
3108
|
+
const Zo = /* @__PURE__ */ Be(Uo, [["render", Wo]]);
|
|
3109
|
+
function Ze(i, r) {
|
|
3110
3110
|
let n;
|
|
3111
3111
|
return function(...o) {
|
|
3112
3112
|
clearTimeout(n), n = setTimeout(() => i(...o), r);
|
|
3113
3113
|
};
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3115
|
+
function st(i, r, n = 12) {
|
|
3116
3116
|
const o = r ?? "";
|
|
3117
3117
|
return `${window.location.origin}/api/vtile/${i}/ua/{z}/{x}/{y}.vmt?pointZoom=12&clusterZoom=${n}&filter=${o}`;
|
|
3118
3118
|
}
|
|
3119
|
-
function
|
|
3119
|
+
function Yo(i, r, n, o, t = 12) {
|
|
3120
3120
|
if (!r) return;
|
|
3121
|
-
const c =
|
|
3121
|
+
const c = st(i, o, t);
|
|
3122
3122
|
r.addSource("vector", {
|
|
3123
3123
|
type: "vector",
|
|
3124
3124
|
tiles: [c],
|
|
@@ -3207,7 +3207,7 @@ function Qo(i, r, n, o, t = 12) {
|
|
|
3207
3207
|
}
|
|
3208
3208
|
});
|
|
3209
3209
|
}
|
|
3210
|
-
const
|
|
3210
|
+
const qo = [
|
|
3211
3211
|
{
|
|
3212
3212
|
id: "voyager",
|
|
3213
3213
|
name: "Базова карта (voyager)",
|
|
@@ -3232,7 +3232,7 @@ const Go = [
|
|
|
3232
3232
|
url: "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
|
|
3233
3233
|
preview: "https://mt1.google.com/vt/lyrs=s&x=2422&y=1400&z=12"
|
|
3234
3234
|
}
|
|
3235
|
-
],
|
|
3235
|
+
], Qo = { class: "relative w-auto h-full" }, Go = /* @__PURE__ */ l("svg", {
|
|
3236
3236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3237
3237
|
class: "w-4 h-4",
|
|
3238
3238
|
viewBox: "0 0 24 24",
|
|
@@ -3244,12 +3244,12 @@ const Go = [
|
|
|
3244
3244
|
}, [
|
|
3245
3245
|
/* @__PURE__ */ l("path", { d: "M3 11L12 3l9 8" }),
|
|
3246
3246
|
/* @__PURE__ */ l("path", { d: "M5 9v10h4v-6h6v6h4V9" })
|
|
3247
|
-
], -1),
|
|
3248
|
-
|
|
3249
|
-
],
|
|
3247
|
+
], -1), Jo = [
|
|
3248
|
+
Go
|
|
3249
|
+
], Xo = { class: "absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg z-10 border" }, er = { class: "flex justify-start items-center gap-2" }, tr = { class: "ml-1 text-[0.875rem]" }, lr = {
|
|
3250
3250
|
class: "vs-map-slot-layers z-10 select-none",
|
|
3251
3251
|
style: { display: "flex" }
|
|
3252
|
-
},
|
|
3252
|
+
}, ar = ["title", "onClick"], or = ["src"], rr = { 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" }, Ye = "vector-clusters", nr = /* @__PURE__ */ Q({
|
|
3253
3253
|
__name: "map",
|
|
3254
3254
|
props: {
|
|
3255
3255
|
table: {},
|
|
@@ -3266,19 +3266,19 @@ const Go = [
|
|
|
3266
3266
|
setup(i, { emit: r }) {
|
|
3267
3267
|
const n = i, o = r;
|
|
3268
3268
|
let t, c;
|
|
3269
|
-
const u =
|
|
3269
|
+
const u = Xe(), h = V(null), m = V(!1), x = ["vector-circle", "vector-fill"], g = W(() => {
|
|
3270
3270
|
var $, D;
|
|
3271
3271
|
return ((D = ($ = u == null ? void 0 : u.appContext.config.globalProperties) == null ? void 0 : $.$settings) == null ? void 0 : D.basemaps) || [];
|
|
3272
|
-
}), d =
|
|
3273
|
-
var
|
|
3274
|
-
const
|
|
3272
|
+
}), d = W(() => (n.layers && n.layers.length ? n.layers : g.value.length ? g.value : qo).map((D, E) => {
|
|
3273
|
+
var ye;
|
|
3274
|
+
const q = D.id || ((ye = D.name) == null ? void 0 : ye.toString().toLowerCase().replace(/\s+/g, "-")) || `layer-${E}`, ge = D.name || D.id || `layer-${E}`;
|
|
3275
3275
|
return {
|
|
3276
3276
|
...D,
|
|
3277
|
-
id:
|
|
3278
|
-
name:
|
|
3277
|
+
id: q,
|
|
3278
|
+
name: ge
|
|
3279
3279
|
};
|
|
3280
|
-
})), y = V(""), _ =
|
|
3281
|
-
|
|
3280
|
+
})), y = V(""), _ = W(() => d.value.find(($) => $.id === y.value) || d.value[0]);
|
|
3281
|
+
j(d, ($) => {
|
|
3282
3282
|
var D;
|
|
3283
3283
|
$.length && (!y.value || !$.some((E) => E.id === y.value)) && (y.value = ((D = $[0]) == null ? void 0 : D.id) || "");
|
|
3284
3284
|
}, { immediate: !0 });
|
|
@@ -3309,35 +3309,35 @@ const Go = [
|
|
|
3309
3309
|
];
|
|
3310
3310
|
let b;
|
|
3311
3311
|
const s = [30, 48];
|
|
3312
|
-
let k = null,
|
|
3312
|
+
let k = null, B = [];
|
|
3313
3313
|
function A() {
|
|
3314
3314
|
if (typeof window > "u")
|
|
3315
3315
|
return { zoom: null, center: null, hasQuery: !1 };
|
|
3316
|
-
const $ = new URLSearchParams(window.location.search), D = Number($.get("z")), E = Number($.get("y")),
|
|
3316
|
+
const $ = new URLSearchParams(window.location.search), D = Number($.get("z")), E = Number($.get("y")), q = Number($.get("x")), ge = $.has("x") && $.has("y"), ye = $.has("z");
|
|
3317
3317
|
return {
|
|
3318
|
-
zoom:
|
|
3319
|
-
center:
|
|
3320
|
-
hasQuery:
|
|
3318
|
+
zoom: ye ? D : null,
|
|
3319
|
+
center: ge ? [q, E] : null,
|
|
3320
|
+
hasQuery: ge || ye
|
|
3321
3321
|
};
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3323
|
+
function R($, D) {
|
|
3324
3324
|
if (!$ || typeof window > "u") return;
|
|
3325
3325
|
const E = new URL(window.location.href);
|
|
3326
3326
|
E.searchParams.set("z", D.toFixed(2)), E.searchParams.set("x", $[0].toFixed(6)), E.searchParams.set("y", $[1].toFixed(6)), window.history.replaceState({}, "", E);
|
|
3327
3327
|
}
|
|
3328
|
-
let
|
|
3329
|
-
function
|
|
3330
|
-
if (!t || !
|
|
3328
|
+
let T = !1;
|
|
3329
|
+
function K() {
|
|
3330
|
+
if (!t || !T) return;
|
|
3331
3331
|
const $ = t.getCenter();
|
|
3332
|
-
|
|
3332
|
+
R([$.lng, $.lat], t.getZoom());
|
|
3333
3333
|
}
|
|
3334
|
-
const
|
|
3335
|
-
|
|
3334
|
+
const pe = () => {
|
|
3335
|
+
T || (T = !0), K();
|
|
3336
3336
|
};
|
|
3337
3337
|
function oe($) {
|
|
3338
3338
|
return $ ? ["==", ["to-string", ["get", "id"]], $] : ["==", ["literal", 1], 0];
|
|
3339
3339
|
}
|
|
3340
|
-
function
|
|
3340
|
+
function L() {
|
|
3341
3341
|
const $ = oe(n.modelValue);
|
|
3342
3342
|
t.getLayer("vector-highlight-circle") || t.addLayer({
|
|
3343
3343
|
id: "vector-highlight-circle",
|
|
@@ -3367,18 +3367,18 @@ const Go = [
|
|
|
3367
3367
|
const D = n.modelValue ? "visible" : "none";
|
|
3368
3368
|
t.setLayoutProperty("vector-highlight-circle", "visibility", D), t.setLayoutProperty("vector-highlight-fill", "visibility", D), H();
|
|
3369
3369
|
}
|
|
3370
|
-
function
|
|
3371
|
-
if (!t || !
|
|
3370
|
+
function z($) {
|
|
3371
|
+
if (!t || !B.length) return;
|
|
3372
3372
|
const E = [
|
|
3373
3373
|
"case",
|
|
3374
3374
|
["all", ["has", "id"], ["==", ["to-string", ["get", "id"]], $]],
|
|
3375
3375
|
"#ef4444",
|
|
3376
|
-
|
|
3376
|
+
B
|
|
3377
3377
|
];
|
|
3378
3378
|
t.getLayer("vector-circle") && t.setPaintProperty("vector-circle", "circle-color", E), t.getLayer("vector-fill") && t.setPaintProperty("vector-fill", "fill-color", E);
|
|
3379
3379
|
}
|
|
3380
3380
|
function H() {
|
|
3381
|
-
if (
|
|
3381
|
+
if (J(), !n.modelValue) return;
|
|
3382
3382
|
let $ = !0;
|
|
3383
3383
|
k = window.setInterval(() => {
|
|
3384
3384
|
$ = !$;
|
|
@@ -3386,14 +3386,14 @@ const Go = [
|
|
|
3386
3386
|
t != null && t.getLayer("vector-highlight-circle") && t.setPaintProperty("vector-highlight-circle", "circle-opacity", D), t != null && t.getLayer("vector-highlight-fill") && t.setPaintProperty("vector-highlight-fill", "line-opacity", D);
|
|
3387
3387
|
}, 600);
|
|
3388
3388
|
}
|
|
3389
|
-
function
|
|
3389
|
+
function J() {
|
|
3390
3390
|
k && (clearInterval(k), k = null);
|
|
3391
3391
|
}
|
|
3392
|
-
function
|
|
3392
|
+
function he() {
|
|
3393
3393
|
t && (t.setCenter(n.center || s), t.setZoom(n.zoom || 5));
|
|
3394
3394
|
}
|
|
3395
|
-
const
|
|
3396
|
-
|
|
3395
|
+
const de = A();
|
|
3396
|
+
T = de.hasQuery, Ce(async () => {
|
|
3397
3397
|
b = (await fetch(`/api/data/${n.table}/${n.colorAttr}`).then((X) => X.json())).rows, b.forEach((X, te) => {
|
|
3398
3398
|
X.color || Object.assign(X, { color: C[te % 10] });
|
|
3399
3399
|
}), c = new maplibregl.Popup({
|
|
@@ -3402,7 +3402,7 @@ const Go = [
|
|
|
3402
3402
|
});
|
|
3403
3403
|
const D = _.value;
|
|
3404
3404
|
if (!D) return;
|
|
3405
|
-
const E =
|
|
3405
|
+
const E = de.center || n.center || s, q = de.zoom || n.zoom || 5;
|
|
3406
3406
|
t = new maplibregl.Map({
|
|
3407
3407
|
container: h.value,
|
|
3408
3408
|
style: {
|
|
@@ -3420,72 +3420,72 @@ const Go = [
|
|
|
3420
3420
|
},
|
|
3421
3421
|
center: E,
|
|
3422
3422
|
// [lng, lat]
|
|
3423
|
-
zoom:
|
|
3423
|
+
zoom: q,
|
|
3424
3424
|
minZoom: 3,
|
|
3425
3425
|
maxZoom: 18,
|
|
3426
3426
|
attributionControl: !1
|
|
3427
3427
|
}), o("update:map", t), t.addControl(new maplibregl.NavigationControl(), "top-right"), t.on("zoom", () => {
|
|
3428
|
-
}), t.on("moveend",
|
|
3428
|
+
}), t.on("moveend", pe), t.on("zoomend", pe), T && K(), t.on("load", () => {
|
|
3429
3429
|
t == null || t.resize(), m.value = !0;
|
|
3430
|
-
const X = b.filter((
|
|
3431
|
-
|
|
3430
|
+
const X = b.filter((G) => G.id).reduce((G, se) => [se.id, se.color].concat(G), []), te = ["match", ["get", n.colorAttr], ...X, "#808080"];
|
|
3431
|
+
B = te, Yo(n.table, t, te, n.filter, n.clusterZoom), L(), z(n.modelValue);
|
|
3432
3432
|
});
|
|
3433
|
-
const
|
|
3434
|
-
var
|
|
3435
|
-
const te = (
|
|
3433
|
+
const ge = (X) => {
|
|
3434
|
+
var G, se;
|
|
3435
|
+
const te = (G = X.features) == null ? void 0 : G[0];
|
|
3436
3436
|
(se = te == null ? void 0 : te.properties) != null && se.id && o("update:modelValue", te.properties.id);
|
|
3437
3437
|
};
|
|
3438
3438
|
x.forEach((X) => {
|
|
3439
|
-
t.on("click", X,
|
|
3440
|
-
}), t.on("click",
|
|
3441
|
-
var
|
|
3442
|
-
const te = (
|
|
3439
|
+
t.on("click", X, ge);
|
|
3440
|
+
}), t.on("click", Ye, (X) => {
|
|
3441
|
+
var be, M, F;
|
|
3442
|
+
const te = (be = X.features) == null ? void 0 : be[0];
|
|
3443
3443
|
if (!te) return;
|
|
3444
|
-
const
|
|
3444
|
+
const G = te.geometry, se = (G == null ? void 0 : G.type) === "Point" ? G.coordinates : (F = (M = G == null ? void 0 : G.coordinates) == null ? void 0 : M[0]) == null ? void 0 : F[0];
|
|
3445
3445
|
if (!se) return;
|
|
3446
|
-
const
|
|
3447
|
-
t.easeTo({ center: se, zoom:
|
|
3448
|
-
}), [...x,
|
|
3446
|
+
const Ve = Math.min(t.getZoom() + 2, t.getMaxZoom());
|
|
3447
|
+
t.easeTo({ center: se, zoom: Ve });
|
|
3448
|
+
}), [...x, Ye].forEach((X) => {
|
|
3449
3449
|
t.on("mouseenter", X, () => {
|
|
3450
3450
|
t.getCanvas().style.cursor = "pointer";
|
|
3451
3451
|
}), t.on("mouseleave", X, () => {
|
|
3452
3452
|
t.getCanvas().style.cursor = "";
|
|
3453
3453
|
});
|
|
3454
3454
|
}), t.on("mousemove", (X) => {
|
|
3455
|
-
var
|
|
3455
|
+
var be;
|
|
3456
3456
|
const te = t.queryRenderedFeatures(X.point, { layers: x });
|
|
3457
3457
|
if (!te || !te.length) {
|
|
3458
3458
|
c.remove();
|
|
3459
3459
|
return;
|
|
3460
3460
|
}
|
|
3461
|
-
const
|
|
3462
|
-
a.value =
|
|
3461
|
+
const G = te[0], { coordinates: se } = G.geometry, Ve = G.geometry.type === "Point" ? se : se[0][0];
|
|
3462
|
+
a.value = G.properties, c.setLngLat(Ve).setHTML((be = p.value) == null ? void 0 : be.innerHTML).addTo(t);
|
|
3463
3463
|
});
|
|
3464
|
-
}),
|
|
3464
|
+
}), j(() => n.center, ($) => {
|
|
3465
3465
|
t && t.setCenter($ || s);
|
|
3466
|
-
}),
|
|
3466
|
+
}), j(() => n.zoom, ($) => {
|
|
3467
3467
|
t && t.setZoom($);
|
|
3468
3468
|
});
|
|
3469
|
-
function
|
|
3469
|
+
function ze($, D) {
|
|
3470
3470
|
if (!(t != null && t.getSource("vector"))) return;
|
|
3471
|
-
const E =
|
|
3471
|
+
const E = st(
|
|
3472
3472
|
n.table,
|
|
3473
3473
|
$ ?? n.filter,
|
|
3474
3474
|
D ?? n.clusterZoom ?? 12
|
|
3475
3475
|
);
|
|
3476
3476
|
t.getSource("vector").setTiles([E]);
|
|
3477
3477
|
}
|
|
3478
|
-
return
|
|
3479
|
-
|
|
3480
|
-
}),
|
|
3481
|
-
|
|
3482
|
-
}),
|
|
3478
|
+
return j(() => n.filter, ($) => {
|
|
3479
|
+
ze($);
|
|
3480
|
+
}), j(() => n.clusterZoom, ($) => {
|
|
3481
|
+
ze(void 0, $);
|
|
3482
|
+
}), j(() => n.modelValue, ($) => {
|
|
3483
3483
|
if (!t) return;
|
|
3484
3484
|
const D = oe($);
|
|
3485
|
-
t.getLayer("vector-highlight-circle") && (t.setFilter("vector-highlight-circle", D), t.setLayoutProperty("vector-highlight-circle", "visibility", $ ? "visible" : "none")), t.getLayer("vector-highlight-fill") && (t.setFilter("vector-highlight-fill", D), t.setLayoutProperty("vector-highlight-fill", "visibility", $ ? "visible" : "none")),
|
|
3486
|
-
}),
|
|
3485
|
+
t.getLayer("vector-highlight-circle") && (t.setFilter("vector-highlight-circle", D), t.setLayoutProperty("vector-highlight-circle", "visibility", $ ? "visible" : "none")), t.getLayer("vector-highlight-fill") && (t.setFilter("vector-highlight-fill", D), t.setLayoutProperty("vector-highlight-fill", "visibility", $ ? "visible" : "none")), z($), $ ? H() : J();
|
|
3486
|
+
}), j(y, ($, D) => {
|
|
3487
3487
|
if (!t || !$) return;
|
|
3488
|
-
const E = d.value.find((
|
|
3488
|
+
const E = d.value.find((q) => q.id === $);
|
|
3489
3489
|
E && (t.getLayer(D) && t.removeLayer(D), t.getSource(D) && t.removeSource(D), t.addSource($, { type: "raster", tiles: [E.url], tileSize: 256 }), t.addLayer({
|
|
3490
3490
|
id: E.id,
|
|
3491
3491
|
type: "raster",
|
|
@@ -3493,11 +3493,11 @@ const Go = [
|
|
|
3493
3493
|
minzoom: 0,
|
|
3494
3494
|
maxzoom: 19
|
|
3495
3495
|
}, "vector-circle"));
|
|
3496
|
-
}),
|
|
3497
|
-
|
|
3496
|
+
}), Me(() => {
|
|
3497
|
+
J(), t && (t.off("moveend", pe), t.off("zoomend", pe), t.remove());
|
|
3498
3498
|
}), ($, D) => {
|
|
3499
|
-
const E =
|
|
3500
|
-
return N((f(), w("div",
|
|
3499
|
+
const E = ft("tooltip");
|
|
3500
|
+
return N((f(), w("div", Qo, [
|
|
3501
3501
|
l("div", {
|
|
3502
3502
|
ref_key: "mapContainer",
|
|
3503
3503
|
ref: h,
|
|
@@ -3507,21 +3507,21 @@ const Go = [
|
|
|
3507
3507
|
type: "button",
|
|
3508
3508
|
class: "absolute top-25 right-2 z-20 h-8 w-8 flex items-center justify-center rounded-lg bg-white border border-gray-200 shadow-[0_8px_20px_rgba(0,0,0,0.08)] text-[18px] leading-none text-gray-700 hover:bg-gray-50",
|
|
3509
3509
|
title: "Повернутися до базового вигляду",
|
|
3510
|
-
onClick:
|
|
3511
|
-
},
|
|
3510
|
+
onClick: he
|
|
3511
|
+
}, Jo)), [
|
|
3512
3512
|
[E, "Повернутися до базового вигляду"]
|
|
3513
3513
|
]),
|
|
3514
|
-
l("div",
|
|
3515
|
-
(f(!0), w(
|
|
3514
|
+
l("div", Xo, [
|
|
3515
|
+
(f(!0), w(I, null, ae(e(b), (q) => (f(), w("div", {
|
|
3516
3516
|
class: "legend-item",
|
|
3517
|
-
key:
|
|
3517
|
+
key: q.id
|
|
3518
3518
|
}, [
|
|
3519
|
-
l("div",
|
|
3519
|
+
l("div", er, [
|
|
3520
3520
|
l("div", {
|
|
3521
3521
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
|
3522
|
-
style:
|
|
3522
|
+
style: Le("background-color:" + q.color)
|
|
3523
3523
|
}, null, 4),
|
|
3524
|
-
l("div",
|
|
3524
|
+
l("div", tr, O(q.text), 1)
|
|
3525
3525
|
])
|
|
3526
3526
|
]))), 128))
|
|
3527
3527
|
]),
|
|
@@ -3530,22 +3530,22 @@ const Go = [
|
|
|
3530
3530
|
ref: p,
|
|
3531
3531
|
style: { display: "none" }
|
|
3532
3532
|
}, [
|
|
3533
|
-
|
|
3533
|
+
fe($.$slots, "default", { hoverData: a.value })
|
|
3534
3534
|
], 512),
|
|
3535
|
-
l("div",
|
|
3536
|
-
(f(!0), w(
|
|
3537
|
-
key:
|
|
3538
|
-
title:
|
|
3539
|
-
class:
|
|
3540
|
-
onClick: (
|
|
3535
|
+
l("div", lr, [
|
|
3536
|
+
(f(!0), w(I, null, ae(d.value, (q) => N((f(), w("div", {
|
|
3537
|
+
key: q.id,
|
|
3538
|
+
title: q.name,
|
|
3539
|
+
class: U(["vs-map-slot-layers__layer relative", { focused: y.value === q.id }]),
|
|
3540
|
+
onClick: (ge) => y.value = q.id
|
|
3541
3541
|
}, [
|
|
3542
3542
|
l("img", {
|
|
3543
|
-
src:
|
|
3543
|
+
src: q.preview || v(q.url),
|
|
3544
3544
|
class: "vs-map-slot-layers__image"
|
|
3545
|
-
}, null, 8,
|
|
3546
|
-
l("div",
|
|
3547
|
-
], 10,
|
|
3548
|
-
[E,
|
|
3545
|
+
}, null, 8, or),
|
|
3546
|
+
l("div", rr, O(q.name), 1)
|
|
3547
|
+
], 10, ar)), [
|
|
3548
|
+
[E, q.name]
|
|
3549
3549
|
])), 128))
|
|
3550
3550
|
])
|
|
3551
3551
|
], 512)), [
|
|
@@ -3553,7 +3553,7 @@ const Go = [
|
|
|
3553
3553
|
]);
|
|
3554
3554
|
};
|
|
3555
3555
|
}
|
|
3556
|
-
}),
|
|
3556
|
+
}), ut = {
|
|
3557
3557
|
mounted(i, r) {
|
|
3558
3558
|
if (typeof document > "u") return;
|
|
3559
3559
|
let n = null;
|
|
@@ -3581,22 +3581,22 @@ const Go = [
|
|
|
3581
3581
|
const r = i.tooltipHandlers;
|
|
3582
3582
|
r && (i.removeEventListener("mouseenter", r.showTooltip), i.removeEventListener("mouseleave", r.hideTooltip));
|
|
3583
3583
|
}
|
|
3584
|
-
},
|
|
3584
|
+
}, ir = { class: "pt-[20px]" }, sr = { class: "w-full gap-5 inline-flex mb-[6px] pr-3" }, ur = { class: "flex items-center" }, cr = ["title"], dr = /* @__PURE__ */ l("span", { class: "sr-only" }, "Відкрити мапу", -1), pr = { class: "max-[1000px]:flex gap-2 min-[1001px]:hidden" }, fr = { class: "flex" }, vr = {
|
|
3585
3585
|
key: 0,
|
|
3586
3586
|
class: "flex items-center py-[15px] pb-[24px] pl-2 pr-6 gap-4"
|
|
3587
|
-
},
|
|
3587
|
+
}, mr = { class: "font-bold text-2xl mr-[10px]" }, hr = { class: "text-sm text-stone-500 font-medium" }, gr = /* @__PURE__ */ l("span", { class: "text-sm text-stone-500 font-medium" }, " об'єктів", -1), yr = {
|
|
3588
3588
|
key: 0,
|
|
3589
3589
|
class: "inline-flex items-center gap-2 text-sm text-stone-700 select-none ml-auto mt-auto"
|
|
3590
|
-
},
|
|
3590
|
+
}, br = /* @__PURE__ */ l("span", null, "В межах видимої області", -1), xr = {
|
|
3591
3591
|
class: "wrapperTable flex flex-col",
|
|
3592
3592
|
style: { height: "calc(100vh - 302px)" }
|
|
3593
|
-
},
|
|
3593
|
+
}, wr = {
|
|
3594
3594
|
key: 1,
|
|
3595
3595
|
class: "text-center py-28"
|
|
3596
|
-
},
|
|
3596
|
+
}, kr = /* @__PURE__ */ l("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1), _r = /* @__PURE__ */ l("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1), Cr = { key: 1 }, Vr = {
|
|
3597
3597
|
key: 2,
|
|
3598
3598
|
class: "my-5 pr-2"
|
|
3599
|
-
},
|
|
3599
|
+
}, Sr = { class: "flex justify-between" }, $r = { class: "w-full lg:w-1/2 relative" }, qe = /* @__PURE__ */ Q({
|
|
3600
3600
|
__name: "vs-parts-map",
|
|
3601
3601
|
props: {
|
|
3602
3602
|
title: {},
|
|
@@ -3616,247 +3616,238 @@ const Go = [
|
|
|
3616
3616
|
},
|
|
3617
3617
|
emits: ["change:filter", "update:map"],
|
|
3618
3618
|
setup(i, { emit: r }) {
|
|
3619
|
-
var X, te,
|
|
3620
|
-
const n =
|
|
3621
|
-
n && !(n != null && n.appContext.directives.tooltip) && (n.appContext.directives.tooltip =
|
|
3622
|
-
function o(
|
|
3623
|
-
return
|
|
3619
|
+
var ye, X, te, G, se, Ve, be;
|
|
3620
|
+
const n = Xe();
|
|
3621
|
+
n && !(n != null && n.appContext.directives.tooltip) && (n.appContext.directives.tooltip = ut);
|
|
3622
|
+
function o(M) {
|
|
3623
|
+
return M ? (M.type === "Point" ? M.coordinates : null) || (M.type.includes("Multi") ? M.coordinates[0][0][0] : M.coordinates[0][0]) : null;
|
|
3624
3624
|
}
|
|
3625
3625
|
const t = i, c = r, u = V(0);
|
|
3626
|
-
u.value = t.initTotal ?? ((
|
|
3627
|
-
const h = V(""), m = V(null), x = V(!0), g = V(((
|
|
3628
|
-
let
|
|
3629
|
-
function
|
|
3630
|
-
return Object.entries(
|
|
3631
|
-
}
|
|
3632
|
-
function oe(
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
const B = ($e = (T = m.value).getBounds) == null ? void 0 : $e.call(T);
|
|
3645
|
-
if (!B) return;
|
|
3646
|
-
const F = (_e = B.getSouthWest) == null ? void 0 : _e.call(B), le = (ne = B.getNorthEast) == null ? void 0 : ne.call(B);
|
|
3647
|
-
!F || !le || (O.value = `${F.lng} ${F.lat},${le.lng} ${le.lat}`);
|
|
3648
|
-
}
|
|
3649
|
-
async function M(B = !1) {
|
|
3650
|
-
await Re();
|
|
3651
|
-
const F = de(C.value), le = oe(C.value);
|
|
3652
|
-
a.value = le, j.value ? W() : O.value = "";
|
|
3626
|
+
u.value = t.initTotal ?? ((ye = t.rows) == null ? void 0 : ye.length) ?? 0;
|
|
3627
|
+
const h = V(""), m = V(null), x = V(!0), g = V(((X = t.rows) == null ? void 0 : X.length) === 1), d = V(0), y = V(t.rows), _ = V(1), v = V(20), p = V(t.filters || []), a = V(""), C = V({}), b = V(((te = t.rows) == null ? void 0 : te.length) === 1 ? t.rows[0] : {}), s = V(((G = t.rows) == null ? void 0 : G.length) === 1 ? t.rows[0].id : ""), k = V(((se = t.rows) == null ? void 0 : se.length) === 1 ? o((Ve = t.rows[0]) == null ? void 0 : Ve.geom) : t.center || null), B = V(((be = t.rows) == null ? void 0 : be.length) === 1 ? 14 : t.zoom || 5), A = V(!1), R = V(!1), T = V("");
|
|
3628
|
+
let K = !1;
|
|
3629
|
+
function pe(M) {
|
|
3630
|
+
return Object.entries(M).filter(([F, le]) => Array.isArray(le) ? le.length : le).map(([F, le]) => `${F}=${le}`).join("|");
|
|
3631
|
+
}
|
|
3632
|
+
function oe() {
|
|
3633
|
+
var Z, Se, ue, re;
|
|
3634
|
+
if (!m.value || !R.value) return;
|
|
3635
|
+
const M = (Se = (Z = m.value).getBounds) == null ? void 0 : Se.call(Z);
|
|
3636
|
+
if (!M) return;
|
|
3637
|
+
const F = (ue = M.getSouthWest) == null ? void 0 : ue.call(M), le = (re = M.getNorthEast) == null ? void 0 : re.call(M);
|
|
3638
|
+
!F || !le || (T.value = `${F.lng} ${F.lat},${le.lng} ${le.lat}`);
|
|
3639
|
+
}
|
|
3640
|
+
async function L(M = !1) {
|
|
3641
|
+
await Ae();
|
|
3642
|
+
const F = pe(C.value);
|
|
3643
|
+
a.value = F, R.value ? oe() : T.value = "";
|
|
3653
3644
|
try {
|
|
3654
|
-
const
|
|
3645
|
+
const le = {
|
|
3655
3646
|
search: h.value,
|
|
3656
3647
|
limit: v.value.toString(),
|
|
3657
3648
|
page: _.value.toString(),
|
|
3658
3649
|
filter: F,
|
|
3659
|
-
...
|
|
3660
|
-
},
|
|
3650
|
+
...R.value && T.value ? { bbox: T.value } : {}
|
|
3651
|
+
}, Z = new URL(`/api/data/${t.table}`, window.location.origin) + (s.value ? `/${s.value}` : ""), Se = new URLSearchParams(le).toString(), ue = await fetch(`${Z.toString()}?${Se}`).then((re) => re.json());
|
|
3661
3652
|
if (s.value) {
|
|
3662
|
-
let
|
|
3663
|
-
|
|
3653
|
+
let re;
|
|
3654
|
+
ue.rows.length > 1 ? re = ue.rows.find((ct) => ct.id === s.value) : [re] = ue.rows, b.value = re, M || (k.value = o(re == null ? void 0 : re.geom), B.value = 14), g.value = !0;
|
|
3664
3655
|
} else
|
|
3665
|
-
g.value = !1, A.value || (
|
|
3666
|
-
A.value = !1, u.value =
|
|
3667
|
-
} catch (
|
|
3668
|
-
console.error(
|
|
3656
|
+
g.value = !1, A.value || (B.value = t.zoom || 5), y.value = ue == null ? void 0 : ue.rows;
|
|
3657
|
+
A.value = !1, u.value = ue.filtered, La({ page: _.value, filter: F, id: s.value, filterByView: R.value });
|
|
3658
|
+
} catch (le) {
|
|
3659
|
+
console.error(le.message);
|
|
3669
3660
|
}
|
|
3670
3661
|
}
|
|
3671
|
-
const
|
|
3672
|
-
function
|
|
3673
|
-
!m.value ||
|
|
3662
|
+
const z = Ze(() => L(), 300), H = Ze(() => L(!0), 400);
|
|
3663
|
+
function J() {
|
|
3664
|
+
!m.value || K || !R.value || (m.value.on("moveend", H), m.value.on("zoomend", H), K = !0);
|
|
3674
3665
|
}
|
|
3675
|
-
function
|
|
3676
|
-
!m.value || !
|
|
3666
|
+
function he() {
|
|
3667
|
+
!m.value || !K || (m.value.off("moveend", H), m.value.off("zoomend", H), K = !1);
|
|
3677
3668
|
}
|
|
3678
|
-
function
|
|
3679
|
-
v.value =
|
|
3669
|
+
function de(M) {
|
|
3670
|
+
v.value = M, _.value = 1, L();
|
|
3680
3671
|
}
|
|
3681
|
-
function
|
|
3682
|
-
_.value =
|
|
3672
|
+
function ze(M) {
|
|
3673
|
+
_.value = M, L();
|
|
3683
3674
|
}
|
|
3684
|
-
function
|
|
3685
|
-
C.value =
|
|
3675
|
+
function $(M) {
|
|
3676
|
+
C.value = M.data, _.value = 1, s.value ? s.value = "" : L(), c("change:filter", M);
|
|
3686
3677
|
}
|
|
3687
|
-
async function
|
|
3678
|
+
async function D() {
|
|
3688
3679
|
if (t.filters) return;
|
|
3689
3680
|
const F = await (await fetch(`/api/filter/${t.table}`)).json();
|
|
3690
3681
|
p.value = F.list;
|
|
3691
3682
|
}
|
|
3692
|
-
function
|
|
3693
|
-
C.value = {}, h.value = "",
|
|
3683
|
+
function E() {
|
|
3684
|
+
C.value = {}, h.value = "", L();
|
|
3694
3685
|
}
|
|
3695
|
-
|
|
3696
|
-
var le,
|
|
3686
|
+
Ce(async () => {
|
|
3687
|
+
var le, Z;
|
|
3697
3688
|
d.value = window.innerWidth, d.value < 1e3 && (x.value = !1);
|
|
3698
|
-
const
|
|
3699
|
-
_.value = Number(
|
|
3700
|
-
const F =
|
|
3701
|
-
F !== null ?
|
|
3702
|
-
const [
|
|
3703
|
-
|
|
3704
|
-
}),
|
|
3705
|
-
}),
|
|
3706
|
-
|
|
3689
|
+
const M = new URLSearchParams(window.location.search);
|
|
3690
|
+
_.value = Number(M.get("page")) || 1, v.value = Number(M.get("limit")) || v.value, s.value = M.get("id") || "", g.value = !!s.value, a.value = M.get("filter") || "";
|
|
3691
|
+
const F = M.get("bbox");
|
|
3692
|
+
F !== null ? R.value = F !== "0" : R.value = !1, (Z = (le = M.get("filter")) == null ? void 0 : le.split("|")) == null || Z.forEach((Se) => {
|
|
3693
|
+
const [ue, re] = Se.split("=");
|
|
3694
|
+
ue && (C.value[ue] = re != null && re.includes(",") ? re.split(",") : [re]);
|
|
3695
|
+
}), D(), !y.value && !s.value && L();
|
|
3696
|
+
}), Me(() => {
|
|
3697
|
+
he();
|
|
3707
3698
|
});
|
|
3708
|
-
function
|
|
3699
|
+
function q() {
|
|
3709
3700
|
A.value = !0, g.value = !1, b.value = null, s.value = "";
|
|
3710
3701
|
}
|
|
3711
|
-
function ge(
|
|
3712
|
-
|
|
3713
|
-
}
|
|
3714
|
-
return
|
|
3715
|
-
c("update:map",
|
|
3716
|
-
}),
|
|
3717
|
-
|
|
3718
|
-
}),
|
|
3719
|
-
|
|
3720
|
-
}), R
|
|
3721
|
-
|
|
3722
|
-
}), (
|
|
3702
|
+
function ge(M) {
|
|
3703
|
+
M != null && M.geom && (k.value = o(M.geom), B.value = 16), b.value = M, s.value = M.id;
|
|
3704
|
+
}
|
|
3705
|
+
return j(m, (M) => {
|
|
3706
|
+
c("update:map", M), M && R.value && J();
|
|
3707
|
+
}), j(h, (M) => {
|
|
3708
|
+
M || L();
|
|
3709
|
+
}), j(s, () => {
|
|
3710
|
+
L();
|
|
3711
|
+
}), j(R, () => {
|
|
3712
|
+
R.value ? J() : he(), L();
|
|
3713
|
+
}), (M, F) => {
|
|
3723
3714
|
var le;
|
|
3724
|
-
return f(), w("section",
|
|
3725
|
-
|
|
3715
|
+
return f(), w("section", ir, [
|
|
3716
|
+
fe(M.$slots, "header", {
|
|
3726
3717
|
title: t.title,
|
|
3727
3718
|
total: u.value
|
|
3728
3719
|
}),
|
|
3729
|
-
l("div",
|
|
3720
|
+
l("div", sr, [
|
|
3730
3721
|
Y(e(ke), {
|
|
3731
3722
|
type: "text",
|
|
3732
3723
|
modelValue: h.value,
|
|
3733
|
-
"onUpdate:modelValue": F[0] || (F[0] = (
|
|
3724
|
+
"onUpdate:modelValue": F[0] || (F[0] = (Z) => h.value = Z),
|
|
3734
3725
|
name: "search",
|
|
3735
3726
|
label: "Пошук",
|
|
3736
|
-
onChange: e(
|
|
3727
|
+
onChange: e(z)
|
|
3737
3728
|
}, null, 8, ["modelValue", "onChange"]),
|
|
3738
|
-
p.value.length ? (f(),
|
|
3729
|
+
p.value.length ? (f(), P(e(De), {
|
|
3739
3730
|
key: 0,
|
|
3740
3731
|
schema: p.value,
|
|
3741
3732
|
view: "inline",
|
|
3742
|
-
onChange:
|
|
3733
|
+
onChange: $,
|
|
3743
3734
|
limit: 5,
|
|
3744
3735
|
value: C.value,
|
|
3745
3736
|
ref: "filterRef"
|
|
3746
3737
|
}, null, 8, ["schema", "value"])) : S("", !0),
|
|
3747
|
-
l("div",
|
|
3738
|
+
l("div", ur, [
|
|
3748
3739
|
l("button", {
|
|
3749
3740
|
type: "button",
|
|
3750
3741
|
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",
|
|
3751
3742
|
title: x.value ? "Приховати карту" : "Показати карту",
|
|
3752
|
-
onClick: F[1] || (F[1] = (
|
|
3743
|
+
onClick: F[1] || (F[1] = (Z) => x.value = !x.value)
|
|
3753
3744
|
}, [
|
|
3754
|
-
x.value ? (f(),
|
|
3755
|
-
|
|
3756
|
-
], 8,
|
|
3757
|
-
l("div",
|
|
3745
|
+
x.value ? (f(), P(xo, { key: 0 })) : (f(), P(Bo, { key: 1 })),
|
|
3746
|
+
dr
|
|
3747
|
+
], 8, cr),
|
|
3748
|
+
l("div", pr, [
|
|
3758
3749
|
l("button", {
|
|
3759
|
-
onClick: F[2] || (F[2] = (
|
|
3750
|
+
onClick: F[2] || (F[2] = (Z) => x.value = !1),
|
|
3760
3751
|
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"
|
|
3761
3752
|
}, [
|
|
3762
|
-
Y(
|
|
3753
|
+
Y(Zo)
|
|
3763
3754
|
]),
|
|
3764
3755
|
l("button", {
|
|
3765
|
-
onClick: F[3] || (F[3] = (
|
|
3756
|
+
onClick: F[3] || (F[3] = (Z) => x.value = !0),
|
|
3766
3757
|
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"
|
|
3767
3758
|
}, [
|
|
3768
|
-
Y(
|
|
3759
|
+
Y(Ko)
|
|
3769
3760
|
])
|
|
3770
3761
|
])
|
|
3771
3762
|
])
|
|
3772
3763
|
]),
|
|
3773
|
-
l("div",
|
|
3764
|
+
l("div", fr, [
|
|
3774
3765
|
l("div", {
|
|
3775
|
-
class:
|
|
3766
|
+
class: U([
|
|
3776
3767
|
"relative overflow-hidden shrink-0",
|
|
3777
3768
|
x.value ? "w-2/4 mr-0" : "w-full mr-3",
|
|
3778
3769
|
g.value ? "hidden" : ""
|
|
3779
3770
|
])
|
|
3780
3771
|
}, [
|
|
3781
|
-
(le =
|
|
3772
|
+
(le = M.$slots) != null && le.header ? S("", !0) : (f(), w("div", vr, [
|
|
3782
3773
|
l("div", null, [
|
|
3783
|
-
l("span",
|
|
3784
|
-
l("span",
|
|
3785
|
-
|
|
3774
|
+
l("span", mr, O(t.title), 1),
|
|
3775
|
+
l("span", hr, O(u.value), 1),
|
|
3776
|
+
gr
|
|
3786
3777
|
]),
|
|
3787
|
-
t.objectsInView ? (f(), w("label",
|
|
3778
|
+
t.objectsInView ? (f(), w("label", yr, [
|
|
3788
3779
|
N(l("input", {
|
|
3789
3780
|
type: "checkbox",
|
|
3790
3781
|
class: "accent-blue-600 w-4 h-4",
|
|
3791
|
-
"onUpdate:modelValue": F[4] || (F[4] = (
|
|
3782
|
+
"onUpdate:modelValue": F[4] || (F[4] = (Z) => R.value = Z)
|
|
3792
3783
|
}, null, 512), [
|
|
3793
|
-
[
|
|
3784
|
+
[vt, R.value]
|
|
3794
3785
|
]),
|
|
3795
|
-
|
|
3786
|
+
br
|
|
3796
3787
|
])) : S("", !0)
|
|
3797
3788
|
])),
|
|
3798
|
-
l("div",
|
|
3799
|
-
u.value >= 1 ?
|
|
3789
|
+
l("div", xr, [
|
|
3790
|
+
u.value >= 1 ? fe(M.$slots, "table", {
|
|
3800
3791
|
key: 0,
|
|
3801
3792
|
rows: y.value,
|
|
3802
3793
|
selectRow: ge
|
|
3803
|
-
}) : (f(), w("div",
|
|
3804
|
-
Y(
|
|
3805
|
-
|
|
3806
|
-
|
|
3794
|
+
}) : (f(), w("div", wr, [
|
|
3795
|
+
Y(co),
|
|
3796
|
+
kr,
|
|
3797
|
+
_r,
|
|
3807
3798
|
l("button", {
|
|
3808
3799
|
type: "button",
|
|
3809
3800
|
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",
|
|
3810
|
-
onClick:
|
|
3801
|
+
onClick: E
|
|
3811
3802
|
}, " Очистити дані пошуку ")
|
|
3812
3803
|
]))
|
|
3813
3804
|
]),
|
|
3814
|
-
u.value >= 1 ? (f(), w("hr",
|
|
3815
|
-
u.value >= 1 ? (f(), w("div",
|
|
3816
|
-
l("div",
|
|
3817
|
-
Y(
|
|
3805
|
+
u.value >= 1 ? (f(), w("hr", Cr)) : S("", !0),
|
|
3806
|
+
u.value >= 1 ? (f(), w("div", Vr, [
|
|
3807
|
+
l("div", Sr, [
|
|
3808
|
+
Y(oo, {
|
|
3818
3809
|
total: u.value,
|
|
3819
3810
|
currentPage: _.value ?? 1,
|
|
3820
3811
|
pageSize: v.value,
|
|
3821
|
-
onPageChange: F[5] || (F[5] = (
|
|
3822
|
-
onPageSizeChange: F[6] || (F[6] = (
|
|
3812
|
+
onPageChange: F[5] || (F[5] = (Z) => ze(Z)),
|
|
3813
|
+
onPageSizeChange: F[6] || (F[6] = (Z) => de(Z))
|
|
3823
3814
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
|
3824
3815
|
])
|
|
3825
3816
|
])) : S("", !0)
|
|
3826
3817
|
], 2),
|
|
3827
3818
|
g.value ? (f(), w("div", {
|
|
3828
3819
|
key: 0,
|
|
3829
|
-
class:
|
|
3820
|
+
class: U(
|
|
3830
3821
|
x.value ? "lg:static lg:w-1/2 mr-0 pb-5" : "pb-5 mr-3"
|
|
3831
3822
|
),
|
|
3832
3823
|
style: { height: "calc(100vh - 152px)" }
|
|
3833
3824
|
}, [
|
|
3834
|
-
|
|
3825
|
+
fe(M.$slots, "details", {
|
|
3835
3826
|
table: t.table,
|
|
3836
3827
|
selectedRow: b.value,
|
|
3837
|
-
closeObjCard:
|
|
3828
|
+
closeObjCard: q
|
|
3838
3829
|
})
|
|
3839
3830
|
], 2)) : S("", !0),
|
|
3840
|
-
N(l("div",
|
|
3841
|
-
Y(
|
|
3831
|
+
N(l("div", $r, [
|
|
3832
|
+
Y(nr, {
|
|
3842
3833
|
table: t.table,
|
|
3843
3834
|
map: m.value,
|
|
3844
|
-
"onUpdate:map": F[7] || (F[7] = (
|
|
3845
|
-
zoom:
|
|
3835
|
+
"onUpdate:map": F[7] || (F[7] = (Z) => m.value = Z),
|
|
3836
|
+
zoom: B.value,
|
|
3846
3837
|
colorAttr: t.colorAttr,
|
|
3847
3838
|
filter: a.value,
|
|
3848
3839
|
center: k.value,
|
|
3849
3840
|
clusterZoom: t.clusterZoom,
|
|
3850
3841
|
modelValue: s.value,
|
|
3851
|
-
"onUpdate:modelValue": F[8] || (F[8] = (
|
|
3842
|
+
"onUpdate:modelValue": F[8] || (F[8] = (Z) => s.value = Z),
|
|
3852
3843
|
layers: t.layers
|
|
3853
3844
|
}, {
|
|
3854
|
-
default: we(({ hoverData:
|
|
3855
|
-
|
|
3845
|
+
default: we(({ hoverData: Z }) => [
|
|
3846
|
+
fe(M.$slots, "popup", { data: Z })
|
|
3856
3847
|
]),
|
|
3857
3848
|
_: 3
|
|
3858
3849
|
}, 8, ["table", "map", "zoom", "colorAttr", "filter", "center", "clusterZoom", "modelValue", "layers"]),
|
|
3859
|
-
|
|
3850
|
+
fe(M.$slots, "default", {
|
|
3860
3851
|
table: t.table,
|
|
3861
3852
|
map: m.value,
|
|
3862
3853
|
selectedRow: b.value
|
|
@@ -3869,9 +3860,9 @@ const Go = [
|
|
|
3869
3860
|
};
|
|
3870
3861
|
}
|
|
3871
3862
|
});
|
|
3872
|
-
|
|
3873
|
-
i.component("VsPartsMap",
|
|
3863
|
+
qe.install = (i) => {
|
|
3864
|
+
i.component("VsPartsMap", qe), i._context.directives.tooltip || i.directive("tooltip", ut);
|
|
3874
3865
|
};
|
|
3875
3866
|
export {
|
|
3876
|
-
|
|
3867
|
+
qe as default
|
|
3877
3868
|
};
|