@opengis/form 0.0.67 → 0.0.69
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 W, ref as
|
|
1
|
+
import { defineComponent as W, ref as _, onMounted as ke, onUnmounted as et, createElementBlock as c, openBlock as r, createCommentVNode as F, renderSlot as Ee, createElementVNode as l, toDisplayString as K, mergeProps as Ge, computed as V, normalizeStyle as ge, createTextVNode as be, normalizeProps as yt, guardReactiveProps as xt, normalizeClass as D, mergeModels as ue, useModel as de, withDirectives as se, unref as ne, vModelText as me, vModelCheckbox as It, createVNode as G, createBlock as ce, resolveDynamicComponent as qe, withCtx as Te, withModifiers as we, onBeforeUnmount as wt, watch as re, createStaticVNode as _e, vModelRadio as Tt, Fragment as ie, renderList as pe, reactive as Ot, vModelDynamic as qt, vShow as kt, inject as Ie, resolveComponent as $t, Transition as _t, nextTick as je, Teleport as pt, getCurrentInstance as Kt, watchEffect as Wt, withKeys as Zt, toRef as Jt, provide as Ct } from "vue";
|
|
2
2
|
import { notify as fe, VsModal as Ft, modal as Yt } from "@opengis/core";
|
|
3
3
|
const Xt = { class: "w-full relative" }, Qt = {
|
|
4
4
|
key: 0,
|
|
@@ -24,7 +24,7 @@ const Xt = { class: "w-full relative" }, Qt = {
|
|
|
24
24
|
columns: {}
|
|
25
25
|
},
|
|
26
26
|
setup(o) {
|
|
27
|
-
const e =
|
|
27
|
+
const e = _("uk"), t = (a) => {
|
|
28
28
|
a.detail.key === "locale" && (e.value = a.detail.newValue);
|
|
29
29
|
};
|
|
30
30
|
return ke(() => {
|
|
@@ -148,7 +148,7 @@ const Xt = { class: "w-full relative" }, Qt = {
|
|
|
148
148
|
columns: {}
|
|
149
149
|
},
|
|
150
150
|
setup(o) {
|
|
151
|
-
const e = o, t =
|
|
151
|
+
const e = o, t = _("uk");
|
|
152
152
|
V(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
|
|
153
153
|
const a = V(() => e.item?.description ?? ""), n = V(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), i = V(() => (typeof e.error == "string" ? e.error : "") ?? ""), s = (u) => {
|
|
154
154
|
u.key === "locale" && (t.value = u.newValue ?? "uk");
|
|
@@ -447,7 +447,7 @@ const Ll = /* @__PURE__ */ Q($l, [["render", Vl]]), Ml = { class: "flex items-ce
|
|
|
447
447
|
} else
|
|
448
448
|
a("update:modelValue", u);
|
|
449
449
|
}
|
|
450
|
-
}), s =
|
|
450
|
+
}), s = _(`vs-checkbox-${t.view || "default"}`);
|
|
451
451
|
return (u, f) => (r(), c("div", Fl, [
|
|
452
452
|
(r(), ce(qe(s.value === "vs-checkbox-buttons" ? ne(Ol) : ne(El)), {
|
|
453
453
|
value: u.value,
|
|
@@ -629,7 +629,7 @@ const Jl = /* @__PURE__ */ Q(Kl, [["render", Zl]]), Yl = {
|
|
|
629
629
|
}),
|
|
630
630
|
emits: ["update:modelValue"],
|
|
631
631
|
setup(o) {
|
|
632
|
-
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n =
|
|
632
|
+
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n = _(null);
|
|
633
633
|
let i = null;
|
|
634
634
|
return ke(async () => {
|
|
635
635
|
if (n.value) {
|
|
@@ -853,7 +853,7 @@ const Jl = /* @__PURE__ */ Q(Kl, [["render", Zl]]), Yl = {
|
|
|
853
853
|
},
|
|
854
854
|
emits: ["update:modelValue"],
|
|
855
855
|
setup(o, { emit: e }) {
|
|
856
|
-
const t = o, a = e, n =
|
|
856
|
+
const t = o, a = e, n = _([]), i = Ot({}), s = (y) => y?.value || y?.id || y?.text || y, u = (y) => y.text || String(y), f = (y) => `lg:col-span-${y || 12}`, v = V(() => [
|
|
857
857
|
t.position === "vertical" ? "flex flex-col" : "",
|
|
858
858
|
t.colSpan ? "grid" : "flex justify-start"
|
|
859
859
|
]), h = (y) => y == null || y === "" ? null : typeof y == "string" || typeof y == "number" ? y : String(y), b = V(() => {
|
|
@@ -879,16 +879,16 @@ const Jl = /* @__PURE__ */ Q(Kl, [["render", Zl]]), Yl = {
|
|
|
879
879
|
label: k,
|
|
880
880
|
options: j
|
|
881
881
|
};
|
|
882
|
-
},
|
|
882
|
+
}, $ = [];
|
|
883
883
|
return I.forEach((M) => {
|
|
884
884
|
const j = x(M);
|
|
885
|
-
j &&
|
|
885
|
+
j && $.push(j);
|
|
886
886
|
}), y.forEach((M, j) => {
|
|
887
887
|
if (z.has(j))
|
|
888
888
|
return;
|
|
889
889
|
const g = x(j);
|
|
890
|
-
g &&
|
|
891
|
-
}),
|
|
890
|
+
g && $.push(g);
|
|
891
|
+
}), $;
|
|
892
892
|
}), C = async () => {
|
|
893
893
|
try {
|
|
894
894
|
const y = await fetch(`/api/suggest/${t.data}`).then((I) => I.json());
|
|
@@ -964,7 +964,7 @@ const Jl = /* @__PURE__ */ Q(Kl, [["render", Zl]]), Yl = {
|
|
|
964
964
|
}, [
|
|
965
965
|
(r(!0), c(ie, null, pe(z.options, (x) => (r(), ce(gt, {
|
|
966
966
|
modelValue: i[s(x)],
|
|
967
|
-
"onUpdate:modelValue": (
|
|
967
|
+
"onUpdate:modelValue": ($) => i[s(x)] = $,
|
|
968
968
|
value: s(x),
|
|
969
969
|
class: D(f(y.colSpan)),
|
|
970
970
|
disabled: t.disabled || x.disabled,
|
|
@@ -1241,7 +1241,7 @@ function Xo(o, e) {
|
|
|
1241
1241
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1242
1242
|
]));
|
|
1243
1243
|
}
|
|
1244
|
-
const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo =
|
|
1244
|
+
const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = ["title"], en = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, tn = /* @__PURE__ */ W({
|
|
1245
1245
|
__name: "vs-input-file-list-item",
|
|
1246
1246
|
props: /* @__PURE__ */ ue({
|
|
1247
1247
|
format: {},
|
|
@@ -1263,7 +1263,10 @@ const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1263
1263
|
emits: ["update:value", "update:item"],
|
|
1264
1264
|
setup(o) {
|
|
1265
1265
|
const e = de(o, "value"), t = de(o, "item"), a = o;
|
|
1266
|
-
return (n, i) => (r(), c("div",
|
|
1266
|
+
return (n, i) => (r(), c("div", {
|
|
1267
|
+
title: t.value,
|
|
1268
|
+
class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"
|
|
1269
|
+
}, [
|
|
1267
1270
|
(r(), ce(qe(ne(qo)(t.value)), {
|
|
1268
1271
|
src: t.value,
|
|
1269
1272
|
alt: "file",
|
|
@@ -1288,9 +1291,9 @@ const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1288
1291
|
G(Pt, { class: "w-4 h-4" })
|
|
1289
1292
|
])
|
|
1290
1293
|
])
|
|
1291
|
-
]));
|
|
1294
|
+
], 8, Qo));
|
|
1292
1295
|
}
|
|
1293
|
-
}), Bt = /* @__PURE__ */ Q(tn, [["__scopeId", "data-v-
|
|
1296
|
+
}), Bt = /* @__PURE__ */ Q(tn, [["__scopeId", "data-v-286cdbc0"]]), ln = { class: "flex items-center gap-x-2" }, on = ["multiple", "disabled"], nn = {
|
|
1294
1297
|
key: 1,
|
|
1295
1298
|
class: "flex items-center flex-wrap gap-2"
|
|
1296
1299
|
}, an = {
|
|
@@ -1318,7 +1321,7 @@ const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1318
1321
|
}),
|
|
1319
1322
|
emits: /* @__PURE__ */ ue(["change"], ["update:modelValue"]),
|
|
1320
1323
|
setup(o, { emit: e }) {
|
|
1321
|
-
const t = o, a = de(o, "modelValue"), n = e, i =
|
|
1324
|
+
const t = o, a = de(o, "modelValue"), n = e, i = _(null), s = _(!1), u = (h) => Array.isArray(a.value) && a.value[h] || "", f = (h) => {
|
|
1322
1325
|
if (t.max_size && h.size > t.max_size * 1024 * 1024) {
|
|
1323
1326
|
const b = (h.size / 1048576).toFixed(2);
|
|
1324
1327
|
return fe({
|
|
@@ -1340,7 +1343,7 @@ const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1340
1343
|
s.value = !0;
|
|
1341
1344
|
try {
|
|
1342
1345
|
if (t.multiple) {
|
|
1343
|
-
const y = Array.from(b).map(async (
|
|
1346
|
+
const y = Array.from(b).map(async ($) => t.format && !$.name.endsWith(t.format) ? null : await Mt($, "1", "form", "table")), x = (await Promise.all(y)).filter(($) => $ !== null).map(($) => $?.file_path).filter(Boolean);
|
|
1344
1347
|
a.value = [...a.value || [], ...x], n("change", a.value);
|
|
1345
1348
|
} else {
|
|
1346
1349
|
const y = b[0];
|
|
@@ -1402,7 +1405,7 @@ const Pt = /* @__PURE__ */ Q(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1402
1405
|
], 2))
|
|
1403
1406
|
]));
|
|
1404
1407
|
}
|
|
1405
|
-
}), un = /* @__PURE__ */ Q(rn, [["__scopeId", "data-v-
|
|
1408
|
+
}), un = /* @__PURE__ */ Q(rn, [["__scopeId", "data-v-e613a523"]]), dn = { class: "max-w-[55vw]" }, cn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, pn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, fn = { class: "px-[5px]" }, vn = { class: "" }, dt = /* @__PURE__ */ W({
|
|
1406
1409
|
__name: "vs-widget-file-info",
|
|
1407
1410
|
props: {
|
|
1408
1411
|
item: { default: null }
|
|
@@ -1591,7 +1594,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1591
1594
|
},
|
|
1592
1595
|
emits: ["update"],
|
|
1593
1596
|
setup(o, { emit: e }) {
|
|
1594
|
-
const t = o, a = Ie("form"), n = V(() => a.value.formId), i =
|
|
1597
|
+
const t = o, a = Ie("form"), n = V(() => a.value.formId), i = _(!1), s = _(0), u = e, f = _(!1), v = _({}), h = _([]), b = _(""), C = V(() => Array.isArray(h.value) ? h.value.filter((j) => j.ext === "jpg" || j.ext === "png").map((j) => j?.file_path) : []), y = V(() => b.value === "" ? h.value : h.value.filter((j) => j?.uploaded_name?.includes(b.value))), I = (j) => {
|
|
1595
1598
|
const g = C.value.findIndex((k) => k === j.item.file_path);
|
|
1596
1599
|
g !== -1 && (i.value = !0, s.value = g);
|
|
1597
1600
|
}, z = async () => {
|
|
@@ -1622,7 +1625,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1622
1625
|
}
|
|
1623
1626
|
})
|
|
1624
1627
|
), await z();
|
|
1625
|
-
},
|
|
1628
|
+
}, $ = (j) => {
|
|
1626
1629
|
const g = { ...j };
|
|
1627
1630
|
return j.cancel || (g.cancel = () => {
|
|
1628
1631
|
f.value = !1;
|
|
@@ -1630,7 +1633,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1630
1633
|
await j.confirm(), f.value = !1, z();
|
|
1631
1634
|
}), g;
|
|
1632
1635
|
}, M = (j) => {
|
|
1633
|
-
v.value =
|
|
1636
|
+
v.value = $(j), f.value = !0;
|
|
1634
1637
|
};
|
|
1635
1638
|
return re(n, (j) => {
|
|
1636
1639
|
j && z();
|
|
@@ -1743,7 +1746,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1743
1746
|
}
|
|
1744
1747
|
},
|
|
1745
1748
|
setup(o) {
|
|
1746
|
-
const e = o, t =
|
|
1749
|
+
const e = o, t = _(e.isOpen);
|
|
1747
1750
|
return re(
|
|
1748
1751
|
() => e.isOpen,
|
|
1749
1752
|
(a) => {
|
|
@@ -1787,7 +1790,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1787
1790
|
}
|
|
1788
1791
|
},
|
|
1789
1792
|
setup(o) {
|
|
1790
|
-
const e = o, t =
|
|
1793
|
+
const e = o, t = _(e.isOpen);
|
|
1791
1794
|
return re(
|
|
1792
1795
|
() => e.isOpen,
|
|
1793
1796
|
(a) => {
|
|
@@ -1908,7 +1911,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1908
1911
|
}
|
|
1909
1912
|
},
|
|
1910
1913
|
setup(o) {
|
|
1911
|
-
const e = o, t = Ie("values",
|
|
1914
|
+
const e = o, t = Ie("values", _({})), a = Ie("form"), n = V(() => e.schema?.filter((u) => {
|
|
1912
1915
|
const f = u?.conditions;
|
|
1913
1916
|
if (!f) return !0;
|
|
1914
1917
|
const v = Array.isArray(f) ? f[0] : f, h = e.name ? t.value?.[e.name]?.[v] ?? t.value?.[v] : t.value?.[v];
|
|
@@ -1987,16 +1990,16 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
1987
1990
|
set: (m) => a("update:modelValue", m)
|
|
1988
1991
|
});
|
|
1989
1992
|
!s.value && t.defaultValue && (s.value = t.defaultValue);
|
|
1990
|
-
const u =
|
|
1993
|
+
const u = _(null), f = _(null), v = _(null), h = _(null), b = _(!1), C = _(!1), y = _(null), I = _([]), z = _(-1), x = _([]), $ = _(""), M = _(null), j = _("bottom"), g = _({}), k = _([]), T = V(() => {
|
|
1991
1994
|
if (!k.value.length) return [];
|
|
1992
1995
|
const m = I.value, w = new Map(m.map((S) => [S.id?.toString(), S]));
|
|
1993
1996
|
return k.value.map((S) => w.get(S?.toString())).filter((S) => !!S);
|
|
1994
1997
|
}), A = V(() => t.placeholder || "Select..."), q = V(() => O(y.value));
|
|
1995
|
-
V(() => n.value ? !k.value.length &&
|
|
1998
|
+
V(() => n.value ? !k.value.length && $.value === "" : !q.value && $.value === "");
|
|
1996
1999
|
const oe = V(() => i.value ? !1 : n.value ? k.value.length > 0 : !!s.value), Y = (m) => n.value ? k.value.some((w) => w?.toString() === m?.toString()) : s.value?.toString() === m?.toString(), U = V(() => {
|
|
1997
2000
|
let m = I.value ?? [];
|
|
1998
|
-
if (!t.data &&
|
|
1999
|
-
const w =
|
|
2001
|
+
if (!t.data && $.value.trim() !== "") {
|
|
2002
|
+
const w = $.value.toLowerCase();
|
|
2000
2003
|
m = m.filter((S) => {
|
|
2001
2004
|
const N = O(S).toLowerCase(), le = S.text?.toLowerCase?.() || "";
|
|
2002
2005
|
return N.includes(w) || le.includes(w);
|
|
@@ -2044,7 +2047,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2044
2047
|
return [];
|
|
2045
2048
|
}
|
|
2046
2049
|
}, Me = async () => {
|
|
2047
|
-
t.data ? I.value = await ye(
|
|
2050
|
+
t.data ? I.value = await ye($.value) : I.value = t.options ? [...t.options] : [];
|
|
2048
2051
|
}, ze = async (m) => {
|
|
2049
2052
|
if (m == null) return null;
|
|
2050
2053
|
const w = I.value?.find((S) => S?.id?.toString() === String(m));
|
|
@@ -2076,13 +2079,13 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2076
2079
|
}, Ke = async () => {
|
|
2077
2080
|
b.value ? M.value?.focus() : await he();
|
|
2078
2081
|
}, ot = () => {
|
|
2079
|
-
n.value ? (k.value = [], s.value = [], a("change", [])) : (y.value = null, s.value = null, a("change", null)), Z(null),
|
|
2082
|
+
n.value ? (k.value = [], s.value = [], a("change", [])) : (y.value = null, s.value = null, a("change", null)), Z(null), $.value = "", je(() => M.value?.focus());
|
|
2080
2083
|
}, mt = (m) => {
|
|
2081
2084
|
n.value && (k.value = k.value.filter((w) => w?.toString() !== m?.toString()), s.value = [...k.value], a("change", s.value), je(() => M.value?.focus()));
|
|
2082
2085
|
}, Se = (m) => {
|
|
2083
|
-
n.value ? (Y(m.id) || (k.value = [...k.value, m.id], s.value = [...k.value], a("change", s.value)),
|
|
2086
|
+
n.value ? (Y(m.id) || (k.value = [...k.value, m.id], s.value = [...k.value], a("change", s.value)), $.value = "", je(() => {
|
|
2084
2087
|
M.value?.focus(), z.value = Math.min(z.value, U.value.length - 1);
|
|
2085
|
-
}), Z(null)) : (y.value = m, s.value = m.id, a("change", s.value),
|
|
2088
|
+
}), Z(null)) : (y.value = m, s.value = m.id, a("change", s.value), $.value = "", Le(), Z(m));
|
|
2086
2089
|
}, Ae = (m) => {
|
|
2087
2090
|
Y(m.id) || Se(m);
|
|
2088
2091
|
}, Pe = (m, w) => {
|
|
@@ -2136,11 +2139,11 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2136
2139
|
m.preventDefault();
|
|
2137
2140
|
const S = U.value[z.value];
|
|
2138
2141
|
S && Se(S), M.value?.blur();
|
|
2139
|
-
} else w === "Escape" ? (m.preventDefault(), Le()) : w === "Backspace" ? n.value &&
|
|
2142
|
+
} else w === "Escape" ? (m.preventDefault(), Le()) : w === "Backspace" ? n.value && $.value === "" && k.value.length && (k.value = k.value.slice(0, -1), s.value = [...k.value], a("change", s.value)) : w === "Home" ? (z.value = 0, Pe(x.value[0], v.value)) : w === "End" ? (z.value = U.value.length - 1, Pe(x.value[z.value], v.value)) : w === "Tab" && Le();
|
|
2140
2143
|
}, at = () => {
|
|
2141
2144
|
i.value || (C.value = !0);
|
|
2142
2145
|
}, Be = () => {
|
|
2143
|
-
C.value = !1,
|
|
2146
|
+
C.value = !1, $.value = "";
|
|
2144
2147
|
}, st = (m) => {
|
|
2145
2148
|
m.key === "Escape" && b.value && Le();
|
|
2146
2149
|
}, rt = (m) => {
|
|
@@ -2174,7 +2177,7 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2174
2177
|
}), et(() => {
|
|
2175
2178
|
removeEventListener("keydown", st), removeEventListener("scroll", Oe, !0), removeEventListener("resize", it), document.removeEventListener("click", rt, !0), f.value && xe(f.value).removeEventListener("scroll", ut, !0);
|
|
2176
2179
|
});
|
|
2177
|
-
const Ne =
|
|
2180
|
+
const Ne = _(!1), We = _({}), Fe = _([]), d = _(null);
|
|
2178
2181
|
async function p() {
|
|
2179
2182
|
if (!t.add?.token || d?.value.validate())
|
|
2180
2183
|
return;
|
|
@@ -2203,14 +2206,14 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2203
2206
|
const R = E(async (m) => {
|
|
2204
2207
|
I.value = await ye(m);
|
|
2205
2208
|
}, 200);
|
|
2206
|
-
re(
|
|
2209
|
+
re($, (m) => {
|
|
2207
2210
|
t.data && R(m.trim());
|
|
2208
2211
|
}), re(() => t.options, (m) => {
|
|
2209
2212
|
!t.data && m?.length && (I.value = [...m], He());
|
|
2210
2213
|
}, { immediate: !0 }), re(() => t.parent ?? t.parentValue, () => {
|
|
2211
2214
|
t.data && Me();
|
|
2212
2215
|
});
|
|
2213
|
-
const J =
|
|
2216
|
+
const J = _(!0);
|
|
2214
2217
|
return re(ee, async () => {
|
|
2215
2218
|
if (t.data && (J.value || (n.value ? (k.value = [], s.value = [], a("change", [])) : (y.value = null, s.value = null, a("change", null))), await Me(), t.auto === 1 && ee.value && I.value.length > 0)) {
|
|
2216
2219
|
const m = I.value[0];
|
|
@@ -2330,15 +2333,15 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2330
2333
|
tabindex: "0",
|
|
2331
2334
|
"aria-autocomplete": "list",
|
|
2332
2335
|
placeholder: k.value.length ? " " : A.value,
|
|
2333
|
-
"onUpdate:modelValue": w[2] || (w[2] = (S) =>
|
|
2336
|
+
"onUpdate:modelValue": w[2] || (w[2] = (S) => $.value = S),
|
|
2334
2337
|
onFocus: at,
|
|
2335
2338
|
onBlur: Be,
|
|
2336
2339
|
onKeydown: nt
|
|
2337
2340
|
}, null, 40, ba)), [
|
|
2338
|
-
[me,
|
|
2341
|
+
[me, $.value]
|
|
2339
2342
|
]) : F("", !0)
|
|
2340
2343
|
])
|
|
2341
|
-
])) : !n.value && !C.value && q.value &&
|
|
2344
|
+
])) : !n.value && !C.value && q.value && $.value === "" ? (r(), c("div", {
|
|
2342
2345
|
key: 1,
|
|
2343
2346
|
class: D(["truncate text-gray-900"]),
|
|
2344
2347
|
title: q.value
|
|
@@ -2370,13 +2373,13 @@ const Sn = /* @__PURE__ */ Q(Vn, [["render", Mn]]), Bn = { class: "flex flex-col
|
|
|
2370
2373
|
type: "text",
|
|
2371
2374
|
tabindex: "0",
|
|
2372
2375
|
"aria-autocomplete": "list",
|
|
2373
|
-
placeholder:
|
|
2374
|
-
"onUpdate:modelValue": w[3] || (w[3] = (S) =>
|
|
2376
|
+
placeholder: q.value ? " " : A.value,
|
|
2377
|
+
"onUpdate:modelValue": w[3] || (w[3] = (S) => $.value = S),
|
|
2375
2378
|
onFocus: at,
|
|
2376
2379
|
onBlur: Be,
|
|
2377
2380
|
onKeydown: nt
|
|
2378
2381
|
}, null, 40, ka)), [
|
|
2379
|
-
[me,
|
|
2382
|
+
[me, $.value]
|
|
2380
2383
|
]) : F("", !0)
|
|
2381
2384
|
]))
|
|
2382
2385
|
], 512),
|
|
@@ -2674,14 +2677,14 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2674
2677
|
}),
|
|
2675
2678
|
emits: ["update:modelValue"],
|
|
2676
2679
|
setup(o) {
|
|
2677
|
-
const e = o, t = de(o, "modelValue"), a =
|
|
2680
|
+
const e = o, t = de(o, "modelValue"), a = _({}), n = _(""), i = V(() => {
|
|
2678
2681
|
if (!n.value) return t.value ?? [];
|
|
2679
2682
|
const H = n.value.toLowerCase();
|
|
2680
2683
|
return t.value.filter((P) => e.colModel?.some((O) => {
|
|
2681
2684
|
const Z = P[O.key];
|
|
2682
2685
|
return Z ? Array.isArray(Z) ? Z.join(", ").toLowerCase().includes(H) : String(Z).toLowerCase().includes(H) : !1;
|
|
2683
2686
|
}));
|
|
2684
|
-
}), s =
|
|
2687
|
+
}), s = _(null), u = _(null), f = _(!1), v = _(null), h = _({ top: 0, left: 0 }), b = (H) => {
|
|
2685
2688
|
s.value = H;
|
|
2686
2689
|
}, C = (H) => {
|
|
2687
2690
|
u.value = H;
|
|
@@ -2700,7 +2703,7 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2700
2703
|
}, x = (H) => {
|
|
2701
2704
|
const P = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], O = H.toLowerCase();
|
|
2702
2705
|
return P.some((Z) => O.endsWith(Z));
|
|
2703
|
-
},
|
|
2706
|
+
}, $ = (H) => {
|
|
2704
2707
|
const O = H.target.files?.[0];
|
|
2705
2708
|
if (!O) return;
|
|
2706
2709
|
const Z = new FileReader();
|
|
@@ -2726,9 +2729,9 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2726
2729
|
a.value[P.key] = Z.data;
|
|
2727
2730
|
}));
|
|
2728
2731
|
});
|
|
2729
|
-
const j =
|
|
2732
|
+
const j = _(""), g = _(!1);
|
|
2730
2733
|
let k = "edit", T = 0;
|
|
2731
|
-
const A =
|
|
2734
|
+
const A = _({}), q = _({});
|
|
2732
2735
|
async function oe() {
|
|
2733
2736
|
j.value = "Додати", g.value = !0, k = "add", A.value = {};
|
|
2734
2737
|
}
|
|
@@ -2775,7 +2778,7 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2775
2778
|
l("input", {
|
|
2776
2779
|
ref_key: "fileInput",
|
|
2777
2780
|
ref: v,
|
|
2778
|
-
onChange:
|
|
2781
|
+
onChange: $,
|
|
2779
2782
|
class: "hidden",
|
|
2780
2783
|
accept: ".json",
|
|
2781
2784
|
type: "file"
|
|
@@ -2813,7 +2816,7 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2813
2816
|
width: "14",
|
|
2814
2817
|
height: "14"
|
|
2815
2818
|
}),
|
|
2816
|
-
P[4] || (P[4] = be(" Імпортувати "))
|
|
2819
|
+
P[4] || (P[4] = be(" Імпортувати ", -1))
|
|
2817
2820
|
]),
|
|
2818
2821
|
l("button", {
|
|
2819
2822
|
onClick: M,
|
|
@@ -2825,7 +2828,7 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2825
2828
|
width: "14",
|
|
2826
2829
|
height: "14"
|
|
2827
2830
|
}),
|
|
2828
|
-
P[5] || (P[5] = be(" Експортувати "))
|
|
2831
|
+
P[5] || (P[5] = be(" Експортувати ", -1))
|
|
2829
2832
|
])
|
|
2830
2833
|
])
|
|
2831
2834
|
])
|
|
@@ -2837,7 +2840,7 @@ const ns = /* @__PURE__ */ Q(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2837
2840
|
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"
|
|
2838
2841
|
}, [
|
|
2839
2842
|
G(tt),
|
|
2840
|
-
P[6] || (P[6] = be(" Додати "))
|
|
2843
|
+
P[6] || (P[6] = be(" Додати ", -1))
|
|
2841
2844
|
])
|
|
2842
2845
|
]),
|
|
2843
2846
|
l("div", ms, [
|
|
@@ -3231,11 +3234,11 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3231
3234
|
const t = o, a = e, n = ["here", "xy", "parcel"], i = V(() => {
|
|
3232
3235
|
const g = t.config?.tools?.filter((k) => n.includes(k));
|
|
3233
3236
|
return g && g.length ? g : n;
|
|
3234
|
-
}), s = V(() => t.config?.placeholder?.trim() || "Пошук…"), u =
|
|
3237
|
+
}), s = V(() => t.config?.placeholder?.trim() || "Пошук…"), u = _(i.value[0] ?? n[0]);
|
|
3235
3238
|
re(i, (g) => {
|
|
3236
3239
|
g.includes(u.value) || (u.value = g[0]);
|
|
3237
3240
|
});
|
|
3238
|
-
const f =
|
|
3241
|
+
const f = _(""), v = _(!1), h = _(null);
|
|
3239
3242
|
re(u, () => {
|
|
3240
3243
|
f.value = "", v.value = !1;
|
|
3241
3244
|
});
|
|
@@ -3294,7 +3297,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3294
3297
|
}
|
|
3295
3298
|
];
|
|
3296
3299
|
}
|
|
3297
|
-
function
|
|
3300
|
+
function $(g) {
|
|
3298
3301
|
const T = g.replace(/\s+/g, "").split(":");
|
|
3299
3302
|
if (T.length !== 4) return !1;
|
|
3300
3303
|
const A = [10, 2, 3, 4];
|
|
@@ -3320,7 +3323,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3320
3323
|
if (u.value === "here")
|
|
3321
3324
|
k.searchParams.set("searchtext", g);
|
|
3322
3325
|
else {
|
|
3323
|
-
if (
|
|
3326
|
+
if (!$(g)) {
|
|
3324
3327
|
fe({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
|
|
3325
3328
|
return;
|
|
3326
3329
|
}
|
|
@@ -3428,7 +3431,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3428
3431
|
},
|
|
3429
3432
|
emits: ["onLayerChange"],
|
|
3430
3433
|
setup(o, { emit: e }) {
|
|
3431
|
-
const a =
|
|
3434
|
+
const a = _(Object.keys(o.basemaps)[0]), n = e;
|
|
3432
3435
|
function i(s) {
|
|
3433
3436
|
n("onLayerChange", s), a.value = s;
|
|
3434
3437
|
}
|
|
@@ -3512,15 +3515,15 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3512
3515
|
polygon: p.has("polygon"),
|
|
3513
3516
|
rectangle: p.has("rectangle")
|
|
3514
3517
|
};
|
|
3515
|
-
}), s = V(() => !!a.disabled), u =
|
|
3516
|
-
let x,
|
|
3518
|
+
}), s = V(() => !!a.disabled), u = _(!1), f = _(null), v = _(null), h = _(!1), b = _(""), C = Ot({}), y = _([]), I = V(() => y.value.map((d) => C[d]).filter((d) => !!d)), z = V(() => Array.isArray(a.layers) && a.layers.some((d) => `${d?.service ?? ""}`.toLowerCase() === "vtile"));
|
|
3519
|
+
let x, $, M;
|
|
3517
3520
|
function j() {
|
|
3518
3521
|
const d = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
3519
3522
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
|
|
3520
3523
|
}
|
|
3521
|
-
const g =
|
|
3524
|
+
const g = _(null), k = _(null);
|
|
3522
3525
|
let T = null;
|
|
3523
|
-
const A =
|
|
3526
|
+
const A = _(null), q = (d) => {
|
|
3524
3527
|
d.ctrlKey && d.preventDefault();
|
|
3525
3528
|
};
|
|
3526
3529
|
function oe(d, p) {
|
|
@@ -3722,9 +3725,9 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3722
3725
|
k.value && (k.value.removeEventListener("wheel", p), k.value.removeEventListener("touchstart", B)), x && x.off("wheel"), clearTimeout(d);
|
|
3723
3726
|
};
|
|
3724
3727
|
}
|
|
3725
|
-
const ye =
|
|
3728
|
+
const ye = _(null), Me = _(6), ze = _(0), vt = _(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), he = _(null), Le = We();
|
|
3726
3729
|
let De;
|
|
3727
|
-
const Ke =
|
|
3730
|
+
const Ke = _("topo100");
|
|
3728
3731
|
function ot(d) {
|
|
3729
3732
|
return d ? d.type === "Polygon" ? {
|
|
3730
3733
|
type: "MultiPolygon",
|
|
@@ -3753,7 +3756,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3753
3756
|
});
|
|
3754
3757
|
}
|
|
3755
3758
|
function Se() {
|
|
3756
|
-
const d =
|
|
3759
|
+
const d = $.toGeoJSON(), p = [];
|
|
3757
3760
|
let B = null;
|
|
3758
3761
|
const E = (J) => {
|
|
3759
3762
|
if (J)
|
|
@@ -3774,10 +3777,10 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3774
3777
|
};
|
|
3775
3778
|
(d?.features || []).forEach((J) => E(J.geometry));
|
|
3776
3779
|
const R = B || (p.length ? { type: "MultiPolygon", coordinates: p } : null);
|
|
3777
|
-
n("update:modelValue", R ? ot(R) : null), ze.value =
|
|
3780
|
+
n("update:modelValue", R ? ot(R) : null), ze.value = $.getLayers().length;
|
|
3778
3781
|
}
|
|
3779
3782
|
function Ae(d = 30) {
|
|
3780
|
-
const p =
|
|
3783
|
+
const p = $.getLayers();
|
|
3781
3784
|
if (!p.length) return;
|
|
3782
3785
|
const E = L.featureGroup(p).getBounds();
|
|
3783
3786
|
E && E.isValid() && x.fitBounds(E, { padding: [d, d] });
|
|
@@ -3785,7 +3788,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3785
3788
|
function Pe() {
|
|
3786
3789
|
s.value || A.value?.click();
|
|
3787
3790
|
}
|
|
3788
|
-
const xe =
|
|
3791
|
+
const xe = _("");
|
|
3789
3792
|
re(i, (d) => {
|
|
3790
3793
|
xe.value && !Object.entries(d).filter(([p, B]) => B).map(([p]) => p).includes(xe.value) && (M?.disable && M.disable(), xe.value = "");
|
|
3791
3794
|
}), re(
|
|
@@ -3818,7 +3821,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3818
3821
|
},
|
|
3819
3822
|
{ immediate: !0, deep: !0 }
|
|
3820
3823
|
), re(s, (d) => {
|
|
3821
|
-
d && M && (M.disable(), xe.value = ""),
|
|
3824
|
+
d && M && (M.disable(), xe.value = ""), $ && $.eachLayer((p) => {
|
|
3822
3825
|
d ? p.dragging?.disable?.() : p.dragging?.enable && (p.dragging.enable(), p.dragging.enabled?.());
|
|
3823
3826
|
});
|
|
3824
3827
|
});
|
|
@@ -3857,7 +3860,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3857
3860
|
}
|
|
3858
3861
|
}
|
|
3859
3862
|
function Be() {
|
|
3860
|
-
const d =
|
|
3863
|
+
const d = $.getLayers();
|
|
3861
3864
|
if (!d.length) {
|
|
3862
3865
|
he.value = null, ze.value = 0;
|
|
3863
3866
|
return;
|
|
@@ -3878,7 +3881,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3878
3881
|
function rt() {
|
|
3879
3882
|
if (s.value) return;
|
|
3880
3883
|
const d = he.value?.layer;
|
|
3881
|
-
d && (
|
|
3884
|
+
d && ($.removeLayer(d), Se(), Be());
|
|
3882
3885
|
}
|
|
3883
3886
|
ke(async () => {
|
|
3884
3887
|
document.addEventListener("wheel", q, { passive: !1 }), await mt(), L.drawLocal = Us;
|
|
@@ -3888,10 +3891,10 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3888
3891
|
scrollWheelZoom: !d
|
|
3889
3892
|
}).setView(vt.value, 10), setTimeout(() => {
|
|
3890
3893
|
T = ee();
|
|
3891
|
-
}, 100), L.control.zoom({ position: "bottomright" }).addTo(x), Ke.value = Object.keys(Le)[0], De = L.tileLayer(Le[Ke.value].url, { maxZoom: 19, minZoom: 6 }).addTo(x),
|
|
3894
|
+
}, 100), L.control.zoom({ position: "bottomright" }).addTo(x), Ke.value = Object.keys(Le)[0], De = L.tileLayer(Le[Ke.value].url, { maxZoom: 19, minZoom: 6 }).addTo(x), $ = new L.FeatureGroup().addTo(x), x.on(L.Draw.Event.CREATED, (E) => {
|
|
3892
3895
|
if (s.value) return;
|
|
3893
3896
|
const { layer: R } = E;
|
|
3894
|
-
|
|
3897
|
+
$.clearLayers(), $.addLayer(R), Se(), Ae(), xe.value = "";
|
|
3895
3898
|
}), x.on(L.Draw.Event.EDITED, () => {
|
|
3896
3899
|
s.value || (Se(), Be(), Ae());
|
|
3897
3900
|
}), x.on(L.Draw.Event.DELETED, () => {
|
|
@@ -3906,7 +3909,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3906
3909
|
const B = Ds(a.modelValue);
|
|
3907
3910
|
if (B) {
|
|
3908
3911
|
const E = [];
|
|
3909
|
-
L.geoJSON(B).eachLayer((R) => E.push(R)), E.length &&
|
|
3912
|
+
L.geoJSON(B).eachLayer((R) => E.push(R)), E.length && $.addLayer(E[0]), Se(), Be(), Ae();
|
|
3910
3913
|
}
|
|
3911
3914
|
O();
|
|
3912
3915
|
}), et(() => {
|
|
@@ -3938,7 +3941,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3938
3941
|
}
|
|
3939
3942
|
function it() {
|
|
3940
3943
|
if (s.value) return;
|
|
3941
|
-
const d =
|
|
3944
|
+
const d = $.toGeoJSON(), p = new Blob([JSON.stringify(d, null, 2)], { type: "application/json" }), B = URL.createObjectURL(p), E = document.createElement("a");
|
|
3942
3945
|
E.href = B, E.download = "data.geojson", E.click(), URL.revokeObjectURL(B);
|
|
3943
3946
|
}
|
|
3944
3947
|
function ut(d) {
|
|
@@ -3950,8 +3953,8 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3950
3953
|
if (typeof E.result == "string")
|
|
3951
3954
|
try {
|
|
3952
3955
|
const R = JSON.parse(E.result);
|
|
3953
|
-
|
|
3954
|
-
|
|
3956
|
+
$.clearLayers(), R && L.geoJSON({ type: "Feature", geometry: R }).eachLayer((J) => {
|
|
3957
|
+
$.addLayer(J);
|
|
3955
3958
|
}), Se(), Be(), Ae();
|
|
3956
3959
|
} finally {
|
|
3957
3960
|
p.value = "";
|
|
@@ -3973,8 +3976,8 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3973
3976
|
n("update:modelValue", p);
|
|
3974
3977
|
return;
|
|
3975
3978
|
}
|
|
3976
|
-
|
|
3977
|
-
if (
|
|
3979
|
+
$.clearLayers(), p && L.geoJSON({ type: "Feature", geometry: p }).eachLayer((B) => {
|
|
3980
|
+
if ($.addLayer(B), s.value) {
|
|
3978
3981
|
B.dragging?.disable?.();
|
|
3979
3982
|
return;
|
|
3980
3983
|
}
|
|
@@ -3982,7 +3985,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
3982
3985
|
const J = E.target.getLatLng();
|
|
3983
3986
|
n("update:modelValue", { type: "Point", coordinates: [J.lng, J.lat] });
|
|
3984
3987
|
});
|
|
3985
|
-
}), ze.value =
|
|
3988
|
+
}), ze.value = $.getLayers().length, Be(), Ae();
|
|
3986
3989
|
}
|
|
3987
3990
|
);
|
|
3988
3991
|
function We() {
|
|
@@ -4001,7 +4004,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4001
4004
|
}
|
|
4002
4005
|
};
|
|
4003
4006
|
}
|
|
4004
|
-
const Fe =
|
|
4007
|
+
const Fe = _(!1);
|
|
4005
4008
|
return re(Fe, () => {
|
|
4006
4009
|
setTimeout(() => {
|
|
4007
4010
|
x.invalidateSize();
|
|
@@ -4161,7 +4164,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4161
4164
|
onMouseleave: p[6] || (p[6] = (B) => u.value = !1)
|
|
4162
4165
|
}, [
|
|
4163
4166
|
l("div", Hr, [
|
|
4164
|
-
p[10] || (p[10] = be(" Type: ")),
|
|
4167
|
+
p[10] || (p[10] = be(" Type: ", -1)),
|
|
4165
4168
|
l("span", Nr, K(he.value.type), 1)
|
|
4166
4169
|
]),
|
|
4167
4170
|
g.value ? (r(), c("div", {
|
|
@@ -4181,14 +4184,14 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4181
4184
|
], 32),
|
|
4182
4185
|
l("div", Gr, [
|
|
4183
4186
|
l("div", qr, [
|
|
4184
|
-
p[11] || (p[11] = be(" Center: ")),
|
|
4187
|
+
p[11] || (p[11] = be(" Center: ", -1)),
|
|
4185
4188
|
l("b", null, K(he.value.center.lat.toFixed(5)) + ", " + K(he.value.center.lng.toFixed(5)), 1)
|
|
4186
4189
|
]),
|
|
4187
4190
|
he.value.areaKm2 !== null ? (r(), c("div", Kr, [
|
|
4188
|
-
p[12] || (p[12] = be(" Area: ")),
|
|
4191
|
+
p[12] || (p[12] = be(" Area: ", -1)),
|
|
4189
4192
|
l("b", null, K(he.value.areaKm2.toFixed(1)) + " km²", 1)
|
|
4190
4193
|
])) : (r(), c("div", Wr, p[13] || (p[13] = [
|
|
4191
|
-
be("Area: "),
|
|
4194
|
+
be("Area: ", -1),
|
|
4192
4195
|
l("b", null, "—", -1)
|
|
4193
4196
|
]))),
|
|
4194
4197
|
l("button", {
|
|
@@ -4234,7 +4237,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4234
4237
|
setup(o, { emit: e }) {
|
|
4235
4238
|
const t = o, a = e;
|
|
4236
4239
|
$e(t.style);
|
|
4237
|
-
const n =
|
|
4240
|
+
const n = _(null), i = _(null), s = _(null), u = _(!1), f = _(""), v = de(o, "modelValue"), h = V(() => t.placeholder || "Add tag…"), b = V(() => v.value?.length === 0 && f.value === ""), C = V(() => !t.disabled && v.value?.length > 0), y = V(() => t.disabled), I = async () => {
|
|
4238
4241
|
y.value || await je(() => s.value?.focus());
|
|
4239
4242
|
}, z = (T) => {
|
|
4240
4243
|
const A = T.trim();
|
|
@@ -4242,7 +4245,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4242
4245
|
}, x = () => {
|
|
4243
4246
|
const T = f.value;
|
|
4244
4247
|
T.trim() !== "" && z(T), f.value = "";
|
|
4245
|
-
},
|
|
4248
|
+
}, $ = (T) => {
|
|
4246
4249
|
const A = v.value.slice();
|
|
4247
4250
|
A.splice(T, 1), a("update:modelValue", A);
|
|
4248
4251
|
}, M = () => {
|
|
@@ -4253,7 +4256,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4253
4256
|
u.value = !1, !y.value && x();
|
|
4254
4257
|
}, k = (T) => {
|
|
4255
4258
|
const { key: A } = T;
|
|
4256
|
-
A === "Enter" ? (T.preventDefault(), x()) : A === "Backspace" && f.value === "" && v.value.length > 0 &&
|
|
4259
|
+
A === "Enter" ? (T.preventDefault(), x()) : A === "Backspace" && f.value === "" && v.value.length > 0 && $(v.value.length - 1);
|
|
4257
4260
|
};
|
|
4258
4261
|
return (T, A) => (r(), c("div", {
|
|
4259
4262
|
class: "flex gap-1 w-full",
|
|
@@ -4292,7 +4295,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4292
4295
|
l("div", {
|
|
4293
4296
|
role: "button",
|
|
4294
4297
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
4295
|
-
onClick: we((Y) =>
|
|
4298
|
+
onClick: we((Y) => $(oe), ["stop"]),
|
|
4296
4299
|
"aria-label": `Remove ${q}`
|
|
4297
4300
|
}, A[2] || (A[2] = [
|
|
4298
4301
|
l("svg", {
|
|
@@ -4450,7 +4453,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4450
4453
|
}),
|
|
4451
4454
|
emits: ["update:modelValue"],
|
|
4452
4455
|
setup(o) {
|
|
4453
|
-
const e = o, t = de(o, "modelValue"), a =
|
|
4456
|
+
const e = o, t = de(o, "modelValue"), a = _(!1), n = V(() => e.init !== !1), i = V(() => !!e.table && !!e.code), s = () => {
|
|
4454
4457
|
if (!i.value) return "";
|
|
4455
4458
|
const v = encodeURIComponent(String(e.table)), h = encodeURIComponent(String(e.code));
|
|
4456
4459
|
return `/api/code-gen/${v}/${h}`;
|
|
@@ -4510,12 +4513,12 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4510
4513
|
},
|
|
4511
4514
|
emits: ["update:modelValue"],
|
|
4512
4515
|
setup(o, { emit: e }) {
|
|
4513
|
-
const t = (x) => `${x}-${Math.random().toString(36).substring(2, 15)}`, a = Ie("values"), n = o, i = e, s = n.addButtonText ?? "Додати", u = n.ignore ?? [], f =
|
|
4516
|
+
const t = (x) => `${x}-${Math.random().toString(36).substring(2, 15)}`, a = Ie("values"), n = o, i = e, s = n.addButtonText ?? "Додати", u = n.ignore ?? [], f = _([]), v = _(null);
|
|
4514
4517
|
(() => {
|
|
4515
4518
|
const x = n.parent && a?.value?.[n.parent] || n.modelValue || {};
|
|
4516
|
-
f.value = Object.entries(x).filter(([
|
|
4519
|
+
f.value = Object.entries(x).filter(([$]) => !u.includes($)).map(([$, M]) => ({
|
|
4517
4520
|
id: t("key-value-"),
|
|
4518
|
-
key:
|
|
4521
|
+
key: $,
|
|
4519
4522
|
value: M
|
|
4520
4523
|
}));
|
|
4521
4524
|
})();
|
|
@@ -4524,44 +4527,44 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4524
4527
|
}
|
|
4525
4528
|
function C(x) {
|
|
4526
4529
|
if (v.value === null || v.value === x) return;
|
|
4527
|
-
const
|
|
4528
|
-
f.value.splice(x, 0,
|
|
4530
|
+
const $ = f.value.splice(v.value, 1)[0];
|
|
4531
|
+
f.value.splice(x, 0, $), v.value = null;
|
|
4529
4532
|
}
|
|
4530
4533
|
const y = V(
|
|
4531
4534
|
() => f.value.some((x) => x.key && !x.value || !x.key && x.value)
|
|
4532
4535
|
), I = () => {
|
|
4533
4536
|
f.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
4534
4537
|
}, z = (x) => {
|
|
4535
|
-
f.value = f.value.filter((
|
|
4538
|
+
f.value = f.value.filter(($) => $.id !== x);
|
|
4536
4539
|
};
|
|
4537
4540
|
return re(
|
|
4538
4541
|
f,
|
|
4539
4542
|
(x) => {
|
|
4540
|
-
const
|
|
4543
|
+
const $ = {};
|
|
4541
4544
|
x.forEach((j) => {
|
|
4542
|
-
j.key && j.value !== void 0 && (
|
|
4545
|
+
j.key && j.value !== void 0 && ($[j.key] = j.value);
|
|
4543
4546
|
});
|
|
4544
4547
|
const M = {};
|
|
4545
4548
|
u.length && u.forEach((j) => {
|
|
4546
4549
|
M[j] = n.parent ? a?.value?.[n.parent]?.[j] : void 0;
|
|
4547
4550
|
}), a?.value && n.parent && (a.value[n.parent] = {
|
|
4548
4551
|
...M,
|
|
4549
|
-
|
|
4550
|
-
}), i("update:modelValue",
|
|
4552
|
+
...$
|
|
4553
|
+
}), i("update:modelValue", $);
|
|
4551
4554
|
},
|
|
4552
4555
|
{ deep: !0 }
|
|
4553
|
-
), (x,
|
|
4556
|
+
), (x, $) => (r(), c("div", xi, [
|
|
4554
4557
|
l("div", wi, [
|
|
4555
4558
|
(r(!0), c(ie, null, pe(f.value, (M, j) => (r(), c("div", {
|
|
4556
4559
|
key: M.id,
|
|
4557
4560
|
class: D(["flex items-center gap-2 w-full", { "opacity-50": v.value === j }]),
|
|
4558
4561
|
draggable: "true",
|
|
4559
4562
|
onDragstart: (g) => b(j),
|
|
4560
|
-
onDragover:
|
|
4563
|
+
onDragover: $[0] || ($[0] = we(() => {
|
|
4561
4564
|
}, ["prevent"])),
|
|
4562
4565
|
onDrop: (g) => C(j)
|
|
4563
4566
|
}, [
|
|
4564
|
-
|
|
4567
|
+
$[1] || ($[1] = _e('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
|
|
4565
4568
|
l("div", _i, [
|
|
4566
4569
|
G(ct, {
|
|
4567
4570
|
modelValue: M.key,
|
|
@@ -4776,20 +4779,20 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4776
4779
|
setup(o, { emit: e }) {
|
|
4777
4780
|
const t = o, a = e, { inputClass: n } = $e(t.style), i = de(o, "modelValue"), s = V({
|
|
4778
4781
|
get: () => i.value,
|
|
4779
|
-
set: (
|
|
4780
|
-
i.value =
|
|
4782
|
+
set: ($) => {
|
|
4783
|
+
i.value = $;
|
|
4781
4784
|
}
|
|
4782
|
-
}), u =
|
|
4785
|
+
}), u = _(!1), f = _([]), v = _(!1), h = V(() => t.placeholder ?? ""), b = V(() => !!t.disabled), C = Ie("values");
|
|
4783
4786
|
function y() {
|
|
4784
4787
|
!b.value && s.value.trim() && I();
|
|
4785
4788
|
}
|
|
4786
4789
|
async function I() {
|
|
4787
|
-
const
|
|
4788
|
-
if (
|
|
4789
|
-
let M =
|
|
4790
|
+
const $ = (s.value || "").trim();
|
|
4791
|
+
if (!$) return;
|
|
4792
|
+
let M = $;
|
|
4790
4793
|
if (t.includes?.length && C?.value) {
|
|
4791
4794
|
const g = t.includes.map((k) => C.value?.[k]).filter(Boolean);
|
|
4792
|
-
g.length && (M = `${g.join(", ")}, ${
|
|
4795
|
+
g.length && (M = `${g.join(", ")}, ${$}`);
|
|
4793
4796
|
}
|
|
4794
4797
|
const j = t.api.replace("{{value}}", encodeURIComponent(M));
|
|
4795
4798
|
u.value = !0;
|
|
@@ -4805,16 +4808,16 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
4805
4808
|
function z() {
|
|
4806
4809
|
v.value = !v.value;
|
|
4807
4810
|
}
|
|
4808
|
-
function x(
|
|
4809
|
-
if (
|
|
4811
|
+
function x($) {
|
|
4812
|
+
if (!$) return;
|
|
4810
4813
|
v.value = !1;
|
|
4811
|
-
const M = parseFloat(
|
|
4814
|
+
const M = parseFloat($.lat), g = {
|
|
4812
4815
|
type: "Point",
|
|
4813
|
-
coordinates: [parseFloat(
|
|
4816
|
+
coordinates: [parseFloat($.lon), M]
|
|
4814
4817
|
};
|
|
4815
4818
|
t.geom && C?.value && (C.value[t.geom] = g), a("update:geom", g);
|
|
4816
4819
|
}
|
|
4817
|
-
return (
|
|
4820
|
+
return ($, M) => (r(), c("div", Pi, [
|
|
4818
4821
|
l("div", Ri, [
|
|
4819
4822
|
se(l("input", {
|
|
4820
4823
|
type: "text",
|
|
@@ -5063,7 +5066,7 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
5063
5066
|
width: { default: 400 }
|
|
5064
5067
|
},
|
|
5065
5068
|
setup(o, { expose: e }) {
|
|
5066
|
-
const t = o, a =
|
|
5069
|
+
const t = o, a = _([]), n = _(""), i = _(""), s = V(() => !!t.enabled), u = V(() => [
|
|
5067
5070
|
"vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
|
|
5068
5071
|
"sticky top-0 self-start shrink-0",
|
|
5069
5072
|
"max-h-full min-h-0 overflow-y-auto"
|
|
@@ -5092,15 +5095,15 @@ const sr = /* @__PURE__ */ Q(or, [["render", ar]]), rr = { class: "map-search-wi
|
|
|
5092
5095
|
y = U ?? null;
|
|
5093
5096
|
return;
|
|
5094
5097
|
}
|
|
5095
|
-
|
|
5098
|
+
$(U ?? null), je(() => M());
|
|
5096
5099
|
},
|
|
5097
5100
|
{ immediate: !0 }
|
|
5098
5101
|
), ke(() => {
|
|
5099
|
-
t.scrollContainer ||
|
|
5102
|
+
t.scrollContainer || $(null), M();
|
|
5100
5103
|
}), wt(() => {
|
|
5101
|
-
T(),
|
|
5104
|
+
T(), $(null, !0), C = null, typeof window < "u" && (h && window.cancelAnimationFrame(h), b && window.cancelAnimationFrame(b));
|
|
5102
5105
|
});
|
|
5103
|
-
function
|
|
5106
|
+
function $(U, X = !1) {
|
|
5104
5107
|
if (I && (I(), I = null), X) {
|
|
5105
5108
|
y = null;
|
|
5106
5109
|
return;
|
|
@@ -5274,7 +5277,7 @@ function vu(o, e, t = !1) {
|
|
|
5274
5277
|
const a = V(() => bt(
|
|
5275
5278
|
(Array.isArray(e), e),
|
|
5276
5279
|
typeof t == "boolean" ? t : t.value
|
|
5277
|
-
)), n =
|
|
5280
|
+
)), n = _({});
|
|
5278
5281
|
function i(v) {
|
|
5279
5282
|
const h = v?.conditions;
|
|
5280
5283
|
if (!h) return !0;
|
|
@@ -5334,7 +5337,7 @@ const mu = { class: "flex w-full h-full min-h-0 gap-6" }, hu = {
|
|
|
5334
5337
|
validate: f,
|
|
5335
5338
|
reset: v,
|
|
5336
5339
|
visibleSchema: h
|
|
5337
|
-
} = vu(s, n.schema, Jt(n, "disabled")), b =
|
|
5340
|
+
} = vu(s, n.schema, Jt(n, "disabled")), b = _(null), C = _(null), y = V(() => n.navigation), I = V(() => n.navWidth), z = V(() => n.style?.columns), x = Object.freeze({ container: 12, label: 3 }), $ = V(() => n.columns ?? z.value ?? x), M = V(() => n.columns != null || z.value != null), j = V(() => M.value ? "horizontal" : n.layout), g = (q) => q?.columns ? "horizontal" : j.value, k = (q) => q?.columns ?? $.value, T = () => {
|
|
5338
5341
|
a("update:modelValue", s.value), f(), a("handle-submit", s.value);
|
|
5339
5342
|
};
|
|
5340
5343
|
e({
|
|
@@ -5407,7 +5410,7 @@ const mu = { class: "flex w-full h-full min-h-0 gap-6" }, hu = {
|
|
|
5407
5410
|
},
|
|
5408
5411
|
emits: ["close", "save", "edit"],
|
|
5409
5412
|
setup(o, { emit: e }) {
|
|
5410
|
-
const t = o, a = e, n =
|
|
5413
|
+
const t = o, a = e, n = _(t.schema), i = _(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), s = _({}), u = _(), f = _(t.mode);
|
|
5411
5414
|
async function v() {
|
|
5412
5415
|
const b = s.value.validate();
|
|
5413
5416
|
if (b) {
|