@opengis/partsmap 0.1.28 → 0.1.30
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 +716 -710
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, reactive as Zt, createApp as It, h as Xt, createElementBlock as c, openBlock as u, createElementVNode as t, createBlock as Q, resolveDynamicComponent as Ee, toDisplayString as
|
|
1
|
+
import { defineComponent as te, reactive as Zt, createApp as It, h as Xt, createElementBlock as c, openBlock as u, createElementVNode as t, createBlock as Q, resolveDynamicComponent as Ee, toDisplayString as R, useAttrs as Jt, computed as K, ref as L, watch as N, nextTick as Pe, useSlots as Ye, toRaw as Ne, Fragment as Y, createCommentVNode as z, mergeProps as me, createSlots as el, withCtx as ge, renderSlot as pe, unref as l, normalizeProps as tl, guardReactiveProps as ll, Teleport as at, renderList as ie, normalizeClass as H, onMounted as De, onBeforeUnmount as Ue, withKeys as Vt, withModifiers as Ae, createVNode as J, normalizeStyle as Fe, getCurrentInstance as ct, cloneVNode as ol, withDirectives as se, vShow as xe, createTextVNode as de, isRef as al, vModelText as Ze, createStaticVNode as Xe, resolveDirective as nl, vModelCheckbox as rl } from "vue";
|
|
2
2
|
const nt = (e, r) => {
|
|
3
3
|
const a = e.__vccOpts || e;
|
|
4
4
|
for (const [i, o] of r)
|
|
@@ -132,8 +132,8 @@ const kl = /* @__PURE__ */ nt(bl, [["render", wl]]), Cl = { class: "rounded-md b
|
|
|
132
132
|
t("div", _l, [
|
|
133
133
|
(u(), Q(Ee(r[a.type]))),
|
|
134
134
|
t("div", Ml, [
|
|
135
|
-
t("strong", Sl,
|
|
136
|
-
t("p", Vl,
|
|
135
|
+
t("strong", Sl, R(a.title), 1),
|
|
136
|
+
t("p", Vl, R(a.message), 1)
|
|
137
137
|
]),
|
|
138
138
|
i[0] || (i[0] = t("button", {
|
|
139
139
|
class: "m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",
|
|
@@ -229,7 +229,7 @@ function Pl(e, r) {
|
|
|
229
229
|
t("path", { d: "M20 4v5h-5" }, null, -1)
|
|
230
230
|
])]);
|
|
231
231
|
}
|
|
232
|
-
const Ll = /* @__PURE__ */ Le(Bl, [["render", Pl]]), jl = {},
|
|
232
|
+
const Ll = /* @__PURE__ */ Le(Bl, [["render", Pl]]), jl = {}, zl = {
|
|
233
233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
234
234
|
width: "24",
|
|
235
235
|
height: "24",
|
|
@@ -241,12 +241,12 @@ const Ll = /* @__PURE__ */ Le(Bl, [["render", Pl]]), jl = {}, Fl = {
|
|
|
241
241
|
"stroke-linejoin": "round",
|
|
242
242
|
class: "text-blue-600 w-[16px] h-[16px]"
|
|
243
243
|
};
|
|
244
|
-
function
|
|
245
|
-
return u(), c("svg",
|
|
244
|
+
function Fl(e, r) {
|
|
245
|
+
return u(), c("svg", zl, [...r[0] || (r[0] = [
|
|
246
246
|
t("path", { d: "M20 6 9 17l-5-5" }, null, -1)
|
|
247
247
|
])]);
|
|
248
248
|
}
|
|
249
|
-
const Re = /* @__PURE__ */ Le(jl, [["render",
|
|
249
|
+
const Re = /* @__PURE__ */ Le(jl, [["render", Fl]]), El = { class: "flex items-center cursor-pointer w-full" }, Dl = {
|
|
250
250
|
key: 0,
|
|
251
251
|
width: "16",
|
|
252
252
|
height: "auto",
|
|
@@ -275,7 +275,7 @@ const Re = /* @__PURE__ */ Le(jl, [["render", zl]]), El = { class: "flex items-c
|
|
|
275
275
|
function d() {
|
|
276
276
|
o("itemClick", i.value);
|
|
277
277
|
}
|
|
278
|
-
const w = L(null), n =
|
|
278
|
+
const w = L(null), n = K(() => i.layout === "inline" && i.type === "radio"), f = K(() => i.layout === "vertical" ? "text-[13px]" : "text-sm");
|
|
279
279
|
return r({ el: w }), (b, h) => (u(), c("div", {
|
|
280
280
|
class: "flex items-center w-full rounded-sm group hover:bg-gray-100",
|
|
281
281
|
ref_key: "el",
|
|
@@ -294,14 +294,14 @@ const Re = /* @__PURE__ */ Le(jl, [["render", zl]]), El = { class: "flex items-c
|
|
|
294
294
|
]),
|
|
295
295
|
onClick: Ae(d, ["stop", "prevent"])
|
|
296
296
|
}, [
|
|
297
|
-
n.value ?
|
|
297
|
+
n.value ? z("", !0) : (u(), c("div", {
|
|
298
298
|
key: 0,
|
|
299
299
|
class: H(["w-[18px] h-[18px] border flex items-center justify-center", [
|
|
300
300
|
e.type === "checkbox" ? "rounded-[4px]" : "rounded-full",
|
|
301
301
|
e.color ? `bg-[${e.color}] border-[#ffffff]` : e.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
|
|
302
302
|
]])
|
|
303
303
|
}, [
|
|
304
|
-
e.isSelected ? (u(), c("img", Dl)) :
|
|
304
|
+
e.isSelected ? (u(), c("img", Dl)) : z("", !0)
|
|
305
305
|
], 2)),
|
|
306
306
|
t("input", {
|
|
307
307
|
type: "checkbox",
|
|
@@ -312,12 +312,12 @@ const Re = /* @__PURE__ */ Le(jl, [["render", zl]]), El = { class: "flex items-c
|
|
|
312
312
|
t("div", {
|
|
313
313
|
class: H(["flex flex-1 flex-row items-center justify-between", n.value ? "pl-1 pr-6" : "w-[calc(100%-18px)] pl-[10px]"])
|
|
314
314
|
}, [
|
|
315
|
-
t("span", Rl,
|
|
316
|
-
e.count ? (u(), c("div", Zl, " (" +
|
|
315
|
+
t("span", Rl, R(e.label ?? "Відсутні дані"), 1),
|
|
316
|
+
e.count ? (u(), c("div", Zl, " (" + R(e.count) + ") ", 1)) : z("", !0)
|
|
317
317
|
], 2),
|
|
318
318
|
n.value && e.isSelected ? (u(), c("span", Il, [
|
|
319
|
-
|
|
320
|
-
])) :
|
|
319
|
+
J(Re)
|
|
320
|
+
])) : z("", !0)
|
|
321
321
|
], 2)
|
|
322
322
|
])
|
|
323
323
|
], 2)
|
|
@@ -337,23 +337,23 @@ function ft(e, r) {
|
|
|
337
337
|
}
|
|
338
338
|
const b = L(f(e.modelValue)), h = L(""), g = L(!1), x = L([]), S = L("id"), v = L("text"), M = L(!1), V = L(e.layout !== "popover" && i.length > o);
|
|
339
339
|
function p(s) {
|
|
340
|
-
const _ = s.find(Boolean) ?? {}, y = ["id", "value", "code", "key"].find((Z) => Z in _) ?? "id",
|
|
341
|
-
return { autoValueKey: y, autoLabelKey:
|
|
340
|
+
const _ = s.find(Boolean) ?? {}, y = ["id", "value", "code", "key"].find((Z) => Z in _) ?? "id", O = ["text", "label", "name", "title"].find((Z) => Z in _) ?? "text";
|
|
341
|
+
return { autoValueKey: y, autoLabelKey: O };
|
|
342
342
|
}
|
|
343
343
|
function m(s) {
|
|
344
344
|
if (s.length > 0) {
|
|
345
345
|
const y = p(s);
|
|
346
346
|
S.value = y.autoValueKey, v.value = y.autoLabelKey;
|
|
347
347
|
}
|
|
348
|
-
const _ = [...s].sort((y,
|
|
348
|
+
const _ = [...s].sort((y, O) => e.sort === "count" ? O.count && y.count ? O.count - y.count : 0 : e.sort === "name" ? String(y[v.value] ?? "").localeCompare(String(O[v.value] ?? "")) : 0);
|
|
349
349
|
x.value = _;
|
|
350
350
|
}
|
|
351
351
|
i.length > 0 && m(i);
|
|
352
|
-
const
|
|
352
|
+
const F = K(() => {
|
|
353
353
|
const s = x.value;
|
|
354
354
|
return e.layout === "popover" || M.value ? s : s.slice(0, o);
|
|
355
355
|
});
|
|
356
|
-
async function
|
|
356
|
+
async function U() {
|
|
357
357
|
if (a) {
|
|
358
358
|
g.value = !0;
|
|
359
359
|
try {
|
|
@@ -378,7 +378,7 @@ function ft(e, r) {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
function E() {
|
|
381
|
-
a && x.value.length === 0 &&
|
|
381
|
+
a && x.value.length === 0 && U();
|
|
382
382
|
}
|
|
383
383
|
N(() => e.modelValue, (s) => {
|
|
384
384
|
b.value = f(s);
|
|
@@ -398,7 +398,7 @@ function ft(e, r) {
|
|
|
398
398
|
return {
|
|
399
399
|
innerValue: b,
|
|
400
400
|
searchTerm: h,
|
|
401
|
-
filteredOptions:
|
|
401
|
+
filteredOptions: F,
|
|
402
402
|
isSelected: k,
|
|
403
403
|
selectItem: C,
|
|
404
404
|
clear: j,
|
|
@@ -412,20 +412,20 @@ function ft(e, r) {
|
|
|
412
412
|
loadData: E
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
return
|
|
415
|
+
function Ut(e = { color: "blue" }) {
|
|
416
|
+
return K(() => {
|
|
417
417
|
const r = `w-full px-3 py-2 border-solid border text-black border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${e.color}-500 focus:border-transparent
|
|
418
418
|
text-gray-800 bg-white dark:text-neutral-300 dark:bg-neutral-800 dark:border-neutral-600`;
|
|
419
419
|
return (e == null ? void 0 : e.size) === "sm" ? `${r}h-[32px]` : `${r}h-[38px]`;
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Te() {
|
|
423
423
|
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]";
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Ul() {
|
|
426
426
|
return "font-medium border border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 h-7 rounded-md text-xs px-2 py-1 text-gray-800 bg-white hover:bg-gray-100 dark:text-neutral-300 dark:bg-neutral-800 dark:hover:bg-neutral-700 dark:border-neutral-600";
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Tt(e) {
|
|
429
429
|
return e === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border 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" : e === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-sm border bg-white-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-1 bg-transparent h-[38px]";
|
|
430
430
|
}
|
|
431
431
|
const $t = {
|
|
@@ -476,7 +476,7 @@ function Bt(e) {
|
|
|
476
476
|
const r = e.split(".")[1], a = typeof window < "u" && window.localStorage ? localStorage.locale : null;
|
|
477
477
|
return ($t[a || navigator.language] || $t.uk)[r];
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Me() {
|
|
480
480
|
const e = ct();
|
|
481
481
|
if (!e.appContext.config.globalProperties.$i18n) return Bt;
|
|
482
482
|
const r = e.appContext.config.globalProperties.$t;
|
|
@@ -485,18 +485,18 @@ function _e() {
|
|
|
485
485
|
return i === a ? Bt(a) : i;
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const Tl = {}, Kl = {
|
|
489
489
|
class: "w-48 mx-auto",
|
|
490
490
|
viewBox: "0 0 178 90",
|
|
491
491
|
fill: "none",
|
|
492
492
|
xmlns: "http://www.w3.org/2000/svg"
|
|
493
493
|
};
|
|
494
494
|
function Hl(e, r) {
|
|
495
|
-
return u(), c("svg",
|
|
495
|
+
return u(), c("svg", Kl, [...r[0] || (r[0] = [
|
|
496
496
|
Xe('<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)
|
|
497
497
|
])]);
|
|
498
498
|
}
|
|
499
|
-
const vt = /* @__PURE__ */ Le(
|
|
499
|
+
const vt = /* @__PURE__ */ Le(Tl, [["render", Hl]]), Nl = {}, Wl = {
|
|
500
500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
501
501
|
width: "24",
|
|
502
502
|
height: "24",
|
|
@@ -579,7 +579,7 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
579
579
|
},
|
|
580
580
|
emits: ["update:modelValue", "change", "clear"],
|
|
581
581
|
setup(e, { expose: r, emit: a }) {
|
|
582
|
-
const i = e, o = L(null), d =
|
|
582
|
+
const i = e, o = L(null), d = Te(), w = Me(), n = a, {
|
|
583
583
|
innerValue: f,
|
|
584
584
|
filteredOptions: b,
|
|
585
585
|
isSelected: h,
|
|
@@ -591,14 +591,14 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
591
591
|
isEnableShowAll: V,
|
|
592
592
|
labelKey: p,
|
|
593
593
|
valueKey: m,
|
|
594
|
-
allOptions:
|
|
595
|
-
loadData:
|
|
594
|
+
allOptions: F,
|
|
595
|
+
loadData: U
|
|
596
596
|
} = ft({
|
|
597
597
|
...i,
|
|
598
598
|
modelValue: i.modelValue ?? i.default ?? ""
|
|
599
599
|
}, n);
|
|
600
600
|
return De(() => {
|
|
601
|
-
i.api &&
|
|
601
|
+
i.api && U();
|
|
602
602
|
}), r({
|
|
603
603
|
clear: x,
|
|
604
604
|
inputTextRef: o
|
|
@@ -630,13 +630,13 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
630
630
|
], 2),
|
|
631
631
|
e.type === "select" && l(b).length === 0 && !l(v) ? (u(), c("div", Xl, [
|
|
632
632
|
t("div", Jl, [
|
|
633
|
-
|
|
633
|
+
J(vt),
|
|
634
634
|
k[4] || (k[4] = t("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
635
635
|
t("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
|
|
636
636
|
t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
637
637
|
], -1))
|
|
638
638
|
])
|
|
639
|
-
])) :
|
|
639
|
+
])) : z("", !0),
|
|
640
640
|
e.layout !== "popover" && e.type !== "select" ? (u(), c(Y, { key: 1 }, [
|
|
641
641
|
!l(M) && l(V) ? (u(), c("div", {
|
|
642
642
|
key: 0,
|
|
@@ -645,8 +645,8 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
645
645
|
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"
|
|
646
646
|
}, [
|
|
647
647
|
k[5] || (k[5] = de(" Показати більше ", -1)),
|
|
648
|
-
|
|
649
|
-
])) :
|
|
648
|
+
J(rt)
|
|
649
|
+
])) : z("", !0),
|
|
650
650
|
l(M) ? (u(), c("div", {
|
|
651
651
|
key: 1,
|
|
652
652
|
onClick: k[1] || (k[1] = //@ts-ignore
|
|
@@ -654,12 +654,12 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
654
654
|
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"
|
|
655
655
|
}, [
|
|
656
656
|
k[6] || (k[6] = de(" Показати менше ", -1)),
|
|
657
|
-
|
|
658
|
-
])) :
|
|
659
|
-
], 64)) :
|
|
657
|
+
J(mt)
|
|
658
|
+
])) : z("", !0)
|
|
659
|
+
], 64)) : z("", !0),
|
|
660
660
|
e.cleanable ? (u(), c(Y, { key: 2 }, [
|
|
661
661
|
e.layout === "inline" ? (u(), c("div", eo, [
|
|
662
|
-
de(
|
|
662
|
+
de(R(l(f) || l(f) === null ? 1 : 0) + " з " + R(l(F).length) + " обрано ", 1),
|
|
663
663
|
se(t("button", {
|
|
664
664
|
class: "text-gray-600 hover:text-gray-800",
|
|
665
665
|
onClick: k[2] || (k[2] = //@ts-ignore
|
|
@@ -667,7 +667,7 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
667
667
|
}, " Очистити ", 512), [
|
|
668
668
|
[xe, l(f) !== "" && l(f) !== void 0]
|
|
669
669
|
])
|
|
670
|
-
])) :
|
|
670
|
+
])) : z("", !0),
|
|
671
671
|
e.layout === "popover" ? (u(), c("div", to, [
|
|
672
672
|
t("button", {
|
|
673
673
|
type: "button",
|
|
@@ -675,13 +675,13 @@ const mt = /* @__PURE__ */ Le(Yl, [["render", Ql]]), Xl = {
|
|
|
675
675
|
class: H(l(d) + " hover:bg-gray-100"),
|
|
676
676
|
onClick: k[3] || (k[3] = //@ts-ignore
|
|
677
677
|
(...C) => l(x) && l(x)(...C))
|
|
678
|
-
},
|
|
679
|
-
])) :
|
|
680
|
-
], 64)) :
|
|
678
|
+
}, R(l(w)("filter.clear")), 11, lo)
|
|
679
|
+
])) : z("", !0)
|
|
680
|
+
], 64)) : z("", !0)
|
|
681
681
|
], 2));
|
|
682
682
|
}
|
|
683
683
|
});
|
|
684
|
-
function
|
|
684
|
+
function Kt(e, r) {
|
|
685
685
|
const {
|
|
686
686
|
api: a,
|
|
687
687
|
options: i = [],
|
|
@@ -694,23 +694,23 @@ function Ut(e, r) {
|
|
|
694
694
|
}
|
|
695
695
|
const b = L(f(e.modelValue)), h = L(""), g = L(!1), x = L([]), S = L("id"), v = L("text"), M = L(!1), V = L(e.layout !== "popover" && i.length > o);
|
|
696
696
|
function p(s) {
|
|
697
|
-
const _ = s.find(Boolean) ?? {}, y = ["id", "value", "code", "key"].find((Z) => Z in _) ?? "id",
|
|
698
|
-
return { autoValueKey: y, autoLabelKey:
|
|
697
|
+
const _ = s.find(Boolean) ?? {}, y = ["id", "value", "code", "key"].find((Z) => Z in _) ?? "id", O = ["text", "label", "name", "title"].find((Z) => Z in _) ?? "text";
|
|
698
|
+
return { autoValueKey: y, autoLabelKey: O };
|
|
699
699
|
}
|
|
700
700
|
function m(s) {
|
|
701
701
|
if (s.length > 0) {
|
|
702
702
|
const y = p(s);
|
|
703
703
|
S.value = y.autoValueKey, v.value = y.autoLabelKey;
|
|
704
704
|
}
|
|
705
|
-
const _ = [...s].sort((y,
|
|
705
|
+
const _ = [...s].sort((y, O) => e.sort === "count" ? O.count && y.count ? O.count - y.count : 0 : e.sort === "name" ? String(y[v.value]).localeCompare(String(O[v.value])) : 0);
|
|
706
706
|
x.value = _;
|
|
707
707
|
}
|
|
708
708
|
i.length > 0 && m(i);
|
|
709
|
-
const
|
|
709
|
+
const F = K(() => {
|
|
710
710
|
const s = x.value;
|
|
711
711
|
return e.layout === "popover" || M.value ? s : s.slice(0, o);
|
|
712
712
|
});
|
|
713
|
-
async function
|
|
713
|
+
async function U() {
|
|
714
714
|
if (a) {
|
|
715
715
|
g.value = !0;
|
|
716
716
|
try {
|
|
@@ -735,7 +735,7 @@ function Ut(e, r) {
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
function E() {
|
|
738
|
-
a && x.value.length === 0 &&
|
|
738
|
+
a && x.value.length === 0 && U();
|
|
739
739
|
}
|
|
740
740
|
N(() => e.modelValue, (s) => {
|
|
741
741
|
b.value = f(s);
|
|
@@ -756,7 +756,7 @@ function Ut(e, r) {
|
|
|
756
756
|
return {
|
|
757
757
|
innerValue: b,
|
|
758
758
|
searchTerm: h,
|
|
759
|
-
filteredOptions:
|
|
759
|
+
filteredOptions: F,
|
|
760
760
|
isSelected: k,
|
|
761
761
|
selectItem: C,
|
|
762
762
|
clear: j,
|
|
@@ -809,7 +809,7 @@ const ao = {
|
|
|
809
809
|
},
|
|
810
810
|
emits: ["update:modelValue", "change", "clear"],
|
|
811
811
|
setup(e, { expose: r, emit: a }) {
|
|
812
|
-
const i =
|
|
812
|
+
const i = Me(), o = Te(), d = e, w = a, {
|
|
813
813
|
innerValue: n,
|
|
814
814
|
filteredOptions: f,
|
|
815
815
|
isSelected: b,
|
|
@@ -822,21 +822,21 @@ const ao = {
|
|
|
822
822
|
labelKey: V,
|
|
823
823
|
valueKey: p,
|
|
824
824
|
allOptions: m,
|
|
825
|
-
loadData:
|
|
826
|
-
} =
|
|
825
|
+
loadData: F
|
|
826
|
+
} = Kt({
|
|
827
827
|
...d,
|
|
828
828
|
modelValue: d.modelValue
|
|
829
829
|
}, w);
|
|
830
830
|
return De(() => {
|
|
831
|
-
d.api &&
|
|
831
|
+
d.api && F();
|
|
832
832
|
}), N(
|
|
833
833
|
() => d.modelValue,
|
|
834
|
-
(
|
|
835
|
-
|
|
834
|
+
(U) => {
|
|
835
|
+
U === void 0 && (n.value = []);
|
|
836
836
|
}
|
|
837
837
|
), r({
|
|
838
838
|
clear: g
|
|
839
|
-
}), (
|
|
839
|
+
}), (U, E) => (u(), c("div", {
|
|
840
840
|
class: H([e.layout === "popover" ? "flex flex-col max-h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
841
841
|
}, [
|
|
842
842
|
t("div", {
|
|
@@ -858,13 +858,13 @@ const ao = {
|
|
|
858
858
|
], 2),
|
|
859
859
|
e.type === "select" && l(f).length === 0 && !l(S) ? (u(), c("div", ao, [
|
|
860
860
|
t("div", no, [
|
|
861
|
-
|
|
861
|
+
J(vt),
|
|
862
862
|
t("div", ro, [
|
|
863
|
-
t("p", io,
|
|
863
|
+
t("p", io, R(l(i)("filter.notfound")), 1),
|
|
864
864
|
E[4] || (E[4] = t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
|
|
865
865
|
])
|
|
866
866
|
])
|
|
867
|
-
])) :
|
|
867
|
+
])) : z("", !0),
|
|
868
868
|
e.layout !== "popover" && e.type !== "select" ? (u(), c(Y, { key: 1 }, [
|
|
869
869
|
!l(v) && l(M) ? (u(), c("div", {
|
|
870
870
|
key: 0,
|
|
@@ -872,30 +872,30 @@ const ao = {
|
|
|
872
872
|
(...k) => l(x) && l(x)(...k)),
|
|
873
873
|
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"
|
|
874
874
|
}, [
|
|
875
|
-
de(
|
|
876
|
-
|
|
877
|
-
])) :
|
|
875
|
+
de(R(l(i)("filter.more")) + " ", 1),
|
|
876
|
+
J(rt)
|
|
877
|
+
])) : z("", !0),
|
|
878
878
|
l(v) ? (u(), c("div", {
|
|
879
879
|
key: 1,
|
|
880
880
|
onClick: E[1] || (E[1] = //@ts-ignore
|
|
881
881
|
(...k) => l(x) && l(x)(...k)),
|
|
882
882
|
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"
|
|
883
883
|
}, [
|
|
884
|
-
de(
|
|
885
|
-
|
|
886
|
-
])) :
|
|
887
|
-
], 64)) :
|
|
884
|
+
de(R(l(i)("filter.less")) + " ", 1),
|
|
885
|
+
J(mt)
|
|
886
|
+
])) : z("", !0)
|
|
887
|
+
], 64)) : z("", !0),
|
|
888
888
|
e.cleanable ? (u(), c(Y, { key: 2 }, [
|
|
889
889
|
e.layout === "inline" ? (u(), c("div", so, [
|
|
890
|
-
de(
|
|
890
|
+
de(R(l(n).length) + " / " + R(l(m).length) + " " + R(l(i)("filter.selected")) + " ", 1),
|
|
891
891
|
se(t("button", {
|
|
892
892
|
class: "text-gray-600 hover:text-gray-800",
|
|
893
893
|
onClick: E[2] || (E[2] = //@ts-ignore
|
|
894
894
|
(...k) => l(g) && l(g)(...k))
|
|
895
|
-
},
|
|
895
|
+
}, R(l(i)("filter.clear")), 513), [
|
|
896
896
|
[xe, l(n).length !== 0]
|
|
897
897
|
])
|
|
898
|
-
])) :
|
|
898
|
+
])) : z("", !0),
|
|
899
899
|
e.layout === "popover" ? (u(), c("div", uo, [
|
|
900
900
|
t("button", {
|
|
901
901
|
type: "button",
|
|
@@ -904,11 +904,11 @@ const ao = {
|
|
|
904
904
|
onClick: E[3] || (E[3] = //@ts-ignore
|
|
905
905
|
(...k) => l(g) && l(g)(...k))
|
|
906
906
|
}, [
|
|
907
|
-
de(
|
|
908
|
-
t("span", po,
|
|
907
|
+
de(R(l(i)("filter.clear")) + " ", 1),
|
|
908
|
+
t("span", po, R(l(n).length) + " з " + R(l(m).length), 1)
|
|
909
909
|
], 10, co)
|
|
910
|
-
])) :
|
|
911
|
-
], 64)) :
|
|
910
|
+
])) : z("", !0)
|
|
911
|
+
], 64)) : z("", !0)
|
|
912
912
|
], 2));
|
|
913
913
|
}
|
|
914
914
|
}), fo = {}, vo = {
|
|
@@ -1023,15 +1023,15 @@ const bo = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
1023
1023
|
])
|
|
1024
1024
|
}, [
|
|
1025
1025
|
t("div", bo, [
|
|
1026
|
-
|
|
1026
|
+
J(Ht)
|
|
1027
1027
|
]),
|
|
1028
1028
|
d.value !== "" ? (u(), c("div", {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
onClick: f,
|
|
1031
1031
|
class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
|
|
1032
1032
|
}, [
|
|
1033
|
-
|
|
1034
|
-
])) :
|
|
1033
|
+
J(ht)
|
|
1034
|
+
])) : z("", !0),
|
|
1035
1035
|
se(t("input", {
|
|
1036
1036
|
type: "text",
|
|
1037
1037
|
"onUpdate:modelValue": g[0] || (g[0] = (x) => d.value = x),
|
|
@@ -1085,9 +1085,9 @@ const bo = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
1085
1085
|
},
|
|
1086
1086
|
emits: ["update:modelValue", "change", "clear"],
|
|
1087
1087
|
setup(e, { expose: r, emit: a }) {
|
|
1088
|
-
const i =
|
|
1088
|
+
const i = Ut(), o = Te(), d = Me(), w = e, n = L(
|
|
1089
1089
|
w.modelValue ?? w.default ?? []
|
|
1090
|
-
), f = a, b =
|
|
1090
|
+
), f = a, b = K({
|
|
1091
1091
|
get: () => w.modelValue ?? n.value,
|
|
1092
1092
|
set: (x) => {
|
|
1093
1093
|
w.modelValue !== void 0 ? f("update:modelValue", x) : n.value = x;
|
|
@@ -1112,7 +1112,7 @@ const bo = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
1112
1112
|
class: H(e.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
|
|
1113
1113
|
}, [
|
|
1114
1114
|
t("div", null, [
|
|
1115
|
-
e.layout !== "vertical" ? (u(), c("label", ko,
|
|
1115
|
+
e.layout !== "vertical" ? (u(), c("label", ko, R(l(d)("filter.from")), 1)) : z("", !0),
|
|
1116
1116
|
se(t("input", {
|
|
1117
1117
|
type: "number",
|
|
1118
1118
|
class: H(l(i)),
|
|
@@ -1125,9 +1125,9 @@ const bo = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
1125
1125
|
[Ze, b.value[0]]
|
|
1126
1126
|
])
|
|
1127
1127
|
]),
|
|
1128
|
-
e.layout === "vertical" ? (u(), c("label", _o, " - ")) :
|
|
1128
|
+
e.layout === "vertical" ? (u(), c("label", _o, " - ")) : z("", !0),
|
|
1129
1129
|
t("div", null, [
|
|
1130
|
-
e.layout !== "vertical" ? (u(), c("label", Mo,
|
|
1130
|
+
e.layout !== "vertical" ? (u(), c("label", Mo, R(l(d)("filter.to")), 1)) : z("", !0),
|
|
1131
1131
|
se(t("input", {
|
|
1132
1132
|
type: "number",
|
|
1133
1133
|
class: H(l(i)),
|
|
@@ -1146,16 +1146,16 @@ const bo = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
|
|
|
1146
1146
|
key: 1,
|
|
1147
1147
|
onClick: h,
|
|
1148
1148
|
class: H(l(o) + (e.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
|
|
1149
|
-
},
|
|
1149
|
+
}, R(e.layout === "vertical" ? "Ok" : l(d)("filter.apply")), 3)) : z("", !0),
|
|
1150
1150
|
["popover", "inline"].includes(e.layout) ? (u(), c("button", {
|
|
1151
1151
|
key: 2,
|
|
1152
1152
|
disabled: !(b.value[0] || b.value[1]),
|
|
1153
1153
|
onClick: g,
|
|
1154
1154
|
class: H(l(o) + " hover:bg-gray-100")
|
|
1155
|
-
},
|
|
1155
|
+
}, R(l(d)("filter.clear")), 11, Vo)) : z("", !0)
|
|
1156
1156
|
], 2)
|
|
1157
1157
|
]),
|
|
1158
|
-
(e.cleanable && n.value.length,
|
|
1158
|
+
(e.cleanable && n.value.length, z("", !0))
|
|
1159
1159
|
], 64);
|
|
1160
1160
|
};
|
|
1161
1161
|
}
|
|
@@ -1211,7 +1211,7 @@ class he {
|
|
|
1211
1211
|
function Wt(e, r) {
|
|
1212
1212
|
const {
|
|
1213
1213
|
popoverRef: a
|
|
1214
|
-
} = e, i =
|
|
1214
|
+
} = e, i = Me(), o = L(""), d = L(
|
|
1215
1215
|
e.modelValue ?? e.default ?? []
|
|
1216
1216
|
), w = L(0);
|
|
1217
1217
|
function n() {
|
|
@@ -1219,8 +1219,8 @@ function Wt(e, r) {
|
|
|
1219
1219
|
return d.value = [...p], r("change", { name: e.name, value: d.value }), r("update:modelValue", d.value), p;
|
|
1220
1220
|
}
|
|
1221
1221
|
function f(p) {
|
|
1222
|
-
var
|
|
1223
|
-
o.value = p, (
|
|
1222
|
+
var F;
|
|
1223
|
+
o.value = p, (F = a.value) == null || F.close();
|
|
1224
1224
|
const m = [];
|
|
1225
1225
|
switch (o.value) {
|
|
1226
1226
|
case "today":
|
|
@@ -1304,12 +1304,12 @@ function Wt(e, r) {
|
|
|
1304
1304
|
"Грудень"
|
|
1305
1305
|
];
|
|
1306
1306
|
function x(p) {
|
|
1307
|
-
const [m,
|
|
1308
|
-
return `${
|
|
1307
|
+
const [m, F, U] = p.split("-");
|
|
1308
|
+
return `${U}.${F}.${m}`;
|
|
1309
1309
|
}
|
|
1310
1310
|
function S(p, m = "long") {
|
|
1311
|
-
const
|
|
1312
|
-
return new Intl.DateTimeFormat(localStorage.locale, { month: m, timeZone: "UTC" }).format(
|
|
1311
|
+
const F = new Date(Date.UTC(2e3, p - 1, 1));
|
|
1312
|
+
return new Intl.DateTimeFormat(localStorage.locale, { month: m, timeZone: "UTC" }).format(F);
|
|
1313
1313
|
}
|
|
1314
1314
|
function v(p) {
|
|
1315
1315
|
const { value: m } = d;
|
|
@@ -1322,14 +1322,14 @@ function Wt(e, r) {
|
|
|
1322
1322
|
return m[0] && m[1] ? `${x(m[0])} – ${x(m[1])}` : "";
|
|
1323
1323
|
case "quarter":
|
|
1324
1324
|
if (m[0]) {
|
|
1325
|
-
const
|
|
1326
|
-
return `${Math.floor(E / 3) + 1} ${i("filter.quarter")} ${
|
|
1325
|
+
const F = new Date(m[0]), U = F.getFullYear(), E = F.getMonth();
|
|
1326
|
+
return `${Math.floor(E / 3) + 1} ${i("filter.quarter")} ${U}`;
|
|
1327
1327
|
}
|
|
1328
1328
|
return "";
|
|
1329
1329
|
case "month":
|
|
1330
1330
|
if (m[0]) {
|
|
1331
|
-
const [
|
|
1332
|
-
return `${S(parseInt(
|
|
1331
|
+
const [F, U] = m[0].split("-");
|
|
1332
|
+
return `${S(parseInt(U, 10))} ${F}`;
|
|
1333
1333
|
}
|
|
1334
1334
|
return "";
|
|
1335
1335
|
case "year":
|
|
@@ -1340,7 +1340,7 @@ function Wt(e, r) {
|
|
|
1340
1340
|
return e.label ?? "";
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
|
-
const M =
|
|
1343
|
+
const M = K(() => o.value ? v(o.value) : e.label ?? "");
|
|
1344
1344
|
function V() {
|
|
1345
1345
|
o.value = "", d.value = [], r("update:modelValue", []), r("clear", e.name);
|
|
1346
1346
|
}
|
|
@@ -1368,13 +1368,13 @@ const Bo = {
|
|
|
1368
1368
|
}, Po = ["max", "disabled"], Lo = ["min", "disabled"], jo = {
|
|
1369
1369
|
key: 0,
|
|
1370
1370
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1371
|
-
},
|
|
1371
|
+
}, zo = ["max", "disabled"], Fo = {
|
|
1372
1372
|
key: 0,
|
|
1373
1373
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1374
1374
|
}, Eo = {
|
|
1375
1375
|
key: 0,
|
|
1376
1376
|
class: "block text-xs font-medium text-gray-600 mb-1"
|
|
1377
|
-
}, Do = ["min", "disabled"], Oo = { class: "flex gap-1 px-2" }, Ro = ["title", "onClick"], Zo = { class: "pt-2 px-2" }, Io = ["disabled"],
|
|
1377
|
+
}, Do = ["min", "disabled"], Oo = { class: "flex gap-1 px-2" }, Ro = ["title", "onClick"], Zo = { class: "pt-2 px-2" }, Io = ["disabled"], Uo = /* @__PURE__ */ te({
|
|
1378
1378
|
__name: "date-input",
|
|
1379
1379
|
props: {
|
|
1380
1380
|
id: {},
|
|
@@ -1404,7 +1404,7 @@ const Bo = {
|
|
|
1404
1404
|
},
|
|
1405
1405
|
emits: ["update:modelValue", "change", "clear"],
|
|
1406
1406
|
setup(e, { expose: r, emit: a }) {
|
|
1407
|
-
const i = e, o =
|
|
1407
|
+
const i = e, o = Ut(), d = Te(), w = Ul(), n = Me(), f = a, b = L(null), {
|
|
1408
1408
|
activeMode: h,
|
|
1409
1409
|
innerValue: g,
|
|
1410
1410
|
onSelectChange: x,
|
|
@@ -1420,13 +1420,13 @@ const Bo = {
|
|
|
1420
1420
|
);
|
|
1421
1421
|
N(
|
|
1422
1422
|
() => i.modelValue,
|
|
1423
|
-
(
|
|
1424
|
-
|
|
1423
|
+
(U) => {
|
|
1424
|
+
U !== void 0 ? (g.value = U, f("update:modelValue", U)) : (h.value = "", g.value = []);
|
|
1425
1425
|
}
|
|
1426
1426
|
), N(
|
|
1427
1427
|
g,
|
|
1428
|
-
(
|
|
1429
|
-
f("update:modelValue",
|
|
1428
|
+
(U) => {
|
|
1429
|
+
f("update:modelValue", U), f("change", { name: i.name, value: U });
|
|
1430
1430
|
},
|
|
1431
1431
|
{ deep: !0 }
|
|
1432
1432
|
);
|
|
@@ -1437,18 +1437,18 @@ const Bo = {
|
|
|
1437
1437
|
quarter: { label: "кв.", title: n("filter.quarter") },
|
|
1438
1438
|
year: { label: "рік", title: n("filter.year") }
|
|
1439
1439
|
};
|
|
1440
|
-
function m(
|
|
1440
|
+
function m(U) {
|
|
1441
1441
|
var E;
|
|
1442
|
-
return ((E = p[
|
|
1442
|
+
return ((E = p[U]) == null ? void 0 : E.label) ?? n(`filter.${U}`);
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function F(U) {
|
|
1445
1445
|
var E;
|
|
1446
|
-
return ((E = p[
|
|
1446
|
+
return ((E = p[U]) == null ? void 0 : E.title) ?? n(`filter.${U}`);
|
|
1447
1447
|
}
|
|
1448
1448
|
return r({
|
|
1449
1449
|
clear: M,
|
|
1450
1450
|
popoverRef: b
|
|
1451
|
-
}), (
|
|
1451
|
+
}), (U, E) => {
|
|
1452
1452
|
var k;
|
|
1453
1453
|
return u(), c(Y, null, [
|
|
1454
1454
|
e.layout === "inline" ? (u(), c("div", Bo, [
|
|
@@ -1474,15 +1474,15 @@ const Bo = {
|
|
|
1474
1474
|
}, null, 8, Lo), [
|
|
1475
1475
|
[Ze, l(g)[1]]
|
|
1476
1476
|
])
|
|
1477
|
-
])) :
|
|
1478
|
-
])) :
|
|
1477
|
+
])) : z("", !0)
|
|
1478
|
+
])) : z("", !0),
|
|
1479
1479
|
t("div", {
|
|
1480
1480
|
class: H(e.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
|
|
1481
1481
|
}, [
|
|
1482
1482
|
t("div", {
|
|
1483
1483
|
class: H(e.layout !== "popover" ? "w-[48%]" : "")
|
|
1484
1484
|
}, [
|
|
1485
|
-
e.layout === "popover" ? (u(), c("label", jo,
|
|
1485
|
+
e.layout === "popover" ? (u(), c("label", jo, R(l(n)("filter.from")), 1)) : z("", !0),
|
|
1486
1486
|
se(t("input", {
|
|
1487
1487
|
type: "date",
|
|
1488
1488
|
max: l(g)[1],
|
|
@@ -1490,15 +1490,15 @@ const Bo = {
|
|
|
1490
1490
|
"onUpdate:modelValue": E[2] || (E[2] = (C) => l(g)[0] = C),
|
|
1491
1491
|
class: H(l(o)),
|
|
1492
1492
|
disabled: e.disabled
|
|
1493
|
-
}, null, 10,
|
|
1493
|
+
}, null, 10, zo), [
|
|
1494
1494
|
[Ze, l(g)[0]]
|
|
1495
1495
|
])
|
|
1496
1496
|
], 2),
|
|
1497
|
-
e.layout !== "popover" ? (u(), c("label",
|
|
1497
|
+
e.layout !== "popover" ? (u(), c("label", Fo, " - ")) : z("", !0),
|
|
1498
1498
|
t("div", {
|
|
1499
1499
|
class: H(e.layout !== "popover" ? "w-[48%]" : "")
|
|
1500
1500
|
}, [
|
|
1501
|
-
e.layout === "popover" ? (u(), c("label", Eo,
|
|
1501
|
+
e.layout === "popover" ? (u(), c("label", Eo, R(l(n)("filter.to")), 1)) : z("", !0),
|
|
1502
1502
|
se(t("input", {
|
|
1503
1503
|
type: "date",
|
|
1504
1504
|
min: l(g)[0],
|
|
@@ -1515,9 +1515,9 @@ const Bo = {
|
|
|
1515
1515
|
(u(), c(Y, null, ie(V, (C) => t("button", {
|
|
1516
1516
|
key: C,
|
|
1517
1517
|
class: H(l(w) + (l(h) === C ? " bg-blue-100" : "")),
|
|
1518
|
-
title:
|
|
1518
|
+
title: F(C),
|
|
1519
1519
|
onClick: (j) => l(x)(C)
|
|
1520
|
-
},
|
|
1520
|
+
}, R(m(C)), 11, Ro)), 64)),
|
|
1521
1521
|
t("button", {
|
|
1522
1522
|
class: H(l(w)),
|
|
1523
1523
|
onClick: E[4] || (E[4] = //@ts-ignore
|
|
@@ -1537,13 +1537,13 @@ const Bo = {
|
|
|
1537
1537
|
class: H(l(d) + "hover:bg-gray-100"),
|
|
1538
1538
|
onClick: E[6] || (E[6] = //@ts-ignore
|
|
1539
1539
|
(...C) => l(M) && l(M)(...C))
|
|
1540
|
-
},
|
|
1540
|
+
}, R(l(n)("filter.clear")), 11, Io)) : z("", !0)
|
|
1541
1541
|
])
|
|
1542
1542
|
], 64);
|
|
1543
1543
|
};
|
|
1544
1544
|
}
|
|
1545
1545
|
});
|
|
1546
|
-
function
|
|
1546
|
+
function To(e, r) {
|
|
1547
1547
|
const {
|
|
1548
1548
|
api: a,
|
|
1549
1549
|
options: i = [],
|
|
@@ -1554,16 +1554,16 @@ function Ko(e, r) {
|
|
|
1554
1554
|
function b(P) {
|
|
1555
1555
|
return f ? Array.isArray(P) ? P : P ? [P] : [] : Array.isArray(P) ? P[0] : P;
|
|
1556
1556
|
}
|
|
1557
|
-
const h = L(b(e.modelValue)), g = L(""), x = L(!1), S = L(i), v = L("id"), M = L("text"), V = L(!1), p = L(e.layout !== "popover" && i.length > o), m = L([]),
|
|
1558
|
-
function
|
|
1557
|
+
const h = L(b(e.modelValue)), g = L(""), x = L(!1), S = L(i), v = L("id"), M = L("text"), V = L(!1), p = L(e.layout !== "popover" && i.length > o), m = L([]), F = L(0);
|
|
1558
|
+
function U(P) {
|
|
1559
1559
|
const q = P.find(Boolean) ?? {}, le = ["id", "value", "code", "key"].find((we) => we in q) ?? "id", ee = ["text", "label", "name", "title"].find((we) => we in q) ?? "text";
|
|
1560
1560
|
return { autoValueKey: le, autoLabelKey: ee };
|
|
1561
1561
|
}
|
|
1562
1562
|
if (i.length > 0) {
|
|
1563
|
-
const P =
|
|
1563
|
+
const P = U(i);
|
|
1564
1564
|
v.value = P.autoValueKey, M.value = P.autoLabelKey;
|
|
1565
1565
|
}
|
|
1566
|
-
const E =
|
|
1566
|
+
const E = K(() => {
|
|
1567
1567
|
if (a) return S.value;
|
|
1568
1568
|
const P = S.value;
|
|
1569
1569
|
if (e.layout === "popover") return P;
|
|
@@ -1590,10 +1590,10 @@ function Ko(e, r) {
|
|
|
1590
1590
|
return;
|
|
1591
1591
|
}
|
|
1592
1592
|
if (S.value = ee[n], S.value.length > 0) {
|
|
1593
|
-
const we =
|
|
1593
|
+
const we = U(S.value);
|
|
1594
1594
|
v.value = we.autoValueKey, M.value = we.autoLabelKey;
|
|
1595
1595
|
}
|
|
1596
|
-
|
|
1596
|
+
F.value = ee.total;
|
|
1597
1597
|
} catch (q) {
|
|
1598
1598
|
console.error("Failed to fetch remote options:", q);
|
|
1599
1599
|
} finally {
|
|
@@ -1630,21 +1630,21 @@ function Ko(e, r) {
|
|
|
1630
1630
|
function y() {
|
|
1631
1631
|
V.value = !V.value;
|
|
1632
1632
|
}
|
|
1633
|
-
|
|
1633
|
+
Ue(() => {
|
|
1634
1634
|
k && clearTimeout(k);
|
|
1635
1635
|
});
|
|
1636
|
-
const
|
|
1636
|
+
const O = L(-1);
|
|
1637
1637
|
N(E, () => {
|
|
1638
|
-
|
|
1638
|
+
O.value = E.value.length > 0 ? 0 : -1;
|
|
1639
1639
|
});
|
|
1640
1640
|
function Z(P) {
|
|
1641
1641
|
const q = E.value.length;
|
|
1642
1642
|
if (P.key === "ArrowDown")
|
|
1643
|
-
P.preventDefault(),
|
|
1643
|
+
P.preventDefault(), O.value = (O.value + 1) % q;
|
|
1644
1644
|
else if (P.key === "ArrowUp")
|
|
1645
|
-
P.preventDefault(),
|
|
1646
|
-
else if (P.key === "Enter" && (P.preventDefault(),
|
|
1647
|
-
const le = E.value[
|
|
1645
|
+
P.preventDefault(), O.value = (O.value - 1 + q) % q;
|
|
1646
|
+
else if (P.key === "Enter" && (P.preventDefault(), O.value >= 0 && O.value < E.value.length)) {
|
|
1647
|
+
const le = E.value[O.value];
|
|
1648
1648
|
A(le);
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
@@ -1666,14 +1666,14 @@ function Ko(e, r) {
|
|
|
1666
1666
|
labelKey: M,
|
|
1667
1667
|
valueKey: v,
|
|
1668
1668
|
allOptions: S,
|
|
1669
|
-
highlightedIndex:
|
|
1669
|
+
highlightedIndex: O,
|
|
1670
1670
|
onKeyDown: Z,
|
|
1671
1671
|
selectedLabels: m,
|
|
1672
|
-
totalCount:
|
|
1672
|
+
totalCount: F,
|
|
1673
1673
|
loadData: G
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
const
|
|
1676
|
+
const Ko = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, Ho = ["placeholder"], No = {
|
|
1677
1677
|
key: 0,
|
|
1678
1678
|
class: "w-full"
|
|
1679
1679
|
}, Wo = { class: "flex flex-col items-center justify-center p-5 text-center" }, qo = { class: "max-w-sm mx-auto mt-6" }, Yo = { class: "font-medium text-gray-800 dark:text-neutral-200" }, Go = {
|
|
@@ -1712,7 +1712,7 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1712
1712
|
},
|
|
1713
1713
|
emits: ["update:modelValue", "change", "clear"],
|
|
1714
1714
|
setup(e, { expose: r, emit: a }) {
|
|
1715
|
-
const i =
|
|
1715
|
+
const i = Me(), o = Te(), d = e, w = a, n = L(null), {
|
|
1716
1716
|
innerValue: f,
|
|
1717
1717
|
filteredOptions: b,
|
|
1718
1718
|
isSelected: h,
|
|
@@ -1724,29 +1724,29 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1724
1724
|
showAll: V,
|
|
1725
1725
|
isEnableShowAll: p,
|
|
1726
1726
|
searchTerm: m,
|
|
1727
|
-
labelKey:
|
|
1728
|
-
valueKey:
|
|
1727
|
+
labelKey: F,
|
|
1728
|
+
valueKey: U,
|
|
1729
1729
|
highlightedIndex: E,
|
|
1730
1730
|
onKeyDown: k,
|
|
1731
1731
|
selectedLabels: C,
|
|
1732
1732
|
totalCount: j,
|
|
1733
1733
|
loadData: A
|
|
1734
|
-
} =
|
|
1734
|
+
} = To({
|
|
1735
1735
|
...d,
|
|
1736
1736
|
modelValue: d.modelValue
|
|
1737
|
-
}, w), s =
|
|
1737
|
+
}, w), s = K(() => d.multi ? Array.isArray(f.value) && f.value.length > 0 : f.value != null && f.value !== ""), _ = K(() => d.multi && Array.isArray(f.value) ? f.value.length : f.value != null && f.value !== "" ? 1 : 0);
|
|
1738
1738
|
De(() => {
|
|
1739
1739
|
S(), d.layout !== "inline" && (A(), n.value && d.layout === "popover" && n.value.focus());
|
|
1740
1740
|
}), N(
|
|
1741
1741
|
() => d.modelValue,
|
|
1742
|
-
(
|
|
1743
|
-
|
|
1742
|
+
(O) => {
|
|
1743
|
+
O === void 0 && (d.multi ? f.value = [] : f.value = void 0);
|
|
1744
1744
|
}
|
|
1745
1745
|
);
|
|
1746
1746
|
const y = L([]);
|
|
1747
|
-
return N(E, (
|
|
1747
|
+
return N(E, (O) => {
|
|
1748
1748
|
var Z;
|
|
1749
|
-
|
|
1749
|
+
O >= 0 && y.value[O] && ((Z = y.value[O]) == null || Z.scrollIntoView({
|
|
1750
1750
|
block: "nearest",
|
|
1751
1751
|
behavior: "smooth"
|
|
1752
1752
|
}));
|
|
@@ -1757,12 +1757,12 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1757
1757
|
inputTextRef: n,
|
|
1758
1758
|
selectedLabels: C,
|
|
1759
1759
|
loadData: A
|
|
1760
|
-
}), (
|
|
1760
|
+
}), (O, Z) => {
|
|
1761
1761
|
var G;
|
|
1762
1762
|
return u(), c("div", {
|
|
1763
1763
|
class: H([e.layout === "popover" ? "flex flex-col max-h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
|
|
1764
1764
|
}, [
|
|
1765
|
-
t("div",
|
|
1765
|
+
t("div", Ko, [
|
|
1766
1766
|
se(t("input", {
|
|
1767
1767
|
"onUpdate:modelValue": Z[0] || (Z[0] = (P) => al(m) ? m.value = P : null),
|
|
1768
1768
|
onKeydown: Z[1] || (Z[1] = //@ts-ignore
|
|
@@ -1775,12 +1775,12 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1775
1775
|
}, null, 40, Ho), [
|
|
1776
1776
|
[Ze, l(m)]
|
|
1777
1777
|
]),
|
|
1778
|
-
|
|
1778
|
+
J(Ht, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
|
|
1779
1779
|
l(m) != "" ? (u(), Q(ht, {
|
|
1780
1780
|
key: 0,
|
|
1781
1781
|
onClick: Z[2] || (Z[2] = (P) => m.value = ""),
|
|
1782
1782
|
class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
|
|
1783
|
-
})) :
|
|
1783
|
+
})) : z("", !0)
|
|
1784
1784
|
]),
|
|
1785
1785
|
t("div", {
|
|
1786
1786
|
class: H([
|
|
@@ -1791,10 +1791,10 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1791
1791
|
(u(!0), c(Y, null, ie(l(b), (P, q) => (u(), Q(pt, {
|
|
1792
1792
|
layout: e.layout,
|
|
1793
1793
|
count: P.count,
|
|
1794
|
-
label: P[l(
|
|
1794
|
+
label: P[l(F)],
|
|
1795
1795
|
color: P.color,
|
|
1796
1796
|
type: e.multi ? "checkbox" : "radio",
|
|
1797
|
-
value: P[l(
|
|
1797
|
+
value: P[l(U)],
|
|
1798
1798
|
"is-selected": l(h)(P),
|
|
1799
1799
|
highlighted: q === l(E),
|
|
1800
1800
|
onItemClick: (le) => l(g)(P),
|
|
@@ -1804,13 +1804,13 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1804
1804
|
], 2),
|
|
1805
1805
|
e.type === "select" && l(b).length === 0 && !l(M) ? (u(), c("div", No, [
|
|
1806
1806
|
t("div", Wo, [
|
|
1807
|
-
|
|
1807
|
+
J(vt),
|
|
1808
1808
|
t("div", qo, [
|
|
1809
|
-
t("p", Yo,
|
|
1809
|
+
t("p", Yo, R(l(i)("filter.notfound")), 1),
|
|
1810
1810
|
Z[7] || (Z[7] = t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
|
|
1811
1811
|
])
|
|
1812
1812
|
])
|
|
1813
|
-
])) :
|
|
1813
|
+
])) : z("", !0),
|
|
1814
1814
|
e.layout !== "popover" && e.type !== "select" ? (u(), c(Y, { key: 1 }, [
|
|
1815
1815
|
!l(V) && l(p) ? (u(), c("div", {
|
|
1816
1816
|
key: 0,
|
|
@@ -1818,30 +1818,30 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1818
1818
|
(...P) => l(v) && l(v)(...P)),
|
|
1819
1819
|
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"
|
|
1820
1820
|
}, [
|
|
1821
|
-
de(
|
|
1822
|
-
|
|
1823
|
-
])) :
|
|
1821
|
+
de(R(l(i)("filter.more")) + " ", 1),
|
|
1822
|
+
J(rt)
|
|
1823
|
+
])) : z("", !0),
|
|
1824
1824
|
l(V) ? (u(), c("div", {
|
|
1825
1825
|
key: 1,
|
|
1826
1826
|
onClick: Z[4] || (Z[4] = //@ts-ignore
|
|
1827
1827
|
(...P) => l(v) && l(v)(...P)),
|
|
1828
1828
|
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"
|
|
1829
1829
|
}, [
|
|
1830
|
-
de(
|
|
1831
|
-
|
|
1832
|
-
])) :
|
|
1833
|
-
], 64)) :
|
|
1830
|
+
de(R(l(i)("filter.less")) + " ", 1),
|
|
1831
|
+
J(mt)
|
|
1832
|
+
])) : z("", !0)
|
|
1833
|
+
], 64)) : z("", !0),
|
|
1834
1834
|
e.cleanable ? (u(), c(Y, { key: 2 }, [
|
|
1835
1835
|
e.layout === "inline" ? (u(), c("div", Go, [
|
|
1836
|
-
de(
|
|
1836
|
+
de(R(e.multi && Array.isArray(l(f)) ? (G = l(f)) == null ? void 0 : G.length : l(f) !== void 0 && (l(f) || l(f) === null) ? 1 : 0) + " / " + R(l(j)) + " " + R(l(i)("filter.selected")) + " ", 1),
|
|
1837
1837
|
se(t("button", {
|
|
1838
1838
|
class: "text-gray-600 hover:text-gray-800",
|
|
1839
1839
|
onClick: Z[5] || (Z[5] = //@ts-ignore
|
|
1840
1840
|
(...P) => l(x) && l(x)(...P))
|
|
1841
|
-
},
|
|
1841
|
+
}, R(l(i)("filter.clear")), 513), [
|
|
1842
1842
|
[xe, s.value]
|
|
1843
1843
|
])
|
|
1844
|
-
])) :
|
|
1844
|
+
])) : z("", !0),
|
|
1845
1845
|
e.layout === "popover" ? (u(), c("div", Qo, [
|
|
1846
1846
|
t("button", {
|
|
1847
1847
|
type: "button",
|
|
@@ -1850,11 +1850,11 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1850
1850
|
onClick: Z[6] || (Z[6] = //@ts-ignore
|
|
1851
1851
|
(...P) => l(x) && l(x)(...P))
|
|
1852
1852
|
}, [
|
|
1853
|
-
de(
|
|
1854
|
-
t("span", Jo,
|
|
1853
|
+
de(R(l(i)("filter.clear")) + " ", 1),
|
|
1854
|
+
t("span", Jo, R(_.value) + " з " + R(l(j)), 1)
|
|
1855
1855
|
], 10, Xo)
|
|
1856
|
-
])) :
|
|
1857
|
-
], 64)) :
|
|
1856
|
+
])) : z("", !0)
|
|
1857
|
+
], 64)) : z("", !0)
|
|
1858
1858
|
], 2);
|
|
1859
1859
|
};
|
|
1860
1860
|
}
|
|
@@ -1894,7 +1894,7 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1894
1894
|
},
|
|
1895
1895
|
emits: ["update:modelValue", "change", "clear"],
|
|
1896
1896
|
setup(e, { expose: r, emit: a }) {
|
|
1897
|
-
const i = e, o = a, d =
|
|
1897
|
+
const i = e, o = a, d = Te(), w = Me(), {
|
|
1898
1898
|
innerValue: n,
|
|
1899
1899
|
isSelected: f,
|
|
1900
1900
|
selectItem: b,
|
|
@@ -1902,13 +1902,13 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1902
1902
|
labelKey: g,
|
|
1903
1903
|
valueKey: x,
|
|
1904
1904
|
allOptions: S
|
|
1905
|
-
} = i.multi ?
|
|
1905
|
+
} = i.multi ? Kt({
|
|
1906
1906
|
...i,
|
|
1907
1907
|
modelValue: i.modelValue ?? i.default ?? []
|
|
1908
1908
|
}, o) : ft({
|
|
1909
1909
|
...i,
|
|
1910
1910
|
modelValue: i.modelValue !== void 0 ? i.modelValue : i.default ?? ""
|
|
1911
|
-
}, o), v =
|
|
1911
|
+
}, o), v = K(() => i.multi ? Array.isArray(n.value) && n.value.length > 0 : n.value != null && n.value !== ""), M = K(() => i.multi && Array.isArray(n.value) ? n.value.length : n.value != null && n.value !== "" ? 1 : 0);
|
|
1912
1912
|
return r({
|
|
1913
1913
|
clear: h
|
|
1914
1914
|
}), N(
|
|
@@ -1922,46 +1922,46 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1922
1922
|
t("div", {
|
|
1923
1923
|
class: H(["grid grid-cols-3 gap-2 mx-[1px]", e.layout === "popover" ? "p-2 max-h-[calc(100%-55px)] overflow-y-auto" : "mb-1"])
|
|
1924
1924
|
}, [
|
|
1925
|
-
(u(!0), c(Y, null, ie(l(S), (
|
|
1926
|
-
key: `item-${
|
|
1927
|
-
for: `item-${
|
|
1928
|
-
onClick: Ae((
|
|
1929
|
-
class: H([l(f)(
|
|
1925
|
+
(u(!0), c(Y, null, ie(l(S), (F) => (u(), c("label", {
|
|
1926
|
+
key: `item-${F[l(x)]}`,
|
|
1927
|
+
for: `item-${F[l(x)]}`,
|
|
1928
|
+
onClick: Ae((U) => l(b)(F), ["stop", "prevent"]),
|
|
1929
|
+
class: H([l(f)(F) ? "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-sm 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%)]"])
|
|
1930
1930
|
}, [
|
|
1931
1931
|
t("input", {
|
|
1932
1932
|
type: "checkbox",
|
|
1933
|
-
id: `item-${
|
|
1933
|
+
id: `item-${F[l(x)]}`,
|
|
1934
1934
|
class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
|
|
1935
|
-
name: `item-${
|
|
1936
|
-
value:
|
|
1935
|
+
name: `item-${F[l(x)]}`,
|
|
1936
|
+
value: F[l(x)]
|
|
1937
1937
|
}, null, 8, la),
|
|
1938
|
-
t("span", oa,
|
|
1938
|
+
t("span", oa, R(F[l(g)]), 1)
|
|
1939
1939
|
], 10, ta))), 128))
|
|
1940
1940
|
], 2),
|
|
1941
1941
|
e.cleanable ? (u(), c(Y, { key: 0 }, [
|
|
1942
1942
|
e.layout === "inline" ? (u(), c("div", aa, [
|
|
1943
|
-
de(
|
|
1943
|
+
de(R(e.multi && Array.isArray(l(n)) ? (m = l(n)) == null ? void 0 : m.length : l(n) !== void 0 && (l(n) || l(n) === null) ? 1 : 0) + " з " + R(l(S).length) + " обрано ", 1),
|
|
1944
1944
|
se(t("button", {
|
|
1945
1945
|
class: "text-gray-600 hover:text-gray-800",
|
|
1946
1946
|
onClick: p[0] || (p[0] = //@ts-ignore
|
|
1947
|
-
(...
|
|
1947
|
+
(...F) => l(h) && l(h)(...F))
|
|
1948
1948
|
}, " Очистити ", 512), [
|
|
1949
1949
|
[xe, v.value]
|
|
1950
1950
|
])
|
|
1951
|
-
])) :
|
|
1951
|
+
])) : z("", !0),
|
|
1952
1952
|
e.layout === "popover" ? (u(), c("div", na, [
|
|
1953
1953
|
t("button", {
|
|
1954
1954
|
type: "button",
|
|
1955
1955
|
disabled: !v.value,
|
|
1956
1956
|
class: H(l(d) + " hover:bg-gray-100"),
|
|
1957
1957
|
onClick: p[1] || (p[1] = //@ts-ignore
|
|
1958
|
-
(...
|
|
1958
|
+
(...F) => l(h) && l(h)(...F))
|
|
1959
1959
|
}, [
|
|
1960
|
-
de(
|
|
1961
|
-
t("span", ia,
|
|
1960
|
+
de(R(l(w)("filter.clear")) + " ", 1),
|
|
1961
|
+
t("span", ia, R(M.value) + " з " + R(l(S).length), 1)
|
|
1962
1962
|
], 10, ra)
|
|
1963
|
-
])) :
|
|
1964
|
-
], 64)) :
|
|
1963
|
+
])) : z("", !0)
|
|
1964
|
+
], 64)) : z("", !0)
|
|
1965
1965
|
], 64);
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
@@ -1986,16 +1986,16 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
1986
1986
|
layout: {}
|
|
1987
1987
|
},
|
|
1988
1988
|
setup(e, { expose: r }) {
|
|
1989
|
-
const a = e, i =
|
|
1989
|
+
const a = e, i = K(() => Tt(a.mode)), o = L(!1), d = L({ top: 0, left: 0 }), w = L(null), n = L(null), f = L(null);
|
|
1990
1990
|
let b = null;
|
|
1991
1991
|
function h() {
|
|
1992
1992
|
const k = n.value, C = f.value;
|
|
1993
1993
|
if (!k || !C) return;
|
|
1994
|
-
const j = k.getBoundingClientRect(), A = C.offsetWidth, s = C.offsetHeight, _ = window.innerWidth, y = window.innerHeight,
|
|
1995
|
-
let Z = j.bottom +
|
|
1994
|
+
const j = k.getBoundingClientRect(), A = C.offsetWidth, s = C.offsetHeight, _ = window.innerWidth, y = window.innerHeight, O = 8;
|
|
1995
|
+
let Z = j.bottom + O, { left: G } = j;
|
|
1996
1996
|
const P = Math.max(_ - A - 10, 10);
|
|
1997
1997
|
if (G = Math.min(G, P), G = Math.max(G, 10), Z + s > y - 10) {
|
|
1998
|
-
const q = j.top - s -
|
|
1998
|
+
const q = j.top - s - O;
|
|
1999
1999
|
Z = q >= 10 ? q : Math.max(y - s - 10, 10);
|
|
2000
2000
|
}
|
|
2001
2001
|
Z < 10 && (Z = 10), d.value = { top: Z, left: G };
|
|
@@ -2027,7 +2027,7 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
2027
2027
|
M.value = !0, V.value = localStorage.locale, window.addEventListener("storage", p), document.addEventListener("click", S, !0), document.addEventListener("keydown", v), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h, !0), typeof ResizeObserver < "u" && (b = new ResizeObserver(() => {
|
|
2028
2028
|
o.value && g();
|
|
2029
2029
|
}));
|
|
2030
|
-
}),
|
|
2030
|
+
}), Ue(() => {
|
|
2031
2031
|
window.removeEventListener("storage", p), document.removeEventListener("click", S, !0), document.removeEventListener("keydown", v), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h, !0), b == null || b.disconnect(), b = null;
|
|
2032
2032
|
});
|
|
2033
2033
|
function m() {
|
|
@@ -2036,14 +2036,14 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
2036
2036
|
r({ close: m }), N([M, o, f], ([k, C, j]) => {
|
|
2037
2037
|
k && C && j && (g(), b == null || b.observe(j));
|
|
2038
2038
|
});
|
|
2039
|
-
function
|
|
2039
|
+
function F(k) {
|
|
2040
2040
|
return Array.isArray(k) ? k.filter((C) => C != null && C !== "").length : k && typeof k == "object" ? Object.values(k).filter((C) => C != null && C !== "").length : typeof k == "string" ? k.trim() === "" ? 0 : 1 : typeof k == "number" ? Number.isNaN(k) ? 0 : 1 : k === null || k !== void 0 ? 1 : 0;
|
|
2041
2041
|
}
|
|
2042
|
-
const
|
|
2042
|
+
const U = K(() => {
|
|
2043
2043
|
var j;
|
|
2044
|
-
const k = (j = a.fieldRef) == null ? void 0 : j.selectedLabels, C =
|
|
2045
|
-
return C > 0 ? C :
|
|
2046
|
-
}), E =
|
|
2044
|
+
const k = (j = a.fieldRef) == null ? void 0 : j.selectedLabels, C = F(k);
|
|
2045
|
+
return C > 0 ? C : F(a.currentValue);
|
|
2046
|
+
}), E = K(() => {
|
|
2047
2047
|
var C;
|
|
2048
2048
|
const k = (C = a.fieldRef) == null ? void 0 : C.selectedLabels;
|
|
2049
2049
|
return !k || ["inline"].includes(a.layout || "") ? a[V.value] || (a.label ?? "") : Array.isArray(k) ? k.length > 0 ? k.join(", ") : a.label ?? "" : String(k);
|
|
@@ -2061,15 +2061,15 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
2061
2061
|
class: H([
|
|
2062
2062
|
i.value,
|
|
2063
2063
|
e.width ? l(Nt).getWidthClass(e.width) : "w-full",
|
|
2064
|
-
e.layout === "inline" &&
|
|
2064
|
+
e.layout === "inline" && U.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
|
|
2065
2065
|
]),
|
|
2066
2066
|
type: "button"
|
|
2067
2067
|
}, [
|
|
2068
2068
|
t("span", da, [
|
|
2069
|
-
t("span", ca,
|
|
2070
|
-
e.layout === "inline" &&
|
|
2069
|
+
t("span", ca, R(E.value), 1),
|
|
2070
|
+
e.layout === "inline" && U.value > 0 ? (u(), c("span", pa, R(U.value), 1)) : z("", !0)
|
|
2071
2071
|
]),
|
|
2072
|
-
|
|
2072
|
+
J(rt, { class: "h-4 w-4 text-neutral-500" })
|
|
2073
2073
|
], 10, ua),
|
|
2074
2074
|
M.value ? (u(), Q(at, {
|
|
2075
2075
|
key: 0,
|
|
@@ -2079,18 +2079,18 @@ const Uo = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
|
|
|
2079
2079
|
ref_key: "popperRef",
|
|
2080
2080
|
ref: f,
|
|
2081
2081
|
class: "vsTailwind vs-popover__content w-fit fixed z-[1000]",
|
|
2082
|
-
style:
|
|
2082
|
+
style: Fe({ top: `${d.value.top}px`, left: `${d.value.left}px` }),
|
|
2083
2083
|
"data-inside-popover": ""
|
|
2084
2084
|
}, [
|
|
2085
2085
|
t("div", fa, [
|
|
2086
2086
|
t("div", va, [
|
|
2087
|
-
|
|
2087
|
+
pe(k.$slots, "default")
|
|
2088
2088
|
])
|
|
2089
2089
|
])
|
|
2090
2090
|
], 4), [
|
|
2091
2091
|
[xe, o.value]
|
|
2092
2092
|
])
|
|
2093
|
-
])) :
|
|
2093
|
+
])) : z("", !0)
|
|
2094
2094
|
], 512));
|
|
2095
2095
|
}
|
|
2096
2096
|
}), ma = {}, ha = {
|
|
@@ -2170,7 +2170,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2170
2170
|
},
|
|
2171
2171
|
emits: ["update:modelValue", "change", "clear"],
|
|
2172
2172
|
setup(e, { expose: r, emit: a }) {
|
|
2173
|
-
const i =
|
|
2173
|
+
const i = Me(), o = e, d = a, w = L(null), {
|
|
2174
2174
|
activeMode: n,
|
|
2175
2175
|
innerValue: f,
|
|
2176
2176
|
onSelectChange: b,
|
|
@@ -2204,7 +2204,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2204
2204
|
popoverRef: w
|
|
2205
2205
|
}), (V, p) => (u(), c(Y, null, [
|
|
2206
2206
|
t("div", Ca, [
|
|
2207
|
-
|
|
2207
|
+
J(gt, {
|
|
2208
2208
|
ref_key: "popoverRef",
|
|
2209
2209
|
ref: w,
|
|
2210
2210
|
label: l(x),
|
|
@@ -2222,8 +2222,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2222
2222
|
onClick: p[0] || (p[0] = (m) => l(b)("range")),
|
|
2223
2223
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2224
2224
|
}, [
|
|
2225
|
-
de(
|
|
2226
|
-
l(n) === "range" ? (u(), Q(Re, { key: 0 })) :
|
|
2225
|
+
de(R(l(i)("filter.period")) + " ", 1),
|
|
2226
|
+
l(n) === "range" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2227
2227
|
])
|
|
2228
2228
|
]),
|
|
2229
2229
|
p[12] || (p[12] = t("div", null, [
|
|
@@ -2235,8 +2235,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2235
2235
|
onClick: p[1] || (p[1] = (m) => l(b)("today")),
|
|
2236
2236
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2237
2237
|
}, [
|
|
2238
|
-
de(
|
|
2239
|
-
l(n) === "today" ? (u(), Q(Re, { key: 0 })) :
|
|
2238
|
+
de(R(l(i)("filter.today")) + " ", 1),
|
|
2239
|
+
l(n) === "today" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2240
2240
|
])
|
|
2241
2241
|
]),
|
|
2242
2242
|
t("div", null, [
|
|
@@ -2245,8 +2245,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2245
2245
|
onClick: p[2] || (p[2] = (m) => l(b)("week")),
|
|
2246
2246
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2247
2247
|
}, [
|
|
2248
|
-
de(
|
|
2249
|
-
l(n) === "week" ? (u(), Q(Re, { key: 0 })) :
|
|
2248
|
+
de(R(l(i)("filter.week")) + " ", 1),
|
|
2249
|
+
l(n) === "week" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2250
2250
|
])
|
|
2251
2251
|
]),
|
|
2252
2252
|
t("div", null, [
|
|
@@ -2255,8 +2255,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2255
2255
|
onClick: p[3] || (p[3] = (m) => l(b)("month")),
|
|
2256
2256
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2257
2257
|
}, [
|
|
2258
|
-
de(
|
|
2259
|
-
l(n) === "month" ? (u(), Q(Re, { key: 0 })) :
|
|
2258
|
+
de(R(l(i)("filter.month")) + " ", 1),
|
|
2259
|
+
l(n) === "month" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2260
2260
|
])
|
|
2261
2261
|
]),
|
|
2262
2262
|
t("div", null, [
|
|
@@ -2265,8 +2265,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2265
2265
|
onClick: p[4] || (p[4] = (m) => l(b)("quarter")),
|
|
2266
2266
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2267
2267
|
}, [
|
|
2268
|
-
de(
|
|
2269
|
-
l(n) === "quarter" ? (u(), Q(Re, { key: 0 })) :
|
|
2268
|
+
de(R(l(i)("filter.quarter")) + " ", 1),
|
|
2269
|
+
l(n) === "quarter" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2270
2270
|
])
|
|
2271
2271
|
]),
|
|
2272
2272
|
t("div", _a, [
|
|
@@ -2275,8 +2275,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2275
2275
|
onClick: p[5] || (p[5] = (m) => l(b)("year")),
|
|
2276
2276
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2277
2277
|
}, [
|
|
2278
|
-
de(
|
|
2279
|
-
l(n) === "year" ? (u(), Q(Re, { key: 0 })) :
|
|
2278
|
+
de(R(l(i)("filter.year")) + " ", 1),
|
|
2279
|
+
l(n) === "year" ? (u(), Q(Re, { key: 0 })) : z("", !0)
|
|
2280
2280
|
])
|
|
2281
2281
|
]),
|
|
2282
2282
|
t("div", Ma, [
|
|
@@ -2285,8 +2285,8 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2285
2285
|
onClick: p[6] || (p[6] = (m) => l(S)()),
|
|
2286
2286
|
class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
|
|
2287
2287
|
}, [
|
|
2288
|
-
de(
|
|
2289
|
-
l(f)[0] ?
|
|
2288
|
+
de(R(l(i)("filter.alltime")) + " ", 1),
|
|
2289
|
+
l(f)[0] ? z("", !0) : (u(), Q(Re, { key: 0 }))
|
|
2290
2290
|
])
|
|
2291
2291
|
])
|
|
2292
2292
|
]),
|
|
@@ -2301,7 +2301,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2301
2301
|
onClick: p[7] || (p[7] = //@ts-ignore
|
|
2302
2302
|
(...m) => l(g) && l(g)(...m))
|
|
2303
2303
|
}, [
|
|
2304
|
-
|
|
2304
|
+
J(ya)
|
|
2305
2305
|
], 8, Va)
|
|
2306
2306
|
]),
|
|
2307
2307
|
t("div", $a, [
|
|
@@ -2312,10 +2312,10 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2312
2312
|
onClick: p[8] || (p[8] = //@ts-ignore
|
|
2313
2313
|
(...m) => l(h) && l(h)(...m))
|
|
2314
2314
|
}, [
|
|
2315
|
-
|
|
2315
|
+
J(ka)
|
|
2316
2316
|
], 8, Ba)
|
|
2317
2317
|
])
|
|
2318
|
-
], 64)) :
|
|
2318
|
+
], 64)) : z("", !0),
|
|
2319
2319
|
l(n) !== "" && l(n) === "range" ? (u(), c("div", Aa, [
|
|
2320
2320
|
t("input", {
|
|
2321
2321
|
type: "date",
|
|
@@ -2335,12 +2335,12 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2335
2335
|
class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
|
|
2336
2336
|
disabled: e.disabled
|
|
2337
2337
|
}, null, 40, La)
|
|
2338
|
-
])) :
|
|
2338
|
+
])) : z("", !0)
|
|
2339
2339
|
]),
|
|
2340
|
-
(e.cleanable,
|
|
2340
|
+
(e.cleanable, z("", !0))
|
|
2341
2341
|
], 64));
|
|
2342
2342
|
}
|
|
2343
|
-
}),
|
|
2343
|
+
}), za = ["disabled", "onClick"], Fa = {
|
|
2344
2344
|
key: 0,
|
|
2345
2345
|
class: "pt-2 px-2 border-t"
|
|
2346
2346
|
}, Ea = ["disabled"], Da = /* @__PURE__ */ te({
|
|
@@ -2373,7 +2373,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2373
2373
|
},
|
|
2374
2374
|
emits: ["update:modelValue", "change", "clear"],
|
|
2375
2375
|
setup(e, { expose: r, emit: a }) {
|
|
2376
|
-
const i = e, o = a, d =
|
|
2376
|
+
const i = e, o = a, d = Te(), w = Me(), {
|
|
2377
2377
|
innerValue: n,
|
|
2378
2378
|
isSelected: f,
|
|
2379
2379
|
selectItem: b,
|
|
@@ -2384,7 +2384,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2384
2384
|
} = ft({
|
|
2385
2385
|
...i,
|
|
2386
2386
|
modelValue: i.modelValue ?? i.default ?? ""
|
|
2387
|
-
}, o), v =
|
|
2387
|
+
}, o), v = K(() => n.value !== void 0 && !(typeof n.value == "string" && n.value === ""));
|
|
2388
2388
|
function M(p) {
|
|
2389
2389
|
return f(p) ? ["bg-blue-600 text-white"].filter((m) => typeof m == "string" && m.trim().length > 0).join(" ") : ["text-gray-700 hover:bg-gray-200 bg-gray-50 "].filter((m) => typeof m == "string" && m.trim().length > 0).join(" ");
|
|
2390
2390
|
}
|
|
@@ -2402,23 +2402,23 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2402
2402
|
t("div", {
|
|
2403
2403
|
class: H(["flex flex-wrap items-center gap-2", e.layout === "popover" ? "p-2 max-h-[calc(100%-55px)] overflow-y-auto" : ""])
|
|
2404
2404
|
}, [
|
|
2405
|
-
(u(!0), c(Y, null, ie(l(S), (
|
|
2406
|
-
key:
|
|
2405
|
+
(u(!0), c(Y, null, ie(l(S), (F) => (u(), c("button", {
|
|
2406
|
+
key: F[l(x)],
|
|
2407
2407
|
type: "button",
|
|
2408
|
-
class: H(["px-3 py-2 text-sm font-medium rounded-md transition-colors", M(
|
|
2408
|
+
class: H(["px-3 py-2 text-sm font-medium rounded-md transition-colors", M(F)]),
|
|
2409
2409
|
disabled: e.disabled,
|
|
2410
|
-
onClick: (
|
|
2411
|
-
},
|
|
2410
|
+
onClick: (U) => V(F)
|
|
2411
|
+
}, R(F[l(g)]), 11, za))), 128))
|
|
2412
2412
|
], 2),
|
|
2413
|
-
e.cleanable && e.layout === "popover" ? (u(), c("div",
|
|
2413
|
+
e.cleanable && e.layout === "popover" ? (u(), c("div", Fa, [
|
|
2414
2414
|
t("button", {
|
|
2415
2415
|
type: "button",
|
|
2416
2416
|
disabled: !v.value,
|
|
2417
2417
|
class: H(l(d) + " hover:bg-gray-100"),
|
|
2418
2418
|
onClick: m[0] || (m[0] = //@ts-ignore
|
|
2419
|
-
(...
|
|
2420
|
-
},
|
|
2421
|
-
])) :
|
|
2419
|
+
(...F) => l(h) && l(h)(...F))
|
|
2420
|
+
}, R(l(w)("filter.clear")), 11, Ea)
|
|
2421
|
+
])) : z("", !0)
|
|
2422
2422
|
], 64));
|
|
2423
2423
|
}
|
|
2424
2424
|
}), Pt = {
|
|
@@ -2427,7 +2427,7 @@ const ka = /* @__PURE__ */ Le(ba, [["render", wa]]), Ca = { class: "flex gap-1"
|
|
|
2427
2427
|
check: At,
|
|
2428
2428
|
text: wo,
|
|
2429
2429
|
range: $o,
|
|
2430
|
-
date:
|
|
2430
|
+
date: Uo,
|
|
2431
2431
|
select: ea,
|
|
2432
2432
|
tag: sa,
|
|
2433
2433
|
button: Da,
|
|
@@ -2450,7 +2450,7 @@ function yt(e, r) {
|
|
|
2450
2450
|
type: a
|
|
2451
2451
|
};
|
|
2452
2452
|
}
|
|
2453
|
-
const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Ra = { class: "relative w-full mb-2 p-4 bg-white rounded-md shadow-sm" }, Za = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Ia = { class: "flex items-center" },
|
|
2453
|
+
const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Ra = { class: "relative w-full mb-2 p-4 bg-white rounded-md shadow-sm" }, Za = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Ia = { class: "flex items-center" }, Ua = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, Ta = { class: "filter-layout__body" }, Ka = /* @__PURE__ */ te({
|
|
2454
2454
|
__name: "vertical-layout",
|
|
2455
2455
|
props: {
|
|
2456
2456
|
id: {},
|
|
@@ -2480,7 +2480,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2480
2480
|
},
|
|
2481
2481
|
emits: ["update:modelValue", "change", "clear"],
|
|
2482
2482
|
setup(e, { expose: r, emit: a }) {
|
|
2483
|
-
const i = e, o = a, d = L(), w =
|
|
2483
|
+
const i = e, o = a, d = L(), w = K(() => yt(i.type, i.layout)), n = K({
|
|
2484
2484
|
get: () => i.modelValue,
|
|
2485
2485
|
set: (g) => o("update:modelValue", g)
|
|
2486
2486
|
});
|
|
@@ -2512,14 +2512,14 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2512
2512
|
t("div", Ra, [
|
|
2513
2513
|
t("div", Za, [
|
|
2514
2514
|
t("div", Ia, [
|
|
2515
|
-
t("span",
|
|
2515
|
+
t("span", Ua, R(e.label), 1)
|
|
2516
2516
|
]),
|
|
2517
2517
|
typeof n.value == "string" && n.value.trim() !== "" || Array.isArray(n.value) && n.value.length > 0 && n.value.some((V) => V !== void 0) || n.value === null ? (u(), Q(Ll, {
|
|
2518
2518
|
key: 0,
|
|
2519
2519
|
onClick: h
|
|
2520
|
-
})) :
|
|
2520
|
+
})) : z("", !0)
|
|
2521
2521
|
]),
|
|
2522
|
-
t("div",
|
|
2522
|
+
t("div", Ta, [
|
|
2523
2523
|
((S = w.value) == null ? void 0 : S.type) !== "select" ? (u(), Q(Ee((v = w.value) == null ? void 0 : v.component), me({ key: 0 }, i, {
|
|
2524
2524
|
type: (M = w.value) == null ? void 0 : M.type,
|
|
2525
2525
|
class: i.itemClass,
|
|
@@ -2589,7 +2589,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2589
2589
|
},
|
|
2590
2590
|
emits: ["update:modelValue", "change", "clear"],
|
|
2591
2591
|
setup(e, { expose: r, emit: a }) {
|
|
2592
|
-
const i = e, o = a, d = L(), w =
|
|
2592
|
+
const i = e, o = a, d = L(), w = K(() => yt(i.type, i.layout)), n = K({
|
|
2593
2593
|
get: () => i.modelValue,
|
|
2594
2594
|
set: (h) => o("update:modelValue", h)
|
|
2595
2595
|
});
|
|
@@ -2682,7 +2682,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2682
2682
|
},
|
|
2683
2683
|
emits: ["update:modelValue", "change", "clear"],
|
|
2684
2684
|
setup(e, { expose: r, emit: a }) {
|
|
2685
|
-
const i = e, o = a, d = L(), w =
|
|
2685
|
+
const i = e, o = a, d = L(), w = K(() => yt(i.type, i.layout)), n = K({
|
|
2686
2686
|
get: () => i.modelValue,
|
|
2687
2687
|
set: (h) => o("update:modelValue", h)
|
|
2688
2688
|
});
|
|
@@ -2723,7 +2723,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2723
2723
|
}), null, 16, ["type", "class", "modelValue"]);
|
|
2724
2724
|
};
|
|
2725
2725
|
}
|
|
2726
|
-
}),
|
|
2726
|
+
}), $e = /* @__PURE__ */ te({
|
|
2727
2727
|
__name: "filter-field",
|
|
2728
2728
|
props: {
|
|
2729
2729
|
id: {},
|
|
@@ -2753,7 +2753,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2753
2753
|
},
|
|
2754
2754
|
emits: ["update:modelValue", "change", "clear"],
|
|
2755
2755
|
setup(e, { expose: r, emit: a }) {
|
|
2756
|
-
const i = e, o = a, d = L(), w =
|
|
2756
|
+
const i = e, o = a, d = L(), w = K({
|
|
2757
2757
|
get: () => i.modelValue,
|
|
2758
2758
|
set: (h) => o("update:modelValue", h)
|
|
2759
2759
|
});
|
|
@@ -2781,7 +2781,7 @@ const Oa = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
|
|
|
2781
2781
|
case "inline":
|
|
2782
2782
|
return Lt;
|
|
2783
2783
|
case "vertical":
|
|
2784
|
-
return
|
|
2784
|
+
return Ka;
|
|
2785
2785
|
case "popover":
|
|
2786
2786
|
return Ha;
|
|
2787
2787
|
default:
|
|
@@ -2807,7 +2807,7 @@ function it(e, r) {
|
|
|
2807
2807
|
},
|
|
2808
2808
|
{ deep: !0, immediate: !0 }
|
|
2809
2809
|
);
|
|
2810
|
-
const d =
|
|
2810
|
+
const d = K(() => {
|
|
2811
2811
|
var p;
|
|
2812
2812
|
return (Ne((p = a == null ? void 0 : a.default) == null ? void 0 : p.call(a)) ?? []).flatMap((m) => Array.isArray(m.children) ? m.children : [m]);
|
|
2813
2813
|
});
|
|
@@ -2827,9 +2827,9 @@ function it(e, r) {
|
|
|
2827
2827
|
value: m
|
|
2828
2828
|
});
|
|
2829
2829
|
}
|
|
2830
|
-
const f =
|
|
2831
|
-
var
|
|
2832
|
-
const m = (
|
|
2830
|
+
const f = K(() => d.value.map((p) => {
|
|
2831
|
+
var F, U, E;
|
|
2832
|
+
const m = (F = p.props) == null ? void 0 : F.name;
|
|
2833
2833
|
return ol(p, {
|
|
2834
2834
|
...p.props,
|
|
2835
2835
|
layout: e.view,
|
|
@@ -2839,14 +2839,14 @@ function it(e, r) {
|
|
|
2839
2839
|
n(m, k);
|
|
2840
2840
|
},
|
|
2841
2841
|
onClear: () => w(m),
|
|
2842
|
-
class: [e.itemClass, (
|
|
2842
|
+
class: [e.itemClass, (U = p.props) == null ? void 0 : U.class],
|
|
2843
2843
|
itemClass: [e.itemClass, (E = p.props) == null ? void 0 : E.itemClass].filter((k) => typeof k == "string" && k.trim().length > 0).join(" ") || void 0
|
|
2844
2844
|
});
|
|
2845
|
-
})), b =
|
|
2845
|
+
})), b = K(
|
|
2846
2846
|
() => new Map(
|
|
2847
2847
|
f.value.map((p) => {
|
|
2848
|
-
var
|
|
2849
|
-
const m = (
|
|
2848
|
+
var F;
|
|
2849
|
+
const m = (F = p.props) == null ? void 0 : F.name;
|
|
2850
2850
|
return m ? [m, p] : null;
|
|
2851
2851
|
}).filter((p) => p !== null)
|
|
2852
2852
|
)
|
|
@@ -2857,27 +2857,27 @@ function it(e, r) {
|
|
|
2857
2857
|
name: "ALL"
|
|
2858
2858
|
});
|
|
2859
2859
|
}
|
|
2860
|
-
const g = L(""), x =
|
|
2860
|
+
const g = L(""), x = K(() => {
|
|
2861
2861
|
var p;
|
|
2862
|
-
return (p = e.schema) != null && p.value ? Object.entries(o.value).filter(([m,
|
|
2862
|
+
return (p = e.schema) != null && p.value ? Object.entries(o.value).filter(([m, F]) => e.schema && !(m in e.schema.value) ? !1 : Array.isArray(F) ? F.some((U) => U !== "" && U !== void 0) : F !== "" && F !== void 0).length : 0;
|
|
2863
2863
|
}), S = L();
|
|
2864
2864
|
N(g, async () => {
|
|
2865
2865
|
var p, m;
|
|
2866
2866
|
await Pe(), (m = (p = S == null ? void 0 : S.value) == null ? void 0 : p.filterRef) != null && m.inputTextRef && S.value.filterRef.inputTextRef.focus();
|
|
2867
2867
|
});
|
|
2868
|
-
const v =
|
|
2868
|
+
const v = K(() => {
|
|
2869
2869
|
var p, m;
|
|
2870
2870
|
return (p = e.schema) != null && p.value ? Object.fromEntries(Object.entries((m = e.schema) == null ? void 0 : m.value).slice(0, e.limit)) : {};
|
|
2871
|
-
}), M =
|
|
2871
|
+
}), M = K(() => {
|
|
2872
2872
|
var m;
|
|
2873
2873
|
if (f.value.length === 0) return [];
|
|
2874
2874
|
let p = 0;
|
|
2875
2875
|
if ((m = e.schema) != null && m.value) {
|
|
2876
|
-
const
|
|
2877
|
-
e.limit &&
|
|
2876
|
+
const F = Object.entries(e.schema.value).length;
|
|
2877
|
+
e.limit && F < e.limit ? p = e.limit - F : p = 0;
|
|
2878
2878
|
}
|
|
2879
2879
|
return f.value.slice(0, p);
|
|
2880
|
-
}), V =
|
|
2880
|
+
}), V = K(() => f.value.length === 0 ? [] : e.view !== "inline" ? f.value : f.value.slice(M.value.length));
|
|
2881
2881
|
return {
|
|
2882
2882
|
activeFilter: o,
|
|
2883
2883
|
activeFilterCount: x,
|
|
@@ -2907,10 +2907,10 @@ const Na = /* @__PURE__ */ te({
|
|
|
2907
2907
|
const { left: V, bottom: p } = v.getBoundingClientRect();
|
|
2908
2908
|
requestAnimationFrame(() => {
|
|
2909
2909
|
if (!M) return;
|
|
2910
|
-
const { width: m } = M.getBoundingClientRect(),
|
|
2910
|
+
const { width: m } = M.getBoundingClientRect(), F = M.offsetWidth || m, U = window.innerWidth || document.documentElement.clientWidth, E = U - V;
|
|
2911
2911
|
let k = V;
|
|
2912
|
-
|
|
2913
|
-
const C =
|
|
2912
|
+
F > E && (k = U - F - 18), k < 18 && (k = 18);
|
|
2913
|
+
const C = U - F - 18;
|
|
2914
2914
|
k > C && (k = Math.max(18, C)), w.value = {
|
|
2915
2915
|
position: "fixed",
|
|
2916
2916
|
top: `${p + 18}px`,
|
|
@@ -2918,7 +2918,7 @@ const Na = /* @__PURE__ */ te({
|
|
|
2918
2918
|
}, n.value = !0;
|
|
2919
2919
|
});
|
|
2920
2920
|
}
|
|
2921
|
-
const h =
|
|
2921
|
+
const h = K(() => Object.entries(w.value).map((v) => v.join(":")).join(";"));
|
|
2922
2922
|
function g(v) {
|
|
2923
2923
|
var V, p;
|
|
2924
2924
|
const M = v.target;
|
|
@@ -2930,7 +2930,7 @@ const Na = /* @__PURE__ */ te({
|
|
|
2930
2930
|
}), De(() => {
|
|
2931
2931
|
var v, M;
|
|
2932
2932
|
d.value = ((v = o.value) == null ? void 0 : v.querySelector("[data-popover-trigger]")) || null, (M = d.value) == null || M.addEventListener("click", f), document.addEventListener("click", g), window.addEventListener("resize", b), window.addEventListener("scroll", b, !0);
|
|
2933
|
-
}),
|
|
2933
|
+
}), Ue(() => {
|
|
2934
2934
|
var v;
|
|
2935
2935
|
(v = d.value) == null || v.removeEventListener("click", f), document.removeEventListener("click", g), window.removeEventListener("resize", b), window.removeEventListener("scroll", b, !0);
|
|
2936
2936
|
});
|
|
@@ -2943,7 +2943,7 @@ const Na = /* @__PURE__ */ te({
|
|
|
2943
2943
|
ref_key: "wrapperRef",
|
|
2944
2944
|
ref: o
|
|
2945
2945
|
}, [
|
|
2946
|
-
|
|
2946
|
+
pe(v.$slots, "trigger"),
|
|
2947
2947
|
x.value ? (u(), Q(at, {
|
|
2948
2948
|
key: 0,
|
|
2949
2949
|
to: "body"
|
|
@@ -2952,13 +2952,13 @@ const Na = /* @__PURE__ */ te({
|
|
|
2952
2952
|
ref_key: "popoverRef",
|
|
2953
2953
|
ref: i,
|
|
2954
2954
|
class: "fixed z-[50] w-[calc(100vw-32px)] md:w-[600px] rounded-md border bg-white shadow-md transition-opacity duration-0",
|
|
2955
|
-
style:
|
|
2955
|
+
style: Fe([h.value, { visibility: n.value ? "visible" : "hidden", opacity: n.value ? 1 : 0 }])
|
|
2956
2956
|
}, [
|
|
2957
|
-
|
|
2957
|
+
pe(v.$slots, "default")
|
|
2958
2958
|
], 4), [
|
|
2959
2959
|
[xe, a.value]
|
|
2960
2960
|
])
|
|
2961
|
-
])) :
|
|
2961
|
+
])) : z("", !0)
|
|
2962
2962
|
], 512));
|
|
2963
2963
|
}
|
|
2964
2964
|
}), Wa = {}, qa = {
|
|
@@ -3012,7 +3012,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3012
3012
|
},
|
|
3013
3013
|
emits: ["change", "clear", "clearAll"],
|
|
3014
3014
|
setup(e, { expose: r, emit: a }) {
|
|
3015
|
-
const i =
|
|
3015
|
+
const i = Me(), o = e, d = Tt(o.mode), w = Ye(), n = a, f = L({}), b = K(() => f != null && f.value ? o.view !== "inline" ? f == null ? void 0 : f.value : Object.fromEntries(Object.entries(f == null ? void 0 : f.value).slice(o.limit)) : {}), {
|
|
3016
3016
|
activeFilter: h,
|
|
3017
3017
|
activeFilterCount: g,
|
|
3018
3018
|
onFilterChange: x,
|
|
@@ -3025,12 +3025,12 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3025
3025
|
...o,
|
|
3026
3026
|
schema: f,
|
|
3027
3027
|
slots: w
|
|
3028
|
-
}, n), m =
|
|
3029
|
-
function
|
|
3028
|
+
}, n), m = K(() => o.badgeCount ?? g.value);
|
|
3029
|
+
function F(k) {
|
|
3030
3030
|
return Array.isArray(k) ? k.filter((C) => C != null && C !== "").length : k && typeof k == "object" ? Object.values(k).filter((C) => C != null && C !== "").length : k === null || k !== void 0 && k !== "" ? 1 : 0;
|
|
3031
3031
|
}
|
|
3032
|
-
function
|
|
3033
|
-
return h.value ?
|
|
3032
|
+
function U(k) {
|
|
3033
|
+
return h.value ? F(h.value[k]) : 0;
|
|
3034
3034
|
}
|
|
3035
3035
|
function E() {
|
|
3036
3036
|
if (b.value) {
|
|
@@ -3065,17 +3065,17 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3065
3065
|
type: "button"
|
|
3066
3066
|
}, [
|
|
3067
3067
|
t("span", Ga, [
|
|
3068
|
-
|
|
3068
|
+
J(qt, { class: "h-4 w-4" }),
|
|
3069
3069
|
C[6] || (C[6] = t("span", { class: "text-sm font-medium" }, "Фільтр", -1))
|
|
3070
3070
|
]),
|
|
3071
|
-
m.value > 0 ? (u(), c("span", Qa,
|
|
3071
|
+
m.value > 0 ? (u(), c("span", Qa, R(m.value), 1)) : z("", !0)
|
|
3072
3072
|
], 2)
|
|
3073
3073
|
]),
|
|
3074
3074
|
default: ge(() => [
|
|
3075
3075
|
t("div", Xa, [
|
|
3076
3076
|
t("div", Ja, [
|
|
3077
3077
|
t("div", en, [
|
|
3078
|
-
t("p", tn,
|
|
3078
|
+
t("p", tn, R(l(i)("filter.selectFieldHelp")), 1)
|
|
3079
3079
|
]),
|
|
3080
3080
|
t("div", ln, [
|
|
3081
3081
|
e.schema ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(b.value), ([j, A]) => (u(), c("button", {
|
|
@@ -3089,10 +3089,10 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3089
3089
|
])
|
|
3090
3090
|
}, [
|
|
3091
3091
|
t("div", an, [
|
|
3092
|
-
t("span", nn,
|
|
3092
|
+
t("span", nn, R(A.label), 1)
|
|
3093
3093
|
]),
|
|
3094
|
-
|
|
3095
|
-
], 10, on))), 128)) :
|
|
3094
|
+
U(j) > 0 ? (u(), c("div", rn, R(U(j)), 1)) : z("", !0)
|
|
3095
|
+
], 10, on))), 128)) : z("", !0),
|
|
3096
3096
|
(u(!0), c(Y, null, ie(l(M), (j, A) => (u(), c("button", {
|
|
3097
3097
|
key: "slot-" + A,
|
|
3098
3098
|
onClick: (s) => V.value = j.props.name,
|
|
@@ -3102,9 +3102,9 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3102
3102
|
])
|
|
3103
3103
|
}, [
|
|
3104
3104
|
t("div", un, [
|
|
3105
|
-
t("span", dn,
|
|
3105
|
+
t("span", dn, R(j.props.label), 1)
|
|
3106
3106
|
]),
|
|
3107
|
-
|
|
3107
|
+
U(j.props.name) > 0 ? (u(), c("div", cn, R(U(j.props.name)), 1)) : z("", !0)
|
|
3108
3108
|
], 10, sn))), 128))
|
|
3109
3109
|
]),
|
|
3110
3110
|
l(g) > 0 ? (u(), c("div", pn, [
|
|
@@ -3113,15 +3113,15 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3113
3113
|
onClick: C[0] || (C[0] = (j) => l(v)()),
|
|
3114
3114
|
"data-inside-popover": ""
|
|
3115
3115
|
}, " Очистити всі ", 2)
|
|
3116
|
-
])) :
|
|
3116
|
+
])) : z("", !0)
|
|
3117
3117
|
]),
|
|
3118
3118
|
t("div", fn, [
|
|
3119
3119
|
l(V) === "" ? (u(), c("div", vn, [
|
|
3120
|
-
t("p", mn,
|
|
3121
|
-
])) :
|
|
3120
|
+
t("p", mn, R(l(i)("filter.selectFieldHelp")), 1)
|
|
3121
|
+
])) : z("", !0),
|
|
3122
3122
|
l(V) ? (u(), c(Y, { key: 1 }, [
|
|
3123
3123
|
b.value ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(b.value), ([j, A]) => (u(), c(Y, null, [
|
|
3124
|
-
l(V) === j ? (u(), Q(
|
|
3124
|
+
l(V) === j ? (u(), Q($e, me({
|
|
3125
3125
|
key: j,
|
|
3126
3126
|
layout: "popover",
|
|
3127
3127
|
ref_for: !0,
|
|
@@ -3137,14 +3137,14 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3137
3137
|
modelValue: l(h)[j],
|
|
3138
3138
|
"onUpdate:modelValue": (s) => l(h)[j] = s,
|
|
3139
3139
|
cleanable: !0
|
|
3140
|
-
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) :
|
|
3141
|
-
], 64))), 256)) :
|
|
3140
|
+
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : z("", !0)
|
|
3141
|
+
], 64))), 256)) : z("", !0),
|
|
3142
3142
|
(u(!0), c(Y, null, ie(l(M), (j, A) => {
|
|
3143
3143
|
var s, _;
|
|
3144
3144
|
return u(), c(Y, {
|
|
3145
3145
|
key: "slot-" + A
|
|
3146
3146
|
}, [
|
|
3147
|
-
l(V) === j.props.name ? (u(), Q(
|
|
3147
|
+
l(V) === j.props.name ? (u(), Q($e, me({
|
|
3148
3148
|
key: 0,
|
|
3149
3149
|
layout: "popover"
|
|
3150
3150
|
}, { ref_for: !0 }, j.props, {
|
|
@@ -3160,10 +3160,10 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3160
3160
|
modelValue: l(h)[j.props.name],
|
|
3161
3161
|
"onUpdate:modelValue": (y) => l(h)[j.props.name] = y,
|
|
3162
3162
|
cleanable: !0
|
|
3163
|
-
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) :
|
|
3163
|
+
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : z("", !0)
|
|
3164
3164
|
], 64);
|
|
3165
3165
|
}), 128))
|
|
3166
|
-
], 64)) :
|
|
3166
|
+
], 64)) : z("", !0)
|
|
3167
3167
|
])
|
|
3168
3168
|
])
|
|
3169
3169
|
]),
|
|
@@ -3188,7 +3188,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3188
3188
|
},
|
|
3189
3189
|
emits: ["change", "clear", "clearAll"],
|
|
3190
3190
|
setup(e, { expose: r, emit: a }) {
|
|
3191
|
-
const i =
|
|
3191
|
+
const i = Me(), o = e, d = a, w = Ye(), n = L({}), f = K(() => Object.keys(o.schema).length > o.limit), {
|
|
3192
3192
|
activeFilter: b,
|
|
3193
3193
|
activeFilterCount: h,
|
|
3194
3194
|
onFilterChange: g,
|
|
@@ -3208,14 +3208,14 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3208
3208
|
function p(C) {
|
|
3209
3209
|
return Array.isArray(C) ? C.some((j) => j !== "" && j !== void 0 && j !== null) : C === null ? !0 : C && typeof C == "object" ? Object.values(C).some((j) => j !== "" && j !== void 0 && j !== null) : C !== "" && C !== void 0;
|
|
3210
3210
|
}
|
|
3211
|
-
const m =
|
|
3211
|
+
const m = K(() => {
|
|
3212
3212
|
const C = Object.keys(v.value ?? {}), j = V.value.map((A) => {
|
|
3213
3213
|
var s;
|
|
3214
3214
|
return (s = A.props) == null ? void 0 : s.name;
|
|
3215
3215
|
}).filter((A) => typeof A == "string");
|
|
3216
3216
|
return /* @__PURE__ */ new Set([...C, ...j]);
|
|
3217
|
-
}),
|
|
3218
|
-
const C = h.value ?? 0, j =
|
|
3217
|
+
}), F = K(() => Object.entries(b.value ?? {}).filter(([C, j]) => m.value.has(C) && p(j)).length), U = K(() => {
|
|
3218
|
+
const C = h.value ?? 0, j = F.value ?? 0;
|
|
3219
3219
|
return Math.max(C - j, 0);
|
|
3220
3220
|
}), E = L();
|
|
3221
3221
|
function k() {
|
|
@@ -3231,7 +3231,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3231
3231
|
clearFilter: x,
|
|
3232
3232
|
clearAllFilters: S
|
|
3233
3233
|
}), (C, j) => (u(), c("div", hn, [
|
|
3234
|
-
e.schema ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(l(v)), ([A, s]) => (u(), Q(
|
|
3234
|
+
e.schema ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(l(v)), ([A, s]) => (u(), Q($e, me({
|
|
3235
3235
|
key: A,
|
|
3236
3236
|
mode: e.mode,
|
|
3237
3237
|
width: e.width ? e.width : s == null ? void 0 : s.width
|
|
@@ -3244,22 +3244,22 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3244
3244
|
cleanable: !0,
|
|
3245
3245
|
modelValue: l(b)[A],
|
|
3246
3246
|
"onUpdate:modelValue": (_) => l(b)[A] = _
|
|
3247
|
-
}), null, 16, ["mode", "width", "class", "item-class", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) :
|
|
3247
|
+
}), null, 16, ["mode", "width", "class", "item-class", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : z("", !0),
|
|
3248
3248
|
(u(!0), c(Y, null, ie(l(V), (A, s) => {
|
|
3249
3249
|
var _, y;
|
|
3250
|
-
return u(), Q(
|
|
3250
|
+
return u(), Q($e, me({
|
|
3251
3251
|
key: "slot-" + s,
|
|
3252
3252
|
layout: "inline"
|
|
3253
3253
|
}, { ref_for: !0 }, A.props, {
|
|
3254
3254
|
class: [e.itemClass, (_ = A.props) == null ? void 0 : _.class],
|
|
3255
3255
|
"item-class": [e.itemClass, (y = A.props) == null ? void 0 : y.itemClass].filter(Boolean).join(" ") || void 0,
|
|
3256
|
-
onChange: j[1] || (j[1] = (
|
|
3257
|
-
onClear: j[2] || (j[2] = (
|
|
3258
|
-
l(x)(
|
|
3256
|
+
onChange: j[1] || (j[1] = (O) => l(g)(O.name, O.value)),
|
|
3257
|
+
onClear: j[2] || (j[2] = (O) => {
|
|
3258
|
+
l(x)(O), l(g)(O, void 0);
|
|
3259
3259
|
}),
|
|
3260
3260
|
cleanable: !0,
|
|
3261
3261
|
modelValue: l(b)[A.props.name],
|
|
3262
|
-
"onUpdate:modelValue": (
|
|
3262
|
+
"onUpdate:modelValue": (O) => l(b)[A.props.name] = O
|
|
3263
3263
|
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]);
|
|
3264
3264
|
}), 128)),
|
|
3265
3265
|
f.value ? (u(), Q(Yt, me({ key: 1 }, o, {
|
|
@@ -3272,7 +3272,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3272
3272
|
ref_key: "popoverRef",
|
|
3273
3273
|
ref: E,
|
|
3274
3274
|
cleanable: !0,
|
|
3275
|
-
"badge-count":
|
|
3275
|
+
"badge-count": U.value
|
|
3276
3276
|
}), {
|
|
3277
3277
|
default: ge(() => [
|
|
3278
3278
|
(u(!0), c(Y, null, ie(l(M), (A, s) => (u(), Q(Ee(A), me({
|
|
@@ -3281,12 +3281,12 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3281
3281
|
}, { ref_for: !0 }, A.props, { cleanable: !0 }), null, 16))), 128))
|
|
3282
3282
|
]),
|
|
3283
3283
|
_: 1
|
|
3284
|
-
}, 16, ["schema", "limit", "mode", "badge-count"])) :
|
|
3284
|
+
}, 16, ["schema", "limit", "mode", "badge-count"])) : z("", !0),
|
|
3285
3285
|
l(h) > 0 ? (u(), c("button", {
|
|
3286
3286
|
key: 2,
|
|
3287
3287
|
onClick: k,
|
|
3288
3288
|
class: H([e.itemClass, "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-md bg-gray-50 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"])
|
|
3289
|
-
},
|
|
3289
|
+
}, R(l(i)("filter.clear")), 3)) : z("", !0)
|
|
3290
3290
|
]));
|
|
3291
3291
|
}
|
|
3292
3292
|
}), gn = {
|
|
@@ -3334,8 +3334,8 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3334
3334
|
"aria-expanded": "false",
|
|
3335
3335
|
class: H([e.itemClass, "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"]),
|
|
3336
3336
|
type: "button"
|
|
3337
|
-
}, " Очистити ", 2)) :
|
|
3338
|
-
e.schema ? (u(!0), c(Y, { key: 1 }, ie(Object.entries(e.schema), ([v, M]) => (u(), Q(
|
|
3337
|
+
}, " Очистити ", 2)) : z("", !0),
|
|
3338
|
+
e.schema ? (u(!0), c(Y, { key: 1 }, ie(Object.entries(e.schema), ([v, M]) => (u(), Q($e, me({ layout: "vertical" }, { ref_for: !0 }, M, {
|
|
3339
3339
|
class: [e.itemClass, M == null ? void 0 : M.class],
|
|
3340
3340
|
"item-class": [e.itemClass, M == null ? void 0 : M.itemClass].filter(Boolean).join(" ") || void 0,
|
|
3341
3341
|
onChange: S[1] || (S[1] = (V) => l(f)(V.name, V.value)),
|
|
@@ -3345,10 +3345,10 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3345
3345
|
modelValue: l(w)[v],
|
|
3346
3346
|
"onUpdate:modelValue": (V) => l(w)[v] = V,
|
|
3347
3347
|
showClean: !0
|
|
3348
|
-
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 256)) :
|
|
3348
|
+
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 256)) : z("", !0),
|
|
3349
3349
|
(u(!0), c(Y, null, ie(l(g), (v, M) => {
|
|
3350
3350
|
var V, p;
|
|
3351
|
-
return u(), Q(
|
|
3351
|
+
return u(), Q($e, me({
|
|
3352
3352
|
key: "slot-" + M,
|
|
3353
3353
|
layout: "vertical"
|
|
3354
3354
|
}, { ref_for: !0 }, v.props, {
|
|
@@ -3364,7 +3364,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3364
3364
|
}), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]);
|
|
3365
3365
|
}), 128))
|
|
3366
3366
|
])
|
|
3367
|
-
])) :
|
|
3367
|
+
])) : z("", !0);
|
|
3368
3368
|
}
|
|
3369
3369
|
}), xn = ["onKeydown"], wn = ["disabled"], kn = {
|
|
3370
3370
|
key: 0,
|
|
@@ -3390,7 +3390,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3390
3390
|
},
|
|
3391
3391
|
emits: ["change", "clear", "clearAll"],
|
|
3392
3392
|
setup(e, { emit: r }) {
|
|
3393
|
-
const a =
|
|
3393
|
+
const a = Me(), i = e, o = r, d = L({}), w = Ye(), {
|
|
3394
3394
|
activeFilter: n,
|
|
3395
3395
|
activeFilterCount: f,
|
|
3396
3396
|
onFilterChange: b,
|
|
@@ -3404,10 +3404,10 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3404
3404
|
slots: w
|
|
3405
3405
|
},
|
|
3406
3406
|
o
|
|
3407
|
-
), S = L(null), v = L(null), M = Zt({ open: !1, top: 0, left: 0 }), V =
|
|
3407
|
+
), S = L(null), v = L(null), M = Zt({ open: !1, top: 0, left: 0 }), V = K(() => M.open), p = K(() => !!i.disabled), m = K(() => d.value || {}), F = K(() => i.title ?? "Фільтр"), U = K(() => !!w.trigger), E = K(() => [
|
|
3408
3408
|
"inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-transparent bg-slate-200/70 px-3 text-sm font-medium text-slate-700 transition-colors hover:bg-blue-100 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-slate-200/70 disabled:hover:text-slate-700",
|
|
3409
3409
|
p.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
3410
|
-
]), k =
|
|
3410
|
+
]), k = K(() => M.open ? {
|
|
3411
3411
|
position: "absolute",
|
|
3412
3412
|
top: `${M.top}px`,
|
|
3413
3413
|
left: `${M.left}px`,
|
|
@@ -3419,8 +3419,8 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3419
3419
|
}
|
|
3420
3420
|
function j() {
|
|
3421
3421
|
if (!S.value) return;
|
|
3422
|
-
const
|
|
3423
|
-
M.top =
|
|
3422
|
+
const O = S.value.getBoundingClientRect();
|
|
3423
|
+
M.top = O.bottom + window.scrollY + 8, M.left = O.left + O.width / 2 + window.scrollX;
|
|
3424
3424
|
}
|
|
3425
3425
|
function A() {
|
|
3426
3426
|
M.open = !M.open, M.open && Pe(j);
|
|
@@ -3436,37 +3436,37 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3436
3436
|
}
|
|
3437
3437
|
return De(() => {
|
|
3438
3438
|
window.addEventListener("resize", _), window.addEventListener("scroll", _, !0);
|
|
3439
|
-
}),
|
|
3439
|
+
}), Ue(() => {
|
|
3440
3440
|
window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
3441
3441
|
}), N(
|
|
3442
3442
|
() => i.schema,
|
|
3443
|
-
(
|
|
3444
|
-
if (!
|
|
3443
|
+
(O) => {
|
|
3444
|
+
if (!O) {
|
|
3445
3445
|
d.value = {};
|
|
3446
3446
|
return;
|
|
3447
3447
|
}
|
|
3448
|
-
if (Array.isArray(
|
|
3449
|
-
const Z =
|
|
3448
|
+
if (Array.isArray(O)) {
|
|
3449
|
+
const Z = O.filter((G) => G && (G.name || G.id)).map((G) => {
|
|
3450
3450
|
const P = G.name || G.id;
|
|
3451
3451
|
return [P, { ...G, name: P }];
|
|
3452
3452
|
});
|
|
3453
3453
|
d.value = Object.fromEntries(Z);
|
|
3454
3454
|
return;
|
|
3455
3455
|
}
|
|
3456
|
-
d.value =
|
|
3456
|
+
d.value = O;
|
|
3457
3457
|
},
|
|
3458
3458
|
{ deep: !0, immediate: !0 }
|
|
3459
3459
|
), N(
|
|
3460
3460
|
() => i.disabled,
|
|
3461
|
-
(
|
|
3462
|
-
|
|
3461
|
+
(O) => {
|
|
3462
|
+
O && C();
|
|
3463
3463
|
}
|
|
3464
|
-
), (
|
|
3464
|
+
), (O, Z) => (u(), c("div", {
|
|
3465
3465
|
class: "relative inline-flex",
|
|
3466
3466
|
ref_key: "anchor",
|
|
3467
3467
|
ref: S
|
|
3468
3468
|
}, [
|
|
3469
|
-
|
|
3469
|
+
U.value ? (u(), c("span", {
|
|
3470
3470
|
key: 0,
|
|
3471
3471
|
class: H(["inline-flex", p.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
|
|
3472
3472
|
role: "button",
|
|
@@ -3478,7 +3478,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3478
3478
|
Vt(Ae(s, ["prevent", "stop"]), ["space"])
|
|
3479
3479
|
]
|
|
3480
3480
|
}, [
|
|
3481
|
-
|
|
3481
|
+
pe(O.$slots, "trigger", {
|
|
3482
3482
|
toggle: s,
|
|
3483
3483
|
open: V.value,
|
|
3484
3484
|
disabled: p.value,
|
|
@@ -3492,14 +3492,14 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3492
3492
|
onClick: Ae(s, ["prevent", "stop"]),
|
|
3493
3493
|
"data-popover-trigger": ""
|
|
3494
3494
|
}, [
|
|
3495
|
-
|
|
3496
|
-
l(f) > 0 ? (u(), c("div", kn,
|
|
3495
|
+
J(qt, { class: "h-4 w-4" }),
|
|
3496
|
+
l(f) > 0 ? (u(), c("div", kn, R(l(f)), 1)) : z("", !0)
|
|
3497
3497
|
], 10, wn)),
|
|
3498
3498
|
(u(), Q(at, { to: "body" }, [
|
|
3499
3499
|
V.value ? (u(), c("div", {
|
|
3500
3500
|
key: 0,
|
|
3501
3501
|
class: H(["absolute", typeof e.width == "number" ? `min-w-[${e.width + 32 + (Object.keys(m.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
|
|
3502
|
-
style:
|
|
3502
|
+
style: Fe(k.value),
|
|
3503
3503
|
ref_key: "panel",
|
|
3504
3504
|
ref: v,
|
|
3505
3505
|
onClick: Z[4] || (Z[4] = Ae(() => {
|
|
@@ -3507,20 +3507,20 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3507
3507
|
}, [
|
|
3508
3508
|
t("div", Cn, [
|
|
3509
3509
|
t("div", _n, [
|
|
3510
|
-
t("h3", Mn,
|
|
3510
|
+
t("h3", Mn, R(F.value), 1),
|
|
3511
3511
|
t("button", {
|
|
3512
3512
|
type: "button",
|
|
3513
3513
|
class: "inline-flex h-6 w-6 items-center justify-center rounded-full border-0 bg-slate-300/40 text-slate-600 transition-colors hover:bg-blue-200/60 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200",
|
|
3514
3514
|
onClick: C
|
|
3515
3515
|
}, [
|
|
3516
3516
|
t("span", Sn, [
|
|
3517
|
-
|
|
3517
|
+
J(ht, { class: "h-4 w-4" })
|
|
3518
3518
|
]),
|
|
3519
3519
|
Z[5] || (Z[5] = t("span", { class: "sr-only" }, "Закрити", -1))
|
|
3520
3520
|
])
|
|
3521
3521
|
]),
|
|
3522
3522
|
t("div", Vn, [
|
|
3523
|
-
Object.keys(m.value).length ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(m.value), ([G, P]) => (u(), Q(
|
|
3523
|
+
Object.keys(m.value).length ? (u(!0), c(Y, { key: 0 }, ie(Object.entries(m.value), ([G, P]) => (u(), Q($e, me({ key: G }, { ref_for: !0 }, { ...P, layout: "inline" }, {
|
|
3524
3524
|
width: e.width ? e.width : P == null ? void 0 : P.width,
|
|
3525
3525
|
class: [e.itemClass, P == null ? void 0 : P.class],
|
|
3526
3526
|
"item-class": [e.itemClass, P == null ? void 0 : P.itemClass].filter(Boolean).join(" ") || void 0,
|
|
@@ -3531,10 +3531,10 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3531
3531
|
onClear: Z[1] || (Z[1] = (q) => {
|
|
3532
3532
|
l(h)(q), l(b)(q, void 0);
|
|
3533
3533
|
})
|
|
3534
|
-
}), null, 16, ["width", "class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)) :
|
|
3534
|
+
}), null, 16, ["width", "class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)) : z("", !0),
|
|
3535
3535
|
(u(!0), c(Y, null, ie(l(x), (G, P) => {
|
|
3536
3536
|
var q, le;
|
|
3537
|
-
return u(), Q(
|
|
3537
|
+
return u(), Q($e, me({
|
|
3538
3538
|
key: "slot-" + P,
|
|
3539
3539
|
ref_for: !0
|
|
3540
3540
|
}, { ...G.props, layout: "inline" }, {
|
|
@@ -3555,14 +3555,14 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3555
3555
|
type: "button",
|
|
3556
3556
|
class: H([e.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
|
|
3557
3557
|
onClick: y
|
|
3558
|
-
},
|
|
3559
|
-
])) :
|
|
3558
|
+
}, R(l(a)("filter.clear")), 3)
|
|
3559
|
+
])) : z("", !0)
|
|
3560
3560
|
])
|
|
3561
|
-
], 6)) :
|
|
3561
|
+
], 6)) : z("", !0)
|
|
3562
3562
|
]))
|
|
3563
3563
|
], 512));
|
|
3564
3564
|
}
|
|
3565
|
-
}), An = { class: "mb-6 flex flex-wrap gap-2" }, Pn = ["onClick"], Ln = { class: "mr-2 flex items-center gap-1" }, jn = { class: "font-semibold" },
|
|
3565
|
+
}), An = { class: "mb-6 flex flex-wrap gap-2" }, Pn = ["onClick"], Ln = { class: "mr-2 flex items-center gap-1" }, jn = { class: "font-semibold" }, zn = { class: "text-xs text-gray-500" }, ot = /* @__PURE__ */ te({
|
|
3566
3566
|
__name: "filter",
|
|
3567
3567
|
props: {
|
|
3568
3568
|
schema: {},
|
|
@@ -3580,7 +3580,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3580
3580
|
},
|
|
3581
3581
|
emits: ["change", "clear", "clearAll"],
|
|
3582
3582
|
setup(e, { expose: r, emit: a }) {
|
|
3583
|
-
const i = e, o = Jt(), d =
|
|
3583
|
+
const i = e, o = Jt(), d = K(() => ({
|
|
3584
3584
|
...i,
|
|
3585
3585
|
...o
|
|
3586
3586
|
})), w = L(h(i.value ?? {}));
|
|
@@ -3598,8 +3598,8 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3598
3598
|
return s.map((_) => h(_));
|
|
3599
3599
|
if (s !== null && typeof s == "object") {
|
|
3600
3600
|
const _ = Ne(s), y = {};
|
|
3601
|
-
for (const
|
|
3602
|
-
y[
|
|
3601
|
+
for (const O in _)
|
|
3602
|
+
y[O] = h(_[O]);
|
|
3603
3603
|
return y;
|
|
3604
3604
|
}
|
|
3605
3605
|
return s;
|
|
@@ -3634,7 +3634,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3634
3634
|
value: null
|
|
3635
3635
|
});
|
|
3636
3636
|
}
|
|
3637
|
-
const v = L({}), M =
|
|
3637
|
+
const v = L({}), M = K(() => i.teleportActive);
|
|
3638
3638
|
function V() {
|
|
3639
3639
|
switch (i.view) {
|
|
3640
3640
|
case "inline":
|
|
@@ -3676,23 +3676,23 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3676
3676
|
function m() {
|
|
3677
3677
|
f.value.clearAllFilters(), S();
|
|
3678
3678
|
}
|
|
3679
|
-
const
|
|
3680
|
-
const y = v.value[s],
|
|
3679
|
+
const F = K(() => Object.entries(w.value).filter(([, s]) => s == null ? !1 : Array.isArray(s) ? s.length > 0 : typeof s == "string" ? s.trim().length > 0 : !0).map(([s, _]) => {
|
|
3680
|
+
const y = v.value[s], O = (y == null ? void 0 : y.label) || (y == null ? void 0 : y.title) || s, Z = E(y, _);
|
|
3681
3681
|
return {
|
|
3682
3682
|
key: s,
|
|
3683
|
-
label:
|
|
3683
|
+
label: O,
|
|
3684
3684
|
value: Z
|
|
3685
3685
|
};
|
|
3686
3686
|
}));
|
|
3687
|
-
function
|
|
3687
|
+
function U(s) {
|
|
3688
3688
|
p(s);
|
|
3689
3689
|
}
|
|
3690
3690
|
function E(s, _) {
|
|
3691
3691
|
if (!s || _ === void 0 || _ === null) return "";
|
|
3692
3692
|
const y = k(_);
|
|
3693
3693
|
if (!y.length) return "";
|
|
3694
|
-
const
|
|
3695
|
-
return y.map((Z) =>
|
|
3694
|
+
const O = C(s);
|
|
3695
|
+
return y.map((Z) => O.get(Z) ?? Z).filter(Boolean).join(", ");
|
|
3696
3696
|
}
|
|
3697
3697
|
function k(s) {
|
|
3698
3698
|
return Array.isArray(s) ? s.map((_) => {
|
|
@@ -3701,19 +3701,19 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3701
3701
|
}).filter(Boolean) : typeof s == "string" ? s.split(",").map((_) => _.trim()).filter(Boolean) : [];
|
|
3702
3702
|
}
|
|
3703
3703
|
function C(s) {
|
|
3704
|
-
const _ = /* @__PURE__ */ new Map(), y = s.valueKey || "id",
|
|
3704
|
+
const _ = /* @__PURE__ */ new Map(), y = s.valueKey || "id", O = s.labelKey || "text";
|
|
3705
3705
|
return (s.options ?? []).forEach((Z) => {
|
|
3706
|
-
const G = j(Z, y), P = A(Z,
|
|
3706
|
+
const G = j(Z, y), P = A(Z, O);
|
|
3707
3707
|
G && _.set(G, P || G);
|
|
3708
3708
|
}), _;
|
|
3709
3709
|
}
|
|
3710
3710
|
function j(s, _) {
|
|
3711
|
-
var y,
|
|
3712
|
-
return s ? ((
|
|
3711
|
+
var y, O;
|
|
3712
|
+
return s ? ((O = (y = s[_] ?? s.id ?? s.value ?? s.key) == null ? void 0 : y.toString) == null ? void 0 : O.call(y)) ?? "" : "";
|
|
3713
3713
|
}
|
|
3714
3714
|
function A(s, _) {
|
|
3715
|
-
var y,
|
|
3716
|
-
return s ? ((
|
|
3715
|
+
var y, O;
|
|
3716
|
+
return s ? ((O = (y = s[_] ?? s.text ?? s.label ?? s.value ?? s.id) == null ? void 0 : y.toString) == null ? void 0 : O.call(y)) ?? "" : "";
|
|
3717
3717
|
}
|
|
3718
3718
|
return N(
|
|
3719
3719
|
() => w.value,
|
|
@@ -3722,7 +3722,7 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3722
3722
|
const _ = new URL(window.location.href), y = new URLSearchParams(window.location.search);
|
|
3723
3723
|
Object.keys(s).length > 0 ? y.set(
|
|
3724
3724
|
"filter",
|
|
3725
|
-
Object.entries(s).filter(([,
|
|
3725
|
+
Object.entries(s).filter(([, O]) => O).map(([O, Z]) => `${O}=${Z}`).join("|")
|
|
3726
3726
|
) : y.delete("filter"), _.search = decodeURI(y.toString()), window.history.pushState({}, "", _);
|
|
3727
3727
|
}
|
|
3728
3728
|
}
|
|
@@ -3739,32 +3739,32 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3739
3739
|
ref: f
|
|
3740
3740
|
}), el({
|
|
3741
3741
|
default: ge(() => [
|
|
3742
|
-
|
|
3742
|
+
pe(s.$slots, "default")
|
|
3743
3743
|
]),
|
|
3744
3744
|
_: 2
|
|
3745
3745
|
}, [
|
|
3746
3746
|
l(b).trigger ? {
|
|
3747
3747
|
name: "trigger",
|
|
3748
3748
|
fn: ge((y) => [
|
|
3749
|
-
|
|
3749
|
+
pe(s.$slots, "trigger", tl(ll(y)))
|
|
3750
3750
|
]),
|
|
3751
3751
|
key: "0"
|
|
3752
3752
|
} : void 0
|
|
3753
3753
|
]), 1040, ["schema"])),
|
|
3754
|
-
M.value &&
|
|
3754
|
+
M.value && F.value.length ? (u(), Q(at, {
|
|
3755
3755
|
key: 0,
|
|
3756
3756
|
to: M.value
|
|
3757
3757
|
}, [
|
|
3758
3758
|
t("div", An, [
|
|
3759
|
-
(u(!0), c(Y, null, ie(
|
|
3759
|
+
(u(!0), c(Y, null, ie(F.value, (y) => (u(), c("button", {
|
|
3760
3760
|
key: y.key,
|
|
3761
3761
|
type: "button",
|
|
3762
3762
|
class: "ga1u8 zw1wr sr4j9 flex items-center zu875 kew0r w9dei w4xo0 kghwt wz1vo focus:outline-hidden gugmw dark:bg-emerald-500 dark:hover:bg-emerald-600 dark:focus:bg-emerald-600 bg-white border border-gray-200 px-3 py-1 rounded-full text-sm text-gray-700",
|
|
3763
|
-
onClick: (
|
|
3763
|
+
onClick: (O) => U(y.key)
|
|
3764
3764
|
}, [
|
|
3765
3765
|
t("span", Ln, [
|
|
3766
|
-
t("span", jn,
|
|
3767
|
-
t("span",
|
|
3766
|
+
t("span", jn, R(y.label), 1),
|
|
3767
|
+
t("span", zn, "· " + R(y.value), 1)
|
|
3768
3768
|
]),
|
|
3769
3769
|
_[2] || (_[2] = t("span", { class: "g424j flex flex-col jkwm1 items-center b9gop aqyoh ad7q2 kghwt t4363 q7nhl dark:text-emerald-500" }, [
|
|
3770
3770
|
t("svg", {
|
|
@@ -3785,14 +3785,14 @@ const qt = /* @__PURE__ */ Le(Wa, [["render", Ya]]), Ga = { class: "flex items-c
|
|
|
3785
3785
|
], -1))
|
|
3786
3786
|
], 8, Pn))), 128))
|
|
3787
3787
|
])
|
|
3788
|
-
], 8, ["to"])) :
|
|
3788
|
+
], 8, ["to"])) : z("", !0)
|
|
3789
3789
|
], 64));
|
|
3790
3790
|
}
|
|
3791
3791
|
});
|
|
3792
3792
|
ot.install = function(e) {
|
|
3793
|
-
e.component("Filter", ot), e.component("FilterField",
|
|
3793
|
+
e.component("Filter", ot), e.component("FilterField", $e);
|
|
3794
3794
|
};
|
|
3795
|
-
function
|
|
3795
|
+
function Fn(e) {
|
|
3796
3796
|
const {
|
|
3797
3797
|
page: r,
|
|
3798
3798
|
id: a,
|
|
@@ -3801,7 +3801,7 @@ function zn(e) {
|
|
|
3801
3801
|
} = e, d = new URL(window.location.href), w = new URLSearchParams(window.location.search);
|
|
3802
3802
|
r ? w.set("page", r.toString()) : w.delete("page"), a ? w.set("id", a.toString()) : w.delete("id"), i ? w.set("filter", i) : w.delete("filter"), typeof o == "boolean" ? w.set("bbox", o ? "1" : "0") : w.delete("bbox"), d.search = decodeURI(w.toString()), window.history.pushState({}, "", d);
|
|
3803
3803
|
}
|
|
3804
|
-
const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = { class: "flex items-center" }, On = ["disabled"], Rn = { class: "flex items-center gap-x-1" }, Zn = ["onClick"], In = ["disabled"],
|
|
3804
|
+
const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = { class: "flex items-center" }, On = ["disabled"], Rn = { class: "flex items-center gap-x-1" }, Zn = ["onClick"], In = ["disabled"], Un = { class: "flex justify-center items-center gap-x-5 ml-3" }, Tn = { class: "relative" }, Kn = {
|
|
3805
3805
|
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%]",
|
|
3806
3806
|
role: "menu",
|
|
3807
3807
|
"aria-orientation": "vertical",
|
|
@@ -3831,7 +3831,7 @@ const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = {
|
|
|
3831
3831
|
N(() => a.pageSize, (S) => {
|
|
3832
3832
|
d.value = S;
|
|
3833
3833
|
});
|
|
3834
|
-
const n =
|
|
3834
|
+
const n = K(() => Math.ceil(a.total / a.pageSize)), f = K(() => {
|
|
3835
3835
|
const v = Math.floor(3.5);
|
|
3836
3836
|
let M = o.value - v, V = o.value + v;
|
|
3837
3837
|
M < 1 && (V += 1 - M, M = 1), V > n.value && (M -= V - n.value, V = n.value), M = Math.max(1, M);
|
|
@@ -3889,7 +3889,7 @@ const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = {
|
|
|
3889
3889
|
key: M,
|
|
3890
3890
|
onClick: (V) => g(M),
|
|
3891
3891
|
class: H(o.value === M ? "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]")
|
|
3892
|
-
},
|
|
3892
|
+
}, R(M), 11, Zn))), 128))
|
|
3893
3893
|
]),
|
|
3894
3894
|
t("button", {
|
|
3895
3895
|
type: "button",
|
|
@@ -3923,16 +3923,16 @@ const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = {
|
|
|
3923
3923
|
], -1)
|
|
3924
3924
|
])], 8, In)
|
|
3925
3925
|
]),
|
|
3926
|
-
t("div",
|
|
3927
|
-
t("div",
|
|
3928
|
-
se(t("div",
|
|
3926
|
+
t("div", Un, [
|
|
3927
|
+
t("div", Tn, [
|
|
3928
|
+
se(t("div", Kn, [
|
|
3929
3929
|
(u(), c(Y, null, ie([10, 20, 30], (M) => t("button", {
|
|
3930
3930
|
type: "button",
|
|
3931
3931
|
key: M,
|
|
3932
3932
|
onClick: (V) => x(M),
|
|
3933
3933
|
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"
|
|
3934
3934
|
}, [
|
|
3935
|
-
de(
|
|
3935
|
+
de(R(M) + " ", 1),
|
|
3936
3936
|
d.value === M ? (u(), c("svg", Nn, [...v[3] || (v[3] = [
|
|
3937
3937
|
t("path", {
|
|
3938
3938
|
stroke: "none",
|
|
@@ -3940,7 +3940,7 @@ const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = {
|
|
|
3940
3940
|
fill: "none"
|
|
3941
3941
|
}, null, -1),
|
|
3942
3942
|
t("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
3943
|
-
])])) :
|
|
3943
|
+
])])) : z("", !0)
|
|
3944
3944
|
], 8, Hn)), 64))
|
|
3945
3945
|
], 512), [
|
|
3946
3946
|
[xe, w.value]
|
|
@@ -3953,7 +3953,7 @@ const En = { class: "flex items-center justify-between w-full gap-x-1" }, Dn = {
|
|
|
3953
3953
|
"aria-label": "Dropdown",
|
|
3954
3954
|
onClick: v[0] || (v[0] = (M) => w.value = !w.value)
|
|
3955
3955
|
}, [
|
|
3956
|
-
de(
|
|
3956
|
+
de(R(d.value) + " ", 1),
|
|
3957
3957
|
v[4] || (v[4] = t("svg", {
|
|
3958
3958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3959
3959
|
viewBox: "0 0 24 24",
|
|
@@ -4093,13 +4093,13 @@ function dr(e, r) {
|
|
|
4093
4093
|
])]);
|
|
4094
4094
|
}
|
|
4095
4095
|
const cr = /* @__PURE__ */ Oe(sr, [["render", dr]]);
|
|
4096
|
-
function
|
|
4096
|
+
function zt(e, r) {
|
|
4097
4097
|
let a;
|
|
4098
4098
|
return function(...i) {
|
|
4099
4099
|
clearTimeout(a), a = setTimeout(() => e(...i), r);
|
|
4100
4100
|
};
|
|
4101
4101
|
}
|
|
4102
|
-
const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "text-base font-semibold text-gray-900" }, vr = { class: "px-4 pb-3 min-h-0 shrink-0 overflow-hidden" }, mr = { class: "flex flex-col flex-1 min-h-0 overflow-hidden" }, hr = { class: "text-base font-semibold text-gray-900" }, gr = { class: "flex-1 min-h-0 overflow-auto p-4" }, yr = 152,
|
|
4102
|
+
const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "text-base font-semibold text-gray-900" }, vr = { class: "px-4 pb-3 min-h-0 shrink-0 overflow-hidden" }, mr = { class: "flex flex-col flex-1 min-h-0 overflow-hidden" }, hr = { class: "text-base font-semibold text-gray-900" }, gr = { class: "flex-1 min-h-0 overflow-auto p-4" }, yr = 152, Ft = 96, br = 270, Et = 96, xr = /* @__PURE__ */ te({
|
|
4103
4103
|
__name: "MobileModalShell",
|
|
4104
4104
|
props: {
|
|
4105
4105
|
open: { type: Boolean },
|
|
@@ -4110,7 +4110,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4110
4110
|
},
|
|
4111
4111
|
emits: ["close", "expand", "collapse"],
|
|
4112
4112
|
setup(e, { expose: r, emit: a }) {
|
|
4113
|
-
const i = e, o = a, d = L("full"), w =
|
|
4113
|
+
const i = e, o = a, d = L("full"), w = K(() => i.topOffset ?? "0px"), n = K(() => i.peekMode ?? "custom"), f = L(!1), b = L(0);
|
|
4114
4114
|
let h = null, g = 0, x = 0;
|
|
4115
4115
|
function S(A, s, _) {
|
|
4116
4116
|
return Math.max(A, Math.min(_, s));
|
|
@@ -4126,19 +4126,19 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4126
4126
|
return Math.max(0, window.innerHeight - A);
|
|
4127
4127
|
}
|
|
4128
4128
|
function V() {
|
|
4129
|
-
const A = n.value === "custom", s = A ? yr : br, _ = A ?
|
|
4129
|
+
const A = n.value === "custom", s = A ? yr : br, _ = A ? Ft : Et, y = A ? 40 : 60;
|
|
4130
4130
|
if (typeof window > "u") return Math.max(_, s);
|
|
4131
|
-
const
|
|
4132
|
-
return S(_, s,
|
|
4131
|
+
const O = window.innerHeight * (y / 100);
|
|
4132
|
+
return S(_, s, O);
|
|
4133
4133
|
}
|
|
4134
4134
|
function p() {
|
|
4135
|
-
return n.value === "custom" ?
|
|
4135
|
+
return n.value === "custom" ? Ft : Et;
|
|
4136
4136
|
}
|
|
4137
4137
|
function m(A) {
|
|
4138
|
-
const s = M(), _ = V(), y = p(),
|
|
4139
|
-
return s <= 0 ? Math.max(y,
|
|
4138
|
+
const s = M(), _ = V(), y = p(), O = d.value === "full" ? s : _;
|
|
4139
|
+
return s <= 0 ? Math.max(y, O) : S(y, O - A, s);
|
|
4140
4140
|
}
|
|
4141
|
-
const
|
|
4141
|
+
const F = K(() => ({ height: `${m(b.value)}px` }));
|
|
4142
4142
|
N(
|
|
4143
4143
|
() => i.open,
|
|
4144
4144
|
(A) => {
|
|
@@ -4150,7 +4150,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4150
4150
|
i.open && A && (d.value = A);
|
|
4151
4151
|
}
|
|
4152
4152
|
);
|
|
4153
|
-
function
|
|
4153
|
+
function U() {
|
|
4154
4154
|
d.value !== "full" && (d.value = "full", o("expand")), f.value || (b.value = 0);
|
|
4155
4155
|
}
|
|
4156
4156
|
function E() {
|
|
@@ -4172,15 +4172,15 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4172
4172
|
f.value = !0;
|
|
4173
4173
|
return;
|
|
4174
4174
|
}
|
|
4175
|
-
f.value = !1, b.value = 0, d.value === "peek" && G ?
|
|
4175
|
+
f.value = !1, b.value = 0, d.value === "peek" && G ? U() : d.value === "full" && P && E();
|
|
4176
4176
|
}
|
|
4177
4177
|
function j(A) {
|
|
4178
4178
|
var s, _;
|
|
4179
4179
|
A.button !== 0 && A.pointerType === "mouse" || (A.cancelable && A.preventDefault(), h = A.pointerId, g = A.clientY, x = b.value, f.value = !0, (_ = (s = A.currentTarget).setPointerCapture) == null || _.call(s, A.pointerId), window.addEventListener("pointermove", k, { passive: !1 }), window.addEventListener("pointerup", C), window.addEventListener("pointercancel", C));
|
|
4180
4180
|
}
|
|
4181
|
-
return
|
|
4181
|
+
return Ue(() => {
|
|
4182
4182
|
window.removeEventListener("pointermove", k), window.removeEventListener("pointerup", C), window.removeEventListener("pointercancel", C);
|
|
4183
|
-
}), r({ expand:
|
|
4183
|
+
}), r({ expand: U, collapseToPeek: E }), (A, s) => se((u(), c("div", pr, [
|
|
4184
4184
|
t("div", {
|
|
4185
4185
|
class: H(["absolute inset-0 bg-black/40 transition-opacity duration-150", d.value === "peek" ? "opacity-0 pointer-events-none" : "opacity-100 pointer-events-auto"]),
|
|
4186
4186
|
onClick: s[0] || (s[0] = Ae((_) => d.value !== "peek" && o("close"), ["self"]))
|
|
@@ -4190,7 +4190,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4190
4190
|
d.value === "peek" ? "rounded-t-2xl" : "",
|
|
4191
4191
|
f.value ? "vs-mobile-modal-shell__panel--dragging" : ""
|
|
4192
4192
|
]]),
|
|
4193
|
-
style:
|
|
4193
|
+
style: Fe(F.value)
|
|
4194
4194
|
}, [
|
|
4195
4195
|
t("div", {
|
|
4196
4196
|
class: "shrink-0 flex flex-col items-center pt-2 pb-1 cursor-grab active:cursor-grabbing touch-none select-none",
|
|
@@ -4206,7 +4206,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4206
4206
|
class: "flex items-center justify-between gap-4 px-4 pb-3 border-b border-gray-200 shrink-0 touch-none select-none cursor-grab active:cursor-grabbing",
|
|
4207
4207
|
onPointerdown: j
|
|
4208
4208
|
}, [
|
|
4209
|
-
t("div", fr,
|
|
4209
|
+
t("div", fr, R(e.title), 1),
|
|
4210
4210
|
t("button", {
|
|
4211
4211
|
type: "button",
|
|
4212
4212
|
class: "h-9 w-9 inline-flex items-center justify-center rounded-full border border-gray-200 text-gray-600 hover:bg-gray-50 relative z-[80]",
|
|
@@ -4231,17 +4231,17 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4231
4231
|
t("path", { d: "m6 6 12 12" })
|
|
4232
4232
|
], -1)
|
|
4233
4233
|
])], 32)
|
|
4234
|
-
], 32)) :
|
|
4234
|
+
], 32)) : z("", !0),
|
|
4235
4235
|
se(t("div", vr, [
|
|
4236
|
-
|
|
4237
|
-
expand:
|
|
4236
|
+
pe(A.$slots, "peek", {
|
|
4237
|
+
expand: U,
|
|
4238
4238
|
collapse: E
|
|
4239
4239
|
}, () => [
|
|
4240
4240
|
t("button", {
|
|
4241
4241
|
type: "button",
|
|
4242
4242
|
class: "w-full text-left text-base font-semibold text-gray-900 py-2 rounded-lg hover:bg-stone-50",
|
|
4243
|
-
onClick:
|
|
4244
|
-
},
|
|
4243
|
+
onClick: U
|
|
4244
|
+
}, R(e.title), 1)
|
|
4245
4245
|
], !0)
|
|
4246
4246
|
], 512), [
|
|
4247
4247
|
[xe, d.value === "peek" && n.value === "custom"]
|
|
@@ -4251,7 +4251,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4251
4251
|
class: "flex items-center justify-between gap-4 px-4 pb-3 border-b border-gray-200 shrink-0 touch-none select-none cursor-grab active:cursor-grabbing",
|
|
4252
4252
|
onPointerdown: j
|
|
4253
4253
|
}, [
|
|
4254
|
-
t("div", hr,
|
|
4254
|
+
t("div", hr, R(e.title), 1),
|
|
4255
4255
|
t("button", {
|
|
4256
4256
|
type: "button",
|
|
4257
4257
|
class: "h-9 w-9 inline-flex items-center justify-center rounded-full border border-gray-200 text-gray-600 hover:bg-gray-50 relative z-[80]",
|
|
@@ -4278,7 +4278,7 @@ const pr = { class: "fixed inset-0 z-50 pointer-events-none" }, fr = { class: "t
|
|
|
4278
4278
|
])], 32)
|
|
4279
4279
|
], 32),
|
|
4280
4280
|
t("div", gr, [
|
|
4281
|
-
|
|
4281
|
+
pe(A.$slots, "default", {}, void 0, !0)
|
|
4282
4282
|
])
|
|
4283
4283
|
], 512), [
|
|
4284
4284
|
[xe, d.value === "full" || d.value === "peek" && n.value === "clip-full"]
|
|
@@ -4479,10 +4479,10 @@ const _r = [
|
|
|
4479
4479
|
"stroke-width": "2",
|
|
4480
4480
|
"stroke-linecap": "round",
|
|
4481
4481
|
"stroke-linejoin": "round"
|
|
4482
|
-
}, Pr = { class: "flex justify-start items-center gap-2" }, Lr = { class: "flex-1 flex justify-between items-center min-w-0 ml-1" }, jr = { class: "text-[0.875rem]" },
|
|
4482
|
+
}, Pr = { class: "flex justify-start items-center gap-2" }, Lr = { class: "flex-1 flex justify-between items-center min-w-0 ml-1" }, jr = { class: "text-[0.875rem]" }, zr = {
|
|
4483
4483
|
key: 0,
|
|
4484
4484
|
class: "text-[0.8rem] text-stone-500 shrink-0 ml-2"
|
|
4485
|
-
},
|
|
4485
|
+
}, Fr = {
|
|
4486
4486
|
key: 1,
|
|
4487
4487
|
class: "p-[10px]"
|
|
4488
4488
|
}, Er = { class: "flex justify-start items-center gap-2" }, Dr = { class: "flex-1 flex justify-between items-center min-w-0 ml-1" }, Or = { class: "text-[0.875rem]" }, Rr = {
|
|
@@ -4492,7 +4492,7 @@ const _r = [
|
|
|
4492
4492
|
key: 0,
|
|
4493
4493
|
class: "vs-map-slot-layers z-10 select-none",
|
|
4494
4494
|
style: { display: "flex" }
|
|
4495
|
-
}, Ir = ["title", "onClick"],
|
|
4495
|
+
}, Ir = ["title", "onClick"], Ur = ["src"], Tr = { 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" }, Kr = { class: "vs-mobile-peek-controls px-3 pb-3" }, Hr = {
|
|
4496
4496
|
class: "vs-map-slot-layers--peek z-10 select-none",
|
|
4497
4497
|
style: { position: "static", display: "grid !important", "grid-template-columns": "repeat(3, minmax(0, 1fr))", gap: "12px", width: "100%" }
|
|
4498
4498
|
}, Nr = ["title", "onClick"], Wr = ["src"], qr = { 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" }, Yr = { class: "vs-mobile-peek-controls flex justify-center w-full" }, Gr = { class: "w-full" }, Qr = { class: "legend-panel__header flex items-center justify-between gap-2 py-[7px] pl-[10px] pr-[7px] pb-[12px]" }, Xr = { class: "text-[0.875rem] font-medium text-stone-700" }, Jr = { class: "legend-panel__content overflow-hidden transition-all duration-200 ease-out" }, ei = { class: "p-[10px] pt-0" }, ti = { class: "flex justify-start items-center gap-2" }, li = { class: "flex-1 flex justify-between items-center min-w-0 ml-1" }, oi = { class: "text-[0.875rem]" }, ai = {
|
|
@@ -4526,26 +4526,26 @@ const _r = [
|
|
|
4526
4526
|
let o, d = null;
|
|
4527
4527
|
const w = ct(), n = L(null), f = L(!1), b = L(!1), h = L(!1), g = L(!1);
|
|
4528
4528
|
let x = null, S = null;
|
|
4529
|
-
const v = ["vector-circle", "vector-fill"], M =
|
|
4530
|
-
var
|
|
4531
|
-
return ((
|
|
4532
|
-
}), V =
|
|
4533
|
-
var
|
|
4534
|
-
const
|
|
4529
|
+
const v = ["vector-circle", "vector-fill"], M = K(() => {
|
|
4530
|
+
var D, I;
|
|
4531
|
+
return ((I = (D = w == null ? void 0 : w.appContext.config.globalProperties) == null ? void 0 : D.$settings) == null ? void 0 : I.basemaps) || [];
|
|
4532
|
+
}), V = K(() => (a.layers && a.layers.length ? a.layers : M.value.length ? M.value : _r).map((I, X) => {
|
|
4533
|
+
var ke;
|
|
4534
|
+
const T = I.id || ((ke = I.name) == null ? void 0 : ke.toString().toLowerCase().replace(/\s+/g, "-")) || `layer-${X}`, ce = I.name || I.id || `layer-${X}`;
|
|
4535
4535
|
return {
|
|
4536
|
-
...
|
|
4537
|
-
id:
|
|
4538
|
-
name:
|
|
4536
|
+
...I,
|
|
4537
|
+
id: T,
|
|
4538
|
+
name: ce
|
|
4539
4539
|
};
|
|
4540
|
-
})), p = L(""), m =
|
|
4541
|
-
N(V, (
|
|
4542
|
-
var
|
|
4543
|
-
|
|
4540
|
+
})), p = L(""), m = K(() => V.value.find((D) => D.id === p.value) || V.value[0]);
|
|
4541
|
+
N(V, (D) => {
|
|
4542
|
+
var I;
|
|
4543
|
+
D.length && (!p.value || !D.some((X) => X.id === p.value)) && (p.value = ((I = D[0]) == null ? void 0 : I.id) || "");
|
|
4544
4544
|
}, { immediate: !0 });
|
|
4545
|
-
function
|
|
4546
|
-
return
|
|
4545
|
+
function F(D) {
|
|
4546
|
+
return D ? D.replace("{x}", "2422").replace("{y}", "1400").replace("{z}", "12") : "";
|
|
4547
4547
|
}
|
|
4548
|
-
const
|
|
4548
|
+
const U = L(null), E = L(null), k = K(() => a.showPopup !== !1), C = [
|
|
4549
4549
|
"#1F77B4",
|
|
4550
4550
|
// Blue
|
|
4551
4551
|
"#FF7F0E",
|
|
@@ -4573,33 +4573,33 @@ const _r = [
|
|
|
4573
4573
|
function y() {
|
|
4574
4574
|
if (typeof window > "u")
|
|
4575
4575
|
return { zoom: null, center: null, hasQuery: !1 };
|
|
4576
|
-
const
|
|
4576
|
+
const D = new URLSearchParams(window.location.search), I = Number(D.get("z")), X = Number(D.get("y")), T = Number(D.get("x")), ce = D.has("x") && D.has("y"), ke = D.has("z");
|
|
4577
4577
|
return {
|
|
4578
|
-
zoom:
|
|
4579
|
-
center:
|
|
4580
|
-
hasQuery:
|
|
4578
|
+
zoom: ke ? I : null,
|
|
4579
|
+
center: ce ? [T, X] : null,
|
|
4580
|
+
hasQuery: ce || ke
|
|
4581
4581
|
};
|
|
4582
4582
|
}
|
|
4583
|
-
function D
|
|
4584
|
-
if (!
|
|
4585
|
-
const
|
|
4586
|
-
|
|
4583
|
+
function O(D, I) {
|
|
4584
|
+
if (!D || typeof window > "u") return;
|
|
4585
|
+
const X = new URL(window.location.href);
|
|
4586
|
+
X.searchParams.set("z", I.toFixed(2)), X.searchParams.set("x", D[0].toFixed(6)), X.searchParams.set("y", D[1].toFixed(6)), window.history.replaceState({}, "", X);
|
|
4587
4587
|
}
|
|
4588
4588
|
let Z = !1;
|
|
4589
4589
|
function G() {
|
|
4590
4590
|
if (!o || !Z) return;
|
|
4591
|
-
const
|
|
4592
|
-
|
|
4591
|
+
const D = o.getCenter();
|
|
4592
|
+
O([D.lng, D.lat], o.getZoom());
|
|
4593
4593
|
}
|
|
4594
4594
|
const P = () => {
|
|
4595
4595
|
Z || (Z = !0), G();
|
|
4596
4596
|
};
|
|
4597
|
-
function q(
|
|
4598
|
-
return
|
|
4597
|
+
function q(D) {
|
|
4598
|
+
return D ? ["==", ["to-string", ["get", "id"]], D] : ["==", ["literal", 1], 0];
|
|
4599
4599
|
}
|
|
4600
4600
|
const le = ["in", ["geometry-type"], ["literal", ["Point", "MultiPoint"]]], ee = ["in", ["geometry-type"], ["literal", ["Polygon", "MultiPolygon"]]];
|
|
4601
4601
|
function we() {
|
|
4602
|
-
const
|
|
4602
|
+
const D = q(a.modelValue), I = ["all", D, le], X = ["all", D, ee];
|
|
4603
4603
|
o.getLayer("vector-highlight-circle") || o.addLayer({
|
|
4604
4604
|
id: "vector-highlight-circle",
|
|
4605
4605
|
type: "circle",
|
|
@@ -4623,35 +4623,35 @@ const _r = [
|
|
|
4623
4623
|
"line-width": 3,
|
|
4624
4624
|
"line-opacity": 0.8
|
|
4625
4625
|
}
|
|
4626
|
-
}), o.setFilter("vector-highlight-circle",
|
|
4627
|
-
const
|
|
4628
|
-
o.setLayoutProperty("vector-highlight-circle", "visibility",
|
|
4626
|
+
}), o.setFilter("vector-highlight-circle", I), o.setFilter("vector-highlight-fill", X);
|
|
4627
|
+
const T = a.modelValue ? "visible" : "none";
|
|
4628
|
+
o.setLayoutProperty("vector-highlight-circle", "visibility", T), o.setLayoutProperty("vector-highlight-fill", "visibility", T), be();
|
|
4629
4629
|
}
|
|
4630
|
-
function Ge(
|
|
4630
|
+
function Ge(D) {
|
|
4631
4631
|
if (!o || !_.length) return;
|
|
4632
|
-
const
|
|
4632
|
+
const I = "#ef4444", X = D ? [
|
|
4633
4633
|
"case",
|
|
4634
|
-
["all", ["has", "id"], ["==", ["to-string", ["get", "id"]],
|
|
4635
|
-
|
|
4634
|
+
["all", ["has", "id"], ["==", ["to-string", ["get", "id"]], D]],
|
|
4635
|
+
I,
|
|
4636
4636
|
_
|
|
4637
4637
|
] : _;
|
|
4638
|
-
if (o.getLayer("vector-circle") && o.setPaintProperty("vector-circle", "circle-color",
|
|
4639
|
-
const
|
|
4638
|
+
if (o.getLayer("vector-circle") && o.setPaintProperty("vector-circle", "circle-color", X), o.getLayer("vector-fill")) {
|
|
4639
|
+
const T = D ? [
|
|
4640
4640
|
"case",
|
|
4641
|
-
["all", ["has", "id"], ["==", ["to-string", ["get", "id"]],
|
|
4642
|
-
|
|
4641
|
+
["all", ["has", "id"], ["==", ["to-string", ["get", "id"]], D]],
|
|
4642
|
+
I,
|
|
4643
4643
|
_
|
|
4644
4644
|
] : _;
|
|
4645
|
-
o.setPaintProperty("vector-fill", "fill-color",
|
|
4645
|
+
o.setPaintProperty("vector-fill", "fill-color", T);
|
|
4646
4646
|
}
|
|
4647
4647
|
}
|
|
4648
4648
|
function be() {
|
|
4649
4649
|
if (ye(), !a.modelValue) return;
|
|
4650
|
-
let
|
|
4650
|
+
let D = !0;
|
|
4651
4651
|
s = window.setInterval(() => {
|
|
4652
|
-
|
|
4653
|
-
const
|
|
4654
|
-
o != null && o.getLayer("vector-highlight-circle") && o.setPaintProperty("vector-highlight-circle", "circle-opacity",
|
|
4652
|
+
D = !D;
|
|
4653
|
+
const I = D ? 0.8 : 0.2;
|
|
4654
|
+
o != null && o.getLayer("vector-highlight-circle") && o.setPaintProperty("vector-highlight-circle", "circle-opacity", I), o != null && o.getLayer("vector-highlight-fill") && o.setPaintProperty("vector-highlight-fill", "line-opacity", I);
|
|
4655
4655
|
}, 600);
|
|
4656
4656
|
}
|
|
4657
4657
|
function ye() {
|
|
@@ -4660,14 +4660,14 @@ const _r = [
|
|
|
4660
4660
|
function Qe() {
|
|
4661
4661
|
o && (o.setCenter(a.center || A), o.setZoom(a.zoom || 5));
|
|
4662
4662
|
}
|
|
4663
|
-
function
|
|
4663
|
+
function Be() {
|
|
4664
4664
|
if (!(o != null && o.setLayerZoomRange)) return;
|
|
4665
|
-
const
|
|
4665
|
+
const D = a.minZoom ?? 0, I = Math.min((a.maxZoom ?? 18) + 0.01, 24);
|
|
4666
4666
|
if (a.alwaysShowPolygon)
|
|
4667
|
-
o.getLayer("vector-circle") && o.setLayerZoomRange("vector-circle",
|
|
4667
|
+
o.getLayer("vector-circle") && o.setLayerZoomRange("vector-circle", D, 0), o.getLayer("vector-highlight-circle") && o.setLayerZoomRange("vector-highlight-circle", D, 0), o.getLayer("vector-fill") && o.setLayerZoomRange("vector-fill", D, I), o.getLayer("vector-highlight-fill") && o.setLayerZoomRange("vector-highlight-fill", D, I), o.getLayer(He) && o.setLayerZoomRange(He, D, 0), o.getLayer("vector-cluster-count") && o.setLayerZoomRange("vector-cluster-count", D, 0);
|
|
4668
4668
|
else {
|
|
4669
|
-
const
|
|
4670
|
-
o.getLayer("vector-circle") && o.setLayerZoomRange("vector-circle",
|
|
4669
|
+
const X = a.clusterZoom ?? 12, T = X - 0.01, ce = I;
|
|
4670
|
+
o.getLayer("vector-circle") && o.setLayerZoomRange("vector-circle", D, ce), o.getLayer("vector-highlight-circle") && o.setLayerZoomRange("vector-highlight-circle", D, ce), o.getLayer("vector-fill") && o.setLayerZoomRange("vector-fill", X, I), o.getLayer("vector-highlight-fill") && o.setLayerZoomRange("vector-highlight-fill", X, I), o.getLayer(He) && o.setLayerZoomRange(He, D, T), o.getLayer("vector-cluster-count") && o.setLayerZoomRange("vector-cluster-count", D, T);
|
|
4671
4671
|
}
|
|
4672
4672
|
}
|
|
4673
4673
|
const Ie = y();
|
|
@@ -4678,33 +4678,31 @@ const _r = [
|
|
|
4678
4678
|
closeButton: !1,
|
|
4679
4679
|
closeOnClick: !1
|
|
4680
4680
|
});
|
|
4681
|
-
const
|
|
4682
|
-
if (!
|
|
4683
|
-
const
|
|
4681
|
+
const I = m.value;
|
|
4682
|
+
if (!I) return;
|
|
4683
|
+
const X = Ie.center || a.center || A, T = Ie.zoom || a.zoom || 5;
|
|
4684
4684
|
o = new maplibregl.Map({
|
|
4685
4685
|
container: n.value,
|
|
4686
4686
|
style: {
|
|
4687
4687
|
version: 8,
|
|
4688
4688
|
sources: {
|
|
4689
|
-
[
|
|
4689
|
+
[I.id]: { type: "raster", tiles: [I.url], tileSize: 256 },
|
|
4690
|
+
...I.overlayUrl ? { [`${I.id}-overlay`]: { type: "raster", tiles: [I.overlayUrl], tileSize: 256 } } : {}
|
|
4690
4691
|
},
|
|
4691
|
-
layers: [
|
|
4692
|
-
id:
|
|
4693
|
-
type: "raster",
|
|
4694
|
-
|
|
4695
|
-
minzoom: 0,
|
|
4696
|
-
maxzoom: 19
|
|
4697
|
-
}]
|
|
4692
|
+
layers: [
|
|
4693
|
+
{ id: I.id, type: "raster", source: I.id, minzoom: 0, maxzoom: 19 },
|
|
4694
|
+
...I.overlayUrl ? [{ id: `${I.id}-overlay`, type: "raster", source: `${I.id}-overlay`, minzoom: 0, maxzoom: 19 }] : []
|
|
4695
|
+
]
|
|
4698
4696
|
},
|
|
4699
|
-
center:
|
|
4697
|
+
center: X,
|
|
4700
4698
|
// [lng, lat]
|
|
4701
|
-
zoom:
|
|
4699
|
+
zoom: T,
|
|
4702
4700
|
minZoom: a.minZoom ?? 3,
|
|
4703
4701
|
maxZoom: a.maxZoom ?? 18,
|
|
4704
4702
|
attributionControl: !1
|
|
4705
4703
|
}), i("update:map", o);
|
|
4706
|
-
const
|
|
4707
|
-
if (o.addControl(new maplibregl.NavigationControl(),
|
|
4704
|
+
const ce = a.mobilePeekControls ? "bottom-right" : "top-right";
|
|
4705
|
+
if (o.addControl(new maplibregl.NavigationControl(), ce), a.mobilePeekControls) {
|
|
4708
4706
|
const ue = {
|
|
4709
4707
|
onAdd: () => {
|
|
4710
4708
|
const ae = document.createElement("div");
|
|
@@ -4738,20 +4736,20 @@ const _r = [
|
|
|
4738
4736
|
a.filter,
|
|
4739
4737
|
a.clusterZoom,
|
|
4740
4738
|
a.pointZoom ?? 12
|
|
4741
|
-
), we(), Ge(a.modelValue),
|
|
4739
|
+
), we(), Ge(a.modelValue), Be();
|
|
4742
4740
|
});
|
|
4743
|
-
const
|
|
4741
|
+
const ke = (ue) => {
|
|
4744
4742
|
var re, ve;
|
|
4745
4743
|
const ae = (re = ue.features) == null ? void 0 : re[0];
|
|
4746
4744
|
(ve = ae == null ? void 0 : ae.properties) != null && ve.id && i("update:modelValue", ae.properties.id);
|
|
4747
4745
|
};
|
|
4748
4746
|
v.forEach((ue) => {
|
|
4749
|
-
o.on("click", ue,
|
|
4747
|
+
o.on("click", ue, ke);
|
|
4750
4748
|
}), o.on("click", He, (ue) => {
|
|
4751
|
-
var
|
|
4752
|
-
const ae = (
|
|
4749
|
+
var ze, Se, Ve;
|
|
4750
|
+
const ae = (ze = ue.features) == null ? void 0 : ze[0];
|
|
4753
4751
|
if (!ae) return;
|
|
4754
|
-
const { geometry: re } = ae, ve = (re == null ? void 0 : re.type) === "Point" ? re.coordinates : (
|
|
4752
|
+
const { geometry: re } = ae, ve = (re == null ? void 0 : re.type) === "Point" ? re.coordinates : (Ve = (Se = re == null ? void 0 : re.coordinates) == null ? void 0 : Se[0]) == null ? void 0 : Ve[0];
|
|
4755
4753
|
if (!ve) return;
|
|
4756
4754
|
const je = Math.min(o.getZoom() + 2, o.getMaxZoom());
|
|
4757
4755
|
o.easeTo({ center: ve, zoom: je });
|
|
@@ -4762,9 +4760,9 @@ const _r = [
|
|
|
4762
4760
|
o.getCanvas().style.cursor = "";
|
|
4763
4761
|
});
|
|
4764
4762
|
}), o.on("mousemove", (ue) => {
|
|
4765
|
-
var
|
|
4763
|
+
var ze, Se;
|
|
4766
4764
|
if (!k.value) {
|
|
4767
|
-
(
|
|
4765
|
+
(ze = d == null ? void 0 : d.remove) == null || ze.call(d);
|
|
4768
4766
|
return;
|
|
4769
4767
|
}
|
|
4770
4768
|
if (!d) return;
|
|
@@ -4774,66 +4772,74 @@ const _r = [
|
|
|
4774
4772
|
return;
|
|
4775
4773
|
}
|
|
4776
4774
|
const re = ae[0], { coordinates: ve } = re.geometry, je = re.geometry.type === "Point" ? ve : ve[0][0];
|
|
4777
|
-
E.value = re.properties, d.setLngLat(je).setHTML((
|
|
4775
|
+
E.value = re.properties, d.setLngLat(je).setHTML((Se = U.value) == null ? void 0 : Se.innerHTML).addTo(o);
|
|
4778
4776
|
});
|
|
4779
|
-
}), N(() => a.center, (
|
|
4780
|
-
o && o.setCenter(
|
|
4781
|
-
}), N(() => a.zoom, (
|
|
4782
|
-
o && o.setZoom(
|
|
4783
|
-
}), N(() => a.minZoom, (
|
|
4784
|
-
o && (o.setMinZoom(
|
|
4785
|
-
}), N(() => a.maxZoom, (
|
|
4786
|
-
o && (o.setMaxZoom(
|
|
4777
|
+
}), N(() => a.center, (D) => {
|
|
4778
|
+
o && o.setCenter(D || A);
|
|
4779
|
+
}), N(() => a.zoom, (D) => {
|
|
4780
|
+
o && o.setZoom(D);
|
|
4781
|
+
}), N(() => a.minZoom, (D) => {
|
|
4782
|
+
o && (o.setMinZoom(D ?? 3), Be());
|
|
4783
|
+
}), N(() => a.maxZoom, (D) => {
|
|
4784
|
+
o && (o.setMaxZoom(D ?? 18), Be());
|
|
4787
4785
|
});
|
|
4788
|
-
function
|
|
4786
|
+
function Ke(D, I, X) {
|
|
4789
4787
|
if (!(o != null && o.getSource("vector"))) return;
|
|
4790
|
-
const
|
|
4788
|
+
const T = Gt(
|
|
4791
4789
|
a.table,
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4790
|
+
D ?? a.filter,
|
|
4791
|
+
I ?? a.clusterZoom ?? 12,
|
|
4792
|
+
X ?? a.pointZoom ?? 12
|
|
4795
4793
|
);
|
|
4796
|
-
o.getSource("vector").setTiles([
|
|
4794
|
+
o.getSource("vector").setTiles([T]);
|
|
4797
4795
|
}
|
|
4798
|
-
return N(() => a.filter, (
|
|
4799
|
-
|
|
4800
|
-
}), N(() => a.clusterZoom, (
|
|
4801
|
-
|
|
4802
|
-
}), N(() => a.pointZoom, (
|
|
4803
|
-
|
|
4796
|
+
return N(() => a.filter, (D) => {
|
|
4797
|
+
Ke(D);
|
|
4798
|
+
}), N(() => a.clusterZoom, (D) => {
|
|
4799
|
+
Ke(void 0, D), Be();
|
|
4800
|
+
}), N(() => a.pointZoom, (D) => {
|
|
4801
|
+
Ke(void 0, void 0, D);
|
|
4804
4802
|
}), N(() => a.alwaysShowPolygon, () => {
|
|
4805
|
-
|
|
4806
|
-
}), N(() => a.modelValue, (
|
|
4803
|
+
Be(), Ke();
|
|
4804
|
+
}), N(() => a.modelValue, (D) => {
|
|
4807
4805
|
if (!o) return;
|
|
4808
|
-
const
|
|
4806
|
+
const I = q(D), X = ["all", I, le], T = ["all", I, ee];
|
|
4809
4807
|
if (o.getLayer("vector-highlight-circle")) {
|
|
4810
|
-
o.setFilter("vector-highlight-circle",
|
|
4811
|
-
const
|
|
4812
|
-
o.setLayoutProperty("vector-highlight-circle", "visibility",
|
|
4808
|
+
o.setFilter("vector-highlight-circle", X);
|
|
4809
|
+
const ce = D ? "visible" : "none";
|
|
4810
|
+
o.setLayoutProperty("vector-highlight-circle", "visibility", ce);
|
|
4813
4811
|
}
|
|
4814
4812
|
if (o.getLayer("vector-highlight-fill")) {
|
|
4815
|
-
o.setFilter("vector-highlight-fill",
|
|
4816
|
-
const
|
|
4817
|
-
o.setLayoutProperty("vector-highlight-fill", "visibility",
|
|
4813
|
+
o.setFilter("vector-highlight-fill", T);
|
|
4814
|
+
const ce = D ? "visible" : "none";
|
|
4815
|
+
o.setLayoutProperty("vector-highlight-fill", "visibility", ce);
|
|
4818
4816
|
}
|
|
4819
|
-
Ge(
|
|
4820
|
-
}), N(p, (
|
|
4821
|
-
if (!o || !
|
|
4822
|
-
const
|
|
4823
|
-
if (!
|
|
4824
|
-
o.getLayer(
|
|
4825
|
-
const
|
|
4817
|
+
Ge(D), D ? be() : ye();
|
|
4818
|
+
}), N(p, (D, I) => {
|
|
4819
|
+
if (!o || !D) return;
|
|
4820
|
+
const X = V.value.find((ke) => ke.id === D);
|
|
4821
|
+
if (!X) return;
|
|
4822
|
+
o.getLayer(I) && o.removeLayer(I), o.getSource(I) && o.removeSource(I);
|
|
4823
|
+
const T = `${I}-overlay`;
|
|
4824
|
+
o.getLayer(T) && o.removeLayer(T), o.getSource(T) && o.removeSource(T), o.addSource(D, { type: "raster", tiles: [X.url], tileSize: 256 }), X.overlayUrl && o.addSource(`${D}-overlay`, { type: "raster", tiles: [X.overlayUrl], tileSize: 256 });
|
|
4825
|
+
const ce = o.getLayer("vector-clusters") ? "vector-clusters" : o.getLayer("vector-circle") ? "vector-circle" : void 0;
|
|
4826
4826
|
o.addLayer({
|
|
4827
|
-
id:
|
|
4827
|
+
id: X.id,
|
|
4828
4828
|
type: "raster",
|
|
4829
|
-
source:
|
|
4829
|
+
source: X.id,
|
|
4830
4830
|
minzoom: 0,
|
|
4831
4831
|
maxzoom: 19
|
|
4832
|
-
},
|
|
4833
|
-
|
|
4832
|
+
}, ce), X.overlayUrl && o.addLayer({
|
|
4833
|
+
id: `${D}-overlay`,
|
|
4834
|
+
type: "raster",
|
|
4835
|
+
source: `${D}-overlay`,
|
|
4836
|
+
minzoom: 0,
|
|
4837
|
+
maxzoom: 19
|
|
4838
|
+
}, ce);
|
|
4839
|
+
}), Ue(() => {
|
|
4834
4840
|
ye(), o && (o.off("moveend", P), o.off("zoomend", P), o.remove());
|
|
4835
|
-
}), (
|
|
4836
|
-
const
|
|
4841
|
+
}), (D, I) => {
|
|
4842
|
+
const X = nl("tooltip");
|
|
4837
4843
|
return se((u(), c("div", Mr, [
|
|
4838
4844
|
t("div", {
|
|
4839
4845
|
ref_key: "mapContainer",
|
|
@@ -4845,7 +4851,7 @@ const _r = [
|
|
|
4845
4851
|
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",
|
|
4846
4852
|
title: "Повернутися до базового вигляду",
|
|
4847
4853
|
onClick: Qe
|
|
4848
|
-
}, [...
|
|
4854
|
+
}, [...I[3] || (I[3] = [
|
|
4849
4855
|
t("svg", {
|
|
4850
4856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4851
4857
|
class: "w-4 h-4",
|
|
@@ -4860,66 +4866,66 @@ const _r = [
|
|
|
4860
4866
|
t("path", { d: "M5 9v10h4v-6h6v6h4V9" })
|
|
4861
4867
|
], -1)
|
|
4862
4868
|
])])), [
|
|
4863
|
-
[
|
|
4869
|
+
[X, "Повернутися до базового вигляду"]
|
|
4864
4870
|
]),
|
|
4865
4871
|
t("div", {
|
|
4866
4872
|
class: H(["absolute left-[20px] bottom-[74px] bg-white rounded-lg z-10 border legend-panel", { "legend-panel--has-header": a.legendTitle || a.isCollapsible }]),
|
|
4867
|
-
style:
|
|
4873
|
+
style: Fe(a.legendWidth ? { width: a.legendWidth } : { maxWidth: "250px" })
|
|
4868
4874
|
}, [
|
|
4869
4875
|
a.legendTitle || a.isCollapsible ? (u(), c(Y, { key: 0 }, [
|
|
4870
4876
|
t("div", Sr, [
|
|
4871
|
-
a.legendTitle ? (u(), c("span", Vr,
|
|
4877
|
+
a.legendTitle ? (u(), c("span", Vr, R(a.legendTitle), 1)) : z("", !0),
|
|
4872
4878
|
a.isCollapsible ? (u(), c("button", {
|
|
4873
4879
|
key: 1,
|
|
4874
4880
|
type: "button",
|
|
4875
4881
|
class: "legend-panel__toggle ml-auto shrink-0 p-1.5 rounded-full hover:bg-stone-100 text-stone-600",
|
|
4876
4882
|
"aria-label": b.value ? "Згорнути легенду" : "Розгорнути легенду",
|
|
4877
|
-
onClick:
|
|
4883
|
+
onClick: I[0] || (I[0] = (T) => b.value = !b.value)
|
|
4878
4884
|
}, [
|
|
4879
|
-
b.value ? (u(), c("svg", Br, [...
|
|
4885
|
+
b.value ? (u(), c("svg", Br, [...I[4] || (I[4] = [
|
|
4880
4886
|
t("path", { d: "M6 9l6 6 6-6" }, null, -1)
|
|
4881
|
-
])])) : (u(), c("svg", Ar, [...
|
|
4887
|
+
])])) : (u(), c("svg", Ar, [...I[5] || (I[5] = [
|
|
4882
4888
|
t("path", { d: "m18 15-6-6-6 6" }, null, -1)
|
|
4883
4889
|
])]))
|
|
4884
|
-
], 8, $r)) :
|
|
4890
|
+
], 8, $r)) : z("", !0)
|
|
4885
4891
|
]),
|
|
4886
4892
|
t("div", {
|
|
4887
4893
|
class: "legend-panel__content overflow-hidden transition-all duration-200 ease-out",
|
|
4888
|
-
style:
|
|
4894
|
+
style: Fe(a.isCollapsible && !b.value ? { maxHeight: "0", padding: "0", margin: "0", opacity: "0" } : {})
|
|
4889
4895
|
}, [
|
|
4890
4896
|
t("div", {
|
|
4891
4897
|
class: H(["p-[10px]", b.value && (l(j) || []).length ? "pt-0" : "pt-2"])
|
|
4892
4898
|
}, [
|
|
4893
|
-
(u(!0), c(Y, null, ie(l(j) || [], (
|
|
4899
|
+
(u(!0), c(Y, null, ie(l(j) || [], (T) => (u(), c("div", {
|
|
4894
4900
|
class: "legend-item",
|
|
4895
|
-
key:
|
|
4901
|
+
key: T.id
|
|
4896
4902
|
}, [
|
|
4897
4903
|
t("div", Pr, [
|
|
4898
4904
|
t("div", {
|
|
4899
4905
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
|
4900
|
-
style:
|
|
4906
|
+
style: Fe("background-color:" + T.color)
|
|
4901
4907
|
}, null, 4),
|
|
4902
4908
|
t("div", Lr, [
|
|
4903
|
-
t("span", jr,
|
|
4904
|
-
|
|
4909
|
+
t("span", jr, R(T.text), 1),
|
|
4910
|
+
T.count != null ? (u(), c("span", zr, R(T.count), 1)) : z("", !0)
|
|
4905
4911
|
])
|
|
4906
4912
|
])
|
|
4907
4913
|
]))), 128))
|
|
4908
4914
|
], 2)
|
|
4909
4915
|
], 4)
|
|
4910
|
-
], 64)) : (u(), c("div",
|
|
4911
|
-
(u(!0), c(Y, null, ie(l(j) || [], (
|
|
4916
|
+
], 64)) : (u(), c("div", Fr, [
|
|
4917
|
+
(u(!0), c(Y, null, ie(l(j) || [], (T) => (u(), c("div", {
|
|
4912
4918
|
class: "legend-item",
|
|
4913
|
-
key:
|
|
4919
|
+
key: T.id
|
|
4914
4920
|
}, [
|
|
4915
4921
|
t("div", Er, [
|
|
4916
4922
|
t("div", {
|
|
4917
4923
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
|
4918
|
-
style:
|
|
4924
|
+
style: Fe("background-color:" + T.color)
|
|
4919
4925
|
}, null, 4),
|
|
4920
4926
|
t("div", Dr, [
|
|
4921
|
-
t("span", Or,
|
|
4922
|
-
|
|
4927
|
+
t("span", Or, R(T.text), 1),
|
|
4928
|
+
T.count != null ? (u(), c("span", Rr, R(T.count), 1)) : z("", !0)
|
|
4923
4929
|
])
|
|
4924
4930
|
])
|
|
4925
4931
|
]))), 128))
|
|
@@ -4927,25 +4933,25 @@ const _r = [
|
|
|
4927
4933
|
], 6),
|
|
4928
4934
|
t("div", {
|
|
4929
4935
|
ref_key: "popupDiv",
|
|
4930
|
-
ref:
|
|
4936
|
+
ref: U,
|
|
4931
4937
|
style: { display: "none" }
|
|
4932
4938
|
}, [
|
|
4933
|
-
|
|
4939
|
+
pe(D.$slots, "default", { hoverData: E.value })
|
|
4934
4940
|
], 512),
|
|
4935
|
-
a.mobilePeekControls ?
|
|
4936
|
-
(u(!0), c(Y, null, ie(V.value, (
|
|
4937
|
-
key:
|
|
4938
|
-
title:
|
|
4939
|
-
class: H(["vs-map-slot-layers__layer relative", { focused: p.value ===
|
|
4940
|
-
onClick: (
|
|
4941
|
+
a.mobilePeekControls ? z("", !0) : (u(), c("div", Zr, [
|
|
4942
|
+
(u(!0), c(Y, null, ie(V.value, (T) => se((u(), c("div", {
|
|
4943
|
+
key: T.id,
|
|
4944
|
+
title: T.name,
|
|
4945
|
+
class: H(["vs-map-slot-layers__layer relative", { focused: p.value === T.id }]),
|
|
4946
|
+
onClick: (ce) => p.value = T.id
|
|
4941
4947
|
}, [
|
|
4942
4948
|
t("img", {
|
|
4943
|
-
src:
|
|
4949
|
+
src: T.preview || F(T.url),
|
|
4944
4950
|
class: "vs-map-slot-layers__image"
|
|
4945
|
-
}, null, 8,
|
|
4946
|
-
t("div",
|
|
4951
|
+
}, null, 8, Ur),
|
|
4952
|
+
t("div", Tr, R(T.name), 1)
|
|
4947
4953
|
], 10, Ir)), [
|
|
4948
|
-
[
|
|
4954
|
+
[X, T.name]
|
|
4949
4955
|
])), 128))
|
|
4950
4956
|
])),
|
|
4951
4957
|
a.mobilePeekControls ? (u(), Q(We, {
|
|
@@ -4955,31 +4961,31 @@ const _r = [
|
|
|
4955
4961
|
"initial-variant": "peek",
|
|
4956
4962
|
"peek-mode": "clip-full",
|
|
4957
4963
|
"allow-expand": !1,
|
|
4958
|
-
onClose:
|
|
4964
|
+
onClose: I[1] || (I[1] = (T) => h.value = !1)
|
|
4959
4965
|
}, {
|
|
4960
4966
|
default: ge(() => [
|
|
4961
|
-
t("div",
|
|
4967
|
+
t("div", Kr, [
|
|
4962
4968
|
t("div", Hr, [
|
|
4963
|
-
(u(!0), c(Y, null, ie(V.value, (
|
|
4964
|
-
key:
|
|
4965
|
-
title:
|
|
4966
|
-
class: H(["vs-map-slot-layers__layer relative", { focused: p.value ===
|
|
4967
|
-
onClick: (
|
|
4969
|
+
(u(!0), c(Y, null, ie(V.value, (T) => se((u(), c("div", {
|
|
4970
|
+
key: T.id,
|
|
4971
|
+
title: T.name,
|
|
4972
|
+
class: H(["vs-map-slot-layers__layer relative", { focused: p.value === T.id }]),
|
|
4973
|
+
onClick: (ce) => p.value = T.id
|
|
4968
4974
|
}, [
|
|
4969
4975
|
t("img", {
|
|
4970
|
-
src:
|
|
4976
|
+
src: T.preview || F(T.url),
|
|
4971
4977
|
class: "vs-map-slot-layers__image",
|
|
4972
4978
|
style: { width: "100%", height: "100", "object-fit": "cover", display: "block" }
|
|
4973
4979
|
}, null, 8, Wr),
|
|
4974
|
-
t("div", qr,
|
|
4980
|
+
t("div", qr, R(T.name), 1)
|
|
4975
4981
|
], 10, Nr)), [
|
|
4976
|
-
[
|
|
4982
|
+
[X, T.name]
|
|
4977
4983
|
])), 128))
|
|
4978
4984
|
])
|
|
4979
4985
|
])
|
|
4980
4986
|
]),
|
|
4981
4987
|
_: 1
|
|
4982
|
-
}, 8, ["open"])) :
|
|
4988
|
+
}, 8, ["open"])) : z("", !0),
|
|
4983
4989
|
a.mobilePeekControls ? (u(), Q(We, {
|
|
4984
4990
|
key: 2,
|
|
4985
4991
|
open: g.value,
|
|
@@ -4987,28 +4993,28 @@ const _r = [
|
|
|
4987
4993
|
"initial-variant": "peek",
|
|
4988
4994
|
"peek-mode": "clip-full",
|
|
4989
4995
|
"peek-height-px": 200,
|
|
4990
|
-
onClose:
|
|
4996
|
+
onClose: I[2] || (I[2] = (T) => g.value = !1)
|
|
4991
4997
|
}, {
|
|
4992
4998
|
default: ge(() => [
|
|
4993
4999
|
t("div", Yr, [
|
|
4994
5000
|
t("div", Gr, [
|
|
4995
5001
|
t("div", Qr, [
|
|
4996
|
-
t("span", Xr,
|
|
5002
|
+
t("span", Xr, R(a.legendTitle || "Легенда"), 1)
|
|
4997
5003
|
]),
|
|
4998
5004
|
t("div", Jr, [
|
|
4999
5005
|
t("div", ei, [
|
|
5000
|
-
(u(!0), c(Y, null, ie(l(j) || [], (
|
|
5006
|
+
(u(!0), c(Y, null, ie(l(j) || [], (T) => (u(), c("div", {
|
|
5001
5007
|
class: "legend-item",
|
|
5002
|
-
key:
|
|
5008
|
+
key: T.id
|
|
5003
5009
|
}, [
|
|
5004
5010
|
t("div", ti, [
|
|
5005
5011
|
t("div", {
|
|
5006
5012
|
class: "w-[15px] h-[15px] rounded-[50%] min-w-[15px]",
|
|
5007
|
-
style:
|
|
5013
|
+
style: Fe("background-color:" + T.color)
|
|
5008
5014
|
}, null, 4),
|
|
5009
5015
|
t("div", li, [
|
|
5010
|
-
t("span", oi,
|
|
5011
|
-
|
|
5016
|
+
t("span", oi, R(T.text), 1),
|
|
5017
|
+
T.count != null ? (u(), c("span", ai, R(T.count), 1)) : z("", !0)
|
|
5012
5018
|
])
|
|
5013
5019
|
])
|
|
5014
5020
|
]))), 128))
|
|
@@ -5018,7 +5024,7 @@ const _r = [
|
|
|
5018
5024
|
])
|
|
5019
5025
|
]),
|
|
5020
5026
|
_: 1
|
|
5021
|
-
}, 8, ["open"])) :
|
|
5027
|
+
}, 8, ["open"])) : z("", !0)
|
|
5022
5028
|
], 512)), [
|
|
5023
5029
|
[xe, f.value]
|
|
5024
5030
|
]);
|
|
@@ -5139,7 +5145,7 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5139
5145
|
class: H(["pointer-events-auto py-2 px-3 h-[44px] inline-flex items-center gap-x-2 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", { "bg-stone-50": e.activeModal === "search" }]),
|
|
5140
5146
|
onClick: a[0] || (a[0] = (i) => r.$emit("openSearch"))
|
|
5141
5147
|
}, [
|
|
5142
|
-
|
|
5148
|
+
J(pi)
|
|
5143
5149
|
], 2),
|
|
5144
5150
|
t("button", {
|
|
5145
5151
|
type: "button",
|
|
@@ -5147,19 +5153,19 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5147
5153
|
disabled: e.filtersDisabled,
|
|
5148
5154
|
onClick: a[1] || (a[1] = (i) => r.$emit("openFilters"))
|
|
5149
5155
|
}, [
|
|
5150
|
-
|
|
5156
|
+
J(si, {
|
|
5151
5157
|
"stroke-width": 1,
|
|
5152
5158
|
class: "text-gray-900"
|
|
5153
5159
|
}),
|
|
5154
5160
|
a[3] || (a[3] = t("span", { class: "font-medium" }, "Фільтри", -1)),
|
|
5155
|
-
e.hasActiveFilters && !e.filtersDisabled ? (u(), c("span", xi)) :
|
|
5161
|
+
e.hasActiveFilters && !e.filtersDisabled ? (u(), c("span", xi)) : z("", !0)
|
|
5156
5162
|
], 10, bi),
|
|
5157
5163
|
t("button", {
|
|
5158
5164
|
type: "button",
|
|
5159
5165
|
class: H(["pointer-events-auto py-2 px-3 h-[44px] inline-flex items-center gap-x-2 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", { "bg-stone-50": e.activeModal === "table" }]),
|
|
5160
5166
|
onClick: a[2] || (a[2] = (i) => r.$emit("openTable"))
|
|
5161
5167
|
}, [
|
|
5162
|
-
|
|
5168
|
+
J(hi, {
|
|
5163
5169
|
"stroke-width": 1,
|
|
5164
5170
|
class: "text-gray-900"
|
|
5165
5171
|
}),
|
|
@@ -5186,16 +5192,16 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5186
5192
|
}, Bi = { class: "flex flex-col flex-1 min-h-0 overflow-hidden" }, Ai = { id: "active-filters" }, Pi = { class: "flex-1 min-h-0" }, Li = {
|
|
5187
5193
|
key: 1,
|
|
5188
5194
|
class: "text-sm text-stone-500"
|
|
5189
|
-
}, ji = { class: "wrapperTable flex flex-col min-h-0" },
|
|
5195
|
+
}, ji = { class: "wrapperTable flex flex-col min-h-0" }, zi = {
|
|
5190
5196
|
key: 1,
|
|
5191
5197
|
class: "text-center py-12"
|
|
5192
|
-
},
|
|
5198
|
+
}, Fi = {
|
|
5193
5199
|
key: 0,
|
|
5194
5200
|
class: "mt-4 pt-4 border-t border-stone-200"
|
|
5195
|
-
}, Ei = ["onClick"], Di = { class: "w-full gap-5 inline-flex mb-[6px] pr-3" }, Oi = { class: "flex items-center" }, Ri = ["title"], Zi = { class: "max-[1000px]:flex gap-2 min-[1001px]:hidden" }, Ii = { class: "flex" },
|
|
5201
|
+
}, Ei = ["onClick"], Di = { class: "w-full gap-5 inline-flex mb-[6px] pr-3" }, Oi = { class: "flex items-center" }, Ri = ["title"], Zi = { class: "max-[1000px]:flex gap-2 min-[1001px]:hidden" }, Ii = { class: "flex" }, Ui = {
|
|
5196
5202
|
key: 0,
|
|
5197
5203
|
class: "flex items-center py-[15px] pb-[24px] pl-2 pr-6 gap-4"
|
|
5198
|
-
},
|
|
5204
|
+
}, Ti = { class: "font-bold text-2xl mr-[10px]" }, Ki = { class: "text-sm text-stone-500 font-medium" }, Hi = {
|
|
5199
5205
|
key: 0,
|
|
5200
5206
|
class: "inline-flex items-center gap-2 text-sm text-stone-700 select-none ml-auto mt-auto"
|
|
5201
5207
|
}, Ni = {
|
|
@@ -5263,44 +5269,44 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5263
5269
|
if (!$ || $.type === "Point" || $.type === "MultiPoint") return null;
|
|
5264
5270
|
const B = o($);
|
|
5265
5271
|
if (!B.length) return null;
|
|
5266
|
-
let ne = 1 / 0, W = 1 / 0,
|
|
5267
|
-
return B.forEach(([oe,
|
|
5268
|
-
oe < ne && (ne = oe),
|
|
5269
|
-
}), [[ne, W], [
|
|
5272
|
+
let ne = 1 / 0, W = 1 / 0, Ce = -1 / 0, fe = -1 / 0;
|
|
5273
|
+
return B.forEach(([oe, _e]) => {
|
|
5274
|
+
oe < ne && (ne = oe), _e < W && (W = _e), oe > Ce && (Ce = oe), _e > fe && (fe = _e);
|
|
5275
|
+
}), [[ne, W], [Ce, fe]];
|
|
5270
5276
|
}
|
|
5271
5277
|
function w($) {
|
|
5272
5278
|
return ($ == null ? void 0 : $.type) === "Polygon" || ($ == null ? void 0 : $.type) === "MultiPolygon";
|
|
5273
5279
|
}
|
|
5274
|
-
const n = e, f = Ye(), b =
|
|
5280
|
+
const n = e, f = Ye(), b = K(
|
|
5275
5281
|
() => n.mobileFilterView ?? "vertical"
|
|
5276
|
-
), h =
|
|
5282
|
+
), h = K(() => n.mobileFilterLimit !== void 0 ? { limit: n.mobileFilterLimit } : {}), g = r, x = L(0);
|
|
5277
5283
|
x.value = n.initTotal ?? ((bt = n.rows) == null ? void 0 : bt.length) ?? 0;
|
|
5278
5284
|
const S = L(""), v = L(null), M = L(!0), V = L(((xt = n.rows) == null ? void 0 : xt.length) === 1), p = L(!1);
|
|
5279
5285
|
let m = null;
|
|
5280
|
-
const
|
|
5281
|
-
typeof window < "u" && (m = window.matchMedia(Ot),
|
|
5282
|
-
const
|
|
5286
|
+
const F = L(!1);
|
|
5287
|
+
typeof window < "u" && (m = window.matchMedia(Ot), F.value = m.matches, p.value = !0);
|
|
5288
|
+
const U = L(n.rows), E = L(1), k = L(20), C = L(n.filters || []), j = L(""), A = L({}), s = K(() => Object.values(A.value).some(($) => Array.isArray($) ? $.some((B) => B != null && B !== "") : $ && typeof $ == "object" ? Object.values($).some((B) => B != null && B !== "") : $ === null ? !0 : $ !== void 0 && $ !== "")), _ = L(((wt = n.rows) == null ? void 0 : wt.length) === 1 ? n.rows[0] : {}), y = L(((kt = n.rows) == null ? void 0 : kt.length) === 1 ? n.rows[0].id : ""), O = L(((Ct = n.rows) == null ? void 0 : Ct.length) === 1 ? i((_t = n.rows[0]) == null ? void 0 : _t.geom) : n.center || null), Z = L(((Mt = n.rows) == null ? void 0 : Mt.length) === 1 ? 14 : n.zoom || 5), G = L(!1), P = L(!1), q = L("");
|
|
5283
5289
|
let le = !1;
|
|
5284
5290
|
const ee = L(null), we = L(!1);
|
|
5285
5291
|
function Ge() {
|
|
5286
5292
|
if (!m) return;
|
|
5287
|
-
const $ =
|
|
5288
|
-
|
|
5293
|
+
const $ = F.value;
|
|
5294
|
+
F.value = m.matches, $ !== F.value && (ee.value = null, Pe(() => {
|
|
5289
5295
|
var B, ne;
|
|
5290
5296
|
(ne = (B = v.value) == null ? void 0 : B.resize) == null || ne.call(B);
|
|
5291
5297
|
}));
|
|
5292
5298
|
}
|
|
5293
|
-
const be = L(null), ye = L(null), Qe =
|
|
5299
|
+
const be = L(null), ye = L(null), Qe = K(() => {
|
|
5294
5300
|
var $;
|
|
5295
5301
|
return V.value && !(($ = _.value) != null && $.geom);
|
|
5296
|
-
}),
|
|
5302
|
+
}), Be = K({
|
|
5297
5303
|
get: () => Qe.value ? "" : y.value,
|
|
5298
5304
|
set: ($) => {
|
|
5299
|
-
y.value = $,
|
|
5305
|
+
y.value = $, F.value && ($ ? (we.value = !0, ee.value = "details") : ee.value === "details" && (ee.value = null));
|
|
5300
5306
|
}
|
|
5301
5307
|
});
|
|
5302
5308
|
function Ie() {
|
|
5303
|
-
var fe, oe,
|
|
5309
|
+
var fe, oe, _e;
|
|
5304
5310
|
if (n.alwaysShowPolygon) {
|
|
5305
5311
|
be.value = null, ye.value = null;
|
|
5306
5312
|
return;
|
|
@@ -5319,28 +5325,28 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5319
5325
|
be.value = null, ye.value = null;
|
|
5320
5326
|
return;
|
|
5321
5327
|
}
|
|
5322
|
-
const ne = (
|
|
5323
|
-
if (W != null && W <
|
|
5328
|
+
const ne = (_e = (oe = v.value).cameraForBounds) == null ? void 0 : _e.call(oe, B, { padding: 20, maxZoom: 16 }), W = ne == null ? void 0 : ne.zoom, Ce = n.clusterZoom ?? 12;
|
|
5329
|
+
if (W != null && W < Ce) {
|
|
5324
5330
|
const St = Math.floor(W);
|
|
5325
5331
|
be.value = St, ye.value = St;
|
|
5326
5332
|
} else
|
|
5327
5333
|
be.value = null, ye.value = null;
|
|
5328
5334
|
}
|
|
5329
|
-
function
|
|
5335
|
+
function Ke($) {
|
|
5330
5336
|
return Object.entries($).filter(([, B]) => Array.isArray(B) ? B.length : B).map(([B, ne]) => `${B}=${ne}`).join("|");
|
|
5331
5337
|
}
|
|
5332
|
-
function
|
|
5333
|
-
var W,
|
|
5338
|
+
function D() {
|
|
5339
|
+
var W, Ce, fe, oe;
|
|
5334
5340
|
if (!v.value || !P.value) return;
|
|
5335
|
-
const $ = (
|
|
5341
|
+
const $ = (Ce = (W = v.value).getBounds) == null ? void 0 : Ce.call(W);
|
|
5336
5342
|
if (!$) return;
|
|
5337
5343
|
const B = (fe = $.getSouthWest) == null ? void 0 : fe.call($), ne = (oe = $.getNorthEast) == null ? void 0 : oe.call($);
|
|
5338
5344
|
!B || !ne || (q.value = `${B.lng} ${B.lat},${ne.lng} ${ne.lat}`);
|
|
5339
5345
|
}
|
|
5340
|
-
async function
|
|
5346
|
+
async function I($ = !1) {
|
|
5341
5347
|
await Pe();
|
|
5342
|
-
const B =
|
|
5343
|
-
j.value = B, P.value ?
|
|
5348
|
+
const B = Ke(A.value);
|
|
5349
|
+
j.value = B, P.value ? D() : q.value = "";
|
|
5344
5350
|
try {
|
|
5345
5351
|
const ne = {
|
|
5346
5352
|
search: S.value,
|
|
@@ -5348,17 +5354,17 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5348
5354
|
page: E.value.toString(),
|
|
5349
5355
|
filter: B,
|
|
5350
5356
|
...P.value && q.value ? { bbox: q.value } : {}
|
|
5351
|
-
}, W = new URL(`/api/data/${n.table}`, window.location.origin) + (y.value ? `/${y.value}` : ""),
|
|
5357
|
+
}, W = new URL(`/api/data/${n.table}`, window.location.origin) + (y.value ? `/${y.value}` : ""), Ce = new URLSearchParams(ne).toString(), fe = await fetch(`${W.toString()}?${Ce}`).then((oe) => oe.json());
|
|
5352
5358
|
if (y.value) {
|
|
5353
5359
|
let oe;
|
|
5354
|
-
if (fe.rows.length > 1 ? oe = fe.rows.find((
|
|
5355
|
-
const
|
|
5356
|
-
|
|
5360
|
+
if (fe.rows.length > 1 ? oe = fe.rows.find((_e) => _e.id === y.value) : [oe] = fe.rows, _.value = oe, !$ && (oe != null && oe.geom)) {
|
|
5361
|
+
const _e = n.polygonFitBbox ? d(oe.geom) : null;
|
|
5362
|
+
_e && v.value ? v.value.fitBounds(_e, { padding: 20, maxZoom: 16, duration: 500 }) : (O.value = i(oe.geom), Z.value = 14);
|
|
5357
5363
|
}
|
|
5358
5364
|
Ie(), V.value = !0;
|
|
5359
5365
|
} else
|
|
5360
|
-
be.value = null, ye.value = null, V.value = !1, G.value || (Z.value = n.zoom || 5),
|
|
5361
|
-
G.value = !1, x.value = fe.filtered,
|
|
5366
|
+
be.value = null, ye.value = null, V.value = !1, G.value || (Z.value = n.zoom || 5), U.value = fe == null ? void 0 : fe.rows;
|
|
5367
|
+
G.value = !1, x.value = fe.filtered, Fn({
|
|
5362
5368
|
page: E.value,
|
|
5363
5369
|
filter: B,
|
|
5364
5370
|
id: y.value,
|
|
@@ -5368,21 +5374,21 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5368
5374
|
console.error(ne.message);
|
|
5369
5375
|
}
|
|
5370
5376
|
}
|
|
5371
|
-
const
|
|
5372
|
-
function
|
|
5373
|
-
!v.value || le || !P.value || (v.value.on("moveend",
|
|
5377
|
+
const X = zt(() => I(), 300), T = zt(() => I(!0), 400);
|
|
5378
|
+
function ce() {
|
|
5379
|
+
!v.value || le || !P.value || (v.value.on("moveend", T), v.value.on("zoomend", T), le = !0);
|
|
5374
5380
|
}
|
|
5375
|
-
function
|
|
5376
|
-
!v.value || !le || (v.value.off("moveend",
|
|
5381
|
+
function ke() {
|
|
5382
|
+
!v.value || !le || (v.value.off("moveend", T), v.value.off("zoomend", T), le = !1);
|
|
5377
5383
|
}
|
|
5378
5384
|
function Je($) {
|
|
5379
|
-
k.value = $, E.value = 1,
|
|
5385
|
+
k.value = $, E.value = 1, I();
|
|
5380
5386
|
}
|
|
5381
5387
|
function ue($) {
|
|
5382
|
-
E.value = $,
|
|
5388
|
+
E.value = $, I();
|
|
5383
5389
|
}
|
|
5384
5390
|
function ae($) {
|
|
5385
|
-
A.value = $.data, E.value = 1, y.value ? y.value = "" :
|
|
5391
|
+
A.value = $.data, E.value = 1, y.value ? y.value = "" : I(), g("change:filter", $);
|
|
5386
5392
|
}
|
|
5387
5393
|
async function re() {
|
|
5388
5394
|
if (n.filters) return;
|
|
@@ -5390,64 +5396,64 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5390
5396
|
C.value = B.list;
|
|
5391
5397
|
}
|
|
5392
5398
|
function ve() {
|
|
5393
|
-
A.value = {}, S.value = "",
|
|
5399
|
+
A.value = {}, S.value = "", I();
|
|
5394
5400
|
}
|
|
5395
5401
|
De(async () => {
|
|
5396
5402
|
var ne, W;
|
|
5397
|
-
m || (m = window.matchMedia(Ot)), p.value || (
|
|
5403
|
+
m || (m = window.matchMedia(Ot)), p.value || (F.value = m.matches, p.value = !0), m.addEventListener("change", Ge), F.value && (M.value = !1);
|
|
5398
5404
|
const $ = new URLSearchParams(window.location.search);
|
|
5399
5405
|
E.value = Number($.get("page")) || 1, k.value = Number($.get("limit")) || k.value, y.value = $.get("id") || "", V.value = !!y.value, j.value = $.get("filter") || "";
|
|
5400
5406
|
const B = $.get("bbox");
|
|
5401
|
-
B !== null ? P.value = B !== "0" : P.value = !1, (W = (ne = $.get("filter")) == null ? void 0 : ne.split("|")) == null || W.forEach((
|
|
5402
|
-
const [fe, oe] =
|
|
5407
|
+
B !== null ? P.value = B !== "0" : P.value = !1, (W = (ne = $.get("filter")) == null ? void 0 : ne.split("|")) == null || W.forEach((Ce) => {
|
|
5408
|
+
const [fe, oe] = Ce.split("=");
|
|
5403
5409
|
fe && (A.value[fe] = oe != null && oe.includes(",") ? oe.split(",") : [oe]);
|
|
5404
|
-
}), re(), !
|
|
5405
|
-
}),
|
|
5406
|
-
m == null || m.removeEventListener("change", Ge),
|
|
5410
|
+
}), re(), !U.value && !y.value && I();
|
|
5411
|
+
}), Ue(() => {
|
|
5412
|
+
m == null || m.removeEventListener("change", Ge), ke();
|
|
5407
5413
|
});
|
|
5408
5414
|
function je() {
|
|
5409
5415
|
G.value = !0, V.value = !1, _.value = null, y.value = "", be.value = null, ye.value = null;
|
|
5410
5416
|
}
|
|
5411
|
-
function
|
|
5417
|
+
function ze($) {
|
|
5412
5418
|
ee.value = $;
|
|
5413
5419
|
}
|
|
5414
|
-
function
|
|
5420
|
+
function Se() {
|
|
5415
5421
|
ee.value = null;
|
|
5416
5422
|
}
|
|
5417
|
-
async function
|
|
5423
|
+
async function Ve() {
|
|
5418
5424
|
var $, B;
|
|
5419
5425
|
await Pe(), (B = ($ = v.value) == null ? void 0 : $.resize) == null || B.call($);
|
|
5420
5426
|
}
|
|
5421
5427
|
function st() {
|
|
5422
|
-
je(),
|
|
5428
|
+
je(), Se();
|
|
5423
5429
|
}
|
|
5424
5430
|
function et($) {
|
|
5425
5431
|
if (we.value = !0, $ != null && $.geom) {
|
|
5426
5432
|
const B = n.polygonFitBbox ? d($.geom) : null;
|
|
5427
|
-
B && v.value ? v.value.fitBounds(B, { padding: 20, maxZoom: 16, duration: 500 }) : (
|
|
5433
|
+
B && v.value ? v.value.fitBounds(B, { padding: 20, maxZoom: 16, duration: 500 }) : (O.value = i($.geom), Z.value = 16);
|
|
5428
5434
|
}
|
|
5429
|
-
_.value = $, y.value = $.id, Ie(),
|
|
5435
|
+
_.value = $, y.value = $.id, Ie(), F.value && (ee.value = "details");
|
|
5430
5436
|
}
|
|
5431
5437
|
return N(ee, async () => {
|
|
5432
5438
|
var $, B;
|
|
5433
5439
|
await Pe(), (B = ($ = v.value) == null ? void 0 : $.resize) == null || B.call($);
|
|
5434
5440
|
}), N(v, ($) => {
|
|
5435
5441
|
var B;
|
|
5436
|
-
g("update:map", $), $ && P.value &&
|
|
5442
|
+
g("update:map", $), $ && P.value && ce(), $ && n.polygonFitBbox && ((B = _.value) != null && B.geom) && Ie();
|
|
5437
5443
|
}), N(S, ($) => {
|
|
5438
|
-
$ ||
|
|
5444
|
+
$ || I();
|
|
5439
5445
|
}), N(y, () => {
|
|
5440
|
-
|
|
5446
|
+
I();
|
|
5441
5447
|
}), N(P, () => {
|
|
5442
|
-
P.value ?
|
|
5448
|
+
P.value ? ce() : ke(), I();
|
|
5443
5449
|
}), ($, B) => {
|
|
5444
5450
|
var ne;
|
|
5445
5451
|
return p.value ? (u(), c("section", {
|
|
5446
5452
|
key: 0,
|
|
5447
|
-
class: H(
|
|
5453
|
+
class: H(F.value ? "" : "pt-[20px]")
|
|
5448
5454
|
}, [
|
|
5449
|
-
|
|
5450
|
-
|
|
5455
|
+
F.value ? (u(), c("div", ki, [
|
|
5456
|
+
J(Dt, {
|
|
5451
5457
|
table: n.table,
|
|
5452
5458
|
map: v.value,
|
|
5453
5459
|
"onUpdate:map": B[0] || (B[0] = (W) => v.value = W),
|
|
@@ -5456,12 +5462,12 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5456
5462
|
maxZoom: n.maxZoom,
|
|
5457
5463
|
colorAttr: n.colorAttr,
|
|
5458
5464
|
filter: j.value,
|
|
5459
|
-
center:
|
|
5465
|
+
center: O.value,
|
|
5460
5466
|
clusterZoom: n.alwaysShowPolygon ? 0 : be.value ?? n.clusterZoom,
|
|
5461
5467
|
pointZoom: n.alwaysShowPolygon ? 0 : ye.value ?? 12,
|
|
5462
5468
|
alwaysShowPolygon: n.alwaysShowPolygon,
|
|
5463
|
-
modelValue:
|
|
5464
|
-
"onUpdate:modelValue": B[1] || (B[1] = (W) =>
|
|
5469
|
+
modelValue: Be.value,
|
|
5470
|
+
"onUpdate:modelValue": B[1] || (B[1] = (W) => Be.value = W),
|
|
5465
5471
|
layers: n.layers,
|
|
5466
5472
|
isCollapsible: n.isCollapsible,
|
|
5467
5473
|
legendTitle: n.legendTitle,
|
|
@@ -5470,55 +5476,55 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5470
5476
|
"mobile-peek-controls": !0
|
|
5471
5477
|
}, {
|
|
5472
5478
|
default: ge(({ hoverData: W }) => [
|
|
5473
|
-
|
|
5479
|
+
pe($.$slots, "popup", { data: W })
|
|
5474
5480
|
]),
|
|
5475
5481
|
_: 3
|
|
5476
5482
|
}, 8, ["table", "map", "zoom", "minZoom", "maxZoom", "colorAttr", "filter", "center", "clusterZoom", "pointZoom", "alwaysShowPolygon", "modelValue", "layers", "isCollapsible", "legendTitle", "legendWidth"]),
|
|
5477
5483
|
Qe.value ? (u(), c("div", Ci, [...B[19] || (B[19] = [
|
|
5478
5484
|
Xe('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="text-white/80"><path d="M12.75 7.09a3 3 0 0 1 2.16 2.16"></path><path d="M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568"></path><path d="m2 2 20 20"></path><path d="M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533"></path><path d="M9.13 9.13a3 3 0 0 0 3.74 3.74"></path></svg><p class="mt-4 text-base font-[300] text-white">Геопросторові дані відсутні</p><p class="mt-2 max-w-xs text-center text-sm font-[200] text-white/70 leading-relaxed"> Координати або межі об'єкта не внесені до системи. Об'єкт відображається лише у текстовому форматі. </p>', 3)
|
|
5479
|
-
])])) :
|
|
5480
|
-
|
|
5485
|
+
])])) : z("", !0),
|
|
5486
|
+
J(wi, {
|
|
5481
5487
|
"active-modal": ee.value,
|
|
5482
5488
|
"filters-disabled": !C.value.length,
|
|
5483
5489
|
"has-active-filters": s.value,
|
|
5484
|
-
onOpenSearch: B[2] || (B[2] = (W) =>
|
|
5485
|
-
onOpenFilters: B[3] || (B[3] = (W) =>
|
|
5486
|
-
onOpenTable: B[4] || (B[4] = (W) =>
|
|
5490
|
+
onOpenSearch: B[2] || (B[2] = (W) => ze("search")),
|
|
5491
|
+
onOpenFilters: B[3] || (B[3] = (W) => ze("filters")),
|
|
5492
|
+
onOpenTable: B[4] || (B[4] = (W) => ze("table"))
|
|
5487
5493
|
}, null, 8, ["active-modal", "filters-disabled", "has-active-filters"]),
|
|
5488
|
-
|
|
5494
|
+
J(We, {
|
|
5489
5495
|
open: ee.value === "search",
|
|
5490
5496
|
title: "Пошук",
|
|
5491
5497
|
"top-offset": lt,
|
|
5492
5498
|
"initial-variant": "full",
|
|
5493
5499
|
"peek-mode": "clip-full",
|
|
5494
|
-
onClose:
|
|
5495
|
-
onExpand:
|
|
5496
|
-
onCollapse:
|
|
5500
|
+
onClose: Se,
|
|
5501
|
+
onExpand: Ve,
|
|
5502
|
+
onCollapse: Ve
|
|
5497
5503
|
}, {
|
|
5498
5504
|
default: ge(() => [
|
|
5499
5505
|
t("div", _i, [
|
|
5500
|
-
|
|
5506
|
+
J(l($e), {
|
|
5501
5507
|
type: "text",
|
|
5502
5508
|
modelValue: S.value,
|
|
5503
5509
|
"onUpdate:modelValue": B[5] || (B[5] = (W) => S.value = W),
|
|
5504
5510
|
name: "search",
|
|
5505
5511
|
label: "Пошук",
|
|
5506
|
-
onChange: l(
|
|
5512
|
+
onChange: l(X)
|
|
5507
5513
|
}, null, 8, ["modelValue", "onChange"]),
|
|
5508
5514
|
t("div", Mi, [
|
|
5509
|
-
l(f)["mobile-search-results"] ?
|
|
5515
|
+
l(f)["mobile-search-results"] ? pe($.$slots, "mobile-search-results", {
|
|
5510
5516
|
key: 0,
|
|
5511
|
-
rows:
|
|
5517
|
+
rows: U.value,
|
|
5512
5518
|
selectRow: et,
|
|
5513
|
-
closeModal:
|
|
5519
|
+
closeModal: Se
|
|
5514
5520
|
}) : (u(), c("div", Si, [
|
|
5515
|
-
x.value >= 1 ?
|
|
5521
|
+
x.value >= 1 ? pe($.$slots, "table", {
|
|
5516
5522
|
key: 0,
|
|
5517
|
-
rows:
|
|
5523
|
+
rows: U.value,
|
|
5518
5524
|
selectRow: et,
|
|
5519
5525
|
isMapVisible: !1
|
|
5520
5526
|
}) : (u(), c("div", Vi, [
|
|
5521
|
-
|
|
5527
|
+
J(dt),
|
|
5522
5528
|
B[20] || (B[20] = t("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1)),
|
|
5523
5529
|
B[21] || (B[21] = t("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1)),
|
|
5524
5530
|
t("button", {
|
|
@@ -5529,28 +5535,28 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5529
5535
|
]))
|
|
5530
5536
|
])),
|
|
5531
5537
|
x.value >= 1 ? (u(), c("div", $i, [
|
|
5532
|
-
|
|
5538
|
+
J(ut, {
|
|
5533
5539
|
total: x.value,
|
|
5534
5540
|
currentPage: E.value ?? 1,
|
|
5535
5541
|
pageSize: k.value,
|
|
5536
5542
|
onPageChange: B[6] || (B[6] = (W) => ue(W)),
|
|
5537
5543
|
onPageSizeChange: B[7] || (B[7] = (W) => Je(W))
|
|
5538
5544
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
|
5539
|
-
])) :
|
|
5545
|
+
])) : z("", !0)
|
|
5540
5546
|
])
|
|
5541
5547
|
])
|
|
5542
5548
|
]),
|
|
5543
5549
|
_: 3
|
|
5544
5550
|
}, 8, ["open"]),
|
|
5545
|
-
|
|
5551
|
+
J(We, {
|
|
5546
5552
|
open: ee.value === "filters",
|
|
5547
5553
|
title: "Фільтри",
|
|
5548
5554
|
"top-offset": lt,
|
|
5549
5555
|
"initial-variant": "full",
|
|
5550
5556
|
"peek-mode": "clip-full",
|
|
5551
|
-
onClose:
|
|
5552
|
-
onExpand:
|
|
5553
|
-
onCollapse:
|
|
5557
|
+
onClose: Se,
|
|
5558
|
+
onExpand: Ve,
|
|
5559
|
+
onCollapse: Ve
|
|
5554
5560
|
}, {
|
|
5555
5561
|
default: ge(() => [
|
|
5556
5562
|
t("div", Bi, [
|
|
@@ -5572,25 +5578,25 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5572
5578
|
]),
|
|
5573
5579
|
_: 1
|
|
5574
5580
|
}, 8, ["open"]),
|
|
5575
|
-
|
|
5581
|
+
J(We, {
|
|
5576
5582
|
open: ee.value === "table",
|
|
5577
5583
|
title: "Таблиця",
|
|
5578
5584
|
"top-offset": lt,
|
|
5579
5585
|
"initial-variant": "full",
|
|
5580
5586
|
"peek-mode": "clip-full",
|
|
5581
|
-
onClose:
|
|
5582
|
-
onExpand:
|
|
5583
|
-
onCollapse:
|
|
5587
|
+
onClose: Se,
|
|
5588
|
+
onExpand: Ve,
|
|
5589
|
+
onCollapse: Ve
|
|
5584
5590
|
}, {
|
|
5585
5591
|
default: ge(() => [
|
|
5586
5592
|
t("div", ji, [
|
|
5587
|
-
x.value >= 1 ?
|
|
5593
|
+
x.value >= 1 ? pe($.$slots, "table", {
|
|
5588
5594
|
key: 0,
|
|
5589
|
-
rows:
|
|
5595
|
+
rows: U.value,
|
|
5590
5596
|
selectRow: et,
|
|
5591
5597
|
isMapVisible: !1
|
|
5592
|
-
}) : (u(), c("div",
|
|
5593
|
-
|
|
5598
|
+
}) : (u(), c("div", zi, [
|
|
5599
|
+
J(dt),
|
|
5594
5600
|
B[22] || (B[22] = t("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1)),
|
|
5595
5601
|
B[23] || (B[23] = t("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1)),
|
|
5596
5602
|
t("button", {
|
|
@@ -5600,30 +5606,30 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5600
5606
|
}, " Очистити дані пошуку ")
|
|
5601
5607
|
]))
|
|
5602
5608
|
]),
|
|
5603
|
-
x.value >= 1 ? (u(), c("div",
|
|
5604
|
-
|
|
5609
|
+
x.value >= 1 ? (u(), c("div", Fi, [
|
|
5610
|
+
J(ut, {
|
|
5605
5611
|
total: x.value,
|
|
5606
5612
|
currentPage: E.value ?? 1,
|
|
5607
5613
|
pageSize: k.value,
|
|
5608
5614
|
onPageChange: B[8] || (B[8] = (W) => ue(W)),
|
|
5609
5615
|
onPageSizeChange: B[9] || (B[9] = (W) => Je(W))
|
|
5610
5616
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
|
5611
|
-
])) :
|
|
5617
|
+
])) : z("", !0)
|
|
5612
5618
|
]),
|
|
5613
5619
|
_: 3
|
|
5614
5620
|
}, 8, ["open"]),
|
|
5615
|
-
|
|
5621
|
+
J(We, {
|
|
5616
5622
|
open: ee.value === "details",
|
|
5617
5623
|
title: "Об'єкт",
|
|
5618
5624
|
"top-offset": lt,
|
|
5619
5625
|
"initial-variant": we.value ? "peek" : "full",
|
|
5620
5626
|
"peek-mode": "custom",
|
|
5621
5627
|
onClose: st,
|
|
5622
|
-
onExpand:
|
|
5623
|
-
onCollapse:
|
|
5628
|
+
onExpand: Ve,
|
|
5629
|
+
onCollapse: Ve
|
|
5624
5630
|
}, {
|
|
5625
5631
|
peek: ge(({ expand: W }) => [
|
|
5626
|
-
l(f)["mobile-details-peek"] ?
|
|
5632
|
+
l(f)["mobile-details-peek"] ? pe($.$slots, "mobile-details-peek", {
|
|
5627
5633
|
key: 0,
|
|
5628
5634
|
selectedRow: _.value,
|
|
5629
5635
|
expand: W,
|
|
@@ -5636,7 +5642,7 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5636
5642
|
}, " Деталі об'єкта ", 8, Ei))
|
|
5637
5643
|
]),
|
|
5638
5644
|
default: ge(() => [
|
|
5639
|
-
|
|
5645
|
+
pe($.$slots, "details", {
|
|
5640
5646
|
table: n.table,
|
|
5641
5647
|
selectedRow: _.value,
|
|
5642
5648
|
closeObjCard: st
|
|
@@ -5644,24 +5650,24 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5644
5650
|
]),
|
|
5645
5651
|
_: 3
|
|
5646
5652
|
}, 8, ["open", "initial-variant"]),
|
|
5647
|
-
|
|
5653
|
+
pe($.$slots, "default", {
|
|
5648
5654
|
table: n.table,
|
|
5649
5655
|
map: v.value,
|
|
5650
5656
|
selectedRow: _.value
|
|
5651
5657
|
})
|
|
5652
5658
|
])) : (u(), c(Y, { key: 1 }, [
|
|
5653
|
-
|
|
5659
|
+
pe($.$slots, "header", {
|
|
5654
5660
|
title: n.title,
|
|
5655
5661
|
total: x.value
|
|
5656
5662
|
}),
|
|
5657
5663
|
t("div", Di, [
|
|
5658
|
-
|
|
5664
|
+
J(l($e), {
|
|
5659
5665
|
type: "text",
|
|
5660
5666
|
modelValue: S.value,
|
|
5661
5667
|
"onUpdate:modelValue": B[10] || (B[10] = (W) => S.value = W),
|
|
5662
5668
|
name: "search",
|
|
5663
5669
|
label: "Пошук",
|
|
5664
|
-
onChange: l(
|
|
5670
|
+
onChange: l(X)
|
|
5665
5671
|
}, null, 8, ["modelValue", "onChange"]),
|
|
5666
5672
|
C.value.length ? (u(), Q(l(ot), {
|
|
5667
5673
|
key: 0,
|
|
@@ -5671,7 +5677,7 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5671
5677
|
limit: 5,
|
|
5672
5678
|
value: A.value,
|
|
5673
5679
|
ref: "filterRef"
|
|
5674
|
-
}, null, 8, ["schema", "value"])) :
|
|
5680
|
+
}, null, 8, ["schema", "value"])) : z("", !0),
|
|
5675
5681
|
t("div", Oi, [
|
|
5676
5682
|
t("button", {
|
|
5677
5683
|
type: "button",
|
|
@@ -5687,13 +5693,13 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5687
5693
|
onClick: B[12] || (B[12] = (W) => M.value = !1),
|
|
5688
5694
|
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"
|
|
5689
5695
|
}, [
|
|
5690
|
-
|
|
5696
|
+
J(cr)
|
|
5691
5697
|
]),
|
|
5692
5698
|
t("button", {
|
|
5693
5699
|
onClick: B[13] || (B[13] = (W) => M.value = !0),
|
|
5694
5700
|
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"
|
|
5695
5701
|
}, [
|
|
5696
|
-
|
|
5702
|
+
J(ir)
|
|
5697
5703
|
])
|
|
5698
5704
|
])
|
|
5699
5705
|
])
|
|
@@ -5706,10 +5712,10 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5706
5712
|
V.value ? "hidden" : ""
|
|
5707
5713
|
])
|
|
5708
5714
|
}, [
|
|
5709
|
-
(ne = $.$slots) != null && ne.header ?
|
|
5715
|
+
(ne = $.$slots) != null && ne.header ? z("", !0) : (u(), c("div", Ui, [
|
|
5710
5716
|
t("div", null, [
|
|
5711
|
-
t("span",
|
|
5712
|
-
t("span",
|
|
5717
|
+
t("span", Ti, R(n.title), 1),
|
|
5718
|
+
t("span", Ki, R(x.value), 1),
|
|
5713
5719
|
B[25] || (B[25] = t("span", { class: "text-sm text-stone-500 font-medium" }, " об'єктів", -1))
|
|
5714
5720
|
]),
|
|
5715
5721
|
n.objectsInView ? (u(), c("label", Hi, [
|
|
@@ -5721,15 +5727,15 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5721
5727
|
[rl, P.value]
|
|
5722
5728
|
]),
|
|
5723
5729
|
B[26] || (B[26] = t("span", null, "В межах видимої області", -1))
|
|
5724
|
-
])) :
|
|
5730
|
+
])) : z("", !0)
|
|
5725
5731
|
])),
|
|
5726
5732
|
t("div", Ni, [
|
|
5727
|
-
x.value >= 1 ?
|
|
5733
|
+
x.value >= 1 ? pe($.$slots, "table", {
|
|
5728
5734
|
key: 0,
|
|
5729
|
-
rows:
|
|
5735
|
+
rows: U.value,
|
|
5730
5736
|
selectRow: et
|
|
5731
5737
|
}) : (u(), c("div", Wi, [
|
|
5732
|
-
|
|
5738
|
+
J(dt),
|
|
5733
5739
|
B[27] || (B[27] = t("h2", { class: "font-medium text-base text-gray-500 rounded-xl" }, " За вашим запитом даних не знайдено! ", -1)),
|
|
5734
5740
|
B[28] || (B[28] = t("p", { class: "font-normal text-sm text-gray-500 rounded-xl" }, " Введіть, будь ласка, інші значення для пошуку. ", -1)),
|
|
5735
5741
|
t("button", {
|
|
@@ -5739,10 +5745,10 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5739
5745
|
}, " Очистити дані пошуку ")
|
|
5740
5746
|
]))
|
|
5741
5747
|
]),
|
|
5742
|
-
x.value >= 1 ? (u(), c("hr", qi)) :
|
|
5748
|
+
x.value >= 1 ? (u(), c("hr", qi)) : z("", !0),
|
|
5743
5749
|
x.value >= 1 ? (u(), c("div", Yi, [
|
|
5744
5750
|
t("div", Gi, [
|
|
5745
|
-
|
|
5751
|
+
J(ut, {
|
|
5746
5752
|
total: x.value,
|
|
5747
5753
|
currentPage: E.value ?? 1,
|
|
5748
5754
|
pageSize: k.value,
|
|
@@ -5750,7 +5756,7 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5750
5756
|
onPageSizeChange: B[16] || (B[16] = (W) => Je(W))
|
|
5751
5757
|
}, null, 8, ["total", "currentPage", "pageSize"])
|
|
5752
5758
|
])
|
|
5753
|
-
])) :
|
|
5759
|
+
])) : z("", !0)
|
|
5754
5760
|
], 2),
|
|
5755
5761
|
V.value ? (u(), c("div", {
|
|
5756
5762
|
key: 0,
|
|
@@ -5759,14 +5765,14 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5759
5765
|
),
|
|
5760
5766
|
style: { height: "calc(100vh - 152px)" }
|
|
5761
5767
|
}, [
|
|
5762
|
-
|
|
5768
|
+
pe($.$slots, "details", {
|
|
5763
5769
|
table: n.table,
|
|
5764
5770
|
selectedRow: _.value,
|
|
5765
5771
|
closeObjCard: je
|
|
5766
5772
|
})
|
|
5767
|
-
], 2)) :
|
|
5773
|
+
], 2)) : z("", !0),
|
|
5768
5774
|
se(t("div", Qi, [
|
|
5769
|
-
|
|
5775
|
+
J(Dt, {
|
|
5770
5776
|
table: n.table,
|
|
5771
5777
|
map: v.value,
|
|
5772
5778
|
"onUpdate:map": B[17] || (B[17] = (W) => v.value = W),
|
|
@@ -5775,12 +5781,12 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5775
5781
|
maxZoom: n.maxZoom,
|
|
5776
5782
|
colorAttr: n.colorAttr,
|
|
5777
5783
|
filter: j.value,
|
|
5778
|
-
center:
|
|
5784
|
+
center: O.value,
|
|
5779
5785
|
clusterZoom: n.alwaysShowPolygon ? 0 : be.value ?? n.clusterZoom,
|
|
5780
5786
|
pointZoom: n.alwaysShowPolygon ? 0 : ye.value ?? 12,
|
|
5781
5787
|
alwaysShowPolygon: n.alwaysShowPolygon,
|
|
5782
|
-
modelValue:
|
|
5783
|
-
"onUpdate:modelValue": B[18] || (B[18] = (W) =>
|
|
5788
|
+
modelValue: Be.value,
|
|
5789
|
+
"onUpdate:modelValue": B[18] || (B[18] = (W) => Be.value = W),
|
|
5784
5790
|
layers: n.layers,
|
|
5785
5791
|
isCollapsible: n.isCollapsible,
|
|
5786
5792
|
legendTitle: n.legendTitle,
|
|
@@ -5788,24 +5794,24 @@ const hi = /* @__PURE__ */ Oe(fi, [["render", mi]]), gi = { class: "absolute ins
|
|
|
5788
5794
|
"show-popup": !0
|
|
5789
5795
|
}, {
|
|
5790
5796
|
default: ge(({ hoverData: W }) => [
|
|
5791
|
-
|
|
5797
|
+
pe($.$slots, "popup", { data: W })
|
|
5792
5798
|
]),
|
|
5793
5799
|
_: 3
|
|
5794
5800
|
}, 8, ["table", "map", "zoom", "minZoom", "maxZoom", "colorAttr", "filter", "center", "clusterZoom", "pointZoom", "alwaysShowPolygon", "modelValue", "layers", "isCollapsible", "legendTitle", "legendWidth"]),
|
|
5795
|
-
|
|
5801
|
+
pe($.$slots, "default", {
|
|
5796
5802
|
table: n.table,
|
|
5797
5803
|
map: v.value,
|
|
5798
5804
|
selectedRow: _.value
|
|
5799
5805
|
}),
|
|
5800
5806
|
Qe.value ? (u(), c("div", Xi, [...B[29] || (B[29] = [
|
|
5801
5807
|
Xe('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="text-white/80"><path d="M12.75 7.09a3 3 0 0 1 2.16 2.16"></path><path d="M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568"></path><path d="m2 2 20 20"></path><path d="M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533"></path><path d="M9.13 9.13a3 3 0 0 0 3.74 3.74"></path></svg><p class="mt-4 text-base font-[300] text-white">Геопросторові дані відсутні</p><p class="mt-2 max-w-xs text-center text-sm font-[200] text-white/70 leading-relaxed"> Координати або межі об'єкта не внесені до системи. Об'єкт відображається лише у текстовому форматі. </p>', 3)
|
|
5802
|
-
])])) :
|
|
5808
|
+
])])) : z("", !0)
|
|
5803
5809
|
], 512), [
|
|
5804
5810
|
[xe, M.value]
|
|
5805
5811
|
])
|
|
5806
5812
|
])
|
|
5807
5813
|
], 64))
|
|
5808
|
-
], 2)) :
|
|
5814
|
+
], 2)) : z("", !0);
|
|
5809
5815
|
};
|
|
5810
5816
|
}
|
|
5811
5817
|
});
|