@opengis/form 0.0.52 → 0.0.53
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, ref as k, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as D, renderSlot as Se, createElementVNode as l, toDisplayString as
|
|
1
|
+
import { defineComponent as U, ref as k, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as D, renderSlot as Se, createElementVNode as l, toDisplayString as G, mergeProps as Te, computed as B, normalizeStyle as be, createTextVNode as ge, normalizeProps as ot, guardReactiveProps as nt, normalizeClass as E, mergeModels as ie, useModel as de, withDirectives as ae, unref as ee, vModelText as ve, vModelCheckbox as Ct, createVNode as A, createBlock as me, resolveDynamicComponent as Fe, withCtx as Ee, withModifiers as ke, onBeforeUnmount as at, watch as ue, createStaticVNode as ye, vModelRadio as Vt, Fragment as re, renderList as fe, reactive as Nt, vModelDynamic as qt, vShow as Qe, inject as Ae, resolveComponent as mt, Transition as st, nextTick as je, Teleport as Mt, getCurrentInstance as Wt, watchEffect as Gt, toRef as Zt, provide as vt } from "vue";
|
|
2
2
|
import { notify as ce, VsModal as Lt, modal as Kt } from "@opengis/core";
|
|
3
3
|
const Jt = { class: "w-full relative" }, Yt = {
|
|
4
4
|
key: 0,
|
|
@@ -33,13 +33,13 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
33
33
|
window.removeEventListener("resize", t);
|
|
34
34
|
}), (a, n) => (i(), d("div", Jt, [
|
|
35
35
|
a.ua || a.label ? (i(), d("div", Yt, [
|
|
36
|
-
l("span", Xt,
|
|
36
|
+
l("span", Xt, G(a.item[e.value] || a.ua || a.label), 1),
|
|
37
37
|
a.item?.rules?.includes("required") ? (i(), d("span", Qt, "*")) : D("", !0)
|
|
38
38
|
])) : D("", !0),
|
|
39
39
|
Se(a.$slots, "default", Te(a.$attrs, {
|
|
40
40
|
class: { "opacity-60": a.item.disabled }
|
|
41
41
|
})),
|
|
42
|
-
a.error ? (i(), d("span", el,
|
|
42
|
+
a.error ? (i(), d("span", el, G(a.error), 1)) : D("", !0)
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
45
|
}), ll = { class: "w-full relative flex flex-row items-center gap-2" }, ol = {
|
|
@@ -86,7 +86,7 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
86
86
|
class: "text-sm text-gray-900 font-medium flex shrink-0",
|
|
87
87
|
style: be(s.value)
|
|
88
88
|
}, [
|
|
89
|
-
|
|
89
|
+
ge(G(u.ua || u.label) + " ", 1),
|
|
90
90
|
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", ol, "*")) : D("", !0)
|
|
91
91
|
], 4)) : D("", !0),
|
|
92
92
|
l("div", {
|
|
@@ -95,7 +95,7 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
95
95
|
}, [
|
|
96
96
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
97
97
|
], 4),
|
|
98
|
-
u.error ? (i(), d("span", nl,
|
|
98
|
+
u.error ? (i(), d("span", nl, G(u.error), 1)) : D("", !0)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
101
|
}), sl = { class: "w-full relative" }, rl = {
|
|
@@ -118,7 +118,7 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
118
118
|
setup(o) {
|
|
119
119
|
return (e, t) => (i(), d("div", sl, [
|
|
120
120
|
Se(e.$slots, "default", ot(nt(e.$attrs))),
|
|
121
|
-
e.error ? (i(), d("span", rl,
|
|
121
|
+
e.error ? (i(), d("span", rl, G(e.error), 1)) : D("", !0)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
124
|
}), ul = { class: "flex-1 min-w-0" }, dl = {
|
|
@@ -169,16 +169,16 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
169
169
|
}, [
|
|
170
170
|
l("div", ul, [
|
|
171
171
|
u.ua || u.label ? (i(), d("p", dl, [
|
|
172
|
-
l("span", cl,
|
|
172
|
+
l("span", cl, G(u.item[t.value] || u.ua || u.label), 1),
|
|
173
173
|
n.value ? (i(), d("span", pl, "*")) : D("", !0)
|
|
174
174
|
])) : D("", !0),
|
|
175
|
-
a.value ? (i(), d("p", fl,
|
|
175
|
+
a.value ? (i(), d("p", fl, G(a.value), 1)) : D("", !0)
|
|
176
176
|
]),
|
|
177
177
|
l("div", ml, [
|
|
178
178
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
179
179
|
])
|
|
180
180
|
], 2),
|
|
181
|
-
s.value ? (i(), d("p", vl,
|
|
181
|
+
s.value ? (i(), d("p", vl, G(s.value), 1)) : D("", !0)
|
|
182
182
|
], 2));
|
|
183
183
|
}
|
|
184
184
|
}), gl = {
|
|
@@ -222,7 +222,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
222
222
|
border: "1px solid #CFD9E0"
|
|
223
223
|
}
|
|
224
224
|
}, null, 10, bl)), [
|
|
225
|
-
[
|
|
225
|
+
[ve, a.value]
|
|
226
226
|
]);
|
|
227
227
|
}
|
|
228
228
|
}), xl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ U({
|
|
@@ -252,7 +252,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
252
252
|
border: "1px solid #CFD9E0"
|
|
253
253
|
}
|
|
254
254
|
}, null, 10, xl)), [
|
|
255
|
-
[
|
|
255
|
+
[ve, a.value]
|
|
256
256
|
]);
|
|
257
257
|
}
|
|
258
258
|
}), wl = ["placeholder", "min", "max"], kl = /* @__PURE__ */ U({
|
|
@@ -286,7 +286,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
286
286
|
min: n.min,
|
|
287
287
|
max: n.max
|
|
288
288
|
}, null, 10, wl)), [
|
|
289
|
-
[
|
|
289
|
+
[ve, a.value]
|
|
290
290
|
]);
|
|
291
291
|
}
|
|
292
292
|
}), X = (o, e) => {
|
|
@@ -356,7 +356,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
356
356
|
], 2),
|
|
357
357
|
l("span", Bl, [
|
|
358
358
|
Se(s.$slots, "default", {}, () => [
|
|
359
|
-
|
|
359
|
+
ge(G(s.label), 1)
|
|
360
360
|
])
|
|
361
361
|
])
|
|
362
362
|
], 10, Sl)
|
|
@@ -413,7 +413,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
413
413
|
}, null, 8, Al)) : D("", !0)
|
|
414
414
|
])) : D("", !0),
|
|
415
415
|
Se(u.$slots, "default", {}, () => [
|
|
416
|
-
|
|
416
|
+
ge(G(u.label), 1)
|
|
417
417
|
])
|
|
418
418
|
])
|
|
419
419
|
], 2));
|
|
@@ -446,7 +446,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
446
446
|
}
|
|
447
447
|
}), r = k(`vs-checkbox-${t.view || "default"}`);
|
|
448
448
|
return (u, c) => (i(), d("div", Fl, [
|
|
449
|
-
(i(),
|
|
449
|
+
(i(), me(Fe(r.value === "vs-checkbox-buttons" ? ee(Tl) : ee(jl)), {
|
|
450
450
|
value: u.value,
|
|
451
451
|
label: u.label,
|
|
452
452
|
info: u.option?.info,
|
|
@@ -460,7 +460,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
460
460
|
error: u.error
|
|
461
461
|
}, {
|
|
462
462
|
default: Ee(() => [
|
|
463
|
-
|
|
463
|
+
ge(G(u.label), 1)
|
|
464
464
|
]),
|
|
465
465
|
_: 1
|
|
466
466
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
@@ -700,7 +700,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
700
700
|
border: "1px solid #CFD9E0"
|
|
701
701
|
}
|
|
702
702
|
}, null, 10, no), [
|
|
703
|
-
[
|
|
703
|
+
[ve, a.value]
|
|
704
704
|
])
|
|
705
705
|
]));
|
|
706
706
|
}
|
|
@@ -746,7 +746,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
746
746
|
class: E(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
747
747
|
}, null, 2)) : D("", !0)
|
|
748
748
|
], 2),
|
|
749
|
-
l("span", ro,
|
|
749
|
+
l("span", ro, G(t.text), 1)
|
|
750
750
|
], 2));
|
|
751
751
|
}
|
|
752
752
|
}), uo = ["value", "disabled"], co = { class: "text-[13px] text-gray-700" }, po = /* @__PURE__ */ U({
|
|
@@ -783,7 +783,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
783
783
|
}, null, 8, uo), [
|
|
784
784
|
[Vt, e.value]
|
|
785
785
|
]),
|
|
786
|
-
l("span", co,
|
|
786
|
+
l("span", co, G(t.text), 1)
|
|
787
787
|
], 2));
|
|
788
788
|
}
|
|
789
789
|
}), fo = {
|
|
@@ -812,7 +812,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
812
812
|
return (n, s) => (i(), d("div", {
|
|
813
813
|
class: E([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
814
814
|
}, [
|
|
815
|
-
(i(!0), d(re, null, fe(n.options, (r) => (i(),
|
|
815
|
+
(i(!0), d(re, null, fe(n.options, (r) => (i(), me(Fe(a.value), Te({
|
|
816
816
|
key: r?.id,
|
|
817
817
|
text: r.text,
|
|
818
818
|
value: r.id.toString(),
|
|
@@ -908,7 +908,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
908
908
|
}), (f, m) => (i(), d("div", {
|
|
909
909
|
class: E(["p-0 w-full gap-[6px]", [f.position === "vertical" ? "flex-col" : "", f.colSpan ? "grid" : "flex justify-start"]])
|
|
910
910
|
}, [
|
|
911
|
-
(i(!0), d(re, null, fe(n.value, (y) => (i(),
|
|
911
|
+
(i(!0), d(re, null, fe(n.value, (y) => (i(), me(St, {
|
|
912
912
|
modelValue: s[r(y)],
|
|
913
913
|
"onUpdate:modelValue": (S) => s[r(y)] = S,
|
|
914
914
|
value: r(y),
|
|
@@ -1190,7 +1190,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1190
1190
|
setup(o) {
|
|
1191
1191
|
const e = de(o, "value"), t = de(o, "item"), a = o;
|
|
1192
1192
|
return (n, s) => (i(), d("div", Ko, [
|
|
1193
|
-
(i(),
|
|
1193
|
+
(i(), me(Fe(ee(Ro)(t.value)), {
|
|
1194
1194
|
src: t.value,
|
|
1195
1195
|
alt: "file",
|
|
1196
1196
|
class: "w-full h-full object-cover cursor-pointer",
|
|
@@ -1241,7 +1241,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1241
1241
|
const { files: p } = c.target;
|
|
1242
1242
|
if (!(!p || p.length === 0))
|
|
1243
1243
|
if (t.multiple) {
|
|
1244
|
-
const f = Array.from(p).map(async (
|
|
1244
|
+
const f = Array.from(p).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await bt(q, "1", "form", "table")), S = (await Promise.all(f)).filter((q) => q !== null).map((q) => q?.file_path).filter(Boolean);
|
|
1245
1245
|
a.value = [...a.value || [], ...S], n("change", a.value);
|
|
1246
1246
|
} else {
|
|
1247
1247
|
const f = p[0];
|
|
@@ -1260,14 +1260,14 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1260
1260
|
multiple: c.multiple,
|
|
1261
1261
|
onChange: u
|
|
1262
1262
|
}, null, 40, Qo),
|
|
1263
|
-
!c.multiple && a.value ? (i(),
|
|
1263
|
+
!c.multiple && a.value ? (i(), me(xt, {
|
|
1264
1264
|
key: 0,
|
|
1265
1265
|
item: a.value,
|
|
1266
1266
|
"onUpdate:item": p[0] || (p[0] = (f) => a.value = f),
|
|
1267
1267
|
value: a.value,
|
|
1268
1268
|
"onUpdate:value": p[1] || (p[1] = (f) => a.value = f)
|
|
1269
1269
|
}, null, 8, ["item", "value"])) : c.multiple ? (i(), d("div", en, [
|
|
1270
|
-
(i(!0), d(re, null, fe(a.value, (f, m) => (i(),
|
|
1270
|
+
(i(!0), d(re, null, fe(a.value, (f, m) => (i(), me(xt, {
|
|
1271
1271
|
multiple: c.multiple,
|
|
1272
1272
|
key: m,
|
|
1273
1273
|
value: a.value,
|
|
@@ -1319,15 +1319,15 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1319
1319
|
return (n, s) => (i(), d(re, null, [
|
|
1320
1320
|
s[1] || (s[1] = ye('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
|
|
1321
1321
|
l("div", ln, [
|
|
1322
|
-
l("p", on,
|
|
1322
|
+
l("p", on, G(n.item?.uploaded_name), 1),
|
|
1323
1323
|
l("p", nn, [
|
|
1324
|
-
l("span", null,
|
|
1324
|
+
l("span", null, G(n.item?.username), 1),
|
|
1325
1325
|
ae(l("span", an, "|", 512), [
|
|
1326
1326
|
[Qe, n.item?.username]
|
|
1327
1327
|
]),
|
|
1328
|
-
l("span", null,
|
|
1328
|
+
l("span", null, G(t.value), 1),
|
|
1329
1329
|
s[0] || (s[0] = l("span", { class: "px-[5px]" }, "|", -1)),
|
|
1330
|
-
l("span", sn,
|
|
1330
|
+
l("span", sn, G(a(n.item?.size)), 1)
|
|
1331
1331
|
])
|
|
1332
1332
|
])
|
|
1333
1333
|
], 64));
|
|
@@ -1482,7 +1482,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1482
1482
|
},
|
|
1483
1483
|
emits: ["update"],
|
|
1484
1484
|
setup(o, { emit: e }) {
|
|
1485
|
-
const t = o, a = Ae("form"), n = B(() => a.value.formId), s = k(!1), r = k(0), u = e, c = k(!1), p = k({}), f = k([]), m = k(""), y = B(() => Array.isArray(f.value) ? f.value.filter((I) => I.ext === "jpg" || I.ext === "png").map((I) => I?.file_path) : []), S = B(() => m.value === "" ? f.value : f.value.filter((I) => I?.uploaded_name?.includes(m.value))),
|
|
1485
|
+
const t = o, a = Ae("form"), n = B(() => a.value.formId), s = k(!1), r = k(0), u = e, c = k(!1), p = k({}), f = k([]), m = k(""), y = B(() => Array.isArray(f.value) ? f.value.filter((I) => I.ext === "jpg" || I.ext === "png").map((I) => I?.file_path) : []), S = B(() => m.value === "" ? f.value : f.value.filter((I) => I?.uploaded_name?.includes(m.value))), q = (I) => {
|
|
1486
1486
|
const v = y.value.findIndex((x) => x === I.item.file_path);
|
|
1487
1487
|
v !== -1 && (s.value = !0, r.value = v);
|
|
1488
1488
|
}, R = async () => {
|
|
@@ -1531,7 +1531,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1531
1531
|
const x = mt("Lightbox"), V = mt("MessageBox");
|
|
1532
1532
|
return i(), d("div", _n, [
|
|
1533
1533
|
l("div", $n, [
|
|
1534
|
-
l("h2", Cn, " Файлів: " +
|
|
1534
|
+
l("h2", Cn, " Файлів: " + G(f.value?.length), 1),
|
|
1535
1535
|
l("div", Vn, [
|
|
1536
1536
|
l("label", null, [
|
|
1537
1537
|
l("input", {
|
|
@@ -1579,7 +1579,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1579
1579
|
placeholder: "Введіть назву файлу"
|
|
1580
1580
|
}, null, 512), [
|
|
1581
1581
|
[
|
|
1582
|
-
|
|
1582
|
+
ve,
|
|
1583
1583
|
m.value,
|
|
1584
1584
|
void 0,
|
|
1585
1585
|
{ trim: !0 }
|
|
@@ -1589,14 +1589,14 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1589
1589
|
])
|
|
1590
1590
|
])) : D("", !0),
|
|
1591
1591
|
f.value?.length ? (i(), d("div", Bn, [
|
|
1592
|
-
(i(!0), d(re, null, fe(S.value, ($, F) => (i(),
|
|
1592
|
+
(i(!0), d(re, null, fe(S.value, ($, F) => (i(), me(bn, {
|
|
1593
1593
|
key: F,
|
|
1594
1594
|
prefix: I.prefix,
|
|
1595
1595
|
item: $,
|
|
1596
1596
|
index: F,
|
|
1597
1597
|
onUpdate: v[2] || (v[2] = (te) => I.$emit("update", "file-list")),
|
|
1598
1598
|
onOpenModal: v[3] || (v[3] = (te) => H(te)),
|
|
1599
|
-
onOpenLightbox: v[4] || (v[4] = (te) =>
|
|
1599
|
+
onOpenLightbox: v[4] || (v[4] = (te) => q(te))
|
|
1600
1600
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1601
1601
|
S.value.length ? D("", !0) : (i(), d("div", jn, v[9] || (v[9] = [
|
|
1602
1602
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
@@ -1642,7 +1642,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1642
1642
|
}
|
|
1643
1643
|
), (a, n) => (i(), d("div", null, [
|
|
1644
1644
|
l("div", In, [
|
|
1645
|
-
l("p", zn,
|
|
1645
|
+
l("p", zn, G(o.title), 1),
|
|
1646
1646
|
A(Bt, {
|
|
1647
1647
|
modelValue: t.value,
|
|
1648
1648
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
@@ -1693,7 +1693,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1693
1693
|
A(ee(Pl), {
|
|
1694
1694
|
class: E(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
|
|
1695
1695
|
}, null, 8, ["class"]),
|
|
1696
|
-
l("span", On,
|
|
1696
|
+
l("span", On, G(o.title), 1)
|
|
1697
1697
|
]),
|
|
1698
1698
|
A(st, { name: "slide-fade" }, {
|
|
1699
1699
|
default: Ee(() => [
|
|
@@ -1722,7 +1722,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1722
1722
|
setup(o) {
|
|
1723
1723
|
return (e, t) => (i(), d("div", null, [
|
|
1724
1724
|
l("div", Rn, [
|
|
1725
|
-
l("p", null,
|
|
1725
|
+
l("p", null, G(o.title), 1)
|
|
1726
1726
|
]),
|
|
1727
1727
|
Se(e.$slots, "default")
|
|
1728
1728
|
]));
|
|
@@ -1801,13 +1801,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1801
1801
|
const c = Array.isArray(u) ? u[0] : u, p = t?.value?.[c];
|
|
1802
1802
|
return It(p, u);
|
|
1803
1803
|
})), s = B(() => Nn[e.view]);
|
|
1804
|
-
return (r, u) => o.schema?.length ? (i(),
|
|
1804
|
+
return (r, u) => o.schema?.length ? (i(), me(Fe(s.value), {
|
|
1805
1805
|
key: 0,
|
|
1806
1806
|
title: o.title,
|
|
1807
1807
|
style: be(o.style)
|
|
1808
1808
|
}, {
|
|
1809
1809
|
default: Ee(() => [
|
|
1810
|
-
(i(!0), d(re, null, fe(n.value, (c) => (i(),
|
|
1810
|
+
(i(!0), d(re, null, fe(n.value, (c) => (i(), me(zt, Te({
|
|
1811
1811
|
key: c.name
|
|
1812
1812
|
}, { ref_for: !0 }, c, {
|
|
1813
1813
|
item: c,
|
|
@@ -1861,16 +1861,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1861
1861
|
set: (h) => a("update:modelValue", h)
|
|
1862
1862
|
});
|
|
1863
1863
|
!r.value && t.defaultValue && (r.value = t.defaultValue);
|
|
1864
|
-
const u = k(null), c = k(null), p = k(null), f = k(null), m = k(!1), y = k(!1), S = k(null),
|
|
1864
|
+
const u = k(null), c = k(null), p = k(null), f = k(null), m = k(!1), y = k(!1), S = k(null), q = k([]), R = k(-1), K = k([]), T = k(""), H = k(null), I = k("bottom"), v = k({}), x = k([]), V = B(() => {
|
|
1865
1865
|
if (!x.value.length) return [];
|
|
1866
|
-
const h =
|
|
1866
|
+
const h = q.value, b = new Map(h.map((w) => [w.id?.toString(), w]));
|
|
1867
1867
|
return x.value.map((w) => b.get(w?.toString())).filter((w) => !!w);
|
|
1868
|
-
}), $ = B(() => t.placeholder || "Select..."), F = B(() =>
|
|
1869
|
-
let h =
|
|
1868
|
+
}), $ = B(() => t.placeholder || "Select..."), F = B(() => W(S.value)), te = B(() => n.value ? !x.value.length && T.value === "" : !F.value && T.value === ""), J = B(() => s.value ? !1 : n.value ? x.value.length > 0 : !!r.value), M = (h) => n.value ? x.value.some((b) => b?.toString() === h?.toString()) : r.value?.toString() === h?.toString(), Z = B(() => {
|
|
1869
|
+
let h = q.value ?? [];
|
|
1870
1870
|
if (!t.data && T.value.trim() !== "") {
|
|
1871
1871
|
const b = T.value.toLowerCase();
|
|
1872
1872
|
h = h.filter((w) => {
|
|
1873
|
-
const P =
|
|
1873
|
+
const P = W(w).toLowerCase(), ne = w.text?.toLowerCase?.() || "";
|
|
1874
1874
|
return P.includes(b) || ne.includes(b);
|
|
1875
1875
|
});
|
|
1876
1876
|
}
|
|
@@ -1886,7 +1886,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1886
1886
|
const ne = P.trim(), pe = h[ne];
|
|
1887
1887
|
return pe != null ? String(pe) : "";
|
|
1888
1888
|
}) : h.text ?? "";
|
|
1889
|
-
},
|
|
1889
|
+
}, W = (h) => {
|
|
1890
1890
|
if (!h) return "";
|
|
1891
1891
|
if (!j.value) return h.text ?? "";
|
|
1892
1892
|
const w = C(h);
|
|
@@ -1903,7 +1903,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1903
1903
|
if (h?.trim()) {
|
|
1904
1904
|
const w = h.toLowerCase();
|
|
1905
1905
|
b = b.filter((P) => {
|
|
1906
|
-
const ne =
|
|
1906
|
+
const ne = W(P).toLowerCase(), pe = P.text?.toLowerCase?.() || "";
|
|
1907
1907
|
return ne.includes(w) || pe.includes(w);
|
|
1908
1908
|
});
|
|
1909
1909
|
}
|
|
@@ -1916,10 +1916,10 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1916
1916
|
return [];
|
|
1917
1917
|
}
|
|
1918
1918
|
}, Oe = async () => {
|
|
1919
|
-
t.data ?
|
|
1919
|
+
t.data ? q.value = await Le(T.value) : q.value = t.options ? [...t.options] : [];
|
|
1920
1920
|
}, Ge = async (h) => {
|
|
1921
1921
|
if (h == null) return null;
|
|
1922
|
-
const b =
|
|
1922
|
+
const b = q.value?.find((w) => w?.id?.toString() === String(h));
|
|
1923
1923
|
if (b) return b;
|
|
1924
1924
|
if (t.data)
|
|
1925
1925
|
try {
|
|
@@ -1930,11 +1930,11 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1930
1930
|
}
|
|
1931
1931
|
return null;
|
|
1932
1932
|
}, tt = async (h) => {
|
|
1933
|
-
const b = new Set(
|
|
1933
|
+
const b = new Set(q.value.map((P) => P.id?.toString())), w = h.filter((P) => !b.has(P?.toString()));
|
|
1934
1934
|
w.length && await w.reduce(async (P, ne) => {
|
|
1935
1935
|
await P;
|
|
1936
1936
|
const pe = await Ge(ne);
|
|
1937
|
-
pe &&
|
|
1937
|
+
pe && q.value.push(pe);
|
|
1938
1938
|
}, Promise.resolve());
|
|
1939
1939
|
}, De = async () => {
|
|
1940
1940
|
s.value || (m.value = !0, await Oe(), await je(() => {
|
|
@@ -1955,7 +1955,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1955
1955
|
n.value ? (M(h.id) || (x.value = [...x.value, h.id], r.value = [...x.value], a("change", r.value)), T.value = "", je(() => {
|
|
1956
1956
|
H.value?.focus(), R.value = Math.min(R.value, Z.value.length - 1);
|
|
1957
1957
|
}), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value), T.value = "", Ce(), oe(h));
|
|
1958
|
-
},
|
|
1958
|
+
}, he = (h) => {
|
|
1959
1959
|
M(h.id) || Q(h);
|
|
1960
1960
|
}, Ve = (h, b) => {
|
|
1961
1961
|
if (!h || !b) return;
|
|
@@ -2026,7 +2026,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2026
2026
|
m.value && Me();
|
|
2027
2027
|
};
|
|
2028
2028
|
ue(() => t.options, (h) => {
|
|
2029
|
-
h?.length && (
|
|
2029
|
+
h?.length && (q.value = [...h], Ze());
|
|
2030
2030
|
}, { immediate: !0 });
|
|
2031
2031
|
async function Ze() {
|
|
2032
2032
|
if (n.value)
|
|
@@ -2042,7 +2042,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2042
2042
|
ue(r, () => {
|
|
2043
2043
|
Ze();
|
|
2044
2044
|
}), _e(async () => {
|
|
2045
|
-
addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Be(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ?
|
|
2045
|
+
addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Be(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Le("")), await Ze();
|
|
2046
2046
|
}), Xe(() => {
|
|
2047
2047
|
removeEventListener("keydown", rt), removeEventListener("scroll", ut, !0), removeEventListener("resize", dt), document.removeEventListener("click", it, !0), c.value && Be(c.value).removeEventListener("scroll", ct, !0);
|
|
2048
2048
|
});
|
|
@@ -2057,7 +2057,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2057
2057
|
}).then((P) => P.json());
|
|
2058
2058
|
if (!t.options?.length && t.data) {
|
|
2059
2059
|
const { data: P } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${w}`).then((ne) => ne.json());
|
|
2060
|
-
S.value = P[0],
|
|
2060
|
+
S.value = P[0], q.value.push(P[0]), r.value = w;
|
|
2061
2061
|
}
|
|
2062
2062
|
Ke.value = !1, ce({ title: "Success!", message: "Object created." });
|
|
2063
2063
|
}
|
|
@@ -2073,12 +2073,12 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
2075
|
const Rt = Pt(async (h) => {
|
|
2076
|
-
|
|
2076
|
+
q.value = await Le(h);
|
|
2077
2077
|
}, 200);
|
|
2078
2078
|
return ue(T, (h) => {
|
|
2079
2079
|
t.data && Rt(h.trim());
|
|
2080
2080
|
}), ue(() => t.options, (h) => {
|
|
2081
|
-
!t.data && h?.length && (
|
|
2081
|
+
!t.data && h?.length && (q.value = [...h], Ze());
|
|
2082
2082
|
}, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
|
|
2083
2083
|
t.data && Oe();
|
|
2084
2084
|
}), ue(se, async () => {
|
|
@@ -2103,7 +2103,6 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2103
2103
|
]),
|
|
2104
2104
|
_: 1
|
|
2105
2105
|
}, 8, ["visible", "teleport"]),
|
|
2106
|
-
me(" " + q(r.value) + " ", 1),
|
|
2107
2106
|
l("div", {
|
|
2108
2107
|
class: "flex gap-1 w-full",
|
|
2109
2108
|
ref_key: "selectRoot",
|
|
@@ -2156,13 +2155,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2156
2155
|
}, null, 4)) : D("", !0),
|
|
2157
2156
|
l("div", {
|
|
2158
2157
|
class: "truncate text-gray-900 overflow-hidden",
|
|
2159
|
-
title:
|
|
2158
|
+
title: W(w)
|
|
2160
2159
|
}, [
|
|
2161
2160
|
j.value ? (i(), d("span", {
|
|
2162
2161
|
key: 0,
|
|
2163
2162
|
innerHTML: C(w)
|
|
2164
2163
|
}, null, 8, ra)) : (i(), d(re, { key: 1 }, [
|
|
2165
|
-
|
|
2164
|
+
ge(G(w.text), 1)
|
|
2166
2165
|
], 64))
|
|
2167
2166
|
], 8, sa)
|
|
2168
2167
|
]),
|
|
@@ -2199,9 +2198,9 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2199
2198
|
}, null, 10, da)) : (i(), d("span", {
|
|
2200
2199
|
key: 2,
|
|
2201
2200
|
class: E({ "pl-5": S.value?.color })
|
|
2202
|
-
},
|
|
2201
|
+
}, G(S.value?.text), 3))
|
|
2203
2202
|
], 8, ua)) : D("", !0),
|
|
2204
|
-
te.value ? (i(), d("div", ca,
|
|
2203
|
+
te.value ? (i(), d("div", ca, G($.value), 1)) : D("", !0),
|
|
2205
2204
|
l("div", pa, [
|
|
2206
2205
|
!s.value && h.search ? ae((i(), d("input", {
|
|
2207
2206
|
key: 0,
|
|
@@ -2221,7 +2220,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2221
2220
|
onBlur: Ot,
|
|
2222
2221
|
onKeydown: Tt
|
|
2223
2222
|
}, null, 40, fa)), [
|
|
2224
|
-
[
|
|
2223
|
+
[ve, T.value]
|
|
2225
2224
|
]) : D("", !0)
|
|
2226
2225
|
])
|
|
2227
2226
|
], 512),
|
|
@@ -2263,7 +2262,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2263
2262
|
]), 8, ha)
|
|
2264
2263
|
])
|
|
2265
2264
|
], 42, na),
|
|
2266
|
-
(i(),
|
|
2265
|
+
(i(), me(Mt, { to: "body" }, [
|
|
2267
2266
|
m.value ? (i(), d("div", {
|
|
2268
2267
|
key: 0,
|
|
2269
2268
|
ref_key: "dropdownRef",
|
|
@@ -2292,7 +2291,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2292
2291
|
"aria-disabled": M(w.id) ? "true" : "false",
|
|
2293
2292
|
role: "option",
|
|
2294
2293
|
tabindex: "-1",
|
|
2295
|
-
onClick: (ne) =>
|
|
2294
|
+
onClick: (ne) => he(w)
|
|
2296
2295
|
}, [
|
|
2297
2296
|
w?.color ? (i(), d("span", {
|
|
2298
2297
|
key: 0,
|
|
@@ -2311,7 +2310,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2311
2310
|
key: 0,
|
|
2312
2311
|
innerHTML: C(w)
|
|
2313
2312
|
}, null, 8, ba)) : (i(), d(re, { key: 1 }, [
|
|
2314
|
-
|
|
2313
|
+
ge(G(w.text), 1)
|
|
2315
2314
|
], 64))
|
|
2316
2315
|
], 2)
|
|
2317
2316
|
], 10, ga))), 128)) : (i(), d("div", ya, " No options "))
|
|
@@ -2362,7 +2361,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2362
2361
|
border: "1px solid #CFD9E0"
|
|
2363
2362
|
}
|
|
2364
2363
|
}, null, 10, wa)), [
|
|
2365
|
-
[
|
|
2364
|
+
[ve, a.value]
|
|
2366
2365
|
]);
|
|
2367
2366
|
}
|
|
2368
2367
|
}), _a = {}, $a = {
|
|
@@ -2520,8 +2519,8 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2520
2519
|
if (!n.value) return t.value ?? [];
|
|
2521
2520
|
const z = n.value.toLowerCase();
|
|
2522
2521
|
return t.value.filter((j) => e.colModel?.some((C) => {
|
|
2523
|
-
const
|
|
2524
|
-
return
|
|
2522
|
+
const W = j[C.key];
|
|
2523
|
+
return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(z) : String(W).toLowerCase().includes(z) : !1;
|
|
2525
2524
|
}));
|
|
2526
2525
|
}), r = k(null), u = k(null), c = k(!1), p = k(null), f = k({ top: 0, left: 0 }), m = (z) => {
|
|
2527
2526
|
r.value = z;
|
|
@@ -2534,19 +2533,19 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2534
2533
|
}
|
|
2535
2534
|
const j = [...t.value], [C] = j.splice(r.value, 1);
|
|
2536
2535
|
j.splice(z, 0, C), t.value = j, r.value = null, u.value = null;
|
|
2537
|
-
},
|
|
2536
|
+
}, q = (z) => {
|
|
2538
2537
|
const C = z.currentTarget.getBoundingClientRect();
|
|
2539
2538
|
f.value = { top: C.bottom + window.scrollY, left: C.left + window.scrollX }, c.value = !c.value;
|
|
2540
2539
|
}, R = () => {
|
|
2541
2540
|
p.value && p.value.click();
|
|
2542
2541
|
}, K = (z) => {
|
|
2543
2542
|
const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C = z.toLowerCase();
|
|
2544
|
-
return j.some((
|
|
2543
|
+
return j.some((W) => C.endsWith(W));
|
|
2545
2544
|
}, T = (z) => {
|
|
2546
2545
|
const C = z.target.files?.[0];
|
|
2547
2546
|
if (!C) return;
|
|
2548
|
-
const
|
|
2549
|
-
|
|
2547
|
+
const W = new FileReader();
|
|
2548
|
+
W.onload = (oe) => {
|
|
2550
2549
|
try {
|
|
2551
2550
|
const se = oe.target?.result;
|
|
2552
2551
|
if (typeof se == "string") {
|
|
@@ -2556,16 +2555,16 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2556
2555
|
} catch (se) {
|
|
2557
2556
|
console.error("Error parsing file:", se);
|
|
2558
2557
|
}
|
|
2559
|
-
},
|
|
2558
|
+
}, W.readAsText(C);
|
|
2560
2559
|
}, H = () => {
|
|
2561
|
-
const z = JSON.stringify(t.value, null, 2), j = new Blob([z], { type: "application/json" }), C = URL.createObjectURL(j),
|
|
2562
|
-
|
|
2560
|
+
const z = JSON.stringify(t.value, null, 2), j = new Blob([z], { type: "application/json" }), C = URL.createObjectURL(j), W = document.createElement("a");
|
|
2561
|
+
W.href = C, W.download = "data.json", W.click(), URL.revokeObjectURL(C);
|
|
2563
2562
|
};
|
|
2564
2563
|
_e(async () => {
|
|
2565
2564
|
const z = e.colModel?.filter((j) => j.data);
|
|
2566
2565
|
z?.length && Promise.all(z.map(async (j) => {
|
|
2567
|
-
const
|
|
2568
|
-
a.value[j.key] =
|
|
2566
|
+
const W = await (await fetch(`/api/suggest/${j.data}`)).json();
|
|
2567
|
+
a.value[j.key] = W.data;
|
|
2569
2568
|
}));
|
|
2570
2569
|
});
|
|
2571
2570
|
const I = k(""), v = k(!1);
|
|
@@ -2576,7 +2575,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2576
2575
|
}
|
|
2577
2576
|
function J(z, j) {
|
|
2578
2577
|
const C = j.key || j.name;
|
|
2579
|
-
return a.value[C] && z[C] ? a.value[C].find((
|
|
2578
|
+
return a.value[C] && z[C] ? a.value[C].find((W) => W.id.toString() === z[C].toString())?.text ?? z[C] : z[C] || "-";
|
|
2580
2579
|
}
|
|
2581
2580
|
async function M(z, j) {
|
|
2582
2581
|
I.value = "Редагувати", v.value = !0, x = "edit", V = j, $.value = { ...z };
|
|
@@ -2610,7 +2609,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2610
2609
|
placeholder: "Пошук",
|
|
2611
2610
|
class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
|
|
2612
2611
|
}, null, 512), [
|
|
2613
|
-
[
|
|
2612
|
+
[ve, n.value]
|
|
2614
2613
|
])
|
|
2615
2614
|
]),
|
|
2616
2615
|
l("div", Qa, [
|
|
@@ -2626,7 +2625,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2626
2625
|
l("div", ts, [
|
|
2627
2626
|
l("div", ls, [
|
|
2628
2627
|
l("button", {
|
|
2629
|
-
onClick:
|
|
2628
|
+
onClick: q,
|
|
2630
2629
|
class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2631
2630
|
}, [
|
|
2632
2631
|
A(Ba, {
|
|
@@ -2638,7 +2637,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2638
2637
|
])
|
|
2639
2638
|
])
|
|
2640
2639
|
]),
|
|
2641
|
-
(i(),
|
|
2640
|
+
(i(), me(Mt, { to: "body" }, [
|
|
2642
2641
|
c.value ? (i(), d("div", {
|
|
2643
2642
|
key: 0,
|
|
2644
2643
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
@@ -2655,7 +2654,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2655
2654
|
width: "14",
|
|
2656
2655
|
height: "14"
|
|
2657
2656
|
}),
|
|
2658
|
-
j[4] || (j[4] =
|
|
2657
|
+
j[4] || (j[4] = ge(" Імпортувати ", -1))
|
|
2659
2658
|
]),
|
|
2660
2659
|
l("button", {
|
|
2661
2660
|
onClick: H,
|
|
@@ -2667,7 +2666,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2667
2666
|
width: "14",
|
|
2668
2667
|
height: "14"
|
|
2669
2668
|
}),
|
|
2670
|
-
j[5] || (j[5] =
|
|
2669
|
+
j[5] || (j[5] = ge(" Експортувати ", -1))
|
|
2671
2670
|
])
|
|
2672
2671
|
])
|
|
2673
2672
|
])
|
|
@@ -2679,7 +2678,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2679
2678
|
class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2680
2679
|
}, [
|
|
2681
2680
|
A(qe),
|
|
2682
|
-
j[6] || (j[6] =
|
|
2681
|
+
j[6] || (j[6] = ge(" Додати ", -1))
|
|
2683
2682
|
])
|
|
2684
2683
|
]),
|
|
2685
2684
|
l("div", ss, [
|
|
@@ -2696,7 +2695,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2696
2695
|
(i(!0), d(re, null, fe(z.colModel, (C) => (i(), d("th", {
|
|
2697
2696
|
key: C.key,
|
|
2698
2697
|
class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
|
|
2699
|
-
},
|
|
2698
|
+
}, G(C.ua || C.label), 1))), 128)),
|
|
2700
2699
|
j[7] || (j[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
|
|
2701
2700
|
])
|
|
2702
2701
|
]),
|
|
@@ -2714,16 +2713,16 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2714
2713
|
])
|
|
2715
2714
|
])
|
|
2716
2715
|
])) : D("", !0),
|
|
2717
|
-
(i(!0), d(re, null, fe(s.value, (C,
|
|
2716
|
+
(i(!0), d(re, null, fe(s.value, (C, W) => (i(), d("tr", {
|
|
2718
2717
|
key: C.id,
|
|
2719
2718
|
class: E(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
2720
|
-
"opacity-50": r.value ===
|
|
2721
|
-
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value ===
|
|
2719
|
+
"opacity-50": r.value === W,
|
|
2720
|
+
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value === W
|
|
2722
2721
|
}]),
|
|
2723
2722
|
draggable: "true",
|
|
2724
|
-
onDragstart: (oe) => m(
|
|
2725
|
-
onDragover: ke((oe) => y(
|
|
2726
|
-
onDrop: (oe) => S(
|
|
2723
|
+
onDragstart: (oe) => m(W),
|
|
2724
|
+
onDragover: ke((oe) => y(W), ["prevent"]),
|
|
2725
|
+
onDrop: (oe) => S(W)
|
|
2727
2726
|
}, [
|
|
2728
2727
|
l("td", vs, [
|
|
2729
2728
|
l("div", hs, [
|
|
@@ -2753,12 +2752,12 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2753
2752
|
key: 1,
|
|
2754
2753
|
class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",
|
|
2755
2754
|
innerHTML: J(C, oe)
|
|
2756
|
-
}, null, 8, ws)) : (i(), d("div", ks,
|
|
2755
|
+
}, null, 8, ws)) : (i(), d("div", ks, G(J(C, oe)), 1))
|
|
2757
2756
|
]))), 128)),
|
|
2758
2757
|
l("td", _s, [
|
|
2759
2758
|
l("div", $s, [
|
|
2760
2759
|
l("button", {
|
|
2761
|
-
onClick: (oe) => M(C,
|
|
2760
|
+
onClick: (oe) => M(C, W),
|
|
2762
2761
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2763
2762
|
}, [
|
|
2764
2763
|
A(Ka, {
|
|
@@ -2768,7 +2767,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2768
2767
|
})
|
|
2769
2768
|
], 8, Cs),
|
|
2770
2769
|
l("button", {
|
|
2771
|
-
onClick: (oe) => N(
|
|
2770
|
+
onClick: (oe) => N(W),
|
|
2772
2771
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2773
2772
|
}, [
|
|
2774
2773
|
A(et, {
|
|
@@ -3096,7 +3095,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3096
3095
|
function S(v) {
|
|
3097
3096
|
return v === "xy" ? "Координати" : v === "parcel" ? "Кадастр" : "Адреси";
|
|
3098
3097
|
}
|
|
3099
|
-
function
|
|
3098
|
+
function q(v) {
|
|
3100
3099
|
const x = v.replace(/[,]+/g, " ").trim();
|
|
3101
3100
|
if (!x) return null;
|
|
3102
3101
|
const V = x.split(/\s+/).filter(Boolean);
|
|
@@ -3148,7 +3147,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3148
3147
|
const v = c.value.trim();
|
|
3149
3148
|
if (v) {
|
|
3150
3149
|
if (u.value === "xy") {
|
|
3151
|
-
const x =
|
|
3150
|
+
const x = q(v);
|
|
3152
3151
|
if (!x) {
|
|
3153
3152
|
ce({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
3154
3153
|
return;
|
|
@@ -3198,7 +3197,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3198
3197
|
class: "vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",
|
|
3199
3198
|
onClick: x[0] || (x[0] = (V) => p.value = !p.value)
|
|
3200
3199
|
}, [
|
|
3201
|
-
l("span", null,
|
|
3200
|
+
l("span", null, G(S(u.value)), 1),
|
|
3202
3201
|
(i(), d("svg", {
|
|
3203
3202
|
class: E(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": p.value }]),
|
|
3204
3203
|
viewBox: "0 0 24 24",
|
|
@@ -3220,7 +3219,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3220
3219
|
key: V,
|
|
3221
3220
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
3222
3221
|
onClick: ($) => m(V)
|
|
3223
|
-
},
|
|
3222
|
+
}, G(S(V)), 9, Qs))), 128))
|
|
3224
3223
|
])
|
|
3225
3224
|
])) : D("", !0)
|
|
3226
3225
|
], 512)) : D("", !0),
|
|
@@ -3232,7 +3231,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3232
3231
|
class: "vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"
|
|
3233
3232
|
}, null, 8, tr), [
|
|
3234
3233
|
[
|
|
3235
|
-
|
|
3234
|
+
ve,
|
|
3236
3235
|
c.value,
|
|
3237
3236
|
void 0,
|
|
3238
3237
|
{ trim: !0 }
|
|
@@ -3326,15 +3325,15 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3326
3325
|
}
|
|
3327
3326
|
const c = k(null);
|
|
3328
3327
|
let p, f, m, y = null;
|
|
3329
|
-
const S = k(null),
|
|
3328
|
+
const S = k(null), q = (g) => {
|
|
3330
3329
|
g.ctrlKey && g.preventDefault();
|
|
3331
3330
|
};
|
|
3332
3331
|
function R() {
|
|
3333
3332
|
if (!a.handleZoom) return null;
|
|
3334
3333
|
let g;
|
|
3335
3334
|
const _ = (O) => {
|
|
3336
|
-
const Q = O.ctrlKey || O.metaKey,
|
|
3337
|
-
if (!Q && !
|
|
3335
|
+
const Q = O.ctrlKey || O.metaKey, he = O.shiftKey;
|
|
3336
|
+
if (!Q && !he) {
|
|
3338
3337
|
s.value = !0, r.value = u(), clearTimeout(g), g = window.setTimeout(() => {
|
|
3339
3338
|
s.value = !1;
|
|
3340
3339
|
}, 1e3);
|
|
@@ -3353,8 +3352,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3353
3352
|
s.value = !1;
|
|
3354
3353
|
};
|
|
3355
3354
|
return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (O) => {
|
|
3356
|
-
const Q = O.originalEvent.ctrlKey || O.originalEvent.metaKey,
|
|
3357
|
-
!Q && !
|
|
3355
|
+
const Q = O.originalEvent.ctrlKey || O.originalEvent.metaKey, he = O.originalEvent.shiftKey;
|
|
3356
|
+
!Q && !he && (O.originalEvent.preventDefault(), O.originalEvent.stopPropagation());
|
|
3358
3357
|
}), () => {
|
|
3359
3358
|
c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(g);
|
|
3360
3359
|
};
|
|
@@ -3375,14 +3374,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3375
3374
|
if (Array.from(document.styleSheets).some((Be) => Be?.href?.includes(Q))) return;
|
|
3376
3375
|
const Ve = document.createElement("link");
|
|
3377
3376
|
Ve.rel = "stylesheet", Ve.href = Q, document.head.appendChild(Ve);
|
|
3378
|
-
}, O = (Q) => new Promise((
|
|
3377
|
+
}, O = (Q) => new Promise((he, Ve) => {
|
|
3379
3378
|
const Be = Array.from(document.scripts).find((Ie) => Ie.src === Q);
|
|
3380
3379
|
if (Be) {
|
|
3381
|
-
Be.addEventListener("load", () =>
|
|
3380
|
+
Be.addEventListener("load", () => he()), Be.addEventListener("error", (Ie) => Ve(Ie));
|
|
3382
3381
|
return;
|
|
3383
3382
|
}
|
|
3384
3383
|
const Me = document.createElement("script");
|
|
3385
|
-
Me.src = Q, Me.async = !0, Me.onload = () =>
|
|
3384
|
+
Me.src = Q, Me.async = !0, Me.onload = () => he(), Me.onerror = (Ie) => Ve(Ie), document.body.appendChild(Me);
|
|
3386
3385
|
});
|
|
3387
3386
|
Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), O("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => O("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => g(0)).catch(_);
|
|
3388
3387
|
});
|
|
@@ -3450,7 +3449,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3450
3449
|
layer: _
|
|
3451
3450
|
}, H.value = g.length;
|
|
3452
3451
|
}
|
|
3453
|
-
function
|
|
3452
|
+
function W() {
|
|
3454
3453
|
const g = v.value?.layer;
|
|
3455
3454
|
g && (g instanceof L.Circle && g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getLatLng && p.setView(g.getLatLng(), Math.max(T.value, 14)));
|
|
3456
3455
|
}
|
|
@@ -3459,7 +3458,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3459
3458
|
g && (f.removeLayer(g), J(), C());
|
|
3460
3459
|
}
|
|
3461
3460
|
_e(async () => {
|
|
3462
|
-
document.addEventListener("wheel",
|
|
3461
|
+
document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal = Ss;
|
|
3463
3462
|
const g = a.handleZoom;
|
|
3464
3463
|
p = L.map(c.value, {
|
|
3465
3464
|
zoomControl: !1,
|
|
@@ -3486,7 +3485,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3486
3485
|
L.geoJSON(Y).eachLayer((Q) => O.push(Q)), O.length && f.addLayer(O[0]), J(), C(), M();
|
|
3487
3486
|
}
|
|
3488
3487
|
}), Xe(() => {
|
|
3489
|
-
document.removeEventListener("wheel",
|
|
3488
|
+
document.removeEventListener("wheel", q), y && y();
|
|
3490
3489
|
});
|
|
3491
3490
|
function se(g) {
|
|
3492
3491
|
if (p) {
|
|
@@ -3522,8 +3521,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3522
3521
|
if (typeof O.result == "string")
|
|
3523
3522
|
try {
|
|
3524
3523
|
const Q = JSON.parse(O.result);
|
|
3525
|
-
f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((
|
|
3526
|
-
f.addLayer(
|
|
3524
|
+
f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((he) => {
|
|
3525
|
+
f.addLayer(he);
|
|
3527
3526
|
}), J(), C(), M();
|
|
3528
3527
|
} finally {
|
|
3529
3528
|
_.value = "";
|
|
@@ -3547,8 +3546,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3547
3546
|
}
|
|
3548
3547
|
f.clearLayers(), _ && L.geoJSON({ type: "Feature", geometry: _ }).eachLayer((Y) => {
|
|
3549
3548
|
f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (O) => {
|
|
3550
|
-
const
|
|
3551
|
-
n("update:modelValue", { type: "Point", coordinates: [
|
|
3549
|
+
const he = O.target.getLatLng();
|
|
3550
|
+
n("update:modelValue", { type: "Point", coordinates: [he.lng, he.lat] });
|
|
3552
3551
|
});
|
|
3553
3552
|
}), H.value = f.getLayers().length, C(), M();
|
|
3554
3553
|
}
|
|
@@ -3594,7 +3593,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3594
3593
|
default: Ee(() => [
|
|
3595
3594
|
s.value && a.handleZoom ? (i(), d("div", cr, [
|
|
3596
3595
|
l("div", pr, [
|
|
3597
|
-
l("p", fr,
|
|
3596
|
+
l("p", fr, G(r.value), 1)
|
|
3598
3597
|
])
|
|
3599
3598
|
])) : D("", !0)
|
|
3600
3599
|
]),
|
|
@@ -3687,25 +3686,25 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3687
3686
|
l("div", $r, [
|
|
3688
3687
|
v.value ? (i(), d("div", Cr, [
|
|
3689
3688
|
l("div", Vr, [
|
|
3690
|
-
_[7] || (_[7] =
|
|
3691
|
-
l("span", Mr,
|
|
3689
|
+
_[7] || (_[7] = ge(" Тип: ", -1)),
|
|
3690
|
+
l("span", Mr, G(v.value.type), 1)
|
|
3692
3691
|
]),
|
|
3693
3692
|
l("div", Lr, [
|
|
3694
3693
|
l("div", Sr, [
|
|
3695
|
-
_[8] || (_[8] =
|
|
3696
|
-
l("b", null,
|
|
3694
|
+
_[8] || (_[8] = ge(" Центр: ", -1)),
|
|
3695
|
+
l("b", null, G(v.value.center.lat.toFixed(5)) + ", " + G(v.value.center.lng.toFixed(5)), 1)
|
|
3697
3696
|
]),
|
|
3698
3697
|
v.value.areaKm2 !== null ? (i(), d("div", Br, [
|
|
3699
|
-
_[9] || (_[9] =
|
|
3700
|
-
l("b", null,
|
|
3698
|
+
_[9] || (_[9] = ge(" Площа: ", -1)),
|
|
3699
|
+
l("b", null, G(v.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3701
3700
|
])) : (i(), d("div", jr, _[10] || (_[10] = [
|
|
3702
|
-
|
|
3701
|
+
ge(" Площа: ", -1),
|
|
3703
3702
|
l("b", null, "—", -1)
|
|
3704
3703
|
]))),
|
|
3705
3704
|
l("button", {
|
|
3706
3705
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3707
3706
|
title: "Наблизити",
|
|
3708
|
-
onClick: _[5] || (_[5] = (Y) =>
|
|
3707
|
+
onClick: _[5] || (_[5] = (Y) => W())
|
|
3709
3708
|
}, _[11] || (_[11] = [
|
|
3710
3709
|
ye('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-66e4a27d><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-66e4a27d></path><path d="M7 10l6 0" data-v-66e4a27d></path><path d="M10 7l0 6" data-v-66e4a27d></path><path d="M21 21l-6 -6" data-v-66e4a27d></path></svg>', 1)
|
|
3711
3710
|
])),
|
|
@@ -3743,7 +3742,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3743
3742
|
setup(o, { emit: e }) {
|
|
3744
3743
|
const t = o, a = e;
|
|
3745
3744
|
$e(t.style);
|
|
3746
|
-
const n = k(null), s = k(null), r = k(null), u = k(!1), c = k(""), p = de(o, "modelValue"), f = B(() => t.placeholder || "Add tag…"), m = B(() => p.value?.length === 0 && c.value === ""), y = B(() => !t.disabled && p.value?.length > 0), S = B(() => t.disabled),
|
|
3745
|
+
const n = k(null), s = k(null), r = k(null), u = k(!1), c = k(""), p = de(o, "modelValue"), f = B(() => t.placeholder || "Add tag…"), m = B(() => p.value?.length === 0 && c.value === ""), y = B(() => !t.disabled && p.value?.length > 0), S = B(() => t.disabled), q = async () => {
|
|
3747
3746
|
S.value || await je(() => r.value?.focus());
|
|
3748
3747
|
}, R = (V) => {
|
|
3749
3748
|
const $ = V.trim();
|
|
@@ -3784,7 +3783,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3784
3783
|
S.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3785
3784
|
]),
|
|
3786
3785
|
"data-focus": u.value ? "true" : "false",
|
|
3787
|
-
onClick:
|
|
3786
|
+
onClick: q
|
|
3788
3787
|
}, [
|
|
3789
3788
|
l("div", {
|
|
3790
3789
|
class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
@@ -3796,7 +3795,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3796
3795
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3797
3796
|
}, [
|
|
3798
3797
|
l("div", Ar, [
|
|
3799
|
-
l("div", Tr,
|
|
3798
|
+
l("div", Tr, G(F), 1)
|
|
3800
3799
|
]),
|
|
3801
3800
|
l("div", {
|
|
3802
3801
|
role: "button",
|
|
@@ -3816,7 +3815,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3816
3815
|
], -1)
|
|
3817
3816
|
]), 8, Fr)
|
|
3818
3817
|
]))), 128)),
|
|
3819
|
-
m.value ? (i(), d("div", Or,
|
|
3818
|
+
m.value ? (i(), d("div", Or, G(f.value), 1)) : D("", !0),
|
|
3820
3819
|
l("div", Dr, [
|
|
3821
3820
|
S.value ? D("", !0) : ae((i(), d("input", {
|
|
3822
3821
|
key: 0,
|
|
@@ -3836,7 +3835,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3836
3835
|
onKeydown: x,
|
|
3837
3836
|
placeholder: p.value && p.value.length ? "" : void 0
|
|
3838
3837
|
}, null, 40, Ur)), [
|
|
3839
|
-
[
|
|
3838
|
+
[ve, c.value]
|
|
3840
3839
|
])
|
|
3841
3840
|
])
|
|
3842
3841
|
], 512),
|
|
@@ -3930,7 +3929,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3930
3929
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
|
|
3931
3930
|
class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
3932
3931
|
}, null, 8, qr), [
|
|
3933
|
-
[
|
|
3932
|
+
[ve, a.value]
|
|
3934
3933
|
]),
|
|
3935
3934
|
l("button", {
|
|
3936
3935
|
class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
|
|
@@ -3973,7 +3972,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3973
3972
|
}
|
|
3974
3973
|
const S = B(
|
|
3975
3974
|
() => c.value.some((K) => K.key && !K.value || !K.key && K.value)
|
|
3976
|
-
),
|
|
3975
|
+
), q = () => {
|
|
3977
3976
|
c.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
3978
3977
|
}, R = (K) => {
|
|
3979
3978
|
c.value = c.value.filter((T) => T.id !== K);
|
|
@@ -4035,7 +4034,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4035
4034
|
l("div", ti, [
|
|
4036
4035
|
l("button", {
|
|
4037
4036
|
type: "button",
|
|
4038
|
-
onClick:
|
|
4037
|
+
onClick: q,
|
|
4039
4038
|
disabled: S.value,
|
|
4040
4039
|
class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
4041
4040
|
}, [
|
|
@@ -4043,7 +4042,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4043
4042
|
height: "14",
|
|
4044
4043
|
width: "14"
|
|
4045
4044
|
}),
|
|
4046
|
-
|
|
4045
|
+
ge(" " + G(ee(r)), 1)
|
|
4047
4046
|
], 8, li)
|
|
4048
4047
|
])
|
|
4049
4048
|
]));
|
|
@@ -4074,13 +4073,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4074
4073
|
class: E(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")]),
|
|
4075
4074
|
style: { border: "1px solid #CFD9E0" }
|
|
4076
4075
|
}, null, 10, si), [
|
|
4077
|
-
[
|
|
4076
|
+
[ve, s.value]
|
|
4078
4077
|
]),
|
|
4079
4078
|
ae(l("input", {
|
|
4080
4079
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
4081
4080
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4082
4081
|
}, null, 512), [
|
|
4083
|
-
[
|
|
4082
|
+
[ve, s.value]
|
|
4084
4083
|
])
|
|
4085
4084
|
]));
|
|
4086
4085
|
}
|
|
@@ -4115,14 +4114,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4115
4114
|
ref: "range",
|
|
4116
4115
|
class: E(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")])
|
|
4117
4116
|
}, null, 10, ui), [
|
|
4118
|
-
[
|
|
4117
|
+
[ve, s.value]
|
|
4119
4118
|
]),
|
|
4120
4119
|
ae(l("input", {
|
|
4121
4120
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
4122
4121
|
type: "number",
|
|
4123
4122
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4124
4123
|
}, null, 512), [
|
|
4125
|
-
[
|
|
4124
|
+
[ve, s.value]
|
|
4126
4125
|
])
|
|
4127
4126
|
]));
|
|
4128
4127
|
}
|
|
@@ -4231,7 +4230,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4231
4230
|
return (n, s) => (i(), d("button", {
|
|
4232
4231
|
onClick: a,
|
|
4233
4232
|
class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
|
|
4234
|
-
},
|
|
4233
|
+
}, G(n.button), 1));
|
|
4235
4234
|
}
|
|
4236
4235
|
}), vi = { class: "flex flex-col gap-1 w-full" }, hi = {
|
|
4237
4236
|
key: 0,
|
|
@@ -4262,7 +4261,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4262
4261
|
const u = e.item ?? {}, c = s.value;
|
|
4263
4262
|
return c.size ? Object.fromEntries(Object.entries(u).filter(([p]) => c.has(p))) : {};
|
|
4264
4263
|
});
|
|
4265
|
-
return (u, c) => ae((i(),
|
|
4264
|
+
return (u, c) => ae((i(), me(Fe(a.value), {
|
|
4266
4265
|
ua: e.item.ua,
|
|
4267
4266
|
error: e.error || "",
|
|
4268
4267
|
item: u.item,
|
|
@@ -4274,13 +4273,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4274
4273
|
class: E(["flex w-full", `${e.item.type}-component`])
|
|
4275
4274
|
}, [
|
|
4276
4275
|
l("div", vi, [
|
|
4277
|
-
(i(),
|
|
4276
|
+
(i(), me(Fe(n.value), Te(r.value, {
|
|
4278
4277
|
modelValue: t.value,
|
|
4279
4278
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => t.value = p)
|
|
4280
4279
|
}), null, 16, ["modelValue"])),
|
|
4281
|
-
u.item.description && e.layout !== "settings" ? (i(), d("p", hi,
|
|
4280
|
+
u.item.description && e.layout !== "settings" ? (i(), d("p", hi, G(u.item.description), 1)) : D("", !0)
|
|
4282
4281
|
]),
|
|
4283
|
-
u.item.behavior?.api && u.item.behavior?.button ? (i(),
|
|
4282
|
+
u.item.behavior?.api && u.item.behavior?.button ? (i(), me(mi, Te({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
|
|
4284
4283
|
], 2)
|
|
4285
4284
|
]),
|
|
4286
4285
|
_: 1
|
|
@@ -4308,7 +4307,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4308
4307
|
const Z = typeof M == "number" ? `${M}px` : `${M}`;
|
|
4309
4308
|
return { width: Z, minWidth: Z };
|
|
4310
4309
|
});
|
|
4311
|
-
let p = null, f = 0, m = 0, y = null, S = null,
|
|
4310
|
+
let p = null, f = 0, m = 0, y = null, S = null, q = null;
|
|
4312
4311
|
const R = () => te(), K = () => H();
|
|
4313
4312
|
ue(
|
|
4314
4313
|
() => t.target,
|
|
@@ -4336,13 +4335,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4336
4335
|
V(), T(null, !0), y = null, typeof window < "u" && (f && window.cancelAnimationFrame(f), m && window.cancelAnimationFrame(m));
|
|
4337
4336
|
});
|
|
4338
4337
|
function T(M, Z = !1) {
|
|
4339
|
-
if (
|
|
4338
|
+
if (q && (q(), q = null), Z) {
|
|
4340
4339
|
S = null;
|
|
4341
4340
|
return;
|
|
4342
4341
|
}
|
|
4343
4342
|
if (S = M ?? null, typeof window > "u") return;
|
|
4344
4343
|
const N = M ?? window, le = window;
|
|
4345
|
-
N.addEventListener("scroll", R, { passive: !0 }), le.addEventListener("resize", K),
|
|
4344
|
+
N.addEventListener("scroll", R, { passive: !0 }), le.addEventListener("resize", K), q = () => {
|
|
4346
4345
|
N.removeEventListener("scroll", R), le.removeEventListener("resize", K);
|
|
4347
4346
|
};
|
|
4348
4347
|
}
|
|
@@ -4362,11 +4361,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4362
4361
|
if (!j) return;
|
|
4363
4362
|
let C = (le.getAttribute("id") ?? "").trim();
|
|
4364
4363
|
C || (C = v(j) || `heading-${z + 1}`);
|
|
4365
|
-
let
|
|
4366
|
-
for (; Z.has(
|
|
4367
|
-
|
|
4368
|
-
le.id !==
|
|
4369
|
-
id:
|
|
4364
|
+
let W = C, oe = 1;
|
|
4365
|
+
for (; Z.has(W); )
|
|
4366
|
+
W = `${C}-${oe += 1}`;
|
|
4367
|
+
le.id !== W && Object.assign(le, { id: W }), Z.add(W), N.push({
|
|
4368
|
+
id: W,
|
|
4370
4369
|
text: j,
|
|
4371
4370
|
level: le.tagName.toLowerCase() === "h1" ? 1 : 2
|
|
4372
4371
|
});
|
|
@@ -4393,10 +4392,10 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4393
4392
|
const M = S, Z = (M ? M.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), N = (M ? M.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), le = Z + N;
|
|
4394
4393
|
let z = null;
|
|
4395
4394
|
for (let C = 0; C < a.value.length; C += 1) {
|
|
4396
|
-
const
|
|
4395
|
+
const W = a.value[C], oe = document.getElementById(W.id);
|
|
4397
4396
|
if (oe) {
|
|
4398
4397
|
const se = $(oe);
|
|
4399
|
-
se + oe.offsetHeight > Z && se < le && (z =
|
|
4398
|
+
se + oe.offsetHeight > Z && se < le && (z = W.id);
|
|
4400
4399
|
}
|
|
4401
4400
|
}
|
|
4402
4401
|
!z && s.value && (z = s.value), z && (s.value = z);
|
|
@@ -4420,7 +4419,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4420
4419
|
class: E(u.value),
|
|
4421
4420
|
style: be(c.value)
|
|
4422
4421
|
}, [
|
|
4423
|
-
l("h2", gi,
|
|
4422
|
+
l("h2", gi, G(M.title), 1),
|
|
4424
4423
|
l("div", bi, [
|
|
4425
4424
|
(i(!0), d(re, null, fe(a.value, (N) => (i(), d("div", {
|
|
4426
4425
|
key: N.id,
|
|
@@ -4439,7 +4438,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4439
4438
|
N.id === n.value ? "text-gray-800" : "text-gray-500"
|
|
4440
4439
|
])
|
|
4441
4440
|
}, [
|
|
4442
|
-
l("span", null,
|
|
4441
|
+
l("span", null, G(N.text), 1)
|
|
4443
4442
|
], 10, yi)
|
|
4444
4443
|
], 2))), 128))
|
|
4445
4444
|
])
|
|
@@ -4523,8 +4522,8 @@ function Si(o, e, t = !1) {
|
|
|
4523
4522
|
return;
|
|
4524
4523
|
}
|
|
4525
4524
|
let y = !1, S = null;
|
|
4526
|
-
m.rules.forEach((
|
|
4527
|
-
const R = Vi(o.value[m.name],
|
|
4525
|
+
m.rules.forEach((q) => {
|
|
4526
|
+
const R = Vi(o.value[m.name], q);
|
|
4528
4527
|
R && (y = !0, !S && typeof R == "string" && (S = R));
|
|
4529
4528
|
}), y && S ? n.value[m.name] = S : delete n.value[m.name];
|
|
4530
4529
|
}
|
|
@@ -4569,7 +4568,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4569
4568
|
validate: c,
|
|
4570
4569
|
reset: p,
|
|
4571
4570
|
visibleSchema: f
|
|
4572
|
-
} = Si(r, n.schema, Zt(n, "disabled")), m = k(null), y = k(null), S = B(() => n.navigation),
|
|
4571
|
+
} = Si(r, n.schema, Zt(n, "disabled")), m = k(null), y = k(null), S = B(() => n.navigation), q = B(() => n.navWidth), R = B(() => n.style?.columns), K = Object.freeze({ container: 12, label: 3 }), T = B(() => n.columns ?? R.value ?? K), H = B(() => n.columns != null || R.value != null), I = B(() => H.value ? "horizontal" : n.layout), v = (F) => F?.columns ? "horizontal" : I.value, x = (F) => F?.columns ?? T.value, V = () => {
|
|
4573
4572
|
a("update:modelValue", r.value), c(), a("handle-submit", r.value);
|
|
4574
4573
|
};
|
|
4575
4574
|
e({
|
|
@@ -4627,7 +4626,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4627
4626
|
target: m.value,
|
|
4628
4627
|
"scroll-container": y.value,
|
|
4629
4628
|
enabled: S.value,
|
|
4630
|
-
width:
|
|
4629
|
+
width: q.value
|
|
4631
4630
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
4632
4631
|
]));
|
|
4633
4632
|
}
|
|
@@ -4731,7 +4730,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4731
4730
|
l("div", Ii, [
|
|
4732
4731
|
l("div", zi, [
|
|
4733
4732
|
l("div", Ai, [
|
|
4734
|
-
l("h3", Ti,
|
|
4733
|
+
l("h3", Ti, G(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4735
4734
|
l("button", {
|
|
4736
4735
|
onClick: f,
|
|
4737
4736
|
type: "button",
|
|
@@ -4756,7 +4755,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4756
4755
|
]))
|
|
4757
4756
|
]),
|
|
4758
4757
|
l("div", Fi, [
|
|
4759
|
-
n.value ? (i(),
|
|
4758
|
+
n.value ? (i(), me(We, {
|
|
4760
4759
|
key: 0,
|
|
4761
4760
|
schema: n.value,
|
|
4762
4761
|
values: s.value,
|