@opengis/form 0.0.112 → 0.0.113
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/components/inputs/vs-input-select.vue.d.ts.map +1 -1
- package/dist/components/modal/modal-edit.vue.d.ts +1 -1
- package/dist/components/modal/modal-edit.vue.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +288 -263
- package/dist/index.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as S, openBlock as i, createElementBlock as c, Fragment as ye, createElementVNode as o, renderSlot as Pe, createBlock as ge, Teleport as $t, normalizeStyle as Ae, toDisplayString as le, createCommentVNode as U, computed as x, mergeProps as ot, createTextVNode as Te, normalizeProps as dl, guardReactiveProps as cl, onMounted as Ue, onUnmounted as Lt, normalizeClass as W, useModel as
|
|
2
|
-
import { notify as
|
|
1
|
+
import { defineComponent as oe, ref as S, openBlock as i, createElementBlock as c, Fragment as ye, createElementVNode as o, renderSlot as Pe, createBlock as ge, Teleport as $t, normalizeStyle as Ae, toDisplayString as le, createCommentVNode as U, computed as x, mergeProps as ot, createTextVNode as Te, normalizeProps as dl, guardReactiveProps as cl, onMounted as Ue, onUnmounted as Lt, normalizeClass as W, useModel as Le, withDirectives as we, unref as $e, vModelText as Ie, mergeModels as ke, vModelCheckbox as Sl, createVNode as ne, resolveDynamicComponent as Qe, withCtx as Ne, withModifiers as Se, onBeforeUnmount as gt, watch as re, createStaticVNode as Ke, vModelRadio as Dl, renderList as Me, reactive as Bl, vModelDynamic as Yl, inject as Ge, vShow as at, resolveComponent as tt, Transition as Yt, nextTick as Oe, useSlots as Zl, getCurrentInstance as Jl, watchEffect as kt, withKeys as Xl, toRef as Ql, provide as tl } from "vue";
|
|
2
|
+
import { notify as Ve, VsModal as Al, modal as en } from "@opengis/core";
|
|
3
3
|
import { icons as tn } from "lucide-vue-next";
|
|
4
4
|
const El = /* @__PURE__ */ oe({
|
|
5
5
|
__name: "vs-info-tooltip",
|
|
@@ -276,7 +276,7 @@ const _n = ["placeholder", "disabled"], Cn = /* @__PURE__ */ oe({
|
|
|
276
276
|
}),
|
|
277
277
|
emits: ["update:modelValue"],
|
|
278
278
|
setup(e) {
|
|
279
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
279
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = x(() => !!t.disabled), a = x(() => t.placeholder ?? "");
|
|
280
280
|
return (s, u) => we((i(), c("input", {
|
|
281
281
|
type: "password",
|
|
282
282
|
"onUpdate:modelValue": u[0] || (u[0] = (d) => n.value = d),
|
|
@@ -308,7 +308,7 @@ const _n = ["placeholder", "disabled"], Cn = /* @__PURE__ */ oe({
|
|
|
308
308
|
}),
|
|
309
309
|
emits: ["update:modelValue"],
|
|
310
310
|
setup(e) {
|
|
311
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
311
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = x(() => !!t.disabled), a = x(() => t.placeholder ?? ""), s = x(() => t.maxlength ?? void 0), u = x(() => t.minlength ?? void 0);
|
|
312
312
|
function d() {
|
|
313
313
|
typeof n.value == "string" && (n.value = n.value.trim());
|
|
314
314
|
}
|
|
@@ -346,7 +346,7 @@ const _n = ["placeholder", "disabled"], Cn = /* @__PURE__ */ oe({
|
|
|
346
346
|
}),
|
|
347
347
|
emits: ["update:modelValue"],
|
|
348
348
|
setup(e) {
|
|
349
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
349
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = x(() => !!t.disabled);
|
|
350
350
|
return (a, s) => we((i(), c("input", {
|
|
351
351
|
type: "number",
|
|
352
352
|
step: "any",
|
|
@@ -363,7 +363,7 @@ const _n = ["placeholder", "disabled"], Cn = /* @__PURE__ */ oe({
|
|
|
363
363
|
[Ie, n.value]
|
|
364
364
|
]);
|
|
365
365
|
}
|
|
366
|
-
}),
|
|
366
|
+
}), fe = (e, t) => {
|
|
367
367
|
const l = e.__vccOpts || e;
|
|
368
368
|
for (const [n, r] of t)
|
|
369
369
|
l[n] = r;
|
|
@@ -388,7 +388,7 @@ function Bn(e, t) {
|
|
|
388
388
|
o("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
389
389
|
])]);
|
|
390
390
|
}
|
|
391
|
-
const An = /* @__PURE__ */
|
|
391
|
+
const An = /* @__PURE__ */ fe(Sn, [["render", Bn]]), En = { class: "flex items-center gap-[4px]" }, Tn = ["value", "id", "disabled"], In = ["for"], jn = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, Fn = /* @__PURE__ */ oe({
|
|
392
392
|
__name: "vs-checkbox-default",
|
|
393
393
|
props: {
|
|
394
394
|
value: { default: "" },
|
|
@@ -560,7 +560,7 @@ function Gn(e, t) {
|
|
|
560
560
|
o("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
561
561
|
])]);
|
|
562
562
|
}
|
|
563
|
-
const fl = /* @__PURE__ */
|
|
563
|
+
const fl = /* @__PURE__ */ fe(Hn, [["render", Gn]]), Kn = {}, Wn = {
|
|
564
564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
565
565
|
viewBox: "0 0 24 24",
|
|
566
566
|
fill: "none",
|
|
@@ -581,7 +581,7 @@ function Yn(e, t) {
|
|
|
581
581
|
o("path", { d: "M6 6l12 12" }, null, -1)
|
|
582
582
|
])]);
|
|
583
583
|
}
|
|
584
|
-
const Zt = /* @__PURE__ */
|
|
584
|
+
const Zt = /* @__PURE__ */ fe(Kn, [["render", Yn]]), Zn = {}, Jn = {
|
|
585
585
|
xmlns: "http://www.w3.org/2000/svg",
|
|
586
586
|
width: "24",
|
|
587
587
|
height: "24",
|
|
@@ -604,7 +604,7 @@ function Xn(e, t) {
|
|
|
604
604
|
o("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)
|
|
605
605
|
])]);
|
|
606
606
|
}
|
|
607
|
-
const Qn = /* @__PURE__ */
|
|
607
|
+
const Qn = /* @__PURE__ */ fe(Zn, [["render", Xn]]), ea = {
|
|
608
608
|
key: 0,
|
|
609
609
|
class: "flex items-start gap-x-1"
|
|
610
610
|
}, ta = {
|
|
@@ -633,7 +633,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
633
633
|
}),
|
|
634
634
|
emits: ["update:modelValue"],
|
|
635
635
|
setup(e) {
|
|
636
|
-
const t = e, l =
|
|
636
|
+
const t = e, l = Le(e, "modelValue");
|
|
637
637
|
return (n, r) => t.view === "checkbox" ? (i(), c("div", ea, [
|
|
638
638
|
ne(rl, {
|
|
639
639
|
modelValue: l.value,
|
|
@@ -646,7 +646,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
646
646
|
key: 1,
|
|
647
647
|
class: "cursor-pointer",
|
|
648
648
|
title: e.i,
|
|
649
|
-
onClick: r[1] || (r[1] =
|
|
649
|
+
onClick: r[1] || (r[1] = Se(() => {
|
|
650
650
|
}, ["prevent"]))
|
|
651
651
|
}, [
|
|
652
652
|
ne($e(Qn), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
@@ -706,7 +706,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
706
706
|
}),
|
|
707
707
|
emits: ["update:modelValue"],
|
|
708
708
|
setup(e) {
|
|
709
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
709
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = S(null);
|
|
710
710
|
let a = null;
|
|
711
711
|
function s(u) {
|
|
712
712
|
const d = {
|
|
@@ -777,7 +777,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
777
777
|
}),
|
|
778
778
|
emits: ["update:modelValue"],
|
|
779
779
|
setup(e) {
|
|
780
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
780
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue");
|
|
781
781
|
return (r, a) => (i(), c("div", ra, [
|
|
782
782
|
a[1] || (a[1] = Ke('<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)),
|
|
783
783
|
we(o("input", {
|
|
@@ -812,7 +812,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
812
812
|
}),
|
|
813
813
|
emits: ["update:modelValue"],
|
|
814
814
|
setup(e) {
|
|
815
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
815
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = x(() => n.value ? n.value.startsWith("+") ? n.value.slice(1) : n.value : ""), a = (u) => {
|
|
816
816
|
let { value: d } = u.target;
|
|
817
817
|
d = d.replace(/^\+/, ""), n.value = d ? `+${d}` : "";
|
|
818
818
|
}, s = (u) => {
|
|
@@ -875,7 +875,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
875
875
|
}),
|
|
876
876
|
emits: ["update:modelValue"],
|
|
877
877
|
setup(e) {
|
|
878
|
-
const t = e, l =
|
|
878
|
+
const t = e, l = Le(e, "modelValue"), n = x(() => !!t.disabled);
|
|
879
879
|
return (r, a) => (i(), c("label", {
|
|
880
880
|
class: W(["flex items-center gap-0", [t.customClass, n.value ? "cursor-not-allowed opacity-60" : ""]])
|
|
881
881
|
}, [
|
|
@@ -922,7 +922,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
922
922
|
}),
|
|
923
923
|
emits: ["update:modelValue"],
|
|
924
924
|
setup(e) {
|
|
925
|
-
const t = e, l =
|
|
925
|
+
const t = e, l = Le(e, "modelValue"), n = x(() => !!t.disabled);
|
|
926
926
|
return (r, a) => (i(), c("label", {
|
|
927
927
|
class: W(["flex items-center border rounded-lg px-2 py-1", [
|
|
928
928
|
l.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
|
|
@@ -966,11 +966,11 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
966
966
|
}),
|
|
967
967
|
emits: ["update:modelValue"],
|
|
968
968
|
setup(e) {
|
|
969
|
-
const t = e, l =
|
|
969
|
+
const t = e, l = Le(e, "modelValue"), n = x(() => ha[`vs-input-radio-${t.view}`]);
|
|
970
970
|
return (r, a) => (i(), c("div", {
|
|
971
971
|
class: W([e.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
972
972
|
}, [
|
|
973
|
-
(i(!0), c(ye, null,
|
|
973
|
+
(i(!0), c(ye, null, Me(e.options, (s) => (i(), ge(Qe(n.value), ot({
|
|
974
974
|
key: s?.id,
|
|
975
975
|
text: s.text,
|
|
976
976
|
value: s.id.toString(),
|
|
@@ -1110,7 +1110,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
1110
1110
|
});
|
|
1111
1111
|
}
|
|
1112
1112
|
}), (k, M) => l.group ? (i(), c("div", ga, [
|
|
1113
|
-
(i(!0), c(ye, null,
|
|
1113
|
+
(i(!0), c(ye, null, Me(C.value, (g) => (i(), c("div", {
|
|
1114
1114
|
key: g.key,
|
|
1115
1115
|
class: "flex flex-col gap-2"
|
|
1116
1116
|
}, [
|
|
@@ -1118,7 +1118,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
1118
1118
|
o("div", {
|
|
1119
1119
|
class: W(["p-0 w-full gap-[12px]", f.value])
|
|
1120
1120
|
}, [
|
|
1121
|
-
(i(!0), c(ye, null,
|
|
1121
|
+
(i(!0), c(ye, null, Me(g.options, (y) => (i(), ge(rl, {
|
|
1122
1122
|
modelValue: a[s(y)],
|
|
1123
1123
|
"onUpdate:modelValue": (L) => a[s(y)] = L,
|
|
1124
1124
|
value: s(y),
|
|
@@ -1137,7 +1137,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
1137
1137
|
key: 0,
|
|
1138
1138
|
class: W(["p-0 w-full gap-[10px]", f.value])
|
|
1139
1139
|
}, [
|
|
1140
|
-
(i(!0), c(ye, null,
|
|
1140
|
+
(i(!0), c(ye, null, Me(r.value, (g) => (i(), ge(rl, {
|
|
1141
1141
|
modelValue: a[s(g)],
|
|
1142
1142
|
"onUpdate:modelValue": (y) => a[s(g)] = y,
|
|
1143
1143
|
value: s(g),
|
|
@@ -1152,7 +1152,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
1152
1152
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
1153
1153
|
], 2));
|
|
1154
1154
|
}
|
|
1155
|
-
}), wa = /* @__PURE__ */
|
|
1155
|
+
}), wa = /* @__PURE__ */ fe(xa, [["__scopeId", "data-v-cf0478ce"]]), ka = ["type", "placeholder", "disabled"], $a = /* @__PURE__ */ oe({
|
|
1156
1156
|
__name: "vs-input-date1",
|
|
1157
1157
|
props: {
|
|
1158
1158
|
style: { default: () => ({}) },
|
|
@@ -1218,7 +1218,7 @@ const Qn = /* @__PURE__ */ de(Zn, [["render", Xn]]), ea = {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
).then((C) => C.json()))?.result;
|
|
1220
1220
|
} catch (l) {
|
|
1221
|
-
return
|
|
1221
|
+
return Ve({
|
|
1222
1222
|
type: "error",
|
|
1223
1223
|
title: "Помилка!",
|
|
1224
1224
|
message: "Сталась помилка під час завантаження файлу",
|
|
@@ -1255,7 +1255,7 @@ function Ma(e, t) {
|
|
|
1255
1255
|
o("path", { d: "M12 5v14" }, null, -1)
|
|
1256
1256
|
])]);
|
|
1257
1257
|
}
|
|
1258
|
-
const lt = /* @__PURE__ */
|
|
1258
|
+
const lt = /* @__PURE__ */ fe(Va, [["render", Ma]]), Sa = {}, Da = {
|
|
1259
1259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1260
1260
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
1261
1261
|
width: "44",
|
|
@@ -1272,7 +1272,7 @@ function Ba(e, t, l, n, r, a) {
|
|
|
1272
1272
|
Ke('<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)
|
|
1273
1273
|
])]);
|
|
1274
1274
|
}
|
|
1275
|
-
const Aa = /* @__PURE__ */
|
|
1275
|
+
const Aa = /* @__PURE__ */ fe(Sa, [["render", Ba]]), Ea = {}, Ta = {
|
|
1276
1276
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1277
1277
|
class: "icon icon-tabler icon-tabler-table",
|
|
1278
1278
|
width: "44",
|
|
@@ -1312,7 +1312,7 @@ function Ia(e, t, l, n, r, a) {
|
|
|
1312
1312
|
}, null, -1)
|
|
1313
1313
|
])]);
|
|
1314
1314
|
}
|
|
1315
|
-
const ja = /* @__PURE__ */
|
|
1315
|
+
const ja = /* @__PURE__ */ fe(Ea, [["render", Ia]]), Fa = {}, Oa = {
|
|
1316
1316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1317
1317
|
width: "24",
|
|
1318
1318
|
height: "24",
|
|
@@ -1328,7 +1328,7 @@ function Pa(e, t) {
|
|
|
1328
1328
|
Ke('<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)
|
|
1329
1329
|
])]);
|
|
1330
1330
|
}
|
|
1331
|
-
const Ol = /* @__PURE__ */
|
|
1331
|
+
const Ol = /* @__PURE__ */ fe(Fa, [["render", Pa]]), za = {}, Ua = {
|
|
1332
1332
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1333
1333
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
1334
1334
|
width: "44",
|
|
@@ -1345,7 +1345,7 @@ function Na(e, t, l, n, r, a) {
|
|
|
1345
1345
|
Ke('<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)
|
|
1346
1346
|
])]);
|
|
1347
1347
|
}
|
|
1348
|
-
const Ra = /* @__PURE__ */
|
|
1348
|
+
const Ra = /* @__PURE__ */ fe(za, [["render", Na]]), Ha = {}, qa = {
|
|
1349
1349
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1350
1350
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
1351
1351
|
width: "44",
|
|
@@ -1362,7 +1362,7 @@ function Ga(e, t, l, n, r, a) {
|
|
|
1362
1362
|
Ke('<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)
|
|
1363
1363
|
])]);
|
|
1364
1364
|
}
|
|
1365
|
-
const Ka = /* @__PURE__ */
|
|
1365
|
+
const Ka = /* @__PURE__ */ fe(Ha, [["render", Ga]]), Wa = (e) => {
|
|
1366
1366
|
if (!e) return "";
|
|
1367
1367
|
const t = e?.split(".");
|
|
1368
1368
|
return t[t.length - 1];
|
|
@@ -1392,7 +1392,7 @@ function Xa(e, t) {
|
|
|
1392
1392
|
Ke('<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)
|
|
1393
1393
|
])]);
|
|
1394
1394
|
}
|
|
1395
|
-
const bt = /* @__PURE__ */
|
|
1395
|
+
const bt = /* @__PURE__ */ fe(Za, [["render", Xa]]), Qa = {}, eo = {
|
|
1396
1396
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1397
1397
|
width: "24",
|
|
1398
1398
|
height: "24",
|
|
@@ -1416,7 +1416,7 @@ function to(e, t) {
|
|
|
1416
1416
|
o("path", { d: "M12 4l0 12" }, null, -1)
|
|
1417
1417
|
])]);
|
|
1418
1418
|
}
|
|
1419
|
-
const Pl = /* @__PURE__ */
|
|
1419
|
+
const Pl = /* @__PURE__ */ fe(Qa, [["render", to]]), lo = ["title"], no = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, ao = /* @__PURE__ */ oe({
|
|
1420
1420
|
__name: "vs-input-file-list-item",
|
|
1421
1421
|
props: /* @__PURE__ */ ke({
|
|
1422
1422
|
format: {},
|
|
@@ -1441,7 +1441,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1441
1441
|
}),
|
|
1442
1442
|
emits: ["update:value", "update:item"],
|
|
1443
1443
|
setup(e) {
|
|
1444
|
-
const t =
|
|
1444
|
+
const t = Le(e, "value"), l = Le(e, "item"), n = e;
|
|
1445
1445
|
return (r, a) => (i(), c("div", {
|
|
1446
1446
|
title: l.value,
|
|
1447
1447
|
class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"
|
|
@@ -1472,7 +1472,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1472
1472
|
])
|
|
1473
1473
|
], 8, lo));
|
|
1474
1474
|
}
|
|
1475
|
-
}), sl = /* @__PURE__ */
|
|
1475
|
+
}), sl = /* @__PURE__ */ fe(ao, [["__scopeId", "data-v-b61a9d9a"]]), oo = { class: "flex items-center gap-x-2" }, ro = ["accept", "multiple", "disabled"], so = {
|
|
1476
1476
|
key: 1,
|
|
1477
1477
|
class: "flex items-center flex-wrap gap-2"
|
|
1478
1478
|
}, io = {
|
|
@@ -1504,10 +1504,10 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1504
1504
|
}),
|
|
1505
1505
|
emits: /* @__PURE__ */ ke(["change"], ["update:modelValue"]),
|
|
1506
1506
|
setup(e, { emit: t }) {
|
|
1507
|
-
const l = e, n =
|
|
1507
|
+
const l = e, n = Le(e, "modelValue"), r = t, a = S(null), s = S(!1), u = Ge("values"), d = x(() => l.format ? l.format.split(",").map((b) => b.trim().toLowerCase()).filter(Boolean) : []), f = (b) => Array.isArray(n.value) && n.value[b] || "", m = (b) => {
|
|
1508
1508
|
if (l.max_size && b.size > l.max_size * 1024 * 1024) {
|
|
1509
1509
|
const $ = (b.size / 1048576).toFixed(2);
|
|
1510
|
-
return
|
|
1510
|
+
return Ve({
|
|
1511
1511
|
type: "error",
|
|
1512
1512
|
title: "Помилка!",
|
|
1513
1513
|
message: `Файл "${b.name}" занадто великий. Максимальний розмір: ${l.max_size} МБ, розмір файлу: ${$} МБ`,
|
|
@@ -1519,7 +1519,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1519
1519
|
if (!d.value.length)
|
|
1520
1520
|
return !0;
|
|
1521
1521
|
const $ = `.${b.name.split(".").pop()?.toLowerCase() || ""}`, w = d.value.includes($);
|
|
1522
|
-
return w ||
|
|
1522
|
+
return w || Ve({
|
|
1523
1523
|
type: "error",
|
|
1524
1524
|
title: "Помилка!",
|
|
1525
1525
|
message: `Неприпустимий формат файлу "${b.name}". Дозволені формати: ${d.value.join(", ")}`,
|
|
@@ -1551,14 +1551,14 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1551
1551
|
const b = I.value.missingSources;
|
|
1552
1552
|
if (!b.length) return !0;
|
|
1553
1553
|
const $ = b.join(", ");
|
|
1554
|
-
return
|
|
1554
|
+
return Ve({
|
|
1555
1555
|
type: "warning",
|
|
1556
1556
|
title: "Заповніть поля",
|
|
1557
1557
|
message: `Поля (${$}) необхідні для завантаження файлу`,
|
|
1558
1558
|
position: "right-bottom"
|
|
1559
1559
|
}), !1;
|
|
1560
1560
|
}, g = (b) => {
|
|
1561
|
-
|
|
1561
|
+
Ve({
|
|
1562
1562
|
type: "error",
|
|
1563
1563
|
title: "Помилка завантаження",
|
|
1564
1564
|
message: b || "Не вдалося завантажити файл. Спробуйте ще раз.",
|
|
@@ -1624,7 +1624,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1624
1624
|
value: n.value,
|
|
1625
1625
|
"onUpdate:value": $[1] || ($[1] = (w) => n.value = w)
|
|
1626
1626
|
}, null, 8, ["item", "value"])) : e.multiple ? (i(), c("div", so, [
|
|
1627
|
-
(i(!0), c(ye, null,
|
|
1627
|
+
(i(!0), c(ye, null, Me(n.value, (w, B) => (i(), ge(sl, {
|
|
1628
1628
|
multiple: e.multiple,
|
|
1629
1629
|
key: B,
|
|
1630
1630
|
value: n.value,
|
|
@@ -1656,7 +1656,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1656
1656
|
], 2))
|
|
1657
1657
|
]));
|
|
1658
1658
|
}
|
|
1659
|
-
}), fo = /* @__PURE__ */
|
|
1659
|
+
}), fo = /* @__PURE__ */ fe(co, [["__scopeId", "data-v-05d41c5c"]]), po = { class: "vs-input-file2 flex flex-col gap-4" }, mo = { class: "flex items-center gap-x-2" }, vo = ["accept", "disabled"], ho = {
|
|
1660
1660
|
key: 0,
|
|
1661
1661
|
class: "absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-lg bg-white/90 text-xs font-medium text-slate-600"
|
|
1662
1662
|
}, go = {
|
|
@@ -1689,7 +1689,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1689
1689
|
}),
|
|
1690
1690
|
emits: ["update:modelValue"],
|
|
1691
1691
|
setup(e) {
|
|
1692
|
-
const t = e, l =
|
|
1692
|
+
const t = e, l = Le(e, "modelValue"), n = S(null), r = S(null), a = S(""), s = S(0), u = S(!1), d = S(""), f = S(null), m = Ge("values"), C = x(() => t.format ? t.format.split(",").map((H) => H.trim().toLowerCase()).filter(Boolean) : []), I = x(() => !r.value || !r.value.size ? 0 : Math.min(100, Math.round(s.value / r.value.size * 100))), k = x(() => r.value ? `${y(s.value)} / ${y(r.value.size)}` : ""), M = x(() => t.disabled ? "opacity-50 cursor-not-allowed" : u.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), g = () => {
|
|
1693
1693
|
t.disabled || u.value || w() && n.value?.click();
|
|
1694
1694
|
}, y = (H) => {
|
|
1695
1695
|
if (!Number.isFinite(H)) return "0 B";
|
|
@@ -1701,7 +1701,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1701
1701
|
}, L = (H) => {
|
|
1702
1702
|
if (!t.max_size) return !0;
|
|
1703
1703
|
const q = t.max_size * 1024 * 1024;
|
|
1704
|
-
return H.size > q ? (
|
|
1704
|
+
return H.size > q ? (Ve({
|
|
1705
1705
|
type: "error",
|
|
1706
1706
|
title: "Файл занадто великий",
|
|
1707
1707
|
message: `Максимальний розмір ${t.max_size} МБ`,
|
|
@@ -1710,7 +1710,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1710
1710
|
}, b = (H) => {
|
|
1711
1711
|
if (!C.value.length) return !0;
|
|
1712
1712
|
const q = `.${H.name.split(".").pop()?.toLowerCase() || ""}`;
|
|
1713
|
-
return C.value.includes(q) ? !0 : (
|
|
1713
|
+
return C.value.includes(q) ? !0 : (Ve({
|
|
1714
1714
|
type: "error",
|
|
1715
1715
|
title: "Непідтримуваний формат",
|
|
1716
1716
|
message: `Дозволені формати: ${C.value.join(", ")}`,
|
|
@@ -1727,7 +1727,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1727
1727
|
const he = J[be];
|
|
1728
1728
|
he == null || he === "" ? q.push(be) : H[ee] = he;
|
|
1729
1729
|
}), { params: H, missing: q };
|
|
1730
|
-
}), w = () => $.value.missing.length ? (
|
|
1730
|
+
}), w = () => $.value.missing.length ? (Ve({
|
|
1731
1731
|
type: "warning",
|
|
1732
1732
|
title: "Заповніть поля",
|
|
1733
1733
|
message: `Потрібні значення: ${$.value.missing.join(", ")}`,
|
|
@@ -1787,7 +1787,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1787
1787
|
if (!R.ok) throw new Error("Помилка завантаження частини");
|
|
1788
1788
|
const F = await R.json().catch(() => ({}));
|
|
1789
1789
|
if (F.uploaded != null ? s.value = Number(F.uploaded) : s.value = q, F.finished || s.value >= r.value.size) {
|
|
1790
|
-
u.value = !1, l.value = F.file_path || F.url || a.value,
|
|
1790
|
+
u.value = !1, l.value = F.file_path || F.url || a.value, Ve({
|
|
1791
1791
|
type: "success",
|
|
1792
1792
|
title: "Файл завантажено",
|
|
1793
1793
|
message: r.value.name,
|
|
@@ -1893,7 +1893,7 @@ const Pl = /* @__PURE__ */ de(Qa, [["render", to]]), lo = ["title"], no = { clas
|
|
|
1893
1893
|
])) : U("", !0)
|
|
1894
1894
|
]));
|
|
1895
1895
|
}
|
|
1896
|
-
}), ll = /* @__PURE__ */
|
|
1896
|
+
}), ll = /* @__PURE__ */ fe(Vo, [["__scopeId", "data-v-8f52f552"]]), Lo = { class: "max-w-[55vw]" }, Mo = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, So = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, Do = { class: "px-[5px]" }, Bo = { class: "" }, Ot = /* @__PURE__ */ oe({
|
|
1897
1897
|
__name: "vs-widget-file-info",
|
|
1898
1898
|
props: {
|
|
1899
1899
|
item: { default: null }
|
|
@@ -2061,7 +2061,7 @@ function qo(e, t) {
|
|
|
2061
2061
|
o("path", { d: "M12 4l0 12" }, null, -1)
|
|
2062
2062
|
])]);
|
|
2063
2063
|
}
|
|
2064
|
-
const Go = /* @__PURE__ */
|
|
2064
|
+
const Go = /* @__PURE__ */ fe(Ro, [["render", qo]]), Ko = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Wo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Yo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Zo = { class1: "ml-auto" }, Jo = { 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" }, Xo = {
|
|
2065
2065
|
key: 0,
|
|
2066
2066
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
2067
2067
|
}, Qo = { class: "relative" }, er = {
|
|
@@ -2101,13 +2101,13 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2101
2101
|
B.append("file", w);
|
|
2102
2102
|
try {
|
|
2103
2103
|
const O = `${l.prefix}/widget/file/${r.value}`, D = await fetch(O, { method: "POST", body: B });
|
|
2104
|
-
return D.ok ? (u("update", "file-list"), w) : (
|
|
2104
|
+
return D.ok ? (u("update", "file-list"), w) : (Ve({
|
|
2105
2105
|
type: D.status >= 400 && D.status < 500 ? "warning" : "error",
|
|
2106
2106
|
title: "Error",
|
|
2107
2107
|
message: `Error code: ${D.status}`
|
|
2108
2108
|
}), null);
|
|
2109
2109
|
} catch (O) {
|
|
2110
|
-
return
|
|
2110
|
+
return Ve({
|
|
2111
2111
|
type: "error",
|
|
2112
2112
|
title: "Error",
|
|
2113
2113
|
message: O.message || "Unknown error"
|
|
@@ -2191,7 +2191,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2191
2191
|
])
|
|
2192
2192
|
])) : U("", !0),
|
|
2193
2193
|
m.value?.length ? (i(), c("div", er, [
|
|
2194
|
-
(i(!0), c(ye, null,
|
|
2194
|
+
(i(!0), c(ye, null, Me(k.value, (D, T) => (i(), ge(No, {
|
|
2195
2195
|
key: T,
|
|
2196
2196
|
prefix: e.prefix,
|
|
2197
2197
|
item: D,
|
|
@@ -2263,7 +2263,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2263
2263
|
})
|
|
2264
2264
|
]));
|
|
2265
2265
|
}
|
|
2266
|
-
}), sr = /* @__PURE__ */
|
|
2266
|
+
}), sr = /* @__PURE__ */ fe(rr, [["__scopeId", "data-v-00f2f0fc"]]), ir = { class: "text-[16px] text-gray-900 font-medium" }, ur = { class: "grid gap-3" }, dr = /* @__PURE__ */ oe({
|
|
2267
2267
|
__name: "vs-container-accordion",
|
|
2268
2268
|
props: {
|
|
2269
2269
|
title: {
|
|
@@ -2309,7 +2309,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2309
2309
|
})
|
|
2310
2310
|
]));
|
|
2311
2311
|
}
|
|
2312
|
-
}), cr = /* @__PURE__ */
|
|
2312
|
+
}), cr = /* @__PURE__ */ fe(dr, [["__scopeId", "data-v-78778cb5"]]), fr = { class: "flex items-center justify-between" }, pr = /* @__PURE__ */ oe({
|
|
2313
2313
|
__name: "vs-container-default",
|
|
2314
2314
|
props: {
|
|
2315
2315
|
title: {
|
|
@@ -2422,7 +2422,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2422
2422
|
style: Ae(e.style)
|
|
2423
2423
|
}, {
|
|
2424
2424
|
default: Ne(() => [
|
|
2425
|
-
(i(!0), c(ye, null,
|
|
2425
|
+
(i(!0), c(ye, null, Me(r.value, (f) => (i(), ge(Rl, ot({
|
|
2426
2426
|
key: f.name
|
|
2427
2427
|
}, { ref_for: !0 }, f, {
|
|
2428
2428
|
item: f,
|
|
@@ -2535,14 +2535,14 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2535
2535
|
`Lucide${_}Icon`
|
|
2536
2536
|
].map((Q) => he[Q]).find(Boolean);
|
|
2537
2537
|
return be.set(_, P), P;
|
|
2538
|
-
}, se = (p) => p ? typeof p.icon == "string" ? z(p.icon) ?? null : p.icon ?? null : null, me = (p) => !!(p?.color && !se(p)), ve = (p) => p?.color ? { color: p.color } : void 0,
|
|
2538
|
+
}, se = (p) => p ? typeof p.icon == "string" ? z(p.icon) ?? null : p.icon ?? null : null, me = (p) => !!(p?.color && !se(p)), ve = (p) => p?.color ? { color: p.color } : void 0, De = (p) => !!se(p), Je = (p, _, V) => {
|
|
2539
2539
|
if (!q) return !1;
|
|
2540
|
-
const P = q.value?.[p] ?? {}, Q = (
|
|
2541
|
-
if (!
|
|
2542
|
-
const [Fe, ...ut] =
|
|
2540
|
+
const P = q.value?.[p] ?? {}, Q = (de, Ce, Ee) => {
|
|
2541
|
+
if (!Ce.length) return de;
|
|
2542
|
+
const [Fe, ...ut] = Ce, et = { ...de };
|
|
2543
2543
|
if (!ut.length)
|
|
2544
2544
|
return et[Fe] = Ee, et;
|
|
2545
|
-
const el = typeof
|
|
2545
|
+
const el = typeof de[Fe] == "object" && de[Fe] !== null ? de[Fe] : {};
|
|
2546
2546
|
return et[Fe] = Q(el, ut, Ee), et;
|
|
2547
2547
|
}, ce = Q(P, _, V);
|
|
2548
2548
|
return q.value = {
|
|
@@ -2556,8 +2556,8 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2556
2556
|
if (!V) return;
|
|
2557
2557
|
const Q = p ? p[P] : null, ce = V.split(".").map((Ee) => Ee.trim()).filter(Boolean);
|
|
2558
2558
|
if (!ce.length) return;
|
|
2559
|
-
const [
|
|
2560
|
-
|
|
2559
|
+
const [de, ...Ce] = ce;
|
|
2560
|
+
Ce.length && Je(de, Ce, Q ?? null) || _ && (_[de] = Q ?? null);
|
|
2561
2561
|
});
|
|
2562
2562
|
}, j = x(() => l.parent ? H?.value?.[l.parent]?.toString() ?? null : null), K = async (p) => {
|
|
2563
2563
|
if (!l.data) {
|
|
@@ -2573,7 +2573,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2573
2573
|
}
|
|
2574
2574
|
try {
|
|
2575
2575
|
const _ = l.host ?? "", V = l.prefix ?? "api", P = l.api ?? `/${V}/suggest/${l.data}`, Q = `${_}${P}`, ce = new URLSearchParams();
|
|
2576
|
-
return ce.set("json", "1"), p && ce.set("key", p), j.value !== void 0 && j.value !== null && j.value !== "" && ce.set("parent", j.value), l.start === 1 && ce.set("start", "1"), (await fetch(`${Q}?${ce.toString()}`).then((
|
|
2576
|
+
return ce.set("json", "1"), p && ce.set("key", p), j.value !== void 0 && j.value !== null && j.value !== "" && ce.set("parent", j.value), l.start === 1 && ce.set("start", "1"), (await fetch(`${Q}?${ce.toString()}`).then((Ce) => Ce.json()))?.data ?? [];
|
|
2577
2577
|
} catch {
|
|
2578
2578
|
return [];
|
|
2579
2579
|
}
|
|
@@ -2585,8 +2585,8 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2585
2585
|
if (_) return _;
|
|
2586
2586
|
if (l.data)
|
|
2587
2587
|
try {
|
|
2588
|
-
const V = l.host ?? "", P = l.prefix ?? "api", Q = l.api ?? `/${P}/suggest/${l.data}`, ce = `${V}${Q}`,
|
|
2589
|
-
return
|
|
2588
|
+
const V = l.host ?? "", P = l.prefix ?? "api", Q = l.api ?? `/${P}/suggest/${l.data}`, ce = `${V}${Q}`, de = new URLSearchParams();
|
|
2589
|
+
return de.set("json", "1"), de.set("val", String(p)), j.value !== void 0 && j.value !== null && j.value !== "" && de.set("parent", j.value), l.start === 1 && de.set("start", "1"), ((await fetch(`${ce}?${de.toString()}`).then((Fe) => Fe.json()))?.data ?? [])?.[0] ?? null;
|
|
2590
2590
|
} catch {
|
|
2591
2591
|
return null;
|
|
2592
2592
|
}
|
|
@@ -2598,7 +2598,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2598
2598
|
const ce = await ue(Q);
|
|
2599
2599
|
ce && M.value.push(ce);
|
|
2600
2600
|
}, Promise.resolve());
|
|
2601
|
-
},
|
|
2601
|
+
}, Be = () => {
|
|
2602
2602
|
if (!G.value.length) {
|
|
2603
2603
|
g.value = -1;
|
|
2604
2604
|
return;
|
|
@@ -2614,7 +2614,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2614
2614
|
}, _e = async () => {
|
|
2615
2615
|
a.value || (C.value = !0, await Y(), await Oe(() => {
|
|
2616
2616
|
ct(), b.value?.focus();
|
|
2617
|
-
}),
|
|
2617
|
+
}), Be());
|
|
2618
2618
|
}, E = () => {
|
|
2619
2619
|
C.value = !1, g.value = -1, Oe(() => {
|
|
2620
2620
|
b.value?.blur();
|
|
@@ -2654,10 +2654,10 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2654
2654
|
}, dt = (p, _) => {
|
|
2655
2655
|
if (!p || !_) return;
|
|
2656
2656
|
const V = p.offsetTop, P = V + p.offsetHeight, Q = _.scrollTop, ce = Q + _.clientHeight;
|
|
2657
|
-
let
|
|
2658
|
-
V < Q ?
|
|
2659
|
-
const
|
|
2660
|
-
|
|
2657
|
+
let de = _.scrollTop;
|
|
2658
|
+
V < Q ? de = V - 80 : P > ce && (de = P - _.clientHeight + 4);
|
|
2659
|
+
const Ce = _;
|
|
2660
|
+
Ce.scrollTop = de;
|
|
2661
2661
|
}, nt = (p) => {
|
|
2662
2662
|
let _ = p.parentElement;
|
|
2663
2663
|
for (; _; ) {
|
|
@@ -2671,14 +2671,14 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2671
2671
|
return document.body;
|
|
2672
2672
|
}, ct = () => {
|
|
2673
2673
|
if (!d.value) return;
|
|
2674
|
-
const p = d.value.getBoundingClientRect(), _ = window.innerHeight || document.documentElement.clientHeight, V = window.innerWidth || document.documentElement.clientWidth, P = 8, Q = 8, ce = l.maxHeight || 300,
|
|
2674
|
+
const p = d.value.getBoundingClientRect(), _ = window.innerHeight || document.documentElement.clientHeight, V = window.innerWidth || document.documentElement.clientWidth, P = 8, Q = 8, ce = l.maxHeight || 300, de = _ - p.bottom - Q - P, Ce = p.top - Q - P, Ee = de >= Ce, Fe = Math.max(V - P * 2, 0);
|
|
2675
2675
|
let { width: ut } = p;
|
|
2676
2676
|
Fe > 0 && ut > Fe && (ut = Fe);
|
|
2677
2677
|
let { left: et } = p;
|
|
2678
2678
|
et + ut + P > V && (et = V - ut - P), et = Math.max(et, P);
|
|
2679
2679
|
const el = Math.min(
|
|
2680
2680
|
ce,
|
|
2681
|
-
Math.max(Ee ?
|
|
2681
|
+
Math.max(Ee ? de : Ce, 50)
|
|
2682
2682
|
);
|
|
2683
2683
|
$.value = Ee ? "bottom" : "top", w.value = {
|
|
2684
2684
|
position: "fixed",
|
|
@@ -2741,18 +2741,42 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2741
2741
|
});
|
|
2742
2742
|
const yt = S(!1), wt = S({}), It = S([]), jt = S(null);
|
|
2743
2743
|
async function Qt() {
|
|
2744
|
-
if (!l.add?.token || jt?.value.validate())
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2744
|
+
if (!(!l.add?.token || jt?.value.validate()))
|
|
2745
|
+
try {
|
|
2746
|
+
const _ = l.add.api ?? `/api/table/${l.add.token}`, V = await fetch(_, {
|
|
2747
|
+
method: "POST",
|
|
2748
|
+
headers: { "Content-Type": "application/json" },
|
|
2749
|
+
body: JSON.stringify(wt.value)
|
|
2750
|
+
}), P = await V.json().catch(() => ({})), Q = P?.error || P?.message, ce = Number(P?.code) >= 400;
|
|
2751
|
+
if (!V.ok || ce) {
|
|
2752
|
+
Ve({
|
|
2753
|
+
title: "Помилка",
|
|
2754
|
+
type: "error",
|
|
2755
|
+
message: Q || `Код помилки: ${P?.code || V.status}`
|
|
2756
|
+
});
|
|
2757
|
+
return;
|
|
2758
|
+
}
|
|
2759
|
+
const de = P?.id;
|
|
2760
|
+
if (!de) {
|
|
2761
|
+
Ve({
|
|
2762
|
+
title: "Помилка",
|
|
2763
|
+
type: "error",
|
|
2764
|
+
message: "Обʼєкт створено, але в відповіді відсутній ID."
|
|
2765
|
+
});
|
|
2766
|
+
return;
|
|
2767
|
+
}
|
|
2768
|
+
if (!l.options?.length && l.data) {
|
|
2769
|
+
const Ce = await fetch(`${l.api ?? `/api/suggest/${l.data}`}?val=${de}`).then((Ee) => Ee.json());
|
|
2770
|
+
k.value = Ce[0], M.value.push(Ce[0]), s.value = de;
|
|
2771
|
+
}
|
|
2772
|
+
yt.value = !1, Ve({ title: "Успіх", message: "Обʼєкт успішно створено." });
|
|
2773
|
+
} catch (_) {
|
|
2774
|
+
Ve({
|
|
2775
|
+
title: "Помилка",
|
|
2776
|
+
type: "error",
|
|
2777
|
+
message: _?.message || "Не вдалося створити обʼєкт."
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2756
2780
|
}
|
|
2757
2781
|
async function Ft() {
|
|
2758
2782
|
if (!l.add) return null;
|
|
@@ -2806,7 +2830,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2806
2830
|
class: "flex gap-1 w-full",
|
|
2807
2831
|
ref_key: "selectRoot",
|
|
2808
2832
|
ref: u,
|
|
2809
|
-
onClick: _[5] || (_[5] =
|
|
2833
|
+
onClick: _[5] || (_[5] = Se(() => {
|
|
2810
2834
|
}, ["stop"]))
|
|
2811
2835
|
}, [
|
|
2812
2836
|
o("div", {
|
|
@@ -2839,7 +2863,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2839
2863
|
}, [
|
|
2840
2864
|
o("div", Sr, [
|
|
2841
2865
|
r.value ? (i(), c("div", Dr, [
|
|
2842
|
-
(i(!0), c(ye, null,
|
|
2866
|
+
(i(!0), c(ye, null, Me(O.value, (V) => (i(), c("div", {
|
|
2843
2867
|
class: "flex min-w-0 bg-[rgb(230,230,230)] rounded-[2px] m-[2px] box-border max-w-full",
|
|
2844
2868
|
key: V.id
|
|
2845
2869
|
}, [
|
|
@@ -2849,7 +2873,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2849
2873
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
|
|
2850
2874
|
style: Ae({ backgroundColor: V?.color })
|
|
2851
2875
|
}, null, 4)) : U("", !0),
|
|
2852
|
-
!F.value &&
|
|
2876
|
+
!F.value && De(V) ? (i(), c("span", {
|
|
2853
2877
|
key: 1,
|
|
2854
2878
|
class: W(nl),
|
|
2855
2879
|
style: Ae(ve(V)),
|
|
@@ -2875,7 +2899,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2875
2899
|
o("div", {
|
|
2876
2900
|
role: "button",
|
|
2877
2901
|
class: "flex items-center rounded-sm px-1 box-border text-[#172b4d] hover:bg-[rgb(255,189,173)] hover:text-[rgb(222,53,11)] flex-shrink-0",
|
|
2878
|
-
onClick:
|
|
2902
|
+
onClick: Se((P) => je(V.id), ["stop"])
|
|
2879
2903
|
}, [..._[6] || (_[6] = [
|
|
2880
2904
|
o("svg", {
|
|
2881
2905
|
height: "14",
|
|
@@ -2921,7 +2945,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2921
2945
|
class: "w-[14px] h-[14px] rounded-md block flex-shrink-0",
|
|
2922
2946
|
style: Ae({ backgroundColor: k.value?.color })
|
|
2923
2947
|
}, null, 4)) : U("", !0),
|
|
2924
|
-
!F.value &&
|
|
2948
|
+
!F.value && De(k.value) ? (i(), c("span", {
|
|
2925
2949
|
key: 1,
|
|
2926
2950
|
class: W(nl),
|
|
2927
2951
|
style: Ae(ve(k.value)),
|
|
@@ -2968,7 +2992,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2968
2992
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2969
2993
|
"aria-hidden": "true",
|
|
2970
2994
|
disabled: a.value,
|
|
2971
|
-
onClick:
|
|
2995
|
+
onClick: Se(xe, ["stop"])
|
|
2972
2996
|
}, [..._[7] || (_[7] = [
|
|
2973
2997
|
o("svg", {
|
|
2974
2998
|
height: "20",
|
|
@@ -2985,7 +3009,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
2985
3009
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2986
3010
|
"aria-hidden": "true",
|
|
2987
3011
|
disabled: a.value,
|
|
2988
|
-
onClick: _[4] || (_[4] =
|
|
3012
|
+
onClick: _[4] || (_[4] = Se((V) => te(), ["stop"])),
|
|
2989
3013
|
title: C.value ? "Закрити список" : "Відкрити список"
|
|
2990
3014
|
}, [..._[8] || (_[8] = [
|
|
2991
3015
|
o("svg", {
|
|
@@ -3016,7 +3040,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
3016
3040
|
ref_key: "listRef",
|
|
3017
3041
|
ref: f
|
|
3018
3042
|
}, [
|
|
3019
|
-
G.value.length ? (i(!0), c(ye, { key: 0 },
|
|
3043
|
+
G.value.length ? (i(!0), c(ye, { key: 0 }, Me(G.value, (V, P) => (i(), c("div", {
|
|
3020
3044
|
key: V.id,
|
|
3021
3045
|
ref_for: !0,
|
|
3022
3046
|
ref: (Q) => y.value[P] = Q,
|
|
@@ -3035,7 +3059,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
3035
3059
|
class: "w-[11px] h-[11px] rounded-full block flex-shrink-0",
|
|
3036
3060
|
style: Ae({ backgroundColor: V?.color })
|
|
3037
3061
|
}, null, 4)) : U("", !0),
|
|
3038
|
-
!F.value &&
|
|
3062
|
+
!F.value && De(V) ? (i(), c("span", {
|
|
3039
3063
|
key: 1,
|
|
3040
3064
|
class: W(nl),
|
|
3041
3065
|
style: Ae(ve(V)),
|
|
@@ -3082,7 +3106,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
3082
3106
|
], 512)
|
|
3083
3107
|
], 64));
|
|
3084
3108
|
}
|
|
3085
|
-
}), wl = /* @__PURE__ */
|
|
3109
|
+
}), wl = /* @__PURE__ */ fe(Yr, [["__scopeId", "data-v-df831fc2"]]), Zr = ["placeholder", "disabled"], Jr = /* @__PURE__ */ oe({
|
|
3086
3110
|
__name: "vs-input-textarea",
|
|
3087
3111
|
props: /* @__PURE__ */ ke({
|
|
3088
3112
|
style: { default: () => ({}) },
|
|
@@ -3100,7 +3124,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
3100
3124
|
}),
|
|
3101
3125
|
emits: ["update:modelValue"],
|
|
3102
3126
|
setup(e) {
|
|
3103
|
-
const t = e, { inputClass: l } = Re(t.style), n =
|
|
3127
|
+
const t = e, { inputClass: l } = Re(t.style), n = Le(e, "modelValue"), r = x(() => !!t.disabled), a = x(() => t.placeholder ?? "");
|
|
3104
3128
|
function s() {
|
|
3105
3129
|
typeof n.value == "string" && (n.value = n.value.trim());
|
|
3106
3130
|
}
|
|
@@ -3149,7 +3173,7 @@ const Go = /* @__PURE__ */ de(Ro, [["render", qo]]), Ko = { class: "flex flex-co
|
|
|
3149
3173
|
console.warn("@opengis/richtext is not installed. Please install it in your app to use richtext input.");
|
|
3150
3174
|
}
|
|
3151
3175
|
});
|
|
3152
|
-
const l = e, { inputClass: n } = Re(l.style), r =
|
|
3176
|
+
const l = e, { inputClass: n } = Re(l.style), r = Le(e, "modelValue"), a = x(() => !!l.disabled), s = x(() => l.placeholder ?? ""), u = x(() => ({
|
|
3153
3177
|
height: "300px",
|
|
3154
3178
|
...l.richtextProps
|
|
3155
3179
|
}));
|
|
@@ -3189,7 +3213,7 @@ function ls(e, t) {
|
|
|
3189
3213
|
o("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
3190
3214
|
])]);
|
|
3191
3215
|
}
|
|
3192
|
-
const ns = /* @__PURE__ */
|
|
3216
|
+
const ns = /* @__PURE__ */ fe(es, [["render", ls]]), as = {}, os = {
|
|
3193
3217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3194
3218
|
width: "14",
|
|
3195
3219
|
height: "14",
|
|
@@ -3212,7 +3236,7 @@ function rs(e, t) {
|
|
|
3212
3236
|
o("path", { d: "M12 4l0 12" }, null, -1)
|
|
3213
3237
|
])]);
|
|
3214
3238
|
}
|
|
3215
|
-
const ss = /* @__PURE__ */
|
|
3239
|
+
const ss = /* @__PURE__ */ fe(as, [["render", rs]]), is = {}, us = {
|
|
3216
3240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3217
3241
|
viewBox: "0 0 24 24",
|
|
3218
3242
|
fill: "none",
|
|
@@ -3233,7 +3257,7 @@ function ds(e, t) {
|
|
|
3233
3257
|
o("path", { d: "M12 4l0 12" }, null, -1)
|
|
3234
3258
|
])]);
|
|
3235
3259
|
}
|
|
3236
|
-
const cs = /* @__PURE__ */
|
|
3260
|
+
const cs = /* @__PURE__ */ fe(is, [["render", ds]]), fs = {}, ps = {
|
|
3237
3261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3238
3262
|
viewBox: "0 0 24 24",
|
|
3239
3263
|
fill: "none",
|
|
@@ -3247,7 +3271,7 @@ function ms(e, t) {
|
|
|
3247
3271
|
Ke('<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)
|
|
3248
3272
|
])]);
|
|
3249
3273
|
}
|
|
3250
|
-
const Kt = /* @__PURE__ */
|
|
3274
|
+
const Kt = /* @__PURE__ */ fe(fs, [["render", ms]]), vs = {}, hs = {
|
|
3251
3275
|
viewBox: "0 0 178 90",
|
|
3252
3276
|
fill: "none",
|
|
3253
3277
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -3257,7 +3281,7 @@ function gs(e, t) {
|
|
|
3257
3281
|
Ke('<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)
|
|
3258
3282
|
])]);
|
|
3259
3283
|
}
|
|
3260
|
-
const ys = /* @__PURE__ */
|
|
3284
|
+
const ys = /* @__PURE__ */ fe(vs, [["render", gs]]), bs = {}, xs = {
|
|
3261
3285
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3262
3286
|
viewBox: "0 0 24 24",
|
|
3263
3287
|
fill: "none",
|
|
@@ -3271,7 +3295,7 @@ function ws(e, t) {
|
|
|
3271
3295
|
o("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)
|
|
3272
3296
|
])]);
|
|
3273
3297
|
}
|
|
3274
|
-
const Ul = /* @__PURE__ */
|
|
3298
|
+
const Ul = /* @__PURE__ */ fe(bs, [["render", ws]]), ks = { class: "bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden flex flex-col" }, $s = { class: "flex flex-col gap-2 !p-4 border-b border-gray-200 sm:flex-row sm:items-center sm:justify-between bg-gray-50" }, _s = { class: "relative w-full" }, Cs = { class: "flex flex-nowrap items-center justify-end gap-2 w-full overflow-x-auto" }, Vs = { class: "w-full overflow-x-auto" }, Ls = { class: "w-full min-w-[640px] table-auto divide-y divide-gray-200" }, Ms = { class: "bg-gray-50" }, Ss = { class: "border-b border-gray-200" }, Ds = { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 w-12 text-center" }, Bs = ["onClick"], As = {
|
|
3275
3299
|
key: 0,
|
|
3276
3300
|
class: "text-gray-400"
|
|
3277
3301
|
}, Es = {
|
|
@@ -3309,16 +3333,16 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3309
3333
|
}),
|
|
3310
3334
|
emits: ["update:modelValue"],
|
|
3311
3335
|
setup(e) {
|
|
3312
|
-
const t = e, l = Zl(), n =
|
|
3313
|
-
const j = n.value ?? [], K = a.value ? j.filter((pe) => t.colModel?.some((
|
|
3314
|
-
const _e =
|
|
3336
|
+
const t = e, l = Zl(), n = Le(e, "modelValue"), r = S({}), a = S(""), s = S(null), u = S("asc"), d = x(() => {
|
|
3337
|
+
const j = n.value ?? [], K = a.value ? j.filter((pe) => t.colModel?.some((Be) => {
|
|
3338
|
+
const _e = Be.key || Be.name;
|
|
3315
3339
|
if (!_e) return !1;
|
|
3316
3340
|
const E = pe[_e];
|
|
3317
3341
|
return E ? Array.isArray(E) ? E.join(", ").toLowerCase().includes(a.value.toLowerCase()) : String(E).toLowerCase().includes(a.value.toLowerCase()) : !1;
|
|
3318
3342
|
})) : j;
|
|
3319
3343
|
if (!s.value) return K;
|
|
3320
|
-
const Y = s.value, ue = [...K].sort((pe,
|
|
3321
|
-
const _e = he(pe?.[Y]), E = he(
|
|
3344
|
+
const Y = s.value, ue = [...K].sort((pe, Be) => {
|
|
3345
|
+
const _e = he(pe?.[Y]), E = he(Be?.[Y]);
|
|
3322
3346
|
return typeof _e == "number" && typeof E == "number" ? _e - E : String(_e).localeCompare(String(E));
|
|
3323
3347
|
});
|
|
3324
3348
|
return u.value === "asc" ? ue : ue.reverse();
|
|
@@ -3344,13 +3368,13 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3344
3368
|
const ue = new FileReader();
|
|
3345
3369
|
ue.onload = (pe) => {
|
|
3346
3370
|
try {
|
|
3347
|
-
const
|
|
3348
|
-
if (typeof
|
|
3349
|
-
const _e = JSON.parse(
|
|
3371
|
+
const Be = pe.target?.result;
|
|
3372
|
+
if (typeof Be == "string") {
|
|
3373
|
+
const _e = JSON.parse(Be);
|
|
3350
3374
|
Array.isArray(_e) && n.value.push(..._e);
|
|
3351
3375
|
}
|
|
3352
|
-
} catch (
|
|
3353
|
-
console.error("Error parsing file:",
|
|
3376
|
+
} catch (Be) {
|
|
3377
|
+
console.error("Error parsing file:", Be);
|
|
3354
3378
|
}
|
|
3355
3379
|
}, ue.readAsText(Y);
|
|
3356
3380
|
}, b = () => {
|
|
@@ -3371,8 +3395,8 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3371
3395
|
const ue = Y?.[j];
|
|
3372
3396
|
if (ue == null || ue === "") return;
|
|
3373
3397
|
if (Array.isArray(ue)) {
|
|
3374
|
-
ue.forEach((
|
|
3375
|
-
const _e = O(
|
|
3398
|
+
ue.forEach((Be) => {
|
|
3399
|
+
const _e = O(Be);
|
|
3376
3400
|
_e !== null && K.add(_e);
|
|
3377
3401
|
});
|
|
3378
3402
|
return;
|
|
@@ -3386,9 +3410,9 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3386
3410
|
j.length && await Promise.all(j.map(async (K) => {
|
|
3387
3411
|
const Y = K.key || K.name;
|
|
3388
3412
|
if (!Y) return;
|
|
3389
|
-
const ue = D(Y), pe = Array.from(ue).map((E) => String(E)).sort(),
|
|
3390
|
-
if (!pe.length || w.get(Y) ===
|
|
3391
|
-
w.set(Y,
|
|
3413
|
+
const ue = D(Y), pe = Array.from(ue).map((E) => String(E)).sort(), Be = pe.join(",");
|
|
3414
|
+
if (!pe.length || w.get(Y) === Be) return;
|
|
3415
|
+
w.set(Y, Be);
|
|
3392
3416
|
const _e = pe.map(encodeURIComponent).join(",");
|
|
3393
3417
|
try {
|
|
3394
3418
|
const te = await (await fetch(B(K.data, _e))).json();
|
|
@@ -3454,16 +3478,16 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3454
3478
|
const _e = ue.map((E) => z(pe, E)).filter(Boolean);
|
|
3455
3479
|
return _e.length ? _e.join(", ") : se(ue);
|
|
3456
3480
|
}
|
|
3457
|
-
const
|
|
3458
|
-
return
|
|
3481
|
+
const Be = z(pe, ue);
|
|
3482
|
+
return Be || se(ue);
|
|
3459
3483
|
}
|
|
3460
3484
|
async function ve(j, K) {
|
|
3461
3485
|
Z.value = "Редагувати", X.value = !0, G = "edit", H = K, R.value = { ...j };
|
|
3462
3486
|
}
|
|
3463
|
-
function
|
|
3487
|
+
function De() {
|
|
3464
3488
|
const j = F.value.validate();
|
|
3465
3489
|
if (j) {
|
|
3466
|
-
|
|
3490
|
+
Ve({ type: "warning", title: "Помилка валідації", message: Object.entries(j).map(([K, Y]) => `${K}: ${Y}`).join(`
|
|
3467
3491
|
`) });
|
|
3468
3492
|
return;
|
|
3469
3493
|
}
|
|
@@ -3546,7 +3570,7 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3546
3570
|
class: "mx-auto text-gray-400"
|
|
3547
3571
|
})
|
|
3548
3572
|
]),
|
|
3549
|
-
(i(!0), c(ye, null,
|
|
3573
|
+
(i(!0), c(ye, null, Me(e.colModel, (Y) => (i(), c("th", {
|
|
3550
3574
|
key: Y.key,
|
|
3551
3575
|
class: "px-4 py-3 text-left text-xs font-semibold text-gray-900"
|
|
3552
3576
|
}, [
|
|
@@ -3576,7 +3600,7 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3576
3600
|
])
|
|
3577
3601
|
])
|
|
3578
3602
|
])) : U("", !0),
|
|
3579
|
-
(i(!0), c(ye, null,
|
|
3603
|
+
(i(!0), c(ye, null, Me(d.value, (Y, ue) => (i(), c("tr", {
|
|
3580
3604
|
key: Y.id,
|
|
3581
3605
|
class: W(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700", {
|
|
3582
3606
|
"opacity-50": f.value === ue,
|
|
@@ -3584,7 +3608,7 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3584
3608
|
}]),
|
|
3585
3609
|
draggable: "true",
|
|
3586
3610
|
onDragstart: (pe) => I(ue),
|
|
3587
|
-
onDragover:
|
|
3611
|
+
onDragover: Se((pe) => k(ue), ["prevent"]),
|
|
3588
3612
|
onDrop: (pe) => M(ue)
|
|
3589
3613
|
}, [
|
|
3590
3614
|
o("td", Fs, [
|
|
@@ -3596,7 +3620,7 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3596
3620
|
})
|
|
3597
3621
|
])
|
|
3598
3622
|
]),
|
|
3599
|
-
(i(!0), c(ye, null,
|
|
3623
|
+
(i(!0), c(ye, null, Me(e.colModel, (pe) => (i(), c("td", {
|
|
3600
3624
|
key: pe.key,
|
|
3601
3625
|
class: "px-4 py-3 align-middle"
|
|
3602
3626
|
}, [
|
|
@@ -3679,7 +3703,7 @@ const Ul = /* @__PURE__ */ de(bs, [["render", ws]]), ks = { class: "bg-white rou
|
|
|
3679
3703
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
3680
3704
|
}, " Скасувати "),
|
|
3681
3705
|
o("button", {
|
|
3682
|
-
onClick:
|
|
3706
|
+
onClick: De,
|
|
3683
3707
|
type: "button",
|
|
3684
3708
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
|
|
3685
3709
|
}, " Зберегти ")
|
|
@@ -3817,7 +3841,7 @@ function ti(e, t) {
|
|
|
3817
3841
|
o("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)
|
|
3818
3842
|
])]);
|
|
3819
3843
|
}
|
|
3820
|
-
const li = /* @__PURE__ */
|
|
3844
|
+
const li = /* @__PURE__ */ fe(Qs, [["render", ti]]), ni = {}, ai = {
|
|
3821
3845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3822
3846
|
viewBox: "0 0 24 24",
|
|
3823
3847
|
fill: "none",
|
|
@@ -3839,7 +3863,7 @@ function oi(e, t) {
|
|
|
3839
3863
|
o("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
3840
3864
|
])]);
|
|
3841
3865
|
}
|
|
3842
|
-
const ri = /* @__PURE__ */
|
|
3866
|
+
const ri = /* @__PURE__ */ fe(ni, [["render", oi]]), si = {}, ii = {
|
|
3843
3867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3844
3868
|
viewBox: "0 0 24 24",
|
|
3845
3869
|
fill: "none",
|
|
@@ -3854,7 +3878,7 @@ function ui(e, t) {
|
|
|
3854
3878
|
Ke('<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)
|
|
3855
3879
|
])]);
|
|
3856
3880
|
}
|
|
3857
|
-
const di = /* @__PURE__ */
|
|
3881
|
+
const di = /* @__PURE__ */ fe(si, [["render", ui]]), ci = {}, fi = {
|
|
3858
3882
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3859
3883
|
viewBox: "0 0 24 24",
|
|
3860
3884
|
fill: "none",
|
|
@@ -3869,7 +3893,7 @@ function pi(e, t) {
|
|
|
3869
3893
|
Ke('<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)
|
|
3870
3894
|
])]);
|
|
3871
3895
|
}
|
|
3872
|
-
const mi = /* @__PURE__ */
|
|
3896
|
+
const mi = /* @__PURE__ */ fe(ci, [["render", pi]]), vi = {}, hi = {
|
|
3873
3897
|
version: "1.1",
|
|
3874
3898
|
viewBox: "0 0 14 14",
|
|
3875
3899
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3907,7 +3931,7 @@ function gi(e, t) {
|
|
|
3907
3931
|
], -1)
|
|
3908
3932
|
])]);
|
|
3909
3933
|
}
|
|
3910
|
-
const yi = /* @__PURE__ */
|
|
3934
|
+
const yi = /* @__PURE__ */ fe(vi, [["render", gi]]), bi = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, xi = {
|
|
3911
3935
|
key: 0,
|
|
3912
3936
|
class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
|
|
3913
3937
|
}, wi = ["onClick"], ki = { class: "relative flex-1 min-w-[140px]" }, $i = ["placeholder"], _i = "https://data.softpro.ua/api-user/gis-url-proxy", Ci = "https://geo.rv.ua/api-user/dzk.api", Vi = /* @__PURE__ */ oe({
|
|
@@ -3999,7 +4023,7 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
3999
4023
|
if (u.value === "xy") {
|
|
4000
4024
|
const B = M(w);
|
|
4001
4025
|
if (!B) {
|
|
4002
|
-
|
|
4026
|
+
Ve({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
4003
4027
|
return;
|
|
4004
4028
|
}
|
|
4005
4029
|
b(B), d.value = "";
|
|
@@ -4011,7 +4035,7 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
4011
4035
|
B.searchParams.set("searchtext", w);
|
|
4012
4036
|
else {
|
|
4013
4037
|
if (!L(w)) {
|
|
4014
|
-
|
|
4038
|
+
Ve({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
|
|
4015
4039
|
return;
|
|
4016
4040
|
}
|
|
4017
4041
|
B.searchParams.set("cad_num", w);
|
|
@@ -4020,21 +4044,21 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
4020
4044
|
if (!O.ok) throw new Error(`HTTP ${O.status}`);
|
|
4021
4045
|
const D = await O.json(), T = u.value === "here" ? g(D) : y(D);
|
|
4022
4046
|
if (!T.length)
|
|
4023
|
-
|
|
4047
|
+
Ve({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
|
|
4024
4048
|
else {
|
|
4025
4049
|
const Z = T[0];
|
|
4026
4050
|
b(Z), d.value = "";
|
|
4027
4051
|
}
|
|
4028
4052
|
} catch (B) {
|
|
4029
4053
|
const O = B?.message || "Помилка пошуку";
|
|
4030
|
-
|
|
4054
|
+
Ve({ type: "error", title: "Пошук", message: O });
|
|
4031
4055
|
}
|
|
4032
4056
|
}
|
|
4033
4057
|
}
|
|
4034
4058
|
return (w, B) => (i(), c("div", bi, [
|
|
4035
4059
|
o("form", {
|
|
4036
4060
|
class: "flex gap-2",
|
|
4037
|
-
onSubmit:
|
|
4061
|
+
onSubmit: Se($, ["prevent"])
|
|
4038
4062
|
}, [
|
|
4039
4063
|
a.value.length > 1 ? (i(), c("div", {
|
|
4040
4064
|
key: 0,
|
|
@@ -4065,7 +4089,7 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
4065
4089
|
]),
|
|
4066
4090
|
f.value ? (i(), c("div", xi, [
|
|
4067
4091
|
o("ul", null, [
|
|
4068
|
-
(i(!0), c(ye, null,
|
|
4092
|
+
(i(!0), c(ye, null, Me(a.value, (O) => (i(), c("li", {
|
|
4069
4093
|
key: O,
|
|
4070
4094
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
4071
4095
|
onClick: (D) => C(O)
|
|
@@ -4111,7 +4135,7 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
4111
4135
|
], 32)
|
|
4112
4136
|
]));
|
|
4113
4137
|
}
|
|
4114
|
-
}), Li = /* @__PURE__ */
|
|
4138
|
+
}), Li = /* @__PURE__ */ fe(Vi, [["__scopeId", "data-v-359172e4"]]), Mi = { class: "bg-white/30 p-1 rounded-md shadow w-fit" }, Si = { class: "flex gap-2" }, Di = ["onClick", "title"], Bi = ["src"], Ai = /* @__PURE__ */ oe({
|
|
4115
4139
|
__name: "map-layers",
|
|
4116
4140
|
props: {
|
|
4117
4141
|
basemaps: {}
|
|
@@ -4138,7 +4162,7 @@ const yi = /* @__PURE__ */ de(vi, [["render", gi]]), bi = { class: "map-search-w
|
|
|
4138
4162
|
}
|
|
4139
4163
|
return (d, f) => (i(), c("div", Mi, [
|
|
4140
4164
|
o("div", Si, [
|
|
4141
|
-
(i(!0), c(ye, null,
|
|
4165
|
+
(i(!0), c(ye, null, Me(e.basemaps, (m, C) => (i(), c("div", {
|
|
4142
4166
|
key: C,
|
|
4143
4167
|
class: W(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === C }]),
|
|
4144
4168
|
onClick: (I) => a(C),
|
|
@@ -4291,7 +4315,7 @@ const Ti = {
|
|
|
4291
4315
|
}
|
|
4292
4316
|
const ee = ae(), be = Object.keys(ee), he = S(be.length ? be[0] : "");
|
|
4293
4317
|
let We, N, z, se, me, ve = null;
|
|
4294
|
-
async function
|
|
4318
|
+
async function De() {
|
|
4295
4319
|
if (typeof window > "u") return null;
|
|
4296
4320
|
const v = window;
|
|
4297
4321
|
if (v[Ut]) return v[Ut];
|
|
@@ -4303,13 +4327,13 @@ const Ti = {
|
|
|
4303
4327
|
};
|
|
4304
4328
|
v[al] = v[al] || {};
|
|
4305
4329
|
const A = v[al], p = (P) => (A[P] || (A[P] = new Promise((Q, ce) => {
|
|
4306
|
-
const
|
|
4307
|
-
if (
|
|
4308
|
-
|
|
4330
|
+
const de = Array.from(document.scripts).find((Ee) => Ee.src === P);
|
|
4331
|
+
if (de) {
|
|
4332
|
+
de.addEventListener("load", () => Q(), { once: !0 }), de.addEventListener("error", (Ee) => ce(Ee), { once: !0 });
|
|
4309
4333
|
return;
|
|
4310
4334
|
}
|
|
4311
|
-
const
|
|
4312
|
-
|
|
4335
|
+
const Ce = document.createElement("script");
|
|
4336
|
+
Ce.src = P, Ce.async = !1, Ce.onload = () => Q(), Ce.onerror = (Ee) => ce(Ee), document.head.appendChild(Ce);
|
|
4313
4337
|
})), A[P]), V = (async () => {
|
|
4314
4338
|
h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), window.L || await p("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"), await p("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"), await p("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js");
|
|
4315
4339
|
const P = window.L;
|
|
@@ -4386,7 +4410,7 @@ const Ti = {
|
|
|
4386
4410
|
return p == null || p === "" ? null : { key: A.label || A.field, value: String(p) };
|
|
4387
4411
|
}).filter((A) => !!A) : Object.entries(h).filter(([A]) => typeof A == "string" && A).slice(0, 5).map(([A, p]) => ({ key: A, value: p == null ? "—" : String(p) }));
|
|
4388
4412
|
}
|
|
4389
|
-
function
|
|
4413
|
+
function Be(v, h) {
|
|
4390
4414
|
if (!N || !h?.latlng) return;
|
|
4391
4415
|
const A = N.latLngToContainerPoint(h.latlng), p = ue(h), _ = pe(v, p);
|
|
4392
4416
|
if (!_.length) {
|
|
@@ -4418,7 +4442,7 @@ const Ti = {
|
|
|
4418
4442
|
default: Y(v)
|
|
4419
4443
|
}
|
|
4420
4444
|
});
|
|
4421
|
-
return V?.on?.("mouseover", (P) =>
|
|
4445
|
+
return V?.on?.("mouseover", (P) => Be(v, P)), V?.on?.("mousemove", (P) => Be(v, P)), V?.on?.("mouseout", () => _e(v.id)), V;
|
|
4422
4446
|
}
|
|
4423
4447
|
if (_?.maplibreGL && window?.maplibregl) {
|
|
4424
4448
|
const V = A;
|
|
@@ -4454,8 +4478,8 @@ const Ti = {
|
|
|
4454
4478
|
return null;
|
|
4455
4479
|
const Q = P.map((ce) => {
|
|
4456
4480
|
if (!ce.length) return ce;
|
|
4457
|
-
const
|
|
4458
|
-
return
|
|
4481
|
+
const de = ce[0], Ce = ce[ce.length - 1];
|
|
4482
|
+
return de && Ce && typeof Ce.equals == "function" && !Ce.equals(de) ? [...ce, de] : ce;
|
|
4459
4483
|
});
|
|
4460
4484
|
return h.polyline(Q, _);
|
|
4461
4485
|
}
|
|
@@ -4502,11 +4526,11 @@ const Ti = {
|
|
|
4502
4526
|
if (!_) return;
|
|
4503
4527
|
const P = j(_, V);
|
|
4504
4528
|
A.push(P), p.add(P);
|
|
4505
|
-
const Q = X[P], ce = { ..._, id: P },
|
|
4529
|
+
const Q = X[P], ce = { ..._, id: P }, de = Q?.visible ?? !!ce?.visible;
|
|
4506
4530
|
Q && (Q.layer && N?.hasLayer(Q.layer) && N.removeLayer(Q.layer), Q.boundsLayer && N?.hasLayer(Q.boundsLayer) && N.removeLayer(Q.boundsLayer), _e(P)), X[P] = {
|
|
4507
4531
|
id: P,
|
|
4508
4532
|
config: ce,
|
|
4509
|
-
visible:
|
|
4533
|
+
visible: de,
|
|
4510
4534
|
layer: null,
|
|
4511
4535
|
boundsLayer: null
|
|
4512
4536
|
};
|
|
@@ -4578,15 +4602,15 @@ const Ti = {
|
|
|
4578
4602
|
if (p.length > 0 && (p[0] instanceof h.LatLng || typeof p[0]?.lat == "number")) {
|
|
4579
4603
|
const { feature: P } = v;
|
|
4580
4604
|
if (P?.geometry?.type === "MultiPolygon") {
|
|
4581
|
-
const
|
|
4582
|
-
if (!Array.isArray(Ee) || !Ee.length) return
|
|
4605
|
+
const de = A.reduce((Ce, Ee) => {
|
|
4606
|
+
if (!Array.isArray(Ee) || !Ee.length) return Ce;
|
|
4583
4607
|
if (h.GeometryUtil?.geodesicArea) {
|
|
4584
4608
|
const Fe = h.GeometryUtil.geodesicArea(Ee);
|
|
4585
|
-
if (Fe) return
|
|
4609
|
+
if (Fe) return Ce + Math.abs(Fe);
|
|
4586
4610
|
}
|
|
4587
|
-
return
|
|
4611
|
+
return Ce;
|
|
4588
4612
|
}, 0);
|
|
4589
|
-
return
|
|
4613
|
+
return de ? de / 1e6 : 0;
|
|
4590
4614
|
}
|
|
4591
4615
|
const ce = h.GeometryUtil?.geodesicArea ? h.GeometryUtil.geodesicArea(A) : 0;
|
|
4592
4616
|
return ce ? Math.abs(ce) / 1e6 : 0;
|
|
@@ -4595,8 +4619,8 @@ const Ti = {
|
|
|
4595
4619
|
if (!Array.isArray(Q) || !Q.length) return P;
|
|
4596
4620
|
const ce = Array.isArray(Q[0]) ? Q[0] : Q;
|
|
4597
4621
|
if (h.GeometryUtil?.geodesicArea) {
|
|
4598
|
-
const
|
|
4599
|
-
if (
|
|
4622
|
+
const de = h.GeometryUtil.geodesicArea(ce);
|
|
4623
|
+
if (de) return P + Math.abs(de);
|
|
4600
4624
|
}
|
|
4601
4625
|
return P;
|
|
4602
4626
|
}, 0);
|
|
@@ -4663,14 +4687,14 @@ const Ti = {
|
|
|
4663
4687
|
M.value = null, b.value = 0;
|
|
4664
4688
|
return;
|
|
4665
4689
|
}
|
|
4666
|
-
const h = v[v.length - 1], A = st(h), p = dt(h), _ = z.toGeoJSON(), V = _?.features?.some((
|
|
4690
|
+
const h = v[v.length - 1], A = st(h), p = dt(h), _ = z.toGeoJSON(), V = _?.features?.some((de) => de.geometry?.type === "MultiPolygon") || _?.geometry?.type === "MultiPolygon", P = v.length > 1 && v.every((de) => de instanceof T.value.Polygon || de instanceof T.value.Rectangle), Q = V || P;
|
|
4667
4691
|
let ce = null;
|
|
4668
4692
|
if (Q) {
|
|
4669
|
-
const
|
|
4693
|
+
const de = v.reduce((Ce, Ee) => {
|
|
4670
4694
|
const Fe = St(Ee);
|
|
4671
|
-
return
|
|
4695
|
+
return Ce + (Fe ? Fe * 1e6 : 0);
|
|
4672
4696
|
}, 0);
|
|
4673
|
-
ce =
|
|
4697
|
+
ce = de ? de / 1e6 : 0;
|
|
4674
4698
|
} else
|
|
4675
4699
|
ce = St(h);
|
|
4676
4700
|
M.value = {
|
|
@@ -4780,7 +4804,7 @@ const Ti = {
|
|
|
4780
4804
|
}
|
|
4781
4805
|
let Ft = null;
|
|
4782
4806
|
return Ue(async () => {
|
|
4783
|
-
T.value = await
|
|
4807
|
+
T.value = await De();
|
|
4784
4808
|
const v = T.value;
|
|
4785
4809
|
v.drawLocal = Xs, N = v.map(m.value, { zoomControl: !1, scrollWheelZoom: !1 }).setView($.value, w.value), v.control.zoom({ position: "bottomright" }).addTo(N);
|
|
4786
4810
|
const h = he.value || Object.keys(ee)[0];
|
|
@@ -4898,7 +4922,7 @@ const Ti = {
|
|
|
4898
4922
|
}, [
|
|
4899
4923
|
o("div", Ri, [
|
|
4900
4924
|
o("dl", Hi, [
|
|
4901
|
-
(i(!0), c(ye, null,
|
|
4925
|
+
(i(!0), c(ye, null, Me(J.value, (A) => (i(), c("div", {
|
|
4902
4926
|
key: `${A.key}-${A.value}`,
|
|
4903
4927
|
class: "flex justify-between gap-2"
|
|
4904
4928
|
}, [
|
|
@@ -4975,7 +4999,7 @@ const Ti = {
|
|
|
4975
4999
|
H.value.length ? (i(), c("div", tu, [
|
|
4976
5000
|
h[10] || (h[10] = o("p", { class: "font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2" }, "Шари", -1)),
|
|
4977
5001
|
o("div", lu, [
|
|
4978
|
-
(i(!0), c(ye, null,
|
|
5002
|
+
(i(!0), c(ye, null, Me(H.value, (A) => (i(), c("label", {
|
|
4979
5003
|
key: A.id,
|
|
4980
5004
|
class: "flex items-center gap-2 cursor-pointer select-none"
|
|
4981
5005
|
}, [
|
|
@@ -5066,7 +5090,7 @@ const Ti = {
|
|
|
5066
5090
|
], 2)
|
|
5067
5091
|
], 8, ["disabled"]));
|
|
5068
5092
|
}
|
|
5069
|
-
}), hu = /* @__PURE__ */
|
|
5093
|
+
}), hu = /* @__PURE__ */ fe(vu, [["__scopeId", "data-v-5928a49c"]]), gu = ["data-focus"], yu = { class: "flex items-center" }, bu = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, xu = ["onClick", "aria-label"], wu = {
|
|
5070
5094
|
key: 0,
|
|
5071
5095
|
class: "absolute text-gray-500 truncate pl-2"
|
|
5072
5096
|
}, ku = { class: "flex-1 min-w-[2px]" }, $u = ["placeholder"], _u = { class: "flex items-center shrink-0" }, Cu = ["disabled"], Vu = /* @__PURE__ */ oe({
|
|
@@ -5090,7 +5114,7 @@ const Ti = {
|
|
|
5090
5114
|
setup(e, { emit: t }) {
|
|
5091
5115
|
const l = e, n = t;
|
|
5092
5116
|
Re(l.style);
|
|
5093
|
-
const r = S(null), a = S(null), s = S(null), u = S(!1), d = S(""), f =
|
|
5117
|
+
const r = S(null), a = S(null), s = S(null), u = S(!1), d = S(""), f = Le(e, "modelValue"), m = x(() => l.placeholder || "Add tag…"), C = x(() => f.value?.length === 0 && d.value === ""), I = x(() => !l.disabled && f.value?.length > 0), k = x(() => l.disabled), M = async () => {
|
|
5094
5118
|
k.value || await Oe(() => s.value?.focus());
|
|
5095
5119
|
}, g = (O) => {
|
|
5096
5120
|
const D = O.trim();
|
|
@@ -5115,7 +5139,7 @@ const Ti = {
|
|
|
5115
5139
|
class: "flex gap-1 w-full",
|
|
5116
5140
|
ref_key: "root",
|
|
5117
5141
|
ref: r,
|
|
5118
|
-
onClick: D[1] || (D[1] =
|
|
5142
|
+
onClick: D[1] || (D[1] = Se(() => {
|
|
5119
5143
|
}, ["stop"]))
|
|
5120
5144
|
}, [
|
|
5121
5145
|
o("div", {
|
|
@@ -5138,7 +5162,7 @@ const Ti = {
|
|
|
5138
5162
|
ref_key: "chipsRef",
|
|
5139
5163
|
ref: a
|
|
5140
5164
|
}, [
|
|
5141
|
-
(i(!0), c(ye, null,
|
|
5165
|
+
(i(!0), c(ye, null, Me(f.value, (T, Z) => (i(), c("div", {
|
|
5142
5166
|
key: Z,
|
|
5143
5167
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
5144
5168
|
}, [
|
|
@@ -5148,7 +5172,7 @@ const Ti = {
|
|
|
5148
5172
|
o("div", {
|
|
5149
5173
|
role: "button",
|
|
5150
5174
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
5151
|
-
onClick:
|
|
5175
|
+
onClick: Se((X) => L(Z), ["stop"]),
|
|
5152
5176
|
"aria-label": `Remove ${T}`
|
|
5153
5177
|
}, [...D[2] || (D[2] = [
|
|
5154
5178
|
o("svg", {
|
|
@@ -5194,7 +5218,7 @@ const Ti = {
|
|
|
5194
5218
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
5195
5219
|
"aria-label": "Clear all tags",
|
|
5196
5220
|
disabled: k.value,
|
|
5197
|
-
onClick:
|
|
5221
|
+
onClick: Se(b, ["stop"])
|
|
5198
5222
|
}, [...D[3] || (D[3] = [
|
|
5199
5223
|
o("svg", {
|
|
5200
5224
|
height: "20",
|
|
@@ -5222,7 +5246,7 @@ const Ti = {
|
|
|
5222
5246
|
}),
|
|
5223
5247
|
emits: ["update:modelValue"],
|
|
5224
5248
|
setup(e) {
|
|
5225
|
-
const t = Ge("values"), l = e, n =
|
|
5249
|
+
const t = Ge("values"), l = e, n = Le(e, "modelValue");
|
|
5226
5250
|
function r(s) {
|
|
5227
5251
|
const u = {
|
|
5228
5252
|
а: "a",
|
|
@@ -5285,7 +5309,7 @@ const Ti = {
|
|
|
5285
5309
|
}, " Gen ")
|
|
5286
5310
|
]));
|
|
5287
5311
|
}
|
|
5288
|
-
}), Du = /* @__PURE__ */
|
|
5312
|
+
}), Du = /* @__PURE__ */ fe(Su, [["__scopeId", "data-v-cb7b2b74"]]), Bu = { class: "relative flex gap-1 bg-white w-full" }, Au = ["disabled", "placeholder"], Eu = ["disabled"], Tu = { key: 0 }, Iu = { key: 1 }, ju = /* @__PURE__ */ oe({
|
|
5289
5313
|
__name: "vs-input-codegen",
|
|
5290
5314
|
props: /* @__PURE__ */ ke({
|
|
5291
5315
|
table: {},
|
|
@@ -5308,7 +5332,7 @@ const Ti = {
|
|
|
5308
5332
|
}),
|
|
5309
5333
|
emits: ["update:modelValue"],
|
|
5310
5334
|
setup(e) {
|
|
5311
|
-
const t = e, l =
|
|
5335
|
+
const t = e, l = Le(e, "modelValue"), n = S(!1), r = x(() => t.init !== !1), a = x(() => !!t.table && !!t.code), s = () => {
|
|
5312
5336
|
if (!a.value) return "";
|
|
5313
5337
|
const f = encodeURIComponent(String(t.table)), m = encodeURIComponent(String(t.code));
|
|
5314
5338
|
return `/api/code-gen/${f}/${m}`;
|
|
@@ -5352,7 +5376,7 @@ const Ti = {
|
|
|
5352
5376
|
], 8, Eu)
|
|
5353
5377
|
]));
|
|
5354
5378
|
}
|
|
5355
|
-
}), Fu = /* @__PURE__ */
|
|
5379
|
+
}), Fu = /* @__PURE__ */ fe(ju, [["__scopeId", "data-v-8f88fb66"]]), Ou = { class: "w-full" }, Pu = {
|
|
5356
5380
|
ref: "sortableContainer",
|
|
5357
5381
|
class: "flex flex-col gap-1"
|
|
5358
5382
|
}, zu = ["onDragstart", "onDrop"], Uu = { class: "w-1/3" }, Nu = { class: "w-2/3" }, Ru = ["onClick"], Hu = {
|
|
@@ -5408,12 +5432,12 @@ const Ti = {
|
|
|
5408
5432
|
{ deep: !0 }
|
|
5409
5433
|
), (y, L) => (i(), c("div", Ou, [
|
|
5410
5434
|
o("div", Pu, [
|
|
5411
|
-
(i(!0), c(ye, null,
|
|
5435
|
+
(i(!0), c(ye, null, Me(d.value, (b, $) => (i(), c("div", {
|
|
5412
5436
|
key: b.id,
|
|
5413
5437
|
class: W(["flex items-center gap-2 w-full", { "opacity-50": f.value === $ }]),
|
|
5414
5438
|
draggable: "true",
|
|
5415
5439
|
onDragstart: (w) => C($),
|
|
5416
|
-
onDragover: L[0] || (L[0] =
|
|
5440
|
+
onDragover: L[0] || (L[0] = Se(() => {
|
|
5417
5441
|
}, ["prevent"])),
|
|
5418
5442
|
onDrop: (w) => I($)
|
|
5419
5443
|
}, [
|
|
@@ -5460,7 +5484,7 @@ const Ti = {
|
|
|
5460
5484
|
])
|
|
5461
5485
|
]));
|
|
5462
5486
|
}
|
|
5463
|
-
}), Wu = /* @__PURE__ */
|
|
5487
|
+
}), Wu = /* @__PURE__ */ fe(Ku, [["__scopeId", "data-v-2ae5f16f"]]), Yu = { class: "w-full" }, Zu = {
|
|
5464
5488
|
ref: "sortableContainer",
|
|
5465
5489
|
class: "flex flex-col gap-1"
|
|
5466
5490
|
}, Ju = ["onDragstart", "onDrop"], Xu = ["disabled"], Qu = { class: "flex-1" }, ed = ["onClick", "disabled"], td = {
|
|
@@ -5480,7 +5504,7 @@ const Ti = {
|
|
|
5480
5504
|
}),
|
|
5481
5505
|
emits: ["update:modelValue"],
|
|
5482
5506
|
setup(e) {
|
|
5483
|
-
const t = e, l =
|
|
5507
|
+
const t = e, l = Le(e, "modelValue"), n = S([]), r = S(null), a = x(() => !!t.disabled), s = x(() => t.placeholder ?? ""), u = x(() => t.addButtonText ?? "Додати");
|
|
5484
5508
|
let d = !1;
|
|
5485
5509
|
const f = (y) => `${y}-${Math.random().toString(36).substring(2, 15)}`, m = (y) => {
|
|
5486
5510
|
const L = y ?? l.value ?? [];
|
|
@@ -5523,12 +5547,12 @@ const Ti = {
|
|
|
5523
5547
|
}
|
|
5524
5548
|
return (y, L) => (i(), c("div", Yu, [
|
|
5525
5549
|
o("div", Zu, [
|
|
5526
|
-
(i(!0), c(ye, null,
|
|
5550
|
+
(i(!0), c(ye, null, Me(n.value, (b, $) => (i(), c("div", {
|
|
5527
5551
|
key: b.id,
|
|
5528
5552
|
class: W(["flex items-center gap-2 w-full", { "opacity-50": r.value === $ }]),
|
|
5529
5553
|
draggable: "true",
|
|
5530
5554
|
onDragstart: (w) => M($),
|
|
5531
|
-
onDragover: L[0] || (L[0] =
|
|
5555
|
+
onDragover: L[0] || (L[0] = Se(() => {
|
|
5532
5556
|
}, ["prevent"])),
|
|
5533
5557
|
onDrop: (w) => g($)
|
|
5534
5558
|
}, [
|
|
@@ -5600,7 +5624,7 @@ const Ti = {
|
|
|
5600
5624
|
])
|
|
5601
5625
|
]));
|
|
5602
5626
|
}
|
|
5603
|
-
}), od = /* @__PURE__ */
|
|
5627
|
+
}), od = /* @__PURE__ */ fe(ad, [["__scopeId", "data-v-77ce3498"]]), rd = { class: "flex items-center gap-2 w-full" }, sd = ["disabled"], id = ["disabled"], ud = /* @__PURE__ */ oe({
|
|
5604
5628
|
__name: "vs-input-color",
|
|
5605
5629
|
props: {
|
|
5606
5630
|
style: { default: () => ({}) },
|
|
@@ -5708,7 +5732,7 @@ const Ti = {
|
|
|
5708
5732
|
}),
|
|
5709
5733
|
emits: ["update:modelValue"],
|
|
5710
5734
|
setup(e) {
|
|
5711
|
-
const t = e, l = S(t.count), n = x(() => t.limit), { inputClass: r } = Re(t.style), a =
|
|
5735
|
+
const t = e, l = S(t.count), n = x(() => t.limit), { inputClass: r } = Re(t.style), a = Le(e, "modelValue"), s = x(() => !!t.disabled), u = x(() => t.placeholder ?? "");
|
|
5712
5736
|
kt(() => {
|
|
5713
5737
|
const g = a.value?.length ?? 0;
|
|
5714
5738
|
g < l.value && (a.value = [
|
|
@@ -5788,7 +5812,7 @@ const Ti = {
|
|
|
5788
5812
|
}, { deep: !0 }), (g, y) => (i(), c("div", {
|
|
5789
5813
|
class: W(["grid gap-2", `grid-cols-${n.value}`])
|
|
5790
5814
|
}, [
|
|
5791
|
-
(i(!0), c(ye, null,
|
|
5815
|
+
(i(!0), c(ye, null, Me(l.value, (L) => (i(), c("div", {
|
|
5792
5816
|
key: L,
|
|
5793
5817
|
class: "flex items-center gap-2 w-full"
|
|
5794
5818
|
}, [
|
|
@@ -5819,7 +5843,7 @@ const Ti = {
|
|
|
5819
5843
|
!e.disabled && L === l.value && e.isAdded ? (i(), c("button", {
|
|
5820
5844
|
key: 2,
|
|
5821
5845
|
type: "button",
|
|
5822
|
-
onClick:
|
|
5846
|
+
onClick: Se(k, ["stop"]),
|
|
5823
5847
|
class: "cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
|
|
5824
5848
|
}, [
|
|
5825
5849
|
ne(lt, {
|
|
@@ -5830,7 +5854,7 @@ const Ti = {
|
|
|
5830
5854
|
!e.disabled && l.value > 1 && e.isAdded ? (i(), c("button", {
|
|
5831
5855
|
key: 3,
|
|
5832
5856
|
type: "button",
|
|
5833
|
-
onClick:
|
|
5857
|
+
onClick: Se((b) => M(L - 1), ["stop"]),
|
|
5834
5858
|
class: "cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
|
|
5835
5859
|
}, [
|
|
5836
5860
|
ne(Zt, {
|
|
@@ -5875,7 +5899,7 @@ const Ti = {
|
|
|
5875
5899
|
}),
|
|
5876
5900
|
emits: /* @__PURE__ */ ke(["change", "update:modelValue", "value-selected"], ["update:modelValue"]),
|
|
5877
5901
|
setup(e, { emit: t }) {
|
|
5878
|
-
const l = e, n = t, r =
|
|
5902
|
+
const l = e, n = t, r = Le(e, "modelValue"), a = S([]), s = S(l.options ?? []), u = S({}), d = S({}), f = S({ keyword: "", parent: null }), m = S(""), C = S(!1), I = S(null), k = S(null), M = S(null);
|
|
5879
5903
|
let g = !1, y = !1;
|
|
5880
5904
|
const L = Ge("values"), b = x(() => !!l.disabled), $ = x(() => l.placeholder ?? "Оберіть значення"), w = x(() => l.search !== !1), B = x(() => `${l.maxHeight ?? 280}px`), O = x(() => {
|
|
5881
5905
|
const E = l.parent ?? l.parentValue;
|
|
@@ -5971,7 +5995,7 @@ const Ti = {
|
|
|
5971
5995
|
}
|
|
5972
5996
|
await se("click");
|
|
5973
5997
|
}
|
|
5974
|
-
},
|
|
5998
|
+
}, De = (E) => {
|
|
5975
5999
|
E.key === "Escape" && me();
|
|
5976
6000
|
}, Je = (E) => {
|
|
5977
6001
|
const te = E.target;
|
|
@@ -6016,7 +6040,7 @@ const Ti = {
|
|
|
6016
6040
|
if (b.value || I.value === null || I.value === E) return;
|
|
6017
6041
|
const te = [...a.value], [ie] = te.splice(I.value, 1);
|
|
6018
6042
|
te.splice(E, 0, ie), I.value = null, a.value = te;
|
|
6019
|
-
},
|
|
6043
|
+
}, Be = async () => {
|
|
6020
6044
|
const te = (Array.isArray(r.value) ? [...r.value] : []).filter((xe) => xe != null);
|
|
6021
6045
|
if (l.data && te.length) {
|
|
6022
6046
|
const xe = te.filter((je) => !u.value[T(je)]);
|
|
@@ -6041,15 +6065,15 @@ const Ti = {
|
|
|
6041
6065
|
y = !1;
|
|
6042
6066
|
return;
|
|
6043
6067
|
}
|
|
6044
|
-
|
|
6068
|
+
Be();
|
|
6045
6069
|
}, { deep: !0 }), re(m, (E) => {
|
|
6046
6070
|
!l.data || !C.value || N(E.trim());
|
|
6047
6071
|
}), re(b, (E) => {
|
|
6048
6072
|
E && me();
|
|
6049
6073
|
}), re(() => l.options, async (E) => {
|
|
6050
|
-
l.data || (F(E ?? []), await
|
|
6074
|
+
l.data || (F(E ?? []), await Be());
|
|
6051
6075
|
}, { immediate: !0, deep: !0 }), re(() => l.data, async (E) => {
|
|
6052
|
-
E && (await he(m.value.trim()), await
|
|
6076
|
+
E && (await he(m.value.trim()), await Be());
|
|
6053
6077
|
}, { immediate: !0 });
|
|
6054
6078
|
const _e = S(!1);
|
|
6055
6079
|
return re(D, async () => {
|
|
@@ -6058,12 +6082,12 @@ const Ti = {
|
|
|
6058
6082
|
_e.value = !0;
|
|
6059
6083
|
return;
|
|
6060
6084
|
}
|
|
6061
|
-
a.value = [], await he(m.value.trim()), await
|
|
6085
|
+
a.value = [], await he(m.value.trim()), await Be();
|
|
6062
6086
|
}
|
|
6063
6087
|
}), Ue(async () => {
|
|
6064
|
-
document.addEventListener("click", Je, !0), window.addEventListener("keydown",
|
|
6088
|
+
document.addEventListener("click", Je, !0), window.addEventListener("keydown", De), await Be();
|
|
6065
6089
|
}), Lt(() => {
|
|
6066
|
-
document.removeEventListener("click", Je, !0), window.removeEventListener("keydown",
|
|
6090
|
+
document.removeEventListener("click", Je, !0), window.removeEventListener("keydown", De);
|
|
6067
6091
|
}), (E, te) => (i(), c("div", {
|
|
6068
6092
|
class: "flex flex-col gap-2 w-full",
|
|
6069
6093
|
ref_key: "rootRef",
|
|
@@ -6071,7 +6095,7 @@ const Ti = {
|
|
|
6071
6095
|
}, [
|
|
6072
6096
|
o("div", {
|
|
6073
6097
|
class: "relative",
|
|
6074
|
-
onClick: te[2] || (te[2] =
|
|
6098
|
+
onClick: te[2] || (te[2] = Se(() => {
|
|
6075
6099
|
}, ["stop"]))
|
|
6076
6100
|
}, [
|
|
6077
6101
|
o("div", {
|
|
@@ -6118,11 +6142,11 @@ const Ti = {
|
|
|
6118
6142
|
style: Ae({ maxHeight: B.value })
|
|
6119
6143
|
}, [
|
|
6120
6144
|
o("div", xd, [
|
|
6121
|
-
(i(!0), c(ye, null,
|
|
6145
|
+
(i(!0), c(ye, null, Me(H.value, (ie) => (i(), c("button", {
|
|
6122
6146
|
key: T(ie.id),
|
|
6123
6147
|
type: "button",
|
|
6124
6148
|
class: "w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",
|
|
6125
|
-
onClick:
|
|
6149
|
+
onClick: Se((xe) => j(ie), ["stop"]),
|
|
6126
6150
|
disabled: b.value
|
|
6127
6151
|
}, le(Z(ie)), 9, wd))), 128)),
|
|
6128
6152
|
H.value.length === 0 ? (i(), c("p", kd, " Немає варіантів ")) : U("", !0)
|
|
@@ -6133,12 +6157,12 @@ const Ti = {
|
|
|
6133
6157
|
})
|
|
6134
6158
|
]),
|
|
6135
6159
|
o("div", $d, [
|
|
6136
|
-
(i(!0), c(ye, null,
|
|
6160
|
+
(i(!0), c(ye, null, Me(a.value, (ie, xe) => (i(), c("div", {
|
|
6137
6161
|
key: ie.key,
|
|
6138
6162
|
class: W(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2", { "opacity-60": I.value === xe }]),
|
|
6139
6163
|
draggable: "true",
|
|
6140
6164
|
onDragstart: (je) => ue(xe),
|
|
6141
|
-
onDragover: te[3] || (te[3] =
|
|
6165
|
+
onDragover: te[3] || (te[3] = Se(() => {
|
|
6142
6166
|
}, ["prevent"])),
|
|
6143
6167
|
onDrop: (je) => pe(xe),
|
|
6144
6168
|
onDragend: te[4] || (te[4] = (je) => I.value = null)
|
|
@@ -6162,7 +6186,7 @@ const Ti = {
|
|
|
6162
6186
|
type: "button",
|
|
6163
6187
|
class: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-400 hover:text-stone-900",
|
|
6164
6188
|
disabled: b.value,
|
|
6165
|
-
onClick:
|
|
6189
|
+
onClick: Se((je) => Y(ie.id), ["stop"]),
|
|
6166
6190
|
"aria-label": `Видалити ${ie.text}`
|
|
6167
6191
|
}, [
|
|
6168
6192
|
ne(Zt, {
|
|
@@ -6175,7 +6199,7 @@ const Ti = {
|
|
|
6175
6199
|
])
|
|
6176
6200
|
], 512));
|
|
6177
6201
|
}
|
|
6178
|
-
}), ol = /* @__PURE__ */
|
|
6202
|
+
}), ol = /* @__PURE__ */ fe(Sd, [["__scopeId", "data-v-cffead85"]]), Dd = { class: "flex items-center gap-2 w-full" }, Bd = { class: "relative flex-1" }, Ad = ["placeholder", "disabled", "onKeydown"], Ed = ["disabled"], Td = {
|
|
6179
6203
|
key: 0,
|
|
6180
6204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6181
6205
|
width: "18",
|
|
@@ -6220,7 +6244,7 @@ const Ti = {
|
|
|
6220
6244
|
}),
|
|
6221
6245
|
emits: /* @__PURE__ */ ke(["update:modelValue", "update:geom"], ["update:modelValue"]),
|
|
6222
6246
|
setup(e, { emit: t }) {
|
|
6223
|
-
const l = /{{\s*([^}]+?)\s*}}/g, n = e, r = t, { inputClass: a } = Re(n.style), s =
|
|
6247
|
+
const l = /{{\s*([^}]+?)\s*}}/g, n = e, r = t, { inputClass: a } = Re(n.style), s = Le(e, "modelValue"), u = x({
|
|
6224
6248
|
get: () => s.value,
|
|
6225
6249
|
set: (D) => {
|
|
6226
6250
|
s.value = D;
|
|
@@ -6305,7 +6329,7 @@ const Ti = {
|
|
|
6305
6329
|
disabled: k.value,
|
|
6306
6330
|
class: W(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [$e(a), { "!border-red-600": n.error }]]),
|
|
6307
6331
|
style: { border: "1px solid #CFD9E0" },
|
|
6308
|
-
onKeydown: Xl(
|
|
6332
|
+
onKeydown: Xl(Se(b, ["prevent"]), ["enter"])
|
|
6309
6333
|
}, null, 42, Ad), [
|
|
6310
6334
|
[Ie, u.value]
|
|
6311
6335
|
]),
|
|
@@ -6408,7 +6432,7 @@ const Ti = {
|
|
|
6408
6432
|
])])
|
|
6409
6433
|
]),
|
|
6410
6434
|
o("ul", null, [
|
|
6411
|
-
(i(!0), c(ye, null,
|
|
6435
|
+
(i(!0), c(ye, null, Me(f.value, (Z, X) => (i(), c("li", {
|
|
6412
6436
|
key: X,
|
|
6413
6437
|
onClick: (G) => B(Z),
|
|
6414
6438
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"
|
|
@@ -6446,7 +6470,7 @@ const Ti = {
|
|
|
6446
6470
|
}),
|
|
6447
6471
|
emits: ["update:modelValue"],
|
|
6448
6472
|
setup(e) {
|
|
6449
|
-
const t = e, l =
|
|
6473
|
+
const t = e, l = Le(e, "modelValue"), n = x(() => Array.isArray(l.value) ? l.value : []), r = S([]), a = x(() => t.schema?.map((g) => ({
|
|
6450
6474
|
...g,
|
|
6451
6475
|
disabled: t.disabled || g.disabled
|
|
6452
6476
|
})) ?? []), s = x(() => a.value.map((g) => M(g))), u = x(() => t.disabled ? !1 : t.maxItems ? n.value.length < t.maxItems : !0), d = x(() => t.disabled || n.value.length <= (t.minItems || 0));
|
|
@@ -6481,7 +6505,7 @@ const Ti = {
|
|
|
6481
6505
|
}
|
|
6482
6506
|
return (g, y) => (i(), c("div", Nd, [
|
|
6483
6507
|
o("div", Rd, [
|
|
6484
|
-
(i(!0), c(ye, null,
|
|
6508
|
+
(i(!0), c(ye, null, Me(n.value, (L, b) => (i(), c("div", {
|
|
6485
6509
|
key: r.value[b],
|
|
6486
6510
|
class: "flex items-center gap-3"
|
|
6487
6511
|
}, [
|
|
@@ -6515,7 +6539,7 @@ const Ti = {
|
|
|
6515
6539
|
], 8, Gd)
|
|
6516
6540
|
]));
|
|
6517
6541
|
}
|
|
6518
|
-
}), Wd = /* @__PURE__ */
|
|
6542
|
+
}), Wd = /* @__PURE__ */ fe(Kd, [["__scopeId", "data-v-c4c0acde"]]), Yd = {};
|
|
6519
6543
|
function Zd(e, t) {
|
|
6520
6544
|
return i(), c("svg", ot({
|
|
6521
6545
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6539,7 +6563,7 @@ function Zd(e, t) {
|
|
|
6539
6563
|
o("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }, null, -1)
|
|
6540
6564
|
])], 16);
|
|
6541
6565
|
}
|
|
6542
|
-
const Jd = /* @__PURE__ */
|
|
6566
|
+
const Jd = /* @__PURE__ */ fe(Yd, [["render", Zd]]), Xd = { class: "vs-dataform space-y-4" }, Qd = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], ec = { class: "flex items-center gap-2" }, tc = ["onClick"], lc = { class: "text-sm font-medium text-gray-700" }, nc = { class: "flex items-center gap-2" }, ac = ["title", "onClick", "disabled"], oc = ["title", "onClick", "disabled"], rc = {
|
|
6543
6567
|
key: 0,
|
|
6544
6568
|
class: "rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"
|
|
6545
6569
|
}, sc = ["disabled"], ic = /* @__PURE__ */ oe({
|
|
@@ -6571,7 +6595,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6571
6595
|
}),
|
|
6572
6596
|
emits: ["update:modelValue"],
|
|
6573
6597
|
setup(e) {
|
|
6574
|
-
const t = e, l =
|
|
6598
|
+
const t = e, l = Le(e, "modelValue"), n = S([]), r = S([]), a = S(0), s = S(null), u = S(null), d = S(null), f = x(() => t.groupLabel ?? "Group"), m = x(() => t.emptyLabel ?? "Ще немає груп"), C = x(() => t.schema?.map((z) => ({
|
|
6575
6599
|
...z,
|
|
6576
6600
|
disabled: t.disabled || z.disabled
|
|
6577
6601
|
})) ?? []), I = x(() => C.value.map((z) => Z(z))), k = x(() => t.view === "accordion"), M = x(() => !!(t.collapsible || k.value)), g = x(() => t.draggable !== !1), y = x(() => t.disabled ? !1 : t.maxGroups ? l.value.length < t.maxGroups : !0), L = x(() => t.disabled || l.value.length <= (t.minGroups || 0));
|
|
@@ -6657,8 +6681,8 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6657
6681
|
function ae(z, se) {
|
|
6658
6682
|
const me = [...l.value], [ve] = me.splice(z, 1);
|
|
6659
6683
|
me.splice(se, 0, ve), l.value = me;
|
|
6660
|
-
const
|
|
6661
|
-
if (
|
|
6684
|
+
const De = [...n.value], [Je] = De.splice(z, 1);
|
|
6685
|
+
if (De.splice(se, 0, Je), n.value = De, k.value)
|
|
6662
6686
|
a.value === z && (a.value = se);
|
|
6663
6687
|
else {
|
|
6664
6688
|
const He = [...r.value], [j] = He.splice(z, 1);
|
|
@@ -6675,8 +6699,8 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6675
6699
|
}
|
|
6676
6700
|
function he(z, se) {
|
|
6677
6701
|
if (!se?.currentTarget) return z;
|
|
6678
|
-
const me = se.currentTarget.getBoundingClientRect(),
|
|
6679
|
-
return Math.max(0, Math.min(
|
|
6702
|
+
const me = se.currentTarget.getBoundingClientRect(), De = se.clientY - me.top > me.height / 2 ? z + 1 : z;
|
|
6703
|
+
return Math.max(0, Math.min(De, l.value.length));
|
|
6680
6704
|
}
|
|
6681
6705
|
function We(z) {
|
|
6682
6706
|
const se = s.value;
|
|
@@ -6690,17 +6714,17 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6690
6714
|
d.value = null, s.value = null, u.value = null;
|
|
6691
6715
|
}
|
|
6692
6716
|
return (z, se) => (i(), c("div", Xd, [
|
|
6693
|
-
(i(!0), c(ye, null,
|
|
6717
|
+
(i(!0), c(ye, null, Me(l.value, (me, ve) => (i(), c("div", {
|
|
6694
6718
|
key: n.value[ve],
|
|
6695
6719
|
class: W(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group", [
|
|
6696
6720
|
t.view === "accordion" ? "overflow-hidden" : X(ve) ? "pt-6 px-6" : "p-6"
|
|
6697
6721
|
]]),
|
|
6698
6722
|
draggable: g.value && !t.disabled,
|
|
6699
|
-
onDragstart: (
|
|
6723
|
+
onDragstart: (De) => H(ve, De),
|
|
6700
6724
|
onDragend: F,
|
|
6701
|
-
onDragover:
|
|
6702
|
-
onDragenter:
|
|
6703
|
-
onDrop:
|
|
6725
|
+
onDragover: Se((De) => q(ve, De), ["prevent"]),
|
|
6726
|
+
onDragenter: Se((De) => J(ve, De), ["prevent"]),
|
|
6727
|
+
onDrop: Se((De) => R(), ["prevent"])
|
|
6704
6728
|
}, [
|
|
6705
6729
|
o("div", {
|
|
6706
6730
|
class: W(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3", [
|
|
@@ -6718,7 +6742,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6718
6742
|
key: 1,
|
|
6719
6743
|
type: "button",
|
|
6720
6744
|
class: "rounded-full p-1 text-gray-500 transition hover:bg-gray-100",
|
|
6721
|
-
onClick: (
|
|
6745
|
+
onClick: (De) => G(ve)
|
|
6722
6746
|
}, [
|
|
6723
6747
|
ne(fl, {
|
|
6724
6748
|
class: W(["h-4 w-4 transition", X(ve) ? "-rotate-90" : "rotate-0"])
|
|
@@ -6731,7 +6755,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6731
6755
|
type: "button",
|
|
6732
6756
|
class: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
|
|
6733
6757
|
title: t.duplicateTitle,
|
|
6734
|
-
onClick: (
|
|
6758
|
+
onClick: (De) => T(ve),
|
|
6735
6759
|
disabled: t.disabled,
|
|
6736
6760
|
draggable: "false"
|
|
6737
6761
|
}, [
|
|
@@ -6741,7 +6765,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6741
6765
|
type: "button",
|
|
6742
6766
|
class: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
|
|
6743
6767
|
title: t.removeTitle,
|
|
6744
|
-
onClick: (
|
|
6768
|
+
onClick: (De) => D(ve),
|
|
6745
6769
|
disabled: L.value,
|
|
6746
6770
|
draggable: "false"
|
|
6747
6771
|
}, [
|
|
@@ -6758,7 +6782,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6758
6782
|
layout: "inline",
|
|
6759
6783
|
navigation: !1,
|
|
6760
6784
|
values: l.value[ve],
|
|
6761
|
-
"onUpdate:values": (
|
|
6785
|
+
"onUpdate:values": (De) => l.value[ve] = De,
|
|
6762
6786
|
"form-id": n.value[ve],
|
|
6763
6787
|
disabled: t.disabled
|
|
6764
6788
|
}, null, 8, ["schema", "values", "onUpdate:values", "form-id", "disabled"])
|
|
@@ -6778,7 +6802,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6778
6802
|
], 8, sc)
|
|
6779
6803
|
]));
|
|
6780
6804
|
}
|
|
6781
|
-
}), uc = /* @__PURE__ */
|
|
6805
|
+
}), uc = /* @__PURE__ */ fe(ic, [["__scopeId", "data-v-473b9d69"]]), Nt = "__vs_form_monaco_loader__", dc = /* @__PURE__ */ oe({
|
|
6782
6806
|
__name: "vs-input-monaco",
|
|
6783
6807
|
props: /* @__PURE__ */ ke({
|
|
6784
6808
|
syntax: { default: "xml" },
|
|
@@ -6800,7 +6824,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6800
6824
|
}),
|
|
6801
6825
|
emits: ["update:modelValue"],
|
|
6802
6826
|
setup(e) {
|
|
6803
|
-
const t = e, l =
|
|
6827
|
+
const t = e, l = Le(e, "modelValue"), n = S(null), r = x(() => typeof t.height == "number" ? `${t.height}px` : t.height || "280px");
|
|
6804
6828
|
let a = null, s = null, u = !1;
|
|
6805
6829
|
const d = () => {
|
|
6806
6830
|
if (s) return Promise.resolve(s);
|
|
@@ -6957,7 +6981,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6957
6981
|
if (!t.api) return;
|
|
6958
6982
|
const r = t.api.replace("{{value}}", t.value), a = await fetch(r);
|
|
6959
6983
|
if (!a.ok) {
|
|
6960
|
-
|
|
6984
|
+
Ve({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
|
|
6961
6985
|
return;
|
|
6962
6986
|
}
|
|
6963
6987
|
const s = await a.json();
|
|
@@ -6988,7 +7012,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
6988
7012
|
}),
|
|
6989
7013
|
emits: /* @__PURE__ */ ke(["value-selected"], ["update:modelValue"]),
|
|
6990
7014
|
setup(e, { emit: t }) {
|
|
6991
|
-
const l = e, n =
|
|
7015
|
+
const l = e, n = Le(e, "modelValue"), r = t, a = x(() => $n[`${l.layout}`]), s = ["label", "placeholder", "info", "description", "text", "html"], u = S(L()), d = x(() => M(l.item, u.value)), f = x(() => cc?.[`vs-input-${l.item.type}`]), m = Ge("field-props"), C = x(() => {
|
|
6992
7016
|
const $ = $e(f);
|
|
6993
7017
|
if (!$) return /* @__PURE__ */ new Set();
|
|
6994
7018
|
const w = $.props ?? $.__vccOpts?.props;
|
|
@@ -7209,7 +7233,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
7209
7233
|
}, [
|
|
7210
7234
|
o("h2", vc, le(e.title), 1),
|
|
7211
7235
|
o("div", hc, [
|
|
7212
|
-
(i(!0), c(ye, null,
|
|
7236
|
+
(i(!0), c(ye, null, Me(n.value, (q) => (i(), c("div", {
|
|
7213
7237
|
key: q.id,
|
|
7214
7238
|
class: W([
|
|
7215
7239
|
"vs-compact-form-navigation__item relative",
|
|
@@ -7232,7 +7256,7 @@ const Jd = /* @__PURE__ */ de(Yd, [["render", Zd]]), Xd = { class: "vs-dataform
|
|
|
7232
7256
|
])
|
|
7233
7257
|
], 6)) : U("", !0);
|
|
7234
7258
|
}
|
|
7235
|
-
}), bc = /* @__PURE__ */
|
|
7259
|
+
}), bc = /* @__PURE__ */ fe(yc, [["__scopeId", "data-v-b3e16a91"]]), mt = {
|
|
7236
7260
|
required: "Це поле є обов’язковим",
|
|
7237
7261
|
email: "Неправильний email",
|
|
7238
7262
|
tel: "Неправильний телефон",
|
|
@@ -7379,7 +7403,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7379
7403
|
}),
|
|
7380
7404
|
emits: /* @__PURE__ */ ke(["handle-submit", "update:modelValue", "value-selected"], ["update:form", "update:modelValue", "update:values"]),
|
|
7381
7405
|
setup(e, { expose: t, emit: l }) {
|
|
7382
|
-
const n = l, r = e, a =
|
|
7406
|
+
const n = l, r = e, a = Le(e, "form"), s = Le(e, "modelValue"), u = Le(e, "values"), d = x({
|
|
7383
7407
|
get: () => u.value ?? s.value,
|
|
7384
7408
|
set: (H) => {
|
|
7385
7409
|
s.value = H, u.value = H;
|
|
@@ -7422,10 +7446,10 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7422
7446
|
o("form", {
|
|
7423
7447
|
ref_key: "formRef",
|
|
7424
7448
|
ref: k,
|
|
7425
|
-
onSubmit:
|
|
7449
|
+
onSubmit: Se(Z, ["prevent"]),
|
|
7426
7450
|
class: W(["grid grid-cols-12 p-1", O.value === "default" ? "gap-6" : "gap-4"])
|
|
7427
7451
|
}, [
|
|
7428
|
-
(i(!0), c(ye, null,
|
|
7452
|
+
(i(!0), c(ye, null, Me($e(I), (J, R) => (i(), c("div", {
|
|
7429
7453
|
key: J.name,
|
|
7430
7454
|
class: W(D(J) === "horizontal" ? "col-span-12" : `col-span-${J.col || 12}`)
|
|
7431
7455
|
}, [
|
|
@@ -7471,19 +7495,19 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7471
7495
|
const M = l.method?.trim().toUpperCase();
|
|
7472
7496
|
return M === "GET" || M === "POST" || M === "PUT" ? M : d.value === "add" ? "POST" : "PUT";
|
|
7473
7497
|
}, m = () => {
|
|
7474
|
-
|
|
7498
|
+
Ve({
|
|
7475
7499
|
type: "success",
|
|
7476
7500
|
title: "Успішно",
|
|
7477
7501
|
message: `Дані успішно ${d.value === "add" ? "збережено" : "оновлено"}`
|
|
7478
7502
|
});
|
|
7479
7503
|
}, C = async (M) => {
|
|
7480
|
-
if (M.ok) {
|
|
7504
|
+
if (console.log(M), M.ok) {
|
|
7481
7505
|
await M.json().catch(() => ({})), m(), n("save", a.value);
|
|
7482
7506
|
return;
|
|
7483
7507
|
}
|
|
7484
7508
|
if (M.status === 400) {
|
|
7485
7509
|
const g = await M.json().catch(() => ({}));
|
|
7486
|
-
|
|
7510
|
+
Ve({
|
|
7487
7511
|
type: "warning",
|
|
7488
7512
|
title: "Помилка валідації",
|
|
7489
7513
|
message: g.message || "Некоректні дані (400)"
|
|
@@ -7491,14 +7515,14 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7491
7515
|
return;
|
|
7492
7516
|
}
|
|
7493
7517
|
if (M.status === 500) {
|
|
7494
|
-
|
|
7518
|
+
Ve({
|
|
7495
7519
|
type: "error",
|
|
7496
7520
|
title: "Серверна помилка",
|
|
7497
7521
|
message: "Виникла помилка на сервері (500)"
|
|
7498
7522
|
});
|
|
7499
7523
|
return;
|
|
7500
7524
|
}
|
|
7501
|
-
|
|
7525
|
+
Ve({
|
|
7502
7526
|
type: "error",
|
|
7503
7527
|
title: "Помилка",
|
|
7504
7528
|
message: `Статус: ${M.status}`
|
|
@@ -7507,7 +7531,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7507
7531
|
async function I() {
|
|
7508
7532
|
const M = s.value.validate();
|
|
7509
7533
|
if (M) {
|
|
7510
|
-
|
|
7534
|
+
Ve({ type: "warning", title: "Помилка валідації", message: Object.entries(M).map(([y, L]) => `${y}: ${L}`).join(`
|
|
7511
7535
|
`) });
|
|
7512
7536
|
return;
|
|
7513
7537
|
}
|
|
@@ -7524,7 +7548,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7524
7548
|
});
|
|
7525
7549
|
await C(L);
|
|
7526
7550
|
} catch (L) {
|
|
7527
|
-
|
|
7551
|
+
Ve({
|
|
7528
7552
|
type: "error",
|
|
7529
7553
|
title: "Помилка з’єднання",
|
|
7530
7554
|
message: L.message || "Не вдалося виконати запит"
|
|
@@ -7543,7 +7567,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7543
7567
|
});
|
|
7544
7568
|
await C(y);
|
|
7545
7569
|
} catch (y) {
|
|
7546
|
-
|
|
7570
|
+
Ve({
|
|
7547
7571
|
type: "error",
|
|
7548
7572
|
title: "Помилка з’єднання",
|
|
7549
7573
|
message: y.message || "Не вдалося виконати запит"
|
|
@@ -7560,7 +7584,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7560
7584
|
if (l.form && !l.schema) {
|
|
7561
7585
|
const M = await fetch(`/api/template/form/${l.form}`);
|
|
7562
7586
|
if (!M.ok) {
|
|
7563
|
-
|
|
7587
|
+
Ve({
|
|
7564
7588
|
type: M.status >= 400 && M.status < 500 ? "warning" : "error",
|
|
7565
7589
|
title: "Error",
|
|
7566
7590
|
message: `Error code: ${M.status}`
|
|
@@ -7573,7 +7597,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7573
7597
|
u.value = l.token;
|
|
7574
7598
|
const M = await fetch(`/api/form/${u.value}`);
|
|
7575
7599
|
if (!M.ok) {
|
|
7576
|
-
|
|
7600
|
+
Ve({
|
|
7577
7601
|
type: M.status >= 400 && M.status < 500 ? "warning" : "error",
|
|
7578
7602
|
title: "Error",
|
|
7579
7603
|
message: `Error code: ${M.status}`
|
|
@@ -7587,7 +7611,7 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7587
7611
|
});
|
|
7588
7612
|
}
|
|
7589
7613
|
} catch (M) {
|
|
7590
|
-
|
|
7614
|
+
Ve({
|
|
7591
7615
|
type: "error",
|
|
7592
7616
|
title: "Error",
|
|
7593
7617
|
message: M.message || "Unexpected error"
|
|
@@ -7628,8 +7652,9 @@ const Dc = { class: "flex w-full h-full min-h-0 gap-6" }, Bc = {
|
|
|
7628
7652
|
values: a.value,
|
|
7629
7653
|
"onUpdate:values": g[0] || (g[0] = (y) => a.value = y),
|
|
7630
7654
|
form: s.value,
|
|
7631
|
-
"onUpdate:form": g[1] || (g[1] = (y) => s.value = y)
|
|
7632
|
-
|
|
7655
|
+
"onUpdate:form": g[1] || (g[1] = (y) => s.value = y),
|
|
7656
|
+
formId: u.value
|
|
7657
|
+
}, null, 8, ["schema", "values", "form", "formId"])) : U("", !0)
|
|
7633
7658
|
]),
|
|
7634
7659
|
o("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
|
|
7635
7660
|
o("button", {
|
|
@@ -7863,14 +7888,14 @@ function mf(e, t, l, n, r, a) {
|
|
|
7863
7888
|
return i(), c("div", {
|
|
7864
7889
|
class: W(["v3dp__popout", `v3dp__popout-${e.viewMode}`]),
|
|
7865
7890
|
style: Ae({ "--popout-column-definition": `repeat(${e.columnCount}, 1fr)` }),
|
|
7866
|
-
onMousedown: t[3] || (t[3] =
|
|
7891
|
+
onMousedown: t[3] || (t[3] = Se(() => {
|
|
7867
7892
|
}, ["prevent"]))
|
|
7868
7893
|
}, [
|
|
7869
7894
|
o("div", rf, [
|
|
7870
7895
|
o("button", {
|
|
7871
7896
|
class: "v3dp__heading__button v3dp__heading__button__left",
|
|
7872
7897
|
disabled: e.leftDisabled,
|
|
7873
|
-
onClick: t[0] || (t[0] =
|
|
7898
|
+
onClick: t[0] || (t[0] = Se((s) => e.$emit("left"), ["stop", "prevent"]))
|
|
7874
7899
|
}, [
|
|
7875
7900
|
Pe(e.$slots, "arrow-left", {}, () => [
|
|
7876
7901
|
t[4] || (t[4] = o("svg", {
|
|
@@ -7897,7 +7922,7 @@ function mf(e, t, l, n, r, a) {
|
|
|
7897
7922
|
], 8, sf),
|
|
7898
7923
|
(i(), ge(Qe(e.headingClickable ? "button" : "span"), {
|
|
7899
7924
|
class: "v3dp__heading__center",
|
|
7900
|
-
onClick: t[1] || (t[1] =
|
|
7925
|
+
onClick: t[1] || (t[1] = Se((s) => e.$emit("heading"), ["stop", "prevent"]))
|
|
7901
7926
|
}, {
|
|
7902
7927
|
default: Ne(() => [
|
|
7903
7928
|
Pe(e.$slots, "heading", {}, void 0, !0)
|
|
@@ -7907,7 +7932,7 @@ function mf(e, t, l, n, r, a) {
|
|
|
7907
7932
|
o("button", {
|
|
7908
7933
|
class: "v3dp__heading__button v3dp__heading__button__right",
|
|
7909
7934
|
disabled: e.rightDisabled,
|
|
7910
|
-
onClick: t[2] || (t[2] =
|
|
7935
|
+
onClick: t[2] || (t[2] = Se((s) => e.$emit("right"), ["stop", "prevent"]))
|
|
7911
7936
|
}, [
|
|
7912
7937
|
Pe(e.$slots, "arrow-right", {}, () => [
|
|
7913
7938
|
t[5] || (t[5] = o("svg", {
|
|
@@ -7942,7 +7967,7 @@ function mf(e, t, l, n, r, a) {
|
|
|
7942
7967
|
], 64)) : U("", !0),
|
|
7943
7968
|
o("div", ff, [
|
|
7944
7969
|
Pe(e.$slots, "body", {}, () => [
|
|
7945
|
-
(i(!0), c(ye, null,
|
|
7970
|
+
(i(!0), c(ye, null, Me(e.items, (s) => (i(), c("button", {
|
|
7946
7971
|
key: s.key,
|
|
7947
7972
|
disabled: s.disabled,
|
|
7948
7973
|
class: W([
|
|
@@ -7952,7 +7977,7 @@ function mf(e, t, l, n, r, a) {
|
|
|
7952
7977
|
},
|
|
7953
7978
|
`v3dp__element__button__${e.viewMode}`
|
|
7954
7979
|
]),
|
|
7955
|
-
onClick:
|
|
7980
|
+
onClick: Se((u) => e.$emit("elementClick", s.value), ["stop", "prevent"])
|
|
7956
7981
|
}, [
|
|
7957
7982
|
o("span", null, le(s.display), 1)
|
|
7958
7983
|
], 10, pf))), 128))
|
|
@@ -7961,7 +7986,7 @@ function mf(e, t, l, n, r, a) {
|
|
|
7961
7986
|
])
|
|
7962
7987
|
], 38);
|
|
7963
7988
|
}
|
|
7964
|
-
const Xt = /* @__PURE__ */
|
|
7989
|
+
const Xt = /* @__PURE__ */ fe(of, [["render", mf], ["__scopeId", "data-v-5de7813f"]]), vf = oe({
|
|
7965
7990
|
components: {
|
|
7966
7991
|
PickerPopup: Xt
|
|
7967
7992
|
},
|
|
@@ -8035,7 +8060,7 @@ function hf(e, t, l, n, r, a) {
|
|
|
8035
8060
|
_: 1
|
|
8036
8061
|
}, 8, ["leftDisabled", "rightDisabled", "items", "onLeft", "onRight"]);
|
|
8037
8062
|
}
|
|
8038
|
-
const gf = /* @__PURE__ */
|
|
8063
|
+
const gf = /* @__PURE__ */ fe(vf, [["render", hf]]), yf = oe({
|
|
8039
8064
|
components: {
|
|
8040
8065
|
PickerPopup: Xt
|
|
8041
8066
|
},
|
|
@@ -8119,7 +8144,7 @@ function bf(e, t, l, n, r, a) {
|
|
|
8119
8144
|
_: 1
|
|
8120
8145
|
}, 8, ["items", "leftDisabled", "rightDisabled", "onLeft", "onRight"]);
|
|
8121
8146
|
}
|
|
8122
|
-
const xf = /* @__PURE__ */
|
|
8147
|
+
const xf = /* @__PURE__ */ fe(yf, [["render", bf]]), wf = oe({
|
|
8123
8148
|
components: {
|
|
8124
8149
|
PickerPopup: Xt
|
|
8125
8150
|
},
|
|
@@ -8245,7 +8270,7 @@ function kf(e, t, l, n, r, a) {
|
|
|
8245
8270
|
Te(le(e.heading), 1)
|
|
8246
8271
|
]),
|
|
8247
8272
|
subheading: Ne(() => [
|
|
8248
|
-
(i(!0), c(ye, null,
|
|
8273
|
+
(i(!0), c(ye, null, Me(e.weekDays, (u, d) => (i(), c("span", {
|
|
8249
8274
|
key: u,
|
|
8250
8275
|
class: W(`v3dp__subheading__weekday__${d}`)
|
|
8251
8276
|
}, le(u), 3))), 128))
|
|
@@ -8253,7 +8278,7 @@ function kf(e, t, l, n, r, a) {
|
|
|
8253
8278
|
_: 1
|
|
8254
8279
|
}, 8, ["leftDisabled", "rightDisabled", "items", "onLeft", "onRight"]);
|
|
8255
8280
|
}
|
|
8256
|
-
const $f = /* @__PURE__ */
|
|
8281
|
+
const $f = /* @__PURE__ */ fe(wf, [["render", kf]]);
|
|
8257
8282
|
function Ll(e, t) {
|
|
8258
8283
|
const l = e.getBoundingClientRect(), n = {
|
|
8259
8284
|
height: e.clientHeight,
|
|
@@ -8369,25 +8394,25 @@ function Sf(e, t, l, n, r, a) {
|
|
|
8369
8394
|
]),
|
|
8370
8395
|
body: Ne(() => [
|
|
8371
8396
|
o("div", Cf, [
|
|
8372
|
-
(i(!0), c(ye, null,
|
|
8397
|
+
(i(!0), c(ye, null, Me(e.hoursList, (u) => (i(), c("button", {
|
|
8373
8398
|
key: u.value,
|
|
8374
8399
|
ref_for: !0,
|
|
8375
8400
|
ref: u.ref,
|
|
8376
8401
|
class: W([{ selected: u.selected }, "v3dp__element_button__hour"]),
|
|
8377
8402
|
disabled: !e.isEnabled(u.date),
|
|
8378
|
-
onClick:
|
|
8403
|
+
onClick: Se((d) => e.hours = u.value, ["stop", "prevent"])
|
|
8379
8404
|
}, [
|
|
8380
8405
|
o("span", null, le(e.padStartZero(u.value)), 1)
|
|
8381
8406
|
], 10, Vf))), 128))
|
|
8382
8407
|
], 512),
|
|
8383
8408
|
o("div", Lf, [
|
|
8384
|
-
(i(!0), c(ye, null,
|
|
8409
|
+
(i(!0), c(ye, null, Me(e.minutesList, (u) => (i(), c("button", {
|
|
8385
8410
|
key: u.value,
|
|
8386
8411
|
ref_for: !0,
|
|
8387
8412
|
ref: u.ref,
|
|
8388
8413
|
class: W([{ selected: u.selected }, "v3dp__element_button__minute"]),
|
|
8389
8414
|
disabled: !e.isEnabled(u.date),
|
|
8390
|
-
onClick:
|
|
8415
|
+
onClick: Se((d) => e.selectMinutes(u), ["stop", "prevent"])
|
|
8391
8416
|
}, [
|
|
8392
8417
|
o("span", null, le(e.padStartZero(u.value)), 1)
|
|
8393
8418
|
], 10, Mf))), 128))
|
|
@@ -8396,7 +8421,7 @@ function Sf(e, t, l, n, r, a) {
|
|
|
8396
8421
|
_: 1
|
|
8397
8422
|
});
|
|
8398
8423
|
}
|
|
8399
|
-
const Df = /* @__PURE__ */
|
|
8424
|
+
const Df = /* @__PURE__ */ fe(_f, [["render", Sf], ["__scopeId", "data-v-43e01bf7"]]), qt = ["time", "day", "month", "year"], Bf = (e, t, l = void 0) => {
|
|
8400
8425
|
let n = l || /* @__PURE__ */ new Date();
|
|
8401
8426
|
const r = Qc([e, n]);
|
|
8402
8427
|
r && (n = r);
|
|
@@ -8765,7 +8790,7 @@ function jf(e, t, l, n, r, a) {
|
|
|
8765
8790
|
])
|
|
8766
8791
|
], 4);
|
|
8767
8792
|
}
|
|
8768
|
-
const Ff = /* @__PURE__ */
|
|
8793
|
+
const Ff = /* @__PURE__ */ fe(Af, [["render", jf]]), Of = /* @__PURE__ */ oe({
|
|
8769
8794
|
__name: "vs-input-date2",
|
|
8770
8795
|
props: {
|
|
8771
8796
|
clearable: { type: Boolean, default: !0 },
|
|
@@ -8961,7 +8986,7 @@ const Ff = /* @__PURE__ */ de(Af, [["render", jf]]), Of = /* @__PURE__ */ oe({
|
|
|
8961
8986
|
}, null, 8, ["modelValue", "placeholder", "disabled", "clearable", "typeable", "week-day-names", "week-starts-on", "starting-view", "minimum-view", "input-format", "name", "class"])
|
|
8962
8987
|
], 6));
|
|
8963
8988
|
}
|
|
8964
|
-
}), Nf = /* @__PURE__ */
|
|
8989
|
+
}), Nf = /* @__PURE__ */ fe(Of, [["__scopeId", "data-v-97661afe"]]), Ml = (e = { mode: "edit", schema: null }) => new Promise((t) => {
|
|
8965
8990
|
const { close: l } = en({
|
|
8966
8991
|
title: e.mode === "add" ? "Додати" : "Редагувати",
|
|
8967
8992
|
template: "",
|