@opengis/form 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as D, ref as x, onMounted as xe, onUnmounted as Ne, createElementBlock as c, openBlock as i, normalizeClass as V, createCommentVNode as F, renderSlot as $e, createElementVNode as l, toDisplayString as T, normalizeProps as qe, guardReactiveProps as Ge, createTextVNode as fe, computed as A, mergeModels as Z, useModel as W, withDirectives as K, unref as q, vModelText as se, vModelCheckbox as ft, createVNode as B, createBlock as ae, resolveDynamicComponent as Be, normalizeStyle as ye, withCtx as Le, withModifiers as ve, onBeforeUnmount as St, watch as te, createStaticVNode as ce, vModelRadio as vt, Fragment as Y, renderList as le, mergeProps as Ee, reactive as Bt, vModelDynamic as jt, vShow as Je, inject as Me, resolveComponent as at, Transition as mt, nextTick as ze, Teleport as It, getCurrentInstance as zt, provide as st } from "vue";
|
|
2
2
|
import { notify as be, VsModal as ht, modal as Et } from "@opengis/core";
|
|
3
|
-
const
|
|
3
|
+
const Dt = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-[14px] font-medium text-gray-900 mb-2"
|
|
6
|
-
},
|
|
6
|
+
}, Ft = { class: "opacity-100" }, Ot = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-red-500 text-[14px]"
|
|
9
9
|
}, At = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
12
|
-
}, Ut = /* @__PURE__ */
|
|
12
|
+
}, Ut = /* @__PURE__ */ D({
|
|
13
13
|
__name: "vs-layout-default",
|
|
14
14
|
props: {
|
|
15
15
|
ua: { default: "" },
|
|
@@ -30,15 +30,15 @@ const Ft = {
|
|
|
30
30
|
e.value = localStorage.locale, window.addEventListener("storage", t);
|
|
31
31
|
}), Ne(() => {
|
|
32
32
|
window.removeEventListener("resize", t);
|
|
33
|
-
}), (n, s) => (i(),
|
|
33
|
+
}), (n, s) => (i(), c("div", {
|
|
34
34
|
class: V(["w-full relative", { "opacity-60": n.item.disabled }])
|
|
35
35
|
}, [
|
|
36
|
-
n.ua || n.label ? (i(),
|
|
37
|
-
l("span",
|
|
38
|
-
n.item?.rules?.includes("required") ? (i(),
|
|
39
|
-
])) :
|
|
36
|
+
n.ua || n.label ? (i(), c("div", Dt, [
|
|
37
|
+
l("span", Ft, T(n.item[e.value] || n.ua || n.label), 1),
|
|
38
|
+
n.item?.rules?.includes("required") ? (i(), c("span", Ot, "*")) : F("", !0)
|
|
39
|
+
])) : F("", !0),
|
|
40
40
|
$e(n.$slots, "default", qe(Ge(n.$attrs))),
|
|
41
|
-
n.error ? (i(),
|
|
41
|
+
n.error ? (i(), c("span", At, T(n.error), 1)) : F("", !0)
|
|
42
42
|
], 2));
|
|
43
43
|
}
|
|
44
44
|
}), Tt = { class: "w-full relative flex flex-row items-center gap-2" }, Rt = {
|
|
@@ -50,7 +50,7 @@ const Ft = {
|
|
|
50
50
|
}, Ht = {
|
|
51
51
|
key: 1,
|
|
52
52
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
53
|
-
}, Nt = /* @__PURE__ */
|
|
53
|
+
}, Nt = /* @__PURE__ */ D({
|
|
54
54
|
__name: "vs-layout-horizontal",
|
|
55
55
|
props: {
|
|
56
56
|
ua: { default: "" },
|
|
@@ -64,19 +64,19 @@ const Ft = {
|
|
|
64
64
|
label: { default: "" }
|
|
65
65
|
},
|
|
66
66
|
setup(o) {
|
|
67
|
-
return (e, t) => (i(),
|
|
68
|
-
e.item?.type !== "html" ? (i(),
|
|
67
|
+
return (e, t) => (i(), c("div", Tt, [
|
|
68
|
+
e.item?.type !== "html" ? (i(), c("span", Rt, [
|
|
69
69
|
fe(T(e.ua || e.label) + " ", 1),
|
|
70
|
-
e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(),
|
|
71
|
-
])) :
|
|
70
|
+
e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), c("span", Pt, "*")) : F("", !0)
|
|
71
|
+
])) : F("", !0),
|
|
72
72
|
$e(e.$slots, "default", qe(Ge(e.$attrs))),
|
|
73
|
-
e.error ? (i(),
|
|
73
|
+
e.error ? (i(), c("span", Ht, T(e.error), 1)) : F("", !0)
|
|
74
74
|
]));
|
|
75
75
|
}
|
|
76
76
|
}), qt = { class: "w-full relative" }, Gt = {
|
|
77
77
|
key: 0,
|
|
78
78
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
79
|
-
}, Jt = /* @__PURE__ */
|
|
79
|
+
}, Jt = /* @__PURE__ */ D({
|
|
80
80
|
__name: "vs-layout-inline",
|
|
81
81
|
props: {
|
|
82
82
|
ua: { default: "" },
|
|
@@ -90,9 +90,9 @@ const Ft = {
|
|
|
90
90
|
label: { default: "" }
|
|
91
91
|
},
|
|
92
92
|
setup(o) {
|
|
93
|
-
return (e, t) => (i(),
|
|
93
|
+
return (e, t) => (i(), c("div", qt, [
|
|
94
94
|
$e(e.$slots, "default", qe(Ge(e.$attrs))),
|
|
95
|
-
e.error ? (i(),
|
|
95
|
+
e.error ? (i(), c("span", Gt, T(e.error), 1)) : F("", !0)
|
|
96
96
|
]));
|
|
97
97
|
}
|
|
98
98
|
}), Kt = {
|
|
@@ -108,7 +108,7 @@ function me(o) {
|
|
|
108
108
|
})
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */
|
|
111
|
+
const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
|
|
112
112
|
__name: "vs-input-password",
|
|
113
113
|
props: /* @__PURE__ */ Z({
|
|
114
114
|
style: { default: () => ({}) },
|
|
@@ -125,7 +125,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
125
125
|
emits: ["update:modelValue"],
|
|
126
126
|
setup(o) {
|
|
127
127
|
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
128
|
-
return (s, r) => K((i(),
|
|
128
|
+
return (s, r) => K((i(), c("input", {
|
|
129
129
|
type: "password",
|
|
130
130
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
131
131
|
placeholder: s.placeholder,
|
|
@@ -138,7 +138,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
138
138
|
[se, n.value]
|
|
139
139
|
]);
|
|
140
140
|
}
|
|
141
|
-
}), Qt = ["placeholder", "disabled"], Ue = /* @__PURE__ */
|
|
141
|
+
}), Qt = ["placeholder", "disabled"], Ue = /* @__PURE__ */ D({
|
|
142
142
|
__name: "vs-input-text",
|
|
143
143
|
props: /* @__PURE__ */ Z({
|
|
144
144
|
style: { default: () => ({}) },
|
|
@@ -155,7 +155,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
155
155
|
emits: ["update:modelValue"],
|
|
156
156
|
setup(o) {
|
|
157
157
|
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
158
|
-
return (s, r) => K((i(),
|
|
158
|
+
return (s, r) => K((i(), c("input", {
|
|
159
159
|
type: "text",
|
|
160
160
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
161
161
|
placeholder: s.placeholder,
|
|
@@ -168,7 +168,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
168
168
|
[se, n.value]
|
|
169
169
|
]);
|
|
170
170
|
}
|
|
171
|
-
}), Xt = ["placeholder"], Yt = /* @__PURE__ */
|
|
171
|
+
}), Xt = ["placeholder"], Yt = /* @__PURE__ */ D({
|
|
172
172
|
__name: "vs-input-number",
|
|
173
173
|
props: /* @__PURE__ */ Z({
|
|
174
174
|
style: { default: () => ({}) },
|
|
@@ -185,7 +185,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
185
185
|
emits: ["update:modelValue"],
|
|
186
186
|
setup(o) {
|
|
187
187
|
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
188
|
-
return (s, r) => K((i(),
|
|
188
|
+
return (s, r) => K((i(), c("input", {
|
|
189
189
|
type: "number",
|
|
190
190
|
step: "any",
|
|
191
191
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
@@ -214,7 +214,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
|
214
214
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
215
215
|
};
|
|
216
216
|
function ll(o, e) {
|
|
217
|
-
return i(),
|
|
217
|
+
return i(), c("svg", tl, e[0] || (e[0] = [
|
|
218
218
|
l("path", {
|
|
219
219
|
stroke: "none",
|
|
220
220
|
d: "M0 0h24v24H0z",
|
|
@@ -223,7 +223,7 @@ function ll(o, e) {
|
|
|
223
223
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
224
224
|
]));
|
|
225
225
|
}
|
|
226
|
-
const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-center gap-[4px]" }, sl = ["value", "id", "disabled"], nl = ["for"], rl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, il = /* @__PURE__ */
|
|
226
|
+
const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-center gap-[4px]" }, sl = ["value", "id", "disabled"], nl = ["for"], rl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, il = /* @__PURE__ */ D({
|
|
227
227
|
__name: "vs-checkbox-default",
|
|
228
228
|
props: {
|
|
229
229
|
value: { default: "" },
|
|
@@ -240,11 +240,11 @@ const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-ce
|
|
|
240
240
|
get: () => n.modelValue,
|
|
241
241
|
set: (r) => t("update:modelValue", r)
|
|
242
242
|
});
|
|
243
|
-
return (r, a) => (i(),
|
|
243
|
+
return (r, a) => (i(), c("div", al, [
|
|
244
244
|
K(l("input", {
|
|
245
245
|
type: "checkbox",
|
|
246
246
|
value: r.value,
|
|
247
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
247
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => s.value = d),
|
|
248
248
|
class: V(["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": r.disabled }]),
|
|
249
249
|
id: r.id,
|
|
250
250
|
disabled: r.disabled
|
|
@@ -274,7 +274,7 @@ const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-ce
|
|
|
274
274
|
}), ul = ["name", "value", "disabled"], dl = { class: "flex items-center gap-[6px] text-[14px]" }, cl = {
|
|
275
275
|
key: 0,
|
|
276
276
|
class: "text-[16px]"
|
|
277
|
-
}, pl = ["src"], fl = /* @__PURE__ */
|
|
277
|
+
}, pl = ["src"], fl = /* @__PURE__ */ D({
|
|
278
278
|
__name: "vs-checkbox-buttons",
|
|
279
279
|
props: {
|
|
280
280
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -290,44 +290,44 @@ const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-ce
|
|
|
290
290
|
setup(o, { emit: e }) {
|
|
291
291
|
const t = o, n = e, s = A({
|
|
292
292
|
get: () => t.modelValue,
|
|
293
|
-
set: (
|
|
294
|
-
n("update:modelValue",
|
|
293
|
+
set: (d) => {
|
|
294
|
+
n("update:modelValue", d);
|
|
295
295
|
}
|
|
296
296
|
}), r = A(() => Array.isArray(s.value) ? s.value.includes(t.value) : s.value === !0 || s.value === t.value), a = A(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
|
|
297
|
-
return (
|
|
297
|
+
return (d, u) => (i(), c("label", {
|
|
298
298
|
class: V(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [a.value, r.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
|
|
299
299
|
}, [
|
|
300
300
|
K(l("input", {
|
|
301
301
|
type: "checkbox",
|
|
302
302
|
class: "hidden",
|
|
303
|
-
name:
|
|
304
|
-
value:
|
|
305
|
-
"onUpdate:modelValue":
|
|
306
|
-
disabled:
|
|
303
|
+
name: d.id,
|
|
304
|
+
value: d.value,
|
|
305
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => s.value = v),
|
|
306
|
+
disabled: d.disabled
|
|
307
307
|
}, null, 8, ul), [
|
|
308
308
|
[ft, s.value]
|
|
309
309
|
]),
|
|
310
310
|
l("span", dl, [
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
d.icon || d.imgUrl ? (i(), c("span", cl, [
|
|
312
|
+
d.icon ? (i(), c("i", {
|
|
313
313
|
key: 0,
|
|
314
|
-
class: V(
|
|
315
|
-
}, null, 2)) :
|
|
316
|
-
|
|
314
|
+
class: V(d.icon)
|
|
315
|
+
}, null, 2)) : F("", !0),
|
|
316
|
+
d.imgUrl ? (i(), c("img", {
|
|
317
317
|
key: 1,
|
|
318
|
-
src:
|
|
318
|
+
src: d.imgUrl,
|
|
319
319
|
width: "16",
|
|
320
320
|
height: "16",
|
|
321
321
|
alt: "icon"
|
|
322
|
-
}, null, 8, pl)) :
|
|
323
|
-
])) :
|
|
324
|
-
$e(
|
|
325
|
-
fe(T(
|
|
322
|
+
}, null, 8, pl)) : F("", !0)
|
|
323
|
+
])) : F("", !0),
|
|
324
|
+
$e(d.$slots, "default", {}, () => [
|
|
325
|
+
fe(T(d.label), 1)
|
|
326
326
|
])
|
|
327
327
|
])
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}), vl = { class: "flex items-center" }, gt = /* @__PURE__ */
|
|
330
|
+
}), vl = { class: "flex items-center" }, gt = /* @__PURE__ */ D({
|
|
331
331
|
__name: "vs-input-checkbox-item",
|
|
332
332
|
props: {
|
|
333
333
|
value: { default: "" },
|
|
@@ -346,30 +346,30 @@ const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-ce
|
|
|
346
346
|
setup(o, { emit: e }) {
|
|
347
347
|
const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, r = A({
|
|
348
348
|
get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
|
|
349
|
-
set: (
|
|
349
|
+
set: (d) => {
|
|
350
350
|
if (Array.isArray(t.modelValue)) {
|
|
351
|
-
let
|
|
352
|
-
|
|
351
|
+
let u = [...t.modelValue];
|
|
352
|
+
d ? u.includes(t.value) || u.push(t.value) : u = u.filter((v) => v !== t.value), n("update:modelValue", u);
|
|
353
353
|
} else
|
|
354
|
-
n("update:modelValue",
|
|
354
|
+
n("update:modelValue", d);
|
|
355
355
|
}
|
|
356
356
|
}), a = x(`vs-checkbox-${t.view || "default"}`);
|
|
357
|
-
return (
|
|
357
|
+
return (d, u) => (i(), c("div", vl, [
|
|
358
358
|
(i(), ae(Be(a.value === "vs-checkbox-buttons" ? q(fl) : q(il)), {
|
|
359
|
-
value:
|
|
360
|
-
label:
|
|
361
|
-
info:
|
|
362
|
-
disabled:
|
|
359
|
+
value: d.value,
|
|
360
|
+
label: d.label,
|
|
361
|
+
info: d.option?.info,
|
|
362
|
+
disabled: d.disabled,
|
|
363
363
|
modelValue: r.value,
|
|
364
|
-
"onUpdate:modelValue":
|
|
364
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => r.value = v),
|
|
365
365
|
id: s,
|
|
366
|
-
icon:
|
|
367
|
-
imgUrl:
|
|
368
|
-
style: ye(
|
|
369
|
-
error:
|
|
366
|
+
icon: d.icon,
|
|
367
|
+
imgUrl: d.imgUrl,
|
|
368
|
+
style: ye(d.style),
|
|
369
|
+
error: d.error
|
|
370
370
|
}, {
|
|
371
371
|
default: Le(() => [
|
|
372
|
-
fe(T(
|
|
372
|
+
fe(T(d.label), 1)
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
375
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
@@ -386,7 +386,7 @@ const ol = /* @__PURE__ */ H(el, [["render", ll]]), al = { class: "flex items-ce
|
|
|
386
386
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
387
387
|
};
|
|
388
388
|
function gl(o, e) {
|
|
389
|
-
return i(),
|
|
389
|
+
return i(), c("svg", hl, e[0] || (e[0] = [
|
|
390
390
|
l("path", {
|
|
391
391
|
stroke: "none",
|
|
392
392
|
d: "M0 0h24v24H0z",
|
|
@@ -406,7 +406,7 @@ const bl = /* @__PURE__ */ H(ml, [["render", gl]]), yl = {}, xl = {
|
|
|
406
406
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
407
407
|
};
|
|
408
408
|
function wl(o, e) {
|
|
409
|
-
return i(),
|
|
409
|
+
return i(), c("svg", xl, e[0] || (e[0] = [
|
|
410
410
|
l("path", {
|
|
411
411
|
stroke: "none",
|
|
412
412
|
d: "M0 0h24v24H0z",
|
|
@@ -428,7 +428,7 @@ const kl = /* @__PURE__ */ H(yl, [["render", wl]]), _l = {}, $l = {
|
|
|
428
428
|
"stroke-linejoin": "round"
|
|
429
429
|
};
|
|
430
430
|
function Cl(o, e) {
|
|
431
|
-
return i(),
|
|
431
|
+
return i(), c("svg", $l, e[0] || (e[0] = [
|
|
432
432
|
l("path", {
|
|
433
433
|
stroke: "none",
|
|
434
434
|
d: "M0 0h24v24H0z",
|
|
@@ -445,7 +445,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
445
445
|
}, Ll = {
|
|
446
446
|
key: 0,
|
|
447
447
|
class: "text-red-500 text-[14px]"
|
|
448
|
-
}, Sl = ["title"], Bl = ["disabled"], bt = /* @__PURE__ */
|
|
448
|
+
}, Sl = ["title"], Bl = ["disabled"], bt = /* @__PURE__ */ D({
|
|
449
449
|
__name: "vs-input-switcher",
|
|
450
450
|
props: /* @__PURE__ */ Z({
|
|
451
451
|
rules: { default: () => [] },
|
|
@@ -467,15 +467,15 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
467
467
|
emits: ["update:modelValue"],
|
|
468
468
|
setup(o) {
|
|
469
469
|
const e = o, t = W(o, "modelValue");
|
|
470
|
-
return (n, s) => e.view === "checkbox" ? (i(),
|
|
470
|
+
return (n, s) => e.view === "checkbox" ? (i(), c("div", Ml, [
|
|
471
471
|
B(gt, {
|
|
472
472
|
modelValue: t.value,
|
|
473
473
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r),
|
|
474
474
|
label: n.text,
|
|
475
475
|
error: n.error || ""
|
|
476
476
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
477
|
-
n.rules?.includes("required") ? (i(),
|
|
478
|
-
n.i ? (i(),
|
|
477
|
+
n.rules?.includes("required") ? (i(), c("span", Ll, "*")) : F("", !0),
|
|
478
|
+
n.i ? (i(), c("button", {
|
|
479
479
|
key: 1,
|
|
480
480
|
class: "cursor-pointer",
|
|
481
481
|
title: n.i,
|
|
@@ -483,8 +483,8 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
483
483
|
}, ["prevent"]))
|
|
484
484
|
}, [
|
|
485
485
|
B(q(Vl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
486
|
-
], 8, Sl)) :
|
|
487
|
-
])) : (i(),
|
|
486
|
+
], 8, Sl)) : F("", !0)
|
|
487
|
+
])) : (i(), c("button", {
|
|
488
488
|
key: 1,
|
|
489
489
|
type: "button",
|
|
490
490
|
class: V(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
|
|
@@ -497,7 +497,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
497
497
|
}, null, 2)
|
|
498
498
|
], 10, Bl));
|
|
499
499
|
}
|
|
500
|
-
}), jl = ["innerHTML"], nt = /* @__PURE__ */
|
|
500
|
+
}), jl = ["innerHTML"], nt = /* @__PURE__ */ D({
|
|
501
501
|
__name: "vs-input-static",
|
|
502
502
|
props: {
|
|
503
503
|
text: { default: "" },
|
|
@@ -511,12 +511,12 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
511
511
|
placeholder: {}
|
|
512
512
|
},
|
|
513
513
|
setup(o) {
|
|
514
|
-
return (e, t) => (i(),
|
|
514
|
+
return (e, t) => (i(), c("div", {
|
|
515
515
|
class: V(e.customClass),
|
|
516
516
|
innerHTML: e.html ? e.html : e.text
|
|
517
517
|
}, null, 10, jl));
|
|
518
518
|
}
|
|
519
|
-
}), Il = ["placeholder", "disabled", "name"], zl = /* @__PURE__ */
|
|
519
|
+
}), Il = ["placeholder", "disabled", "name"], zl = /* @__PURE__ */ D({
|
|
520
520
|
__name: "vs-input-mask",
|
|
521
521
|
props: /* @__PURE__ */ Z({
|
|
522
522
|
name: {},
|
|
@@ -566,7 +566,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
566
566
|
});
|
|
567
567
|
}), te(n, (a) => {
|
|
568
568
|
r && r.unmaskedValue !== a && (r.value = a || "");
|
|
569
|
-
}), (a,
|
|
569
|
+
}), (a, d) => (i(), c("input", {
|
|
570
570
|
type: "text",
|
|
571
571
|
ref_key: "inputEl",
|
|
572
572
|
ref: s,
|
|
@@ -579,7 +579,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
579
579
|
}
|
|
580
580
|
}, null, 10, Il));
|
|
581
581
|
}
|
|
582
|
-
}), El = { class: "relative w-full bg-white rounded-lg" },
|
|
582
|
+
}), El = { class: "relative w-full bg-white rounded-lg" }, Dl = ["placeholder", "disabled"], Fl = /* @__PURE__ */ D({
|
|
583
583
|
__name: "vs-input-email",
|
|
584
584
|
props: /* @__PURE__ */ Z({
|
|
585
585
|
style: { default: () => ({}) },
|
|
@@ -596,7 +596,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
596
596
|
emits: ["update:modelValue"],
|
|
597
597
|
setup(o) {
|
|
598
598
|
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
599
|
-
return (s, r) => (i(),
|
|
599
|
+
return (s, r) => (i(), c("div", El, [
|
|
600
600
|
r[1] || (r[1] = ce('<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)),
|
|
601
601
|
K(l("input", {
|
|
602
602
|
type: "email",
|
|
@@ -607,12 +607,12 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
607
607
|
style: {
|
|
608
608
|
border: "1px solid #CFD9E0"
|
|
609
609
|
}
|
|
610
|
-
}, null, 10,
|
|
610
|
+
}, null, 10, Dl), [
|
|
611
611
|
[se, n.value]
|
|
612
612
|
])
|
|
613
613
|
]));
|
|
614
614
|
}
|
|
615
|
-
}), Ol = ["value", "disabled"], Al = { class: "text-[13px] text-gray-700" }, Ul = /* @__PURE__ */
|
|
615
|
+
}), Ol = ["value", "disabled"], Al = { class: "text-[13px] text-gray-700" }, Ul = /* @__PURE__ */ D({
|
|
616
616
|
__name: "vs-input-radio-default",
|
|
617
617
|
props: /* @__PURE__ */ Z({
|
|
618
618
|
style: {},
|
|
@@ -631,7 +631,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
631
631
|
emits: ["update:modelValue"],
|
|
632
632
|
setup(o) {
|
|
633
633
|
const e = W(o, "modelValue");
|
|
634
|
-
return (t, n) => (i(),
|
|
634
|
+
return (t, n) => (i(), c("label", {
|
|
635
635
|
class: V(["flex items-center gap-0", [t.customClass]])
|
|
636
636
|
}, [
|
|
637
637
|
K(l("input", {
|
|
@@ -649,15 +649,15 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
649
649
|
t.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
650
650
|
]])
|
|
651
651
|
}, [
|
|
652
|
-
e.value == t.value ? (i(),
|
|
652
|
+
e.value == t.value ? (i(), c("span", {
|
|
653
653
|
key: 0,
|
|
654
654
|
class: V(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
655
|
-
}, null, 2)) :
|
|
655
|
+
}, null, 2)) : F("", !0)
|
|
656
656
|
], 2),
|
|
657
657
|
l("span", Al, T(t.text), 1)
|
|
658
658
|
], 2));
|
|
659
659
|
}
|
|
660
|
-
}), Tl = ["value", "disabled"], Rl = { class: "text-[13px] text-gray-700" }, Pl = /* @__PURE__ */
|
|
660
|
+
}), Tl = ["value", "disabled"], Rl = { class: "text-[13px] text-gray-700" }, Pl = /* @__PURE__ */ D({
|
|
661
661
|
__name: "vs-input-radio-buttons",
|
|
662
662
|
props: /* @__PURE__ */ Z({
|
|
663
663
|
style: {},
|
|
@@ -676,7 +676,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
676
676
|
emits: ["update:modelValue"],
|
|
677
677
|
setup(o) {
|
|
678
678
|
const e = W(o, "modelValue");
|
|
679
|
-
return (t, n) => (i(),
|
|
679
|
+
return (t, n) => (i(), c("label", {
|
|
680
680
|
class: V(["flex items-center border rounded-lg px-2 py-1", [
|
|
681
681
|
e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
|
|
682
682
|
t.customClass
|
|
@@ -697,7 +697,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
697
697
|
}), Hl = {
|
|
698
698
|
"vs-input-radio-default": Ul,
|
|
699
699
|
"vs-input-radio-buttons": Pl
|
|
700
|
-
}, rt = /* @__PURE__ */
|
|
700
|
+
}, rt = /* @__PURE__ */ D({
|
|
701
701
|
__name: "vs-input-radio",
|
|
702
702
|
props: /* @__PURE__ */ Z({
|
|
703
703
|
options: {},
|
|
@@ -717,20 +717,20 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
717
717
|
emits: ["update:modelValue"],
|
|
718
718
|
setup(o) {
|
|
719
719
|
const e = o, t = W(o, "modelValue"), n = A(() => Hl[`vs-input-radio-${e.view}`]);
|
|
720
|
-
return (s, r) => (i(),
|
|
720
|
+
return (s, r) => (i(), c("div", {
|
|
721
721
|
class: V([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
722
722
|
}, [
|
|
723
|
-
(i(!0),
|
|
723
|
+
(i(!0), c(Y, null, le(s.options, (a) => (i(), ae(Be(n.value), Ee({
|
|
724
724
|
key: a?.id,
|
|
725
725
|
text: a.text,
|
|
726
726
|
value: a.id.toString(),
|
|
727
727
|
checked: t.value === a.id,
|
|
728
728
|
modelValue: t.value,
|
|
729
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
729
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => t.value = d)
|
|
730
730
|
}, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
731
731
|
], 2));
|
|
732
732
|
}
|
|
733
|
-
}), Nl = /* @__PURE__ */
|
|
733
|
+
}), Nl = /* @__PURE__ */ D({
|
|
734
734
|
__name: "vs-input-checkbox",
|
|
735
735
|
props: {
|
|
736
736
|
options: { default: () => [] },
|
|
@@ -749,7 +749,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
749
749
|
},
|
|
750
750
|
emits: ["update:modelValue"],
|
|
751
751
|
setup(o, { emit: e }) {
|
|
752
|
-
const t = o, n = e, s = x([]), r = Bt({}), a = (p) => p?.value || p?.id || p?.text || p,
|
|
752
|
+
const t = o, n = e, s = x([]), r = Bt({}), a = (p) => p?.value || p?.id || p?.text || p, d = (p) => p.text || String(p), u = (p) => `lg:col-span-${p || 12}`, v = async () => {
|
|
753
753
|
try {
|
|
754
754
|
const p = await fetch(`/api/suggest/${t.data}`).then((w) => w.json());
|
|
755
755
|
s.value = p?.data || p;
|
|
@@ -813,16 +813,16 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
813
813
|
}
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
|
-
}), (p, w) => (i(),
|
|
816
|
+
}), (p, w) => (i(), c("div", {
|
|
817
817
|
class: V(["p-0 w-full gap-[6px]", [p.position === "vertical" ? "flex-col" : "", p.colSpan ? "grid" : "flex justify-start"]])
|
|
818
818
|
}, [
|
|
819
|
-
(i(!0),
|
|
819
|
+
(i(!0), c(Y, null, le(s.value, (b) => (i(), ae(gt, {
|
|
820
820
|
modelValue: r[a(b)],
|
|
821
821
|
"onUpdate:modelValue": ($) => r[a(b)] = $,
|
|
822
822
|
value: a(b),
|
|
823
|
-
class: V(
|
|
823
|
+
class: V(u(p.colSpan)),
|
|
824
824
|
disabled: b.disabled,
|
|
825
|
-
label:
|
|
825
|
+
label: d(b),
|
|
826
826
|
key: a(b),
|
|
827
827
|
icon: b?.icon,
|
|
828
828
|
imgUrl: b?.imgUrl,
|
|
@@ -831,7 +831,7 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
831
831
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
832
832
|
], 2));
|
|
833
833
|
}
|
|
834
|
-
}), ql = /* @__PURE__ */ H(Nl, [["__scopeId", "data-v-91f3584a"]]), Gl = ["type", "placeholder", "disabled"], Jl = /* @__PURE__ */
|
|
834
|
+
}), ql = /* @__PURE__ */ H(Nl, [["__scopeId", "data-v-91f3584a"]]), Gl = ["type", "placeholder", "disabled"], Jl = /* @__PURE__ */ D({
|
|
835
835
|
__name: "vs-input-date1",
|
|
836
836
|
props: {
|
|
837
837
|
style: { default: () => ({}) },
|
|
@@ -845,22 +845,26 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
845
845
|
},
|
|
846
846
|
emits: ["update:modelValue"],
|
|
847
847
|
setup(o, { emit: e }) {
|
|
848
|
-
const t = o
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
848
|
+
const t = o;
|
|
849
|
+
function n(u) {
|
|
850
|
+
return u ? t.mode === "datetime" ? (u.includes("T") ? u : null) || u + (u.includes(" ") ? "" : "T00:00") : u?.split(" ")[0] : null;
|
|
851
|
+
}
|
|
852
|
+
const { inputClass: s } = me(t.style), r = e, a = A({
|
|
853
|
+
get: () => n(t.modelValue),
|
|
854
|
+
set: (u) => r("update:modelValue", u)
|
|
855
|
+
}), d = A(() => t.mode === "datetime" ? "datetime-local" : t.mode);
|
|
856
|
+
return (u, v) => K((i(), c("input", {
|
|
857
|
+
type: d.value,
|
|
858
|
+
"onUpdate:modelValue": v[0] || (v[0] = (p) => a.value = p),
|
|
855
859
|
placeholder: u.placeholder,
|
|
856
860
|
disabled: u.disabled,
|
|
857
861
|
ref: "date",
|
|
858
|
-
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [u.modelValue ? "" : "text-opacity-50", q(
|
|
862
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [u.modelValue ? "" : "text-opacity-50", q(s)].join(" ")]),
|
|
859
863
|
style: {
|
|
860
864
|
border: "1px solid #CFD9E0"
|
|
861
865
|
}
|
|
862
866
|
}, null, 10, Gl)), [
|
|
863
|
-
[jt,
|
|
867
|
+
[jt, a.value]
|
|
864
868
|
]);
|
|
865
869
|
}
|
|
866
870
|
}), Kl = async (o, e, t, n) => {
|
|
@@ -906,12 +910,12 @@ const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
|
906
910
|
"stroke-linejoin": "round"
|
|
907
911
|
};
|
|
908
912
|
function Xl(o, e) {
|
|
909
|
-
return i(),
|
|
913
|
+
return i(), c("svg", Ql, e[0] || (e[0] = [
|
|
910
914
|
l("path", { d: "M5 12h14" }, null, -1),
|
|
911
915
|
l("path", { d: "M12 5v14" }, null, -1)
|
|
912
916
|
]));
|
|
913
917
|
}
|
|
914
|
-
const
|
|
918
|
+
const De = /* @__PURE__ */ H(Wl, [["render", Xl]]), Yl = {}, eo = {
|
|
915
919
|
xmlns: "http://www.w3.org/2000/svg",
|
|
916
920
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
917
921
|
width: "44",
|
|
@@ -924,7 +928,7 @@ const Fe = /* @__PURE__ */ H(Wl, [["render", Xl]]), Yl = {}, eo = {
|
|
|
924
928
|
"stroke-linejoin": "round"
|
|
925
929
|
};
|
|
926
930
|
function to(o, e, t, n, s, r) {
|
|
927
|
-
return i(),
|
|
931
|
+
return i(), c("svg", eo, e[0] || (e[0] = [
|
|
928
932
|
ce('<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)
|
|
929
933
|
]));
|
|
930
934
|
}
|
|
@@ -941,7 +945,7 @@ const lo = /* @__PURE__ */ H(Yl, [["render", to]]), oo = {}, ao = {
|
|
|
941
945
|
"stroke-linejoin": "round"
|
|
942
946
|
};
|
|
943
947
|
function so(o, e, t, n, s, r) {
|
|
944
|
-
return i(),
|
|
948
|
+
return i(), c("svg", ao, e[0] || (e[0] = [
|
|
945
949
|
l("path", {
|
|
946
950
|
stroke: "none",
|
|
947
951
|
d: "M0 0h24v24H0z",
|
|
@@ -981,7 +985,7 @@ const no = /* @__PURE__ */ H(oo, [["render", so]]), ro = {}, io = {
|
|
|
981
985
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
|
|
982
986
|
};
|
|
983
987
|
function uo(o, e, t, n, s, r) {
|
|
984
|
-
return i(),
|
|
988
|
+
return i(), c("svg", io, e[0] || (e[0] = [
|
|
985
989
|
ce('<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="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
|
|
986
990
|
]));
|
|
987
991
|
}
|
|
@@ -998,7 +1002,7 @@ const co = /* @__PURE__ */ H(ro, [["render", uo]]), po = {}, fo = {
|
|
|
998
1002
|
"stroke-linejoin": "round"
|
|
999
1003
|
};
|
|
1000
1004
|
function vo(o, e, t, n, s, r) {
|
|
1001
|
-
return i(),
|
|
1005
|
+
return i(), c("svg", fo, e[0] || (e[0] = [
|
|
1002
1006
|
ce('<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)
|
|
1003
1007
|
]));
|
|
1004
1008
|
}
|
|
@@ -1015,7 +1019,7 @@ const mo = /* @__PURE__ */ H(po, [["render", vo]]), ho = {}, go = {
|
|
|
1015
1019
|
"stroke-linejoin": "round"
|
|
1016
1020
|
};
|
|
1017
1021
|
function bo(o, e, t, n, s, r) {
|
|
1018
|
-
return i(),
|
|
1022
|
+
return i(), c("svg", go, e[0] || (e[0] = [
|
|
1019
1023
|
ce('<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)
|
|
1020
1024
|
]));
|
|
1021
1025
|
}
|
|
@@ -1045,7 +1049,7 @@ const yo = /* @__PURE__ */ H(ho, [["render", bo]]), xo = (o) => {
|
|
|
1045
1049
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
1046
1050
|
};
|
|
1047
1051
|
function $o(o, e) {
|
|
1048
|
-
return i(),
|
|
1052
|
+
return i(), c("svg", _o, e[0] || (e[0] = [
|
|
1049
1053
|
ce('<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)
|
|
1050
1054
|
]));
|
|
1051
1055
|
}
|
|
@@ -1062,7 +1066,7 @@ const Te = /* @__PURE__ */ H(ko, [["render", $o]]), Co = {}, Vo = {
|
|
|
1062
1066
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1063
1067
|
};
|
|
1064
1068
|
function Mo(o, e) {
|
|
1065
|
-
return i(),
|
|
1069
|
+
return i(), c("svg", Vo, e[0] || (e[0] = [
|
|
1066
1070
|
l("path", {
|
|
1067
1071
|
stroke: "none",
|
|
1068
1072
|
d: "M0 0h24v24H0z",
|
|
@@ -1073,7 +1077,7 @@ function Mo(o, e) {
|
|
|
1073
1077
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1074
1078
|
]));
|
|
1075
1079
|
}
|
|
1076
|
-
const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, So = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Bo = /* @__PURE__ */
|
|
1080
|
+
const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, So = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Bo = /* @__PURE__ */ D({
|
|
1077
1081
|
__name: "vs-input-file-list-item",
|
|
1078
1082
|
props: /* @__PURE__ */ Z({
|
|
1079
1083
|
format: {},
|
|
@@ -1094,7 +1098,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1094
1098
|
emits: ["update:value", "update:item"],
|
|
1095
1099
|
setup(o) {
|
|
1096
1100
|
const e = W(o, "value"), t = W(o, "item"), n = o;
|
|
1097
|
-
return (s, r) => (i(),
|
|
1101
|
+
return (s, r) => (i(), c("div", Lo, [
|
|
1098
1102
|
(i(), ae(Be(q(wo)(t.value)), {
|
|
1099
1103
|
src: t.value,
|
|
1100
1104
|
alt: "file",
|
|
@@ -1105,7 +1109,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1105
1109
|
l("button", {
|
|
1106
1110
|
type: "button",
|
|
1107
1111
|
onClick: r[1] || (r[1] = (a) => {
|
|
1108
|
-
q(Zl)(t.value), e.value = n.multiple ? e.value?.filter((
|
|
1112
|
+
q(Zl)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
|
|
1109
1113
|
}),
|
|
1110
1114
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1111
1115
|
}, [
|
|
@@ -1124,7 +1128,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1124
1128
|
}), ut = /* @__PURE__ */ H(Bo, [["__scopeId", "data-v-0ca886b3"]]), jo = { class: "flex items-center gap-x-2" }, Io = {
|
|
1125
1129
|
key: 1,
|
|
1126
1130
|
class: "flex items-center flex-wrap gap-2"
|
|
1127
|
-
}, zo = /* @__PURE__ */
|
|
1131
|
+
}, zo = /* @__PURE__ */ D({
|
|
1128
1132
|
__name: "vs-input-file",
|
|
1129
1133
|
props: /* @__PURE__ */ Z({
|
|
1130
1134
|
format: {},
|
|
@@ -1148,12 +1152,12 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1148
1152
|
if (!v || !v.name.endsWith(e.format))
|
|
1149
1153
|
return;
|
|
1150
1154
|
}
|
|
1151
|
-
const
|
|
1152
|
-
if (!
|
|
1153
|
-
const
|
|
1154
|
-
t.value = e.multiple ? [...t.value || [],
|
|
1155
|
+
const d = a.target.files?.[0];
|
|
1156
|
+
if (!d) return;
|
|
1157
|
+
const u = await Kl(d, "1", "form", "table");
|
|
1158
|
+
t.value = e.multiple ? [...t.value || [], u?.file_path] : u?.file_path;
|
|
1155
1159
|
};
|
|
1156
|
-
return (a,
|
|
1160
|
+
return (a, d) => (i(), c("div", jo, [
|
|
1157
1161
|
l("input", {
|
|
1158
1162
|
class: "hidden",
|
|
1159
1163
|
ref_key: "fileInput",
|
|
@@ -1164,37 +1168,37 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1164
1168
|
!a.multiple && t.value ? (i(), ae(ut, {
|
|
1165
1169
|
key: 0,
|
|
1166
1170
|
item: t.value,
|
|
1167
|
-
"onUpdate:item":
|
|
1171
|
+
"onUpdate:item": d[0] || (d[0] = (u) => t.value = u),
|
|
1168
1172
|
value: t.value,
|
|
1169
|
-
"onUpdate:value":
|
|
1170
|
-
}, null, 8, ["item", "value"])) : a.multiple ? (i(),
|
|
1171
|
-
(i(!0),
|
|
1173
|
+
"onUpdate:value": d[1] || (d[1] = (u) => t.value = u)
|
|
1174
|
+
}, null, 8, ["item", "value"])) : a.multiple ? (i(), c("div", Io, [
|
|
1175
|
+
(i(!0), c(Y, null, le(t.value, (u, v) => (i(), ae(ut, {
|
|
1172
1176
|
multiple: a.multiple,
|
|
1173
1177
|
key: v,
|
|
1174
1178
|
value: t.value,
|
|
1175
|
-
"onUpdate:value":
|
|
1179
|
+
"onUpdate:value": d[2] || (d[2] = (p) => t.value = p),
|
|
1176
1180
|
item: s(v)
|
|
1177
1181
|
}, null, 8, ["multiple", "value", "item"]))), 128)),
|
|
1178
1182
|
l("div", {
|
|
1179
|
-
onClick:
|
|
1183
|
+
onClick: d[3] || (d[3] = (u) => !a.disabled && n.value?.click()),
|
|
1180
1184
|
class: V([
|
|
1181
1185
|
"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",
|
|
1182
1186
|
a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
|
|
1183
1187
|
])
|
|
1184
1188
|
}, [
|
|
1185
|
-
B(
|
|
1189
|
+
B(De, { class: "w-6 h-6" })
|
|
1186
1190
|
], 2)
|
|
1187
|
-
])) :
|
|
1188
|
-
a.multiple ?
|
|
1191
|
+
])) : F("", !0),
|
|
1192
|
+
a.multiple ? F("", !0) : (i(), c("div", {
|
|
1189
1193
|
key: 2,
|
|
1190
|
-
onClick:
|
|
1194
|
+
onClick: d[4] || (d[4] = (u) => n.value?.click()),
|
|
1191
1195
|
class: V([a.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"])
|
|
1192
1196
|
}, [
|
|
1193
|
-
B(
|
|
1197
|
+
B(De, { class: "w-6 h-6" })
|
|
1194
1198
|
], 2))
|
|
1195
1199
|
]));
|
|
1196
1200
|
}
|
|
1197
|
-
}), Eo = { class: "max-w-[55vw]" },
|
|
1201
|
+
}), Eo = { class: "max-w-[55vw]" }, Do = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, Fo = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, Oo = { class: "px-[5px]" }, Ao = { class: "" }, Ae = /* @__PURE__ */ D({
|
|
1198
1202
|
__name: "vs-widget-file-info",
|
|
1199
1203
|
props: {
|
|
1200
1204
|
item: { default: null }
|
|
@@ -1217,11 +1221,11 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1217
1221
|
const r = s / 1024;
|
|
1218
1222
|
return r < 1024 ? `${r.toFixed(2)} KB` : `${(r / 1024).toFixed(2)} MB`;
|
|
1219
1223
|
}
|
|
1220
|
-
return (s, r) => (i(),
|
|
1224
|
+
return (s, r) => (i(), c(Y, null, [
|
|
1221
1225
|
r[1] || (r[1] = ce('<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)),
|
|
1222
1226
|
l("div", Eo, [
|
|
1223
|
-
l("p",
|
|
1224
|
-
l("p",
|
|
1227
|
+
l("p", Do, T(s.item?.uploaded_name), 1),
|
|
1228
|
+
l("p", Fo, [
|
|
1225
1229
|
l("span", null, T(s.item?.username), 1),
|
|
1226
1230
|
K(l("span", Oo, "|", 512), [
|
|
1227
1231
|
[Je, s.item?.username]
|
|
@@ -1245,7 +1249,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1245
1249
|
}, Ho = ["href"], No = {
|
|
1246
1250
|
key: 3,
|
|
1247
1251
|
class: "flex gap-x-3 w-full items-center"
|
|
1248
|
-
}, qo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, Go = { 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" }, Jo = { class: "inline-block" }, Ko = { class: "inline-block" }, Zo = /* @__PURE__ */
|
|
1252
|
+
}, qo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, Go = { 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" }, Jo = { class: "inline-block" }, Ko = { class: "inline-block" }, Zo = /* @__PURE__ */ D({
|
|
1249
1253
|
__name: "vs-widget-file-item",
|
|
1250
1254
|
props: {
|
|
1251
1255
|
item: { default: null },
|
|
@@ -1265,7 +1269,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1265
1269
|
const w = document.createElement("a");
|
|
1266
1270
|
w.setAttribute("download", p?.uploaded_name), w.href = p?.file_path, w.click();
|
|
1267
1271
|
}
|
|
1268
|
-
async function
|
|
1272
|
+
async function d() {
|
|
1269
1273
|
try {
|
|
1270
1274
|
await fetch(
|
|
1271
1275
|
`${t.prefix}/widget/file/${t.item.entity_id}/${t.item.file_id}`
|
|
@@ -1274,30 +1278,30 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1274
1278
|
console.error(p);
|
|
1275
1279
|
}
|
|
1276
1280
|
}
|
|
1277
|
-
function
|
|
1281
|
+
function u() {
|
|
1278
1282
|
n("openModal", {
|
|
1279
1283
|
title: "Ви впевнені?",
|
|
1280
1284
|
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
1281
1285
|
confirmButtonText: "Так, я впевнена/ий",
|
|
1282
1286
|
cancelButtonText: "Скасувати",
|
|
1283
|
-
confirm:
|
|
1287
|
+
confirm: d,
|
|
1284
1288
|
updateListOnConfirm: !0
|
|
1285
1289
|
});
|
|
1286
1290
|
}
|
|
1287
1291
|
function v(p) {
|
|
1288
1292
|
(t.item.ext === "jpg" || t.item.ext === "png") && n("openLightbox", { item: t.item, index: p });
|
|
1289
1293
|
}
|
|
1290
|
-
return (p, w) => (i(),
|
|
1291
|
-
p.item.ext === "jpg" || p.item.ext === "png" ? (i(),
|
|
1294
|
+
return (p, w) => (i(), c("div", Uo, [
|
|
1295
|
+
p.item.ext === "jpg" || p.item.ext === "png" ? (i(), c("div", To, [
|
|
1292
1296
|
l("div", {
|
|
1293
1297
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1294
1298
|
onClick: w[0] || (w[0] = (b) => v(p.index))
|
|
1295
1299
|
}, [
|
|
1296
1300
|
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1297
1301
|
])
|
|
1298
|
-
])) : s(p.item) ? (i(),
|
|
1302
|
+
])) : s(p.item) ? (i(), c("div", Ro, [
|
|
1299
1303
|
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1300
|
-
])) : r(p.item) ? (i(),
|
|
1304
|
+
])) : r(p.item) ? (i(), c("div", Po, [
|
|
1301
1305
|
l("a", {
|
|
1302
1306
|
href: `/api/file-preview?id=${p.item.file_id}`,
|
|
1303
1307
|
target: "_blank",
|
|
@@ -1305,7 +1309,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1305
1309
|
}, [
|
|
1306
1310
|
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1307
1311
|
], 8, Ho)
|
|
1308
|
-
])) : (i(),
|
|
1312
|
+
])) : (i(), c("div", No, [
|
|
1309
1313
|
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1310
1314
|
])),
|
|
1311
1315
|
l("div", qo, [
|
|
@@ -1326,7 +1330,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1326
1330
|
l("button", {
|
|
1327
1331
|
type: "button",
|
|
1328
1332
|
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",
|
|
1329
|
-
onClick: w[2] || (w[2] = (b) =>
|
|
1333
|
+
onClick: w[2] || (w[2] = (b) => u())
|
|
1330
1334
|
}, [
|
|
1331
1335
|
B(Te, {
|
|
1332
1336
|
height: "14",
|
|
@@ -1351,7 +1355,7 @@ const yt = /* @__PURE__ */ H(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
|
|
|
1351
1355
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1352
1356
|
};
|
|
1353
1357
|
function Xo(o, e) {
|
|
1354
|
-
return i(),
|
|
1358
|
+
return i(), c("svg", Qo, e[0] || (e[0] = [
|
|
1355
1359
|
l("path", {
|
|
1356
1360
|
stroke: "none",
|
|
1357
1361
|
d: "M0 0h24v24H0z",
|
|
@@ -1368,7 +1372,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1368
1372
|
}, na = { class: "relative" }, ra = {
|
|
1369
1373
|
key: 1,
|
|
1370
1374
|
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"
|
|
1371
|
-
}, ia = { key: 0 }, ua = /* @__PURE__ */
|
|
1375
|
+
}, ia = { key: 0 }, ua = /* @__PURE__ */ D({
|
|
1372
1376
|
__name: "vs-input-file-list",
|
|
1373
1377
|
props: {
|
|
1374
1378
|
id: { default: "" },
|
|
@@ -1383,7 +1387,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1383
1387
|
},
|
|
1384
1388
|
emits: ["update"],
|
|
1385
1389
|
setup(o, { emit: e }) {
|
|
1386
|
-
const t = o, n = Me("form"), s = A(() => n.value.formId), r = x(!1), a = x(0),
|
|
1390
|
+
const t = o, n = Me("form"), s = A(() => n.value.formId), r = x(!1), a = x(0), d = e, u = x(!1), v = x({}), p = x([]), w = x(""), b = A(() => Array.isArray(p.value) ? p.value.filter((m) => m.ext === "jpg" || m.ext === "png").map((m) => m?.file_path) : []), $ = A(() => w.value === "" ? p.value : p.value.filter((m) => m?.uploaded_name?.includes(w.value))), S = (m) => {
|
|
1387
1391
|
const f = b.value.findIndex((Q) => Q === m.item.file_path);
|
|
1388
1392
|
f !== -1 && (r.value = !0, a.value = f);
|
|
1389
1393
|
}, R = async () => {
|
|
@@ -1400,7 +1404,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1400
1404
|
Q.append("file", f);
|
|
1401
1405
|
try {
|
|
1402
1406
|
const U = `${t.prefix}/widget/file/${s.value}`;
|
|
1403
|
-
return await fetch(U, { method: "POST", body: Q }),
|
|
1407
|
+
return await fetch(U, { method: "POST", body: Q }), d("update", "file-list"), f;
|
|
1404
1408
|
} catch (U) {
|
|
1405
1409
|
return console.error(U), null;
|
|
1406
1410
|
}
|
|
@@ -1409,12 +1413,12 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1409
1413
|
}, E = (m) => {
|
|
1410
1414
|
const f = { ...m };
|
|
1411
1415
|
return m.cancel || (f.cancel = () => {
|
|
1412
|
-
|
|
1416
|
+
u.value = !1;
|
|
1413
1417
|
}), m.updateListOnConfirm && (f.confirm = async () => {
|
|
1414
|
-
await m.confirm(),
|
|
1418
|
+
await m.confirm(), u.value = !1, R();
|
|
1415
1419
|
}), f;
|
|
1416
1420
|
}, j = (m) => {
|
|
1417
|
-
v.value = E(m),
|
|
1421
|
+
v.value = E(m), u.value = !0;
|
|
1418
1422
|
};
|
|
1419
1423
|
return te(s, (m) => {
|
|
1420
1424
|
m && R();
|
|
@@ -1422,7 +1426,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1422
1426
|
s.value && R();
|
|
1423
1427
|
}), (m, f) => {
|
|
1424
1428
|
const Q = at("Lightbox"), U = at("MessageBox");
|
|
1425
|
-
return i(),
|
|
1429
|
+
return i(), c("div", ea, [
|
|
1426
1430
|
l("div", ta, [
|
|
1427
1431
|
l("h2", la, " Файлів: " + T(p.value?.length), 1),
|
|
1428
1432
|
l("div", oa, [
|
|
@@ -1441,7 +1445,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1441
1445
|
])
|
|
1442
1446
|
])
|
|
1443
1447
|
]),
|
|
1444
|
-
p.value?.length > 4 ? (i(),
|
|
1448
|
+
p.value?.length > 4 ? (i(), c("div", sa, [
|
|
1445
1449
|
l("div", null, [
|
|
1446
1450
|
l("div", na, [
|
|
1447
1451
|
f[8] || (f[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
|
|
@@ -1480,9 +1484,9 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1480
1484
|
])
|
|
1481
1485
|
])
|
|
1482
1486
|
])
|
|
1483
|
-
])) :
|
|
1484
|
-
p.value?.length ? (i(),
|
|
1485
|
-
(i(!0),
|
|
1487
|
+
])) : F("", !0),
|
|
1488
|
+
p.value?.length ? (i(), c("div", ra, [
|
|
1489
|
+
(i(!0), c(Y, null, le($.value, (O, ue) => (i(), ae(Zo, {
|
|
1486
1490
|
key: ue,
|
|
1487
1491
|
prefix: m.prefix,
|
|
1488
1492
|
item: O,
|
|
@@ -1491,10 +1495,10 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1491
1495
|
onOpenModal: f[3] || (f[3] = (ee) => j(ee)),
|
|
1492
1496
|
onOpenLightbox: f[4] || (f[4] = (ee) => S(ee))
|
|
1493
1497
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1494
|
-
$.value.length ?
|
|
1498
|
+
$.value.length ? F("", !0) : (i(), c("div", ia, f[9] || (f[9] = [
|
|
1495
1499
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1496
1500
|
])))
|
|
1497
|
-
])) :
|
|
1501
|
+
])) : F("", !0),
|
|
1498
1502
|
B(Q, {
|
|
1499
1503
|
modelValue: r.value,
|
|
1500
1504
|
"onUpdate:modelValue": f[5] || (f[5] = (O) => r.value = O),
|
|
@@ -1503,14 +1507,14 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1503
1507
|
images: b.value
|
|
1504
1508
|
}, null, 8, ["modelValue", "startIndex", "images"]),
|
|
1505
1509
|
B(U, Ee({
|
|
1506
|
-
modelValue:
|
|
1507
|
-
"onUpdate:modelValue": f[7] || (f[7] = (O) =>
|
|
1510
|
+
modelValue: u.value,
|
|
1511
|
+
"onUpdate:modelValue": f[7] || (f[7] = (O) => u.value = O),
|
|
1508
1512
|
onConfirm: v.value.confirm
|
|
1509
1513
|
}, v.value), null, 16, ["modelValue", "onConfirm"])
|
|
1510
1514
|
]);
|
|
1511
1515
|
};
|
|
1512
1516
|
}
|
|
1513
|
-
}), da = { class: "flex items-center justify-between" }, ca = { class: "text-[16px] text-gray-900 font-medium" }, pa = { class: "grid gap-3" }, fa = /* @__PURE__ */
|
|
1517
|
+
}), da = { class: "flex items-center justify-between" }, ca = { class: "text-[16px] text-gray-900 font-medium" }, pa = { class: "grid gap-3" }, fa = /* @__PURE__ */ D({
|
|
1514
1518
|
__name: "vs-container-switcher",
|
|
1515
1519
|
props: {
|
|
1516
1520
|
title: {
|
|
@@ -1533,7 +1537,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1533
1537
|
(n) => {
|
|
1534
1538
|
t.value = n;
|
|
1535
1539
|
}
|
|
1536
|
-
), (n, s) => (i(),
|
|
1540
|
+
), (n, s) => (i(), c("div", null, [
|
|
1537
1541
|
l("div", da, [
|
|
1538
1542
|
l("p", ca, T(o.title), 1),
|
|
1539
1543
|
B(bt, {
|
|
@@ -1554,7 +1558,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1554
1558
|
})
|
|
1555
1559
|
]));
|
|
1556
1560
|
}
|
|
1557
|
-
}), va = /* @__PURE__ */ H(fa, [["__scopeId", "data-v-90320b87"]]), ma = { class: "text-[16px] text-gray-900 font-medium" }, ha = { class: "grid gap-3" }, ga = /* @__PURE__ */
|
|
1561
|
+
}), va = /* @__PURE__ */ H(fa, [["__scopeId", "data-v-90320b87"]]), ma = { class: "text-[16px] text-gray-900 font-medium" }, ha = { class: "grid gap-3" }, ga = /* @__PURE__ */ D({
|
|
1558
1562
|
__name: "vs-container-accordion",
|
|
1559
1563
|
props: {
|
|
1560
1564
|
title: {
|
|
@@ -1577,7 +1581,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1577
1581
|
(n) => {
|
|
1578
1582
|
t.value = n;
|
|
1579
1583
|
}
|
|
1580
|
-
), (n, s) => (i(),
|
|
1584
|
+
), (n, s) => (i(), c("div", null, [
|
|
1581
1585
|
l("button", {
|
|
1582
1586
|
type: "button",
|
|
1583
1587
|
onClick: s[0] || (s[0] = (r) => t.value = !t.value),
|
|
@@ -1600,7 +1604,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1600
1604
|
})
|
|
1601
1605
|
]));
|
|
1602
1606
|
}
|
|
1603
|
-
}), ba = /* @__PURE__ */ H(ga, [["__scopeId", "data-v-590eff11"]]), ya = { class: "flex items-center justify-between" }, xa = /* @__PURE__ */
|
|
1607
|
+
}), ba = /* @__PURE__ */ H(ga, [["__scopeId", "data-v-590eff11"]]), ya = { class: "flex items-center justify-between" }, xa = /* @__PURE__ */ D({
|
|
1604
1608
|
__name: "vs-container-default",
|
|
1605
1609
|
props: {
|
|
1606
1610
|
title: {
|
|
@@ -1613,7 +1617,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1613
1617
|
}
|
|
1614
1618
|
},
|
|
1615
1619
|
setup(o) {
|
|
1616
|
-
return (e, t) => (i(),
|
|
1620
|
+
return (e, t) => (i(), c("div", null, [
|
|
1617
1621
|
l("div", ya, [
|
|
1618
1622
|
l("p", null, T(o.title), 1)
|
|
1619
1623
|
]),
|
|
@@ -1667,7 +1671,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1667
1671
|
default:
|
|
1668
1672
|
return !0;
|
|
1669
1673
|
}
|
|
1670
|
-
}, Ea = /* @__PURE__ */
|
|
1674
|
+
}, Ea = /* @__PURE__ */ D({
|
|
1671
1675
|
__name: "vs-input-container",
|
|
1672
1676
|
props: {
|
|
1673
1677
|
style: {
|
|
@@ -1689,37 +1693,37 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1689
1693
|
},
|
|
1690
1694
|
setup(o) {
|
|
1691
1695
|
const e = o, t = Me("formValues", { default: {} }), n = Me("form"), s = A(() => e.schema?.filter((a) => {
|
|
1692
|
-
const
|
|
1693
|
-
if (!
|
|
1694
|
-
const
|
|
1695
|
-
return xt(v,
|
|
1696
|
+
const d = a?.conditions;
|
|
1697
|
+
if (!d) return !0;
|
|
1698
|
+
const u = Array.isArray(d) ? d[0] : d, v = t?.value?.[u];
|
|
1699
|
+
return xt(v, d);
|
|
1696
1700
|
})), r = A(() => wa[e.view]);
|
|
1697
|
-
return (a,
|
|
1701
|
+
return (a, d) => o.schema?.length ? (i(), ae(Be(r.value), {
|
|
1698
1702
|
key: 0,
|
|
1699
1703
|
title: o.title,
|
|
1700
1704
|
style: ye(o.style)
|
|
1701
1705
|
}, {
|
|
1702
1706
|
default: Le(() => [
|
|
1703
|
-
(i(!0),
|
|
1704
|
-
key:
|
|
1705
|
-
}, { ref_for: !0 },
|
|
1706
|
-
item:
|
|
1707
|
-
modelValue: q(t)[
|
|
1708
|
-
"onUpdate:modelValue": (v) => q(t)[
|
|
1707
|
+
(i(!0), c(Y, null, le(s.value, (u) => (i(), ae(wt, Ee({
|
|
1708
|
+
key: u.name
|
|
1709
|
+
}, { ref_for: !0 }, u, {
|
|
1710
|
+
item: u,
|
|
1711
|
+
modelValue: q(t)[u.name],
|
|
1712
|
+
"onUpdate:modelValue": (v) => q(t)[u.name] = v,
|
|
1709
1713
|
style: o.style,
|
|
1710
|
-
error: q(n)?.errors?.[
|
|
1714
|
+
error: q(n)?.errors?.[u.name]
|
|
1711
1715
|
}), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
|
|
1712
1716
|
]),
|
|
1713
1717
|
_: 1
|
|
1714
|
-
}, 8, ["title", "style"])) :
|
|
1718
|
+
}, 8, ["title", "style"])) : F("", !0);
|
|
1715
1719
|
}
|
|
1716
|
-
}),
|
|
1720
|
+
}), Da = ["aria-expanded", "data-focus"], Fa = { class: "flex items-center" }, Oa = ["title"], Aa = ["onClick"], Ua = ["title"], Ta = {
|
|
1717
1721
|
key: 2,
|
|
1718
1722
|
class: "text-gray-500 truncate"
|
|
1719
1723
|
}, Ra = { class: "flex-1 min-w-[2px]" }, Pa = ["placeholder"], Ha = { class: "flex items-center shrink-0" }, Na = ["disabled"], qa = ["disabled", "title"], Ga = ["aria-disabled", "onClick"], Ja = {
|
|
1720
1724
|
key: 1,
|
|
1721
1725
|
class: "px-3 py-2 text-center text-gray-500"
|
|
1722
|
-
}, Ka = ["disabled"], Za = /* @__PURE__ */
|
|
1726
|
+
}, Ka = ["disabled"], Za = /* @__PURE__ */ D({
|
|
1723
1727
|
__name: "vs-input-select",
|
|
1724
1728
|
props: {
|
|
1725
1729
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -1751,7 +1755,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1751
1755
|
set: (g) => n("update:modelValue", g)
|
|
1752
1756
|
});
|
|
1753
1757
|
!a.value && t.defaultValue && (a.value = t.defaultValue);
|
|
1754
|
-
const
|
|
1758
|
+
const d = x(null), u = x(null), v = x(null), p = x(!1), w = x(!1), b = x(null), $ = x([]), S = x(-1), R = x([]), C = x(""), E = x(null), j = x("bottom"), m = x({}), f = x([]), Q = A(() => {
|
|
1755
1759
|
if (!f.value.length) return [];
|
|
1756
1760
|
const g = new Map($.value.map((h) => [h.id?.toString(), h]));
|
|
1757
1761
|
return f.value.map((h) => g.get(h?.toString())).filter((h) => !!h);
|
|
@@ -1834,8 +1838,8 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1834
1838
|
}
|
|
1835
1839
|
return document.body;
|
|
1836
1840
|
}, ge = () => {
|
|
1837
|
-
if (!
|
|
1838
|
-
const g =
|
|
1841
|
+
if (!u.value) return;
|
|
1842
|
+
const g = u.value.getBoundingClientRect(), _ = he(u.value).getBoundingClientRect(), N = 300, re = 20, ie = 8, Se = g.top - _.top, Ie = g.bottom - _.top, lt = _.height - Ie - ie - re, ot = Se - ie - re;
|
|
1839
1843
|
let Pe = !1;
|
|
1840
1844
|
if (lt >= ot ? Pe = !0 : Pe = !1, Pe) {
|
|
1841
1845
|
j.value = "bottom";
|
|
@@ -1879,7 +1883,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1879
1883
|
}, Ke = (g) => {
|
|
1880
1884
|
g.key === "Escape" && p.value && de();
|
|
1881
1885
|
}, Ze = (g) => {
|
|
1882
|
-
|
|
1886
|
+
d.value && (d.value.contains(g.target) || de());
|
|
1883
1887
|
}, We = (g) => {
|
|
1884
1888
|
p.value && v.value && !v.value.contains(g.target) && ge();
|
|
1885
1889
|
}, Qe = () => {
|
|
@@ -1904,9 +1908,9 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1904
1908
|
te(a, () => {
|
|
1905
1909
|
Ye();
|
|
1906
1910
|
}), xe(async () => {
|
|
1907
|
-
addEventListener("keydown", Ke), addEventListener("scroll", We, !0), addEventListener("resize", Qe), document.addEventListener("click", Ze, !0),
|
|
1911
|
+
addEventListener("keydown", Ke), addEventListener("scroll", We, !0), addEventListener("resize", Qe), document.addEventListener("click", Ze, !0), u.value && he(u.value).addEventListener("scroll", Xe, !0), t.options?.length ? $.value = [...t.options] : t.data && ($.value = await z("")), await Ye();
|
|
1908
1912
|
}), Ne(() => {
|
|
1909
|
-
removeEventListener("keydown", Ke), removeEventListener("scroll", We, !0), removeEventListener("resize", Qe), document.removeEventListener("click", Ze, !0),
|
|
1913
|
+
removeEventListener("keydown", Ke), removeEventListener("scroll", We, !0), removeEventListener("resize", Qe), document.removeEventListener("click", Ze, !0), u.value && he(u.value).removeEventListener("scroll", Xe, !0);
|
|
1910
1914
|
});
|
|
1911
1915
|
const Oe = x(!1), Re = x({}), et = x([]), tt = x(null);
|
|
1912
1916
|
async function Ct() {
|
|
@@ -1945,7 +1949,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1945
1949
|
t.data && M();
|
|
1946
1950
|
}), te(we, async () => {
|
|
1947
1951
|
t.data && (s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)));
|
|
1948
|
-
}), (g, h) => (i(),
|
|
1952
|
+
}), (g, h) => (i(), c(Y, null, [
|
|
1949
1953
|
B(q(ht), {
|
|
1950
1954
|
visible: Oe.value,
|
|
1951
1955
|
"onUpdate:visible": h[1] || (h[1] = (_) => Oe.value = _),
|
|
@@ -1954,7 +1958,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1954
1958
|
onDone: Ct
|
|
1955
1959
|
}, {
|
|
1956
1960
|
default: Le(() => [
|
|
1957
|
-
B(
|
|
1961
|
+
B(Fe, {
|
|
1958
1962
|
schema: et.value,
|
|
1959
1963
|
modelValue: Re.value,
|
|
1960
1964
|
"onUpdate:modelValue": h[0] || (h[0] = (_) => Re.value = _),
|
|
@@ -1967,7 +1971,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
1967
1971
|
l("div", {
|
|
1968
1972
|
class: "flex gap-1 w-full",
|
|
1969
1973
|
ref_key: "selectRoot",
|
|
1970
|
-
ref:
|
|
1974
|
+
ref: d,
|
|
1971
1975
|
onClick: h[4] || (h[4] = ve(() => {
|
|
1972
1976
|
}, ["stop"]))
|
|
1973
1977
|
}, [
|
|
@@ -2002,18 +2006,18 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2002
2006
|
l("div", {
|
|
2003
2007
|
class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
2004
2008
|
ref_key: "triggerRef",
|
|
2005
|
-
ref:
|
|
2009
|
+
ref: u
|
|
2006
2010
|
}, [
|
|
2007
|
-
s.value && f.value.length ? (i(!0),
|
|
2011
|
+
s.value && f.value.length ? (i(!0), c(Y, { key: 0 }, le(Q.value, (_) => (i(), c("div", {
|
|
2008
2012
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
|
|
2009
2013
|
key: _.id
|
|
2010
2014
|
}, [
|
|
2011
|
-
l("div",
|
|
2012
|
-
_?.color ? (i(),
|
|
2015
|
+
l("div", Fa, [
|
|
2016
|
+
_?.color ? (i(), c("span", {
|
|
2013
2017
|
key: 0,
|
|
2014
2018
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5",
|
|
2015
2019
|
style: ye({ backgroundColor: _?.color })
|
|
2016
|
-
}, null, 4)) :
|
|
2020
|
+
}, null, 4)) : F("", !0),
|
|
2017
2021
|
l("div", {
|
|
2018
2022
|
class: "truncate text-gray-900 overflow-hidden",
|
|
2019
2023
|
title: _.text
|
|
@@ -2035,23 +2039,23 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2035
2039
|
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" })
|
|
2036
2040
|
], -1)
|
|
2037
2041
|
]), 8, Aa)
|
|
2038
|
-
]))), 128)) : !s.value && !w.value && b.value?.text && C.value === "" ? (i(),
|
|
2042
|
+
]))), 128)) : !s.value && !w.value && b.value?.text && C.value === "" ? (i(), c("div", {
|
|
2039
2043
|
key: 1,
|
|
2040
2044
|
class: V(["truncate text-gray-900"]),
|
|
2041
2045
|
title: b.value.text
|
|
2042
2046
|
}, [
|
|
2043
|
-
b.value?.color ? (i(),
|
|
2047
|
+
b.value?.color ? (i(), c("span", {
|
|
2044
2048
|
key: 0,
|
|
2045
2049
|
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
|
|
2046
2050
|
style: ye({ backgroundColor: b.value?.color })
|
|
2047
|
-
}, null, 4)) :
|
|
2051
|
+
}, null, 4)) : F("", !0),
|
|
2048
2052
|
l("span", {
|
|
2049
2053
|
class: V({ "pl-5": b.value?.color })
|
|
2050
2054
|
}, T(b.value.text), 3)
|
|
2051
|
-
], 8, Ua)) :
|
|
2052
|
-
O.value ? (i(),
|
|
2055
|
+
], 8, Ua)) : F("", !0),
|
|
2056
|
+
O.value ? (i(), c("div", Ta, T(U.value), 1)) : F("", !0),
|
|
2053
2057
|
l("div", Ra, [
|
|
2054
|
-
!r.value && g.search ? K((i(),
|
|
2058
|
+
!r.value && g.search ? K((i(), c("input", {
|
|
2055
2059
|
key: 0,
|
|
2056
2060
|
ref_key: "inputRef",
|
|
2057
2061
|
ref: E,
|
|
@@ -2070,11 +2074,11 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2070
2074
|
onKeydown: Ve
|
|
2071
2075
|
}, null, 40, Pa)), [
|
|
2072
2076
|
[se, C.value]
|
|
2073
|
-
]) :
|
|
2077
|
+
]) : F("", !0)
|
|
2074
2078
|
])
|
|
2075
2079
|
], 512),
|
|
2076
2080
|
l("div", Ha, [
|
|
2077
|
-
ue.value ? (i(),
|
|
2081
|
+
ue.value ? (i(), c("button", {
|
|
2078
2082
|
key: 0,
|
|
2079
2083
|
type: "button",
|
|
2080
2084
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
@@ -2090,7 +2094,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2090
2094
|
}, [
|
|
2091
2095
|
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" })
|
|
2092
2096
|
], -1)
|
|
2093
|
-
]), 8, Na)) :
|
|
2097
|
+
]), 8, Na)) : F("", !0),
|
|
2094
2098
|
h[8] || (h[8] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2095
2099
|
l("button", {
|
|
2096
2100
|
type: "button",
|
|
@@ -2110,8 +2114,8 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2110
2114
|
], -1)
|
|
2111
2115
|
]), 8, qa)
|
|
2112
2116
|
])
|
|
2113
|
-
], 42,
|
|
2114
|
-
p.value ? (i(),
|
|
2117
|
+
], 42, Da),
|
|
2118
|
+
p.value ? (i(), c("div", {
|
|
2115
2119
|
key: 0,
|
|
2116
2120
|
class: V([
|
|
2117
2121
|
"absolute z-10 w-full rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
|
|
@@ -2126,7 +2130,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2126
2130
|
ref_key: "listRef",
|
|
2127
2131
|
ref: v
|
|
2128
2132
|
}, [
|
|
2129
|
-
X.value.length ? (i(!0),
|
|
2133
|
+
X.value.length ? (i(!0), c(Y, { key: 0 }, le(X.value, (_, N) => (i(), c("div", {
|
|
2130
2134
|
key: _.id,
|
|
2131
2135
|
ref_for: !0,
|
|
2132
2136
|
ref: (re) => R.value[N] = re,
|
|
@@ -2140,11 +2144,11 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2140
2144
|
tabindex: "-1",
|
|
2141
2145
|
onClick: (re) => ne(_)
|
|
2142
2146
|
}, [
|
|
2143
|
-
_?.color ? (i(),
|
|
2147
|
+
_?.color ? (i(), c("span", {
|
|
2144
2148
|
key: 0,
|
|
2145
2149
|
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2146
2150
|
style: ye({ backgroundColor: _?.color })
|
|
2147
|
-
}, null, 4)) :
|
|
2151
|
+
}, null, 4)) : F("", !0),
|
|
2148
2152
|
l("div", {
|
|
2149
2153
|
class: V([
|
|
2150
2154
|
"leading-[19px]",
|
|
@@ -2153,27 +2157,27 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2153
2157
|
(S.value === N, "")
|
|
2154
2158
|
])
|
|
2155
2159
|
}, T(_.text), 3)
|
|
2156
|
-
], 10, Ga))), 128)) : (i(),
|
|
2160
|
+
], 10, Ga))), 128)) : (i(), c("div", Ja, " No options "))
|
|
2157
2161
|
], 4)
|
|
2158
|
-
], 6)) :
|
|
2162
|
+
], 6)) : F("", !0)
|
|
2159
2163
|
], 2),
|
|
2160
|
-
t.add ? (i(),
|
|
2164
|
+
t.add ? (i(), c("button", {
|
|
2161
2165
|
key: 0,
|
|
2162
2166
|
onClick: Vt,
|
|
2163
2167
|
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",
|
|
2164
2168
|
disabled: r.value,
|
|
2165
2169
|
type: "button"
|
|
2166
2170
|
}, [
|
|
2167
|
-
B(
|
|
2171
|
+
B(De, {
|
|
2168
2172
|
width: "16",
|
|
2169
2173
|
height: "16"
|
|
2170
2174
|
}),
|
|
2171
2175
|
h[11] || (h[11] = l("span", null, "Додати", -1))
|
|
2172
|
-
], 8, Ka)) :
|
|
2176
|
+
], 8, Ka)) : F("", !0)
|
|
2173
2177
|
], 512)
|
|
2174
2178
|
], 64));
|
|
2175
2179
|
}
|
|
2176
|
-
}), Wa = ["placeholder", "disabled"], Qa = /* @__PURE__ */
|
|
2180
|
+
}), Wa = ["placeholder", "disabled"], Qa = /* @__PURE__ */ D({
|
|
2177
2181
|
__name: "vs-input-textarea",
|
|
2178
2182
|
props: /* @__PURE__ */ Z({
|
|
2179
2183
|
style: { default: () => ({}) },
|
|
@@ -2190,7 +2194,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2190
2194
|
emits: ["update:modelValue"],
|
|
2191
2195
|
setup(o) {
|
|
2192
2196
|
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
2193
|
-
return (s, r) => K((i(),
|
|
2197
|
+
return (s, r) => K((i(), c("textarea", {
|
|
2194
2198
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
2195
2199
|
placeholder: s.placeholder,
|
|
2196
2200
|
disabled: s.disabled,
|
|
@@ -2214,7 +2218,7 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2214
2218
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2215
2219
|
};
|
|
2216
2220
|
function es(o, e) {
|
|
2217
|
-
return i(),
|
|
2221
|
+
return i(), c("svg", Ya, e[0] || (e[0] = [
|
|
2218
2222
|
l("path", {
|
|
2219
2223
|
stroke: "none",
|
|
2220
2224
|
d: "M0 0h24v24H0z",
|
|
@@ -2235,7 +2239,7 @@ const ts = /* @__PURE__ */ H(Xa, [["render", es]]), ls = {}, os = {
|
|
|
2235
2239
|
"stroke-linejoin": "round"
|
|
2236
2240
|
};
|
|
2237
2241
|
function as(o, e) {
|
|
2238
|
-
return i(),
|
|
2242
|
+
return i(), c("svg", os, e[0] || (e[0] = [
|
|
2239
2243
|
l("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2240
2244
|
l("path", { d: "M7 20V4" }, null, -1),
|
|
2241
2245
|
l("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
@@ -2254,7 +2258,7 @@ const ss = /* @__PURE__ */ H(ls, [["render", as]]), ns = {}, rs = {
|
|
|
2254
2258
|
"stroke-linejoin": "round"
|
|
2255
2259
|
};
|
|
2256
2260
|
function is(o, e) {
|
|
2257
|
-
return i(),
|
|
2261
|
+
return i(), c("svg", rs, e[0] || (e[0] = [
|
|
2258
2262
|
l("path", {
|
|
2259
2263
|
stroke: "none",
|
|
2260
2264
|
d: "M0 0h24v24H0z",
|
|
@@ -2275,7 +2279,7 @@ const us = /* @__PURE__ */ H(ns, [["render", is]]), ds = {}, cs = {
|
|
|
2275
2279
|
"stroke-linejoin": "round"
|
|
2276
2280
|
};
|
|
2277
2281
|
function ps(o, e) {
|
|
2278
|
-
return i(),
|
|
2282
|
+
return i(), c("svg", cs, e[0] || (e[0] = [
|
|
2279
2283
|
l("path", {
|
|
2280
2284
|
stroke: "none",
|
|
2281
2285
|
d: "M0 0h24v24H0z",
|
|
@@ -2296,7 +2300,7 @@ const fs = /* @__PURE__ */ H(ds, [["render", ps]]), vs = {}, ms = {
|
|
|
2296
2300
|
"stroke-linejoin": "round"
|
|
2297
2301
|
};
|
|
2298
2302
|
function hs(o, e) {
|
|
2299
|
-
return i(),
|
|
2303
|
+
return i(), c("svg", ms, e[0] || (e[0] = [
|
|
2300
2304
|
ce('<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)
|
|
2301
2305
|
]));
|
|
2302
2306
|
}
|
|
@@ -2306,7 +2310,7 @@ const dt = /* @__PURE__ */ H(vs, [["render", hs]]), gs = {}, bs = {
|
|
|
2306
2310
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2307
2311
|
};
|
|
2308
2312
|
function ys(o, e) {
|
|
2309
|
-
return i(),
|
|
2313
|
+
return i(), c("svg", bs, e[0] || (e[0] = [
|
|
2310
2314
|
ce('<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)
|
|
2311
2315
|
]));
|
|
2312
2316
|
}
|
|
@@ -2320,15 +2324,15 @@ const xs = /* @__PURE__ */ H(gs, [["render", ys]]), ws = {}, ks = {
|
|
|
2320
2324
|
"stroke-linejoin": "round"
|
|
2321
2325
|
};
|
|
2322
2326
|
function _s(o, e) {
|
|
2323
|
-
return i(),
|
|
2327
|
+
return i(), c("svg", ks, e[0] || (e[0] = [
|
|
2324
2328
|
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)
|
|
2325
2329
|
]));
|
|
2326
2330
|
}
|
|
2327
|
-
const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Vs = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, Ms = { class: "relative w-full" }, Ls = { class: "table-wrapper flex gap-2" }, Ss = { class: "vs-popover inline-block text-slate-700" }, Bs = { class: "text-center" }, js = { 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" }, zs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, Es = { class: "text-sm items-center text-gray-800 flex gap-1" },
|
|
2331
|
+
const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Vs = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, Ms = { class: "relative w-full" }, Ls = { class: "table-wrapper flex gap-2" }, Ss = { class: "vs-popover inline-block text-slate-700" }, Bs = { class: "text-center" }, js = { 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" }, zs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, Es = { class: "text-sm items-center text-gray-800 flex gap-1" }, Ds = { class: "w-full overflow-x-auto" }, Fs = { class: "w-full table-auto caption-bottom text-sm" }, Os = { class: "[&_tr]:border-b" }, As = { 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" }, Us = { 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" }, Ts = {
|
|
2328
2332
|
key: 0,
|
|
2329
2333
|
colspan: "100%",
|
|
2330
2334
|
class: "text-center"
|
|
2331
|
-
}, Rs = { class: "w-full" }, Ps = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Hs = ["onDragstart", "onDragover", "onDrop"], Ns = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, qs = { class: "flex items-center justify-center" }, Gs = { 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" }, Js = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ks = { class: "flex items-center justify-center gap-2" }, Zs = ["onClick"], Ws = ["onClick"], Qs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Xs = /* @__PURE__ */
|
|
2335
|
+
}, Rs = { class: "w-full" }, Ps = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Hs = ["onDragstart", "onDragover", "onDrop"], Ns = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, qs = { class: "flex items-center justify-center" }, Gs = { 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" }, Js = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ks = { class: "flex items-center justify-center gap-2" }, Zs = ["onClick"], Ws = ["onClick"], Qs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Xs = /* @__PURE__ */ D({
|
|
2332
2336
|
__name: "vs-input-datatable",
|
|
2333
2337
|
props: /* @__PURE__ */ Z({
|
|
2334
2338
|
colModel: {},
|
|
@@ -2352,20 +2356,20 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2352
2356
|
const G = M[I.key];
|
|
2353
2357
|
return G ? Array.isArray(G) ? G.join(", ").toLowerCase().includes(z) : String(G).toLowerCase().includes(z) : !1;
|
|
2354
2358
|
}));
|
|
2355
|
-
}), a = x(null),
|
|
2359
|
+
}), a = x(null), d = x(null), u = x(!1), v = x(null), p = x({ top: 0, left: 0 }), w = (z) => {
|
|
2356
2360
|
a.value = z;
|
|
2357
2361
|
}, b = (z) => {
|
|
2358
|
-
|
|
2362
|
+
d.value = z;
|
|
2359
2363
|
}, $ = (z) => {
|
|
2360
2364
|
if (a.value === null || a.value === z) {
|
|
2361
|
-
a.value = null,
|
|
2365
|
+
a.value = null, d.value = null;
|
|
2362
2366
|
return;
|
|
2363
2367
|
}
|
|
2364
2368
|
const M = [...t.value], [I] = M.splice(a.value, 1);
|
|
2365
|
-
M.splice(z, 0, I), t.value = M, a.value = null,
|
|
2369
|
+
M.splice(z, 0, I), t.value = M, a.value = null, d.value = null;
|
|
2366
2370
|
}, S = (z) => {
|
|
2367
2371
|
const I = z.currentTarget.getBoundingClientRect();
|
|
2368
|
-
p.value = { top: I.bottom + window.scrollY, left: I.left + window.scrollX },
|
|
2372
|
+
p.value = { top: I.bottom + window.scrollY, left: I.left + window.scrollX }, u.value = !u.value;
|
|
2369
2373
|
}, R = () => {
|
|
2370
2374
|
v.value && v.value.click();
|
|
2371
2375
|
}, C = (z) => {
|
|
@@ -2419,7 +2423,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2419
2423
|
function we(z) {
|
|
2420
2424
|
t.value = t.value.filter((M, I) => I !== z);
|
|
2421
2425
|
}
|
|
2422
|
-
return (z, M) => (i(),
|
|
2426
|
+
return (z, M) => (i(), c("div", Cs, [
|
|
2423
2427
|
l("div", Vs, [
|
|
2424
2428
|
l("div", Ms, [
|
|
2425
2429
|
B(ts, {
|
|
@@ -2462,7 +2466,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2462
2466
|
])
|
|
2463
2467
|
]),
|
|
2464
2468
|
(i(), ae(It, { to: "body" }, [
|
|
2465
|
-
|
|
2469
|
+
u.value ? (i(), c("div", {
|
|
2466
2470
|
key: 0,
|
|
2467
2471
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2468
2472
|
style: ye([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
|
|
@@ -2478,7 +2482,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2478
2482
|
width: "14",
|
|
2479
2483
|
height: "14"
|
|
2480
2484
|
}),
|
|
2481
|
-
M[4] || (M[4] = fe(" Імпортувати "
|
|
2485
|
+
M[4] || (M[4] = fe(" Імпортувати "))
|
|
2482
2486
|
]),
|
|
2483
2487
|
l("button", {
|
|
2484
2488
|
onClick: E,
|
|
@@ -2490,23 +2494,23 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2490
2494
|
width: "14",
|
|
2491
2495
|
height: "14"
|
|
2492
2496
|
}),
|
|
2493
|
-
M[5] || (M[5] = fe(" Експортувати "
|
|
2497
|
+
M[5] || (M[5] = fe(" Експортувати "))
|
|
2494
2498
|
])
|
|
2495
2499
|
])
|
|
2496
2500
|
])
|
|
2497
2501
|
])
|
|
2498
|
-
], 4)) :
|
|
2502
|
+
], 4)) : F("", !0)
|
|
2499
2503
|
])),
|
|
2500
2504
|
l("button", {
|
|
2501
2505
|
onClick: ue,
|
|
2502
2506
|
class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2503
2507
|
}, [
|
|
2504
|
-
B(
|
|
2505
|
-
M[6] || (M[6] = fe(" Додати "
|
|
2508
|
+
B(De),
|
|
2509
|
+
M[6] || (M[6] = fe(" Додати "))
|
|
2506
2510
|
])
|
|
2507
2511
|
]),
|
|
2508
|
-
l("div",
|
|
2509
|
-
l("table",
|
|
2512
|
+
l("div", Ds, [
|
|
2513
|
+
l("table", Fs, [
|
|
2510
2514
|
l("thead", Os, [
|
|
2511
2515
|
l("tr", As, [
|
|
2512
2516
|
l("th", Us, [
|
|
@@ -2516,7 +2520,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2516
2520
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2517
2521
|
})
|
|
2518
2522
|
]),
|
|
2519
|
-
(i(!0),
|
|
2523
|
+
(i(!0), c(Y, null, le(z.colModel, (I) => (i(), c("th", {
|
|
2520
2524
|
key: I.key,
|
|
2521
2525
|
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]"
|
|
2522
2526
|
}, T(I.ua || I.label), 1))), 128)),
|
|
@@ -2524,9 +2528,9 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2524
2528
|
])
|
|
2525
2529
|
]),
|
|
2526
2530
|
l("tbody", {
|
|
2527
|
-
class: V({ "[&_tr:last-child]:border-0": !
|
|
2531
|
+
class: V({ "[&_tr:last-child]:border-0": !d.value })
|
|
2528
2532
|
}, [
|
|
2529
|
-
r.value.length === 0 ? (i(),
|
|
2533
|
+
r.value.length === 0 ? (i(), c("td", Ts, [
|
|
2530
2534
|
l("div", Rs, [
|
|
2531
2535
|
l("div", Ps, [
|
|
2532
2536
|
B(xs, { class: "w-48 mx-auto" }),
|
|
@@ -2536,12 +2540,12 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2536
2540
|
], -1))
|
|
2537
2541
|
])
|
|
2538
2542
|
])
|
|
2539
|
-
])) :
|
|
2540
|
-
(i(!0),
|
|
2543
|
+
])) : F("", !0),
|
|
2544
|
+
(i(!0), c(Y, null, le(r.value, (I, G) => (i(), c("tr", {
|
|
2541
2545
|
key: I.id,
|
|
2542
2546
|
class: V(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
2543
2547
|
"opacity-50": a.value === G,
|
|
2544
|
-
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":
|
|
2548
|
+
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === G
|
|
2545
2549
|
}]),
|
|
2546
2550
|
draggable: "true",
|
|
2547
2551
|
onDragstart: (oe) => w(G),
|
|
@@ -2557,7 +2561,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2557
2561
|
})
|
|
2558
2562
|
])
|
|
2559
2563
|
]),
|
|
2560
|
-
(i(!0),
|
|
2564
|
+
(i(!0), c(Y, null, le(z.colModel, (oe) => (i(), c("td", {
|
|
2561
2565
|
key: oe.key,
|
|
2562
2566
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2563
2567
|
}, [
|
|
@@ -2597,7 +2601,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2597
2601
|
size: "lg"
|
|
2598
2602
|
}, {
|
|
2599
2603
|
default: Le(() => [
|
|
2600
|
-
B(
|
|
2604
|
+
B(Fe, {
|
|
2601
2605
|
schema: e.colModel,
|
|
2602
2606
|
values: U.value,
|
|
2603
2607
|
"onUpdate:values": M[1] || (M[1] = (I) => U.value = I),
|
|
@@ -2754,7 +2758,7 @@ const tn = {}, ln = {
|
|
|
2754
2758
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
2755
2759
|
};
|
|
2756
2760
|
function on(o, e) {
|
|
2757
|
-
return i(),
|
|
2761
|
+
return i(), c("svg", ln, e[0] || (e[0] = [
|
|
2758
2762
|
l("path", {
|
|
2759
2763
|
stroke: "none",
|
|
2760
2764
|
d: "M0 0h24v24H0z",
|
|
@@ -2775,7 +2779,7 @@ const an = /* @__PURE__ */ H(tn, [["render", on]]), sn = {}, nn = {
|
|
|
2775
2779
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
2776
2780
|
};
|
|
2777
2781
|
function rn(o, e) {
|
|
2778
|
-
return i(),
|
|
2782
|
+
return i(), c("svg", nn, e[0] || (e[0] = [
|
|
2779
2783
|
l("path", {
|
|
2780
2784
|
stroke: "none",
|
|
2781
2785
|
d: "M0 0h24v24H0z",
|
|
@@ -2797,7 +2801,7 @@ const un = /* @__PURE__ */ H(sn, [["render", rn]]), dn = {}, cn = {
|
|
|
2797
2801
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
2798
2802
|
};
|
|
2799
2803
|
function pn(o, e) {
|
|
2800
|
-
return i(),
|
|
2804
|
+
return i(), c("svg", cn, e[0] || (e[0] = [
|
|
2801
2805
|
ce('<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)
|
|
2802
2806
|
]));
|
|
2803
2807
|
}
|
|
@@ -2812,7 +2816,7 @@ const fn = /* @__PURE__ */ H(dn, [["render", pn]]), vn = {}, mn = {
|
|
|
2812
2816
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
2813
2817
|
};
|
|
2814
2818
|
function hn(o, e) {
|
|
2815
|
-
return i(),
|
|
2819
|
+
return i(), c("svg", mn, e[0] || (e[0] = [
|
|
2816
2820
|
ce('<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)
|
|
2817
2821
|
]));
|
|
2818
2822
|
}
|
|
@@ -2825,7 +2829,7 @@ const gn = /* @__PURE__ */ H(vn, [["render", hn]]), bn = {}, yn = {
|
|
|
2825
2829
|
class: "fullscreen-icon"
|
|
2826
2830
|
};
|
|
2827
2831
|
function xn(o, e) {
|
|
2828
|
-
return i(),
|
|
2832
|
+
return i(), c("svg", yn, e[0] || (e[0] = [
|
|
2829
2833
|
l("title", null, null, -1),
|
|
2830
2834
|
l("desc", null, null, -1),
|
|
2831
2835
|
l("defs", null, null, -1),
|
|
@@ -2868,7 +2872,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2868
2872
|
"stroke-width": "2",
|
|
2869
2873
|
"stroke-linecap": "round",
|
|
2870
2874
|
"stroke-linejoin": "round"
|
|
2871
|
-
},
|
|
2875
|
+
}, Dn = { class: "relative w-full" }, Fn = { class: "vs-form-text relative bg-white rounded-lg" }, On = {
|
|
2872
2876
|
key: 1,
|
|
2873
2877
|
class: "absolute left-0 right-0 top-full z-[3200] bg-white border border-gray-200 rounded-b-lg shadow-lg max-h-72 overflow-auto"
|
|
2874
2878
|
}, An = { key: 0 }, Un = ["onClick"], Tn = {
|
|
@@ -2877,14 +2881,14 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2877
2881
|
}, Rn = {
|
|
2878
2882
|
key: 2,
|
|
2879
2883
|
class: "px-3 py-2 text-xs text-gray-400"
|
|
2880
|
-
}, Pn = /* @__PURE__ */
|
|
2884
|
+
}, Pn = /* @__PURE__ */ D({
|
|
2881
2885
|
__name: "map-search",
|
|
2882
2886
|
props: {
|
|
2883
2887
|
placeholder: { default: "50, 30" }
|
|
2884
2888
|
},
|
|
2885
2889
|
emits: ["goToCoordinates"],
|
|
2886
2890
|
setup(o, { emit: e }) {
|
|
2887
|
-
const t = e, n = x(!1), s = x("coordinates"), r = x(""), a = x([]),
|
|
2891
|
+
const t = e, n = x(!1), s = x("coordinates"), r = x(""), a = x([]), d = x(!1), u = x(!1);
|
|
2888
2892
|
let v;
|
|
2889
2893
|
const p = [
|
|
2890
2894
|
{ value: "coordinates", label: "Пошук по кординатам" },
|
|
@@ -2906,7 +2910,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2906
2910
|
return s.value === "search_here" ? f.searchParams.set("searchtext", j) : (s.value === "atu" || s.value === "address") && f.searchParams.set("key", j), f.searchParams.set("limit", "20"), f.searchParams.set("q", j), (await fetch(f.toString())).json();
|
|
2907
2911
|
}
|
|
2908
2912
|
function R() {
|
|
2909
|
-
if (
|
|
2913
|
+
if (d.value = !0, u.value = !0, s.value === "coordinates") {
|
|
2910
2914
|
const j = r.value.trim().split(",");
|
|
2911
2915
|
if (j.length === 2) {
|
|
2912
2916
|
const m = parseFloat(j[0]), f = parseFloat(j[1]);
|
|
@@ -2917,7 +2921,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2917
2921
|
v && window.clearTimeout(v), v = window.setTimeout(async () => {
|
|
2918
2922
|
const j = r.value.trim();
|
|
2919
2923
|
if (!j) {
|
|
2920
|
-
a.value = [],
|
|
2924
|
+
a.value = [], u.value = !1;
|
|
2921
2925
|
return;
|
|
2922
2926
|
}
|
|
2923
2927
|
try {
|
|
@@ -2926,17 +2930,17 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2926
2930
|
} catch {
|
|
2927
2931
|
a.value = [];
|
|
2928
2932
|
} finally {
|
|
2929
|
-
|
|
2933
|
+
u.value = !1;
|
|
2930
2934
|
}
|
|
2931
2935
|
}, 300);
|
|
2932
2936
|
}
|
|
2933
2937
|
function C() {
|
|
2934
|
-
r.value = "", a.value = [],
|
|
2938
|
+
r.value = "", a.value = [], d.value = !1, u.value = !1;
|
|
2935
2939
|
}
|
|
2936
2940
|
function E(j) {
|
|
2937
|
-
t("goToCoordinates", j),
|
|
2941
|
+
t("goToCoordinates", j), d.value = !1, u.value = !1, a.value = [];
|
|
2938
2942
|
}
|
|
2939
|
-
return (j, m) => (i(),
|
|
2943
|
+
return (j, m) => (i(), c("div", kn, [
|
|
2940
2944
|
l("div", _n, [
|
|
2941
2945
|
l("div", $n, [
|
|
2942
2946
|
l("div", Cn, [
|
|
@@ -2963,10 +2967,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2963
2967
|
})
|
|
2964
2968
|
], -1))
|
|
2965
2969
|
]),
|
|
2966
|
-
n.value ? (i(),
|
|
2970
|
+
n.value ? (i(), c("div", Ln, [
|
|
2967
2971
|
l("div", Sn, [
|
|
2968
2972
|
l("div", Bn, [
|
|
2969
|
-
(i(),
|
|
2973
|
+
(i(), c(Y, null, le(p, (f) => l("div", {
|
|
2970
2974
|
onClick: (Q) => b(f),
|
|
2971
2975
|
key: f.value,
|
|
2972
2976
|
class: "form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800 cursor-default"
|
|
@@ -2975,17 +2979,17 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2975
2979
|
l("div", zn, [
|
|
2976
2980
|
l("div", null, T(f.label), 1)
|
|
2977
2981
|
]),
|
|
2978
|
-
f.value === s.value ? (i(),
|
|
2982
|
+
f.value === s.value ? (i(), c("svg", En, m[4] || (m[4] = [
|
|
2979
2983
|
l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
2980
|
-
]))) :
|
|
2984
|
+
]))) : F("", !0)
|
|
2981
2985
|
])
|
|
2982
2986
|
], 8, jn)), 64))
|
|
2983
2987
|
])
|
|
2984
2988
|
])
|
|
2985
|
-
])) :
|
|
2989
|
+
])) : F("", !0)
|
|
2986
2990
|
]),
|
|
2987
|
-
l("div",
|
|
2988
|
-
l("div",
|
|
2991
|
+
l("div", Dn, [
|
|
2992
|
+
l("div", Fn, [
|
|
2989
2993
|
m[6] || (m[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
|
|
2990
2994
|
l("svg", {
|
|
2991
2995
|
width: "16",
|
|
@@ -3013,13 +3017,13 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3013
3017
|
type: "text",
|
|
3014
3018
|
"onUpdate:modelValue": m[1] || (m[1] = (f) => r.value = f),
|
|
3015
3019
|
onInput: R,
|
|
3016
|
-
onFocus: m[2] || (m[2] = (f) =>
|
|
3020
|
+
onFocus: m[2] || (m[2] = (f) => d.value = !0),
|
|
3017
3021
|
placeholder: "lat, lng ex. 50, 30",
|
|
3018
3022
|
class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
3019
3023
|
}, null, 544), [
|
|
3020
3024
|
[se, r.value]
|
|
3021
3025
|
]),
|
|
3022
|
-
r.value ? (i(),
|
|
3026
|
+
r.value ? (i(), c("button", {
|
|
3023
3027
|
key: 0,
|
|
3024
3028
|
onClick: C,
|
|
3025
3029
|
class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
|
|
@@ -3040,23 +3044,23 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3040
3044
|
"stroke-linejoin": "round"
|
|
3041
3045
|
})
|
|
3042
3046
|
], -1)
|
|
3043
|
-
]))) :
|
|
3044
|
-
|
|
3045
|
-
a.value.length ? (i(),
|
|
3046
|
-
(i(!0),
|
|
3047
|
+
]))) : F("", !0),
|
|
3048
|
+
d.value && s.value !== "coordinates" ? (i(), c("div", On, [
|
|
3049
|
+
a.value.length ? (i(), c("ul", An, [
|
|
3050
|
+
(i(!0), c(Y, null, le(a.value, (f) => (i(), c("li", {
|
|
3047
3051
|
key: f.properties.place_id,
|
|
3048
3052
|
onClick: (Q) => E(f),
|
|
3049
3053
|
class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
|
|
3050
3054
|
}, T(f.properties.display_name), 9, Un))), 128))
|
|
3051
|
-
])) :
|
|
3052
|
-
])) :
|
|
3055
|
+
])) : u.value ? (i(), c("div", Tn, "Шукаю…")) : (i(), c("div", Rn, "Нічого не знайдено"))
|
|
3056
|
+
])) : F("", !0)
|
|
3053
3057
|
])
|
|
3054
3058
|
])
|
|
3055
3059
|
])
|
|
3056
3060
|
])
|
|
3057
3061
|
]));
|
|
3058
3062
|
}
|
|
3059
|
-
}), Hn = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, Nn = { class: "flex gap-2" }, qn = ["onClick", "title"], Gn = ["src"], Jn = /* @__PURE__ */
|
|
3063
|
+
}), Hn = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, Nn = { class: "flex gap-2" }, qn = ["onClick", "title"], Gn = ["src"], Jn = /* @__PURE__ */ D({
|
|
3060
3064
|
__name: "map-layers",
|
|
3061
3065
|
props: {
|
|
3062
3066
|
basemaps: {}
|
|
@@ -3067,18 +3071,18 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3067
3071
|
function r(a) {
|
|
3068
3072
|
s("onLayerChange", a), n.value = a;
|
|
3069
3073
|
}
|
|
3070
|
-
return (a,
|
|
3074
|
+
return (a, d) => (i(), c("div", Hn, [
|
|
3071
3075
|
l("div", Nn, [
|
|
3072
|
-
(i(!0),
|
|
3076
|
+
(i(!0), c(Y, null, le(a.basemaps, (u, v) => (i(), c("div", {
|
|
3073
3077
|
key: v,
|
|
3074
3078
|
class: V(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === v }]),
|
|
3075
3079
|
onClick: (p) => r(v),
|
|
3076
|
-
title:
|
|
3080
|
+
title: u.name || v,
|
|
3077
3081
|
role: "button",
|
|
3078
3082
|
tabindex: "0"
|
|
3079
3083
|
}, [
|
|
3080
3084
|
l("img", {
|
|
3081
|
-
src:
|
|
3085
|
+
src: u.preview,
|
|
3082
3086
|
alt: "",
|
|
3083
3087
|
class: "w-14 h-14 object-cover"
|
|
3084
3088
|
}, null, 8, Gn)
|
|
@@ -3095,7 +3099,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3095
3099
|
}, cr = {
|
|
3096
3100
|
key: 1,
|
|
3097
3101
|
class: "text-xs"
|
|
3098
|
-
}, pr = /* @__PURE__ */
|
|
3102
|
+
}, pr = /* @__PURE__ */ D({
|
|
3099
3103
|
__name: "vs-input-map",
|
|
3100
3104
|
props: {
|
|
3101
3105
|
tools: {},
|
|
@@ -3110,7 +3114,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3110
3114
|
emits: ["update:modelValue"],
|
|
3111
3115
|
setup(o, { emit: e }) {
|
|
3112
3116
|
const t = zt(), n = o, s = e, r = x(null);
|
|
3113
|
-
let a,
|
|
3117
|
+
let a, d, u;
|
|
3114
3118
|
const v = x(null), p = x(null), w = x(6), b = x(0), $ = x(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), S = x(null), R = de();
|
|
3115
3119
|
let C;
|
|
3116
3120
|
const E = x("topo100");
|
|
@@ -3134,12 +3138,12 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3134
3138
|
});
|
|
3135
3139
|
}
|
|
3136
3140
|
function m() {
|
|
3137
|
-
const y =
|
|
3141
|
+
const y = d.toGeoJSON();
|
|
3138
3142
|
let k = null;
|
|
3139
|
-
y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k), b.value =
|
|
3143
|
+
y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k), b.value = d.getLayers().length;
|
|
3140
3144
|
}
|
|
3141
3145
|
function f(y = 30) {
|
|
3142
|
-
const k =
|
|
3146
|
+
const k = d.getLayers();
|
|
3143
3147
|
if (!k.length) return;
|
|
3144
3148
|
const J = L.featureGroup(k).getBounds();
|
|
3145
3149
|
J && J.isValid() && a.fitBounds(J, { padding: [y, y] });
|
|
@@ -3169,7 +3173,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3169
3173
|
return y instanceof L.Circle ? y.getLatLng() : y.getBounds ? y.getBounds().getCenter() : y.getLatLng ? y.getLatLng() : a.getCenter();
|
|
3170
3174
|
}
|
|
3171
3175
|
function X() {
|
|
3172
|
-
const y =
|
|
3176
|
+
const y = d.getLayers();
|
|
3173
3177
|
if (!y.length) {
|
|
3174
3178
|
S.value = null, b.value = 0;
|
|
3175
3179
|
return;
|
|
@@ -3188,12 +3192,12 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3188
3192
|
}
|
|
3189
3193
|
function we() {
|
|
3190
3194
|
const y = S.value?.layer;
|
|
3191
|
-
y && (
|
|
3195
|
+
y && (d.removeLayer(y), m(), X());
|
|
3192
3196
|
}
|
|
3193
3197
|
xe(async () => {
|
|
3194
|
-
await j(), L.drawLocal = Ys, a = L.map(r.value, { zoomControl: !1 }).setView($.value, 10), L.control.zoom({ position: "bottomright" }).addTo(a), E.value = Object.keys(R)[0], C = L.tileLayer(R[E.value].url, { maxZoom: 19, minZoom: 6 }).addTo(a),
|
|
3198
|
+
await j(), L.drawLocal = Ys, a = L.map(r.value, { zoomControl: !1 }).setView($.value, 10), L.control.zoom({ position: "bottomright" }).addTo(a), E.value = Object.keys(R)[0], C = L.tileLayer(R[E.value].url, { maxZoom: 19, minZoom: 6 }).addTo(a), d = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (P) => {
|
|
3195
3199
|
const { layer: J } = P;
|
|
3196
|
-
|
|
3200
|
+
d.clearLayers(), d.addLayer(J), m(), X(), f(), U.value = "";
|
|
3197
3201
|
}), a.on(L.Draw.Event.EDITED, () => {
|
|
3198
3202
|
m(), X(), f();
|
|
3199
3203
|
}), a.on(L.Draw.Event.DELETED, () => {
|
|
@@ -3208,33 +3212,33 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3208
3212
|
const k = en(n.modelValue);
|
|
3209
3213
|
if (k) {
|
|
3210
3214
|
const P = [];
|
|
3211
|
-
L.geoJSON(k).eachLayer((J) => P.push(J)), P.length &&
|
|
3215
|
+
L.geoJSON(k).eachLayer((J) => P.push(J)), P.length && d.addLayer(P[0]), m(), X(), f();
|
|
3212
3216
|
}
|
|
3213
3217
|
});
|
|
3214
3218
|
function z(y) {
|
|
3215
3219
|
if (a) {
|
|
3216
|
-
switch (
|
|
3220
|
+
switch (u && u.disable(), y) {
|
|
3217
3221
|
case "marker":
|
|
3218
|
-
|
|
3222
|
+
u = new L.Draw.Marker(a);
|
|
3219
3223
|
break;
|
|
3220
3224
|
case "polyline":
|
|
3221
|
-
|
|
3225
|
+
u = new L.Draw.Polyline(a);
|
|
3222
3226
|
break;
|
|
3223
3227
|
case "polygon":
|
|
3224
|
-
|
|
3228
|
+
u = new L.Draw.Polygon(a);
|
|
3225
3229
|
break;
|
|
3226
3230
|
case "rectangle":
|
|
3227
|
-
|
|
3231
|
+
u = new L.Draw.Rectangle(a);
|
|
3228
3232
|
break;
|
|
3229
3233
|
default:
|
|
3230
|
-
|
|
3234
|
+
u = new L.Draw.Rectangle(a);
|
|
3231
3235
|
break;
|
|
3232
3236
|
}
|
|
3233
|
-
|
|
3237
|
+
u && (u.enable(), U.value = y);
|
|
3234
3238
|
}
|
|
3235
3239
|
}
|
|
3236
3240
|
function M() {
|
|
3237
|
-
const y =
|
|
3241
|
+
const y = d.toGeoJSON(), k = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), P = URL.createObjectURL(k), J = document.createElement("a");
|
|
3238
3242
|
J.href = P, J.download = "data.geojson", J.click(), URL.revokeObjectURL(P);
|
|
3239
3243
|
}
|
|
3240
3244
|
function I(y) {
|
|
@@ -3245,8 +3249,8 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3245
3249
|
if (typeof P.result == "string")
|
|
3246
3250
|
try {
|
|
3247
3251
|
const J = JSON.parse(P.result);
|
|
3248
|
-
|
|
3249
|
-
|
|
3252
|
+
d.clearLayers(), J && L.geoJSON({ type: "Feature", geometry: J }).eachLayer((ne) => {
|
|
3253
|
+
d.addLayer(ne);
|
|
3250
3254
|
}), m(), X(), f();
|
|
3251
3255
|
} finally {
|
|
3252
3256
|
y.target.value = "";
|
|
@@ -3263,12 +3267,12 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3263
3267
|
te(
|
|
3264
3268
|
() => n.modelValue,
|
|
3265
3269
|
(y) => {
|
|
3266
|
-
console.log("update map"),
|
|
3267
|
-
|
|
3270
|
+
console.log("update map"), d.clearLayers(), y && L.geoJSON({ type: "Feature", geometry: y }).eachLayer((k) => {
|
|
3271
|
+
d.addLayer(k), k.dragging?.enable(), k.dragging?.enabled(), k.on("dragend", (P) => {
|
|
3268
3272
|
const ne = P.target.getLatLng();
|
|
3269
3273
|
s("update:modelValue", { type: "Point", coordinates: [ne.lng, ne.lat] });
|
|
3270
3274
|
});
|
|
3271
|
-
}), b.value =
|
|
3275
|
+
}), b.value = d.getLayers().length, X(), f();
|
|
3272
3276
|
}
|
|
3273
3277
|
);
|
|
3274
3278
|
function de() {
|
|
@@ -3292,7 +3296,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3292
3296
|
setTimeout(() => {
|
|
3293
3297
|
a.invalidateSize();
|
|
3294
3298
|
}, 50);
|
|
3295
|
-
}), (y, k) => (i(),
|
|
3299
|
+
}), (y, k) => (i(), c("div", {
|
|
3296
3300
|
class: V(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: ke.value }])
|
|
3297
3301
|
}, [
|
|
3298
3302
|
l("div", {
|
|
@@ -3385,21 +3389,21 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3385
3389
|
}, null, 8, ["basemaps"])
|
|
3386
3390
|
], 2),
|
|
3387
3391
|
l("div", ar, [
|
|
3388
|
-
S.value ? (i(),
|
|
3392
|
+
S.value ? (i(), c("div", sr, [
|
|
3389
3393
|
l("div", nr, [
|
|
3390
|
-
k[7] || (k[7] = fe(" Тип: "
|
|
3394
|
+
k[7] || (k[7] = fe(" Тип: ")),
|
|
3391
3395
|
l("span", rr, T(S.value.type), 1)
|
|
3392
3396
|
]),
|
|
3393
3397
|
l("div", ir, [
|
|
3394
3398
|
l("div", ur, [
|
|
3395
|
-
k[8] || (k[8] = fe(" Центр: "
|
|
3399
|
+
k[8] || (k[8] = fe(" Центр: ")),
|
|
3396
3400
|
l("b", null, T(S.value.center.lat.toFixed(5)) + ", " + T(S.value.center.lng.toFixed(5)), 1)
|
|
3397
3401
|
]),
|
|
3398
|
-
S.value.areaKm2 !== null ? (i(),
|
|
3399
|
-
k[9] || (k[9] = fe(" Площа: "
|
|
3402
|
+
S.value.areaKm2 !== null ? (i(), c("div", dr, [
|
|
3403
|
+
k[9] || (k[9] = fe(" Площа: ")),
|
|
3400
3404
|
l("b", null, T(S.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3401
|
-
])) : (i(),
|
|
3402
|
-
fe(" Площа: "
|
|
3405
|
+
])) : (i(), c("div", cr, k[10] || (k[10] = [
|
|
3406
|
+
fe(" Площа: "),
|
|
3403
3407
|
l("b", null, "—", -1)
|
|
3404
3408
|
]))),
|
|
3405
3409
|
l("button", {
|
|
@@ -3417,14 +3421,14 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3417
3421
|
B(Te, { class: "w-3 h-3" })
|
|
3418
3422
|
])
|
|
3419
3423
|
])
|
|
3420
|
-
])) :
|
|
3424
|
+
])) : F("", !0)
|
|
3421
3425
|
])
|
|
3422
3426
|
], 2));
|
|
3423
3427
|
}
|
|
3424
3428
|
}), fr = /* @__PURE__ */ H(pr, [["__scopeId", "data-v-5a4c21a7"]]), vr = ["data-focus"], mr = { class: "flex items-center" }, hr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, gr = ["onClick", "aria-label"], br = {
|
|
3425
3429
|
key: 0,
|
|
3426
3430
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3427
|
-
}, yr = { class: "flex-1 min-w-[2px]" }, xr = ["placeholder"], wr = { class: "flex items-center shrink-0" }, kr = ["disabled"], _r = /* @__PURE__ */
|
|
3431
|
+
}, yr = { class: "flex-1 min-w-[2px]" }, xr = ["placeholder"], wr = { class: "flex items-center shrink-0" }, kr = ["disabled"], _r = /* @__PURE__ */ D({
|
|
3428
3432
|
__name: "vs-input-tag",
|
|
3429
3433
|
props: /* @__PURE__ */ Z({
|
|
3430
3434
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3443,28 +3447,28 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3443
3447
|
setup(o, { emit: e }) {
|
|
3444
3448
|
const t = o, n = e;
|
|
3445
3449
|
me(t.style);
|
|
3446
|
-
const s = x(null), r = x(null), a = x(null),
|
|
3450
|
+
const s = x(null), r = x(null), a = x(null), d = x(!1), u = x(""), v = W(o, "modelValue"), p = A(() => t.placeholder || "Add tag…"), w = A(() => v.value?.length === 0 && u.value === ""), b = A(() => !t.disabled && v.value?.length > 0), $ = A(() => t.disabled), S = async () => {
|
|
3447
3451
|
$.value || await ze(() => a.value?.focus());
|
|
3448
3452
|
}, R = (U) => {
|
|
3449
3453
|
const O = U.trim();
|
|
3450
|
-
O !== "" && (!v.value || !Array.isArray(v.value) ? v.value = [O] : t.unique ? v.value.includes(O) || (v.value = [...v.value, O]) : v.value = [...v.value, O],
|
|
3454
|
+
O !== "" && (!v.value || !Array.isArray(v.value) ? v.value = [O] : t.unique ? v.value.includes(O) || (v.value = [...v.value, O]) : v.value = [...v.value, O], u.value = "");
|
|
3451
3455
|
}, C = () => {
|
|
3452
|
-
const U =
|
|
3453
|
-
U.trim() !== "" && R(U),
|
|
3456
|
+
const U = u.value;
|
|
3457
|
+
U.trim() !== "" && R(U), u.value = "";
|
|
3454
3458
|
}, E = (U) => {
|
|
3455
3459
|
const O = v.value.slice();
|
|
3456
3460
|
O.splice(U, 1), n("update:modelValue", O);
|
|
3457
3461
|
}, j = () => {
|
|
3458
3462
|
n("update:modelValue", []);
|
|
3459
3463
|
}, m = () => {
|
|
3460
|
-
$.value || (
|
|
3464
|
+
$.value || (d.value = !0);
|
|
3461
3465
|
}, f = () => {
|
|
3462
|
-
|
|
3466
|
+
d.value = !1;
|
|
3463
3467
|
}, Q = (U) => {
|
|
3464
3468
|
const { key: O } = U;
|
|
3465
|
-
O === "Enter" ? (U.preventDefault(), C()) : O === "Backspace" &&
|
|
3469
|
+
O === "Enter" ? (U.preventDefault(), C()) : O === "Backspace" && u.value === "" && v.value.length > 0 && E(v.value.length - 1);
|
|
3466
3470
|
};
|
|
3467
|
-
return (U, O) => (i(),
|
|
3471
|
+
return (U, O) => (i(), c("div", {
|
|
3468
3472
|
class: "flex gap-1 w-full",
|
|
3469
3473
|
ref_key: "root",
|
|
3470
3474
|
ref: s,
|
|
@@ -3480,10 +3484,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3480
3484
|
class: V([
|
|
3481
3485
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
3482
3486
|
"border-gray-300 hover:border-gray-400",
|
|
3483
|
-
|
|
3487
|
+
d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
3484
3488
|
$.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3485
3489
|
]),
|
|
3486
|
-
"data-focus":
|
|
3490
|
+
"data-focus": d.value ? "true" : "false",
|
|
3487
3491
|
onClick: S
|
|
3488
3492
|
}, [
|
|
3489
3493
|
l("div", {
|
|
@@ -3491,7 +3495,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3491
3495
|
ref_key: "chipsRef",
|
|
3492
3496
|
ref: r
|
|
3493
3497
|
}, [
|
|
3494
|
-
(i(!0),
|
|
3498
|
+
(i(!0), c(Y, null, le(v.value, (ue, ee) => (i(), c("div", {
|
|
3495
3499
|
key: ee,
|
|
3496
3500
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3497
3501
|
}, [
|
|
@@ -3516,9 +3520,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3516
3520
|
], -1)
|
|
3517
3521
|
]), 8, gr)
|
|
3518
3522
|
]))), 128)),
|
|
3519
|
-
w.value ? (i(),
|
|
3523
|
+
w.value ? (i(), c("div", br, T(p.value), 1)) : F("", !0),
|
|
3520
3524
|
l("div", yr, [
|
|
3521
|
-
$.value ?
|
|
3525
|
+
$.value ? F("", !0) : K((i(), c("input", {
|
|
3522
3526
|
key: 0,
|
|
3523
3527
|
ref_key: "inputRef",
|
|
3524
3528
|
ref: a,
|
|
@@ -3530,18 +3534,18 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3530
3534
|
type: "text",
|
|
3531
3535
|
tabindex: "0",
|
|
3532
3536
|
"aria-label": "Add tag",
|
|
3533
|
-
"onUpdate:modelValue": O[0] || (O[0] = (ue) =>
|
|
3537
|
+
"onUpdate:modelValue": O[0] || (O[0] = (ue) => u.value = ue),
|
|
3534
3538
|
onFocus: m,
|
|
3535
3539
|
onBlur: f,
|
|
3536
3540
|
onKeydown: Q,
|
|
3537
3541
|
placeholder: v.value && v.value.length ? "" : void 0
|
|
3538
3542
|
}, null, 40, xr)), [
|
|
3539
|
-
[se,
|
|
3543
|
+
[se, u.value]
|
|
3540
3544
|
])
|
|
3541
3545
|
])
|
|
3542
3546
|
], 512),
|
|
3543
3547
|
l("div", wr, [
|
|
3544
|
-
b.value ? (i(),
|
|
3548
|
+
b.value ? (i(), c("button", {
|
|
3545
3549
|
key: 0,
|
|
3546
3550
|
type: "button",
|
|
3547
3551
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
@@ -3557,13 +3561,13 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3557
3561
|
}, [
|
|
3558
3562
|
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" })
|
|
3559
3563
|
], -1)
|
|
3560
|
-
]), 8, kr)) :
|
|
3564
|
+
]), 8, kr)) : F("", !0)
|
|
3561
3565
|
])
|
|
3562
3566
|
], 10, vr)
|
|
3563
3567
|
], 2)
|
|
3564
3568
|
], 512));
|
|
3565
3569
|
}
|
|
3566
|
-
}), $r = { class: "relative flex gap-1 bg-white w-full" }, Cr = ["disabled", "placeholder"], Vr = /* @__PURE__ */
|
|
3570
|
+
}), $r = { class: "relative flex gap-1 bg-white w-full" }, Cr = ["disabled", "placeholder"], Vr = /* @__PURE__ */ D({
|
|
3567
3571
|
__name: "vs-input-slug",
|
|
3568
3572
|
props: /* @__PURE__ */ Z({
|
|
3569
3573
|
disabled: { type: Boolean },
|
|
@@ -3577,7 +3581,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3577
3581
|
setup(o) {
|
|
3578
3582
|
const e = Me("values"), t = o, n = W(o, "modelValue");
|
|
3579
3583
|
function s(a) {
|
|
3580
|
-
const
|
|
3584
|
+
const d = {
|
|
3581
3585
|
а: "a",
|
|
3582
3586
|
б: "b",
|
|
3583
3587
|
в: "v",
|
|
@@ -3616,18 +3620,18 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3616
3620
|
ї: "yi",
|
|
3617
3621
|
ґ: "g"
|
|
3618
3622
|
};
|
|
3619
|
-
return a.toLowerCase().split("").map((
|
|
3623
|
+
return a.toLowerCase().split("").map((u) => d[u] || u).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
3620
3624
|
}
|
|
3621
3625
|
const r = () => {
|
|
3622
|
-
const a = e?.value?.[t.parent || ""]?.toString(),
|
|
3623
|
-
n.value =
|
|
3626
|
+
const a = e?.value?.[t.parent || ""]?.toString(), d = s(a);
|
|
3627
|
+
n.value = d.toString();
|
|
3624
3628
|
};
|
|
3625
|
-
return (a,
|
|
3629
|
+
return (a, d) => (i(), c("div", $r, [
|
|
3626
3630
|
K(l("input", {
|
|
3627
3631
|
ref: "vsText",
|
|
3628
3632
|
disabled: a.disabled,
|
|
3629
3633
|
placeholder: a.placeholder,
|
|
3630
|
-
"onUpdate:modelValue":
|
|
3634
|
+
"onUpdate:modelValue": d[0] || (d[0] = (u) => n.value = u),
|
|
3631
3635
|
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"
|
|
3632
3636
|
}, null, 8, Cr), [
|
|
3633
3637
|
[se, n.value]
|
|
@@ -3644,7 +3648,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3644
3648
|
}, Br = ["onDragstart", "onDrop"], jr = { class: "w-1/3" }, Ir = { class: "w-2/3" }, zr = ["onClick"], Er = {
|
|
3645
3649
|
key: 0,
|
|
3646
3650
|
class: "text-[14px] text-gray-700"
|
|
3647
|
-
},
|
|
3651
|
+
}, Dr = { class: "mt-2 w-full flex items-center" }, Fr = ["disabled"], Or = /* @__PURE__ */ D({
|
|
3648
3652
|
__name: "vs-input-key-value",
|
|
3649
3653
|
props: {
|
|
3650
3654
|
parent: {},
|
|
@@ -3654,10 +3658,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3654
3658
|
},
|
|
3655
3659
|
emits: ["update:modelValue"],
|
|
3656
3660
|
setup(o, { emit: e }) {
|
|
3657
|
-
const t = (C) => `${C}-${Math.random().toString(36).substring(2, 15)}`, n = Me("values"), s = o, r = e, a = s.addButtonText ?? "Додати",
|
|
3661
|
+
const t = (C) => `${C}-${Math.random().toString(36).substring(2, 15)}`, n = Me("values"), s = o, r = e, a = s.addButtonText ?? "Додати", d = s.ignore ?? [], u = x([]), v = x(null);
|
|
3658
3662
|
(() => {
|
|
3659
3663
|
const C = s.parent && n?.value?.[s.parent] || s.modelValue || {};
|
|
3660
|
-
|
|
3664
|
+
u.value = Object.entries(C).filter(([E]) => !d.includes(E)).map(([E, j]) => ({
|
|
3661
3665
|
id: t("key-value-"),
|
|
3662
3666
|
key: E,
|
|
3663
3667
|
value: j
|
|
@@ -3668,25 +3672,25 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3668
3672
|
}
|
|
3669
3673
|
function b(C) {
|
|
3670
3674
|
if (v.value === null || v.value === C) return;
|
|
3671
|
-
const E =
|
|
3672
|
-
|
|
3675
|
+
const E = u.value.splice(v.value, 1)[0];
|
|
3676
|
+
u.value.splice(C, 0, E), v.value = null;
|
|
3673
3677
|
}
|
|
3674
3678
|
const $ = A(
|
|
3675
|
-
() =>
|
|
3679
|
+
() => u.value.some((C) => C.key && !C.value || !C.key && C.value)
|
|
3676
3680
|
), S = () => {
|
|
3677
|
-
|
|
3681
|
+
u.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
3678
3682
|
}, R = (C) => {
|
|
3679
|
-
|
|
3683
|
+
u.value = u.value.filter((E) => E.id !== C);
|
|
3680
3684
|
};
|
|
3681
3685
|
return te(
|
|
3682
|
-
|
|
3686
|
+
u,
|
|
3683
3687
|
(C) => {
|
|
3684
3688
|
const E = {};
|
|
3685
3689
|
C.forEach((m) => {
|
|
3686
3690
|
m.key && m.value !== void 0 && (E[m.key] = m.value);
|
|
3687
3691
|
});
|
|
3688
3692
|
const j = {};
|
|
3689
|
-
|
|
3693
|
+
d.length && d.forEach((m) => {
|
|
3690
3694
|
j[m] = s.parent ? n?.value?.[s.parent]?.[m] : void 0;
|
|
3691
3695
|
}), n?.value && s.parent && (n.value[s.parent] = {
|
|
3692
3696
|
...j,
|
|
@@ -3694,9 +3698,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3694
3698
|
}), r("update:modelValue", E);
|
|
3695
3699
|
},
|
|
3696
3700
|
{ deep: !0 }
|
|
3697
|
-
), (C, E) => (i(),
|
|
3701
|
+
), (C, E) => (i(), c("div", Lr, [
|
|
3698
3702
|
l("div", Sr, [
|
|
3699
|
-
(i(!0),
|
|
3703
|
+
(i(!0), c(Y, null, le(u.value, (j, m) => (i(), c("div", {
|
|
3700
3704
|
key: j.id,
|
|
3701
3705
|
class: V(["flex items-center gap-2 w-full", { "opacity-50": v.value === m }]),
|
|
3702
3706
|
draggable: "true",
|
|
@@ -3731,24 +3735,24 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3731
3735
|
], 8, zr)
|
|
3732
3736
|
], 42, Br))), 128))
|
|
3733
3737
|
], 512),
|
|
3734
|
-
|
|
3735
|
-
l("div",
|
|
3738
|
+
u.value.length ? F("", !0) : (i(), c("span", Er, " Дані для відображення відсутні ")),
|
|
3739
|
+
l("div", Dr, [
|
|
3736
3740
|
l("button", {
|
|
3737
3741
|
type: "button",
|
|
3738
3742
|
onClick: S,
|
|
3739
3743
|
disabled: $.value,
|
|
3740
3744
|
class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
3741
3745
|
}, [
|
|
3742
|
-
B(
|
|
3746
|
+
B(De, {
|
|
3743
3747
|
height: "14",
|
|
3744
3748
|
width: "14"
|
|
3745
3749
|
}),
|
|
3746
3750
|
fe(" " + T(q(a)), 1)
|
|
3747
|
-
], 8,
|
|
3751
|
+
], 8, Fr)
|
|
3748
3752
|
])
|
|
3749
3753
|
]));
|
|
3750
3754
|
}
|
|
3751
|
-
}), Ar = /* @__PURE__ */ H(Or, [["__scopeId", "data-v-a0f7fbfc"]]), Ur = { class: "flex items-center gap-2 w-full" }, Tr = ["disabled"], Rr = /* @__PURE__ */
|
|
3755
|
+
}), Ar = /* @__PURE__ */ H(Or, [["__scopeId", "data-v-a0f7fbfc"]]), Ur = { class: "flex items-center gap-2 w-full" }, Tr = ["disabled"], Rr = /* @__PURE__ */ D({
|
|
3752
3756
|
__name: "vs-input-color",
|
|
3753
3757
|
props: {
|
|
3754
3758
|
style: { default: () => ({}) },
|
|
@@ -3765,10 +3769,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3765
3769
|
get: () => t.modelValue || "#000000",
|
|
3766
3770
|
set: (a) => s("update:modelValue", a)
|
|
3767
3771
|
});
|
|
3768
|
-
return (a,
|
|
3772
|
+
return (a, d) => (i(), c("div", Ur, [
|
|
3769
3773
|
K(l("input", {
|
|
3770
3774
|
type: "color",
|
|
3771
|
-
"onUpdate:modelValue":
|
|
3775
|
+
"onUpdate:modelValue": d[0] || (d[0] = (u) => r.value = u),
|
|
3772
3776
|
disabled: a.disabled,
|
|
3773
3777
|
ref: "color",
|
|
3774
3778
|
class: V(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
|
|
@@ -3778,13 +3782,13 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3778
3782
|
]),
|
|
3779
3783
|
K(l("input", {
|
|
3780
3784
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
3781
|
-
"onUpdate:modelValue":
|
|
3785
|
+
"onUpdate:modelValue": d[1] || (d[1] = (u) => r.value = u)
|
|
3782
3786
|
}, null, 512), [
|
|
3783
3787
|
[se, r.value]
|
|
3784
3788
|
])
|
|
3785
3789
|
]));
|
|
3786
3790
|
}
|
|
3787
|
-
}), Pr = { class: "flex items-center gap-2 w-full" }, Hr = ["min", "max", "step", "disabled"], Nr = /* @__PURE__ */
|
|
3791
|
+
}), Pr = { class: "flex items-center gap-2 w-full" }, Hr = ["min", "max", "step", "disabled"], Nr = /* @__PURE__ */ D({
|
|
3788
3792
|
__name: "vs-input-range",
|
|
3789
3793
|
props: {
|
|
3790
3794
|
style: { default: () => ({}) },
|
|
@@ -3804,10 +3808,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3804
3808
|
get: () => Number(t.modelValue ?? t.min),
|
|
3805
3809
|
set: (a) => s("update:modelValue", Number(a))
|
|
3806
3810
|
});
|
|
3807
|
-
return (a,
|
|
3811
|
+
return (a, d) => (i(), c("div", Pr, [
|
|
3808
3812
|
K(l("input", {
|
|
3809
3813
|
type: "range",
|
|
3810
|
-
"onUpdate:modelValue":
|
|
3814
|
+
"onUpdate:modelValue": d[0] || (d[0] = (u) => r.value = u),
|
|
3811
3815
|
min: a.min,
|
|
3812
3816
|
max: a.max,
|
|
3813
3817
|
step: a.step,
|
|
@@ -3820,7 +3824,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3820
3824
|
K(l("input", {
|
|
3821
3825
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
3822
3826
|
type: "number",
|
|
3823
|
-
"onUpdate:modelValue":
|
|
3827
|
+
"onUpdate:modelValue": d[1] || (d[1] = (u) => r.value = u)
|
|
3824
3828
|
}, null, 512), [
|
|
3825
3829
|
[se, r.value]
|
|
3826
3830
|
])
|
|
@@ -3843,7 +3847,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3843
3847
|
"vs-input-checkbox": ql,
|
|
3844
3848
|
"vs-input-file": zo,
|
|
3845
3849
|
"vs-input-html": nt,
|
|
3846
|
-
"vs-input-email":
|
|
3850
|
+
"vs-input-email": Fl,
|
|
3847
3851
|
"vs-input-datatable": Xs,
|
|
3848
3852
|
"vs-input-map": fr,
|
|
3849
3853
|
"vs-input-file-list": ua,
|
|
@@ -3852,7 +3856,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3852
3856
|
"vs-input-key-value": Ar,
|
|
3853
3857
|
"vs-input-range": Nr,
|
|
3854
3858
|
"vs-input-color": Rr
|
|
3855
|
-
}, Gr = /* @__PURE__ */
|
|
3859
|
+
}, Gr = /* @__PURE__ */ D({
|
|
3856
3860
|
__name: "behavior",
|
|
3857
3861
|
props: {
|
|
3858
3862
|
api: {},
|
|
@@ -3873,18 +3877,18 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3873
3877
|
}
|
|
3874
3878
|
const a = await r.json();
|
|
3875
3879
|
if (!e.set || !t) return;
|
|
3876
|
-
for (const [
|
|
3877
|
-
t.value[
|
|
3880
|
+
for (const [d, u] of Object.entries(e.set))
|
|
3881
|
+
t.value[d] = a.result[u];
|
|
3878
3882
|
} catch (s) {
|
|
3879
3883
|
console.error(e.error, s);
|
|
3880
3884
|
}
|
|
3881
3885
|
}
|
|
3882
|
-
return (s, r) => (i(),
|
|
3886
|
+
return (s, r) => (i(), c("button", {
|
|
3883
3887
|
onClick: n,
|
|
3884
3888
|
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"
|
|
3885
3889
|
}, T(s.button), 1));
|
|
3886
3890
|
}
|
|
3887
|
-
}), wt = /* @__PURE__ */
|
|
3891
|
+
}), wt = /* @__PURE__ */ D({
|
|
3888
3892
|
__name: "vs-compact-form-layout",
|
|
3889
3893
|
props: /* @__PURE__ */ Z({
|
|
3890
3894
|
item: { default: {} },
|
|
@@ -3899,20 +3903,20 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3899
3903
|
emits: ["update:modelValue"],
|
|
3900
3904
|
setup(o) {
|
|
3901
3905
|
const e = o, t = W(o, "modelValue"), n = A(() => Kt[`${e.layout}`]), s = A(() => qr?.[`vs-input-${e.item.type}`]), r = A(() => {
|
|
3902
|
-
const
|
|
3906
|
+
const d = q(s);
|
|
3907
|
+
if (!d) return /* @__PURE__ */ new Set();
|
|
3908
|
+
const u = d.props ?? d.__vccOpts?.props;
|
|
3903
3909
|
if (!u) return /* @__PURE__ */ new Set();
|
|
3904
|
-
const
|
|
3905
|
-
if (!c) return /* @__PURE__ */ new Set();
|
|
3906
|
-
const v = Array.isArray(c) ? c : Object.keys(c);
|
|
3910
|
+
const v = Array.isArray(u) ? u : Object.keys(u);
|
|
3907
3911
|
return new Set(v);
|
|
3908
3912
|
}), a = A(() => {
|
|
3909
|
-
const
|
|
3910
|
-
return
|
|
3913
|
+
const d = e.item ?? {}, u = r.value;
|
|
3914
|
+
return u.size ? Object.fromEntries(Object.entries(d).filter(([v]) => u.has(v))) : {};
|
|
3911
3915
|
});
|
|
3912
|
-
return (
|
|
3916
|
+
return (d, u) => (i(), ae(Be(n.value), {
|
|
3913
3917
|
ua: e.item.ua,
|
|
3914
3918
|
error: e.error || "",
|
|
3915
|
-
item:
|
|
3919
|
+
item: d.item,
|
|
3916
3920
|
label: e.item.label
|
|
3917
3921
|
}, {
|
|
3918
3922
|
default: Le(() => [
|
|
@@ -3921,9 +3925,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3921
3925
|
}, [
|
|
3922
3926
|
(i(), ae(Be(s.value), Ee(a.value, {
|
|
3923
3927
|
modelValue: t.value,
|
|
3924
|
-
"onUpdate:modelValue":
|
|
3928
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => t.value = v)
|
|
3925
3929
|
}), null, 16, ["modelValue"])),
|
|
3926
|
-
|
|
3930
|
+
d.item.behavior?.api && d.item.behavior?.button ? (i(), ae(Gr, Ee({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : F("", !0)
|
|
3927
3931
|
], 2)
|
|
3928
3932
|
]),
|
|
3929
3933
|
_: 1
|
|
@@ -3986,13 +3990,13 @@ function Yr(o) {
|
|
|
3986
3990
|
}
|
|
3987
3991
|
function ei(o, e) {
|
|
3988
3992
|
const t = Yr(e), n = x({});
|
|
3989
|
-
function s(
|
|
3990
|
-
const v =
|
|
3993
|
+
function s(u) {
|
|
3994
|
+
const v = u?.conditions;
|
|
3991
3995
|
if (!v) return !0;
|
|
3992
3996
|
const p = Array.isArray(v) ? v[0] : v, w = o?.value?.[p];
|
|
3993
3997
|
return xt(w, v);
|
|
3994
3998
|
}
|
|
3995
|
-
const r = (
|
|
3999
|
+
const r = (u = t, v = !0) => (u.forEach((p) => {
|
|
3996
4000
|
if (p.rules) {
|
|
3997
4001
|
if (!s(p)) {
|
|
3998
4002
|
delete n.value[p.name];
|
|
@@ -4004,7 +4008,7 @@ function ei(o, e) {
|
|
|
4004
4008
|
});
|
|
4005
4009
|
}
|
|
4006
4010
|
p.schema && r(p.schema, !1);
|
|
4007
|
-
}), v && Object.values(n.value).some(Boolean) ? n.value : null), a = A(() => t?.filter((
|
|
4011
|
+
}), v && Object.values(n.value).some(Boolean) ? n.value : null), a = A(() => t?.filter((u) => s(u)));
|
|
4008
4012
|
return {
|
|
4009
4013
|
errors: n,
|
|
4010
4014
|
validate: r,
|
|
@@ -4014,7 +4018,7 @@ function ei(o, e) {
|
|
|
4014
4018
|
visibleSchema: a
|
|
4015
4019
|
};
|
|
4016
4020
|
}
|
|
4017
|
-
const
|
|
4021
|
+
const Fe = /* @__PURE__ */ D({
|
|
4018
4022
|
__name: "vs-compact-form",
|
|
4019
4023
|
props: /* @__PURE__ */ Z({
|
|
4020
4024
|
schema: { default: () => [] },
|
|
@@ -4031,19 +4035,19 @@ const De = /* @__PURE__ */ F({
|
|
|
4031
4035
|
emits: /* @__PURE__ */ Z(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
|
|
4032
4036
|
setup(o, { expose: e, emit: t }) {
|
|
4033
4037
|
const n = t, s = o, r = W(o, "form"), a = W(o, "values"), {
|
|
4034
|
-
errors:
|
|
4035
|
-
validate:
|
|
4038
|
+
errors: d,
|
|
4039
|
+
validate: u,
|
|
4036
4040
|
reset: v,
|
|
4037
4041
|
visibleSchema: p
|
|
4038
4042
|
} = ei(a, s.schema), w = () => {
|
|
4039
|
-
n("update:modelValue", a.value),
|
|
4043
|
+
n("update:modelValue", a.value), u(), n("handle-submit", a.value);
|
|
4040
4044
|
};
|
|
4041
4045
|
e({
|
|
4042
|
-
validate:
|
|
4046
|
+
validate: u,
|
|
4043
4047
|
reset: v,
|
|
4044
|
-
errors:
|
|
4048
|
+
errors: d
|
|
4045
4049
|
}), xe(() => {
|
|
4046
|
-
s.modelValue && (a.value = s.modelValue), r.value.value = a.value, r.value.errors =
|
|
4050
|
+
s.modelValue && (a.value = s.modelValue), r.value.value = a.value, r.value.errors = d.value, r.value.reset = v, r.value.validate = u, r.value.formId = s.formId;
|
|
4047
4051
|
});
|
|
4048
4052
|
function b($, S) {
|
|
4049
4053
|
if ($ === S) return !0;
|
|
@@ -4051,11 +4055,11 @@ const De = /* @__PURE__ */ F({
|
|
|
4051
4055
|
const R = Object.keys($), C = Object.keys(S);
|
|
4052
4056
|
return R.length !== C.length ? !1 : R.every((E) => $[E] === S[E]);
|
|
4053
4057
|
}
|
|
4054
|
-
return st("form", r), st("values", a), ($, S) => (i(),
|
|
4058
|
+
return st("form", r), st("values", a), ($, S) => (i(), c("form", {
|
|
4055
4059
|
onSubmit: ve(w, ["prevent"]),
|
|
4056
4060
|
class: V(["grid grid-cols-12", $.layout === "default" ? "gap-6" : "gap-4"])
|
|
4057
4061
|
}, [
|
|
4058
|
-
(i(!0),
|
|
4062
|
+
(i(!0), c(Y, null, le(q(p), (R) => (i(), ae(wt, {
|
|
4059
4063
|
key: R.name,
|
|
4060
4064
|
class: V($.layout === "horizontal" ? "col-span-12" : `col-span-${R.col || 12} `),
|
|
4061
4065
|
style: ye($.style),
|
|
@@ -4066,11 +4070,11 @@ const De = /* @__PURE__ */ F({
|
|
|
4066
4070
|
const E = a.value[R.name];
|
|
4067
4071
|
b(E, C) || (a.value[R.name] = C);
|
|
4068
4072
|
},
|
|
4069
|
-
error: q(
|
|
4073
|
+
error: q(d)[R.name]
|
|
4070
4074
|
}, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
|
|
4071
4075
|
], 34));
|
|
4072
4076
|
}
|
|
4073
|
-
}), ti = { class: "relative" }, li = { 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" }, ai = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, si = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, ni = { class: "p-4 mim-h-0 h-full overflow-auto" }, ri = /* @__PURE__ */
|
|
4077
|
+
}), ti = { class: "relative" }, li = { 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" }, ai = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, si = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, ni = { class: "p-4 mim-h-0 h-full overflow-auto" }, ri = /* @__PURE__ */ D({
|
|
4074
4078
|
__name: "modal-edit",
|
|
4075
4079
|
props: {
|
|
4076
4080
|
schema: {},
|
|
@@ -4081,7 +4085,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4081
4085
|
},
|
|
4082
4086
|
emits: ["close", "save", "edit"],
|
|
4083
4087
|
setup(o, { emit: e }) {
|
|
4084
|
-
const t = o, n = e, s = x(t.schema), r = x(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), a = x({}),
|
|
4088
|
+
const t = o, n = e, s = x(t.schema), r = x(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), a = x({}), d = x(), u = x(t.mode);
|
|
4085
4089
|
async function v() {
|
|
4086
4090
|
const w = a.value.validate();
|
|
4087
4091
|
if (w) {
|
|
@@ -4089,10 +4093,10 @@ const De = /* @__PURE__ */ F({
|
|
|
4089
4093
|
`) });
|
|
4090
4094
|
return;
|
|
4091
4095
|
}
|
|
4092
|
-
if (
|
|
4096
|
+
if (d.value)
|
|
4093
4097
|
try {
|
|
4094
|
-
const b = await fetch(`/api/table/${
|
|
4095
|
-
method:
|
|
4098
|
+
const b = await fetch(`/api/table/${d.value}`, {
|
|
4099
|
+
method: u.value === "add" ? "POST" : "PUT",
|
|
4096
4100
|
headers: {
|
|
4097
4101
|
"Content-Type": "application/json"
|
|
4098
4102
|
},
|
|
@@ -4102,7 +4106,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4102
4106
|
await b.json(), be({
|
|
4103
4107
|
type: "success",
|
|
4104
4108
|
title: "Успішно",
|
|
4105
|
-
message: `Дані успішно ${
|
|
4109
|
+
message: `Дані успішно ${u.value === "add" ? "збережено" : "оновлено"}`
|
|
4106
4110
|
}), n("save", r.value);
|
|
4107
4111
|
else if (b.status === 400) {
|
|
4108
4112
|
const $ = await b.json().catch(() => ({}));
|
|
@@ -4134,17 +4138,17 @@ const De = /* @__PURE__ */ F({
|
|
|
4134
4138
|
return xe(async () => {
|
|
4135
4139
|
if (t.form) {
|
|
4136
4140
|
const w = await fetch(`/api/template/form/${t.form}`).then((b) => b.json());
|
|
4137
|
-
s.value = w.schema,
|
|
4141
|
+
s.value = w.schema, d.value = w.token;
|
|
4138
4142
|
} else if (t.token) {
|
|
4139
|
-
|
|
4140
|
-
const w = await fetch(`/api/form/${
|
|
4141
|
-
s.value = w.schema, w.data ? r.value = w.data :
|
|
4143
|
+
d.value = t.token;
|
|
4144
|
+
const w = await fetch(`/api/form/${d.value}`).then((b) => b.json());
|
|
4145
|
+
s.value = w.schema, w.data ? r.value = w.data : u.value = "add";
|
|
4142
4146
|
}
|
|
4143
|
-
}), (w, b) => (i(),
|
|
4147
|
+
}), (w, b) => (i(), c("div", ti, [
|
|
4144
4148
|
l("div", li, [
|
|
4145
4149
|
l("div", oi, [
|
|
4146
4150
|
l("div", ai, [
|
|
4147
|
-
l("h3", si, T(
|
|
4151
|
+
l("h3", si, T(u.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4148
4152
|
l("button", {
|
|
4149
4153
|
onClick: p,
|
|
4150
4154
|
type: "button",
|
|
@@ -4169,14 +4173,14 @@ const De = /* @__PURE__ */ F({
|
|
|
4169
4173
|
]))
|
|
4170
4174
|
]),
|
|
4171
4175
|
l("div", ni, [
|
|
4172
|
-
s.value ? (i(), ae(
|
|
4176
|
+
s.value ? (i(), ae(Fe, {
|
|
4173
4177
|
key: 0,
|
|
4174
4178
|
schema: s.value,
|
|
4175
4179
|
values: r.value,
|
|
4176
4180
|
"onUpdate:values": b[0] || (b[0] = ($) => r.value = $),
|
|
4177
4181
|
form: a.value,
|
|
4178
4182
|
"onUpdate:form": b[1] || (b[1] = ($) => a.value = $)
|
|
4179
|
-
}, null, 8, ["schema", "values", "form"])) :
|
|
4183
|
+
}, null, 8, ["schema", "values", "form"])) : F("", !0)
|
|
4180
4184
|
]),
|
|
4181
4185
|
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" }, [
|
|
4182
4186
|
l("button", {
|
|
@@ -4213,19 +4217,19 @@ const De = /* @__PURE__ */ F({
|
|
|
4213
4217
|
}
|
|
4214
4218
|
});
|
|
4215
4219
|
});
|
|
4216
|
-
|
|
4217
|
-
e.component("VForm",
|
|
4220
|
+
Fe.install = function(e) {
|
|
4221
|
+
e.component("VForm", Fe), Object.assign(e.config.globalProperties, {
|
|
4218
4222
|
$form: pt
|
|
4219
4223
|
}), e.provide("form", pt), window.v3plugin || (window.v3plugin = {});
|
|
4220
4224
|
};
|
|
4221
4225
|
export {
|
|
4222
4226
|
ri as ModalEdit,
|
|
4223
|
-
|
|
4227
|
+
Fe as VForm,
|
|
4224
4228
|
ql as VsInputCheckbox,
|
|
4225
4229
|
Rr as VsInputColor,
|
|
4226
4230
|
Ea as VsInputContainer,
|
|
4227
4231
|
Jl as VsInputDate,
|
|
4228
|
-
|
|
4232
|
+
Fl as VsInputEmail,
|
|
4229
4233
|
zo as VsInputFile,
|
|
4230
4234
|
ua as VsInputFileList,
|
|
4231
4235
|
Ar as VsInputKeyValue,
|
|
@@ -4240,7 +4244,7 @@ export {
|
|
|
4240
4244
|
_r as VsInputTag,
|
|
4241
4245
|
Ue as VsInputText,
|
|
4242
4246
|
Qa as VsInputTextarea,
|
|
4243
|
-
|
|
4247
|
+
Fe as default,
|
|
4244
4248
|
qr as inputs,
|
|
4245
4249
|
Xs as vsInputDatatable,
|
|
4246
4250
|
fr as vsInputMap
|