@opengis/form 0.0.52 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as U, ref as
|
|
2
|
-
import { notify as ce, VsModal as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as U, ref as w, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as D, renderSlot as Se, createElementVNode as l, toDisplayString as G, mergeProps as Te, computed as B, normalizeStyle as be, createTextVNode as ge, normalizeProps as ot, guardReactiveProps as nt, normalizeClass as E, mergeModels as ie, useModel as de, withDirectives as ae, unref as ee, vModelText as ve, vModelCheckbox as Vt, createVNode as A, createBlock as me, resolveDynamicComponent as Fe, withCtx as Ee, withModifiers as ke, onBeforeUnmount as at, watch as ue, createStaticVNode as ye, vModelRadio as Mt, Fragment as re, renderList as fe, reactive as qt, vModelDynamic as Wt, vShow as Qe, inject as Ae, resolveComponent as vt, Transition as st, nextTick as je, Teleport as Lt, getCurrentInstance as Gt, watchEffect as Zt, toRef as Kt, provide as ht } from "vue";
|
|
2
|
+
import { notify as ce, VsModal as St, modal as Jt } from "@opengis/core";
|
|
3
|
+
const Yt = { class: "w-full relative" }, Xt = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-[14px] font-medium text-gray-900 mb-2"
|
|
6
|
-
},
|
|
6
|
+
}, Qt = { class: "opacity-100" }, el = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-red-500 text-[14px]"
|
|
9
|
-
},
|
|
9
|
+
}, tl = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
12
|
-
},
|
|
12
|
+
}, ll = /* @__PURE__ */ U({
|
|
13
13
|
__name: "vs-layout-default",
|
|
14
14
|
props: {
|
|
15
15
|
ua: { default: "" },
|
|
@@ -24,31 +24,31 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
24
24
|
columns: {}
|
|
25
25
|
},
|
|
26
26
|
setup(o) {
|
|
27
|
-
const e =
|
|
27
|
+
const e = w("uk"), t = (a) => {
|
|
28
28
|
a.detail.key === "locale" && (e.value = a.detail.newValue);
|
|
29
29
|
};
|
|
30
30
|
return _e(() => {
|
|
31
31
|
e.value = localStorage.locale, window.addEventListener("storage", t);
|
|
32
32
|
}), Xe(() => {
|
|
33
33
|
window.removeEventListener("resize", t);
|
|
34
|
-
}), (a, n) => (i(), d("div",
|
|
35
|
-
a.ua || a.label ? (i(), d("div",
|
|
36
|
-
l("span",
|
|
37
|
-
a.item?.rules?.includes("required") ? (i(), d("span",
|
|
34
|
+
}), (a, n) => (i(), d("div", Yt, [
|
|
35
|
+
a.ua || a.label ? (i(), d("div", Xt, [
|
|
36
|
+
l("span", Qt, G(a.item[e.value] || a.ua || a.label), 1),
|
|
37
|
+
a.item?.rules?.includes("required") ? (i(), d("span", el, "*")) : D("", !0)
|
|
38
38
|
])) : D("", !0),
|
|
39
39
|
Se(a.$slots, "default", Te(a.$attrs, {
|
|
40
40
|
class: { "opacity-60": a.item.disabled }
|
|
41
41
|
})),
|
|
42
|
-
a.error ? (i(), d("span",
|
|
42
|
+
a.error ? (i(), d("span", tl, G(a.error), 1)) : D("", !0)
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "text-red-500 text-[14px]"
|
|
48
|
-
},
|
|
48
|
+
}, al = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
51
|
-
},
|
|
51
|
+
}, sl = /* @__PURE__ */ U({
|
|
52
52
|
__name: "vs-layout-horizontal",
|
|
53
53
|
props: {
|
|
54
54
|
ua: { default: "" },
|
|
@@ -80,14 +80,14 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
80
80
|
const f = `${p * 100}%`;
|
|
81
81
|
return { flexBasis: f, maxWidth: f };
|
|
82
82
|
});
|
|
83
|
-
return (u, c) => (i(), d("div",
|
|
83
|
+
return (u, c) => (i(), d("div", ol, [
|
|
84
84
|
n.value ? (i(), d("span", {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "text-sm text-gray-900 font-medium flex shrink-0",
|
|
87
87
|
style: be(s.value)
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span",
|
|
89
|
+
ge(G(u.ua || u.label) + " ", 1),
|
|
90
|
+
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", nl, "*")) : D("", !0)
|
|
91
91
|
], 4)) : D("", !0),
|
|
92
92
|
l("div", {
|
|
93
93
|
class: "flex-1 min-w-0",
|
|
@@ -95,13 +95,13 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
95
95
|
}, [
|
|
96
96
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
97
97
|
], 4),
|
|
98
|
-
u.error ? (i(), d("span",
|
|
98
|
+
u.error ? (i(), d("span", al, G(u.error), 1)) : D("", !0)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), rl = { class: "w-full relative" }, il = {
|
|
102
102
|
key: 0,
|
|
103
103
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
104
|
-
},
|
|
104
|
+
}, ul = /* @__PURE__ */ U({
|
|
105
105
|
__name: "vs-layout-inline",
|
|
106
106
|
props: {
|
|
107
107
|
ua: { default: "" },
|
|
@@ -116,24 +116,24 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
116
116
|
columns: {}
|
|
117
117
|
},
|
|
118
118
|
setup(o) {
|
|
119
|
-
return (e, t) => (i(), d("div",
|
|
119
|
+
return (e, t) => (i(), d("div", rl, [
|
|
120
120
|
Se(e.$slots, "default", ot(nt(e.$attrs))),
|
|
121
|
-
e.error ? (i(), d("span",
|
|
121
|
+
e.error ? (i(), d("span", il, G(e.error), 1)) : D("", !0)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), dl = { class: "flex-1 min-w-0" }, cl = {
|
|
125
125
|
key: 0,
|
|
126
126
|
class: "text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"
|
|
127
|
-
},
|
|
127
|
+
}, pl = { class: "truncate" }, fl = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "text-red-500 text-[14px]"
|
|
130
|
-
},
|
|
130
|
+
}, ml = {
|
|
131
131
|
key: 1,
|
|
132
132
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
133
|
-
},
|
|
133
|
+
}, vl = { class: "w-full md:w-auto" }, hl = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "mt-1 text-xs text-red-500"
|
|
136
|
-
},
|
|
136
|
+
}, gl = /* @__PURE__ */ U({
|
|
137
137
|
__name: "vs-layout-settings",
|
|
138
138
|
props: {
|
|
139
139
|
ua: { default: "" },
|
|
@@ -148,7 +148,7 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
148
148
|
columns: {}
|
|
149
149
|
},
|
|
150
150
|
setup(o) {
|
|
151
|
-
const e = o, t =
|
|
151
|
+
const e = o, t = w("uk");
|
|
152
152
|
B(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
|
|
153
153
|
const a = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), s = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (u) => {
|
|
154
154
|
u.key === "locale" && (t.value = u.newValue ?? "uk");
|
|
@@ -167,25 +167,25 @@ const Jt = { class: "w-full relative" }, Yt = {
|
|
|
167
167
|
l("div", {
|
|
168
168
|
class: E(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(u.item.type) ? "flex flex-col" : ""]])
|
|
169
169
|
}, [
|
|
170
|
-
l("div",
|
|
171
|
-
u.ua || u.label ? (i(), d("p",
|
|
172
|
-
l("span",
|
|
173
|
-
n.value ? (i(), d("span",
|
|
170
|
+
l("div", dl, [
|
|
171
|
+
u.ua || u.label ? (i(), d("p", cl, [
|
|
172
|
+
l("span", pl, G(u.item[t.value] || u.ua || u.label), 1),
|
|
173
|
+
n.value ? (i(), d("span", fl, "*")) : D("", !0)
|
|
174
174
|
])) : D("", !0),
|
|
175
|
-
a.value ? (i(), d("p",
|
|
175
|
+
a.value ? (i(), d("p", ml, G(a.value), 1)) : D("", !0)
|
|
176
176
|
]),
|
|
177
|
-
l("div",
|
|
177
|
+
l("div", vl, [
|
|
178
178
|
Se(u.$slots, "default", ot(nt(u.$attrs)))
|
|
179
179
|
])
|
|
180
180
|
], 2),
|
|
181
|
-
s.value ? (i(), d("p",
|
|
181
|
+
s.value ? (i(), d("p", hl, G(s.value), 1)) : D("", !0)
|
|
182
182
|
], 2));
|
|
183
183
|
}
|
|
184
|
-
}),
|
|
185
|
-
default:
|
|
186
|
-
horizontal:
|
|
187
|
-
inline:
|
|
188
|
-
settings:
|
|
184
|
+
}), bl = {
|
|
185
|
+
default: ll,
|
|
186
|
+
horizontal: sl,
|
|
187
|
+
inline: ul,
|
|
188
|
+
settings: gl
|
|
189
189
|
};
|
|
190
190
|
function $e(o) {
|
|
191
191
|
return {
|
|
@@ -195,7 +195,7 @@ function $e(o) {
|
|
|
195
195
|
})
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
|
|
199
199
|
__name: "vs-input-password",
|
|
200
200
|
props: /* @__PURE__ */ ie({
|
|
201
201
|
style: { default: () => ({}) },
|
|
@@ -221,11 +221,11 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
221
221
|
style: {
|
|
222
222
|
border: "1px solid #CFD9E0"
|
|
223
223
|
}
|
|
224
|
-
}, null, 10,
|
|
225
|
-
[
|
|
224
|
+
}, null, 10, yl)), [
|
|
225
|
+
[ve, a.value]
|
|
226
226
|
]);
|
|
227
227
|
}
|
|
228
|
-
}),
|
|
228
|
+
}), wl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ U({
|
|
229
229
|
__name: "vs-input-text",
|
|
230
230
|
props: /* @__PURE__ */ ie({
|
|
231
231
|
style: { default: () => ({}) },
|
|
@@ -251,11 +251,11 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
251
251
|
style: {
|
|
252
252
|
border: "1px solid #CFD9E0"
|
|
253
253
|
}
|
|
254
|
-
}, null, 10,
|
|
255
|
-
[
|
|
254
|
+
}, null, 10, wl)), [
|
|
255
|
+
[ve, a.value]
|
|
256
256
|
]);
|
|
257
257
|
}
|
|
258
|
-
}),
|
|
258
|
+
}), kl = ["placeholder", "min", "max"], _l = /* @__PURE__ */ U({
|
|
259
259
|
__name: "vs-input-number",
|
|
260
260
|
props: /* @__PURE__ */ ie({
|
|
261
261
|
min: {},
|
|
@@ -285,8 +285,8 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
285
285
|
},
|
|
286
286
|
min: n.min,
|
|
287
287
|
max: n.max
|
|
288
|
-
}, null, 10,
|
|
289
|
-
[
|
|
288
|
+
}, null, 10, kl)), [
|
|
289
|
+
[ve, a.value]
|
|
290
290
|
]);
|
|
291
291
|
}
|
|
292
292
|
}), X = (o, e) => {
|
|
@@ -294,7 +294,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
294
294
|
for (const [a, n] of e)
|
|
295
295
|
t[a] = n;
|
|
296
296
|
return t;
|
|
297
|
-
},
|
|
297
|
+
}, $l = {}, Cl = {
|
|
298
298
|
xmlns: "http://www.w3.org/2000/svg",
|
|
299
299
|
viewBox: "0 0 24 24",
|
|
300
300
|
fill: "none",
|
|
@@ -304,8 +304,8 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
|
|
|
304
304
|
"stroke-linejoin": "round",
|
|
305
305
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
306
306
|
};
|
|
307
|
-
function
|
|
308
|
-
return i(), d("svg",
|
|
307
|
+
function Vl(o, e) {
|
|
308
|
+
return i(), d("svg", Cl, e[0] || (e[0] = [
|
|
309
309
|
l("path", {
|
|
310
310
|
stroke: "none",
|
|
311
311
|
d: "M0 0h24v24H0z",
|
|
@@ -314,7 +314,7 @@ function Cl(o, e) {
|
|
|
314
314
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
315
315
|
]));
|
|
316
316
|
}
|
|
317
|
-
const
|
|
317
|
+
const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-center gap-[4px]" }, Sl = ["value", "id", "disabled"], Bl = ["for"], jl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, El = /* @__PURE__ */ U({
|
|
318
318
|
__name: "vs-checkbox-default",
|
|
319
319
|
props: {
|
|
320
320
|
value: { default: "" },
|
|
@@ -331,7 +331,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
331
331
|
get: () => a.modelValue,
|
|
332
332
|
set: (s) => t("update:modelValue", s)
|
|
333
333
|
});
|
|
334
|
-
return (s, r) => (i(), d("div",
|
|
334
|
+
return (s, r) => (i(), d("div", Ll, [
|
|
335
335
|
ae(l("input", {
|
|
336
336
|
type: "checkbox",
|
|
337
337
|
value: s.value,
|
|
@@ -339,8 +339,8 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
339
339
|
class: E(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": s.disabled }]),
|
|
340
340
|
id: s.id,
|
|
341
341
|
disabled: s.disabled
|
|
342
|
-
}, null, 10,
|
|
343
|
-
[
|
|
342
|
+
}, null, 10, Sl), [
|
|
343
|
+
[Vt, n.value]
|
|
344
344
|
]),
|
|
345
345
|
l("label", {
|
|
346
346
|
for: s.id,
|
|
@@ -349,23 +349,23 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
349
349
|
l("div", {
|
|
350
350
|
class: E(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", s.error ? "border-red-600" : ""]])
|
|
351
351
|
}, [
|
|
352
|
-
A(
|
|
352
|
+
A(Ml, {
|
|
353
353
|
height: "12",
|
|
354
354
|
width: "12"
|
|
355
355
|
})
|
|
356
356
|
], 2),
|
|
357
|
-
l("span",
|
|
357
|
+
l("span", jl, [
|
|
358
358
|
Se(s.$slots, "default", {}, () => [
|
|
359
|
-
|
|
359
|
+
ge(G(s.label), 1)
|
|
360
360
|
])
|
|
361
361
|
])
|
|
362
|
-
], 10,
|
|
362
|
+
], 10, Bl)
|
|
363
363
|
]));
|
|
364
364
|
}
|
|
365
|
-
}),
|
|
365
|
+
}), Il = ["name", "value", "disabled"], zl = { class: "flex items-center gap-[6px] text-[14px]" }, Al = {
|
|
366
366
|
key: 0,
|
|
367
367
|
class: "text-[16px]"
|
|
368
|
-
},
|
|
368
|
+
}, Tl = ["src"], Fl = /* @__PURE__ */ U({
|
|
369
369
|
__name: "vs-checkbox-buttons",
|
|
370
370
|
props: {
|
|
371
371
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -395,11 +395,11 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
395
395
|
value: u.value,
|
|
396
396
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => n.value = p),
|
|
397
397
|
disabled: u.disabled
|
|
398
|
-
}, null, 8,
|
|
399
|
-
[
|
|
398
|
+
}, null, 8, Il), [
|
|
399
|
+
[Vt, n.value]
|
|
400
400
|
]),
|
|
401
|
-
l("span",
|
|
402
|
-
u.icon || u.imgUrl ? (i(), d("span",
|
|
401
|
+
l("span", zl, [
|
|
402
|
+
u.icon || u.imgUrl ? (i(), d("span", Al, [
|
|
403
403
|
u.icon ? (i(), d("i", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: E(u.icon)
|
|
@@ -410,15 +410,15 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
410
410
|
width: "16",
|
|
411
411
|
height: "16",
|
|
412
412
|
alt: "icon"
|
|
413
|
-
}, null, 8,
|
|
413
|
+
}, null, 8, Tl)) : D("", !0)
|
|
414
414
|
])) : D("", !0),
|
|
415
415
|
Se(u.$slots, "default", {}, () => [
|
|
416
|
-
|
|
416
|
+
ge(G(u.label), 1)
|
|
417
417
|
])
|
|
418
418
|
])
|
|
419
419
|
], 2));
|
|
420
420
|
}
|
|
421
|
-
}),
|
|
421
|
+
}), Ol = { class: "flex items-center" }, Bt = /* @__PURE__ */ U({
|
|
422
422
|
__name: "vs-input-checkbox-item",
|
|
423
423
|
props: {
|
|
424
424
|
value: { default: "" },
|
|
@@ -444,9 +444,9 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
444
444
|
} else
|
|
445
445
|
a("update:modelValue", u);
|
|
446
446
|
}
|
|
447
|
-
}), r =
|
|
448
|
-
return (u, c) => (i(), d("div",
|
|
449
|
-
(i(),
|
|
447
|
+
}), r = w(`vs-checkbox-${t.view || "default"}`);
|
|
448
|
+
return (u, c) => (i(), d("div", Ol, [
|
|
449
|
+
(i(), me(Fe(r.value === "vs-checkbox-buttons" ? ee(Fl) : ee(El)), {
|
|
450
450
|
value: u.value,
|
|
451
451
|
label: u.label,
|
|
452
452
|
info: u.option?.info,
|
|
@@ -460,13 +460,13 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
460
460
|
error: u.error
|
|
461
461
|
}, {
|
|
462
462
|
default: Ee(() => [
|
|
463
|
-
|
|
463
|
+
ge(G(u.label), 1)
|
|
464
464
|
]),
|
|
465
465
|
_: 1
|
|
466
466
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
467
467
|
]));
|
|
468
468
|
}
|
|
469
|
-
}),
|
|
469
|
+
}), Dl = {}, Ul = {
|
|
470
470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
471
471
|
viewBox: "0 0 24 24",
|
|
472
472
|
fill: "none",
|
|
@@ -476,8 +476,8 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
|
|
|
476
476
|
"stroke-linejoin": "round",
|
|
477
477
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
478
478
|
};
|
|
479
|
-
function
|
|
480
|
-
return i(), d("svg",
|
|
479
|
+
function Pl(o, e) {
|
|
480
|
+
return i(), d("svg", Ul, e[0] || (e[0] = [
|
|
481
481
|
l("path", {
|
|
482
482
|
stroke: "none",
|
|
483
483
|
d: "M0 0h24v24H0z",
|
|
@@ -486,7 +486,7 @@ function Ul(o, e) {
|
|
|
486
486
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
487
487
|
]));
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const Rl = /* @__PURE__ */ X(Dl, [["render", Pl]]), Hl = {}, Nl = {
|
|
490
490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
491
491
|
viewBox: "0 0 24 24",
|
|
492
492
|
fill: "none",
|
|
@@ -496,8 +496,8 @@ const Pl = /* @__PURE__ */ X(Ol, [["render", Ul]]), Rl = {}, Hl = {
|
|
|
496
496
|
"stroke-linejoin": "round",
|
|
497
497
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
498
498
|
};
|
|
499
|
-
function
|
|
500
|
-
return i(), d("svg",
|
|
499
|
+
function ql(o, e) {
|
|
500
|
+
return i(), d("svg", Nl, e[0] || (e[0] = [
|
|
501
501
|
l("path", {
|
|
502
502
|
stroke: "none",
|
|
503
503
|
d: "M0 0h24v24H0z",
|
|
@@ -507,7 +507,7 @@ function Nl(o, e) {
|
|
|
507
507
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
508
508
|
]));
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const Wl = /* @__PURE__ */ X(Hl, [["render", ql]]), Gl = {}, Zl = {
|
|
511
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
512
|
width: "24",
|
|
513
513
|
height: "24",
|
|
@@ -518,8 +518,8 @@ const ql = /* @__PURE__ */ X(Rl, [["render", Nl]]), Wl = {}, Gl = {
|
|
|
518
518
|
"stroke-linecap": "round",
|
|
519
519
|
"stroke-linejoin": "round"
|
|
520
520
|
};
|
|
521
|
-
function
|
|
522
|
-
return i(), d("svg",
|
|
521
|
+
function Kl(o, e) {
|
|
522
|
+
return i(), d("svg", Zl, e[0] || (e[0] = [
|
|
523
523
|
l("path", {
|
|
524
524
|
stroke: "none",
|
|
525
525
|
d: "M0 0h24v24H0z",
|
|
@@ -530,13 +530,13 @@ function Zl(o, e) {
|
|
|
530
530
|
l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
|
|
531
531
|
]));
|
|
532
532
|
}
|
|
533
|
-
const
|
|
533
|
+
const Jl = /* @__PURE__ */ X(Gl, [["render", Kl]]), Yl = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "flex items-start gap-x-1"
|
|
536
|
-
},
|
|
536
|
+
}, Xl = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "text-red-500 text-[14px]"
|
|
539
|
-
},
|
|
539
|
+
}, Ql = ["title"], eo = ["disabled"], jt = /* @__PURE__ */ U({
|
|
540
540
|
__name: "vs-input-switcher",
|
|
541
541
|
props: /* @__PURE__ */ ie({
|
|
542
542
|
rules: { default: () => [] },
|
|
@@ -558,14 +558,14 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
558
558
|
emits: ["update:modelValue"],
|
|
559
559
|
setup(o) {
|
|
560
560
|
const e = o, t = de(o, "modelValue");
|
|
561
|
-
return (a, n) => e.view === "checkbox" ? (i(), d("div",
|
|
562
|
-
A(
|
|
561
|
+
return (a, n) => e.view === "checkbox" ? (i(), d("div", Yl, [
|
|
562
|
+
A(Bt, {
|
|
563
563
|
modelValue: t.value,
|
|
564
564
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
565
565
|
label: a.text,
|
|
566
566
|
error: a.error || ""
|
|
567
567
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
568
|
-
a.rules?.includes("required") ? (i(), d("span",
|
|
568
|
+
a.rules?.includes("required") ? (i(), d("span", Xl, "*")) : D("", !0),
|
|
569
569
|
a.i ? (i(), d("button", {
|
|
570
570
|
key: 1,
|
|
571
571
|
class: "cursor-pointer",
|
|
@@ -573,8 +573,8 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
573
573
|
onClick: n[1] || (n[1] = ke(() => {
|
|
574
574
|
}, ["prevent"]))
|
|
575
575
|
}, [
|
|
576
|
-
A(ee(
|
|
577
|
-
], 8,
|
|
576
|
+
A(ee(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
577
|
+
], 8, Ql)) : D("", !0)
|
|
578
578
|
])) : (i(), d("button", {
|
|
579
579
|
key: 1,
|
|
580
580
|
type: "button",
|
|
@@ -586,9 +586,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
586
586
|
"data-state": "checked",
|
|
587
587
|
class: E(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
|
|
588
588
|
}, null, 2)
|
|
589
|
-
], 10,
|
|
589
|
+
], 10, eo));
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
591
|
+
}), to = ["id", "innerHTML"], gt = /* @__PURE__ */ U({
|
|
592
592
|
__name: "vs-input-static",
|
|
593
593
|
props: {
|
|
594
594
|
text: { default: "" },
|
|
@@ -606,9 +606,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
606
606
|
id: e.name,
|
|
607
607
|
class: E(["text-gray-900", e.customClass]),
|
|
608
608
|
innerHTML: e.html ? e.html : e.text
|
|
609
|
-
}, null, 10,
|
|
609
|
+
}, null, 10, to));
|
|
610
610
|
}
|
|
611
|
-
}),
|
|
611
|
+
}), lo = ["placeholder", "disabled", "name"], oo = /* @__PURE__ */ U({
|
|
612
612
|
__name: "vs-input-mask",
|
|
613
613
|
props: /* @__PURE__ */ ie({
|
|
614
614
|
name: {},
|
|
@@ -626,7 +626,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
626
626
|
}),
|
|
627
627
|
emits: ["update:modelValue"],
|
|
628
628
|
setup(o) {
|
|
629
|
-
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n =
|
|
629
|
+
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue"), n = w(null);
|
|
630
630
|
let s = null;
|
|
631
631
|
return _e(async () => {
|
|
632
632
|
if (n.value) {
|
|
@@ -669,9 +669,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
669
669
|
style: {
|
|
670
670
|
border: "1px solid #CFD9E0"
|
|
671
671
|
}
|
|
672
|
-
}, null, 10,
|
|
672
|
+
}, null, 10, lo));
|
|
673
673
|
}
|
|
674
|
-
}),
|
|
674
|
+
}), no = { class: "relative w-full bg-white rounded-lg" }, ao = ["placeholder", "disabled"], so = /* @__PURE__ */ U({
|
|
675
675
|
__name: "vs-input-email",
|
|
676
676
|
props: /* @__PURE__ */ ie({
|
|
677
677
|
style: { default: () => ({}) },
|
|
@@ -688,7 +688,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
688
688
|
emits: ["update:modelValue"],
|
|
689
689
|
setup(o) {
|
|
690
690
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
691
|
-
return (n, s) => (i(), d("div",
|
|
691
|
+
return (n, s) => (i(), d("div", no, [
|
|
692
692
|
s[1] || (s[1] = ye('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
|
|
693
693
|
ae(l("input", {
|
|
694
694
|
type: "email",
|
|
@@ -699,12 +699,12 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
699
699
|
style: {
|
|
700
700
|
border: "1px solid #CFD9E0"
|
|
701
701
|
}
|
|
702
|
-
}, null, 10,
|
|
703
|
-
[
|
|
702
|
+
}, null, 10, ao), [
|
|
703
|
+
[ve, a.value]
|
|
704
704
|
])
|
|
705
705
|
]));
|
|
706
706
|
}
|
|
707
|
-
}),
|
|
707
|
+
}), ro = ["value", "disabled"], io = { class: "text-[13px] text-gray-700" }, uo = /* @__PURE__ */ U({
|
|
708
708
|
__name: "vs-input-radio-default",
|
|
709
709
|
props: /* @__PURE__ */ ie({
|
|
710
710
|
style: {},
|
|
@@ -732,8 +732,8 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
732
732
|
value: t.value,
|
|
733
733
|
disabled: t.disabled,
|
|
734
734
|
class: "hidden"
|
|
735
|
-
}, null, 8,
|
|
736
|
-
[
|
|
735
|
+
}, null, 8, ro), [
|
|
736
|
+
[Mt, e.value]
|
|
737
737
|
]),
|
|
738
738
|
l("span", {
|
|
739
739
|
class: E(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
|
|
@@ -746,10 +746,10 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
746
746
|
class: E(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
747
747
|
}, null, 2)) : D("", !0)
|
|
748
748
|
], 2),
|
|
749
|
-
l("span",
|
|
749
|
+
l("span", io, G(t.text), 1)
|
|
750
750
|
], 2));
|
|
751
751
|
}
|
|
752
|
-
}),
|
|
752
|
+
}), co = ["value", "disabled"], po = { class: "text-[13px] text-gray-700" }, fo = /* @__PURE__ */ U({
|
|
753
753
|
__name: "vs-input-radio-buttons",
|
|
754
754
|
props: /* @__PURE__ */ ie({
|
|
755
755
|
style: {},
|
|
@@ -780,16 +780,16 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
780
780
|
value: t.value,
|
|
781
781
|
disabled: t.disabled,
|
|
782
782
|
class: "hidden"
|
|
783
|
-
}, null, 8,
|
|
784
|
-
[
|
|
783
|
+
}, null, 8, co), [
|
|
784
|
+
[Mt, e.value]
|
|
785
785
|
]),
|
|
786
|
-
l("span",
|
|
786
|
+
l("span", po, G(t.text), 1)
|
|
787
787
|
], 2));
|
|
788
788
|
}
|
|
789
|
-
}),
|
|
790
|
-
"vs-input-radio-default":
|
|
791
|
-
"vs-input-radio-buttons":
|
|
792
|
-
},
|
|
789
|
+
}), mo = {
|
|
790
|
+
"vs-input-radio-default": uo,
|
|
791
|
+
"vs-input-radio-buttons": fo
|
|
792
|
+
}, bt = /* @__PURE__ */ U({
|
|
793
793
|
__name: "vs-input-radio",
|
|
794
794
|
props: /* @__PURE__ */ ie({
|
|
795
795
|
options: {},
|
|
@@ -808,11 +808,11 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
808
808
|
}),
|
|
809
809
|
emits: ["update:modelValue"],
|
|
810
810
|
setup(o) {
|
|
811
|
-
const e = o, t = de(o, "modelValue"), a = B(() =>
|
|
811
|
+
const e = o, t = de(o, "modelValue"), a = B(() => mo[`vs-input-radio-${e.view}`]);
|
|
812
812
|
return (n, s) => (i(), d("div", {
|
|
813
813
|
class: E([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
814
814
|
}, [
|
|
815
|
-
(i(!0), d(re, null, fe(n.options, (r) => (i(),
|
|
815
|
+
(i(!0), d(re, null, fe(n.options, (r) => (i(), me(Fe(a.value), Te({
|
|
816
816
|
key: r?.id,
|
|
817
817
|
text: r.text,
|
|
818
818
|
value: r.id.toString(),
|
|
@@ -822,7 +822,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
822
822
|
}, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
823
823
|
], 2));
|
|
824
824
|
}
|
|
825
|
-
}),
|
|
825
|
+
}), vo = /* @__PURE__ */ U({
|
|
826
826
|
__name: "vs-input-checkbox",
|
|
827
827
|
props: {
|
|
828
828
|
options: { default: () => [] },
|
|
@@ -841,7 +841,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
841
841
|
},
|
|
842
842
|
emits: ["update:modelValue"],
|
|
843
843
|
setup(o, { emit: e }) {
|
|
844
|
-
const t = o, a = e, n =
|
|
844
|
+
const t = o, a = e, n = w([]), s = qt({}), r = (f) => f?.value || f?.id || f?.text || f, u = (f) => f.text || String(f), c = (f) => `lg:col-span-${f || 12}`, p = async () => {
|
|
845
845
|
try {
|
|
846
846
|
const f = await fetch(`/api/suggest/${t.data}`).then((m) => m.json());
|
|
847
847
|
n.value = f?.data || f;
|
|
@@ -908,7 +908,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
908
908
|
}), (f, m) => (i(), d("div", {
|
|
909
909
|
class: E(["p-0 w-full gap-[6px]", [f.position === "vertical" ? "flex-col" : "", f.colSpan ? "grid" : "flex justify-start"]])
|
|
910
910
|
}, [
|
|
911
|
-
(i(!0), d(re, null, fe(n.value, (y) => (i(),
|
|
911
|
+
(i(!0), d(re, null, fe(n.value, (y) => (i(), me(Bt, {
|
|
912
912
|
modelValue: s[r(y)],
|
|
913
913
|
"onUpdate:modelValue": (S) => s[r(y)] = S,
|
|
914
914
|
value: r(y),
|
|
@@ -923,7 +923,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
923
923
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
924
924
|
], 2));
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
926
|
+
}), ho = /* @__PURE__ */ X(vo, [["__scopeId", "data-v-91f3584a"]]), go = ["type", "placeholder", "disabled"], bo = /* @__PURE__ */ U({
|
|
927
927
|
__name: "vs-input-date1",
|
|
928
928
|
props: {
|
|
929
929
|
style: { default: () => ({}) },
|
|
@@ -955,11 +955,11 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
955
955
|
style: {
|
|
956
956
|
border: "1px solid #CFD9E0"
|
|
957
957
|
}
|
|
958
|
-
}, null, 10,
|
|
959
|
-
[
|
|
958
|
+
}, null, 10, go)), [
|
|
959
|
+
[Wt, r.value]
|
|
960
960
|
]);
|
|
961
961
|
}
|
|
962
|
-
}),
|
|
962
|
+
}), yt = async (o, e, t, a) => {
|
|
963
963
|
try {
|
|
964
964
|
const n = new FormData();
|
|
965
965
|
return n.append("unique", "true"), n.append("file", o), (await fetch(
|
|
@@ -977,20 +977,20 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
977
977
|
position: "right-bottom"
|
|
978
978
|
}), console.error("Сталась помилка завантаження файлу", n), null;
|
|
979
979
|
}
|
|
980
|
-
},
|
|
980
|
+
}, yo = async (o) => {
|
|
981
981
|
try {
|
|
982
982
|
return await fetch(`file/delete${o}`), !0;
|
|
983
983
|
} catch (e) {
|
|
984
984
|
return console.error(e), !1;
|
|
985
985
|
}
|
|
986
|
-
},
|
|
986
|
+
}, xt = async (o) => {
|
|
987
987
|
try {
|
|
988
988
|
const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), a = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), s = new Blob([n], { type: a }), r = document.createElement("a");
|
|
989
989
|
r.setAttribute("download", o), r.href = window.URL.createObjectURL(s), r.click();
|
|
990
990
|
} catch (e) {
|
|
991
991
|
console.error(e.message);
|
|
992
992
|
}
|
|
993
|
-
},
|
|
993
|
+
}, xo = {}, wo = {
|
|
994
994
|
xmlns: "http://www.w3.org/2000/svg",
|
|
995
995
|
width: "24",
|
|
996
996
|
height: "24",
|
|
@@ -1001,13 +1001,13 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
|
|
|
1001
1001
|
"stroke-linecap": "round",
|
|
1002
1002
|
"stroke-linejoin": "round"
|
|
1003
1003
|
};
|
|
1004
|
-
function
|
|
1005
|
-
return i(), d("svg",
|
|
1004
|
+
function ko(o, e) {
|
|
1005
|
+
return i(), d("svg", wo, e[0] || (e[0] = [
|
|
1006
1006
|
l("path", { d: "M5 12h14" }, null, -1),
|
|
1007
1007
|
l("path", { d: "M12 5v14" }, null, -1)
|
|
1008
1008
|
]));
|
|
1009
1009
|
}
|
|
1010
|
-
const qe = /* @__PURE__ */ X(
|
|
1010
|
+
const qe = /* @__PURE__ */ X(xo, [["render", ko]]), _o = {}, $o = {
|
|
1011
1011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1012
1012
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
1013
1013
|
width: "44",
|
|
@@ -1019,12 +1019,12 @@ const qe = /* @__PURE__ */ X(yo, [["render", wo]]), ko = {}, _o = {
|
|
|
1019
1019
|
"stroke-linecap": "round",
|
|
1020
1020
|
"stroke-linejoin": "round"
|
|
1021
1021
|
};
|
|
1022
|
-
function
|
|
1023
|
-
return i(), d("svg",
|
|
1022
|
+
function Co(o, e, t, a, n, s) {
|
|
1023
|
+
return i(), d("svg", $o, e[0] || (e[0] = [
|
|
1024
1024
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><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)
|
|
1025
1025
|
]));
|
|
1026
1026
|
}
|
|
1027
|
-
const
|
|
1027
|
+
const Vo = /* @__PURE__ */ X(_o, [["render", Co]]), Mo = {}, Lo = {
|
|
1028
1028
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1029
1029
|
class: "icon icon-tabler icon-tabler-table",
|
|
1030
1030
|
width: "44",
|
|
@@ -1036,8 +1036,8 @@ const Co = /* @__PURE__ */ X(ko, [["render", $o]]), Vo = {}, Mo = {
|
|
|
1036
1036
|
"stroke-linecap": "round",
|
|
1037
1037
|
"stroke-linejoin": "round"
|
|
1038
1038
|
};
|
|
1039
|
-
function
|
|
1040
|
-
return i(), d("svg",
|
|
1039
|
+
function So(o, e, t, a, n, s) {
|
|
1040
|
+
return i(), d("svg", Lo, e[0] || (e[0] = [
|
|
1041
1041
|
l("path", {
|
|
1042
1042
|
stroke: "none",
|
|
1043
1043
|
d: "M0 0h24v24H0z",
|
|
@@ -1064,7 +1064,7 @@ function Lo(o, e, t, a, n, s) {
|
|
|
1064
1064
|
}, null, -1)
|
|
1065
1065
|
]));
|
|
1066
1066
|
}
|
|
1067
|
-
const
|
|
1067
|
+
const Bo = /* @__PURE__ */ X(Mo, [["render", So]]), jo = {}, Eo = {
|
|
1068
1068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1069
1069
|
width: "24",
|
|
1070
1070
|
height: "24",
|
|
@@ -1075,12 +1075,12 @@ const So = /* @__PURE__ */ X(Vo, [["render", Lo]]), Bo = {}, jo = {
|
|
|
1075
1075
|
"stroke-linecap": "round",
|
|
1076
1076
|
"stroke-linejoin": "round"
|
|
1077
1077
|
};
|
|
1078
|
-
function
|
|
1079
|
-
return i(), d("svg",
|
|
1078
|
+
function Io(o, e) {
|
|
1079
|
+
return i(), d("svg", Eo, e[0] || (e[0] = [
|
|
1080
1080
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>', 6)
|
|
1081
1081
|
]));
|
|
1082
1082
|
}
|
|
1083
|
-
const
|
|
1083
|
+
const Et = /* @__PURE__ */ X(jo, [["render", Io]]), zo = {}, Ao = {
|
|
1084
1084
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1085
1085
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
1086
1086
|
width: "44",
|
|
@@ -1092,12 +1092,12 @@ const jt = /* @__PURE__ */ X(Bo, [["render", Eo]]), Io = {}, zo = {
|
|
|
1092
1092
|
"stroke-linecap": "round",
|
|
1093
1093
|
"stroke-linejoin": "round"
|
|
1094
1094
|
};
|
|
1095
|
-
function
|
|
1096
|
-
return i(), d("svg",
|
|
1095
|
+
function To(o, e, t, a, n, s) {
|
|
1096
|
+
return i(), d("svg", Ao, e[0] || (e[0] = [
|
|
1097
1097
|
ye('<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)
|
|
1098
1098
|
]));
|
|
1099
1099
|
}
|
|
1100
|
-
const
|
|
1100
|
+
const Fo = /* @__PURE__ */ X(zo, [["render", To]]), Oo = {}, Do = {
|
|
1101
1101
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1102
1102
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
1103
1103
|
width: "44",
|
|
@@ -1109,25 +1109,25 @@ const To = /* @__PURE__ */ X(Io, [["render", Ao]]), Fo = {}, Oo = {
|
|
|
1109
1109
|
"stroke-linecap": "round",
|
|
1110
1110
|
"stroke-linejoin": "round"
|
|
1111
1111
|
};
|
|
1112
|
-
function
|
|
1113
|
-
return i(), d("svg",
|
|
1112
|
+
function Uo(o, e, t, a, n, s) {
|
|
1113
|
+
return i(), d("svg", Do, e[0] || (e[0] = [
|
|
1114
1114
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
|
|
1115
1115
|
]));
|
|
1116
1116
|
}
|
|
1117
|
-
const
|
|
1117
|
+
const Po = /* @__PURE__ */ X(Oo, [["render", Uo]]), Ro = (o) => {
|
|
1118
1118
|
if (!o) return "";
|
|
1119
1119
|
const e = o?.split(".");
|
|
1120
1120
|
return e[e.length - 1];
|
|
1121
|
-
},
|
|
1122
|
-
const e =
|
|
1121
|
+
}, Ho = (o) => {
|
|
1122
|
+
const e = Ro(o), t = {
|
|
1123
1123
|
imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
|
|
1124
1124
|
sheetsFormat: ["xls", "csv", "xlsx"],
|
|
1125
1125
|
archivesFormat: ["zip", "rar"],
|
|
1126
1126
|
textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
|
|
1127
1127
|
documentsFormat: ["pdf"]
|
|
1128
1128
|
};
|
|
1129
|
-
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ?
|
|
1130
|
-
},
|
|
1129
|
+
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Bo : t.textsFormat.includes(e) ? Po : t.documentsFormat.includes(e) ? Vo : t.archivesFormat.includes(e) ? Fo : Et;
|
|
1130
|
+
}, No = {}, qo = {
|
|
1131
1131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1132
1132
|
width: "24",
|
|
1133
1133
|
height: "24",
|
|
@@ -1139,12 +1139,12 @@ const Uo = /* @__PURE__ */ X(Fo, [["render", Do]]), Po = (o) => {
|
|
|
1139
1139
|
"stroke-linejoin": "round",
|
|
1140
1140
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
1141
1141
|
};
|
|
1142
|
-
function
|
|
1143
|
-
return i(), d("svg",
|
|
1142
|
+
function Wo(o, e) {
|
|
1143
|
+
return i(), d("svg", qo, e[0] || (e[0] = [
|
|
1144
1144
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
|
|
1145
1145
|
]));
|
|
1146
1146
|
}
|
|
1147
|
-
const et = /* @__PURE__ */ X(
|
|
1147
|
+
const et = /* @__PURE__ */ X(No, [["render", Wo]]), Go = {}, Zo = {
|
|
1148
1148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1149
1149
|
width: "24",
|
|
1150
1150
|
height: "24",
|
|
@@ -1156,8 +1156,8 @@ const et = /* @__PURE__ */ X(Ho, [["render", qo]]), Wo = {}, Go = {
|
|
|
1156
1156
|
"stroke-linejoin": "round",
|
|
1157
1157
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1158
1158
|
};
|
|
1159
|
-
function
|
|
1160
|
-
return i(), d("svg",
|
|
1159
|
+
function Ko(o, e) {
|
|
1160
|
+
return i(), d("svg", Zo, e[0] || (e[0] = [
|
|
1161
1161
|
l("path", {
|
|
1162
1162
|
stroke: "none",
|
|
1163
1163
|
d: "M0 0h24v24H0z",
|
|
@@ -1168,7 +1168,7 @@ function Zo(o, e) {
|
|
|
1168
1168
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1169
1169
|
]));
|
|
1170
1170
|
}
|
|
1171
|
-
const
|
|
1171
|
+
const It = /* @__PURE__ */ X(Go, [["render", Ko]]), Jo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Yo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Xo = /* @__PURE__ */ U({
|
|
1172
1172
|
__name: "vs-input-file-list-item",
|
|
1173
1173
|
props: /* @__PURE__ */ ie({
|
|
1174
1174
|
format: {},
|
|
@@ -1189,18 +1189,18 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1189
1189
|
emits: ["update:value", "update:item"],
|
|
1190
1190
|
setup(o) {
|
|
1191
1191
|
const e = de(o, "value"), t = de(o, "item"), a = o;
|
|
1192
|
-
return (n, s) => (i(), d("div",
|
|
1193
|
-
(i(),
|
|
1192
|
+
return (n, s) => (i(), d("div", Jo, [
|
|
1193
|
+
(i(), me(Fe(ee(Ho)(t.value)), {
|
|
1194
1194
|
src: t.value,
|
|
1195
1195
|
alt: "file",
|
|
1196
1196
|
class: "w-full h-full object-cover cursor-pointer",
|
|
1197
|
-
onClick: s[0] || (s[0] = (r) => ee(
|
|
1197
|
+
onClick: s[0] || (s[0] = (r) => ee(xt)(t.value))
|
|
1198
1198
|
}, null, 8, ["src"])),
|
|
1199
|
-
l("div",
|
|
1199
|
+
l("div", Yo, [
|
|
1200
1200
|
l("button", {
|
|
1201
1201
|
type: "button",
|
|
1202
1202
|
onClick: s[1] || (s[1] = (r) => {
|
|
1203
|
-
ee(
|
|
1203
|
+
ee(yo)(t.value), e.value = a.multiple ? e.value?.filter((u) => u !== t.value) : "";
|
|
1204
1204
|
}),
|
|
1205
1205
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1206
1206
|
}, [
|
|
@@ -1208,18 +1208,18 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1208
1208
|
]),
|
|
1209
1209
|
l("button", {
|
|
1210
1210
|
type: "button",
|
|
1211
|
-
onClick: s[2] || (s[2] = (r) => ee(
|
|
1211
|
+
onClick: s[2] || (s[2] = (r) => ee(xt)(t.value)),
|
|
1212
1212
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
1213
1213
|
}, [
|
|
1214
|
-
A(
|
|
1214
|
+
A(It, { class: "w-4 h-4" })
|
|
1215
1215
|
])
|
|
1216
1216
|
])
|
|
1217
1217
|
]));
|
|
1218
1218
|
}
|
|
1219
|
-
}),
|
|
1219
|
+
}), wt = /* @__PURE__ */ X(Xo, [["__scopeId", "data-v-0ca886b3"]]), Qo = { class: "flex items-center gap-x-2" }, en = ["multiple"], tn = {
|
|
1220
1220
|
key: 1,
|
|
1221
1221
|
class: "flex items-center flex-wrap gap-2"
|
|
1222
|
-
},
|
|
1222
|
+
}, ln = /* @__PURE__ */ U({
|
|
1223
1223
|
__name: "vs-input-file",
|
|
1224
1224
|
props: /* @__PURE__ */ ie({
|
|
1225
1225
|
format: {},
|
|
@@ -1237,21 +1237,21 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1237
1237
|
}),
|
|
1238
1238
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
1239
1239
|
setup(o, { emit: e }) {
|
|
1240
|
-
const t = o, a = de(o, "modelValue"), n = e, s =
|
|
1240
|
+
const t = o, a = de(o, "modelValue"), n = e, s = w(null), r = (c) => Array.isArray(a.value) && a.value[c] || "", u = async (c) => {
|
|
1241
1241
|
const { files: p } = c.target;
|
|
1242
1242
|
if (!(!p || p.length === 0))
|
|
1243
1243
|
if (t.multiple) {
|
|
1244
|
-
const f = Array.from(p).map(async (
|
|
1244
|
+
const f = Array.from(p).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await yt(q, "1", "form", "table")), S = (await Promise.all(f)).filter((q) => q !== null).map((q) => q?.file_path).filter(Boolean);
|
|
1245
1245
|
a.value = [...a.value || [], ...S], n("change", a.value);
|
|
1246
1246
|
} else {
|
|
1247
1247
|
const f = p[0];
|
|
1248
1248
|
if (t.format && !f.name.endsWith(t.format))
|
|
1249
1249
|
return;
|
|
1250
|
-
const m = await
|
|
1250
|
+
const m = await yt(f, "1", "form", "table");
|
|
1251
1251
|
a.value = m?.file_path, n("change", a.value || "");
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
return (c, p) => (i(), d("div",
|
|
1254
|
+
return (c, p) => (i(), d("div", Qo, [
|
|
1255
1255
|
l("input", {
|
|
1256
1256
|
class: "hidden",
|
|
1257
1257
|
ref_key: "fileInput",
|
|
@@ -1259,15 +1259,15 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1259
1259
|
type: "file",
|
|
1260
1260
|
multiple: c.multiple,
|
|
1261
1261
|
onChange: u
|
|
1262
|
-
}, null, 40,
|
|
1263
|
-
!c.multiple && a.value ? (i(),
|
|
1262
|
+
}, null, 40, en),
|
|
1263
|
+
!c.multiple && a.value ? (i(), me(wt, {
|
|
1264
1264
|
key: 0,
|
|
1265
1265
|
item: a.value,
|
|
1266
1266
|
"onUpdate:item": p[0] || (p[0] = (f) => a.value = f),
|
|
1267
1267
|
value: a.value,
|
|
1268
1268
|
"onUpdate:value": p[1] || (p[1] = (f) => a.value = f)
|
|
1269
|
-
}, null, 8, ["item", "value"])) : c.multiple ? (i(), d("div",
|
|
1270
|
-
(i(!0), d(re, null, fe(a.value, (f, m) => (i(),
|
|
1269
|
+
}, null, 8, ["item", "value"])) : c.multiple ? (i(), d("div", tn, [
|
|
1270
|
+
(i(!0), d(re, null, fe(a.value, (f, m) => (i(), me(wt, {
|
|
1271
1271
|
multiple: c.multiple,
|
|
1272
1272
|
key: m,
|
|
1273
1273
|
value: a.value,
|
|
@@ -1293,7 +1293,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1293
1293
|
], 2))
|
|
1294
1294
|
]));
|
|
1295
1295
|
}
|
|
1296
|
-
}),
|
|
1296
|
+
}), on = { class: "max-w-[55vw]" }, nn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, an = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, sn = { class: "px-[5px]" }, rn = { class: "" }, Je = /* @__PURE__ */ U({
|
|
1297
1297
|
__name: "vs-widget-file-info",
|
|
1298
1298
|
props: {
|
|
1299
1299
|
item: { default: null }
|
|
@@ -1318,33 +1318,33 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1318
1318
|
}
|
|
1319
1319
|
return (n, s) => (i(), d(re, null, [
|
|
1320
1320
|
s[1] || (s[1] = ye('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
|
|
1321
|
-
l("div",
|
|
1322
|
-
l("p",
|
|
1323
|
-
l("p",
|
|
1324
|
-
l("span", null,
|
|
1325
|
-
ae(l("span",
|
|
1321
|
+
l("div", on, [
|
|
1322
|
+
l("p", nn, G(n.item?.uploaded_name), 1),
|
|
1323
|
+
l("p", an, [
|
|
1324
|
+
l("span", null, G(n.item?.username), 1),
|
|
1325
|
+
ae(l("span", sn, "|", 512), [
|
|
1326
1326
|
[Qe, n.item?.username]
|
|
1327
1327
|
]),
|
|
1328
|
-
l("span", null,
|
|
1328
|
+
l("span", null, G(t.value), 1),
|
|
1329
1329
|
s[0] || (s[0] = l("span", { class: "px-[5px]" }, "|", -1)),
|
|
1330
|
-
l("span",
|
|
1330
|
+
l("span", rn, G(a(n.item?.size)), 1)
|
|
1331
1331
|
])
|
|
1332
1332
|
])
|
|
1333
1333
|
], 64));
|
|
1334
1334
|
}
|
|
1335
|
-
}),
|
|
1335
|
+
}), un = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, dn = {
|
|
1336
1336
|
key: 0,
|
|
1337
1337
|
class: "flex w-full gap-x-3 items-center"
|
|
1338
|
-
},
|
|
1338
|
+
}, cn = {
|
|
1339
1339
|
key: 1,
|
|
1340
1340
|
class: "flex gap-x-3 w-full items-center"
|
|
1341
|
-
},
|
|
1341
|
+
}, pn = {
|
|
1342
1342
|
key: 2,
|
|
1343
1343
|
class: "flex gap-x-3 w-full items-center"
|
|
1344
|
-
},
|
|
1344
|
+
}, fn = ["href"], mn = {
|
|
1345
1345
|
key: 3,
|
|
1346
1346
|
class: "flex gap-x-3 w-full items-center"
|
|
1347
|
-
},
|
|
1347
|
+
}, vn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, hn = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, gn = { class: "inline-block" }, bn = { class: "inline-block" }, yn = /* @__PURE__ */ U({
|
|
1348
1348
|
__name: "vs-widget-file-item",
|
|
1349
1349
|
props: {
|
|
1350
1350
|
item: { default: null },
|
|
@@ -1386,42 +1386,42 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1386
1386
|
function p(f) {
|
|
1387
1387
|
(t.item.ext === "jpg" || t.item.ext === "png") && a("openLightbox", { item: t.item, index: f });
|
|
1388
1388
|
}
|
|
1389
|
-
return (f, m) => (i(), d("div",
|
|
1390
|
-
f.item.ext === "jpg" || f.item.ext === "png" ? (i(), d("div",
|
|
1389
|
+
return (f, m) => (i(), d("div", un, [
|
|
1390
|
+
f.item.ext === "jpg" || f.item.ext === "png" ? (i(), d("div", dn, [
|
|
1391
1391
|
l("div", {
|
|
1392
1392
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1393
1393
|
onClick: m[0] || (m[0] = (y) => p(f.index))
|
|
1394
1394
|
}, [
|
|
1395
1395
|
A(Je, { item: f.item }, null, 8, ["item"])
|
|
1396
1396
|
])
|
|
1397
|
-
])) : n(f.item) ? (i(), d("div",
|
|
1397
|
+
])) : n(f.item) ? (i(), d("div", cn, [
|
|
1398
1398
|
A(Je, { item: f.item }, null, 8, ["item"])
|
|
1399
|
-
])) : s(f.item) ? (i(), d("div",
|
|
1399
|
+
])) : s(f.item) ? (i(), d("div", pn, [
|
|
1400
1400
|
l("a", {
|
|
1401
1401
|
href: `/api/file-preview?id=${f.item.file_id}`,
|
|
1402
1402
|
target: "_blank",
|
|
1403
1403
|
class: "flex gap-x-3 w-full items-center"
|
|
1404
1404
|
}, [
|
|
1405
1405
|
A(Je, { item: f.item }, null, 8, ["item"])
|
|
1406
|
-
], 8,
|
|
1407
|
-
])) : (i(), d("div",
|
|
1406
|
+
], 8, fn)
|
|
1407
|
+
])) : (i(), d("div", mn, [
|
|
1408
1408
|
A(Je, { item: f.item }, null, 8, ["item"])
|
|
1409
1409
|
])),
|
|
1410
|
-
l("div",
|
|
1411
|
-
l("div",
|
|
1412
|
-
l("div",
|
|
1410
|
+
l("div", vn, [
|
|
1411
|
+
l("div", hn, [
|
|
1412
|
+
l("div", gn, [
|
|
1413
1413
|
l("button", {
|
|
1414
1414
|
class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
1415
1415
|
onClick: m[1] || (m[1] = (y) => r(f.item))
|
|
1416
1416
|
}, [
|
|
1417
|
-
A(
|
|
1417
|
+
A(It, {
|
|
1418
1418
|
height: "14",
|
|
1419
1419
|
width: "14"
|
|
1420
1420
|
})
|
|
1421
1421
|
])
|
|
1422
1422
|
]),
|
|
1423
1423
|
m[3] || (m[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
|
|
1424
|
-
l("div",
|
|
1424
|
+
l("div", bn, [
|
|
1425
1425
|
l("button", {
|
|
1426
1426
|
type: "button",
|
|
1427
1427
|
class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
|
|
@@ -1437,7 +1437,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1437
1437
|
])
|
|
1438
1438
|
]));
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), xn = {}, wn = {
|
|
1441
1441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1442
1442
|
width: "24",
|
|
1443
1443
|
height: "24",
|
|
@@ -1449,8 +1449,8 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
|
|
|
1449
1449
|
"stroke-linejoin": "round",
|
|
1450
1450
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1451
1451
|
};
|
|
1452
|
-
function
|
|
1453
|
-
return i(), d("svg",
|
|
1452
|
+
function kn(o, e) {
|
|
1453
|
+
return i(), d("svg", wn, e[0] || (e[0] = [
|
|
1454
1454
|
l("path", {
|
|
1455
1455
|
stroke: "none",
|
|
1456
1456
|
d: "M0 0h24v24H0z",
|
|
@@ -1461,13 +1461,13 @@ function wn(o, e) {
|
|
|
1461
1461
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1462
1462
|
]));
|
|
1463
1463
|
}
|
|
1464
|
-
const
|
|
1464
|
+
const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Cn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Vn = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Mn = { class1: "ml-auto" }, Ln = { 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" }, Sn = {
|
|
1465
1465
|
key: 0,
|
|
1466
1466
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
1467
|
-
},
|
|
1467
|
+
}, Bn = { class: "relative" }, jn = {
|
|
1468
1468
|
key: 1,
|
|
1469
1469
|
class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
1470
|
-
},
|
|
1470
|
+
}, En = { key: 0 }, In = /* @__PURE__ */ U({
|
|
1471
1471
|
__name: "vs-input-file-list",
|
|
1472
1472
|
props: {
|
|
1473
1473
|
id: { default: "" },
|
|
@@ -1482,7 +1482,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1482
1482
|
},
|
|
1483
1483
|
emits: ["update"],
|
|
1484
1484
|
setup(o, { emit: e }) {
|
|
1485
|
-
const t = o, a = Ae("form"), n = B(() => a.value.formId), s =
|
|
1485
|
+
const t = o, a = Ae("form"), n = B(() => a.value.formId), s = w(!1), r = w(0), u = e, c = w(!1), p = w({}), f = w([]), m = w(""), y = B(() => Array.isArray(f.value) ? f.value.filter((I) => I.ext === "jpg" || I.ext === "png").map((I) => I?.file_path) : []), S = B(() => m.value === "" ? f.value : f.value.filter((I) => I?.uploaded_name?.includes(m.value))), q = (I) => {
|
|
1486
1486
|
const v = y.value.findIndex((x) => x === I.item.file_path);
|
|
1487
1487
|
v !== -1 && (s.value = !0, r.value = v);
|
|
1488
1488
|
}, R = async () => {
|
|
@@ -1528,19 +1528,19 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1528
1528
|
}), _e(() => {
|
|
1529
1529
|
n.value && R();
|
|
1530
1530
|
}), (I, v) => {
|
|
1531
|
-
const x =
|
|
1532
|
-
return i(), d("div",
|
|
1533
|
-
l("div",
|
|
1534
|
-
l("h2",
|
|
1535
|
-
l("div",
|
|
1531
|
+
const x = vt("Lightbox"), V = vt("MessageBox");
|
|
1532
|
+
return i(), d("div", $n, [
|
|
1533
|
+
l("div", Cn, [
|
|
1534
|
+
l("h2", Vn, " Файлів: " + G(f.value?.length), 1),
|
|
1535
|
+
l("div", Mn, [
|
|
1536
1536
|
l("label", null, [
|
|
1537
1537
|
l("input", {
|
|
1538
1538
|
type: "file",
|
|
1539
1539
|
class: "hidden",
|
|
1540
1540
|
onChange: v[0] || (v[0] = ($) => K($))
|
|
1541
1541
|
}, null, 32),
|
|
1542
|
-
l("div",
|
|
1543
|
-
A(
|
|
1542
|
+
l("div", Ln, [
|
|
1543
|
+
A(_n, {
|
|
1544
1544
|
height: "16",
|
|
1545
1545
|
width: "16"
|
|
1546
1546
|
})
|
|
@@ -1548,9 +1548,9 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1548
1548
|
])
|
|
1549
1549
|
])
|
|
1550
1550
|
]),
|
|
1551
|
-
f.value?.length > 4 ? (i(), d("div",
|
|
1551
|
+
f.value?.length > 4 ? (i(), d("div", Sn, [
|
|
1552
1552
|
l("div", null, [
|
|
1553
|
-
l("div",
|
|
1553
|
+
l("div", Bn, [
|
|
1554
1554
|
v[8] || (v[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
|
|
1555
1555
|
l("svg", {
|
|
1556
1556
|
class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
|
|
@@ -1579,7 +1579,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1579
1579
|
placeholder: "Введіть назву файлу"
|
|
1580
1580
|
}, null, 512), [
|
|
1581
1581
|
[
|
|
1582
|
-
|
|
1582
|
+
ve,
|
|
1583
1583
|
m.value,
|
|
1584
1584
|
void 0,
|
|
1585
1585
|
{ trim: !0 }
|
|
@@ -1588,17 +1588,17 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1588
1588
|
])
|
|
1589
1589
|
])
|
|
1590
1590
|
])) : D("", !0),
|
|
1591
|
-
f.value?.length ? (i(), d("div",
|
|
1592
|
-
(i(!0), d(re, null, fe(S.value, ($, F) => (i(),
|
|
1591
|
+
f.value?.length ? (i(), d("div", jn, [
|
|
1592
|
+
(i(!0), d(re, null, fe(S.value, ($, F) => (i(), me(yn, {
|
|
1593
1593
|
key: F,
|
|
1594
1594
|
prefix: I.prefix,
|
|
1595
1595
|
item: $,
|
|
1596
1596
|
index: F,
|
|
1597
1597
|
onUpdate: v[2] || (v[2] = (te) => I.$emit("update", "file-list")),
|
|
1598
1598
|
onOpenModal: v[3] || (v[3] = (te) => H(te)),
|
|
1599
|
-
onOpenLightbox: v[4] || (v[4] = (te) =>
|
|
1599
|
+
onOpenLightbox: v[4] || (v[4] = (te) => q(te))
|
|
1600
1600
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1601
|
-
S.value.length ? D("", !0) : (i(), d("div",
|
|
1601
|
+
S.value.length ? D("", !0) : (i(), d("div", En, v[9] || (v[9] = [
|
|
1602
1602
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1603
1603
|
])))
|
|
1604
1604
|
])) : D("", !0),
|
|
@@ -1617,7 +1617,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1617
1617
|
]);
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
|
-
}),
|
|
1620
|
+
}), zn = { class: "flex items-center justify-between" }, An = { class: "text-[16px] text-gray-900 font-medium" }, Tn = { class: "grid gap-3" }, Fn = /* @__PURE__ */ U({
|
|
1621
1621
|
__name: "vs-container-switcher",
|
|
1622
1622
|
props: {
|
|
1623
1623
|
title: {
|
|
@@ -1634,16 +1634,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1634
1634
|
}
|
|
1635
1635
|
},
|
|
1636
1636
|
setup(o) {
|
|
1637
|
-
const e = o, t =
|
|
1637
|
+
const e = o, t = w(e.isOpen);
|
|
1638
1638
|
return ue(
|
|
1639
1639
|
() => e.isOpen,
|
|
1640
1640
|
(a) => {
|
|
1641
1641
|
t.value = a;
|
|
1642
1642
|
}
|
|
1643
1643
|
), (a, n) => (i(), d("div", null, [
|
|
1644
|
-
l("div",
|
|
1645
|
-
l("p",
|
|
1646
|
-
A(
|
|
1644
|
+
l("div", zn, [
|
|
1645
|
+
l("p", An, G(o.title), 1),
|
|
1646
|
+
A(jt, {
|
|
1647
1647
|
modelValue: t.value,
|
|
1648
1648
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
1649
1649
|
style: be(o.style)
|
|
@@ -1651,7 +1651,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1651
1651
|
]),
|
|
1652
1652
|
A(st, { name: "slide-fade" }, {
|
|
1653
1653
|
default: Ee(() => [
|
|
1654
|
-
ae(l("div",
|
|
1654
|
+
ae(l("div", Tn, [
|
|
1655
1655
|
Se(a.$slots, "default", {}, void 0, !0)
|
|
1656
1656
|
], 512), [
|
|
1657
1657
|
[Qe, t.value]
|
|
@@ -1661,7 +1661,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1661
1661
|
})
|
|
1662
1662
|
]));
|
|
1663
1663
|
}
|
|
1664
|
-
}),
|
|
1664
|
+
}), On = /* @__PURE__ */ X(Fn, [["__scopeId", "data-v-90320b87"]]), Dn = { class: "text-[16px] text-gray-900 font-medium" }, Un = { class: "grid gap-3" }, Pn = /* @__PURE__ */ U({
|
|
1665
1665
|
__name: "vs-container-accordion",
|
|
1666
1666
|
props: {
|
|
1667
1667
|
title: {
|
|
@@ -1678,7 +1678,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1678
1678
|
}
|
|
1679
1679
|
},
|
|
1680
1680
|
setup(o) {
|
|
1681
|
-
const e = o, t =
|
|
1681
|
+
const e = o, t = w(e.isOpen);
|
|
1682
1682
|
return ue(
|
|
1683
1683
|
() => e.isOpen,
|
|
1684
1684
|
(a) => {
|
|
@@ -1690,14 +1690,14 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1690
1690
|
onClick: n[0] || (n[0] = (s) => t.value = !t.value),
|
|
1691
1691
|
class: "flex items-center gap-2"
|
|
1692
1692
|
}, [
|
|
1693
|
-
A(ee(
|
|
1693
|
+
A(ee(Rl), {
|
|
1694
1694
|
class: E(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
|
|
1695
1695
|
}, null, 8, ["class"]),
|
|
1696
|
-
l("span",
|
|
1696
|
+
l("span", Dn, G(o.title), 1)
|
|
1697
1697
|
]),
|
|
1698
1698
|
A(st, { name: "slide-fade" }, {
|
|
1699
1699
|
default: Ee(() => [
|
|
1700
|
-
ae(l("div",
|
|
1700
|
+
ae(l("div", Un, [
|
|
1701
1701
|
Se(a.$slots, "default", {}, void 0, !0)
|
|
1702
1702
|
], 512), [
|
|
1703
1703
|
[Qe, t.value]
|
|
@@ -1707,7 +1707,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1707
1707
|
})
|
|
1708
1708
|
]));
|
|
1709
1709
|
}
|
|
1710
|
-
}),
|
|
1710
|
+
}), Rn = /* @__PURE__ */ X(Pn, [["__scopeId", "data-v-590eff11"]]), Hn = { class: "flex items-center justify-between" }, Nn = /* @__PURE__ */ U({
|
|
1711
1711
|
__name: "vs-container-default",
|
|
1712
1712
|
props: {
|
|
1713
1713
|
title: {
|
|
@@ -1721,16 +1721,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1721
1721
|
},
|
|
1722
1722
|
setup(o) {
|
|
1723
1723
|
return (e, t) => (i(), d("div", null, [
|
|
1724
|
-
l("div",
|
|
1725
|
-
l("p", null,
|
|
1724
|
+
l("div", Hn, [
|
|
1725
|
+
l("p", null, G(o.title), 1)
|
|
1726
1726
|
]),
|
|
1727
1727
|
Se(e.$slots, "default")
|
|
1728
1728
|
]));
|
|
1729
1729
|
}
|
|
1730
|
-
}),
|
|
1731
|
-
switcher:
|
|
1732
|
-
accordion:
|
|
1733
|
-
default:
|
|
1730
|
+
}), qn = {
|
|
1731
|
+
switcher: On,
|
|
1732
|
+
accordion: Rn,
|
|
1733
|
+
default: Nn
|
|
1734
1734
|
}, we = {
|
|
1735
1735
|
Equal: "==",
|
|
1736
1736
|
Inequal: "!=",
|
|
@@ -1744,37 +1744,37 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1744
1744
|
Contain: "*",
|
|
1745
1745
|
In: "in",
|
|
1746
1746
|
NotIn: "not_in"
|
|
1747
|
-
},
|
|
1747
|
+
}, Wn = (o, e) => String(o) === String(e), Gn = (o, e) => String(o) !== String(e), Zn = (o, e) => o > e, Kn = (o, e) => o >= e, Jn = (o, e) => o < e, Yn = (o, e) => o <= e, Xn = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Qn = (o, e) => String(o).startsWith(String(e)), ea = (o, e) => String(o).endsWith(String(e)), ta = (o, e) => String(o).includes(String(e)), la = (o, e) => Array.isArray(e) ? e.includes(o) : !1, oa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, zt = (o, e) => {
|
|
1748
1748
|
if (!e) return !0;
|
|
1749
1749
|
switch (e?.[1]) {
|
|
1750
1750
|
case we.Equal:
|
|
1751
|
-
return qn(o, e?.[2]);
|
|
1752
|
-
case we.Inequal:
|
|
1753
1751
|
return Wn(o, e?.[2]);
|
|
1754
|
-
case we.
|
|
1752
|
+
case we.Inequal:
|
|
1755
1753
|
return Gn(o, e?.[2]);
|
|
1756
|
-
case we.
|
|
1754
|
+
case we.Higer:
|
|
1757
1755
|
return Zn(o, e?.[2]);
|
|
1758
|
-
case we.
|
|
1756
|
+
case we.HigerOrEqual:
|
|
1759
1757
|
return Kn(o, e?.[2]);
|
|
1760
|
-
case we.
|
|
1758
|
+
case we.Lower:
|
|
1761
1759
|
return Jn(o, e?.[2]);
|
|
1762
|
-
case we.
|
|
1760
|
+
case we.LowerOrEqual:
|
|
1763
1761
|
return Yn(o, e?.[2]);
|
|
1764
|
-
case we.
|
|
1762
|
+
case we.Between:
|
|
1765
1763
|
return Xn(o, e?.[2]);
|
|
1766
|
-
case we.
|
|
1764
|
+
case we.StartWith:
|
|
1767
1765
|
return Qn(o, e?.[2]);
|
|
1768
|
-
case we.
|
|
1766
|
+
case we.EndWith:
|
|
1769
1767
|
return ea(o, e?.[2]);
|
|
1770
|
-
case we.
|
|
1768
|
+
case we.Contain:
|
|
1771
1769
|
return ta(o, e?.[2]);
|
|
1772
|
-
case we.
|
|
1770
|
+
case we.In:
|
|
1773
1771
|
return la(o, e?.[2]);
|
|
1772
|
+
case we.NotIn:
|
|
1773
|
+
return oa(o, e?.[2]);
|
|
1774
1774
|
default:
|
|
1775
1775
|
return !0;
|
|
1776
1776
|
}
|
|
1777
|
-
},
|
|
1777
|
+
}, na = /* @__PURE__ */ U({
|
|
1778
1778
|
__name: "vs-input-container",
|
|
1779
1779
|
props: {
|
|
1780
1780
|
style: {
|
|
@@ -1799,15 +1799,15 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1799
1799
|
const u = r?.conditions;
|
|
1800
1800
|
if (!u) return !0;
|
|
1801
1801
|
const c = Array.isArray(u) ? u[0] : u, p = t?.value?.[c];
|
|
1802
|
-
return
|
|
1803
|
-
})), s = B(() =>
|
|
1804
|
-
return (r, u) => o.schema?.length ? (i(),
|
|
1802
|
+
return zt(p, u);
|
|
1803
|
+
})), s = B(() => qn[e.view]);
|
|
1804
|
+
return (r, u) => o.schema?.length ? (i(), me(Fe(s.value), {
|
|
1805
1805
|
key: 0,
|
|
1806
1806
|
title: o.title,
|
|
1807
1807
|
style: be(o.style)
|
|
1808
1808
|
}, {
|
|
1809
1809
|
default: Ee(() => [
|
|
1810
|
-
(i(!0), d(re, null, fe(n.value, (c) => (i(),
|
|
1810
|
+
(i(!0), d(re, null, fe(n.value, (c) => (i(), me(At, Te({
|
|
1811
1811
|
key: c.name
|
|
1812
1812
|
}, { ref_for: !0 }, c, {
|
|
1813
1813
|
item: c,
|
|
@@ -1820,13 +1820,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1820
1820
|
_: 1
|
|
1821
1821
|
}, 8, ["title", "style"])) : D("", !0);
|
|
1822
1822
|
}
|
|
1823
|
-
}),
|
|
1823
|
+
}), aa = ["aria-expanded", "data-focus"], sa = { class: "flex items-center" }, ra = ["title"], ia = ["innerHTML"], ua = ["onClick"], da = ["title"], ca = ["innerHTML"], pa = {
|
|
1824
1824
|
key: 2,
|
|
1825
1825
|
class: "text-gray-500 truncate"
|
|
1826
|
-
},
|
|
1826
|
+
}, fa = { class: "flex-1 min-w-[2px]" }, ma = ["placeholder"], va = { class: "flex items-center shrink-0" }, ha = ["disabled"], ga = ["disabled", "title"], ba = ["aria-disabled", "onClick"], ya = ["innerHTML"], xa = {
|
|
1827
1827
|
key: 1,
|
|
1828
1828
|
class: "px-3 py-2 text-center text-gray-500"
|
|
1829
|
-
},
|
|
1829
|
+
}, wa = ["disabled"], kt = /* @__PURE__ */ U({
|
|
1830
1830
|
__name: "vs-input-select",
|
|
1831
1831
|
props: {
|
|
1832
1832
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -1861,80 +1861,80 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1861
1861
|
set: (h) => a("update:modelValue", h)
|
|
1862
1862
|
});
|
|
1863
1863
|
!r.value && t.defaultValue && (r.value = t.defaultValue);
|
|
1864
|
-
const u =
|
|
1864
|
+
const u = w(null), c = w(null), p = w(null), f = w(null), m = w(!1), y = w(!1), S = w(null), q = w([]), R = w(-1), K = w([]), T = w(""), H = w(null), I = w("bottom"), v = w({}), x = w([]), V = B(() => {
|
|
1865
1865
|
if (!x.value.length) return [];
|
|
1866
|
-
const h =
|
|
1867
|
-
return x.value.map((
|
|
1868
|
-
}), $ = B(() => t.placeholder || "Select..."), F = B(() =>
|
|
1869
|
-
let h =
|
|
1866
|
+
const h = q.value, b = new Map(h.map((k) => [k.id?.toString(), k]));
|
|
1867
|
+
return x.value.map((k) => b.get(k?.toString())).filter((k) => !!k);
|
|
1868
|
+
}), $ = B(() => t.placeholder || "Select..."), F = B(() => W(S.value)), te = B(() => n.value ? !x.value.length && T.value === "" : !F.value && T.value === ""), J = B(() => s.value ? !1 : n.value ? x.value.length > 0 : !!r.value), M = (h) => n.value ? x.value.some((b) => b?.toString() === h?.toString()) : r.value?.toString() === h?.toString(), Z = B(() => {
|
|
1869
|
+
let h = q.value ?? [];
|
|
1870
1870
|
if (!t.data && T.value.trim() !== "") {
|
|
1871
1871
|
const b = T.value.toLowerCase();
|
|
1872
|
-
h = h.filter((
|
|
1873
|
-
const P =
|
|
1872
|
+
h = h.filter((k) => {
|
|
1873
|
+
const P = W(k).toLowerCase(), ne = k.text?.toLowerCase?.() || "";
|
|
1874
1874
|
return P.includes(b) || ne.includes(b);
|
|
1875
1875
|
});
|
|
1876
1876
|
}
|
|
1877
1877
|
if (n.value && x.value.length) {
|
|
1878
|
-
const b = new Set(x.value.map((
|
|
1879
|
-
h = h.filter((
|
|
1878
|
+
const b = new Set(x.value.map((k) => k?.toString()));
|
|
1879
|
+
h = h.filter((k) => !b.has(k.id?.toString()));
|
|
1880
1880
|
}
|
|
1881
1881
|
return h;
|
|
1882
1882
|
}), N = Ae("values"), le = /\{\{\s*([^}]+?)\s*\}\}/g, z = (h) => (h ? String(h) : "").replace(/<[^>]*>/g, "").trim(), j = B(() => t.slot ?? t?.optionTemplate ?? ""), C = (h) => {
|
|
1883
1883
|
if (!h) return "";
|
|
1884
1884
|
const b = j.value;
|
|
1885
|
-
return b ? b.replace(le, (
|
|
1885
|
+
return b ? b.replace(le, (k, P) => {
|
|
1886
1886
|
const ne = P.trim(), pe = h[ne];
|
|
1887
1887
|
return pe != null ? String(pe) : "";
|
|
1888
1888
|
}) : h.text ?? "";
|
|
1889
|
-
},
|
|
1889
|
+
}, W = (h) => {
|
|
1890
1890
|
if (!h) return "";
|
|
1891
1891
|
if (!j.value) return h.text ?? "";
|
|
1892
|
-
const
|
|
1893
|
-
return z(
|
|
1892
|
+
const k = C(h);
|
|
1893
|
+
return z(k) || h.text || "";
|
|
1894
1894
|
}, oe = (h) => {
|
|
1895
|
-
t.set && N?.value && Object.entries(t.set).forEach(([b,
|
|
1895
|
+
t.set && N?.value && Object.entries(t.set).forEach(([b, k]) => {
|
|
1896
1896
|
if (!b) return;
|
|
1897
|
-
const P = h ? h[
|
|
1897
|
+
const P = h ? h[k] : null;
|
|
1898
1898
|
N.value[b] = P ?? null;
|
|
1899
1899
|
});
|
|
1900
1900
|
}, se = B(() => t.parent ? N?.value?.[t.parent]?.toString() ?? null : null), Le = async (h) => {
|
|
1901
1901
|
if (!t.data) {
|
|
1902
1902
|
let b = t.options ?? [];
|
|
1903
1903
|
if (h?.trim()) {
|
|
1904
|
-
const
|
|
1904
|
+
const k = h.toLowerCase();
|
|
1905
1905
|
b = b.filter((P) => {
|
|
1906
|
-
const ne =
|
|
1907
|
-
return ne.includes(
|
|
1906
|
+
const ne = W(P).toLowerCase(), pe = P.text?.toLowerCase?.() || "";
|
|
1907
|
+
return ne.includes(k) || pe.includes(k);
|
|
1908
1908
|
});
|
|
1909
1909
|
}
|
|
1910
1910
|
return b;
|
|
1911
1911
|
}
|
|
1912
1912
|
try {
|
|
1913
|
-
const b = t.host ?? "",
|
|
1913
|
+
const b = t.host ?? "", k = t.prefix ?? "api", P = t.api ?? `/${k}/suggest/${t.data}`, ne = `${b}${P}`, pe = new URLSearchParams();
|
|
1914
1914
|
return pe.set("json", "1"), h && pe.set("key", h), se.value !== void 0 && se.value !== null && se.value !== "" && pe.set("parent", se.value), (await fetch(`${ne}?${pe.toString()}`).then((ze) => ze.json()))?.data ?? [];
|
|
1915
1915
|
} catch {
|
|
1916
1916
|
return [];
|
|
1917
1917
|
}
|
|
1918
1918
|
}, Oe = async () => {
|
|
1919
|
-
t.data ?
|
|
1919
|
+
t.data ? q.value = await Le(T.value) : q.value = t.options ? [...t.options] : [];
|
|
1920
1920
|
}, Ge = async (h) => {
|
|
1921
1921
|
if (h == null) return null;
|
|
1922
|
-
const b =
|
|
1922
|
+
const b = q.value?.find((k) => k?.id?.toString() === String(h));
|
|
1923
1923
|
if (b) return b;
|
|
1924
1924
|
if (t.data)
|
|
1925
1925
|
try {
|
|
1926
|
-
const
|
|
1926
|
+
const k = t.host ?? "", P = t.prefix ?? "api", ne = t.api ?? `/${P}/suggest/${t.data}`, pe = `${k}${ne}`, xe = new URLSearchParams();
|
|
1927
1927
|
return xe.set("json", "1"), xe.set("val", String(h)), se.value !== void 0 && se.value !== null && se.value !== "" && xe.set("parent", se.value), ((await fetch(`${pe}?${xe.toString()}`).then((Pe) => Pe.json()))?.data ?? [])?.[0] ?? null;
|
|
1928
1928
|
} catch {
|
|
1929
1929
|
return null;
|
|
1930
1930
|
}
|
|
1931
1931
|
return null;
|
|
1932
1932
|
}, tt = async (h) => {
|
|
1933
|
-
const b = new Set(
|
|
1934
|
-
|
|
1933
|
+
const b = new Set(q.value.map((P) => P.id?.toString())), k = h.filter((P) => !b.has(P?.toString()));
|
|
1934
|
+
k.length && await k.reduce(async (P, ne) => {
|
|
1935
1935
|
await P;
|
|
1936
1936
|
const pe = await Ge(ne);
|
|
1937
|
-
pe &&
|
|
1937
|
+
pe && q.value.push(pe);
|
|
1938
1938
|
}, Promise.resolve());
|
|
1939
1939
|
}, De = async () => {
|
|
1940
1940
|
s.value || (m.value = !0, await Oe(), await je(() => {
|
|
@@ -1955,13 +1955,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1955
1955
|
n.value ? (M(h.id) || (x.value = [...x.value, h.id], r.value = [...x.value], a("change", r.value)), T.value = "", je(() => {
|
|
1956
1956
|
H.value?.focus(), R.value = Math.min(R.value, Z.value.length - 1);
|
|
1957
1957
|
}), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value), T.value = "", Ce(), oe(h));
|
|
1958
|
-
},
|
|
1958
|
+
}, he = (h) => {
|
|
1959
1959
|
M(h.id) || Q(h);
|
|
1960
1960
|
}, Ve = (h, b) => {
|
|
1961
1961
|
if (!h || !b) return;
|
|
1962
|
-
const
|
|
1962
|
+
const k = h.offsetTop, P = k + h.offsetHeight, ne = b.scrollTop, pe = ne + b.clientHeight;
|
|
1963
1963
|
let xe = b.scrollTop;
|
|
1964
|
-
|
|
1964
|
+
k < ne ? xe = k - 80 : P > pe && (xe = P - b.clientHeight + 4);
|
|
1965
1965
|
const ze = b;
|
|
1966
1966
|
ze.scrollTop = xe;
|
|
1967
1967
|
}, Be = (h) => {
|
|
@@ -1969,7 +1969,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1969
1969
|
for (; b; ) {
|
|
1970
1970
|
if (b.classList.contains("ui-dialog__content"))
|
|
1971
1971
|
return b;
|
|
1972
|
-
const
|
|
1972
|
+
const k = window.getComputedStyle(b), P = k.overflow + k.overflowY + k.overflowX;
|
|
1973
1973
|
if (P.includes("auto") || P.includes("scroll") || b === document.body || b === document.documentElement)
|
|
1974
1974
|
return b;
|
|
1975
1975
|
b = b.parentElement;
|
|
@@ -1977,12 +1977,12 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1977
1977
|
return document.body;
|
|
1978
1978
|
}, Me = () => {
|
|
1979
1979
|
if (!c.value) return;
|
|
1980
|
-
const h = c.value.getBoundingClientRect(), b = window.innerHeight || document.documentElement.clientHeight,
|
|
1980
|
+
const h = c.value.getBoundingClientRect(), b = window.innerHeight || document.documentElement.clientHeight, k = window.innerWidth || document.documentElement.clientWidth, P = 8, ne = 8, pe = t.maxHeight || 300, xe = b - h.bottom - ne - P, ze = h.top - ne - P, Ue = xe >= ze, Pe = Math.max(k - P * 2, 0);
|
|
1981
1981
|
let { width: Re } = h;
|
|
1982
1982
|
Pe > 0 && Re > Pe && (Re = Pe);
|
|
1983
1983
|
let { left: He } = h;
|
|
1984
|
-
He + Re + P >
|
|
1985
|
-
const
|
|
1984
|
+
He + Re + P > k && (He = k - Re - P), He = Math.max(He, P);
|
|
1985
|
+
const Nt = Math.min(
|
|
1986
1986
|
pe,
|
|
1987
1987
|
Math.max(Ue ? xe : ze, 50)
|
|
1988
1988
|
);
|
|
@@ -1991,13 +1991,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
1991
1991
|
left: `${He}px`,
|
|
1992
1992
|
width: `${Re}px`,
|
|
1993
1993
|
minWidth: "300px",
|
|
1994
|
-
maxHeight: `${
|
|
1994
|
+
maxHeight: `${Nt}px`,
|
|
1995
1995
|
transform: Ue ? "none" : "translateY(-100%)",
|
|
1996
1996
|
top: Ue ? `${h.bottom + ne}px` : `${h.top - ne}px`
|
|
1997
1997
|
};
|
|
1998
1998
|
}, Ie = async (h) => {
|
|
1999
1999
|
s.value || !m.value && (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), await De());
|
|
2000
|
-
},
|
|
2000
|
+
}, Ft = (h) => {
|
|
2001
2001
|
if (!m.value) return;
|
|
2002
2002
|
const { key: b } = h;
|
|
2003
2003
|
if (b === "ArrowDown")
|
|
@@ -2006,12 +2006,12 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2006
2006
|
h.preventDefault(), R.value > 0 && (R.value -= 1, Ve(K.value[R.value], p.value));
|
|
2007
2007
|
else if (b === "Enter") {
|
|
2008
2008
|
h.preventDefault();
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2009
|
+
const k = Z.value[R.value];
|
|
2010
|
+
k && Q(k), H.value?.blur();
|
|
2011
2011
|
} else b === "Escape" ? (h.preventDefault(), Ce()) : b === "Backspace" ? n.value && T.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], a("change", r.value)) : b === "Home" ? (R.value = 0, Ve(K.value[0], p.value)) : b === "End" ? (R.value = Z.value.length - 1, Ve(K.value[R.value], p.value)) : b === "Tab" && Ce();
|
|
2012
|
-
}, Ft = () => {
|
|
2013
|
-
s.value || (y.value = !0);
|
|
2014
2012
|
}, Ot = () => {
|
|
2013
|
+
s.value || (y.value = !0);
|
|
2014
|
+
}, Dt = () => {
|
|
2015
2015
|
y.value = !1, T.value = "";
|
|
2016
2016
|
}, rt = (h) => {
|
|
2017
2017
|
h.key === "Escape" && m.value && Ce();
|
|
@@ -2026,7 +2026,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2026
2026
|
m.value && Me();
|
|
2027
2027
|
};
|
|
2028
2028
|
ue(() => t.options, (h) => {
|
|
2029
|
-
h?.length && (
|
|
2029
|
+
h?.length && (q.value = [...h], Ze());
|
|
2030
2030
|
}, { immediate: !0 });
|
|
2031
2031
|
async function Ze() {
|
|
2032
2032
|
if (n.value)
|
|
@@ -2042,68 +2042,69 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2042
2042
|
ue(r, () => {
|
|
2043
2043
|
Ze();
|
|
2044
2044
|
}), _e(async () => {
|
|
2045
|
-
addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Be(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ?
|
|
2045
|
+
addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Be(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Le("")), await Ze(), mt.value = !1;
|
|
2046
2046
|
}), Xe(() => {
|
|
2047
2047
|
removeEventListener("keydown", rt), removeEventListener("scroll", ut, !0), removeEventListener("resize", dt), document.removeEventListener("click", it, !0), c.value && Be(c.value).removeEventListener("scroll", ct, !0);
|
|
2048
2048
|
});
|
|
2049
|
-
const Ke =
|
|
2050
|
-
async function
|
|
2049
|
+
const Ke = w(!1), lt = w({}), pt = w([]), ft = w(null);
|
|
2050
|
+
async function Ut() {
|
|
2051
2051
|
if (!t.add?.token || ft?.value.validate())
|
|
2052
2052
|
return;
|
|
2053
|
-
const b = t.add.api ?? `/api/table/${t.add.token}`, { id:
|
|
2053
|
+
const b = t.add.api ?? `/api/table/${t.add.token}`, { id: k } = await fetch(b, {
|
|
2054
2054
|
method: "POST",
|
|
2055
2055
|
headers: { "Content-Type": "application/json" },
|
|
2056
2056
|
body: JSON.stringify(lt.value)
|
|
2057
2057
|
}).then((P) => P.json());
|
|
2058
2058
|
if (!t.options?.length && t.data) {
|
|
2059
|
-
const { data: P } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${
|
|
2060
|
-
S.value = P[0],
|
|
2059
|
+
const { data: P } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${k}`).then((ne) => ne.json());
|
|
2060
|
+
S.value = P[0], q.value.push(P[0]), r.value = k;
|
|
2061
2061
|
}
|
|
2062
2062
|
Ke.value = !1, ce({ title: "Success!", message: "Object created." });
|
|
2063
2063
|
}
|
|
2064
|
-
async function
|
|
2064
|
+
async function Pt() {
|
|
2065
2065
|
if (!t.add) return null;
|
|
2066
2066
|
const h = await fetch(`/api/template/form/${t.add.form}`).then((b) => b.json());
|
|
2067
2067
|
return pt.value = h.schema, Ke.value = !0, null;
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2070
|
-
let
|
|
2069
|
+
function Rt(h, b = 200) {
|
|
2070
|
+
let k;
|
|
2071
2071
|
return (...P) => {
|
|
2072
|
-
|
|
2072
|
+
k && clearTimeout(k), k = window.setTimeout(() => h(...P), b);
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2075
|
+
const Ht = Rt(async (h) => {
|
|
2076
|
+
q.value = await Le(h);
|
|
2077
2077
|
}, 200);
|
|
2078
|
-
|
|
2079
|
-
t.data &&
|
|
2078
|
+
ue(T, (h) => {
|
|
2079
|
+
t.data && Ht(h.trim());
|
|
2080
2080
|
}), ue(() => t.options, (h) => {
|
|
2081
|
-
!t.data && h?.length && (
|
|
2081
|
+
!t.data && h?.length && (q.value = [...h], Ze());
|
|
2082
2082
|
}, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
|
|
2083
2083
|
t.data && Oe();
|
|
2084
|
-
})
|
|
2085
|
-
|
|
2084
|
+
});
|
|
2085
|
+
const mt = w(!0);
|
|
2086
|
+
return ue(se, async () => {
|
|
2087
|
+
t.data && (mt.value || (n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null))), await Oe());
|
|
2086
2088
|
}), (h, b) => (i(), d(re, null, [
|
|
2087
|
-
A(ee(
|
|
2089
|
+
A(ee(St), {
|
|
2088
2090
|
visible: Ke.value,
|
|
2089
|
-
"onUpdate:visible": b[1] || (b[1] = (
|
|
2091
|
+
"onUpdate:visible": b[1] || (b[1] = (k) => Ke.value = k),
|
|
2090
2092
|
title: "Додати",
|
|
2091
2093
|
buttonText: "Додати",
|
|
2092
|
-
onDone:
|
|
2094
|
+
onDone: Ut,
|
|
2093
2095
|
teleport: h.teleport
|
|
2094
2096
|
}, {
|
|
2095
2097
|
default: Ee(() => [
|
|
2096
2098
|
A(We, {
|
|
2097
2099
|
schema: pt.value,
|
|
2098
2100
|
modelValue: lt.value,
|
|
2099
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
2101
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => lt.value = k),
|
|
2100
2102
|
ref_key: "addForm",
|
|
2101
2103
|
ref: ft
|
|
2102
2104
|
}, null, 8, ["schema", "modelValue"])
|
|
2103
2105
|
]),
|
|
2104
2106
|
_: 1
|
|
2105
2107
|
}, 8, ["visible", "teleport"]),
|
|
2106
|
-
me(" " + q(r.value) + " ", 1),
|
|
2107
2108
|
l("div", {
|
|
2108
2109
|
class: "flex gap-1 w-full",
|
|
2109
2110
|
ref_key: "selectRoot",
|
|
@@ -2144,32 +2145,32 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2144
2145
|
ref_key: "triggerRef",
|
|
2145
2146
|
ref: c
|
|
2146
2147
|
}, [
|
|
2147
|
-
n.value && x.value.length ? (i(!0), d(re, { key: 0 }, fe(V.value, (
|
|
2148
|
+
n.value && x.value.length ? (i(!0), d(re, { key: 0 }, fe(V.value, (k) => (i(), d("div", {
|
|
2148
2149
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
|
|
2149
|
-
key:
|
|
2150
|
+
key: k.id
|
|
2150
2151
|
}, [
|
|
2151
|
-
l("div",
|
|
2152
|
-
|
|
2152
|
+
l("div", sa, [
|
|
2153
|
+
k?.color ? (i(), d("span", {
|
|
2153
2154
|
key: 0,
|
|
2154
2155
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5",
|
|
2155
|
-
style: be({ backgroundColor:
|
|
2156
|
+
style: be({ backgroundColor: k?.color })
|
|
2156
2157
|
}, null, 4)) : D("", !0),
|
|
2157
2158
|
l("div", {
|
|
2158
2159
|
class: "truncate text-gray-900 overflow-hidden",
|
|
2159
|
-
title:
|
|
2160
|
+
title: W(k)
|
|
2160
2161
|
}, [
|
|
2161
2162
|
j.value ? (i(), d("span", {
|
|
2162
2163
|
key: 0,
|
|
2163
|
-
innerHTML: C(
|
|
2164
|
-
}, null, 8,
|
|
2165
|
-
|
|
2164
|
+
innerHTML: C(k)
|
|
2165
|
+
}, null, 8, ia)) : (i(), d(re, { key: 1 }, [
|
|
2166
|
+
ge(G(k.text), 1)
|
|
2166
2167
|
], 64))
|
|
2167
|
-
], 8,
|
|
2168
|
+
], 8, ra)
|
|
2168
2169
|
]),
|
|
2169
2170
|
l("div", {
|
|
2170
2171
|
role: "button",
|
|
2171
2172
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
2172
|
-
onClick: ke((P) => O(
|
|
2173
|
+
onClick: ke((P) => O(k.id), ["stop"])
|
|
2173
2174
|
}, b[5] || (b[5] = [
|
|
2174
2175
|
l("svg", {
|
|
2175
2176
|
height: "14",
|
|
@@ -2181,7 +2182,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2181
2182
|
}, [
|
|
2182
2183
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2183
2184
|
], -1)
|
|
2184
|
-
]), 8,
|
|
2185
|
+
]), 8, ua)
|
|
2185
2186
|
]))), 128)) : !n.value && !y.value && F.value && T.value === "" ? (i(), d("div", {
|
|
2186
2187
|
key: 1,
|
|
2187
2188
|
class: E(["truncate text-gray-900"]),
|
|
@@ -2196,13 +2197,13 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2196
2197
|
key: 1,
|
|
2197
2198
|
class: E({ "pl-5": S.value?.color }),
|
|
2198
2199
|
innerHTML: C(S.value)
|
|
2199
|
-
}, null, 10,
|
|
2200
|
+
}, null, 10, ca)) : (i(), d("span", {
|
|
2200
2201
|
key: 2,
|
|
2201
2202
|
class: E({ "pl-5": S.value?.color })
|
|
2202
|
-
},
|
|
2203
|
-
], 8,
|
|
2204
|
-
te.value ? (i(), d("div",
|
|
2205
|
-
l("div",
|
|
2203
|
+
}, G(S.value?.text), 3))
|
|
2204
|
+
], 8, da)) : D("", !0),
|
|
2205
|
+
te.value ? (i(), d("div", pa, G($.value), 1)) : D("", !0),
|
|
2206
|
+
l("div", fa, [
|
|
2206
2207
|
!s.value && h.search ? ae((i(), d("input", {
|
|
2207
2208
|
key: 0,
|
|
2208
2209
|
ref_key: "inputRef",
|
|
@@ -2216,16 +2217,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2216
2217
|
tabindex: "0",
|
|
2217
2218
|
"aria-autocomplete": "list",
|
|
2218
2219
|
placeholder: (n.value && x.value.length ? " " : null) || y.value && !T.value?.length && F.value || " ",
|
|
2219
|
-
"onUpdate:modelValue": b[2] || (b[2] = (
|
|
2220
|
-
onFocus:
|
|
2221
|
-
onBlur:
|
|
2222
|
-
onKeydown:
|
|
2223
|
-
}, null, 40,
|
|
2224
|
-
[
|
|
2220
|
+
"onUpdate:modelValue": b[2] || (b[2] = (k) => T.value = k),
|
|
2221
|
+
onFocus: Ot,
|
|
2222
|
+
onBlur: Dt,
|
|
2223
|
+
onKeydown: Ft
|
|
2224
|
+
}, null, 40, ma)), [
|
|
2225
|
+
[ve, T.value]
|
|
2225
2226
|
]) : D("", !0)
|
|
2226
2227
|
])
|
|
2227
2228
|
], 512),
|
|
2228
|
-
l("div",
|
|
2229
|
+
l("div", va, [
|
|
2229
2230
|
J.value ? (i(), d("button", {
|
|
2230
2231
|
key: 0,
|
|
2231
2232
|
type: "button",
|
|
@@ -2242,14 +2243,14 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2242
2243
|
}, [
|
|
2243
2244
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2244
2245
|
], -1)
|
|
2245
|
-
]), 8,
|
|
2246
|
+
]), 8, ha)) : D("", !0),
|
|
2246
2247
|
b[8] || (b[8] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2247
2248
|
l("button", {
|
|
2248
2249
|
type: "button",
|
|
2249
2250
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2250
2251
|
"aria-hidden": "true",
|
|
2251
2252
|
disabled: s.value,
|
|
2252
|
-
onClick: b[3] || (b[3] = ke((
|
|
2253
|
+
onClick: b[3] || (b[3] = ke((k) => g(), ["stop"])),
|
|
2253
2254
|
title: m.value ? "Закрити список" : "Відкрити список"
|
|
2254
2255
|
}, b[7] || (b[7] = [
|
|
2255
2256
|
l("svg", {
|
|
@@ -2260,10 +2261,10 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2260
2261
|
}, [
|
|
2261
2262
|
l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
|
|
2262
2263
|
], -1)
|
|
2263
|
-
]), 8,
|
|
2264
|
+
]), 8, ga)
|
|
2264
2265
|
])
|
|
2265
|
-
], 42,
|
|
2266
|
-
(i(),
|
|
2266
|
+
], 42, aa),
|
|
2267
|
+
(i(), me(Lt, { to: "body" }, [
|
|
2267
2268
|
m.value ? (i(), d("div", {
|
|
2268
2269
|
key: 0,
|
|
2269
2270
|
ref_key: "dropdownRef",
|
|
@@ -2280,48 +2281,48 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2280
2281
|
ref_key: "listRef",
|
|
2281
2282
|
ref: p
|
|
2282
2283
|
}, [
|
|
2283
|
-
Z.value.length ? (i(!0), d(re, { key: 0 }, fe(Z.value, (
|
|
2284
|
-
key:
|
|
2284
|
+
Z.value.length ? (i(!0), d(re, { key: 0 }, fe(Z.value, (k, P) => (i(), d("div", {
|
|
2285
|
+
key: k.id,
|
|
2285
2286
|
ref_for: !0,
|
|
2286
2287
|
ref: (ne) => K.value[P] = ne,
|
|
2287
2288
|
class: E([
|
|
2288
2289
|
"flex px-3 py-2 cursor-default select-none text-gray-900 ",
|
|
2289
|
-
M(
|
|
2290
|
-
R.value === P && !M(
|
|
2290
|
+
M(k.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
|
|
2291
|
+
R.value === P && !M(k.id) ? "bg-blue-100" : ""
|
|
2291
2292
|
]),
|
|
2292
|
-
"aria-disabled": M(
|
|
2293
|
+
"aria-disabled": M(k.id) ? "true" : "false",
|
|
2293
2294
|
role: "option",
|
|
2294
2295
|
tabindex: "-1",
|
|
2295
|
-
onClick: (ne) =>
|
|
2296
|
+
onClick: (ne) => he(k)
|
|
2296
2297
|
}, [
|
|
2297
|
-
|
|
2298
|
+
k?.color ? (i(), d("span", {
|
|
2298
2299
|
key: 0,
|
|
2299
2300
|
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2300
|
-
style: be({ backgroundColor:
|
|
2301
|
+
style: be({ backgroundColor: k?.color })
|
|
2301
2302
|
}, null, 4)) : D("", !0),
|
|
2302
2303
|
l("div", {
|
|
2303
2304
|
class: E([
|
|
2304
2305
|
"leading-[19px]",
|
|
2305
|
-
R.value ===
|
|
2306
|
+
R.value === k.id ? "text-white" : "",
|
|
2306
2307
|
// active style like react-select
|
|
2307
2308
|
(R.value === P, "")
|
|
2308
2309
|
])
|
|
2309
2310
|
}, [
|
|
2310
2311
|
j.value ? (i(), d("span", {
|
|
2311
2312
|
key: 0,
|
|
2312
|
-
innerHTML: C(
|
|
2313
|
-
}, null, 8,
|
|
2314
|
-
|
|
2313
|
+
innerHTML: C(k)
|
|
2314
|
+
}, null, 8, ya)) : (i(), d(re, { key: 1 }, [
|
|
2315
|
+
ge(G(k.text), 1)
|
|
2315
2316
|
], 64))
|
|
2316
2317
|
], 2)
|
|
2317
|
-
], 10,
|
|
2318
|
+
], 10, ba))), 128)) : (i(), d("div", xa, " No options "))
|
|
2318
2319
|
], 4)
|
|
2319
2320
|
], 4)) : D("", !0)
|
|
2320
2321
|
]))
|
|
2321
2322
|
], 2),
|
|
2322
2323
|
t.add ? (i(), d("button", {
|
|
2323
2324
|
key: 0,
|
|
2324
|
-
onClick:
|
|
2325
|
+
onClick: Pt,
|
|
2325
2326
|
class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
|
|
2326
2327
|
disabled: s.value,
|
|
2327
2328
|
type: "button"
|
|
@@ -2331,11 +2332,11 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2331
2332
|
height: "16"
|
|
2332
2333
|
}),
|
|
2333
2334
|
b[11] || (b[11] = l("span", null, "Додати", -1))
|
|
2334
|
-
], 8,
|
|
2335
|
+
], 8, wa)) : D("", !0)
|
|
2335
2336
|
], 512)
|
|
2336
2337
|
], 64));
|
|
2337
2338
|
}
|
|
2338
|
-
}),
|
|
2339
|
+
}), ka = ["placeholder", "disabled"], _a = /* @__PURE__ */ U({
|
|
2339
2340
|
__name: "vs-input-textarea",
|
|
2340
2341
|
props: /* @__PURE__ */ ie({
|
|
2341
2342
|
style: { default: () => ({}) },
|
|
@@ -2361,11 +2362,11 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2361
2362
|
style: {
|
|
2362
2363
|
border: "1px solid #CFD9E0"
|
|
2363
2364
|
}
|
|
2364
|
-
}, null, 10,
|
|
2365
|
-
[
|
|
2365
|
+
}, null, 10, ka)), [
|
|
2366
|
+
[ve, a.value]
|
|
2366
2367
|
]);
|
|
2367
2368
|
}
|
|
2368
|
-
}),
|
|
2369
|
+
}), $a = {}, Ca = {
|
|
2369
2370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2370
2371
|
viewBox: "0 0 24 24",
|
|
2371
2372
|
fill: "none",
|
|
@@ -2375,8 +2376,8 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
|
|
|
2375
2376
|
"stroke-linejoin": "round",
|
|
2376
2377
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2377
2378
|
};
|
|
2378
|
-
function
|
|
2379
|
-
return i(), d("svg",
|
|
2379
|
+
function Va(o, e) {
|
|
2380
|
+
return i(), d("svg", Ca, e[0] || (e[0] = [
|
|
2380
2381
|
l("path", {
|
|
2381
2382
|
stroke: "none",
|
|
2382
2383
|
d: "M0 0h24v24H0z",
|
|
@@ -2386,7 +2387,7 @@ function Ca(o, e) {
|
|
|
2386
2387
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
2387
2388
|
]));
|
|
2388
2389
|
}
|
|
2389
|
-
const
|
|
2390
|
+
const Ma = /* @__PURE__ */ X($a, [["render", Va]]), La = {}, Sa = {
|
|
2390
2391
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
2391
2392
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2392
2393
|
viewBox: "0 0 24 24",
|
|
@@ -2396,15 +2397,15 @@ const Va = /* @__PURE__ */ X(_a, [["render", Ca]]), Ma = {}, La = {
|
|
|
2396
2397
|
"stroke-linecap": "round",
|
|
2397
2398
|
"stroke-linejoin": "round"
|
|
2398
2399
|
};
|
|
2399
|
-
function
|
|
2400
|
-
return i(), d("svg",
|
|
2400
|
+
function Ba(o, e) {
|
|
2401
|
+
return i(), d("svg", Sa, e[0] || (e[0] = [
|
|
2401
2402
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2402
2403
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
2403
2404
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
2404
2405
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
2405
2406
|
]));
|
|
2406
2407
|
}
|
|
2407
|
-
const
|
|
2408
|
+
const ja = /* @__PURE__ */ X(La, [["render", Ba]]), Ea = {}, Ia = {
|
|
2408
2409
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2409
2410
|
width: "14",
|
|
2410
2411
|
height: "14",
|
|
@@ -2415,8 +2416,8 @@ const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
|
|
|
2415
2416
|
"stroke-linecap": "round",
|
|
2416
2417
|
"stroke-linejoin": "round"
|
|
2417
2418
|
};
|
|
2418
|
-
function
|
|
2419
|
-
return i(), d("svg",
|
|
2419
|
+
function za(o, e) {
|
|
2420
|
+
return i(), d("svg", Ia, e[0] || (e[0] = [
|
|
2420
2421
|
l("path", {
|
|
2421
2422
|
stroke: "none",
|
|
2422
2423
|
d: "M0 0h24v24H0z",
|
|
@@ -2427,7 +2428,7 @@ function Ia(o, e) {
|
|
|
2427
2428
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2428
2429
|
]));
|
|
2429
2430
|
}
|
|
2430
|
-
const
|
|
2431
|
+
const Aa = /* @__PURE__ */ X(Ea, [["render", za]]), Ta = {}, Fa = {
|
|
2431
2432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2432
2433
|
viewBox: "0 0 24 24",
|
|
2433
2434
|
fill: "none",
|
|
@@ -2436,8 +2437,8 @@ const za = /* @__PURE__ */ X(ja, [["render", Ia]]), Aa = {}, Ta = {
|
|
|
2436
2437
|
"stroke-linecap": "round",
|
|
2437
2438
|
"stroke-linejoin": "round"
|
|
2438
2439
|
};
|
|
2439
|
-
function
|
|
2440
|
-
return i(), d("svg",
|
|
2440
|
+
function Oa(o, e) {
|
|
2441
|
+
return i(), d("svg", Fa, e[0] || (e[0] = [
|
|
2441
2442
|
l("path", {
|
|
2442
2443
|
stroke: "none",
|
|
2443
2444
|
d: "M0 0h24v24H0z",
|
|
@@ -2448,7 +2449,7 @@ function Fa(o, e) {
|
|
|
2448
2449
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2449
2450
|
]));
|
|
2450
2451
|
}
|
|
2451
|
-
const
|
|
2452
|
+
const Da = /* @__PURE__ */ X(Ta, [["render", Oa]]), Ua = {}, Pa = {
|
|
2452
2453
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2453
2454
|
viewBox: "0 0 24 24",
|
|
2454
2455
|
fill: "none",
|
|
@@ -2457,22 +2458,22 @@ const Oa = /* @__PURE__ */ X(Aa, [["render", Fa]]), Da = {}, Ua = {
|
|
|
2457
2458
|
"stroke-linecap": "round",
|
|
2458
2459
|
"stroke-linejoin": "round"
|
|
2459
2460
|
};
|
|
2460
|
-
function
|
|
2461
|
-
return i(), d("svg",
|
|
2461
|
+
function Ra(o, e) {
|
|
2462
|
+
return i(), d("svg", Pa, e[0] || (e[0] = [
|
|
2462
2463
|
ye('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
|
|
2463
2464
|
]));
|
|
2464
2465
|
}
|
|
2465
|
-
const
|
|
2466
|
+
const _t = /* @__PURE__ */ X(Ua, [["render", Ra]]), Ha = {}, Na = {
|
|
2466
2467
|
viewBox: "0 0 178 90",
|
|
2467
2468
|
fill: "none",
|
|
2468
2469
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2469
2470
|
};
|
|
2470
|
-
function
|
|
2471
|
-
return i(), d("svg",
|
|
2471
|
+
function qa(o, e) {
|
|
2472
|
+
return i(), d("svg", Na, e[0] || (e[0] = [
|
|
2472
2473
|
ye('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
2473
2474
|
]));
|
|
2474
2475
|
}
|
|
2475
|
-
const
|
|
2476
|
+
const Wa = /* @__PURE__ */ X(Ha, [["render", qa]]), Ga = {}, Za = {
|
|
2476
2477
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2477
2478
|
viewBox: "0 0 24 24",
|
|
2478
2479
|
fill: "none",
|
|
@@ -2481,25 +2482,25 @@ const qa = /* @__PURE__ */ X(Ra, [["render", Na]]), Wa = {}, Ga = {
|
|
|
2481
2482
|
"stroke-linecap": "round",
|
|
2482
2483
|
"stroke-linejoin": "round"
|
|
2483
2484
|
};
|
|
2484
|
-
function
|
|
2485
|
-
return i(), d("svg",
|
|
2485
|
+
function Ka(o, e) {
|
|
2486
|
+
return i(), d("svg", Za, e[0] || (e[0] = [
|
|
2486
2487
|
l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
|
|
2487
2488
|
]));
|
|
2488
2489
|
}
|
|
2489
|
-
const
|
|
2490
|
+
const Ja = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ya = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Xa = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, Qa = { class: "relative w-full" }, es = { class: "table-wrapper flex gap-2" }, ts = { class: "vs-popover inline-block text-slate-700" }, ls = { class: "text-center" }, os = { class: "" }, ns = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, as = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, ss = { class: "text-sm items-center text-gray-800 flex gap-1" }, rs = { class: "w-full overflow-x-auto" }, is = { class: "w-full table-auto caption-bottom text-sm" }, us = { class: "[&_tr]:border-b" }, ds = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, cs = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, ps = {
|
|
2490
2491
|
key: 0,
|
|
2491
2492
|
colspan: "100%",
|
|
2492
2493
|
class: "text-center"
|
|
2493
|
-
},
|
|
2494
|
+
}, fs = { class: "w-full" }, ms = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, vs = ["onDragstart", "onDragover", "onDrop"], hs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, gs = { class: "flex items-center justify-center" }, bs = {
|
|
2494
2495
|
key: 0,
|
|
2495
2496
|
class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
|
|
2496
|
-
},
|
|
2497
|
+
}, ys = { key: 0 }, xs = ["src"], ws = {
|
|
2497
2498
|
key: 1,
|
|
2498
2499
|
class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
|
|
2499
|
-
},
|
|
2500
|
+
}, ks = ["innerHTML"], _s = {
|
|
2500
2501
|
key: 2,
|
|
2501
2502
|
class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
|
|
2502
|
-
},
|
|
2503
|
+
}, $s = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Cs = { class: "flex items-center justify-center gap-2" }, Vs = ["onClick"], Ms = ["onClick"], Ls = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Ss = /* @__PURE__ */ U({
|
|
2503
2504
|
__name: "vs-input-datatable",
|
|
2504
2505
|
props: /* @__PURE__ */ ie({
|
|
2505
2506
|
colModel: {},
|
|
@@ -2516,14 +2517,14 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2516
2517
|
}),
|
|
2517
2518
|
emits: ["update:modelValue"],
|
|
2518
2519
|
setup(o) {
|
|
2519
|
-
const e = o, t = de(o, "modelValue"), a =
|
|
2520
|
+
const e = o, t = de(o, "modelValue"), a = w({}), n = w(""), s = B(() => {
|
|
2520
2521
|
if (!n.value) return t.value ?? [];
|
|
2521
2522
|
const z = n.value.toLowerCase();
|
|
2522
2523
|
return t.value.filter((j) => e.colModel?.some((C) => {
|
|
2523
|
-
const
|
|
2524
|
-
return
|
|
2524
|
+
const W = j[C.key];
|
|
2525
|
+
return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(z) : String(W).toLowerCase().includes(z) : !1;
|
|
2525
2526
|
}));
|
|
2526
|
-
}), r =
|
|
2527
|
+
}), r = w(null), u = w(null), c = w(!1), p = w(null), f = w({ top: 0, left: 0 }), m = (z) => {
|
|
2527
2528
|
r.value = z;
|
|
2528
2529
|
}, y = (z) => {
|
|
2529
2530
|
u.value = z;
|
|
@@ -2534,19 +2535,19 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2534
2535
|
}
|
|
2535
2536
|
const j = [...t.value], [C] = j.splice(r.value, 1);
|
|
2536
2537
|
j.splice(z, 0, C), t.value = j, r.value = null, u.value = null;
|
|
2537
|
-
},
|
|
2538
|
+
}, q = (z) => {
|
|
2538
2539
|
const C = z.currentTarget.getBoundingClientRect();
|
|
2539
2540
|
f.value = { top: C.bottom + window.scrollY, left: C.left + window.scrollX }, c.value = !c.value;
|
|
2540
2541
|
}, R = () => {
|
|
2541
2542
|
p.value && p.value.click();
|
|
2542
2543
|
}, K = (z) => {
|
|
2543
2544
|
const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C = z.toLowerCase();
|
|
2544
|
-
return j.some((
|
|
2545
|
+
return j.some((W) => C.endsWith(W));
|
|
2545
2546
|
}, T = (z) => {
|
|
2546
2547
|
const C = z.target.files?.[0];
|
|
2547
2548
|
if (!C) return;
|
|
2548
|
-
const
|
|
2549
|
-
|
|
2549
|
+
const W = new FileReader();
|
|
2550
|
+
W.onload = (oe) => {
|
|
2550
2551
|
try {
|
|
2551
2552
|
const se = oe.target?.result;
|
|
2552
2553
|
if (typeof se == "string") {
|
|
@@ -2556,27 +2557,27 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2556
2557
|
} catch (se) {
|
|
2557
2558
|
console.error("Error parsing file:", se);
|
|
2558
2559
|
}
|
|
2559
|
-
},
|
|
2560
|
+
}, W.readAsText(C);
|
|
2560
2561
|
}, H = () => {
|
|
2561
|
-
const z = JSON.stringify(t.value, null, 2), j = new Blob([z], { type: "application/json" }), C = URL.createObjectURL(j),
|
|
2562
|
-
|
|
2562
|
+
const z = JSON.stringify(t.value, null, 2), j = new Blob([z], { type: "application/json" }), C = URL.createObjectURL(j), W = document.createElement("a");
|
|
2563
|
+
W.href = C, W.download = "data.json", W.click(), URL.revokeObjectURL(C);
|
|
2563
2564
|
};
|
|
2564
2565
|
_e(async () => {
|
|
2565
2566
|
const z = e.colModel?.filter((j) => j.data);
|
|
2566
2567
|
z?.length && Promise.all(z.map(async (j) => {
|
|
2567
|
-
const
|
|
2568
|
-
a.value[j.key] =
|
|
2568
|
+
const W = await (await fetch(`/api/suggest/${j.data}`)).json();
|
|
2569
|
+
a.value[j.key] = W.data;
|
|
2569
2570
|
}));
|
|
2570
2571
|
});
|
|
2571
|
-
const I =
|
|
2572
|
+
const I = w(""), v = w(!1);
|
|
2572
2573
|
let x = "edit", V = 0;
|
|
2573
|
-
const $ =
|
|
2574
|
+
const $ = w({}), F = w({});
|
|
2574
2575
|
async function te() {
|
|
2575
2576
|
I.value = "Додати", v.value = !0, x = "add", $.value = {};
|
|
2576
2577
|
}
|
|
2577
2578
|
function J(z, j) {
|
|
2578
2579
|
const C = j.key || j.name;
|
|
2579
|
-
return a.value[C] && z[C] ? a.value[C].find((
|
|
2580
|
+
return a.value[C] && z[C] ? a.value[C].find((W) => W.id.toString() === z[C].toString())?.text ?? z[C] : z[C] || "-";
|
|
2580
2581
|
}
|
|
2581
2582
|
async function M(z, j) {
|
|
2582
2583
|
I.value = "Редагувати", v.value = !0, x = "edit", V = j, $.value = { ...z };
|
|
@@ -2596,10 +2597,10 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2596
2597
|
function le() {
|
|
2597
2598
|
v.value = !1;
|
|
2598
2599
|
}
|
|
2599
|
-
return (z, j) => (i(), d("div",
|
|
2600
|
-
l("div",
|
|
2601
|
-
l("div",
|
|
2602
|
-
A(
|
|
2600
|
+
return (z, j) => (i(), d("div", Ya, [
|
|
2601
|
+
l("div", Xa, [
|
|
2602
|
+
l("div", Qa, [
|
|
2603
|
+
A(Ma, {
|
|
2603
2604
|
width: "14",
|
|
2604
2605
|
height: "14",
|
|
2605
2606
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
|
|
@@ -2610,10 +2611,10 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2610
2611
|
placeholder: "Пошук",
|
|
2611
2612
|
class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
|
|
2612
2613
|
}, null, 512), [
|
|
2613
|
-
[
|
|
2614
|
+
[ve, n.value]
|
|
2614
2615
|
])
|
|
2615
2616
|
]),
|
|
2616
|
-
l("div",
|
|
2617
|
+
l("div", es, [
|
|
2617
2618
|
l("input", {
|
|
2618
2619
|
ref_key: "fileInput",
|
|
2619
2620
|
ref: p,
|
|
@@ -2622,14 +2623,14 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2622
2623
|
accept: ".json",
|
|
2623
2624
|
type: "file"
|
|
2624
2625
|
}, null, 544),
|
|
2625
|
-
l("div",
|
|
2626
|
-
l("div",
|
|
2627
|
-
l("div",
|
|
2626
|
+
l("div", ts, [
|
|
2627
|
+
l("div", ls, [
|
|
2628
|
+
l("div", os, [
|
|
2628
2629
|
l("button", {
|
|
2629
|
-
onClick:
|
|
2630
|
+
onClick: q,
|
|
2630
2631
|
class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2631
2632
|
}, [
|
|
2632
|
-
A(
|
|
2633
|
+
A(ja, {
|
|
2633
2634
|
height: "16",
|
|
2634
2635
|
width: "16"
|
|
2635
2636
|
})
|
|
@@ -2638,36 +2639,36 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2638
2639
|
])
|
|
2639
2640
|
])
|
|
2640
2641
|
]),
|
|
2641
|
-
(i(),
|
|
2642
|
+
(i(), me(Lt, { to: "body" }, [
|
|
2642
2643
|
c.value ? (i(), d("div", {
|
|
2643
2644
|
key: 0,
|
|
2644
2645
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2645
2646
|
style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: f.value.top + "px", left: f.value.left + "px" }])
|
|
2646
2647
|
}, [
|
|
2647
|
-
l("div",
|
|
2648
|
-
l("div",
|
|
2648
|
+
l("div", ns, [
|
|
2649
|
+
l("div", as, [
|
|
2649
2650
|
l("button", {
|
|
2650
2651
|
onClick: R,
|
|
2651
2652
|
class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2652
2653
|
}, [
|
|
2653
|
-
A(
|
|
2654
|
+
A(Aa, {
|
|
2654
2655
|
class: "text-black",
|
|
2655
2656
|
width: "14",
|
|
2656
2657
|
height: "14"
|
|
2657
2658
|
}),
|
|
2658
|
-
j[4] || (j[4] =
|
|
2659
|
+
j[4] || (j[4] = ge(" Імпортувати ", -1))
|
|
2659
2660
|
]),
|
|
2660
2661
|
l("button", {
|
|
2661
2662
|
onClick: H,
|
|
2662
2663
|
class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2663
2664
|
}, [
|
|
2664
|
-
l("span",
|
|
2665
|
-
A(
|
|
2665
|
+
l("span", ss, [
|
|
2666
|
+
A(Da, {
|
|
2666
2667
|
class: "text-black",
|
|
2667
2668
|
width: "14",
|
|
2668
2669
|
height: "14"
|
|
2669
2670
|
}),
|
|
2670
|
-
j[5] || (j[5] =
|
|
2671
|
+
j[5] || (j[5] = ge(" Експортувати ", -1))
|
|
2671
2672
|
])
|
|
2672
2673
|
])
|
|
2673
2674
|
])
|
|
@@ -2679,15 +2680,15 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2679
2680
|
class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2680
2681
|
}, [
|
|
2681
2682
|
A(qe),
|
|
2682
|
-
j[6] || (j[6] =
|
|
2683
|
+
j[6] || (j[6] = ge(" Додати ", -1))
|
|
2683
2684
|
])
|
|
2684
2685
|
]),
|
|
2685
|
-
l("div",
|
|
2686
|
-
l("table",
|
|
2687
|
-
l("thead",
|
|
2688
|
-
l("tr",
|
|
2689
|
-
l("th",
|
|
2690
|
-
A(
|
|
2686
|
+
l("div", rs, [
|
|
2687
|
+
l("table", is, [
|
|
2688
|
+
l("thead", us, [
|
|
2689
|
+
l("tr", ds, [
|
|
2690
|
+
l("th", cs, [
|
|
2691
|
+
A(_t, {
|
|
2691
2692
|
width: "24",
|
|
2692
2693
|
height: "24",
|
|
2693
2694
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
@@ -2696,17 +2697,17 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2696
2697
|
(i(!0), d(re, null, fe(z.colModel, (C) => (i(), d("th", {
|
|
2697
2698
|
key: C.key,
|
|
2698
2699
|
class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
|
|
2699
|
-
},
|
|
2700
|
+
}, G(C.ua || C.label), 1))), 128)),
|
|
2700
2701
|
j[7] || (j[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
|
|
2701
2702
|
])
|
|
2702
2703
|
]),
|
|
2703
2704
|
l("tbody", {
|
|
2704
2705
|
class: E({ "[&_tr:last-child]:border-0": !u.value })
|
|
2705
2706
|
}, [
|
|
2706
|
-
s.value.length === 0 ? (i(), d("td",
|
|
2707
|
-
l("div",
|
|
2708
|
-
l("div",
|
|
2709
|
-
A(
|
|
2707
|
+
s.value.length === 0 ? (i(), d("td", ps, [
|
|
2708
|
+
l("div", fs, [
|
|
2709
|
+
l("div", ms, [
|
|
2710
|
+
A(Wa, { class: "w-48 mx-auto" }),
|
|
2710
2711
|
j[8] || (j[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
2711
2712
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
2712
2713
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
@@ -2714,20 +2715,20 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2714
2715
|
])
|
|
2715
2716
|
])
|
|
2716
2717
|
])) : D("", !0),
|
|
2717
|
-
(i(!0), d(re, null, fe(s.value, (C,
|
|
2718
|
+
(i(!0), d(re, null, fe(s.value, (C, W) => (i(), d("tr", {
|
|
2718
2719
|
key: C.id,
|
|
2719
2720
|
class: E(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
2720
|
-
"opacity-50": r.value ===
|
|
2721
|
-
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value ===
|
|
2721
|
+
"opacity-50": r.value === W,
|
|
2722
|
+
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value === W
|
|
2722
2723
|
}]),
|
|
2723
2724
|
draggable: "true",
|
|
2724
|
-
onDragstart: (oe) => m(
|
|
2725
|
-
onDragover: ke((oe) => y(
|
|
2726
|
-
onDrop: (oe) => S(
|
|
2725
|
+
onDragstart: (oe) => m(W),
|
|
2726
|
+
onDragover: ke((oe) => y(W), ["prevent"]),
|
|
2727
|
+
onDrop: (oe) => S(W)
|
|
2727
2728
|
}, [
|
|
2728
|
-
l("td",
|
|
2729
|
-
l("div",
|
|
2730
|
-
A(
|
|
2729
|
+
l("td", hs, [
|
|
2730
|
+
l("div", gs, [
|
|
2731
|
+
A(_t, {
|
|
2731
2732
|
width: "24",
|
|
2732
2733
|
height: "24",
|
|
2733
2734
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
@@ -2738,37 +2739,37 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2738
2739
|
key: oe.key,
|
|
2739
2740
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2740
2741
|
}, [
|
|
2741
|
-
oe.type === "file" ? (i(), d("div",
|
|
2742
|
-
K(J(C, oe)) ? (i(), d("div",
|
|
2742
|
+
oe.type === "file" ? (i(), d("div", bs, [
|
|
2743
|
+
K(J(C, oe)) ? (i(), d("div", ys, [
|
|
2743
2744
|
l("img", {
|
|
2744
2745
|
src: J(C, oe),
|
|
2745
2746
|
alt: "alt",
|
|
2746
2747
|
width: "45",
|
|
2747
2748
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
2748
|
-
}, null, 8,
|
|
2749
|
-
])) : (i(), d("div",
|
|
2750
|
-
A(
|
|
2749
|
+
}, null, 8, xs)
|
|
2750
|
+
])) : (i(), d("div", ws, [
|
|
2751
|
+
A(Et, { class: "w-[25px] min-w-[25px] h-[25px]" })
|
|
2751
2752
|
]))
|
|
2752
2753
|
])) : oe.type === "tiptap-editor" ? (i(), d("div", {
|
|
2753
2754
|
key: 1,
|
|
2754
2755
|
class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",
|
|
2755
2756
|
innerHTML: J(C, oe)
|
|
2756
|
-
}, null, 8,
|
|
2757
|
+
}, null, 8, ks)) : (i(), d("div", _s, G(J(C, oe)), 1))
|
|
2757
2758
|
]))), 128)),
|
|
2758
|
-
l("td",
|
|
2759
|
-
l("div",
|
|
2759
|
+
l("td", $s, [
|
|
2760
|
+
l("div", Cs, [
|
|
2760
2761
|
l("button", {
|
|
2761
|
-
onClick: (oe) => M(C,
|
|
2762
|
+
onClick: (oe) => M(C, W),
|
|
2762
2763
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2763
2764
|
}, [
|
|
2764
|
-
A(
|
|
2765
|
+
A(Ja, {
|
|
2765
2766
|
width: "24",
|
|
2766
2767
|
height: "24",
|
|
2767
2768
|
class: "w-3 h-3"
|
|
2768
2769
|
})
|
|
2769
|
-
], 8,
|
|
2770
|
+
], 8, Vs),
|
|
2770
2771
|
l("button", {
|
|
2771
|
-
onClick: (oe) => N(
|
|
2772
|
+
onClick: (oe) => N(W),
|
|
2772
2773
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2773
2774
|
}, [
|
|
2774
2775
|
A(et, {
|
|
@@ -2776,14 +2777,14 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2776
2777
|
height: "24",
|
|
2777
2778
|
class: "w-3 h-3"
|
|
2778
2779
|
})
|
|
2779
|
-
], 8,
|
|
2780
|
+
], 8, Ms)
|
|
2780
2781
|
])
|
|
2781
2782
|
])
|
|
2782
|
-
], 42,
|
|
2783
|
+
], 42, vs))), 128))
|
|
2783
2784
|
], 2)
|
|
2784
2785
|
])
|
|
2785
2786
|
]),
|
|
2786
|
-
A(ee(
|
|
2787
|
+
A(ee(St), {
|
|
2787
2788
|
visible: v.value,
|
|
2788
2789
|
title: I.value,
|
|
2789
2790
|
size: "lg",
|
|
@@ -2797,7 +2798,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2797
2798
|
form: F.value,
|
|
2798
2799
|
"onUpdate:form": j[2] || (j[2] = (C) => F.value = C)
|
|
2799
2800
|
}, null, 8, ["schema", "values", "form"]),
|
|
2800
|
-
l("div",
|
|
2801
|
+
l("div", Ls, [
|
|
2801
2802
|
l("button", {
|
|
2802
2803
|
type: "button",
|
|
2803
2804
|
onClick: j[3] || (j[3] = (C) => v.value = !1),
|
|
@@ -2814,7 +2815,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
|
|
|
2814
2815
|
}, 8, ["visible", "title"])
|
|
2815
2816
|
]));
|
|
2816
2817
|
}
|
|
2817
|
-
}),
|
|
2818
|
+
}), Bs = {
|
|
2818
2819
|
draw: {
|
|
2819
2820
|
toolbar: {
|
|
2820
2821
|
actions: {
|
|
@@ -2934,7 +2935,7 @@ function Ne(o) {
|
|
|
2934
2935
|
features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
|
|
2935
2936
|
} : o : null;
|
|
2936
2937
|
}
|
|
2937
|
-
function
|
|
2938
|
+
function js(o) {
|
|
2938
2939
|
return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
|
|
2939
2940
|
type: "Feature",
|
|
2940
2941
|
geometry: Ne({
|
|
@@ -2948,7 +2949,7 @@ function Bs(o) {
|
|
|
2948
2949
|
properties: {}
|
|
2949
2950
|
} : null : null;
|
|
2950
2951
|
}
|
|
2951
|
-
const
|
|
2952
|
+
const Es = {}, Is = {
|
|
2952
2953
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2953
2954
|
viewBox: "0 0 24 24",
|
|
2954
2955
|
stroke: "currentColor",
|
|
@@ -2958,8 +2959,8 @@ const js = {}, Es = {
|
|
|
2958
2959
|
"stroke-linejoin": "round",
|
|
2959
2960
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
2960
2961
|
};
|
|
2961
|
-
function
|
|
2962
|
-
return i(), d("svg",
|
|
2962
|
+
function zs(o, e) {
|
|
2963
|
+
return i(), d("svg", Is, e[0] || (e[0] = [
|
|
2963
2964
|
l("path", {
|
|
2964
2965
|
stroke: "none",
|
|
2965
2966
|
d: "M0 0h24v24H0z",
|
|
@@ -2969,7 +2970,7 @@ function Is(o, e) {
|
|
|
2969
2970
|
l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
|
|
2970
2971
|
]));
|
|
2971
2972
|
}
|
|
2972
|
-
const
|
|
2973
|
+
const As = /* @__PURE__ */ X(Es, [["render", zs]]), Ts = {}, Fs = {
|
|
2973
2974
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2974
2975
|
viewBox: "0 0 24 24",
|
|
2975
2976
|
fill: "none",
|
|
@@ -2979,8 +2980,8 @@ const zs = /* @__PURE__ */ X(js, [["render", Is]]), As = {}, Ts = {
|
|
|
2979
2980
|
"stroke-linejoin": "round",
|
|
2980
2981
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
2981
2982
|
};
|
|
2982
|
-
function
|
|
2983
|
-
return i(), d("svg",
|
|
2983
|
+
function Os(o, e) {
|
|
2984
|
+
return i(), d("svg", Fs, e[0] || (e[0] = [
|
|
2984
2985
|
l("path", {
|
|
2985
2986
|
stroke: "none",
|
|
2986
2987
|
d: "M0 0h24v24H0z",
|
|
@@ -2991,7 +2992,7 @@ function Fs(o, e) {
|
|
|
2991
2992
|
l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
2992
2993
|
]));
|
|
2993
2994
|
}
|
|
2994
|
-
const
|
|
2995
|
+
const Ds = /* @__PURE__ */ X(Ts, [["render", Os]]), Us = {}, Ps = {
|
|
2995
2996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2996
2997
|
viewBox: "0 0 24 24",
|
|
2997
2998
|
fill: "none",
|
|
@@ -3001,12 +3002,12 @@ const Os = /* @__PURE__ */ X(As, [["render", Fs]]), Ds = {}, Us = {
|
|
|
3001
3002
|
"stroke-linejoin": "round",
|
|
3002
3003
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
3003
3004
|
};
|
|
3004
|
-
function
|
|
3005
|
-
return i(), d("svg",
|
|
3005
|
+
function Rs(o, e) {
|
|
3006
|
+
return i(), d("svg", Ps, e[0] || (e[0] = [
|
|
3006
3007
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
|
|
3007
3008
|
]));
|
|
3008
3009
|
}
|
|
3009
|
-
const
|
|
3010
|
+
const Hs = /* @__PURE__ */ X(Us, [["render", Rs]]), Ns = {}, qs = {
|
|
3010
3011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3011
3012
|
viewBox: "0 0 24 24",
|
|
3012
3013
|
fill: "none",
|
|
@@ -3016,12 +3017,12 @@ const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
|
|
|
3016
3017
|
"stroke-linejoin": "round",
|
|
3017
3018
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
3018
3019
|
};
|
|
3019
|
-
function
|
|
3020
|
-
return i(), d("svg",
|
|
3020
|
+
function Ws(o, e) {
|
|
3021
|
+
return i(), d("svg", qs, e[0] || (e[0] = [
|
|
3021
3022
|
ye('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
|
|
3022
3023
|
]));
|
|
3023
3024
|
}
|
|
3024
|
-
const
|
|
3025
|
+
const Gs = /* @__PURE__ */ X(Ns, [["render", Ws]]), Zs = {}, Ks = {
|
|
3025
3026
|
version: "1.1",
|
|
3026
3027
|
viewBox: "0 0 14 14",
|
|
3027
3028
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3029,8 +3030,8 @@ const Ws = /* @__PURE__ */ X(Hs, [["render", qs]]), Gs = {}, Zs = {
|
|
|
3029
3030
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3030
3031
|
class: "fullscreen-icon"
|
|
3031
3032
|
};
|
|
3032
|
-
function
|
|
3033
|
-
return i(), d("svg",
|
|
3033
|
+
function Js(o, e) {
|
|
3034
|
+
return i(), d("svg", Ks, e[0] || (e[0] = [
|
|
3034
3035
|
l("title", null, null, -1),
|
|
3035
3036
|
l("desc", null, null, -1),
|
|
3036
3037
|
l("defs", null, null, -1),
|
|
@@ -3059,10 +3060,10 @@ function Ks(o, e) {
|
|
|
3059
3060
|
], -1)
|
|
3060
3061
|
]));
|
|
3061
3062
|
}
|
|
3062
|
-
const
|
|
3063
|
+
const Ys = /* @__PURE__ */ X(Zs, [["render", Js]]), Xs = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, Qs = {
|
|
3063
3064
|
key: 0,
|
|
3064
3065
|
class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
|
|
3065
|
-
},
|
|
3066
|
+
}, er = ["onClick"], tr = { class: "relative flex-1 min-w-[140px]" }, lr = ["placeholder"], or = "https://data.softpro.ua/api-user/gis-url-proxy", nr = "https://geo.rv.ua/api-user/dzk.api", ar = /* @__PURE__ */ U({
|
|
3066
3067
|
__name: "map-search",
|
|
3067
3068
|
props: {
|
|
3068
3069
|
config: {}
|
|
@@ -3072,11 +3073,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3072
3073
|
const t = o, a = e, n = ["here", "xy", "parcel"], s = B(() => {
|
|
3073
3074
|
const v = t.config?.tools?.filter((x) => n.includes(x));
|
|
3074
3075
|
return v && v.length ? v : n;
|
|
3075
|
-
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u =
|
|
3076
|
+
}), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u = w(s.value[0] ?? n[0]);
|
|
3076
3077
|
ue(s, (v) => {
|
|
3077
3078
|
v.includes(u.value) || (u.value = v[0]);
|
|
3078
3079
|
});
|
|
3079
|
-
const c =
|
|
3080
|
+
const c = w(""), p = w(!1), f = w(null);
|
|
3080
3081
|
ue(u, () => {
|
|
3081
3082
|
c.value = "", p.value = !1;
|
|
3082
3083
|
});
|
|
@@ -3096,7 +3097,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3096
3097
|
function S(v) {
|
|
3097
3098
|
return v === "xy" ? "Координати" : v === "parcel" ? "Кадастр" : "Адреси";
|
|
3098
3099
|
}
|
|
3099
|
-
function
|
|
3100
|
+
function q(v) {
|
|
3100
3101
|
const x = v.replace(/[,]+/g, " ").trim();
|
|
3101
3102
|
if (!x) return null;
|
|
3102
3103
|
const V = x.split(/\s+/).filter(Boolean);
|
|
@@ -3148,7 +3149,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3148
3149
|
const v = c.value.trim();
|
|
3149
3150
|
if (v) {
|
|
3150
3151
|
if (u.value === "xy") {
|
|
3151
|
-
const x =
|
|
3152
|
+
const x = q(v);
|
|
3152
3153
|
if (!x) {
|
|
3153
3154
|
ce({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
|
|
3154
3155
|
return;
|
|
@@ -3157,7 +3158,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3157
3158
|
return;
|
|
3158
3159
|
}
|
|
3159
3160
|
try {
|
|
3160
|
-
const x = new URL(u.value === "here" ?
|
|
3161
|
+
const x = new URL(u.value === "here" ? or : nr);
|
|
3161
3162
|
if (u.value === "here")
|
|
3162
3163
|
x.searchParams.set("searchtext", v);
|
|
3163
3164
|
else {
|
|
@@ -3182,7 +3183,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3182
3183
|
}
|
|
3183
3184
|
}
|
|
3184
3185
|
}
|
|
3185
|
-
return (v, x) => (i(), d("div",
|
|
3186
|
+
return (v, x) => (i(), d("div", Xs, [
|
|
3186
3187
|
l("form", {
|
|
3187
3188
|
class: "flex gap-2",
|
|
3188
3189
|
onSubmit: ke(I, ["prevent"])
|
|
@@ -3198,7 +3199,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3198
3199
|
class: "vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",
|
|
3199
3200
|
onClick: x[0] || (x[0] = (V) => p.value = !p.value)
|
|
3200
3201
|
}, [
|
|
3201
|
-
l("span", null,
|
|
3202
|
+
l("span", null, G(S(u.value)), 1),
|
|
3202
3203
|
(i(), d("svg", {
|
|
3203
3204
|
class: E(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": p.value }]),
|
|
3204
3205
|
viewBox: "0 0 24 24",
|
|
@@ -3214,25 +3215,25 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3214
3215
|
}, null, -1)
|
|
3215
3216
|
]), 2))
|
|
3216
3217
|
]),
|
|
3217
|
-
p.value ? (i(), d("div",
|
|
3218
|
+
p.value ? (i(), d("div", Qs, [
|
|
3218
3219
|
l("ul", null, [
|
|
3219
3220
|
(i(!0), d(re, null, fe(s.value, (V) => (i(), d("li", {
|
|
3220
3221
|
key: V,
|
|
3221
3222
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
3222
3223
|
onClick: ($) => m(V)
|
|
3223
|
-
},
|
|
3224
|
+
}, G(S(V)), 9, er))), 128))
|
|
3224
3225
|
])
|
|
3225
3226
|
])) : D("", !0)
|
|
3226
3227
|
], 512)) : D("", !0),
|
|
3227
|
-
l("div",
|
|
3228
|
+
l("div", tr, [
|
|
3228
3229
|
ae(l("input", {
|
|
3229
3230
|
"onUpdate:modelValue": x[1] || (x[1] = (V) => c.value = V),
|
|
3230
3231
|
placeholder: r.value,
|
|
3231
3232
|
type: "text",
|
|
3232
3233
|
class: "vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"
|
|
3233
|
-
}, null, 8,
|
|
3234
|
+
}, null, 8, lr), [
|
|
3234
3235
|
[
|
|
3235
|
-
|
|
3236
|
+
ve,
|
|
3236
3237
|
c.value,
|
|
3237
3238
|
void 0,
|
|
3238
3239
|
{ trim: !0 }
|
|
@@ -3262,19 +3263,19 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3262
3263
|
], 32)
|
|
3263
3264
|
]));
|
|
3264
3265
|
}
|
|
3265
|
-
}),
|
|
3266
|
+
}), sr = /* @__PURE__ */ X(ar, [["__scopeId", "data-v-3048520a"]]), rr = { class: "bg-white/30 p-1 rounded-md shadow" }, ir = { class: "flex gap-2" }, ur = ["onClick", "title"], dr = ["src"], cr = /* @__PURE__ */ U({
|
|
3266
3267
|
__name: "map-layers",
|
|
3267
3268
|
props: {
|
|
3268
3269
|
basemaps: {}
|
|
3269
3270
|
},
|
|
3270
3271
|
emits: ["onLayerChange"],
|
|
3271
3272
|
setup(o, { emit: e }) {
|
|
3272
|
-
const a =
|
|
3273
|
+
const a = w(Object.keys(o.basemaps)[0]), n = e;
|
|
3273
3274
|
function s(r) {
|
|
3274
3275
|
n("onLayerChange", r), a.value = r;
|
|
3275
3276
|
}
|
|
3276
|
-
return (r, u) => (i(), d("div",
|
|
3277
|
-
l("div",
|
|
3277
|
+
return (r, u) => (i(), d("div", rr, [
|
|
3278
|
+
l("div", ir, [
|
|
3278
3279
|
(i(!0), d(re, null, fe(r.basemaps, (c, p) => (i(), d("div", {
|
|
3279
3280
|
key: p,
|
|
3280
3281
|
class: E(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === p }]),
|
|
@@ -3287,24 +3288,24 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3287
3288
|
src: c.preview,
|
|
3288
3289
|
alt: "",
|
|
3289
3290
|
class: "w-10 h-10 object-cover"
|
|
3290
|
-
}, null, 8,
|
|
3291
|
-
], 10,
|
|
3291
|
+
}, null, 8, dr)
|
|
3292
|
+
], 10, ur))), 128))
|
|
3292
3293
|
])
|
|
3293
3294
|
]));
|
|
3294
3295
|
}
|
|
3295
|
-
}),
|
|
3296
|
+
}), pr = {
|
|
3296
3297
|
key: 0,
|
|
3297
3298
|
class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
|
|
3298
|
-
},
|
|
3299
|
+
}, fr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, mr = { class: "text-sm font-medium" }, vr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, hr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, gr = { class: "flex items-center gap-1" }, br = ["disabled"], yr = { class: "absolute top-4 right-4 z-[1000]" }, xr = { class: "flex flex-col gap-[2px]" }, wr = ["aria-pressed"], kr = ["aria-pressed"], _r = ["aria-pressed"], $r = ["aria-pressed"], Cr = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Vr = {
|
|
3299
3300
|
key: 0,
|
|
3300
3301
|
class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
|
|
3301
|
-
},
|
|
3302
|
+
}, Mr = { class: "mr-auto" }, Lr = { class: "font-bold" }, Sr = { class: "flex items-center" }, Br = { class: "text-xs mr-2" }, jr = {
|
|
3302
3303
|
key: 0,
|
|
3303
3304
|
class: "text-xs"
|
|
3304
|
-
},
|
|
3305
|
+
}, Er = {
|
|
3305
3306
|
key: 1,
|
|
3306
3307
|
class: "text-xs"
|
|
3307
|
-
},
|
|
3308
|
+
}, Ir = /* @__PURE__ */ U({
|
|
3308
3309
|
__name: "vs-input-map",
|
|
3309
3310
|
props: {
|
|
3310
3311
|
tools: {},
|
|
@@ -3319,22 +3320,22 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3319
3320
|
},
|
|
3320
3321
|
emits: ["update:modelValue"],
|
|
3321
3322
|
setup(o, { emit: e }) {
|
|
3322
|
-
const t =
|
|
3323
|
+
const t = Gt(), a = o, n = e, s = w(!1), r = w("");
|
|
3323
3324
|
function u() {
|
|
3324
3325
|
const g = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
3325
3326
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
|
|
3326
3327
|
}
|
|
3327
|
-
const c =
|
|
3328
|
+
const c = w(null);
|
|
3328
3329
|
let p, f, m, y = null;
|
|
3329
|
-
const S =
|
|
3330
|
+
const S = w(null), q = (g) => {
|
|
3330
3331
|
g.ctrlKey && g.preventDefault();
|
|
3331
3332
|
};
|
|
3332
3333
|
function R() {
|
|
3333
3334
|
if (!a.handleZoom) return null;
|
|
3334
3335
|
let g;
|
|
3335
3336
|
const _ = (O) => {
|
|
3336
|
-
const Q = O.ctrlKey || O.metaKey,
|
|
3337
|
-
if (!Q && !
|
|
3337
|
+
const Q = O.ctrlKey || O.metaKey, he = O.shiftKey;
|
|
3338
|
+
if (!Q && !he) {
|
|
3338
3339
|
s.value = !0, r.value = u(), clearTimeout(g), g = window.setTimeout(() => {
|
|
3339
3340
|
s.value = !1;
|
|
3340
3341
|
}, 1e3);
|
|
@@ -3353,15 +3354,15 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3353
3354
|
s.value = !1;
|
|
3354
3355
|
};
|
|
3355
3356
|
return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (O) => {
|
|
3356
|
-
const Q = O.originalEvent.ctrlKey || O.originalEvent.metaKey,
|
|
3357
|
-
!Q && !
|
|
3357
|
+
const Q = O.originalEvent.ctrlKey || O.originalEvent.metaKey, he = O.originalEvent.shiftKey;
|
|
3358
|
+
!Q && !he && (O.originalEvent.preventDefault(), O.originalEvent.stopPropagation());
|
|
3358
3359
|
}), () => {
|
|
3359
3360
|
c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(g);
|
|
3360
3361
|
};
|
|
3361
3362
|
}
|
|
3362
|
-
const K =
|
|
3363
|
+
const K = w(null), T = w(6), H = w(0), I = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = w(null), x = De();
|
|
3363
3364
|
let V;
|
|
3364
|
-
const $ =
|
|
3365
|
+
const $ = w("topo100");
|
|
3365
3366
|
function F(g) {
|
|
3366
3367
|
return g ? g.type === "Polygon" ? {
|
|
3367
3368
|
type: "MultiPolygon",
|
|
@@ -3375,14 +3376,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3375
3376
|
if (Array.from(document.styleSheets).some((Be) => Be?.href?.includes(Q))) return;
|
|
3376
3377
|
const Ve = document.createElement("link");
|
|
3377
3378
|
Ve.rel = "stylesheet", Ve.href = Q, document.head.appendChild(Ve);
|
|
3378
|
-
}, O = (Q) => new Promise((
|
|
3379
|
+
}, O = (Q) => new Promise((he, Ve) => {
|
|
3379
3380
|
const Be = Array.from(document.scripts).find((Ie) => Ie.src === Q);
|
|
3380
3381
|
if (Be) {
|
|
3381
|
-
Be.addEventListener("load", () =>
|
|
3382
|
+
Be.addEventListener("load", () => he()), Be.addEventListener("error", (Ie) => Ve(Ie));
|
|
3382
3383
|
return;
|
|
3383
3384
|
}
|
|
3384
3385
|
const Me = document.createElement("script");
|
|
3385
|
-
Me.src = Q, Me.async = !0, Me.onload = () =>
|
|
3386
|
+
Me.src = Q, Me.async = !0, Me.onload = () => he(), Me.onerror = (Ie) => Ve(Ie), document.body.appendChild(Me);
|
|
3386
3387
|
});
|
|
3387
3388
|
Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), O("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => O("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => g(0)).catch(_);
|
|
3388
3389
|
});
|
|
@@ -3415,7 +3416,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3415
3416
|
function Z() {
|
|
3416
3417
|
S.value?.click();
|
|
3417
3418
|
}
|
|
3418
|
-
const N =
|
|
3419
|
+
const N = w("");
|
|
3419
3420
|
function le(g) {
|
|
3420
3421
|
return g instanceof L.Circle ? "Circle" : g instanceof L.Rectangle ? "Rectangle" : g instanceof L.Polygon && !(g instanceof L.Rectangle) ? "Polygon" : g instanceof L.Polyline && !(g instanceof L.Polygon) ? "Polyline" : g instanceof L.Marker ? "Point" : "Feature";
|
|
3421
3422
|
}
|
|
@@ -3450,7 +3451,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3450
3451
|
layer: _
|
|
3451
3452
|
}, H.value = g.length;
|
|
3452
3453
|
}
|
|
3453
|
-
function
|
|
3454
|
+
function W() {
|
|
3454
3455
|
const g = v.value?.layer;
|
|
3455
3456
|
g && (g instanceof L.Circle && g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getLatLng && p.setView(g.getLatLng(), Math.max(T.value, 14)));
|
|
3456
3457
|
}
|
|
@@ -3459,7 +3460,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3459
3460
|
g && (f.removeLayer(g), J(), C());
|
|
3460
3461
|
}
|
|
3461
3462
|
_e(async () => {
|
|
3462
|
-
document.addEventListener("wheel",
|
|
3463
|
+
document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal = Bs;
|
|
3463
3464
|
const g = a.handleZoom;
|
|
3464
3465
|
p = L.map(c.value, {
|
|
3465
3466
|
zoomControl: !1,
|
|
@@ -3480,13 +3481,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3480
3481
|
}), p.on("zoomend", () => {
|
|
3481
3482
|
T.value = p.getZoom();
|
|
3482
3483
|
});
|
|
3483
|
-
const Y =
|
|
3484
|
+
const Y = js(a.modelValue);
|
|
3484
3485
|
if (Y) {
|
|
3485
3486
|
const O = [];
|
|
3486
3487
|
L.geoJSON(Y).eachLayer((Q) => O.push(Q)), O.length && f.addLayer(O[0]), J(), C(), M();
|
|
3487
3488
|
}
|
|
3488
3489
|
}), Xe(() => {
|
|
3489
|
-
document.removeEventListener("wheel",
|
|
3490
|
+
document.removeEventListener("wheel", q), y && y();
|
|
3490
3491
|
});
|
|
3491
3492
|
function se(g) {
|
|
3492
3493
|
if (p) {
|
|
@@ -3522,8 +3523,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3522
3523
|
if (typeof O.result == "string")
|
|
3523
3524
|
try {
|
|
3524
3525
|
const Q = JSON.parse(O.result);
|
|
3525
|
-
f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((
|
|
3526
|
-
f.addLayer(
|
|
3526
|
+
f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((he) => {
|
|
3527
|
+
f.addLayer(he);
|
|
3527
3528
|
}), J(), C(), M();
|
|
3528
3529
|
} finally {
|
|
3529
3530
|
_.value = "";
|
|
@@ -3547,8 +3548,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3547
3548
|
}
|
|
3548
3549
|
f.clearLayers(), _ && L.geoJSON({ type: "Feature", geometry: _ }).eachLayer((Y) => {
|
|
3549
3550
|
f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (O) => {
|
|
3550
|
-
const
|
|
3551
|
-
n("update:modelValue", { type: "Point", coordinates: [
|
|
3551
|
+
const he = O.target.getLatLng();
|
|
3552
|
+
n("update:modelValue", { type: "Point", coordinates: [he.lng, he.lat] });
|
|
3552
3553
|
});
|
|
3553
3554
|
}), H.value = f.getLayers().length, C(), M();
|
|
3554
3555
|
}
|
|
@@ -3569,7 +3570,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3569
3570
|
}
|
|
3570
3571
|
};
|
|
3571
3572
|
}
|
|
3572
|
-
const Ce =
|
|
3573
|
+
const Ce = w(!1);
|
|
3573
3574
|
return ue(Ce, () => {
|
|
3574
3575
|
setTimeout(() => {
|
|
3575
3576
|
p.invalidateSize();
|
|
@@ -3592,18 +3593,18 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3592
3593
|
"leave-to-class": "opacity-0"
|
|
3593
3594
|
}, {
|
|
3594
3595
|
default: Ee(() => [
|
|
3595
|
-
s.value && a.handleZoom ? (i(), d("div",
|
|
3596
|
-
l("div",
|
|
3597
|
-
l("p",
|
|
3596
|
+
s.value && a.handleZoom ? (i(), d("div", pr, [
|
|
3597
|
+
l("div", fr, [
|
|
3598
|
+
l("p", mr, G(r.value), 1)
|
|
3598
3599
|
])
|
|
3599
3600
|
])) : D("", !0)
|
|
3600
3601
|
]),
|
|
3601
3602
|
_: 1
|
|
3602
3603
|
}),
|
|
3603
|
-
l("div",
|
|
3604
|
-
A(
|
|
3605
|
-
l("div",
|
|
3606
|
-
l("div",
|
|
3604
|
+
l("div", vr, [
|
|
3605
|
+
A(sr, { onGoToCoordinates: tt }),
|
|
3606
|
+
l("div", hr, [
|
|
3607
|
+
l("div", gr, [
|
|
3607
3608
|
l("button", {
|
|
3608
3609
|
type: "button",
|
|
3609
3610
|
class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition",
|
|
@@ -3614,7 +3615,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3614
3615
|
class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-400",
|
|
3615
3616
|
onClick: Le,
|
|
3616
3617
|
disabled: H.value === 0
|
|
3617
|
-
}, "Export", 8,
|
|
3618
|
+
}, "Export", 8, br)
|
|
3618
3619
|
]),
|
|
3619
3620
|
l("input", {
|
|
3620
3621
|
ref_key: "importRef",
|
|
@@ -3626,8 +3627,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3626
3627
|
}, null, 544)
|
|
3627
3628
|
])
|
|
3628
3629
|
]),
|
|
3629
|
-
l("div",
|
|
3630
|
-
l("div",
|
|
3630
|
+
l("div", yr, [
|
|
3631
|
+
l("div", xr, [
|
|
3631
3632
|
l("button", {
|
|
3632
3633
|
class: E(["vs-btn", { "vs-active": N.value === "marker" }]),
|
|
3633
3634
|
"aria-pressed": N.value === "marker",
|
|
@@ -3635,8 +3636,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3635
3636
|
"aria-label": "Draw point",
|
|
3636
3637
|
onClick: _[0] || (_[0] = (Y) => se("marker"))
|
|
3637
3638
|
}, [
|
|
3638
|
-
A(
|
|
3639
|
-
], 10,
|
|
3639
|
+
A(As)
|
|
3640
|
+
], 10, wr),
|
|
3640
3641
|
l("button", {
|
|
3641
3642
|
class: E(["vs-btn", { "vs-active": N.value === "polyline" }]),
|
|
3642
3643
|
"aria-pressed": N.value === "polyline",
|
|
@@ -3644,8 +3645,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3644
3645
|
"aria-label": "Draw polyline",
|
|
3645
3646
|
onClick: _[1] || (_[1] = (Y) => se("polyline"))
|
|
3646
3647
|
}, [
|
|
3647
|
-
A(
|
|
3648
|
-
], 10,
|
|
3648
|
+
A(Ds)
|
|
3649
|
+
], 10, kr),
|
|
3649
3650
|
l("button", {
|
|
3650
3651
|
class: E(["vs-btn", { "vs-active": N.value === "polygon" }]),
|
|
3651
3652
|
"aria-pressed": N.value === "polygon",
|
|
@@ -3653,8 +3654,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3653
3654
|
"aria-label": "Draw polygon",
|
|
3654
3655
|
onClick: _[2] || (_[2] = (Y) => se("polygon"))
|
|
3655
3656
|
}, [
|
|
3656
|
-
A(
|
|
3657
|
-
], 10,
|
|
3657
|
+
A(Hs)
|
|
3658
|
+
], 10, _r),
|
|
3658
3659
|
l("button", {
|
|
3659
3660
|
class: E(["vs-btn", { "vs-active": N.value === "rectangle" }]),
|
|
3660
3661
|
"aria-pressed": N.value === "rectangle",
|
|
@@ -3662,8 +3663,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3662
3663
|
"aria-label": "Draw rectangle",
|
|
3663
3664
|
onClick: _[3] || (_[3] = (Y) => se("rectangle"))
|
|
3664
3665
|
}, [
|
|
3665
|
-
A(
|
|
3666
|
-
], 10,
|
|
3666
|
+
A(Gs)
|
|
3667
|
+
], 10, $r),
|
|
3667
3668
|
l("button", {
|
|
3668
3669
|
class: "vs-btn mt-5",
|
|
3669
3670
|
onClick: _[4] || (_[4] = (Y) => {
|
|
@@ -3672,40 +3673,40 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3672
3673
|
title: "Full Screen",
|
|
3673
3674
|
"aria-label": "Full Screen"
|
|
3674
3675
|
}, [
|
|
3675
|
-
A(
|
|
3676
|
+
A(Ys, { style: { width: "12px", height: "12px" } })
|
|
3676
3677
|
])
|
|
3677
3678
|
])
|
|
3678
3679
|
]),
|
|
3679
3680
|
l("div", {
|
|
3680
3681
|
class: E(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
|
|
3681
3682
|
}, [
|
|
3682
|
-
A(
|
|
3683
|
+
A(cr, {
|
|
3683
3684
|
basemaps: ee(x),
|
|
3684
3685
|
onOnLayerChange: Ge
|
|
3685
3686
|
}, null, 8, ["basemaps"])
|
|
3686
3687
|
], 2),
|
|
3687
|
-
l("div",
|
|
3688
|
-
v.value ? (i(), d("div",
|
|
3689
|
-
l("div",
|
|
3690
|
-
_[7] || (_[7] =
|
|
3691
|
-
l("span",
|
|
3688
|
+
l("div", Cr, [
|
|
3689
|
+
v.value ? (i(), d("div", Vr, [
|
|
3690
|
+
l("div", Mr, [
|
|
3691
|
+
_[7] || (_[7] = ge(" Тип: ", -1)),
|
|
3692
|
+
l("span", Lr, G(v.value.type), 1)
|
|
3692
3693
|
]),
|
|
3693
|
-
l("div",
|
|
3694
|
-
l("div",
|
|
3695
|
-
_[8] || (_[8] =
|
|
3696
|
-
l("b", null,
|
|
3694
|
+
l("div", Sr, [
|
|
3695
|
+
l("div", Br, [
|
|
3696
|
+
_[8] || (_[8] = ge(" Центр: ", -1)),
|
|
3697
|
+
l("b", null, G(v.value.center.lat.toFixed(5)) + ", " + G(v.value.center.lng.toFixed(5)), 1)
|
|
3697
3698
|
]),
|
|
3698
|
-
v.value.areaKm2 !== null ? (i(), d("div",
|
|
3699
|
-
_[9] || (_[9] =
|
|
3700
|
-
l("b", null,
|
|
3701
|
-
])) : (i(), d("div",
|
|
3702
|
-
|
|
3699
|
+
v.value.areaKm2 !== null ? (i(), d("div", jr, [
|
|
3700
|
+
_[9] || (_[9] = ge(" Площа: ", -1)),
|
|
3701
|
+
l("b", null, G(v.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3702
|
+
])) : (i(), d("div", Er, _[10] || (_[10] = [
|
|
3703
|
+
ge(" Площа: ", -1),
|
|
3703
3704
|
l("b", null, "—", -1)
|
|
3704
3705
|
]))),
|
|
3705
3706
|
l("button", {
|
|
3706
3707
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3707
3708
|
title: "Наблизити",
|
|
3708
|
-
onClick: _[5] || (_[5] = (Y) =>
|
|
3709
|
+
onClick: _[5] || (_[5] = (Y) => W())
|
|
3709
3710
|
}, _[11] || (_[11] = [
|
|
3710
3711
|
ye('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-66e4a27d><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-66e4a27d></path><path d="M7 10l6 0" data-v-66e4a27d></path><path d="M10 7l0 6" data-v-66e4a27d></path><path d="M21 21l-6 -6" data-v-66e4a27d></path></svg>', 1)
|
|
3711
3712
|
])),
|
|
@@ -3721,10 +3722,10 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3721
3722
|
])
|
|
3722
3723
|
], 2));
|
|
3723
3724
|
}
|
|
3724
|
-
}),
|
|
3725
|
+
}), zr = /* @__PURE__ */ X(Ir, [["__scopeId", "data-v-66e4a27d"]]), Ar = ["data-focus"], Tr = { class: "flex items-center" }, Fr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Or = ["onClick", "aria-label"], Dr = {
|
|
3725
3726
|
key: 0,
|
|
3726
3727
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3727
|
-
},
|
|
3728
|
+
}, Ur = { class: "flex-1 min-w-[2px]" }, Pr = ["placeholder"], Rr = { class: "flex items-center shrink-0" }, Hr = ["disabled"], Nr = /* @__PURE__ */ U({
|
|
3728
3729
|
__name: "vs-input-tag",
|
|
3729
3730
|
props: /* @__PURE__ */ ie({
|
|
3730
3731
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3743,7 +3744,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3743
3744
|
setup(o, { emit: e }) {
|
|
3744
3745
|
const t = o, a = e;
|
|
3745
3746
|
$e(t.style);
|
|
3746
|
-
const n =
|
|
3747
|
+
const n = w(null), s = w(null), r = w(null), u = w(!1), c = w(""), p = de(o, "modelValue"), f = B(() => t.placeholder || "Add tag…"), m = B(() => p.value?.length === 0 && c.value === ""), y = B(() => !t.disabled && p.value?.length > 0), S = B(() => t.disabled), q = async () => {
|
|
3747
3748
|
S.value || await je(() => r.value?.focus());
|
|
3748
3749
|
}, R = (V) => {
|
|
3749
3750
|
const $ = V.trim();
|
|
@@ -3784,7 +3785,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3784
3785
|
S.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3785
3786
|
]),
|
|
3786
3787
|
"data-focus": u.value ? "true" : "false",
|
|
3787
|
-
onClick:
|
|
3788
|
+
onClick: q
|
|
3788
3789
|
}, [
|
|
3789
3790
|
l("div", {
|
|
3790
3791
|
class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
@@ -3795,8 +3796,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3795
3796
|
key: te,
|
|
3796
3797
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3797
3798
|
}, [
|
|
3798
|
-
l("div",
|
|
3799
|
-
l("div",
|
|
3799
|
+
l("div", Tr, [
|
|
3800
|
+
l("div", Fr, G(F), 1)
|
|
3800
3801
|
]),
|
|
3801
3802
|
l("div", {
|
|
3802
3803
|
role: "button",
|
|
@@ -3814,10 +3815,10 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3814
3815
|
}, [
|
|
3815
3816
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
3816
3817
|
], -1)
|
|
3817
|
-
]), 8,
|
|
3818
|
+
]), 8, Or)
|
|
3818
3819
|
]))), 128)),
|
|
3819
|
-
m.value ? (i(), d("div",
|
|
3820
|
-
l("div",
|
|
3820
|
+
m.value ? (i(), d("div", Dr, G(f.value), 1)) : D("", !0),
|
|
3821
|
+
l("div", Ur, [
|
|
3821
3822
|
S.value ? D("", !0) : ae((i(), d("input", {
|
|
3822
3823
|
key: 0,
|
|
3823
3824
|
ref_key: "inputRef",
|
|
@@ -3835,12 +3836,12 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3835
3836
|
onBlur: v,
|
|
3836
3837
|
onKeydown: x,
|
|
3837
3838
|
placeholder: p.value && p.value.length ? "" : void 0
|
|
3838
|
-
}, null, 40,
|
|
3839
|
-
[
|
|
3839
|
+
}, null, 40, Pr)), [
|
|
3840
|
+
[ve, c.value]
|
|
3840
3841
|
])
|
|
3841
3842
|
])
|
|
3842
3843
|
], 512),
|
|
3843
|
-
l("div",
|
|
3844
|
+
l("div", Rr, [
|
|
3844
3845
|
y.value ? (i(), d("button", {
|
|
3845
3846
|
key: 0,
|
|
3846
3847
|
type: "button",
|
|
@@ -3857,13 +3858,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3857
3858
|
}, [
|
|
3858
3859
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
3859
3860
|
], -1)
|
|
3860
|
-
]), 8,
|
|
3861
|
+
]), 8, Hr)) : D("", !0)
|
|
3861
3862
|
])
|
|
3862
|
-
], 10,
|
|
3863
|
+
], 10, Ar)
|
|
3863
3864
|
], 2)
|
|
3864
3865
|
], 512));
|
|
3865
3866
|
}
|
|
3866
|
-
}),
|
|
3867
|
+
}), qr = { class: "relative flex gap-1 bg-white w-full" }, Wr = ["disabled", "placeholder"], Gr = /* @__PURE__ */ U({
|
|
3867
3868
|
__name: "vs-input-slug",
|
|
3868
3869
|
props: /* @__PURE__ */ ie({
|
|
3869
3870
|
disabled: { type: Boolean },
|
|
@@ -3922,15 +3923,15 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3922
3923
|
const r = e?.value?.[t.parent || ""]?.toString(), u = n(r);
|
|
3923
3924
|
a.value = u.toString();
|
|
3924
3925
|
};
|
|
3925
|
-
return (r, u) => (i(), d("div",
|
|
3926
|
+
return (r, u) => (i(), d("div", qr, [
|
|
3926
3927
|
ae(l("input", {
|
|
3927
3928
|
ref: "vsText",
|
|
3928
3929
|
disabled: r.disabled,
|
|
3929
3930
|
placeholder: r.placeholder,
|
|
3930
3931
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
|
|
3931
3932
|
class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
3932
|
-
}, null, 8,
|
|
3933
|
-
[
|
|
3933
|
+
}, null, 8, Wr), [
|
|
3934
|
+
[ve, a.value]
|
|
3934
3935
|
]),
|
|
3935
3936
|
l("button", {
|
|
3936
3937
|
class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
|
|
@@ -3938,13 +3939,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3938
3939
|
}, " Gen ")
|
|
3939
3940
|
]));
|
|
3940
3941
|
}
|
|
3941
|
-
}),
|
|
3942
|
+
}), Zr = /* @__PURE__ */ X(Gr, [["__scopeId", "data-v-b0eba370"]]), Kr = { class: "w-full" }, Jr = {
|
|
3942
3943
|
ref: "sortableContainer",
|
|
3943
3944
|
class: "flex flex-col gap-1"
|
|
3944
|
-
},
|
|
3945
|
+
}, Yr = ["onDragstart", "onDrop"], Xr = { class: "w-1/3" }, Qr = { class: "w-2/3" }, ei = ["onClick"], ti = {
|
|
3945
3946
|
key: 0,
|
|
3946
3947
|
class: "text-[14px] text-gray-700"
|
|
3947
|
-
},
|
|
3948
|
+
}, li = { class: "mt-2 w-full flex items-center" }, oi = ["disabled"], ni = /* @__PURE__ */ U({
|
|
3948
3949
|
__name: "vs-input-key-value",
|
|
3949
3950
|
props: {
|
|
3950
3951
|
parent: {},
|
|
@@ -3954,7 +3955,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3954
3955
|
},
|
|
3955
3956
|
emits: ["update:modelValue"],
|
|
3956
3957
|
setup(o, { emit: e }) {
|
|
3957
|
-
const t = (K) => `${K}-${Math.random().toString(36).substring(2, 15)}`, a = Ae("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], c =
|
|
3958
|
+
const t = (K) => `${K}-${Math.random().toString(36).substring(2, 15)}`, a = Ae("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], c = w([]), p = w(null);
|
|
3958
3959
|
(() => {
|
|
3959
3960
|
const K = n.parent && a?.value?.[n.parent] || n.modelValue || {};
|
|
3960
3961
|
c.value = Object.entries(K).filter(([T]) => !u.includes(T)).map(([T, H]) => ({
|
|
@@ -3973,7 +3974,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3973
3974
|
}
|
|
3974
3975
|
const S = B(
|
|
3975
3976
|
() => c.value.some((K) => K.key && !K.value || !K.key && K.value)
|
|
3976
|
-
),
|
|
3977
|
+
), q = () => {
|
|
3977
3978
|
c.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
3978
3979
|
}, R = (K) => {
|
|
3979
3980
|
c.value = c.value.filter((T) => T.id !== K);
|
|
@@ -3994,8 +3995,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
3994
3995
|
}), s("update:modelValue", T);
|
|
3995
3996
|
},
|
|
3996
3997
|
{ deep: !0 }
|
|
3997
|
-
), (K, T) => (i(), d("div",
|
|
3998
|
-
l("div",
|
|
3998
|
+
), (K, T) => (i(), d("div", Kr, [
|
|
3999
|
+
l("div", Jr, [
|
|
3999
4000
|
(i(!0), d(re, null, fe(c.value, (H, I) => (i(), d("div", {
|
|
4000
4001
|
key: H.id,
|
|
4001
4002
|
class: E(["flex items-center gap-2 w-full", { "opacity-50": p.value === I }]),
|
|
@@ -4006,14 +4007,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4006
4007
|
onDrop: (v) => y(I)
|
|
4007
4008
|
}, [
|
|
4008
4009
|
T[1] || (T[1] = ye('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
|
|
4009
|
-
l("div",
|
|
4010
|
+
l("div", Xr, [
|
|
4010
4011
|
A(Ye, {
|
|
4011
4012
|
modelValue: H.key,
|
|
4012
4013
|
"onUpdate:modelValue": (v) => H.key = v,
|
|
4013
4014
|
placeholder: "Ключ"
|
|
4014
4015
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4015
4016
|
]),
|
|
4016
|
-
l("div",
|
|
4017
|
+
l("div", Qr, [
|
|
4017
4018
|
A(Ye, {
|
|
4018
4019
|
modelValue: H.value,
|
|
4019
4020
|
"onUpdate:modelValue": (v) => H.value = v,
|
|
@@ -4024,18 +4025,18 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4024
4025
|
onClick: (v) => R(H.id),
|
|
4025
4026
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
4026
4027
|
}, [
|
|
4027
|
-
A(ee(
|
|
4028
|
+
A(ee(Wl), {
|
|
4028
4029
|
height: "16",
|
|
4029
4030
|
width: "16"
|
|
4030
4031
|
})
|
|
4031
|
-
], 8,
|
|
4032
|
-
], 42,
|
|
4032
|
+
], 8, ei)
|
|
4033
|
+
], 42, Yr))), 128))
|
|
4033
4034
|
], 512),
|
|
4034
|
-
c.value.length ? D("", !0) : (i(), d("span",
|
|
4035
|
-
l("div",
|
|
4035
|
+
c.value.length ? D("", !0) : (i(), d("span", ti, " Дані для відображення відсутні ")),
|
|
4036
|
+
l("div", li, [
|
|
4036
4037
|
l("button", {
|
|
4037
4038
|
type: "button",
|
|
4038
|
-
onClick:
|
|
4039
|
+
onClick: q,
|
|
4039
4040
|
disabled: S.value,
|
|
4040
4041
|
class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
4041
4042
|
}, [
|
|
@@ -4043,12 +4044,12 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4043
4044
|
height: "14",
|
|
4044
4045
|
width: "14"
|
|
4045
4046
|
}),
|
|
4046
|
-
|
|
4047
|
-
], 8,
|
|
4047
|
+
ge(" " + G(ee(r)), 1)
|
|
4048
|
+
], 8, oi)
|
|
4048
4049
|
])
|
|
4049
4050
|
]));
|
|
4050
4051
|
}
|
|
4051
|
-
}),
|
|
4052
|
+
}), ai = /* @__PURE__ */ X(ni, [["__scopeId", "data-v-a0f7fbfc"]]), si = { class: "flex items-center gap-2 w-full" }, ri = ["disabled"], ii = /* @__PURE__ */ U({
|
|
4052
4053
|
__name: "vs-input-color",
|
|
4053
4054
|
props: {
|
|
4054
4055
|
style: { default: () => ({}) },
|
|
@@ -4065,7 +4066,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4065
4066
|
get: () => t.modelValue || "#000000",
|
|
4066
4067
|
set: (r) => n("update:modelValue", r)
|
|
4067
4068
|
});
|
|
4068
|
-
return (r, u) => (i(), d("div",
|
|
4069
|
+
return (r, u) => (i(), d("div", si, [
|
|
4069
4070
|
ae(l("input", {
|
|
4070
4071
|
type: "color",
|
|
4071
4072
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
|
|
@@ -4073,18 +4074,18 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4073
4074
|
ref: "color",
|
|
4074
4075
|
class: E(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")]),
|
|
4075
4076
|
style: { border: "1px solid #CFD9E0" }
|
|
4076
|
-
}, null, 10,
|
|
4077
|
-
[
|
|
4077
|
+
}, null, 10, ri), [
|
|
4078
|
+
[ve, s.value]
|
|
4078
4079
|
]),
|
|
4079
4080
|
ae(l("input", {
|
|
4080
4081
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
4081
4082
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4082
4083
|
}, null, 512), [
|
|
4083
|
-
[
|
|
4084
|
+
[ve, s.value]
|
|
4084
4085
|
])
|
|
4085
4086
|
]));
|
|
4086
4087
|
}
|
|
4087
|
-
}),
|
|
4088
|
+
}), ui = { class: "flex items-center gap-2 w-full" }, di = ["min", "max", "step", "disabled"], ci = /* @__PURE__ */ U({
|
|
4088
4089
|
__name: "vs-input-range",
|
|
4089
4090
|
props: {
|
|
4090
4091
|
style: { default: () => ({}) },
|
|
@@ -4104,7 +4105,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4104
4105
|
get: () => Number(t.modelValue ?? t.min),
|
|
4105
4106
|
set: (r) => n("update:modelValue", Number(r))
|
|
4106
4107
|
});
|
|
4107
|
-
return (r, u) => (i(), d("div",
|
|
4108
|
+
return (r, u) => (i(), d("div", ui, [
|
|
4108
4109
|
ae(l("input", {
|
|
4109
4110
|
type: "range",
|
|
4110
4111
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
|
|
@@ -4114,19 +4115,19 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4114
4115
|
disabled: r.disabled,
|
|
4115
4116
|
ref: "range",
|
|
4116
4117
|
class: E(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")])
|
|
4117
|
-
}, null, 10,
|
|
4118
|
-
[
|
|
4118
|
+
}, null, 10, di), [
|
|
4119
|
+
[ve, s.value]
|
|
4119
4120
|
]),
|
|
4120
4121
|
ae(l("input", {
|
|
4121
4122
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
4122
4123
|
type: "number",
|
|
4123
4124
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
|
|
4124
4125
|
}, null, 512), [
|
|
4125
|
-
[
|
|
4126
|
+
[ve, s.value]
|
|
4126
4127
|
])
|
|
4127
4128
|
]));
|
|
4128
4129
|
}
|
|
4129
|
-
}),
|
|
4130
|
+
}), pi = ["type", "value", "onInput", "placeholder", "disabled"], fi = /* @__PURE__ */ U({
|
|
4130
4131
|
__name: "vs-input-array",
|
|
4131
4132
|
props: /* @__PURE__ */ ie({
|
|
4132
4133
|
count: { default: 1 },
|
|
@@ -4146,7 +4147,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4146
4147
|
emits: ["update:modelValue"],
|
|
4147
4148
|
setup(o) {
|
|
4148
4149
|
const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
|
|
4149
|
-
|
|
4150
|
+
Zt(() => {
|
|
4150
4151
|
const s = a.value?.length ?? 0;
|
|
4151
4152
|
s < e.count && (a.value = [
|
|
4152
4153
|
...a.value ?? [],
|
|
@@ -4170,38 +4171,38 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4170
4171
|
style: {
|
|
4171
4172
|
border: "1px solid #CFD9E0"
|
|
4172
4173
|
}
|
|
4173
|
-
}, null, 42,
|
|
4174
|
+
}, null, 42, pi))), 256))
|
|
4174
4175
|
], 2));
|
|
4175
4176
|
}
|
|
4176
|
-
}),
|
|
4177
|
+
}), mi = {
|
|
4177
4178
|
VsInputText: Ye,
|
|
4178
|
-
VsInputRadio:
|
|
4179
|
+
VsInputRadio: bt,
|
|
4179
4180
|
"vs-input-text": Ye,
|
|
4180
|
-
"vs-input-password":
|
|
4181
|
-
"vs-input-textarea":
|
|
4182
|
-
"vs-input-mask":
|
|
4183
|
-
"vs-input-number":
|
|
4184
|
-
"vs-input-radio":
|
|
4185
|
-
"vs-input-select":
|
|
4186
|
-
"vs-input-switcher":
|
|
4187
|
-
"vs-input-static":
|
|
4188
|
-
"vs-input-container":
|
|
4189
|
-
"vs-input-date":
|
|
4190
|
-
"vs-input-checkbox":
|
|
4191
|
-
"vs-input-file":
|
|
4192
|
-
"vs-input-html":
|
|
4193
|
-
"vs-input-email":
|
|
4194
|
-
"vs-input-datatable":
|
|
4195
|
-
"vs-input-map":
|
|
4196
|
-
"vs-input-file-list":
|
|
4197
|
-
"vs-input-tags":
|
|
4198
|
-
"vs-input-slug":
|
|
4199
|
-
"vs-input-key-value":
|
|
4200
|
-
"vs-input-range":
|
|
4201
|
-
"vs-input-color":
|
|
4202
|
-
"vs-input-native-select":
|
|
4203
|
-
"vs-input-array":
|
|
4204
|
-
},
|
|
4181
|
+
"vs-input-password": xl,
|
|
4182
|
+
"vs-input-textarea": _a,
|
|
4183
|
+
"vs-input-mask": oo,
|
|
4184
|
+
"vs-input-number": _l,
|
|
4185
|
+
"vs-input-radio": bt,
|
|
4186
|
+
"vs-input-select": kt,
|
|
4187
|
+
"vs-input-switcher": jt,
|
|
4188
|
+
"vs-input-static": gt,
|
|
4189
|
+
"vs-input-container": na,
|
|
4190
|
+
"vs-input-date": bo,
|
|
4191
|
+
"vs-input-checkbox": ho,
|
|
4192
|
+
"vs-input-file": ln,
|
|
4193
|
+
"vs-input-html": gt,
|
|
4194
|
+
"vs-input-email": so,
|
|
4195
|
+
"vs-input-datatable": Ss,
|
|
4196
|
+
"vs-input-map": zr,
|
|
4197
|
+
"vs-input-file-list": In,
|
|
4198
|
+
"vs-input-tags": Nr,
|
|
4199
|
+
"vs-input-slug": Zr,
|
|
4200
|
+
"vs-input-key-value": ai,
|
|
4201
|
+
"vs-input-range": ci,
|
|
4202
|
+
"vs-input-color": ii,
|
|
4203
|
+
"vs-input-native-select": kt,
|
|
4204
|
+
"vs-input-array": fi
|
|
4205
|
+
}, vi = /* @__PURE__ */ U({
|
|
4205
4206
|
__name: "behavior",
|
|
4206
4207
|
props: {
|
|
4207
4208
|
api: {},
|
|
@@ -4231,12 +4232,12 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4231
4232
|
return (n, s) => (i(), d("button", {
|
|
4232
4233
|
onClick: a,
|
|
4233
4234
|
class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
|
|
4234
|
-
},
|
|
4235
|
+
}, G(n.button), 1));
|
|
4235
4236
|
}
|
|
4236
|
-
}),
|
|
4237
|
+
}), hi = { class: "flex flex-col gap-1 w-full" }, gi = {
|
|
4237
4238
|
key: 0,
|
|
4238
4239
|
class: "text-sm text-gray-500"
|
|
4239
|
-
},
|
|
4240
|
+
}, At = /* @__PURE__ */ U({
|
|
4240
4241
|
__name: "vs-compact-form-layout",
|
|
4241
4242
|
props: /* @__PURE__ */ ie({
|
|
4242
4243
|
item: { default: {} },
|
|
@@ -4251,7 +4252,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4251
4252
|
}),
|
|
4252
4253
|
emits: ["update:modelValue"],
|
|
4253
4254
|
setup(o) {
|
|
4254
|
-
const e = o, t = de(o, "modelValue"), a = B(() =>
|
|
4255
|
+
const e = o, t = de(o, "modelValue"), a = B(() => bl[`${e.layout}`]), n = B(() => mi?.[`vs-input-${e.item.type}`]), s = B(() => {
|
|
4255
4256
|
const u = ee(n);
|
|
4256
4257
|
if (!u) return /* @__PURE__ */ new Set();
|
|
4257
4258
|
const c = u.props ?? u.__vccOpts?.props;
|
|
@@ -4262,7 +4263,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4262
4263
|
const u = e.item ?? {}, c = s.value;
|
|
4263
4264
|
return c.size ? Object.fromEntries(Object.entries(u).filter(([p]) => c.has(p))) : {};
|
|
4264
4265
|
});
|
|
4265
|
-
return (u, c) => ae((i(),
|
|
4266
|
+
return (u, c) => ae((i(), me(Fe(a.value), {
|
|
4266
4267
|
ua: e.item.ua,
|
|
4267
4268
|
error: e.error || "",
|
|
4268
4269
|
item: u.item,
|
|
@@ -4273,14 +4274,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4273
4274
|
l("div", {
|
|
4274
4275
|
class: E(["flex w-full", `${e.item.type}-component`])
|
|
4275
4276
|
}, [
|
|
4276
|
-
l("div",
|
|
4277
|
-
(i(),
|
|
4277
|
+
l("div", hi, [
|
|
4278
|
+
(i(), me(Fe(n.value), Te(r.value, {
|
|
4278
4279
|
modelValue: t.value,
|
|
4279
4280
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => t.value = p)
|
|
4280
4281
|
}), null, 16, ["modelValue"])),
|
|
4281
|
-
u.item.description && e.layout !== "settings" ? (i(), d("p",
|
|
4282
|
+
u.item.description && e.layout !== "settings" ? (i(), d("p", gi, G(u.item.description), 1)) : D("", !0)
|
|
4282
4283
|
]),
|
|
4283
|
-
u.item.behavior?.api && u.item.behavior?.button ? (i(),
|
|
4284
|
+
u.item.behavior?.api && u.item.behavior?.button ? (i(), me(vi, Te({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
|
|
4284
4285
|
], 2)
|
|
4285
4286
|
]),
|
|
4286
4287
|
_: 1
|
|
@@ -4288,7 +4289,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4288
4289
|
[Qe, !u.item.hidden]
|
|
4289
4290
|
]);
|
|
4290
4291
|
}
|
|
4291
|
-
}),
|
|
4292
|
+
}), bi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, yi = { class: "vs-compact-form-navigation__rail mt-[6px]" }, xi = ["onClick"], wi = /* @__PURE__ */ U({
|
|
4292
4293
|
__name: "vs-compact-form-navigation",
|
|
4293
4294
|
props: {
|
|
4294
4295
|
target: {},
|
|
@@ -4298,7 +4299,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4298
4299
|
width: { default: 400 }
|
|
4299
4300
|
},
|
|
4300
4301
|
setup(o, { expose: e }) {
|
|
4301
|
-
const t = o, a =
|
|
4302
|
+
const t = o, a = w([]), n = w(""), s = w(""), r = B(() => !!t.enabled), u = B(() => [
|
|
4302
4303
|
"vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
|
|
4303
4304
|
"sticky top-0 self-start shrink-0",
|
|
4304
4305
|
"max-h-full min-h-0 overflow-y-auto"
|
|
@@ -4308,7 +4309,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4308
4309
|
const Z = typeof M == "number" ? `${M}px` : `${M}`;
|
|
4309
4310
|
return { width: Z, minWidth: Z };
|
|
4310
4311
|
});
|
|
4311
|
-
let p = null, f = 0, m = 0, y = null, S = null,
|
|
4312
|
+
let p = null, f = 0, m = 0, y = null, S = null, q = null;
|
|
4312
4313
|
const R = () => te(), K = () => H();
|
|
4313
4314
|
ue(
|
|
4314
4315
|
() => t.target,
|
|
@@ -4336,13 +4337,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4336
4337
|
V(), T(null, !0), y = null, typeof window < "u" && (f && window.cancelAnimationFrame(f), m && window.cancelAnimationFrame(m));
|
|
4337
4338
|
});
|
|
4338
4339
|
function T(M, Z = !1) {
|
|
4339
|
-
if (
|
|
4340
|
+
if (q && (q(), q = null), Z) {
|
|
4340
4341
|
S = null;
|
|
4341
4342
|
return;
|
|
4342
4343
|
}
|
|
4343
4344
|
if (S = M ?? null, typeof window > "u") return;
|
|
4344
4345
|
const N = M ?? window, le = window;
|
|
4345
|
-
N.addEventListener("scroll", R, { passive: !0 }), le.addEventListener("resize", K),
|
|
4346
|
+
N.addEventListener("scroll", R, { passive: !0 }), le.addEventListener("resize", K), q = () => {
|
|
4346
4347
|
N.removeEventListener("scroll", R), le.removeEventListener("resize", K);
|
|
4347
4348
|
};
|
|
4348
4349
|
}
|
|
@@ -4362,11 +4363,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4362
4363
|
if (!j) return;
|
|
4363
4364
|
let C = (le.getAttribute("id") ?? "").trim();
|
|
4364
4365
|
C || (C = v(j) || `heading-${z + 1}`);
|
|
4365
|
-
let
|
|
4366
|
-
for (; Z.has(
|
|
4367
|
-
|
|
4368
|
-
le.id !==
|
|
4369
|
-
id:
|
|
4366
|
+
let W = C, oe = 1;
|
|
4367
|
+
for (; Z.has(W); )
|
|
4368
|
+
W = `${C}-${oe += 1}`;
|
|
4369
|
+
le.id !== W && Object.assign(le, { id: W }), Z.add(W), N.push({
|
|
4370
|
+
id: W,
|
|
4370
4371
|
text: j,
|
|
4371
4372
|
level: le.tagName.toLowerCase() === "h1" ? 1 : 2
|
|
4372
4373
|
});
|
|
@@ -4393,10 +4394,10 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4393
4394
|
const M = S, Z = (M ? M.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), N = (M ? M.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), le = Z + N;
|
|
4394
4395
|
let z = null;
|
|
4395
4396
|
for (let C = 0; C < a.value.length; C += 1) {
|
|
4396
|
-
const
|
|
4397
|
+
const W = a.value[C], oe = document.getElementById(W.id);
|
|
4397
4398
|
if (oe) {
|
|
4398
4399
|
const se = $(oe);
|
|
4399
|
-
se + oe.offsetHeight > Z && se < le && (z =
|
|
4400
|
+
se + oe.offsetHeight > Z && se < le && (z = W.id);
|
|
4400
4401
|
}
|
|
4401
4402
|
}
|
|
4402
4403
|
!z && s.value && (z = s.value), z && (s.value = z);
|
|
@@ -4420,8 +4421,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4420
4421
|
class: E(u.value),
|
|
4421
4422
|
style: be(c.value)
|
|
4422
4423
|
}, [
|
|
4423
|
-
l("h2",
|
|
4424
|
-
l("div",
|
|
4424
|
+
l("h2", bi, G(M.title), 1),
|
|
4425
|
+
l("div", yi, [
|
|
4425
4426
|
(i(!0), d(re, null, fe(a.value, (N) => (i(), d("div", {
|
|
4426
4427
|
key: N.id,
|
|
4427
4428
|
class: E([
|
|
@@ -4439,35 +4440,35 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4439
4440
|
N.id === n.value ? "text-gray-800" : "text-gray-500"
|
|
4440
4441
|
])
|
|
4441
4442
|
}, [
|
|
4442
|
-
l("span", null,
|
|
4443
|
-
], 10,
|
|
4443
|
+
l("span", null, G(N.text), 1)
|
|
4444
|
+
], 10, xi)
|
|
4444
4445
|
], 2))), 128))
|
|
4445
4446
|
])
|
|
4446
4447
|
], 6)) : D("", !0);
|
|
4447
4448
|
}
|
|
4448
|
-
}),
|
|
4449
|
+
}), ki = /* @__PURE__ */ X(wi, [["__scopeId", "data-v-1584a562"]]), Tt = {
|
|
4449
4450
|
required: "Це поле є обов’язковим",
|
|
4450
4451
|
email: "Неправильний email"
|
|
4451
|
-
},
|
|
4452
|
+
}, _i = (o) => o ? !1 : Tt.required, $i = (o) => {
|
|
4452
4453
|
const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
4453
|
-
return o ? e.test(o) ? !1 :
|
|
4454
|
-
},
|
|
4454
|
+
return o ? e.test(o) ? !1 : Tt.email : !1;
|
|
4455
|
+
}, Ci = (o, e) => {
|
|
4455
4456
|
const t = e.pattern ?? e.regexp;
|
|
4456
4457
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
4457
|
-
},
|
|
4458
|
+
}, Vi = (o, e) => !1, Mi = (o, e) => {
|
|
4458
4459
|
switch (typeof e == "string" ? e : e.type) {
|
|
4459
4460
|
case "required":
|
|
4460
|
-
return ki(o);
|
|
4461
|
-
case "email":
|
|
4462
4461
|
return _i(o);
|
|
4462
|
+
case "email":
|
|
4463
|
+
return $i(o);
|
|
4463
4464
|
case "regexp":
|
|
4464
|
-
return
|
|
4465
|
+
return Ci(o, e);
|
|
4465
4466
|
case "custom":
|
|
4466
|
-
return
|
|
4467
|
+
return Vi();
|
|
4467
4468
|
default:
|
|
4468
4469
|
return !1;
|
|
4469
4470
|
}
|
|
4470
|
-
},
|
|
4471
|
+
}, Li = {
|
|
4471
4472
|
autocomplete: "select",
|
|
4472
4473
|
combobox: "select",
|
|
4473
4474
|
datepicker: "date",
|
|
@@ -4480,16 +4481,16 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
|
|
|
4480
4481
|
dropzone: "file"
|
|
4481
4482
|
// mask: 'text',
|
|
4482
4483
|
};
|
|
4483
|
-
function
|
|
4484
|
+
function $t(o) {
|
|
4484
4485
|
const e = o.toLowerCase();
|
|
4485
|
-
return
|
|
4486
|
+
return Li[e] || e;
|
|
4486
4487
|
}
|
|
4487
|
-
function
|
|
4488
|
+
function Si(o, e = !1) {
|
|
4488
4489
|
if (Array.isArray(o)) {
|
|
4489
4490
|
const a = [];
|
|
4490
4491
|
return o.forEach((n) => {
|
|
4491
4492
|
const s = { ...n };
|
|
4492
|
-
s.name = (n.name || n.id || n.key || "").toString(), s.type =
|
|
4493
|
+
s.name = (n.name || n.id || n.key || "").toString(), s.type = $t(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, s.type === "email" && !s.rules && (s.rules = ["email"]), n.data && (s.api = `/api/suggest/${n.data}`), s.disabled = e || s.disabled, a.push(s);
|
|
4493
4494
|
}), a;
|
|
4494
4495
|
}
|
|
4495
4496
|
const t = [];
|
|
@@ -4497,7 +4498,7 @@ function Li(o, e = !1) {
|
|
|
4497
4498
|
const n = {
|
|
4498
4499
|
name: a[0],
|
|
4499
4500
|
...a[1],
|
|
4500
|
-
type:
|
|
4501
|
+
type: $t(a[1].type),
|
|
4501
4502
|
label: a[1].label || a[1].ua,
|
|
4502
4503
|
rules: a[1].rules || a[1].validators,
|
|
4503
4504
|
disabled: e
|
|
@@ -4505,16 +4506,16 @@ function Li(o, e = !1) {
|
|
|
4505
4506
|
n.type === "email" && !n.rules && (n.rules = ["email"]), a[1].type.includes("list") && (n.multiple = !0), !n.api && a[1].data && (n.api = `/api/suggest/${a[1].data}`), t.push(n);
|
|
4506
4507
|
}), t;
|
|
4507
4508
|
}
|
|
4508
|
-
function
|
|
4509
|
-
const a = B(() =>
|
|
4509
|
+
function Bi(o, e, t = !1) {
|
|
4510
|
+
const a = B(() => Si(
|
|
4510
4511
|
(Array.isArray(e), e),
|
|
4511
4512
|
typeof t == "boolean" ? t : t.value
|
|
4512
|
-
)), n =
|
|
4513
|
+
)), n = w({});
|
|
4513
4514
|
function s(p) {
|
|
4514
4515
|
const f = p?.conditions;
|
|
4515
4516
|
if (!f) return !0;
|
|
4516
4517
|
const m = Array.isArray(f) ? f[0] : f, y = o?.value?.[m];
|
|
4517
|
-
return
|
|
4518
|
+
return zt(y, f);
|
|
4518
4519
|
}
|
|
4519
4520
|
const r = (p = a.value, f = !0) => (p.forEach((m) => {
|
|
4520
4521
|
if (m.rules) {
|
|
@@ -4523,8 +4524,8 @@ function Si(o, e, t = !1) {
|
|
|
4523
4524
|
return;
|
|
4524
4525
|
}
|
|
4525
4526
|
let y = !1, S = null;
|
|
4526
|
-
m.rules.forEach((
|
|
4527
|
-
const R =
|
|
4527
|
+
m.rules.forEach((q) => {
|
|
4528
|
+
const R = Mi(o.value[m.name], q);
|
|
4528
4529
|
R && (y = !0, !S && typeof R == "string" && (S = R));
|
|
4529
4530
|
}), y && S ? n.value[m.name] = S : delete n.value[m.name];
|
|
4530
4531
|
}
|
|
@@ -4539,7 +4540,7 @@ function Si(o, e, t = !1) {
|
|
|
4539
4540
|
visibleSchema: u
|
|
4540
4541
|
};
|
|
4541
4542
|
}
|
|
4542
|
-
const
|
|
4543
|
+
const ji = { class: "flex w-full h-full min-h-0 gap-6" }, Ei = {
|
|
4543
4544
|
key: 0,
|
|
4544
4545
|
"data-orientation": "horizontal",
|
|
4545
4546
|
role: "none",
|
|
@@ -4569,7 +4570,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4569
4570
|
validate: c,
|
|
4570
4571
|
reset: p,
|
|
4571
4572
|
visibleSchema: f
|
|
4572
|
-
} =
|
|
4573
|
+
} = Bi(r, n.schema, Kt(n, "disabled")), m = w(null), y = w(null), S = B(() => n.navigation), q = B(() => n.navWidth), R = B(() => n.style?.columns), K = Object.freeze({ container: 12, label: 3 }), T = B(() => n.columns ?? R.value ?? K), H = B(() => n.columns != null || R.value != null), I = B(() => H.value ? "horizontal" : n.layout), v = (F) => F?.columns ? "horizontal" : I.value, x = (F) => F?.columns ?? T.value, V = () => {
|
|
4573
4574
|
a("update:modelValue", r.value), c(), a("handle-submit", r.value);
|
|
4574
4575
|
};
|
|
4575
4576
|
e({
|
|
@@ -4591,7 +4592,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4591
4592
|
const J = Object.keys(F), M = Object.keys(te);
|
|
4592
4593
|
return J.length !== M.length ? !1 : J.every((Z) => F[Z] === te[Z]);
|
|
4593
4594
|
}
|
|
4594
|
-
return
|
|
4595
|
+
return ht("form", s), ht("values", r), (F, te) => (i(), d("div", ji, [
|
|
4595
4596
|
l("div", {
|
|
4596
4597
|
class: "flex-1 min-h-0 overflow-y-auto",
|
|
4597
4598
|
ref_key: "formScrollContainer",
|
|
@@ -4607,7 +4608,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4607
4608
|
key: J.name,
|
|
4608
4609
|
class: E(v(J) === "horizontal" ? "col-span-12" : `col-span-${J.col || 12}`)
|
|
4609
4610
|
}, [
|
|
4610
|
-
A(
|
|
4611
|
+
A(At, {
|
|
4611
4612
|
style: be(F.style),
|
|
4612
4613
|
item: J,
|
|
4613
4614
|
layout: v(J),
|
|
@@ -4619,19 +4620,19 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4619
4620
|
},
|
|
4620
4621
|
error: ee(u)[J.name]
|
|
4621
4622
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
4622
|
-
v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div",
|
|
4623
|
+
v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div", Ei)) : D("", !0)
|
|
4623
4624
|
], 2))), 128))
|
|
4624
4625
|
], 34)
|
|
4625
4626
|
], 512),
|
|
4626
|
-
A(
|
|
4627
|
+
A(ki, {
|
|
4627
4628
|
target: m.value,
|
|
4628
4629
|
"scroll-container": y.value,
|
|
4629
4630
|
enabled: S.value,
|
|
4630
|
-
width:
|
|
4631
|
+
width: q.value
|
|
4631
4632
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
4632
4633
|
]));
|
|
4633
4634
|
}
|
|
4634
|
-
}),
|
|
4635
|
+
}), Ii = { class: "relative" }, zi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Ai = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Ti = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Fi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Oi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Di = /* @__PURE__ */ U({
|
|
4635
4636
|
__name: "modal-edit",
|
|
4636
4637
|
props: {
|
|
4637
4638
|
schema: {},
|
|
@@ -4642,7 +4643,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4642
4643
|
},
|
|
4643
4644
|
emits: ["close", "save", "edit"],
|
|
4644
4645
|
setup(o, { emit: e }) {
|
|
4645
|
-
const t = o, a = e, n =
|
|
4646
|
+
const t = o, a = e, n = w(t.schema), s = w(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = w({}), u = w(), c = w(t.mode);
|
|
4646
4647
|
async function p() {
|
|
4647
4648
|
const m = r.value.validate();
|
|
4648
4649
|
if (m) {
|
|
@@ -4727,11 +4728,11 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4727
4728
|
message: m.message || "Unexpected error"
|
|
4728
4729
|
}), console.error(m);
|
|
4729
4730
|
}
|
|
4730
|
-
}), (m, y) => (i(), d("div",
|
|
4731
|
-
l("div",
|
|
4732
|
-
l("div",
|
|
4733
|
-
l("div",
|
|
4734
|
-
l("h3",
|
|
4731
|
+
}), (m, y) => (i(), d("div", Ii, [
|
|
4732
|
+
l("div", zi, [
|
|
4733
|
+
l("div", Ai, [
|
|
4734
|
+
l("div", Ti, [
|
|
4735
|
+
l("h3", Fi, G(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4735
4736
|
l("button", {
|
|
4736
4737
|
onClick: f,
|
|
4737
4738
|
type: "button",
|
|
@@ -4755,8 +4756,8 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4755
4756
|
], -1)
|
|
4756
4757
|
]))
|
|
4757
4758
|
]),
|
|
4758
|
-
l("div",
|
|
4759
|
-
n.value ? (i(),
|
|
4759
|
+
l("div", Oi, [
|
|
4760
|
+
n.value ? (i(), me(We, {
|
|
4760
4761
|
key: 0,
|
|
4761
4762
|
schema: n.value,
|
|
4762
4763
|
values: s.value,
|
|
@@ -4781,14 +4782,14 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4781
4782
|
])
|
|
4782
4783
|
]));
|
|
4783
4784
|
}
|
|
4784
|
-
}),
|
|
4785
|
-
const { close: t } =
|
|
4785
|
+
}), Ct = (o = { mode: "edit", schema: null }) => new Promise((e) => {
|
|
4786
|
+
const { close: t } = Jt({
|
|
4786
4787
|
title: o.mode === "add" ? "Додати" : "Редагувати",
|
|
4787
4788
|
template: "",
|
|
4788
4789
|
visible: !0,
|
|
4789
4790
|
size: "medium",
|
|
4790
4791
|
closeClickBack: !0,
|
|
4791
|
-
content:
|
|
4792
|
+
content: Di,
|
|
4792
4793
|
contentProps: {
|
|
4793
4794
|
...o,
|
|
4794
4795
|
onClose: () => {
|
|
@@ -4802,34 +4803,34 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
|
|
|
4802
4803
|
});
|
|
4803
4804
|
We.install = function(e) {
|
|
4804
4805
|
e.component("VForm", We), Object.assign(e.config.globalProperties, {
|
|
4805
|
-
$form:
|
|
4806
|
-
}), e.provide("form",
|
|
4806
|
+
$form: Ct
|
|
4807
|
+
}), e.provide("form", Ct), window.v3plugin || (window.v3plugin = {});
|
|
4807
4808
|
};
|
|
4808
4809
|
export {
|
|
4809
|
-
|
|
4810
|
+
Di as ModalEdit,
|
|
4810
4811
|
We as VForm,
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4812
|
+
fi as VsInputArray,
|
|
4813
|
+
ho as VsInputCheckbox,
|
|
4814
|
+
ii as VsInputColor,
|
|
4815
|
+
na as VsInputContainer,
|
|
4816
|
+
bo as VsInputDate,
|
|
4817
|
+
so as VsInputEmail,
|
|
4818
|
+
ln as VsInputFile,
|
|
4819
|
+
In as VsInputFileList,
|
|
4820
|
+
ai as VsInputKeyValue,
|
|
4821
|
+
oo as VsInputMask,
|
|
4822
|
+
_l as VsInputNumber,
|
|
4823
|
+
bt as VsInputRadio,
|
|
4824
|
+
ci as VsInputRange,
|
|
4825
|
+
kt as VsInputSelect,
|
|
4826
|
+
Zr as VsInputSlug,
|
|
4827
|
+
gt as VsInputStatic,
|
|
4828
|
+
jt as VsInputSwitcher,
|
|
4829
|
+
Nr as VsInputTag,
|
|
4829
4830
|
Ye as VsInputText,
|
|
4830
|
-
|
|
4831
|
+
_a as VsInputTextarea,
|
|
4831
4832
|
We as default,
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4833
|
+
mi as inputs,
|
|
4834
|
+
Ss as vsInputDatatable,
|
|
4835
|
+
zr as vsInputMap
|
|
4835
4836
|
};
|