@opengis/form 0.0.64 → 0.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Xe, createElementBlock as
|
|
1
|
+
import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Xe, createElementBlock as u, openBlock as i, createCommentVNode as D, renderSlot as Me, createElementVNode as l, toDisplayString as K, mergeProps as Fe, computed as B, normalizeStyle as be, createTextVNode as he, normalizeProps as at, guardReactiveProps as st, normalizeClass as T, mergeModels as ie, useModel as de, withDirectives as ne, unref as le, vModelText as me, vModelCheckbox as Bt, createVNode as R, createBlock as ve, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as $e, onBeforeUnmount as rt, watch as ue, createStaticVNode as xe, vModelRadio as jt, Fragment as re, renderList as pe, reactive as Gt, vModelDynamic as qt, vShow as it, inject as Ae, resolveComponent as yt, Transition as ut, nextTick as je, Teleport as Et, getCurrentInstance as Kt, watchEffect as Wt, toRef as Zt, provide as xt } from "vue";
|
|
2
2
|
import { notify as ce, VsModal as It, modal as Jt } from "@opengis/core";
|
|
3
3
|
const Yt = { class: "w-full relative" }, Xt = {
|
|
4
4
|
key: 0,
|
|
@@ -31,15 +31,15 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
31
31
|
e.value = localStorage.locale, window.addEventListener("storage", t);
|
|
32
32
|
}), Xe(() => {
|
|
33
33
|
window.removeEventListener("resize", t);
|
|
34
|
-
}), (s, n) => (i(),
|
|
35
|
-
s.ua || s.label ? (i(),
|
|
34
|
+
}), (s, n) => (i(), u("div", Yt, [
|
|
35
|
+
s.ua || s.label ? (i(), u("div", Xt, [
|
|
36
36
|
l("span", Qt, K(s.item[e.value] || s.ua || s.label), 1),
|
|
37
|
-
s.item?.rules?.includes("required") ? (i(),
|
|
37
|
+
s.item?.rules?.includes("required") ? (i(), u("span", el, "*")) : D("", !0)
|
|
38
38
|
])) : D("", !0),
|
|
39
39
|
Me(s.$slots, "default", Fe(s.$attrs, {
|
|
40
40
|
class: { "opacity-60": s.item.disabled }
|
|
41
41
|
})),
|
|
42
|
-
s.error ? (i(),
|
|
42
|
+
s.error ? (i(), u("span", tl, K(s.error), 1)) : D("", !0)
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
45
|
}), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
|
|
@@ -64,38 +64,38 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
64
64
|
},
|
|
65
65
|
setup(o) {
|
|
66
66
|
const e = o, t = B(() => e.columns ?? { container: 12, label: 3 }), s = B(() => {
|
|
67
|
-
const { container:
|
|
68
|
-
return !
|
|
67
|
+
const { container: d, label: c } = t.value;
|
|
68
|
+
return !d || d <= 0 ? 0 : Math.min(Math.max(c ?? 0, 0), d) / d;
|
|
69
69
|
}), n = B(() => e.item?.type === "html" || s.value <= 0 ? !1 : !!(e.ua || e.label)), a = B(() => {
|
|
70
70
|
if (!n.value) return {};
|
|
71
|
-
const
|
|
72
|
-
return { flexBasis:
|
|
71
|
+
const d = `${s.value * 100}%`;
|
|
72
|
+
return { flexBasis: d, maxWidth: d };
|
|
73
73
|
}), r = B(() => {
|
|
74
|
-
const { container:
|
|
75
|
-
if (!
|
|
74
|
+
const { container: d, label: c } = t.value;
|
|
75
|
+
if (!d || d <= 0) return {};
|
|
76
76
|
if (e.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
|
|
77
77
|
if (!n.value) return { flexBasis: "100%", maxWidth: "100%" };
|
|
78
|
-
const f = Math.max(
|
|
78
|
+
const f = Math.max(d - Math.max(c ?? 0, 0), 0) / d;
|
|
79
79
|
if (!f) return {};
|
|
80
80
|
const p = `${f * 100}%`;
|
|
81
81
|
return { flexBasis: p, maxWidth: p };
|
|
82
82
|
});
|
|
83
|
-
return (
|
|
84
|
-
n.value ? (i(),
|
|
83
|
+
return (d, c) => (i(), u("div", ol, [
|
|
84
|
+
n.value ? (i(), u("span", {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "text-sm text-gray-900 font-medium flex shrink-0",
|
|
87
87
|
style: be(a.value)
|
|
88
88
|
}, [
|
|
89
|
-
he(K(
|
|
90
|
-
|
|
89
|
+
he(K(d.ua || d.label) + " ", 1),
|
|
90
|
+
d.item?.rules?.includes("required") && (d.ua || d.label) ? (i(), u("span", nl, "*")) : D("", !0)
|
|
91
91
|
], 4)) : D("", !0),
|
|
92
92
|
l("div", {
|
|
93
93
|
class: "flex-1 min-w-0",
|
|
94
94
|
style: be(r.value)
|
|
95
95
|
}, [
|
|
96
|
-
Me(
|
|
96
|
+
Me(d.$slots, "default", at(st(d.$attrs)))
|
|
97
97
|
], 4),
|
|
98
|
-
|
|
98
|
+
d.error ? (i(), u("span", al, K(d.error), 1)) : D("", !0)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
101
|
}), rl = { class: "w-full relative" }, il = {
|
|
@@ -116,9 +116,9 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
116
116
|
columns: {}
|
|
117
117
|
},
|
|
118
118
|
setup(o) {
|
|
119
|
-
return (e, t) => (i(),
|
|
119
|
+
return (e, t) => (i(), u("div", rl, [
|
|
120
120
|
Me(e.$slots, "default", at(st(e.$attrs))),
|
|
121
|
-
e.error ? (i(),
|
|
121
|
+
e.error ? (i(), u("span", il, K(e.error), 1)) : D("", !0)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
124
|
}), dl = { class: "flex-1 min-w-0" }, cl = {
|
|
@@ -150,8 +150,8 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
150
150
|
setup(o) {
|
|
151
151
|
const e = o, t = w("uk");
|
|
152
152
|
B(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
|
|
153
|
-
const s = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (
|
|
154
|
-
|
|
153
|
+
const s = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (d) => {
|
|
154
|
+
d.key === "locale" && (t.value = d.newValue ?? "uk");
|
|
155
155
|
};
|
|
156
156
|
return ye(() => {
|
|
157
157
|
try {
|
|
@@ -161,24 +161,24 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
161
161
|
window.addEventListener("storage", r);
|
|
162
162
|
}), Xe(() => {
|
|
163
163
|
window.removeEventListener("storage", r);
|
|
164
|
-
}), (
|
|
165
|
-
class: T(["w-full relative", { "opacity-60":
|
|
164
|
+
}), (d, c) => (i(), u("div", {
|
|
165
|
+
class: T(["w-full relative", { "opacity-60": d.item?.disabled }])
|
|
166
166
|
}, [
|
|
167
167
|
l("div", {
|
|
168
|
-
class: T(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(
|
|
168
|
+
class: T(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(d.item.type) ? "flex flex-col" : ""]])
|
|
169
169
|
}, [
|
|
170
170
|
l("div", dl, [
|
|
171
|
-
|
|
172
|
-
l("span", pl, K(
|
|
173
|
-
n.value ? (i(),
|
|
171
|
+
d.ua || d.label ? (i(), u("p", cl, [
|
|
172
|
+
l("span", pl, K(d.item[t.value] || d.ua || d.label), 1),
|
|
173
|
+
n.value ? (i(), u("span", fl, "*")) : D("", !0)
|
|
174
174
|
])) : D("", !0),
|
|
175
|
-
s.value ? (i(),
|
|
175
|
+
s.value ? (i(), u("p", vl, K(s.value), 1)) : D("", !0)
|
|
176
176
|
]),
|
|
177
177
|
l("div", ml, [
|
|
178
|
-
Me(
|
|
178
|
+
Me(d.$slots, "default", at(st(d.$attrs)))
|
|
179
179
|
])
|
|
180
180
|
], 2),
|
|
181
|
-
a.value ? (i(),
|
|
181
|
+
a.value ? (i(), u("p", hl, K(a.value), 1)) : D("", !0)
|
|
182
182
|
], 2));
|
|
183
183
|
}
|
|
184
184
|
}), bl = {
|
|
@@ -212,7 +212,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
|
|
|
212
212
|
emits: ["update:modelValue"],
|
|
213
213
|
setup(o) {
|
|
214
214
|
const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
|
|
215
|
-
return (n, a) => ne((i(),
|
|
215
|
+
return (n, a) => ne((i(), u("input", {
|
|
216
216
|
type: "password",
|
|
217
217
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
|
|
218
218
|
placeholder: n.placeholder,
|
|
@@ -242,7 +242,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
|
|
|
242
242
|
emits: ["update:modelValue"],
|
|
243
243
|
setup(o) {
|
|
244
244
|
const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
|
|
245
|
-
return (n, a) => ne((i(),
|
|
245
|
+
return (n, a) => ne((i(), u("input", {
|
|
246
246
|
type: "text",
|
|
247
247
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
|
|
248
248
|
placeholder: n.placeholder,
|
|
@@ -274,7 +274,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
|
|
|
274
274
|
emits: ["update:modelValue"],
|
|
275
275
|
setup(o) {
|
|
276
276
|
const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
|
|
277
|
-
return (n, a) => ne((i(),
|
|
277
|
+
return (n, a) => ne((i(), u("input", {
|
|
278
278
|
type: "number",
|
|
279
279
|
step: "any",
|
|
280
280
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
|
|
@@ -289,7 +289,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
|
|
|
289
289
|
[me, s.value]
|
|
290
290
|
]);
|
|
291
291
|
}
|
|
292
|
-
}),
|
|
292
|
+
}), X = (o, e) => {
|
|
293
293
|
const t = o.__vccOpts || o;
|
|
294
294
|
for (const [s, n] of e)
|
|
295
295
|
t[s] = n;
|
|
@@ -305,7 +305,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
|
|
|
305
305
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
306
306
|
};
|
|
307
307
|
function Vl(o, e) {
|
|
308
|
-
return i(),
|
|
308
|
+
return i(), u("svg", Cl, e[0] || (e[0] = [
|
|
309
309
|
l("path", {
|
|
310
310
|
stroke: "none",
|
|
311
311
|
d: "M0 0h24v24H0z",
|
|
@@ -314,7 +314,7 @@ function Vl(o, e) {
|
|
|
314
314
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
315
315
|
]));
|
|
316
316
|
}
|
|
317
|
-
const Ml = /* @__PURE__ */
|
|
317
|
+
const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-center gap-[4px]" }, Sl = ["value", "id", "disabled"], Bl = ["for"], jl = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, El = /* @__PURE__ */ G({
|
|
318
318
|
__name: "vs-checkbox-default",
|
|
319
319
|
props: {
|
|
320
320
|
value: { default: "" },
|
|
@@ -331,11 +331,11 @@ const Ml = /* @__PURE__ */ Y($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
331
331
|
get: () => s.modelValue,
|
|
332
332
|
set: (a) => t("update:modelValue", a)
|
|
333
333
|
});
|
|
334
|
-
return (a, r) => (i(),
|
|
334
|
+
return (a, r) => (i(), u("div", Ll, [
|
|
335
335
|
ne(l("input", {
|
|
336
336
|
type: "checkbox",
|
|
337
337
|
value: a.value,
|
|
338
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
338
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => n.value = d),
|
|
339
339
|
class: T(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
|
|
340
340
|
id: a.id,
|
|
341
341
|
disabled: a.disabled
|
|
@@ -381,39 +381,39 @@ const Ml = /* @__PURE__ */ Y($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
381
381
|
setup(o, { emit: e }) {
|
|
382
382
|
const t = o, s = e, n = B({
|
|
383
383
|
get: () => t.modelValue,
|
|
384
|
-
set: (
|
|
385
|
-
s("update:modelValue",
|
|
384
|
+
set: (d) => {
|
|
385
|
+
s("update:modelValue", d);
|
|
386
386
|
}
|
|
387
387
|
}), a = B(() => Array.isArray(n.value) ? n.value.includes(t.value) : n.value === !0 || n.value === t.value), r = B(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
|
|
388
|
-
return (
|
|
388
|
+
return (d, c) => (i(), u("label", {
|
|
389
389
|
class: T(["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, a.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
|
-
name:
|
|
395
|
-
value:
|
|
394
|
+
name: d.id,
|
|
395
|
+
value: d.value,
|
|
396
396
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => n.value = f),
|
|
397
|
-
disabled:
|
|
397
|
+
disabled: d.disabled
|
|
398
398
|
}, null, 8, Il), [
|
|
399
399
|
[Bt, n.value]
|
|
400
400
|
]),
|
|
401
401
|
l("span", zl, [
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
d.icon || d.imgUrl ? (i(), u("span", Al, [
|
|
403
|
+
d.icon ? (i(), u("i", {
|
|
404
404
|
key: 0,
|
|
405
|
-
class: T(
|
|
405
|
+
class: T(d.icon)
|
|
406
406
|
}, null, 2)) : D("", !0),
|
|
407
|
-
|
|
407
|
+
d.imgUrl ? (i(), u("img", {
|
|
408
408
|
key: 1,
|
|
409
|
-
src:
|
|
409
|
+
src: d.imgUrl,
|
|
410
410
|
width: "16",
|
|
411
411
|
height: "16",
|
|
412
412
|
alt: "icon"
|
|
413
413
|
}, null, 8, Tl)) : D("", !0)
|
|
414
414
|
])) : D("", !0),
|
|
415
|
-
Me(
|
|
416
|
-
he(K(
|
|
415
|
+
Me(d.$slots, "default", {}, () => [
|
|
416
|
+
he(K(d.label), 1)
|
|
417
417
|
])
|
|
418
418
|
])
|
|
419
419
|
], 2));
|
|
@@ -437,30 +437,30 @@ const Ml = /* @__PURE__ */ Y($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
437
437
|
setup(o, { emit: e }) {
|
|
438
438
|
const t = o, s = e, n = `radio-${Math.floor(Math.random() * 1e4)}`, a = B({
|
|
439
439
|
get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
|
|
440
|
-
set: (
|
|
440
|
+
set: (d) => {
|
|
441
441
|
if (Array.isArray(t.modelValue)) {
|
|
442
442
|
let c = [...t.modelValue];
|
|
443
|
-
|
|
443
|
+
d ? c.includes(t.value) || c.push(t.value) : c = c.filter((f) => f !== t.value), s("update:modelValue", c);
|
|
444
444
|
} else
|
|
445
|
-
s("update:modelValue",
|
|
445
|
+
s("update:modelValue", d);
|
|
446
446
|
}
|
|
447
447
|
}), r = w(`vs-checkbox-${t.view || "default"}`);
|
|
448
|
-
return (
|
|
448
|
+
return (d, c) => (i(), u("div", Ol, [
|
|
449
449
|
(i(), ve(Oe(r.value === "vs-checkbox-buttons" ? le(Fl) : le(El)), {
|
|
450
|
-
value:
|
|
451
|
-
label:
|
|
452
|
-
info:
|
|
453
|
-
disabled:
|
|
450
|
+
value: d.value,
|
|
451
|
+
label: d.label,
|
|
452
|
+
info: d.option?.info,
|
|
453
|
+
disabled: d.disabled,
|
|
454
454
|
modelValue: a.value,
|
|
455
455
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => a.value = f),
|
|
456
456
|
id: n,
|
|
457
|
-
icon:
|
|
458
|
-
imgUrl:
|
|
459
|
-
style: be(
|
|
460
|
-
error:
|
|
457
|
+
icon: d.icon,
|
|
458
|
+
imgUrl: d.imgUrl,
|
|
459
|
+
style: be(d.style),
|
|
460
|
+
error: d.error
|
|
461
461
|
}, {
|
|
462
462
|
default: Ee(() => [
|
|
463
|
-
he(K(
|
|
463
|
+
he(K(d.label), 1)
|
|
464
464
|
]),
|
|
465
465
|
_: 1
|
|
466
466
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
@@ -477,7 +477,7 @@ const Ml = /* @__PURE__ */ Y($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
477
477
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
478
478
|
};
|
|
479
479
|
function Rl(o, e) {
|
|
480
|
-
return i(),
|
|
480
|
+
return i(), u("svg", Dl, e[0] || (e[0] = [
|
|
481
481
|
l("path", {
|
|
482
482
|
stroke: "none",
|
|
483
483
|
d: "M0 0h24v24H0z",
|
|
@@ -486,7 +486,7 @@ function Rl(o, e) {
|
|
|
486
486
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
487
487
|
]));
|
|
488
488
|
}
|
|
489
|
-
const Pl = /* @__PURE__ */
|
|
489
|
+
const Pl = /* @__PURE__ */ X(Ul, [["render", Rl]]), Hl = {}, Nl = {
|
|
490
490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
491
491
|
viewBox: "0 0 24 24",
|
|
492
492
|
fill: "none",
|
|
@@ -497,7 +497,7 @@ const Pl = /* @__PURE__ */ Y(Ul, [["render", Rl]]), Hl = {}, Nl = {
|
|
|
497
497
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
498
498
|
};
|
|
499
499
|
function Gl(o, e) {
|
|
500
|
-
return i(),
|
|
500
|
+
return i(), u("svg", Nl, e[0] || (e[0] = [
|
|
501
501
|
l("path", {
|
|
502
502
|
stroke: "none",
|
|
503
503
|
d: "M0 0h24v24H0z",
|
|
@@ -507,7 +507,7 @@ function Gl(o, e) {
|
|
|
507
507
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
508
508
|
]));
|
|
509
509
|
}
|
|
510
|
-
const ql = /* @__PURE__ */
|
|
510
|
+
const ql = /* @__PURE__ */ X(Hl, [["render", Gl]]), Kl = {}, Wl = {
|
|
511
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
512
|
width: "24",
|
|
513
513
|
height: "24",
|
|
@@ -519,7 +519,7 @@ const ql = /* @__PURE__ */ Y(Hl, [["render", Gl]]), Kl = {}, Wl = {
|
|
|
519
519
|
"stroke-linejoin": "round"
|
|
520
520
|
};
|
|
521
521
|
function Zl(o, e) {
|
|
522
|
-
return i(),
|
|
522
|
+
return i(), u("svg", Wl, e[0] || (e[0] = [
|
|
523
523
|
l("path", {
|
|
524
524
|
stroke: "none",
|
|
525
525
|
d: "M0 0h24v24H0z",
|
|
@@ -530,7 +530,7 @@ function Zl(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__ */
|
|
533
|
+
const Jl = /* @__PURE__ */ X(Kl, [["render", Zl]]), Yl = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "flex items-start gap-x-1"
|
|
536
536
|
}, Xl = {
|
|
@@ -558,15 +558,15 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
558
558
|
emits: ["update:modelValue"],
|
|
559
559
|
setup(o) {
|
|
560
560
|
const e = o, t = de(o, "modelValue");
|
|
561
|
-
return (s, n) => e.view === "checkbox" ? (i(),
|
|
561
|
+
return (s, n) => e.view === "checkbox" ? (i(), u("div", Yl, [
|
|
562
562
|
R(ot, {
|
|
563
563
|
modelValue: t.value,
|
|
564
564
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
|
|
565
565
|
label: s.text,
|
|
566
566
|
error: s.error || ""
|
|
567
567
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
568
|
-
s.rules?.includes("required") ? (i(),
|
|
569
|
-
s.i ? (i(),
|
|
568
|
+
s.rules?.includes("required") ? (i(), u("span", Xl, "*")) : D("", !0),
|
|
569
|
+
s.i ? (i(), u("button", {
|
|
570
570
|
key: 1,
|
|
571
571
|
class: "cursor-pointer",
|
|
572
572
|
title: s.i,
|
|
@@ -575,7 +575,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
575
575
|
}, [
|
|
576
576
|
R(le(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
577
577
|
], 8, Ql)) : D("", !0)
|
|
578
|
-
])) : (i(),
|
|
578
|
+
])) : (i(), u("button", {
|
|
579
579
|
key: 1,
|
|
580
580
|
type: "button",
|
|
581
581
|
class: T(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${s.style?.primaryColor || "blue"}-500` : "bg-stone-200", s.customClass]]),
|
|
@@ -602,7 +602,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
602
602
|
placeholder: {}
|
|
603
603
|
},
|
|
604
604
|
setup(o) {
|
|
605
|
-
return (e, t) => (i(),
|
|
605
|
+
return (e, t) => (i(), u("div", {
|
|
606
606
|
id: e.name,
|
|
607
607
|
class: T(["text-gray-900", e.customClass]),
|
|
608
608
|
innerHTML: e.html ? e.html : e.text
|
|
@@ -658,7 +658,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
658
658
|
});
|
|
659
659
|
}), ue(s, (r) => {
|
|
660
660
|
a && a.unmaskedValue !== r && (a.value = r || "");
|
|
661
|
-
}), (r,
|
|
661
|
+
}), (r, d) => (i(), u("input", {
|
|
662
662
|
type: "text",
|
|
663
663
|
ref_key: "inputEl",
|
|
664
664
|
ref: n,
|
|
@@ -688,7 +688,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
688
688
|
emits: ["update:modelValue"],
|
|
689
689
|
setup(o) {
|
|
690
690
|
const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
|
|
691
|
-
return (n, a) => (i(),
|
|
691
|
+
return (n, a) => (i(), u("div", no, [
|
|
692
692
|
a[1] || (a[1] = xe('<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",
|
|
@@ -723,7 +723,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
723
723
|
emits: ["update:modelValue"],
|
|
724
724
|
setup(o) {
|
|
725
725
|
const e = de(o, "modelValue");
|
|
726
|
-
return (t, s) => (i(),
|
|
726
|
+
return (t, s) => (i(), u("label", {
|
|
727
727
|
class: T(["flex items-center gap-0", [t.customClass]])
|
|
728
728
|
}, [
|
|
729
729
|
ne(l("input", {
|
|
@@ -741,7 +741,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
741
741
|
t.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
742
742
|
]])
|
|
743
743
|
}, [
|
|
744
|
-
e.value == t.value ? (i(),
|
|
744
|
+
e.value == t.value ? (i(), u("span", {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: T(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
747
747
|
}, null, 2)) : D("", !0)
|
|
@@ -768,7 +768,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
768
768
|
emits: ["update:modelValue"],
|
|
769
769
|
setup(o) {
|
|
770
770
|
const e = de(o, "modelValue");
|
|
771
|
-
return (t, s) => (i(),
|
|
771
|
+
return (t, s) => (i(), u("label", {
|
|
772
772
|
class: T(["flex items-center border rounded-lg px-2 py-1", [
|
|
773
773
|
e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
|
|
774
774
|
t.customClass
|
|
@@ -809,16 +809,16 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
809
809
|
emits: ["update:modelValue"],
|
|
810
810
|
setup(o) {
|
|
811
811
|
const e = o, t = de(o, "modelValue"), s = B(() => vo[`vs-input-radio-${e.view}`]);
|
|
812
|
-
return (n, a) => (i(),
|
|
812
|
+
return (n, a) => (i(), u("div", {
|
|
813
813
|
class: T([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
814
814
|
}, [
|
|
815
|
-
(i(!0),
|
|
815
|
+
(i(!0), u(re, null, pe(n.options, (r) => (i(), ve(Oe(s.value), Fe({
|
|
816
816
|
key: r?.id,
|
|
817
817
|
text: r.text,
|
|
818
818
|
value: r.id.toString(),
|
|
819
819
|
checked: t.value === r.id,
|
|
820
820
|
modelValue: t.value,
|
|
821
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
821
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => t.value = d)
|
|
822
822
|
}, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
823
823
|
], 2));
|
|
824
824
|
}
|
|
@@ -849,7 +849,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
849
849
|
},
|
|
850
850
|
emits: ["update:modelValue"],
|
|
851
851
|
setup(o, { emit: e }) {
|
|
852
|
-
const t = o, s = e, n = w([]), a = Gt({}), r = (m) => m?.value || m?.id || m?.text || m,
|
|
852
|
+
const t = o, s = e, n = w([]), a = Gt({}), r = (m) => m?.value || m?.id || m?.text || m, d = (m) => m.text || String(m), c = (m) => `lg:col-span-${m || 12}`, f = B(() => [
|
|
853
853
|
t.position === "vertical" ? "flex flex-col" : "",
|
|
854
854
|
t.colSpan ? "grid" : "flex justify-start"
|
|
855
855
|
]), p = (m) => m == null || m === "" ? null : typeof m == "string" || typeof m == "number" ? m : String(m), v = B(() => {
|
|
@@ -949,22 +949,22 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
949
949
|
}
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
|
-
}), (m, I) => t.group ? (i(),
|
|
953
|
-
(i(!0),
|
|
952
|
+
}), (m, I) => t.group ? (i(), u("div", mo, [
|
|
953
|
+
(i(!0), u(re, null, pe(v.value, ($) => (i(), u("div", {
|
|
954
954
|
key: $.key,
|
|
955
955
|
class: "flex flex-col gap-2"
|
|
956
956
|
}, [
|
|
957
|
-
$.label ? (i(),
|
|
957
|
+
$.label ? (i(), u("span", ho, K($.label), 1)) : D("", !0),
|
|
958
958
|
l("div", {
|
|
959
959
|
class: T(["p-0 w-full gap-[12px]", f.value])
|
|
960
960
|
}, [
|
|
961
|
-
(i(!0),
|
|
961
|
+
(i(!0), u(re, null, pe($.options, (A) => (i(), ve(ot, {
|
|
962
962
|
modelValue: a[r(A)],
|
|
963
963
|
"onUpdate:modelValue": (E) => a[r(A)] = E,
|
|
964
964
|
value: r(A),
|
|
965
965
|
class: T(c(m.colSpan)),
|
|
966
966
|
disabled: A.disabled,
|
|
967
|
-
label:
|
|
967
|
+
label: d(A),
|
|
968
968
|
key: `${$.key}-${r(A)}`,
|
|
969
969
|
icon: A?.icon,
|
|
970
970
|
imgUrl: A?.imgUrl,
|
|
@@ -973,17 +973,17 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
973
973
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
974
974
|
], 2)
|
|
975
975
|
]))), 128))
|
|
976
|
-
])) : (i(),
|
|
976
|
+
])) : (i(), u("div", {
|
|
977
977
|
key: 0,
|
|
978
978
|
class: T(["p-0 w-full gap-[10px]", f.value])
|
|
979
979
|
}, [
|
|
980
|
-
(i(!0),
|
|
980
|
+
(i(!0), u(re, null, pe(n.value, ($) => (i(), ve(ot, {
|
|
981
981
|
modelValue: a[r($)],
|
|
982
982
|
"onUpdate:modelValue": (A) => a[r($)] = A,
|
|
983
983
|
value: r($),
|
|
984
984
|
class: T(c(m.colSpan)),
|
|
985
985
|
disabled: $.disabled,
|
|
986
|
-
label:
|
|
986
|
+
label: d($),
|
|
987
987
|
key: r($),
|
|
988
988
|
icon: $?.icon,
|
|
989
989
|
imgUrl: $?.imgUrl,
|
|
@@ -992,7 +992,7 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
992
992
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
993
993
|
], 2));
|
|
994
994
|
}
|
|
995
|
-
}), yo = /* @__PURE__ */
|
|
995
|
+
}), yo = /* @__PURE__ */ X(bo, [["__scopeId", "data-v-58e06c8a"]]), xo = ["type", "placeholder", "disabled"], wo = /* @__PURE__ */ G({
|
|
996
996
|
__name: "vs-input-date1",
|
|
997
997
|
props: {
|
|
998
998
|
style: { default: () => ({}) },
|
|
@@ -1013,9 +1013,9 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
1013
1013
|
const { inputClass: n } = Ce(t.style), a = e, r = B({
|
|
1014
1014
|
get: () => s(t.modelValue),
|
|
1015
1015
|
set: (c) => a("update:modelValue", c)
|
|
1016
|
-
}),
|
|
1017
|
-
return (c, f) => ne((i(),
|
|
1018
|
-
type:
|
|
1016
|
+
}), d = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
|
|
1017
|
+
return (c, f) => ne((i(), u("input", {
|
|
1018
|
+
type: d.value,
|
|
1019
1019
|
"onUpdate:modelValue": f[0] || (f[0] = (p) => r.value = p),
|
|
1020
1020
|
placeholder: c.placeholder,
|
|
1021
1021
|
disabled: c.disabled,
|
|
@@ -1071,12 +1071,12 @@ const Jl = /* @__PURE__ */ Y(Kl, [["render", Zl]]), Yl = {
|
|
|
1071
1071
|
"stroke-linejoin": "round"
|
|
1072
1072
|
};
|
|
1073
1073
|
function Co(o, e) {
|
|
1074
|
-
return i(),
|
|
1074
|
+
return i(), u("svg", $o, e[0] || (e[0] = [
|
|
1075
1075
|
l("path", { d: "M5 12h14" }, null, -1),
|
|
1076
1076
|
l("path", { d: "M12 5v14" }, null, -1)
|
|
1077
1077
|
]));
|
|
1078
1078
|
}
|
|
1079
|
-
const Ge = /* @__PURE__ */
|
|
1079
|
+
const Ge = /* @__PURE__ */ X(_o, [["render", Co]]), Vo = {}, Mo = {
|
|
1080
1080
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1081
1081
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
1082
1082
|
width: "44",
|
|
@@ -1089,11 +1089,11 @@ const Ge = /* @__PURE__ */ Y(_o, [["render", Co]]), Vo = {}, Mo = {
|
|
|
1089
1089
|
"stroke-linejoin": "round"
|
|
1090
1090
|
};
|
|
1091
1091
|
function Lo(o, e, t, s, n, a) {
|
|
1092
|
-
return i(),
|
|
1092
|
+
return i(), u("svg", Mo, e[0] || (e[0] = [
|
|
1093
1093
|
xe('<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><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
|
|
1094
1094
|
]));
|
|
1095
1095
|
}
|
|
1096
|
-
const So = /* @__PURE__ */
|
|
1096
|
+
const So = /* @__PURE__ */ X(Vo, [["render", Lo]]), Bo = {}, jo = {
|
|
1097
1097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1098
1098
|
class: "icon icon-tabler icon-tabler-table",
|
|
1099
1099
|
width: "44",
|
|
@@ -1106,7 +1106,7 @@ const So = /* @__PURE__ */ Y(Vo, [["render", Lo]]), Bo = {}, jo = {
|
|
|
1106
1106
|
"stroke-linejoin": "round"
|
|
1107
1107
|
};
|
|
1108
1108
|
function Eo(o, e, t, s, n, a) {
|
|
1109
|
-
return i(),
|
|
1109
|
+
return i(), u("svg", jo, e[0] || (e[0] = [
|
|
1110
1110
|
l("path", {
|
|
1111
1111
|
stroke: "none",
|
|
1112
1112
|
d: "M0 0h24v24H0z",
|
|
@@ -1133,7 +1133,7 @@ function Eo(o, e, t, s, n, a) {
|
|
|
1133
1133
|
}, null, -1)
|
|
1134
1134
|
]));
|
|
1135
1135
|
}
|
|
1136
|
-
const Io = /* @__PURE__ */
|
|
1136
|
+
const Io = /* @__PURE__ */ X(Bo, [["render", Eo]]), zo = {}, Ao = {
|
|
1137
1137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1138
1138
|
width: "24",
|
|
1139
1139
|
height: "24",
|
|
@@ -1145,11 +1145,11 @@ const Io = /* @__PURE__ */ Y(Bo, [["render", Eo]]), zo = {}, Ao = {
|
|
|
1145
1145
|
"stroke-linejoin": "round"
|
|
1146
1146
|
};
|
|
1147
1147
|
function To(o, e) {
|
|
1148
|
-
return i(),
|
|
1148
|
+
return i(), u("svg", Ao, e[0] || (e[0] = [
|
|
1149
1149
|
xe('<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)
|
|
1150
1150
|
]));
|
|
1151
1151
|
}
|
|
1152
|
-
const At = /* @__PURE__ */
|
|
1152
|
+
const At = /* @__PURE__ */ X(zo, [["render", To]]), Fo = {}, Oo = {
|
|
1153
1153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1154
1154
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
1155
1155
|
width: "44",
|
|
@@ -1162,11 +1162,11 @@ const At = /* @__PURE__ */ Y(zo, [["render", To]]), Fo = {}, Oo = {
|
|
|
1162
1162
|
"stroke-linejoin": "round"
|
|
1163
1163
|
};
|
|
1164
1164
|
function Uo(o, e, t, s, n, a) {
|
|
1165
|
-
return i(),
|
|
1165
|
+
return i(), u("svg", Oo, e[0] || (e[0] = [
|
|
1166
1166
|
xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
|
|
1167
1167
|
]));
|
|
1168
1168
|
}
|
|
1169
|
-
const Do = /* @__PURE__ */
|
|
1169
|
+
const Do = /* @__PURE__ */ X(Fo, [["render", Uo]]), Ro = {}, Po = {
|
|
1170
1170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1171
1171
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
1172
1172
|
width: "44",
|
|
@@ -1179,11 +1179,11 @@ const Do = /* @__PURE__ */ Y(Fo, [["render", Uo]]), Ro = {}, Po = {
|
|
|
1179
1179
|
"stroke-linejoin": "round"
|
|
1180
1180
|
};
|
|
1181
1181
|
function Ho(o, e, t, s, n, a) {
|
|
1182
|
-
return i(),
|
|
1182
|
+
return i(), u("svg", Po, e[0] || (e[0] = [
|
|
1183
1183
|
xe('<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="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
|
|
1184
1184
|
]));
|
|
1185
1185
|
}
|
|
1186
|
-
const No = /* @__PURE__ */
|
|
1186
|
+
const No = /* @__PURE__ */ X(Ro, [["render", Ho]]), Go = (o) => {
|
|
1187
1187
|
if (!o) return "";
|
|
1188
1188
|
const e = o?.split(".");
|
|
1189
1189
|
return e[e.length - 1];
|
|
@@ -1209,11 +1209,11 @@ const No = /* @__PURE__ */ Y(Ro, [["render", Ho]]), Go = (o) => {
|
|
|
1209
1209
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
1210
1210
|
};
|
|
1211
1211
|
function Zo(o, e) {
|
|
1212
|
-
return i(),
|
|
1212
|
+
return i(), u("svg", Wo, e[0] || (e[0] = [
|
|
1213
1213
|
xe('<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)
|
|
1214
1214
|
]));
|
|
1215
1215
|
}
|
|
1216
|
-
const Qe = /* @__PURE__ */
|
|
1216
|
+
const Qe = /* @__PURE__ */ X(Ko, [["render", Zo]]), Jo = {}, Yo = {
|
|
1217
1217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1218
1218
|
width: "24",
|
|
1219
1219
|
height: "24",
|
|
@@ -1226,7 +1226,7 @@ const Qe = /* @__PURE__ */ Y(Ko, [["render", Zo]]), Jo = {}, Yo = {
|
|
|
1226
1226
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1227
1227
|
};
|
|
1228
1228
|
function Xo(o, e) {
|
|
1229
|
-
return i(),
|
|
1229
|
+
return i(), u("svg", Yo, e[0] || (e[0] = [
|
|
1230
1230
|
l("path", {
|
|
1231
1231
|
stroke: "none",
|
|
1232
1232
|
d: "M0 0h24v24H0z",
|
|
@@ -1237,7 +1237,7 @@ function Xo(o, e) {
|
|
|
1237
1237
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1238
1238
|
]));
|
|
1239
1239
|
}
|
|
1240
|
-
const Tt = /* @__PURE__ */
|
|
1240
|
+
const Tt = /* @__PURE__ */ X(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, en = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, tn = /* @__PURE__ */ G({
|
|
1241
1241
|
__name: "vs-input-file-list-item",
|
|
1242
1242
|
props: /* @__PURE__ */ ie({
|
|
1243
1243
|
format: {},
|
|
@@ -1259,7 +1259,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1259
1259
|
emits: ["update:value", "update:item"],
|
|
1260
1260
|
setup(o) {
|
|
1261
1261
|
const e = de(o, "value"), t = de(o, "item"), s = o;
|
|
1262
|
-
return (n, a) => (i(),
|
|
1262
|
+
return (n, a) => (i(), u("div", Qo, [
|
|
1263
1263
|
(i(), ve(Oe(le(qo)(t.value)), {
|
|
1264
1264
|
src: t.value,
|
|
1265
1265
|
alt: "file",
|
|
@@ -1270,7 +1270,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1270
1270
|
l("button", {
|
|
1271
1271
|
type: "button",
|
|
1272
1272
|
onClick: a[1] || (a[1] = (r) => {
|
|
1273
|
-
le(ko)(t.value), e.value = s.multiple ? e.value?.filter((
|
|
1273
|
+
le(ko)(t.value), e.value = s.multiple ? e.value?.filter((d) => d !== t.value) : "";
|
|
1274
1274
|
}),
|
|
1275
1275
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1276
1276
|
}, [
|
|
@@ -1286,7 +1286,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1286
1286
|
])
|
|
1287
1287
|
]));
|
|
1288
1288
|
}
|
|
1289
|
-
}), Ct = /* @__PURE__ */
|
|
1289
|
+
}), Ct = /* @__PURE__ */ X(tn, [["__scopeId", "data-v-0ca886b3"]]), ln = { class: "flex items-center gap-x-2" }, on = ["multiple", "disabled"], nn = {
|
|
1290
1290
|
key: 1,
|
|
1291
1291
|
class: "flex items-center flex-wrap gap-2"
|
|
1292
1292
|
}, an = {
|
|
@@ -1314,7 +1314,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1314
1314
|
}),
|
|
1315
1315
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
1316
1316
|
setup(o, { emit: e }) {
|
|
1317
|
-
const t = o, s = de(o, "modelValue"), n = e, a = w(null), r = w(!1),
|
|
1317
|
+
const t = o, s = de(o, "modelValue"), n = e, a = w(null), r = w(!1), d = (p) => Array.isArray(s.value) && s.value[p] || "", c = (p) => {
|
|
1318
1318
|
if (t.max_size && p.size > t.max_size * 1024 * 1024) {
|
|
1319
1319
|
const v = (p.size / 1048576).toFixed(2);
|
|
1320
1320
|
return ce({
|
|
@@ -1349,7 +1349,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1349
1349
|
r.value = !1, a.value && (a.value.value = "");
|
|
1350
1350
|
}
|
|
1351
1351
|
};
|
|
1352
|
-
return (p, v) => (i(),
|
|
1352
|
+
return (p, v) => (i(), u("div", ln, [
|
|
1353
1353
|
l("input", {
|
|
1354
1354
|
class: "hidden",
|
|
1355
1355
|
ref_key: "fileInput",
|
|
@@ -1365,13 +1365,13 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1365
1365
|
"onUpdate:item": v[0] || (v[0] = (k) => s.value = k),
|
|
1366
1366
|
value: s.value,
|
|
1367
1367
|
"onUpdate:value": v[1] || (v[1] = (k) => s.value = k)
|
|
1368
|
-
}, null, 8, ["item", "value"])) : p.multiple ? (i(),
|
|
1369
|
-
(i(!0),
|
|
1368
|
+
}, null, 8, ["item", "value"])) : p.multiple ? (i(), u("div", nn, [
|
|
1369
|
+
(i(!0), u(re, null, pe(s.value, (k, m) => (i(), ve(Ct, {
|
|
1370
1370
|
multiple: p.multiple,
|
|
1371
1371
|
key: m,
|
|
1372
1372
|
value: s.value,
|
|
1373
1373
|
"onUpdate:value": v[2] || (v[2] = (I) => s.value = I),
|
|
1374
|
-
item:
|
|
1374
|
+
item: d(m)
|
|
1375
1375
|
}, null, 8, ["multiple", "value", "item"]))), 128)),
|
|
1376
1376
|
l("div", {
|
|
1377
1377
|
onClick: v[3] || (v[3] = (k) => !p.disabled && !r.value && a.value?.click()),
|
|
@@ -1380,25 +1380,25 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1380
1380
|
p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
|
|
1381
1381
|
])
|
|
1382
1382
|
}, [
|
|
1383
|
-
r.value ? (i(),
|
|
1383
|
+
r.value ? (i(), u("div", an)) : (i(), ve(Ge, {
|
|
1384
1384
|
key: 0,
|
|
1385
1385
|
class: "w-6 h-6"
|
|
1386
1386
|
}))
|
|
1387
1387
|
], 2)
|
|
1388
1388
|
])) : D("", !0),
|
|
1389
|
-
p.multiple ? D("", !0) : (i(),
|
|
1389
|
+
p.multiple ? D("", !0) : (i(), u("div", {
|
|
1390
1390
|
key: 2,
|
|
1391
1391
|
onClick: v[4] || (v[4] = (k) => a.value?.click()),
|
|
1392
1392
|
class: T([p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative 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"])
|
|
1393
1393
|
}, [
|
|
1394
|
-
r.value ? (i(),
|
|
1394
|
+
r.value ? (i(), u("div", sn)) : (i(), ve(Ge, {
|
|
1395
1395
|
key: 0,
|
|
1396
1396
|
class: "w-6 h-6"
|
|
1397
1397
|
}))
|
|
1398
1398
|
], 2))
|
|
1399
1399
|
]));
|
|
1400
1400
|
}
|
|
1401
|
-
}), un = /* @__PURE__ */
|
|
1401
|
+
}), un = /* @__PURE__ */ X(rn, [["__scopeId", "data-v-e613a523"]]), dn = { class: "max-w-[55vw]" }, cn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, pn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, fn = { class: "px-[5px]" }, vn = { class: "" }, Je = /* @__PURE__ */ G({
|
|
1402
1402
|
__name: "vs-widget-file-info",
|
|
1403
1403
|
props: {
|
|
1404
1404
|
item: { default: null }
|
|
@@ -1421,7 +1421,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1421
1421
|
const a = n / 1024;
|
|
1422
1422
|
return a < 1024 ? `${a.toFixed(2)} KB` : `${(a / 1024).toFixed(2)} MB`;
|
|
1423
1423
|
}
|
|
1424
|
-
return (n, a) => (i(),
|
|
1424
|
+
return (n, a) => (i(), u(re, null, [
|
|
1425
1425
|
a[1] || (a[1] = xe('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
|
|
1426
1426
|
l("div", dn, [
|
|
1427
1427
|
l("p", cn, K(n.item?.uploaded_name), 1),
|
|
@@ -1469,7 +1469,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1469
1469
|
const v = document.createElement("a");
|
|
1470
1470
|
v.setAttribute("download", p?.uploaded_name), v.href = p?.file_path, v.click();
|
|
1471
1471
|
}
|
|
1472
|
-
async function
|
|
1472
|
+
async function d() {
|
|
1473
1473
|
try {
|
|
1474
1474
|
await fetch(
|
|
1475
1475
|
`${t.prefix}/widget/file/${t.item.entity_id}/${t.item.file_id}`
|
|
@@ -1484,24 +1484,24 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1484
1484
|
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
1485
1485
|
confirmButtonText: "Так, я впевнена/ий",
|
|
1486
1486
|
cancelButtonText: "Скасувати",
|
|
1487
|
-
confirm:
|
|
1487
|
+
confirm: d,
|
|
1488
1488
|
updateListOnConfirm: !0
|
|
1489
1489
|
});
|
|
1490
1490
|
}
|
|
1491
1491
|
function f(p) {
|
|
1492
1492
|
(t.item.ext === "jpg" || t.item.ext === "png") && s("openLightbox", { item: t.item, index: p });
|
|
1493
1493
|
}
|
|
1494
|
-
return (p, v) => (i(),
|
|
1495
|
-
p.item.ext === "jpg" || p.item.ext === "png" ? (i(),
|
|
1494
|
+
return (p, v) => (i(), u("div", mn, [
|
|
1495
|
+
p.item.ext === "jpg" || p.item.ext === "png" ? (i(), u("div", hn, [
|
|
1496
1496
|
l("div", {
|
|
1497
1497
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1498
1498
|
onClick: v[0] || (v[0] = (k) => f(p.index))
|
|
1499
1499
|
}, [
|
|
1500
1500
|
R(Je, { item: p.item }, null, 8, ["item"])
|
|
1501
1501
|
])
|
|
1502
|
-
])) : n(p.item) ? (i(),
|
|
1502
|
+
])) : n(p.item) ? (i(), u("div", gn, [
|
|
1503
1503
|
R(Je, { item: p.item }, null, 8, ["item"])
|
|
1504
|
-
])) : a(p.item) ? (i(),
|
|
1504
|
+
])) : a(p.item) ? (i(), u("div", bn, [
|
|
1505
1505
|
l("a", {
|
|
1506
1506
|
href: `/api/file-preview?id=${p.item.file_id}`,
|
|
1507
1507
|
target: "_blank",
|
|
@@ -1509,7 +1509,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1509
1509
|
}, [
|
|
1510
1510
|
R(Je, { item: p.item }, null, 8, ["item"])
|
|
1511
1511
|
], 8, yn)
|
|
1512
|
-
])) : (i(),
|
|
1512
|
+
])) : (i(), u("div", xn, [
|
|
1513
1513
|
R(Je, { item: p.item }, null, 8, ["item"])
|
|
1514
1514
|
])),
|
|
1515
1515
|
l("div", wn, [
|
|
@@ -1555,7 +1555,7 @@ const Tt = /* @__PURE__ */ Y(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[
|
|
|
1555
1555
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1556
1556
|
};
|
|
1557
1557
|
function Ln(o, e) {
|
|
1558
|
-
return i(),
|
|
1558
|
+
return i(), u("svg", Mn, e[0] || (e[0] = [
|
|
1559
1559
|
l("path", {
|
|
1560
1560
|
stroke: "none",
|
|
1561
1561
|
d: "M0 0h24v24H0z",
|
|
@@ -1566,7 +1566,7 @@ function Ln(o, e) {
|
|
|
1566
1566
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1567
1567
|
]));
|
|
1568
1568
|
}
|
|
1569
|
-
const Sn = /* @__PURE__ */
|
|
1569
|
+
const Sn = /* @__PURE__ */ X(Vn, [["render", Ln]]), Bn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, jn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, En = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, In = { class1: "ml-auto" }, zn = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, An = {
|
|
1570
1570
|
key: 0,
|
|
1571
1571
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
1572
1572
|
}, Tn = { class: "relative" }, Fn = {
|
|
@@ -1587,7 +1587,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1587
1587
|
},
|
|
1588
1588
|
emits: ["update"],
|
|
1589
1589
|
setup(o, { emit: e }) {
|
|
1590
|
-
const t = o, s = Ae("form"), n = B(() => s.value.formId), a = w(!1), r = w(0),
|
|
1590
|
+
const t = o, s = Ae("form"), n = B(() => s.value.formId), a = w(!1), r = w(0), d = e, c = w(!1), f = w({}), p = w([]), v = w(""), k = B(() => Array.isArray(p.value) ? p.value.filter((C) => C.ext === "jpg" || C.ext === "png").map((C) => C?.file_path) : []), m = B(() => v.value === "" ? p.value : p.value.filter((C) => C?.uploaded_name?.includes(v.value))), I = (C) => {
|
|
1591
1591
|
const h = k.value.findIndex((x) => x === C.item.file_path);
|
|
1592
1592
|
h !== -1 && (a.value = !0, r.value = h);
|
|
1593
1593
|
}, $ = async () => {
|
|
@@ -1604,7 +1604,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1604
1604
|
x.append("file", h);
|
|
1605
1605
|
try {
|
|
1606
1606
|
const j = `${t.prefix}/widget/file/${n.value}`, M = await fetch(j, { method: "POST", body: x });
|
|
1607
|
-
return M.ok ? (
|
|
1607
|
+
return M.ok ? (d("update", "file-list"), h) : (ce({
|
|
1608
1608
|
type: M.status >= 400 && M.status < 500 ? "warning" : "error",
|
|
1609
1609
|
title: "Error",
|
|
1610
1610
|
message: `Error code: ${M.status}`
|
|
@@ -1634,7 +1634,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1634
1634
|
n.value && $();
|
|
1635
1635
|
}), (C, h) => {
|
|
1636
1636
|
const x = yt("Lightbox"), j = yt("MessageBox");
|
|
1637
|
-
return i(),
|
|
1637
|
+
return i(), u("div", Bn, [
|
|
1638
1638
|
l("div", jn, [
|
|
1639
1639
|
l("h2", En, " Файлів: " + K(p.value?.length), 1),
|
|
1640
1640
|
l("div", In, [
|
|
@@ -1653,7 +1653,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1653
1653
|
])
|
|
1654
1654
|
])
|
|
1655
1655
|
]),
|
|
1656
|
-
p.value?.length > 4 ? (i(),
|
|
1656
|
+
p.value?.length > 4 ? (i(), u("div", An, [
|
|
1657
1657
|
l("div", null, [
|
|
1658
1658
|
l("div", Tn, [
|
|
1659
1659
|
h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
|
|
@@ -1693,8 +1693,8 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1693
1693
|
])
|
|
1694
1694
|
])
|
|
1695
1695
|
])) : D("", !0),
|
|
1696
|
-
p.value?.length ? (i(),
|
|
1697
|
-
(i(!0),
|
|
1696
|
+
p.value?.length ? (i(), u("div", Fn, [
|
|
1697
|
+
(i(!0), u(re, null, pe(m.value, (M, P) => (i(), ve(Cn, {
|
|
1698
1698
|
key: P,
|
|
1699
1699
|
prefix: C.prefix,
|
|
1700
1700
|
item: M,
|
|
@@ -1703,7 +1703,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1703
1703
|
onOpenModal: h[3] || (h[3] = (te) => O(te)),
|
|
1704
1704
|
onOpenLightbox: h[4] || (h[4] = (te) => I(te))
|
|
1705
1705
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1706
|
-
m.value.length ? D("", !0) : (i(),
|
|
1706
|
+
m.value.length ? D("", !0) : (i(), u("div", On, h[9] || (h[9] = [
|
|
1707
1707
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1708
1708
|
])))
|
|
1709
1709
|
])) : D("", !0),
|
|
@@ -1745,7 +1745,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1745
1745
|
(s) => {
|
|
1746
1746
|
t.value = s;
|
|
1747
1747
|
}
|
|
1748
|
-
), (s, n) => (i(),
|
|
1748
|
+
), (s, n) => (i(), u("div", null, [
|
|
1749
1749
|
l("div", Dn, [
|
|
1750
1750
|
l("p", Rn, K(o.title), 1),
|
|
1751
1751
|
R(zt, {
|
|
@@ -1766,7 +1766,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1766
1766
|
})
|
|
1767
1767
|
]));
|
|
1768
1768
|
}
|
|
1769
|
-
}), Nn = /* @__PURE__ */
|
|
1769
|
+
}), Nn = /* @__PURE__ */ X(Hn, [["__scopeId", "data-v-90320b87"]]), Gn = { class: "text-[16px] text-gray-900 font-medium" }, qn = { class: "grid gap-3" }, Kn = /* @__PURE__ */ G({
|
|
1770
1770
|
__name: "vs-container-accordion",
|
|
1771
1771
|
props: {
|
|
1772
1772
|
title: {
|
|
@@ -1789,7 +1789,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1789
1789
|
(s) => {
|
|
1790
1790
|
t.value = s;
|
|
1791
1791
|
}
|
|
1792
|
-
), (s, n) => (i(),
|
|
1792
|
+
), (s, n) => (i(), u("div", null, [
|
|
1793
1793
|
l("button", {
|
|
1794
1794
|
type: "button",
|
|
1795
1795
|
onClick: n[0] || (n[0] = (a) => t.value = !t.value),
|
|
@@ -1812,7 +1812,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1812
1812
|
})
|
|
1813
1813
|
]));
|
|
1814
1814
|
}
|
|
1815
|
-
}), Wn = /* @__PURE__ */
|
|
1815
|
+
}), Wn = /* @__PURE__ */ X(Kn, [["__scopeId", "data-v-590eff11"]]), Zn = { class: "flex items-center justify-between" }, Jn = /* @__PURE__ */ G({
|
|
1816
1816
|
__name: "vs-container-default",
|
|
1817
1817
|
props: {
|
|
1818
1818
|
title: {
|
|
@@ -1825,7 +1825,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1825
1825
|
}
|
|
1826
1826
|
},
|
|
1827
1827
|
setup(o) {
|
|
1828
|
-
return (e, t) => (i(),
|
|
1828
|
+
return (e, t) => (i(), u("div", null, [
|
|
1829
1829
|
l("div", Zn, [
|
|
1830
1830
|
l("p", null, K(o.title), 1)
|
|
1831
1831
|
]),
|
|
@@ -1904,28 +1904,28 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1904
1904
|
}
|
|
1905
1905
|
},
|
|
1906
1906
|
setup(o) {
|
|
1907
|
-
const e = o, t = Ae("values", w({})), s = Ae("form"), n = B(() => e.schema?.filter((
|
|
1908
|
-
const c =
|
|
1907
|
+
const e = o, t = Ae("values", w({})), s = Ae("form"), n = B(() => e.schema?.filter((d) => {
|
|
1908
|
+
const c = d?.conditions;
|
|
1909
1909
|
if (!c) return !0;
|
|
1910
1910
|
const f = Array.isArray(c) ? c[0] : c, p = e.name ? t.value?.[e.name]?.[f] ?? t.value?.[f] : t.value?.[f];
|
|
1911
1911
|
return Ft(p, c);
|
|
1912
1912
|
})), a = B(() => Yn[e.view]), r = B(() => {
|
|
1913
1913
|
if (t.value || (t.value = {}), !e.name) return t.value;
|
|
1914
|
-
const
|
|
1915
|
-
if (
|
|
1914
|
+
const d = t.value[e.name];
|
|
1915
|
+
if (d) return d;
|
|
1916
1916
|
const c = {};
|
|
1917
1917
|
return t.value = {
|
|
1918
1918
|
...t.value,
|
|
1919
1919
|
[e.name]: c
|
|
1920
1920
|
}, c;
|
|
1921
1921
|
});
|
|
1922
|
-
return (
|
|
1922
|
+
return (d, c) => o.schema?.length ? (i(), ve(Oe(a.value), {
|
|
1923
1923
|
key: 0,
|
|
1924
1924
|
title: o.title,
|
|
1925
1925
|
style: be(o.style)
|
|
1926
1926
|
}, {
|
|
1927
1927
|
default: Ee(() => [
|
|
1928
|
-
(i(!0),
|
|
1928
|
+
(i(!0), u(re, null, pe(n.value, (f) => (i(), ve(Ot, Fe({
|
|
1929
1929
|
key: f.name
|
|
1930
1930
|
}, { ref_for: !0 }, f, {
|
|
1931
1931
|
item: f,
|
|
@@ -1982,13 +1982,13 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
1982
1982
|
set: (g) => s("update:modelValue", g)
|
|
1983
1983
|
});
|
|
1984
1984
|
!r.value && t.defaultValue && (r.value = t.defaultValue);
|
|
1985
|
-
const
|
|
1985
|
+
const d = w(null), c = w(null), f = w(null), p = w(null), v = w(!1), k = w(!1), m = w(null), I = w([]), $ = w(-1), A = w([]), E = w(""), O = w(null), C = w("bottom"), h = w({}), x = w([]), j = B(() => {
|
|
1986
1986
|
if (!x.value.length) return [];
|
|
1987
1987
|
const g = I.value, y = new Map(g.map((_) => [_.id?.toString(), _]));
|
|
1988
1988
|
return x.value.map((_) => y.get(_?.toString())).filter((_) => !!_);
|
|
1989
1989
|
}), M = B(() => t.placeholder || "Select..."), P = B(() => z(m.value));
|
|
1990
1990
|
B(() => n.value ? !x.value.length && E.value === "" : !P.value && E.value === "");
|
|
1991
|
-
const te = B(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value),
|
|
1991
|
+
const te = B(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value), Y = (g) => n.value ? x.value.some((y) => y?.toString() === g?.toString()) : r.value?.toString() === g?.toString(), S = B(() => {
|
|
1992
1992
|
let g = I.value ?? [];
|
|
1993
1993
|
if (!t.data && E.value.trim() !== "") {
|
|
1994
1994
|
const y = E.value.toLowerCase();
|
|
@@ -2002,10 +2002,10 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2002
2002
|
g = g.filter((_) => !y.has(_.id?.toString()));
|
|
2003
2003
|
}
|
|
2004
2004
|
return g;
|
|
2005
|
-
}), W = Ae("values"),
|
|
2005
|
+
}), W = Ae("values"), ee = /\{\{\s*([^}]+?)\s*\}\}/g, Z = (g) => (g ? String(g) : "").replace(/<[^>]*>/g, "").trim(), U = B(() => t.slot ?? t?.optionTemplate ?? ""), F = (g) => {
|
|
2006
2006
|
if (!g) return "";
|
|
2007
2007
|
const y = U.value;
|
|
2008
|
-
return y ? y.replace(
|
|
2008
|
+
return y ? y.replace(ee, (_, q) => {
|
|
2009
2009
|
const se = q.trim(), fe = g[se];
|
|
2010
2010
|
return fe != null ? String(fe) : "";
|
|
2011
2011
|
}) : g.text ?? "";
|
|
@@ -2020,7 +2020,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2020
2020
|
const q = g ? g[_] : null;
|
|
2021
2021
|
W.value[y] = q ?? null;
|
|
2022
2022
|
});
|
|
2023
|
-
},
|
|
2023
|
+
}, Q = B(() => t.parent ? W?.value?.[t.parent]?.toString() ?? null : null), ge = async (g) => {
|
|
2024
2024
|
if (!t.data) {
|
|
2025
2025
|
let y = t.options ?? [];
|
|
2026
2026
|
if (g?.trim()) {
|
|
@@ -2034,7 +2034,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2034
2034
|
}
|
|
2035
2035
|
try {
|
|
2036
2036
|
const y = t.host ?? "", _ = t.prefix ?? "api", q = t.api ?? `/${_}/suggest/${t.data}`, se = `${y}${q}`, fe = new URLSearchParams();
|
|
2037
|
-
return fe.set("json", "1"), g && fe.set("key", g),
|
|
2037
|
+
return fe.set("json", "1"), g && fe.set("key", g), Q.value !== void 0 && Q.value !== null && Q.value !== "" && fe.set("parent", Q.value), (await fetch(`${se}?${fe.toString()}`).then((ze) => ze.json()))?.data ?? [];
|
|
2038
2038
|
} catch {
|
|
2039
2039
|
return [];
|
|
2040
2040
|
}
|
|
@@ -2047,7 +2047,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2047
2047
|
if (t.data)
|
|
2048
2048
|
try {
|
|
2049
2049
|
const _ = t.host ?? "", q = t.prefix ?? "api", se = t.api ?? `/${q}/suggest/${t.data}`, fe = `${_}${se}`, ke = new URLSearchParams();
|
|
2050
|
-
return ke.set("json", "1"), ke.set("val", String(g)),
|
|
2050
|
+
return ke.set("json", "1"), ke.set("val", String(g)), Q.value !== void 0 && Q.value !== null && Q.value !== "" && ke.set("parent", Q.value), ((await fetch(`${fe}?${ke.toString()}`).then((Re) => Re.json()))?.data ?? [])?.[0] ?? null;
|
|
2051
2051
|
} catch {
|
|
2052
2052
|
return null;
|
|
2053
2053
|
}
|
|
@@ -2075,11 +2075,11 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2075
2075
|
}, V = (g) => {
|
|
2076
2076
|
n.value && (x.value = x.value.filter((y) => y?.toString() !== g?.toString()), r.value = [...x.value], s("change", r.value), je(() => O.value?.focus()));
|
|
2077
2077
|
}, J = (g) => {
|
|
2078
|
-
n.value ? (
|
|
2078
|
+
n.value ? (Y(g.id) || (x.value = [...x.value, g.id], r.value = [...x.value], s("change", r.value)), E.value = "", je(() => {
|
|
2079
2079
|
O.value?.focus(), $.value = Math.min($.value, S.value.length - 1);
|
|
2080
2080
|
}), H(null)) : (m.value = g, r.value = g.id, s("change", r.value), E.value = "", Le(), H(g));
|
|
2081
2081
|
}, N = (g) => {
|
|
2082
|
-
|
|
2082
|
+
Y(g.id) || J(g);
|
|
2083
2083
|
}, oe = (g, y) => {
|
|
2084
2084
|
if (!g || !y) return;
|
|
2085
2085
|
const _ = g.offsetTop, q = _ + g.offsetHeight, se = y.scrollTop, fe = se + y.clientHeight;
|
|
@@ -2140,7 +2140,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2140
2140
|
g.key === "Escape" && v.value && Le();
|
|
2141
2141
|
}, pt = (g) => {
|
|
2142
2142
|
const y = g.target;
|
|
2143
|
-
|
|
2143
|
+
d.value?.contains(y) || p.value?.contains(y) || Le();
|
|
2144
2144
|
}, ft = (g) => {
|
|
2145
2145
|
v.value && f.value && !f.value.contains(g.target) && Ve();
|
|
2146
2146
|
}, vt = () => {
|
|
@@ -2206,9 +2206,9 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2206
2206
|
t.data && we();
|
|
2207
2207
|
});
|
|
2208
2208
|
const bt = w(!0);
|
|
2209
|
-
return ue(
|
|
2209
|
+
return ue(Q, async () => {
|
|
2210
2210
|
t.data && (bt.value || (n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null))), await we());
|
|
2211
|
-
}), (g, y) => (i(),
|
|
2211
|
+
}), (g, y) => (i(), u(re, null, [
|
|
2212
2212
|
R(le(It), {
|
|
2213
2213
|
visible: Ze.value,
|
|
2214
2214
|
"onUpdate:visible": y[1] || (y[1] = (_) => Ze.value = _),
|
|
@@ -2231,7 +2231,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2231
2231
|
l("div", {
|
|
2232
2232
|
class: "flex gap-1 w-full",
|
|
2233
2233
|
ref_key: "selectRoot",
|
|
2234
|
-
ref:
|
|
2234
|
+
ref: d,
|
|
2235
2235
|
onClick: y[5] || (y[5] = $e(() => {
|
|
2236
2236
|
}, ["stop"]))
|
|
2237
2237
|
}, [
|
|
@@ -2268,13 +2268,13 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2268
2268
|
ref_key: "triggerRef",
|
|
2269
2269
|
ref: c
|
|
2270
2270
|
}, [
|
|
2271
|
-
n.value ? (i(),
|
|
2272
|
-
(i(!0),
|
|
2271
|
+
n.value ? (i(), u("div", pa, [
|
|
2272
|
+
(i(!0), u(re, null, pe(j.value, (_) => (i(), u("div", {
|
|
2273
2273
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
|
|
2274
2274
|
key: _.id
|
|
2275
2275
|
}, [
|
|
2276
2276
|
l("div", fa, [
|
|
2277
|
-
_?.color ? (i(),
|
|
2277
|
+
_?.color ? (i(), u("span", {
|
|
2278
2278
|
key: 0,
|
|
2279
2279
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
|
|
2280
2280
|
style: be({ backgroundColor: _?.color })
|
|
@@ -2283,10 +2283,10 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2283
2283
|
class: "truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",
|
|
2284
2284
|
title: z(_)
|
|
2285
2285
|
}, [
|
|
2286
|
-
U.value ? (i(),
|
|
2286
|
+
U.value ? (i(), u("span", {
|
|
2287
2287
|
key: 0,
|
|
2288
2288
|
innerHTML: F(_)
|
|
2289
|
-
}, null, 8, ma)) : (i(),
|
|
2289
|
+
}, null, 8, ma)) : (i(), u(re, { key: 1 }, [
|
|
2290
2290
|
he(K(_.text), 1)
|
|
2291
2291
|
], 64))
|
|
2292
2292
|
], 8, va)
|
|
@@ -2309,7 +2309,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2309
2309
|
]), 8, ha)
|
|
2310
2310
|
]))), 128)),
|
|
2311
2311
|
l("div", ga, [
|
|
2312
|
-
!a.value && g.search ? ne((i(),
|
|
2312
|
+
!a.value && g.search ? ne((i(), u("input", {
|
|
2313
2313
|
key: 0,
|
|
2314
2314
|
ref_key: "inputRef",
|
|
2315
2315
|
ref: O,
|
|
@@ -2330,27 +2330,27 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2330
2330
|
[me, E.value]
|
|
2331
2331
|
]) : D("", !0)
|
|
2332
2332
|
])
|
|
2333
|
-
])) : !n.value && !k.value && P.value && E.value === "" ? (i(),
|
|
2333
|
+
])) : !n.value && !k.value && P.value && E.value === "" ? (i(), u("div", {
|
|
2334
2334
|
key: 1,
|
|
2335
2335
|
class: T(["truncate text-gray-900"]),
|
|
2336
2336
|
title: P.value
|
|
2337
2337
|
}, [
|
|
2338
|
-
m.value?.color ? (i(),
|
|
2338
|
+
m.value?.color ? (i(), u("span", {
|
|
2339
2339
|
key: 0,
|
|
2340
2340
|
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
|
|
2341
2341
|
style: be({ backgroundColor: m.value?.color })
|
|
2342
2342
|
}, null, 4)) : D("", !0),
|
|
2343
|
-
U.value ? (i(),
|
|
2343
|
+
U.value ? (i(), u("span", {
|
|
2344
2344
|
key: 1,
|
|
2345
2345
|
class: T({ "pl-5": m.value?.color }),
|
|
2346
2346
|
innerHTML: F(m.value)
|
|
2347
|
-
}, null, 10, xa)) : (i(),
|
|
2347
|
+
}, null, 10, xa)) : (i(), u("span", {
|
|
2348
2348
|
key: 2,
|
|
2349
2349
|
class: T({ "pl-5": m.value?.color })
|
|
2350
2350
|
}, K(m.value?.text), 3))
|
|
2351
2351
|
], 8, ya)) : D("", !0),
|
|
2352
|
-
n.value ? D("", !0) : (i(),
|
|
2353
|
-
!a.value && g.search ? ne((i(),
|
|
2352
|
+
n.value ? D("", !0) : (i(), u("div", wa, [
|
|
2353
|
+
!a.value && g.search ? ne((i(), u("input", {
|
|
2354
2354
|
key: 0,
|
|
2355
2355
|
ref_key: "inputRef",
|
|
2356
2356
|
ref: O,
|
|
@@ -2373,7 +2373,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2373
2373
|
]))
|
|
2374
2374
|
], 512),
|
|
2375
2375
|
l("div", _a, [
|
|
2376
|
-
te.value ? (i(),
|
|
2376
|
+
te.value ? (i(), u("button", {
|
|
2377
2377
|
key: 0,
|
|
2378
2378
|
type: "button",
|
|
2379
2379
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
@@ -2411,7 +2411,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2411
2411
|
])
|
|
2412
2412
|
], 42, ca),
|
|
2413
2413
|
(i(), ve(Et, { to: "body" }, [
|
|
2414
|
-
v.value ? (i(),
|
|
2414
|
+
v.value ? (i(), u("div", {
|
|
2415
2415
|
key: 0,
|
|
2416
2416
|
ref_key: "dropdownRef",
|
|
2417
2417
|
ref: p,
|
|
@@ -2427,21 +2427,21 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2427
2427
|
ref_key: "listRef",
|
|
2428
2428
|
ref: f
|
|
2429
2429
|
}, [
|
|
2430
|
-
S.value.length ? (i(!0),
|
|
2430
|
+
S.value.length ? (i(!0), u(re, { key: 0 }, pe(S.value, (_, q) => (i(), u("div", {
|
|
2431
2431
|
key: _.id,
|
|
2432
2432
|
ref_for: !0,
|
|
2433
2433
|
ref: (se) => A.value[q] = se,
|
|
2434
2434
|
class: T([
|
|
2435
2435
|
"flex px-3 py-2 cursor-default select-none text-gray-900 ",
|
|
2436
|
-
|
|
2437
|
-
$.value === q && !
|
|
2436
|
+
Y(_.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
|
|
2437
|
+
$.value === q && !Y(_.id) ? "bg-blue-100" : ""
|
|
2438
2438
|
]),
|
|
2439
|
-
"aria-disabled":
|
|
2439
|
+
"aria-disabled": Y(_.id) ? "true" : "false",
|
|
2440
2440
|
role: "option",
|
|
2441
2441
|
tabindex: "-1",
|
|
2442
2442
|
onClick: (se) => N(_)
|
|
2443
2443
|
}, [
|
|
2444
|
-
_?.color ? (i(),
|
|
2444
|
+
_?.color ? (i(), u("span", {
|
|
2445
2445
|
key: 0,
|
|
2446
2446
|
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2447
2447
|
style: be({ backgroundColor: _?.color })
|
|
@@ -2454,19 +2454,19 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2454
2454
|
($.value === q, "")
|
|
2455
2455
|
])
|
|
2456
2456
|
}, [
|
|
2457
|
-
U.value ? (i(),
|
|
2457
|
+
U.value ? (i(), u("span", {
|
|
2458
2458
|
key: 0,
|
|
2459
2459
|
innerHTML: F(_)
|
|
2460
|
-
}, null, 8, Ma)) : (i(),
|
|
2460
|
+
}, null, 8, Ma)) : (i(), u(re, { key: 1 }, [
|
|
2461
2461
|
he(K(_.text), 1)
|
|
2462
2462
|
], 64))
|
|
2463
2463
|
], 2)
|
|
2464
|
-
], 10, Va))), 128)) : (i(),
|
|
2464
|
+
], 10, Va))), 128)) : (i(), u("div", La, " No options "))
|
|
2465
2465
|
], 4)
|
|
2466
2466
|
], 4)) : D("", !0)
|
|
2467
2467
|
]))
|
|
2468
2468
|
], 2),
|
|
2469
|
-
t.add ? (i(),
|
|
2469
|
+
t.add ? (i(), u("button", {
|
|
2470
2470
|
key: 0,
|
|
2471
2471
|
onClick: Rt,
|
|
2472
2472
|
class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
|
|
@@ -2499,7 +2499,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2499
2499
|
emits: ["update:modelValue"],
|
|
2500
2500
|
setup(o) {
|
|
2501
2501
|
const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
|
|
2502
|
-
return (n, a) => ne((i(),
|
|
2502
|
+
return (n, a) => ne((i(), u("textarea", {
|
|
2503
2503
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
|
|
2504
2504
|
placeholder: n.placeholder,
|
|
2505
2505
|
disabled: n.disabled,
|
|
@@ -2523,7 +2523,7 @@ const Sn = /* @__PURE__ */ Y(Vn, [["render", Ln]]), Bn = { class: "flex flex-col
|
|
|
2523
2523
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2524
2524
|
};
|
|
2525
2525
|
function za(o, e) {
|
|
2526
|
-
return i(),
|
|
2526
|
+
return i(), u("svg", Ia, e[0] || (e[0] = [
|
|
2527
2527
|
l("path", {
|
|
2528
2528
|
stroke: "none",
|
|
2529
2529
|
d: "M0 0h24v24H0z",
|
|
@@ -2533,7 +2533,7 @@ function za(o, e) {
|
|
|
2533
2533
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
2534
2534
|
]));
|
|
2535
2535
|
}
|
|
2536
|
-
const Aa = /* @__PURE__ */
|
|
2536
|
+
const Aa = /* @__PURE__ */ X(Ea, [["render", za]]), Ta = {}, Fa = {
|
|
2537
2537
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
2538
2538
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2539
2539
|
viewBox: "0 0 24 24",
|
|
@@ -2544,14 +2544,14 @@ const Aa = /* @__PURE__ */ Y(Ea, [["render", za]]), Ta = {}, Fa = {
|
|
|
2544
2544
|
"stroke-linejoin": "round"
|
|
2545
2545
|
};
|
|
2546
2546
|
function Oa(o, e) {
|
|
2547
|
-
return i(),
|
|
2547
|
+
return i(), u("svg", Fa, e[0] || (e[0] = [
|
|
2548
2548
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2549
2549
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
2550
2550
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
2551
2551
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
2552
2552
|
]));
|
|
2553
2553
|
}
|
|
2554
|
-
const Ua = /* @__PURE__ */
|
|
2554
|
+
const Ua = /* @__PURE__ */ X(Ta, [["render", Oa]]), Da = {}, Ra = {
|
|
2555
2555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2556
2556
|
width: "14",
|
|
2557
2557
|
height: "14",
|
|
@@ -2563,7 +2563,7 @@ const Ua = /* @__PURE__ */ Y(Ta, [["render", Oa]]), Da = {}, Ra = {
|
|
|
2563
2563
|
"stroke-linejoin": "round"
|
|
2564
2564
|
};
|
|
2565
2565
|
function Pa(o, e) {
|
|
2566
|
-
return i(),
|
|
2566
|
+
return i(), u("svg", Ra, e[0] || (e[0] = [
|
|
2567
2567
|
l("path", {
|
|
2568
2568
|
stroke: "none",
|
|
2569
2569
|
d: "M0 0h24v24H0z",
|
|
@@ -2574,7 +2574,7 @@ function Pa(o, e) {
|
|
|
2574
2574
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2575
2575
|
]));
|
|
2576
2576
|
}
|
|
2577
|
-
const Ha = /* @__PURE__ */
|
|
2577
|
+
const Ha = /* @__PURE__ */ X(Da, [["render", Pa]]), Na = {}, Ga = {
|
|
2578
2578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2579
2579
|
viewBox: "0 0 24 24",
|
|
2580
2580
|
fill: "none",
|
|
@@ -2584,7 +2584,7 @@ const Ha = /* @__PURE__ */ Y(Da, [["render", Pa]]), Na = {}, Ga = {
|
|
|
2584
2584
|
"stroke-linejoin": "round"
|
|
2585
2585
|
};
|
|
2586
2586
|
function qa(o, e) {
|
|
2587
|
-
return i(),
|
|
2587
|
+
return i(), u("svg", Ga, e[0] || (e[0] = [
|
|
2588
2588
|
l("path", {
|
|
2589
2589
|
stroke: "none",
|
|
2590
2590
|
d: "M0 0h24v24H0z",
|
|
@@ -2595,7 +2595,7 @@ function qa(o, e) {
|
|
|
2595
2595
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2596
2596
|
]));
|
|
2597
2597
|
}
|
|
2598
|
-
const Ka = /* @__PURE__ */
|
|
2598
|
+
const Ka = /* @__PURE__ */ X(Na, [["render", qa]]), Wa = {}, Za = {
|
|
2599
2599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2600
2600
|
viewBox: "0 0 24 24",
|
|
2601
2601
|
fill: "none",
|
|
@@ -2605,21 +2605,21 @@ const Ka = /* @__PURE__ */ Y(Na, [["render", qa]]), Wa = {}, Za = {
|
|
|
2605
2605
|
"stroke-linejoin": "round"
|
|
2606
2606
|
};
|
|
2607
2607
|
function Ja(o, e) {
|
|
2608
|
-
return i(),
|
|
2608
|
+
return i(), u("svg", Za, e[0] || (e[0] = [
|
|
2609
2609
|
xe('<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)
|
|
2610
2610
|
]));
|
|
2611
2611
|
}
|
|
2612
|
-
const Mt = /* @__PURE__ */
|
|
2612
|
+
const Mt = /* @__PURE__ */ X(Wa, [["render", Ja]]), Ya = {}, Xa = {
|
|
2613
2613
|
viewBox: "0 0 178 90",
|
|
2614
2614
|
fill: "none",
|
|
2615
2615
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2616
2616
|
};
|
|
2617
2617
|
function Qa(o, e) {
|
|
2618
|
-
return i(),
|
|
2618
|
+
return i(), u("svg", Xa, e[0] || (e[0] = [
|
|
2619
2619
|
xe('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
2620
2620
|
]));
|
|
2621
2621
|
}
|
|
2622
|
-
const es = /* @__PURE__ */
|
|
2622
|
+
const es = /* @__PURE__ */ X(Ya, [["render", Qa]]), ts = {}, ls = {
|
|
2623
2623
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2624
2624
|
viewBox: "0 0 24 24",
|
|
2625
2625
|
fill: "none",
|
|
@@ -2629,11 +2629,11 @@ const es = /* @__PURE__ */ Y(Ya, [["render", Qa]]), ts = {}, ls = {
|
|
|
2629
2629
|
"stroke-linejoin": "round"
|
|
2630
2630
|
};
|
|
2631
2631
|
function os(o, e) {
|
|
2632
|
-
return i(),
|
|
2632
|
+
return i(), u("svg", ls, e[0] || (e[0] = [
|
|
2633
2633
|
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)
|
|
2634
2634
|
]));
|
|
2635
2635
|
}
|
|
2636
|
-
const ns = /* @__PURE__ */
|
|
2636
|
+
const ns = /* @__PURE__ */ X(ts, [["render", os]]), as = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ss = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, rs = { class: "relative w-full" }, is = { class: "table-wrapper flex gap-2" }, us = { class: "vs-popover inline-block text-slate-700" }, ds = { class: "text-center" }, cs = { class: "" }, ps = { 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" }, fs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, vs = { class: "text-sm items-center text-gray-800 flex gap-1" }, ms = { class: "w-full overflow-x-auto" }, hs = { class: "w-full table-auto caption-bottom text-sm" }, gs = { class: "[&_tr]:border-b" }, bs = { 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" }, ys = { 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" }, xs = {
|
|
2637
2637
|
key: 0,
|
|
2638
2638
|
colspan: "100%",
|
|
2639
2639
|
class: "text-center"
|
|
@@ -2645,8 +2645,11 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2645
2645
|
class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
|
|
2646
2646
|
}, Bs = ["innerHTML"], js = {
|
|
2647
2647
|
key: 2,
|
|
2648
|
+
class: "line-clamp-2 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"
|
|
2649
|
+
}, Es = {
|
|
2650
|
+
key: 3,
|
|
2648
2651
|
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"
|
|
2649
|
-
},
|
|
2652
|
+
}, Is = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, zs = { class: "flex items-center justify-center gap-2" }, As = ["onClick"], Ts = ["onClick"], Fs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Os = /* @__PURE__ */ G({
|
|
2650
2653
|
__name: "vs-input-datatable",
|
|
2651
2654
|
props: /* @__PURE__ */ ie({
|
|
2652
2655
|
colModel: {},
|
|
@@ -2670,17 +2673,17 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2670
2673
|
const H = F[z.key];
|
|
2671
2674
|
return H ? Array.isArray(H) ? H.join(", ").toLowerCase().includes(U) : String(H).toLowerCase().includes(U) : !1;
|
|
2672
2675
|
}));
|
|
2673
|
-
}), r = w(null),
|
|
2676
|
+
}), r = w(null), d = w(null), c = w(!1), f = w(null), p = w({ top: 0, left: 0 }), v = (U) => {
|
|
2674
2677
|
r.value = U;
|
|
2675
2678
|
}, k = (U) => {
|
|
2676
|
-
|
|
2679
|
+
d.value = U;
|
|
2677
2680
|
}, m = (U) => {
|
|
2678
2681
|
if (r.value === null || r.value === U) {
|
|
2679
|
-
r.value = null,
|
|
2682
|
+
r.value = null, d.value = null;
|
|
2680
2683
|
return;
|
|
2681
2684
|
}
|
|
2682
2685
|
const F = [...t.value], [z] = F.splice(r.value, 1);
|
|
2683
|
-
F.splice(U, 0, z), t.value = F, r.value = null,
|
|
2686
|
+
F.splice(U, 0, z), t.value = F, r.value = null, d.value = null;
|
|
2684
2687
|
}, I = (U) => {
|
|
2685
2688
|
const z = U.currentTarget.getBoundingClientRect();
|
|
2686
2689
|
p.value = { top: z.bottom + window.scrollY, left: z.left + window.scrollX }, c.value = !c.value;
|
|
@@ -2693,9 +2696,9 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2693
2696
|
const z = U.target.files?.[0];
|
|
2694
2697
|
if (!z) return;
|
|
2695
2698
|
const H = new FileReader();
|
|
2696
|
-
H.onload = (
|
|
2699
|
+
H.onload = (Q) => {
|
|
2697
2700
|
try {
|
|
2698
|
-
const ge =
|
|
2701
|
+
const ge = Q.target?.result;
|
|
2699
2702
|
if (typeof ge == "string") {
|
|
2700
2703
|
const we = JSON.parse(ge);
|
|
2701
2704
|
Array.isArray(we) && t.value.push(...we);
|
|
@@ -2721,7 +2724,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2721
2724
|
async function te() {
|
|
2722
2725
|
C.value = "Додати", h.value = !0, x = "add", M.value = {};
|
|
2723
2726
|
}
|
|
2724
|
-
function
|
|
2727
|
+
function Y(U, F) {
|
|
2725
2728
|
const z = F.key || F.name;
|
|
2726
2729
|
return s.value[z] && U[z] ? s.value[z].find((H) => H.id.toString() === U[z].toString())?.text ?? U[z] : U[z] || "-";
|
|
2727
2730
|
}
|
|
@@ -2737,13 +2740,13 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2737
2740
|
}
|
|
2738
2741
|
x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, M.value] : t.value = [M.value] : t.value = t.value.map((F, z) => z === j ? M.value : F), h.value = !1;
|
|
2739
2742
|
}
|
|
2740
|
-
function
|
|
2743
|
+
function ee(U) {
|
|
2741
2744
|
t.value = t.value.filter((F, z) => z !== U);
|
|
2742
2745
|
}
|
|
2743
2746
|
function Z() {
|
|
2744
2747
|
h.value = !1;
|
|
2745
2748
|
}
|
|
2746
|
-
return (U, F) => (i(),
|
|
2749
|
+
return (U, F) => (i(), u("div", as, [
|
|
2747
2750
|
l("div", ss, [
|
|
2748
2751
|
l("div", rs, [
|
|
2749
2752
|
R(Aa, {
|
|
@@ -2786,7 +2789,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2786
2789
|
])
|
|
2787
2790
|
]),
|
|
2788
2791
|
(i(), ve(Et, { to: "body" }, [
|
|
2789
|
-
c.value ? (i(),
|
|
2792
|
+
c.value ? (i(), u("div", {
|
|
2790
2793
|
key: 0,
|
|
2791
2794
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2792
2795
|
style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
|
|
@@ -2840,7 +2843,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2840
2843
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2841
2844
|
})
|
|
2842
2845
|
]),
|
|
2843
|
-
(i(!0),
|
|
2846
|
+
(i(!0), u(re, null, pe(U.colModel, (z) => (i(), u("th", {
|
|
2844
2847
|
key: z.key,
|
|
2845
2848
|
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]"
|
|
2846
2849
|
}, K(z.ua || z.label), 1))), 128)),
|
|
@@ -2848,9 +2851,9 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2848
2851
|
])
|
|
2849
2852
|
]),
|
|
2850
2853
|
l("tbody", {
|
|
2851
|
-
class: T({ "[&_tr:last-child]:border-0": !
|
|
2854
|
+
class: T({ "[&_tr:last-child]:border-0": !d.value })
|
|
2852
2855
|
}, [
|
|
2853
|
-
a.value.length === 0 ? (i(),
|
|
2856
|
+
a.value.length === 0 ? (i(), u("td", xs, [
|
|
2854
2857
|
l("div", ws, [
|
|
2855
2858
|
l("div", ks, [
|
|
2856
2859
|
R(es, { class: "w-48 mx-auto" }),
|
|
@@ -2861,16 +2864,16 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2861
2864
|
])
|
|
2862
2865
|
])
|
|
2863
2866
|
])) : D("", !0),
|
|
2864
|
-
(i(!0),
|
|
2867
|
+
(i(!0), u(re, null, pe(a.value, (z, H) => (i(), u("tr", {
|
|
2865
2868
|
key: z.id,
|
|
2866
2869
|
class: T(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
2867
2870
|
"opacity-50": r.value === H,
|
|
2868
|
-
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":
|
|
2871
|
+
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === H
|
|
2869
2872
|
}]),
|
|
2870
2873
|
draggable: "true",
|
|
2871
|
-
onDragstart: (
|
|
2872
|
-
onDragover: $e((
|
|
2873
|
-
onDrop: (
|
|
2874
|
+
onDragstart: (Q) => v(H),
|
|
2875
|
+
onDragover: $e((Q) => k(H), ["prevent"]),
|
|
2876
|
+
onDrop: (Q) => m(H)
|
|
2874
2877
|
}, [
|
|
2875
2878
|
l("td", $s, [
|
|
2876
2879
|
l("div", Cs, [
|
|
@@ -2881,31 +2884,31 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2881
2884
|
})
|
|
2882
2885
|
])
|
|
2883
2886
|
]),
|
|
2884
|
-
(i(!0),
|
|
2885
|
-
key:
|
|
2887
|
+
(i(!0), u(re, null, pe(U.colModel, (Q) => (i(), u("td", {
|
|
2888
|
+
key: Q.key,
|
|
2886
2889
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2887
2890
|
}, [
|
|
2888
|
-
|
|
2889
|
-
A(
|
|
2891
|
+
Q.type === "file" ? (i(), u("div", Vs, [
|
|
2892
|
+
A(Y(z, Q)) ? (i(), u("div", Ms, [
|
|
2890
2893
|
l("img", {
|
|
2891
|
-
src:
|
|
2894
|
+
src: Y(z, Q),
|
|
2892
2895
|
alt: "alt",
|
|
2893
2896
|
width: "45",
|
|
2894
2897
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
2895
2898
|
}, null, 8, Ls)
|
|
2896
|
-
])) : (i(),
|
|
2899
|
+
])) : (i(), u("div", Ss, [
|
|
2897
2900
|
R(At, { class: "w-[25px] min-w-[25px] h-[25px]" })
|
|
2898
2901
|
]))
|
|
2899
|
-
])) :
|
|
2902
|
+
])) : Q.type === "tiptap-editor" ? (i(), u("div", {
|
|
2900
2903
|
key: 1,
|
|
2901
2904
|
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",
|
|
2902
|
-
innerHTML:
|
|
2903
|
-
}, null, 8, Bs)) : (i(),
|
|
2905
|
+
innerHTML: Y(z, Q)
|
|
2906
|
+
}, null, 8, Bs)) : Q.type === "reference" ? (i(), u("div", js, K(Y(z, Q)), 1)) : (i(), u("div", Es, K(Y(z, Q)), 1))
|
|
2904
2907
|
]))), 128)),
|
|
2905
|
-
l("td",
|
|
2906
|
-
l("div",
|
|
2908
|
+
l("td", Is, [
|
|
2909
|
+
l("div", zs, [
|
|
2907
2910
|
l("button", {
|
|
2908
|
-
onClick: (
|
|
2911
|
+
onClick: (Q) => S(z, H),
|
|
2909
2912
|
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"
|
|
2910
2913
|
}, [
|
|
2911
2914
|
R(ns, {
|
|
@@ -2913,9 +2916,9 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2913
2916
|
height: "24",
|
|
2914
2917
|
class: "w-3 h-3"
|
|
2915
2918
|
})
|
|
2916
|
-
], 8,
|
|
2919
|
+
], 8, As),
|
|
2917
2920
|
l("button", {
|
|
2918
|
-
onClick: (
|
|
2921
|
+
onClick: (Q) => ee(H),
|
|
2919
2922
|
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"
|
|
2920
2923
|
}, [
|
|
2921
2924
|
R(Qe, {
|
|
@@ -2923,7 +2926,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2923
2926
|
height: "24",
|
|
2924
2927
|
class: "w-3 h-3"
|
|
2925
2928
|
})
|
|
2926
|
-
], 8,
|
|
2929
|
+
], 8, Ts)
|
|
2927
2930
|
])
|
|
2928
2931
|
])
|
|
2929
2932
|
], 42, _s))), 128))
|
|
@@ -2945,7 +2948,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2945
2948
|
form: P.value,
|
|
2946
2949
|
"onUpdate:form": F[2] || (F[2] = (z) => P.value = z)
|
|
2947
2950
|
}, null, 8, ["schema", "values", "form"]),
|
|
2948
|
-
l("div",
|
|
2951
|
+
l("div", Fs, [
|
|
2949
2952
|
l("button", {
|
|
2950
2953
|
type: "button",
|
|
2951
2954
|
onClick: F[3] || (F[3] = (z) => h.value = !1),
|
|
@@ -2962,7 +2965,7 @@ const ns = /* @__PURE__ */ Y(ts, [["render", os]]), as = { class: "vs-datatable
|
|
|
2962
2965
|
}, 8, ["visible", "title"])
|
|
2963
2966
|
]));
|
|
2964
2967
|
}
|
|
2965
|
-
}),
|
|
2968
|
+
}), Us = {
|
|
2966
2969
|
draw: {
|
|
2967
2970
|
toolbar: {
|
|
2968
2971
|
actions: {
|
|
@@ -3082,7 +3085,7 @@ function Ne(o) {
|
|
|
3082
3085
|
features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
|
|
3083
3086
|
} : o : null;
|
|
3084
3087
|
}
|
|
3085
|
-
function
|
|
3088
|
+
function Ds(o) {
|
|
3086
3089
|
return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
|
|
3087
3090
|
type: "Feature",
|
|
3088
3091
|
geometry: Ne({
|
|
@@ -3096,7 +3099,7 @@ function Us(o) {
|
|
|
3096
3099
|
properties: {}
|
|
3097
3100
|
} : null : null;
|
|
3098
3101
|
}
|
|
3099
|
-
const
|
|
3102
|
+
const Rs = {}, Ps = {
|
|
3100
3103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3101
3104
|
viewBox: "0 0 24 24",
|
|
3102
3105
|
stroke: "currentColor",
|
|
@@ -3106,8 +3109,8 @@ const Ds = {}, Rs = {
|
|
|
3106
3109
|
"stroke-linejoin": "round",
|
|
3107
3110
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
3108
3111
|
};
|
|
3109
|
-
function
|
|
3110
|
-
return i(),
|
|
3112
|
+
function Hs(o, e) {
|
|
3113
|
+
return i(), u("svg", Ps, e[0] || (e[0] = [
|
|
3111
3114
|
l("path", {
|
|
3112
3115
|
stroke: "none",
|
|
3113
3116
|
d: "M0 0h24v24H0z",
|
|
@@ -3117,7 +3120,7 @@ function Ps(o, e) {
|
|
|
3117
3120
|
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)
|
|
3118
3121
|
]));
|
|
3119
3122
|
}
|
|
3120
|
-
const
|
|
3123
|
+
const Ns = /* @__PURE__ */ X(Rs, [["render", Hs]]), Gs = {}, qs = {
|
|
3121
3124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3122
3125
|
viewBox: "0 0 24 24",
|
|
3123
3126
|
fill: "none",
|
|
@@ -3127,8 +3130,8 @@ const Hs = /* @__PURE__ */ Y(Ds, [["render", Ps]]), Ns = {}, Gs = {
|
|
|
3127
3130
|
"stroke-linejoin": "round",
|
|
3128
3131
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
3129
3132
|
};
|
|
3130
|
-
function
|
|
3131
|
-
return i(),
|
|
3133
|
+
function Ks(o, e) {
|
|
3134
|
+
return i(), u("svg", qs, e[0] || (e[0] = [
|
|
3132
3135
|
l("path", {
|
|
3133
3136
|
stroke: "none",
|
|
3134
3137
|
d: "M0 0h24v24H0z",
|
|
@@ -3139,7 +3142,7 @@ function qs(o, e) {
|
|
|
3139
3142
|
l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
3140
3143
|
]));
|
|
3141
3144
|
}
|
|
3142
|
-
const
|
|
3145
|
+
const Ws = /* @__PURE__ */ X(Gs, [["render", Ks]]), Zs = {}, Js = {
|
|
3143
3146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3144
3147
|
viewBox: "0 0 24 24",
|
|
3145
3148
|
fill: "none",
|
|
@@ -3149,12 +3152,12 @@ const Ks = /* @__PURE__ */ Y(Ns, [["render", qs]]), Ws = {}, Zs = {
|
|
|
3149
3152
|
"stroke-linejoin": "round",
|
|
3150
3153
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
3151
3154
|
};
|
|
3152
|
-
function
|
|
3153
|
-
return i(),
|
|
3155
|
+
function Ys(o, e) {
|
|
3156
|
+
return i(), u("svg", Js, e[0] || (e[0] = [
|
|
3154
3157
|
xe('<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)
|
|
3155
3158
|
]));
|
|
3156
3159
|
}
|
|
3157
|
-
const
|
|
3160
|
+
const Xs = /* @__PURE__ */ X(Zs, [["render", Ys]]), Qs = {}, er = {
|
|
3158
3161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3159
3162
|
viewBox: "0 0 24 24",
|
|
3160
3163
|
fill: "none",
|
|
@@ -3164,12 +3167,12 @@ const Ys = /* @__PURE__ */ Y(Ws, [["render", Js]]), Xs = {}, Qs = {
|
|
|
3164
3167
|
"stroke-linejoin": "round",
|
|
3165
3168
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
3166
3169
|
};
|
|
3167
|
-
function
|
|
3168
|
-
return i(),
|
|
3170
|
+
function tr(o, e) {
|
|
3171
|
+
return i(), u("svg", er, e[0] || (e[0] = [
|
|
3169
3172
|
xe('<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)
|
|
3170
3173
|
]));
|
|
3171
3174
|
}
|
|
3172
|
-
const
|
|
3175
|
+
const lr = /* @__PURE__ */ X(Qs, [["render", tr]]), or = {}, nr = {
|
|
3173
3176
|
version: "1.1",
|
|
3174
3177
|
viewBox: "0 0 14 14",
|
|
3175
3178
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3177,8 +3180,8 @@ const tr = /* @__PURE__ */ Y(Xs, [["render", er]]), lr = {}, or = {
|
|
|
3177
3180
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3178
3181
|
class: "fullscreen-icon"
|
|
3179
3182
|
};
|
|
3180
|
-
function
|
|
3181
|
-
return i(),
|
|
3183
|
+
function ar(o, e) {
|
|
3184
|
+
return i(), u("svg", nr, e[0] || (e[0] = [
|
|
3182
3185
|
l("title", null, null, -1),
|
|
3183
3186
|
l("desc", null, null, -1),
|
|
3184
3187
|
l("defs", null, null, -1),
|
|
@@ -3207,10 +3210,10 @@ function nr(o, e) {
|
|
|
3207
3210
|
], -1)
|
|
3208
3211
|
]));
|
|
3209
3212
|
}
|
|
3210
|
-
const
|
|
3213
|
+
const sr = /* @__PURE__ */ X(or, [["render", ar]]), rr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, ir = {
|
|
3211
3214
|
key: 0,
|
|
3212
3215
|
class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
|
|
3213
|
-
},
|
|
3216
|
+
}, ur = ["onClick"], dr = { class: "relative flex-1 min-w-[140px]" }, cr = ["placeholder"], pr = "https://data.softpro.ua/api-user/gis-url-proxy", fr = "https://geo.rv.ua/api-user/dzk.api", vr = /* @__PURE__ */ G({
|
|
3214
3217
|
__name: "map-search",
|
|
3215
3218
|
props: {
|
|
3216
3219
|
config: {}
|
|
@@ -3220,16 +3223,16 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3220
3223
|
const t = o, s = e, n = ["here", "xy", "parcel"], a = B(() => {
|
|
3221
3224
|
const h = t.config?.tools?.filter((x) => n.includes(x));
|
|
3222
3225
|
return h && h.length ? h : n;
|
|
3223
|
-
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"),
|
|
3226
|
+
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), d = w(a.value[0] ?? n[0]);
|
|
3224
3227
|
ue(a, (h) => {
|
|
3225
|
-
h.includes(
|
|
3228
|
+
h.includes(d.value) || (d.value = h[0]);
|
|
3226
3229
|
});
|
|
3227
3230
|
const c = w(""), f = w(!1), p = w(null);
|
|
3228
|
-
ue(
|
|
3231
|
+
ue(d, () => {
|
|
3229
3232
|
c.value = "", f.value = !1;
|
|
3230
3233
|
});
|
|
3231
3234
|
function v(h) {
|
|
3232
|
-
|
|
3235
|
+
d.value = h;
|
|
3233
3236
|
}
|
|
3234
3237
|
function k(h) {
|
|
3235
3238
|
if (!f.value) return;
|
|
@@ -3251,14 +3254,14 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3251
3254
|
if (j.length < 2) return null;
|
|
3252
3255
|
const M = j.slice(0, 2).map(Number);
|
|
3253
3256
|
if (!M.every((Z) => Number.isFinite(Z))) return null;
|
|
3254
|
-
let [P, te] = M,
|
|
3255
|
-
const W = (Z) => Math.abs(Z) <= 90,
|
|
3256
|
-
if (!W(
|
|
3257
|
-
if (W(S) &&
|
|
3258
|
-
|
|
3257
|
+
let [P, te] = M, Y = P, S = te;
|
|
3258
|
+
const W = (Z) => Math.abs(Z) <= 90, ee = (Z) => Math.abs(Z) <= 180;
|
|
3259
|
+
if (!W(Y) || !ee(S))
|
|
3260
|
+
if (W(S) && ee(Y))
|
|
3261
|
+
Y = te, S = P;
|
|
3259
3262
|
else
|
|
3260
3263
|
return null;
|
|
3261
|
-
return { lat:
|
|
3264
|
+
return { lat: Y, lng: S };
|
|
3262
3265
|
}
|
|
3263
3266
|
function $(h) {
|
|
3264
3267
|
return (h?.items || []).map((j, M) => ({
|
|
@@ -3295,7 +3298,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3295
3298
|
async function C() {
|
|
3296
3299
|
const h = c.value.trim();
|
|
3297
3300
|
if (h) {
|
|
3298
|
-
if (
|
|
3301
|
+
if (d.value === "xy") {
|
|
3299
3302
|
const x = I(h);
|
|
3300
3303
|
if (!x) {
|
|
3301
3304
|
ce({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
@@ -3305,8 +3308,8 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3305
3308
|
return;
|
|
3306
3309
|
}
|
|
3307
3310
|
try {
|
|
3308
|
-
const x = new URL(
|
|
3309
|
-
if (
|
|
3311
|
+
const x = new URL(d.value === "here" ? pr : fr);
|
|
3312
|
+
if (d.value === "here")
|
|
3310
3313
|
x.searchParams.set("searchtext", h);
|
|
3311
3314
|
else {
|
|
3312
3315
|
if (!E(h)) {
|
|
@@ -3317,7 +3320,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3317
3320
|
}
|
|
3318
3321
|
const j = await fetch(x.toString());
|
|
3319
3322
|
if (!j.ok) throw new Error(`HTTP ${j.status}`);
|
|
3320
|
-
const M = await j.json(), P =
|
|
3323
|
+
const M = await j.json(), P = d.value === "here" ? $(M) : A(M);
|
|
3321
3324
|
if (!P.length)
|
|
3322
3325
|
ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
|
|
3323
3326
|
else {
|
|
@@ -3330,12 +3333,12 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3330
3333
|
}
|
|
3331
3334
|
}
|
|
3332
3335
|
}
|
|
3333
|
-
return (h, x) => (i(),
|
|
3336
|
+
return (h, x) => (i(), u("div", rr, [
|
|
3334
3337
|
l("form", {
|
|
3335
3338
|
class: "flex gap-2",
|
|
3336
3339
|
onSubmit: $e(C, ["prevent"])
|
|
3337
3340
|
}, [
|
|
3338
|
-
a.value.length > 1 ? (i(),
|
|
3341
|
+
a.value.length > 1 ? (i(), u("div", {
|
|
3339
3342
|
key: 0,
|
|
3340
3343
|
ref_key: "dropdownRef",
|
|
3341
3344
|
ref: p,
|
|
@@ -3346,8 +3349,8 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3346
3349
|
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",
|
|
3347
3350
|
onClick: x[0] || (x[0] = (j) => f.value = !f.value)
|
|
3348
3351
|
}, [
|
|
3349
|
-
l("span", null, K(m(
|
|
3350
|
-
(i(),
|
|
3352
|
+
l("span", null, K(m(d.value)), 1),
|
|
3353
|
+
(i(), u("svg", {
|
|
3351
3354
|
class: T(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": f.value }]),
|
|
3352
3355
|
viewBox: "0 0 24 24",
|
|
3353
3356
|
fill: "none",
|
|
@@ -3362,23 +3365,23 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3362
3365
|
}, null, -1)
|
|
3363
3366
|
]), 2))
|
|
3364
3367
|
]),
|
|
3365
|
-
f.value ? (i(),
|
|
3368
|
+
f.value ? (i(), u("div", ir, [
|
|
3366
3369
|
l("ul", null, [
|
|
3367
|
-
(i(!0),
|
|
3370
|
+
(i(!0), u(re, null, pe(a.value, (j) => (i(), u("li", {
|
|
3368
3371
|
key: j,
|
|
3369
3372
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
3370
3373
|
onClick: (M) => v(j)
|
|
3371
|
-
}, K(m(j)), 9,
|
|
3374
|
+
}, K(m(j)), 9, ur))), 128))
|
|
3372
3375
|
])
|
|
3373
3376
|
])) : D("", !0)
|
|
3374
3377
|
], 512)) : D("", !0),
|
|
3375
|
-
l("div",
|
|
3378
|
+
l("div", dr, [
|
|
3376
3379
|
ne(l("input", {
|
|
3377
3380
|
"onUpdate:modelValue": x[1] || (x[1] = (j) => c.value = j),
|
|
3378
3381
|
placeholder: r.value,
|
|
3379
3382
|
type: "text",
|
|
3380
3383
|
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"
|
|
3381
|
-
}, null, 8,
|
|
3384
|
+
}, null, 8, cr), [
|
|
3382
3385
|
[
|
|
3383
3386
|
me,
|
|
3384
3387
|
c.value,
|
|
@@ -3410,7 +3413,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3410
3413
|
], 32)
|
|
3411
3414
|
]));
|
|
3412
3415
|
}
|
|
3413
|
-
}),
|
|
3416
|
+
}), mr = /* @__PURE__ */ X(vr, [["__scopeId", "data-v-3048520a"]]), hr = { class: "bg-white/30 p-1 rounded-md shadow" }, gr = { class: "flex gap-2" }, br = ["onClick", "title"], yr = ["src"], xr = /* @__PURE__ */ G({
|
|
3414
3417
|
__name: "map-layers",
|
|
3415
3418
|
props: {
|
|
3416
3419
|
basemaps: {}
|
|
@@ -3421,9 +3424,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3421
3424
|
function a(r) {
|
|
3422
3425
|
n("onLayerChange", r), s.value = r;
|
|
3423
3426
|
}
|
|
3424
|
-
return (r,
|
|
3425
|
-
l("div",
|
|
3426
|
-
(i(!0),
|
|
3427
|
+
return (r, d) => (i(), u("div", hr, [
|
|
3428
|
+
l("div", gr, [
|
|
3429
|
+
(i(!0), u(re, null, pe(r.basemaps, (c, f) => (i(), u("div", {
|
|
3427
3430
|
key: f,
|
|
3428
3431
|
class: T(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": s.value === f }]),
|
|
3429
3432
|
onClick: (p) => a(f),
|
|
@@ -3435,24 +3438,24 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3435
3438
|
src: c.preview,
|
|
3436
3439
|
alt: "",
|
|
3437
3440
|
class: "w-10 h-10 object-cover"
|
|
3438
|
-
}, null, 8,
|
|
3439
|
-
], 10,
|
|
3441
|
+
}, null, 8, yr)
|
|
3442
|
+
], 10, br))), 128))
|
|
3440
3443
|
])
|
|
3441
3444
|
]));
|
|
3442
3445
|
}
|
|
3443
|
-
}),
|
|
3446
|
+
}), wr = {
|
|
3444
3447
|
key: 0,
|
|
3445
3448
|
class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
|
|
3446
|
-
},
|
|
3449
|
+
}, kr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, _r = { class: "text-sm font-medium" }, $r = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Cr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Vr = { class: "flex items-center gap-1" }, Mr = ["disabled"], Lr = { class: "absolute top-4 right-4 z-[1000]" }, Sr = { class: "flex flex-col gap-[2px]" }, Br = ["aria-pressed"], jr = ["aria-pressed"], Er = ["aria-pressed"], Ir = ["aria-pressed"], zr = { 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" }, Ar = {
|
|
3447
3450
|
key: 0,
|
|
3448
3451
|
class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
|
|
3449
|
-
},
|
|
3452
|
+
}, Tr = { class: "mr-auto" }, Fr = { class: "font-bold" }, Or = { class: "flex items-center" }, Ur = { class: "text-xs mr-2" }, Dr = {
|
|
3450
3453
|
key: 0,
|
|
3451
3454
|
class: "text-xs"
|
|
3452
|
-
},
|
|
3455
|
+
}, Rr = {
|
|
3453
3456
|
key: 1,
|
|
3454
3457
|
class: "text-xs"
|
|
3455
|
-
},
|
|
3458
|
+
}, Pr = /* @__PURE__ */ G({
|
|
3456
3459
|
__name: "vs-input-map",
|
|
3457
3460
|
props: {
|
|
3458
3461
|
tools: {},
|
|
@@ -3468,7 +3471,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3468
3471
|
},
|
|
3469
3472
|
emits: ["update:modelValue"],
|
|
3470
3473
|
setup(o, { emit: e }) {
|
|
3471
|
-
const t = Kt(), s = o, n = e, a = B(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1),
|
|
3474
|
+
const t = Kt(), s = o, n = e, a = B(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1), d = w("");
|
|
3472
3475
|
function c() {
|
|
3473
3476
|
const b = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
3474
3477
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
|
|
@@ -3484,7 +3487,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3484
3487
|
const V = (N) => {
|
|
3485
3488
|
const oe = N.ctrlKey || N.metaKey, ae = N.shiftKey;
|
|
3486
3489
|
if (!oe && !ae) {
|
|
3487
|
-
r.value = !0,
|
|
3490
|
+
r.value = !0, d.value = c(), clearTimeout(b), b = window.setTimeout(() => {
|
|
3488
3491
|
r.value = !1;
|
|
3489
3492
|
}, 1e3);
|
|
3490
3493
|
return;
|
|
@@ -3494,7 +3497,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3494
3497
|
}, 100);
|
|
3495
3498
|
}, J = (N) => {
|
|
3496
3499
|
if (N.touches.length === 1) {
|
|
3497
|
-
r.value = !0,
|
|
3500
|
+
r.value = !0, d.value = c(), clearTimeout(b), b = window.setTimeout(() => {
|
|
3498
3501
|
r.value = !1;
|
|
3499
3502
|
}, 3e3);
|
|
3500
3503
|
return;
|
|
@@ -3517,7 +3520,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3517
3520
|
coordinates: [b.coordinates]
|
|
3518
3521
|
} : (b.type === "MultiPolygon", b) : null;
|
|
3519
3522
|
}
|
|
3520
|
-
function
|
|
3523
|
+
function Y() {
|
|
3521
3524
|
return new Promise((b, V) => {
|
|
3522
3525
|
window.L && window.L.Draw && b(0);
|
|
3523
3526
|
const J = (oe) => {
|
|
@@ -3566,7 +3569,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3566
3569
|
const N = L.featureGroup(V).getBounds();
|
|
3567
3570
|
N && N.isValid() && p.fitBounds(N, { padding: [b, b] });
|
|
3568
3571
|
}
|
|
3569
|
-
function
|
|
3572
|
+
function ee() {
|
|
3570
3573
|
I.value?.click();
|
|
3571
3574
|
}
|
|
3572
3575
|
const Z = w("");
|
|
@@ -3604,7 +3607,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3604
3607
|
layer: V
|
|
3605
3608
|
}, C.value = b.length;
|
|
3606
3609
|
}
|
|
3607
|
-
function
|
|
3610
|
+
function Q() {
|
|
3608
3611
|
const b = x.value?.layer;
|
|
3609
3612
|
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(O.value, 14)));
|
|
3610
3613
|
}
|
|
@@ -3613,7 +3616,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3613
3616
|
b && (v.removeLayer(b), S(), H());
|
|
3614
3617
|
}
|
|
3615
3618
|
ye(async () => {
|
|
3616
|
-
document.addEventListener("wheel", $, { passive: !1 }), await
|
|
3619
|
+
document.addEventListener("wheel", $, { passive: !1 }), await Y(), L.drawLocal = Us;
|
|
3617
3620
|
const b = s.handleZoom;
|
|
3618
3621
|
p = L.map(f.value, {
|
|
3619
3622
|
zoomControl: !1,
|
|
@@ -3634,7 +3637,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3634
3637
|
}), p.on("zoomend", () => {
|
|
3635
3638
|
O.value = p.getZoom();
|
|
3636
3639
|
});
|
|
3637
|
-
const J =
|
|
3640
|
+
const J = Ds(s.modelValue);
|
|
3638
3641
|
if (J) {
|
|
3639
3642
|
const N = [];
|
|
3640
3643
|
L.geoJSON(J).eachLayer((oe) => N.push(oe)), N.length && v.addLayer(N[0]), S(), H(), W();
|
|
@@ -3728,7 +3731,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3728
3731
|
setTimeout(() => {
|
|
3729
3732
|
p.invalidateSize();
|
|
3730
3733
|
}, 50);
|
|
3731
|
-
}), (b, V) => (i(),
|
|
3734
|
+
}), (b, V) => (i(), u("div", {
|
|
3732
3735
|
class: T(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: Te.value }])
|
|
3733
3736
|
}, [
|
|
3734
3737
|
l("div", {
|
|
@@ -3746,29 +3749,29 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3746
3749
|
"leave-to-class": "opacity-0"
|
|
3747
3750
|
}, {
|
|
3748
3751
|
default: Ee(() => [
|
|
3749
|
-
r.value && s.handleZoom ? (i(),
|
|
3750
|
-
l("div",
|
|
3751
|
-
l("p",
|
|
3752
|
+
r.value && s.handleZoom ? (i(), u("div", wr, [
|
|
3753
|
+
l("div", kr, [
|
|
3754
|
+
l("p", _r, K(d.value), 1)
|
|
3752
3755
|
])
|
|
3753
3756
|
])) : D("", !0)
|
|
3754
3757
|
]),
|
|
3755
3758
|
_: 1
|
|
3756
3759
|
}),
|
|
3757
|
-
l("div",
|
|
3758
|
-
R(
|
|
3759
|
-
l("div",
|
|
3760
|
-
l("div",
|
|
3760
|
+
l("div", $r, [
|
|
3761
|
+
R(mr, { onGoToCoordinates: Le }),
|
|
3762
|
+
l("div", Cr, [
|
|
3763
|
+
l("div", Vr, [
|
|
3761
3764
|
l("button", {
|
|
3762
3765
|
type: "button",
|
|
3763
3766
|
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",
|
|
3764
|
-
onClick:
|
|
3767
|
+
onClick: ee
|
|
3765
3768
|
}, "Import"),
|
|
3766
3769
|
l("button", {
|
|
3767
3770
|
type: "button",
|
|
3768
3771
|
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",
|
|
3769
3772
|
onClick: Ke,
|
|
3770
3773
|
disabled: C.value === 0
|
|
3771
|
-
}, "Export", 8,
|
|
3774
|
+
}, "Export", 8, Mr)
|
|
3772
3775
|
]),
|
|
3773
3776
|
l("input", {
|
|
3774
3777
|
ref_key: "importRef",
|
|
@@ -3780,9 +3783,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3780
3783
|
}, null, 544)
|
|
3781
3784
|
])
|
|
3782
3785
|
]),
|
|
3783
|
-
l("div",
|
|
3784
|
-
l("div",
|
|
3785
|
-
a.value.includes("marker") ? (i(),
|
|
3786
|
+
l("div", Lr, [
|
|
3787
|
+
l("div", Sr, [
|
|
3788
|
+
a.value.includes("marker") ? (i(), u("button", {
|
|
3786
3789
|
key: 0,
|
|
3787
3790
|
class: T(["vs-btn", { "vs-active": Z.value === "marker" }]),
|
|
3788
3791
|
"aria-pressed": Z.value === "marker",
|
|
@@ -3790,9 +3793,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3790
3793
|
"aria-label": "Draw point",
|
|
3791
3794
|
onClick: V[0] || (V[0] = (J) => we("marker"))
|
|
3792
3795
|
}, [
|
|
3793
|
-
R(
|
|
3794
|
-
], 10,
|
|
3795
|
-
a.value.includes("polyline") ? (i(),
|
|
3796
|
+
R(Ns)
|
|
3797
|
+
], 10, Br)) : D("", !0),
|
|
3798
|
+
a.value.includes("polyline") ? (i(), u("button", {
|
|
3796
3799
|
key: 1,
|
|
3797
3800
|
class: T(["vs-btn", { "vs-active": Z.value === "polyline" }]),
|
|
3798
3801
|
"aria-pressed": Z.value === "polyline",
|
|
@@ -3800,9 +3803,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3800
3803
|
"aria-label": "Draw polyline",
|
|
3801
3804
|
onClick: V[1] || (V[1] = (J) => we("polyline"))
|
|
3802
3805
|
}, [
|
|
3803
|
-
R(
|
|
3804
|
-
], 10,
|
|
3805
|
-
a.value.includes("polygon") ? (i(),
|
|
3806
|
+
R(Ws)
|
|
3807
|
+
], 10, jr)) : D("", !0),
|
|
3808
|
+
a.value.includes("polygon") ? (i(), u("button", {
|
|
3806
3809
|
key: 2,
|
|
3807
3810
|
class: T(["vs-btn", { "vs-active": Z.value === "polygon" }]),
|
|
3808
3811
|
"aria-pressed": Z.value === "polygon",
|
|
@@ -3810,9 +3813,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3810
3813
|
"aria-label": "Draw polygon",
|
|
3811
3814
|
onClick: V[2] || (V[2] = (J) => we("polygon"))
|
|
3812
3815
|
}, [
|
|
3813
|
-
R(
|
|
3814
|
-
], 10,
|
|
3815
|
-
a.value.includes("rectangle") ? (i(),
|
|
3816
|
+
R(Xs)
|
|
3817
|
+
], 10, Er)) : D("", !0),
|
|
3818
|
+
a.value.includes("rectangle") ? (i(), u("button", {
|
|
3816
3819
|
key: 3,
|
|
3817
3820
|
class: T(["vs-btn", { "vs-active": Z.value === "rectangle" }]),
|
|
3818
3821
|
"aria-pressed": Z.value === "rectangle",
|
|
@@ -3820,8 +3823,8 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3820
3823
|
"aria-label": "Draw rectangle",
|
|
3821
3824
|
onClick: V[3] || (V[3] = (J) => we("rectangle"))
|
|
3822
3825
|
}, [
|
|
3823
|
-
R(
|
|
3824
|
-
], 10,
|
|
3826
|
+
R(lr)
|
|
3827
|
+
], 10, Ir)) : D("", !0),
|
|
3825
3828
|
l("button", {
|
|
3826
3829
|
class: "vs-btn mt-5",
|
|
3827
3830
|
onClick: V[4] || (V[4] = (J) => {
|
|
@@ -3830,40 +3833,40 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3830
3833
|
title: "Full Screen",
|
|
3831
3834
|
"aria-label": "Full Screen"
|
|
3832
3835
|
}, [
|
|
3833
|
-
R(
|
|
3836
|
+
R(sr, { style: { width: "12px", height: "12px" } })
|
|
3834
3837
|
])
|
|
3835
3838
|
])
|
|
3836
3839
|
]),
|
|
3837
3840
|
l("div", {
|
|
3838
3841
|
class: T(["absolute left-4 z-[1000]", x.value ? "bottom-8" : "bottom-4"])
|
|
3839
3842
|
}, [
|
|
3840
|
-
R(
|
|
3843
|
+
R(xr, {
|
|
3841
3844
|
basemaps: le(j),
|
|
3842
3845
|
onOnLayerChange: Ue
|
|
3843
3846
|
}, null, 8, ["basemaps"])
|
|
3844
3847
|
], 2),
|
|
3845
|
-
l("div",
|
|
3846
|
-
x.value ? (i(),
|
|
3847
|
-
l("div",
|
|
3848
|
+
l("div", zr, [
|
|
3849
|
+
x.value ? (i(), u("div", Ar, [
|
|
3850
|
+
l("div", Tr, [
|
|
3848
3851
|
V[7] || (V[7] = he(" Тип: ", -1)),
|
|
3849
|
-
l("span",
|
|
3852
|
+
l("span", Fr, K(x.value.type), 1)
|
|
3850
3853
|
]),
|
|
3851
|
-
l("div",
|
|
3852
|
-
l("div",
|
|
3854
|
+
l("div", Or, [
|
|
3855
|
+
l("div", Ur, [
|
|
3853
3856
|
V[8] || (V[8] = he(" Центр: ", -1)),
|
|
3854
3857
|
l("b", null, K(x.value.center.lat.toFixed(5)) + ", " + K(x.value.center.lng.toFixed(5)), 1)
|
|
3855
3858
|
]),
|
|
3856
|
-
x.value.areaKm2 !== null ? (i(),
|
|
3859
|
+
x.value.areaKm2 !== null ? (i(), u("div", Dr, [
|
|
3857
3860
|
V[9] || (V[9] = he(" Площа: ", -1)),
|
|
3858
3861
|
l("b", null, K(x.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3859
|
-
])) : (i(),
|
|
3862
|
+
])) : (i(), u("div", Rr, V[10] || (V[10] = [
|
|
3860
3863
|
he(" Площа: ", -1),
|
|
3861
3864
|
l("b", null, "—", -1)
|
|
3862
3865
|
]))),
|
|
3863
3866
|
l("button", {
|
|
3864
3867
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3865
3868
|
title: "Наблизити",
|
|
3866
|
-
onClick: V[5] || (V[5] = (J) =>
|
|
3869
|
+
onClick: V[5] || (V[5] = (J) => Q())
|
|
3867
3870
|
}, V[11] || (V[11] = [
|
|
3868
3871
|
xe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-77633b64><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-77633b64></path><path d="M7 10l6 0" data-v-77633b64></path><path d="M10 7l0 6" data-v-77633b64></path><path d="M21 21l-6 -6" data-v-77633b64></path></svg>', 1)
|
|
3869
3872
|
])),
|
|
@@ -3879,10 +3882,10 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3879
3882
|
])
|
|
3880
3883
|
], 2));
|
|
3881
3884
|
}
|
|
3882
|
-
}),
|
|
3885
|
+
}), Hr = /* @__PURE__ */ X(Pr, [["__scopeId", "data-v-77633b64"]]), Nr = ["data-focus"], Gr = { class: "flex items-center" }, qr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Kr = ["onClick", "aria-label"], Wr = {
|
|
3883
3886
|
key: 0,
|
|
3884
3887
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3885
|
-
},
|
|
3888
|
+
}, Zr = { class: "flex-1 min-w-[2px]" }, Jr = ["placeholder"], Yr = { class: "flex items-center shrink-0" }, Xr = ["disabled"], Qr = /* @__PURE__ */ G({
|
|
3886
3889
|
__name: "vs-input-tag",
|
|
3887
3890
|
props: /* @__PURE__ */ ie({
|
|
3888
3891
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3901,7 +3904,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3901
3904
|
setup(o, { emit: e }) {
|
|
3902
3905
|
const t = o, s = e;
|
|
3903
3906
|
Ce(t.style);
|
|
3904
|
-
const n = w(null), a = w(null), r = w(null),
|
|
3907
|
+
const n = w(null), a = w(null), r = w(null), d = w(!1), c = w(""), f = de(o, "modelValue"), p = B(() => t.placeholder || "Add tag…"), v = B(() => f.value?.length === 0 && c.value === ""), k = B(() => !t.disabled && f.value?.length > 0), m = B(() => t.disabled), I = async () => {
|
|
3905
3908
|
m.value || await je(() => r.value?.focus());
|
|
3906
3909
|
}, $ = (j) => {
|
|
3907
3910
|
const M = j.trim();
|
|
@@ -3915,14 +3918,14 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3915
3918
|
}, O = () => {
|
|
3916
3919
|
s("update:modelValue", []);
|
|
3917
3920
|
}, C = () => {
|
|
3918
|
-
m.value || (
|
|
3921
|
+
m.value || (d.value = !0);
|
|
3919
3922
|
}, h = () => {
|
|
3920
|
-
|
|
3923
|
+
d.value = !1, !m.value && A();
|
|
3921
3924
|
}, x = (j) => {
|
|
3922
3925
|
const { key: M } = j;
|
|
3923
3926
|
M === "Enter" ? (j.preventDefault(), A()) : M === "Backspace" && c.value === "" && f.value.length > 0 && E(f.value.length - 1);
|
|
3924
3927
|
};
|
|
3925
|
-
return (j, M) => (i(),
|
|
3928
|
+
return (j, M) => (i(), u("div", {
|
|
3926
3929
|
class: "flex gap-1 w-full",
|
|
3927
3930
|
ref_key: "root",
|
|
3928
3931
|
ref: n,
|
|
@@ -3938,10 +3941,10 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3938
3941
|
class: T([
|
|
3939
3942
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
3940
3943
|
"border-gray-300 hover:border-gray-400",
|
|
3941
|
-
|
|
3944
|
+
d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
3942
3945
|
m.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3943
3946
|
]),
|
|
3944
|
-
"data-focus":
|
|
3947
|
+
"data-focus": d.value ? "true" : "false",
|
|
3945
3948
|
onClick: I
|
|
3946
3949
|
}, [
|
|
3947
3950
|
l("div", {
|
|
@@ -3949,17 +3952,17 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3949
3952
|
ref_key: "chipsRef",
|
|
3950
3953
|
ref: a
|
|
3951
3954
|
}, [
|
|
3952
|
-
(i(!0),
|
|
3955
|
+
(i(!0), u(re, null, pe(f.value, (P, te) => (i(), u("div", {
|
|
3953
3956
|
key: te,
|
|
3954
3957
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3955
3958
|
}, [
|
|
3956
|
-
l("div",
|
|
3957
|
-
l("div",
|
|
3959
|
+
l("div", Gr, [
|
|
3960
|
+
l("div", qr, K(P), 1)
|
|
3958
3961
|
]),
|
|
3959
3962
|
l("div", {
|
|
3960
3963
|
role: "button",
|
|
3961
3964
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
3962
|
-
onClick: $e((
|
|
3965
|
+
onClick: $e((Y) => E(te), ["stop"]),
|
|
3963
3966
|
"aria-label": `Remove ${P}`
|
|
3964
3967
|
}, M[2] || (M[2] = [
|
|
3965
3968
|
l("svg", {
|
|
@@ -3972,11 +3975,11 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3972
3975
|
}, [
|
|
3973
3976
|
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" })
|
|
3974
3977
|
], -1)
|
|
3975
|
-
]), 8,
|
|
3978
|
+
]), 8, Kr)
|
|
3976
3979
|
]))), 128)),
|
|
3977
|
-
v.value ? (i(),
|
|
3978
|
-
l("div",
|
|
3979
|
-
m.value ? D("", !0) : ne((i(),
|
|
3980
|
+
v.value ? (i(), u("div", Wr, K(p.value), 1)) : D("", !0),
|
|
3981
|
+
l("div", Zr, [
|
|
3982
|
+
m.value ? D("", !0) : ne((i(), u("input", {
|
|
3980
3983
|
key: 0,
|
|
3981
3984
|
ref_key: "inputRef",
|
|
3982
3985
|
ref: r,
|
|
@@ -3993,13 +3996,13 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
3993
3996
|
onBlur: h,
|
|
3994
3997
|
onKeydown: x,
|
|
3995
3998
|
placeholder: f.value && f.value.length ? "" : void 0
|
|
3996
|
-
}, null, 40,
|
|
3999
|
+
}, null, 40, Jr)), [
|
|
3997
4000
|
[me, c.value]
|
|
3998
4001
|
])
|
|
3999
4002
|
])
|
|
4000
4003
|
], 512),
|
|
4001
|
-
l("div",
|
|
4002
|
-
k.value ? (i(),
|
|
4004
|
+
l("div", Yr, [
|
|
4005
|
+
k.value ? (i(), u("button", {
|
|
4003
4006
|
key: 0,
|
|
4004
4007
|
type: "button",
|
|
4005
4008
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
@@ -4015,13 +4018,13 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4015
4018
|
}, [
|
|
4016
4019
|
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" })
|
|
4017
4020
|
], -1)
|
|
4018
|
-
]), 8,
|
|
4021
|
+
]), 8, Xr)) : D("", !0)
|
|
4019
4022
|
])
|
|
4020
|
-
], 10,
|
|
4023
|
+
], 10, Nr)
|
|
4021
4024
|
], 2)
|
|
4022
4025
|
], 512));
|
|
4023
4026
|
}
|
|
4024
|
-
}),
|
|
4027
|
+
}), ei = { class: "relative flex gap-1 bg-white w-full" }, ti = ["disabled", "placeholder"], li = /* @__PURE__ */ G({
|
|
4025
4028
|
__name: "vs-input-slug",
|
|
4026
4029
|
props: /* @__PURE__ */ ie({
|
|
4027
4030
|
disabled: { type: Boolean },
|
|
@@ -4035,7 +4038,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4035
4038
|
setup(o) {
|
|
4036
4039
|
const e = Ae("values"), t = o, s = de(o, "modelValue");
|
|
4037
4040
|
function n(r) {
|
|
4038
|
-
const
|
|
4041
|
+
const d = {
|
|
4039
4042
|
а: "a",
|
|
4040
4043
|
б: "b",
|
|
4041
4044
|
в: "v",
|
|
@@ -4074,20 +4077,20 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4074
4077
|
ї: "yi",
|
|
4075
4078
|
ґ: "g"
|
|
4076
4079
|
};
|
|
4077
|
-
return r.toLowerCase().split("").map((c) =>
|
|
4080
|
+
return r.toLowerCase().split("").map((c) => d[c] || c).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
4078
4081
|
}
|
|
4079
4082
|
const a = () => {
|
|
4080
|
-
const r = e?.value?.[t.parent || ""]?.toString(),
|
|
4081
|
-
s.value =
|
|
4083
|
+
const r = e?.value?.[t.parent || ""]?.toString(), d = n(r);
|
|
4084
|
+
s.value = d.toString();
|
|
4082
4085
|
};
|
|
4083
|
-
return (r,
|
|
4086
|
+
return (r, d) => (i(), u("div", ei, [
|
|
4084
4087
|
ne(l("input", {
|
|
4085
4088
|
ref: "vsText",
|
|
4086
4089
|
disabled: r.disabled,
|
|
4087
4090
|
placeholder: r.placeholder,
|
|
4088
|
-
"onUpdate:modelValue":
|
|
4091
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => s.value = c),
|
|
4089
4092
|
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"
|
|
4090
|
-
}, null, 8,
|
|
4093
|
+
}, null, 8, ti), [
|
|
4091
4094
|
[me, s.value]
|
|
4092
4095
|
]),
|
|
4093
4096
|
l("button", {
|
|
@@ -4096,7 +4099,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4096
4099
|
}, " Gen ")
|
|
4097
4100
|
]));
|
|
4098
4101
|
}
|
|
4099
|
-
}),
|
|
4102
|
+
}), oi = /* @__PURE__ */ X(li, [["__scopeId", "data-v-b0eba370"]]), ni = { class: "relative flex gap-1 bg-white w-full" }, ai = ["disabled", "placeholder"], si = ["disabled"], ri = { key: 0 }, ii = { key: 1 }, ui = /* @__PURE__ */ G({
|
|
4100
4103
|
__name: "vs-input-codegen",
|
|
4101
4104
|
props: /* @__PURE__ */ ie({
|
|
4102
4105
|
table: {},
|
|
@@ -4121,7 +4124,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4121
4124
|
if (!a.value) return "";
|
|
4122
4125
|
const f = encodeURIComponent(String(e.table)), p = encodeURIComponent(String(e.code));
|
|
4123
4126
|
return `/api/code-gen/${f}/${p}`;
|
|
4124
|
-
},
|
|
4127
|
+
}, d = async () => {
|
|
4125
4128
|
if (!a.value || s.value) return;
|
|
4126
4129
|
const f = r();
|
|
4127
4130
|
if (f) {
|
|
@@ -4134,7 +4137,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4134
4137
|
}
|
|
4135
4138
|
}
|
|
4136
4139
|
}, c = () => {
|
|
4137
|
-
n.value && (t.value ||
|
|
4140
|
+
n.value && (t.value || d());
|
|
4138
4141
|
};
|
|
4139
4142
|
return ye(() => {
|
|
4140
4143
|
c();
|
|
@@ -4143,31 +4146,31 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4143
4146
|
() => {
|
|
4144
4147
|
c();
|
|
4145
4148
|
}
|
|
4146
|
-
), (f, p) => (i(),
|
|
4149
|
+
), (f, p) => (i(), u("div", ni, [
|
|
4147
4150
|
ne(l("input", {
|
|
4148
4151
|
disabled: f.disabled,
|
|
4149
4152
|
placeholder: f.placeholder,
|
|
4150
4153
|
"onUpdate:modelValue": p[0] || (p[0] = (v) => t.value = v),
|
|
4151
4154
|
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"
|
|
4152
|
-
}, null, 8,
|
|
4155
|
+
}, null, 8, ai), [
|
|
4153
4156
|
[me, t.value]
|
|
4154
4157
|
]),
|
|
4155
4158
|
l("button", {
|
|
4156
4159
|
class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4157
4160
|
disabled: s.value || f.disabled || !a.value,
|
|
4158
|
-
onClick:
|
|
4161
|
+
onClick: d
|
|
4159
4162
|
}, [
|
|
4160
|
-
s.value ? (i(),
|
|
4161
|
-
], 8,
|
|
4163
|
+
s.value ? (i(), u("span", ii, "...")) : (i(), u("span", ri, "Gen"))
|
|
4164
|
+
], 8, si)
|
|
4162
4165
|
]));
|
|
4163
4166
|
}
|
|
4164
|
-
}),
|
|
4167
|
+
}), di = /* @__PURE__ */ X(ui, [["__scopeId", "data-v-6ee5237d"]]), ci = { class: "w-full" }, pi = {
|
|
4165
4168
|
ref: "sortableContainer",
|
|
4166
4169
|
class: "flex flex-col gap-1"
|
|
4167
|
-
},
|
|
4170
|
+
}, fi = ["onDragstart", "onDrop"], vi = { class: "w-1/3" }, mi = { class: "w-2/3" }, hi = ["onClick"], gi = {
|
|
4168
4171
|
key: 0,
|
|
4169
4172
|
class: "text-[14px] text-gray-700"
|
|
4170
|
-
},
|
|
4173
|
+
}, bi = { class: "mt-2 w-full flex items-center" }, yi = ["disabled"], xi = /* @__PURE__ */ G({
|
|
4171
4174
|
__name: "vs-input-key-value",
|
|
4172
4175
|
props: {
|
|
4173
4176
|
parent: {},
|
|
@@ -4177,10 +4180,10 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4177
4180
|
},
|
|
4178
4181
|
emits: ["update:modelValue"],
|
|
4179
4182
|
setup(o, { emit: e }) {
|
|
4180
|
-
const t = (A) => `${A}-${Math.random().toString(36).substring(2, 15)}`, s = Ae("values"), n = o, a = e, r = n.addButtonText ?? "Додати",
|
|
4183
|
+
const t = (A) => `${A}-${Math.random().toString(36).substring(2, 15)}`, s = Ae("values"), n = o, a = e, r = n.addButtonText ?? "Додати", d = n.ignore ?? [], c = w([]), f = w(null);
|
|
4181
4184
|
(() => {
|
|
4182
4185
|
const A = n.parent && s?.value?.[n.parent] || n.modelValue || {};
|
|
4183
|
-
c.value = Object.entries(A).filter(([E]) => !
|
|
4186
|
+
c.value = Object.entries(A).filter(([E]) => !d.includes(E)).map(([E, O]) => ({
|
|
4184
4187
|
id: t("key-value-"),
|
|
4185
4188
|
key: E,
|
|
4186
4189
|
value: O
|
|
@@ -4209,7 +4212,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4209
4212
|
C.key && C.value !== void 0 && (E[C.key] = C.value);
|
|
4210
4213
|
});
|
|
4211
4214
|
const O = {};
|
|
4212
|
-
|
|
4215
|
+
d.length && d.forEach((C) => {
|
|
4213
4216
|
O[C] = n.parent ? s?.value?.[n.parent]?.[C] : void 0;
|
|
4214
4217
|
}), s?.value && n.parent && (s.value[n.parent] = {
|
|
4215
4218
|
...O,
|
|
@@ -4217,9 +4220,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4217
4220
|
}), a("update:modelValue", E);
|
|
4218
4221
|
},
|
|
4219
4222
|
{ deep: !0 }
|
|
4220
|
-
), (A, E) => (i(),
|
|
4221
|
-
l("div",
|
|
4222
|
-
(i(!0),
|
|
4223
|
+
), (A, E) => (i(), u("div", ci, [
|
|
4224
|
+
l("div", pi, [
|
|
4225
|
+
(i(!0), u(re, null, pe(c.value, (O, C) => (i(), u("div", {
|
|
4223
4226
|
key: O.id,
|
|
4224
4227
|
class: T(["flex items-center gap-2 w-full", { "opacity-50": f.value === C }]),
|
|
4225
4228
|
draggable: "true",
|
|
@@ -4229,14 +4232,14 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4229
4232
|
onDrop: (h) => k(C)
|
|
4230
4233
|
}, [
|
|
4231
4234
|
E[1] || (E[1] = xe('<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)),
|
|
4232
|
-
l("div",
|
|
4235
|
+
l("div", vi, [
|
|
4233
4236
|
R(Ye, {
|
|
4234
4237
|
modelValue: O.key,
|
|
4235
4238
|
"onUpdate:modelValue": (h) => O.key = h,
|
|
4236
4239
|
placeholder: "Ключ"
|
|
4237
4240
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4238
4241
|
]),
|
|
4239
|
-
l("div",
|
|
4242
|
+
l("div", mi, [
|
|
4240
4243
|
R(Ye, {
|
|
4241
4244
|
modelValue: O.value,
|
|
4242
4245
|
"onUpdate:modelValue": (h) => O.value = h,
|
|
@@ -4251,11 +4254,11 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4251
4254
|
height: "16",
|
|
4252
4255
|
width: "16"
|
|
4253
4256
|
})
|
|
4254
|
-
], 8,
|
|
4255
|
-
], 42,
|
|
4257
|
+
], 8, hi)
|
|
4258
|
+
], 42, fi))), 128))
|
|
4256
4259
|
], 512),
|
|
4257
|
-
c.value.length ? D("", !0) : (i(),
|
|
4258
|
-
l("div",
|
|
4260
|
+
c.value.length ? D("", !0) : (i(), u("span", gi, " Дані для відображення відсутні ")),
|
|
4261
|
+
l("div", bi, [
|
|
4259
4262
|
l("button", {
|
|
4260
4263
|
type: "button",
|
|
4261
4264
|
onClick: I,
|
|
@@ -4267,11 +4270,11 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4267
4270
|
width: "14"
|
|
4268
4271
|
}),
|
|
4269
4272
|
he(" " + K(le(r)), 1)
|
|
4270
|
-
], 8,
|
|
4273
|
+
], 8, yi)
|
|
4271
4274
|
])
|
|
4272
4275
|
]));
|
|
4273
4276
|
}
|
|
4274
|
-
}),
|
|
4277
|
+
}), wi = /* @__PURE__ */ X(xi, [["__scopeId", "data-v-a0f7fbfc"]]), ki = { class: "flex items-center gap-2 w-full" }, _i = ["disabled"], $i = /* @__PURE__ */ G({
|
|
4275
4278
|
__name: "vs-input-color",
|
|
4276
4279
|
props: {
|
|
4277
4280
|
style: { default: () => ({}) },
|
|
@@ -4288,26 +4291,26 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4288
4291
|
get: () => t.modelValue || "#000000",
|
|
4289
4292
|
set: (r) => n("update:modelValue", r)
|
|
4290
4293
|
});
|
|
4291
|
-
return (r,
|
|
4294
|
+
return (r, d) => (i(), u("div", ki, [
|
|
4292
4295
|
ne(l("input", {
|
|
4293
4296
|
type: "color",
|
|
4294
|
-
"onUpdate:modelValue":
|
|
4297
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
|
|
4295
4298
|
disabled: r.disabled,
|
|
4296
4299
|
ref: "color",
|
|
4297
4300
|
class: T(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")]),
|
|
4298
4301
|
style: { border: "1px solid #CFD9E0" }
|
|
4299
|
-
}, null, 10,
|
|
4302
|
+
}, null, 10, _i), [
|
|
4300
4303
|
[me, a.value]
|
|
4301
4304
|
]),
|
|
4302
4305
|
ne(l("input", {
|
|
4303
4306
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
4304
|
-
"onUpdate:modelValue":
|
|
4307
|
+
"onUpdate:modelValue": d[1] || (d[1] = (c) => a.value = c)
|
|
4305
4308
|
}, null, 512), [
|
|
4306
4309
|
[me, a.value]
|
|
4307
4310
|
])
|
|
4308
4311
|
]));
|
|
4309
4312
|
}
|
|
4310
|
-
}),
|
|
4313
|
+
}), Ci = { class: "flex items-center gap-2 w-full" }, Vi = ["min", "max", "step", "disabled"], Mi = /* @__PURE__ */ G({
|
|
4311
4314
|
__name: "vs-input-range",
|
|
4312
4315
|
props: {
|
|
4313
4316
|
style: { default: () => ({}) },
|
|
@@ -4327,29 +4330,29 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4327
4330
|
get: () => Number(t.modelValue ?? t.min),
|
|
4328
4331
|
set: (r) => n("update:modelValue", Number(r))
|
|
4329
4332
|
});
|
|
4330
|
-
return (r,
|
|
4333
|
+
return (r, d) => (i(), u("div", Ci, [
|
|
4331
4334
|
ne(l("input", {
|
|
4332
4335
|
type: "range",
|
|
4333
|
-
"onUpdate:modelValue":
|
|
4336
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
|
|
4334
4337
|
min: r.min,
|
|
4335
4338
|
max: r.max,
|
|
4336
4339
|
step: r.step,
|
|
4337
4340
|
disabled: r.disabled,
|
|
4338
4341
|
ref: "range",
|
|
4339
4342
|
class: T(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")])
|
|
4340
|
-
}, null, 10,
|
|
4343
|
+
}, null, 10, Vi), [
|
|
4341
4344
|
[me, a.value]
|
|
4342
4345
|
]),
|
|
4343
4346
|
ne(l("input", {
|
|
4344
4347
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
4345
4348
|
type: "number",
|
|
4346
|
-
"onUpdate:modelValue":
|
|
4349
|
+
"onUpdate:modelValue": d[1] || (d[1] = (c) => a.value = c)
|
|
4347
4350
|
}, null, 512), [
|
|
4348
4351
|
[me, a.value]
|
|
4349
4352
|
])
|
|
4350
4353
|
]));
|
|
4351
4354
|
}
|
|
4352
|
-
}),
|
|
4355
|
+
}), Li = ["type", "value", "onInput", "placeholder", "disabled"], Si = /* @__PURE__ */ G({
|
|
4353
4356
|
__name: "vs-input-array",
|
|
4354
4357
|
props: /* @__PURE__ */ ie({
|
|
4355
4358
|
count: { default: 1 },
|
|
@@ -4377,26 +4380,26 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4377
4380
|
]);
|
|
4378
4381
|
});
|
|
4379
4382
|
function n(a, r) {
|
|
4380
|
-
const
|
|
4381
|
-
c[r] = e.inputType === "text" ?
|
|
4383
|
+
const d = a.target.value, c = [...s.value];
|
|
4384
|
+
c[r] = e.inputType === "text" ? d : Number(d), s.value = c;
|
|
4382
4385
|
}
|
|
4383
|
-
return (a, r) => (i(),
|
|
4386
|
+
return (a, r) => (i(), u("div", {
|
|
4384
4387
|
class: T(["grid gap-2", `grid-cols-${a.limit}`])
|
|
4385
4388
|
}, [
|
|
4386
|
-
(i(!0),
|
|
4389
|
+
(i(!0), u(re, null, pe(a.count, (d) => (i(), u("input", {
|
|
4387
4390
|
type: a.inputType,
|
|
4388
|
-
value: s.value?.[
|
|
4389
|
-
onInput: (c) => n(c,
|
|
4391
|
+
value: s.value?.[d - 1] ?? "",
|
|
4392
|
+
onInput: (c) => n(c, d - 1),
|
|
4390
4393
|
placeholder: a.placeholder,
|
|
4391
4394
|
disabled: a.disabled,
|
|
4392
4395
|
class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": a.error }]]),
|
|
4393
4396
|
style: {
|
|
4394
4397
|
border: "1px solid #CFD9E0"
|
|
4395
4398
|
}
|
|
4396
|
-
}, null, 42,
|
|
4399
|
+
}, null, 42, Li))), 256))
|
|
4397
4400
|
], 2));
|
|
4398
4401
|
}
|
|
4399
|
-
}),
|
|
4402
|
+
}), Bi = {
|
|
4400
4403
|
VsInputText: Ye,
|
|
4401
4404
|
VsInputRadio: kt,
|
|
4402
4405
|
"vs-input-text": Ye,
|
|
@@ -4414,18 +4417,18 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4414
4417
|
"vs-input-file": un,
|
|
4415
4418
|
"vs-input-html": wt,
|
|
4416
4419
|
"vs-input-email": so,
|
|
4417
|
-
"vs-input-datatable":
|
|
4418
|
-
"vs-input-map":
|
|
4420
|
+
"vs-input-datatable": Os,
|
|
4421
|
+
"vs-input-map": Hr,
|
|
4419
4422
|
"vs-input-file-list": Un,
|
|
4420
|
-
"vs-input-tags":
|
|
4421
|
-
"vs-input-slug":
|
|
4422
|
-
"vs-input-codegen":
|
|
4423
|
-
"vs-input-key-value":
|
|
4424
|
-
"vs-input-range":
|
|
4425
|
-
"vs-input-color":
|
|
4423
|
+
"vs-input-tags": Qr,
|
|
4424
|
+
"vs-input-slug": oi,
|
|
4425
|
+
"vs-input-codegen": di,
|
|
4426
|
+
"vs-input-key-value": wi,
|
|
4427
|
+
"vs-input-range": Mi,
|
|
4428
|
+
"vs-input-color": $i,
|
|
4426
4429
|
"vs-input-native-select": Vt,
|
|
4427
|
-
"vs-input-array":
|
|
4428
|
-
},
|
|
4430
|
+
"vs-input-array": Si
|
|
4431
|
+
}, ji = /* @__PURE__ */ G({
|
|
4429
4432
|
__name: "behavior",
|
|
4430
4433
|
props: {
|
|
4431
4434
|
api: {},
|
|
@@ -4446,18 +4449,18 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4446
4449
|
}
|
|
4447
4450
|
const r = await a.json();
|
|
4448
4451
|
if (!e.set || !t) return;
|
|
4449
|
-
for (const [
|
|
4450
|
-
t.value[
|
|
4452
|
+
for (const [d, c] of Object.entries(e.set))
|
|
4453
|
+
t.value[d] = r.result[c];
|
|
4451
4454
|
} catch (n) {
|
|
4452
4455
|
console.error(e.error, n);
|
|
4453
4456
|
}
|
|
4454
4457
|
}
|
|
4455
|
-
return (n, a) => (i(),
|
|
4458
|
+
return (n, a) => (i(), u("button", {
|
|
4456
4459
|
onClick: s,
|
|
4457
4460
|
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"
|
|
4458
4461
|
}, K(n.button), 1));
|
|
4459
4462
|
}
|
|
4460
|
-
}),
|
|
4463
|
+
}), Ei = { class: "flex flex-col gap-1 w-full" }, Ii = {
|
|
4461
4464
|
key: 0,
|
|
4462
4465
|
class: "text-sm text-gray-500"
|
|
4463
4466
|
}, Ot = /* @__PURE__ */ G({
|
|
@@ -4475,21 +4478,21 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4475
4478
|
}),
|
|
4476
4479
|
emits: ["update:modelValue"],
|
|
4477
4480
|
setup(o) {
|
|
4478
|
-
const e = o, t = de(o, "modelValue"), s = B(() => bl[`${e.layout}`]), n = B(() =>
|
|
4479
|
-
const
|
|
4480
|
-
if (!
|
|
4481
|
-
const c =
|
|
4481
|
+
const e = o, t = de(o, "modelValue"), s = B(() => bl[`${e.layout}`]), n = B(() => Bi?.[`vs-input-${e.item.type}`]), a = B(() => {
|
|
4482
|
+
const d = le(n);
|
|
4483
|
+
if (!d) return /* @__PURE__ */ new Set();
|
|
4484
|
+
const c = d.props ?? d.__vccOpts?.props;
|
|
4482
4485
|
if (!c) return /* @__PURE__ */ new Set();
|
|
4483
4486
|
const f = Array.isArray(c) ? c : Object.keys(c);
|
|
4484
4487
|
return new Set(f);
|
|
4485
4488
|
}), r = B(() => {
|
|
4486
|
-
const
|
|
4487
|
-
return c.size ? Object.fromEntries(Object.entries(
|
|
4489
|
+
const d = e.item ?? {}, c = a.value;
|
|
4490
|
+
return c.size ? Object.fromEntries(Object.entries(d).filter(([f]) => c.has(f))) : {};
|
|
4488
4491
|
});
|
|
4489
|
-
return (
|
|
4492
|
+
return (d, c) => (i(), ve(Oe(s.value), {
|
|
4490
4493
|
ua: e.item.ua,
|
|
4491
4494
|
error: e.error || "",
|
|
4492
|
-
item:
|
|
4495
|
+
item: d.item,
|
|
4493
4496
|
columns: e.columns,
|
|
4494
4497
|
label: e.item.label
|
|
4495
4498
|
}, {
|
|
@@ -4497,20 +4500,20 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4497
4500
|
l("div", {
|
|
4498
4501
|
class: T(["flex w-full", `${e.item.type}-component`])
|
|
4499
4502
|
}, [
|
|
4500
|
-
l("div",
|
|
4503
|
+
l("div", Ei, [
|
|
4501
4504
|
(i(), ve(Oe(n.value), Fe(r.value, {
|
|
4502
4505
|
modelValue: t.value,
|
|
4503
4506
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f)
|
|
4504
4507
|
}), null, 16, ["modelValue"])),
|
|
4505
|
-
|
|
4508
|
+
d.item.description && e.layout !== "settings" ? (i(), u("p", Ii, K(d.item.description), 1)) : D("", !0)
|
|
4506
4509
|
]),
|
|
4507
|
-
|
|
4510
|
+
d.item.behavior?.api && d.item.behavior?.button ? (i(), ve(ji, Fe({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
|
|
4508
4511
|
], 2)
|
|
4509
4512
|
]),
|
|
4510
4513
|
_: 1
|
|
4511
4514
|
}, 8, ["ua", "error", "item", "columns", "label"]));
|
|
4512
4515
|
}
|
|
4513
|
-
}),
|
|
4516
|
+
}), zi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, Ai = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Ti = ["onClick"], Fi = /* @__PURE__ */ G({
|
|
4514
4517
|
__name: "vs-compact-form-navigation",
|
|
4515
4518
|
props: {
|
|
4516
4519
|
target: {},
|
|
@@ -4520,7 +4523,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4520
4523
|
width: { default: 400 }
|
|
4521
4524
|
},
|
|
4522
4525
|
setup(o, { expose: e }) {
|
|
4523
|
-
const t = o, s = w([]), n = w(""), a = w(""), r = B(() => !!t.enabled),
|
|
4526
|
+
const t = o, s = w([]), n = w(""), a = w(""), r = B(() => !!t.enabled), d = B(() => [
|
|
4524
4527
|
"vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
|
|
4525
4528
|
"sticky top-0 self-start shrink-0",
|
|
4526
4529
|
"max-h-full min-h-0 overflow-y-auto"
|
|
@@ -4563,9 +4566,9 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4563
4566
|
return;
|
|
4564
4567
|
}
|
|
4565
4568
|
if (m = S ?? null, typeof window > "u") return;
|
|
4566
|
-
const
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
+
const ee = S ?? window, Z = window;
|
|
4570
|
+
ee.addEventListener("scroll", $, { passive: !0 }), Z.addEventListener("resize", A), I = () => {
|
|
4571
|
+
ee.removeEventListener("scroll", $), Z.removeEventListener("resize", A);
|
|
4569
4572
|
};
|
|
4570
4573
|
}
|
|
4571
4574
|
function O() {
|
|
@@ -4578,21 +4581,21 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4578
4581
|
}
|
|
4579
4582
|
function C() {
|
|
4580
4583
|
if (!r.value || !k) return;
|
|
4581
|
-
const S = Array.from(k.querySelectorAll("h1, h2")), W = /* @__PURE__ */ new Set(),
|
|
4584
|
+
const S = Array.from(k.querySelectorAll("h1, h2")), W = /* @__PURE__ */ new Set(), ee = [];
|
|
4582
4585
|
S.forEach((Z, U) => {
|
|
4583
4586
|
const F = Z.textContent?.trim() ?? "";
|
|
4584
4587
|
if (!F) return;
|
|
4585
4588
|
let z = (Z.getAttribute("id") ?? "").trim();
|
|
4586
4589
|
z || (z = h(F) || `heading-${U + 1}`);
|
|
4587
|
-
let H = z,
|
|
4590
|
+
let H = z, Q = 1;
|
|
4588
4591
|
for (; W.has(H); )
|
|
4589
|
-
H = `${z}-${
|
|
4590
|
-
Z.id !== H && Object.assign(Z, { id: H }), W.add(H),
|
|
4592
|
+
H = `${z}-${Q += 1}`;
|
|
4593
|
+
Z.id !== H && Object.assign(Z, { id: H }), W.add(H), ee.push({
|
|
4591
4594
|
id: H,
|
|
4592
4595
|
text: F,
|
|
4593
4596
|
level: Z.tagName.toLowerCase() === "h1" ? 1 : 2
|
|
4594
4597
|
});
|
|
4595
|
-
}), s.value =
|
|
4598
|
+
}), s.value = ee, ee.length || (n.value = ""), P();
|
|
4596
4599
|
}
|
|
4597
4600
|
function h(S) {
|
|
4598
4601
|
return S.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
|
|
@@ -4607,18 +4610,18 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4607
4610
|
const W = m;
|
|
4608
4611
|
if (!W)
|
|
4609
4612
|
return typeof window > "u" ? S.offsetTop : S.getBoundingClientRect().top + window.scrollY;
|
|
4610
|
-
const
|
|
4611
|
-
return
|
|
4613
|
+
const ee = S.getBoundingClientRect(), Z = W.getBoundingClientRect();
|
|
4614
|
+
return ee.top - Z.top + W.scrollTop;
|
|
4612
4615
|
}
|
|
4613
4616
|
function P() {
|
|
4614
4617
|
if (!r.value || !s.value.length) return;
|
|
4615
|
-
const S = m, W = (S ? S.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0),
|
|
4618
|
+
const S = m, W = (S ? S.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ee = (S ? S.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = W + ee;
|
|
4616
4619
|
let U = null;
|
|
4617
4620
|
for (let z = 0; z < s.value.length; z += 1) {
|
|
4618
|
-
const H = s.value[z],
|
|
4619
|
-
if (
|
|
4620
|
-
const ge = M(
|
|
4621
|
-
ge +
|
|
4621
|
+
const H = s.value[z], Q = document.getElementById(H.id);
|
|
4622
|
+
if (Q) {
|
|
4623
|
+
const ge = M(Q);
|
|
4624
|
+
ge + Q.offsetHeight > W && ge < Z && (U = H.id);
|
|
4622
4625
|
}
|
|
4623
4626
|
}
|
|
4624
4627
|
!U && a.value && (U = a.value), U && (a.value = U);
|
|
@@ -4630,66 +4633,66 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4630
4633
|
P(), v = 0;
|
|
4631
4634
|
}));
|
|
4632
4635
|
}
|
|
4633
|
-
function
|
|
4636
|
+
function Y(S) {
|
|
4634
4637
|
if (!r.value) return;
|
|
4635
4638
|
const W = document.getElementById(S);
|
|
4636
4639
|
if (!W) return;
|
|
4637
|
-
const
|
|
4638
|
-
|
|
4640
|
+
const ee = m, Z = Math.max(0, M(W));
|
|
4641
|
+
ee ? ee.scrollTo({ top: Z, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Z, behavior: "smooth" });
|
|
4639
4642
|
}
|
|
4640
|
-
return e({ refresh: O }), (S, W) => r.value && s.value.length ? (i(),
|
|
4643
|
+
return e({ refresh: O }), (S, W) => r.value && s.value.length ? (i(), u("div", {
|
|
4641
4644
|
key: 0,
|
|
4642
|
-
class: T(
|
|
4645
|
+
class: T(d.value),
|
|
4643
4646
|
style: be(c.value)
|
|
4644
4647
|
}, [
|
|
4645
|
-
l("h2",
|
|
4646
|
-
l("div",
|
|
4647
|
-
(i(!0),
|
|
4648
|
-
key:
|
|
4648
|
+
l("h2", zi, K(S.title), 1),
|
|
4649
|
+
l("div", Ai, [
|
|
4650
|
+
(i(!0), u(re, null, pe(s.value, (ee) => (i(), u("div", {
|
|
4651
|
+
key: ee.id,
|
|
4649
4652
|
class: T([
|
|
4650
4653
|
"vs-compact-form-navigation__item relative",
|
|
4651
|
-
|
|
4652
|
-
|
|
4654
|
+
ee.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
|
|
4655
|
+
ee.id === n.value ? "vs-compact-form-navigation__item--active" : ""
|
|
4653
4656
|
])
|
|
4654
4657
|
}, [
|
|
4655
4658
|
l("button", {
|
|
4656
4659
|
type: "button",
|
|
4657
|
-
onClick: (Z) =>
|
|
4660
|
+
onClick: (Z) => Y(ee.id),
|
|
4658
4661
|
class: T([
|
|
4659
4662
|
"vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",
|
|
4660
|
-
|
|
4661
|
-
|
|
4663
|
+
ee.level === 2 ? "pl-[15px]" : "pl-[18px]",
|
|
4664
|
+
ee.id === n.value ? "text-gray-800" : "text-gray-500"
|
|
4662
4665
|
])
|
|
4663
4666
|
}, [
|
|
4664
|
-
l("span", null, K(
|
|
4665
|
-
], 10,
|
|
4667
|
+
l("span", null, K(ee.text), 1)
|
|
4668
|
+
], 10, Ti)
|
|
4666
4669
|
], 2))), 128))
|
|
4667
4670
|
])
|
|
4668
4671
|
], 6)) : D("", !0);
|
|
4669
4672
|
}
|
|
4670
|
-
}),
|
|
4673
|
+
}), Oi = /* @__PURE__ */ X(Fi, [["__scopeId", "data-v-1584a562"]]), Ut = {
|
|
4671
4674
|
required: "Це поле є обов’язковим",
|
|
4672
4675
|
email: "Неправильний email"
|
|
4673
|
-
},
|
|
4676
|
+
}, Ui = (o) => o ? !1 : Ut.required, Di = (o) => {
|
|
4674
4677
|
const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
4675
4678
|
return o ? e.test(o) ? !1 : Ut.email : !1;
|
|
4676
|
-
},
|
|
4679
|
+
}, Ri = (o, e) => {
|
|
4677
4680
|
const t = e.pattern ?? e.regexp;
|
|
4678
4681
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
4679
|
-
},
|
|
4682
|
+
}, Pi = (o, e) => !1, Hi = (o, e) => {
|
|
4680
4683
|
switch (typeof e == "string" ? e : e.type) {
|
|
4681
4684
|
case "required":
|
|
4682
|
-
return Oi(o);
|
|
4683
|
-
case "email":
|
|
4684
4685
|
return Ui(o);
|
|
4686
|
+
case "email":
|
|
4687
|
+
return Di(o);
|
|
4685
4688
|
case "regexp":
|
|
4686
|
-
return
|
|
4689
|
+
return Ri(o, e);
|
|
4687
4690
|
case "custom":
|
|
4688
|
-
return
|
|
4691
|
+
return Pi();
|
|
4689
4692
|
default:
|
|
4690
4693
|
return !1;
|
|
4691
4694
|
}
|
|
4692
|
-
},
|
|
4695
|
+
}, Ni = {
|
|
4693
4696
|
autocomplete: "select",
|
|
4694
4697
|
combobox: "select",
|
|
4695
4698
|
datepicker: "date",
|
|
@@ -4704,7 +4707,7 @@ const ar = /* @__PURE__ */ Y(lr, [["render", nr]]), sr = { class: "map-search-wi
|
|
|
4704
4707
|
};
|
|
4705
4708
|
function Lt(o) {
|
|
4706
4709
|
const e = o.toLowerCase();
|
|
4707
|
-
return
|
|
4710
|
+
return Ni[e] || e;
|
|
4708
4711
|
}
|
|
4709
4712
|
function nt(o, e = !1) {
|
|
4710
4713
|
if (Array.isArray(o)) {
|
|
@@ -4727,7 +4730,7 @@ function nt(o, e = !1) {
|
|
|
4727
4730
|
n.type === "email" && !n.rules && (n.rules = ["email"]), s[1].type.includes("list") && (n.multiple = !0), !n.api && s[1].data && (n.api = `/api/suggest/${s[1].data}`), Array.isArray(n.schema) && (n.schema = nt(n.schema, n.disabled)), t.push(n);
|
|
4728
4731
|
}), t;
|
|
4729
4732
|
}
|
|
4730
|
-
function
|
|
4733
|
+
function Gi(o, e, t = !1) {
|
|
4731
4734
|
const s = B(() => nt(
|
|
4732
4735
|
(Array.isArray(e), e),
|
|
4733
4736
|
typeof t == "boolean" ? t : t.value
|
|
@@ -4746,22 +4749,22 @@ function Ni(o, e, t = !1) {
|
|
|
4746
4749
|
}
|
|
4747
4750
|
let k = !1, m = null;
|
|
4748
4751
|
v.rules.forEach((I) => {
|
|
4749
|
-
const $ =
|
|
4752
|
+
const $ = Hi(o.value[v.name], I);
|
|
4750
4753
|
$ && (k = !0, !m && typeof $ == "string" && (m = $));
|
|
4751
4754
|
}), k && m ? n.value[v.name] = m : delete n.value[v.name];
|
|
4752
4755
|
}
|
|
4753
4756
|
v.schema && r(v.schema, !1);
|
|
4754
|
-
}), p && Object.values(n.value).some(Boolean) ? n.value : null),
|
|
4757
|
+
}), p && Object.values(n.value).some(Boolean) ? n.value : null), d = B(() => s.value?.filter((f) => f.hidden !== !0 && a(f)));
|
|
4755
4758
|
return {
|
|
4756
4759
|
errors: n,
|
|
4757
4760
|
validate: r,
|
|
4758
4761
|
reset: () => {
|
|
4759
4762
|
o.value = {}, n.value = {};
|
|
4760
4763
|
},
|
|
4761
|
-
visibleSchema:
|
|
4764
|
+
visibleSchema: d
|
|
4762
4765
|
};
|
|
4763
4766
|
}
|
|
4764
|
-
const
|
|
4767
|
+
const qi = { class: "flex w-full h-full min-h-0 gap-6" }, Ki = {
|
|
4765
4768
|
key: 0,
|
|
4766
4769
|
"data-orientation": "horizontal",
|
|
4767
4770
|
role: "none",
|
|
@@ -4787,21 +4790,21 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4787
4790
|
emits: /* @__PURE__ */ ie(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
|
|
4788
4791
|
setup(o, { expose: e, emit: t }) {
|
|
4789
4792
|
const s = t, n = o, a = de(o, "form"), r = de(o, "values"), {
|
|
4790
|
-
errors:
|
|
4793
|
+
errors: d,
|
|
4791
4794
|
validate: c,
|
|
4792
4795
|
reset: f,
|
|
4793
4796
|
visibleSchema: p
|
|
4794
|
-
} =
|
|
4797
|
+
} = Gi(r, n.schema, Zt(n, "disabled")), v = w(null), k = w(null), m = B(() => n.navigation), I = B(() => n.navWidth), $ = B(() => n.style?.columns), A = Object.freeze({ container: 12, label: 3 }), E = B(() => n.columns ?? $.value ?? A), O = B(() => n.columns != null || $.value != null), C = B(() => O.value ? "horizontal" : n.layout), h = (P) => P?.columns ? "horizontal" : C.value, x = (P) => P?.columns ?? E.value, j = () => {
|
|
4795
4798
|
s("update:modelValue", r.value), c(), s("handle-submit", r.value);
|
|
4796
4799
|
};
|
|
4797
4800
|
e({
|
|
4798
4801
|
validate: c,
|
|
4799
4802
|
reset: f,
|
|
4800
|
-
errors:
|
|
4803
|
+
errors: d
|
|
4801
4804
|
}), ye(() => {
|
|
4802
4805
|
n.modelValue && (r.value = n.modelValue), a.value = {
|
|
4803
4806
|
value: r.value,
|
|
4804
|
-
errors:
|
|
4807
|
+
errors: d.value,
|
|
4805
4808
|
reset: f,
|
|
4806
4809
|
validate: c,
|
|
4807
4810
|
formId: n.formId
|
|
@@ -4810,10 +4813,10 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4810
4813
|
function M(P, te) {
|
|
4811
4814
|
if (P === te) return !0;
|
|
4812
4815
|
if (typeof P != "object" || typeof te != "object" || !P || !te) return !1;
|
|
4813
|
-
const
|
|
4814
|
-
return
|
|
4816
|
+
const Y = Object.keys(P), S = Object.keys(te);
|
|
4817
|
+
return Y.length !== S.length ? !1 : Y.every((W) => P[W] === te[W]);
|
|
4815
4818
|
}
|
|
4816
|
-
return xt("form", a), xt("values", r), (P, te) => (i(),
|
|
4819
|
+
return xt("form", a), xt("values", r), (P, te) => (i(), u("div", qi, [
|
|
4817
4820
|
l("div", {
|
|
4818
4821
|
class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
|
|
4819
4822
|
ref_key: "formScrollContainer",
|
|
@@ -4825,27 +4828,27 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4825
4828
|
onSubmit: $e(j, ["prevent"]),
|
|
4826
4829
|
class: T(["grid grid-cols-12 p-1", C.value === "default" ? "gap-6" : "gap-4"])
|
|
4827
4830
|
}, [
|
|
4828
|
-
(i(!0),
|
|
4829
|
-
key:
|
|
4830
|
-
class: T(h(
|
|
4831
|
+
(i(!0), u(re, null, pe(le(p), (Y, S) => (i(), u("div", {
|
|
4832
|
+
key: Y.name,
|
|
4833
|
+
class: T(h(Y) === "horizontal" ? "col-span-12" : `col-span-${Y.col || 12}`)
|
|
4831
4834
|
}, [
|
|
4832
4835
|
R(Ot, {
|
|
4833
4836
|
style: be(P.style),
|
|
4834
|
-
item:
|
|
4835
|
-
layout: h(
|
|
4836
|
-
columns: x(
|
|
4837
|
-
"model-value": r.value[
|
|
4837
|
+
item: Y,
|
|
4838
|
+
layout: h(Y),
|
|
4839
|
+
columns: x(Y),
|
|
4840
|
+
"model-value": r.value[Y.name],
|
|
4838
4841
|
"onUpdate:modelValue": (W) => {
|
|
4839
|
-
const
|
|
4840
|
-
M(
|
|
4842
|
+
const ee = r.value[Y.name];
|
|
4843
|
+
M(ee, W) || (r.value[Y.name] = W);
|
|
4841
4844
|
},
|
|
4842
|
-
error: le(
|
|
4845
|
+
error: le(d)[Y.name]
|
|
4843
4846
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
4844
|
-
h(
|
|
4847
|
+
h(Y) === "settings" && S + 1 !== le(p).length ? (i(), u("div", Ki)) : D("", !0)
|
|
4845
4848
|
], 2))), 128))
|
|
4846
4849
|
], 34)
|
|
4847
4850
|
], 512),
|
|
4848
|
-
R(
|
|
4851
|
+
R(Oi, {
|
|
4849
4852
|
target: v.value,
|
|
4850
4853
|
"scroll-container": k.value,
|
|
4851
4854
|
enabled: m.value,
|
|
@@ -4853,7 +4856,7 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4853
4856
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
4854
4857
|
]));
|
|
4855
4858
|
}
|
|
4856
|
-
}),
|
|
4859
|
+
}), Wi = { class: "relative" }, Zi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Ji = { 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" }, Yi = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Xi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Qi = { class: "p-4 mim-h-0 h-full overflow-auto" }, eu = /* @__PURE__ */ G({
|
|
4857
4860
|
__name: "modal-edit",
|
|
4858
4861
|
props: {
|
|
4859
4862
|
schema: {},
|
|
@@ -4864,7 +4867,7 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4864
4867
|
},
|
|
4865
4868
|
emits: ["close", "save", "edit"],
|
|
4866
4869
|
setup(o, { emit: e }) {
|
|
4867
|
-
const t = o, s = e, n = w(t.schema), a = w(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = w({}),
|
|
4870
|
+
const t = o, s = e, n = w(t.schema), a = w(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = w({}), d = w(), c = w(t.mode);
|
|
4868
4871
|
async function f() {
|
|
4869
4872
|
const v = r.value.validate();
|
|
4870
4873
|
if (v) {
|
|
@@ -4872,9 +4875,9 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4872
4875
|
`) });
|
|
4873
4876
|
return;
|
|
4874
4877
|
}
|
|
4875
|
-
if (
|
|
4878
|
+
if (d.value)
|
|
4876
4879
|
try {
|
|
4877
|
-
const k = await fetch(`/api/table/${
|
|
4880
|
+
const k = await fetch(`/api/table/${d.value}`, {
|
|
4878
4881
|
method: c.value === "add" ? "POST" : "PUT",
|
|
4879
4882
|
headers: {
|
|
4880
4883
|
"Content-Type": "application/json"
|
|
@@ -4927,10 +4930,10 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4927
4930
|
return;
|
|
4928
4931
|
}
|
|
4929
4932
|
const k = await v.json();
|
|
4930
|
-
n.value = k.schema,
|
|
4933
|
+
n.value = k.schema, d.value = k.token;
|
|
4931
4934
|
} else if (t.token) {
|
|
4932
|
-
|
|
4933
|
-
const v = await fetch(`/api/form/${
|
|
4935
|
+
d.value = t.token;
|
|
4936
|
+
const v = await fetch(`/api/form/${d.value}`);
|
|
4934
4937
|
if (!v.ok) {
|
|
4935
4938
|
ce({
|
|
4936
4939
|
type: v.status >= 400 && v.status < 500 ? "warning" : "error",
|
|
@@ -4949,11 +4952,11 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4949
4952
|
message: v.message || "Unexpected error"
|
|
4950
4953
|
}), console.error(v);
|
|
4951
4954
|
}
|
|
4952
|
-
}), (v, k) => (i(),
|
|
4953
|
-
l("div",
|
|
4954
|
-
l("div",
|
|
4955
|
-
l("div",
|
|
4956
|
-
l("h3",
|
|
4955
|
+
}), (v, k) => (i(), u("div", Wi, [
|
|
4956
|
+
l("div", Zi, [
|
|
4957
|
+
l("div", Ji, [
|
|
4958
|
+
l("div", Yi, [
|
|
4959
|
+
l("h3", Xi, K(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4957
4960
|
l("button", {
|
|
4958
4961
|
onClick: p,
|
|
4959
4962
|
type: "button",
|
|
@@ -4977,7 +4980,7 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
4977
4980
|
], -1)
|
|
4978
4981
|
]))
|
|
4979
4982
|
]),
|
|
4980
|
-
l("div",
|
|
4983
|
+
l("div", Qi, [
|
|
4981
4984
|
n.value ? (i(), ve(qe, {
|
|
4982
4985
|
key: 0,
|
|
4983
4986
|
schema: n.value,
|
|
@@ -5010,7 +5013,7 @@ const Gi = { class: "flex w-full h-full min-h-0 gap-6" }, qi = {
|
|
|
5010
5013
|
visible: !0,
|
|
5011
5014
|
size: "medium",
|
|
5012
5015
|
closeClickBack: !0,
|
|
5013
|
-
content:
|
|
5016
|
+
content: eu,
|
|
5014
5017
|
contentProps: {
|
|
5015
5018
|
...o,
|
|
5016
5019
|
onClose: () => {
|
|
@@ -5028,31 +5031,31 @@ qe.install = function(e) {
|
|
|
5028
5031
|
}), e.provide("form", St), window.v3plugin || (window.v3plugin = {});
|
|
5029
5032
|
};
|
|
5030
5033
|
export {
|
|
5031
|
-
|
|
5034
|
+
eu as ModalEdit,
|
|
5032
5035
|
qe as VForm,
|
|
5033
|
-
|
|
5036
|
+
Si as VsInputArray,
|
|
5034
5037
|
yo as VsInputCheckbox,
|
|
5035
|
-
|
|
5036
|
-
|
|
5038
|
+
di as VsInputCodegen,
|
|
5039
|
+
$i as VsInputColor,
|
|
5037
5040
|
da as VsInputContainer,
|
|
5038
5041
|
wo as VsInputDate,
|
|
5039
5042
|
so as VsInputEmail,
|
|
5040
5043
|
un as VsInputFile,
|
|
5041
5044
|
Un as VsInputFileList,
|
|
5042
|
-
|
|
5045
|
+
wi as VsInputKeyValue,
|
|
5043
5046
|
oo as VsInputMask,
|
|
5044
5047
|
_l as VsInputNumber,
|
|
5045
5048
|
kt as VsInputRadio,
|
|
5046
|
-
|
|
5049
|
+
Mi as VsInputRange,
|
|
5047
5050
|
Vt as VsInputSelect,
|
|
5048
|
-
|
|
5051
|
+
oi as VsInputSlug,
|
|
5049
5052
|
wt as VsInputStatic,
|
|
5050
5053
|
zt as VsInputSwitcher,
|
|
5051
|
-
|
|
5054
|
+
Qr as VsInputTag,
|
|
5052
5055
|
Ye as VsInputText,
|
|
5053
5056
|
ja as VsInputTextarea,
|
|
5054
5057
|
qe as default,
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
+
Bi as inputs,
|
|
5059
|
+
Os as vsInputDatatable,
|
|
5060
|
+
Hr as vsInputMap
|
|
5058
5061
|
};
|