@opengis/form 0.0.54 → 0.0.55
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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as U, ref as
|
|
2
|
-
import { notify as ce, VsModal as
|
|
1
|
+
import { defineComponent as U, ref as k, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as F, 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 ne, unref as ee, vModelText as me, vModelCheckbox as St, createVNode as T, createBlock as ve, resolveDynamicComponent as Fe, withCtx as Ee, withModifiers as ke, onBeforeUnmount as at, watch as ue, createStaticVNode as ye, vModelRadio as Bt, Fragment as re, renderList as fe, reactive as qt, vModelDynamic as Wt, vShow as Qe, inject as Ae, resolveComponent as bt, Transition as st, nextTick as je, Teleport as jt, getCurrentInstance as Gt, watchEffect as Kt, toRef as Zt, provide as yt } from "vue";
|
|
2
|
+
import { notify as ce, VsModal as Et, modal as Jt } from "@opengis/core";
|
|
3
3
|
const Yt = { class: "w-full relative" }, Xt = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-[14px] font-medium text-gray-900 mb-2"
|
|
@@ -24,7 +24,7 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
24
24
|
columns: {}
|
|
25
25
|
},
|
|
26
26
|
setup(o) {
|
|
27
|
-
const e =
|
|
27
|
+
const e = k("uk"), t = (a) => {
|
|
28
28
|
a.detail.key === "locale" && (e.value = a.detail.newValue);
|
|
29
29
|
};
|
|
30
30
|
return _e(() => {
|
|
@@ -34,12 +34,12 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
34
34
|
}), (a, n) => (i(), d("div", Yt, [
|
|
35
35
|
a.ua || a.label ? (i(), d("div", Xt, [
|
|
36
36
|
l("span", Qt, G(a.item[e.value] || a.ua || a.label), 1),
|
|
37
|
-
a.item?.rules?.includes("required") ? (i(), d("span", el, "*")) :
|
|
38
|
-
])) :
|
|
37
|
+
a.item?.rules?.includes("required") ? (i(), d("span", el, "*")) : F("", !0)
|
|
38
|
+
])) : F("", !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", tl, G(a.error), 1)) :
|
|
42
|
+
a.error ? (i(), d("span", tl, G(a.error), 1)) : F("", !0)
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
45
|
}), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
|
|
@@ -87,15 +87,15 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
87
87
|
style: be(s.value)
|
|
88
88
|
}, [
|
|
89
89
|
ge(G(u.ua || u.label) + " ", 1),
|
|
90
|
-
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", nl, "*")) :
|
|
91
|
-
], 4)) :
|
|
90
|
+
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", nl, "*")) : F("", !0)
|
|
91
|
+
], 4)) : F("", !0),
|
|
92
92
|
l("div", {
|
|
93
93
|
class: "flex-1 min-w-0",
|
|
94
94
|
style: be(r.value)
|
|
95
95
|
}, [
|
|
96
96
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
97
97
|
], 4),
|
|
98
|
-
u.error ? (i(), d("span", al, G(u.error), 1)) :
|
|
98
|
+
u.error ? (i(), d("span", al, G(u.error), 1)) : F("", !0)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
101
|
}), rl = { class: "w-full relative" }, il = {
|
|
@@ -118,7 +118,7 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
118
118
|
setup(o) {
|
|
119
119
|
return (e, t) => (i(), d("div", rl, [
|
|
120
120
|
Se(e.$slots, "default", ot(nt(e.$attrs))),
|
|
121
|
-
e.error ? (i(), d("span", il, G(e.error), 1)) :
|
|
121
|
+
e.error ? (i(), d("span", il, G(e.error), 1)) : F("", !0)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
124
|
}), dl = { class: "flex-1 min-w-0" }, cl = {
|
|
@@ -148,7 +148,7 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
148
148
|
columns: {}
|
|
149
149
|
},
|
|
150
150
|
setup(o) {
|
|
151
|
-
const e = o, t =
|
|
151
|
+
const e = o, t = k("uk");
|
|
152
152
|
B(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
|
|
153
153
|
const a = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), s = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (u) => {
|
|
154
154
|
u.key === "locale" && (t.value = u.newValue ?? "uk");
|
|
@@ -170,15 +170,15 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
170
170
|
l("div", dl, [
|
|
171
171
|
u.ua || u.label ? (i(), d("p", cl, [
|
|
172
172
|
l("span", pl, G(u.item[t.value] || u.ua || u.label), 1),
|
|
173
|
-
n.value ? (i(), d("span", fl, "*")) :
|
|
174
|
-
])) :
|
|
175
|
-
a.value ? (i(), d("p", ml, G(a.value), 1)) :
|
|
173
|
+
n.value ? (i(), d("span", fl, "*")) : F("", !0)
|
|
174
|
+
])) : F("", !0),
|
|
175
|
+
a.value ? (i(), d("p", ml, G(a.value), 1)) : F("", !0)
|
|
176
176
|
]),
|
|
177
177
|
l("div", vl, [
|
|
178
178
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
179
179
|
])
|
|
180
180
|
], 2),
|
|
181
|
-
s.value ? (i(), d("p", hl, G(s.value), 1)) :
|
|
181
|
+
s.value ? (i(), d("p", hl, G(s.value), 1)) : F("", !0)
|
|
182
182
|
], 2));
|
|
183
183
|
}
|
|
184
184
|
}), bl = {
|
|
@@ -212,7 +212,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
212
212
|
emits: ["update:modelValue"],
|
|
213
213
|
setup(o) {
|
|
214
214
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
215
|
-
return (n, s) =>
|
|
215
|
+
return (n, s) => ne((i(), d("input", {
|
|
216
216
|
type: "password",
|
|
217
217
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
|
|
218
218
|
placeholder: n.placeholder,
|
|
@@ -222,7 +222,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
222
222
|
border: "1px solid #CFD9E0"
|
|
223
223
|
}
|
|
224
224
|
}, null, 10, yl)), [
|
|
225
|
-
[
|
|
225
|
+
[me, a.value]
|
|
226
226
|
]);
|
|
227
227
|
}
|
|
228
228
|
}), wl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ U({
|
|
@@ -242,7 +242,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
242
242
|
emits: ["update:modelValue"],
|
|
243
243
|
setup(o) {
|
|
244
244
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
245
|
-
return (n, s) =>
|
|
245
|
+
return (n, s) => ne((i(), d("input", {
|
|
246
246
|
type: "text",
|
|
247
247
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
|
|
248
248
|
placeholder: n.placeholder,
|
|
@@ -252,7 +252,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
252
252
|
border: "1px solid #CFD9E0"
|
|
253
253
|
}
|
|
254
254
|
}, null, 10, wl)), [
|
|
255
|
-
[
|
|
255
|
+
[me, a.value]
|
|
256
256
|
]);
|
|
257
257
|
}
|
|
258
258
|
}), kl = ["placeholder", "min", "max"], _l = /* @__PURE__ */ U({
|
|
@@ -274,7 +274,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
274
274
|
emits: ["update:modelValue"],
|
|
275
275
|
setup(o) {
|
|
276
276
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
277
|
-
return (n, s) =>
|
|
277
|
+
return (n, s) => ne((i(), d("input", {
|
|
278
278
|
type: "number",
|
|
279
279
|
step: "any",
|
|
280
280
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
|
|
@@ -286,7 +286,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
|
286
286
|
min: n.min,
|
|
287
287
|
max: n.max
|
|
288
288
|
}, null, 10, kl)), [
|
|
289
|
-
[
|
|
289
|
+
[me, a.value]
|
|
290
290
|
]);
|
|
291
291
|
}
|
|
292
292
|
}), X = (o, e) => {
|
|
@@ -332,7 +332,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
332
332
|
set: (s) => t("update:modelValue", s)
|
|
333
333
|
});
|
|
334
334
|
return (s, r) => (i(), d("div", Ll, [
|
|
335
|
-
|
|
335
|
+
ne(l("input", {
|
|
336
336
|
type: "checkbox",
|
|
337
337
|
value: s.value,
|
|
338
338
|
"onUpdate:modelValue": r[0] || (r[0] = (u) => n.value = u),
|
|
@@ -340,7 +340,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
340
340
|
id: s.id,
|
|
341
341
|
disabled: s.disabled
|
|
342
342
|
}, null, 10, Sl), [
|
|
343
|
-
[
|
|
343
|
+
[St, n.value]
|
|
344
344
|
]),
|
|
345
345
|
l("label", {
|
|
346
346
|
for: s.id,
|
|
@@ -349,7 +349,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
349
349
|
l("div", {
|
|
350
350
|
class: E(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", s.error ? "border-red-600" : ""]])
|
|
351
351
|
}, [
|
|
352
|
-
|
|
352
|
+
T(Ml, {
|
|
353
353
|
height: "12",
|
|
354
354
|
width: "12"
|
|
355
355
|
})
|
|
@@ -388,7 +388,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
388
388
|
return (u, c) => (i(), d("label", {
|
|
389
389
|
class: E(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [r.value, s.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
|
|
390
390
|
}, [
|
|
391
|
-
|
|
391
|
+
ne(l("input", {
|
|
392
392
|
type: "checkbox",
|
|
393
393
|
class: "hidden",
|
|
394
394
|
name: u.id,
|
|
@@ -396,29 +396,29 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
396
396
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => n.value = p),
|
|
397
397
|
disabled: u.disabled
|
|
398
398
|
}, null, 8, Il), [
|
|
399
|
-
[
|
|
399
|
+
[St, n.value]
|
|
400
400
|
]),
|
|
401
401
|
l("span", zl, [
|
|
402
402
|
u.icon || u.imgUrl ? (i(), d("span", Al, [
|
|
403
403
|
u.icon ? (i(), d("i", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: E(u.icon)
|
|
406
|
-
}, null, 2)) :
|
|
406
|
+
}, null, 2)) : F("", !0),
|
|
407
407
|
u.imgUrl ? (i(), d("img", {
|
|
408
408
|
key: 1,
|
|
409
409
|
src: u.imgUrl,
|
|
410
410
|
width: "16",
|
|
411
411
|
height: "16",
|
|
412
412
|
alt: "icon"
|
|
413
|
-
}, null, 8, Tl)) :
|
|
414
|
-
])) :
|
|
413
|
+
}, null, 8, Tl)) : F("", !0)
|
|
414
|
+
])) : F("", !0),
|
|
415
415
|
Se(u.$slots, "default", {}, () => [
|
|
416
416
|
ge(G(u.label), 1)
|
|
417
417
|
])
|
|
418
418
|
])
|
|
419
419
|
], 2));
|
|
420
420
|
}
|
|
421
|
-
}), Ol = { class: "flex items-center" },
|
|
421
|
+
}), Ol = { class: "flex items-center" }, It = /* @__PURE__ */ U({
|
|
422
422
|
__name: "vs-input-checkbox-item",
|
|
423
423
|
props: {
|
|
424
424
|
value: { default: "" },
|
|
@@ -444,9 +444,9 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
444
444
|
} else
|
|
445
445
|
a("update:modelValue", u);
|
|
446
446
|
}
|
|
447
|
-
}), r =
|
|
447
|
+
}), r = k(`vs-checkbox-${t.view || "default"}`);
|
|
448
448
|
return (u, c) => (i(), d("div", Ol, [
|
|
449
|
-
(i(),
|
|
449
|
+
(i(), ve(Fe(r.value === "vs-checkbox-buttons" ? ee(Fl) : ee(El)), {
|
|
450
450
|
value: u.value,
|
|
451
451
|
label: u.label,
|
|
452
452
|
info: u.option?.info,
|
|
@@ -507,7 +507,7 @@ function ql(o, e) {
|
|
|
507
507
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
508
508
|
]));
|
|
509
509
|
}
|
|
510
|
-
const Wl = /* @__PURE__ */ X(Hl, [["render", ql]]), Gl = {},
|
|
510
|
+
const Wl = /* @__PURE__ */ X(Hl, [["render", ql]]), Gl = {}, Kl = {
|
|
511
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
512
|
width: "24",
|
|
513
513
|
height: "24",
|
|
@@ -518,8 +518,8 @@ const Wl = /* @__PURE__ */ X(Hl, [["render", ql]]), Gl = {}, Zl = {
|
|
|
518
518
|
"stroke-linecap": "round",
|
|
519
519
|
"stroke-linejoin": "round"
|
|
520
520
|
};
|
|
521
|
-
function
|
|
522
|
-
return i(), d("svg",
|
|
521
|
+
function Zl(o, e) {
|
|
522
|
+
return i(), d("svg", Kl, e[0] || (e[0] = [
|
|
523
523
|
l("path", {
|
|
524
524
|
stroke: "none",
|
|
525
525
|
d: "M0 0h24v24H0z",
|
|
@@ -530,13 +530,13 @@ function Kl(o, e) {
|
|
|
530
530
|
l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
|
|
531
531
|
]));
|
|
532
532
|
}
|
|
533
|
-
const Jl = /* @__PURE__ */ X(Gl, [["render",
|
|
533
|
+
const Jl = /* @__PURE__ */ X(Gl, [["render", Zl]]), Yl = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "flex items-start gap-x-1"
|
|
536
536
|
}, Xl = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "text-red-500 text-[14px]"
|
|
539
|
-
}, Ql = ["title"], eo = ["disabled"],
|
|
539
|
+
}, Ql = ["title"], eo = ["disabled"], zt = /* @__PURE__ */ U({
|
|
540
540
|
__name: "vs-input-switcher",
|
|
541
541
|
props: /* @__PURE__ */ ie({
|
|
542
542
|
rules: { default: () => [] },
|
|
@@ -559,13 +559,13 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
559
559
|
setup(o) {
|
|
560
560
|
const e = o, t = de(o, "modelValue");
|
|
561
561
|
return (a, n) => e.view === "checkbox" ? (i(), d("div", Yl, [
|
|
562
|
-
|
|
562
|
+
T(It, {
|
|
563
563
|
modelValue: t.value,
|
|
564
564
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
565
565
|
label: a.text,
|
|
566
566
|
error: a.error || ""
|
|
567
567
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
568
|
-
a.rules?.includes("required") ? (i(), d("span", Xl, "*")) :
|
|
568
|
+
a.rules?.includes("required") ? (i(), d("span", Xl, "*")) : F("", !0),
|
|
569
569
|
a.i ? (i(), d("button", {
|
|
570
570
|
key: 1,
|
|
571
571
|
class: "cursor-pointer",
|
|
@@ -573,8 +573,8 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
573
573
|
onClick: n[1] || (n[1] = ke(() => {
|
|
574
574
|
}, ["prevent"]))
|
|
575
575
|
}, [
|
|
576
|
-
|
|
577
|
-
], 8, Ql)) :
|
|
576
|
+
T(ee(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
577
|
+
], 8, Ql)) : F("", !0)
|
|
578
578
|
])) : (i(), d("button", {
|
|
579
579
|
key: 1,
|
|
580
580
|
type: "button",
|
|
@@ -588,7 +588,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
588
588
|
}, null, 2)
|
|
589
589
|
], 10, eo));
|
|
590
590
|
}
|
|
591
|
-
}), to = ["id", "innerHTML"],
|
|
591
|
+
}), to = ["id", "innerHTML"], xt = /* @__PURE__ */ U({
|
|
592
592
|
__name: "vs-input-static",
|
|
593
593
|
props: {
|
|
594
594
|
text: { default: "" },
|
|
@@ -626,7 +626,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
626
626
|
}),
|
|
627
627
|
emits: ["update:modelValue"],
|
|
628
628
|
setup(o) {
|
|
629
|
-
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n =
|
|
629
|
+
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n = k(null);
|
|
630
630
|
let s = null;
|
|
631
631
|
return _e(async () => {
|
|
632
632
|
if (n.value) {
|
|
@@ -690,7 +690,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
690
690
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
691
691
|
return (n, s) => (i(), d("div", no, [
|
|
692
692
|
s[1] || (s[1] = ye('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
|
|
693
|
-
|
|
693
|
+
ne(l("input", {
|
|
694
694
|
type: "email",
|
|
695
695
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
|
|
696
696
|
placeholder: n.placeholder,
|
|
@@ -700,7 +700,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
700
700
|
border: "1px solid #CFD9E0"
|
|
701
701
|
}
|
|
702
702
|
}, null, 10, ao), [
|
|
703
|
-
[
|
|
703
|
+
[me, a.value]
|
|
704
704
|
])
|
|
705
705
|
]));
|
|
706
706
|
}
|
|
@@ -726,14 +726,14 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
726
726
|
return (t, a) => (i(), d("label", {
|
|
727
727
|
class: E(["flex items-center gap-0", [t.customClass]])
|
|
728
728
|
}, [
|
|
729
|
-
|
|
729
|
+
ne(l("input", {
|
|
730
730
|
"onUpdate:modelValue": a[0] || (a[0] = (n) => e.value = n),
|
|
731
731
|
type: "radio",
|
|
732
732
|
value: t.value,
|
|
733
733
|
disabled: t.disabled,
|
|
734
734
|
class: "hidden"
|
|
735
735
|
}, null, 8, ro), [
|
|
736
|
-
[
|
|
736
|
+
[Bt, e.value]
|
|
737
737
|
]),
|
|
738
738
|
l("span", {
|
|
739
739
|
class: E(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
|
|
@@ -744,7 +744,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
744
744
|
e.value == t.value ? (i(), d("span", {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: E(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
747
|
-
}, null, 2)) :
|
|
747
|
+
}, null, 2)) : F("", !0)
|
|
748
748
|
], 2),
|
|
749
749
|
l("span", io, G(t.text), 1)
|
|
750
750
|
], 2));
|
|
@@ -774,14 +774,14 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
774
774
|
t.customClass
|
|
775
775
|
]])
|
|
776
776
|
}, [
|
|
777
|
-
|
|
777
|
+
ne(l("input", {
|
|
778
778
|
"onUpdate:modelValue": a[0] || (a[0] = (n) => e.value = n),
|
|
779
779
|
type: "radio",
|
|
780
780
|
value: t.value,
|
|
781
781
|
disabled: t.disabled,
|
|
782
782
|
class: "hidden"
|
|
783
783
|
}, null, 8, co), [
|
|
784
|
-
[
|
|
784
|
+
[Bt, e.value]
|
|
785
785
|
]),
|
|
786
786
|
l("span", po, G(t.text), 1)
|
|
787
787
|
], 2));
|
|
@@ -789,7 +789,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
789
789
|
}), mo = {
|
|
790
790
|
"vs-input-radio-default": uo,
|
|
791
791
|
"vs-input-radio-buttons": fo
|
|
792
|
-
},
|
|
792
|
+
}, wt = /* @__PURE__ */ U({
|
|
793
793
|
__name: "vs-input-radio",
|
|
794
794
|
props: /* @__PURE__ */ ie({
|
|
795
795
|
options: {},
|
|
@@ -812,7 +812,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
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(), ve(Fe(a.value), Te({
|
|
816
816
|
key: r?.id,
|
|
817
817
|
text: r.text,
|
|
818
818
|
value: r.id.toString(),
|
|
@@ -841,7 +841,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
841
841
|
},
|
|
842
842
|
emits: ["update:modelValue"],
|
|
843
843
|
setup(o, { emit: e }) {
|
|
844
|
-
const t = o, a = e, n =
|
|
844
|
+
const t = o, a = e, n = k([]), s = qt({}), r = (f) => f?.value || f?.id || f?.text || f, u = (f) => f.text || String(f), c = (f) => `lg:col-span-${f || 12}`, p = async () => {
|
|
845
845
|
try {
|
|
846
846
|
const f = await fetch(`/api/suggest/${t.data}`).then((m) => m.json());
|
|
847
847
|
n.value = f?.data || f;
|
|
@@ -908,7 +908,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
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(), ve(It, {
|
|
912
912
|
modelValue: s[r(y)],
|
|
913
913
|
"onUpdate:modelValue": (S) => s[r(y)] = S,
|
|
914
914
|
value: r(y),
|
|
@@ -945,7 +945,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
945
945
|
get: () => a(t.modelValue),
|
|
946
946
|
set: (c) => s("update:modelValue", c)
|
|
947
947
|
}), u = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
|
|
948
|
-
return (c, p) =>
|
|
948
|
+
return (c, p) => ne((i(), d("input", {
|
|
949
949
|
type: u.value,
|
|
950
950
|
"onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
|
|
951
951
|
placeholder: c.placeholder,
|
|
@@ -959,7 +959,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
959
959
|
[Wt, r.value]
|
|
960
960
|
]);
|
|
961
961
|
}
|
|
962
|
-
}),
|
|
962
|
+
}), kt = async (o, e, t, a) => {
|
|
963
963
|
try {
|
|
964
964
|
const n = new FormData();
|
|
965
965
|
return n.append("unique", "true"), n.append("file", o), (await fetch(
|
|
@@ -983,7 +983,7 @@ const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
|
983
983
|
} catch (e) {
|
|
984
984
|
return console.error(e), !1;
|
|
985
985
|
}
|
|
986
|
-
},
|
|
986
|
+
}, _t = async (o) => {
|
|
987
987
|
try {
|
|
988
988
|
const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), a = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), s = new Blob([n], { type: a }), r = document.createElement("a");
|
|
989
989
|
r.setAttribute("download", o), r.href = window.URL.createObjectURL(s), r.click();
|
|
@@ -1080,7 +1080,7 @@ function Io(o, e) {
|
|
|
1080
1080
|
ye('<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><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>', 6)
|
|
1081
1081
|
]));
|
|
1082
1082
|
}
|
|
1083
|
-
const
|
|
1083
|
+
const At = /* @__PURE__ */ X(jo, [["render", Io]]), zo = {}, Ao = {
|
|
1084
1084
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1085
1085
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
1086
1086
|
width: "44",
|
|
@@ -1126,7 +1126,7 @@ const Po = /* @__PURE__ */ X(Oo, [["render", Uo]]), Ro = (o) => {
|
|
|
1126
1126
|
textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
|
|
1127
1127
|
documentsFormat: ["pdf"]
|
|
1128
1128
|
};
|
|
1129
|
-
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Bo : t.textsFormat.includes(e) ? Po : t.documentsFormat.includes(e) ? Vo : t.archivesFormat.includes(e) ? Fo :
|
|
1129
|
+
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Bo : t.textsFormat.includes(e) ? Po : t.documentsFormat.includes(e) ? Vo : t.archivesFormat.includes(e) ? Fo : At;
|
|
1130
1130
|
}, No = {}, qo = {
|
|
1131
1131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1132
1132
|
width: "24",
|
|
@@ -1144,7 +1144,7 @@ function Wo(o, e) {
|
|
|
1144
1144
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
|
|
1145
1145
|
]));
|
|
1146
1146
|
}
|
|
1147
|
-
const et = /* @__PURE__ */ X(No, [["render", Wo]]), Go = {},
|
|
1147
|
+
const et = /* @__PURE__ */ X(No, [["render", Wo]]), Go = {}, Ko = {
|
|
1148
1148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1149
1149
|
width: "24",
|
|
1150
1150
|
height: "24",
|
|
@@ -1156,8 +1156,8 @@ const et = /* @__PURE__ */ X(No, [["render", Wo]]), Go = {}, Zo = {
|
|
|
1156
1156
|
"stroke-linejoin": "round",
|
|
1157
1157
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1158
1158
|
};
|
|
1159
|
-
function
|
|
1160
|
-
return i(), d("svg",
|
|
1159
|
+
function Zo(o, e) {
|
|
1160
|
+
return i(), d("svg", Ko, e[0] || (e[0] = [
|
|
1161
1161
|
l("path", {
|
|
1162
1162
|
stroke: "none",
|
|
1163
1163
|
d: "M0 0h24v24H0z",
|
|
@@ -1168,7 +1168,7 @@ function Ko(o, e) {
|
|
|
1168
1168
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1169
1169
|
]));
|
|
1170
1170
|
}
|
|
1171
|
-
const
|
|
1171
|
+
const Tt = /* @__PURE__ */ X(Go, [["render", Zo]]), Jo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Yo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Xo = /* @__PURE__ */ U({
|
|
1172
1172
|
__name: "vs-input-file-list-item",
|
|
1173
1173
|
props: /* @__PURE__ */ ie({
|
|
1174
1174
|
format: {},
|
|
@@ -1190,11 +1190,11 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { 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", Jo, [
|
|
1193
|
-
(i(),
|
|
1193
|
+
(i(), ve(Fe(ee(Ho)(t.value)), {
|
|
1194
1194
|
src: t.value,
|
|
1195
1195
|
alt: "file",
|
|
1196
1196
|
class: "w-full h-full object-cover cursor-pointer",
|
|
1197
|
-
onClick: s[0] || (s[0] = (r) => ee(
|
|
1197
|
+
onClick: s[0] || (s[0] = (r) => ee(_t)(t.value))
|
|
1198
1198
|
}, null, 8, ["src"])),
|
|
1199
1199
|
l("div", Yo, [
|
|
1200
1200
|
l("button", {
|
|
@@ -1204,19 +1204,19 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1204
1204
|
}),
|
|
1205
1205
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1206
1206
|
}, [
|
|
1207
|
-
|
|
1207
|
+
T(et, { class: "w-4 h-4" })
|
|
1208
1208
|
]),
|
|
1209
1209
|
l("button", {
|
|
1210
1210
|
type: "button",
|
|
1211
|
-
onClick: s[2] || (s[2] = (r) => ee(
|
|
1211
|
+
onClick: s[2] || (s[2] = (r) => ee(_t)(t.value)),
|
|
1212
1212
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
1213
1213
|
}, [
|
|
1214
|
-
|
|
1214
|
+
T(Tt, { class: "w-4 h-4" })
|
|
1215
1215
|
])
|
|
1216
1216
|
])
|
|
1217
1217
|
]));
|
|
1218
1218
|
}
|
|
1219
|
-
}),
|
|
1219
|
+
}), $t = /* @__PURE__ */ X(Xo, [["__scopeId", "data-v-0ca886b3"]]), Qo = { class: "flex items-center gap-x-2" }, en = ["multiple"], tn = {
|
|
1220
1220
|
key: 1,
|
|
1221
1221
|
class: "flex items-center flex-wrap gap-2"
|
|
1222
1222
|
}, ln = /* @__PURE__ */ U({
|
|
@@ -1237,17 +1237,17 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1237
1237
|
}),
|
|
1238
1238
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
1239
1239
|
setup(o, { emit: e }) {
|
|
1240
|
-
const t = o, a = de(o, "modelValue"), n = e, s =
|
|
1240
|
+
const t = o, a = de(o, "modelValue"), n = e, s = k(null), r = (c) => Array.isArray(a.value) && a.value[c] || "", u = async (c) => {
|
|
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 (q) => t.format && !q.name.endsWith(t.format) ? null : await
|
|
1244
|
+
const f = Array.from(p).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await kt(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];
|
|
1248
1248
|
if (t.format && !f.name.endsWith(t.format))
|
|
1249
1249
|
return;
|
|
1250
|
-
const m = await
|
|
1250
|
+
const m = await kt(f, "1", "form", "table");
|
|
1251
1251
|
a.value = m?.file_path, n("change", a.value || "");
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
@@ -1260,14 +1260,14 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1260
1260
|
multiple: c.multiple,
|
|
1261
1261
|
onChange: u
|
|
1262
1262
|
}, null, 40, en),
|
|
1263
|
-
!c.multiple && a.value ? (i(),
|
|
1263
|
+
!c.multiple && a.value ? (i(), ve($t, {
|
|
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", tn, [
|
|
1270
|
-
(i(!0), d(re, null, fe(a.value, (f, m) => (i(),
|
|
1270
|
+
(i(!0), d(re, null, fe(a.value, (f, m) => (i(), ve($t, {
|
|
1271
1271
|
multiple: c.multiple,
|
|
1272
1272
|
key: m,
|
|
1273
1273
|
value: a.value,
|
|
@@ -1281,15 +1281,15 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1281
1281
|
c.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
|
|
1282
1282
|
])
|
|
1283
1283
|
}, [
|
|
1284
|
-
|
|
1284
|
+
T(qe, { class: "w-6 h-6" })
|
|
1285
1285
|
], 2)
|
|
1286
|
-
])) :
|
|
1287
|
-
c.multiple ?
|
|
1286
|
+
])) : F("", !0),
|
|
1287
|
+
c.multiple ? F("", !0) : (i(), d("div", {
|
|
1288
1288
|
key: 2,
|
|
1289
1289
|
onClick: p[4] || (p[4] = (f) => s.value?.click()),
|
|
1290
1290
|
class: E([c.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
|
|
1291
1291
|
}, [
|
|
1292
|
-
|
|
1292
|
+
T(qe, { class: "w-6 h-6" })
|
|
1293
1293
|
], 2))
|
|
1294
1294
|
]));
|
|
1295
1295
|
}
|
|
@@ -1322,7 +1322,7 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1322
1322
|
l("p", nn, G(n.item?.uploaded_name), 1),
|
|
1323
1323
|
l("p", an, [
|
|
1324
1324
|
l("span", null, G(n.item?.username), 1),
|
|
1325
|
-
|
|
1325
|
+
ne(l("span", sn, "|", 512), [
|
|
1326
1326
|
[Qe, n.item?.username]
|
|
1327
1327
|
]),
|
|
1328
1328
|
l("span", null, G(t.value), 1),
|
|
@@ -1392,20 +1392,20 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1392
1392
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1393
1393
|
onClick: m[0] || (m[0] = (y) => p(f.index))
|
|
1394
1394
|
}, [
|
|
1395
|
-
|
|
1395
|
+
T(Je, { item: f.item }, null, 8, ["item"])
|
|
1396
1396
|
])
|
|
1397
1397
|
])) : n(f.item) ? (i(), d("div", cn, [
|
|
1398
|
-
|
|
1398
|
+
T(Je, { item: f.item }, null, 8, ["item"])
|
|
1399
1399
|
])) : s(f.item) ? (i(), d("div", pn, [
|
|
1400
1400
|
l("a", {
|
|
1401
1401
|
href: `/api/file-preview?id=${f.item.file_id}`,
|
|
1402
1402
|
target: "_blank",
|
|
1403
1403
|
class: "flex gap-x-3 w-full items-center"
|
|
1404
1404
|
}, [
|
|
1405
|
-
|
|
1405
|
+
T(Je, { item: f.item }, null, 8, ["item"])
|
|
1406
1406
|
], 8, fn)
|
|
1407
1407
|
])) : (i(), d("div", mn, [
|
|
1408
|
-
|
|
1408
|
+
T(Je, { item: f.item }, null, 8, ["item"])
|
|
1409
1409
|
])),
|
|
1410
1410
|
l("div", vn, [
|
|
1411
1411
|
l("div", hn, [
|
|
@@ -1414,7 +1414,7 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1414
1414
|
class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
1415
1415
|
onClick: m[1] || (m[1] = (y) => r(f.item))
|
|
1416
1416
|
}, [
|
|
1417
|
-
|
|
1417
|
+
T(Tt, {
|
|
1418
1418
|
height: "14",
|
|
1419
1419
|
width: "14"
|
|
1420
1420
|
})
|
|
@@ -1427,7 +1427,7 @@ const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[
|
|
|
1427
1427
|
class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
|
|
1428
1428
|
onClick: m[2] || (m[2] = (y) => c())
|
|
1429
1429
|
}, [
|
|
1430
|
-
|
|
1430
|
+
T(et, {
|
|
1431
1431
|
height: "14",
|
|
1432
1432
|
width: "14"
|
|
1433
1433
|
})
|
|
@@ -1482,23 +1482,23 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $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 =
|
|
1486
|
-
const v = y.value.findIndex((
|
|
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
|
+
const v = y.value.findIndex((w) => w === I.item.file_path);
|
|
1487
1487
|
v !== -1 && (s.value = !0, r.value = v);
|
|
1488
|
-
},
|
|
1488
|
+
}, H = async () => {
|
|
1489
1489
|
try {
|
|
1490
1490
|
const I = await fetch(`${t.prefix}/widget/file/${n.value}`).then((v) => v.json());
|
|
1491
1491
|
f.value = I?.rows;
|
|
1492
1492
|
} catch (I) {
|
|
1493
1493
|
console.error(I);
|
|
1494
1494
|
}
|
|
1495
|
-
},
|
|
1495
|
+
}, Z = async (I) => {
|
|
1496
1496
|
await Promise.all(
|
|
1497
1497
|
Array.from(I.target.files).map(async (v) => {
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1498
|
+
const w = new FormData();
|
|
1499
|
+
w.append("file", v);
|
|
1500
1500
|
try {
|
|
1501
|
-
const V = `${t.prefix}/widget/file/${n.value}`, $ = await fetch(V, { method: "POST", body:
|
|
1501
|
+
const V = `${t.prefix}/widget/file/${n.value}`, $ = await fetch(V, { method: "POST", body: w });
|
|
1502
1502
|
return $.ok ? (u("update", "file-list"), v) : (ce({
|
|
1503
1503
|
type: $.status >= 400 && $.status < 500 ? "warning" : "error",
|
|
1504
1504
|
title: "Error",
|
|
@@ -1512,23 +1512,23 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1512
1512
|
}), console.error(V), null;
|
|
1513
1513
|
}
|
|
1514
1514
|
})
|
|
1515
|
-
), await
|
|
1516
|
-
},
|
|
1515
|
+
), await H();
|
|
1516
|
+
}, z = (I) => {
|
|
1517
1517
|
const v = { ...I };
|
|
1518
1518
|
return I.cancel || (v.cancel = () => {
|
|
1519
1519
|
c.value = !1;
|
|
1520
1520
|
}), I.updateListOnConfirm && (v.confirm = async () => {
|
|
1521
|
-
await I.confirm(), c.value = !1,
|
|
1521
|
+
await I.confirm(), c.value = !1, H();
|
|
1522
1522
|
}), v;
|
|
1523
|
-
},
|
|
1524
|
-
p.value =
|
|
1523
|
+
}, P = (I) => {
|
|
1524
|
+
p.value = z(I), c.value = !0;
|
|
1525
1525
|
};
|
|
1526
1526
|
return ue(n, (I) => {
|
|
1527
|
-
I &&
|
|
1527
|
+
I && H();
|
|
1528
1528
|
}), _e(() => {
|
|
1529
|
-
n.value &&
|
|
1529
|
+
n.value && H();
|
|
1530
1530
|
}), (I, v) => {
|
|
1531
|
-
const
|
|
1531
|
+
const w = bt("Lightbox"), V = bt("MessageBox");
|
|
1532
1532
|
return i(), d("div", $n, [
|
|
1533
1533
|
l("div", Cn, [
|
|
1534
1534
|
l("h2", Vn, " Файлів: " + G(f.value?.length), 1),
|
|
@@ -1537,10 +1537,10 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1537
1537
|
l("input", {
|
|
1538
1538
|
type: "file",
|
|
1539
1539
|
class: "hidden",
|
|
1540
|
-
onChange: v[0] || (v[0] = ($) =>
|
|
1540
|
+
onChange: v[0] || (v[0] = ($) => Z($))
|
|
1541
1541
|
}, null, 32),
|
|
1542
1542
|
l("div", Ln, [
|
|
1543
|
-
|
|
1543
|
+
T(_n, {
|
|
1544
1544
|
height: "16",
|
|
1545
1545
|
width: "16"
|
|
1546
1546
|
})
|
|
@@ -1572,14 +1572,14 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1572
1572
|
l("path", { d: "m21 21-4.3-4.3" })
|
|
1573
1573
|
])
|
|
1574
1574
|
], -1)),
|
|
1575
|
-
|
|
1575
|
+
ne(l("input", {
|
|
1576
1576
|
type: "text",
|
|
1577
1577
|
"onUpdate:modelValue": v[1] || (v[1] = ($) => m.value = $),
|
|
1578
1578
|
class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
|
|
1579
1579
|
placeholder: "Введіть назву файлу"
|
|
1580
1580
|
}, null, 512), [
|
|
1581
1581
|
[
|
|
1582
|
-
|
|
1582
|
+
me,
|
|
1583
1583
|
m.value,
|
|
1584
1584
|
void 0,
|
|
1585
1585
|
{ trim: !0 }
|
|
@@ -1587,29 +1587,29 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1587
1587
|
])
|
|
1588
1588
|
])
|
|
1589
1589
|
])
|
|
1590
|
-
])) :
|
|
1590
|
+
])) : F("", !0),
|
|
1591
1591
|
f.value?.length ? (i(), d("div", jn, [
|
|
1592
|
-
(i(!0), d(re, null, fe(S.value, ($,
|
|
1593
|
-
key:
|
|
1592
|
+
(i(!0), d(re, null, fe(S.value, ($, O) => (i(), ve(yn, {
|
|
1593
|
+
key: O,
|
|
1594
1594
|
prefix: I.prefix,
|
|
1595
1595
|
item: $,
|
|
1596
|
-
index:
|
|
1596
|
+
index: O,
|
|
1597
1597
|
onUpdate: v[2] || (v[2] = (te) => I.$emit("update", "file-list")),
|
|
1598
|
-
onOpenModal: v[3] || (v[3] = (te) =>
|
|
1598
|
+
onOpenModal: v[3] || (v[3] = (te) => P(te)),
|
|
1599
1599
|
onOpenLightbox: v[4] || (v[4] = (te) => q(te))
|
|
1600
1600
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1601
|
-
S.value.length ?
|
|
1601
|
+
S.value.length ? F("", !0) : (i(), d("div", En, v[9] || (v[9] = [
|
|
1602
1602
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1603
1603
|
])))
|
|
1604
|
-
])) :
|
|
1605
|
-
|
|
1604
|
+
])) : F("", !0),
|
|
1605
|
+
T(w, {
|
|
1606
1606
|
modelValue: s.value,
|
|
1607
1607
|
"onUpdate:modelValue": v[5] || (v[5] = ($) => s.value = $),
|
|
1608
1608
|
startIndex: r.value,
|
|
1609
1609
|
"onUpdate:index": v[6] || (v[6] = ($) => r.value = $),
|
|
1610
1610
|
images: y.value
|
|
1611
1611
|
}, null, 8, ["modelValue", "startIndex", "images"]),
|
|
1612
|
-
|
|
1612
|
+
T(V, Te({
|
|
1613
1613
|
modelValue: c.value,
|
|
1614
1614
|
"onUpdate:modelValue": v[7] || (v[7] = ($) => c.value = $),
|
|
1615
1615
|
onConfirm: p.value.confirm
|
|
@@ -1634,7 +1634,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1634
1634
|
}
|
|
1635
1635
|
},
|
|
1636
1636
|
setup(o) {
|
|
1637
|
-
const e = o, t =
|
|
1637
|
+
const e = o, t = k(e.isOpen);
|
|
1638
1638
|
return ue(
|
|
1639
1639
|
() => e.isOpen,
|
|
1640
1640
|
(a) => {
|
|
@@ -1643,15 +1643,15 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1643
1643
|
), (a, n) => (i(), d("div", null, [
|
|
1644
1644
|
l("div", zn, [
|
|
1645
1645
|
l("p", An, G(o.title), 1),
|
|
1646
|
-
|
|
1646
|
+
T(zt, {
|
|
1647
1647
|
modelValue: t.value,
|
|
1648
1648
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
1649
1649
|
style: be(o.style)
|
|
1650
1650
|
}, null, 8, ["modelValue", "style"])
|
|
1651
1651
|
]),
|
|
1652
|
-
|
|
1652
|
+
T(st, { name: "slide-fade" }, {
|
|
1653
1653
|
default: Ee(() => [
|
|
1654
|
-
|
|
1654
|
+
ne(l("div", Tn, [
|
|
1655
1655
|
Se(a.$slots, "default", {}, void 0, !0)
|
|
1656
1656
|
], 512), [
|
|
1657
1657
|
[Qe, t.value]
|
|
@@ -1678,7 +1678,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1678
1678
|
}
|
|
1679
1679
|
},
|
|
1680
1680
|
setup(o) {
|
|
1681
|
-
const e = o, t =
|
|
1681
|
+
const e = o, t = k(e.isOpen);
|
|
1682
1682
|
return ue(
|
|
1683
1683
|
() => e.isOpen,
|
|
1684
1684
|
(a) => {
|
|
@@ -1690,14 +1690,14 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1690
1690
|
onClick: n[0] || (n[0] = (s) => t.value = !t.value),
|
|
1691
1691
|
class: "flex items-center gap-2"
|
|
1692
1692
|
}, [
|
|
1693
|
-
|
|
1693
|
+
T(ee(Rl), {
|
|
1694
1694
|
class: E(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
|
|
1695
1695
|
}, null, 8, ["class"]),
|
|
1696
1696
|
l("span", Dn, G(o.title), 1)
|
|
1697
1697
|
]),
|
|
1698
|
-
|
|
1698
|
+
T(st, { name: "slide-fade" }, {
|
|
1699
1699
|
default: Ee(() => [
|
|
1700
|
-
|
|
1700
|
+
ne(l("div", Un, [
|
|
1701
1701
|
Se(a.$slots, "default", {}, void 0, !0)
|
|
1702
1702
|
], 512), [
|
|
1703
1703
|
[Qe, t.value]
|
|
@@ -1744,7 +1744,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1744
1744
|
Contain: "*",
|
|
1745
1745
|
In: "in",
|
|
1746
1746
|
NotIn: "not_in"
|
|
1747
|
-
}, Wn = (o, e) => String(o) === String(e), Gn = (o, e) => String(o) !== String(e),
|
|
1747
|
+
}, Wn = (o, e) => String(o) === String(e), Gn = (o, e) => String(o) !== String(e), Kn = (o, e) => o > e, Zn = (o, e) => o >= e, Jn = (o, e) => o < e, Yn = (o, e) => o <= e, Xn = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Qn = (o, e) => String(o).startsWith(String(e)), ea = (o, e) => String(o).endsWith(String(e)), ta = (o, e) => String(o).includes(String(e)), la = (o, e) => Array.isArray(e) ? e.includes(o) : !1, oa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ft = (o, e) => {
|
|
1748
1748
|
if (!e) return !0;
|
|
1749
1749
|
switch (e?.[1]) {
|
|
1750
1750
|
case we.Equal:
|
|
@@ -1752,9 +1752,9 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1752
1752
|
case we.Inequal:
|
|
1753
1753
|
return Gn(o, e?.[2]);
|
|
1754
1754
|
case we.Higer:
|
|
1755
|
-
return Zn(o, e?.[2]);
|
|
1756
|
-
case we.HigerOrEqual:
|
|
1757
1755
|
return Kn(o, e?.[2]);
|
|
1756
|
+
case we.HigerOrEqual:
|
|
1757
|
+
return Zn(o, e?.[2]);
|
|
1758
1758
|
case we.Lower:
|
|
1759
1759
|
return Jn(o, e?.[2]);
|
|
1760
1760
|
case we.LowerOrEqual:
|
|
@@ -1799,15 +1799,15 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1799
1799
|
const u = r?.conditions;
|
|
1800
1800
|
if (!u) return !0;
|
|
1801
1801
|
const c = Array.isArray(u) ? u[0] : u, p = t?.value?.[c];
|
|
1802
|
-
return
|
|
1802
|
+
return Ft(p, u);
|
|
1803
1803
|
})), s = B(() => qn[e.view]);
|
|
1804
|
-
return (r, u) => o.schema?.length ? (i(),
|
|
1804
|
+
return (r, u) => o.schema?.length ? (i(), ve(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(), ve(Ot, Te({
|
|
1811
1811
|
key: c.name
|
|
1812
1812
|
}, { ref_for: !0 }, c, {
|
|
1813
1813
|
item: c,
|
|
@@ -1818,15 +1818,21 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1818
1818
|
}), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
|
|
1819
1819
|
]),
|
|
1820
1820
|
_: 1
|
|
1821
|
-
}, 8, ["title", "style"])) :
|
|
1821
|
+
}, 8, ["title", "style"])) : F("", !0);
|
|
1822
1822
|
}
|
|
1823
|
-
}), aa = ["aria-expanded", "data-focus"], sa = {
|
|
1823
|
+
}), aa = ["aria-expanded", "data-focus"], sa = {
|
|
1824
|
+
key: 0,
|
|
1825
|
+
class: "flex flex-wrap items-center gap-1 max-h-20 overflow-y-auto min-w-0 flex-1"
|
|
1826
|
+
}, ra = { class: "flex items-center min-w-0" }, ia = ["title"], ua = ["innerHTML"], da = ["onClick"], ca = { class: "flex-1 min-w-[2px]" }, pa = ["placeholder"], fa = ["title"], ma = ["innerHTML"], va = {
|
|
1824
1827
|
key: 2,
|
|
1825
1828
|
class: "text-gray-500 truncate"
|
|
1826
|
-
},
|
|
1829
|
+
}, ha = {
|
|
1830
|
+
key: 3,
|
|
1831
|
+
class: "flex-1 min-w-[2px]"
|
|
1832
|
+
}, ga = ["placeholder"], ba = { class: "flex items-center shrink-0" }, ya = ["disabled"], xa = ["disabled", "title"], wa = ["aria-disabled", "onClick"], ka = ["innerHTML"], _a = {
|
|
1827
1833
|
key: 1,
|
|
1828
1834
|
class: "px-3 py-2 text-center text-gray-500"
|
|
1829
|
-
},
|
|
1835
|
+
}, $a = ["disabled"], Ct = /* @__PURE__ */ U({
|
|
1830
1836
|
__name: "vs-input-select",
|
|
1831
1837
|
props: {
|
|
1832
1838
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -1861,127 +1867,127 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1861
1867
|
set: (h) => a("update:modelValue", h)
|
|
1862
1868
|
});
|
|
1863
1869
|
!r.value && t.defaultValue && (r.value = t.defaultValue);
|
|
1864
|
-
const u =
|
|
1865
|
-
if (!
|
|
1866
|
-
const h = q.value,
|
|
1867
|
-
return
|
|
1868
|
-
}), $ = B(() => t.placeholder || "Select..."),
|
|
1870
|
+
const u = k(null), c = k(null), p = k(null), f = k(null), m = k(!1), y = k(!1), S = k(null), q = k([]), H = k(-1), Z = k([]), z = k(""), P = k(null), I = k("bottom"), v = k({}), w = k([]), V = B(() => {
|
|
1871
|
+
if (!w.value.length) return [];
|
|
1872
|
+
const h = q.value, g = new Map(h.map((x) => [x.id?.toString(), x]));
|
|
1873
|
+
return w.value.map((x) => g.get(x?.toString())).filter((x) => !!x);
|
|
1874
|
+
}), $ = B(() => t.placeholder || "Select..."), O = B(() => W(S.value)), te = B(() => n.value ? !w.value.length && z.value === "" : !O.value && z.value === ""), J = B(() => s.value ? !1 : n.value ? w.value.length > 0 : !!r.value), M = (h) => n.value ? w.value.some((g) => g?.toString() === h?.toString()) : r.value?.toString() === h?.toString(), K = B(() => {
|
|
1869
1875
|
let h = q.value ?? [];
|
|
1870
|
-
if (!t.data &&
|
|
1871
|
-
const
|
|
1872
|
-
h = h.filter((
|
|
1873
|
-
const
|
|
1874
|
-
return
|
|
1876
|
+
if (!t.data && z.value.trim() !== "") {
|
|
1877
|
+
const g = z.value.toLowerCase();
|
|
1878
|
+
h = h.filter((x) => {
|
|
1879
|
+
const R = W(x).toLowerCase(), ae = x.text?.toLowerCase?.() || "";
|
|
1880
|
+
return R.includes(g) || ae.includes(g);
|
|
1875
1881
|
});
|
|
1876
1882
|
}
|
|
1877
|
-
if (n.value &&
|
|
1878
|
-
const
|
|
1879
|
-
h = h.filter((
|
|
1883
|
+
if (n.value && w.value.length) {
|
|
1884
|
+
const g = new Set(w.value.map((x) => x?.toString()));
|
|
1885
|
+
h = h.filter((x) => !g.has(x.id?.toString()));
|
|
1880
1886
|
}
|
|
1881
1887
|
return h;
|
|
1882
|
-
}), N = Ae("values"), le = /\{\{\s*([^}]+?)\s*\}\}/g,
|
|
1888
|
+
}), N = Ae("values"), le = /\{\{\s*([^}]+?)\s*\}\}/g, A = (h) => (h ? String(h) : "").replace(/<[^>]*>/g, "").trim(), j = B(() => t.slot ?? t?.optionTemplate ?? ""), C = (h) => {
|
|
1883
1889
|
if (!h) return "";
|
|
1884
|
-
const
|
|
1885
|
-
return
|
|
1886
|
-
const
|
|
1890
|
+
const g = j.value;
|
|
1891
|
+
return g ? g.replace(le, (x, R) => {
|
|
1892
|
+
const ae = R.trim(), pe = h[ae];
|
|
1887
1893
|
return pe != null ? String(pe) : "";
|
|
1888
1894
|
}) : h.text ?? "";
|
|
1889
1895
|
}, W = (h) => {
|
|
1890
1896
|
if (!h) return "";
|
|
1891
1897
|
if (!j.value) return h.text ?? "";
|
|
1892
|
-
const
|
|
1893
|
-
return
|
|
1898
|
+
const x = C(h);
|
|
1899
|
+
return A(x) || h.text || "";
|
|
1894
1900
|
}, oe = (h) => {
|
|
1895
|
-
t.set && N?.value && Object.entries(t.set).forEach(([
|
|
1896
|
-
if (!
|
|
1897
|
-
const
|
|
1898
|
-
N.value[
|
|
1901
|
+
t.set && N?.value && Object.entries(t.set).forEach(([g, x]) => {
|
|
1902
|
+
if (!g) return;
|
|
1903
|
+
const R = h ? h[x] : null;
|
|
1904
|
+
N.value[g] = R ?? null;
|
|
1899
1905
|
});
|
|
1900
1906
|
}, se = B(() => t.parent ? N?.value?.[t.parent]?.toString() ?? null : null), Le = async (h) => {
|
|
1901
1907
|
if (!t.data) {
|
|
1902
|
-
let
|
|
1908
|
+
let g = t.options ?? [];
|
|
1903
1909
|
if (h?.trim()) {
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1910
|
+
const x = h.toLowerCase();
|
|
1911
|
+
g = g.filter((R) => {
|
|
1912
|
+
const ae = W(R).toLowerCase(), pe = R.text?.toLowerCase?.() || "";
|
|
1913
|
+
return ae.includes(x) || pe.includes(x);
|
|
1908
1914
|
});
|
|
1909
1915
|
}
|
|
1910
|
-
return
|
|
1916
|
+
return g;
|
|
1911
1917
|
}
|
|
1912
1918
|
try {
|
|
1913
|
-
const
|
|
1914
|
-
return pe.set("json", "1"), h && pe.set("key", h), se.value !== void 0 && se.value !== null && se.value !== "" && pe.set("parent", se.value), (await fetch(`${
|
|
1919
|
+
const g = t.host ?? "", x = t.prefix ?? "api", R = t.api ?? `/${x}/suggest/${t.data}`, ae = `${g}${R}`, pe = new URLSearchParams();
|
|
1920
|
+
return pe.set("json", "1"), h && pe.set("key", h), se.value !== void 0 && se.value !== null && se.value !== "" && pe.set("parent", se.value), (await fetch(`${ae}?${pe.toString()}`).then((ze) => ze.json()))?.data ?? [];
|
|
1915
1921
|
} catch {
|
|
1916
1922
|
return [];
|
|
1917
1923
|
}
|
|
1918
1924
|
}, Oe = async () => {
|
|
1919
|
-
t.data ? q.value = await Le(
|
|
1925
|
+
t.data ? q.value = await Le(z.value) : q.value = t.options ? [...t.options] : [];
|
|
1920
1926
|
}, Ge = async (h) => {
|
|
1921
1927
|
if (h == null) return null;
|
|
1922
|
-
const
|
|
1923
|
-
if (
|
|
1928
|
+
const g = q.value?.find((x) => x?.id?.toString() === String(h));
|
|
1929
|
+
if (g) return g;
|
|
1924
1930
|
if (t.data)
|
|
1925
1931
|
try {
|
|
1926
|
-
const
|
|
1932
|
+
const x = t.host ?? "", R = t.prefix ?? "api", ae = t.api ?? `/${R}/suggest/${t.data}`, pe = `${x}${ae}`, xe = new URLSearchParams();
|
|
1927
1933
|
return xe.set("json", "1"), xe.set("val", String(h)), se.value !== void 0 && se.value !== null && se.value !== "" && xe.set("parent", se.value), ((await fetch(`${pe}?${xe.toString()}`).then((Pe) => Pe.json()))?.data ?? [])?.[0] ?? null;
|
|
1928
1934
|
} catch {
|
|
1929
1935
|
return null;
|
|
1930
1936
|
}
|
|
1931
1937
|
return null;
|
|
1932
1938
|
}, tt = async (h) => {
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1935
|
-
await
|
|
1936
|
-
const pe = await Ge(
|
|
1939
|
+
const g = new Set(q.value.map((R) => R.id?.toString())), x = h.filter((R) => !g.has(R?.toString()));
|
|
1940
|
+
x.length && await x.reduce(async (R, ae) => {
|
|
1941
|
+
await R;
|
|
1942
|
+
const pe = await Ge(ae);
|
|
1937
1943
|
pe && q.value.push(pe);
|
|
1938
1944
|
}, Promise.resolve());
|
|
1939
1945
|
}, De = async () => {
|
|
1940
1946
|
s.value || (m.value = !0, await Oe(), await je(() => {
|
|
1941
|
-
Me(),
|
|
1947
|
+
Me(), P.value?.focus(), K.value.length ? H.value = 0 : H.value = -1;
|
|
1942
1948
|
}));
|
|
1943
1949
|
}, Ce = () => {
|
|
1944
|
-
m.value = !1,
|
|
1945
|
-
},
|
|
1950
|
+
m.value = !1, H.value = -1;
|
|
1951
|
+
}, b = async (h) => {
|
|
1946
1952
|
if (s.value) return;
|
|
1947
1953
|
!m.value ? await De() : Ce();
|
|
1948
1954
|
}, _ = async () => {
|
|
1949
|
-
m.value ?
|
|
1955
|
+
m.value ? P.value?.focus() : await De();
|
|
1950
1956
|
}, Y = () => {
|
|
1951
|
-
n.value ? (
|
|
1952
|
-
},
|
|
1953
|
-
n.value && (
|
|
1957
|
+
n.value ? (w.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), oe(null), z.value = "", je(() => P.value?.focus());
|
|
1958
|
+
}, D = (h) => {
|
|
1959
|
+
n.value && (w.value = w.value.filter((g) => g?.toString() !== h?.toString()), r.value = [...w.value], a("change", r.value), je(() => P.value?.focus()));
|
|
1954
1960
|
}, Q = (h) => {
|
|
1955
|
-
n.value ? (M(h.id) || (
|
|
1956
|
-
|
|
1957
|
-
}), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value),
|
|
1961
|
+
n.value ? (M(h.id) || (w.value = [...w.value, h.id], r.value = [...w.value], a("change", r.value)), z.value = "", je(() => {
|
|
1962
|
+
P.value?.focus(), H.value = Math.min(H.value, K.value.length - 1);
|
|
1963
|
+
}), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value), z.value = "", Ce(), oe(h));
|
|
1958
1964
|
}, he = (h) => {
|
|
1959
1965
|
M(h.id) || Q(h);
|
|
1960
|
-
}, Ve = (h,
|
|
1961
|
-
if (!h || !
|
|
1962
|
-
const
|
|
1963
|
-
let xe =
|
|
1964
|
-
|
|
1965
|
-
const ze =
|
|
1966
|
+
}, Ve = (h, g) => {
|
|
1967
|
+
if (!h || !g) return;
|
|
1968
|
+
const x = h.offsetTop, R = x + h.offsetHeight, ae = g.scrollTop, pe = ae + g.clientHeight;
|
|
1969
|
+
let xe = g.scrollTop;
|
|
1970
|
+
x < ae ? xe = x - 80 : R > pe && (xe = R - g.clientHeight + 4);
|
|
1971
|
+
const ze = g;
|
|
1966
1972
|
ze.scrollTop = xe;
|
|
1967
1973
|
}, Be = (h) => {
|
|
1968
|
-
let
|
|
1969
|
-
for (;
|
|
1970
|
-
if (
|
|
1971
|
-
return
|
|
1972
|
-
const
|
|
1973
|
-
if (
|
|
1974
|
-
return
|
|
1975
|
-
|
|
1974
|
+
let g = h.parentElement;
|
|
1975
|
+
for (; g; ) {
|
|
1976
|
+
if (g.classList.contains("ui-dialog__content"))
|
|
1977
|
+
return g;
|
|
1978
|
+
const x = window.getComputedStyle(g), R = x.overflow + x.overflowY + x.overflowX;
|
|
1979
|
+
if (R.includes("auto") || R.includes("scroll") || g === document.body || g === document.documentElement)
|
|
1980
|
+
return g;
|
|
1981
|
+
g = g.parentElement;
|
|
1976
1982
|
}
|
|
1977
1983
|
return document.body;
|
|
1978
1984
|
}, Me = () => {
|
|
1979
1985
|
if (!c.value) return;
|
|
1980
|
-
const h = c.value.getBoundingClientRect(),
|
|
1986
|
+
const h = c.value.getBoundingClientRect(), g = window.innerHeight || document.documentElement.clientHeight, x = window.innerWidth || document.documentElement.clientWidth, R = 8, ae = 8, pe = t.maxHeight || 300, xe = g - h.bottom - ae - R, ze = h.top - ae - R, Ue = xe >= ze, Pe = Math.max(x - R * 2, 0);
|
|
1981
1987
|
let { width: Re } = h;
|
|
1982
1988
|
Pe > 0 && Re > Pe && (Re = Pe);
|
|
1983
1989
|
let { left: He } = h;
|
|
1984
|
-
He + Re +
|
|
1990
|
+
He + Re + R > x && (He = x - Re - R), He = Math.max(He, R);
|
|
1985
1991
|
const Nt = Math.min(
|
|
1986
1992
|
pe,
|
|
1987
1993
|
Math.max(Ue ? xe : ze, 50)
|
|
@@ -1993,44 +1999,44 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1993
1999
|
minWidth: "300px",
|
|
1994
2000
|
maxHeight: `${Nt}px`,
|
|
1995
2001
|
transform: Ue ? "none" : "translateY(-100%)",
|
|
1996
|
-
top: Ue ? `${h.bottom +
|
|
2002
|
+
top: Ue ? `${h.bottom + ae}px` : `${h.top - ae}px`
|
|
1997
2003
|
};
|
|
1998
2004
|
}, Ie = async (h) => {
|
|
1999
2005
|
s.value || !m.value && (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), await De());
|
|
2000
|
-
},
|
|
2006
|
+
}, rt = (h) => {
|
|
2001
2007
|
if (!m.value) return;
|
|
2002
|
-
const { key:
|
|
2003
|
-
if (
|
|
2004
|
-
h.preventDefault(),
|
|
2005
|
-
else if (
|
|
2006
|
-
h.preventDefault(),
|
|
2007
|
-
else if (
|
|
2008
|
+
const { key: g } = h;
|
|
2009
|
+
if (g === "ArrowDown")
|
|
2010
|
+
h.preventDefault(), H.value + 1 < K.value.length && (H.value += 1, Ve(Z.value[H.value], p.value));
|
|
2011
|
+
else if (g === "ArrowUp")
|
|
2012
|
+
h.preventDefault(), H.value > 0 && (H.value -= 1, Ve(Z.value[H.value], p.value));
|
|
2013
|
+
else if (g === "Enter") {
|
|
2008
2014
|
h.preventDefault();
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
-
} else
|
|
2012
|
-
},
|
|
2015
|
+
const x = K.value[H.value];
|
|
2016
|
+
x && Q(x), P.value?.blur();
|
|
2017
|
+
} else g === "Escape" ? (h.preventDefault(), Ce()) : g === "Backspace" ? n.value && z.value === "" && w.value.length && (w.value = w.value.slice(0, -1), r.value = [...w.value], a("change", r.value)) : g === "Home" ? (H.value = 0, Ve(Z.value[0], p.value)) : g === "End" ? (H.value = K.value.length - 1, Ve(Z.value[H.value], p.value)) : g === "Tab" && Ce();
|
|
2018
|
+
}, it = () => {
|
|
2013
2019
|
s.value || (y.value = !0);
|
|
2014
|
-
},
|
|
2015
|
-
y.value = !1,
|
|
2016
|
-
},
|
|
2020
|
+
}, ut = () => {
|
|
2021
|
+
y.value = !1, z.value = "";
|
|
2022
|
+
}, dt = (h) => {
|
|
2017
2023
|
h.key === "Escape" && m.value && Ce();
|
|
2018
|
-
},
|
|
2019
|
-
const
|
|
2020
|
-
u.value?.contains(
|
|
2021
|
-
},
|
|
2024
|
+
}, ct = (h) => {
|
|
2025
|
+
const g = h.target;
|
|
2026
|
+
u.value?.contains(g) || f.value?.contains(g) || Ce();
|
|
2027
|
+
}, pt = (h) => {
|
|
2022
2028
|
m.value && p.value && !p.value.contains(h.target) && Me();
|
|
2023
|
-
},
|
|
2029
|
+
}, ft = () => {
|
|
2024
2030
|
m.value && Me();
|
|
2025
|
-
},
|
|
2031
|
+
}, mt = () => {
|
|
2026
2032
|
m.value && Me();
|
|
2027
2033
|
};
|
|
2028
2034
|
ue(() => t.options, (h) => {
|
|
2029
|
-
h?.length && (q.value = [...h],
|
|
2035
|
+
h?.length && (q.value = [...h], Ke());
|
|
2030
2036
|
}, { immediate: !0 });
|
|
2031
|
-
async function
|
|
2037
|
+
async function Ke() {
|
|
2032
2038
|
if (n.value)
|
|
2033
|
-
Array.isArray(r.value) ?
|
|
2039
|
+
Array.isArray(r.value) ? w.value = [...r.value] : (w.value = r.value == null ? [] : [r.value], r.value = [...w.value]), t.data && w.value.length && (await tt(w.value), await je());
|
|
2034
2040
|
else {
|
|
2035
2041
|
if (Array.isArray(r.value)) {
|
|
2036
2042
|
const h = r.value[0] ?? null;
|
|
@@ -2040,67 +2046,67 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2040
2046
|
}
|
|
2041
2047
|
}
|
|
2042
2048
|
ue(r, () => {
|
|
2043
|
-
|
|
2049
|
+
Ke();
|
|
2044
2050
|
}), _e(async () => {
|
|
2045
|
-
addEventListener("keydown",
|
|
2051
|
+
addEventListener("keydown", dt), addEventListener("scroll", pt, !0), addEventListener("resize", ft), document.addEventListener("click", ct, !0), c.value && Be(c.value).addEventListener("scroll", mt, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Le("")), await Ke(), gt.value = !1;
|
|
2046
2052
|
}), Xe(() => {
|
|
2047
|
-
removeEventListener("keydown",
|
|
2053
|
+
removeEventListener("keydown", dt), removeEventListener("scroll", pt, !0), removeEventListener("resize", ft), document.removeEventListener("click", ct, !0), c.value && Be(c.value).removeEventListener("scroll", mt, !0);
|
|
2048
2054
|
});
|
|
2049
|
-
const
|
|
2055
|
+
const Ze = k(!1), lt = k({}), vt = k([]), ht = k(null);
|
|
2050
2056
|
async function Ut() {
|
|
2051
|
-
if (!t.add?.token ||
|
|
2057
|
+
if (!t.add?.token || ht?.value.validate())
|
|
2052
2058
|
return;
|
|
2053
|
-
const
|
|
2059
|
+
const g = t.add.api ?? `/api/table/${t.add.token}`, { id: x } = await fetch(g, {
|
|
2054
2060
|
method: "POST",
|
|
2055
2061
|
headers: { "Content-Type": "application/json" },
|
|
2056
2062
|
body: JSON.stringify(lt.value)
|
|
2057
|
-
}).then((
|
|
2063
|
+
}).then((R) => R.json());
|
|
2058
2064
|
if (!t.options?.length && t.data) {
|
|
2059
|
-
const { data:
|
|
2060
|
-
S.value =
|
|
2065
|
+
const { data: R } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${x}`).then((ae) => ae.json());
|
|
2066
|
+
S.value = R[0], q.value.push(R[0]), r.value = x;
|
|
2061
2067
|
}
|
|
2062
|
-
|
|
2068
|
+
Ze.value = !1, ce({ title: "Success!", message: "Object created." });
|
|
2063
2069
|
}
|
|
2064
2070
|
async function Pt() {
|
|
2065
2071
|
if (!t.add) return null;
|
|
2066
|
-
const h = await fetch(`/api/template/form/${t.add.form}`).then((
|
|
2067
|
-
return
|
|
2072
|
+
const h = await fetch(`/api/template/form/${t.add.form}`).then((g) => g.json());
|
|
2073
|
+
return vt.value = h.schema, Ze.value = !0, null;
|
|
2068
2074
|
}
|
|
2069
|
-
function Rt(h,
|
|
2070
|
-
let
|
|
2071
|
-
return (...
|
|
2072
|
-
|
|
2075
|
+
function Rt(h, g = 200) {
|
|
2076
|
+
let x;
|
|
2077
|
+
return (...R) => {
|
|
2078
|
+
x && clearTimeout(x), x = window.setTimeout(() => h(...R), g);
|
|
2073
2079
|
};
|
|
2074
2080
|
}
|
|
2075
2081
|
const Ht = Rt(async (h) => {
|
|
2076
2082
|
q.value = await Le(h);
|
|
2077
2083
|
}, 200);
|
|
2078
|
-
ue(
|
|
2084
|
+
ue(z, (h) => {
|
|
2079
2085
|
t.data && Ht(h.trim());
|
|
2080
2086
|
}), ue(() => t.options, (h) => {
|
|
2081
|
-
!t.data && h?.length && (q.value = [...h],
|
|
2087
|
+
!t.data && h?.length && (q.value = [...h], Ke());
|
|
2082
2088
|
}, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
|
|
2083
2089
|
t.data && Oe();
|
|
2084
2090
|
});
|
|
2085
|
-
const
|
|
2091
|
+
const gt = k(!0);
|
|
2086
2092
|
return ue(se, async () => {
|
|
2087
|
-
t.data && (
|
|
2088
|
-
}), (h,
|
|
2089
|
-
|
|
2090
|
-
visible:
|
|
2091
|
-
"onUpdate:visible":
|
|
2093
|
+
t.data && (gt.value || (n.value ? (w.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null))), await Oe());
|
|
2094
|
+
}), (h, g) => (i(), d(re, null, [
|
|
2095
|
+
T(ee(Et), {
|
|
2096
|
+
visible: Ze.value,
|
|
2097
|
+
"onUpdate:visible": g[1] || (g[1] = (x) => Ze.value = x),
|
|
2092
2098
|
title: "Додати",
|
|
2093
2099
|
buttonText: "Додати",
|
|
2094
2100
|
onDone: Ut,
|
|
2095
2101
|
teleport: h.teleport
|
|
2096
2102
|
}, {
|
|
2097
2103
|
default: Ee(() => [
|
|
2098
|
-
|
|
2099
|
-
schema:
|
|
2104
|
+
T(We, {
|
|
2105
|
+
schema: vt.value,
|
|
2100
2106
|
modelValue: lt.value,
|
|
2101
|
-
"onUpdate:modelValue":
|
|
2107
|
+
"onUpdate:modelValue": g[0] || (g[0] = (x) => lt.value = x),
|
|
2102
2108
|
ref_key: "addForm",
|
|
2103
|
-
ref:
|
|
2109
|
+
ref: ht
|
|
2104
2110
|
}, null, 8, ["schema", "modelValue"])
|
|
2105
2111
|
]),
|
|
2106
2112
|
_: 1
|
|
@@ -2109,17 +2115,17 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2109
2115
|
class: "flex gap-1 w-full",
|
|
2110
2116
|
ref_key: "selectRoot",
|
|
2111
2117
|
ref: u,
|
|
2112
|
-
onClick:
|
|
2118
|
+
onClick: g[5] || (g[5] = ke(() => {
|
|
2113
2119
|
}, ["stop"]))
|
|
2114
2120
|
}, [
|
|
2115
2121
|
l("div", {
|
|
2116
2122
|
class: E(["relative w-full font-sans", t.customClass])
|
|
2117
2123
|
}, [
|
|
2118
|
-
|
|
2124
|
+
g[10] || (g[10] = l("span", {
|
|
2119
2125
|
id: "react-select-live-region",
|
|
2120
2126
|
class: "sr-only"
|
|
2121
2127
|
}, null, -1)),
|
|
2122
|
-
|
|
2128
|
+
g[11] || (g[11] = l("span", {
|
|
2123
2129
|
"aria-live": "polite",
|
|
2124
2130
|
"aria-atomic": "false",
|
|
2125
2131
|
"aria-relevant": "additions text",
|
|
@@ -2145,69 +2151,93 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2145
2151
|
ref_key: "triggerRef",
|
|
2146
2152
|
ref: c
|
|
2147
2153
|
}, [
|
|
2148
|
-
n.value
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
class: "w-[16px] h-[16px] rounded-md block ml-1.5",
|
|
2156
|
-
style: be({ backgroundColor: k?.color })
|
|
2157
|
-
}, null, 4)) : D("", !0),
|
|
2158
|
-
l("div", {
|
|
2159
|
-
class: "truncate text-gray-900 overflow-hidden",
|
|
2160
|
-
title: W(k)
|
|
2161
|
-
}, [
|
|
2162
|
-
j.value ? (i(), d("span", {
|
|
2154
|
+
n.value ? (i(), d("div", sa, [
|
|
2155
|
+
(i(!0), d(re, null, fe(V.value, (x) => (i(), d("div", {
|
|
2156
|
+
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
|
|
2157
|
+
key: x.id
|
|
2158
|
+
}, [
|
|
2159
|
+
l("div", ra, [
|
|
2160
|
+
x?.color ? (i(), d("span", {
|
|
2163
2161
|
key: 0,
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
class: "
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2162
|
+
class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
|
|
2163
|
+
style: be({ backgroundColor: x?.color })
|
|
2164
|
+
}, null, 4)) : F("", !0),
|
|
2165
|
+
l("div", {
|
|
2166
|
+
class: "truncate text-gray-900 overflow-hidden max-w-[200px]",
|
|
2167
|
+
title: W(x)
|
|
2168
|
+
}, [
|
|
2169
|
+
j.value ? (i(), d("span", {
|
|
2170
|
+
key: 0,
|
|
2171
|
+
innerHTML: C(x)
|
|
2172
|
+
}, null, 8, ua)) : (i(), d(re, { key: 1 }, [
|
|
2173
|
+
ge(G(x.text), 1)
|
|
2174
|
+
], 64))
|
|
2175
|
+
], 8, ia)
|
|
2176
|
+
]),
|
|
2177
|
+
l("div", {
|
|
2178
|
+
role: "button",
|
|
2179
|
+
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",
|
|
2180
|
+
onClick: ke((R) => D(x.id), ["stop"])
|
|
2181
|
+
}, g[6] || (g[6] = [
|
|
2182
|
+
l("svg", {
|
|
2183
|
+
height: "14",
|
|
2184
|
+
width: "14",
|
|
2185
|
+
viewBox: "0 0 20 20",
|
|
2186
|
+
"aria-hidden": "true",
|
|
2187
|
+
focusable: "false",
|
|
2188
|
+
class: "inline-block fill-current stroke-current leading-none stroke-0"
|
|
2189
|
+
}, [
|
|
2190
|
+
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2191
|
+
], -1)
|
|
2192
|
+
]), 8, da)
|
|
2193
|
+
]))), 128)),
|
|
2194
|
+
l("div", ca, [
|
|
2195
|
+
!s.value && h.search ? ne((i(), d("input", {
|
|
2196
|
+
key: 0,
|
|
2197
|
+
ref_key: "inputRef",
|
|
2198
|
+
ref: P,
|
|
2199
|
+
class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
|
|
2200
|
+
autocapitalize: "none",
|
|
2201
|
+
autocomplete: "off",
|
|
2202
|
+
autocorrect: "off",
|
|
2203
|
+
spellcheck: "false",
|
|
2204
|
+
type: "text",
|
|
2205
|
+
tabindex: "0",
|
|
2206
|
+
"aria-autocomplete": "list",
|
|
2207
|
+
placeholder: w.value.length ? " " : $.value,
|
|
2208
|
+
"onUpdate:modelValue": g[2] || (g[2] = (x) => z.value = x),
|
|
2209
|
+
onFocus: it,
|
|
2210
|
+
onBlur: ut,
|
|
2211
|
+
onKeydown: rt
|
|
2212
|
+
}, null, 40, pa)), [
|
|
2213
|
+
[me, z.value]
|
|
2214
|
+
]) : F("", !0)
|
|
2215
|
+
])
|
|
2216
|
+
])) : !n.value && !y.value && O.value && z.value === "" ? (i(), d("div", {
|
|
2187
2217
|
key: 1,
|
|
2188
2218
|
class: E(["truncate text-gray-900"]),
|
|
2189
|
-
title:
|
|
2219
|
+
title: O.value
|
|
2190
2220
|
}, [
|
|
2191
2221
|
S.value?.color ? (i(), d("span", {
|
|
2192
2222
|
key: 0,
|
|
2193
2223
|
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
|
|
2194
2224
|
style: be({ backgroundColor: S.value?.color })
|
|
2195
|
-
}, null, 4)) :
|
|
2225
|
+
}, null, 4)) : F("", !0),
|
|
2196
2226
|
j.value ? (i(), d("span", {
|
|
2197
2227
|
key: 1,
|
|
2198
2228
|
class: E({ "pl-5": S.value?.color }),
|
|
2199
2229
|
innerHTML: C(S.value)
|
|
2200
|
-
}, null, 10,
|
|
2230
|
+
}, null, 10, ma)) : (i(), d("span", {
|
|
2201
2231
|
key: 2,
|
|
2202
2232
|
class: E({ "pl-5": S.value?.color })
|
|
2203
2233
|
}, G(S.value?.text), 3))
|
|
2204
|
-
], 8,
|
|
2205
|
-
te.value ? (i(), d("div",
|
|
2206
|
-
|
|
2207
|
-
!s.value && h.search ?
|
|
2234
|
+
], 8, fa)) : F("", !0),
|
|
2235
|
+
te.value ? (i(), d("div", va, G($.value), 1)) : F("", !0),
|
|
2236
|
+
n.value ? F("", !0) : (i(), d("div", ha, [
|
|
2237
|
+
!s.value && h.search ? ne((i(), d("input", {
|
|
2208
2238
|
key: 0,
|
|
2209
2239
|
ref_key: "inputRef",
|
|
2210
|
-
ref:
|
|
2240
|
+
ref: P,
|
|
2211
2241
|
class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
|
|
2212
2242
|
autocapitalize: "none",
|
|
2213
2243
|
autocomplete: "off",
|
|
@@ -2216,17 +2246,17 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2216
2246
|
type: "text",
|
|
2217
2247
|
tabindex: "0",
|
|
2218
2248
|
"aria-autocomplete": "list",
|
|
2219
|
-
placeholder:
|
|
2220
|
-
"onUpdate:modelValue":
|
|
2221
|
-
onFocus:
|
|
2222
|
-
onBlur:
|
|
2223
|
-
onKeydown:
|
|
2224
|
-
}, null, 40,
|
|
2225
|
-
[
|
|
2226
|
-
]) :
|
|
2227
|
-
])
|
|
2249
|
+
placeholder: y.value && !z.value?.length && O.value || " ",
|
|
2250
|
+
"onUpdate:modelValue": g[3] || (g[3] = (x) => z.value = x),
|
|
2251
|
+
onFocus: it,
|
|
2252
|
+
onBlur: ut,
|
|
2253
|
+
onKeydown: rt
|
|
2254
|
+
}, null, 40, ga)), [
|
|
2255
|
+
[me, z.value]
|
|
2256
|
+
]) : F("", !0)
|
|
2257
|
+
]))
|
|
2228
2258
|
], 512),
|
|
2229
|
-
l("div",
|
|
2259
|
+
l("div", ba, [
|
|
2230
2260
|
J.value ? (i(), d("button", {
|
|
2231
2261
|
key: 0,
|
|
2232
2262
|
type: "button",
|
|
@@ -2234,7 +2264,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2234
2264
|
"aria-hidden": "true",
|
|
2235
2265
|
disabled: s.value,
|
|
2236
2266
|
onClick: ke(Y, ["stop"])
|
|
2237
|
-
},
|
|
2267
|
+
}, g[7] || (g[7] = [
|
|
2238
2268
|
l("svg", {
|
|
2239
2269
|
height: "20",
|
|
2240
2270
|
width: "20",
|
|
@@ -2243,16 +2273,16 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2243
2273
|
}, [
|
|
2244
2274
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2245
2275
|
], -1)
|
|
2246
|
-
]), 8,
|
|
2247
|
-
|
|
2276
|
+
]), 8, ya)) : F("", !0),
|
|
2277
|
+
g[9] || (g[9] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2248
2278
|
l("button", {
|
|
2249
2279
|
type: "button",
|
|
2250
2280
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2251
2281
|
"aria-hidden": "true",
|
|
2252
2282
|
disabled: s.value,
|
|
2253
|
-
onClick:
|
|
2283
|
+
onClick: g[4] || (g[4] = ke((x) => b(), ["stop"])),
|
|
2254
2284
|
title: m.value ? "Закрити список" : "Відкрити список"
|
|
2255
|
-
},
|
|
2285
|
+
}, g[8] || (g[8] = [
|
|
2256
2286
|
l("svg", {
|
|
2257
2287
|
height: "20",
|
|
2258
2288
|
width: "20",
|
|
@@ -2261,10 +2291,10 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2261
2291
|
}, [
|
|
2262
2292
|
l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
|
|
2263
2293
|
], -1)
|
|
2264
|
-
]), 8,
|
|
2294
|
+
]), 8, xa)
|
|
2265
2295
|
])
|
|
2266
2296
|
], 42, aa),
|
|
2267
|
-
(i(),
|
|
2297
|
+
(i(), ve(jt, { to: "body" }, [
|
|
2268
2298
|
m.value ? (i(), d("div", {
|
|
2269
2299
|
key: 0,
|
|
2270
2300
|
ref_key: "dropdownRef",
|
|
@@ -2281,43 +2311,43 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2281
2311
|
ref_key: "listRef",
|
|
2282
2312
|
ref: p
|
|
2283
2313
|
}, [
|
|
2284
|
-
|
|
2285
|
-
key:
|
|
2314
|
+
K.value.length ? (i(!0), d(re, { key: 0 }, fe(K.value, (x, R) => (i(), d("div", {
|
|
2315
|
+
key: x.id,
|
|
2286
2316
|
ref_for: !0,
|
|
2287
|
-
ref: (
|
|
2317
|
+
ref: (ae) => Z.value[R] = ae,
|
|
2288
2318
|
class: E([
|
|
2289
2319
|
"flex px-3 py-2 cursor-default select-none text-gray-900 ",
|
|
2290
|
-
M(
|
|
2291
|
-
|
|
2320
|
+
M(x.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
|
|
2321
|
+
H.value === R && !M(x.id) ? "bg-blue-100" : ""
|
|
2292
2322
|
]),
|
|
2293
|
-
"aria-disabled": M(
|
|
2323
|
+
"aria-disabled": M(x.id) ? "true" : "false",
|
|
2294
2324
|
role: "option",
|
|
2295
2325
|
tabindex: "-1",
|
|
2296
|
-
onClick: (
|
|
2326
|
+
onClick: (ae) => he(x)
|
|
2297
2327
|
}, [
|
|
2298
|
-
|
|
2328
|
+
x?.color ? (i(), d("span", {
|
|
2299
2329
|
key: 0,
|
|
2300
2330
|
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2301
|
-
style: be({ backgroundColor:
|
|
2302
|
-
}, null, 4)) :
|
|
2331
|
+
style: be({ backgroundColor: x?.color })
|
|
2332
|
+
}, null, 4)) : F("", !0),
|
|
2303
2333
|
l("div", {
|
|
2304
2334
|
class: E([
|
|
2305
2335
|
"leading-[19px]",
|
|
2306
|
-
|
|
2336
|
+
H.value === x.id ? "text-white" : "",
|
|
2307
2337
|
// active style like react-select
|
|
2308
|
-
(
|
|
2338
|
+
(H.value === R, "")
|
|
2309
2339
|
])
|
|
2310
2340
|
}, [
|
|
2311
2341
|
j.value ? (i(), d("span", {
|
|
2312
2342
|
key: 0,
|
|
2313
|
-
innerHTML: C(
|
|
2314
|
-
}, null, 8,
|
|
2315
|
-
ge(G(
|
|
2343
|
+
innerHTML: C(x)
|
|
2344
|
+
}, null, 8, ka)) : (i(), d(re, { key: 1 }, [
|
|
2345
|
+
ge(G(x.text), 1)
|
|
2316
2346
|
], 64))
|
|
2317
2347
|
], 2)
|
|
2318
|
-
], 10,
|
|
2348
|
+
], 10, wa))), 128)) : (i(), d("div", _a, " No options "))
|
|
2319
2349
|
], 4)
|
|
2320
|
-
], 4)) :
|
|
2350
|
+
], 4)) : F("", !0)
|
|
2321
2351
|
]))
|
|
2322
2352
|
], 2),
|
|
2323
2353
|
t.add ? (i(), d("button", {
|
|
@@ -2327,16 +2357,16 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2327
2357
|
disabled: s.value,
|
|
2328
2358
|
type: "button"
|
|
2329
2359
|
}, [
|
|
2330
|
-
|
|
2360
|
+
T(qe, {
|
|
2331
2361
|
width: "16",
|
|
2332
2362
|
height: "16"
|
|
2333
2363
|
}),
|
|
2334
|
-
|
|
2335
|
-
], 8,
|
|
2364
|
+
g[12] || (g[12] = l("span", null, "Додати", -1))
|
|
2365
|
+
], 8, $a)) : F("", !0)
|
|
2336
2366
|
], 512)
|
|
2337
2367
|
], 64));
|
|
2338
2368
|
}
|
|
2339
|
-
}),
|
|
2369
|
+
}), Ca = ["placeholder", "disabled"], Va = /* @__PURE__ */ U({
|
|
2340
2370
|
__name: "vs-input-textarea",
|
|
2341
2371
|
props: /* @__PURE__ */ ie({
|
|
2342
2372
|
style: { default: () => ({}) },
|
|
@@ -2353,7 +2383,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2353
2383
|
emits: ["update:modelValue"],
|
|
2354
2384
|
setup(o) {
|
|
2355
2385
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
2356
|
-
return (n, s) =>
|
|
2386
|
+
return (n, s) => ne((i(), d("textarea", {
|
|
2357
2387
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
|
|
2358
2388
|
placeholder: n.placeholder,
|
|
2359
2389
|
disabled: n.disabled,
|
|
@@ -2362,11 +2392,11 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2362
2392
|
style: {
|
|
2363
2393
|
border: "1px solid #CFD9E0"
|
|
2364
2394
|
}
|
|
2365
|
-
}, null, 10,
|
|
2366
|
-
[
|
|
2395
|
+
}, null, 10, Ca)), [
|
|
2396
|
+
[me, a.value]
|
|
2367
2397
|
]);
|
|
2368
2398
|
}
|
|
2369
|
-
}),
|
|
2399
|
+
}), Ma = {}, La = {
|
|
2370
2400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2371
2401
|
viewBox: "0 0 24 24",
|
|
2372
2402
|
fill: "none",
|
|
@@ -2376,8 +2406,8 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2376
2406
|
"stroke-linejoin": "round",
|
|
2377
2407
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2378
2408
|
};
|
|
2379
|
-
function
|
|
2380
|
-
return i(), d("svg",
|
|
2409
|
+
function Sa(o, e) {
|
|
2410
|
+
return i(), d("svg", La, e[0] || (e[0] = [
|
|
2381
2411
|
l("path", {
|
|
2382
2412
|
stroke: "none",
|
|
2383
2413
|
d: "M0 0h24v24H0z",
|
|
@@ -2387,7 +2417,7 @@ function Va(o, e) {
|
|
|
2387
2417
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
2388
2418
|
]));
|
|
2389
2419
|
}
|
|
2390
|
-
const
|
|
2420
|
+
const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
|
|
2391
2421
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
2392
2422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2393
2423
|
viewBox: "0 0 24 24",
|
|
@@ -2397,15 +2427,15 @@ const Ma = /* @__PURE__ */ X($a, [["render", Va]]), La = {}, Sa = {
|
|
|
2397
2427
|
"stroke-linecap": "round",
|
|
2398
2428
|
"stroke-linejoin": "round"
|
|
2399
2429
|
};
|
|
2400
|
-
function
|
|
2401
|
-
return i(), d("svg",
|
|
2430
|
+
function Ia(o, e) {
|
|
2431
|
+
return i(), d("svg", Ea, e[0] || (e[0] = [
|
|
2402
2432
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2403
2433
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
2404
2434
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
2405
2435
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
2406
2436
|
]));
|
|
2407
2437
|
}
|
|
2408
|
-
const
|
|
2438
|
+
const za = /* @__PURE__ */ X(ja, [["render", Ia]]), Aa = {}, Ta = {
|
|
2409
2439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2410
2440
|
width: "14",
|
|
2411
2441
|
height: "14",
|
|
@@ -2416,8 +2446,8 @@ const ja = /* @__PURE__ */ X(La, [["render", Ba]]), Ea = {}, Ia = {
|
|
|
2416
2446
|
"stroke-linecap": "round",
|
|
2417
2447
|
"stroke-linejoin": "round"
|
|
2418
2448
|
};
|
|
2419
|
-
function
|
|
2420
|
-
return i(), d("svg",
|
|
2449
|
+
function Fa(o, e) {
|
|
2450
|
+
return i(), d("svg", Ta, e[0] || (e[0] = [
|
|
2421
2451
|
l("path", {
|
|
2422
2452
|
stroke: "none",
|
|
2423
2453
|
d: "M0 0h24v24H0z",
|
|
@@ -2428,7 +2458,7 @@ function za(o, e) {
|
|
|
2428
2458
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2429
2459
|
]));
|
|
2430
2460
|
}
|
|
2431
|
-
const
|
|
2461
|
+
const Oa = /* @__PURE__ */ X(Aa, [["render", Fa]]), Da = {}, Ua = {
|
|
2432
2462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2433
2463
|
viewBox: "0 0 24 24",
|
|
2434
2464
|
fill: "none",
|
|
@@ -2437,8 +2467,8 @@ const Aa = /* @__PURE__ */ X(Ea, [["render", za]]), Ta = {}, Fa = {
|
|
|
2437
2467
|
"stroke-linecap": "round",
|
|
2438
2468
|
"stroke-linejoin": "round"
|
|
2439
2469
|
};
|
|
2440
|
-
function
|
|
2441
|
-
return i(), d("svg",
|
|
2470
|
+
function Pa(o, e) {
|
|
2471
|
+
return i(), d("svg", Ua, e[0] || (e[0] = [
|
|
2442
2472
|
l("path", {
|
|
2443
2473
|
stroke: "none",
|
|
2444
2474
|
d: "M0 0h24v24H0z",
|
|
@@ -2449,7 +2479,7 @@ function Oa(o, e) {
|
|
|
2449
2479
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2450
2480
|
]));
|
|
2451
2481
|
}
|
|
2452
|
-
const
|
|
2482
|
+
const Ra = /* @__PURE__ */ X(Da, [["render", Pa]]), Ha = {}, Na = {
|
|
2453
2483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2454
2484
|
viewBox: "0 0 24 24",
|
|
2455
2485
|
fill: "none",
|
|
@@ -2458,22 +2488,22 @@ const Da = /* @__PURE__ */ X(Ta, [["render", Oa]]), Ua = {}, Pa = {
|
|
|
2458
2488
|
"stroke-linecap": "round",
|
|
2459
2489
|
"stroke-linejoin": "round"
|
|
2460
2490
|
};
|
|
2461
|
-
function
|
|
2462
|
-
return i(), d("svg",
|
|
2491
|
+
function qa(o, e) {
|
|
2492
|
+
return i(), d("svg", Na, e[0] || (e[0] = [
|
|
2463
2493
|
ye('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
|
|
2464
2494
|
]));
|
|
2465
2495
|
}
|
|
2466
|
-
const
|
|
2496
|
+
const Vt = /* @__PURE__ */ X(Ha, [["render", qa]]), Wa = {}, Ga = {
|
|
2467
2497
|
viewBox: "0 0 178 90",
|
|
2468
2498
|
fill: "none",
|
|
2469
2499
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2470
2500
|
};
|
|
2471
|
-
function
|
|
2472
|
-
return i(), d("svg",
|
|
2501
|
+
function Ka(o, e) {
|
|
2502
|
+
return i(), d("svg", Ga, e[0] || (e[0] = [
|
|
2473
2503
|
ye('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
2474
2504
|
]));
|
|
2475
2505
|
}
|
|
2476
|
-
const
|
|
2506
|
+
const Za = /* @__PURE__ */ X(Wa, [["render", Ka]]), Ja = {}, Ya = {
|
|
2477
2507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2478
2508
|
viewBox: "0 0 24 24",
|
|
2479
2509
|
fill: "none",
|
|
@@ -2482,25 +2512,25 @@ const Wa = /* @__PURE__ */ X(Ha, [["render", qa]]), Ga = {}, Za = {
|
|
|
2482
2512
|
"stroke-linecap": "round",
|
|
2483
2513
|
"stroke-linejoin": "round"
|
|
2484
2514
|
};
|
|
2485
|
-
function
|
|
2486
|
-
return i(), d("svg",
|
|
2515
|
+
function Xa(o, e) {
|
|
2516
|
+
return i(), d("svg", Ya, e[0] || (e[0] = [
|
|
2487
2517
|
l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
|
|
2488
2518
|
]));
|
|
2489
2519
|
}
|
|
2490
|
-
const
|
|
2520
|
+
const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ts = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ls = { class: "relative w-full" }, os = { class: "table-wrapper flex gap-2" }, ns = { class: "vs-popover inline-block text-slate-700" }, as = { class: "text-center" }, ss = { class: "" }, rs = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, is = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, us = { class: "text-sm items-center text-gray-800 flex gap-1" }, ds = { class: "w-full overflow-x-auto" }, cs = { class: "w-full table-auto caption-bottom text-sm" }, ps = { class: "[&_tr]:border-b" }, fs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ms = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, vs = {
|
|
2491
2521
|
key: 0,
|
|
2492
2522
|
colspan: "100%",
|
|
2493
2523
|
class: "text-center"
|
|
2494
|
-
},
|
|
2524
|
+
}, hs = { class: "w-full" }, gs = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, bs = ["onDragstart", "onDragover", "onDrop"], ys = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, xs = { class: "flex items-center justify-center" }, ws = {
|
|
2495
2525
|
key: 0,
|
|
2496
2526
|
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"
|
|
2497
|
-
},
|
|
2527
|
+
}, ks = { key: 0 }, _s = ["src"], $s = {
|
|
2498
2528
|
key: 1,
|
|
2499
2529
|
class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
|
|
2500
|
-
},
|
|
2530
|
+
}, Cs = ["innerHTML"], Vs = {
|
|
2501
2531
|
key: 2,
|
|
2502
2532
|
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"
|
|
2503
|
-
},
|
|
2533
|
+
}, Ms = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ls = { class: "flex items-center justify-center gap-2" }, Ss = ["onClick"], Bs = ["onClick"], js = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Es = /* @__PURE__ */ U({
|
|
2504
2534
|
__name: "vs-input-datatable",
|
|
2505
2535
|
props: /* @__PURE__ */ ie({
|
|
2506
2536
|
colModel: {},
|
|
@@ -2517,34 +2547,34 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2517
2547
|
}),
|
|
2518
2548
|
emits: ["update:modelValue"],
|
|
2519
2549
|
setup(o) {
|
|
2520
|
-
const e = o, t = de(o, "modelValue"), a =
|
|
2550
|
+
const e = o, t = de(o, "modelValue"), a = k({}), n = k(""), s = B(() => {
|
|
2521
2551
|
if (!n.value) return t.value ?? [];
|
|
2522
|
-
const
|
|
2552
|
+
const A = n.value.toLowerCase();
|
|
2523
2553
|
return t.value.filter((j) => e.colModel?.some((C) => {
|
|
2524
2554
|
const W = j[C.key];
|
|
2525
|
-
return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(
|
|
2555
|
+
return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(A) : String(W).toLowerCase().includes(A) : !1;
|
|
2526
2556
|
}));
|
|
2527
|
-
}), r =
|
|
2528
|
-
r.value =
|
|
2529
|
-
}, y = (
|
|
2530
|
-
u.value =
|
|
2531
|
-
}, S = (
|
|
2532
|
-
if (r.value === null || r.value ===
|
|
2557
|
+
}), r = k(null), u = k(null), c = k(!1), p = k(null), f = k({ top: 0, left: 0 }), m = (A) => {
|
|
2558
|
+
r.value = A;
|
|
2559
|
+
}, y = (A) => {
|
|
2560
|
+
u.value = A;
|
|
2561
|
+
}, S = (A) => {
|
|
2562
|
+
if (r.value === null || r.value === A) {
|
|
2533
2563
|
r.value = null, u.value = null;
|
|
2534
2564
|
return;
|
|
2535
2565
|
}
|
|
2536
2566
|
const j = [...t.value], [C] = j.splice(r.value, 1);
|
|
2537
|
-
j.splice(
|
|
2538
|
-
}, q = (
|
|
2539
|
-
const C =
|
|
2567
|
+
j.splice(A, 0, C), t.value = j, r.value = null, u.value = null;
|
|
2568
|
+
}, q = (A) => {
|
|
2569
|
+
const C = A.currentTarget.getBoundingClientRect();
|
|
2540
2570
|
f.value = { top: C.bottom + window.scrollY, left: C.left + window.scrollX }, c.value = !c.value;
|
|
2541
|
-
},
|
|
2571
|
+
}, H = () => {
|
|
2542
2572
|
p.value && p.value.click();
|
|
2543
|
-
},
|
|
2544
|
-
const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C =
|
|
2573
|
+
}, Z = (A) => {
|
|
2574
|
+
const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C = A.toLowerCase();
|
|
2545
2575
|
return j.some((W) => C.endsWith(W));
|
|
2546
|
-
},
|
|
2547
|
-
const C =
|
|
2576
|
+
}, z = (A) => {
|
|
2577
|
+
const C = A.target.files?.[0];
|
|
2548
2578
|
if (!C) return;
|
|
2549
2579
|
const W = new FileReader();
|
|
2550
2580
|
W.onload = (oe) => {
|
|
@@ -2558,79 +2588,79 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2558
2588
|
console.error("Error parsing file:", se);
|
|
2559
2589
|
}
|
|
2560
2590
|
}, W.readAsText(C);
|
|
2561
|
-
},
|
|
2562
|
-
const
|
|
2591
|
+
}, P = () => {
|
|
2592
|
+
const A = JSON.stringify(t.value, null, 2), j = new Blob([A], { type: "application/json" }), C = URL.createObjectURL(j), W = document.createElement("a");
|
|
2563
2593
|
W.href = C, W.download = "data.json", W.click(), URL.revokeObjectURL(C);
|
|
2564
2594
|
};
|
|
2565
2595
|
_e(async () => {
|
|
2566
|
-
const
|
|
2567
|
-
|
|
2596
|
+
const A = e.colModel?.filter((j) => j.data);
|
|
2597
|
+
A?.length && Promise.all(A.map(async (j) => {
|
|
2568
2598
|
const W = await (await fetch(`/api/suggest/${j.data}`)).json();
|
|
2569
2599
|
a.value[j.key] = W.data;
|
|
2570
2600
|
}));
|
|
2571
2601
|
});
|
|
2572
|
-
const I =
|
|
2573
|
-
let
|
|
2574
|
-
const $ =
|
|
2602
|
+
const I = k(""), v = k(!1);
|
|
2603
|
+
let w = "edit", V = 0;
|
|
2604
|
+
const $ = k({}), O = k({});
|
|
2575
2605
|
async function te() {
|
|
2576
|
-
I.value = "Додати", v.value = !0,
|
|
2606
|
+
I.value = "Додати", v.value = !0, w = "add", $.value = {};
|
|
2577
2607
|
}
|
|
2578
|
-
function J(
|
|
2608
|
+
function J(A, j) {
|
|
2579
2609
|
const C = j.key || j.name;
|
|
2580
|
-
return a.value[C] &&
|
|
2610
|
+
return a.value[C] && A[C] ? a.value[C].find((W) => W.id.toString() === A[C].toString())?.text ?? A[C] : A[C] || "-";
|
|
2581
2611
|
}
|
|
2582
|
-
async function M(
|
|
2583
|
-
I.value = "Редагувати", v.value = !0,
|
|
2612
|
+
async function M(A, j) {
|
|
2613
|
+
I.value = "Редагувати", v.value = !0, w = "edit", V = j, $.value = { ...A };
|
|
2584
2614
|
}
|
|
2585
|
-
function
|
|
2586
|
-
const
|
|
2587
|
-
if (
|
|
2588
|
-
ce({ type: "warning", title: "Помилка валідації", message: Object.entries(
|
|
2615
|
+
function K() {
|
|
2616
|
+
const A = O.value.validate();
|
|
2617
|
+
if (A) {
|
|
2618
|
+
ce({ type: "warning", title: "Помилка валідації", message: Object.entries(A).map(([j, C]) => `${j}: ${C}`).join(`
|
|
2589
2619
|
`) });
|
|
2590
2620
|
return;
|
|
2591
2621
|
}
|
|
2592
|
-
|
|
2622
|
+
w === "add" ? Array.isArray(t.value) ? t.value = [...t.value, $.value] : t.value = [$.value] : t.value = t.value.map((j, C) => C === V ? $.value : j), v.value = !1;
|
|
2593
2623
|
}
|
|
2594
|
-
function N(
|
|
2595
|
-
t.value = t.value.filter((j, C) => C !==
|
|
2624
|
+
function N(A) {
|
|
2625
|
+
t.value = t.value.filter((j, C) => C !== A);
|
|
2596
2626
|
}
|
|
2597
2627
|
function le() {
|
|
2598
2628
|
v.value = !1;
|
|
2599
2629
|
}
|
|
2600
|
-
return (
|
|
2601
|
-
l("div",
|
|
2602
|
-
l("div",
|
|
2603
|
-
|
|
2630
|
+
return (A, j) => (i(), d("div", es, [
|
|
2631
|
+
l("div", ts, [
|
|
2632
|
+
l("div", ls, [
|
|
2633
|
+
T(Ba, {
|
|
2604
2634
|
width: "14",
|
|
2605
2635
|
height: "14",
|
|
2606
2636
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
|
|
2607
2637
|
}),
|
|
2608
|
-
|
|
2638
|
+
ne(l("input", {
|
|
2609
2639
|
type: "text",
|
|
2610
2640
|
"onUpdate:modelValue": j[0] || (j[0] = (C) => n.value = C),
|
|
2611
2641
|
placeholder: "Пошук",
|
|
2612
2642
|
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"
|
|
2613
2643
|
}, null, 512), [
|
|
2614
|
-
[
|
|
2644
|
+
[me, n.value]
|
|
2615
2645
|
])
|
|
2616
2646
|
]),
|
|
2617
|
-
l("div",
|
|
2647
|
+
l("div", os, [
|
|
2618
2648
|
l("input", {
|
|
2619
2649
|
ref_key: "fileInput",
|
|
2620
2650
|
ref: p,
|
|
2621
|
-
onChange:
|
|
2651
|
+
onChange: z,
|
|
2622
2652
|
class: "hidden",
|
|
2623
2653
|
accept: ".json",
|
|
2624
2654
|
type: "file"
|
|
2625
2655
|
}, null, 544),
|
|
2626
|
-
l("div",
|
|
2627
|
-
l("div",
|
|
2628
|
-
l("div",
|
|
2656
|
+
l("div", ns, [
|
|
2657
|
+
l("div", as, [
|
|
2658
|
+
l("div", ss, [
|
|
2629
2659
|
l("button", {
|
|
2630
2660
|
onClick: q,
|
|
2631
2661
|
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"
|
|
2632
2662
|
}, [
|
|
2633
|
-
|
|
2663
|
+
T(za, {
|
|
2634
2664
|
height: "16",
|
|
2635
2665
|
width: "16"
|
|
2636
2666
|
})
|
|
@@ -2639,19 +2669,19 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2639
2669
|
])
|
|
2640
2670
|
])
|
|
2641
2671
|
]),
|
|
2642
|
-
(i(),
|
|
2672
|
+
(i(), ve(jt, { to: "body" }, [
|
|
2643
2673
|
c.value ? (i(), d("div", {
|
|
2644
2674
|
key: 0,
|
|
2645
2675
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2646
2676
|
style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: f.value.top + "px", left: f.value.left + "px" }])
|
|
2647
2677
|
}, [
|
|
2648
|
-
l("div",
|
|
2649
|
-
l("div",
|
|
2678
|
+
l("div", rs, [
|
|
2679
|
+
l("div", is, [
|
|
2650
2680
|
l("button", {
|
|
2651
|
-
onClick:
|
|
2681
|
+
onClick: H,
|
|
2652
2682
|
class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2653
2683
|
}, [
|
|
2654
|
-
|
|
2684
|
+
T(Oa, {
|
|
2655
2685
|
class: "text-black",
|
|
2656
2686
|
width: "14",
|
|
2657
2687
|
height: "14"
|
|
@@ -2659,11 +2689,11 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2659
2689
|
j[4] || (j[4] = ge(" Імпортувати ", -1))
|
|
2660
2690
|
]),
|
|
2661
2691
|
l("button", {
|
|
2662
|
-
onClick:
|
|
2692
|
+
onClick: P,
|
|
2663
2693
|
class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2664
2694
|
}, [
|
|
2665
|
-
l("span",
|
|
2666
|
-
|
|
2695
|
+
l("span", us, [
|
|
2696
|
+
T(Ra, {
|
|
2667
2697
|
class: "text-black",
|
|
2668
2698
|
width: "14",
|
|
2669
2699
|
height: "14"
|
|
@@ -2673,28 +2703,28 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2673
2703
|
])
|
|
2674
2704
|
])
|
|
2675
2705
|
])
|
|
2676
|
-
], 4)) :
|
|
2706
|
+
], 4)) : F("", !0)
|
|
2677
2707
|
])),
|
|
2678
2708
|
l("button", {
|
|
2679
2709
|
onClick: te,
|
|
2680
2710
|
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"
|
|
2681
2711
|
}, [
|
|
2682
|
-
|
|
2712
|
+
T(qe),
|
|
2683
2713
|
j[6] || (j[6] = ge(" Додати ", -1))
|
|
2684
2714
|
])
|
|
2685
2715
|
]),
|
|
2686
|
-
l("div",
|
|
2687
|
-
l("table",
|
|
2688
|
-
l("thead",
|
|
2689
|
-
l("tr",
|
|
2690
|
-
l("th",
|
|
2691
|
-
|
|
2716
|
+
l("div", ds, [
|
|
2717
|
+
l("table", cs, [
|
|
2718
|
+
l("thead", ps, [
|
|
2719
|
+
l("tr", fs, [
|
|
2720
|
+
l("th", ms, [
|
|
2721
|
+
T(Vt, {
|
|
2692
2722
|
width: "24",
|
|
2693
2723
|
height: "24",
|
|
2694
2724
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2695
2725
|
})
|
|
2696
2726
|
]),
|
|
2697
|
-
(i(!0), d(re, null, fe(
|
|
2727
|
+
(i(!0), d(re, null, fe(A.colModel, (C) => (i(), d("th", {
|
|
2698
2728
|
key: C.key,
|
|
2699
2729
|
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]"
|
|
2700
2730
|
}, G(C.ua || C.label), 1))), 128)),
|
|
@@ -2704,17 +2734,17 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2704
2734
|
l("tbody", {
|
|
2705
2735
|
class: E({ "[&_tr:last-child]:border-0": !u.value })
|
|
2706
2736
|
}, [
|
|
2707
|
-
s.value.length === 0 ? (i(), d("td",
|
|
2708
|
-
l("div",
|
|
2709
|
-
l("div",
|
|
2710
|
-
|
|
2737
|
+
s.value.length === 0 ? (i(), d("td", vs, [
|
|
2738
|
+
l("div", hs, [
|
|
2739
|
+
l("div", gs, [
|
|
2740
|
+
T(Za, { class: "w-48 mx-auto" }),
|
|
2711
2741
|
j[8] || (j[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
2712
2742
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
2713
2743
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
2714
2744
|
], -1))
|
|
2715
2745
|
])
|
|
2716
2746
|
])
|
|
2717
|
-
])) :
|
|
2747
|
+
])) : F("", !0),
|
|
2718
2748
|
(i(!0), d(re, null, fe(s.value, (C, W) => (i(), d("tr", {
|
|
2719
2749
|
key: C.id,
|
|
2720
2750
|
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", {
|
|
@@ -2726,86 +2756,86 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2726
2756
|
onDragover: ke((oe) => y(W), ["prevent"]),
|
|
2727
2757
|
onDrop: (oe) => S(W)
|
|
2728
2758
|
}, [
|
|
2729
|
-
l("td",
|
|
2730
|
-
l("div",
|
|
2731
|
-
|
|
2759
|
+
l("td", ys, [
|
|
2760
|
+
l("div", xs, [
|
|
2761
|
+
T(Vt, {
|
|
2732
2762
|
width: "24",
|
|
2733
2763
|
height: "24",
|
|
2734
2764
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2735
2765
|
})
|
|
2736
2766
|
])
|
|
2737
2767
|
]),
|
|
2738
|
-
(i(!0), d(re, null, fe(
|
|
2768
|
+
(i(!0), d(re, null, fe(A.colModel, (oe) => (i(), d("td", {
|
|
2739
2769
|
key: oe.key,
|
|
2740
2770
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2741
2771
|
}, [
|
|
2742
|
-
oe.type === "file" ? (i(), d("div",
|
|
2743
|
-
|
|
2772
|
+
oe.type === "file" ? (i(), d("div", ws, [
|
|
2773
|
+
Z(J(C, oe)) ? (i(), d("div", ks, [
|
|
2744
2774
|
l("img", {
|
|
2745
2775
|
src: J(C, oe),
|
|
2746
2776
|
alt: "alt",
|
|
2747
2777
|
width: "45",
|
|
2748
2778
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
2749
|
-
}, null, 8,
|
|
2750
|
-
])) : (i(), d("div",
|
|
2751
|
-
|
|
2779
|
+
}, null, 8, _s)
|
|
2780
|
+
])) : (i(), d("div", $s, [
|
|
2781
|
+
T(At, { class: "w-[25px] min-w-[25px] h-[25px]" })
|
|
2752
2782
|
]))
|
|
2753
2783
|
])) : oe.type === "tiptap-editor" ? (i(), d("div", {
|
|
2754
2784
|
key: 1,
|
|
2755
2785
|
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",
|
|
2756
2786
|
innerHTML: J(C, oe)
|
|
2757
|
-
}, null, 8,
|
|
2787
|
+
}, null, 8, Cs)) : (i(), d("div", Vs, G(J(C, oe)), 1))
|
|
2758
2788
|
]))), 128)),
|
|
2759
|
-
l("td",
|
|
2760
|
-
l("div",
|
|
2789
|
+
l("td", Ms, [
|
|
2790
|
+
l("div", Ls, [
|
|
2761
2791
|
l("button", {
|
|
2762
2792
|
onClick: (oe) => M(C, W),
|
|
2763
2793
|
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"
|
|
2764
2794
|
}, [
|
|
2765
|
-
|
|
2795
|
+
T(Qa, {
|
|
2766
2796
|
width: "24",
|
|
2767
2797
|
height: "24",
|
|
2768
2798
|
class: "w-3 h-3"
|
|
2769
2799
|
})
|
|
2770
|
-
], 8,
|
|
2800
|
+
], 8, Ss),
|
|
2771
2801
|
l("button", {
|
|
2772
2802
|
onClick: (oe) => N(W),
|
|
2773
2803
|
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"
|
|
2774
2804
|
}, [
|
|
2775
|
-
|
|
2805
|
+
T(et, {
|
|
2776
2806
|
width: "24",
|
|
2777
2807
|
height: "24",
|
|
2778
2808
|
class: "w-3 h-3"
|
|
2779
2809
|
})
|
|
2780
|
-
], 8,
|
|
2810
|
+
], 8, Bs)
|
|
2781
2811
|
])
|
|
2782
2812
|
])
|
|
2783
|
-
], 42,
|
|
2813
|
+
], 42, bs))), 128))
|
|
2784
2814
|
], 2)
|
|
2785
2815
|
])
|
|
2786
2816
|
]),
|
|
2787
|
-
|
|
2817
|
+
T(ee(Et), {
|
|
2788
2818
|
visible: v.value,
|
|
2789
2819
|
title: I.value,
|
|
2790
2820
|
size: "lg",
|
|
2791
2821
|
onClose: le
|
|
2792
2822
|
}, {
|
|
2793
2823
|
default: Ee(() => [
|
|
2794
|
-
|
|
2824
|
+
T(We, {
|
|
2795
2825
|
schema: e.colModel,
|
|
2796
2826
|
values: $.value,
|
|
2797
2827
|
"onUpdate:values": j[1] || (j[1] = (C) => $.value = C),
|
|
2798
|
-
form:
|
|
2799
|
-
"onUpdate:form": j[2] || (j[2] = (C) =>
|
|
2828
|
+
form: O.value,
|
|
2829
|
+
"onUpdate:form": j[2] || (j[2] = (C) => O.value = C)
|
|
2800
2830
|
}, null, 8, ["schema", "values", "form"]),
|
|
2801
|
-
l("div",
|
|
2831
|
+
l("div", js, [
|
|
2802
2832
|
l("button", {
|
|
2803
2833
|
type: "button",
|
|
2804
2834
|
onClick: j[3] || (j[3] = (C) => v.value = !1),
|
|
2805
2835
|
class: "vs-button 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-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
2806
2836
|
}, " Скасувати "),
|
|
2807
2837
|
l("button", {
|
|
2808
|
-
onClick:
|
|
2838
|
+
onClick: K,
|
|
2809
2839
|
type: "button",
|
|
2810
2840
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
|
|
2811
2841
|
}, " Зберегти ")
|
|
@@ -2815,7 +2845,7 @@ const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable
|
|
|
2815
2845
|
}, 8, ["visible", "title"])
|
|
2816
2846
|
]));
|
|
2817
2847
|
}
|
|
2818
|
-
}),
|
|
2848
|
+
}), Is = {
|
|
2819
2849
|
draw: {
|
|
2820
2850
|
toolbar: {
|
|
2821
2851
|
actions: {
|
|
@@ -2935,7 +2965,7 @@ function Ne(o) {
|
|
|
2935
2965
|
features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
|
|
2936
2966
|
} : o : null;
|
|
2937
2967
|
}
|
|
2938
|
-
function
|
|
2968
|
+
function zs(o) {
|
|
2939
2969
|
return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
|
|
2940
2970
|
type: "Feature",
|
|
2941
2971
|
geometry: Ne({
|
|
@@ -2949,7 +2979,7 @@ function js(o) {
|
|
|
2949
2979
|
properties: {}
|
|
2950
2980
|
} : null : null;
|
|
2951
2981
|
}
|
|
2952
|
-
const
|
|
2982
|
+
const As = {}, Ts = {
|
|
2953
2983
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2954
2984
|
viewBox: "0 0 24 24",
|
|
2955
2985
|
stroke: "currentColor",
|
|
@@ -2959,8 +2989,8 @@ const Es = {}, Is = {
|
|
|
2959
2989
|
"stroke-linejoin": "round",
|
|
2960
2990
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
2961
2991
|
};
|
|
2962
|
-
function
|
|
2963
|
-
return i(), d("svg",
|
|
2992
|
+
function Fs(o, e) {
|
|
2993
|
+
return i(), d("svg", Ts, e[0] || (e[0] = [
|
|
2964
2994
|
l("path", {
|
|
2965
2995
|
stroke: "none",
|
|
2966
2996
|
d: "M0 0h24v24H0z",
|
|
@@ -2970,7 +3000,7 @@ function zs(o, e) {
|
|
|
2970
3000
|
l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
|
|
2971
3001
|
]));
|
|
2972
3002
|
}
|
|
2973
|
-
const
|
|
3003
|
+
const Os = /* @__PURE__ */ X(As, [["render", Fs]]), Ds = {}, Us = {
|
|
2974
3004
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2975
3005
|
viewBox: "0 0 24 24",
|
|
2976
3006
|
fill: "none",
|
|
@@ -2980,8 +3010,8 @@ const As = /* @__PURE__ */ X(Es, [["render", zs]]), Ts = {}, Fs = {
|
|
|
2980
3010
|
"stroke-linejoin": "round",
|
|
2981
3011
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
2982
3012
|
};
|
|
2983
|
-
function
|
|
2984
|
-
return i(), d("svg",
|
|
3013
|
+
function Ps(o, e) {
|
|
3014
|
+
return i(), d("svg", Us, e[0] || (e[0] = [
|
|
2985
3015
|
l("path", {
|
|
2986
3016
|
stroke: "none",
|
|
2987
3017
|
d: "M0 0h24v24H0z",
|
|
@@ -2992,7 +3022,7 @@ function Os(o, e) {
|
|
|
2992
3022
|
l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
2993
3023
|
]));
|
|
2994
3024
|
}
|
|
2995
|
-
const
|
|
3025
|
+
const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
|
|
2996
3026
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2997
3027
|
viewBox: "0 0 24 24",
|
|
2998
3028
|
fill: "none",
|
|
@@ -3002,12 +3032,12 @@ const Ds = /* @__PURE__ */ X(Ts, [["render", Os]]), Us = {}, Ps = {
|
|
|
3002
3032
|
"stroke-linejoin": "round",
|
|
3003
3033
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
3004
3034
|
};
|
|
3005
|
-
function
|
|
3006
|
-
return i(), d("svg",
|
|
3035
|
+
function qs(o, e) {
|
|
3036
|
+
return i(), d("svg", Ns, e[0] || (e[0] = [
|
|
3007
3037
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
|
|
3008
3038
|
]));
|
|
3009
3039
|
}
|
|
3010
|
-
const
|
|
3040
|
+
const Ws = /* @__PURE__ */ X(Hs, [["render", qs]]), Gs = {}, Ks = {
|
|
3011
3041
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3012
3042
|
viewBox: "0 0 24 24",
|
|
3013
3043
|
fill: "none",
|
|
@@ -3017,12 +3047,12 @@ const Hs = /* @__PURE__ */ X(Us, [["render", Rs]]), Ns = {}, qs = {
|
|
|
3017
3047
|
"stroke-linejoin": "round",
|
|
3018
3048
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
3019
3049
|
};
|
|
3020
|
-
function
|
|
3021
|
-
return i(), d("svg",
|
|
3050
|
+
function Zs(o, e) {
|
|
3051
|
+
return i(), d("svg", Ks, e[0] || (e[0] = [
|
|
3022
3052
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
|
|
3023
3053
|
]));
|
|
3024
3054
|
}
|
|
3025
|
-
const
|
|
3055
|
+
const Js = /* @__PURE__ */ X(Gs, [["render", Zs]]), Ys = {}, Xs = {
|
|
3026
3056
|
version: "1.1",
|
|
3027
3057
|
viewBox: "0 0 14 14",
|
|
3028
3058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3030,8 +3060,8 @@ const Gs = /* @__PURE__ */ X(Ns, [["render", Ws]]), Zs = {}, Ks = {
|
|
|
3030
3060
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3031
3061
|
class: "fullscreen-icon"
|
|
3032
3062
|
};
|
|
3033
|
-
function
|
|
3034
|
-
return i(), d("svg",
|
|
3063
|
+
function Qs(o, e) {
|
|
3064
|
+
return i(), d("svg", Xs, e[0] || (e[0] = [
|
|
3035
3065
|
l("title", null, null, -1),
|
|
3036
3066
|
l("desc", null, null, -1),
|
|
3037
3067
|
l("defs", null, null, -1),
|
|
@@ -3060,10 +3090,10 @@ function Js(o, e) {
|
|
|
3060
3090
|
], -1)
|
|
3061
3091
|
]));
|
|
3062
3092
|
}
|
|
3063
|
-
const
|
|
3093
|
+
const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, lr = {
|
|
3064
3094
|
key: 0,
|
|
3065
3095
|
class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
|
|
3066
|
-
},
|
|
3096
|
+
}, or = ["onClick"], nr = { class: "relative flex-1 min-w-[140px]" }, ar = ["placeholder"], sr = "https://data.softpro.ua/api-user/gis-url-proxy", rr = "https://geo.rv.ua/api-user/dzk.api", ir = /* @__PURE__ */ U({
|
|
3067
3097
|
__name: "map-search",
|
|
3068
3098
|
props: {
|
|
3069
3099
|
config: {}
|
|
@@ -3071,13 +3101,13 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3071
3101
|
emits: ["goToCoordinates"],
|
|
3072
3102
|
setup(o, { emit: e }) {
|
|
3073
3103
|
const t = o, a = e, n = ["here", "xy", "parcel"], s = B(() => {
|
|
3074
|
-
const v = t.config?.tools?.filter((
|
|
3104
|
+
const v = t.config?.tools?.filter((w) => n.includes(w));
|
|
3075
3105
|
return v && v.length ? v : n;
|
|
3076
|
-
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u =
|
|
3106
|
+
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u = k(s.value[0] ?? n[0]);
|
|
3077
3107
|
ue(s, (v) => {
|
|
3078
3108
|
v.includes(u.value) || (u.value = v[0]);
|
|
3079
3109
|
});
|
|
3080
|
-
const c =
|
|
3110
|
+
const c = k(""), p = k(!1), f = k(null);
|
|
3081
3111
|
ue(u, () => {
|
|
3082
3112
|
c.value = "", p.value = !1;
|
|
3083
3113
|
});
|
|
@@ -3086,8 +3116,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3086
3116
|
}
|
|
3087
3117
|
function y(v) {
|
|
3088
3118
|
if (!p.value) return;
|
|
3089
|
-
const
|
|
3090
|
-
|
|
3119
|
+
const w = f.value;
|
|
3120
|
+
w && !w.contains(v.target) && (p.value = !1);
|
|
3091
3121
|
}
|
|
3092
3122
|
_e(() => {
|
|
3093
3123
|
window.addEventListener("click", y, !0);
|
|
@@ -3098,22 +3128,22 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3098
3128
|
return v === "xy" ? "Координати" : v === "parcel" ? "Кадастр" : "Адреси";
|
|
3099
3129
|
}
|
|
3100
3130
|
function q(v) {
|
|
3101
|
-
const
|
|
3102
|
-
if (!
|
|
3103
|
-
const V =
|
|
3131
|
+
const w = v.replace(/[,]+/g, " ").trim();
|
|
3132
|
+
if (!w) return null;
|
|
3133
|
+
const V = w.split(/\s+/).filter(Boolean);
|
|
3104
3134
|
if (V.length < 2) return null;
|
|
3105
3135
|
const $ = V.slice(0, 2).map(Number);
|
|
3106
3136
|
if (!$.every((le) => Number.isFinite(le))) return null;
|
|
3107
|
-
let [
|
|
3108
|
-
const
|
|
3109
|
-
if (!
|
|
3110
|
-
if (
|
|
3111
|
-
J = te, M =
|
|
3137
|
+
let [O, te] = $, J = O, M = te;
|
|
3138
|
+
const K = (le) => Math.abs(le) <= 90, N = (le) => Math.abs(le) <= 180;
|
|
3139
|
+
if (!K(J) || !N(M))
|
|
3140
|
+
if (K(M) && N(J))
|
|
3141
|
+
J = te, M = O;
|
|
3112
3142
|
else
|
|
3113
3143
|
return null;
|
|
3114
3144
|
return { lat: J, lng: M };
|
|
3115
3145
|
}
|
|
3116
|
-
function
|
|
3146
|
+
function H(v) {
|
|
3117
3147
|
return (v?.items || []).map((V, $) => ({
|
|
3118
3148
|
id: String(V?.id ?? $),
|
|
3119
3149
|
title: V?.title || V?.address?.label || "Знайдений обʼєкт",
|
|
@@ -3121,69 +3151,69 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3121
3151
|
lng: Number(V?.position?.lng)
|
|
3122
3152
|
})).filter((V) => Number.isFinite(V.lat) && Number.isFinite(V.lng));
|
|
3123
3153
|
}
|
|
3124
|
-
function
|
|
3125
|
-
const
|
|
3126
|
-
if (!
|
|
3127
|
-
const V =
|
|
3154
|
+
function Z(v) {
|
|
3155
|
+
const w = v?.result || v?.data || v;
|
|
3156
|
+
if (!w) return [];
|
|
3157
|
+
const V = w.geom_centroid;
|
|
3128
3158
|
if (!V || !Array.isArray(V.coordinates)) return [];
|
|
3129
|
-
const [$,
|
|
3130
|
-
return !Number.isFinite(
|
|
3159
|
+
const [$, O] = V.coordinates;
|
|
3160
|
+
return !Number.isFinite(O) || !Number.isFinite($) ? [] : [
|
|
3131
3161
|
{
|
|
3132
3162
|
id: "parcel",
|
|
3133
|
-
title:
|
|
3134
|
-
lat:
|
|
3163
|
+
title: w.cadnum || w.cad_num || "Земельна ділянка",
|
|
3164
|
+
lat: O,
|
|
3135
3165
|
lng: $
|
|
3136
3166
|
}
|
|
3137
3167
|
];
|
|
3138
3168
|
}
|
|
3139
|
-
function
|
|
3169
|
+
function z(v) {
|
|
3140
3170
|
const V = v.replace(/\s+/g, "").split(":");
|
|
3141
3171
|
if (V.length !== 4) return !1;
|
|
3142
3172
|
const $ = [10, 2, 3, 4];
|
|
3143
|
-
return V.every((
|
|
3173
|
+
return V.every((O, te) => O.length === $[te] && /^\d+$/.test(O));
|
|
3144
3174
|
}
|
|
3145
|
-
function
|
|
3175
|
+
function P(v) {
|
|
3146
3176
|
a("goToCoordinates", [v.lat, v.lng]);
|
|
3147
3177
|
}
|
|
3148
3178
|
async function I() {
|
|
3149
3179
|
const v = c.value.trim();
|
|
3150
3180
|
if (v) {
|
|
3151
3181
|
if (u.value === "xy") {
|
|
3152
|
-
const
|
|
3153
|
-
if (!
|
|
3182
|
+
const w = q(v);
|
|
3183
|
+
if (!w) {
|
|
3154
3184
|
ce({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
3155
3185
|
return;
|
|
3156
3186
|
}
|
|
3157
|
-
|
|
3187
|
+
P(w), c.value = "";
|
|
3158
3188
|
return;
|
|
3159
3189
|
}
|
|
3160
3190
|
try {
|
|
3161
|
-
const
|
|
3191
|
+
const w = new URL(u.value === "here" ? sr : rr);
|
|
3162
3192
|
if (u.value === "here")
|
|
3163
|
-
|
|
3193
|
+
w.searchParams.set("searchtext", v);
|
|
3164
3194
|
else {
|
|
3165
|
-
if (!
|
|
3195
|
+
if (!z(v)) {
|
|
3166
3196
|
ce({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
|
|
3167
3197
|
return;
|
|
3168
3198
|
}
|
|
3169
|
-
|
|
3199
|
+
w.searchParams.set("cad_num", v);
|
|
3170
3200
|
}
|
|
3171
|
-
const V = await fetch(
|
|
3201
|
+
const V = await fetch(w.toString());
|
|
3172
3202
|
if (!V.ok) throw new Error(`HTTP ${V.status}`);
|
|
3173
|
-
const $ = await V.json(),
|
|
3174
|
-
if (!
|
|
3203
|
+
const $ = await V.json(), O = u.value === "here" ? H($) : Z($);
|
|
3204
|
+
if (!O.length)
|
|
3175
3205
|
ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
|
|
3176
3206
|
else {
|
|
3177
|
-
const te =
|
|
3178
|
-
|
|
3207
|
+
const te = O[0];
|
|
3208
|
+
P(te), c.value = "";
|
|
3179
3209
|
}
|
|
3180
|
-
} catch (
|
|
3181
|
-
const V =
|
|
3210
|
+
} catch (w) {
|
|
3211
|
+
const V = w?.message || "Помилка пошуку";
|
|
3182
3212
|
ce({ type: "error", title: "Пошук", message: V });
|
|
3183
3213
|
}
|
|
3184
3214
|
}
|
|
3185
3215
|
}
|
|
3186
|
-
return (v,
|
|
3216
|
+
return (v, w) => (i(), d("div", tr, [
|
|
3187
3217
|
l("form", {
|
|
3188
3218
|
class: "flex gap-2",
|
|
3189
3219
|
onSubmit: ke(I, ["prevent"])
|
|
@@ -3197,7 +3227,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3197
3227
|
l("button", {
|
|
3198
3228
|
type: "button",
|
|
3199
3229
|
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",
|
|
3200
|
-
onClick:
|
|
3230
|
+
onClick: w[0] || (w[0] = (V) => p.value = !p.value)
|
|
3201
3231
|
}, [
|
|
3202
3232
|
l("span", null, G(S(u.value)), 1),
|
|
3203
3233
|
(i(), d("svg", {
|
|
@@ -3205,7 +3235,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3205
3235
|
viewBox: "0 0 24 24",
|
|
3206
3236
|
fill: "none",
|
|
3207
3237
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3208
|
-
},
|
|
3238
|
+
}, w[2] || (w[2] = [
|
|
3209
3239
|
l("path", {
|
|
3210
3240
|
d: "M6 9l6 6 6-6",
|
|
3211
3241
|
stroke: "currentColor",
|
|
@@ -3215,31 +3245,31 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3215
3245
|
}, null, -1)
|
|
3216
3246
|
]), 2))
|
|
3217
3247
|
]),
|
|
3218
|
-
p.value ? (i(), d("div",
|
|
3248
|
+
p.value ? (i(), d("div", lr, [
|
|
3219
3249
|
l("ul", null, [
|
|
3220
3250
|
(i(!0), d(re, null, fe(s.value, (V) => (i(), d("li", {
|
|
3221
3251
|
key: V,
|
|
3222
3252
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
3223
3253
|
onClick: ($) => m(V)
|
|
3224
|
-
}, G(S(V)), 9,
|
|
3254
|
+
}, G(S(V)), 9, or))), 128))
|
|
3225
3255
|
])
|
|
3226
|
-
])) :
|
|
3227
|
-
], 512)) :
|
|
3228
|
-
l("div",
|
|
3229
|
-
|
|
3230
|
-
"onUpdate:modelValue":
|
|
3256
|
+
])) : F("", !0)
|
|
3257
|
+
], 512)) : F("", !0),
|
|
3258
|
+
l("div", nr, [
|
|
3259
|
+
ne(l("input", {
|
|
3260
|
+
"onUpdate:modelValue": w[1] || (w[1] = (V) => c.value = V),
|
|
3231
3261
|
placeholder: r.value,
|
|
3232
3262
|
type: "text",
|
|
3233
3263
|
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"
|
|
3234
|
-
}, null, 8,
|
|
3264
|
+
}, null, 8, ar), [
|
|
3235
3265
|
[
|
|
3236
|
-
|
|
3266
|
+
me,
|
|
3237
3267
|
c.value,
|
|
3238
3268
|
void 0,
|
|
3239
3269
|
{ trim: !0 }
|
|
3240
3270
|
]
|
|
3241
3271
|
]),
|
|
3242
|
-
|
|
3272
|
+
w[3] || (w[3] = l("button", {
|
|
3243
3273
|
type: "submit",
|
|
3244
3274
|
class: "absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600",
|
|
3245
3275
|
"aria-label": "Пошук"
|
|
@@ -3263,19 +3293,19 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3263
3293
|
], 32)
|
|
3264
3294
|
]));
|
|
3265
3295
|
}
|
|
3266
|
-
}),
|
|
3296
|
+
}), ur = /* @__PURE__ */ X(ir, [["__scopeId", "data-v-3048520a"]]), dr = { class: "bg-white/30 p-1 rounded-md shadow" }, cr = { class: "flex gap-2" }, pr = ["onClick", "title"], fr = ["src"], mr = /* @__PURE__ */ U({
|
|
3267
3297
|
__name: "map-layers",
|
|
3268
3298
|
props: {
|
|
3269
3299
|
basemaps: {}
|
|
3270
3300
|
},
|
|
3271
3301
|
emits: ["onLayerChange"],
|
|
3272
3302
|
setup(o, { emit: e }) {
|
|
3273
|
-
const a =
|
|
3303
|
+
const a = k(Object.keys(o.basemaps)[0]), n = e;
|
|
3274
3304
|
function s(r) {
|
|
3275
3305
|
n("onLayerChange", r), a.value = r;
|
|
3276
3306
|
}
|
|
3277
|
-
return (r, u) => (i(), d("div",
|
|
3278
|
-
l("div",
|
|
3307
|
+
return (r, u) => (i(), d("div", dr, [
|
|
3308
|
+
l("div", cr, [
|
|
3279
3309
|
(i(!0), d(re, null, fe(r.basemaps, (c, p) => (i(), d("div", {
|
|
3280
3310
|
key: p,
|
|
3281
3311
|
class: E(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === p }]),
|
|
@@ -3288,24 +3318,24 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3288
3318
|
src: c.preview,
|
|
3289
3319
|
alt: "",
|
|
3290
3320
|
class: "w-10 h-10 object-cover"
|
|
3291
|
-
}, null, 8,
|
|
3292
|
-
], 10,
|
|
3321
|
+
}, null, 8, fr)
|
|
3322
|
+
], 10, pr))), 128))
|
|
3293
3323
|
])
|
|
3294
3324
|
]));
|
|
3295
3325
|
}
|
|
3296
|
-
}),
|
|
3326
|
+
}), vr = {
|
|
3297
3327
|
key: 0,
|
|
3298
3328
|
class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
|
|
3299
|
-
},
|
|
3329
|
+
}, hr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, gr = { class: "text-sm font-medium" }, br = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, yr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, xr = { class: "flex items-center gap-1" }, wr = ["disabled"], kr = { class: "absolute top-4 right-4 z-[1000]" }, _r = { class: "flex flex-col gap-[2px]" }, $r = ["aria-pressed"], Cr = ["aria-pressed"], Vr = ["aria-pressed"], Mr = ["aria-pressed"], Lr = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Sr = {
|
|
3300
3330
|
key: 0,
|
|
3301
3331
|
class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
|
|
3302
|
-
},
|
|
3332
|
+
}, Br = { class: "mr-auto" }, jr = { class: "font-bold" }, Er = { class: "flex items-center" }, Ir = { class: "text-xs mr-2" }, zr = {
|
|
3303
3333
|
key: 0,
|
|
3304
3334
|
class: "text-xs"
|
|
3305
|
-
},
|
|
3335
|
+
}, Ar = {
|
|
3306
3336
|
key: 1,
|
|
3307
3337
|
class: "text-xs"
|
|
3308
|
-
},
|
|
3338
|
+
}, Tr = /* @__PURE__ */ U({
|
|
3309
3339
|
__name: "vs-input-map",
|
|
3310
3340
|
props: {
|
|
3311
3341
|
tools: {},
|
|
@@ -3320,23 +3350,23 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3320
3350
|
},
|
|
3321
3351
|
emits: ["update:modelValue"],
|
|
3322
3352
|
setup(o, { emit: e }) {
|
|
3323
|
-
const t = Gt(), a = o, n = e, s =
|
|
3353
|
+
const t = Gt(), a = o, n = e, s = k(!1), r = k("");
|
|
3324
3354
|
function u() {
|
|
3325
|
-
const
|
|
3355
|
+
const b = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
3326
3356
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
|
|
3327
3357
|
}
|
|
3328
|
-
const c =
|
|
3358
|
+
const c = k(null);
|
|
3329
3359
|
let p, f, m, y = null;
|
|
3330
|
-
const S =
|
|
3331
|
-
|
|
3360
|
+
const S = k(null), q = (b) => {
|
|
3361
|
+
b.ctrlKey && b.preventDefault();
|
|
3332
3362
|
};
|
|
3333
|
-
function
|
|
3363
|
+
function H() {
|
|
3334
3364
|
if (!a.handleZoom) return null;
|
|
3335
|
-
let
|
|
3336
|
-
const _ = (
|
|
3337
|
-
const Q =
|
|
3365
|
+
let b;
|
|
3366
|
+
const _ = (D) => {
|
|
3367
|
+
const Q = D.ctrlKey || D.metaKey, he = D.shiftKey;
|
|
3338
3368
|
if (!Q && !he) {
|
|
3339
|
-
s.value = !0, r.value = u(), clearTimeout(
|
|
3369
|
+
s.value = !0, r.value = u(), clearTimeout(b), b = window.setTimeout(() => {
|
|
3340
3370
|
s.value = !1;
|
|
3341
3371
|
}, 1e3);
|
|
3342
3372
|
return;
|
|
@@ -3344,39 +3374,39 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3344
3374
|
s.value = !1, p.scrollWheelZoom.enable(), setTimeout(() => {
|
|
3345
3375
|
p.scrollWheelZoom.disable();
|
|
3346
3376
|
}, 100);
|
|
3347
|
-
}, Y = (
|
|
3348
|
-
if (
|
|
3349
|
-
s.value = !0, r.value = u(), clearTimeout(
|
|
3377
|
+
}, Y = (D) => {
|
|
3378
|
+
if (D.touches.length === 1) {
|
|
3379
|
+
s.value = !0, r.value = u(), clearTimeout(b), b = window.setTimeout(() => {
|
|
3350
3380
|
s.value = !1;
|
|
3351
3381
|
}, 3e3);
|
|
3352
3382
|
return;
|
|
3353
3383
|
}
|
|
3354
3384
|
s.value = !1;
|
|
3355
3385
|
};
|
|
3356
|
-
return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (
|
|
3357
|
-
const Q =
|
|
3358
|
-
!Q && !he && (
|
|
3386
|
+
return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (D) => {
|
|
3387
|
+
const Q = D.originalEvent.ctrlKey || D.originalEvent.metaKey, he = D.originalEvent.shiftKey;
|
|
3388
|
+
!Q && !he && (D.originalEvent.preventDefault(), D.originalEvent.stopPropagation());
|
|
3359
3389
|
}), () => {
|
|
3360
|
-
c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(
|
|
3390
|
+
c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(b);
|
|
3361
3391
|
};
|
|
3362
3392
|
}
|
|
3363
|
-
const
|
|
3393
|
+
const Z = k(null), z = k(6), P = k(0), I = k(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = k(null), w = De();
|
|
3364
3394
|
let V;
|
|
3365
|
-
const $ =
|
|
3366
|
-
function
|
|
3367
|
-
return
|
|
3395
|
+
const $ = k("topo100");
|
|
3396
|
+
function O(b) {
|
|
3397
|
+
return b ? b.type === "Polygon" ? {
|
|
3368
3398
|
type: "MultiPolygon",
|
|
3369
|
-
coordinates: [
|
|
3370
|
-
} : (
|
|
3399
|
+
coordinates: [b.coordinates]
|
|
3400
|
+
} : (b.type === "MultiPolygon", b) : null;
|
|
3371
3401
|
}
|
|
3372
3402
|
function te() {
|
|
3373
|
-
return new Promise((
|
|
3374
|
-
window.L && window.L.Draw &&
|
|
3403
|
+
return new Promise((b, _) => {
|
|
3404
|
+
window.L && window.L.Draw && b(0);
|
|
3375
3405
|
const Y = (Q) => {
|
|
3376
3406
|
if (Array.from(document.styleSheets).some((Be) => Be?.href?.includes(Q))) return;
|
|
3377
3407
|
const Ve = document.createElement("link");
|
|
3378
3408
|
Ve.rel = "stylesheet", Ve.href = Q, document.head.appendChild(Ve);
|
|
3379
|
-
},
|
|
3409
|
+
}, D = (Q) => new Promise((he, Ve) => {
|
|
3380
3410
|
const Be = Array.from(document.scripts).find((Ie) => Ie.src === Q);
|
|
3381
3411
|
if (Be) {
|
|
3382
3412
|
Be.addEventListener("load", () => he()), Be.addEventListener("error", (Ie) => Ve(Ie));
|
|
@@ -3385,11 +3415,11 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3385
3415
|
const Me = document.createElement("script");
|
|
3386
3416
|
Me.src = Q, Me.async = !0, Me.onload = () => he(), Me.onerror = (Ie) => Ve(Ie), document.body.appendChild(Me);
|
|
3387
3417
|
});
|
|
3388
|
-
Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),
|
|
3418
|
+
Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), D("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => D("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(_);
|
|
3389
3419
|
});
|
|
3390
3420
|
}
|
|
3391
3421
|
function J() {
|
|
3392
|
-
const
|
|
3422
|
+
const b = f.toGeoJSON(), _ = [], Y = (Q) => {
|
|
3393
3423
|
if (Q)
|
|
3394
3424
|
switch (Q.type) {
|
|
3395
3425
|
case "Polygon":
|
|
@@ -3403,72 +3433,72 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3403
3433
|
break;
|
|
3404
3434
|
}
|
|
3405
3435
|
};
|
|
3406
|
-
(
|
|
3407
|
-
const
|
|
3408
|
-
n("update:modelValue",
|
|
3436
|
+
(b?.features || []).forEach((Q) => Y(Q.geometry));
|
|
3437
|
+
const D = _.length ? { type: "MultiPolygon", coordinates: _ } : null;
|
|
3438
|
+
n("update:modelValue", D ? O(D) : null), P.value = f.getLayers().length;
|
|
3409
3439
|
}
|
|
3410
|
-
function M(
|
|
3440
|
+
function M(b = 30) {
|
|
3411
3441
|
const _ = f.getLayers();
|
|
3412
3442
|
if (!_.length) return;
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3443
|
+
const D = L.featureGroup(_).getBounds();
|
|
3444
|
+
D && D.isValid() && p.fitBounds(D, { padding: [b, b] });
|
|
3415
3445
|
}
|
|
3416
|
-
function
|
|
3446
|
+
function K() {
|
|
3417
3447
|
S.value?.click();
|
|
3418
3448
|
}
|
|
3419
|
-
const N =
|
|
3420
|
-
function le(
|
|
3421
|
-
return
|
|
3449
|
+
const N = k("");
|
|
3450
|
+
function le(b) {
|
|
3451
|
+
return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
|
|
3422
3452
|
}
|
|
3423
|
-
function
|
|
3424
|
-
if (
|
|
3425
|
-
const _ =
|
|
3453
|
+
function A(b) {
|
|
3454
|
+
if (b instanceof L.Circle) {
|
|
3455
|
+
const _ = b.getRadius();
|
|
3426
3456
|
return Math.PI * (_ * _) / 1e6;
|
|
3427
3457
|
}
|
|
3428
|
-
if (
|
|
3458
|
+
if (b instanceof L.Polygon || b instanceof L.Rectangle)
|
|
3429
3459
|
try {
|
|
3430
|
-
const _ =
|
|
3431
|
-
return
|
|
3460
|
+
const _ = b.getLatLngs(), Y = Array.isArray(_[0]) ? _[0] : _, D = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(Y) : 0;
|
|
3461
|
+
return D ? D / 1e6 : 0;
|
|
3432
3462
|
} catch {
|
|
3433
3463
|
return null;
|
|
3434
3464
|
}
|
|
3435
3465
|
return null;
|
|
3436
3466
|
}
|
|
3437
|
-
function j(
|
|
3438
|
-
return
|
|
3467
|
+
function j(b) {
|
|
3468
|
+
return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : p.getCenter();
|
|
3439
3469
|
}
|
|
3440
3470
|
function C() {
|
|
3441
|
-
const
|
|
3442
|
-
if (!
|
|
3443
|
-
v.value = null,
|
|
3471
|
+
const b = f.getLayers();
|
|
3472
|
+
if (!b.length) {
|
|
3473
|
+
v.value = null, P.value = 0;
|
|
3444
3474
|
return;
|
|
3445
3475
|
}
|
|
3446
|
-
const _ =
|
|
3476
|
+
const _ = b[b.length - 1], Y = le(_), D = j(_), Q = A(_);
|
|
3447
3477
|
v.value = {
|
|
3448
3478
|
type: Y,
|
|
3449
|
-
center:
|
|
3479
|
+
center: D,
|
|
3450
3480
|
areaKm2: Q,
|
|
3451
3481
|
layer: _
|
|
3452
|
-
},
|
|
3482
|
+
}, P.value = b.length;
|
|
3453
3483
|
}
|
|
3454
3484
|
function W() {
|
|
3455
|
-
const
|
|
3456
|
-
|
|
3485
|
+
const b = v.value?.layer;
|
|
3486
|
+
b && (b instanceof L.Circle && b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && p.setView(b.getLatLng(), Math.max(z.value, 14)));
|
|
3457
3487
|
}
|
|
3458
3488
|
function oe() {
|
|
3459
|
-
const
|
|
3460
|
-
|
|
3489
|
+
const b = v.value?.layer;
|
|
3490
|
+
b && (f.removeLayer(b), J(), C());
|
|
3461
3491
|
}
|
|
3462
3492
|
_e(async () => {
|
|
3463
|
-
document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal =
|
|
3464
|
-
const
|
|
3493
|
+
document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal = Is;
|
|
3494
|
+
const b = a.handleZoom;
|
|
3465
3495
|
p = L.map(c.value, {
|
|
3466
3496
|
zoomControl: !1,
|
|
3467
|
-
scrollWheelZoom: !
|
|
3497
|
+
scrollWheelZoom: !b
|
|
3468
3498
|
}).setView(I.value, 10), setTimeout(() => {
|
|
3469
|
-
y =
|
|
3470
|
-
}, 100), L.control.zoom({ position: "bottomright" }).addTo(p), $.value = Object.keys(
|
|
3471
|
-
const { layer: Q } =
|
|
3499
|
+
y = H();
|
|
3500
|
+
}, 100), L.control.zoom({ position: "bottomright" }).addTo(p), $.value = Object.keys(w)[0], V = L.tileLayer(w[$.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), f = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (D) => {
|
|
3501
|
+
const { layer: Q } = D;
|
|
3472
3502
|
f.clearLayers(), f.addLayer(Q), J(), C(), M(), N.value = "";
|
|
3473
3503
|
}), p.on(L.Draw.Event.EDITED, () => {
|
|
3474
3504
|
J(), C(), M();
|
|
@@ -3476,22 +3506,22 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3476
3506
|
J(), C(), M();
|
|
3477
3507
|
});
|
|
3478
3508
|
let _ = !1;
|
|
3479
|
-
p.on("mousemove", (
|
|
3480
|
-
_ || (p.invalidateSize(), _ = !0),
|
|
3509
|
+
p.on("mousemove", (D) => {
|
|
3510
|
+
_ || (p.invalidateSize(), _ = !0), Z.value = D.latlng;
|
|
3481
3511
|
}), p.on("zoomend", () => {
|
|
3482
|
-
|
|
3512
|
+
z.value = p.getZoom();
|
|
3483
3513
|
});
|
|
3484
|
-
const Y =
|
|
3514
|
+
const Y = zs(a.modelValue);
|
|
3485
3515
|
if (Y) {
|
|
3486
|
-
const
|
|
3487
|
-
L.geoJSON(Y).eachLayer((Q) =>
|
|
3516
|
+
const D = [];
|
|
3517
|
+
L.geoJSON(Y).eachLayer((Q) => D.push(Q)), D.length && f.addLayer(D[0]), J(), C(), M();
|
|
3488
3518
|
}
|
|
3489
3519
|
}), Xe(() => {
|
|
3490
3520
|
document.removeEventListener("wheel", q), y && y();
|
|
3491
3521
|
});
|
|
3492
|
-
function se(
|
|
3522
|
+
function se(b) {
|
|
3493
3523
|
if (p) {
|
|
3494
|
-
switch (m && m.disable(),
|
|
3524
|
+
switch (m && m.disable(), b) {
|
|
3495
3525
|
case "marker":
|
|
3496
3526
|
m = new L.Draw.Marker(p);
|
|
3497
3527
|
break;
|
|
@@ -3508,54 +3538,54 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3508
3538
|
m = new L.Draw.Rectangle(p);
|
|
3509
3539
|
break;
|
|
3510
3540
|
}
|
|
3511
|
-
m && (m.enable(), N.value =
|
|
3541
|
+
m && (m.enable(), N.value = b);
|
|
3512
3542
|
}
|
|
3513
3543
|
}
|
|
3514
3544
|
function Le() {
|
|
3515
|
-
const
|
|
3516
|
-
|
|
3545
|
+
const b = f.toGeoJSON(), _ = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), Y = URL.createObjectURL(_), D = document.createElement("a");
|
|
3546
|
+
D.href = Y, D.download = "data.geojson", D.click(), URL.revokeObjectURL(Y);
|
|
3517
3547
|
}
|
|
3518
|
-
function Oe(
|
|
3519
|
-
const _ =
|
|
3548
|
+
function Oe(b) {
|
|
3549
|
+
const _ = b.target, Y = _.files?.[0];
|
|
3520
3550
|
if (!Y) return;
|
|
3521
|
-
const
|
|
3522
|
-
|
|
3523
|
-
if (typeof
|
|
3551
|
+
const D = new FileReader();
|
|
3552
|
+
D.onload = () => {
|
|
3553
|
+
if (typeof D.result == "string")
|
|
3524
3554
|
try {
|
|
3525
|
-
const Q = JSON.parse(
|
|
3555
|
+
const Q = JSON.parse(D.result);
|
|
3526
3556
|
f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((he) => {
|
|
3527
3557
|
f.addLayer(he);
|
|
3528
3558
|
}), J(), C(), M();
|
|
3529
3559
|
} finally {
|
|
3530
3560
|
_.value = "";
|
|
3531
3561
|
}
|
|
3532
|
-
},
|
|
3562
|
+
}, D.readAsText(Y);
|
|
3533
3563
|
}
|
|
3534
|
-
function Ge(
|
|
3535
|
-
p && (V && p.removeLayer(V), V = L.tileLayer(
|
|
3564
|
+
function Ge(b) {
|
|
3565
|
+
p && (V && p.removeLayer(V), V = L.tileLayer(w[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), $.value = b);
|
|
3536
3566
|
}
|
|
3537
|
-
function tt(
|
|
3538
|
-
const _ = L.latLng(
|
|
3567
|
+
function tt(b) {
|
|
3568
|
+
const _ = L.latLng(b[0], b[1]);
|
|
3539
3569
|
p.setView(_, 13);
|
|
3540
3570
|
}
|
|
3541
3571
|
ue(
|
|
3542
3572
|
() => a.modelValue,
|
|
3543
|
-
(
|
|
3544
|
-
const _ =
|
|
3545
|
-
if (
|
|
3573
|
+
(b) => {
|
|
3574
|
+
const _ = O(b);
|
|
3575
|
+
if (b && _ !== b) {
|
|
3546
3576
|
n("update:modelValue", _);
|
|
3547
3577
|
return;
|
|
3548
3578
|
}
|
|
3549
3579
|
f.clearLayers(), _ && L.geoJSON({ type: "Feature", geometry: _ }).eachLayer((Y) => {
|
|
3550
|
-
f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (
|
|
3551
|
-
const he =
|
|
3580
|
+
f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (D) => {
|
|
3581
|
+
const he = D.target.getLatLng();
|
|
3552
3582
|
n("update:modelValue", { type: "Point", coordinates: [he.lng, he.lat] });
|
|
3553
3583
|
});
|
|
3554
|
-
}),
|
|
3584
|
+
}), P.value = f.getLayers().length, C(), M();
|
|
3555
3585
|
}
|
|
3556
3586
|
);
|
|
3557
3587
|
function De() {
|
|
3558
|
-
return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((
|
|
3588
|
+
return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, _) => Object.assign(b, { key: `b${_}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, _) => ({ ...b, [_.key]: _ }), {}) : {
|
|
3559
3589
|
topo100: {
|
|
3560
3590
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
|
|
3561
3591
|
preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
|
|
@@ -3570,12 +3600,12 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3570
3600
|
}
|
|
3571
3601
|
};
|
|
3572
3602
|
}
|
|
3573
|
-
const Ce =
|
|
3603
|
+
const Ce = k(!1);
|
|
3574
3604
|
return ue(Ce, () => {
|
|
3575
3605
|
setTimeout(() => {
|
|
3576
3606
|
p.invalidateSize();
|
|
3577
3607
|
}, 50);
|
|
3578
|
-
}), (
|
|
3608
|
+
}), (b, _) => (i(), d("div", {
|
|
3579
3609
|
class: E(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: Ce.value }])
|
|
3580
3610
|
}, [
|
|
3581
3611
|
l("div", {
|
|
@@ -3583,7 +3613,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3583
3613
|
ref: c,
|
|
3584
3614
|
class: "w-full h-full"
|
|
3585
3615
|
}, null, 512),
|
|
3586
|
-
|
|
3616
|
+
T(st, {
|
|
3587
3617
|
name: "zoom-instructions",
|
|
3588
3618
|
"enter-active-class": "transition-all duration-200 ease-out",
|
|
3589
3619
|
"leave-active-class": "transition-all duration-500 ease-in",
|
|
@@ -3593,29 +3623,29 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3593
3623
|
"leave-to-class": "opacity-0"
|
|
3594
3624
|
}, {
|
|
3595
3625
|
default: Ee(() => [
|
|
3596
|
-
s.value && a.handleZoom ? (i(), d("div",
|
|
3597
|
-
l("div",
|
|
3598
|
-
l("p",
|
|
3626
|
+
s.value && a.handleZoom ? (i(), d("div", vr, [
|
|
3627
|
+
l("div", hr, [
|
|
3628
|
+
l("p", gr, G(r.value), 1)
|
|
3599
3629
|
])
|
|
3600
|
-
])) :
|
|
3630
|
+
])) : F("", !0)
|
|
3601
3631
|
]),
|
|
3602
3632
|
_: 1
|
|
3603
3633
|
}),
|
|
3604
|
-
l("div",
|
|
3605
|
-
|
|
3606
|
-
l("div",
|
|
3607
|
-
l("div",
|
|
3634
|
+
l("div", br, [
|
|
3635
|
+
T(ur, { onGoToCoordinates: tt }),
|
|
3636
|
+
l("div", yr, [
|
|
3637
|
+
l("div", xr, [
|
|
3608
3638
|
l("button", {
|
|
3609
3639
|
type: "button",
|
|
3610
3640
|
class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition",
|
|
3611
|
-
onClick:
|
|
3641
|
+
onClick: K
|
|
3612
3642
|
}, "Import"),
|
|
3613
3643
|
l("button", {
|
|
3614
3644
|
type: "button",
|
|
3615
3645
|
class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-400",
|
|
3616
3646
|
onClick: Le,
|
|
3617
|
-
disabled:
|
|
3618
|
-
}, "Export", 8,
|
|
3647
|
+
disabled: P.value === 0
|
|
3648
|
+
}, "Export", 8, wr)
|
|
3619
3649
|
]),
|
|
3620
3650
|
l("input", {
|
|
3621
3651
|
ref_key: "importRef",
|
|
@@ -3627,8 +3657,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3627
3657
|
}, null, 544)
|
|
3628
3658
|
])
|
|
3629
3659
|
]),
|
|
3630
|
-
l("div",
|
|
3631
|
-
l("div",
|
|
3660
|
+
l("div", kr, [
|
|
3661
|
+
l("div", _r, [
|
|
3632
3662
|
l("button", {
|
|
3633
3663
|
class: E(["vs-btn", { "vs-active": N.value === "marker" }]),
|
|
3634
3664
|
"aria-pressed": N.value === "marker",
|
|
@@ -3636,8 +3666,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3636
3666
|
"aria-label": "Draw point",
|
|
3637
3667
|
onClick: _[0] || (_[0] = (Y) => se("marker"))
|
|
3638
3668
|
}, [
|
|
3639
|
-
|
|
3640
|
-
], 10,
|
|
3669
|
+
T(Os)
|
|
3670
|
+
], 10, $r),
|
|
3641
3671
|
l("button", {
|
|
3642
3672
|
class: E(["vs-btn", { "vs-active": N.value === "polyline" }]),
|
|
3643
3673
|
"aria-pressed": N.value === "polyline",
|
|
@@ -3645,8 +3675,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3645
3675
|
"aria-label": "Draw polyline",
|
|
3646
3676
|
onClick: _[1] || (_[1] = (Y) => se("polyline"))
|
|
3647
3677
|
}, [
|
|
3648
|
-
|
|
3649
|
-
], 10,
|
|
3678
|
+
T(Rs)
|
|
3679
|
+
], 10, Cr),
|
|
3650
3680
|
l("button", {
|
|
3651
3681
|
class: E(["vs-btn", { "vs-active": N.value === "polygon" }]),
|
|
3652
3682
|
"aria-pressed": N.value === "polygon",
|
|
@@ -3654,8 +3684,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3654
3684
|
"aria-label": "Draw polygon",
|
|
3655
3685
|
onClick: _[2] || (_[2] = (Y) => se("polygon"))
|
|
3656
3686
|
}, [
|
|
3657
|
-
|
|
3658
|
-
], 10,
|
|
3687
|
+
T(Ws)
|
|
3688
|
+
], 10, Vr),
|
|
3659
3689
|
l("button", {
|
|
3660
3690
|
class: E(["vs-btn", { "vs-active": N.value === "rectangle" }]),
|
|
3661
3691
|
"aria-pressed": N.value === "rectangle",
|
|
@@ -3663,8 +3693,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3663
3693
|
"aria-label": "Draw rectangle",
|
|
3664
3694
|
onClick: _[3] || (_[3] = (Y) => se("rectangle"))
|
|
3665
3695
|
}, [
|
|
3666
|
-
|
|
3667
|
-
], 10,
|
|
3696
|
+
T(Js)
|
|
3697
|
+
], 10, Mr),
|
|
3668
3698
|
l("button", {
|
|
3669
3699
|
class: "vs-btn mt-5",
|
|
3670
3700
|
onClick: _[4] || (_[4] = (Y) => {
|
|
@@ -3673,33 +3703,33 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3673
3703
|
title: "Full Screen",
|
|
3674
3704
|
"aria-label": "Full Screen"
|
|
3675
3705
|
}, [
|
|
3676
|
-
|
|
3706
|
+
T(er, { style: { width: "12px", height: "12px" } })
|
|
3677
3707
|
])
|
|
3678
3708
|
])
|
|
3679
3709
|
]),
|
|
3680
3710
|
l("div", {
|
|
3681
3711
|
class: E(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
|
|
3682
3712
|
}, [
|
|
3683
|
-
|
|
3684
|
-
basemaps: ee(
|
|
3713
|
+
T(mr, {
|
|
3714
|
+
basemaps: ee(w),
|
|
3685
3715
|
onOnLayerChange: Ge
|
|
3686
3716
|
}, null, 8, ["basemaps"])
|
|
3687
3717
|
], 2),
|
|
3688
|
-
l("div",
|
|
3689
|
-
v.value ? (i(), d("div",
|
|
3690
|
-
l("div",
|
|
3718
|
+
l("div", Lr, [
|
|
3719
|
+
v.value ? (i(), d("div", Sr, [
|
|
3720
|
+
l("div", Br, [
|
|
3691
3721
|
_[7] || (_[7] = ge(" Тип: ", -1)),
|
|
3692
|
-
l("span",
|
|
3722
|
+
l("span", jr, G(v.value.type), 1)
|
|
3693
3723
|
]),
|
|
3694
|
-
l("div",
|
|
3695
|
-
l("div",
|
|
3724
|
+
l("div", Er, [
|
|
3725
|
+
l("div", Ir, [
|
|
3696
3726
|
_[8] || (_[8] = ge(" Центр: ", -1)),
|
|
3697
3727
|
l("b", null, G(v.value.center.lat.toFixed(5)) + ", " + G(v.value.center.lng.toFixed(5)), 1)
|
|
3698
3728
|
]),
|
|
3699
|
-
v.value.areaKm2 !== null ? (i(), d("div",
|
|
3729
|
+
v.value.areaKm2 !== null ? (i(), d("div", zr, [
|
|
3700
3730
|
_[9] || (_[9] = ge(" Площа: ", -1)),
|
|
3701
3731
|
l("b", null, G(v.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3702
|
-
])) : (i(), d("div",
|
|
3732
|
+
])) : (i(), d("div", Ar, _[10] || (_[10] = [
|
|
3703
3733
|
ge(" Площа: ", -1),
|
|
3704
3734
|
l("b", null, "—", -1)
|
|
3705
3735
|
]))),
|
|
@@ -3715,17 +3745,17 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3715
3745
|
title: "Видалити",
|
|
3716
3746
|
onClick: _[6] || (_[6] = (Y) => oe())
|
|
3717
3747
|
}, [
|
|
3718
|
-
|
|
3748
|
+
T(et, { class: "w-3 h-3" })
|
|
3719
3749
|
])
|
|
3720
3750
|
])
|
|
3721
|
-
])) :
|
|
3751
|
+
])) : F("", !0)
|
|
3722
3752
|
])
|
|
3723
3753
|
], 2));
|
|
3724
3754
|
}
|
|
3725
|
-
}),
|
|
3755
|
+
}), Fr = /* @__PURE__ */ X(Tr, [["__scopeId", "data-v-66e4a27d"]]), Or = ["data-focus"], Dr = { class: "flex items-center" }, Ur = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Pr = ["onClick", "aria-label"], Rr = {
|
|
3726
3756
|
key: 0,
|
|
3727
3757
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3728
|
-
},
|
|
3758
|
+
}, Hr = { class: "flex-1 min-w-[2px]" }, Nr = ["placeholder"], qr = { class: "flex items-center shrink-0" }, Wr = ["disabled"], Gr = /* @__PURE__ */ U({
|
|
3729
3759
|
__name: "vs-input-tag",
|
|
3730
3760
|
props: /* @__PURE__ */ ie({
|
|
3731
3761
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3744,26 +3774,26 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3744
3774
|
setup(o, { emit: e }) {
|
|
3745
3775
|
const t = o, a = e;
|
|
3746
3776
|
$e(t.style);
|
|
3747
|
-
const n =
|
|
3777
|
+
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 () => {
|
|
3748
3778
|
S.value || await je(() => r.value?.focus());
|
|
3749
|
-
},
|
|
3779
|
+
}, H = (V) => {
|
|
3750
3780
|
const $ = V.trim();
|
|
3751
3781
|
$ !== "" && (!p.value || !Array.isArray(p.value) ? p.value = [$] : t.unique ? p.value.includes($) || (p.value = [...p.value, $]) : p.value = [...p.value, $], c.value = "");
|
|
3752
|
-
},
|
|
3782
|
+
}, Z = () => {
|
|
3753
3783
|
const V = c.value;
|
|
3754
|
-
V.trim() !== "" &&
|
|
3755
|
-
},
|
|
3784
|
+
V.trim() !== "" && H(V), c.value = "";
|
|
3785
|
+
}, z = (V) => {
|
|
3756
3786
|
const $ = p.value.slice();
|
|
3757
3787
|
$.splice(V, 1), a("update:modelValue", $);
|
|
3758
|
-
},
|
|
3788
|
+
}, P = () => {
|
|
3759
3789
|
a("update:modelValue", []);
|
|
3760
3790
|
}, I = () => {
|
|
3761
3791
|
S.value || (u.value = !0);
|
|
3762
3792
|
}, v = () => {
|
|
3763
3793
|
u.value = !1;
|
|
3764
|
-
},
|
|
3794
|
+
}, w = (V) => {
|
|
3765
3795
|
const { key: $ } = V;
|
|
3766
|
-
$ === "Enter" ? (V.preventDefault(),
|
|
3796
|
+
$ === "Enter" ? (V.preventDefault(), Z()) : $ === "Backspace" && c.value === "" && p.value.length > 0 && z(p.value.length - 1);
|
|
3767
3797
|
};
|
|
3768
3798
|
return (V, $) => (i(), d("div", {
|
|
3769
3799
|
class: "flex gap-1 w-full",
|
|
@@ -3792,18 +3822,18 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3792
3822
|
ref_key: "chipsRef",
|
|
3793
3823
|
ref: s
|
|
3794
3824
|
}, [
|
|
3795
|
-
(i(!0), d(re, null, fe(p.value, (
|
|
3825
|
+
(i(!0), d(re, null, fe(p.value, (O, te) => (i(), d("div", {
|
|
3796
3826
|
key: te,
|
|
3797
3827
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3798
3828
|
}, [
|
|
3799
|
-
l("div",
|
|
3800
|
-
l("div",
|
|
3829
|
+
l("div", Dr, [
|
|
3830
|
+
l("div", Ur, G(O), 1)
|
|
3801
3831
|
]),
|
|
3802
3832
|
l("div", {
|
|
3803
3833
|
role: "button",
|
|
3804
3834
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
3805
|
-
onClick: ke((J) =>
|
|
3806
|
-
"aria-label": `Remove ${
|
|
3835
|
+
onClick: ke((J) => z(te), ["stop"]),
|
|
3836
|
+
"aria-label": `Remove ${O}`
|
|
3807
3837
|
}, $[2] || ($[2] = [
|
|
3808
3838
|
l("svg", {
|
|
3809
3839
|
height: "14",
|
|
@@ -3815,11 +3845,11 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3815
3845
|
}, [
|
|
3816
3846
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
3817
3847
|
], -1)
|
|
3818
|
-
]), 8,
|
|
3848
|
+
]), 8, Pr)
|
|
3819
3849
|
]))), 128)),
|
|
3820
|
-
m.value ? (i(), d("div",
|
|
3821
|
-
l("div",
|
|
3822
|
-
S.value ?
|
|
3850
|
+
m.value ? (i(), d("div", Rr, G(f.value), 1)) : F("", !0),
|
|
3851
|
+
l("div", Hr, [
|
|
3852
|
+
S.value ? F("", !0) : ne((i(), d("input", {
|
|
3823
3853
|
key: 0,
|
|
3824
3854
|
ref_key: "inputRef",
|
|
3825
3855
|
ref: r,
|
|
@@ -3831,24 +3861,24 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3831
3861
|
type: "text",
|
|
3832
3862
|
tabindex: "0",
|
|
3833
3863
|
"aria-label": "Add tag",
|
|
3834
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
3864
|
+
"onUpdate:modelValue": $[0] || ($[0] = (O) => c.value = O),
|
|
3835
3865
|
onFocus: I,
|
|
3836
3866
|
onBlur: v,
|
|
3837
|
-
onKeydown:
|
|
3867
|
+
onKeydown: w,
|
|
3838
3868
|
placeholder: p.value && p.value.length ? "" : void 0
|
|
3839
|
-
}, null, 40,
|
|
3840
|
-
[
|
|
3869
|
+
}, null, 40, Nr)), [
|
|
3870
|
+
[me, c.value]
|
|
3841
3871
|
])
|
|
3842
3872
|
])
|
|
3843
3873
|
], 512),
|
|
3844
|
-
l("div",
|
|
3874
|
+
l("div", qr, [
|
|
3845
3875
|
y.value ? (i(), d("button", {
|
|
3846
3876
|
key: 0,
|
|
3847
3877
|
type: "button",
|
|
3848
3878
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
3849
3879
|
"aria-label": "Clear all tags",
|
|
3850
3880
|
disabled: S.value,
|
|
3851
|
-
onClick: ke(
|
|
3881
|
+
onClick: ke(P, ["stop"])
|
|
3852
3882
|
}, $[3] || ($[3] = [
|
|
3853
3883
|
l("svg", {
|
|
3854
3884
|
height: "20",
|
|
@@ -3858,13 +3888,13 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3858
3888
|
}, [
|
|
3859
3889
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
3860
3890
|
], -1)
|
|
3861
|
-
]), 8,
|
|
3891
|
+
]), 8, Wr)) : F("", !0)
|
|
3862
3892
|
])
|
|
3863
|
-
], 10,
|
|
3893
|
+
], 10, Or)
|
|
3864
3894
|
], 2)
|
|
3865
3895
|
], 512));
|
|
3866
3896
|
}
|
|
3867
|
-
}),
|
|
3897
|
+
}), Kr = { class: "relative flex gap-1 bg-white w-full" }, Zr = ["disabled", "placeholder"], Jr = /* @__PURE__ */ U({
|
|
3868
3898
|
__name: "vs-input-slug",
|
|
3869
3899
|
props: /* @__PURE__ */ ie({
|
|
3870
3900
|
disabled: { type: Boolean },
|
|
@@ -3923,15 +3953,15 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3923
3953
|
const r = e?.value?.[t.parent || ""]?.toString(), u = n(r);
|
|
3924
3954
|
a.value = u.toString();
|
|
3925
3955
|
};
|
|
3926
|
-
return (r, u) => (i(), d("div",
|
|
3927
|
-
|
|
3956
|
+
return (r, u) => (i(), d("div", Kr, [
|
|
3957
|
+
ne(l("input", {
|
|
3928
3958
|
ref: "vsText",
|
|
3929
3959
|
disabled: r.disabled,
|
|
3930
3960
|
placeholder: r.placeholder,
|
|
3931
3961
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
|
|
3932
3962
|
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"
|
|
3933
|
-
}, null, 8,
|
|
3934
|
-
[
|
|
3963
|
+
}, null, 8, Zr), [
|
|
3964
|
+
[me, a.value]
|
|
3935
3965
|
]),
|
|
3936
3966
|
l("button", {
|
|
3937
3967
|
class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
|
|
@@ -3939,13 +3969,13 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3939
3969
|
}, " Gen ")
|
|
3940
3970
|
]));
|
|
3941
3971
|
}
|
|
3942
|
-
}),
|
|
3972
|
+
}), Yr = /* @__PURE__ */ X(Jr, [["__scopeId", "data-v-b0eba370"]]), Xr = { class: "w-full" }, Qr = {
|
|
3943
3973
|
ref: "sortableContainer",
|
|
3944
3974
|
class: "flex flex-col gap-1"
|
|
3945
|
-
},
|
|
3975
|
+
}, ei = ["onDragstart", "onDrop"], ti = { class: "w-1/3" }, li = { class: "w-2/3" }, oi = ["onClick"], ni = {
|
|
3946
3976
|
key: 0,
|
|
3947
3977
|
class: "text-[14px] text-gray-700"
|
|
3948
|
-
},
|
|
3978
|
+
}, ai = { class: "mt-2 w-full flex items-center" }, si = ["disabled"], ri = /* @__PURE__ */ U({
|
|
3949
3979
|
__name: "vs-input-key-value",
|
|
3950
3980
|
props: {
|
|
3951
3981
|
parent: {},
|
|
@@ -3955,101 +3985,101 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
3955
3985
|
},
|
|
3956
3986
|
emits: ["update:modelValue"],
|
|
3957
3987
|
setup(o, { emit: e }) {
|
|
3958
|
-
const t = (
|
|
3988
|
+
const t = (Z) => `${Z}-${Math.random().toString(36).substring(2, 15)}`, a = Ae("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], c = k([]), p = k(null);
|
|
3959
3989
|
(() => {
|
|
3960
|
-
const
|
|
3961
|
-
c.value = Object.entries(
|
|
3990
|
+
const Z = n.parent && a?.value?.[n.parent] || n.modelValue || {};
|
|
3991
|
+
c.value = Object.entries(Z).filter(([z]) => !u.includes(z)).map(([z, P]) => ({
|
|
3962
3992
|
id: t("key-value-"),
|
|
3963
|
-
key:
|
|
3964
|
-
value:
|
|
3993
|
+
key: z,
|
|
3994
|
+
value: P
|
|
3965
3995
|
}));
|
|
3966
3996
|
})();
|
|
3967
|
-
function m(
|
|
3968
|
-
p.value =
|
|
3997
|
+
function m(Z) {
|
|
3998
|
+
p.value = Z;
|
|
3969
3999
|
}
|
|
3970
|
-
function y(
|
|
3971
|
-
if (p.value === null || p.value ===
|
|
3972
|
-
const
|
|
3973
|
-
c.value.splice(
|
|
4000
|
+
function y(Z) {
|
|
4001
|
+
if (p.value === null || p.value === Z) return;
|
|
4002
|
+
const z = c.value.splice(p.value, 1)[0];
|
|
4003
|
+
c.value.splice(Z, 0, z), p.value = null;
|
|
3974
4004
|
}
|
|
3975
4005
|
const S = B(
|
|
3976
|
-
() => c.value.some((
|
|
4006
|
+
() => c.value.some((Z) => Z.key && !Z.value || !Z.key && Z.value)
|
|
3977
4007
|
), q = () => {
|
|
3978
4008
|
c.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
3979
|
-
},
|
|
3980
|
-
c.value = c.value.filter((
|
|
4009
|
+
}, H = (Z) => {
|
|
4010
|
+
c.value = c.value.filter((z) => z.id !== Z);
|
|
3981
4011
|
};
|
|
3982
4012
|
return ue(
|
|
3983
4013
|
c,
|
|
3984
|
-
(
|
|
3985
|
-
const
|
|
3986
|
-
|
|
3987
|
-
I.key && I.value !== void 0 && (
|
|
4014
|
+
(Z) => {
|
|
4015
|
+
const z = {};
|
|
4016
|
+
Z.forEach((I) => {
|
|
4017
|
+
I.key && I.value !== void 0 && (z[I.key] = I.value);
|
|
3988
4018
|
});
|
|
3989
|
-
const
|
|
4019
|
+
const P = {};
|
|
3990
4020
|
u.length && u.forEach((I) => {
|
|
3991
|
-
|
|
4021
|
+
P[I] = n.parent ? a?.value?.[n.parent]?.[I] : void 0;
|
|
3992
4022
|
}), a?.value && n.parent && (a.value[n.parent] = {
|
|
3993
|
-
...
|
|
3994
|
-
...
|
|
3995
|
-
}), s("update:modelValue",
|
|
4023
|
+
...P,
|
|
4024
|
+
...z
|
|
4025
|
+
}), s("update:modelValue", z);
|
|
3996
4026
|
},
|
|
3997
4027
|
{ deep: !0 }
|
|
3998
|
-
), (
|
|
3999
|
-
l("div",
|
|
4000
|
-
(i(!0), d(re, null, fe(c.value, (
|
|
4001
|
-
key:
|
|
4028
|
+
), (Z, z) => (i(), d("div", Xr, [
|
|
4029
|
+
l("div", Qr, [
|
|
4030
|
+
(i(!0), d(re, null, fe(c.value, (P, I) => (i(), d("div", {
|
|
4031
|
+
key: P.id,
|
|
4002
4032
|
class: E(["flex items-center gap-2 w-full", { "opacity-50": p.value === I }]),
|
|
4003
4033
|
draggable: "true",
|
|
4004
4034
|
onDragstart: (v) => m(I),
|
|
4005
|
-
onDragover:
|
|
4035
|
+
onDragover: z[0] || (z[0] = ke(() => {
|
|
4006
4036
|
}, ["prevent"])),
|
|
4007
4037
|
onDrop: (v) => y(I)
|
|
4008
4038
|
}, [
|
|
4009
|
-
|
|
4010
|
-
l("div",
|
|
4011
|
-
|
|
4012
|
-
modelValue:
|
|
4013
|
-
"onUpdate:modelValue": (v) =>
|
|
4039
|
+
z[1] || (z[1] = ye('<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)),
|
|
4040
|
+
l("div", ti, [
|
|
4041
|
+
T(Ye, {
|
|
4042
|
+
modelValue: P.key,
|
|
4043
|
+
"onUpdate:modelValue": (v) => P.key = v,
|
|
4014
4044
|
placeholder: "Ключ"
|
|
4015
4045
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4016
4046
|
]),
|
|
4017
|
-
l("div",
|
|
4018
|
-
|
|
4019
|
-
modelValue:
|
|
4020
|
-
"onUpdate:modelValue": (v) =>
|
|
4047
|
+
l("div", li, [
|
|
4048
|
+
T(Ye, {
|
|
4049
|
+
modelValue: P.value,
|
|
4050
|
+
"onUpdate:modelValue": (v) => P.value = v,
|
|
4021
4051
|
placeholder: "Значення"
|
|
4022
4052
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4023
4053
|
]),
|
|
4024
4054
|
l("button", {
|
|
4025
|
-
onClick: (v) =>
|
|
4055
|
+
onClick: (v) => H(P.id),
|
|
4026
4056
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
4027
4057
|
}, [
|
|
4028
|
-
|
|
4058
|
+
T(ee(Wl), {
|
|
4029
4059
|
height: "16",
|
|
4030
4060
|
width: "16"
|
|
4031
4061
|
})
|
|
4032
|
-
], 8,
|
|
4033
|
-
], 42,
|
|
4062
|
+
], 8, oi)
|
|
4063
|
+
], 42, ei))), 128))
|
|
4034
4064
|
], 512),
|
|
4035
|
-
c.value.length ?
|
|
4036
|
-
l("div",
|
|
4065
|
+
c.value.length ? F("", !0) : (i(), d("span", ni, " Дані для відображення відсутні ")),
|
|
4066
|
+
l("div", ai, [
|
|
4037
4067
|
l("button", {
|
|
4038
4068
|
type: "button",
|
|
4039
4069
|
onClick: q,
|
|
4040
4070
|
disabled: S.value,
|
|
4041
4071
|
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"
|
|
4042
4072
|
}, [
|
|
4043
|
-
|
|
4073
|
+
T(qe, {
|
|
4044
4074
|
height: "14",
|
|
4045
4075
|
width: "14"
|
|
4046
4076
|
}),
|
|
4047
4077
|
ge(" " + G(ee(r)), 1)
|
|
4048
|
-
], 8,
|
|
4078
|
+
], 8, si)
|
|
4049
4079
|
])
|
|
4050
4080
|
]));
|
|
4051
4081
|
}
|
|
4052
|
-
}),
|
|
4082
|
+
}), ii = /* @__PURE__ */ X(ri, [["__scopeId", "data-v-a0f7fbfc"]]), ui = { class: "flex items-center gap-2 w-full" }, di = ["disabled"], ci = /* @__PURE__ */ U({
|
|
4053
4083
|
__name: "vs-input-color",
|
|
4054
4084
|
props: {
|
|
4055
4085
|
style: { default: () => ({}) },
|
|
@@ -4066,26 +4096,26 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4066
4096
|
get: () => t.modelValue || "#000000",
|
|
4067
4097
|
set: (r) => n("update:modelValue", r)
|
|
4068
4098
|
});
|
|
4069
|
-
return (r, u) => (i(), d("div",
|
|
4070
|
-
|
|
4099
|
+
return (r, u) => (i(), d("div", ui, [
|
|
4100
|
+
ne(l("input", {
|
|
4071
4101
|
type: "color",
|
|
4072
4102
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
|
|
4073
4103
|
disabled: r.disabled,
|
|
4074
4104
|
ref: "color",
|
|
4075
4105
|
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(" ")]),
|
|
4076
4106
|
style: { border: "1px solid #CFD9E0" }
|
|
4077
|
-
}, null, 10,
|
|
4078
|
-
[
|
|
4107
|
+
}, null, 10, di), [
|
|
4108
|
+
[me, s.value]
|
|
4079
4109
|
]),
|
|
4080
|
-
|
|
4110
|
+
ne(l("input", {
|
|
4081
4111
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
4082
4112
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4083
4113
|
}, null, 512), [
|
|
4084
|
-
[
|
|
4114
|
+
[me, s.value]
|
|
4085
4115
|
])
|
|
4086
4116
|
]));
|
|
4087
4117
|
}
|
|
4088
|
-
}),
|
|
4118
|
+
}), pi = { class: "flex items-center gap-2 w-full" }, fi = ["min", "max", "step", "disabled"], mi = /* @__PURE__ */ U({
|
|
4089
4119
|
__name: "vs-input-range",
|
|
4090
4120
|
props: {
|
|
4091
4121
|
style: { default: () => ({}) },
|
|
@@ -4105,8 +4135,8 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4105
4135
|
get: () => Number(t.modelValue ?? t.min),
|
|
4106
4136
|
set: (r) => n("update:modelValue", Number(r))
|
|
4107
4137
|
});
|
|
4108
|
-
return (r, u) => (i(), d("div",
|
|
4109
|
-
|
|
4138
|
+
return (r, u) => (i(), d("div", pi, [
|
|
4139
|
+
ne(l("input", {
|
|
4110
4140
|
type: "range",
|
|
4111
4141
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
|
|
4112
4142
|
min: r.min,
|
|
@@ -4115,19 +4145,19 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4115
4145
|
disabled: r.disabled,
|
|
4116
4146
|
ref: "range",
|
|
4117
4147
|
class: E(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")])
|
|
4118
|
-
}, null, 10,
|
|
4119
|
-
[
|
|
4148
|
+
}, null, 10, fi), [
|
|
4149
|
+
[me, s.value]
|
|
4120
4150
|
]),
|
|
4121
|
-
|
|
4151
|
+
ne(l("input", {
|
|
4122
4152
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
4123
4153
|
type: "number",
|
|
4124
4154
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4125
4155
|
}, null, 512), [
|
|
4126
|
-
[
|
|
4156
|
+
[me, s.value]
|
|
4127
4157
|
])
|
|
4128
4158
|
]));
|
|
4129
4159
|
}
|
|
4130
|
-
}),
|
|
4160
|
+
}), vi = ["type", "value", "onInput", "placeholder", "disabled"], hi = /* @__PURE__ */ U({
|
|
4131
4161
|
__name: "vs-input-array",
|
|
4132
4162
|
props: /* @__PURE__ */ ie({
|
|
4133
4163
|
count: { default: 1 },
|
|
@@ -4147,7 +4177,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4147
4177
|
emits: ["update:modelValue"],
|
|
4148
4178
|
setup(o) {
|
|
4149
4179
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
4150
|
-
|
|
4180
|
+
Kt(() => {
|
|
4151
4181
|
const s = a.value?.length ?? 0;
|
|
4152
4182
|
s < e.count && (a.value = [
|
|
4153
4183
|
...a.value ?? [],
|
|
@@ -4171,38 +4201,38 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4171
4201
|
style: {
|
|
4172
4202
|
border: "1px solid #CFD9E0"
|
|
4173
4203
|
}
|
|
4174
|
-
}, null, 42,
|
|
4204
|
+
}, null, 42, vi))), 256))
|
|
4175
4205
|
], 2));
|
|
4176
4206
|
}
|
|
4177
|
-
}),
|
|
4207
|
+
}), gi = {
|
|
4178
4208
|
VsInputText: Ye,
|
|
4179
|
-
VsInputRadio:
|
|
4209
|
+
VsInputRadio: wt,
|
|
4180
4210
|
"vs-input-text": Ye,
|
|
4181
4211
|
"vs-input-password": xl,
|
|
4182
|
-
"vs-input-textarea":
|
|
4212
|
+
"vs-input-textarea": Va,
|
|
4183
4213
|
"vs-input-mask": oo,
|
|
4184
4214
|
"vs-input-number": _l,
|
|
4185
|
-
"vs-input-radio":
|
|
4186
|
-
"vs-input-select":
|
|
4187
|
-
"vs-input-switcher":
|
|
4188
|
-
"vs-input-static":
|
|
4215
|
+
"vs-input-radio": wt,
|
|
4216
|
+
"vs-input-select": Ct,
|
|
4217
|
+
"vs-input-switcher": zt,
|
|
4218
|
+
"vs-input-static": xt,
|
|
4189
4219
|
"vs-input-container": na,
|
|
4190
4220
|
"vs-input-date": bo,
|
|
4191
4221
|
"vs-input-checkbox": ho,
|
|
4192
4222
|
"vs-input-file": ln,
|
|
4193
|
-
"vs-input-html":
|
|
4223
|
+
"vs-input-html": xt,
|
|
4194
4224
|
"vs-input-email": so,
|
|
4195
|
-
"vs-input-datatable":
|
|
4196
|
-
"vs-input-map":
|
|
4225
|
+
"vs-input-datatable": Es,
|
|
4226
|
+
"vs-input-map": Fr,
|
|
4197
4227
|
"vs-input-file-list": In,
|
|
4198
|
-
"vs-input-tags":
|
|
4199
|
-
"vs-input-slug":
|
|
4200
|
-
"vs-input-key-value":
|
|
4201
|
-
"vs-input-range":
|
|
4202
|
-
"vs-input-color":
|
|
4203
|
-
"vs-input-native-select":
|
|
4204
|
-
"vs-input-array":
|
|
4205
|
-
},
|
|
4228
|
+
"vs-input-tags": Gr,
|
|
4229
|
+
"vs-input-slug": Yr,
|
|
4230
|
+
"vs-input-key-value": ii,
|
|
4231
|
+
"vs-input-range": mi,
|
|
4232
|
+
"vs-input-color": ci,
|
|
4233
|
+
"vs-input-native-select": Ct,
|
|
4234
|
+
"vs-input-array": hi
|
|
4235
|
+
}, bi = /* @__PURE__ */ U({
|
|
4206
4236
|
__name: "behavior",
|
|
4207
4237
|
props: {
|
|
4208
4238
|
api: {},
|
|
@@ -4234,10 +4264,10 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4234
4264
|
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"
|
|
4235
4265
|
}, G(n.button), 1));
|
|
4236
4266
|
}
|
|
4237
|
-
}),
|
|
4267
|
+
}), yi = { class: "flex flex-col gap-1 w-full" }, xi = {
|
|
4238
4268
|
key: 0,
|
|
4239
4269
|
class: "text-sm text-gray-500"
|
|
4240
|
-
},
|
|
4270
|
+
}, Ot = /* @__PURE__ */ U({
|
|
4241
4271
|
__name: "vs-compact-form-layout",
|
|
4242
4272
|
props: /* @__PURE__ */ ie({
|
|
4243
4273
|
item: { default: {} },
|
|
@@ -4252,7 +4282,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4252
4282
|
}),
|
|
4253
4283
|
emits: ["update:modelValue"],
|
|
4254
4284
|
setup(o) {
|
|
4255
|
-
const e = o, t = de(o, "modelValue"), a = B(() => bl[`${e.layout}`]), n = B(() =>
|
|
4285
|
+
const e = o, t = de(o, "modelValue"), a = B(() => bl[`${e.layout}`]), n = B(() => gi?.[`vs-input-${e.item.type}`]), s = B(() => {
|
|
4256
4286
|
const u = ee(n);
|
|
4257
4287
|
if (!u) return /* @__PURE__ */ new Set();
|
|
4258
4288
|
const c = u.props ?? u.__vccOpts?.props;
|
|
@@ -4263,7 +4293,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4263
4293
|
const u = e.item ?? {}, c = s.value;
|
|
4264
4294
|
return c.size ? Object.fromEntries(Object.entries(u).filter(([p]) => c.has(p))) : {};
|
|
4265
4295
|
});
|
|
4266
|
-
return (u, c) =>
|
|
4296
|
+
return (u, c) => ne((i(), ve(Fe(a.value), {
|
|
4267
4297
|
ua: e.item.ua,
|
|
4268
4298
|
error: e.error || "",
|
|
4269
4299
|
item: u.item,
|
|
@@ -4274,14 +4304,14 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4274
4304
|
l("div", {
|
|
4275
4305
|
class: E(["flex w-full", `${e.item.type}-component`])
|
|
4276
4306
|
}, [
|
|
4277
|
-
l("div",
|
|
4278
|
-
(i(),
|
|
4307
|
+
l("div", yi, [
|
|
4308
|
+
(i(), ve(Fe(n.value), Te(r.value, {
|
|
4279
4309
|
modelValue: t.value,
|
|
4280
4310
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => t.value = p)
|
|
4281
4311
|
}), null, 16, ["modelValue"])),
|
|
4282
|
-
u.item.description && e.layout !== "settings" ? (i(), d("p",
|
|
4312
|
+
u.item.description && e.layout !== "settings" ? (i(), d("p", xi, G(u.item.description), 1)) : F("", !0)
|
|
4283
4313
|
]),
|
|
4284
|
-
u.item.behavior?.api && u.item.behavior?.button ? (i(),
|
|
4314
|
+
u.item.behavior?.api && u.item.behavior?.button ? (i(), ve(bi, Te({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : F("", !0)
|
|
4285
4315
|
], 2)
|
|
4286
4316
|
]),
|
|
4287
4317
|
_: 1
|
|
@@ -4289,7 +4319,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4289
4319
|
[Qe, !u.item.hidden]
|
|
4290
4320
|
]);
|
|
4291
4321
|
}
|
|
4292
|
-
}),
|
|
4322
|
+
}), wi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, ki = { class: "vs-compact-form-navigation__rail mt-[6px]" }, _i = ["onClick"], $i = /* @__PURE__ */ U({
|
|
4293
4323
|
__name: "vs-compact-form-navigation",
|
|
4294
4324
|
props: {
|
|
4295
4325
|
target: {},
|
|
@@ -4299,18 +4329,18 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4299
4329
|
width: { default: 400 }
|
|
4300
4330
|
},
|
|
4301
4331
|
setup(o, { expose: e }) {
|
|
4302
|
-
const t = o, a =
|
|
4332
|
+
const t = o, a = k([]), n = k(""), s = k(""), r = B(() => !!t.enabled), u = B(() => [
|
|
4303
4333
|
"vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
|
|
4304
4334
|
"sticky top-0 self-start shrink-0",
|
|
4305
4335
|
"max-h-full min-h-0 overflow-y-auto"
|
|
4306
4336
|
]), c = B(() => {
|
|
4307
4337
|
const M = t.width;
|
|
4308
4338
|
if (M == null) return {};
|
|
4309
|
-
const
|
|
4310
|
-
return { width:
|
|
4339
|
+
const K = typeof M == "number" ? `${M}px` : `${M}`;
|
|
4340
|
+
return { width: K, minWidth: K };
|
|
4311
4341
|
});
|
|
4312
4342
|
let p = null, f = 0, m = 0, y = null, S = null, q = null;
|
|
4313
|
-
const
|
|
4343
|
+
const H = () => te(), Z = () => P();
|
|
4314
4344
|
ue(
|
|
4315
4345
|
() => t.target,
|
|
4316
4346
|
async (M) => {
|
|
@@ -4318,7 +4348,7 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4318
4348
|
y = null, a.value = [], n.value = "";
|
|
4319
4349
|
return;
|
|
4320
4350
|
}
|
|
4321
|
-
y = M, r.value && (await je(),
|
|
4351
|
+
y = M, r.value && (await je(), w(M), P());
|
|
4322
4352
|
},
|
|
4323
4353
|
{ immediate: !0 }
|
|
4324
4354
|
), ue(
|
|
@@ -4328,26 +4358,26 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4328
4358
|
S = M ?? null;
|
|
4329
4359
|
return;
|
|
4330
4360
|
}
|
|
4331
|
-
|
|
4361
|
+
z(M ?? null), je(() => P());
|
|
4332
4362
|
},
|
|
4333
4363
|
{ immediate: !0 }
|
|
4334
4364
|
), _e(() => {
|
|
4335
|
-
t.scrollContainer ||
|
|
4365
|
+
t.scrollContainer || z(null), P();
|
|
4336
4366
|
}), at(() => {
|
|
4337
|
-
V(),
|
|
4367
|
+
V(), z(null, !0), y = null, typeof window < "u" && (f && window.cancelAnimationFrame(f), m && window.cancelAnimationFrame(m));
|
|
4338
4368
|
});
|
|
4339
|
-
function
|
|
4340
|
-
if (q && (q(), q = null),
|
|
4369
|
+
function z(M, K = !1) {
|
|
4370
|
+
if (q && (q(), q = null), K) {
|
|
4341
4371
|
S = null;
|
|
4342
4372
|
return;
|
|
4343
4373
|
}
|
|
4344
4374
|
if (S = M ?? null, typeof window > "u") return;
|
|
4345
4375
|
const N = M ?? window, le = window;
|
|
4346
|
-
N.addEventListener("scroll",
|
|
4347
|
-
N.removeEventListener("scroll",
|
|
4376
|
+
N.addEventListener("scroll", H, { passive: !0 }), le.addEventListener("resize", Z), q = () => {
|
|
4377
|
+
N.removeEventListener("scroll", H), le.removeEventListener("resize", Z);
|
|
4348
4378
|
};
|
|
4349
4379
|
}
|
|
4350
|
-
function
|
|
4380
|
+
function P() {
|
|
4351
4381
|
if (!r.value || !y) return;
|
|
4352
4382
|
f && typeof window < "u" && window.cancelAnimationFrame(f);
|
|
4353
4383
|
const M = () => {
|
|
@@ -4357,72 +4387,72 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4357
4387
|
}
|
|
4358
4388
|
function I() {
|
|
4359
4389
|
if (!r.value || !y) return;
|
|
4360
|
-
const M = Array.from(y.querySelectorAll("h1, h2")),
|
|
4361
|
-
M.forEach((le,
|
|
4390
|
+
const M = Array.from(y.querySelectorAll("h1, h2")), K = /* @__PURE__ */ new Set(), N = [];
|
|
4391
|
+
M.forEach((le, A) => {
|
|
4362
4392
|
const j = le.textContent?.trim() ?? "";
|
|
4363
4393
|
if (!j) return;
|
|
4364
4394
|
let C = (le.getAttribute("id") ?? "").trim();
|
|
4365
|
-
C || (C = v(j) || `heading-${
|
|
4395
|
+
C || (C = v(j) || `heading-${A + 1}`);
|
|
4366
4396
|
let W = C, oe = 1;
|
|
4367
|
-
for (;
|
|
4397
|
+
for (; K.has(W); )
|
|
4368
4398
|
W = `${C}-${oe += 1}`;
|
|
4369
|
-
le.id !== W && Object.assign(le, { id: W }),
|
|
4399
|
+
le.id !== W && Object.assign(le, { id: W }), K.add(W), N.push({
|
|
4370
4400
|
id: W,
|
|
4371
4401
|
text: j,
|
|
4372
4402
|
level: le.tagName.toLowerCase() === "h1" ? 1 : 2
|
|
4373
4403
|
});
|
|
4374
|
-
}), a.value = N, N.length || (n.value = ""),
|
|
4404
|
+
}), a.value = N, N.length || (n.value = ""), O();
|
|
4375
4405
|
}
|
|
4376
4406
|
function v(M) {
|
|
4377
4407
|
return M.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
|
|
4378
4408
|
}
|
|
4379
|
-
function
|
|
4380
|
-
!M || !r.value || typeof MutationObserver > "u" || (V(), p = new MutationObserver(() =>
|
|
4409
|
+
function w(M) {
|
|
4410
|
+
!M || !r.value || typeof MutationObserver > "u" || (V(), p = new MutationObserver(() => P()), p.observe(M, { childList: !0, subtree: !0 }));
|
|
4381
4411
|
}
|
|
4382
4412
|
function V() {
|
|
4383
4413
|
p && (p.disconnect(), p = null);
|
|
4384
4414
|
}
|
|
4385
4415
|
function $(M) {
|
|
4386
|
-
const
|
|
4387
|
-
if (!
|
|
4416
|
+
const K = S;
|
|
4417
|
+
if (!K)
|
|
4388
4418
|
return typeof window > "u" ? M.offsetTop : M.getBoundingClientRect().top + window.scrollY;
|
|
4389
|
-
const N = M.getBoundingClientRect(), le =
|
|
4390
|
-
return N.top - le.top +
|
|
4419
|
+
const N = M.getBoundingClientRect(), le = K.getBoundingClientRect();
|
|
4420
|
+
return N.top - le.top + K.scrollTop;
|
|
4391
4421
|
}
|
|
4392
|
-
function
|
|
4422
|
+
function O() {
|
|
4393
4423
|
if (!r.value || !a.value.length) return;
|
|
4394
|
-
const M = S,
|
|
4395
|
-
let
|
|
4424
|
+
const M = S, K = (M ? M.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), N = (M ? M.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), le = K + N;
|
|
4425
|
+
let A = null;
|
|
4396
4426
|
for (let C = 0; C < a.value.length; C += 1) {
|
|
4397
4427
|
const W = a.value[C], oe = document.getElementById(W.id);
|
|
4398
4428
|
if (oe) {
|
|
4399
4429
|
const se = $(oe);
|
|
4400
|
-
se + oe.offsetHeight >
|
|
4430
|
+
se + oe.offsetHeight > K && se < le && (A = W.id);
|
|
4401
4431
|
}
|
|
4402
4432
|
}
|
|
4403
|
-
!
|
|
4433
|
+
!A && s.value && (A = s.value), A && (s.value = A);
|
|
4404
4434
|
const j = M ? M.scrollHeight - M.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
|
|
4405
|
-
|
|
4435
|
+
K + 5 >= j && (A = a.value[a.value.length - 1].id), A && (n.value = A);
|
|
4406
4436
|
}
|
|
4407
4437
|
function te() {
|
|
4408
4438
|
r.value && (m && window.cancelAnimationFrame(m), m = window.requestAnimationFrame(() => {
|
|
4409
|
-
|
|
4439
|
+
O(), m = 0;
|
|
4410
4440
|
}));
|
|
4411
4441
|
}
|
|
4412
4442
|
function J(M) {
|
|
4413
4443
|
if (!r.value) return;
|
|
4414
|
-
const
|
|
4415
|
-
if (!
|
|
4416
|
-
const N = S, le = Math.max(0, $(
|
|
4444
|
+
const K = document.getElementById(M);
|
|
4445
|
+
if (!K) return;
|
|
4446
|
+
const N = S, le = Math.max(0, $(K));
|
|
4417
4447
|
N ? N.scrollTo({ top: le, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: le, behavior: "smooth" });
|
|
4418
4448
|
}
|
|
4419
|
-
return e({ refresh:
|
|
4449
|
+
return e({ refresh: P }), (M, K) => r.value && a.value.length ? (i(), d("div", {
|
|
4420
4450
|
key: 0,
|
|
4421
4451
|
class: E(u.value),
|
|
4422
4452
|
style: be(c.value)
|
|
4423
4453
|
}, [
|
|
4424
|
-
l("h2",
|
|
4425
|
-
l("div",
|
|
4454
|
+
l("h2", wi, G(M.title), 1),
|
|
4455
|
+
l("div", ki, [
|
|
4426
4456
|
(i(!0), d(re, null, fe(a.value, (N) => (i(), d("div", {
|
|
4427
4457
|
key: N.id,
|
|
4428
4458
|
class: E([
|
|
@@ -4441,34 +4471,34 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4441
4471
|
])
|
|
4442
4472
|
}, [
|
|
4443
4473
|
l("span", null, G(N.text), 1)
|
|
4444
|
-
], 10,
|
|
4474
|
+
], 10, _i)
|
|
4445
4475
|
], 2))), 128))
|
|
4446
4476
|
])
|
|
4447
|
-
], 6)) :
|
|
4477
|
+
], 6)) : F("", !0);
|
|
4448
4478
|
}
|
|
4449
|
-
}),
|
|
4479
|
+
}), Ci = /* @__PURE__ */ X($i, [["__scopeId", "data-v-1584a562"]]), Dt = {
|
|
4450
4480
|
required: "Це поле є обов’язковим",
|
|
4451
4481
|
email: "Неправильний email"
|
|
4452
|
-
},
|
|
4482
|
+
}, Vi = (o) => o ? !1 : Dt.required, Mi = (o) => {
|
|
4453
4483
|
const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
4454
|
-
return o ? e.test(o) ? !1 :
|
|
4455
|
-
},
|
|
4484
|
+
return o ? e.test(o) ? !1 : Dt.email : !1;
|
|
4485
|
+
}, Li = (o, e) => {
|
|
4456
4486
|
const t = e.pattern ?? e.regexp;
|
|
4457
4487
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
4458
|
-
},
|
|
4488
|
+
}, Si = (o, e) => !1, Bi = (o, e) => {
|
|
4459
4489
|
switch (typeof e == "string" ? e : e.type) {
|
|
4460
4490
|
case "required":
|
|
4461
|
-
return
|
|
4491
|
+
return Vi(o);
|
|
4462
4492
|
case "email":
|
|
4463
|
-
return
|
|
4493
|
+
return Mi(o);
|
|
4464
4494
|
case "regexp":
|
|
4465
|
-
return
|
|
4495
|
+
return Li(o, e);
|
|
4466
4496
|
case "custom":
|
|
4467
|
-
return
|
|
4497
|
+
return Si();
|
|
4468
4498
|
default:
|
|
4469
4499
|
return !1;
|
|
4470
4500
|
}
|
|
4471
|
-
},
|
|
4501
|
+
}, ji = {
|
|
4472
4502
|
autocomplete: "select",
|
|
4473
4503
|
combobox: "select",
|
|
4474
4504
|
datepicker: "date",
|
|
@@ -4481,16 +4511,16 @@ const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-wi
|
|
|
4481
4511
|
dropzone: "file"
|
|
4482
4512
|
// mask: 'text',
|
|
4483
4513
|
};
|
|
4484
|
-
function
|
|
4514
|
+
function Mt(o) {
|
|
4485
4515
|
const e = o.toLowerCase();
|
|
4486
|
-
return
|
|
4516
|
+
return ji[e] || e;
|
|
4487
4517
|
}
|
|
4488
|
-
function
|
|
4518
|
+
function Ei(o, e = !1) {
|
|
4489
4519
|
if (Array.isArray(o)) {
|
|
4490
4520
|
const a = [];
|
|
4491
4521
|
return o.forEach((n) => {
|
|
4492
4522
|
const s = { ...n };
|
|
4493
|
-
s.name = (n.name || n.id || n.key || "").toString(), s.type =
|
|
4523
|
+
s.name = (n.name || n.id || n.key || "").toString(), s.type = Mt(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, s.type === "email" && !s.rules && (s.rules = ["email"]), n.data && (s.api = `/api/suggest/${n.data}`), s.disabled = e || s.disabled, a.push(s);
|
|
4494
4524
|
}), a;
|
|
4495
4525
|
}
|
|
4496
4526
|
const t = [];
|
|
@@ -4498,7 +4528,7 @@ function Si(o, e = !1) {
|
|
|
4498
4528
|
const n = {
|
|
4499
4529
|
name: a[0],
|
|
4500
4530
|
...a[1],
|
|
4501
|
-
type:
|
|
4531
|
+
type: Mt(a[1].type),
|
|
4502
4532
|
label: a[1].label || a[1].ua,
|
|
4503
4533
|
rules: a[1].rules || a[1].validators,
|
|
4504
4534
|
disabled: e
|
|
@@ -4506,16 +4536,16 @@ function Si(o, e = !1) {
|
|
|
4506
4536
|
n.type === "email" && !n.rules && (n.rules = ["email"]), a[1].type.includes("list") && (n.multiple = !0), !n.api && a[1].data && (n.api = `/api/suggest/${a[1].data}`), t.push(n);
|
|
4507
4537
|
}), t;
|
|
4508
4538
|
}
|
|
4509
|
-
function
|
|
4510
|
-
const a = B(() =>
|
|
4539
|
+
function Ii(o, e, t = !1) {
|
|
4540
|
+
const a = B(() => Ei(
|
|
4511
4541
|
(Array.isArray(e), e),
|
|
4512
4542
|
typeof t == "boolean" ? t : t.value
|
|
4513
|
-
)), n =
|
|
4543
|
+
)), n = k({});
|
|
4514
4544
|
function s(p) {
|
|
4515
4545
|
const f = p?.conditions;
|
|
4516
4546
|
if (!f) return !0;
|
|
4517
4547
|
const m = Array.isArray(f) ? f[0] : f, y = o?.value?.[m];
|
|
4518
|
-
return
|
|
4548
|
+
return Ft(y, f);
|
|
4519
4549
|
}
|
|
4520
4550
|
const r = (p = a.value, f = !0) => (p.forEach((m) => {
|
|
4521
4551
|
if (m.rules) {
|
|
@@ -4525,8 +4555,8 @@ function Bi(o, e, t = !1) {
|
|
|
4525
4555
|
}
|
|
4526
4556
|
let y = !1, S = null;
|
|
4527
4557
|
m.rules.forEach((q) => {
|
|
4528
|
-
const
|
|
4529
|
-
|
|
4558
|
+
const H = Bi(o.value[m.name], q);
|
|
4559
|
+
H && (y = !0, !S && typeof H == "string" && (S = H));
|
|
4530
4560
|
}), y && S ? n.value[m.name] = S : delete n.value[m.name];
|
|
4531
4561
|
}
|
|
4532
4562
|
m.schema && r(m.schema, !1);
|
|
@@ -4540,7 +4570,7 @@ function Bi(o, e, t = !1) {
|
|
|
4540
4570
|
visibleSchema: u
|
|
4541
4571
|
};
|
|
4542
4572
|
}
|
|
4543
|
-
const
|
|
4573
|
+
const zi = { class: "flex w-full h-full min-h-0 gap-6" }, Ai = {
|
|
4544
4574
|
key: 0,
|
|
4545
4575
|
"data-orientation": "horizontal",
|
|
4546
4576
|
role: "none",
|
|
@@ -4570,7 +4600,7 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4570
4600
|
validate: c,
|
|
4571
4601
|
reset: p,
|
|
4572
4602
|
visibleSchema: f
|
|
4573
|
-
} =
|
|
4603
|
+
} = Ii(r, n.schema, Zt(n, "disabled")), m = k(null), y = k(null), S = B(() => n.navigation), q = B(() => n.navWidth), H = B(() => n.style?.columns), Z = Object.freeze({ container: 12, label: 3 }), z = B(() => n.columns ?? H.value ?? Z), P = B(() => n.columns != null || H.value != null), I = B(() => P.value ? "horizontal" : n.layout), v = (O) => O?.columns ? "horizontal" : I.value, w = (O) => O?.columns ?? z.value, V = () => {
|
|
4574
4604
|
a("update:modelValue", r.value), c(), a("handle-submit", r.value);
|
|
4575
4605
|
};
|
|
4576
4606
|
e({
|
|
@@ -4586,13 +4616,13 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4586
4616
|
formId: n.formId
|
|
4587
4617
|
};
|
|
4588
4618
|
});
|
|
4589
|
-
function $(
|
|
4590
|
-
if (
|
|
4591
|
-
if (typeof
|
|
4592
|
-
const J = Object.keys(
|
|
4593
|
-
return J.length !== M.length ? !1 : J.every((
|
|
4619
|
+
function $(O, te) {
|
|
4620
|
+
if (O === te) return !0;
|
|
4621
|
+
if (typeof O != "object" || typeof te != "object" || !O || !te) return !1;
|
|
4622
|
+
const J = Object.keys(O), M = Object.keys(te);
|
|
4623
|
+
return J.length !== M.length ? !1 : J.every((K) => O[K] === te[K]);
|
|
4594
4624
|
}
|
|
4595
|
-
return
|
|
4625
|
+
return yt("form", s), yt("values", r), (O, te) => (i(), d("div", zi, [
|
|
4596
4626
|
l("div", {
|
|
4597
4627
|
class: "flex-1 min-h-0 overflow-y-auto",
|
|
4598
4628
|
ref_key: "formScrollContainer",
|
|
@@ -4608,23 +4638,23 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4608
4638
|
key: J.name,
|
|
4609
4639
|
class: E(v(J) === "horizontal" ? "col-span-12" : `col-span-${J.col || 12}`)
|
|
4610
4640
|
}, [
|
|
4611
|
-
|
|
4612
|
-
style: be(
|
|
4641
|
+
T(Ot, {
|
|
4642
|
+
style: be(O.style),
|
|
4613
4643
|
item: J,
|
|
4614
4644
|
layout: v(J),
|
|
4615
|
-
columns:
|
|
4645
|
+
columns: w(J),
|
|
4616
4646
|
"model-value": r.value[J.name],
|
|
4617
|
-
"onUpdate:modelValue": (
|
|
4647
|
+
"onUpdate:modelValue": (K) => {
|
|
4618
4648
|
const N = r.value[J.name];
|
|
4619
|
-
$(N,
|
|
4649
|
+
$(N, K) || (r.value[J.name] = K);
|
|
4620
4650
|
},
|
|
4621
4651
|
error: ee(u)[J.name]
|
|
4622
4652
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
4623
|
-
v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div",
|
|
4653
|
+
v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div", Ai)) : F("", !0)
|
|
4624
4654
|
], 2))), 128))
|
|
4625
4655
|
], 34)
|
|
4626
4656
|
], 512),
|
|
4627
|
-
|
|
4657
|
+
T(Ci, {
|
|
4628
4658
|
target: m.value,
|
|
4629
4659
|
"scroll-container": y.value,
|
|
4630
4660
|
enabled: S.value,
|
|
@@ -4632,7 +4662,7 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4632
4662
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
4633
4663
|
]));
|
|
4634
4664
|
}
|
|
4635
|
-
}),
|
|
4665
|
+
}), Ti = { class: "relative" }, Fi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Oi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Di = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Ui = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Pi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Ri = /* @__PURE__ */ U({
|
|
4636
4666
|
__name: "modal-edit",
|
|
4637
4667
|
props: {
|
|
4638
4668
|
schema: {},
|
|
@@ -4643,7 +4673,7 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4643
4673
|
},
|
|
4644
4674
|
emits: ["close", "save", "edit"],
|
|
4645
4675
|
setup(o, { emit: e }) {
|
|
4646
|
-
const t = o, a = e, n =
|
|
4676
|
+
const t = o, a = e, n = k(t.schema), s = k(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = k({}), u = k(), c = k(t.mode);
|
|
4647
4677
|
async function p() {
|
|
4648
4678
|
const m = r.value.validate();
|
|
4649
4679
|
if (m) {
|
|
@@ -4728,11 +4758,11 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4728
4758
|
message: m.message || "Unexpected error"
|
|
4729
4759
|
}), console.error(m);
|
|
4730
4760
|
}
|
|
4731
|
-
}), (m, y) => (i(), d("div",
|
|
4732
|
-
l("div",
|
|
4733
|
-
l("div",
|
|
4734
|
-
l("div",
|
|
4735
|
-
l("h3",
|
|
4761
|
+
}), (m, y) => (i(), d("div", Ti, [
|
|
4762
|
+
l("div", Fi, [
|
|
4763
|
+
l("div", Oi, [
|
|
4764
|
+
l("div", Di, [
|
|
4765
|
+
l("h3", Ui, G(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4736
4766
|
l("button", {
|
|
4737
4767
|
onClick: f,
|
|
4738
4768
|
type: "button",
|
|
@@ -4756,15 +4786,15 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4756
4786
|
], -1)
|
|
4757
4787
|
]))
|
|
4758
4788
|
]),
|
|
4759
|
-
l("div",
|
|
4760
|
-
n.value ? (i(),
|
|
4789
|
+
l("div", Pi, [
|
|
4790
|
+
n.value ? (i(), ve(We, {
|
|
4761
4791
|
key: 0,
|
|
4762
4792
|
schema: n.value,
|
|
4763
4793
|
values: s.value,
|
|
4764
4794
|
"onUpdate:values": y[0] || (y[0] = (S) => s.value = S),
|
|
4765
4795
|
form: r.value,
|
|
4766
4796
|
"onUpdate:form": y[1] || (y[1] = (S) => r.value = S)
|
|
4767
|
-
}, null, 8, ["schema", "values", "form"])) :
|
|
4797
|
+
}, null, 8, ["schema", "values", "form"])) : F("", !0)
|
|
4768
4798
|
]),
|
|
4769
4799
|
l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
|
|
4770
4800
|
l("button", {
|
|
@@ -4782,14 +4812,14 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4782
4812
|
])
|
|
4783
4813
|
]));
|
|
4784
4814
|
}
|
|
4785
|
-
}),
|
|
4815
|
+
}), Lt = (o = { mode: "edit", schema: null }) => new Promise((e) => {
|
|
4786
4816
|
const { close: t } = Jt({
|
|
4787
4817
|
title: o.mode === "add" ? "Додати" : "Редагувати",
|
|
4788
4818
|
template: "",
|
|
4789
4819
|
visible: !0,
|
|
4790
4820
|
size: "medium",
|
|
4791
4821
|
closeClickBack: !0,
|
|
4792
|
-
content:
|
|
4822
|
+
content: Ri,
|
|
4793
4823
|
contentProps: {
|
|
4794
4824
|
...o,
|
|
4795
4825
|
onClose: () => {
|
|
@@ -4803,34 +4833,34 @@ const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
|
4803
4833
|
});
|
|
4804
4834
|
We.install = function(e) {
|
|
4805
4835
|
e.component("VForm", We), Object.assign(e.config.globalProperties, {
|
|
4806
|
-
$form:
|
|
4807
|
-
}), e.provide("form",
|
|
4836
|
+
$form: Lt
|
|
4837
|
+
}), e.provide("form", Lt), window.v3plugin || (window.v3plugin = {});
|
|
4808
4838
|
};
|
|
4809
4839
|
export {
|
|
4810
|
-
|
|
4840
|
+
Ri as ModalEdit,
|
|
4811
4841
|
We as VForm,
|
|
4812
|
-
|
|
4842
|
+
hi as VsInputArray,
|
|
4813
4843
|
ho as VsInputCheckbox,
|
|
4814
|
-
|
|
4844
|
+
ci as VsInputColor,
|
|
4815
4845
|
na as VsInputContainer,
|
|
4816
4846
|
bo as VsInputDate,
|
|
4817
4847
|
so as VsInputEmail,
|
|
4818
4848
|
ln as VsInputFile,
|
|
4819
4849
|
In as VsInputFileList,
|
|
4820
|
-
|
|
4850
|
+
ii as VsInputKeyValue,
|
|
4821
4851
|
oo as VsInputMask,
|
|
4822
4852
|
_l as VsInputNumber,
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4853
|
+
wt as VsInputRadio,
|
|
4854
|
+
mi as VsInputRange,
|
|
4855
|
+
Ct as VsInputSelect,
|
|
4856
|
+
Yr as VsInputSlug,
|
|
4857
|
+
xt as VsInputStatic,
|
|
4858
|
+
zt as VsInputSwitcher,
|
|
4859
|
+
Gr as VsInputTag,
|
|
4830
4860
|
Ye as VsInputText,
|
|
4831
|
-
|
|
4861
|
+
Va as VsInputTextarea,
|
|
4832
4862
|
We as default,
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4863
|
+
gi as inputs,
|
|
4864
|
+
Es as vsInputDatatable,
|
|
4865
|
+
Fr as vsInputMap
|
|
4836
4866
|
};
|