@opengis/form 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/index.d.ts +9 -0
- package/dist/components/inputs/index.d.ts.map +1 -1
- package/dist/components/inputs/tag/vs-input-tag.vue.d.ts.map +1 -1
- package/dist/components/inputs/vs-input-container.vue.d.ts +9 -0
- package/dist/components/inputs/vs-input-container.vue.d.ts.map +1 -1
- package/dist/components/inputs/vs-input-select.vue.d.ts.map +1 -1
- package/dist/index.js +837 -824
- package/dist/index.umd.cjs +3 -3
- package/dist/schema.d.ts +11 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/utils/convertForm.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as R, ref as k, onMounted as $e, onUnmounted as Qe, createElementBlock as d, openBlock as i, createCommentVNode as
|
|
2
|
-
import { notify as pe, VsModal as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as R, ref as k, onMounted as $e, onUnmounted as Qe, createElementBlock as d, openBlock as i, createCommentVNode as A, renderSlot as Le, createElementVNode as l, toDisplayString as G, mergeProps as Fe, computed as B, normalizeStyle as be, createTextVNode as ge, normalizeProps as at, guardReactiveProps as st, normalizeClass as I, mergeModels as ie, useModel as de, withDirectives as ne, unref as te, vModelText as ve, vModelCheckbox as Bt, createVNode as F, createBlock as he, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as _e, onBeforeUnmount as rt, watch as ue, createStaticVNode as ye, vModelRadio as jt, Fragment as re, renderList as me, reactive as Gt, vModelDynamic as Wt, vShow as et, inject as Te, resolveComponent as yt, Transition as it, nextTick as je, Teleport as Et, getCurrentInstance as Kt, watchEffect as Zt, toRef as Jt, provide as xt } from "vue";
|
|
2
|
+
import { notify as pe, VsModal as It, modal as Yt } from "@opengis/core";
|
|
3
|
+
const Xt = { class: "w-full relative" }, Qt = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-[14px] font-medium text-gray-900 mb-2"
|
|
6
|
-
},
|
|
6
|
+
}, el = { class: "opacity-100" }, tl = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-red-500 text-[14px]"
|
|
9
|
-
},
|
|
9
|
+
}, ll = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
12
|
-
},
|
|
12
|
+
}, ol = /* @__PURE__ */ R({
|
|
13
13
|
__name: "vs-layout-default",
|
|
14
14
|
props: {
|
|
15
15
|
ua: { default: "" },
|
|
@@ -31,24 +31,24 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
31
31
|
e.value = localStorage.locale, window.addEventListener("storage", t);
|
|
32
32
|
}), Qe(() => {
|
|
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",
|
|
38
|
-
])) :
|
|
34
|
+
}), (a, n) => (i(), d("div", Xt, [
|
|
35
|
+
a.ua || a.label ? (i(), d("div", Qt, [
|
|
36
|
+
l("span", el, G(a.item[e.value] || a.ua || a.label), 1),
|
|
37
|
+
a.item?.rules?.includes("required") ? (i(), d("span", tl, "*")) : A("", !0)
|
|
38
|
+
])) : A("", !0),
|
|
39
39
|
Le(a.$slots, "default", Fe(a.$attrs, {
|
|
40
40
|
class: { "opacity-60": a.item.disabled }
|
|
41
41
|
})),
|
|
42
|
-
a.error ? (i(), d("span",
|
|
42
|
+
a.error ? (i(), d("span", ll, G(a.error), 1)) : A("", !0)
|
|
43
43
|
]));
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), nl = { class: "w-full relative flex flex-row items-center gap-2" }, al = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "text-red-500 text-[14px]"
|
|
48
|
-
},
|
|
48
|
+
}, sl = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
51
|
-
},
|
|
51
|
+
}, rl = /* @__PURE__ */ R({
|
|
52
52
|
__name: "vs-layout-horizontal",
|
|
53
53
|
props: {
|
|
54
54
|
ua: { default: "" },
|
|
@@ -75,33 +75,33 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
75
75
|
if (!u || u <= 0) return {};
|
|
76
76
|
if (e.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
|
|
77
77
|
if (!n.value) return { flexBasis: "100%", maxWidth: "100%" };
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
const c = `${
|
|
78
|
+
const f = Math.max(u - Math.max(p ?? 0, 0), 0) / u;
|
|
79
|
+
if (!f) return {};
|
|
80
|
+
const c = `${f * 100}%`;
|
|
81
81
|
return { flexBasis: c, maxWidth: c };
|
|
82
82
|
});
|
|
83
|
-
return (u, p) => (i(), d("div",
|
|
83
|
+
return (u, p) => (i(), d("div", nl, [
|
|
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
89
|
ge(G(u.ua || u.label) + " ", 1),
|
|
90
|
-
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span",
|
|
91
|
-
], 4)) :
|
|
90
|
+
u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", al, "*")) : A("", !0)
|
|
91
|
+
], 4)) : A("", !0),
|
|
92
92
|
l("div", {
|
|
93
93
|
class: "flex-1 min-w-0",
|
|
94
94
|
style: be(r.value)
|
|
95
95
|
}, [
|
|
96
|
-
Le(u.$slots, "default",
|
|
96
|
+
Le(u.$slots, "default", at(st(u.$attrs)))
|
|
97
97
|
], 4),
|
|
98
|
-
u.error ? (i(), d("span",
|
|
98
|
+
u.error ? (i(), d("span", sl, G(u.error), 1)) : A("", !0)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), il = { class: "w-full relative" }, ul = {
|
|
102
102
|
key: 0,
|
|
103
103
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
104
|
-
},
|
|
104
|
+
}, dl = /* @__PURE__ */ R({
|
|
105
105
|
__name: "vs-layout-inline",
|
|
106
106
|
props: {
|
|
107
107
|
ua: { default: "" },
|
|
@@ -116,24 +116,24 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
116
116
|
columns: {}
|
|
117
117
|
},
|
|
118
118
|
setup(o) {
|
|
119
|
-
return (e, t) => (i(), d("div",
|
|
120
|
-
Le(e.$slots, "default",
|
|
121
|
-
e.error ? (i(), d("span",
|
|
119
|
+
return (e, t) => (i(), d("div", il, [
|
|
120
|
+
Le(e.$slots, "default", at(st(e.$attrs))),
|
|
121
|
+
e.error ? (i(), d("span", ul, G(e.error), 1)) : A("", !0)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), cl = { class: "flex-1 min-w-0" }, pl = {
|
|
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
|
+
}, fl = { class: "truncate" }, ml = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "text-red-500 text-[14px]"
|
|
130
|
-
},
|
|
130
|
+
}, vl = {
|
|
131
131
|
key: 1,
|
|
132
132
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
133
|
-
},
|
|
133
|
+
}, hl = { class: "w-full md:w-auto" }, gl = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "mt-1 text-xs text-red-500"
|
|
136
|
-
},
|
|
136
|
+
}, bl = /* @__PURE__ */ R({
|
|
137
137
|
__name: "vs-layout-settings",
|
|
138
138
|
props: {
|
|
139
139
|
ua: { default: "" },
|
|
@@ -167,25 +167,25 @@ const Yt = { class: "w-full relative" }, Xt = {
|
|
|
167
167
|
l("div", {
|
|
168
168
|
class: I(["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",
|
|
174
|
-
])) :
|
|
175
|
-
a.value ? (i(), d("p",
|
|
170
|
+
l("div", cl, [
|
|
171
|
+
u.ua || u.label ? (i(), d("p", pl, [
|
|
172
|
+
l("span", fl, G(u.item[t.value] || u.ua || u.label), 1),
|
|
173
|
+
n.value ? (i(), d("span", ml, "*")) : A("", !0)
|
|
174
|
+
])) : A("", !0),
|
|
175
|
+
a.value ? (i(), d("p", vl, G(a.value), 1)) : A("", !0)
|
|
176
176
|
]),
|
|
177
|
-
l("div",
|
|
178
|
-
Le(u.$slots, "default",
|
|
177
|
+
l("div", hl, [
|
|
178
|
+
Le(u.$slots, "default", at(st(u.$attrs)))
|
|
179
179
|
])
|
|
180
180
|
], 2),
|
|
181
|
-
s.value ? (i(), d("p",
|
|
181
|
+
s.value ? (i(), d("p", gl, G(s.value), 1)) : A("", !0)
|
|
182
182
|
], 2));
|
|
183
183
|
}
|
|
184
|
-
}),
|
|
185
|
-
default:
|
|
186
|
-
horizontal:
|
|
187
|
-
inline:
|
|
188
|
-
settings:
|
|
184
|
+
}), yl = {
|
|
185
|
+
default: ol,
|
|
186
|
+
horizontal: rl,
|
|
187
|
+
inline: dl,
|
|
188
|
+
settings: bl
|
|
189
189
|
};
|
|
190
190
|
function Ce(o) {
|
|
191
191
|
return {
|
|
@@ -195,7 +195,7 @@ function Ce(o) {
|
|
|
195
195
|
})
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ R({
|
|
199
199
|
__name: "vs-input-password",
|
|
200
200
|
props: /* @__PURE__ */ ie({
|
|
201
201
|
style: { default: () => ({}) },
|
|
@@ -221,11 +221,11 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ R({
|
|
|
221
221
|
style: {
|
|
222
222
|
border: "1px solid #CFD9E0"
|
|
223
223
|
}
|
|
224
|
-
}, null, 10,
|
|
224
|
+
}, null, 10, xl)), [
|
|
225
225
|
[ve, a.value]
|
|
226
226
|
]);
|
|
227
227
|
}
|
|
228
|
-
}),
|
|
228
|
+
}), kl = ["placeholder", "disabled"], Xe = /* @__PURE__ */ R({
|
|
229
229
|
__name: "vs-input-text",
|
|
230
230
|
props: /* @__PURE__ */ ie({
|
|
231
231
|
style: { default: () => ({}) },
|
|
@@ -251,11 +251,11 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ R({
|
|
|
251
251
|
style: {
|
|
252
252
|
border: "1px solid #CFD9E0"
|
|
253
253
|
}
|
|
254
|
-
}, null, 10,
|
|
254
|
+
}, null, 10, kl)), [
|
|
255
255
|
[ve, a.value]
|
|
256
256
|
]);
|
|
257
257
|
}
|
|
258
|
-
}),
|
|
258
|
+
}), _l = ["placeholder", "min", "max"], $l = /* @__PURE__ */ R({
|
|
259
259
|
__name: "vs-input-number",
|
|
260
260
|
props: /* @__PURE__ */ ie({
|
|
261
261
|
min: {},
|
|
@@ -285,7 +285,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ R({
|
|
|
285
285
|
},
|
|
286
286
|
min: n.min,
|
|
287
287
|
max: n.max
|
|
288
|
-
}, null, 10,
|
|
288
|
+
}, null, 10, _l)), [
|
|
289
289
|
[ve, a.value]
|
|
290
290
|
]);
|
|
291
291
|
}
|
|
@@ -294,7 +294,7 @@ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ R({
|
|
|
294
294
|
for (const [a, n] of e)
|
|
295
295
|
t[a] = n;
|
|
296
296
|
return t;
|
|
297
|
-
},
|
|
297
|
+
}, Cl = {}, Vl = {
|
|
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 yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ R({
|
|
|
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 Ml(o, e) {
|
|
308
|
+
return i(), d("svg", Vl, e[0] || (e[0] = [
|
|
309
309
|
l("path", {
|
|
310
310
|
stroke: "none",
|
|
311
311
|
d: "M0 0h24v24H0z",
|
|
@@ -314,7 +314,7 @@ function Vl(o, e) {
|
|
|
314
314
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
315
315
|
]));
|
|
316
316
|
}
|
|
317
|
-
const
|
|
317
|
+
const Ll = /* @__PURE__ */ X(Cl, [["render", Ml]]), Sl = { class: "flex items-center gap-[4px]" }, Bl = ["value", "id", "disabled"], jl = ["for"], El = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Il = /* @__PURE__ */ R({
|
|
318
318
|
__name: "vs-checkbox-default",
|
|
319
319
|
props: {
|
|
320
320
|
value: { default: "" },
|
|
@@ -331,7 +331,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { 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", Sl, [
|
|
335
335
|
ne(l("input", {
|
|
336
336
|
type: "checkbox",
|
|
337
337
|
value: s.value,
|
|
@@ -339,8 +339,8 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
339
339
|
class: I(["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, Bl), [
|
|
343
|
+
[Bt, n.value]
|
|
344
344
|
]),
|
|
345
345
|
l("label", {
|
|
346
346
|
for: s.id,
|
|
@@ -349,23 +349,23 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
349
349
|
l("div", {
|
|
350
350
|
class: I(["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
|
-
F(
|
|
352
|
+
F(Ll, {
|
|
353
353
|
height: "12",
|
|
354
354
|
width: "12"
|
|
355
355
|
})
|
|
356
356
|
], 2),
|
|
357
|
-
l("span",
|
|
357
|
+
l("span", El, [
|
|
358
358
|
Le(s.$slots, "default", {}, () => [
|
|
359
359
|
ge(G(s.label), 1)
|
|
360
360
|
])
|
|
361
361
|
])
|
|
362
|
-
], 10,
|
|
362
|
+
], 10, jl)
|
|
363
363
|
]));
|
|
364
364
|
}
|
|
365
|
-
}),
|
|
365
|
+
}), Al = ["name", "value", "disabled"], Tl = { class: "flex items-center gap-[6px] text-[14px]" }, zl = {
|
|
366
366
|
key: 0,
|
|
367
367
|
class: "text-[16px]"
|
|
368
|
-
},
|
|
368
|
+
}, Fl = ["src"], Ol = /* @__PURE__ */ R({
|
|
369
369
|
__name: "vs-checkbox-buttons",
|
|
370
370
|
props: {
|
|
371
371
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -393,32 +393,32 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
393
393
|
class: "hidden",
|
|
394
394
|
name: u.id,
|
|
395
395
|
value: u.value,
|
|
396
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
396
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => n.value = f),
|
|
397
397
|
disabled: u.disabled
|
|
398
|
-
}, null, 8,
|
|
399
|
-
[
|
|
398
|
+
}, null, 8, Al), [
|
|
399
|
+
[Bt, n.value]
|
|
400
400
|
]),
|
|
401
401
|
l("span", Tl, [
|
|
402
402
|
u.icon || u.imgUrl ? (i(), d("span", zl, [
|
|
403
403
|
u.icon ? (i(), d("i", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: I(u.icon)
|
|
406
|
-
}, null, 2)) :
|
|
406
|
+
}, null, 2)) : A("", !0),
|
|
407
407
|
u.imgUrl ? (i(), d("img", {
|
|
408
408
|
key: 1,
|
|
409
409
|
src: u.imgUrl,
|
|
410
410
|
width: "16",
|
|
411
411
|
height: "16",
|
|
412
412
|
alt: "icon"
|
|
413
|
-
}, null, 8,
|
|
414
|
-
])) :
|
|
413
|
+
}, null, 8, Fl)) : A("", !0)
|
|
414
|
+
])) : A("", !0),
|
|
415
415
|
Le(u.$slots, "default", {}, () => [
|
|
416
416
|
ge(G(u.label), 1)
|
|
417
417
|
])
|
|
418
418
|
])
|
|
419
419
|
], 2));
|
|
420
420
|
}
|
|
421
|
-
}),
|
|
421
|
+
}), Dl = { class: "flex items-center" }, At = /* @__PURE__ */ R({
|
|
422
422
|
__name: "vs-input-checkbox-item",
|
|
423
423
|
props: {
|
|
424
424
|
value: { default: "" },
|
|
@@ -440,19 +440,19 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
440
440
|
set: (u) => {
|
|
441
441
|
if (Array.isArray(t.modelValue)) {
|
|
442
442
|
let p = [...t.modelValue];
|
|
443
|
-
u ? p.includes(t.value) || p.push(t.value) : p = p.filter((
|
|
443
|
+
u ? p.includes(t.value) || p.push(t.value) : p = p.filter((f) => f !== t.value), a("update:modelValue", p);
|
|
444
444
|
} else
|
|
445
445
|
a("update:modelValue", u);
|
|
446
446
|
}
|
|
447
447
|
}), r = k(`vs-checkbox-${t.view || "default"}`);
|
|
448
|
-
return (u, p) => (i(), d("div",
|
|
449
|
-
(i(), he(Oe(r.value === "vs-checkbox-buttons" ? te(
|
|
448
|
+
return (u, p) => (i(), d("div", Dl, [
|
|
449
|
+
(i(), he(Oe(r.value === "vs-checkbox-buttons" ? te(Ol) : te(Il)), {
|
|
450
450
|
value: u.value,
|
|
451
451
|
label: u.label,
|
|
452
452
|
info: u.option?.info,
|
|
453
453
|
disabled: u.disabled,
|
|
454
454
|
modelValue: s.value,
|
|
455
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
455
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => s.value = f),
|
|
456
456
|
id: n,
|
|
457
457
|
icon: u.icon,
|
|
458
458
|
imgUrl: u.imgUrl,
|
|
@@ -466,7 +466,7 @@ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-ce
|
|
|
466
466
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
467
467
|
]));
|
|
468
468
|
}
|
|
469
|
-
}),
|
|
469
|
+
}), Ul = {}, Pl = {
|
|
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 Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { 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 Rl(o, e) {
|
|
480
|
+
return i(), d("svg", Pl, e[0] || (e[0] = [
|
|
481
481
|
l("path", {
|
|
482
482
|
stroke: "none",
|
|
483
483
|
d: "M0 0h24v24H0z",
|
|
@@ -486,7 +486,7 @@ function Pl(o, e) {
|
|
|
486
486
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
487
487
|
]));
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const Hl = /* @__PURE__ */ X(Ul, [["render", Rl]]), Nl = {}, ql = {
|
|
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 Rl = /* @__PURE__ */ X(Dl, [["render", Pl]]), Hl = {}, Nl = {
|
|
|
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 Gl(o, e) {
|
|
500
|
+
return i(), d("svg", ql, e[0] || (e[0] = [
|
|
501
501
|
l("path", {
|
|
502
502
|
stroke: "none",
|
|
503
503
|
d: "M0 0h24v24H0z",
|
|
@@ -507,7 +507,7 @@ function ql(o, e) {
|
|
|
507
507
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
508
508
|
]));
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const Wl = /* @__PURE__ */ X(Nl, [["render", Gl]]), Kl = {}, Zl = {
|
|
511
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
512
|
width: "24",
|
|
513
513
|
height: "24",
|
|
@@ -518,8 +518,8 @@ const Gl = /* @__PURE__ */ X(Hl, [["render", ql]]), Wl = {}, Kl = {
|
|
|
518
518
|
"stroke-linecap": "round",
|
|
519
519
|
"stroke-linejoin": "round"
|
|
520
520
|
};
|
|
521
|
-
function
|
|
522
|
-
return i(), d("svg",
|
|
521
|
+
function Jl(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 Yl = /* @__PURE__ */ X(Kl, [["render", Jl]]), Xl = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "flex items-start gap-x-1"
|
|
536
|
-
},
|
|
536
|
+
}, Ql = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "text-red-500 text-[14px]"
|
|
539
|
-
},
|
|
539
|
+
}, eo = ["title"], to = ["disabled"], Tt = /* @__PURE__ */ R({
|
|
540
540
|
__name: "vs-input-switcher",
|
|
541
541
|
props: /* @__PURE__ */ ie({
|
|
542
542
|
rules: { default: () => [] },
|
|
@@ -558,14 +558,14 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
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
|
-
F(
|
|
561
|
+
return (a, n) => e.view === "checkbox" ? (i(), d("div", Xl, [
|
|
562
|
+
F(At, {
|
|
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", Ql, "*")) : A("", !0),
|
|
569
569
|
a.i ? (i(), d("button", {
|
|
570
570
|
key: 1,
|
|
571
571
|
class: "cursor-pointer",
|
|
@@ -573,8 +573,8 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
573
573
|
onClick: n[1] || (n[1] = _e(() => {
|
|
574
574
|
}, ["prevent"]))
|
|
575
575
|
}, [
|
|
576
|
-
F(te(
|
|
577
|
-
], 8,
|
|
576
|
+
F(te(Yl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
577
|
+
], 8, eo)) : A("", !0)
|
|
578
578
|
])) : (i(), d("button", {
|
|
579
579
|
key: 1,
|
|
580
580
|
type: "button",
|
|
@@ -586,9 +586,9 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
586
586
|
"data-state": "checked",
|
|
587
587
|
class: I(["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, to));
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
591
|
+
}), lo = ["id", "innerHTML"], wt = /* @__PURE__ */ R({
|
|
592
592
|
__name: "vs-input-static",
|
|
593
593
|
props: {
|
|
594
594
|
text: { default: "" },
|
|
@@ -606,9 +606,9 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
606
606
|
id: e.name,
|
|
607
607
|
class: I(["text-gray-900", e.customClass]),
|
|
608
608
|
innerHTML: e.html ? e.html : e.text
|
|
609
|
-
}, null, 10,
|
|
609
|
+
}, null, 10, lo));
|
|
610
610
|
}
|
|
611
|
-
}),
|
|
611
|
+
}), oo = ["placeholder", "disabled", "name"], no = /* @__PURE__ */ R({
|
|
612
612
|
__name: "vs-input-mask",
|
|
613
613
|
props: /* @__PURE__ */ ie({
|
|
614
614
|
name: {},
|
|
@@ -645,7 +645,7 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
645
645
|
a.value = e.unmask ? s.unmaskedValue : s.value;
|
|
646
646
|
}), s.value = a.value ?? "";
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
648
|
+
}), rt(() => {
|
|
649
649
|
s?.destroy();
|
|
650
650
|
}), ue(() => e.mask, (r) => {
|
|
651
651
|
s && s.updateOptions({
|
|
@@ -669,9 +669,9 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
669
669
|
style: {
|
|
670
670
|
border: "1px solid #CFD9E0"
|
|
671
671
|
}
|
|
672
|
-
}, null, 10,
|
|
672
|
+
}, null, 10, oo));
|
|
673
673
|
}
|
|
674
|
-
}),
|
|
674
|
+
}), ao = { class: "relative w-full bg-white rounded-lg" }, so = ["placeholder", "disabled"], ro = /* @__PURE__ */ R({
|
|
675
675
|
__name: "vs-input-email",
|
|
676
676
|
props: /* @__PURE__ */ ie({
|
|
677
677
|
style: { default: () => ({}) },
|
|
@@ -688,7 +688,7 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
688
688
|
emits: ["update:modelValue"],
|
|
689
689
|
setup(o) {
|
|
690
690
|
const e = o, { inputClass: t } = Ce(e.style), a = de(o, "modelValue");
|
|
691
|
-
return (n, s) => (i(), d("div",
|
|
691
|
+
return (n, s) => (i(), d("div", ao, [
|
|
692
692
|
s[1] || (s[1] = ye('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
|
|
693
693
|
ne(l("input", {
|
|
694
694
|
type: "email",
|
|
@@ -699,12 +699,12 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
699
699
|
style: {
|
|
700
700
|
border: "1px solid #CFD9E0"
|
|
701
701
|
}
|
|
702
|
-
}, null, 10,
|
|
702
|
+
}, null, 10, so), [
|
|
703
703
|
[ve, a.value]
|
|
704
704
|
])
|
|
705
705
|
]));
|
|
706
706
|
}
|
|
707
|
-
}),
|
|
707
|
+
}), io = ["value", "disabled"], uo = { class: "text-[13px] text-gray-700" }, co = /* @__PURE__ */ R({
|
|
708
708
|
__name: "vs-input-radio-default",
|
|
709
709
|
props: /* @__PURE__ */ ie({
|
|
710
710
|
style: {},
|
|
@@ -732,8 +732,8 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
732
732
|
value: t.value,
|
|
733
733
|
disabled: t.disabled,
|
|
734
734
|
class: "hidden"
|
|
735
|
-
}, null, 8,
|
|
736
|
-
[
|
|
735
|
+
}, null, 8, io), [
|
|
736
|
+
[jt, e.value]
|
|
737
737
|
]),
|
|
738
738
|
l("span", {
|
|
739
739
|
class: I(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
|
|
@@ -744,12 +744,12 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
744
744
|
e.value == t.value ? (i(), d("span", {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: I(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
747
|
-
}, null, 2)) :
|
|
747
|
+
}, null, 2)) : A("", !0)
|
|
748
748
|
], 2),
|
|
749
|
-
l("span",
|
|
749
|
+
l("span", uo, G(t.text), 1)
|
|
750
750
|
], 2));
|
|
751
751
|
}
|
|
752
|
-
}),
|
|
752
|
+
}), po = ["value", "disabled"], fo = { class: "text-[13px] text-gray-700" }, mo = /* @__PURE__ */ R({
|
|
753
753
|
__name: "vs-input-radio-buttons",
|
|
754
754
|
props: /* @__PURE__ */ ie({
|
|
755
755
|
style: {},
|
|
@@ -780,16 +780,16 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
780
780
|
value: t.value,
|
|
781
781
|
disabled: t.disabled,
|
|
782
782
|
class: "hidden"
|
|
783
|
-
}, null, 8,
|
|
784
|
-
[
|
|
783
|
+
}, null, 8, po), [
|
|
784
|
+
[jt, e.value]
|
|
785
785
|
]),
|
|
786
|
-
l("span",
|
|
786
|
+
l("span", fo, G(t.text), 1)
|
|
787
787
|
], 2));
|
|
788
788
|
}
|
|
789
|
-
}),
|
|
790
|
-
"vs-input-radio-default":
|
|
791
|
-
"vs-input-radio-buttons":
|
|
792
|
-
},
|
|
789
|
+
}), vo = {
|
|
790
|
+
"vs-input-radio-default": co,
|
|
791
|
+
"vs-input-radio-buttons": mo
|
|
792
|
+
}, kt = /* @__PURE__ */ R({
|
|
793
793
|
__name: "vs-input-radio",
|
|
794
794
|
props: /* @__PURE__ */ ie({
|
|
795
795
|
options: {},
|
|
@@ -808,7 +808,7 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
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(() => vo[`vs-input-radio-${e.view}`]);
|
|
812
812
|
return (n, s) => (i(), d("div", {
|
|
813
813
|
class: I([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
814
814
|
}, [
|
|
@@ -822,7 +822,7 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
822
822
|
}, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
823
823
|
], 2));
|
|
824
824
|
}
|
|
825
|
-
}),
|
|
825
|
+
}), ho = /* @__PURE__ */ R({
|
|
826
826
|
__name: "vs-input-checkbox",
|
|
827
827
|
props: {
|
|
828
828
|
options: { default: () => [] },
|
|
@@ -841,9 +841,9 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
841
841
|
},
|
|
842
842
|
emits: ["update:modelValue"],
|
|
843
843
|
setup(o, { emit: e }) {
|
|
844
|
-
const t = o, a = e, n = k([]), s =
|
|
844
|
+
const t = o, a = e, n = k([]), s = Gt({}), r = (c) => c?.value || c?.id || c?.text || c, u = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
|
|
845
845
|
try {
|
|
846
|
-
const c = await fetch(`/api/suggest/${t.data}`).then((
|
|
846
|
+
const c = await fetch(`/api/suggest/${t.data}`).then((m) => m.json());
|
|
847
847
|
n.value = c?.data || c;
|
|
848
848
|
} catch (c) {
|
|
849
849
|
console.error(c);
|
|
@@ -853,14 +853,14 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
853
853
|
() => t.modelValue,
|
|
854
854
|
(c) => {
|
|
855
855
|
if (typeof c == "boolean" && n.value.length === 1) {
|
|
856
|
-
const
|
|
857
|
-
s[
|
|
856
|
+
const m = r(n.value[0]);
|
|
857
|
+
s[m] = c;
|
|
858
858
|
} else if (Array.isArray(c)) {
|
|
859
|
-
const
|
|
859
|
+
const m = new Set(c);
|
|
860
860
|
n.value.forEach((b) => {
|
|
861
861
|
if (!b.disabled) {
|
|
862
862
|
const M = r(b);
|
|
863
|
-
s[M] =
|
|
863
|
+
s[M] = m.has(M);
|
|
864
864
|
}
|
|
865
865
|
});
|
|
866
866
|
}
|
|
@@ -873,21 +873,21 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
873
873
|
a("update:modelValue", null);
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
const c = Object.entries(s).filter(([,
|
|
876
|
+
const c = Object.entries(s).filter(([, m]) => m).map(([m]) => m);
|
|
877
877
|
a("update:modelValue", c.length === 0 ? [] : c);
|
|
878
878
|
},
|
|
879
879
|
{ deep: !0 }
|
|
880
880
|
), $e(() => {
|
|
881
881
|
if (t.data)
|
|
882
|
-
|
|
882
|
+
f().then(() => {
|
|
883
883
|
if (typeof t.modelValue == "boolean" && n.value.length === 1) {
|
|
884
884
|
const c = r(n.value[0]);
|
|
885
885
|
s[c] = t.modelValue;
|
|
886
886
|
} else if (Array.isArray(t.modelValue)) {
|
|
887
887
|
const c = new Set(t.modelValue);
|
|
888
|
-
n.value.forEach((
|
|
889
|
-
if (!
|
|
890
|
-
const b = r(
|
|
888
|
+
n.value.forEach((m) => {
|
|
889
|
+
if (!m.disabled) {
|
|
890
|
+
const b = r(m);
|
|
891
891
|
s[b] = c.has(b);
|
|
892
892
|
}
|
|
893
893
|
});
|
|
@@ -898,17 +898,17 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
898
898
|
s[c] = t.modelValue;
|
|
899
899
|
} else if (Array.isArray(t.modelValue)) {
|
|
900
900
|
const c = new Set(t.modelValue);
|
|
901
|
-
n.value.forEach((
|
|
902
|
-
if (!
|
|
903
|
-
const b = r(
|
|
901
|
+
n.value.forEach((m) => {
|
|
902
|
+
if (!m.disabled) {
|
|
903
|
+
const b = r(m);
|
|
904
904
|
s[b] = c.has(b);
|
|
905
905
|
}
|
|
906
906
|
});
|
|
907
907
|
}
|
|
908
|
-
}), (c,
|
|
908
|
+
}), (c, m) => (i(), d("div", {
|
|
909
909
|
class: I(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
|
|
910
910
|
}, [
|
|
911
|
-
(i(!0), d(re, null, me(n.value, (b) => (i(), he(
|
|
911
|
+
(i(!0), d(re, null, me(n.value, (b) => (i(), he(At, {
|
|
912
912
|
modelValue: s[r(b)],
|
|
913
913
|
"onUpdate:modelValue": (M) => s[r(b)] = M,
|
|
914
914
|
value: r(b),
|
|
@@ -923,7 +923,7 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
923
923
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
924
924
|
], 2));
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
926
|
+
}), go = /* @__PURE__ */ X(ho, [["__scopeId", "data-v-91f3584a"]]), bo = ["type", "placeholder", "disabled"], yo = /* @__PURE__ */ R({
|
|
927
927
|
__name: "vs-input-date1",
|
|
928
928
|
props: {
|
|
929
929
|
style: { default: () => ({}) },
|
|
@@ -945,9 +945,9 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
945
945
|
get: () => a(t.modelValue),
|
|
946
946
|
set: (p) => s("update:modelValue", p)
|
|
947
947
|
}), u = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
|
|
948
|
-
return (p,
|
|
948
|
+
return (p, f) => ne((i(), d("input", {
|
|
949
949
|
type: u.value,
|
|
950
|
-
"onUpdate:modelValue":
|
|
950
|
+
"onUpdate:modelValue": f[0] || (f[0] = (c) => r.value = c),
|
|
951
951
|
placeholder: p.placeholder,
|
|
952
952
|
disabled: p.disabled,
|
|
953
953
|
ref: "date",
|
|
@@ -955,11 +955,11 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
955
955
|
style: {
|
|
956
956
|
border: "1px solid #CFD9E0"
|
|
957
957
|
}
|
|
958
|
-
}, null, 10,
|
|
959
|
-
[
|
|
958
|
+
}, null, 10, bo)), [
|
|
959
|
+
[Wt, r.value]
|
|
960
960
|
]);
|
|
961
961
|
}
|
|
962
|
-
}),
|
|
962
|
+
}), _t = 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 Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
977
977
|
position: "right-bottom"
|
|
978
978
|
}), console.error("Сталась помилка завантаження файлу", n), null;
|
|
979
979
|
}
|
|
980
|
-
},
|
|
980
|
+
}, xo = 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
|
+
}, $t = async (o) => {
|
|
987
987
|
try {
|
|
988
988
|
const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), a = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), s = new Blob([n], { type: a }), r = document.createElement("a");
|
|
989
989
|
r.setAttribute("download", o), r.href = window.URL.createObjectURL(s), r.click();
|
|
990
990
|
} catch (e) {
|
|
991
991
|
console.error(e.message);
|
|
992
992
|
}
|
|
993
|
-
},
|
|
993
|
+
}, wo = {}, ko = {
|
|
994
994
|
xmlns: "http://www.w3.org/2000/svg",
|
|
995
995
|
width: "24",
|
|
996
996
|
height: "24",
|
|
@@ -1001,13 +1001,13 @@ const Jl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Yl = {
|
|
|
1001
1001
|
"stroke-linecap": "round",
|
|
1002
1002
|
"stroke-linejoin": "round"
|
|
1003
1003
|
};
|
|
1004
|
-
function
|
|
1005
|
-
return i(), d("svg",
|
|
1004
|
+
function _o(o, e) {
|
|
1005
|
+
return i(), d("svg", ko, 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 Ge = /* @__PURE__ */ X(
|
|
1010
|
+
const Ge = /* @__PURE__ */ X(wo, [["render", _o]]), $o = {}, Co = {
|
|
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 Ge = /* @__PURE__ */ X(xo, [["render", ko]]), _o = {}, $o = {
|
|
|
1019
1019
|
"stroke-linecap": "round",
|
|
1020
1020
|
"stroke-linejoin": "round"
|
|
1021
1021
|
};
|
|
1022
|
-
function
|
|
1023
|
-
return i(), d("svg",
|
|
1022
|
+
function Vo(o, e, t, a, n, s) {
|
|
1023
|
+
return i(), d("svg", Co, 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 Mo = /* @__PURE__ */ X($o, [["render", Vo]]), Lo = {}, So = {
|
|
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 Vo = /* @__PURE__ */ X(_o, [["render", Co]]), Mo = {}, Lo = {
|
|
|
1036
1036
|
"stroke-linecap": "round",
|
|
1037
1037
|
"stroke-linejoin": "round"
|
|
1038
1038
|
};
|
|
1039
|
-
function
|
|
1040
|
-
return i(), d("svg",
|
|
1039
|
+
function Bo(o, e, t, a, n, s) {
|
|
1040
|
+
return i(), d("svg", So, e[0] || (e[0] = [
|
|
1041
1041
|
l("path", {
|
|
1042
1042
|
stroke: "none",
|
|
1043
1043
|
d: "M0 0h24v24H0z",
|
|
@@ -1064,7 +1064,7 @@ function So(o, e, t, a, n, s) {
|
|
|
1064
1064
|
}, null, -1)
|
|
1065
1065
|
]));
|
|
1066
1066
|
}
|
|
1067
|
-
const
|
|
1067
|
+
const jo = /* @__PURE__ */ X(Lo, [["render", Bo]]), Eo = {}, Io = {
|
|
1068
1068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1069
1069
|
width: "24",
|
|
1070
1070
|
height: "24",
|
|
@@ -1075,12 +1075,12 @@ const Bo = /* @__PURE__ */ X(Mo, [["render", So]]), jo = {}, Eo = {
|
|
|
1075
1075
|
"stroke-linecap": "round",
|
|
1076
1076
|
"stroke-linejoin": "round"
|
|
1077
1077
|
};
|
|
1078
|
-
function
|
|
1079
|
-
return i(), d("svg",
|
|
1078
|
+
function Ao(o, e) {
|
|
1079
|
+
return i(), d("svg", Io, 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 zt = /* @__PURE__ */ X(
|
|
1083
|
+
const zt = /* @__PURE__ */ X(Eo, [["render", Ao]]), To = {}, zo = {
|
|
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 zt = /* @__PURE__ */ X(jo, [["render", Io]]), To = {}, zo = {
|
|
|
1092
1092
|
"stroke-linecap": "round",
|
|
1093
1093
|
"stroke-linejoin": "round"
|
|
1094
1094
|
};
|
|
1095
|
-
function
|
|
1095
|
+
function Fo(o, e, t, a, n, s) {
|
|
1096
1096
|
return i(), d("svg", zo, 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 Oo = /* @__PURE__ */ X(To, [["render", Fo]]), Do = {}, Uo = {
|
|
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 Fo = /* @__PURE__ */ X(To, [["render", Ao]]), Oo = {}, Do = {
|
|
|
1109
1109
|
"stroke-linecap": "round",
|
|
1110
1110
|
"stroke-linejoin": "round"
|
|
1111
1111
|
};
|
|
1112
|
-
function
|
|
1113
|
-
return i(), d("svg",
|
|
1112
|
+
function Po(o, e, t, a, n, s) {
|
|
1113
|
+
return i(), d("svg", Uo, 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 Ro = /* @__PURE__ */ X(Do, [["render", Po]]), Ho = (o) => {
|
|
1118
1118
|
if (!o) return "";
|
|
1119
1119
|
const e = o?.split(".");
|
|
1120
1120
|
return e[e.length - 1];
|
|
1121
|
-
},
|
|
1122
|
-
const e =
|
|
1121
|
+
}, No = (o) => {
|
|
1122
|
+
const e = Ho(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) ? jo : t.textsFormat.includes(e) ? Ro : t.documentsFormat.includes(e) ? Mo : t.archivesFormat.includes(e) ? Oo : zt;
|
|
1130
|
+
}, qo = {}, Go = {
|
|
1131
1131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1132
1132
|
width: "24",
|
|
1133
1133
|
height: "24",
|
|
@@ -1139,12 +1139,12 @@ const Po = /* @__PURE__ */ X(Oo, [["render", Uo]]), Ro = (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", Go, 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 tt = /* @__PURE__ */ X(
|
|
1147
|
+
const tt = /* @__PURE__ */ X(qo, [["render", Wo]]), Ko = {}, Zo = {
|
|
1148
1148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1149
1149
|
width: "24",
|
|
1150
1150
|
height: "24",
|
|
@@ -1156,8 +1156,8 @@ const tt = /* @__PURE__ */ X(No, [["render", Go]]), Wo = {}, Ko = {
|
|
|
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 Jo(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 Ft = /* @__PURE__ */ X(Ko, [["render", Jo]]), Yo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Xo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Qo = /* @__PURE__ */ R({
|
|
1172
1172
|
__name: "vs-input-file-list-item",
|
|
1173
1173
|
props: /* @__PURE__ */ ie({
|
|
1174
1174
|
format: {},
|
|
@@ -1189,18 +1189,18 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { 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(), he(Oe(te(
|
|
1192
|
+
return (n, s) => (i(), d("div", Yo, [
|
|
1193
|
+
(i(), he(Oe(te(No)(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) => te(
|
|
1197
|
+
onClick: s[0] || (s[0] = (r) => te($t)(t.value))
|
|
1198
1198
|
}, null, 8, ["src"])),
|
|
1199
|
-
l("div",
|
|
1199
|
+
l("div", Xo, [
|
|
1200
1200
|
l("button", {
|
|
1201
1201
|
type: "button",
|
|
1202
1202
|
onClick: s[1] || (s[1] = (r) => {
|
|
1203
|
-
te(
|
|
1203
|
+
te(xo)(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 At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1208
1208
|
]),
|
|
1209
1209
|
l("button", {
|
|
1210
1210
|
type: "button",
|
|
1211
|
-
onClick: s[2] || (s[2] = (r) => te(
|
|
1211
|
+
onClick: s[2] || (s[2] = (r) => te($t)(t.value)),
|
|
1212
1212
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
1213
1213
|
}, [
|
|
1214
|
-
F(
|
|
1214
|
+
F(Ft, { class: "w-4 h-4" })
|
|
1215
1215
|
])
|
|
1216
1216
|
])
|
|
1217
1217
|
]));
|
|
1218
1218
|
}
|
|
1219
|
-
}),
|
|
1219
|
+
}), Ct = /* @__PURE__ */ X(Qo, [["__scopeId", "data-v-0ca886b3"]]), en = { class: "flex items-center gap-x-2" }, tn = ["multiple"], ln = {
|
|
1220
1220
|
key: 1,
|
|
1221
1221
|
class: "flex items-center flex-wrap gap-2"
|
|
1222
|
-
},
|
|
1222
|
+
}, on = /* @__PURE__ */ R({
|
|
1223
1223
|
__name: "vs-input-file",
|
|
1224
1224
|
props: /* @__PURE__ */ ie({
|
|
1225
1225
|
format: {},
|
|
@@ -1238,20 +1238,20 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1238
1238
|
emits: /* @__PURE__ */ ie(["change"], ["update:modelValue"]),
|
|
1239
1239
|
setup(o, { emit: e }) {
|
|
1240
1240
|
const t = o, a = de(o, "modelValue"), n = e, s = k(null), r = (p) => Array.isArray(a.value) && a.value[p] || "", u = async (p) => {
|
|
1241
|
-
const { files:
|
|
1242
|
-
if (!(!
|
|
1241
|
+
const { files: f } = p.target;
|
|
1242
|
+
if (!(!f || f.length === 0))
|
|
1243
1243
|
if (t.multiple) {
|
|
1244
|
-
const c = Array.from(
|
|
1244
|
+
const c = Array.from(f).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await _t(q, "1", "form", "table")), M = (await Promise.all(c)).filter((q) => q !== null).map((q) => q?.file_path).filter(Boolean);
|
|
1245
1245
|
a.value = [...a.value || [], ...M], n("change", a.value);
|
|
1246
1246
|
} else {
|
|
1247
|
-
const c =
|
|
1247
|
+
const c = f[0];
|
|
1248
1248
|
if (t.format && !c.name.endsWith(t.format))
|
|
1249
1249
|
return;
|
|
1250
|
-
const
|
|
1251
|
-
a.value =
|
|
1250
|
+
const m = await _t(c, "1", "form", "table");
|
|
1251
|
+
a.value = m?.file_path, n("change", a.value || "");
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
return (p,
|
|
1254
|
+
return (p, f) => (i(), d("div", en, [
|
|
1255
1255
|
l("input", {
|
|
1256
1256
|
class: "hidden",
|
|
1257
1257
|
ref_key: "fileInput",
|
|
@@ -1259,23 +1259,23 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1259
1259
|
type: "file",
|
|
1260
1260
|
multiple: p.multiple,
|
|
1261
1261
|
onChange: u
|
|
1262
|
-
}, null, 40,
|
|
1263
|
-
!p.multiple && a.value ? (i(), he(
|
|
1262
|
+
}, null, 40, tn),
|
|
1263
|
+
!p.multiple && a.value ? (i(), he(Ct, {
|
|
1264
1264
|
key: 0,
|
|
1265
1265
|
item: a.value,
|
|
1266
|
-
"onUpdate:item":
|
|
1266
|
+
"onUpdate:item": f[0] || (f[0] = (c) => a.value = c),
|
|
1267
1267
|
value: a.value,
|
|
1268
|
-
"onUpdate:value":
|
|
1269
|
-
}, null, 8, ["item", "value"])) : p.multiple ? (i(), d("div",
|
|
1270
|
-
(i(!0), d(re, null, me(a.value, (c,
|
|
1268
|
+
"onUpdate:value": f[1] || (f[1] = (c) => a.value = c)
|
|
1269
|
+
}, null, 8, ["item", "value"])) : p.multiple ? (i(), d("div", ln, [
|
|
1270
|
+
(i(!0), d(re, null, me(a.value, (c, m) => (i(), he(Ct, {
|
|
1271
1271
|
multiple: p.multiple,
|
|
1272
|
-
key:
|
|
1272
|
+
key: m,
|
|
1273
1273
|
value: a.value,
|
|
1274
|
-
"onUpdate:value":
|
|
1275
|
-
item: r(
|
|
1274
|
+
"onUpdate:value": f[2] || (f[2] = (b) => a.value = b),
|
|
1275
|
+
item: r(m)
|
|
1276
1276
|
}, null, 8, ["multiple", "value", "item"]))), 128)),
|
|
1277
1277
|
l("div", {
|
|
1278
|
-
onClick:
|
|
1278
|
+
onClick: f[3] || (f[3] = (c) => !p.disabled && s.value?.click()),
|
|
1279
1279
|
class: I([
|
|
1280
1280
|
"h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
|
|
1281
1281
|
p.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
|
|
@@ -1283,17 +1283,17 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1283
1283
|
}, [
|
|
1284
1284
|
F(Ge, { class: "w-6 h-6" })
|
|
1285
1285
|
], 2)
|
|
1286
|
-
])) :
|
|
1287
|
-
p.multiple ?
|
|
1286
|
+
])) : A("", !0),
|
|
1287
|
+
p.multiple ? A("", !0) : (i(), d("div", {
|
|
1288
1288
|
key: 2,
|
|
1289
|
-
onClick:
|
|
1289
|
+
onClick: f[4] || (f[4] = (c) => s.value?.click()),
|
|
1290
1290
|
class: I([p.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
|
|
1291
1291
|
}, [
|
|
1292
1292
|
F(Ge, { class: "w-6 h-6" })
|
|
1293
1293
|
], 2))
|
|
1294
1294
|
]));
|
|
1295
1295
|
}
|
|
1296
|
-
}),
|
|
1296
|
+
}), nn = { class: "max-w-[55vw]" }, an = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, sn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, rn = { class: "px-[5px]" }, un = { class: "" }, Ye = /* @__PURE__ */ R({
|
|
1297
1297
|
__name: "vs-widget-file-info",
|
|
1298
1298
|
props: {
|
|
1299
1299
|
item: { default: null }
|
|
@@ -1318,33 +1318,33 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { 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",
|
|
1321
|
+
l("div", nn, [
|
|
1322
|
+
l("p", an, G(n.item?.uploaded_name), 1),
|
|
1323
|
+
l("p", sn, [
|
|
1324
1324
|
l("span", null, G(n.item?.username), 1),
|
|
1325
|
-
ne(l("span",
|
|
1325
|
+
ne(l("span", rn, "|", 512), [
|
|
1326
1326
|
[et, n.item?.username]
|
|
1327
1327
|
]),
|
|
1328
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", un, G(a(n.item?.size)), 1)
|
|
1331
1331
|
])
|
|
1332
1332
|
])
|
|
1333
1333
|
], 64));
|
|
1334
1334
|
}
|
|
1335
|
-
}),
|
|
1335
|
+
}), dn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, cn = {
|
|
1336
1336
|
key: 0,
|
|
1337
1337
|
class: "flex w-full gap-x-3 items-center"
|
|
1338
|
-
},
|
|
1338
|
+
}, pn = {
|
|
1339
1339
|
key: 1,
|
|
1340
1340
|
class: "flex gap-x-3 w-full items-center"
|
|
1341
|
-
},
|
|
1341
|
+
}, fn = {
|
|
1342
1342
|
key: 2,
|
|
1343
1343
|
class: "flex gap-x-3 w-full items-center"
|
|
1344
|
-
},
|
|
1344
|
+
}, mn = ["href"], vn = {
|
|
1345
1345
|
key: 3,
|
|
1346
1346
|
class: "flex gap-x-3 w-full items-center"
|
|
1347
|
-
},
|
|
1347
|
+
}, hn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, gn = { 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" }, bn = { class: "inline-block" }, yn = { class: "inline-block" }, xn = /* @__PURE__ */ R({
|
|
1348
1348
|
__name: "vs-widget-file-item",
|
|
1349
1349
|
props: {
|
|
1350
1350
|
item: { default: null },
|
|
@@ -1361,8 +1361,8 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1361
1361
|
return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(c.ext);
|
|
1362
1362
|
}
|
|
1363
1363
|
function r(c) {
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1364
|
+
const m = document.createElement("a");
|
|
1365
|
+
m.setAttribute("download", c?.uploaded_name), m.href = c?.file_path, m.click();
|
|
1366
1366
|
}
|
|
1367
1367
|
async function u() {
|
|
1368
1368
|
try {
|
|
@@ -1383,49 +1383,49 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1383
1383
|
updateListOnConfirm: !0
|
|
1384
1384
|
});
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function f(c) {
|
|
1387
1387
|
(t.item.ext === "jpg" || t.item.ext === "png") && a("openLightbox", { item: t.item, index: c });
|
|
1388
1388
|
}
|
|
1389
|
-
return (c,
|
|
1390
|
-
c.item.ext === "jpg" || c.item.ext === "png" ? (i(), d("div",
|
|
1389
|
+
return (c, m) => (i(), d("div", dn, [
|
|
1390
|
+
c.item.ext === "jpg" || c.item.ext === "png" ? (i(), d("div", cn, [
|
|
1391
1391
|
l("div", {
|
|
1392
1392
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1393
|
-
onClick:
|
|
1393
|
+
onClick: m[0] || (m[0] = (b) => f(c.index))
|
|
1394
1394
|
}, [
|
|
1395
1395
|
F(Ye, { item: c.item }, null, 8, ["item"])
|
|
1396
1396
|
])
|
|
1397
|
-
])) : n(c.item) ? (i(), d("div",
|
|
1397
|
+
])) : n(c.item) ? (i(), d("div", pn, [
|
|
1398
1398
|
F(Ye, { item: c.item }, null, 8, ["item"])
|
|
1399
|
-
])) : s(c.item) ? (i(), d("div",
|
|
1399
|
+
])) : s(c.item) ? (i(), d("div", fn, [
|
|
1400
1400
|
l("a", {
|
|
1401
1401
|
href: `/api/file-preview?id=${c.item.file_id}`,
|
|
1402
1402
|
target: "_blank",
|
|
1403
1403
|
class: "flex gap-x-3 w-full items-center"
|
|
1404
1404
|
}, [
|
|
1405
1405
|
F(Ye, { item: c.item }, null, 8, ["item"])
|
|
1406
|
-
], 8,
|
|
1407
|
-
])) : (i(), d("div",
|
|
1406
|
+
], 8, mn)
|
|
1407
|
+
])) : (i(), d("div", vn, [
|
|
1408
1408
|
F(Ye, { item: c.item }, null, 8, ["item"])
|
|
1409
1409
|
])),
|
|
1410
|
-
l("div",
|
|
1411
|
-
l("div",
|
|
1412
|
-
l("div",
|
|
1410
|
+
l("div", hn, [
|
|
1411
|
+
l("div", gn, [
|
|
1412
|
+
l("div", bn, [
|
|
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
|
-
onClick:
|
|
1415
|
+
onClick: m[1] || (m[1] = (b) => r(c.item))
|
|
1416
1416
|
}, [
|
|
1417
|
-
F(
|
|
1417
|
+
F(Ft, {
|
|
1418
1418
|
height: "14",
|
|
1419
1419
|
width: "14"
|
|
1420
1420
|
})
|
|
1421
1421
|
])
|
|
1422
1422
|
]),
|
|
1423
|
-
|
|
1424
|
-
l("div",
|
|
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", yn, [
|
|
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",
|
|
1428
|
-
onClick:
|
|
1428
|
+
onClick: m[2] || (m[2] = (b) => p())
|
|
1429
1429
|
}, [
|
|
1430
1430
|
F(tt, {
|
|
1431
1431
|
height: "14",
|
|
@@ -1437,7 +1437,7 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { class: "h-[120px] w-[
|
|
|
1437
1437
|
])
|
|
1438
1438
|
]));
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), wn = {}, kn = {
|
|
1441
1441
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1442
1442
|
width: "24",
|
|
1443
1443
|
height: "24",
|
|
@@ -1449,8 +1449,8 @@ const At = /* @__PURE__ */ X(Wo, [["render", Zo]]), Jo = { 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 _n(o, e) {
|
|
1453
|
+
return i(), d("svg", kn, e[0] || (e[0] = [
|
|
1454
1454
|
l("path", {
|
|
1455
1455
|
stroke: "none",
|
|
1456
1456
|
d: "M0 0h24v24H0z",
|
|
@@ -1461,13 +1461,13 @@ function kn(o, e) {
|
|
|
1461
1461
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1462
1462
|
]));
|
|
1463
1463
|
}
|
|
1464
|
-
const
|
|
1464
|
+
const $n = /* @__PURE__ */ X(wn, [["render", _n]]), Cn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Vn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Mn = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Ln = { class1: "ml-auto" }, Sn = { 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" }, Bn = {
|
|
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
|
+
}, jn = { class: "relative" }, En = {
|
|
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
|
+
}, In = { key: 0 }, An = /* @__PURE__ */ R({
|
|
1471
1471
|
__name: "vs-input-file-list",
|
|
1472
1472
|
props: {
|
|
1473
1473
|
id: { default: "" },
|
|
@@ -1482,7 +1482,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1482
1482
|
},
|
|
1483
1483
|
emits: ["update"],
|
|
1484
1484
|
setup(o, { emit: e }) {
|
|
1485
|
-
const t = o, a =
|
|
1485
|
+
const t = o, a = Te("form"), n = B(() => a.value.formId), s = k(!1), r = k(0), u = e, p = k(!1), f = k({}), c = k([]), m = k(""), b = B(() => Array.isArray(c.value) ? c.value.filter((j) => j.ext === "jpg" || j.ext === "png").map((j) => j?.file_path) : []), M = B(() => m.value === "" ? c.value : c.value.filter((j) => j?.uploaded_name?.includes(m.value))), q = (j) => {
|
|
1486
1486
|
const g = b.value.findIndex((x) => x === j.item.file_path);
|
|
1487
1487
|
g !== -1 && (s.value = !0, r.value = g);
|
|
1488
1488
|
}, H = async () => {
|
|
@@ -1513,7 +1513,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1513
1513
|
}
|
|
1514
1514
|
})
|
|
1515
1515
|
), await H();
|
|
1516
|
-
},
|
|
1516
|
+
}, T = (j) => {
|
|
1517
1517
|
const g = { ...j };
|
|
1518
1518
|
return j.cancel || (g.cancel = () => {
|
|
1519
1519
|
p.value = !1;
|
|
@@ -1521,26 +1521,26 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1521
1521
|
await j.confirm(), p.value = !1, H();
|
|
1522
1522
|
}), g;
|
|
1523
1523
|
}, W = (j) => {
|
|
1524
|
-
|
|
1524
|
+
f.value = T(j), p.value = !0;
|
|
1525
1525
|
};
|
|
1526
1526
|
return ue(n, (j) => {
|
|
1527
1527
|
j && H();
|
|
1528
1528
|
}), $e(() => {
|
|
1529
1529
|
n.value && H();
|
|
1530
1530
|
}), (j, g) => {
|
|
1531
|
-
const x =
|
|
1532
|
-
return i(), d("div",
|
|
1533
|
-
l("div",
|
|
1534
|
-
l("h2",
|
|
1535
|
-
l("div",
|
|
1531
|
+
const x = yt("Lightbox"), C = yt("MessageBox");
|
|
1532
|
+
return i(), d("div", Cn, [
|
|
1533
|
+
l("div", Vn, [
|
|
1534
|
+
l("h2", Mn, " Файлів: " + G(c.value?.length), 1),
|
|
1535
|
+
l("div", Ln, [
|
|
1536
1536
|
l("label", null, [
|
|
1537
1537
|
l("input", {
|
|
1538
1538
|
type: "file",
|
|
1539
1539
|
class: "hidden",
|
|
1540
1540
|
onChange: g[0] || (g[0] = (_) => K(_))
|
|
1541
1541
|
}, null, 32),
|
|
1542
|
-
l("div",
|
|
1543
|
-
F(
|
|
1542
|
+
l("div", Sn, [
|
|
1543
|
+
F($n, {
|
|
1544
1544
|
height: "16",
|
|
1545
1545
|
width: "16"
|
|
1546
1546
|
})
|
|
@@ -1548,9 +1548,9 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1548
1548
|
])
|
|
1549
1549
|
])
|
|
1550
1550
|
]),
|
|
1551
|
-
c.value?.length > 4 ? (i(), d("div",
|
|
1551
|
+
c.value?.length > 4 ? (i(), d("div", Bn, [
|
|
1552
1552
|
l("div", null, [
|
|
1553
|
-
l("div",
|
|
1553
|
+
l("div", jn, [
|
|
1554
1554
|
g[8] || (g[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",
|
|
@@ -1574,22 +1574,22 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1574
1574
|
], -1)),
|
|
1575
1575
|
ne(l("input", {
|
|
1576
1576
|
type: "text",
|
|
1577
|
-
"onUpdate:modelValue": g[1] || (g[1] = (_) =>
|
|
1577
|
+
"onUpdate:modelValue": g[1] || (g[1] = (_) => m.value = _),
|
|
1578
1578
|
class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
|
|
1579
1579
|
placeholder: "Введіть назву файлу"
|
|
1580
1580
|
}, null, 512), [
|
|
1581
1581
|
[
|
|
1582
1582
|
ve,
|
|
1583
|
-
|
|
1583
|
+
m.value,
|
|
1584
1584
|
void 0,
|
|
1585
1585
|
{ trim: !0 }
|
|
1586
1586
|
]
|
|
1587
1587
|
])
|
|
1588
1588
|
])
|
|
1589
1589
|
])
|
|
1590
|
-
])) :
|
|
1591
|
-
c.value?.length ? (i(), d("div",
|
|
1592
|
-
(i(!0), d(re, null, me(M.value, (_, O) => (i(), he(
|
|
1590
|
+
])) : A("", !0),
|
|
1591
|
+
c.value?.length ? (i(), d("div", En, [
|
|
1592
|
+
(i(!0), d(re, null, me(M.value, (_, O) => (i(), he(xn, {
|
|
1593
1593
|
key: O,
|
|
1594
1594
|
prefix: j.prefix,
|
|
1595
1595
|
item: _,
|
|
@@ -1598,10 +1598,10 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1598
1598
|
onOpenModal: g[3] || (g[3] = (ee) => W(ee)),
|
|
1599
1599
|
onOpenLightbox: g[4] || (g[4] = (ee) => q(ee))
|
|
1600
1600
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1601
|
-
M.value.length ?
|
|
1601
|
+
M.value.length ? A("", !0) : (i(), d("div", In, g[9] || (g[9] = [
|
|
1602
1602
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1603
1603
|
])))
|
|
1604
|
-
])) :
|
|
1604
|
+
])) : A("", !0),
|
|
1605
1605
|
F(x, {
|
|
1606
1606
|
modelValue: s.value,
|
|
1607
1607
|
"onUpdate:modelValue": g[5] || (g[5] = (_) => s.value = _),
|
|
@@ -1612,12 +1612,12 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1612
1612
|
F(C, Fe({
|
|
1613
1613
|
modelValue: p.value,
|
|
1614
1614
|
"onUpdate:modelValue": g[7] || (g[7] = (_) => p.value = _),
|
|
1615
|
-
onConfirm:
|
|
1616
|
-
},
|
|
1615
|
+
onConfirm: f.value.confirm
|
|
1616
|
+
}, f.value), null, 16, ["modelValue", "onConfirm"])
|
|
1617
1617
|
]);
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
|
-
}), Tn = { class: "flex items-center justify-between" }, zn = { class: "text-[16px] text-gray-900 font-medium" },
|
|
1620
|
+
}), Tn = { class: "flex items-center justify-between" }, zn = { class: "text-[16px] text-gray-900 font-medium" }, Fn = { class: "grid gap-3" }, On = /* @__PURE__ */ R({
|
|
1621
1621
|
__name: "vs-container-switcher",
|
|
1622
1622
|
props: {
|
|
1623
1623
|
title: {
|
|
@@ -1649,9 +1649,9 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1649
1649
|
style: be(o.style)
|
|
1650
1650
|
}, null, 8, ["modelValue", "style"])
|
|
1651
1651
|
]),
|
|
1652
|
-
F(
|
|
1652
|
+
F(it, { name: "slide-fade" }, {
|
|
1653
1653
|
default: Ee(() => [
|
|
1654
|
-
ne(l("div",
|
|
1654
|
+
ne(l("div", Fn, [
|
|
1655
1655
|
Le(a.$slots, "default", {}, void 0, !0)
|
|
1656
1656
|
], 512), [
|
|
1657
1657
|
[et, t.value]
|
|
@@ -1661,7 +1661,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1661
1661
|
})
|
|
1662
1662
|
]));
|
|
1663
1663
|
}
|
|
1664
|
-
}),
|
|
1664
|
+
}), Dn = /* @__PURE__ */ X(On, [["__scopeId", "data-v-90320b87"]]), Un = { class: "text-[16px] text-gray-900 font-medium" }, Pn = { class: "grid gap-3" }, Rn = /* @__PURE__ */ R({
|
|
1665
1665
|
__name: "vs-container-accordion",
|
|
1666
1666
|
props: {
|
|
1667
1667
|
title: {
|
|
@@ -1690,14 +1690,14 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1690
1690
|
onClick: n[0] || (n[0] = (s) => t.value = !t.value),
|
|
1691
1691
|
class: "flex items-center gap-2"
|
|
1692
1692
|
}, [
|
|
1693
|
-
F(te(
|
|
1693
|
+
F(te(Hl), {
|
|
1694
1694
|
class: I(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
|
|
1695
1695
|
}, null, 8, ["class"]),
|
|
1696
|
-
l("span",
|
|
1696
|
+
l("span", Un, G(o.title), 1)
|
|
1697
1697
|
]),
|
|
1698
|
-
F(
|
|
1698
|
+
F(it, { name: "slide-fade" }, {
|
|
1699
1699
|
default: Ee(() => [
|
|
1700
|
-
ne(l("div",
|
|
1700
|
+
ne(l("div", Pn, [
|
|
1701
1701
|
Le(a.$slots, "default", {}, void 0, !0)
|
|
1702
1702
|
], 512), [
|
|
1703
1703
|
[et, t.value]
|
|
@@ -1707,7 +1707,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1707
1707
|
})
|
|
1708
1708
|
]));
|
|
1709
1709
|
}
|
|
1710
|
-
}),
|
|
1710
|
+
}), Hn = /* @__PURE__ */ X(Rn, [["__scopeId", "data-v-590eff11"]]), Nn = { class: "flex items-center justify-between" }, qn = /* @__PURE__ */ R({
|
|
1711
1711
|
__name: "vs-container-default",
|
|
1712
1712
|
props: {
|
|
1713
1713
|
title: {
|
|
@@ -1721,16 +1721,16 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1721
1721
|
},
|
|
1722
1722
|
setup(o) {
|
|
1723
1723
|
return (e, t) => (i(), d("div", null, [
|
|
1724
|
-
l("div",
|
|
1724
|
+
l("div", Nn, [
|
|
1725
1725
|
l("p", null, G(o.title), 1)
|
|
1726
1726
|
]),
|
|
1727
1727
|
Le(e.$slots, "default")
|
|
1728
1728
|
]));
|
|
1729
1729
|
}
|
|
1730
|
-
}),
|
|
1731
|
-
switcher:
|
|
1732
|
-
accordion:
|
|
1733
|
-
default:
|
|
1730
|
+
}), Gn = {
|
|
1731
|
+
switcher: Dn,
|
|
1732
|
+
accordion: Hn,
|
|
1733
|
+
default: qn
|
|
1734
1734
|
}, ke = {
|
|
1735
1735
|
Equal: "==",
|
|
1736
1736
|
Inequal: "!=",
|
|
@@ -1744,37 +1744,37 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1744
1744
|
Contain: "*",
|
|
1745
1745
|
In: "in",
|
|
1746
1746
|
NotIn: "not_in"
|
|
1747
|
-
},
|
|
1747
|
+
}, Wn = (o, e) => String(o) === String(e), Kn = (o, e) => String(o) !== String(e), Zn = (o, e) => o > e, Jn = (o, e) => o >= e, Yn = (o, e) => o < e, Xn = (o, e) => o <= e, Qn = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, ea = (o, e) => String(o).startsWith(String(e)), ta = (o, e) => String(o).endsWith(String(e)), la = (o, e) => String(o).includes(String(e)), oa = (o, e) => Array.isArray(e) ? e.includes(o) : !1, na = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ot = (o, e) => {
|
|
1748
1748
|
if (!e) return !0;
|
|
1749
1749
|
switch (e?.[1]) {
|
|
1750
1750
|
case ke.Equal:
|
|
1751
|
-
return Gn(o, e?.[2]);
|
|
1752
|
-
case ke.Inequal:
|
|
1753
1751
|
return Wn(o, e?.[2]);
|
|
1754
|
-
case ke.
|
|
1752
|
+
case ke.Inequal:
|
|
1755
1753
|
return Kn(o, e?.[2]);
|
|
1756
|
-
case ke.
|
|
1754
|
+
case ke.Higer:
|
|
1757
1755
|
return Zn(o, e?.[2]);
|
|
1758
|
-
case ke.
|
|
1756
|
+
case ke.HigerOrEqual:
|
|
1759
1757
|
return Jn(o, e?.[2]);
|
|
1760
|
-
case ke.
|
|
1758
|
+
case ke.Lower:
|
|
1761
1759
|
return Yn(o, e?.[2]);
|
|
1762
|
-
case ke.
|
|
1760
|
+
case ke.LowerOrEqual:
|
|
1763
1761
|
return Xn(o, e?.[2]);
|
|
1764
|
-
case ke.
|
|
1762
|
+
case ke.Between:
|
|
1765
1763
|
return Qn(o, e?.[2]);
|
|
1766
|
-
case ke.
|
|
1764
|
+
case ke.StartWith:
|
|
1767
1765
|
return ea(o, e?.[2]);
|
|
1768
|
-
case ke.
|
|
1766
|
+
case ke.EndWith:
|
|
1769
1767
|
return ta(o, e?.[2]);
|
|
1770
|
-
case ke.
|
|
1768
|
+
case ke.Contain:
|
|
1771
1769
|
return la(o, e?.[2]);
|
|
1772
|
-
case ke.
|
|
1770
|
+
case ke.In:
|
|
1773
1771
|
return oa(o, e?.[2]);
|
|
1772
|
+
case ke.NotIn:
|
|
1773
|
+
return na(o, e?.[2]);
|
|
1774
1774
|
default:
|
|
1775
1775
|
return !0;
|
|
1776
1776
|
}
|
|
1777
|
-
},
|
|
1777
|
+
}, aa = /* @__PURE__ */ R({
|
|
1778
1778
|
__name: "vs-input-container",
|
|
1779
1779
|
props: {
|
|
1780
1780
|
style: {
|
|
@@ -1789,50 +1789,63 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1789
1789
|
type: String,
|
|
1790
1790
|
default: "default"
|
|
1791
1791
|
},
|
|
1792
|
+
name: {
|
|
1793
|
+
type: String,
|
|
1794
|
+
default: ""
|
|
1795
|
+
},
|
|
1792
1796
|
schema: {
|
|
1793
1797
|
type: Array,
|
|
1794
1798
|
default: () => []
|
|
1795
1799
|
}
|
|
1796
1800
|
},
|
|
1797
1801
|
setup(o) {
|
|
1798
|
-
const e = o, t =
|
|
1799
|
-
const
|
|
1800
|
-
if (!
|
|
1801
|
-
const
|
|
1802
|
-
return
|
|
1803
|
-
})), s = B(() =>
|
|
1804
|
-
|
|
1802
|
+
const e = o, t = Te("values", k({})), a = Te("form"), n = B(() => e.schema?.filter((u) => {
|
|
1803
|
+
const p = u?.conditions;
|
|
1804
|
+
if (!p) return !0;
|
|
1805
|
+
const f = Array.isArray(p) ? p[0] : p, c = e.name ? t.value?.[e.name]?.[f] ?? t.value?.[f] : t.value?.[f];
|
|
1806
|
+
return Ot(c, p);
|
|
1807
|
+
})), s = B(() => Gn[e.view]), r = B(() => {
|
|
1808
|
+
if (t.value || (t.value = {}), !e.name) return t.value;
|
|
1809
|
+
const u = t.value[e.name];
|
|
1810
|
+
if (u) return u;
|
|
1811
|
+
const p = {};
|
|
1812
|
+
return t.value = {
|
|
1813
|
+
...t.value,
|
|
1814
|
+
[e.name]: p
|
|
1815
|
+
}, p;
|
|
1816
|
+
});
|
|
1817
|
+
return (u, p) => o.schema?.length ? (i(), he(Oe(s.value), {
|
|
1805
1818
|
key: 0,
|
|
1806
1819
|
title: o.title,
|
|
1807
1820
|
style: be(o.style)
|
|
1808
1821
|
}, {
|
|
1809
1822
|
default: Ee(() => [
|
|
1810
|
-
(i(!0), d(re, null, me(n.value, (
|
|
1811
|
-
key:
|
|
1812
|
-
}, { ref_for: !0 },
|
|
1813
|
-
item:
|
|
1814
|
-
modelValue:
|
|
1815
|
-
"onUpdate:modelValue": (
|
|
1823
|
+
(i(!0), d(re, null, me(n.value, (f) => (i(), he(Dt, Fe({
|
|
1824
|
+
key: f.name
|
|
1825
|
+
}, { ref_for: !0 }, f, {
|
|
1826
|
+
item: f,
|
|
1827
|
+
modelValue: r.value[f.name],
|
|
1828
|
+
"onUpdate:modelValue": (c) => r.value[f.name] = c,
|
|
1816
1829
|
style: o.style,
|
|
1817
|
-
error: te(a)?.errors?.[
|
|
1830
|
+
error: te(a)?.errors?.[f.name]
|
|
1818
1831
|
}), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
|
|
1819
1832
|
]),
|
|
1820
1833
|
_: 1
|
|
1821
|
-
}, 8, ["title", "style"])) :
|
|
1834
|
+
}, 8, ["title", "style"])) : A("", !0);
|
|
1822
1835
|
}
|
|
1823
|
-
}),
|
|
1836
|
+
}), sa = ["aria-expanded", "data-focus"], ra = {
|
|
1824
1837
|
key: 0,
|
|
1825
1838
|
class: "flex flex-wrap items-center gap-1 max-h-20 overflow-y-auto min-w-0 flex-1"
|
|
1826
|
-
},
|
|
1839
|
+
}, ia = { class: "flex items-center min-w-0" }, ua = ["title"], da = ["innerHTML"], ca = ["onClick"], pa = { class: "flex-1 min-w-[2px]" }, fa = ["placeholder"], ma = ["title"], va = ["innerHTML"], ha = {
|
|
1827
1840
|
key: 2,
|
|
1828
1841
|
class: "text-gray-500 truncate"
|
|
1829
|
-
},
|
|
1842
|
+
}, ga = {
|
|
1830
1843
|
key: 3,
|
|
1831
1844
|
class: "flex-1 min-w-[2px]"
|
|
1832
|
-
},
|
|
1845
|
+
}, ba = ["placeholder"], ya = { class: "flex items-center shrink-0" }, xa = ["disabled"], wa = ["disabled", "title"], ka = ["aria-disabled", "onClick"], _a = ["innerHTML"], $a = {
|
|
1833
1846
|
key: 1,
|
|
1834
1847
|
class: "px-3 py-2 text-center text-gray-500"
|
|
1835
|
-
},
|
|
1848
|
+
}, Ca = ["disabled"], Vt = /* @__PURE__ */ R({
|
|
1836
1849
|
__name: "vs-input-select",
|
|
1837
1850
|
props: {
|
|
1838
1851
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -1867,14 +1880,14 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1867
1880
|
set: (v) => a("update:modelValue", v)
|
|
1868
1881
|
});
|
|
1869
1882
|
!r.value && t.defaultValue && (r.value = t.defaultValue);
|
|
1870
|
-
const u = k(null), p = k(null),
|
|
1883
|
+
const u = k(null), p = k(null), f = k(null), c = k(null), m = k(!1), b = k(!1), M = k(null), q = k([]), H = k(-1), K = k([]), T = k(""), W = k(null), j = k("bottom"), g = k({}), x = k([]), C = B(() => {
|
|
1871
1884
|
if (!x.value.length) return [];
|
|
1872
1885
|
const v = q.value, y = new Map(v.map((w) => [w.id?.toString(), w]));
|
|
1873
1886
|
return x.value.map((w) => y.get(w?.toString())).filter((w) => !!w);
|
|
1874
|
-
}), _ = B(() => t.placeholder || "Select..."), O = B(() => D(M.value)), ee = B(() => n.value ? !x.value.length &&
|
|
1887
|
+
}), _ = B(() => t.placeholder || "Select..."), O = B(() => D(M.value)), ee = B(() => n.value ? !x.value.length && T.value === "" : !O.value && T.value === ""), Q = B(() => s.value ? !1 : n.value ? x.value.length > 0 : !!r.value), V = (v) => n.value ? x.value.some((y) => y?.toString() === v?.toString()) : r.value?.toString() === v?.toString(), P = B(() => {
|
|
1875
1888
|
let v = q.value ?? [];
|
|
1876
|
-
if (!t.data &&
|
|
1877
|
-
const y =
|
|
1889
|
+
if (!t.data && T.value.trim() !== "") {
|
|
1890
|
+
const y = T.value.toLowerCase();
|
|
1878
1891
|
v = v.filter((w) => {
|
|
1879
1892
|
const N = D(w).toLowerCase(), se = w.text?.toLowerCase?.() || "";
|
|
1880
1893
|
return N.includes(y) || se.includes(y);
|
|
@@ -1885,7 +1898,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1885
1898
|
v = v.filter((w) => !y.has(w.id?.toString()));
|
|
1886
1899
|
}
|
|
1887
1900
|
return v;
|
|
1888
|
-
}), Y =
|
|
1901
|
+
}), Y = Te("values"), Z = /\{\{\s*([^}]+?)\s*\}\}/g, z = (v) => (v ? String(v) : "").replace(/<[^>]*>/g, "").trim(), E = B(() => t.slot ?? t?.optionTemplate ?? ""), S = (v) => {
|
|
1889
1902
|
if (!v) return "";
|
|
1890
1903
|
const y = E.value;
|
|
1891
1904
|
return y ? y.replace(Z, (w, N) => {
|
|
@@ -1896,7 +1909,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1896
1909
|
if (!v) return "";
|
|
1897
1910
|
if (!E.value) return v.text ?? "";
|
|
1898
1911
|
const w = S(v);
|
|
1899
|
-
return
|
|
1912
|
+
return z(w) || v.text || "";
|
|
1900
1913
|
}, le = (v) => {
|
|
1901
1914
|
t.set && Y?.value && Object.entries(t.set).forEach(([y, w]) => {
|
|
1902
1915
|
if (!y) return;
|
|
@@ -1917,12 +1930,12 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1917
1930
|
}
|
|
1918
1931
|
try {
|
|
1919
1932
|
const y = t.host ?? "", w = t.prefix ?? "api", N = t.api ?? `/${w}/suggest/${t.data}`, se = `${y}${N}`, fe = new URLSearchParams();
|
|
1920
|
-
return fe.set("json", "1"), v && fe.set("key", v), ce.value !== void 0 && ce.value !== null && ce.value !== "" && fe.set("parent", ce.value), (await fetch(`${se}?${fe.toString()}`).then((
|
|
1933
|
+
return fe.set("json", "1"), v && fe.set("key", v), ce.value !== void 0 && ce.value !== null && ce.value !== "" && fe.set("parent", ce.value), (await fetch(`${se}?${fe.toString()}`).then((Ae) => Ae.json()))?.data ?? [];
|
|
1921
1934
|
} catch {
|
|
1922
1935
|
return [];
|
|
1923
1936
|
}
|
|
1924
1937
|
}, De = async () => {
|
|
1925
|
-
t.data ? q.value = await xe(
|
|
1938
|
+
t.data ? q.value = await xe(T.value) : q.value = t.options ? [...t.options] : [];
|
|
1926
1939
|
}, Ke = async (v) => {
|
|
1927
1940
|
if (v == null) return null;
|
|
1928
1941
|
const y = q.value?.find((w) => w?.id?.toString() === String(v));
|
|
@@ -1943,24 +1956,24 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1943
1956
|
fe && q.value.push(fe);
|
|
1944
1957
|
}, Promise.resolve());
|
|
1945
1958
|
}, Ue = async () => {
|
|
1946
|
-
s.value || (
|
|
1959
|
+
s.value || (m.value = !0, await De(), await je(() => {
|
|
1947
1960
|
Ve(), W.value?.focus(), P.value.length ? H.value = 0 : H.value = -1;
|
|
1948
1961
|
}));
|
|
1949
1962
|
}, Se = () => {
|
|
1950
|
-
|
|
1951
|
-
},
|
|
1963
|
+
m.value = !1, H.value = -1;
|
|
1964
|
+
}, ze = async (v) => {
|
|
1952
1965
|
if (s.value) return;
|
|
1953
|
-
!
|
|
1966
|
+
!m.value ? await Ue() : Se();
|
|
1954
1967
|
}, h = async () => {
|
|
1955
|
-
|
|
1968
|
+
m.value ? W.value?.focus() : await Ue();
|
|
1956
1969
|
}, $ = () => {
|
|
1957
|
-
n.value ? (x.value = [], r.value = [], a("change", [])) : (M.value = null, r.value = null, a("change", null)), le(null),
|
|
1970
|
+
n.value ? (x.value = [], r.value = [], a("change", [])) : (M.value = null, r.value = null, a("change", null)), le(null), T.value = "", je(() => W.value?.focus());
|
|
1958
1971
|
}, J = (v) => {
|
|
1959
1972
|
n.value && (x.value = x.value.filter((y) => y?.toString() !== v?.toString()), r.value = [...x.value], a("change", r.value), je(() => W.value?.focus()));
|
|
1960
1973
|
}, U = (v) => {
|
|
1961
|
-
n.value ? (V(v.id) || (x.value = [...x.value, v.id], r.value = [...x.value], a("change", r.value)),
|
|
1974
|
+
n.value ? (V(v.id) || (x.value = [...x.value, v.id], r.value = [...x.value], a("change", r.value)), T.value = "", je(() => {
|
|
1962
1975
|
W.value?.focus(), H.value = Math.min(H.value, P.value.length - 1);
|
|
1963
|
-
}), le(null)) : (M.value = v, r.value = v.id, a("change", r.value),
|
|
1976
|
+
}), le(null)) : (M.value = v, r.value = v.id, a("change", r.value), T.value = "", Se(), le(v));
|
|
1964
1977
|
}, ae = (v) => {
|
|
1965
1978
|
V(v.id) || U(v);
|
|
1966
1979
|
}, oe = (v, y) => {
|
|
@@ -1968,8 +1981,8 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1968
1981
|
const w = v.offsetTop, N = w + v.offsetHeight, se = y.scrollTop, fe = se + y.clientHeight;
|
|
1969
1982
|
let we = y.scrollTop;
|
|
1970
1983
|
w < se ? we = w - 80 : N > fe && (we = N - y.clientHeight + 4);
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1984
|
+
const Ae = y;
|
|
1985
|
+
Ae.scrollTop = we;
|
|
1973
1986
|
}, Me = (v) => {
|
|
1974
1987
|
let y = v.parentElement;
|
|
1975
1988
|
for (; y; ) {
|
|
@@ -1983,53 +1996,53 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
1983
1996
|
return document.body;
|
|
1984
1997
|
}, Ve = () => {
|
|
1985
1998
|
if (!p.value) return;
|
|
1986
|
-
const v = p.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, w = window.innerWidth || document.documentElement.clientWidth, N = 8, se = 8, fe = t.maxHeight || 300, we = y - v.bottom - se - N,
|
|
1999
|
+
const v = p.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, w = window.innerWidth || document.documentElement.clientWidth, N = 8, se = 8, fe = t.maxHeight || 300, we = y - v.bottom - se - N, Ae = v.top - se - N, Pe = we >= Ae, Re = Math.max(w - N * 2, 0);
|
|
1987
2000
|
let { width: He } = v;
|
|
1988
2001
|
Re > 0 && He > Re && (He = Re);
|
|
1989
2002
|
let { left: Ne } = v;
|
|
1990
2003
|
Ne + He + N > w && (Ne = w - He - N), Ne = Math.max(Ne, N);
|
|
1991
|
-
const
|
|
2004
|
+
const qt = Math.min(
|
|
1992
2005
|
fe,
|
|
1993
|
-
Math.max(Pe ? we :
|
|
2006
|
+
Math.max(Pe ? we : Ae, 50)
|
|
1994
2007
|
);
|
|
1995
2008
|
j.value = Pe ? "bottom" : "top", g.value = {
|
|
1996
2009
|
position: "fixed",
|
|
1997
2010
|
left: `${Ne}px`,
|
|
1998
2011
|
width: `${He}px`,
|
|
1999
2012
|
minWidth: "300px",
|
|
2000
|
-
maxHeight: `${
|
|
2013
|
+
maxHeight: `${qt}px`,
|
|
2001
2014
|
transform: Pe ? "none" : "translateY(-100%)",
|
|
2002
2015
|
top: Pe ? `${v.bottom + se}px` : `${v.top - se}px`
|
|
2003
2016
|
};
|
|
2004
2017
|
}, Ie = async (v) => {
|
|
2005
|
-
s.value || !
|
|
2018
|
+
s.value || !m.value && (v.key === "ArrowDown" || v.key === "ArrowUp") && (v.preventDefault(), await Ue());
|
|
2006
2019
|
}, Be = (v) => {
|
|
2007
|
-
if (!
|
|
2020
|
+
if (!m.value) return;
|
|
2008
2021
|
const { key: y } = v;
|
|
2009
2022
|
if (y === "ArrowDown")
|
|
2010
|
-
v.preventDefault(), H.value + 1 < P.value.length && (H.value += 1, oe(K.value[H.value],
|
|
2023
|
+
v.preventDefault(), H.value + 1 < P.value.length && (H.value += 1, oe(K.value[H.value], f.value));
|
|
2011
2024
|
else if (y === "ArrowUp")
|
|
2012
|
-
v.preventDefault(), H.value > 0 && (H.value -= 1, oe(K.value[H.value],
|
|
2025
|
+
v.preventDefault(), H.value > 0 && (H.value -= 1, oe(K.value[H.value], f.value));
|
|
2013
2026
|
else if (y === "Enter") {
|
|
2014
2027
|
v.preventDefault();
|
|
2015
2028
|
const w = P.value[H.value];
|
|
2016
2029
|
w && U(w), W.value?.blur();
|
|
2017
|
-
} else y === "Escape" ? (v.preventDefault(), Se()) : y === "Backspace" ? n.value &&
|
|
2018
|
-
}, it = () => {
|
|
2019
|
-
s.value || (b.value = !0);
|
|
2030
|
+
} else y === "Escape" ? (v.preventDefault(), Se()) : y === "Backspace" ? n.value && T.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], a("change", r.value)) : y === "Home" ? (H.value = 0, oe(K.value[0], f.value)) : y === "End" ? (H.value = P.value.length - 1, oe(K.value[H.value], f.value)) : y === "Tab" && Se();
|
|
2020
2031
|
}, ut = () => {
|
|
2021
|
-
|
|
2022
|
-
}, dt = (
|
|
2023
|
-
|
|
2032
|
+
s.value || (b.value = !0);
|
|
2033
|
+
}, dt = () => {
|
|
2034
|
+
b.value = !1, T.value = "";
|
|
2024
2035
|
}, ct = (v) => {
|
|
2036
|
+
v.key === "Escape" && m.value && Se();
|
|
2037
|
+
}, pt = (v) => {
|
|
2025
2038
|
const y = v.target;
|
|
2026
2039
|
u.value?.contains(y) || c.value?.contains(y) || Se();
|
|
2027
|
-
},
|
|
2028
|
-
|
|
2029
|
-
}, ft = () => {
|
|
2030
|
-
f.value && Ve();
|
|
2040
|
+
}, ft = (v) => {
|
|
2041
|
+
m.value && f.value && !f.value.contains(v.target) && Ve();
|
|
2031
2042
|
}, mt = () => {
|
|
2032
|
-
|
|
2043
|
+
m.value && Ve();
|
|
2044
|
+
}, vt = () => {
|
|
2045
|
+
m.value && Ve();
|
|
2033
2046
|
};
|
|
2034
2047
|
ue(() => t.options, (v) => {
|
|
2035
2048
|
v?.length && (q.value = [...v], Ze());
|
|
@@ -2048,13 +2061,13 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2048
2061
|
ue(r, () => {
|
|
2049
2062
|
Ze();
|
|
2050
2063
|
}), $e(async () => {
|
|
2051
|
-
addEventListener("keydown",
|
|
2064
|
+
addEventListener("keydown", ct), addEventListener("scroll", ft, !0), addEventListener("resize", mt), document.addEventListener("click", pt, !0), p.value && Me(p.value).addEventListener("scroll", vt, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await xe("")), await Ze(), bt.value = !1;
|
|
2052
2065
|
}), Qe(() => {
|
|
2053
|
-
removeEventListener("keydown",
|
|
2066
|
+
removeEventListener("keydown", ct), removeEventListener("scroll", ft, !0), removeEventListener("resize", mt), document.removeEventListener("click", pt, !0), p.value && Me(p.value).removeEventListener("scroll", vt, !0);
|
|
2054
2067
|
});
|
|
2055
|
-
const Je = k(!1), ot = k({}),
|
|
2056
|
-
async function
|
|
2057
|
-
if (!t.add?.token ||
|
|
2068
|
+
const Je = k(!1), ot = k({}), ht = k([]), gt = k(null);
|
|
2069
|
+
async function Pt() {
|
|
2070
|
+
if (!t.add?.token || gt?.value.validate())
|
|
2058
2071
|
return;
|
|
2059
2072
|
const y = t.add.api ?? `/api/table/${t.add.token}`, { id: w } = await fetch(y, {
|
|
2060
2073
|
method: "POST",
|
|
@@ -2067,46 +2080,46 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2067
2080
|
}
|
|
2068
2081
|
Je.value = !1, pe({ title: "Success!", message: "Object created." });
|
|
2069
2082
|
}
|
|
2070
|
-
async function
|
|
2083
|
+
async function Rt() {
|
|
2071
2084
|
if (!t.add) return null;
|
|
2072
2085
|
const v = await fetch(`/api/template/form/${t.add.form}`).then((y) => y.json());
|
|
2073
|
-
return
|
|
2086
|
+
return ht.value = v.schema, Je.value = !0, null;
|
|
2074
2087
|
}
|
|
2075
|
-
function
|
|
2088
|
+
function Ht(v, y = 200) {
|
|
2076
2089
|
let w;
|
|
2077
2090
|
return (...N) => {
|
|
2078
2091
|
w && clearTimeout(w), w = window.setTimeout(() => v(...N), y);
|
|
2079
2092
|
};
|
|
2080
2093
|
}
|
|
2081
|
-
const
|
|
2094
|
+
const Nt = Ht(async (v) => {
|
|
2082
2095
|
q.value = await xe(v);
|
|
2083
2096
|
}, 200);
|
|
2084
|
-
ue(
|
|
2085
|
-
t.data &&
|
|
2097
|
+
ue(T, (v) => {
|
|
2098
|
+
t.data && Nt(v.trim());
|
|
2086
2099
|
}), ue(() => t.options, (v) => {
|
|
2087
2100
|
!t.data && v?.length && (q.value = [...v], Ze());
|
|
2088
2101
|
}, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
|
|
2089
2102
|
t.data && De();
|
|
2090
2103
|
});
|
|
2091
|
-
const
|
|
2104
|
+
const bt = k(!0);
|
|
2092
2105
|
return ue(ce, async () => {
|
|
2093
|
-
t.data && (
|
|
2106
|
+
t.data && (bt.value || (n.value ? (x.value = [], r.value = [], a("change", [])) : (M.value = null, r.value = null, a("change", null))), await De());
|
|
2094
2107
|
}), (v, y) => (i(), d(re, null, [
|
|
2095
|
-
F(te(
|
|
2108
|
+
F(te(It), {
|
|
2096
2109
|
visible: Je.value,
|
|
2097
2110
|
"onUpdate:visible": y[1] || (y[1] = (w) => Je.value = w),
|
|
2098
2111
|
title: "Додати",
|
|
2099
2112
|
buttonText: "Додати",
|
|
2100
|
-
onDone:
|
|
2113
|
+
onDone: Pt,
|
|
2101
2114
|
teleport: v.teleport
|
|
2102
2115
|
}, {
|
|
2103
2116
|
default: Ee(() => [
|
|
2104
2117
|
F(We, {
|
|
2105
|
-
schema:
|
|
2118
|
+
schema: ht.value,
|
|
2106
2119
|
modelValue: ot.value,
|
|
2107
2120
|
"onUpdate:modelValue": y[0] || (y[0] = (w) => ot.value = w),
|
|
2108
2121
|
ref_key: "addForm",
|
|
2109
|
-
ref:
|
|
2122
|
+
ref: gt
|
|
2110
2123
|
}, null, 8, ["schema", "modelValue"])
|
|
2111
2124
|
]),
|
|
2112
2125
|
_: 1
|
|
@@ -2136,43 +2149,43 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2136
2149
|
class: I([
|
|
2137
2150
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
2138
2151
|
"border-gray-300 hover:border-gray-400",
|
|
2139
|
-
|
|
2152
|
+
m.value || b.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
2140
2153
|
s.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
2141
2154
|
]),
|
|
2142
2155
|
role: "combobox",
|
|
2143
|
-
"aria-expanded":
|
|
2156
|
+
"aria-expanded": m.value,
|
|
2144
2157
|
"aria-haspopup": "listbox",
|
|
2145
2158
|
onKeydown: Ie,
|
|
2146
2159
|
onClick: h,
|
|
2147
|
-
"data-focus":
|
|
2160
|
+
"data-focus": m.value || b.value ? "true" : "false"
|
|
2148
2161
|
}, [
|
|
2149
2162
|
l("div", {
|
|
2150
|
-
class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
2163
|
+
class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden h-full",
|
|
2151
2164
|
ref_key: "triggerRef",
|
|
2152
2165
|
ref: p
|
|
2153
2166
|
}, [
|
|
2154
|
-
n.value ? (i(), d("div",
|
|
2167
|
+
n.value ? (i(), d("div", ra, [
|
|
2155
2168
|
(i(!0), d(re, null, me(C.value, (w) => (i(), d("div", {
|
|
2156
2169
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
|
|
2157
2170
|
key: w.id
|
|
2158
2171
|
}, [
|
|
2159
|
-
l("div",
|
|
2172
|
+
l("div", ia, [
|
|
2160
2173
|
w?.color ? (i(), d("span", {
|
|
2161
2174
|
key: 0,
|
|
2162
2175
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
|
|
2163
2176
|
style: be({ backgroundColor: w?.color })
|
|
2164
|
-
}, null, 4)) :
|
|
2177
|
+
}, null, 4)) : A("", !0),
|
|
2165
2178
|
l("div", {
|
|
2166
|
-
class: "truncate text-gray-900 overflow-hidden max-w-[200px]",
|
|
2179
|
+
class: "truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",
|
|
2167
2180
|
title: D(w)
|
|
2168
2181
|
}, [
|
|
2169
2182
|
E.value ? (i(), d("span", {
|
|
2170
2183
|
key: 0,
|
|
2171
2184
|
innerHTML: S(w)
|
|
2172
|
-
}, null, 8,
|
|
2185
|
+
}, null, 8, da)) : (i(), d(re, { key: 1 }, [
|
|
2173
2186
|
ge(G(w.text), 1)
|
|
2174
2187
|
], 64))
|
|
2175
|
-
], 8,
|
|
2188
|
+
], 8, ua)
|
|
2176
2189
|
]),
|
|
2177
2190
|
l("div", {
|
|
2178
2191
|
role: "button",
|
|
@@ -2189,9 +2202,9 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2189
2202
|
}, [
|
|
2190
2203
|
l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2191
2204
|
], -1)
|
|
2192
|
-
]), 8,
|
|
2205
|
+
]), 8, ca)
|
|
2193
2206
|
]))), 128)),
|
|
2194
|
-
l("div",
|
|
2207
|
+
l("div", pa, [
|
|
2195
2208
|
!s.value && v.search ? ne((i(), d("input", {
|
|
2196
2209
|
key: 0,
|
|
2197
2210
|
ref_key: "inputRef",
|
|
@@ -2205,15 +2218,15 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2205
2218
|
tabindex: "0",
|
|
2206
2219
|
"aria-autocomplete": "list",
|
|
2207
2220
|
placeholder: x.value.length ? " " : _.value,
|
|
2208
|
-
"onUpdate:modelValue": y[2] || (y[2] = (w) =>
|
|
2209
|
-
onFocus:
|
|
2210
|
-
onBlur:
|
|
2221
|
+
"onUpdate:modelValue": y[2] || (y[2] = (w) => T.value = w),
|
|
2222
|
+
onFocus: ut,
|
|
2223
|
+
onBlur: dt,
|
|
2211
2224
|
onKeydown: Be
|
|
2212
|
-
}, null, 40,
|
|
2213
|
-
[ve,
|
|
2214
|
-
]) :
|
|
2225
|
+
}, null, 40, fa)), [
|
|
2226
|
+
[ve, T.value]
|
|
2227
|
+
]) : A("", !0)
|
|
2215
2228
|
])
|
|
2216
|
-
])) : !n.value && !b.value && O.value &&
|
|
2229
|
+
])) : !n.value && !b.value && O.value && T.value === "" ? (i(), d("div", {
|
|
2217
2230
|
key: 1,
|
|
2218
2231
|
class: I(["truncate text-gray-900"]),
|
|
2219
2232
|
title: O.value
|
|
@@ -2222,18 +2235,18 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2222
2235
|
key: 0,
|
|
2223
2236
|
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
|
|
2224
2237
|
style: be({ backgroundColor: M.value?.color })
|
|
2225
|
-
}, null, 4)) :
|
|
2238
|
+
}, null, 4)) : A("", !0),
|
|
2226
2239
|
E.value ? (i(), d("span", {
|
|
2227
2240
|
key: 1,
|
|
2228
2241
|
class: I({ "pl-5": M.value?.color }),
|
|
2229
2242
|
innerHTML: S(M.value)
|
|
2230
|
-
}, null, 10,
|
|
2243
|
+
}, null, 10, va)) : (i(), d("span", {
|
|
2231
2244
|
key: 2,
|
|
2232
2245
|
class: I({ "pl-5": M.value?.color })
|
|
2233
2246
|
}, G(M.value?.text), 3))
|
|
2234
|
-
], 8,
|
|
2235
|
-
ee.value ? (i(), d("div",
|
|
2236
|
-
n.value ?
|
|
2247
|
+
], 8, ma)) : A("", !0),
|
|
2248
|
+
ee.value ? (i(), d("div", ha, G(_.value), 1)) : A("", !0),
|
|
2249
|
+
n.value ? A("", !0) : (i(), d("div", ga, [
|
|
2237
2250
|
!s.value && v.search ? ne((i(), d("input", {
|
|
2238
2251
|
key: 0,
|
|
2239
2252
|
ref_key: "inputRef",
|
|
@@ -2246,17 +2259,17 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2246
2259
|
type: "text",
|
|
2247
2260
|
tabindex: "0",
|
|
2248
2261
|
"aria-autocomplete": "list",
|
|
2249
|
-
placeholder: b.value && !
|
|
2250
|
-
"onUpdate:modelValue": y[3] || (y[3] = (w) =>
|
|
2251
|
-
onFocus:
|
|
2252
|
-
onBlur:
|
|
2262
|
+
placeholder: b.value && !T.value?.length && O.value || " ",
|
|
2263
|
+
"onUpdate:modelValue": y[3] || (y[3] = (w) => T.value = w),
|
|
2264
|
+
onFocus: ut,
|
|
2265
|
+
onBlur: dt,
|
|
2253
2266
|
onKeydown: Be
|
|
2254
|
-
}, null, 40,
|
|
2255
|
-
[ve,
|
|
2256
|
-
]) :
|
|
2267
|
+
}, null, 40, ba)), [
|
|
2268
|
+
[ve, T.value]
|
|
2269
|
+
]) : A("", !0)
|
|
2257
2270
|
]))
|
|
2258
2271
|
], 512),
|
|
2259
|
-
l("div",
|
|
2272
|
+
l("div", ya, [
|
|
2260
2273
|
Q.value ? (i(), d("button", {
|
|
2261
2274
|
key: 0,
|
|
2262
2275
|
type: "button",
|
|
@@ -2273,15 +2286,15 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2273
2286
|
}, [
|
|
2274
2287
|
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" })
|
|
2275
2288
|
], -1)
|
|
2276
|
-
]), 8,
|
|
2289
|
+
]), 8, xa)) : A("", !0),
|
|
2277
2290
|
y[9] || (y[9] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2278
2291
|
l("button", {
|
|
2279
2292
|
type: "button",
|
|
2280
2293
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2281
2294
|
"aria-hidden": "true",
|
|
2282
2295
|
disabled: s.value,
|
|
2283
|
-
onClick: y[4] || (y[4] = _e((w) =>
|
|
2284
|
-
title:
|
|
2296
|
+
onClick: y[4] || (y[4] = _e((w) => ze(), ["stop"])),
|
|
2297
|
+
title: m.value ? "Закрити список" : "Відкрити список"
|
|
2285
2298
|
}, y[8] || (y[8] = [
|
|
2286
2299
|
l("svg", {
|
|
2287
2300
|
height: "20",
|
|
@@ -2291,11 +2304,11 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2291
2304
|
}, [
|
|
2292
2305
|
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" })
|
|
2293
2306
|
], -1)
|
|
2294
|
-
]), 8,
|
|
2307
|
+
]), 8, wa)
|
|
2295
2308
|
])
|
|
2296
|
-
], 42,
|
|
2297
|
-
(i(), he(
|
|
2298
|
-
|
|
2309
|
+
], 42, sa),
|
|
2310
|
+
(i(), he(Et, { to: "body" }, [
|
|
2311
|
+
m.value ? (i(), d("div", {
|
|
2299
2312
|
key: 0,
|
|
2300
2313
|
ref_key: "dropdownRef",
|
|
2301
2314
|
ref: c,
|
|
@@ -2309,7 +2322,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2309
2322
|
class: "overflow-y-auto py-1",
|
|
2310
2323
|
style: be({ maxHeight: g.value.maxHeight || "300px" }),
|
|
2311
2324
|
ref_key: "listRef",
|
|
2312
|
-
ref:
|
|
2325
|
+
ref: f
|
|
2313
2326
|
}, [
|
|
2314
2327
|
P.value.length ? (i(!0), d(re, { key: 0 }, me(P.value, (w, N) => (i(), d("div", {
|
|
2315
2328
|
key: w.id,
|
|
@@ -2329,7 +2342,7 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2329
2342
|
key: 0,
|
|
2330
2343
|
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2331
2344
|
style: be({ backgroundColor: w?.color })
|
|
2332
|
-
}, null, 4)) :
|
|
2345
|
+
}, null, 4)) : A("", !0),
|
|
2333
2346
|
l("div", {
|
|
2334
2347
|
class: I([
|
|
2335
2348
|
"leading-[19px]",
|
|
@@ -2341,18 +2354,18 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2341
2354
|
E.value ? (i(), d("span", {
|
|
2342
2355
|
key: 0,
|
|
2343
2356
|
innerHTML: S(w)
|
|
2344
|
-
}, null, 8,
|
|
2357
|
+
}, null, 8, _a)) : (i(), d(re, { key: 1 }, [
|
|
2345
2358
|
ge(G(w.text), 1)
|
|
2346
2359
|
], 64))
|
|
2347
2360
|
], 2)
|
|
2348
|
-
], 10,
|
|
2361
|
+
], 10, ka))), 128)) : (i(), d("div", $a, " No options "))
|
|
2349
2362
|
], 4)
|
|
2350
|
-
], 4)) :
|
|
2363
|
+
], 4)) : A("", !0)
|
|
2351
2364
|
]))
|
|
2352
2365
|
], 2),
|
|
2353
2366
|
t.add ? (i(), d("button", {
|
|
2354
2367
|
key: 0,
|
|
2355
|
-
onClick:
|
|
2368
|
+
onClick: Rt,
|
|
2356
2369
|
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",
|
|
2357
2370
|
disabled: s.value,
|
|
2358
2371
|
type: "button"
|
|
@@ -2362,11 +2375,11 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2362
2375
|
height: "16"
|
|
2363
2376
|
}),
|
|
2364
2377
|
y[12] || (y[12] = l("span", null, "Додати", -1))
|
|
2365
|
-
], 8,
|
|
2378
|
+
], 8, Ca)) : A("", !0)
|
|
2366
2379
|
], 512)
|
|
2367
2380
|
], 64));
|
|
2368
2381
|
}
|
|
2369
|
-
}),
|
|
2382
|
+
}), Va = ["placeholder", "disabled"], Ma = /* @__PURE__ */ R({
|
|
2370
2383
|
__name: "vs-input-textarea",
|
|
2371
2384
|
props: /* @__PURE__ */ ie({
|
|
2372
2385
|
style: { default: () => ({}) },
|
|
@@ -2392,11 +2405,11 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2392
2405
|
style: {
|
|
2393
2406
|
border: "1px solid #CFD9E0"
|
|
2394
2407
|
}
|
|
2395
|
-
}, null, 10,
|
|
2408
|
+
}, null, 10, Va)), [
|
|
2396
2409
|
[ve, a.value]
|
|
2397
2410
|
]);
|
|
2398
2411
|
}
|
|
2399
|
-
}),
|
|
2412
|
+
}), La = {}, Sa = {
|
|
2400
2413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2401
2414
|
viewBox: "0 0 24 24",
|
|
2402
2415
|
fill: "none",
|
|
@@ -2406,8 +2419,8 @@ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col
|
|
|
2406
2419
|
"stroke-linejoin": "round",
|
|
2407
2420
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2408
2421
|
};
|
|
2409
|
-
function
|
|
2410
|
-
return i(), d("svg",
|
|
2422
|
+
function Ba(o, e) {
|
|
2423
|
+
return i(), d("svg", Sa, e[0] || (e[0] = [
|
|
2411
2424
|
l("path", {
|
|
2412
2425
|
stroke: "none",
|
|
2413
2426
|
d: "M0 0h24v24H0z",
|
|
@@ -2417,7 +2430,7 @@ function Sa(o, e) {
|
|
|
2417
2430
|
l("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
2418
2431
|
]));
|
|
2419
2432
|
}
|
|
2420
|
-
const
|
|
2433
|
+
const ja = /* @__PURE__ */ X(La, [["render", Ba]]), Ea = {}, Ia = {
|
|
2421
2434
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
2422
2435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2423
2436
|
viewBox: "0 0 24 24",
|
|
@@ -2427,15 +2440,15 @@ const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
|
|
|
2427
2440
|
"stroke-linecap": "round",
|
|
2428
2441
|
"stroke-linejoin": "round"
|
|
2429
2442
|
};
|
|
2430
|
-
function
|
|
2431
|
-
return i(), d("svg",
|
|
2443
|
+
function Aa(o, e) {
|
|
2444
|
+
return i(), d("svg", Ia, e[0] || (e[0] = [
|
|
2432
2445
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2433
2446
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
2434
2447
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
2435
2448
|
l("path", { d: "M17 4v16" }, null, -1)
|
|
2436
2449
|
]));
|
|
2437
2450
|
}
|
|
2438
|
-
const Ta = /* @__PURE__ */ X(
|
|
2451
|
+
const Ta = /* @__PURE__ */ X(Ea, [["render", Aa]]), za = {}, Fa = {
|
|
2439
2452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2440
2453
|
width: "14",
|
|
2441
2454
|
height: "14",
|
|
@@ -2446,8 +2459,8 @@ const Ta = /* @__PURE__ */ X(ja, [["render", Ia]]), za = {}, Aa = {
|
|
|
2446
2459
|
"stroke-linecap": "round",
|
|
2447
2460
|
"stroke-linejoin": "round"
|
|
2448
2461
|
};
|
|
2449
|
-
function
|
|
2450
|
-
return i(), d("svg",
|
|
2462
|
+
function Oa(o, e) {
|
|
2463
|
+
return i(), d("svg", Fa, e[0] || (e[0] = [
|
|
2451
2464
|
l("path", {
|
|
2452
2465
|
stroke: "none",
|
|
2453
2466
|
d: "M0 0h24v24H0z",
|
|
@@ -2458,7 +2471,7 @@ function Fa(o, e) {
|
|
|
2458
2471
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2459
2472
|
]));
|
|
2460
2473
|
}
|
|
2461
|
-
const
|
|
2474
|
+
const Da = /* @__PURE__ */ X(za, [["render", Oa]]), Ua = {}, Pa = {
|
|
2462
2475
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2463
2476
|
viewBox: "0 0 24 24",
|
|
2464
2477
|
fill: "none",
|
|
@@ -2467,8 +2480,8 @@ const Oa = /* @__PURE__ */ X(za, [["render", Fa]]), Da = {}, Ua = {
|
|
|
2467
2480
|
"stroke-linecap": "round",
|
|
2468
2481
|
"stroke-linejoin": "round"
|
|
2469
2482
|
};
|
|
2470
|
-
function
|
|
2471
|
-
return i(), d("svg",
|
|
2483
|
+
function Ra(o, e) {
|
|
2484
|
+
return i(), d("svg", Pa, e[0] || (e[0] = [
|
|
2472
2485
|
l("path", {
|
|
2473
2486
|
stroke: "none",
|
|
2474
2487
|
d: "M0 0h24v24H0z",
|
|
@@ -2479,7 +2492,7 @@ function Pa(o, e) {
|
|
|
2479
2492
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
2480
2493
|
]));
|
|
2481
2494
|
}
|
|
2482
|
-
const
|
|
2495
|
+
const Ha = /* @__PURE__ */ X(Ua, [["render", Ra]]), Na = {}, qa = {
|
|
2483
2496
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2484
2497
|
viewBox: "0 0 24 24",
|
|
2485
2498
|
fill: "none",
|
|
@@ -2488,22 +2501,22 @@ const Ra = /* @__PURE__ */ X(Da, [["render", Pa]]), Ha = {}, Na = {
|
|
|
2488
2501
|
"stroke-linecap": "round",
|
|
2489
2502
|
"stroke-linejoin": "round"
|
|
2490
2503
|
};
|
|
2491
|
-
function
|
|
2492
|
-
return i(), d("svg",
|
|
2504
|
+
function Ga(o, e) {
|
|
2505
|
+
return i(), d("svg", qa, e[0] || (e[0] = [
|
|
2493
2506
|
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)
|
|
2494
2507
|
]));
|
|
2495
2508
|
}
|
|
2496
|
-
const
|
|
2509
|
+
const Mt = /* @__PURE__ */ X(Na, [["render", Ga]]), Wa = {}, Ka = {
|
|
2497
2510
|
viewBox: "0 0 178 90",
|
|
2498
2511
|
fill: "none",
|
|
2499
2512
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2500
2513
|
};
|
|
2501
|
-
function
|
|
2502
|
-
return i(), d("svg",
|
|
2514
|
+
function Za(o, e) {
|
|
2515
|
+
return i(), d("svg", Ka, e[0] || (e[0] = [
|
|
2503
2516
|
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)
|
|
2504
2517
|
]));
|
|
2505
2518
|
}
|
|
2506
|
-
const
|
|
2519
|
+
const Ja = /* @__PURE__ */ X(Wa, [["render", Za]]), Ya = {}, Xa = {
|
|
2507
2520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2508
2521
|
viewBox: "0 0 24 24",
|
|
2509
2522
|
fill: "none",
|
|
@@ -2512,25 +2525,25 @@ const Za = /* @__PURE__ */ X(Ga, [["render", Ka]]), Ja = {}, Ya = {
|
|
|
2512
2525
|
"stroke-linecap": "round",
|
|
2513
2526
|
"stroke-linejoin": "round"
|
|
2514
2527
|
};
|
|
2515
|
-
function
|
|
2516
|
-
return i(), d("svg",
|
|
2528
|
+
function Qa(o, e) {
|
|
2529
|
+
return i(), d("svg", Xa, e[0] || (e[0] = [
|
|
2517
2530
|
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)
|
|
2518
2531
|
]));
|
|
2519
2532
|
}
|
|
2520
|
-
const
|
|
2533
|
+
const es = /* @__PURE__ */ X(Ya, [["render", Qa]]), ts = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ls = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, os = { class: "relative w-full" }, ns = { class: "table-wrapper flex gap-2" }, as = { class: "vs-popover inline-block text-slate-700" }, ss = { class: "text-center" }, rs = { class: "" }, is = { 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" }, us = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, ds = { class: "text-sm items-center text-gray-800 flex gap-1" }, cs = { class: "w-full overflow-x-auto" }, ps = { class: "w-full table-auto caption-bottom text-sm" }, fs = { class: "[&_tr]:border-b" }, ms = { 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" }, vs = { 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" }, hs = {
|
|
2521
2534
|
key: 0,
|
|
2522
2535
|
colspan: "100%",
|
|
2523
2536
|
class: "text-center"
|
|
2524
|
-
},
|
|
2537
|
+
}, gs = { class: "w-full" }, bs = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, ys = ["onDragstart", "onDragover", "onDrop"], xs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, ws = { class: "flex items-center justify-center" }, ks = {
|
|
2525
2538
|
key: 0,
|
|
2526
2539
|
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"
|
|
2527
|
-
},
|
|
2540
|
+
}, _s = { key: 0 }, $s = ["src"], Cs = {
|
|
2528
2541
|
key: 1,
|
|
2529
2542
|
class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
|
|
2530
|
-
},
|
|
2543
|
+
}, Vs = ["innerHTML"], Ms = {
|
|
2531
2544
|
key: 2,
|
|
2532
2545
|
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"
|
|
2533
|
-
},
|
|
2546
|
+
}, Ls = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ss = { class: "flex items-center justify-center gap-2" }, Bs = ["onClick"], js = ["onClick"], Es = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Is = /* @__PURE__ */ R({
|
|
2534
2547
|
__name: "vs-input-datatable",
|
|
2535
2548
|
props: /* @__PURE__ */ ie({
|
|
2536
2549
|
colModel: {},
|
|
@@ -2549,32 +2562,32 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2549
2562
|
setup(o) {
|
|
2550
2563
|
const e = o, t = de(o, "modelValue"), a = k({}), n = k(""), s = B(() => {
|
|
2551
2564
|
if (!n.value) return t.value ?? [];
|
|
2552
|
-
const
|
|
2565
|
+
const z = n.value.toLowerCase();
|
|
2553
2566
|
return t.value.filter((E) => e.colModel?.some((S) => {
|
|
2554
2567
|
const D = E[S.key];
|
|
2555
|
-
return D ? Array.isArray(D) ? D.join(", ").toLowerCase().includes(
|
|
2568
|
+
return D ? Array.isArray(D) ? D.join(", ").toLowerCase().includes(z) : String(D).toLowerCase().includes(z) : !1;
|
|
2556
2569
|
}));
|
|
2557
|
-
}), r = k(null), u = k(null), p = k(!1),
|
|
2558
|
-
r.value =
|
|
2559
|
-
}, b = (
|
|
2560
|
-
u.value =
|
|
2561
|
-
}, M = (
|
|
2562
|
-
if (r.value === null || r.value ===
|
|
2570
|
+
}), r = k(null), u = k(null), p = k(!1), f = k(null), c = k({ top: 0, left: 0 }), m = (z) => {
|
|
2571
|
+
r.value = z;
|
|
2572
|
+
}, b = (z) => {
|
|
2573
|
+
u.value = z;
|
|
2574
|
+
}, M = (z) => {
|
|
2575
|
+
if (r.value === null || r.value === z) {
|
|
2563
2576
|
r.value = null, u.value = null;
|
|
2564
2577
|
return;
|
|
2565
2578
|
}
|
|
2566
2579
|
const E = [...t.value], [S] = E.splice(r.value, 1);
|
|
2567
|
-
E.splice(
|
|
2568
|
-
}, q = (
|
|
2569
|
-
const S =
|
|
2580
|
+
E.splice(z, 0, S), t.value = E, r.value = null, u.value = null;
|
|
2581
|
+
}, q = (z) => {
|
|
2582
|
+
const S = z.currentTarget.getBoundingClientRect();
|
|
2570
2583
|
c.value = { top: S.bottom + window.scrollY, left: S.left + window.scrollX }, p.value = !p.value;
|
|
2571
2584
|
}, H = () => {
|
|
2572
|
-
|
|
2573
|
-
}, K = (
|
|
2574
|
-
const E = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], S =
|
|
2585
|
+
f.value && f.value.click();
|
|
2586
|
+
}, K = (z) => {
|
|
2587
|
+
const E = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], S = z.toLowerCase();
|
|
2575
2588
|
return E.some((D) => S.endsWith(D));
|
|
2576
|
-
},
|
|
2577
|
-
const S =
|
|
2589
|
+
}, T = (z) => {
|
|
2590
|
+
const S = z.target.files?.[0];
|
|
2578
2591
|
if (!S) return;
|
|
2579
2592
|
const D = new FileReader();
|
|
2580
2593
|
D.onload = (le) => {
|
|
@@ -2589,12 +2602,12 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2589
2602
|
}
|
|
2590
2603
|
}, D.readAsText(S);
|
|
2591
2604
|
}, W = () => {
|
|
2592
|
-
const
|
|
2605
|
+
const z = JSON.stringify(t.value, null, 2), E = new Blob([z], { type: "application/json" }), S = URL.createObjectURL(E), D = document.createElement("a");
|
|
2593
2606
|
D.href = S, D.download = "data.json", D.click(), URL.revokeObjectURL(S);
|
|
2594
2607
|
};
|
|
2595
2608
|
$e(async () => {
|
|
2596
|
-
const
|
|
2597
|
-
|
|
2609
|
+
const z = e.colModel?.filter((E) => E.data);
|
|
2610
|
+
z?.length && Promise.all(z.map(async (E) => {
|
|
2598
2611
|
const D = await (await fetch(`/api/suggest/${E.data}`)).json();
|
|
2599
2612
|
a.value[E.key] = D.data;
|
|
2600
2613
|
}));
|
|
@@ -2605,32 +2618,32 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2605
2618
|
async function ee() {
|
|
2606
2619
|
j.value = "Додати", g.value = !0, x = "add", _.value = {};
|
|
2607
2620
|
}
|
|
2608
|
-
function Q(
|
|
2621
|
+
function Q(z, E) {
|
|
2609
2622
|
const S = E.key || E.name;
|
|
2610
|
-
return a.value[S] &&
|
|
2623
|
+
return a.value[S] && z[S] ? a.value[S].find((D) => D.id.toString() === z[S].toString())?.text ?? z[S] : z[S] || "-";
|
|
2611
2624
|
}
|
|
2612
|
-
async function V(
|
|
2613
|
-
j.value = "Редагувати", g.value = !0, x = "edit", C = E, _.value = { ...
|
|
2625
|
+
async function V(z, E) {
|
|
2626
|
+
j.value = "Редагувати", g.value = !0, x = "edit", C = E, _.value = { ...z };
|
|
2614
2627
|
}
|
|
2615
2628
|
function P() {
|
|
2616
|
-
const
|
|
2617
|
-
if (
|
|
2618
|
-
pe({ type: "warning", title: "Помилка валідації", message: Object.entries(
|
|
2629
|
+
const z = O.value.validate();
|
|
2630
|
+
if (z) {
|
|
2631
|
+
pe({ type: "warning", title: "Помилка валідації", message: Object.entries(z).map(([E, S]) => `${E}: ${S}`).join(`
|
|
2619
2632
|
`) });
|
|
2620
2633
|
return;
|
|
2621
2634
|
}
|
|
2622
2635
|
x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, _.value] : t.value = [_.value] : t.value = t.value.map((E, S) => S === C ? _.value : E), g.value = !1;
|
|
2623
2636
|
}
|
|
2624
|
-
function Y(
|
|
2625
|
-
t.value = t.value.filter((E, S) => S !==
|
|
2637
|
+
function Y(z) {
|
|
2638
|
+
t.value = t.value.filter((E, S) => S !== z);
|
|
2626
2639
|
}
|
|
2627
2640
|
function Z() {
|
|
2628
2641
|
g.value = !1;
|
|
2629
2642
|
}
|
|
2630
|
-
return (
|
|
2631
|
-
l("div",
|
|
2632
|
-
l("div",
|
|
2633
|
-
F(
|
|
2643
|
+
return (z, E) => (i(), d("div", ts, [
|
|
2644
|
+
l("div", ls, [
|
|
2645
|
+
l("div", os, [
|
|
2646
|
+
F(ja, {
|
|
2634
2647
|
width: "14",
|
|
2635
2648
|
height: "14",
|
|
2636
2649
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
|
|
@@ -2644,18 +2657,18 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2644
2657
|
[ve, n.value]
|
|
2645
2658
|
])
|
|
2646
2659
|
]),
|
|
2647
|
-
l("div",
|
|
2660
|
+
l("div", ns, [
|
|
2648
2661
|
l("input", {
|
|
2649
2662
|
ref_key: "fileInput",
|
|
2650
|
-
ref:
|
|
2651
|
-
onChange:
|
|
2663
|
+
ref: f,
|
|
2664
|
+
onChange: T,
|
|
2652
2665
|
class: "hidden",
|
|
2653
2666
|
accept: ".json",
|
|
2654
2667
|
type: "file"
|
|
2655
2668
|
}, null, 544),
|
|
2656
|
-
l("div",
|
|
2657
|
-
l("div",
|
|
2658
|
-
l("div",
|
|
2669
|
+
l("div", as, [
|
|
2670
|
+
l("div", ss, [
|
|
2671
|
+
l("div", rs, [
|
|
2659
2672
|
l("button", {
|
|
2660
2673
|
onClick: q,
|
|
2661
2674
|
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"
|
|
@@ -2669,19 +2682,19 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2669
2682
|
])
|
|
2670
2683
|
])
|
|
2671
2684
|
]),
|
|
2672
|
-
(i(), he(
|
|
2685
|
+
(i(), he(Et, { to: "body" }, [
|
|
2673
2686
|
p.value ? (i(), d("div", {
|
|
2674
2687
|
key: 0,
|
|
2675
2688
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2676
2689
|
style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
|
|
2677
2690
|
}, [
|
|
2678
|
-
l("div",
|
|
2679
|
-
l("div",
|
|
2691
|
+
l("div", is, [
|
|
2692
|
+
l("div", us, [
|
|
2680
2693
|
l("button", {
|
|
2681
2694
|
onClick: H,
|
|
2682
2695
|
class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2683
2696
|
}, [
|
|
2684
|
-
F(
|
|
2697
|
+
F(Da, {
|
|
2685
2698
|
class: "text-black",
|
|
2686
2699
|
width: "14",
|
|
2687
2700
|
height: "14"
|
|
@@ -2692,8 +2705,8 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2692
2705
|
onClick: W,
|
|
2693
2706
|
class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2694
2707
|
}, [
|
|
2695
|
-
l("span",
|
|
2696
|
-
F(
|
|
2708
|
+
l("span", ds, [
|
|
2709
|
+
F(Ha, {
|
|
2697
2710
|
class: "text-black",
|
|
2698
2711
|
width: "14",
|
|
2699
2712
|
height: "14"
|
|
@@ -2703,7 +2716,7 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2703
2716
|
])
|
|
2704
2717
|
])
|
|
2705
2718
|
])
|
|
2706
|
-
], 4)) :
|
|
2719
|
+
], 4)) : A("", !0)
|
|
2707
2720
|
])),
|
|
2708
2721
|
l("button", {
|
|
2709
2722
|
onClick: ee,
|
|
@@ -2713,18 +2726,18 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2713
2726
|
E[6] || (E[6] = ge(" Додати ", -1))
|
|
2714
2727
|
])
|
|
2715
2728
|
]),
|
|
2716
|
-
l("div",
|
|
2717
|
-
l("table",
|
|
2718
|
-
l("thead",
|
|
2719
|
-
l("tr",
|
|
2720
|
-
l("th",
|
|
2721
|
-
F(
|
|
2729
|
+
l("div", cs, [
|
|
2730
|
+
l("table", ps, [
|
|
2731
|
+
l("thead", fs, [
|
|
2732
|
+
l("tr", ms, [
|
|
2733
|
+
l("th", vs, [
|
|
2734
|
+
F(Mt, {
|
|
2722
2735
|
width: "24",
|
|
2723
2736
|
height: "24",
|
|
2724
2737
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2725
2738
|
})
|
|
2726
2739
|
]),
|
|
2727
|
-
(i(!0), d(re, null, me(
|
|
2740
|
+
(i(!0), d(re, null, me(z.colModel, (S) => (i(), d("th", {
|
|
2728
2741
|
key: S.key,
|
|
2729
2742
|
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]"
|
|
2730
2743
|
}, G(S.ua || S.label), 1))), 128)),
|
|
@@ -2734,17 +2747,17 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2734
2747
|
l("tbody", {
|
|
2735
2748
|
class: I({ "[&_tr:last-child]:border-0": !u.value })
|
|
2736
2749
|
}, [
|
|
2737
|
-
s.value.length === 0 ? (i(), d("td",
|
|
2738
|
-
l("div",
|
|
2739
|
-
l("div",
|
|
2740
|
-
F(
|
|
2750
|
+
s.value.length === 0 ? (i(), d("td", hs, [
|
|
2751
|
+
l("div", gs, [
|
|
2752
|
+
l("div", bs, [
|
|
2753
|
+
F(Ja, { class: "w-48 mx-auto" }),
|
|
2741
2754
|
E[8] || (E[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
2742
2755
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
2743
2756
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
2744
2757
|
], -1))
|
|
2745
2758
|
])
|
|
2746
2759
|
])
|
|
2747
|
-
])) :
|
|
2760
|
+
])) : A("", !0),
|
|
2748
2761
|
(i(!0), d(re, null, me(s.value, (S, D) => (i(), d("tr", {
|
|
2749
2762
|
key: S.id,
|
|
2750
2763
|
class: I(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
@@ -2752,52 +2765,52 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2752
2765
|
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value === D
|
|
2753
2766
|
}]),
|
|
2754
2767
|
draggable: "true",
|
|
2755
|
-
onDragstart: (le) =>
|
|
2768
|
+
onDragstart: (le) => m(D),
|
|
2756
2769
|
onDragover: _e((le) => b(D), ["prevent"]),
|
|
2757
2770
|
onDrop: (le) => M(D)
|
|
2758
2771
|
}, [
|
|
2759
|
-
l("td",
|
|
2760
|
-
l("div",
|
|
2761
|
-
F(
|
|
2772
|
+
l("td", xs, [
|
|
2773
|
+
l("div", ws, [
|
|
2774
|
+
F(Mt, {
|
|
2762
2775
|
width: "24",
|
|
2763
2776
|
height: "24",
|
|
2764
2777
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2765
2778
|
})
|
|
2766
2779
|
])
|
|
2767
2780
|
]),
|
|
2768
|
-
(i(!0), d(re, null, me(
|
|
2781
|
+
(i(!0), d(re, null, me(z.colModel, (le) => (i(), d("td", {
|
|
2769
2782
|
key: le.key,
|
|
2770
2783
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2771
2784
|
}, [
|
|
2772
|
-
le.type === "file" ? (i(), d("div",
|
|
2773
|
-
K(Q(S, le)) ? (i(), d("div",
|
|
2785
|
+
le.type === "file" ? (i(), d("div", ks, [
|
|
2786
|
+
K(Q(S, le)) ? (i(), d("div", _s, [
|
|
2774
2787
|
l("img", {
|
|
2775
2788
|
src: Q(S, le),
|
|
2776
2789
|
alt: "alt",
|
|
2777
2790
|
width: "45",
|
|
2778
2791
|
class: "rounded-md max-w-[45px] h-[45px] object-cover"
|
|
2779
|
-
}, null, 8,
|
|
2780
|
-
])) : (i(), d("div",
|
|
2792
|
+
}, null, 8, $s)
|
|
2793
|
+
])) : (i(), d("div", Cs, [
|
|
2781
2794
|
F(zt, { class: "w-[25px] min-w-[25px] h-[25px]" })
|
|
2782
2795
|
]))
|
|
2783
2796
|
])) : le.type === "tiptap-editor" ? (i(), d("div", {
|
|
2784
2797
|
key: 1,
|
|
2785
2798
|
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",
|
|
2786
2799
|
innerHTML: Q(S, le)
|
|
2787
|
-
}, null, 8,
|
|
2800
|
+
}, null, 8, Vs)) : (i(), d("div", Ms, G(Q(S, le)), 1))
|
|
2788
2801
|
]))), 128)),
|
|
2789
|
-
l("td",
|
|
2790
|
-
l("div",
|
|
2802
|
+
l("td", Ls, [
|
|
2803
|
+
l("div", Ss, [
|
|
2791
2804
|
l("button", {
|
|
2792
2805
|
onClick: (le) => V(S, D),
|
|
2793
2806
|
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"
|
|
2794
2807
|
}, [
|
|
2795
|
-
F(
|
|
2808
|
+
F(es, {
|
|
2796
2809
|
width: "24",
|
|
2797
2810
|
height: "24",
|
|
2798
2811
|
class: "w-3 h-3"
|
|
2799
2812
|
})
|
|
2800
|
-
], 8,
|
|
2813
|
+
], 8, Bs),
|
|
2801
2814
|
l("button", {
|
|
2802
2815
|
onClick: (le) => Y(D),
|
|
2803
2816
|
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"
|
|
@@ -2807,14 +2820,14 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2807
2820
|
height: "24",
|
|
2808
2821
|
class: "w-3 h-3"
|
|
2809
2822
|
})
|
|
2810
|
-
], 8,
|
|
2823
|
+
], 8, js)
|
|
2811
2824
|
])
|
|
2812
2825
|
])
|
|
2813
|
-
], 42,
|
|
2826
|
+
], 42, ys))), 128))
|
|
2814
2827
|
], 2)
|
|
2815
2828
|
])
|
|
2816
2829
|
]),
|
|
2817
|
-
F(te(
|
|
2830
|
+
F(te(It), {
|
|
2818
2831
|
visible: g.value,
|
|
2819
2832
|
title: j.value,
|
|
2820
2833
|
size: "lg",
|
|
@@ -2828,7 +2841,7 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2828
2841
|
form: O.value,
|
|
2829
2842
|
"onUpdate:form": E[2] || (E[2] = (S) => O.value = S)
|
|
2830
2843
|
}, null, 8, ["schema", "values", "form"]),
|
|
2831
|
-
l("div",
|
|
2844
|
+
l("div", Es, [
|
|
2832
2845
|
l("button", {
|
|
2833
2846
|
type: "button",
|
|
2834
2847
|
onClick: E[3] || (E[3] = (S) => g.value = !1),
|
|
@@ -2845,7 +2858,7 @@ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable
|
|
|
2845
2858
|
}, 8, ["visible", "title"])
|
|
2846
2859
|
]));
|
|
2847
2860
|
}
|
|
2848
|
-
}),
|
|
2861
|
+
}), As = {
|
|
2849
2862
|
draw: {
|
|
2850
2863
|
toolbar: {
|
|
2851
2864
|
actions: {
|
|
@@ -2979,7 +2992,7 @@ function Ts(o) {
|
|
|
2979
2992
|
properties: {}
|
|
2980
2993
|
} : null : null;
|
|
2981
2994
|
}
|
|
2982
|
-
const zs = {},
|
|
2995
|
+
const zs = {}, Fs = {
|
|
2983
2996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2984
2997
|
viewBox: "0 0 24 24",
|
|
2985
2998
|
stroke: "currentColor",
|
|
@@ -2989,8 +3002,8 @@ const zs = {}, As = {
|
|
|
2989
3002
|
"stroke-linejoin": "round",
|
|
2990
3003
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
2991
3004
|
};
|
|
2992
|
-
function
|
|
2993
|
-
return i(), d("svg",
|
|
3005
|
+
function Os(o, e) {
|
|
3006
|
+
return i(), d("svg", Fs, e[0] || (e[0] = [
|
|
2994
3007
|
l("path", {
|
|
2995
3008
|
stroke: "none",
|
|
2996
3009
|
d: "M0 0h24v24H0z",
|
|
@@ -3000,7 +3013,7 @@ function Fs(o, e) {
|
|
|
3000
3013
|
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)
|
|
3001
3014
|
]));
|
|
3002
3015
|
}
|
|
3003
|
-
const
|
|
3016
|
+
const Ds = /* @__PURE__ */ X(zs, [["render", Os]]), Us = {}, Ps = {
|
|
3004
3017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3005
3018
|
viewBox: "0 0 24 24",
|
|
3006
3019
|
fill: "none",
|
|
@@ -3010,8 +3023,8 @@ const Os = /* @__PURE__ */ X(zs, [["render", Fs]]), Ds = {}, Us = {
|
|
|
3010
3023
|
"stroke-linejoin": "round",
|
|
3011
3024
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
3012
3025
|
};
|
|
3013
|
-
function
|
|
3014
|
-
return i(), d("svg",
|
|
3026
|
+
function Rs(o, e) {
|
|
3027
|
+
return i(), d("svg", Ps, e[0] || (e[0] = [
|
|
3015
3028
|
l("path", {
|
|
3016
3029
|
stroke: "none",
|
|
3017
3030
|
d: "M0 0h24v24H0z",
|
|
@@ -3022,7 +3035,7 @@ function Ps(o, e) {
|
|
|
3022
3035
|
l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
3023
3036
|
]));
|
|
3024
3037
|
}
|
|
3025
|
-
const
|
|
3038
|
+
const Hs = /* @__PURE__ */ X(Us, [["render", Rs]]), Ns = {}, qs = {
|
|
3026
3039
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3027
3040
|
viewBox: "0 0 24 24",
|
|
3028
3041
|
fill: "none",
|
|
@@ -3032,12 +3045,12 @@ const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
|
|
|
3032
3045
|
"stroke-linejoin": "round",
|
|
3033
3046
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
3034
3047
|
};
|
|
3035
|
-
function
|
|
3036
|
-
return i(), d("svg",
|
|
3048
|
+
function Gs(o, e) {
|
|
3049
|
+
return i(), d("svg", qs, e[0] || (e[0] = [
|
|
3037
3050
|
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)
|
|
3038
3051
|
]));
|
|
3039
3052
|
}
|
|
3040
|
-
const
|
|
3053
|
+
const Ws = /* @__PURE__ */ X(Ns, [["render", Gs]]), Ks = {}, Zs = {
|
|
3041
3054
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3042
3055
|
viewBox: "0 0 24 24",
|
|
3043
3056
|
fill: "none",
|
|
@@ -3047,12 +3060,12 @@ const Gs = /* @__PURE__ */ X(Hs, [["render", qs]]), Ws = {}, Ks = {
|
|
|
3047
3060
|
"stroke-linejoin": "round",
|
|
3048
3061
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
3049
3062
|
};
|
|
3050
|
-
function
|
|
3051
|
-
return i(), d("svg",
|
|
3063
|
+
function Js(o, e) {
|
|
3064
|
+
return i(), d("svg", Zs, e[0] || (e[0] = [
|
|
3052
3065
|
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)
|
|
3053
3066
|
]));
|
|
3054
3067
|
}
|
|
3055
|
-
const
|
|
3068
|
+
const Ys = /* @__PURE__ */ X(Ks, [["render", Js]]), Xs = {}, Qs = {
|
|
3056
3069
|
version: "1.1",
|
|
3057
3070
|
viewBox: "0 0 14 14",
|
|
3058
3071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3060,8 +3073,8 @@ const Js = /* @__PURE__ */ X(Ws, [["render", Zs]]), Ys = {}, Xs = {
|
|
|
3060
3073
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
3061
3074
|
class: "fullscreen-icon"
|
|
3062
3075
|
};
|
|
3063
|
-
function
|
|
3064
|
-
return i(), d("svg",
|
|
3076
|
+
function er(o, e) {
|
|
3077
|
+
return i(), d("svg", Qs, e[0] || (e[0] = [
|
|
3065
3078
|
l("title", null, null, -1),
|
|
3066
3079
|
l("desc", null, null, -1),
|
|
3067
3080
|
l("defs", null, null, -1),
|
|
@@ -3090,10 +3103,10 @@ function Qs(o, e) {
|
|
|
3090
3103
|
], -1)
|
|
3091
3104
|
]));
|
|
3092
3105
|
}
|
|
3093
|
-
const
|
|
3106
|
+
const tr = /* @__PURE__ */ X(Xs, [["render", er]]), lr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, or = {
|
|
3094
3107
|
key: 0,
|
|
3095
3108
|
class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
|
|
3096
|
-
},
|
|
3109
|
+
}, nr = ["onClick"], ar = { class: "relative flex-1 min-w-[140px]" }, sr = ["placeholder"], rr = "https://data.softpro.ua/api-user/gis-url-proxy", ir = "https://geo.rv.ua/api-user/dzk.api", ur = /* @__PURE__ */ R({
|
|
3097
3110
|
__name: "map-search",
|
|
3098
3111
|
props: {
|
|
3099
3112
|
config: {}
|
|
@@ -3107,21 +3120,21 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3107
3120
|
ue(s, (g) => {
|
|
3108
3121
|
g.includes(u.value) || (u.value = g[0]);
|
|
3109
3122
|
});
|
|
3110
|
-
const p = k(""),
|
|
3123
|
+
const p = k(""), f = k(!1), c = k(null);
|
|
3111
3124
|
ue(u, () => {
|
|
3112
|
-
p.value = "",
|
|
3125
|
+
p.value = "", f.value = !1;
|
|
3113
3126
|
});
|
|
3114
|
-
function
|
|
3127
|
+
function m(g) {
|
|
3115
3128
|
u.value = g;
|
|
3116
3129
|
}
|
|
3117
3130
|
function b(g) {
|
|
3118
|
-
if (!
|
|
3131
|
+
if (!f.value) return;
|
|
3119
3132
|
const x = c.value;
|
|
3120
|
-
x && !x.contains(g.target) && (
|
|
3133
|
+
x && !x.contains(g.target) && (f.value = !1);
|
|
3121
3134
|
}
|
|
3122
3135
|
$e(() => {
|
|
3123
3136
|
window.addEventListener("click", b, !0);
|
|
3124
|
-
}),
|
|
3137
|
+
}), rt(() => {
|
|
3125
3138
|
window.removeEventListener("click", b, !0);
|
|
3126
3139
|
});
|
|
3127
3140
|
function M(g) {
|
|
@@ -3166,7 +3179,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3166
3179
|
}
|
|
3167
3180
|
];
|
|
3168
3181
|
}
|
|
3169
|
-
function
|
|
3182
|
+
function T(g) {
|
|
3170
3183
|
const C = g.replace(/\s+/g, "").split(":");
|
|
3171
3184
|
if (C.length !== 4) return !1;
|
|
3172
3185
|
const _ = [10, 2, 3, 4];
|
|
@@ -3188,11 +3201,11 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3188
3201
|
return;
|
|
3189
3202
|
}
|
|
3190
3203
|
try {
|
|
3191
|
-
const x = new URL(u.value === "here" ?
|
|
3204
|
+
const x = new URL(u.value === "here" ? rr : ir);
|
|
3192
3205
|
if (u.value === "here")
|
|
3193
3206
|
x.searchParams.set("searchtext", g);
|
|
3194
3207
|
else {
|
|
3195
|
-
if (!
|
|
3208
|
+
if (!T(g)) {
|
|
3196
3209
|
pe({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
|
|
3197
3210
|
return;
|
|
3198
3211
|
}
|
|
@@ -3213,7 +3226,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3213
3226
|
}
|
|
3214
3227
|
}
|
|
3215
3228
|
}
|
|
3216
|
-
return (g, x) => (i(), d("div",
|
|
3229
|
+
return (g, x) => (i(), d("div", lr, [
|
|
3217
3230
|
l("form", {
|
|
3218
3231
|
class: "flex gap-2",
|
|
3219
3232
|
onSubmit: _e(j, ["prevent"])
|
|
@@ -3227,11 +3240,11 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3227
3240
|
l("button", {
|
|
3228
3241
|
type: "button",
|
|
3229
3242
|
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",
|
|
3230
|
-
onClick: x[0] || (x[0] = (C) =>
|
|
3243
|
+
onClick: x[0] || (x[0] = (C) => f.value = !f.value)
|
|
3231
3244
|
}, [
|
|
3232
3245
|
l("span", null, G(M(u.value)), 1),
|
|
3233
3246
|
(i(), d("svg", {
|
|
3234
|
-
class: I(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180":
|
|
3247
|
+
class: I(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": f.value }]),
|
|
3235
3248
|
viewBox: "0 0 24 24",
|
|
3236
3249
|
fill: "none",
|
|
3237
3250
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -3245,23 +3258,23 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3245
3258
|
}, null, -1)
|
|
3246
3259
|
]), 2))
|
|
3247
3260
|
]),
|
|
3248
|
-
|
|
3261
|
+
f.value ? (i(), d("div", or, [
|
|
3249
3262
|
l("ul", null, [
|
|
3250
3263
|
(i(!0), d(re, null, me(s.value, (C) => (i(), d("li", {
|
|
3251
3264
|
key: C,
|
|
3252
3265
|
class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
|
|
3253
|
-
onClick: (_) =>
|
|
3254
|
-
}, G(M(C)), 9,
|
|
3266
|
+
onClick: (_) => m(C)
|
|
3267
|
+
}, G(M(C)), 9, nr))), 128))
|
|
3255
3268
|
])
|
|
3256
|
-
])) :
|
|
3257
|
-
], 512)) :
|
|
3258
|
-
l("div",
|
|
3269
|
+
])) : A("", !0)
|
|
3270
|
+
], 512)) : A("", !0),
|
|
3271
|
+
l("div", ar, [
|
|
3259
3272
|
ne(l("input", {
|
|
3260
3273
|
"onUpdate:modelValue": x[1] || (x[1] = (C) => p.value = C),
|
|
3261
3274
|
placeholder: r.value,
|
|
3262
3275
|
type: "text",
|
|
3263
3276
|
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"
|
|
3264
|
-
}, null, 8,
|
|
3277
|
+
}, null, 8, sr), [
|
|
3265
3278
|
[
|
|
3266
3279
|
ve,
|
|
3267
3280
|
p.value,
|
|
@@ -3293,7 +3306,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3293
3306
|
], 32)
|
|
3294
3307
|
]));
|
|
3295
3308
|
}
|
|
3296
|
-
}),
|
|
3309
|
+
}), dr = /* @__PURE__ */ X(ur, [["__scopeId", "data-v-3048520a"]]), cr = { class: "bg-white/30 p-1 rounded-md shadow" }, pr = { class: "flex gap-2" }, fr = ["onClick", "title"], mr = ["src"], vr = /* @__PURE__ */ R({
|
|
3297
3310
|
__name: "map-layers",
|
|
3298
3311
|
props: {
|
|
3299
3312
|
basemaps: {}
|
|
@@ -3304,13 +3317,13 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3304
3317
|
function s(r) {
|
|
3305
3318
|
n("onLayerChange", r), a.value = r;
|
|
3306
3319
|
}
|
|
3307
|
-
return (r, u) => (i(), d("div",
|
|
3308
|
-
l("div",
|
|
3309
|
-
(i(!0), d(re, null, me(r.basemaps, (p,
|
|
3310
|
-
key:
|
|
3311
|
-
class: I(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value ===
|
|
3312
|
-
onClick: (c) => s(
|
|
3313
|
-
title: p.name ||
|
|
3320
|
+
return (r, u) => (i(), d("div", cr, [
|
|
3321
|
+
l("div", pr, [
|
|
3322
|
+
(i(!0), d(re, null, me(r.basemaps, (p, f) => (i(), d("div", {
|
|
3323
|
+
key: f,
|
|
3324
|
+
class: I(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === f }]),
|
|
3325
|
+
onClick: (c) => s(f),
|
|
3326
|
+
title: p.name || f,
|
|
3314
3327
|
role: "button",
|
|
3315
3328
|
tabindex: "0"
|
|
3316
3329
|
}, [
|
|
@@ -3318,24 +3331,24 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3318
3331
|
src: p.preview,
|
|
3319
3332
|
alt: "",
|
|
3320
3333
|
class: "w-10 h-10 object-cover"
|
|
3321
|
-
}, null, 8,
|
|
3322
|
-
], 10,
|
|
3334
|
+
}, null, 8, mr)
|
|
3335
|
+
], 10, fr))), 128))
|
|
3323
3336
|
])
|
|
3324
3337
|
]));
|
|
3325
3338
|
}
|
|
3326
|
-
}),
|
|
3339
|
+
}), hr = {
|
|
3327
3340
|
key: 0,
|
|
3328
3341
|
class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
|
|
3329
|
-
},
|
|
3342
|
+
}, gr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, br = { class: "text-sm font-medium" }, yr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, xr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, wr = { class: "flex items-center gap-1" }, kr = ["disabled"], _r = { class: "absolute top-4 right-4 z-[1000]" }, $r = { class: "flex flex-col gap-[2px]" }, Cr = ["aria-pressed"], Vr = ["aria-pressed"], Mr = ["aria-pressed"], Lr = ["aria-pressed"], Sr = { 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" }, Br = {
|
|
3330
3343
|
key: 0,
|
|
3331
3344
|
class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
|
|
3332
|
-
},
|
|
3345
|
+
}, jr = { class: "mr-auto" }, Er = { class: "font-bold" }, Ir = { class: "flex items-center" }, Ar = { class: "text-xs mr-2" }, Tr = {
|
|
3333
3346
|
key: 0,
|
|
3334
3347
|
class: "text-xs"
|
|
3335
3348
|
}, zr = {
|
|
3336
3349
|
key: 1,
|
|
3337
3350
|
class: "text-xs"
|
|
3338
|
-
},
|
|
3351
|
+
}, Fr = /* @__PURE__ */ R({
|
|
3339
3352
|
__name: "vs-input-map",
|
|
3340
3353
|
props: {
|
|
3341
3354
|
tools: {},
|
|
@@ -3351,13 +3364,13 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3351
3364
|
},
|
|
3352
3365
|
emits: ["update:modelValue"],
|
|
3353
3366
|
setup(o, { emit: e }) {
|
|
3354
|
-
const t =
|
|
3367
|
+
const t = Kt(), a = o, n = e, s = B(() => a.geomType ? a.geomType.map((h) => h.toLowerCase()).filter((h) => ["marker", "polyline", "polygon", "rectangle"].includes(h)) : ["marker", "polyline", "polygon", "rectangle"]), r = k(!1), u = k("");
|
|
3355
3368
|
function p() {
|
|
3356
3369
|
const h = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
3357
3370
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
|
|
3358
3371
|
}
|
|
3359
|
-
const
|
|
3360
|
-
let c,
|
|
3372
|
+
const f = k(null);
|
|
3373
|
+
let c, m, b, M = null;
|
|
3361
3374
|
const q = k(null), H = (h) => {
|
|
3362
3375
|
h.ctrlKey && h.preventDefault();
|
|
3363
3376
|
};
|
|
@@ -3384,14 +3397,14 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3384
3397
|
}
|
|
3385
3398
|
r.value = !1;
|
|
3386
3399
|
};
|
|
3387
|
-
return
|
|
3400
|
+
return f.value && (f.value.addEventListener("wheel", $, { passive: !1 }), f.value.addEventListener("touchstart", J, { passive: !0 })), c && c.on("wheel", (U) => {
|
|
3388
3401
|
const ae = U.originalEvent.ctrlKey || U.originalEvent.metaKey, oe = U.originalEvent.shiftKey;
|
|
3389
3402
|
!ae && !oe && (U.originalEvent.preventDefault(), U.originalEvent.stopPropagation());
|
|
3390
3403
|
}), () => {
|
|
3391
|
-
|
|
3404
|
+
f.value && (f.value.removeEventListener("wheel", $), f.value.removeEventListener("touchstart", J)), c && c.off("wheel"), clearTimeout(h);
|
|
3392
3405
|
};
|
|
3393
3406
|
}
|
|
3394
|
-
const
|
|
3407
|
+
const T = k(null), W = k(6), j = k(0), g = k(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), x = k(null), C = Se();
|
|
3395
3408
|
let _;
|
|
3396
3409
|
const O = k("topo100");
|
|
3397
3410
|
function ee(h) {
|
|
@@ -3420,7 +3433,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3420
3433
|
});
|
|
3421
3434
|
}
|
|
3422
3435
|
function V() {
|
|
3423
|
-
const h =
|
|
3436
|
+
const h = m.toGeoJSON(), $ = [];
|
|
3424
3437
|
let J = null;
|
|
3425
3438
|
const U = (oe) => {
|
|
3426
3439
|
if (oe)
|
|
@@ -3441,10 +3454,10 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3441
3454
|
};
|
|
3442
3455
|
(h?.features || []).forEach((oe) => U(oe.geometry));
|
|
3443
3456
|
const ae = J || ($.length ? { type: "MultiPolygon", coordinates: $ } : null);
|
|
3444
|
-
n("update:modelValue", ae ? ee(ae) : null), j.value =
|
|
3457
|
+
n("update:modelValue", ae ? ee(ae) : null), j.value = m.getLayers().length;
|
|
3445
3458
|
}
|
|
3446
3459
|
function P(h = 30) {
|
|
3447
|
-
const $ =
|
|
3460
|
+
const $ = m.getLayers();
|
|
3448
3461
|
if (!$.length) return;
|
|
3449
3462
|
const U = L.featureGroup($).getBounds();
|
|
3450
3463
|
U && U.isValid() && c.fitBounds(U, { padding: [h, h] });
|
|
@@ -3453,7 +3466,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3453
3466
|
q.value?.click();
|
|
3454
3467
|
}
|
|
3455
3468
|
const Z = k("");
|
|
3456
|
-
function
|
|
3469
|
+
function z(h) {
|
|
3457
3470
|
return h instanceof L.Circle ? "Circle" : h instanceof L.Rectangle ? "Rectangle" : h instanceof L.Polygon && !(h instanceof L.Rectangle) ? "Polygon" : h instanceof L.Polyline && !(h instanceof L.Polygon) ? "Polyline" : h instanceof L.Marker ? "Point" : "Feature";
|
|
3458
3471
|
}
|
|
3459
3472
|
function E(h) {
|
|
@@ -3474,12 +3487,12 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3474
3487
|
return h instanceof L.Circle ? h.getLatLng() : h.getBounds ? h.getBounds().getCenter() : h.getLatLng ? h.getLatLng() : c.getCenter();
|
|
3475
3488
|
}
|
|
3476
3489
|
function D() {
|
|
3477
|
-
const h =
|
|
3490
|
+
const h = m.getLayers();
|
|
3478
3491
|
if (!h.length) {
|
|
3479
3492
|
x.value = null, j.value = 0;
|
|
3480
3493
|
return;
|
|
3481
3494
|
}
|
|
3482
|
-
const $ = h[h.length - 1], J =
|
|
3495
|
+
const $ = h[h.length - 1], J = z($), U = S($), ae = E($);
|
|
3483
3496
|
x.value = {
|
|
3484
3497
|
type: J,
|
|
3485
3498
|
center: U,
|
|
@@ -3493,19 +3506,19 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3493
3506
|
}
|
|
3494
3507
|
function ce() {
|
|
3495
3508
|
const h = x.value?.layer;
|
|
3496
|
-
h && (
|
|
3509
|
+
h && (m.removeLayer(h), V(), D());
|
|
3497
3510
|
}
|
|
3498
3511
|
$e(async () => {
|
|
3499
|
-
document.addEventListener("wheel", H, { passive: !1 }), await Q(), L.drawLocal =
|
|
3512
|
+
document.addEventListener("wheel", H, { passive: !1 }), await Q(), L.drawLocal = As;
|
|
3500
3513
|
const h = a.handleZoom;
|
|
3501
|
-
c = L.map(
|
|
3514
|
+
c = L.map(f.value, {
|
|
3502
3515
|
zoomControl: !1,
|
|
3503
3516
|
scrollWheelZoom: !h
|
|
3504
3517
|
}).setView(g.value, 10), setTimeout(() => {
|
|
3505
3518
|
M = K();
|
|
3506
|
-
}, 100), L.control.zoom({ position: "bottomright" }).addTo(c), O.value = Object.keys(C)[0], _ = L.tileLayer(C[O.value].url, { maxZoom: 19, minZoom: 6 }).addTo(c),
|
|
3519
|
+
}, 100), L.control.zoom({ position: "bottomright" }).addTo(c), O.value = Object.keys(C)[0], _ = L.tileLayer(C[O.value].url, { maxZoom: 19, minZoom: 6 }).addTo(c), m = new L.FeatureGroup().addTo(c), c.on(L.Draw.Event.CREATED, (U) => {
|
|
3507
3520
|
const { layer: ae } = U;
|
|
3508
|
-
|
|
3521
|
+
m.clearLayers(), m.addLayer(ae), V(), D(), P(), Z.value = "";
|
|
3509
3522
|
}), c.on(L.Draw.Event.EDITED, () => {
|
|
3510
3523
|
V(), D(), P();
|
|
3511
3524
|
}), c.on(L.Draw.Event.DELETED, () => {
|
|
@@ -3513,14 +3526,14 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3513
3526
|
});
|
|
3514
3527
|
let $ = !1;
|
|
3515
3528
|
c.on("mousemove", (U) => {
|
|
3516
|
-
$ || (c.invalidateSize(), $ = !0),
|
|
3529
|
+
$ || (c.invalidateSize(), $ = !0), T.value = U.latlng;
|
|
3517
3530
|
}), c.on("zoomend", () => {
|
|
3518
3531
|
W.value = c.getZoom();
|
|
3519
3532
|
});
|
|
3520
3533
|
const J = Ts(a.modelValue);
|
|
3521
3534
|
if (J) {
|
|
3522
3535
|
const U = [];
|
|
3523
|
-
L.geoJSON(J).eachLayer((ae) => U.push(ae)), U.length &&
|
|
3536
|
+
L.geoJSON(J).eachLayer((ae) => U.push(ae)), U.length && m.addLayer(U[0]), V(), D(), P();
|
|
3524
3537
|
}
|
|
3525
3538
|
}), Qe(() => {
|
|
3526
3539
|
document.removeEventListener("wheel", H), M && M();
|
|
@@ -3548,7 +3561,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3548
3561
|
}
|
|
3549
3562
|
}
|
|
3550
3563
|
function De() {
|
|
3551
|
-
const h =
|
|
3564
|
+
const h = m.toGeoJSON(), $ = new Blob([JSON.stringify(h, null, 2)], { type: "application/json" }), J = URL.createObjectURL($), U = document.createElement("a");
|
|
3552
3565
|
U.href = J, U.download = "data.geojson", U.click(), URL.revokeObjectURL(J);
|
|
3553
3566
|
}
|
|
3554
3567
|
function Ke(h) {
|
|
@@ -3559,8 +3572,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3559
3572
|
if (typeof U.result == "string")
|
|
3560
3573
|
try {
|
|
3561
3574
|
const ae = JSON.parse(U.result);
|
|
3562
|
-
|
|
3563
|
-
|
|
3575
|
+
m.clearLayers(), ae && L.geoJSON({ type: "Feature", geometry: ae }).eachLayer((oe) => {
|
|
3576
|
+
m.addLayer(oe);
|
|
3564
3577
|
}), V(), D(), P();
|
|
3565
3578
|
} finally {
|
|
3566
3579
|
$.value = "";
|
|
@@ -3582,12 +3595,12 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3582
3595
|
n("update:modelValue", $);
|
|
3583
3596
|
return;
|
|
3584
3597
|
}
|
|
3585
|
-
|
|
3586
|
-
|
|
3598
|
+
m.clearLayers(), $ && L.geoJSON({ type: "Feature", geometry: $ }).eachLayer((J) => {
|
|
3599
|
+
m.addLayer(J), J.dragging?.enable(), J.dragging?.enabled(), J.on("dragend", (U) => {
|
|
3587
3600
|
const oe = U.target.getLatLng();
|
|
3588
3601
|
n("update:modelValue", { type: "Point", coordinates: [oe.lng, oe.lat] });
|
|
3589
3602
|
});
|
|
3590
|
-
}), j.value =
|
|
3603
|
+
}), j.value = m.getLayers().length, D(), P();
|
|
3591
3604
|
}
|
|
3592
3605
|
);
|
|
3593
3606
|
function Se() {
|
|
@@ -3606,20 +3619,20 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3606
3619
|
}
|
|
3607
3620
|
};
|
|
3608
3621
|
}
|
|
3609
|
-
const
|
|
3610
|
-
return ue(
|
|
3622
|
+
const ze = k(!1);
|
|
3623
|
+
return ue(ze, () => {
|
|
3611
3624
|
setTimeout(() => {
|
|
3612
3625
|
c.invalidateSize();
|
|
3613
3626
|
}, 50);
|
|
3614
3627
|
}), (h, $) => (i(), d("div", {
|
|
3615
|
-
class: I(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen:
|
|
3628
|
+
class: I(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: ze.value }])
|
|
3616
3629
|
}, [
|
|
3617
3630
|
l("div", {
|
|
3618
3631
|
ref_key: "mapContainer",
|
|
3619
|
-
ref:
|
|
3632
|
+
ref: f,
|
|
3620
3633
|
class: "w-full h-full"
|
|
3621
3634
|
}, null, 512),
|
|
3622
|
-
F(
|
|
3635
|
+
F(it, {
|
|
3623
3636
|
name: "zoom-instructions",
|
|
3624
3637
|
"enter-active-class": "transition-all duration-200 ease-out",
|
|
3625
3638
|
"leave-active-class": "transition-all duration-500 ease-in",
|
|
@@ -3629,18 +3642,18 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3629
3642
|
"leave-to-class": "opacity-0"
|
|
3630
3643
|
}, {
|
|
3631
3644
|
default: Ee(() => [
|
|
3632
|
-
r.value && a.handleZoom ? (i(), d("div",
|
|
3633
|
-
l("div",
|
|
3634
|
-
l("p",
|
|
3645
|
+
r.value && a.handleZoom ? (i(), d("div", hr, [
|
|
3646
|
+
l("div", gr, [
|
|
3647
|
+
l("p", br, G(u.value), 1)
|
|
3635
3648
|
])
|
|
3636
|
-
])) :
|
|
3649
|
+
])) : A("", !0)
|
|
3637
3650
|
]),
|
|
3638
3651
|
_: 1
|
|
3639
3652
|
}),
|
|
3640
|
-
l("div",
|
|
3641
|
-
F(
|
|
3642
|
-
l("div",
|
|
3643
|
-
l("div",
|
|
3653
|
+
l("div", yr, [
|
|
3654
|
+
F(dr, { onGoToCoordinates: Ue }),
|
|
3655
|
+
l("div", xr, [
|
|
3656
|
+
l("div", wr, [
|
|
3644
3657
|
l("button", {
|
|
3645
3658
|
type: "button",
|
|
3646
3659
|
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",
|
|
@@ -3651,7 +3664,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3651
3664
|
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",
|
|
3652
3665
|
onClick: De,
|
|
3653
3666
|
disabled: j.value === 0
|
|
3654
|
-
}, "Export", 8,
|
|
3667
|
+
}, "Export", 8, kr)
|
|
3655
3668
|
]),
|
|
3656
3669
|
l("input", {
|
|
3657
3670
|
ref_key: "importRef",
|
|
@@ -3663,8 +3676,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3663
3676
|
}, null, 544)
|
|
3664
3677
|
])
|
|
3665
3678
|
]),
|
|
3666
|
-
l("div",
|
|
3667
|
-
l("div",
|
|
3679
|
+
l("div", _r, [
|
|
3680
|
+
l("div", $r, [
|
|
3668
3681
|
s.value.includes("marker") ? (i(), d("button", {
|
|
3669
3682
|
key: 0,
|
|
3670
3683
|
class: I(["vs-btn", { "vs-active": Z.value === "marker" }]),
|
|
@@ -3673,8 +3686,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3673
3686
|
"aria-label": "Draw point",
|
|
3674
3687
|
onClick: $[0] || ($[0] = (J) => xe("marker"))
|
|
3675
3688
|
}, [
|
|
3676
|
-
F(
|
|
3677
|
-
], 10,
|
|
3689
|
+
F(Ds)
|
|
3690
|
+
], 10, Cr)) : A("", !0),
|
|
3678
3691
|
s.value.includes("polyline") ? (i(), d("button", {
|
|
3679
3692
|
key: 1,
|
|
3680
3693
|
class: I(["vs-btn", { "vs-active": Z.value === "polyline" }]),
|
|
@@ -3683,8 +3696,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3683
3696
|
"aria-label": "Draw polyline",
|
|
3684
3697
|
onClick: $[1] || ($[1] = (J) => xe("polyline"))
|
|
3685
3698
|
}, [
|
|
3686
|
-
F(
|
|
3687
|
-
], 10,
|
|
3699
|
+
F(Hs)
|
|
3700
|
+
], 10, Vr)) : A("", !0),
|
|
3688
3701
|
s.value.includes("polygon") ? (i(), d("button", {
|
|
3689
3702
|
key: 2,
|
|
3690
3703
|
class: I(["vs-btn", { "vs-active": Z.value === "polygon" }]),
|
|
@@ -3693,8 +3706,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3693
3706
|
"aria-label": "Draw polygon",
|
|
3694
3707
|
onClick: $[2] || ($[2] = (J) => xe("polygon"))
|
|
3695
3708
|
}, [
|
|
3696
|
-
F(
|
|
3697
|
-
], 10,
|
|
3709
|
+
F(Ws)
|
|
3710
|
+
], 10, Mr)) : A("", !0),
|
|
3698
3711
|
s.value.includes("rectangle") ? (i(), d("button", {
|
|
3699
3712
|
key: 3,
|
|
3700
3713
|
class: I(["vs-btn", { "vs-active": Z.value === "rectangle" }]),
|
|
@@ -3703,36 +3716,36 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3703
3716
|
"aria-label": "Draw rectangle",
|
|
3704
3717
|
onClick: $[3] || ($[3] = (J) => xe("rectangle"))
|
|
3705
3718
|
}, [
|
|
3706
|
-
F(
|
|
3707
|
-
], 10,
|
|
3719
|
+
F(Ys)
|
|
3720
|
+
], 10, Lr)) : A("", !0),
|
|
3708
3721
|
l("button", {
|
|
3709
3722
|
class: "vs-btn mt-5",
|
|
3710
3723
|
onClick: $[4] || ($[4] = (J) => {
|
|
3711
|
-
|
|
3724
|
+
ze.value = !ze.value;
|
|
3712
3725
|
}),
|
|
3713
3726
|
title: "Full Screen",
|
|
3714
3727
|
"aria-label": "Full Screen"
|
|
3715
3728
|
}, [
|
|
3716
|
-
F(
|
|
3729
|
+
F(tr, { style: { width: "12px", height: "12px" } })
|
|
3717
3730
|
])
|
|
3718
3731
|
])
|
|
3719
3732
|
]),
|
|
3720
3733
|
l("div", {
|
|
3721
3734
|
class: I(["absolute left-4 z-[1000]", x.value ? "bottom-8" : "bottom-4"])
|
|
3722
3735
|
}, [
|
|
3723
|
-
F(
|
|
3736
|
+
F(vr, {
|
|
3724
3737
|
basemaps: te(C),
|
|
3725
3738
|
onOnLayerChange: lt
|
|
3726
3739
|
}, null, 8, ["basemaps"])
|
|
3727
3740
|
], 2),
|
|
3728
|
-
l("div",
|
|
3729
|
-
x.value ? (i(), d("div",
|
|
3730
|
-
l("div",
|
|
3741
|
+
l("div", Sr, [
|
|
3742
|
+
x.value ? (i(), d("div", Br, [
|
|
3743
|
+
l("div", jr, [
|
|
3731
3744
|
$[7] || ($[7] = ge(" Тип: ", -1)),
|
|
3732
|
-
l("span",
|
|
3745
|
+
l("span", Er, G(x.value.type), 1)
|
|
3733
3746
|
]),
|
|
3734
|
-
l("div",
|
|
3735
|
-
l("div",
|
|
3747
|
+
l("div", Ir, [
|
|
3748
|
+
l("div", Ar, [
|
|
3736
3749
|
$[8] || ($[8] = ge(" Центр: ", -1)),
|
|
3737
3750
|
l("b", null, G(x.value.center.lat.toFixed(5)) + ", " + G(x.value.center.lng.toFixed(5)), 1)
|
|
3738
3751
|
]),
|
|
@@ -3758,14 +3771,14 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3758
3771
|
F(tt, { class: "w-3 h-3" })
|
|
3759
3772
|
])
|
|
3760
3773
|
])
|
|
3761
|
-
])) :
|
|
3774
|
+
])) : A("", !0)
|
|
3762
3775
|
])
|
|
3763
3776
|
], 2));
|
|
3764
3777
|
}
|
|
3765
|
-
}),
|
|
3778
|
+
}), Or = /* @__PURE__ */ X(Fr, [["__scopeId", "data-v-77633b64"]]), Dr = ["data-focus"], Ur = { class: "flex items-center" }, Pr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Rr = ["onClick", "aria-label"], Hr = {
|
|
3766
3779
|
key: 0,
|
|
3767
3780
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3768
|
-
},
|
|
3781
|
+
}, Nr = { class: "flex-1 min-w-[2px]" }, qr = ["placeholder"], Gr = { class: "flex items-center shrink-0" }, Wr = ["disabled"], Kr = /* @__PURE__ */ R({
|
|
3769
3782
|
__name: "vs-input-tag",
|
|
3770
3783
|
props: /* @__PURE__ */ ie({
|
|
3771
3784
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3784,26 +3797,26 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3784
3797
|
setup(o, { emit: e }) {
|
|
3785
3798
|
const t = o, a = e;
|
|
3786
3799
|
Ce(t.style);
|
|
3787
|
-
const n = k(null), s = k(null), r = k(null), u = k(!1), p = k(""),
|
|
3800
|
+
const n = k(null), s = k(null), r = k(null), u = k(!1), p = k(""), f = de(o, "modelValue"), c = B(() => t.placeholder || "Add tag…"), m = B(() => f.value?.length === 0 && p.value === ""), b = B(() => !t.disabled && f.value?.length > 0), M = B(() => t.disabled), q = async () => {
|
|
3788
3801
|
M.value || await je(() => r.value?.focus());
|
|
3789
3802
|
}, H = (C) => {
|
|
3790
3803
|
const _ = C.trim();
|
|
3791
|
-
_ !== "" && (!
|
|
3804
|
+
_ !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [_] : t.unique ? f.value.includes(_) || (f.value = [...f.value, _]) : f.value = [...f.value, _], p.value = "");
|
|
3792
3805
|
}, K = () => {
|
|
3793
3806
|
const C = p.value;
|
|
3794
3807
|
C.trim() !== "" && H(C), p.value = "";
|
|
3795
|
-
},
|
|
3796
|
-
const _ =
|
|
3808
|
+
}, T = (C) => {
|
|
3809
|
+
const _ = f.value.slice();
|
|
3797
3810
|
_.splice(C, 1), a("update:modelValue", _);
|
|
3798
3811
|
}, W = () => {
|
|
3799
3812
|
a("update:modelValue", []);
|
|
3800
3813
|
}, j = () => {
|
|
3801
3814
|
M.value || (u.value = !0);
|
|
3802
3815
|
}, g = () => {
|
|
3803
|
-
u.value = !1;
|
|
3816
|
+
u.value = !1, !M.value && K();
|
|
3804
3817
|
}, x = (C) => {
|
|
3805
3818
|
const { key: _ } = C;
|
|
3806
|
-
_ === "Enter" ? (C.preventDefault(), K()) : _ === "Backspace" && p.value === "" &&
|
|
3819
|
+
_ === "Enter" ? (C.preventDefault(), K()) : _ === "Backspace" && p.value === "" && f.value.length > 0 && T(f.value.length - 1);
|
|
3807
3820
|
};
|
|
3808
3821
|
return (C, _) => (i(), d("div", {
|
|
3809
3822
|
class: "flex gap-1 w-full",
|
|
@@ -3832,17 +3845,17 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3832
3845
|
ref_key: "chipsRef",
|
|
3833
3846
|
ref: s
|
|
3834
3847
|
}, [
|
|
3835
|
-
(i(!0), d(re, null, me(
|
|
3848
|
+
(i(!0), d(re, null, me(f.value, (O, ee) => (i(), d("div", {
|
|
3836
3849
|
key: ee,
|
|
3837
3850
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3838
3851
|
}, [
|
|
3839
|
-
l("div",
|
|
3840
|
-
l("div",
|
|
3852
|
+
l("div", Ur, [
|
|
3853
|
+
l("div", Pr, G(O), 1)
|
|
3841
3854
|
]),
|
|
3842
3855
|
l("div", {
|
|
3843
3856
|
role: "button",
|
|
3844
3857
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
3845
|
-
onClick: _e((Q) =>
|
|
3858
|
+
onClick: _e((Q) => T(ee), ["stop"]),
|
|
3846
3859
|
"aria-label": `Remove ${O}`
|
|
3847
3860
|
}, _[2] || (_[2] = [
|
|
3848
3861
|
l("svg", {
|
|
@@ -3855,11 +3868,11 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3855
3868
|
}, [
|
|
3856
3869
|
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" })
|
|
3857
3870
|
], -1)
|
|
3858
|
-
]), 8,
|
|
3871
|
+
]), 8, Rr)
|
|
3859
3872
|
]))), 128)),
|
|
3860
|
-
|
|
3861
|
-
l("div",
|
|
3862
|
-
M.value ?
|
|
3873
|
+
m.value ? (i(), d("div", Hr, G(c.value), 1)) : A("", !0),
|
|
3874
|
+
l("div", Nr, [
|
|
3875
|
+
M.value ? A("", !0) : ne((i(), d("input", {
|
|
3863
3876
|
key: 0,
|
|
3864
3877
|
ref_key: "inputRef",
|
|
3865
3878
|
ref: r,
|
|
@@ -3875,13 +3888,13 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3875
3888
|
onFocus: j,
|
|
3876
3889
|
onBlur: g,
|
|
3877
3890
|
onKeydown: x,
|
|
3878
|
-
placeholder:
|
|
3879
|
-
}, null, 40,
|
|
3891
|
+
placeholder: f.value && f.value.length ? "" : void 0
|
|
3892
|
+
}, null, 40, qr)), [
|
|
3880
3893
|
[ve, p.value]
|
|
3881
3894
|
])
|
|
3882
3895
|
])
|
|
3883
3896
|
], 512),
|
|
3884
|
-
l("div",
|
|
3897
|
+
l("div", Gr, [
|
|
3885
3898
|
b.value ? (i(), d("button", {
|
|
3886
3899
|
key: 0,
|
|
3887
3900
|
type: "button",
|
|
@@ -3898,13 +3911,13 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3898
3911
|
}, [
|
|
3899
3912
|
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" })
|
|
3900
3913
|
], -1)
|
|
3901
|
-
]), 8,
|
|
3914
|
+
]), 8, Wr)) : A("", !0)
|
|
3902
3915
|
])
|
|
3903
|
-
], 10,
|
|
3916
|
+
], 10, Dr)
|
|
3904
3917
|
], 2)
|
|
3905
3918
|
], 512));
|
|
3906
3919
|
}
|
|
3907
|
-
}),
|
|
3920
|
+
}), Zr = { class: "relative flex gap-1 bg-white w-full" }, Jr = ["disabled", "placeholder"], Yr = /* @__PURE__ */ R({
|
|
3908
3921
|
__name: "vs-input-slug",
|
|
3909
3922
|
props: /* @__PURE__ */ ie({
|
|
3910
3923
|
disabled: { type: Boolean },
|
|
@@ -3916,7 +3929,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3916
3929
|
}),
|
|
3917
3930
|
emits: ["update:modelValue"],
|
|
3918
3931
|
setup(o) {
|
|
3919
|
-
const e =
|
|
3932
|
+
const e = Te("values"), t = o, a = de(o, "modelValue");
|
|
3920
3933
|
function n(r) {
|
|
3921
3934
|
const u = {
|
|
3922
3935
|
а: "a",
|
|
@@ -3963,14 +3976,14 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3963
3976
|
const r = e?.value?.[t.parent || ""]?.toString(), u = n(r);
|
|
3964
3977
|
a.value = u.toString();
|
|
3965
3978
|
};
|
|
3966
|
-
return (r, u) => (i(), d("div",
|
|
3979
|
+
return (r, u) => (i(), d("div", Zr, [
|
|
3967
3980
|
ne(l("input", {
|
|
3968
3981
|
ref: "vsText",
|
|
3969
3982
|
disabled: r.disabled,
|
|
3970
3983
|
placeholder: r.placeholder,
|
|
3971
3984
|
"onUpdate:modelValue": u[0] || (u[0] = (p) => a.value = p),
|
|
3972
3985
|
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"
|
|
3973
|
-
}, null, 8,
|
|
3986
|
+
}, null, 8, Jr), [
|
|
3974
3987
|
[ve, a.value]
|
|
3975
3988
|
]),
|
|
3976
3989
|
l("button", {
|
|
@@ -3979,13 +3992,13 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3979
3992
|
}, " Gen ")
|
|
3980
3993
|
]));
|
|
3981
3994
|
}
|
|
3982
|
-
}),
|
|
3995
|
+
}), Xr = /* @__PURE__ */ X(Yr, [["__scopeId", "data-v-b0eba370"]]), Qr = { class: "w-full" }, ei = {
|
|
3983
3996
|
ref: "sortableContainer",
|
|
3984
3997
|
class: "flex flex-col gap-1"
|
|
3985
|
-
},
|
|
3998
|
+
}, ti = ["onDragstart", "onDrop"], li = { class: "w-1/3" }, oi = { class: "w-2/3" }, ni = ["onClick"], ai = {
|
|
3986
3999
|
key: 0,
|
|
3987
4000
|
class: "text-[14px] text-gray-700"
|
|
3988
|
-
},
|
|
4001
|
+
}, si = { class: "mt-2 w-full flex items-center" }, ri = ["disabled"], ii = /* @__PURE__ */ R({
|
|
3989
4002
|
__name: "vs-input-key-value",
|
|
3990
4003
|
props: {
|
|
3991
4004
|
parent: {},
|
|
@@ -3995,66 +4008,66 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
3995
4008
|
},
|
|
3996
4009
|
emits: ["update:modelValue"],
|
|
3997
4010
|
setup(o, { emit: e }) {
|
|
3998
|
-
const t = (K) => `${K}-${Math.random().toString(36).substring(2, 15)}`, a =
|
|
4011
|
+
const t = (K) => `${K}-${Math.random().toString(36).substring(2, 15)}`, a = Te("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], p = k([]), f = k(null);
|
|
3999
4012
|
(() => {
|
|
4000
4013
|
const K = n.parent && a?.value?.[n.parent] || n.modelValue || {};
|
|
4001
|
-
p.value = Object.entries(K).filter(([
|
|
4014
|
+
p.value = Object.entries(K).filter(([T]) => !u.includes(T)).map(([T, W]) => ({
|
|
4002
4015
|
id: t("key-value-"),
|
|
4003
|
-
key:
|
|
4016
|
+
key: T,
|
|
4004
4017
|
value: W
|
|
4005
4018
|
}));
|
|
4006
4019
|
})();
|
|
4007
|
-
function
|
|
4008
|
-
|
|
4020
|
+
function m(K) {
|
|
4021
|
+
f.value = K;
|
|
4009
4022
|
}
|
|
4010
4023
|
function b(K) {
|
|
4011
|
-
if (
|
|
4012
|
-
const
|
|
4013
|
-
p.value.splice(K, 0,
|
|
4024
|
+
if (f.value === null || f.value === K) return;
|
|
4025
|
+
const T = p.value.splice(f.value, 1)[0];
|
|
4026
|
+
p.value.splice(K, 0, T), f.value = null;
|
|
4014
4027
|
}
|
|
4015
4028
|
const M = B(
|
|
4016
4029
|
() => p.value.some((K) => K.key && !K.value || !K.key && K.value)
|
|
4017
4030
|
), q = () => {
|
|
4018
4031
|
p.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
4019
4032
|
}, H = (K) => {
|
|
4020
|
-
p.value = p.value.filter((
|
|
4033
|
+
p.value = p.value.filter((T) => T.id !== K);
|
|
4021
4034
|
};
|
|
4022
4035
|
return ue(
|
|
4023
4036
|
p,
|
|
4024
4037
|
(K) => {
|
|
4025
|
-
const
|
|
4038
|
+
const T = {};
|
|
4026
4039
|
K.forEach((j) => {
|
|
4027
|
-
j.key && j.value !== void 0 && (
|
|
4040
|
+
j.key && j.value !== void 0 && (T[j.key] = j.value);
|
|
4028
4041
|
});
|
|
4029
4042
|
const W = {};
|
|
4030
4043
|
u.length && u.forEach((j) => {
|
|
4031
4044
|
W[j] = n.parent ? a?.value?.[n.parent]?.[j] : void 0;
|
|
4032
4045
|
}), a?.value && n.parent && (a.value[n.parent] = {
|
|
4033
4046
|
...W,
|
|
4034
|
-
...
|
|
4035
|
-
}), s("update:modelValue",
|
|
4047
|
+
...T
|
|
4048
|
+
}), s("update:modelValue", T);
|
|
4036
4049
|
},
|
|
4037
4050
|
{ deep: !0 }
|
|
4038
|
-
), (K,
|
|
4039
|
-
l("div",
|
|
4051
|
+
), (K, T) => (i(), d("div", Qr, [
|
|
4052
|
+
l("div", ei, [
|
|
4040
4053
|
(i(!0), d(re, null, me(p.value, (W, j) => (i(), d("div", {
|
|
4041
4054
|
key: W.id,
|
|
4042
|
-
class: I(["flex items-center gap-2 w-full", { "opacity-50":
|
|
4055
|
+
class: I(["flex items-center gap-2 w-full", { "opacity-50": f.value === j }]),
|
|
4043
4056
|
draggable: "true",
|
|
4044
|
-
onDragstart: (g) =>
|
|
4045
|
-
onDragover:
|
|
4057
|
+
onDragstart: (g) => m(j),
|
|
4058
|
+
onDragover: T[0] || (T[0] = _e(() => {
|
|
4046
4059
|
}, ["prevent"])),
|
|
4047
4060
|
onDrop: (g) => b(j)
|
|
4048
4061
|
}, [
|
|
4049
|
-
|
|
4050
|
-
l("div",
|
|
4062
|
+
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)),
|
|
4063
|
+
l("div", li, [
|
|
4051
4064
|
F(Xe, {
|
|
4052
4065
|
modelValue: W.key,
|
|
4053
4066
|
"onUpdate:modelValue": (g) => W.key = g,
|
|
4054
4067
|
placeholder: "Ключ"
|
|
4055
4068
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
4056
4069
|
]),
|
|
4057
|
-
l("div",
|
|
4070
|
+
l("div", oi, [
|
|
4058
4071
|
F(Xe, {
|
|
4059
4072
|
modelValue: W.value,
|
|
4060
4073
|
"onUpdate:modelValue": (g) => W.value = g,
|
|
@@ -4065,15 +4078,15 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4065
4078
|
onClick: (g) => H(W.id),
|
|
4066
4079
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
4067
4080
|
}, [
|
|
4068
|
-
F(te(
|
|
4081
|
+
F(te(Wl), {
|
|
4069
4082
|
height: "16",
|
|
4070
4083
|
width: "16"
|
|
4071
4084
|
})
|
|
4072
|
-
], 8,
|
|
4073
|
-
], 42,
|
|
4085
|
+
], 8, ni)
|
|
4086
|
+
], 42, ti))), 128))
|
|
4074
4087
|
], 512),
|
|
4075
|
-
p.value.length ?
|
|
4076
|
-
l("div",
|
|
4088
|
+
p.value.length ? A("", !0) : (i(), d("span", ai, " Дані для відображення відсутні ")),
|
|
4089
|
+
l("div", si, [
|
|
4077
4090
|
l("button", {
|
|
4078
4091
|
type: "button",
|
|
4079
4092
|
onClick: q,
|
|
@@ -4085,11 +4098,11 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4085
4098
|
width: "14"
|
|
4086
4099
|
}),
|
|
4087
4100
|
ge(" " + G(te(r)), 1)
|
|
4088
|
-
], 8,
|
|
4101
|
+
], 8, ri)
|
|
4089
4102
|
])
|
|
4090
4103
|
]));
|
|
4091
4104
|
}
|
|
4092
|
-
}),
|
|
4105
|
+
}), ui = /* @__PURE__ */ X(ii, [["__scopeId", "data-v-a0f7fbfc"]]), di = { class: "flex items-center gap-2 w-full" }, ci = ["disabled"], pi = /* @__PURE__ */ R({
|
|
4093
4106
|
__name: "vs-input-color",
|
|
4094
4107
|
props: {
|
|
4095
4108
|
style: { default: () => ({}) },
|
|
@@ -4106,7 +4119,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4106
4119
|
get: () => t.modelValue || "#000000",
|
|
4107
4120
|
set: (r) => n("update:modelValue", r)
|
|
4108
4121
|
});
|
|
4109
|
-
return (r, u) => (i(), d("div",
|
|
4122
|
+
return (r, u) => (i(), d("div", di, [
|
|
4110
4123
|
ne(l("input", {
|
|
4111
4124
|
type: "color",
|
|
4112
4125
|
"onUpdate:modelValue": u[0] || (u[0] = (p) => s.value = p),
|
|
@@ -4114,7 +4127,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4114
4127
|
ref: "color",
|
|
4115
4128
|
class: I(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", te(a)].join(" ")]),
|
|
4116
4129
|
style: { border: "1px solid #CFD9E0" }
|
|
4117
|
-
}, null, 10,
|
|
4130
|
+
}, null, 10, ci), [
|
|
4118
4131
|
[ve, s.value]
|
|
4119
4132
|
]),
|
|
4120
4133
|
ne(l("input", {
|
|
@@ -4125,7 +4138,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4125
4138
|
])
|
|
4126
4139
|
]));
|
|
4127
4140
|
}
|
|
4128
|
-
}),
|
|
4141
|
+
}), fi = { class: "flex items-center gap-2 w-full" }, mi = ["min", "max", "step", "disabled"], vi = /* @__PURE__ */ R({
|
|
4129
4142
|
__name: "vs-input-range",
|
|
4130
4143
|
props: {
|
|
4131
4144
|
style: { default: () => ({}) },
|
|
@@ -4145,7 +4158,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4145
4158
|
get: () => Number(t.modelValue ?? t.min),
|
|
4146
4159
|
set: (r) => n("update:modelValue", Number(r))
|
|
4147
4160
|
});
|
|
4148
|
-
return (r, u) => (i(), d("div",
|
|
4161
|
+
return (r, u) => (i(), d("div", fi, [
|
|
4149
4162
|
ne(l("input", {
|
|
4150
4163
|
type: "range",
|
|
4151
4164
|
"onUpdate:modelValue": u[0] || (u[0] = (p) => s.value = p),
|
|
@@ -4155,7 +4168,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4155
4168
|
disabled: r.disabled,
|
|
4156
4169
|
ref: "range",
|
|
4157
4170
|
class: I(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", te(a)].join(" ")])
|
|
4158
|
-
}, null, 10,
|
|
4171
|
+
}, null, 10, mi), [
|
|
4159
4172
|
[ve, s.value]
|
|
4160
4173
|
]),
|
|
4161
4174
|
ne(l("input", {
|
|
@@ -4167,7 +4180,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4167
4180
|
])
|
|
4168
4181
|
]));
|
|
4169
4182
|
}
|
|
4170
|
-
}),
|
|
4183
|
+
}), hi = ["type", "value", "onInput", "placeholder", "disabled"], gi = /* @__PURE__ */ R({
|
|
4171
4184
|
__name: "vs-input-array",
|
|
4172
4185
|
props: /* @__PURE__ */ ie({
|
|
4173
4186
|
count: { default: 1 },
|
|
@@ -4187,7 +4200,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4187
4200
|
emits: ["update:modelValue"],
|
|
4188
4201
|
setup(o) {
|
|
4189
4202
|
const e = o, { inputClass: t } = Ce(e.style), a = de(o, "modelValue");
|
|
4190
|
-
|
|
4203
|
+
Zt(() => {
|
|
4191
4204
|
const s = a.value?.length ?? 0;
|
|
4192
4205
|
s < e.count && (a.value = [
|
|
4193
4206
|
...a.value ?? [],
|
|
@@ -4211,38 +4224,38 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4211
4224
|
style: {
|
|
4212
4225
|
border: "1px solid #CFD9E0"
|
|
4213
4226
|
}
|
|
4214
|
-
}, null, 42,
|
|
4227
|
+
}, null, 42, hi))), 256))
|
|
4215
4228
|
], 2));
|
|
4216
4229
|
}
|
|
4217
|
-
}),
|
|
4230
|
+
}), bi = {
|
|
4218
4231
|
VsInputText: Xe,
|
|
4219
|
-
VsInputRadio:
|
|
4232
|
+
VsInputRadio: kt,
|
|
4220
4233
|
"vs-input-text": Xe,
|
|
4221
|
-
"vs-input-password":
|
|
4222
|
-
"vs-input-textarea":
|
|
4223
|
-
"vs-input-mask":
|
|
4224
|
-
"vs-input-number":
|
|
4225
|
-
"vs-input-radio":
|
|
4226
|
-
"vs-input-select":
|
|
4234
|
+
"vs-input-password": wl,
|
|
4235
|
+
"vs-input-textarea": Ma,
|
|
4236
|
+
"vs-input-mask": no,
|
|
4237
|
+
"vs-input-number": $l,
|
|
4238
|
+
"vs-input-radio": kt,
|
|
4239
|
+
"vs-input-select": Vt,
|
|
4227
4240
|
"vs-input-switcher": Tt,
|
|
4228
|
-
"vs-input-static":
|
|
4229
|
-
"vs-input-container":
|
|
4230
|
-
"vs-input-date":
|
|
4231
|
-
"vs-input-checkbox":
|
|
4232
|
-
"vs-input-file":
|
|
4233
|
-
"vs-input-html":
|
|
4234
|
-
"vs-input-email":
|
|
4235
|
-
"vs-input-datatable":
|
|
4236
|
-
"vs-input-map":
|
|
4237
|
-
"vs-input-file-list":
|
|
4238
|
-
"vs-input-tags":
|
|
4239
|
-
"vs-input-slug":
|
|
4240
|
-
"vs-input-key-value":
|
|
4241
|
-
"vs-input-range":
|
|
4242
|
-
"vs-input-color":
|
|
4243
|
-
"vs-input-native-select":
|
|
4244
|
-
"vs-input-array":
|
|
4245
|
-
},
|
|
4241
|
+
"vs-input-static": wt,
|
|
4242
|
+
"vs-input-container": aa,
|
|
4243
|
+
"vs-input-date": yo,
|
|
4244
|
+
"vs-input-checkbox": go,
|
|
4245
|
+
"vs-input-file": on,
|
|
4246
|
+
"vs-input-html": wt,
|
|
4247
|
+
"vs-input-email": ro,
|
|
4248
|
+
"vs-input-datatable": Is,
|
|
4249
|
+
"vs-input-map": Or,
|
|
4250
|
+
"vs-input-file-list": An,
|
|
4251
|
+
"vs-input-tags": Kr,
|
|
4252
|
+
"vs-input-slug": Xr,
|
|
4253
|
+
"vs-input-key-value": ui,
|
|
4254
|
+
"vs-input-range": vi,
|
|
4255
|
+
"vs-input-color": pi,
|
|
4256
|
+
"vs-input-native-select": Vt,
|
|
4257
|
+
"vs-input-array": gi
|
|
4258
|
+
}, yi = /* @__PURE__ */ R({
|
|
4246
4259
|
__name: "behavior",
|
|
4247
4260
|
props: {
|
|
4248
4261
|
api: {},
|
|
@@ -4252,7 +4265,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4252
4265
|
value: {}
|
|
4253
4266
|
},
|
|
4254
4267
|
setup(o) {
|
|
4255
|
-
const e = o, t =
|
|
4268
|
+
const e = o, t = Te("values");
|
|
4256
4269
|
async function a() {
|
|
4257
4270
|
try {
|
|
4258
4271
|
if (!e.api) return;
|
|
@@ -4274,10 +4287,10 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4274
4287
|
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"
|
|
4275
4288
|
}, G(n.button), 1));
|
|
4276
4289
|
}
|
|
4277
|
-
}),
|
|
4290
|
+
}), xi = { class: "flex flex-col gap-1 w-full" }, wi = {
|
|
4278
4291
|
key: 0,
|
|
4279
4292
|
class: "text-sm text-gray-500"
|
|
4280
|
-
},
|
|
4293
|
+
}, Dt = /* @__PURE__ */ R({
|
|
4281
4294
|
__name: "vs-compact-form-layout",
|
|
4282
4295
|
props: /* @__PURE__ */ ie({
|
|
4283
4296
|
item: { default: {} },
|
|
@@ -4292,16 +4305,16 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4292
4305
|
}),
|
|
4293
4306
|
emits: ["update:modelValue"],
|
|
4294
4307
|
setup(o) {
|
|
4295
|
-
const e = o, t = de(o, "modelValue"), a = B(() =>
|
|
4308
|
+
const e = o, t = de(o, "modelValue"), a = B(() => yl[`${e.layout}`]), n = B(() => bi?.[`vs-input-${e.item.type}`]), s = B(() => {
|
|
4296
4309
|
const u = te(n);
|
|
4297
4310
|
if (!u) return /* @__PURE__ */ new Set();
|
|
4298
4311
|
const p = u.props ?? u.__vccOpts?.props;
|
|
4299
4312
|
if (!p) return /* @__PURE__ */ new Set();
|
|
4300
|
-
const
|
|
4301
|
-
return new Set(
|
|
4313
|
+
const f = Array.isArray(p) ? p : Object.keys(p);
|
|
4314
|
+
return new Set(f);
|
|
4302
4315
|
}), r = B(() => {
|
|
4303
4316
|
const u = e.item ?? {}, p = s.value;
|
|
4304
|
-
return p.size ? Object.fromEntries(Object.entries(u).filter(([
|
|
4317
|
+
return p.size ? Object.fromEntries(Object.entries(u).filter(([f]) => p.has(f))) : {};
|
|
4305
4318
|
});
|
|
4306
4319
|
return (u, p) => ne((i(), he(Oe(a.value), {
|
|
4307
4320
|
ua: e.item.ua,
|
|
@@ -4314,14 +4327,14 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4314
4327
|
l("div", {
|
|
4315
4328
|
class: I(["flex w-full", `${e.item.type}-component`])
|
|
4316
4329
|
}, [
|
|
4317
|
-
l("div",
|
|
4330
|
+
l("div", xi, [
|
|
4318
4331
|
(i(), he(Oe(n.value), Fe(r.value, {
|
|
4319
4332
|
modelValue: t.value,
|
|
4320
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
4333
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => t.value = f)
|
|
4321
4334
|
}), null, 16, ["modelValue"])),
|
|
4322
|
-
u.item.description && e.layout !== "settings" ? (i(), d("p",
|
|
4335
|
+
u.item.description && e.layout !== "settings" ? (i(), d("p", wi, G(u.item.description), 1)) : A("", !0)
|
|
4323
4336
|
]),
|
|
4324
|
-
u.item.behavior?.api && u.item.behavior?.button ? (i(), he(
|
|
4337
|
+
u.item.behavior?.api && u.item.behavior?.button ? (i(), he(yi, Fe({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : A("", !0)
|
|
4325
4338
|
], 2)
|
|
4326
4339
|
]),
|
|
4327
4340
|
_: 1
|
|
@@ -4329,7 +4342,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4329
4342
|
[et, !u.item.hidden]
|
|
4330
4343
|
]);
|
|
4331
4344
|
}
|
|
4332
|
-
}),
|
|
4345
|
+
}), ki = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, _i = { class: "vs-compact-form-navigation__rail mt-[6px]" }, $i = ["onClick"], Ci = /* @__PURE__ */ R({
|
|
4333
4346
|
__name: "vs-compact-form-navigation",
|
|
4334
4347
|
props: {
|
|
4335
4348
|
target: {},
|
|
@@ -4349,7 +4362,7 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4349
4362
|
const P = typeof V == "number" ? `${V}px` : `${V}`;
|
|
4350
4363
|
return { width: P, minWidth: P };
|
|
4351
4364
|
});
|
|
4352
|
-
let
|
|
4365
|
+
let f = null, c = 0, m = 0, b = null, M = null, q = null;
|
|
4353
4366
|
const H = () => ee(), K = () => W();
|
|
4354
4367
|
ue(
|
|
4355
4368
|
() => t.target,
|
|
@@ -4368,15 +4381,15 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4368
4381
|
M = V ?? null;
|
|
4369
4382
|
return;
|
|
4370
4383
|
}
|
|
4371
|
-
|
|
4384
|
+
T(V ?? null), je(() => W());
|
|
4372
4385
|
},
|
|
4373
4386
|
{ immediate: !0 }
|
|
4374
4387
|
), $e(() => {
|
|
4375
|
-
t.scrollContainer ||
|
|
4376
|
-
}),
|
|
4377
|
-
C(),
|
|
4388
|
+
t.scrollContainer || T(null), W();
|
|
4389
|
+
}), rt(() => {
|
|
4390
|
+
C(), T(null, !0), b = null, typeof window < "u" && (c && window.cancelAnimationFrame(c), m && window.cancelAnimationFrame(m));
|
|
4378
4391
|
});
|
|
4379
|
-
function
|
|
4392
|
+
function T(V, P = !1) {
|
|
4380
4393
|
if (q && (q(), q = null), P) {
|
|
4381
4394
|
M = null;
|
|
4382
4395
|
return;
|
|
@@ -4398,11 +4411,11 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4398
4411
|
function j() {
|
|
4399
4412
|
if (!r.value || !b) return;
|
|
4400
4413
|
const V = Array.from(b.querySelectorAll("h1, h2")), P = /* @__PURE__ */ new Set(), Y = [];
|
|
4401
|
-
V.forEach((Z,
|
|
4414
|
+
V.forEach((Z, z) => {
|
|
4402
4415
|
const E = Z.textContent?.trim() ?? "";
|
|
4403
4416
|
if (!E) return;
|
|
4404
4417
|
let S = (Z.getAttribute("id") ?? "").trim();
|
|
4405
|
-
S || (S = g(E) || `heading-${
|
|
4418
|
+
S || (S = g(E) || `heading-${z + 1}`);
|
|
4406
4419
|
let D = S, le = 1;
|
|
4407
4420
|
for (; P.has(D); )
|
|
4408
4421
|
D = `${S}-${le += 1}`;
|
|
@@ -4417,10 +4430,10 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4417
4430
|
return V.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
|
|
4418
4431
|
}
|
|
4419
4432
|
function x(V) {
|
|
4420
|
-
!V || !r.value || typeof MutationObserver > "u" || (C(),
|
|
4433
|
+
!V || !r.value || typeof MutationObserver > "u" || (C(), f = new MutationObserver(() => W()), f.observe(V, { childList: !0, subtree: !0 }));
|
|
4421
4434
|
}
|
|
4422
4435
|
function C() {
|
|
4423
|
-
|
|
4436
|
+
f && (f.disconnect(), f = null);
|
|
4424
4437
|
}
|
|
4425
4438
|
function _(V) {
|
|
4426
4439
|
const P = M;
|
|
@@ -4432,21 +4445,21 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4432
4445
|
function O() {
|
|
4433
4446
|
if (!r.value || !a.value.length) return;
|
|
4434
4447
|
const V = M, P = (V ? V.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), Y = (V ? V.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = P + Y;
|
|
4435
|
-
let
|
|
4448
|
+
let z = null;
|
|
4436
4449
|
for (let S = 0; S < a.value.length; S += 1) {
|
|
4437
4450
|
const D = a.value[S], le = document.getElementById(D.id);
|
|
4438
4451
|
if (le) {
|
|
4439
4452
|
const ce = _(le);
|
|
4440
|
-
ce + le.offsetHeight > P && ce < Z && (
|
|
4453
|
+
ce + le.offsetHeight > P && ce < Z && (z = D.id);
|
|
4441
4454
|
}
|
|
4442
4455
|
}
|
|
4443
|
-
!
|
|
4456
|
+
!z && s.value && (z = s.value), z && (s.value = z);
|
|
4444
4457
|
const E = V ? V.scrollHeight - V.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
|
|
4445
|
-
P + 5 >= E && (
|
|
4458
|
+
P + 5 >= E && (z = a.value[a.value.length - 1].id), z && (n.value = z);
|
|
4446
4459
|
}
|
|
4447
4460
|
function ee() {
|
|
4448
|
-
r.value && (
|
|
4449
|
-
O(),
|
|
4461
|
+
r.value && (m && window.cancelAnimationFrame(m), m = window.requestAnimationFrame(() => {
|
|
4462
|
+
O(), m = 0;
|
|
4450
4463
|
}));
|
|
4451
4464
|
}
|
|
4452
4465
|
function Q(V) {
|
|
@@ -4461,8 +4474,8 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4461
4474
|
class: I(u.value),
|
|
4462
4475
|
style: be(p.value)
|
|
4463
4476
|
}, [
|
|
4464
|
-
l("h2",
|
|
4465
|
-
l("div",
|
|
4477
|
+
l("h2", ki, G(V.title), 1),
|
|
4478
|
+
l("div", _i, [
|
|
4466
4479
|
(i(!0), d(re, null, me(a.value, (Y) => (i(), d("div", {
|
|
4467
4480
|
key: Y.id,
|
|
4468
4481
|
class: I([
|
|
@@ -4481,34 +4494,34 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4481
4494
|
])
|
|
4482
4495
|
}, [
|
|
4483
4496
|
l("span", null, G(Y.text), 1)
|
|
4484
|
-
], 10,
|
|
4497
|
+
], 10, $i)
|
|
4485
4498
|
], 2))), 128))
|
|
4486
4499
|
])
|
|
4487
|
-
], 6)) :
|
|
4500
|
+
], 6)) : A("", !0);
|
|
4488
4501
|
}
|
|
4489
|
-
}),
|
|
4502
|
+
}), Vi = /* @__PURE__ */ X(Ci, [["__scopeId", "data-v-1584a562"]]), Ut = {
|
|
4490
4503
|
required: "Це поле є обов’язковим",
|
|
4491
4504
|
email: "Неправильний email"
|
|
4492
|
-
},
|
|
4505
|
+
}, Mi = (o) => o ? !1 : Ut.required, Li = (o) => {
|
|
4493
4506
|
const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
4494
|
-
return o ? e.test(o) ? !1 :
|
|
4495
|
-
},
|
|
4507
|
+
return o ? e.test(o) ? !1 : Ut.email : !1;
|
|
4508
|
+
}, Si = (o, e) => {
|
|
4496
4509
|
const t = e.pattern ?? e.regexp;
|
|
4497
4510
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
4498
|
-
},
|
|
4511
|
+
}, Bi = (o, e) => !1, ji = (o, e) => {
|
|
4499
4512
|
switch (typeof e == "string" ? e : e.type) {
|
|
4500
4513
|
case "required":
|
|
4501
|
-
return Vi(o);
|
|
4502
|
-
case "email":
|
|
4503
4514
|
return Mi(o);
|
|
4515
|
+
case "email":
|
|
4516
|
+
return Li(o);
|
|
4504
4517
|
case "regexp":
|
|
4505
|
-
return
|
|
4518
|
+
return Si(o, e);
|
|
4506
4519
|
case "custom":
|
|
4507
|
-
return
|
|
4520
|
+
return Bi();
|
|
4508
4521
|
default:
|
|
4509
4522
|
return !1;
|
|
4510
4523
|
}
|
|
4511
|
-
},
|
|
4524
|
+
}, Ei = {
|
|
4512
4525
|
autocomplete: "select",
|
|
4513
4526
|
combobox: "select",
|
|
4514
4527
|
datepicker: "date",
|
|
@@ -4521,16 +4534,16 @@ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-wi
|
|
|
4521
4534
|
dropzone: "file"
|
|
4522
4535
|
// mask: 'text',
|
|
4523
4536
|
};
|
|
4524
|
-
function
|
|
4537
|
+
function Lt(o) {
|
|
4525
4538
|
const e = o.toLowerCase();
|
|
4526
|
-
return
|
|
4539
|
+
return Ei[e] || e;
|
|
4527
4540
|
}
|
|
4528
|
-
function
|
|
4541
|
+
function nt(o, e = !1) {
|
|
4529
4542
|
if (Array.isArray(o)) {
|
|
4530
4543
|
const a = [];
|
|
4531
4544
|
return o.forEach((n) => {
|
|
4532
4545
|
const s = { ...n };
|
|
4533
|
-
s.name = (n.name || n.id || n.key || "").toString(), s.type =
|
|
4546
|
+
s.name = (n.name || n.id || n.key || "").toString(), s.type = Lt(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, Array.isArray(s.schema) && (s.schema = nt(s.schema, s.disabled)), a.push(s);
|
|
4534
4547
|
}), a;
|
|
4535
4548
|
}
|
|
4536
4549
|
const t = [];
|
|
@@ -4538,39 +4551,39 @@ function Ei(o, e = !1) {
|
|
|
4538
4551
|
const n = {
|
|
4539
4552
|
name: a[0],
|
|
4540
4553
|
...a[1],
|
|
4541
|
-
type:
|
|
4554
|
+
type: Lt(a[1].type),
|
|
4542
4555
|
label: a[1].label || a[1].ua,
|
|
4543
4556
|
rules: a[1].rules || a[1].validators,
|
|
4544
4557
|
disabled: e
|
|
4545
4558
|
};
|
|
4546
|
-
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);
|
|
4559
|
+
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}`), Array.isArray(n.schema) && (n.schema = nt(n.schema, n.disabled)), t.push(n);
|
|
4547
4560
|
}), t;
|
|
4548
4561
|
}
|
|
4549
4562
|
function Ii(o, e, t = !1) {
|
|
4550
|
-
const a = B(() =>
|
|
4563
|
+
const a = B(() => nt(
|
|
4551
4564
|
(Array.isArray(e), e),
|
|
4552
4565
|
typeof t == "boolean" ? t : t.value
|
|
4553
4566
|
)), n = k({});
|
|
4554
|
-
function s(
|
|
4555
|
-
const c =
|
|
4567
|
+
function s(f) {
|
|
4568
|
+
const c = f?.conditions;
|
|
4556
4569
|
if (!c) return !0;
|
|
4557
|
-
const
|
|
4558
|
-
return
|
|
4570
|
+
const m = Array.isArray(c) ? c[0] : c, b = o?.value?.[m];
|
|
4571
|
+
return Ot(b, c);
|
|
4559
4572
|
}
|
|
4560
|
-
const r = (
|
|
4561
|
-
if (
|
|
4562
|
-
if (!s(
|
|
4563
|
-
delete n.value[
|
|
4573
|
+
const r = (f = a.value, c = !0) => (f.forEach((m) => {
|
|
4574
|
+
if (m.rules) {
|
|
4575
|
+
if (!s(m)) {
|
|
4576
|
+
delete n.value[m.name];
|
|
4564
4577
|
return;
|
|
4565
4578
|
}
|
|
4566
4579
|
let b = !1, M = null;
|
|
4567
|
-
|
|
4568
|
-
const H =
|
|
4580
|
+
m.rules.forEach((q) => {
|
|
4581
|
+
const H = ji(o.value[m.name], q);
|
|
4569
4582
|
H && (b = !0, !M && typeof H == "string" && (M = H));
|
|
4570
|
-
}), b && M ? n.value[
|
|
4583
|
+
}), b && M ? n.value[m.name] = M : delete n.value[m.name];
|
|
4571
4584
|
}
|
|
4572
|
-
|
|
4573
|
-
}), c && Object.values(n.value).some(Boolean) ? n.value : null), u = B(() => a.value?.filter((
|
|
4585
|
+
m.schema && r(m.schema, !1);
|
|
4586
|
+
}), c && Object.values(n.value).some(Boolean) ? n.value : null), u = B(() => a.value?.filter((f) => s(f)));
|
|
4574
4587
|
return {
|
|
4575
4588
|
errors: n,
|
|
4576
4589
|
validate: r,
|
|
@@ -4580,7 +4593,7 @@ function Ii(o, e, t = !1) {
|
|
|
4580
4593
|
visibleSchema: u
|
|
4581
4594
|
};
|
|
4582
4595
|
}
|
|
4583
|
-
const
|
|
4596
|
+
const Ai = { class: "flex w-full h-full min-h-0 gap-6" }, Ti = {
|
|
4584
4597
|
key: 0,
|
|
4585
4598
|
"data-orientation": "horizontal",
|
|
4586
4599
|
role: "none",
|
|
@@ -4608,20 +4621,20 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4608
4621
|
const a = t, n = o, s = de(o, "form"), r = de(o, "values"), {
|
|
4609
4622
|
errors: u,
|
|
4610
4623
|
validate: p,
|
|
4611
|
-
reset:
|
|
4624
|
+
reset: f,
|
|
4612
4625
|
visibleSchema: c
|
|
4613
|
-
} = Ii(r, n.schema,
|
|
4626
|
+
} = Ii(r, n.schema, Jt(n, "disabled")), m = k(null), b = k(null), M = B(() => n.navigation), q = B(() => n.navWidth), H = B(() => n.style?.columns), K = Object.freeze({ container: 12, label: 3 }), T = B(() => n.columns ?? H.value ?? K), W = B(() => n.columns != null || H.value != null), j = B(() => W.value ? "horizontal" : n.layout), g = (O) => O?.columns ? "horizontal" : j.value, x = (O) => O?.columns ?? T.value, C = () => {
|
|
4614
4627
|
a("update:modelValue", r.value), p(), a("handle-submit", r.value);
|
|
4615
4628
|
};
|
|
4616
4629
|
e({
|
|
4617
4630
|
validate: p,
|
|
4618
|
-
reset:
|
|
4631
|
+
reset: f,
|
|
4619
4632
|
errors: u
|
|
4620
4633
|
}), $e(() => {
|
|
4621
4634
|
n.modelValue && (r.value = n.modelValue), s.value = {
|
|
4622
4635
|
value: r.value,
|
|
4623
4636
|
errors: u.value,
|
|
4624
|
-
reset:
|
|
4637
|
+
reset: f,
|
|
4625
4638
|
validate: p,
|
|
4626
4639
|
formId: n.formId
|
|
4627
4640
|
};
|
|
@@ -4632,7 +4645,7 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4632
4645
|
const Q = Object.keys(O), V = Object.keys(ee);
|
|
4633
4646
|
return Q.length !== V.length ? !1 : Q.every((P) => O[P] === ee[P]);
|
|
4634
4647
|
}
|
|
4635
|
-
return
|
|
4648
|
+
return xt("form", s), xt("values", r), (O, ee) => (i(), d("div", Ai, [
|
|
4636
4649
|
l("div", {
|
|
4637
4650
|
class: "flex-1 min-h-0 overflow-y-auto",
|
|
4638
4651
|
ref_key: "formScrollContainer",
|
|
@@ -4640,7 +4653,7 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4640
4653
|
}, [
|
|
4641
4654
|
l("form", {
|
|
4642
4655
|
ref_key: "formRef",
|
|
4643
|
-
ref:
|
|
4656
|
+
ref: m,
|
|
4644
4657
|
onSubmit: _e(C, ["prevent"]),
|
|
4645
4658
|
class: I(["grid grid-cols-12 p-1", j.value === "default" ? "gap-6" : "gap-4"])
|
|
4646
4659
|
}, [
|
|
@@ -4648,7 +4661,7 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4648
4661
|
key: Q.name,
|
|
4649
4662
|
class: I(g(Q) === "horizontal" ? "col-span-12" : `col-span-${Q.col || 12}`)
|
|
4650
4663
|
}, [
|
|
4651
|
-
F(
|
|
4664
|
+
F(Dt, {
|
|
4652
4665
|
style: be(O.style),
|
|
4653
4666
|
item: Q,
|
|
4654
4667
|
layout: g(Q),
|
|
@@ -4660,19 +4673,19 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4660
4673
|
},
|
|
4661
4674
|
error: te(u)[Q.name]
|
|
4662
4675
|
}, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
|
|
4663
|
-
g(Q) === "settings" && V + 1 !== te(c).length ? (i(), d("div",
|
|
4676
|
+
g(Q) === "settings" && V + 1 !== te(c).length ? (i(), d("div", Ti)) : A("", !0)
|
|
4664
4677
|
], 2))), 128))
|
|
4665
4678
|
], 34)
|
|
4666
4679
|
], 512),
|
|
4667
|
-
F(
|
|
4668
|
-
target:
|
|
4680
|
+
F(Vi, {
|
|
4681
|
+
target: m.value,
|
|
4669
4682
|
"scroll-container": b.value,
|
|
4670
4683
|
enabled: M.value,
|
|
4671
4684
|
width: q.value
|
|
4672
4685
|
}, null, 8, ["target", "scroll-container", "enabled", "width"])
|
|
4673
4686
|
]));
|
|
4674
4687
|
}
|
|
4675
|
-
}),
|
|
4688
|
+
}), zi = { class: "relative" }, Fi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Oi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Di = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Ui = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Pi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Ri = /* @__PURE__ */ R({
|
|
4676
4689
|
__name: "modal-edit",
|
|
4677
4690
|
props: {
|
|
4678
4691
|
schema: {},
|
|
@@ -4684,10 +4697,10 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4684
4697
|
emits: ["close", "save", "edit"],
|
|
4685
4698
|
setup(o, { emit: e }) {
|
|
4686
4699
|
const t = o, a = e, n = k(t.schema), s = k(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = k({}), u = k(), p = k(t.mode);
|
|
4687
|
-
async function
|
|
4688
|
-
const
|
|
4689
|
-
if (
|
|
4690
|
-
pe({ type: "warning", title: "Помилка валідації", message: Object.entries(
|
|
4700
|
+
async function f() {
|
|
4701
|
+
const m = r.value.validate();
|
|
4702
|
+
if (m) {
|
|
4703
|
+
pe({ type: "warning", title: "Помилка валідації", message: Object.entries(m).map(([b, M]) => `${b}: ${M}`).join(`
|
|
4691
4704
|
`) });
|
|
4692
4705
|
return;
|
|
4693
4706
|
}
|
|
@@ -4736,39 +4749,39 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4736
4749
|
return $e(async () => {
|
|
4737
4750
|
try {
|
|
4738
4751
|
if (t.form) {
|
|
4739
|
-
const
|
|
4740
|
-
if (!
|
|
4752
|
+
const m = await fetch(`/api/template/form/${t.form}`);
|
|
4753
|
+
if (!m.ok) {
|
|
4741
4754
|
pe({
|
|
4742
|
-
type:
|
|
4755
|
+
type: m.status >= 400 && m.status < 500 ? "warning" : "error",
|
|
4743
4756
|
title: "Error",
|
|
4744
|
-
message: `Error code: ${
|
|
4757
|
+
message: `Error code: ${m.status}`
|
|
4745
4758
|
});
|
|
4746
4759
|
return;
|
|
4747
4760
|
}
|
|
4748
|
-
const b = await
|
|
4761
|
+
const b = await m.json();
|
|
4749
4762
|
n.value = b.schema, u.value = b.token;
|
|
4750
4763
|
} else if (t.token) {
|
|
4751
4764
|
u.value = t.token;
|
|
4752
|
-
const
|
|
4753
|
-
if (!
|
|
4765
|
+
const m = await fetch(`/api/form/${u.value}`);
|
|
4766
|
+
if (!m.ok) {
|
|
4754
4767
|
pe({
|
|
4755
|
-
type:
|
|
4768
|
+
type: m.status >= 400 && m.status < 500 ? "warning" : "error",
|
|
4756
4769
|
title: "Error",
|
|
4757
|
-
message: `Error code: ${
|
|
4770
|
+
message: `Error code: ${m.status}`
|
|
4758
4771
|
});
|
|
4759
4772
|
return;
|
|
4760
4773
|
}
|
|
4761
|
-
const b = await
|
|
4774
|
+
const b = await m.json();
|
|
4762
4775
|
n.value = b.schema, b.data ? s.value = b.data : p.value = "add";
|
|
4763
4776
|
}
|
|
4764
|
-
} catch (
|
|
4777
|
+
} catch (m) {
|
|
4765
4778
|
pe({
|
|
4766
4779
|
type: "error",
|
|
4767
4780
|
title: "Error",
|
|
4768
|
-
message:
|
|
4769
|
-
}), console.error(
|
|
4781
|
+
message: m.message || "Unexpected error"
|
|
4782
|
+
}), console.error(m);
|
|
4770
4783
|
}
|
|
4771
|
-
}), (
|
|
4784
|
+
}), (m, b) => (i(), d("div", zi, [
|
|
4772
4785
|
l("div", Fi, [
|
|
4773
4786
|
l("div", Oi, [
|
|
4774
4787
|
l("div", Di, [
|
|
@@ -4804,7 +4817,7 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4804
4817
|
"onUpdate:values": b[0] || (b[0] = (M) => s.value = M),
|
|
4805
4818
|
form: r.value,
|
|
4806
4819
|
"onUpdate:form": b[1] || (b[1] = (M) => r.value = M)
|
|
4807
|
-
}, null, 8, ["schema", "values", "form"])) :
|
|
4820
|
+
}, null, 8, ["schema", "values", "form"])) : A("", !0)
|
|
4808
4821
|
]),
|
|
4809
4822
|
l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
|
|
4810
4823
|
l("button", {
|
|
@@ -4813,7 +4826,7 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4813
4826
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
4814
4827
|
}, " Скасувати "),
|
|
4815
4828
|
l("button", {
|
|
4816
|
-
onClick:
|
|
4829
|
+
onClick: f,
|
|
4817
4830
|
type: "button",
|
|
4818
4831
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
|
|
4819
4832
|
}, " Зберегти ")
|
|
@@ -4822,8 +4835,8 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4822
4835
|
])
|
|
4823
4836
|
]));
|
|
4824
4837
|
}
|
|
4825
|
-
}),
|
|
4826
|
-
const { close: t } =
|
|
4838
|
+
}), St = (o = { mode: "edit", schema: null }) => new Promise((e) => {
|
|
4839
|
+
const { close: t } = Yt({
|
|
4827
4840
|
title: o.mode === "add" ? "Додати" : "Редагувати",
|
|
4828
4841
|
template: "",
|
|
4829
4842
|
visible: !0,
|
|
@@ -4843,34 +4856,34 @@ const Ti = { class: "flex w-full h-full min-h-0 gap-6" }, zi = {
|
|
|
4843
4856
|
});
|
|
4844
4857
|
We.install = function(e) {
|
|
4845
4858
|
e.component("VForm", We), Object.assign(e.config.globalProperties, {
|
|
4846
|
-
$form:
|
|
4847
|
-
}), e.provide("form",
|
|
4859
|
+
$form: St
|
|
4860
|
+
}), e.provide("form", St), window.v3plugin || (window.v3plugin = {});
|
|
4848
4861
|
};
|
|
4849
4862
|
export {
|
|
4850
4863
|
Ri as ModalEdit,
|
|
4851
4864
|
We as VForm,
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4865
|
+
gi as VsInputArray,
|
|
4866
|
+
go as VsInputCheckbox,
|
|
4867
|
+
pi as VsInputColor,
|
|
4868
|
+
aa as VsInputContainer,
|
|
4869
|
+
yo as VsInputDate,
|
|
4870
|
+
ro as VsInputEmail,
|
|
4871
|
+
on as VsInputFile,
|
|
4872
|
+
An as VsInputFileList,
|
|
4873
|
+
ui as VsInputKeyValue,
|
|
4874
|
+
no as VsInputMask,
|
|
4875
|
+
$l as VsInputNumber,
|
|
4876
|
+
kt as VsInputRadio,
|
|
4877
|
+
vi as VsInputRange,
|
|
4878
|
+
Vt as VsInputSelect,
|
|
4879
|
+
Xr as VsInputSlug,
|
|
4880
|
+
wt as VsInputStatic,
|
|
4868
4881
|
Tt as VsInputSwitcher,
|
|
4869
|
-
|
|
4882
|
+
Kr as VsInputTag,
|
|
4870
4883
|
Xe as VsInputText,
|
|
4871
|
-
|
|
4884
|
+
Ma as VsInputTextarea,
|
|
4872
4885
|
We as default,
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4886
|
+
bi as inputs,
|
|
4887
|
+
Is as vsInputDatatable,
|
|
4888
|
+
Or as vsInputMap
|
|
4876
4889
|
};
|