@opengis/form 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/base/vs-input-password.vue.d.ts +18 -0
- package/dist/components/inputs/base/vs-input-password.vue.d.ts.map +1 -0
- package/dist/components/inputs/index.d.ts +15 -0
- package/dist/components/inputs/index.d.ts.map +1 -1
- package/dist/components/inputs/map/vs-input-map.vue.d.ts.map +1 -1
- package/dist/components/inputs/table/vs-input-datatable.vue.d.ts.map +1 -1
- package/dist/components/inputs/vs-input-select.vue.d.ts.map +1 -1
- package/dist/components/layouts/vs-compact-form-layout.vue.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1331 -1267
- package/dist/index.umd.cjs +3 -3
- package/dist/plugin/form-plugin.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as F, ref as
|
|
2
|
-
import { notify as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as F, ref as x, onMounted as xe, onUnmounted as Ne, createElementBlock as d, openBlock as i, normalizeClass as V, createCommentVNode as D, 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
|
+
import { notify as be, VsModal as ht, modal as Et } from "@opengis/core";
|
|
3
|
+
const Ft = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "text-[14px] font-medium text-gray-900 mb-2"
|
|
6
|
-
},
|
|
6
|
+
}, Dt = { 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
|
-
},
|
|
12
|
+
}, Ut = /* @__PURE__ */ F({
|
|
13
13
|
__name: "vs-layout-default",
|
|
14
14
|
props: {
|
|
15
15
|
ua: { default: "" },
|
|
@@ -23,34 +23,34 @@ const Bt = {
|
|
|
23
23
|
label: { default: "" }
|
|
24
24
|
},
|
|
25
25
|
setup(o) {
|
|
26
|
-
const e =
|
|
26
|
+
const e = x("uk"), t = (n) => {
|
|
27
27
|
n.detail.key === "locale" && (e.value = n.detail.newValue);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return xe(() => {
|
|
30
30
|
e.value = localStorage.locale, window.addEventListener("storage", t);
|
|
31
|
-
}),
|
|
31
|
+
}), Ne(() => {
|
|
32
32
|
window.removeEventListener("resize", t);
|
|
33
33
|
}), (n, s) => (i(), d("div", {
|
|
34
|
-
class:
|
|
34
|
+
class: V(["w-full relative", { "opacity-60": n.item.disabled }])
|
|
35
35
|
}, [
|
|
36
|
-
n.ua || n.label ? (i(), d("div",
|
|
37
|
-
l("span",
|
|
38
|
-
n.item?.rules?.includes("required") ? (i(), d("span",
|
|
39
|
-
])) :
|
|
40
|
-
$e(n.$slots, "default",
|
|
41
|
-
n.error ? (i(), d("span",
|
|
36
|
+
n.ua || n.label ? (i(), d("div", Ft, [
|
|
37
|
+
l("span", Dt, T(n.item[e.value] || n.ua || n.label), 1),
|
|
38
|
+
n.item?.rules?.includes("required") ? (i(), d("span", Ot, "*")) : D("", !0)
|
|
39
|
+
])) : D("", !0),
|
|
40
|
+
$e(n.$slots, "default", qe(Ge(n.$attrs))),
|
|
41
|
+
n.error ? (i(), d("span", At, T(n.error), 1)) : D("", !0)
|
|
42
42
|
], 2));
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), Tt = { class: "w-full relative flex flex-row items-center gap-2" }, Rt = {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12 max-w-[250px]"
|
|
47
|
-
},
|
|
47
|
+
}, Pt = {
|
|
48
48
|
key: 0,
|
|
49
49
|
class: "text-red-500 text-[14px]"
|
|
50
|
-
},
|
|
50
|
+
}, Ht = {
|
|
51
51
|
key: 1,
|
|
52
52
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
53
|
-
},
|
|
53
|
+
}, Nt = /* @__PURE__ */ F({
|
|
54
54
|
__name: "vs-layout-horizontal",
|
|
55
55
|
props: {
|
|
56
56
|
ua: { default: "" },
|
|
@@ -64,19 +64,19 @@ const Bt = {
|
|
|
64
64
|
label: { default: "" }
|
|
65
65
|
},
|
|
66
66
|
setup(o) {
|
|
67
|
-
return (e, t) => (i(), d("div",
|
|
68
|
-
e.item?.type !== "html" ? (i(), d("span",
|
|
69
|
-
|
|
70
|
-
e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), d("span",
|
|
71
|
-
])) :
|
|
72
|
-
$e(e.$slots, "default",
|
|
73
|
-
e.error ? (i(), d("span",
|
|
67
|
+
return (e, t) => (i(), d("div", Tt, [
|
|
68
|
+
e.item?.type !== "html" ? (i(), d("span", Rt, [
|
|
69
|
+
fe(T(e.ua || e.label) + " ", 1),
|
|
70
|
+
e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), d("span", Pt, "*")) : D("", !0)
|
|
71
|
+
])) : D("", !0),
|
|
72
|
+
$e(e.$slots, "default", qe(Ge(e.$attrs))),
|
|
73
|
+
e.error ? (i(), d("span", Ht, T(e.error), 1)) : D("", !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
|
-
},
|
|
79
|
+
}, Jt = /* @__PURE__ */ F({
|
|
80
80
|
__name: "vs-layout-inline",
|
|
81
81
|
props: {
|
|
82
82
|
ua: { default: "" },
|
|
@@ -90,27 +90,57 @@ const Bt = {
|
|
|
90
90
|
label: { default: "" }
|
|
91
91
|
},
|
|
92
92
|
setup(o) {
|
|
93
|
-
return (e, t) => (i(), d("div",
|
|
94
|
-
$e(e.$slots, "default",
|
|
95
|
-
e.error ? (i(), d("span",
|
|
93
|
+
return (e, t) => (i(), d("div", qt, [
|
|
94
|
+
$e(e.$slots, "default", qe(Ge(e.$attrs))),
|
|
95
|
+
e.error ? (i(), d("span", Gt, T(e.error), 1)) : D("", !0)
|
|
96
96
|
]));
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
default:
|
|
100
|
-
horizontal:
|
|
101
|
-
inline:
|
|
98
|
+
}), Kt = {
|
|
99
|
+
default: Ut,
|
|
100
|
+
horizontal: Nt,
|
|
101
|
+
inline: Jt
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function me(o) {
|
|
104
104
|
return {
|
|
105
|
-
inputClass:
|
|
105
|
+
inputClass: A(() => {
|
|
106
106
|
const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
|
|
107
107
|
return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
|
|
108
108
|
})
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
const
|
|
111
|
+
const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ F({
|
|
112
|
+
__name: "vs-input-password",
|
|
113
|
+
props: /* @__PURE__ */ Z({
|
|
114
|
+
style: { default: () => ({}) },
|
|
115
|
+
customClass: { default: "" },
|
|
116
|
+
disabled: { type: Boolean, default: !1 },
|
|
117
|
+
modelValue: {},
|
|
118
|
+
error: { default: "" },
|
|
119
|
+
name: {},
|
|
120
|
+
placeholder: { default: "" }
|
|
121
|
+
}, {
|
|
122
|
+
modelValue: { default: "" },
|
|
123
|
+
modelModifiers: {}
|
|
124
|
+
}),
|
|
125
|
+
emits: ["update:modelValue"],
|
|
126
|
+
setup(o) {
|
|
127
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
128
|
+
return (s, r) => K((i(), d("input", {
|
|
129
|
+
type: "password",
|
|
130
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
131
|
+
placeholder: s.placeholder,
|
|
132
|
+
disabled: s.disabled,
|
|
133
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
|
|
134
|
+
style: {
|
|
135
|
+
border: "1px solid #CFD9E0"
|
|
136
|
+
}
|
|
137
|
+
}, null, 10, Zt)), [
|
|
138
|
+
[se, n.value]
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
}), Qt = ["placeholder", "disabled"], Ue = /* @__PURE__ */ F({
|
|
112
142
|
__name: "vs-input-text",
|
|
113
|
-
props: /* @__PURE__ */
|
|
143
|
+
props: /* @__PURE__ */ Z({
|
|
114
144
|
style: { default: () => ({}) },
|
|
115
145
|
customClass: { default: "" },
|
|
116
146
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -124,23 +154,23 @@ const Nt = ["placeholder", "disabled"], De = /* @__PURE__ */ F({
|
|
|
124
154
|
}),
|
|
125
155
|
emits: ["update:modelValue"],
|
|
126
156
|
setup(o) {
|
|
127
|
-
const e = o, { inputClass: t } =
|
|
157
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
128
158
|
return (s, r) => K((i(), d("input", {
|
|
129
159
|
type: "text",
|
|
130
160
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
131
161
|
placeholder: s.placeholder,
|
|
132
162
|
disabled: s.disabled,
|
|
133
|
-
class:
|
|
163
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
|
|
134
164
|
style: {
|
|
135
165
|
border: "1px solid #CFD9E0"
|
|
136
166
|
}
|
|
137
|
-
}, null, 10,
|
|
138
|
-
[
|
|
167
|
+
}, null, 10, Qt)), [
|
|
168
|
+
[se, n.value]
|
|
139
169
|
]);
|
|
140
170
|
}
|
|
141
|
-
}),
|
|
171
|
+
}), Xt = ["placeholder"], Yt = /* @__PURE__ */ F({
|
|
142
172
|
__name: "vs-input-number",
|
|
143
|
-
props: /* @__PURE__ */
|
|
173
|
+
props: /* @__PURE__ */ Z({
|
|
144
174
|
style: { default: () => ({}) },
|
|
145
175
|
customClass: {},
|
|
146
176
|
disabled: { type: Boolean },
|
|
@@ -154,18 +184,18 @@ const Nt = ["placeholder", "disabled"], De = /* @__PURE__ */ F({
|
|
|
154
184
|
}),
|
|
155
185
|
emits: ["update:modelValue"],
|
|
156
186
|
setup(o) {
|
|
157
|
-
const e = o, { inputClass: t } =
|
|
187
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
158
188
|
return (s, r) => K((i(), d("input", {
|
|
159
189
|
type: "number",
|
|
160
190
|
step: "any",
|
|
161
191
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
162
192
|
placeholder: s.placeholder,
|
|
163
|
-
class:
|
|
193
|
+
class: V(["py-1.5 px-3 block w-full bg-white", [q(t)]]),
|
|
164
194
|
style: {
|
|
165
195
|
border: "1px solid #CFD9E0"
|
|
166
196
|
}
|
|
167
|
-
}, null, 10,
|
|
168
|
-
[
|
|
197
|
+
}, null, 10, Xt)), [
|
|
198
|
+
[se, n.value]
|
|
169
199
|
]);
|
|
170
200
|
}
|
|
171
201
|
}), H = (o, e) => {
|
|
@@ -173,7 +203,7 @@ const Nt = ["placeholder", "disabled"], De = /* @__PURE__ */ F({
|
|
|
173
203
|
for (const [n, s] of e)
|
|
174
204
|
t[n] = s;
|
|
175
205
|
return t;
|
|
176
|
-
},
|
|
206
|
+
}, el = {}, tl = {
|
|
177
207
|
xmlns: "http://www.w3.org/2000/svg",
|
|
178
208
|
viewBox: "0 0 24 24",
|
|
179
209
|
fill: "none",
|
|
@@ -183,8 +213,8 @@ const Nt = ["placeholder", "disabled"], De = /* @__PURE__ */ F({
|
|
|
183
213
|
"stroke-linejoin": "round",
|
|
184
214
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
185
215
|
};
|
|
186
|
-
function
|
|
187
|
-
return i(), d("svg",
|
|
216
|
+
function ll(o, e) {
|
|
217
|
+
return i(), d("svg", tl, e[0] || (e[0] = [
|
|
188
218
|
l("path", {
|
|
189
219
|
stroke: "none",
|
|
190
220
|
d: "M0 0h24v24H0z",
|
|
@@ -193,7 +223,7 @@ function Zt(o, e) {
|
|
|
193
223
|
l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
194
224
|
]));
|
|
195
225
|
}
|
|
196
|
-
const
|
|
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__ */ F({
|
|
197
227
|
__name: "vs-checkbox-default",
|
|
198
228
|
props: {
|
|
199
229
|
value: { default: "" },
|
|
@@ -206,45 +236,45 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
206
236
|
},
|
|
207
237
|
emits: ["update:modelValue"],
|
|
208
238
|
setup(o, { emit: e }) {
|
|
209
|
-
const t = e, n = o, s =
|
|
239
|
+
const t = e, n = o, s = A({
|
|
210
240
|
get: () => n.modelValue,
|
|
211
241
|
set: (r) => t("update:modelValue", r)
|
|
212
242
|
});
|
|
213
|
-
return (r, a) => (i(), d("div",
|
|
243
|
+
return (r, a) => (i(), d("div", al, [
|
|
214
244
|
K(l("input", {
|
|
215
245
|
type: "checkbox",
|
|
216
246
|
value: r.value,
|
|
217
247
|
"onUpdate:modelValue": a[0] || (a[0] = (u) => s.value = u),
|
|
218
|
-
class:
|
|
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 }]),
|
|
219
249
|
id: r.id,
|
|
220
250
|
disabled: r.disabled
|
|
221
|
-
}, null, 10,
|
|
222
|
-
[
|
|
251
|
+
}, null, 10, sl), [
|
|
252
|
+
[ft, s.value]
|
|
223
253
|
]),
|
|
224
254
|
l("label", {
|
|
225
255
|
for: r.id,
|
|
226
|
-
class:
|
|
256
|
+
class: V(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": r.disabled }])
|
|
227
257
|
}, [
|
|
228
258
|
l("div", {
|
|
229
|
-
class:
|
|
259
|
+
class: V(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", r.error ? "border-red-600" : ""]])
|
|
230
260
|
}, [
|
|
231
|
-
|
|
261
|
+
B(ol, {
|
|
232
262
|
height: "12",
|
|
233
263
|
width: "12"
|
|
234
264
|
})
|
|
235
265
|
], 2),
|
|
236
|
-
l("span",
|
|
266
|
+
l("span", rl, [
|
|
237
267
|
$e(r.$slots, "default", {}, () => [
|
|
238
|
-
|
|
268
|
+
fe(T(r.label), 1)
|
|
239
269
|
])
|
|
240
270
|
])
|
|
241
|
-
], 10,
|
|
271
|
+
], 10, nl)
|
|
242
272
|
]));
|
|
243
273
|
}
|
|
244
|
-
}),
|
|
274
|
+
}), ul = ["name", "value", "disabled"], dl = { class: "flex items-center gap-[6px] text-[14px]" }, cl = {
|
|
245
275
|
key: 0,
|
|
246
276
|
class: "text-[16px]"
|
|
247
|
-
},
|
|
277
|
+
}, pl = ["src"], fl = /* @__PURE__ */ F({
|
|
248
278
|
__name: "vs-checkbox-buttons",
|
|
249
279
|
props: {
|
|
250
280
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -258,14 +288,14 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
258
288
|
},
|
|
259
289
|
emits: ["update:modelValue"],
|
|
260
290
|
setup(o, { emit: e }) {
|
|
261
|
-
const t = o, n = e, s =
|
|
291
|
+
const t = o, n = e, s = A({
|
|
262
292
|
get: () => t.modelValue,
|
|
263
293
|
set: (u) => {
|
|
264
294
|
n("update:modelValue", u);
|
|
265
295
|
}
|
|
266
|
-
}), r =
|
|
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");
|
|
267
297
|
return (u, c) => (i(), d("label", {
|
|
268
|
-
class:
|
|
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"]])
|
|
269
299
|
}, [
|
|
270
300
|
K(l("input", {
|
|
271
301
|
type: "checkbox",
|
|
@@ -274,30 +304,30 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
274
304
|
value: u.value,
|
|
275
305
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => s.value = v),
|
|
276
306
|
disabled: u.disabled
|
|
277
|
-
}, null, 8,
|
|
278
|
-
[
|
|
307
|
+
}, null, 8, ul), [
|
|
308
|
+
[ft, s.value]
|
|
279
309
|
]),
|
|
280
|
-
l("span",
|
|
281
|
-
u.icon || u.imgUrl ? (i(), d("span",
|
|
310
|
+
l("span", dl, [
|
|
311
|
+
u.icon || u.imgUrl ? (i(), d("span", cl, [
|
|
282
312
|
u.icon ? (i(), d("i", {
|
|
283
313
|
key: 0,
|
|
284
|
-
class:
|
|
285
|
-
}, null, 2)) :
|
|
314
|
+
class: V(u.icon)
|
|
315
|
+
}, null, 2)) : D("", !0),
|
|
286
316
|
u.imgUrl ? (i(), d("img", {
|
|
287
317
|
key: 1,
|
|
288
318
|
src: u.imgUrl,
|
|
289
319
|
width: "16",
|
|
290
320
|
height: "16",
|
|
291
321
|
alt: "icon"
|
|
292
|
-
}, null, 8,
|
|
293
|
-
])) :
|
|
322
|
+
}, null, 8, pl)) : D("", !0)
|
|
323
|
+
])) : D("", !0),
|
|
294
324
|
$e(u.$slots, "default", {}, () => [
|
|
295
|
-
|
|
325
|
+
fe(T(u.label), 1)
|
|
296
326
|
])
|
|
297
327
|
])
|
|
298
328
|
], 2));
|
|
299
329
|
}
|
|
300
|
-
}),
|
|
330
|
+
}), vl = { class: "flex items-center" }, gt = /* @__PURE__ */ F({
|
|
301
331
|
__name: "vs-input-checkbox-item",
|
|
302
332
|
props: {
|
|
303
333
|
value: { default: "" },
|
|
@@ -314,7 +344,7 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
314
344
|
},
|
|
315
345
|
emits: ["update:modelValue"],
|
|
316
346
|
setup(o, { emit: e }) {
|
|
317
|
-
const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, r =
|
|
347
|
+
const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, r = A({
|
|
318
348
|
get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
|
|
319
349
|
set: (u) => {
|
|
320
350
|
if (Array.isArray(t.modelValue)) {
|
|
@@ -323,9 +353,9 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
323
353
|
} else
|
|
324
354
|
n("update:modelValue", u);
|
|
325
355
|
}
|
|
326
|
-
}), a =
|
|
327
|
-
return (u, c) => (i(), d("div",
|
|
328
|
-
(i(), ae(
|
|
356
|
+
}), a = x(`vs-checkbox-${t.view || "default"}`);
|
|
357
|
+
return (u, c) => (i(), d("div", vl, [
|
|
358
|
+
(i(), ae(Be(a.value === "vs-checkbox-buttons" ? q(fl) : q(il)), {
|
|
329
359
|
value: u.value,
|
|
330
360
|
label: u.label,
|
|
331
361
|
info: u.option?.info,
|
|
@@ -335,17 +365,17 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
335
365
|
id: s,
|
|
336
366
|
icon: u.icon,
|
|
337
367
|
imgUrl: u.imgUrl,
|
|
338
|
-
style:
|
|
368
|
+
style: ye(u.style),
|
|
339
369
|
error: u.error
|
|
340
370
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
|
|
371
|
+
default: Le(() => [
|
|
372
|
+
fe(T(u.label), 1)
|
|
343
373
|
]),
|
|
344
374
|
_: 1
|
|
345
375
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
|
|
346
376
|
]));
|
|
347
377
|
}
|
|
348
|
-
}),
|
|
378
|
+
}), ml = {}, hl = {
|
|
349
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
350
380
|
viewBox: "0 0 24 24",
|
|
351
381
|
fill: "none",
|
|
@@ -355,8 +385,8 @@ const Wt = /* @__PURE__ */ H(Jt, [["render", Zt]]), Qt = { class: "flex items-ce
|
|
|
355
385
|
"stroke-linejoin": "round",
|
|
356
386
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
357
387
|
};
|
|
358
|
-
function
|
|
359
|
-
return i(), d("svg",
|
|
388
|
+
function gl(o, e) {
|
|
389
|
+
return i(), d("svg", hl, e[0] || (e[0] = [
|
|
360
390
|
l("path", {
|
|
361
391
|
stroke: "none",
|
|
362
392
|
d: "M0 0h24v24H0z",
|
|
@@ -365,7 +395,7 @@ function dl(o, e) {
|
|
|
365
395
|
l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
366
396
|
]));
|
|
367
397
|
}
|
|
368
|
-
const
|
|
398
|
+
const bl = /* @__PURE__ */ H(ml, [["render", gl]]), yl = {}, xl = {
|
|
369
399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
370
400
|
viewBox: "0 0 24 24",
|
|
371
401
|
fill: "none",
|
|
@@ -375,8 +405,8 @@ const cl = /* @__PURE__ */ H(il, [["render", dl]]), pl = {}, fl = {
|
|
|
375
405
|
"stroke-linejoin": "round",
|
|
376
406
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
377
407
|
};
|
|
378
|
-
function
|
|
379
|
-
return i(), d("svg",
|
|
408
|
+
function wl(o, e) {
|
|
409
|
+
return i(), d("svg", xl, e[0] || (e[0] = [
|
|
380
410
|
l("path", {
|
|
381
411
|
stroke: "none",
|
|
382
412
|
d: "M0 0h24v24H0z",
|
|
@@ -386,7 +416,7 @@ function vl(o, e) {
|
|
|
386
416
|
l("path", { d: "M6 6l12 12" }, null, -1)
|
|
387
417
|
]));
|
|
388
418
|
}
|
|
389
|
-
const
|
|
419
|
+
const kl = /* @__PURE__ */ H(yl, [["render", wl]]), _l = {}, $l = {
|
|
390
420
|
xmlns: "http://www.w3.org/2000/svg",
|
|
391
421
|
width: "24",
|
|
392
422
|
height: "24",
|
|
@@ -397,8 +427,8 @@ const ml = /* @__PURE__ */ H(pl, [["render", vl]]), hl = {}, gl = {
|
|
|
397
427
|
"stroke-linecap": "round",
|
|
398
428
|
"stroke-linejoin": "round"
|
|
399
429
|
};
|
|
400
|
-
function
|
|
401
|
-
return i(), d("svg",
|
|
430
|
+
function Cl(o, e) {
|
|
431
|
+
return i(), d("svg", $l, e[0] || (e[0] = [
|
|
402
432
|
l("path", {
|
|
403
433
|
stroke: "none",
|
|
404
434
|
d: "M0 0h24v24H0z",
|
|
@@ -409,15 +439,15 @@ function bl(o, e) {
|
|
|
409
439
|
l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
|
|
410
440
|
]));
|
|
411
441
|
}
|
|
412
|
-
const
|
|
442
|
+
const Vl = /* @__PURE__ */ H(_l, [["render", Cl]]), Ml = {
|
|
413
443
|
key: 0,
|
|
414
444
|
class: "flex items-start gap-x-1"
|
|
415
|
-
},
|
|
445
|
+
}, Ll = {
|
|
416
446
|
key: 0,
|
|
417
447
|
class: "text-red-500 text-[14px]"
|
|
418
|
-
},
|
|
448
|
+
}, Sl = ["title"], Bl = ["disabled"], bt = /* @__PURE__ */ F({
|
|
419
449
|
__name: "vs-input-switcher",
|
|
420
|
-
props: /* @__PURE__ */
|
|
450
|
+
props: /* @__PURE__ */ Z({
|
|
421
451
|
rules: { default: () => [] },
|
|
422
452
|
view: { default: "checkbox" },
|
|
423
453
|
label: { default: "" },
|
|
@@ -436,15 +466,15 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
436
466
|
}),
|
|
437
467
|
emits: ["update:modelValue"],
|
|
438
468
|
setup(o) {
|
|
439
|
-
const e = o, t =
|
|
440
|
-
return (n, s) => e.view === "checkbox" ? (i(), d("div",
|
|
441
|
-
|
|
469
|
+
const e = o, t = W(o, "modelValue");
|
|
470
|
+
return (n, s) => e.view === "checkbox" ? (i(), d("div", Ml, [
|
|
471
|
+
B(gt, {
|
|
442
472
|
modelValue: t.value,
|
|
443
473
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r),
|
|
444
474
|
label: n.text,
|
|
445
475
|
error: n.error || ""
|
|
446
476
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
447
|
-
n.rules?.includes("required") ? (i(), d("span",
|
|
477
|
+
n.rules?.includes("required") ? (i(), d("span", Ll, "*")) : D("", !0),
|
|
448
478
|
n.i ? (i(), d("button", {
|
|
449
479
|
key: 1,
|
|
450
480
|
class: "cursor-pointer",
|
|
@@ -452,22 +482,22 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
452
482
|
onClick: s[1] || (s[1] = ve(() => {
|
|
453
483
|
}, ["prevent"]))
|
|
454
484
|
}, [
|
|
455
|
-
|
|
456
|
-
], 8,
|
|
485
|
+
B(q(Vl), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
486
|
+
], 8, Sl)) : D("", !0)
|
|
457
487
|
])) : (i(), d("button", {
|
|
458
488
|
key: 1,
|
|
459
489
|
type: "button",
|
|
460
|
-
class:
|
|
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]]),
|
|
461
491
|
disabled: n.disabled,
|
|
462
492
|
onClick: s[2] || (s[2] = (r) => t.value = !t.value)
|
|
463
493
|
}, [
|
|
464
494
|
l("span", {
|
|
465
495
|
"data-state": "checked",
|
|
466
|
-
class:
|
|
496
|
+
class: V(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
|
|
467
497
|
}, null, 2)
|
|
468
|
-
], 10,
|
|
498
|
+
], 10, Bl));
|
|
469
499
|
}
|
|
470
|
-
}),
|
|
500
|
+
}), jl = ["innerHTML"], nt = /* @__PURE__ */ F({
|
|
471
501
|
__name: "vs-input-static",
|
|
472
502
|
props: {
|
|
473
503
|
text: { default: "" },
|
|
@@ -482,13 +512,13 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
482
512
|
},
|
|
483
513
|
setup(o) {
|
|
484
514
|
return (e, t) => (i(), d("div", {
|
|
485
|
-
class:
|
|
515
|
+
class: V(e.customClass),
|
|
486
516
|
innerHTML: e.html ? e.html : e.text
|
|
487
|
-
}, null, 10,
|
|
517
|
+
}, null, 10, jl));
|
|
488
518
|
}
|
|
489
|
-
}),
|
|
519
|
+
}), Il = ["placeholder", "disabled", "name"], zl = /* @__PURE__ */ F({
|
|
490
520
|
__name: "vs-input-mask",
|
|
491
|
-
props: /* @__PURE__ */
|
|
521
|
+
props: /* @__PURE__ */ Z({
|
|
492
522
|
name: {},
|
|
493
523
|
mask: { default: "" },
|
|
494
524
|
unmask: { type: Boolean, default: !1 },
|
|
@@ -504,9 +534,9 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
504
534
|
}),
|
|
505
535
|
emits: ["update:modelValue"],
|
|
506
536
|
setup(o) {
|
|
507
|
-
const e = o, { inputClass: t } =
|
|
537
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue"), s = x(null);
|
|
508
538
|
let r = null;
|
|
509
|
-
return
|
|
539
|
+
return xe(async () => {
|
|
510
540
|
if (s.value) {
|
|
511
541
|
const { default: a } = await import("./index-W-qQIppj.js");
|
|
512
542
|
r = a(s.value, {
|
|
@@ -523,7 +553,7 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
523
553
|
n.value = e.unmask ? r.unmaskedValue : r.value;
|
|
524
554
|
}), r.value = n.value ?? "";
|
|
525
555
|
}
|
|
526
|
-
}),
|
|
556
|
+
}), St(() => {
|
|
527
557
|
r?.destroy();
|
|
528
558
|
}), te(() => e.mask, (a) => {
|
|
529
559
|
r && r.updateOptions({
|
|
@@ -543,15 +573,15 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
543
573
|
placeholder: a.placeholder,
|
|
544
574
|
disabled: a.disabled,
|
|
545
575
|
name: a.name,
|
|
546
|
-
class:
|
|
576
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t)]]),
|
|
547
577
|
style: {
|
|
548
578
|
border: "1px solid #CFD9E0"
|
|
549
579
|
}
|
|
550
|
-
}, null, 10,
|
|
580
|
+
}, null, 10, Il));
|
|
551
581
|
}
|
|
552
|
-
}),
|
|
582
|
+
}), El = { class: "relative w-full bg-white rounded-lg" }, Fl = ["placeholder", "disabled"], Dl = /* @__PURE__ */ F({
|
|
553
583
|
__name: "vs-input-email",
|
|
554
|
-
props: /* @__PURE__ */
|
|
584
|
+
props: /* @__PURE__ */ Z({
|
|
555
585
|
style: { default: () => ({}) },
|
|
556
586
|
customClass: { default: "" },
|
|
557
587
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -565,26 +595,26 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
565
595
|
}),
|
|
566
596
|
emits: ["update:modelValue"],
|
|
567
597
|
setup(o) {
|
|
568
|
-
const e = o, { inputClass: t } =
|
|
569
|
-
return (s, r) => (i(), d("div",
|
|
570
|
-
r[1] || (r[1] =
|
|
598
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
599
|
+
return (s, r) => (i(), d("div", El, [
|
|
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)),
|
|
571
601
|
K(l("input", {
|
|
572
602
|
type: "email",
|
|
573
603
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
574
604
|
placeholder: s.placeholder,
|
|
575
605
|
disabled: s.disabled,
|
|
576
|
-
class:
|
|
606
|
+
class: V(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
|
|
577
607
|
style: {
|
|
578
608
|
border: "1px solid #CFD9E0"
|
|
579
609
|
}
|
|
580
|
-
}, null, 10,
|
|
581
|
-
[
|
|
610
|
+
}, null, 10, Fl), [
|
|
611
|
+
[se, n.value]
|
|
582
612
|
])
|
|
583
613
|
]));
|
|
584
614
|
}
|
|
585
|
-
}),
|
|
615
|
+
}), Ol = ["value", "disabled"], Al = { class: "text-[13px] text-gray-700" }, Ul = /* @__PURE__ */ F({
|
|
586
616
|
__name: "vs-input-radio-default",
|
|
587
|
-
props: /* @__PURE__ */
|
|
617
|
+
props: /* @__PURE__ */ Z({
|
|
588
618
|
style: {},
|
|
589
619
|
customClass: { default: "" },
|
|
590
620
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -600,9 +630,9 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
600
630
|
}),
|
|
601
631
|
emits: ["update:modelValue"],
|
|
602
632
|
setup(o) {
|
|
603
|
-
const e =
|
|
633
|
+
const e = W(o, "modelValue");
|
|
604
634
|
return (t, n) => (i(), d("label", {
|
|
605
|
-
class:
|
|
635
|
+
class: V(["flex items-center gap-0", [t.customClass]])
|
|
606
636
|
}, [
|
|
607
637
|
K(l("input", {
|
|
608
638
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
|
|
@@ -610,26 +640,26 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
610
640
|
value: t.value,
|
|
611
641
|
disabled: t.disabled,
|
|
612
642
|
class: "hidden"
|
|
613
|
-
}, null, 8,
|
|
614
|
-
[
|
|
643
|
+
}, null, 8, Ol), [
|
|
644
|
+
[vt, e.value]
|
|
615
645
|
]),
|
|
616
646
|
l("span", {
|
|
617
|
-
class:
|
|
647
|
+
class: V(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
|
|
618
648
|
`border-${t.style?.primaryColor || "blue"}-500`,
|
|
619
649
|
t.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
620
650
|
]])
|
|
621
651
|
}, [
|
|
622
652
|
e.value == t.value ? (i(), d("span", {
|
|
623
653
|
key: 0,
|
|
624
|
-
class:
|
|
625
|
-
}, null, 2)) :
|
|
654
|
+
class: V(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
|
|
655
|
+
}, null, 2)) : D("", !0)
|
|
626
656
|
], 2),
|
|
627
|
-
l("span",
|
|
657
|
+
l("span", Al, T(t.text), 1)
|
|
628
658
|
], 2));
|
|
629
659
|
}
|
|
630
|
-
}),
|
|
660
|
+
}), Tl = ["value", "disabled"], Rl = { class: "text-[13px] text-gray-700" }, Pl = /* @__PURE__ */ F({
|
|
631
661
|
__name: "vs-input-radio-buttons",
|
|
632
|
-
props: /* @__PURE__ */
|
|
662
|
+
props: /* @__PURE__ */ Z({
|
|
633
663
|
style: {},
|
|
634
664
|
customClass: { default: "" },
|
|
635
665
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -645,9 +675,9 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
645
675
|
}),
|
|
646
676
|
emits: ["update:modelValue"],
|
|
647
677
|
setup(o) {
|
|
648
|
-
const e =
|
|
678
|
+
const e = W(o, "modelValue");
|
|
649
679
|
return (t, n) => (i(), d("label", {
|
|
650
|
-
class:
|
|
680
|
+
class: V(["flex items-center border rounded-lg px-2 py-1", [
|
|
651
681
|
e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
|
|
652
682
|
t.customClass
|
|
653
683
|
]])
|
|
@@ -658,18 +688,18 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
658
688
|
value: t.value,
|
|
659
689
|
disabled: t.disabled,
|
|
660
690
|
class: "hidden"
|
|
661
|
-
}, null, 8,
|
|
662
|
-
[
|
|
691
|
+
}, null, 8, Tl), [
|
|
692
|
+
[vt, e.value]
|
|
663
693
|
]),
|
|
664
|
-
l("span",
|
|
694
|
+
l("span", Rl, T(t.text), 1)
|
|
665
695
|
], 2));
|
|
666
696
|
}
|
|
667
|
-
}),
|
|
668
|
-
"vs-input-radio-default":
|
|
669
|
-
"vs-input-radio-buttons":
|
|
670
|
-
},
|
|
697
|
+
}), Hl = {
|
|
698
|
+
"vs-input-radio-default": Ul,
|
|
699
|
+
"vs-input-radio-buttons": Pl
|
|
700
|
+
}, rt = /* @__PURE__ */ F({
|
|
671
701
|
__name: "vs-input-radio",
|
|
672
|
-
props: /* @__PURE__ */
|
|
702
|
+
props: /* @__PURE__ */ Z({
|
|
673
703
|
options: {},
|
|
674
704
|
position: { default: "vertical" },
|
|
675
705
|
view: { default: "default" },
|
|
@@ -686,11 +716,11 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
686
716
|
}),
|
|
687
717
|
emits: ["update:modelValue"],
|
|
688
718
|
setup(o) {
|
|
689
|
-
const e = o, t =
|
|
719
|
+
const e = o, t = W(o, "modelValue"), n = A(() => Hl[`vs-input-radio-${e.view}`]);
|
|
690
720
|
return (s, r) => (i(), d("div", {
|
|
691
|
-
class:
|
|
721
|
+
class: V([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
692
722
|
}, [
|
|
693
|
-
(i(!0), d(Y, null, le(s.options, (a) => (i(), ae(
|
|
723
|
+
(i(!0), d(Y, null, le(s.options, (a) => (i(), ae(Be(n.value), Ee({
|
|
694
724
|
key: a?.id,
|
|
695
725
|
text: a.text,
|
|
696
726
|
value: a.id.toString(),
|
|
@@ -700,7 +730,7 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
700
730
|
}, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
701
731
|
], 2));
|
|
702
732
|
}
|
|
703
|
-
}),
|
|
733
|
+
}), Nl = /* @__PURE__ */ F({
|
|
704
734
|
__name: "vs-input-checkbox",
|
|
705
735
|
props: {
|
|
706
736
|
options: { default: () => [] },
|
|
@@ -719,9 +749,9 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
719
749
|
},
|
|
720
750
|
emits: ["update:modelValue"],
|
|
721
751
|
setup(o, { emit: e }) {
|
|
722
|
-
const t = o, n = e, s =
|
|
752
|
+
const t = o, n = e, s = x([]), r = Bt({}), a = (p) => p?.value || p?.id || p?.text || p, u = (p) => p.text || String(p), c = (p) => `lg:col-span-${p || 12}`, v = async () => {
|
|
723
753
|
try {
|
|
724
|
-
const p = await fetch(`/api/suggest/${t.data}`).then((
|
|
754
|
+
const p = await fetch(`/api/suggest/${t.data}`).then((w) => w.json());
|
|
725
755
|
s.value = p?.data || p;
|
|
726
756
|
} catch (p) {
|
|
727
757
|
console.error(p);
|
|
@@ -731,14 +761,14 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
731
761
|
() => t.modelValue,
|
|
732
762
|
(p) => {
|
|
733
763
|
if (typeof p == "boolean" && s.value.length === 1) {
|
|
734
|
-
const
|
|
735
|
-
r[
|
|
764
|
+
const w = a(s.value[0]);
|
|
765
|
+
r[w] = p;
|
|
736
766
|
} else if (Array.isArray(p)) {
|
|
737
|
-
const
|
|
738
|
-
s.value.forEach((
|
|
739
|
-
if (!
|
|
740
|
-
const
|
|
741
|
-
r[
|
|
767
|
+
const w = new Set(p);
|
|
768
|
+
s.value.forEach((b) => {
|
|
769
|
+
if (!b.disabled) {
|
|
770
|
+
const $ = a(b);
|
|
771
|
+
r[$] = w.has($);
|
|
742
772
|
}
|
|
743
773
|
});
|
|
744
774
|
}
|
|
@@ -751,11 +781,11 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
751
781
|
n("update:modelValue", null);
|
|
752
782
|
return;
|
|
753
783
|
}
|
|
754
|
-
const p = Object.entries(r).filter(([,
|
|
784
|
+
const p = Object.entries(r).filter(([, w]) => w).map(([w]) => w);
|
|
755
785
|
n("update:modelValue", p.length === 0 ? [] : p);
|
|
756
786
|
},
|
|
757
787
|
{ deep: !0 }
|
|
758
|
-
),
|
|
788
|
+
), xe(() => {
|
|
759
789
|
if (t.data)
|
|
760
790
|
v().then(() => {
|
|
761
791
|
if (typeof t.modelValue == "boolean" && s.value.length === 1) {
|
|
@@ -763,10 +793,10 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
763
793
|
r[p] = t.modelValue;
|
|
764
794
|
} else if (Array.isArray(t.modelValue)) {
|
|
765
795
|
const p = new Set(t.modelValue);
|
|
766
|
-
s.value.forEach((
|
|
767
|
-
if (!
|
|
768
|
-
const
|
|
769
|
-
r[
|
|
796
|
+
s.value.forEach((w) => {
|
|
797
|
+
if (!w.disabled) {
|
|
798
|
+
const b = a(w);
|
|
799
|
+
r[b] = p.has(b);
|
|
770
800
|
}
|
|
771
801
|
});
|
|
772
802
|
}
|
|
@@ -776,32 +806,32 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
776
806
|
r[p] = t.modelValue;
|
|
777
807
|
} else if (Array.isArray(t.modelValue)) {
|
|
778
808
|
const p = new Set(t.modelValue);
|
|
779
|
-
s.value.forEach((
|
|
780
|
-
if (!
|
|
781
|
-
const
|
|
782
|
-
r[
|
|
809
|
+
s.value.forEach((w) => {
|
|
810
|
+
if (!w.disabled) {
|
|
811
|
+
const b = a(w);
|
|
812
|
+
r[b] = p.has(b);
|
|
783
813
|
}
|
|
784
814
|
});
|
|
785
815
|
}
|
|
786
|
-
}), (p,
|
|
787
|
-
class:
|
|
816
|
+
}), (p, w) => (i(), d("div", {
|
|
817
|
+
class: V(["p-0 w-full gap-[6px]", [p.position === "vertical" ? "flex-col" : "", p.colSpan ? "grid" : "flex justify-start"]])
|
|
788
818
|
}, [
|
|
789
|
-
(i(!0), d(Y, null, le(s.value, (
|
|
790
|
-
modelValue: r[a(
|
|
791
|
-
"onUpdate:modelValue": (
|
|
792
|
-
value: a(
|
|
793
|
-
class:
|
|
794
|
-
disabled:
|
|
795
|
-
label: u(
|
|
796
|
-
key: a(
|
|
797
|
-
icon:
|
|
798
|
-
imgUrl:
|
|
799
|
-
option:
|
|
819
|
+
(i(!0), d(Y, null, le(s.value, (b) => (i(), ae(gt, {
|
|
820
|
+
modelValue: r[a(b)],
|
|
821
|
+
"onUpdate:modelValue": ($) => r[a(b)] = $,
|
|
822
|
+
value: a(b),
|
|
823
|
+
class: V(c(p.colSpan)),
|
|
824
|
+
disabled: b.disabled,
|
|
825
|
+
label: u(b),
|
|
826
|
+
key: a(b),
|
|
827
|
+
icon: b?.icon,
|
|
828
|
+
imgUrl: b?.imgUrl,
|
|
829
|
+
option: b,
|
|
800
830
|
view: p.view
|
|
801
831
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
802
832
|
], 2));
|
|
803
833
|
}
|
|
804
|
-
}),
|
|
834
|
+
}), ql = /* @__PURE__ */ H(Nl, [["__scopeId", "data-v-91f3584a"]]), Gl = ["type", "placeholder", "disabled"], Jl = /* @__PURE__ */ F({
|
|
805
835
|
__name: "vs-input-date1",
|
|
806
836
|
props: {
|
|
807
837
|
style: { default: () => ({}) },
|
|
@@ -815,27 +845,25 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
815
845
|
},
|
|
816
846
|
emits: ["update:modelValue"],
|
|
817
847
|
setup(o, { emit: e }) {
|
|
818
|
-
const t = o
|
|
819
|
-
console.log(t.mode);
|
|
820
|
-
const { inputClass: n } = ye(t.style), s = e, r = O({
|
|
848
|
+
const t = o, { inputClass: n } = me(t.style), s = e, r = A({
|
|
821
849
|
get: () => t.modelValue?.split(" ")[0],
|
|
822
850
|
set: (u) => s("update:modelValue", u)
|
|
823
|
-
}), a =
|
|
851
|
+
}), a = A(() => t.mode === "datetime" ? "datetime-local" : t.mode);
|
|
824
852
|
return (u, c) => K((i(), d("input", {
|
|
825
853
|
type: a.value,
|
|
826
854
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => r.value = v),
|
|
827
855
|
placeholder: u.placeholder,
|
|
828
856
|
disabled: u.disabled,
|
|
829
857
|
ref: "date",
|
|
830
|
-
class:
|
|
858
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [u.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
|
|
831
859
|
style: {
|
|
832
860
|
border: "1px solid #CFD9E0"
|
|
833
861
|
}
|
|
834
|
-
}, null, 10,
|
|
835
|
-
[
|
|
862
|
+
}, null, 10, Gl)), [
|
|
863
|
+
[jt, r.value]
|
|
836
864
|
]);
|
|
837
865
|
}
|
|
838
|
-
}),
|
|
866
|
+
}), Kl = async (o, e, t, n) => {
|
|
839
867
|
try {
|
|
840
868
|
const s = new FormData();
|
|
841
869
|
return s.append("unique", "true"), s.append("file", o), (await fetch(
|
|
@@ -846,27 +874,27 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
846
874
|
}
|
|
847
875
|
).then((a) => a.json()))?.result;
|
|
848
876
|
} catch (s) {
|
|
849
|
-
return
|
|
877
|
+
return be({
|
|
850
878
|
type: "error",
|
|
851
879
|
title: "Помилка!",
|
|
852
880
|
message: "Сталась помилка під час завантаження файлу",
|
|
853
881
|
position: "right-bottom"
|
|
854
882
|
}), console.error("Сталась помилка завантаження файлу", s), null;
|
|
855
883
|
}
|
|
856
|
-
},
|
|
884
|
+
}, Zl = async (o) => {
|
|
857
885
|
try {
|
|
858
886
|
return await fetch(`file/delete${o}`), !0;
|
|
859
887
|
} catch (e) {
|
|
860
888
|
return console.error(e), !1;
|
|
861
889
|
}
|
|
862
|
-
},
|
|
890
|
+
}, it = async (o) => {
|
|
863
891
|
try {
|
|
864
892
|
const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), n = e.headers["content-type"], s = new TextDecoder("utf-8").decode(t), r = new Blob([s], { type: n }), a = document.createElement("a");
|
|
865
893
|
a.setAttribute("download", o), a.href = window.URL.createObjectURL(r), a.click();
|
|
866
894
|
} catch (e) {
|
|
867
895
|
console.error(e.message);
|
|
868
896
|
}
|
|
869
|
-
},
|
|
897
|
+
}, Wl = {}, Ql = {
|
|
870
898
|
xmlns: "http://www.w3.org/2000/svg",
|
|
871
899
|
width: "24",
|
|
872
900
|
height: "24",
|
|
@@ -877,13 +905,13 @@ const yl = /* @__PURE__ */ H(hl, [["render", bl]]), xl = {
|
|
|
877
905
|
"stroke-linecap": "round",
|
|
878
906
|
"stroke-linejoin": "round"
|
|
879
907
|
};
|
|
880
|
-
function
|
|
881
|
-
return i(), d("svg",
|
|
908
|
+
function Xl(o, e) {
|
|
909
|
+
return i(), d("svg", Ql, e[0] || (e[0] = [
|
|
882
910
|
l("path", { d: "M5 12h14" }, null, -1),
|
|
883
911
|
l("path", { d: "M12 5v14" }, null, -1)
|
|
884
912
|
]));
|
|
885
913
|
}
|
|
886
|
-
const
|
|
914
|
+
const Fe = /* @__PURE__ */ H(Wl, [["render", Xl]]), Yl = {}, eo = {
|
|
887
915
|
xmlns: "http://www.w3.org/2000/svg",
|
|
888
916
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
889
917
|
width: "44",
|
|
@@ -895,12 +923,12 @@ const Ae = /* @__PURE__ */ H(Hl, [["render", ql]]), Gl = {}, Jl = {
|
|
|
895
923
|
"stroke-linecap": "round",
|
|
896
924
|
"stroke-linejoin": "round"
|
|
897
925
|
};
|
|
898
|
-
function
|
|
899
|
-
return i(), d("svg",
|
|
900
|
-
|
|
926
|
+
function to(o, e, t, n, s, r) {
|
|
927
|
+
return i(), d("svg", eo, e[0] || (e[0] = [
|
|
928
|
+
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)
|
|
901
929
|
]));
|
|
902
930
|
}
|
|
903
|
-
const
|
|
931
|
+
const lo = /* @__PURE__ */ H(Yl, [["render", to]]), oo = {}, ao = {
|
|
904
932
|
xmlns: "http://www.w3.org/2000/svg",
|
|
905
933
|
class: "icon icon-tabler icon-tabler-table",
|
|
906
934
|
width: "44",
|
|
@@ -912,8 +940,8 @@ const Zl = /* @__PURE__ */ H(Gl, [["render", Kl]]), Wl = {}, Ql = {
|
|
|
912
940
|
"stroke-linecap": "round",
|
|
913
941
|
"stroke-linejoin": "round"
|
|
914
942
|
};
|
|
915
|
-
function
|
|
916
|
-
return i(), d("svg",
|
|
943
|
+
function so(o, e, t, n, s, r) {
|
|
944
|
+
return i(), d("svg", ao, e[0] || (e[0] = [
|
|
917
945
|
l("path", {
|
|
918
946
|
stroke: "none",
|
|
919
947
|
d: "M0 0h24v24H0z",
|
|
@@ -940,7 +968,7 @@ function Xl(o, e, t, n, s, r) {
|
|
|
940
968
|
}, null, -1)
|
|
941
969
|
]));
|
|
942
970
|
}
|
|
943
|
-
const
|
|
971
|
+
const no = /* @__PURE__ */ H(oo, [["render", so]]), ro = {}, io = {
|
|
944
972
|
xmlns: "http://www.w3.org/2000/svg",
|
|
945
973
|
width: "24",
|
|
946
974
|
height: "24",
|
|
@@ -952,12 +980,12 @@ const Yl = /* @__PURE__ */ H(Wl, [["render", Xl]]), eo = {}, to = {
|
|
|
952
980
|
"stroke-linejoin": "round",
|
|
953
981
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
|
|
954
982
|
};
|
|
955
|
-
function
|
|
956
|
-
return i(), d("svg",
|
|
957
|
-
|
|
983
|
+
function uo(o, e, t, n, s, r) {
|
|
984
|
+
return i(), d("svg", io, e[0] || (e[0] = [
|
|
985
|
+
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)
|
|
958
986
|
]));
|
|
959
987
|
}
|
|
960
|
-
const
|
|
988
|
+
const co = /* @__PURE__ */ H(ro, [["render", uo]]), po = {}, fo = {
|
|
961
989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
962
990
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
963
991
|
width: "44",
|
|
@@ -969,12 +997,12 @@ const oo = /* @__PURE__ */ H(eo, [["render", lo]]), ao = {}, so = {
|
|
|
969
997
|
"stroke-linecap": "round",
|
|
970
998
|
"stroke-linejoin": "round"
|
|
971
999
|
};
|
|
972
|
-
function
|
|
973
|
-
return i(), d("svg",
|
|
974
|
-
|
|
1000
|
+
function vo(o, e, t, n, s, r) {
|
|
1001
|
+
return i(), d("svg", fo, e[0] || (e[0] = [
|
|
1002
|
+
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)
|
|
975
1003
|
]));
|
|
976
1004
|
}
|
|
977
|
-
const
|
|
1005
|
+
const mo = /* @__PURE__ */ H(po, [["render", vo]]), ho = {}, go = {
|
|
978
1006
|
xmlns: "http://www.w3.org/2000/svg",
|
|
979
1007
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
980
1008
|
width: "44",
|
|
@@ -986,25 +1014,25 @@ const ro = /* @__PURE__ */ H(ao, [["render", no]]), io = {}, uo = {
|
|
|
986
1014
|
"stroke-linecap": "round",
|
|
987
1015
|
"stroke-linejoin": "round"
|
|
988
1016
|
};
|
|
989
|
-
function
|
|
990
|
-
return i(), d("svg",
|
|
991
|
-
|
|
1017
|
+
function bo(o, e, t, n, s, r) {
|
|
1018
|
+
return i(), d("svg", go, e[0] || (e[0] = [
|
|
1019
|
+
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)
|
|
992
1020
|
]));
|
|
993
1021
|
}
|
|
994
|
-
const
|
|
1022
|
+
const yo = /* @__PURE__ */ H(ho, [["render", bo]]), xo = (o) => {
|
|
995
1023
|
if (!o) return "";
|
|
996
1024
|
const e = o?.split(".");
|
|
997
1025
|
return e[e.length - 1];
|
|
998
|
-
},
|
|
999
|
-
const e =
|
|
1026
|
+
}, wo = (o) => {
|
|
1027
|
+
const e = xo(o), t = {
|
|
1000
1028
|
imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
|
|
1001
1029
|
sheetsFormat: ["xls", "csv", "xlsx"],
|
|
1002
1030
|
archivesFormat: ["zip", "rar"],
|
|
1003
1031
|
textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
|
|
1004
1032
|
documentsFormat: ["pdf"]
|
|
1005
1033
|
};
|
|
1006
|
-
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ?
|
|
1007
|
-
},
|
|
1034
|
+
return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? no : t.textsFormat.includes(e) ? yo : t.documentsFormat.includes(e) ? lo : t.archivesFormat.includes(e) ? mo : co;
|
|
1035
|
+
}, ko = {}, _o = {
|
|
1008
1036
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1009
1037
|
width: "24",
|
|
1010
1038
|
height: "24",
|
|
@@ -1016,12 +1044,12 @@ const po = /* @__PURE__ */ H(io, [["render", co]]), fo = (o) => {
|
|
|
1016
1044
|
"stroke-linejoin": "round",
|
|
1017
1045
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
1018
1046
|
};
|
|
1019
|
-
function
|
|
1020
|
-
return i(), d("svg",
|
|
1021
|
-
|
|
1047
|
+
function $o(o, e) {
|
|
1048
|
+
return i(), d("svg", _o, e[0] || (e[0] = [
|
|
1049
|
+
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)
|
|
1022
1050
|
]));
|
|
1023
1051
|
}
|
|
1024
|
-
const
|
|
1052
|
+
const Te = /* @__PURE__ */ H(ko, [["render", $o]]), Co = {}, Vo = {
|
|
1025
1053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1026
1054
|
width: "24",
|
|
1027
1055
|
height: "24",
|
|
@@ -1033,8 +1061,8 @@ const Ue = /* @__PURE__ */ H(mo, [["render", go]]), bo = {}, yo = {
|
|
|
1033
1061
|
"stroke-linejoin": "round",
|
|
1034
1062
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1035
1063
|
};
|
|
1036
|
-
function
|
|
1037
|
-
return i(), d("svg",
|
|
1064
|
+
function Mo(o, e) {
|
|
1065
|
+
return i(), d("svg", Vo, e[0] || (e[0] = [
|
|
1038
1066
|
l("path", {
|
|
1039
1067
|
stroke: "none",
|
|
1040
1068
|
d: "M0 0h24v24H0z",
|
|
@@ -1045,9 +1073,9 @@ function xo(o, e) {
|
|
|
1045
1073
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1046
1074
|
]));
|
|
1047
1075
|
}
|
|
1048
|
-
const
|
|
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__ */ F({
|
|
1049
1077
|
__name: "vs-input-file-list-item",
|
|
1050
|
-
props: /* @__PURE__ */
|
|
1078
|
+
props: /* @__PURE__ */ Z({
|
|
1051
1079
|
format: {},
|
|
1052
1080
|
multiple: { type: Boolean },
|
|
1053
1081
|
style: {},
|
|
@@ -1065,40 +1093,40 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1065
1093
|
}),
|
|
1066
1094
|
emits: ["update:value", "update:item"],
|
|
1067
1095
|
setup(o) {
|
|
1068
|
-
const e =
|
|
1069
|
-
return (s, r) => (i(), d("div",
|
|
1070
|
-
(i(), ae(
|
|
1096
|
+
const e = W(o, "value"), t = W(o, "item"), n = o;
|
|
1097
|
+
return (s, r) => (i(), d("div", Lo, [
|
|
1098
|
+
(i(), ae(Be(q(wo)(t.value)), {
|
|
1071
1099
|
src: t.value,
|
|
1072
1100
|
alt: "file",
|
|
1073
1101
|
class: "w-full h-full object-cover cursor-pointer",
|
|
1074
|
-
onClick: r[0] || (r[0] = (a) => q(
|
|
1102
|
+
onClick: r[0] || (r[0] = (a) => q(it)(t.value))
|
|
1075
1103
|
}, null, 8, ["src"])),
|
|
1076
|
-
l("div",
|
|
1104
|
+
l("div", So, [
|
|
1077
1105
|
l("button", {
|
|
1078
1106
|
type: "button",
|
|
1079
1107
|
onClick: r[1] || (r[1] = (a) => {
|
|
1080
|
-
q(
|
|
1108
|
+
q(Zl)(t.value), e.value = n.multiple ? e.value?.filter((u) => u !== t.value) : "";
|
|
1081
1109
|
}),
|
|
1082
1110
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1083
1111
|
}, [
|
|
1084
|
-
|
|
1112
|
+
B(Te, { class: "w-4 h-4" })
|
|
1085
1113
|
]),
|
|
1086
1114
|
l("button", {
|
|
1087
1115
|
type: "button",
|
|
1088
|
-
onClick: r[2] || (r[2] = (a) => q(
|
|
1116
|
+
onClick: r[2] || (r[2] = (a) => q(it)(t.value)),
|
|
1089
1117
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
1090
1118
|
}, [
|
|
1091
|
-
|
|
1119
|
+
B(yt, { class: "w-4 h-4" })
|
|
1092
1120
|
])
|
|
1093
1121
|
])
|
|
1094
1122
|
]));
|
|
1095
1123
|
}
|
|
1096
|
-
}),
|
|
1124
|
+
}), ut = /* @__PURE__ */ H(Bo, [["__scopeId", "data-v-0ca886b3"]]), jo = { class: "flex items-center gap-x-2" }, Io = {
|
|
1097
1125
|
key: 1,
|
|
1098
1126
|
class: "flex items-center flex-wrap gap-2"
|
|
1099
|
-
},
|
|
1127
|
+
}, zo = /* @__PURE__ */ F({
|
|
1100
1128
|
__name: "vs-input-file",
|
|
1101
|
-
props: /* @__PURE__ */
|
|
1129
|
+
props: /* @__PURE__ */ Z({
|
|
1102
1130
|
format: {},
|
|
1103
1131
|
multiple: { type: Boolean },
|
|
1104
1132
|
style: {},
|
|
@@ -1114,7 +1142,7 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1114
1142
|
}),
|
|
1115
1143
|
emits: ["update:modelValue"],
|
|
1116
1144
|
setup(o) {
|
|
1117
|
-
const e = o, t =
|
|
1145
|
+
const e = o, t = W(o, "modelValue"), n = x(null), s = (a) => Array.isArray(t.value) && t.value[a] || "", r = async (a) => {
|
|
1118
1146
|
if (e.format) {
|
|
1119
1147
|
const v = a.target.files?.[0];
|
|
1120
1148
|
if (!v || !v.name.endsWith(e.format))
|
|
@@ -1122,10 +1150,10 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1122
1150
|
}
|
|
1123
1151
|
const u = a.target.files?.[0];
|
|
1124
1152
|
if (!u) return;
|
|
1125
|
-
const c = await
|
|
1153
|
+
const c = await Kl(u, "1", "form", "table");
|
|
1126
1154
|
t.value = e.multiple ? [...t.value || [], c?.file_path] : c?.file_path;
|
|
1127
1155
|
};
|
|
1128
|
-
return (a, u) => (i(), d("div",
|
|
1156
|
+
return (a, u) => (i(), d("div", jo, [
|
|
1129
1157
|
l("input", {
|
|
1130
1158
|
class: "hidden",
|
|
1131
1159
|
ref_key: "fileInput",
|
|
@@ -1133,14 +1161,14 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1133
1161
|
type: "file",
|
|
1134
1162
|
onChange: r
|
|
1135
1163
|
}, null, 544),
|
|
1136
|
-
!a.multiple && t.value ? (i(), ae(
|
|
1164
|
+
!a.multiple && t.value ? (i(), ae(ut, {
|
|
1137
1165
|
key: 0,
|
|
1138
1166
|
item: t.value,
|
|
1139
1167
|
"onUpdate:item": u[0] || (u[0] = (c) => t.value = c),
|
|
1140
1168
|
value: t.value,
|
|
1141
1169
|
"onUpdate:value": u[1] || (u[1] = (c) => t.value = c)
|
|
1142
|
-
}, null, 8, ["item", "value"])) : a.multiple ? (i(), d("div",
|
|
1143
|
-
(i(!0), d(Y, null, le(t.value, (c, v) => (i(), ae(
|
|
1170
|
+
}, null, 8, ["item", "value"])) : a.multiple ? (i(), d("div", Io, [
|
|
1171
|
+
(i(!0), d(Y, null, le(t.value, (c, v) => (i(), ae(ut, {
|
|
1144
1172
|
multiple: a.multiple,
|
|
1145
1173
|
key: v,
|
|
1146
1174
|
value: t.value,
|
|
@@ -1149,30 +1177,30 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1149
1177
|
}, null, 8, ["multiple", "value", "item"]))), 128)),
|
|
1150
1178
|
l("div", {
|
|
1151
1179
|
onClick: u[3] || (u[3] = (c) => !a.disabled && n.value?.click()),
|
|
1152
|
-
class:
|
|
1180
|
+
class: V([
|
|
1153
1181
|
"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",
|
|
1154
1182
|
a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
|
|
1155
1183
|
])
|
|
1156
1184
|
}, [
|
|
1157
|
-
|
|
1185
|
+
B(Fe, { class: "w-6 h-6" })
|
|
1158
1186
|
], 2)
|
|
1159
|
-
])) :
|
|
1160
|
-
a.multiple ?
|
|
1187
|
+
])) : D("", !0),
|
|
1188
|
+
a.multiple ? D("", !0) : (i(), d("div", {
|
|
1161
1189
|
key: 2,
|
|
1162
1190
|
onClick: u[4] || (u[4] = (c) => n.value?.click()),
|
|
1163
|
-
class:
|
|
1191
|
+
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"])
|
|
1164
1192
|
}, [
|
|
1165
|
-
|
|
1193
|
+
B(Fe, { class: "w-6 h-6" })
|
|
1166
1194
|
], 2))
|
|
1167
1195
|
]));
|
|
1168
1196
|
}
|
|
1169
|
-
}),
|
|
1197
|
+
}), Eo = { class: "max-w-[55vw]" }, Fo = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, Do = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, Oo = { class: "px-[5px]" }, Ao = { class: "" }, Ae = /* @__PURE__ */ F({
|
|
1170
1198
|
__name: "vs-widget-file-info",
|
|
1171
1199
|
props: {
|
|
1172
1200
|
item: { default: null }
|
|
1173
1201
|
},
|
|
1174
1202
|
setup(o) {
|
|
1175
|
-
const e = o, t =
|
|
1203
|
+
const e = o, t = A(() => {
|
|
1176
1204
|
try {
|
|
1177
1205
|
return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
|
|
1178
1206
|
day: "2-digit",
|
|
@@ -1190,34 +1218,34 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1190
1218
|
return r < 1024 ? `${r.toFixed(2)} KB` : `${(r / 1024).toFixed(2)} MB`;
|
|
1191
1219
|
}
|
|
1192
1220
|
return (s, r) => (i(), d(Y, null, [
|
|
1193
|
-
r[1] || (r[1] =
|
|
1194
|
-
l("div",
|
|
1195
|
-
l("p",
|
|
1196
|
-
l("p",
|
|
1221
|
+
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
|
+
l("div", Eo, [
|
|
1223
|
+
l("p", Fo, T(s.item?.uploaded_name), 1),
|
|
1224
|
+
l("p", Do, [
|
|
1197
1225
|
l("span", null, T(s.item?.username), 1),
|
|
1198
|
-
K(l("span",
|
|
1199
|
-
[
|
|
1226
|
+
K(l("span", Oo, "|", 512), [
|
|
1227
|
+
[Je, s.item?.username]
|
|
1200
1228
|
]),
|
|
1201
1229
|
l("span", null, T(t.value), 1),
|
|
1202
1230
|
r[0] || (r[0] = l("span", { class: "px-[5px]" }, "|", -1)),
|
|
1203
|
-
l("span",
|
|
1231
|
+
l("span", Ao, T(n(s.item?.size)), 1)
|
|
1204
1232
|
])
|
|
1205
1233
|
])
|
|
1206
1234
|
], 64));
|
|
1207
1235
|
}
|
|
1208
|
-
}),
|
|
1236
|
+
}), Uo = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, To = {
|
|
1209
1237
|
key: 0,
|
|
1210
1238
|
class: "flex w-full gap-x-3 items-center"
|
|
1211
|
-
},
|
|
1239
|
+
}, Ro = {
|
|
1212
1240
|
key: 1,
|
|
1213
1241
|
class: "flex gap-x-3 w-full items-center"
|
|
1214
|
-
},
|
|
1242
|
+
}, Po = {
|
|
1215
1243
|
key: 2,
|
|
1216
1244
|
class: "flex gap-x-3 w-full items-center"
|
|
1217
|
-
},
|
|
1245
|
+
}, Ho = ["href"], No = {
|
|
1218
1246
|
key: 3,
|
|
1219
1247
|
class: "flex gap-x-3 w-full items-center"
|
|
1220
|
-
},
|
|
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__ */ F({
|
|
1221
1249
|
__name: "vs-widget-file-item",
|
|
1222
1250
|
props: {
|
|
1223
1251
|
item: { default: null },
|
|
@@ -1234,8 +1262,8 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1234
1262
|
return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(p.ext);
|
|
1235
1263
|
}
|
|
1236
1264
|
function a(p) {
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1265
|
+
const w = document.createElement("a");
|
|
1266
|
+
w.setAttribute("download", p?.uploaded_name), w.href = p?.file_path, w.click();
|
|
1239
1267
|
}
|
|
1240
1268
|
async function u() {
|
|
1241
1269
|
try {
|
|
@@ -1259,48 +1287,48 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1259
1287
|
function v(p) {
|
|
1260
1288
|
(t.item.ext === "jpg" || t.item.ext === "png") && n("openLightbox", { item: t.item, index: p });
|
|
1261
1289
|
}
|
|
1262
|
-
return (p,
|
|
1263
|
-
p.item.ext === "jpg" || p.item.ext === "png" ? (i(), d("div",
|
|
1290
|
+
return (p, w) => (i(), d("div", Uo, [
|
|
1291
|
+
p.item.ext === "jpg" || p.item.ext === "png" ? (i(), d("div", To, [
|
|
1264
1292
|
l("div", {
|
|
1265
1293
|
class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
|
|
1266
|
-
onClick:
|
|
1294
|
+
onClick: w[0] || (w[0] = (b) => v(p.index))
|
|
1267
1295
|
}, [
|
|
1268
|
-
|
|
1296
|
+
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1269
1297
|
])
|
|
1270
|
-
])) : s(p.item) ? (i(), d("div",
|
|
1271
|
-
|
|
1272
|
-
])) : r(p.item) ? (i(), d("div",
|
|
1298
|
+
])) : s(p.item) ? (i(), d("div", Ro, [
|
|
1299
|
+
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1300
|
+
])) : r(p.item) ? (i(), d("div", Po, [
|
|
1273
1301
|
l("a", {
|
|
1274
1302
|
href: `/api/file-preview?id=${p.item.file_id}`,
|
|
1275
1303
|
target: "_blank",
|
|
1276
1304
|
class: "flex gap-x-3 w-full items-center"
|
|
1277
1305
|
}, [
|
|
1278
|
-
|
|
1279
|
-
], 8,
|
|
1280
|
-
])) : (i(), d("div",
|
|
1281
|
-
|
|
1306
|
+
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1307
|
+
], 8, Ho)
|
|
1308
|
+
])) : (i(), d("div", No, [
|
|
1309
|
+
B(Ae, { item: p.item }, null, 8, ["item"])
|
|
1282
1310
|
])),
|
|
1283
|
-
l("div",
|
|
1284
|
-
l("div",
|
|
1285
|
-
l("div",
|
|
1311
|
+
l("div", qo, [
|
|
1312
|
+
l("div", Go, [
|
|
1313
|
+
l("div", Jo, [
|
|
1286
1314
|
l("button", {
|
|
1287
1315
|
class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
1288
|
-
onClick:
|
|
1316
|
+
onClick: w[1] || (w[1] = (b) => a(p.item))
|
|
1289
1317
|
}, [
|
|
1290
|
-
|
|
1318
|
+
B(yt, {
|
|
1291
1319
|
height: "14",
|
|
1292
1320
|
width: "14"
|
|
1293
1321
|
})
|
|
1294
1322
|
])
|
|
1295
1323
|
]),
|
|
1296
|
-
|
|
1297
|
-
l("div",
|
|
1324
|
+
w[3] || (w[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
|
|
1325
|
+
l("div", Ko, [
|
|
1298
1326
|
l("button", {
|
|
1299
1327
|
type: "button",
|
|
1300
1328
|
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",
|
|
1301
|
-
onClick:
|
|
1329
|
+
onClick: w[2] || (w[2] = (b) => c())
|
|
1302
1330
|
}, [
|
|
1303
|
-
|
|
1331
|
+
B(Te, {
|
|
1304
1332
|
height: "14",
|
|
1305
1333
|
width: "14"
|
|
1306
1334
|
})
|
|
@@ -1310,7 +1338,7 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1310
1338
|
])
|
|
1311
1339
|
]));
|
|
1312
1340
|
}
|
|
1313
|
-
}),
|
|
1341
|
+
}), Wo = {}, Qo = {
|
|
1314
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1315
1343
|
width: "24",
|
|
1316
1344
|
height: "24",
|
|
@@ -1322,8 +1350,8 @@ const vt = /* @__PURE__ */ H(bo, [["render", xo]]), wo = { class: "h-[120px] w-[
|
|
|
1322
1350
|
"stroke-linejoin": "round",
|
|
1323
1351
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
1324
1352
|
};
|
|
1325
|
-
function
|
|
1326
|
-
return i(), d("svg",
|
|
1353
|
+
function Xo(o, e) {
|
|
1354
|
+
return i(), d("svg", Qo, e[0] || (e[0] = [
|
|
1327
1355
|
l("path", {
|
|
1328
1356
|
stroke: "none",
|
|
1329
1357
|
d: "M0 0h24v24H0z",
|
|
@@ -1334,13 +1362,13 @@ function qo(o, e) {
|
|
|
1334
1362
|
l("path", { d: "M12 4l0 12" }, null, -1)
|
|
1335
1363
|
]));
|
|
1336
1364
|
}
|
|
1337
|
-
const
|
|
1365
|
+
const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, ta = { class: "flex w-full mb-[12px] items-center gap-x-2" }, la = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, oa = { class1: "ml-auto" }, aa = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, sa = {
|
|
1338
1366
|
key: 0,
|
|
1339
1367
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
1340
|
-
},
|
|
1368
|
+
}, na = { class: "relative" }, ra = {
|
|
1341
1369
|
key: 1,
|
|
1342
1370
|
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"
|
|
1343
|
-
},
|
|
1371
|
+
}, ia = { key: 0 }, ua = /* @__PURE__ */ F({
|
|
1344
1372
|
__name: "vs-input-file-list",
|
|
1345
1373
|
props: {
|
|
1346
1374
|
id: { default: "" },
|
|
@@ -1355,8 +1383,8 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1355
1383
|
},
|
|
1356
1384
|
emits: ["update"],
|
|
1357
1385
|
setup(o, { emit: e }) {
|
|
1358
|
-
const t = o, n = Me("form"), s =
|
|
1359
|
-
const f =
|
|
1386
|
+
const t = o, n = Me("form"), s = A(() => n.value.formId), r = x(!1), a = x(0), u = e, c = 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
|
+
const f = b.value.findIndex((Q) => Q === m.item.file_path);
|
|
1360
1388
|
f !== -1 && (r.value = !0, a.value = f);
|
|
1361
1389
|
}, R = async () => {
|
|
1362
1390
|
try {
|
|
@@ -1365,47 +1393,47 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1365
1393
|
} catch (m) {
|
|
1366
1394
|
console.error(m);
|
|
1367
1395
|
}
|
|
1368
|
-
},
|
|
1396
|
+
}, C = async (m) => {
|
|
1369
1397
|
await Promise.all(
|
|
1370
1398
|
Array.from(m.target.files).map(async (f) => {
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1399
|
+
const Q = new FormData();
|
|
1400
|
+
Q.append("file", f);
|
|
1373
1401
|
try {
|
|
1374
1402
|
const U = `${t.prefix}/widget/file/${s.value}`;
|
|
1375
|
-
return await fetch(U, { method: "POST", body:
|
|
1403
|
+
return await fetch(U, { method: "POST", body: Q }), u("update", "file-list"), f;
|
|
1376
1404
|
} catch (U) {
|
|
1377
1405
|
return console.error(U), null;
|
|
1378
1406
|
}
|
|
1379
1407
|
})
|
|
1380
1408
|
), await R();
|
|
1381
|
-
},
|
|
1409
|
+
}, E = (m) => {
|
|
1382
1410
|
const f = { ...m };
|
|
1383
1411
|
return m.cancel || (f.cancel = () => {
|
|
1384
1412
|
c.value = !1;
|
|
1385
1413
|
}), m.updateListOnConfirm && (f.confirm = async () => {
|
|
1386
1414
|
await m.confirm(), c.value = !1, R();
|
|
1387
1415
|
}), f;
|
|
1388
|
-
},
|
|
1389
|
-
v.value =
|
|
1416
|
+
}, j = (m) => {
|
|
1417
|
+
v.value = E(m), c.value = !0;
|
|
1390
1418
|
};
|
|
1391
1419
|
return te(s, (m) => {
|
|
1392
1420
|
m && R();
|
|
1393
|
-
}),
|
|
1421
|
+
}), xe(() => {
|
|
1394
1422
|
s.value && R();
|
|
1395
1423
|
}), (m, f) => {
|
|
1396
|
-
const
|
|
1397
|
-
return i(), d("div",
|
|
1398
|
-
l("div",
|
|
1399
|
-
l("h2",
|
|
1400
|
-
l("div",
|
|
1424
|
+
const Q = at("Lightbox"), U = at("MessageBox");
|
|
1425
|
+
return i(), d("div", ea, [
|
|
1426
|
+
l("div", ta, [
|
|
1427
|
+
l("h2", la, " Файлів: " + T(p.value?.length), 1),
|
|
1428
|
+
l("div", oa, [
|
|
1401
1429
|
l("label", null, [
|
|
1402
1430
|
l("input", {
|
|
1403
1431
|
type: "file",
|
|
1404
1432
|
class: "hidden",
|
|
1405
|
-
onChange: f[0] || (f[0] = (
|
|
1433
|
+
onChange: f[0] || (f[0] = (O) => C(O))
|
|
1406
1434
|
}, null, 32),
|
|
1407
|
-
l("div",
|
|
1408
|
-
|
|
1435
|
+
l("div", aa, [
|
|
1436
|
+
B(Yo, {
|
|
1409
1437
|
height: "16",
|
|
1410
1438
|
width: "16"
|
|
1411
1439
|
})
|
|
@@ -1413,9 +1441,9 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1413
1441
|
])
|
|
1414
1442
|
])
|
|
1415
1443
|
]),
|
|
1416
|
-
p.value?.length > 4 ? (i(), d("div",
|
|
1444
|
+
p.value?.length > 4 ? (i(), d("div", sa, [
|
|
1417
1445
|
l("div", null, [
|
|
1418
|
-
l("div",
|
|
1446
|
+
l("div", na, [
|
|
1419
1447
|
f[8] || (f[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
|
|
1420
1448
|
l("svg", {
|
|
1421
1449
|
class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
|
|
@@ -1439,50 +1467,50 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1439
1467
|
], -1)),
|
|
1440
1468
|
K(l("input", {
|
|
1441
1469
|
type: "text",
|
|
1442
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
1470
|
+
"onUpdate:modelValue": f[1] || (f[1] = (O) => w.value = O),
|
|
1443
1471
|
class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
|
|
1444
1472
|
placeholder: "Введіть назву файлу"
|
|
1445
1473
|
}, null, 512), [
|
|
1446
1474
|
[
|
|
1447
|
-
|
|
1448
|
-
|
|
1475
|
+
se,
|
|
1476
|
+
w.value,
|
|
1449
1477
|
void 0,
|
|
1450
1478
|
{ trim: !0 }
|
|
1451
1479
|
]
|
|
1452
1480
|
])
|
|
1453
1481
|
])
|
|
1454
1482
|
])
|
|
1455
|
-
])) :
|
|
1456
|
-
p.value?.length ? (i(), d("div",
|
|
1457
|
-
(i(!0), d(Y, null, le(
|
|
1458
|
-
key:
|
|
1483
|
+
])) : D("", !0),
|
|
1484
|
+
p.value?.length ? (i(), d("div", ra, [
|
|
1485
|
+
(i(!0), d(Y, null, le($.value, (O, ue) => (i(), ae(Zo, {
|
|
1486
|
+
key: ue,
|
|
1459
1487
|
prefix: m.prefix,
|
|
1460
|
-
item:
|
|
1461
|
-
index:
|
|
1488
|
+
item: O,
|
|
1489
|
+
index: ue,
|
|
1462
1490
|
onUpdate: f[2] || (f[2] = (ee) => m.$emit("update", "file-list")),
|
|
1463
|
-
onOpenModal: f[3] || (f[3] = (ee) =>
|
|
1491
|
+
onOpenModal: f[3] || (f[3] = (ee) => j(ee)),
|
|
1464
1492
|
onOpenLightbox: f[4] || (f[4] = (ee) => S(ee))
|
|
1465
1493
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1466
|
-
|
|
1494
|
+
$.value.length ? D("", !0) : (i(), d("div", ia, f[9] || (f[9] = [
|
|
1467
1495
|
l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1468
1496
|
])))
|
|
1469
|
-
])) :
|
|
1470
|
-
|
|
1497
|
+
])) : D("", !0),
|
|
1498
|
+
B(Q, {
|
|
1471
1499
|
modelValue: r.value,
|
|
1472
|
-
"onUpdate:modelValue": f[5] || (f[5] = (
|
|
1500
|
+
"onUpdate:modelValue": f[5] || (f[5] = (O) => r.value = O),
|
|
1473
1501
|
startIndex: a.value,
|
|
1474
|
-
"onUpdate:index": f[6] || (f[6] = (
|
|
1475
|
-
images:
|
|
1502
|
+
"onUpdate:index": f[6] || (f[6] = (O) => a.value = O),
|
|
1503
|
+
images: b.value
|
|
1476
1504
|
}, null, 8, ["modelValue", "startIndex", "images"]),
|
|
1477
|
-
|
|
1505
|
+
B(U, Ee({
|
|
1478
1506
|
modelValue: c.value,
|
|
1479
|
-
"onUpdate:modelValue": f[7] || (f[7] = (
|
|
1507
|
+
"onUpdate:modelValue": f[7] || (f[7] = (O) => c.value = O),
|
|
1480
1508
|
onConfirm: v.value.confirm
|
|
1481
1509
|
}, v.value), null, 16, ["modelValue", "onConfirm"])
|
|
1482
1510
|
]);
|
|
1483
1511
|
};
|
|
1484
1512
|
}
|
|
1485
|
-
}),
|
|
1513
|
+
}), da = { class: "flex items-center justify-between" }, ca = { class: "text-[16px] text-gray-900 font-medium" }, pa = { class: "grid gap-3" }, fa = /* @__PURE__ */ F({
|
|
1486
1514
|
__name: "vs-container-switcher",
|
|
1487
1515
|
props: {
|
|
1488
1516
|
title: {
|
|
@@ -1499,34 +1527,34 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1499
1527
|
}
|
|
1500
1528
|
},
|
|
1501
1529
|
setup(o) {
|
|
1502
|
-
const e = o, t =
|
|
1530
|
+
const e = o, t = x(e.isOpen);
|
|
1503
1531
|
return te(
|
|
1504
1532
|
() => e.isOpen,
|
|
1505
1533
|
(n) => {
|
|
1506
1534
|
t.value = n;
|
|
1507
1535
|
}
|
|
1508
1536
|
), (n, s) => (i(), d("div", null, [
|
|
1509
|
-
l("div",
|
|
1510
|
-
l("p",
|
|
1511
|
-
|
|
1537
|
+
l("div", da, [
|
|
1538
|
+
l("p", ca, T(o.title), 1),
|
|
1539
|
+
B(bt, {
|
|
1512
1540
|
modelValue: t.value,
|
|
1513
1541
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r),
|
|
1514
|
-
style:
|
|
1542
|
+
style: ye(o.style)
|
|
1515
1543
|
}, null, 8, ["modelValue", "style"])
|
|
1516
1544
|
]),
|
|
1517
|
-
|
|
1518
|
-
default:
|
|
1519
|
-
K(l("div",
|
|
1545
|
+
B(mt, { name: "slide-fade" }, {
|
|
1546
|
+
default: Le(() => [
|
|
1547
|
+
K(l("div", pa, [
|
|
1520
1548
|
$e(n.$slots, "default", {}, void 0, !0)
|
|
1521
1549
|
], 512), [
|
|
1522
|
-
[
|
|
1550
|
+
[Je, t.value]
|
|
1523
1551
|
])
|
|
1524
1552
|
]),
|
|
1525
1553
|
_: 3
|
|
1526
1554
|
})
|
|
1527
1555
|
]));
|
|
1528
1556
|
}
|
|
1529
|
-
}),
|
|
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__ */ F({
|
|
1530
1558
|
__name: "vs-container-accordion",
|
|
1531
1559
|
props: {
|
|
1532
1560
|
title: {
|
|
@@ -1543,7 +1571,7 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1543
1571
|
}
|
|
1544
1572
|
},
|
|
1545
1573
|
setup(o) {
|
|
1546
|
-
const e = o, t =
|
|
1574
|
+
const e = o, t = x(e.isOpen);
|
|
1547
1575
|
return te(
|
|
1548
1576
|
() => e.isOpen,
|
|
1549
1577
|
(n) => {
|
|
@@ -1555,24 +1583,24 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1555
1583
|
onClick: s[0] || (s[0] = (r) => t.value = !t.value),
|
|
1556
1584
|
class: "flex items-center gap-2"
|
|
1557
1585
|
}, [
|
|
1558
|
-
|
|
1559
|
-
class:
|
|
1586
|
+
B(q(bl), {
|
|
1587
|
+
class: V(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
|
|
1560
1588
|
}, null, 8, ["class"]),
|
|
1561
|
-
l("span",
|
|
1589
|
+
l("span", ma, T(o.title), 1)
|
|
1562
1590
|
]),
|
|
1563
|
-
|
|
1564
|
-
default:
|
|
1565
|
-
K(l("div",
|
|
1591
|
+
B(mt, { name: "slide-fade" }, {
|
|
1592
|
+
default: Le(() => [
|
|
1593
|
+
K(l("div", ha, [
|
|
1566
1594
|
$e(n.$slots, "default", {}, void 0, !0)
|
|
1567
1595
|
], 512), [
|
|
1568
|
-
[
|
|
1596
|
+
[Je, t.value]
|
|
1569
1597
|
])
|
|
1570
1598
|
]),
|
|
1571
1599
|
_: 3
|
|
1572
1600
|
})
|
|
1573
1601
|
]));
|
|
1574
1602
|
}
|
|
1575
|
-
}),
|
|
1603
|
+
}), ba = /* @__PURE__ */ H(ga, [["__scopeId", "data-v-590eff11"]]), ya = { class: "flex items-center justify-between" }, xa = /* @__PURE__ */ F({
|
|
1576
1604
|
__name: "vs-container-default",
|
|
1577
1605
|
props: {
|
|
1578
1606
|
title: {
|
|
@@ -1586,17 +1614,17 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1586
1614
|
},
|
|
1587
1615
|
setup(o) {
|
|
1588
1616
|
return (e, t) => (i(), d("div", null, [
|
|
1589
|
-
l("div",
|
|
1617
|
+
l("div", ya, [
|
|
1590
1618
|
l("p", null, T(o.title), 1)
|
|
1591
1619
|
]),
|
|
1592
1620
|
$e(e.$slots, "default")
|
|
1593
1621
|
]));
|
|
1594
1622
|
}
|
|
1595
|
-
}),
|
|
1596
|
-
switcher:
|
|
1597
|
-
accordion:
|
|
1598
|
-
default:
|
|
1599
|
-
},
|
|
1623
|
+
}), wa = {
|
|
1624
|
+
switcher: va,
|
|
1625
|
+
accordion: ba,
|
|
1626
|
+
default: xa
|
|
1627
|
+
}, pe = {
|
|
1600
1628
|
Equal: "==",
|
|
1601
1629
|
Inequal: "!=",
|
|
1602
1630
|
Higer: ">",
|
|
@@ -1609,37 +1637,37 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1609
1637
|
Contain: "*",
|
|
1610
1638
|
In: "in",
|
|
1611
1639
|
NotIn: "not_in"
|
|
1612
|
-
},
|
|
1640
|
+
}, ka = (o, e) => String(o) === String(e), _a = (o, e) => String(o) !== String(e), $a = (o, e) => o > e, Ca = (o, e) => o >= e, Va = (o, e) => o < e, Ma = (o, e) => o <= e, La = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Sa = (o, e) => String(o).startsWith(String(e)), Ba = (o, e) => String(o).endsWith(String(e)), ja = (o, e) => String(o).includes(String(e)), Ia = (o, e) => Array.isArray(e) ? e.includes(o) : !1, za = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, xt = (o, e) => {
|
|
1613
1641
|
if (!e) return !0;
|
|
1614
1642
|
switch (e?.[1]) {
|
|
1615
|
-
case
|
|
1616
|
-
return ma(o, e?.[2]);
|
|
1617
|
-
case ce.Inequal:
|
|
1618
|
-
return ha(o, e?.[2]);
|
|
1619
|
-
case ce.Higer:
|
|
1620
|
-
return ga(o, e?.[2]);
|
|
1621
|
-
case ce.HigerOrEqual:
|
|
1622
|
-
return ba(o, e?.[2]);
|
|
1623
|
-
case ce.Lower:
|
|
1624
|
-
return ya(o, e?.[2]);
|
|
1625
|
-
case ce.LowerOrEqual:
|
|
1626
|
-
return xa(o, e?.[2]);
|
|
1627
|
-
case ce.Between:
|
|
1628
|
-
return wa(o, e?.[2]);
|
|
1629
|
-
case ce.StartWith:
|
|
1643
|
+
case pe.Equal:
|
|
1630
1644
|
return ka(o, e?.[2]);
|
|
1631
|
-
case
|
|
1645
|
+
case pe.Inequal:
|
|
1632
1646
|
return _a(o, e?.[2]);
|
|
1633
|
-
case
|
|
1647
|
+
case pe.Higer:
|
|
1634
1648
|
return $a(o, e?.[2]);
|
|
1635
|
-
case
|
|
1649
|
+
case pe.HigerOrEqual:
|
|
1636
1650
|
return Ca(o, e?.[2]);
|
|
1637
|
-
case
|
|
1651
|
+
case pe.Lower:
|
|
1638
1652
|
return Va(o, e?.[2]);
|
|
1653
|
+
case pe.LowerOrEqual:
|
|
1654
|
+
return Ma(o, e?.[2]);
|
|
1655
|
+
case pe.Between:
|
|
1656
|
+
return La(o, e?.[2]);
|
|
1657
|
+
case pe.StartWith:
|
|
1658
|
+
return Sa(o, e?.[2]);
|
|
1659
|
+
case pe.EndWith:
|
|
1660
|
+
return Ba(o, e?.[2]);
|
|
1661
|
+
case pe.Contain:
|
|
1662
|
+
return ja(o, e?.[2]);
|
|
1663
|
+
case pe.In:
|
|
1664
|
+
return Ia(o, e?.[2]);
|
|
1665
|
+
case pe.NotIn:
|
|
1666
|
+
return za(o, e?.[2]);
|
|
1639
1667
|
default:
|
|
1640
1668
|
return !0;
|
|
1641
1669
|
}
|
|
1642
|
-
},
|
|
1670
|
+
}, Ea = /* @__PURE__ */ F({
|
|
1643
1671
|
__name: "vs-input-container",
|
|
1644
1672
|
props: {
|
|
1645
1673
|
style: {
|
|
@@ -1660,19 +1688,19 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1660
1688
|
}
|
|
1661
1689
|
},
|
|
1662
1690
|
setup(o) {
|
|
1663
|
-
const e = o, t = Me("formValues", { default: {} }), n = Me("form"), s =
|
|
1691
|
+
const e = o, t = Me("formValues", { default: {} }), n = Me("form"), s = A(() => e.schema?.filter((a) => {
|
|
1664
1692
|
const u = a?.conditions;
|
|
1665
1693
|
if (!u) return !0;
|
|
1666
1694
|
const c = Array.isArray(u) ? u[0] : u, v = t?.value?.[c];
|
|
1667
|
-
return
|
|
1668
|
-
})), r =
|
|
1669
|
-
return (a, u) => o.schema?.length ? (i(), ae(
|
|
1695
|
+
return xt(v, u);
|
|
1696
|
+
})), r = A(() => wa[e.view]);
|
|
1697
|
+
return (a, u) => o.schema?.length ? (i(), ae(Be(r.value), {
|
|
1670
1698
|
key: 0,
|
|
1671
1699
|
title: o.title,
|
|
1672
|
-
style:
|
|
1700
|
+
style: ye(o.style)
|
|
1673
1701
|
}, {
|
|
1674
|
-
default:
|
|
1675
|
-
(i(!0), d(Y, null, le(s.value, (c) => (i(), ae(
|
|
1702
|
+
default: Le(() => [
|
|
1703
|
+
(i(!0), d(Y, null, le(s.value, (c) => (i(), ae(wt, Ee({
|
|
1676
1704
|
key: c.name
|
|
1677
1705
|
}, { ref_for: !0 }, c, {
|
|
1678
1706
|
item: c,
|
|
@@ -1683,151 +1711,9 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1683
1711
|
}), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
|
|
1684
1712
|
]),
|
|
1685
1713
|
_: 1
|
|
1686
|
-
}, 8, ["title", "style"])) :
|
|
1714
|
+
}, 8, ["title", "style"])) : D("", !0);
|
|
1687
1715
|
}
|
|
1688
|
-
}),
|
|
1689
|
-
__name: "modal-edit",
|
|
1690
|
-
props: {
|
|
1691
|
-
schema: {},
|
|
1692
|
-
defaultValue: {},
|
|
1693
|
-
mode: {},
|
|
1694
|
-
token: {},
|
|
1695
|
-
form: {}
|
|
1696
|
-
},
|
|
1697
|
-
emits: ["close", "save", "edit"],
|
|
1698
|
-
setup(o, { emit: e }) {
|
|
1699
|
-
const t = o, n = e, s = w(t.schema), r = w(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), a = w({}), u = w(), c = w(t.mode);
|
|
1700
|
-
async function v() {
|
|
1701
|
-
const x = a.value.validate();
|
|
1702
|
-
if (x) {
|
|
1703
|
-
ke({ type: "warning", title: "Помилка валідації", message: Object.entries(x).map(([g, _]) => `${g}: ${_}`).join(`
|
|
1704
|
-
`) });
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
if (u.value)
|
|
1708
|
-
try {
|
|
1709
|
-
const g = await fetch(`/api/table/${u.value}`, {
|
|
1710
|
-
method: c.value === "add" ? "POST" : "PUT",
|
|
1711
|
-
headers: {
|
|
1712
|
-
"Content-Type": "application/json"
|
|
1713
|
-
},
|
|
1714
|
-
body: JSON.stringify(r.value)
|
|
1715
|
-
});
|
|
1716
|
-
if (g.ok)
|
|
1717
|
-
await g.json(), ke({
|
|
1718
|
-
type: "success",
|
|
1719
|
-
title: "Успішно",
|
|
1720
|
-
message: `Дані успішно ${c.value === "add" ? "збережено" : "оновлено"}`
|
|
1721
|
-
}), n("save", r.value);
|
|
1722
|
-
else if (g.status === 400) {
|
|
1723
|
-
const _ = await g.json().catch(() => ({}));
|
|
1724
|
-
ke({
|
|
1725
|
-
type: "warning",
|
|
1726
|
-
title: "Помилка валідації",
|
|
1727
|
-
message: _.message || "Некоректні дані (400)"
|
|
1728
|
-
});
|
|
1729
|
-
} else g.status === 500 ? ke({
|
|
1730
|
-
type: "error",
|
|
1731
|
-
title: "Серверна помилка",
|
|
1732
|
-
message: "Виникла помилка на сервері (500)"
|
|
1733
|
-
}) : ke({
|
|
1734
|
-
type: "error",
|
|
1735
|
-
title: "Помилка",
|
|
1736
|
-
message: `Статус: ${g.status}`
|
|
1737
|
-
});
|
|
1738
|
-
} catch (g) {
|
|
1739
|
-
ke({
|
|
1740
|
-
type: "error",
|
|
1741
|
-
title: "Помилка з’єднання",
|
|
1742
|
-
message: g.message || "Не вдалося виконати запит"
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
function p() {
|
|
1747
|
-
n("close");
|
|
1748
|
-
}
|
|
1749
|
-
return be(async () => {
|
|
1750
|
-
if (t.form) {
|
|
1751
|
-
const x = await fetch(`/api/template/form/${t.form}`).then((g) => g.json());
|
|
1752
|
-
s.value = x.schema, u.value = x.token;
|
|
1753
|
-
} else if (t.token) {
|
|
1754
|
-
u.value = t.token;
|
|
1755
|
-
const x = await fetch(`/api/form/${u.value}`).then((g) => g.json());
|
|
1756
|
-
s.value = x.schema, x.data ? r.value = x.data : c.value = "add";
|
|
1757
|
-
}
|
|
1758
|
-
}), (x, g) => (i(), d("div", La, [
|
|
1759
|
-
l("div", Sa, [
|
|
1760
|
-
l("div", Ba, [
|
|
1761
|
-
l("div", ja, [
|
|
1762
|
-
l("h3", Ia, T(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
1763
|
-
l("button", {
|
|
1764
|
-
onClick: p,
|
|
1765
|
-
type: "button",
|
|
1766
|
-
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
|
|
1767
|
-
}, g[2] || (g[2] = [
|
|
1768
|
-
l("span", { class: "sr-only" }, "Close", -1),
|
|
1769
|
-
l("svg", {
|
|
1770
|
-
class: "flex-shrink-0 w-4 h-4",
|
|
1771
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1772
|
-
width: "24",
|
|
1773
|
-
height: "24",
|
|
1774
|
-
viewBox: "0 0 24 24",
|
|
1775
|
-
fill: "none",
|
|
1776
|
-
stroke: "currentColor",
|
|
1777
|
-
"stroke-width": "2",
|
|
1778
|
-
"stroke-linecap": "round",
|
|
1779
|
-
"stroke-linejoin": "round"
|
|
1780
|
-
}, [
|
|
1781
|
-
l("path", { d: "M18 6 6 18" }),
|
|
1782
|
-
l("path", { d: "m6 6 12 12" })
|
|
1783
|
-
], -1)
|
|
1784
|
-
]))
|
|
1785
|
-
]),
|
|
1786
|
-
l("div", za, [
|
|
1787
|
-
s.value ? (i(), ae(Oe, {
|
|
1788
|
-
key: 0,
|
|
1789
|
-
schema: s.value,
|
|
1790
|
-
values: r.value,
|
|
1791
|
-
"onUpdate:values": g[0] || (g[0] = (_) => r.value = _),
|
|
1792
|
-
form: a.value,
|
|
1793
|
-
"onUpdate:form": g[1] || (g[1] = (_) => a.value = _)
|
|
1794
|
-
}, null, 8, ["schema", "values", "form"])) : A("", !0)
|
|
1795
|
-
]),
|
|
1796
|
-
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" }, [
|
|
1797
|
-
l("button", {
|
|
1798
|
-
type: "button",
|
|
1799
|
-
onClick: p,
|
|
1800
|
-
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
1801
|
-
}, " Скасувати "),
|
|
1802
|
-
l("button", {
|
|
1803
|
-
onClick: v,
|
|
1804
|
-
type: "button",
|
|
1805
|
-
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
|
|
1806
|
-
}, " Зберегти ")
|
|
1807
|
-
])
|
|
1808
|
-
])
|
|
1809
|
-
])
|
|
1810
|
-
]));
|
|
1811
|
-
}
|
|
1812
|
-
}), Pe = (o = { mode: "edit", schema: null }) => new Promise((e) => {
|
|
1813
|
-
const { close: t } = Lt({
|
|
1814
|
-
title: o.mode === "add" ? "Додати" : "Редагувати",
|
|
1815
|
-
template: "",
|
|
1816
|
-
visible: !0,
|
|
1817
|
-
size: "medium",
|
|
1818
|
-
closeClickBack: !0,
|
|
1819
|
-
content: Ea,
|
|
1820
|
-
contentProps: {
|
|
1821
|
-
...o,
|
|
1822
|
-
onClose: () => {
|
|
1823
|
-
e(null), t();
|
|
1824
|
-
},
|
|
1825
|
-
onSave: (n) => {
|
|
1826
|
-
e(n), t();
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
});
|
|
1830
|
-
}), Aa = ["aria-expanded", "data-focus"], Fa = { class: "flex items-center" }, Da = ["title"], Oa = ["onClick"], Ua = ["title"], Ta = {
|
|
1716
|
+
}), Fa = ["aria-expanded", "data-focus"], Da = { class: "flex items-center" }, Oa = ["title"], Aa = ["onClick"], Ua = ["title"], Ta = {
|
|
1831
1717
|
key: 2,
|
|
1832
1718
|
class: "text-gray-500 truncate"
|
|
1833
1719
|
}, 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 = {
|
|
@@ -1858,409 +1744,438 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
1858
1744
|
},
|
|
1859
1745
|
emits: ["change", "update:modelValue"],
|
|
1860
1746
|
setup(o, { emit: e }) {
|
|
1861
|
-
const t = o, n = e, s =
|
|
1862
|
-
|
|
1863
|
-
const a =
|
|
1747
|
+
const t = o, n = e, s = A(() => t.multiple), r = A(() => t.disabled);
|
|
1748
|
+
me(t.style);
|
|
1749
|
+
const a = A({
|
|
1864
1750
|
get: () => t.modelValue,
|
|
1865
|
-
set: (
|
|
1751
|
+
set: (g) => n("update:modelValue", g)
|
|
1866
1752
|
});
|
|
1867
1753
|
!a.value && t.defaultValue && (a.value = t.defaultValue);
|
|
1868
|
-
const u =
|
|
1754
|
+
const u = x(null), c = 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(() => {
|
|
1869
1755
|
if (!f.value.length) return [];
|
|
1870
|
-
const
|
|
1871
|
-
return f.value.map((
|
|
1872
|
-
}), U =
|
|
1873
|
-
let
|
|
1874
|
-
if (!t.data &&
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1756
|
+
const g = new Map($.value.map((h) => [h.id?.toString(), h]));
|
|
1757
|
+
return f.value.map((h) => g.get(h?.toString())).filter((h) => !!h);
|
|
1758
|
+
}), U = A(() => t.placeholder || "Select..."), O = A(() => s.value ? !f.value.length && C.value === "" : !b.value?.text && C.value === ""), ue = A(() => r.value ? !1 : s.value ? f.value.length > 0 : !!a.value), ee = (g) => s.value ? f.value.some((h) => h?.toString() === g?.toString()) : a.value?.toString() === g?.toString(), X = A(() => {
|
|
1759
|
+
let g = $.value ?? [];
|
|
1760
|
+
if (!t.data && C.value.trim() !== "") {
|
|
1761
|
+
const h = C.value.toLowerCase();
|
|
1762
|
+
g = g.filter((_) => _.text?.toLowerCase?.().includes(h));
|
|
1877
1763
|
}
|
|
1878
1764
|
if (s.value && f.value.length) {
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1765
|
+
const h = new Set(f.value.map((_) => _?.toString()));
|
|
1766
|
+
g = g.filter((_) => !h.has(_.id?.toString()));
|
|
1881
1767
|
}
|
|
1882
|
-
return
|
|
1883
|
-
}), je = Me("values"),
|
|
1768
|
+
return g;
|
|
1769
|
+
}), je = Me("values"), we = A(() => t.parent ? je?.value?.[t.parent] ?? null : null), z = async (g) => {
|
|
1884
1770
|
if (!t.data) {
|
|
1885
|
-
let
|
|
1886
|
-
if (
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1771
|
+
let h = t.options ?? [];
|
|
1772
|
+
if (g?.trim()) {
|
|
1773
|
+
const _ = g.toLowerCase();
|
|
1774
|
+
h = h.filter((N) => N.text?.toLowerCase?.().includes(_));
|
|
1889
1775
|
}
|
|
1890
|
-
return
|
|
1776
|
+
return h;
|
|
1891
1777
|
}
|
|
1892
1778
|
try {
|
|
1893
|
-
const
|
|
1894
|
-
return
|
|
1779
|
+
const h = t.host ?? "", _ = t.prefix ?? "api", N = t.api ?? `/${_}/suggest/${t.data}`, re = `${h}${N}`, ie = new URLSearchParams();
|
|
1780
|
+
return ie.set("json", "1"), g && ie.set("key", g), we.value !== void 0 && we.value !== null && we.value !== "" && ie.set("parent", String(we.value)), (await fetch(`${re}?${ie.toString()}`).then((Ie) => Ie.json()))?.data ?? [];
|
|
1895
1781
|
} catch {
|
|
1896
1782
|
return [];
|
|
1897
1783
|
}
|
|
1898
|
-
},
|
|
1899
|
-
t.data ?
|
|
1900
|
-
},
|
|
1901
|
-
if (
|
|
1902
|
-
const
|
|
1903
|
-
return
|
|
1904
|
-
}, G = async (
|
|
1905
|
-
const
|
|
1906
|
-
|
|
1784
|
+
}, M = async () => {
|
|
1785
|
+
t.data ? $.value = await z(C.value) : $.value = t.options ? [...t.options] : [];
|
|
1786
|
+
}, I = async (g) => {
|
|
1787
|
+
if (g == null) return null;
|
|
1788
|
+
const h = $.value?.find((N) => N?.id?.toString() === String(g));
|
|
1789
|
+
return h || ((await z(String(g)))?.[0] ?? null);
|
|
1790
|
+
}, G = async (g) => {
|
|
1791
|
+
const h = new Set($.value.map((N) => N.id?.toString())), _ = g.filter((N) => !h.has(N?.toString()));
|
|
1792
|
+
_.length && await _.reduce(async (N, re) => {
|
|
1907
1793
|
await N;
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1794
|
+
const ie = await I(re);
|
|
1795
|
+
ie && $.value.push(ie);
|
|
1910
1796
|
}, Promise.resolve());
|
|
1911
1797
|
}, oe = async () => {
|
|
1912
|
-
r.value || (p.value = !0, await
|
|
1913
|
-
|
|
1798
|
+
r.value || (p.value = !0, await M(), await ze(() => {
|
|
1799
|
+
ge(), E.value?.focus(), X.value.length ? S.value = 0 : S.value = -1;
|
|
1914
1800
|
}));
|
|
1915
|
-
},
|
|
1801
|
+
}, de = () => {
|
|
1916
1802
|
p.value = !1, S.value = -1;
|
|
1917
|
-
},
|
|
1803
|
+
}, ke = async (g) => {
|
|
1918
1804
|
if (r.value) return;
|
|
1919
|
-
!p.value ? await oe() :
|
|
1805
|
+
!p.value ? await oe() : de();
|
|
1920
1806
|
}, y = async () => {
|
|
1921
|
-
p.value ?
|
|
1807
|
+
p.value ? E.value?.focus() : await oe();
|
|
1922
1808
|
}, k = () => {
|
|
1923
|
-
s.value ? (f.value = [], a.value = [], n("change", [])) : (
|
|
1924
|
-
}, P = (
|
|
1925
|
-
s.value && (f.value = f.value.filter((
|
|
1926
|
-
}, J = (
|
|
1927
|
-
s.value ? (ee(
|
|
1928
|
-
|
|
1929
|
-
})) : (
|
|
1930
|
-
},
|
|
1931
|
-
ee(
|
|
1932
|
-
}, _e = (
|
|
1933
|
-
if (!
|
|
1934
|
-
const
|
|
1935
|
-
let
|
|
1936
|
-
|
|
1937
|
-
const Ie =
|
|
1938
|
-
Ie.scrollTop =
|
|
1939
|
-
},
|
|
1940
|
-
let
|
|
1941
|
-
for (;
|
|
1942
|
-
if (
|
|
1943
|
-
return
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
b = b.parentElement;
|
|
1949
|
-
}
|
|
1809
|
+
s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)), C.value = "", ze(() => E.value?.focus());
|
|
1810
|
+
}, P = (g) => {
|
|
1811
|
+
s.value && (f.value = f.value.filter((h) => h?.toString() !== g?.toString()), a.value = [...f.value], n("change", a.value), ze(() => E.value?.focus()));
|
|
1812
|
+
}, J = (g) => {
|
|
1813
|
+
s.value ? (ee(g.id) || (f.value = [...f.value, g.id], a.value = [...f.value], n("change", a.value)), C.value = "", ze(() => {
|
|
1814
|
+
E.value?.focus(), S.value = Math.min(S.value, X.value.length - 1);
|
|
1815
|
+
})) : (b.value = g, a.value = g.id, n("change", a.value), C.value = "", de());
|
|
1816
|
+
}, ne = (g) => {
|
|
1817
|
+
ee(g.id) || J(g);
|
|
1818
|
+
}, _e = (g, h) => {
|
|
1819
|
+
if (!g || !h) return;
|
|
1820
|
+
const _ = g.offsetTop, N = _ + g.offsetHeight, re = h.scrollTop, ie = re + h.clientHeight;
|
|
1821
|
+
let Se = h.scrollTop;
|
|
1822
|
+
_ < re ? Se = _ - 80 : N > ie && (Se = N - h.clientHeight + 4);
|
|
1823
|
+
const Ie = h;
|
|
1824
|
+
Ie.scrollTop = Se;
|
|
1825
|
+
}, he = (g) => {
|
|
1826
|
+
let h = g.parentElement;
|
|
1827
|
+
for (; h; ) {
|
|
1828
|
+
if (h.classList.contains("ui-dialog__content"))
|
|
1829
|
+
return h;
|
|
1830
|
+
const _ = window.getComputedStyle(h), N = _.overflow + _.overflowY + _.overflowX;
|
|
1831
|
+
if (N.includes("auto") || N.includes("scroll") || h === document.body || h === document.documentElement)
|
|
1832
|
+
return h;
|
|
1833
|
+
h = h.parentElement;
|
|
1950
1834
|
}
|
|
1951
1835
|
return document.body;
|
|
1952
|
-
},
|
|
1836
|
+
}, ge = () => {
|
|
1953
1837
|
if (!c.value) return;
|
|
1954
|
-
const
|
|
1955
|
-
let
|
|
1956
|
-
if (
|
|
1957
|
-
|
|
1958
|
-
const
|
|
1838
|
+
const g = c.value.getBoundingClientRect(), _ = he(c.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
|
+
let Pe = !1;
|
|
1840
|
+
if (lt >= ot ? Pe = !0 : Pe = !1, Pe) {
|
|
1841
|
+
j.value = "bottom";
|
|
1842
|
+
const He = Math.min(N, Math.max(lt + re, 50));
|
|
1959
1843
|
m.value = {
|
|
1960
|
-
top: `${
|
|
1844
|
+
top: `${g.height + ie}px`,
|
|
1961
1845
|
left: "0px",
|
|
1962
1846
|
right: "0px",
|
|
1963
1847
|
bottom: "auto",
|
|
1964
|
-
maxHeight: `${
|
|
1848
|
+
maxHeight: `${He}px`
|
|
1965
1849
|
};
|
|
1966
1850
|
} else {
|
|
1967
|
-
|
|
1968
|
-
const
|
|
1851
|
+
j.value = "top";
|
|
1852
|
+
const He = Math.min(N, Math.max(ot + re, 50));
|
|
1969
1853
|
m.value = {
|
|
1970
1854
|
top: "auto",
|
|
1971
1855
|
left: "0px",
|
|
1972
1856
|
right: "0px",
|
|
1973
|
-
bottom: `${
|
|
1974
|
-
maxHeight: `${
|
|
1857
|
+
bottom: `${g.height + ie}px`,
|
|
1858
|
+
maxHeight: `${He}px`
|
|
1975
1859
|
};
|
|
1976
1860
|
}
|
|
1977
|
-
}, Ce = async (
|
|
1978
|
-
r.value || !p.value && (
|
|
1979
|
-
}, Ve = (
|
|
1861
|
+
}, Ce = async (g) => {
|
|
1862
|
+
r.value || !p.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await oe());
|
|
1863
|
+
}, Ve = (g) => {
|
|
1980
1864
|
if (!p.value) return;
|
|
1981
|
-
const { key:
|
|
1982
|
-
if (
|
|
1983
|
-
|
|
1984
|
-
else if (
|
|
1985
|
-
|
|
1986
|
-
else if (
|
|
1987
|
-
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
} else
|
|
1991
|
-
},
|
|
1992
|
-
r.value || (
|
|
1993
|
-
},
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
|
|
1997
|
-
},
|
|
1998
|
-
u.value && (u.value.contains(
|
|
1999
|
-
},
|
|
2000
|
-
p.value && v.value && !v.value.contains(
|
|
2001
|
-
}, We = () => {
|
|
2002
|
-
p.value && he();
|
|
1865
|
+
const { key: h } = g;
|
|
1866
|
+
if (h === "ArrowDown")
|
|
1867
|
+
g.preventDefault(), S.value + 1 < X.value.length && (S.value += 1, _e(R.value[S.value], v.value));
|
|
1868
|
+
else if (h === "ArrowUp")
|
|
1869
|
+
g.preventDefault(), S.value > 0 && (S.value -= 1, _e(R.value[S.value], v.value));
|
|
1870
|
+
else if (h === "Enter") {
|
|
1871
|
+
g.preventDefault();
|
|
1872
|
+
const _ = X.value[S.value];
|
|
1873
|
+
_ && J(_), E.value?.blur();
|
|
1874
|
+
} else h === "Escape" ? (g.preventDefault(), de()) : h === "Backspace" ? s.value && C.value === "" && f.value.length && (f.value = f.value.slice(0, -1), a.value = [...f.value], n("change", a.value)) : h === "Home" ? (S.value = 0, _e(R.value[0], v.value)) : h === "End" ? (S.value = X.value.length - 1, _e(R.value[S.value], v.value)) : h === "Tab" && de();
|
|
1875
|
+
}, _t = () => {
|
|
1876
|
+
r.value || (w.value = !0);
|
|
1877
|
+
}, $t = () => {
|
|
1878
|
+
w.value = !1, C.value = "";
|
|
1879
|
+
}, Ke = (g) => {
|
|
1880
|
+
g.key === "Escape" && p.value && de();
|
|
1881
|
+
}, Ze = (g) => {
|
|
1882
|
+
u.value && (u.value.contains(g.target) || de());
|
|
1883
|
+
}, We = (g) => {
|
|
1884
|
+
p.value && v.value && !v.value.contains(g.target) && ge();
|
|
2003
1885
|
}, Qe = () => {
|
|
2004
|
-
p.value &&
|
|
1886
|
+
p.value && ge();
|
|
1887
|
+
}, Xe = () => {
|
|
1888
|
+
p.value && ge();
|
|
2005
1889
|
};
|
|
2006
|
-
te(() => t.options, (
|
|
2007
|
-
|
|
1890
|
+
te(() => t.options, (g) => {
|
|
1891
|
+
g?.length && ($.value = [...g]);
|
|
2008
1892
|
}, { immediate: !0 });
|
|
2009
|
-
const
|
|
1893
|
+
const Ye = async () => {
|
|
2010
1894
|
if (s.value)
|
|
2011
1895
|
Array.isArray(a.value) ? f.value = [...a.value] : (f.value = a.value == null ? [] : [a.value], a.value = [...f.value]), !t.options?.length && t.data && await G(f.value);
|
|
2012
1896
|
else {
|
|
2013
1897
|
if (Array.isArray(a.value)) {
|
|
2014
|
-
const
|
|
2015
|
-
a.value =
|
|
1898
|
+
const g = a.value[0] ?? null;
|
|
1899
|
+
a.value = g ?? null;
|
|
2016
1900
|
}
|
|
2017
|
-
|
|
1901
|
+
b.value = await I(a.value);
|
|
2018
1902
|
}
|
|
2019
1903
|
};
|
|
2020
1904
|
te(a, () => {
|
|
2021
|
-
|
|
2022
|
-
}),
|
|
2023
|
-
addEventListener("keydown",
|
|
2024
|
-
}),
|
|
2025
|
-
removeEventListener("keydown",
|
|
1905
|
+
Ye();
|
|
1906
|
+
}), xe(async () => {
|
|
1907
|
+
addEventListener("keydown", Ke), addEventListener("scroll", We, !0), addEventListener("resize", Qe), document.addEventListener("click", Ze, !0), c.value && he(c.value).addEventListener("scroll", Xe, !0), t.options?.length ? $.value = [...t.options] : t.data && ($.value = await z("")), await Ye();
|
|
1908
|
+
}), Ne(() => {
|
|
1909
|
+
removeEventListener("keydown", Ke), removeEventListener("scroll", We, !0), removeEventListener("resize", Qe), document.removeEventListener("click", Ze, !0), c.value && he(c.value).removeEventListener("scroll", Xe, !0);
|
|
2026
1910
|
});
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
1911
|
+
const Oe = x(!1), Re = x({}), et = x([]), tt = x(null);
|
|
1912
|
+
async function Ct() {
|
|
1913
|
+
if (!t.add?.token || tt?.value.validate())
|
|
1914
|
+
return;
|
|
1915
|
+
const { id: h } = await fetch(`/api/table/${t.add.token}`, {
|
|
2031
1916
|
method: "POST",
|
|
2032
1917
|
headers: { "Content-Type": "application/json" },
|
|
2033
|
-
body: JSON.stringify(
|
|
2034
|
-
}).then((
|
|
1918
|
+
body: JSON.stringify(Re.value)
|
|
1919
|
+
}).then((_) => _.json());
|
|
1920
|
+
if (!t.options?.length && t.data) {
|
|
1921
|
+
const { data: _ } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${h}`).then((N) => N.json());
|
|
1922
|
+
b.value = _[0], $.value.push(_[0]), a.value = h;
|
|
1923
|
+
}
|
|
1924
|
+
Oe.value = !1, be({ title: "Success!", message: "Object created." });
|
|
1925
|
+
}
|
|
1926
|
+
async function Vt() {
|
|
1927
|
+
if (!t.add) return null;
|
|
1928
|
+
const g = await fetch(`/api/template/form/${t.add.form}`).then((h) => h.json());
|
|
1929
|
+
return et.value = g.schema, Oe.value = !0, null;
|
|
2035
1930
|
}
|
|
2036
|
-
function
|
|
2037
|
-
let
|
|
1931
|
+
function Mt(g, h = 200) {
|
|
1932
|
+
let _;
|
|
2038
1933
|
return (...N) => {
|
|
2039
|
-
|
|
1934
|
+
_ && clearTimeout(_), _ = window.setTimeout(() => g(...N), h);
|
|
2040
1935
|
};
|
|
2041
1936
|
}
|
|
2042
|
-
const
|
|
2043
|
-
|
|
1937
|
+
const Lt = Mt(async (g) => {
|
|
1938
|
+
$.value = await z(g);
|
|
2044
1939
|
}, 200);
|
|
2045
|
-
return te(
|
|
2046
|
-
t.data &&
|
|
2047
|
-
}), te(() => t.options, (
|
|
2048
|
-
!t.data &&
|
|
1940
|
+
return te(C, (g) => {
|
|
1941
|
+
t.data && Lt(g.trim());
|
|
1942
|
+
}), te(() => t.options, (g) => {
|
|
1943
|
+
!t.data && g?.length && ($.value = [...g]);
|
|
2049
1944
|
}, { immediate: !0 }), te(() => t.parent ?? t.parentValue, () => {
|
|
2050
|
-
t.data &&
|
|
2051
|
-
}), te(
|
|
2052
|
-
t.data && (s.value ? (f.value = [], a.value = [], n("change", [])) : (
|
|
2053
|
-
}), (
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
1945
|
+
t.data && M();
|
|
1946
|
+
}), te(we, async () => {
|
|
1947
|
+
t.data && (s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)));
|
|
1948
|
+
}), (g, h) => (i(), d(Y, null, [
|
|
1949
|
+
B(q(ht), {
|
|
1950
|
+
visible: Oe.value,
|
|
1951
|
+
"onUpdate:visible": h[1] || (h[1] = (_) => Oe.value = _),
|
|
1952
|
+
title: "Додати",
|
|
1953
|
+
buttonText: "Додати",
|
|
1954
|
+
onDone: Ct
|
|
1955
|
+
}, {
|
|
1956
|
+
default: Le(() => [
|
|
1957
|
+
B(De, {
|
|
1958
|
+
schema: et.value,
|
|
1959
|
+
modelValue: Re.value,
|
|
1960
|
+
"onUpdate:modelValue": h[0] || (h[0] = (_) => Re.value = _),
|
|
1961
|
+
ref_key: "addForm",
|
|
1962
|
+
ref: tt
|
|
1963
|
+
}, null, 8, ["schema", "modelValue"])
|
|
1964
|
+
]),
|
|
1965
|
+
_: 1
|
|
1966
|
+
}, 8, ["visible"]),
|
|
2060
1967
|
l("div", {
|
|
2061
|
-
class:
|
|
1968
|
+
class: "flex gap-1 w-full",
|
|
1969
|
+
ref_key: "selectRoot",
|
|
1970
|
+
ref: u,
|
|
1971
|
+
onClick: h[4] || (h[4] = ve(() => {
|
|
1972
|
+
}, ["stop"]))
|
|
2062
1973
|
}, [
|
|
2063
|
-
b[7] || (b[7] = l("span", {
|
|
2064
|
-
id: "react-select-live-region",
|
|
2065
|
-
class: "sr-only"
|
|
2066
|
-
}, null, -1)),
|
|
2067
|
-
b[8] || (b[8] = l("span", {
|
|
2068
|
-
"aria-live": "polite",
|
|
2069
|
-
"aria-atomic": "false",
|
|
2070
|
-
"aria-relevant": "additions text",
|
|
2071
|
-
role: "log",
|
|
2072
|
-
class: "sr-only"
|
|
2073
|
-
}, null, -1)),
|
|
2074
1974
|
l("div", {
|
|
2075
|
-
class:
|
|
2076
|
-
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
2077
|
-
"border-gray-300 hover:border-gray-400",
|
|
2078
|
-
p.value || x.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
2079
|
-
r.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
2080
|
-
]),
|
|
2081
|
-
role: "combobox",
|
|
2082
|
-
"aria-expanded": p.value,
|
|
2083
|
-
"aria-haspopup": "listbox",
|
|
2084
|
-
onKeydown: Ce,
|
|
2085
|
-
onClick: y,
|
|
2086
|
-
"data-focus": p.value || x.value ? "true" : "false"
|
|
1975
|
+
class: V(["relative w-full font-sans", t.customClass])
|
|
2087
1976
|
}, [
|
|
1977
|
+
h[9] || (h[9] = l("span", {
|
|
1978
|
+
id: "react-select-live-region",
|
|
1979
|
+
class: "sr-only"
|
|
1980
|
+
}, null, -1)),
|
|
1981
|
+
h[10] || (h[10] = l("span", {
|
|
1982
|
+
"aria-live": "polite",
|
|
1983
|
+
"aria-atomic": "false",
|
|
1984
|
+
"aria-relevant": "additions text",
|
|
1985
|
+
role: "log",
|
|
1986
|
+
class: "sr-only"
|
|
1987
|
+
}, null, -1)),
|
|
2088
1988
|
l("div", {
|
|
2089
|
-
class:
|
|
2090
|
-
|
|
2091
|
-
|
|
1989
|
+
class: V([
|
|
1990
|
+
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
1991
|
+
"border-gray-300 hover:border-gray-400",
|
|
1992
|
+
p.value || w.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
1993
|
+
r.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
1994
|
+
]),
|
|
1995
|
+
role: "combobox",
|
|
1996
|
+
"aria-expanded": p.value,
|
|
1997
|
+
"aria-haspopup": "listbox",
|
|
1998
|
+
onKeydown: Ce,
|
|
1999
|
+
onClick: y,
|
|
2000
|
+
"data-focus": p.value || w.value ? "true" : "false"
|
|
2092
2001
|
}, [
|
|
2093
|
-
|
|
2094
|
-
class: "flex
|
|
2095
|
-
|
|
2002
|
+
l("div", {
|
|
2003
|
+
class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
2004
|
+
ref_key: "triggerRef",
|
|
2005
|
+
ref: c
|
|
2096
2006
|
}, [
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2007
|
+
s.value && f.value.length ? (i(!0), d(Y, { key: 0 }, le(Q.value, (_) => (i(), d("div", {
|
|
2008
|
+
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
|
|
2009
|
+
key: _.id
|
|
2010
|
+
}, [
|
|
2011
|
+
l("div", Da, [
|
|
2012
|
+
_?.color ? (i(), d("span", {
|
|
2013
|
+
key: 0,
|
|
2014
|
+
class: "w-[16px] h-[16px] rounded-md block ml-1.5",
|
|
2015
|
+
style: ye({ backgroundColor: _?.color })
|
|
2016
|
+
}, null, 4)) : D("", !0),
|
|
2017
|
+
l("div", {
|
|
2018
|
+
class: "truncate text-gray-900 overflow-hidden",
|
|
2019
|
+
title: _.text
|
|
2020
|
+
}, T(_.text), 9, Oa)
|
|
2021
|
+
]),
|
|
2103
2022
|
l("div", {
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2023
|
+
role: "button",
|
|
2024
|
+
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
2025
|
+
onClick: ve((N) => P(_.id), ["stop"])
|
|
2026
|
+
}, h[5] || (h[5] = [
|
|
2027
|
+
l("svg", {
|
|
2028
|
+
height: "14",
|
|
2029
|
+
width: "14",
|
|
2030
|
+
viewBox: "0 0 20 20",
|
|
2031
|
+
"aria-hidden": "true",
|
|
2032
|
+
focusable: "false",
|
|
2033
|
+
class: "inline-block fill-current stroke-current leading-none stroke-0"
|
|
2034
|
+
}, [
|
|
2035
|
+
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
|
+
], -1)
|
|
2037
|
+
]), 8, Aa)
|
|
2038
|
+
]))), 128)) : !s.value && !w.value && b.value?.text && C.value === "" ? (i(), d("div", {
|
|
2039
|
+
key: 1,
|
|
2040
|
+
class: V(["truncate text-gray-900"]),
|
|
2041
|
+
title: b.value.text
|
|
2042
|
+
}, [
|
|
2043
|
+
b.value?.color ? (i(), d("span", {
|
|
2044
|
+
key: 0,
|
|
2045
|
+
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
|
|
2046
|
+
style: ye({ backgroundColor: b.value?.color })
|
|
2047
|
+
}, null, 4)) : D("", !0),
|
|
2048
|
+
l("span", {
|
|
2049
|
+
class: V({ "pl-5": b.value?.color })
|
|
2050
|
+
}, T(b.value.text), 3)
|
|
2051
|
+
], 8, Ua)) : D("", !0),
|
|
2052
|
+
O.value ? (i(), d("div", Ta, T(U.value), 1)) : D("", !0),
|
|
2053
|
+
l("div", Ra, [
|
|
2054
|
+
!r.value && g.search ? K((i(), d("input", {
|
|
2055
|
+
key: 0,
|
|
2056
|
+
ref_key: "inputRef",
|
|
2057
|
+
ref: E,
|
|
2058
|
+
class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
|
|
2059
|
+
autocapitalize: "none",
|
|
2060
|
+
autocomplete: "off",
|
|
2061
|
+
autocorrect: "off",
|
|
2062
|
+
spellcheck: "false",
|
|
2063
|
+
type: "text",
|
|
2064
|
+
tabindex: "0",
|
|
2065
|
+
"aria-autocomplete": "list",
|
|
2066
|
+
placeholder: (s.value && f.value.length ? " " : null) || (w.value && !C.value?.length ? b.value?.text : " "),
|
|
2067
|
+
"onUpdate:modelValue": h[2] || (h[2] = (_) => C.value = _),
|
|
2068
|
+
onFocus: _t,
|
|
2069
|
+
onBlur: $t,
|
|
2070
|
+
onKeydown: Ve
|
|
2071
|
+
}, null, 40, Pa)), [
|
|
2072
|
+
[se, C.value]
|
|
2073
|
+
]) : D("", !0)
|
|
2074
|
+
])
|
|
2075
|
+
], 512),
|
|
2076
|
+
l("div", Ha, [
|
|
2077
|
+
ue.value ? (i(), d("button", {
|
|
2078
|
+
key: 0,
|
|
2079
|
+
type: "button",
|
|
2080
|
+
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2081
|
+
"aria-hidden": "true",
|
|
2082
|
+
disabled: r.value,
|
|
2083
|
+
onClick: ve(k, ["stop"])
|
|
2084
|
+
}, h[6] || (h[6] = [
|
|
2113
2085
|
l("svg", {
|
|
2114
|
-
height: "
|
|
2115
|
-
width: "
|
|
2086
|
+
height: "20",
|
|
2087
|
+
width: "20",
|
|
2116
2088
|
viewBox: "0 0 20 20",
|
|
2117
|
-
|
|
2118
|
-
focusable: "false",
|
|
2119
|
-
class: "inline-block fill-current stroke-current leading-none stroke-0"
|
|
2089
|
+
class: "fill-current"
|
|
2120
2090
|
}, [
|
|
2121
2091
|
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" })
|
|
2122
2092
|
], -1)
|
|
2123
|
-
]), 8,
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
ref_key: "inputRef",
|
|
2143
|
-
ref: z,
|
|
2144
|
-
class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
|
|
2145
|
-
autocapitalize: "none",
|
|
2146
|
-
autocomplete: "off",
|
|
2147
|
-
autocorrect: "off",
|
|
2148
|
-
spellcheck: "false",
|
|
2149
|
-
type: "text",
|
|
2150
|
-
tabindex: "0",
|
|
2151
|
-
"aria-autocomplete": "list",
|
|
2152
|
-
placeholder: (s.value && f.value.length ? " " : null) || (x.value && !$.value?.length ? g.value?.text : " "),
|
|
2153
|
-
"onUpdate:modelValue": b[0] || (b[0] = (V) => $.value = V),
|
|
2154
|
-
onFocus: bt,
|
|
2155
|
-
onBlur: yt,
|
|
2156
|
-
onKeydown: Ve
|
|
2157
|
-
}, null, 40, Pa)), [
|
|
2158
|
-
[re, $.value]
|
|
2159
|
-
]) : A("", !0)
|
|
2093
|
+
]), 8, Na)) : D("", !0),
|
|
2094
|
+
h[8] || (h[8] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2095
|
+
l("button", {
|
|
2096
|
+
type: "button",
|
|
2097
|
+
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2098
|
+
"aria-hidden": "true",
|
|
2099
|
+
disabled: r.value,
|
|
2100
|
+
onClick: h[3] || (h[3] = ve((_) => ke(), ["stop"])),
|
|
2101
|
+
title: p.value ? "Закрити список" : "Відкрити список"
|
|
2102
|
+
}, h[7] || (h[7] = [
|
|
2103
|
+
l("svg", {
|
|
2104
|
+
height: "20",
|
|
2105
|
+
width: "20",
|
|
2106
|
+
viewBox: "0 0 20 20",
|
|
2107
|
+
class: "fill-current"
|
|
2108
|
+
}, [
|
|
2109
|
+
l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
|
|
2110
|
+
], -1)
|
|
2111
|
+
]), 8, qa)
|
|
2160
2112
|
])
|
|
2161
|
-
],
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
height: "20",
|
|
2191
|
-
width: "20",
|
|
2192
|
-
viewBox: "0 0 20 20",
|
|
2193
|
-
class: "fill-current"
|
|
2113
|
+
], 42, Fa),
|
|
2114
|
+
p.value ? (i(), d("div", {
|
|
2115
|
+
key: 0,
|
|
2116
|
+
class: V([
|
|
2117
|
+
"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)]",
|
|
2118
|
+
j.value === "bottom" ? "mt-2" : "mb-2"
|
|
2119
|
+
]),
|
|
2120
|
+
style: ye(m.value),
|
|
2121
|
+
role: "listbox"
|
|
2122
|
+
}, [
|
|
2123
|
+
l("div", {
|
|
2124
|
+
class: "overflow-y-auto py-1",
|
|
2125
|
+
style: ye({ maxHeight: m.value.maxHeight || "300px" }),
|
|
2126
|
+
ref_key: "listRef",
|
|
2127
|
+
ref: v
|
|
2128
|
+
}, [
|
|
2129
|
+
X.value.length ? (i(!0), d(Y, { key: 0 }, le(X.value, (_, N) => (i(), d("div", {
|
|
2130
|
+
key: _.id,
|
|
2131
|
+
ref_for: !0,
|
|
2132
|
+
ref: (re) => R.value[N] = re,
|
|
2133
|
+
class: V([
|
|
2134
|
+
"flex px-3 py-2 cursor-default select-none text-gray-900 hover:bg-blue-100",
|
|
2135
|
+
S.value === N ? "bg-blue-100" : "",
|
|
2136
|
+
ee(_.id) ? "bg-blue-50" : "bg-white"
|
|
2137
|
+
]),
|
|
2138
|
+
"aria-disabled": ee(_.id) ? "true" : "false",
|
|
2139
|
+
role: "option",
|
|
2140
|
+
tabindex: "-1",
|
|
2141
|
+
onClick: (re) => ne(_)
|
|
2194
2142
|
}, [
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2143
|
+
_?.color ? (i(), d("span", {
|
|
2144
|
+
key: 0,
|
|
2145
|
+
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2146
|
+
style: ye({ backgroundColor: _?.color })
|
|
2147
|
+
}, null, 4)) : D("", !0),
|
|
2148
|
+
l("div", {
|
|
2149
|
+
class: V([
|
|
2150
|
+
"leading-[19px]",
|
|
2151
|
+
S.value === _.id ? "text-white" : "",
|
|
2152
|
+
// active style like react-select
|
|
2153
|
+
(S.value === N, "")
|
|
2154
|
+
])
|
|
2155
|
+
}, T(_.text), 3)
|
|
2156
|
+
], 10, Ga))), 128)) : (i(), d("div", Ja, " No options "))
|
|
2157
|
+
], 4)
|
|
2158
|
+
], 6)) : D("", !0)
|
|
2159
|
+
], 2),
|
|
2160
|
+
t.add ? (i(), d("button", {
|
|
2201
2161
|
key: 0,
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
style: ge(m.value),
|
|
2207
|
-
role: "listbox"
|
|
2162
|
+
onClick: Vt,
|
|
2163
|
+
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
|
+
disabled: r.value,
|
|
2165
|
+
type: "button"
|
|
2208
2166
|
}, [
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
ref_for: !0,
|
|
2218
|
-
ref: (se) => R.value[N] = se,
|
|
2219
|
-
class: M([
|
|
2220
|
-
"flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
|
|
2221
|
-
S.value === N ? "bg-blue-300" : "",
|
|
2222
|
-
ee(V.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
|
|
2223
|
-
]),
|
|
2224
|
-
"aria-disabled": ee(V.id) ? "true" : "false",
|
|
2225
|
-
role: "option",
|
|
2226
|
-
tabindex: "-1",
|
|
2227
|
-
onClick: (se) => fe(V)
|
|
2228
|
-
}, [
|
|
2229
|
-
V?.color ? (i(), d("span", {
|
|
2230
|
-
key: 0,
|
|
2231
|
-
class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
|
|
2232
|
-
style: ge({ backgroundColor: V?.color })
|
|
2233
|
-
}, null, 4)) : A("", !0),
|
|
2234
|
-
l("div", {
|
|
2235
|
-
class: M([
|
|
2236
|
-
"leading-[19px]",
|
|
2237
|
-
S.value === V.id ? "text-white" : "",
|
|
2238
|
-
// active style like react-select
|
|
2239
|
-
(S.value === N, "")
|
|
2240
|
-
])
|
|
2241
|
-
}, T(V.text), 3)
|
|
2242
|
-
], 10, Ga))), 128)) : (i(), d("div", Ja, " No options "))
|
|
2243
|
-
], 4)
|
|
2244
|
-
], 6)) : A("", !0)
|
|
2245
|
-
], 2),
|
|
2246
|
-
t.add ? (i(), d("button", {
|
|
2247
|
-
key: 0,
|
|
2248
|
-
onClick: xt,
|
|
2249
|
-
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",
|
|
2250
|
-
disabled: r.value,
|
|
2251
|
-
type: "button"
|
|
2252
|
-
}, [
|
|
2253
|
-
j(Ae, {
|
|
2254
|
-
width: "16",
|
|
2255
|
-
height: "16"
|
|
2256
|
-
}),
|
|
2257
|
-
b[9] || (b[9] = l("span", null, "Додати", -1))
|
|
2258
|
-
], 8, Ka)) : A("", !0)
|
|
2259
|
-
], 512));
|
|
2167
|
+
B(Fe, {
|
|
2168
|
+
width: "16",
|
|
2169
|
+
height: "16"
|
|
2170
|
+
}),
|
|
2171
|
+
h[11] || (h[11] = l("span", null, "Додати", -1))
|
|
2172
|
+
], 8, Ka)) : D("", !0)
|
|
2173
|
+
], 512)
|
|
2174
|
+
], 64));
|
|
2260
2175
|
}
|
|
2261
2176
|
}), Wa = ["placeholder", "disabled"], Qa = /* @__PURE__ */ F({
|
|
2262
2177
|
__name: "vs-input-textarea",
|
|
2263
|
-
props: /* @__PURE__ */
|
|
2178
|
+
props: /* @__PURE__ */ Z({
|
|
2264
2179
|
style: { default: () => ({}) },
|
|
2265
2180
|
customClass: { default: "" },
|
|
2266
2181
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2274,18 +2189,18 @@ const Go = /* @__PURE__ */ H(Ho, [["render", qo]]), Jo = { class: "flex flex-col
|
|
|
2274
2189
|
}),
|
|
2275
2190
|
emits: ["update:modelValue"],
|
|
2276
2191
|
setup(o) {
|
|
2277
|
-
const e = o, { inputClass: t } =
|
|
2192
|
+
const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
|
|
2278
2193
|
return (s, r) => K((i(), d("textarea", {
|
|
2279
2194
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
2280
2195
|
placeholder: s.placeholder,
|
|
2281
2196
|
disabled: s.disabled,
|
|
2282
2197
|
row: "2",
|
|
2283
|
-
class:
|
|
2198
|
+
class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [q(t)]]),
|
|
2284
2199
|
style: {
|
|
2285
2200
|
border: "1px solid #CFD9E0"
|
|
2286
2201
|
}
|
|
2287
2202
|
}, null, 10, Wa)), [
|
|
2288
|
-
[
|
|
2203
|
+
[se, n.value]
|
|
2289
2204
|
]);
|
|
2290
2205
|
}
|
|
2291
2206
|
}), Xa = {}, Ya = {
|
|
@@ -2382,17 +2297,17 @@ const fs = /* @__PURE__ */ H(ds, [["render", ps]]), vs = {}, ms = {
|
|
|
2382
2297
|
};
|
|
2383
2298
|
function hs(o, e) {
|
|
2384
2299
|
return i(), d("svg", ms, e[0] || (e[0] = [
|
|
2385
|
-
|
|
2300
|
+
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)
|
|
2386
2301
|
]));
|
|
2387
2302
|
}
|
|
2388
|
-
const
|
|
2303
|
+
const dt = /* @__PURE__ */ H(vs, [["render", hs]]), gs = {}, bs = {
|
|
2389
2304
|
viewBox: "0 0 178 90",
|
|
2390
2305
|
fill: "none",
|
|
2391
2306
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2392
2307
|
};
|
|
2393
2308
|
function ys(o, e) {
|
|
2394
2309
|
return i(), d("svg", bs, e[0] || (e[0] = [
|
|
2395
|
-
|
|
2310
|
+
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)
|
|
2396
2311
|
]));
|
|
2397
2312
|
}
|
|
2398
2313
|
const xs = /* @__PURE__ */ H(gs, [["render", ys]]), ws = {}, ks = {
|
|
@@ -2409,13 +2324,13 @@ function _s(o, e) {
|
|
|
2409
2324
|
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)
|
|
2410
2325
|
]));
|
|
2411
2326
|
}
|
|
2412
|
-
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" },
|
|
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" }, Fs = { class: "w-full overflow-x-auto" }, Ds = { 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 = {
|
|
2413
2328
|
key: 0,
|
|
2414
2329
|
colspan: "100%",
|
|
2415
2330
|
class: "text-center"
|
|
2416
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__ */ F({
|
|
2417
2332
|
__name: "vs-input-datatable",
|
|
2418
|
-
props: /* @__PURE__ */
|
|
2333
|
+
props: /* @__PURE__ */ Z({
|
|
2419
2334
|
colModel: {},
|
|
2420
2335
|
style: {},
|
|
2421
2336
|
customClass: {},
|
|
@@ -2430,101 +2345,102 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2430
2345
|
}),
|
|
2431
2346
|
emits: ["update:modelValue"],
|
|
2432
2347
|
setup(o) {
|
|
2433
|
-
const e = o, t =
|
|
2348
|
+
const e = o, t = W(o, "modelValue"), n = x({}), s = x(""), r = A(() => {
|
|
2434
2349
|
if (!s.value) return t.value ?? [];
|
|
2435
|
-
const
|
|
2436
|
-
return t.value.filter((
|
|
2437
|
-
const G =
|
|
2438
|
-
return G ? Array.isArray(G) ? G.join(", ").toLowerCase().includes(
|
|
2350
|
+
const z = s.value.toLowerCase();
|
|
2351
|
+
return t.value.filter((M) => e.colModel?.some((I) => {
|
|
2352
|
+
const G = M[I.key];
|
|
2353
|
+
return G ? Array.isArray(G) ? G.join(", ").toLowerCase().includes(z) : String(G).toLowerCase().includes(z) : !1;
|
|
2439
2354
|
}));
|
|
2440
|
-
}), a =
|
|
2441
|
-
a.value =
|
|
2442
|
-
},
|
|
2443
|
-
u.value =
|
|
2444
|
-
},
|
|
2445
|
-
if (a.value === null || a.value ===
|
|
2355
|
+
}), a = x(null), u = x(null), c = x(!1), v = x(null), p = x({ top: 0, left: 0 }), w = (z) => {
|
|
2356
|
+
a.value = z;
|
|
2357
|
+
}, b = (z) => {
|
|
2358
|
+
u.value = z;
|
|
2359
|
+
}, $ = (z) => {
|
|
2360
|
+
if (a.value === null || a.value === z) {
|
|
2446
2361
|
a.value = null, u.value = null;
|
|
2447
2362
|
return;
|
|
2448
2363
|
}
|
|
2449
|
-
const
|
|
2450
|
-
|
|
2451
|
-
}, S = (
|
|
2452
|
-
const
|
|
2453
|
-
p.value = { top:
|
|
2364
|
+
const M = [...t.value], [I] = M.splice(a.value, 1);
|
|
2365
|
+
M.splice(z, 0, I), t.value = M, a.value = null, u.value = null;
|
|
2366
|
+
}, S = (z) => {
|
|
2367
|
+
const I = z.currentTarget.getBoundingClientRect();
|
|
2368
|
+
p.value = { top: I.bottom + window.scrollY, left: I.left + window.scrollX }, c.value = !c.value;
|
|
2454
2369
|
}, R = () => {
|
|
2455
2370
|
v.value && v.value.click();
|
|
2456
|
-
},
|
|
2457
|
-
const
|
|
2458
|
-
if (!
|
|
2371
|
+
}, C = (z) => {
|
|
2372
|
+
const I = z.target.files?.[0];
|
|
2373
|
+
if (!I) return;
|
|
2459
2374
|
const G = new FileReader();
|
|
2460
2375
|
G.onload = (oe) => {
|
|
2461
2376
|
try {
|
|
2462
|
-
const
|
|
2463
|
-
if (typeof
|
|
2464
|
-
const
|
|
2465
|
-
Array.isArray(
|
|
2377
|
+
const de = oe.target?.result;
|
|
2378
|
+
if (typeof de == "string") {
|
|
2379
|
+
const ke = JSON.parse(de);
|
|
2380
|
+
Array.isArray(ke) && t.value.push(...ke);
|
|
2466
2381
|
}
|
|
2467
|
-
} catch (
|
|
2468
|
-
console.error("Error parsing file:",
|
|
2382
|
+
} catch (de) {
|
|
2383
|
+
console.error("Error parsing file:", de);
|
|
2469
2384
|
}
|
|
2470
|
-
}, G.readAsText(
|
|
2471
|
-
},
|
|
2472
|
-
const
|
|
2473
|
-
G.href =
|
|
2385
|
+
}, G.readAsText(I);
|
|
2386
|
+
}, E = () => {
|
|
2387
|
+
const z = JSON.stringify(t.value, null, 2), M = new Blob([z], { type: "application/json" }), I = URL.createObjectURL(M), G = document.createElement("a");
|
|
2388
|
+
G.href = I, G.download = "data.json", G.click(), URL.revokeObjectURL(I);
|
|
2474
2389
|
};
|
|
2475
|
-
|
|
2476
|
-
const
|
|
2477
|
-
|
|
2478
|
-
const G = await (await fetch(`/api/suggest/${
|
|
2479
|
-
n.value[
|
|
2390
|
+
xe(async () => {
|
|
2391
|
+
const z = e.colModel?.filter((M) => M.data);
|
|
2392
|
+
z?.length && Promise.all(z.map(async (M) => {
|
|
2393
|
+
const G = await (await fetch(`/api/suggest/${M.data}`)).json();
|
|
2394
|
+
n.value[M.key] = G.data;
|
|
2480
2395
|
}));
|
|
2481
2396
|
});
|
|
2482
|
-
const
|
|
2483
|
-
let f = "edit",
|
|
2484
|
-
const U =
|
|
2485
|
-
async function
|
|
2486
|
-
|
|
2397
|
+
const j = x(""), m = x(!1);
|
|
2398
|
+
let f = "edit", Q = 0;
|
|
2399
|
+
const U = x({}), O = x({});
|
|
2400
|
+
async function ue() {
|
|
2401
|
+
j.value = "Додати", m.value = !0, f = "add", U.value = {};
|
|
2487
2402
|
}
|
|
2488
|
-
function ee(
|
|
2489
|
-
|
|
2403
|
+
function ee(z, M) {
|
|
2404
|
+
const I = M.key || M.name;
|
|
2405
|
+
return n.value[I] && z[I] ? n.value[I].find((G) => G.id.toString() === z[I].toString())?.text ?? z[I] : z[I] || "-";
|
|
2490
2406
|
}
|
|
2491
|
-
async function
|
|
2492
|
-
|
|
2407
|
+
async function X(z, M) {
|
|
2408
|
+
j.value = "Редагувати", m.value = !0, f = "edit", Q = M, U.value = { ...z };
|
|
2493
2409
|
}
|
|
2494
2410
|
function je() {
|
|
2495
|
-
const
|
|
2496
|
-
if (
|
|
2497
|
-
|
|
2411
|
+
const z = O.value.validate();
|
|
2412
|
+
if (z) {
|
|
2413
|
+
be({ type: "warning", title: "Помилка валідації", message: Object.entries(z).map(([M, I]) => `${M}: ${I}`).join(`
|
|
2498
2414
|
`) });
|
|
2499
2415
|
return;
|
|
2500
2416
|
}
|
|
2501
|
-
f === "add" ? Array.isArray(t.value) ? t.value = [...t.value, U.value] : t.value = [U.value] : t.value = t.value.map((
|
|
2417
|
+
f === "add" ? Array.isArray(t.value) ? t.value = [...t.value, U.value] : t.value = [U.value] : t.value = t.value.map((M, I) => I === Q ? U.value : M), m.value = !1;
|
|
2502
2418
|
}
|
|
2503
|
-
function
|
|
2504
|
-
t.value = t.value.filter((
|
|
2419
|
+
function we(z) {
|
|
2420
|
+
t.value = t.value.filter((M, I) => I !== z);
|
|
2505
2421
|
}
|
|
2506
|
-
return (
|
|
2422
|
+
return (z, M) => (i(), d("div", Cs, [
|
|
2507
2423
|
l("div", Vs, [
|
|
2508
2424
|
l("div", Ms, [
|
|
2509
|
-
|
|
2425
|
+
B(ts, {
|
|
2510
2426
|
width: "14",
|
|
2511
2427
|
height: "14",
|
|
2512
2428
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
|
|
2513
2429
|
}),
|
|
2514
2430
|
K(l("input", {
|
|
2515
2431
|
type: "text",
|
|
2516
|
-
"onUpdate:modelValue":
|
|
2432
|
+
"onUpdate:modelValue": M[0] || (M[0] = (I) => s.value = I),
|
|
2517
2433
|
placeholder: "Пошук",
|
|
2518
2434
|
class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
|
|
2519
2435
|
}, null, 512), [
|
|
2520
|
-
[
|
|
2436
|
+
[se, s.value]
|
|
2521
2437
|
])
|
|
2522
2438
|
]),
|
|
2523
2439
|
l("div", Ls, [
|
|
2524
2440
|
l("input", {
|
|
2525
2441
|
ref_key: "fileInput",
|
|
2526
2442
|
ref: v,
|
|
2527
|
-
onChange:
|
|
2443
|
+
onChange: C,
|
|
2528
2444
|
class: "hidden",
|
|
2529
2445
|
accept: ".json",
|
|
2530
2446
|
type: "file"
|
|
@@ -2536,7 +2452,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2536
2452
|
onClick: S,
|
|
2537
2453
|
class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2538
2454
|
}, [
|
|
2539
|
-
|
|
2455
|
+
B(ss, {
|
|
2540
2456
|
height: "16",
|
|
2541
2457
|
width: "16"
|
|
2542
2458
|
})
|
|
@@ -2545,11 +2461,11 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2545
2461
|
])
|
|
2546
2462
|
])
|
|
2547
2463
|
]),
|
|
2548
|
-
(i(), ae(
|
|
2464
|
+
(i(), ae(It, { to: "body" }, [
|
|
2549
2465
|
c.value ? (i(), d("div", {
|
|
2550
2466
|
key: 0,
|
|
2551
2467
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2552
|
-
style:
|
|
2468
|
+
style: ye([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
|
|
2553
2469
|
}, [
|
|
2554
2470
|
l("div", Is, [
|
|
2555
2471
|
l("div", zs, [
|
|
@@ -2557,113 +2473,113 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2557
2473
|
onClick: R,
|
|
2558
2474
|
class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2559
2475
|
}, [
|
|
2560
|
-
|
|
2476
|
+
B(us, {
|
|
2561
2477
|
class: "text-black",
|
|
2562
2478
|
width: "14",
|
|
2563
2479
|
height: "14"
|
|
2564
2480
|
}),
|
|
2565
|
-
|
|
2481
|
+
M[4] || (M[4] = fe(" Імпортувати ", -1))
|
|
2566
2482
|
]),
|
|
2567
2483
|
l("button", {
|
|
2568
|
-
onClick:
|
|
2484
|
+
onClick: E,
|
|
2569
2485
|
class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2570
2486
|
}, [
|
|
2571
2487
|
l("span", Es, [
|
|
2572
|
-
|
|
2488
|
+
B(fs, {
|
|
2573
2489
|
class: "text-black",
|
|
2574
2490
|
width: "14",
|
|
2575
2491
|
height: "14"
|
|
2576
2492
|
}),
|
|
2577
|
-
|
|
2493
|
+
M[5] || (M[5] = fe(" Експортувати ", -1))
|
|
2578
2494
|
])
|
|
2579
2495
|
])
|
|
2580
2496
|
])
|
|
2581
2497
|
])
|
|
2582
|
-
], 4)) :
|
|
2498
|
+
], 4)) : D("", !0)
|
|
2583
2499
|
])),
|
|
2584
2500
|
l("button", {
|
|
2585
|
-
onClick:
|
|
2501
|
+
onClick: ue,
|
|
2586
2502
|
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"
|
|
2587
2503
|
}, [
|
|
2588
|
-
|
|
2589
|
-
|
|
2504
|
+
B(Fe),
|
|
2505
|
+
M[6] || (M[6] = fe(" Додати ", -1))
|
|
2590
2506
|
])
|
|
2591
2507
|
]),
|
|
2592
|
-
l("div",
|
|
2593
|
-
l("table",
|
|
2594
|
-
l("thead",
|
|
2595
|
-
l("tr",
|
|
2508
|
+
l("div", Fs, [
|
|
2509
|
+
l("table", Ds, [
|
|
2510
|
+
l("thead", Os, [
|
|
2511
|
+
l("tr", As, [
|
|
2596
2512
|
l("th", Us, [
|
|
2597
|
-
|
|
2513
|
+
B(dt, {
|
|
2598
2514
|
width: "24",
|
|
2599
2515
|
height: "24",
|
|
2600
2516
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2601
2517
|
})
|
|
2602
2518
|
]),
|
|
2603
|
-
(i(!0), d(Y, null, le(
|
|
2604
|
-
key:
|
|
2519
|
+
(i(!0), d(Y, null, le(z.colModel, (I) => (i(), d("th", {
|
|
2520
|
+
key: I.key,
|
|
2605
2521
|
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]"
|
|
2606
|
-
}, T(
|
|
2607
|
-
|
|
2522
|
+
}, T(I.ua || I.label), 1))), 128)),
|
|
2523
|
+
M[7] || (M[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
|
|
2608
2524
|
])
|
|
2609
2525
|
]),
|
|
2610
2526
|
l("tbody", {
|
|
2611
|
-
class:
|
|
2527
|
+
class: V({ "[&_tr:last-child]:border-0": !u.value })
|
|
2612
2528
|
}, [
|
|
2613
2529
|
r.value.length === 0 ? (i(), d("td", Ts, [
|
|
2614
2530
|
l("div", Rs, [
|
|
2615
2531
|
l("div", Ps, [
|
|
2616
|
-
|
|
2617
|
-
|
|
2532
|
+
B(xs, { class: "w-48 mx-auto" }),
|
|
2533
|
+
M[8] || (M[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
2618
2534
|
l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
2619
2535
|
l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
2620
2536
|
], -1))
|
|
2621
2537
|
])
|
|
2622
2538
|
])
|
|
2623
|
-
])) :
|
|
2624
|
-
(i(!0), d(Y, null, le(r.value, (
|
|
2625
|
-
key:
|
|
2626
|
-
class:
|
|
2539
|
+
])) : D("", !0),
|
|
2540
|
+
(i(!0), d(Y, null, le(r.value, (I, G) => (i(), d("tr", {
|
|
2541
|
+
key: I.id,
|
|
2542
|
+
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", {
|
|
2627
2543
|
"opacity-50": a.value === G,
|
|
2628
2544
|
"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": u.value === G
|
|
2629
2545
|
}]),
|
|
2630
2546
|
draggable: "true",
|
|
2631
|
-
onDragstart: (oe) =>
|
|
2632
|
-
onDragover: ve((oe) =>
|
|
2633
|
-
onDrop: (oe) =>
|
|
2547
|
+
onDragstart: (oe) => w(G),
|
|
2548
|
+
onDragover: ve((oe) => b(G), ["prevent"]),
|
|
2549
|
+
onDrop: (oe) => $(G)
|
|
2634
2550
|
}, [
|
|
2635
2551
|
l("td", Ns, [
|
|
2636
2552
|
l("div", qs, [
|
|
2637
|
-
|
|
2553
|
+
B(dt, {
|
|
2638
2554
|
width: "24",
|
|
2639
2555
|
height: "24",
|
|
2640
2556
|
class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
|
|
2641
2557
|
})
|
|
2642
2558
|
])
|
|
2643
2559
|
]),
|
|
2644
|
-
(i(!0), d(Y, null, le(
|
|
2560
|
+
(i(!0), d(Y, null, le(z.colModel, (oe) => (i(), d("td", {
|
|
2645
2561
|
key: oe.key,
|
|
2646
2562
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2647
2563
|
}, [
|
|
2648
|
-
l("div", Gs, T(ee(
|
|
2564
|
+
l("div", Gs, T(ee(I, oe)), 1)
|
|
2649
2565
|
]))), 128)),
|
|
2650
2566
|
l("td", Js, [
|
|
2651
2567
|
l("div", Ks, [
|
|
2652
2568
|
l("button", {
|
|
2653
|
-
onClick: (oe) =>
|
|
2569
|
+
onClick: (oe) => X(I, G),
|
|
2654
2570
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2655
2571
|
}, [
|
|
2656
|
-
|
|
2572
|
+
B($s, {
|
|
2657
2573
|
width: "24",
|
|
2658
2574
|
height: "24",
|
|
2659
2575
|
class: "w-3 h-3"
|
|
2660
2576
|
})
|
|
2661
2577
|
], 8, Zs),
|
|
2662
2578
|
l("button", {
|
|
2663
|
-
onClick: (oe) =>
|
|
2579
|
+
onClick: (oe) => we(G),
|
|
2664
2580
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2665
2581
|
}, [
|
|
2666
|
-
|
|
2582
|
+
B(Te, {
|
|
2667
2583
|
width: "24",
|
|
2668
2584
|
height: "24",
|
|
2669
2585
|
class: "w-3 h-3"
|
|
@@ -2675,23 +2591,23 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2675
2591
|
], 2)
|
|
2676
2592
|
])
|
|
2677
2593
|
]),
|
|
2678
|
-
|
|
2594
|
+
B(q(ht), {
|
|
2679
2595
|
visible: m.value,
|
|
2680
|
-
title:
|
|
2596
|
+
title: j.value,
|
|
2681
2597
|
size: "lg"
|
|
2682
2598
|
}, {
|
|
2683
|
-
default:
|
|
2684
|
-
|
|
2599
|
+
default: Le(() => [
|
|
2600
|
+
B(De, {
|
|
2685
2601
|
schema: e.colModel,
|
|
2686
2602
|
values: U.value,
|
|
2687
|
-
"onUpdate:values":
|
|
2688
|
-
form:
|
|
2689
|
-
"onUpdate:form":
|
|
2603
|
+
"onUpdate:values": M[1] || (M[1] = (I) => U.value = I),
|
|
2604
|
+
form: O.value,
|
|
2605
|
+
"onUpdate:form": M[2] || (M[2] = (I) => O.value = I)
|
|
2690
2606
|
}, null, 8, ["schema", "values", "form"]),
|
|
2691
2607
|
l("div", Qs, [
|
|
2692
2608
|
l("button", {
|
|
2693
2609
|
type: "button",
|
|
2694
|
-
onClick:
|
|
2610
|
+
onClick: M[3] || (M[3] = (I) => m.value = !1),
|
|
2695
2611
|
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
2696
2612
|
}, " Скасувати "),
|
|
2697
2613
|
l("button", {
|
|
@@ -2882,7 +2798,7 @@ const un = /* @__PURE__ */ H(sn, [["render", rn]]), dn = {}, cn = {
|
|
|
2882
2798
|
};
|
|
2883
2799
|
function pn(o, e) {
|
|
2884
2800
|
return i(), d("svg", cn, e[0] || (e[0] = [
|
|
2885
|
-
|
|
2801
|
+
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)
|
|
2886
2802
|
]));
|
|
2887
2803
|
}
|
|
2888
2804
|
const fn = /* @__PURE__ */ H(dn, [["render", pn]]), vn = {}, mn = {
|
|
@@ -2897,7 +2813,7 @@ const fn = /* @__PURE__ */ H(dn, [["render", pn]]), vn = {}, mn = {
|
|
|
2897
2813
|
};
|
|
2898
2814
|
function hn(o, e) {
|
|
2899
2815
|
return i(), d("svg", mn, e[0] || (e[0] = [
|
|
2900
|
-
|
|
2816
|
+
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)
|
|
2901
2817
|
]));
|
|
2902
2818
|
}
|
|
2903
2819
|
const gn = /* @__PURE__ */ H(vn, [["render", hn]]), bn = {}, yn = {
|
|
@@ -2952,10 +2868,10 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2952
2868
|
"stroke-width": "2",
|
|
2953
2869
|
"stroke-linecap": "round",
|
|
2954
2870
|
"stroke-linejoin": "round"
|
|
2955
|
-
},
|
|
2871
|
+
}, Fn = { class: "relative w-full" }, Dn = { class: "vs-form-text relative bg-white rounded-lg" }, On = {
|
|
2956
2872
|
key: 1,
|
|
2957
2873
|
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"
|
|
2958
|
-
},
|
|
2874
|
+
}, An = { key: 0 }, Un = ["onClick"], Tn = {
|
|
2959
2875
|
key: 1,
|
|
2960
2876
|
class: "px-3 py-2 text-xs text-gray-500"
|
|
2961
2877
|
}, Rn = {
|
|
@@ -2968,44 +2884,44 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
2968
2884
|
},
|
|
2969
2885
|
emits: ["goToCoordinates"],
|
|
2970
2886
|
setup(o, { emit: e }) {
|
|
2971
|
-
const t = e, n =
|
|
2887
|
+
const t = e, n = x(!1), s = x("coordinates"), r = x(""), a = x([]), u = x(!1), c = x(!1);
|
|
2972
2888
|
let v;
|
|
2973
2889
|
const p = [
|
|
2974
2890
|
{ value: "coordinates", label: "Пошук по кординатам" },
|
|
2975
2891
|
{ value: "atu", label: "АТУ" },
|
|
2976
2892
|
{ value: "address", label: "Адресса" },
|
|
2977
2893
|
{ value: "search_here", label: "Пошук HERE" }
|
|
2978
|
-
],
|
|
2979
|
-
function
|
|
2980
|
-
s.value =
|
|
2894
|
+
], w = A(() => p.find((j) => j.value === s.value)?.label ?? "АТУ");
|
|
2895
|
+
function b(j) {
|
|
2896
|
+
s.value = j.value, n.value = !1, r.value = "", r.value && R();
|
|
2981
2897
|
}
|
|
2982
|
-
function
|
|
2983
|
-
|
|
2898
|
+
function $(j) {
|
|
2899
|
+
j.target.closest(".map-search__input") || (n.value = !1);
|
|
2984
2900
|
}
|
|
2985
|
-
|
|
2986
|
-
async function S(
|
|
2901
|
+
xe(() => document.addEventListener("click", $)), Ne(() => document.removeEventListener("click", $));
|
|
2902
|
+
async function S(j) {
|
|
2987
2903
|
let m;
|
|
2988
2904
|
s.value === "atu" ? m = "/api/suggest/atu.nsdi.ato_level" : s.value === "address" ? m = "/api/suggest/map.address_id" : s.value === "search_here" && (m = "/api/gis-url-proxy");
|
|
2989
2905
|
const f = new URL(m || "");
|
|
2990
|
-
return s.value === "search_here" ? f.searchParams.set("searchtext",
|
|
2906
|
+
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();
|
|
2991
2907
|
}
|
|
2992
2908
|
function R() {
|
|
2993
2909
|
if (u.value = !0, c.value = !0, s.value === "coordinates") {
|
|
2994
|
-
const
|
|
2995
|
-
if (
|
|
2996
|
-
const m = parseFloat(
|
|
2910
|
+
const j = r.value.trim().split(",");
|
|
2911
|
+
if (j.length === 2) {
|
|
2912
|
+
const m = parseFloat(j[0]), f = parseFloat(j[1]);
|
|
2997
2913
|
!Number.isNaN(m) && !Number.isNaN(f) && t("goToCoordinates", [m, f]);
|
|
2998
2914
|
}
|
|
2999
2915
|
return;
|
|
3000
2916
|
}
|
|
3001
2917
|
v && window.clearTimeout(v), v = window.setTimeout(async () => {
|
|
3002
|
-
const
|
|
3003
|
-
if (!
|
|
2918
|
+
const j = r.value.trim();
|
|
2919
|
+
if (!j) {
|
|
3004
2920
|
a.value = [], c.value = !1;
|
|
3005
2921
|
return;
|
|
3006
2922
|
}
|
|
3007
2923
|
try {
|
|
3008
|
-
const m = await S(
|
|
2924
|
+
const m = await S(j);
|
|
3009
2925
|
a.value = Array.isArray(m.features) ? m.features : [];
|
|
3010
2926
|
} catch {
|
|
3011
2927
|
a.value = [];
|
|
@@ -3014,13 +2930,13 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3014
2930
|
}
|
|
3015
2931
|
}, 300);
|
|
3016
2932
|
}
|
|
3017
|
-
function
|
|
2933
|
+
function C() {
|
|
3018
2934
|
r.value = "", a.value = [], u.value = !1, c.value = !1;
|
|
3019
2935
|
}
|
|
3020
|
-
function
|
|
3021
|
-
t("goToCoordinates",
|
|
2936
|
+
function E(j) {
|
|
2937
|
+
t("goToCoordinates", j), u.value = !1, c.value = !1, a.value = [];
|
|
3022
2938
|
}
|
|
3023
|
-
return (
|
|
2939
|
+
return (j, m) => (i(), d("div", kn, [
|
|
3024
2940
|
l("div", _n, [
|
|
3025
2941
|
l("div", $n, [
|
|
3026
2942
|
l("div", Cn, [
|
|
@@ -3030,7 +2946,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3030
2946
|
class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
|
|
3031
2947
|
}, [
|
|
3032
2948
|
l("div", Vn, [
|
|
3033
|
-
l("span", Mn, T(
|
|
2949
|
+
l("span", Mn, T(w.value), 1)
|
|
3034
2950
|
]),
|
|
3035
2951
|
m[3] || (m[3] = l("svg", {
|
|
3036
2952
|
class: "stroke-gray-500 absolute right-3 translate-y-1/2 bottom-1/2",
|
|
@@ -3051,7 +2967,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3051
2967
|
l("div", Sn, [
|
|
3052
2968
|
l("div", Bn, [
|
|
3053
2969
|
(i(), d(Y, null, le(p, (f) => l("div", {
|
|
3054
|
-
onClick: (
|
|
2970
|
+
onClick: (Q) => b(f),
|
|
3055
2971
|
key: f.value,
|
|
3056
2972
|
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"
|
|
3057
2973
|
}, [
|
|
@@ -3061,15 +2977,15 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3061
2977
|
]),
|
|
3062
2978
|
f.value === s.value ? (i(), d("svg", En, m[4] || (m[4] = [
|
|
3063
2979
|
l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
3064
|
-
]))) :
|
|
2980
|
+
]))) : D("", !0)
|
|
3065
2981
|
])
|
|
3066
2982
|
], 8, jn)), 64))
|
|
3067
2983
|
])
|
|
3068
2984
|
])
|
|
3069
|
-
])) :
|
|
2985
|
+
])) : D("", !0)
|
|
3070
2986
|
]),
|
|
3071
|
-
l("div",
|
|
3072
|
-
l("div",
|
|
2987
|
+
l("div", Fn, [
|
|
2988
|
+
l("div", Dn, [
|
|
3073
2989
|
m[6] || (m[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
|
|
3074
2990
|
l("svg", {
|
|
3075
2991
|
width: "16",
|
|
@@ -3101,11 +3017,11 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3101
3017
|
placeholder: "lat, lng ex. 50, 30",
|
|
3102
3018
|
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"
|
|
3103
3019
|
}, null, 544), [
|
|
3104
|
-
[
|
|
3020
|
+
[se, r.value]
|
|
3105
3021
|
]),
|
|
3106
3022
|
r.value ? (i(), d("button", {
|
|
3107
3023
|
key: 0,
|
|
3108
|
-
onClick:
|
|
3024
|
+
onClick: C,
|
|
3109
3025
|
class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
|
|
3110
3026
|
"aria-label": "Очистити",
|
|
3111
3027
|
type: "button"
|
|
@@ -3124,16 +3040,16 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3124
3040
|
"stroke-linejoin": "round"
|
|
3125
3041
|
})
|
|
3126
3042
|
], -1)
|
|
3127
|
-
]))) :
|
|
3128
|
-
u.value && s.value !== "coordinates" ? (i(), d("div",
|
|
3129
|
-
a.value.length ? (i(), d("ul",
|
|
3043
|
+
]))) : D("", !0),
|
|
3044
|
+
u.value && s.value !== "coordinates" ? (i(), d("div", On, [
|
|
3045
|
+
a.value.length ? (i(), d("ul", An, [
|
|
3130
3046
|
(i(!0), d(Y, null, le(a.value, (f) => (i(), d("li", {
|
|
3131
3047
|
key: f.properties.place_id,
|
|
3132
|
-
onClick: (
|
|
3048
|
+
onClick: (Q) => E(f),
|
|
3133
3049
|
class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
|
|
3134
3050
|
}, T(f.properties.display_name), 9, Un))), 128))
|
|
3135
3051
|
])) : c.value ? (i(), d("div", Tn, "Шукаю…")) : (i(), d("div", Rn, "Нічого не знайдено"))
|
|
3136
|
-
])) :
|
|
3052
|
+
])) : D("", !0)
|
|
3137
3053
|
])
|
|
3138
3054
|
])
|
|
3139
3055
|
])
|
|
@@ -3147,7 +3063,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3147
3063
|
},
|
|
3148
3064
|
emits: ["onLayerChange"],
|
|
3149
3065
|
setup(o, { emit: e }) {
|
|
3150
|
-
const n =
|
|
3066
|
+
const n = x(Object.keys(o.basemaps)[0]), s = e;
|
|
3151
3067
|
function r(a) {
|
|
3152
3068
|
s("onLayerChange", a), n.value = a;
|
|
3153
3069
|
}
|
|
@@ -3155,7 +3071,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3155
3071
|
l("div", Nn, [
|
|
3156
3072
|
(i(!0), d(Y, null, le(a.basemaps, (c, v) => (i(), d("div", {
|
|
3157
3073
|
key: v,
|
|
3158
|
-
class:
|
|
3074
|
+
class: V(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === v }]),
|
|
3159
3075
|
onClick: (p) => r(v),
|
|
3160
3076
|
title: c.name || v,
|
|
3161
3077
|
role: "button",
|
|
@@ -3193,26 +3109,26 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3193
3109
|
},
|
|
3194
3110
|
emits: ["update:modelValue"],
|
|
3195
3111
|
setup(o, { emit: e }) {
|
|
3196
|
-
const t =
|
|
3112
|
+
const t = zt(), n = o, s = e, r = x(null);
|
|
3197
3113
|
let a, u, c;
|
|
3198
|
-
const v =
|
|
3199
|
-
let
|
|
3200
|
-
const
|
|
3201
|
-
function
|
|
3114
|
+
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
|
+
let C;
|
|
3116
|
+
const E = x("topo100");
|
|
3117
|
+
function j() {
|
|
3202
3118
|
return new Promise((y, k) => {
|
|
3203
3119
|
window.L && window.L.Draw && y(0);
|
|
3204
|
-
const P = (
|
|
3205
|
-
if (Array.from(document.styleSheets).some((
|
|
3206
|
-
const
|
|
3207
|
-
|
|
3208
|
-
}, J = (
|
|
3209
|
-
const
|
|
3210
|
-
if (
|
|
3211
|
-
|
|
3120
|
+
const P = (ne) => {
|
|
3121
|
+
if (Array.from(document.styleSheets).some((ge) => ge?.href?.includes(ne))) return;
|
|
3122
|
+
const he = document.createElement("link");
|
|
3123
|
+
he.rel = "stylesheet", he.href = ne, document.head.appendChild(he);
|
|
3124
|
+
}, J = (ne) => new Promise((_e, he) => {
|
|
3125
|
+
const ge = Array.from(document.scripts).find((Ve) => Ve.src === ne);
|
|
3126
|
+
if (ge) {
|
|
3127
|
+
ge.addEventListener("load", () => _e()), ge.addEventListener("error", (Ve) => he(Ve));
|
|
3212
3128
|
return;
|
|
3213
3129
|
}
|
|
3214
3130
|
const Ce = document.createElement("script");
|
|
3215
|
-
Ce.src =
|
|
3131
|
+
Ce.src = ne, Ce.async = !0, Ce.onload = () => _e(), Ce.onerror = (Ve) => he(Ve), document.body.appendChild(Ce);
|
|
3216
3132
|
});
|
|
3217
3133
|
P("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), P("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => y(0)).catch(k);
|
|
3218
3134
|
});
|
|
@@ -3220,7 +3136,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3220
3136
|
function m() {
|
|
3221
3137
|
const y = u.toGeoJSON();
|
|
3222
3138
|
let k = null;
|
|
3223
|
-
y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k),
|
|
3139
|
+
y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k), b.value = u.getLayers().length;
|
|
3224
3140
|
}
|
|
3225
3141
|
function f(y = 30) {
|
|
3226
3142
|
const k = u.getLayers();
|
|
@@ -3228,14 +3144,14 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3228
3144
|
const J = L.featureGroup(k).getBounds();
|
|
3229
3145
|
J && J.isValid() && a.fitBounds(J, { padding: [y, y] });
|
|
3230
3146
|
}
|
|
3231
|
-
function
|
|
3147
|
+
function Q() {
|
|
3232
3148
|
v.value?.click();
|
|
3233
3149
|
}
|
|
3234
|
-
const U =
|
|
3235
|
-
function
|
|
3150
|
+
const U = x("");
|
|
3151
|
+
function O(y) {
|
|
3236
3152
|
return y instanceof L.Circle ? "Circle" : y instanceof L.Rectangle ? "Rectangle" : y instanceof L.Polygon && !(y instanceof L.Rectangle) ? "Polygon" : y instanceof L.Polyline && !(y instanceof L.Polygon) ? "Polyline" : y instanceof L.Marker ? "Point" : "Feature";
|
|
3237
3153
|
}
|
|
3238
|
-
function
|
|
3154
|
+
function ue(y) {
|
|
3239
3155
|
if (y instanceof L.Circle) {
|
|
3240
3156
|
const k = y.getRadius();
|
|
3241
3157
|
return Math.PI * (k * k) / 1e6;
|
|
@@ -3252,50 +3168,50 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3252
3168
|
function ee(y) {
|
|
3253
3169
|
return y instanceof L.Circle ? y.getLatLng() : y.getBounds ? y.getBounds().getCenter() : y.getLatLng ? y.getLatLng() : a.getCenter();
|
|
3254
3170
|
}
|
|
3255
|
-
function
|
|
3171
|
+
function X() {
|
|
3256
3172
|
const y = u.getLayers();
|
|
3257
3173
|
if (!y.length) {
|
|
3258
|
-
S.value = null,
|
|
3174
|
+
S.value = null, b.value = 0;
|
|
3259
3175
|
return;
|
|
3260
3176
|
}
|
|
3261
|
-
const k = y[y.length - 1], P =
|
|
3177
|
+
const k = y[y.length - 1], P = O(k), J = ee(k), ne = ue(k);
|
|
3262
3178
|
S.value = {
|
|
3263
3179
|
type: P,
|
|
3264
3180
|
center: J,
|
|
3265
|
-
areaKm2:
|
|
3181
|
+
areaKm2: ne,
|
|
3266
3182
|
layer: k
|
|
3267
|
-
},
|
|
3183
|
+
}, b.value = y.length;
|
|
3268
3184
|
}
|
|
3269
3185
|
function je() {
|
|
3270
3186
|
const y = S.value?.layer;
|
|
3271
|
-
y && (y instanceof L.Circle && y.getBounds ? a.fitBounds(y.getBounds(), { padding: [30, 30] }) : y.getBounds ? a.fitBounds(y.getBounds(), { padding: [30, 30] }) : y.getLatLng && a.setView(y.getLatLng(), Math.max(
|
|
3187
|
+
y && (y instanceof L.Circle && y.getBounds ? a.fitBounds(y.getBounds(), { padding: [30, 30] }) : y.getBounds ? a.fitBounds(y.getBounds(), { padding: [30, 30] }) : y.getLatLng && a.setView(y.getLatLng(), Math.max(w.value, 14)));
|
|
3272
3188
|
}
|
|
3273
|
-
function
|
|
3189
|
+
function we() {
|
|
3274
3190
|
const y = S.value?.layer;
|
|
3275
|
-
y && (u.removeLayer(y), m(),
|
|
3191
|
+
y && (u.removeLayer(y), m(), X());
|
|
3276
3192
|
}
|
|
3277
|
-
|
|
3278
|
-
await
|
|
3193
|
+
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), u = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (P) => {
|
|
3279
3195
|
const { layer: J } = P;
|
|
3280
|
-
u.clearLayers(), u.addLayer(J), m(),
|
|
3196
|
+
u.clearLayers(), u.addLayer(J), m(), X(), f(), U.value = "";
|
|
3281
3197
|
}), a.on(L.Draw.Event.EDITED, () => {
|
|
3282
|
-
m(),
|
|
3198
|
+
m(), X(), f();
|
|
3283
3199
|
}), a.on(L.Draw.Event.DELETED, () => {
|
|
3284
|
-
m(),
|
|
3200
|
+
m(), X(), f();
|
|
3285
3201
|
});
|
|
3286
3202
|
let y = !1;
|
|
3287
3203
|
a.on("mousemove", (P) => {
|
|
3288
3204
|
y || (a.invalidateSize(), y = !0), p.value = P.latlng;
|
|
3289
3205
|
}), a.on("zoomend", () => {
|
|
3290
|
-
|
|
3206
|
+
w.value = a.getZoom();
|
|
3291
3207
|
});
|
|
3292
3208
|
const k = en(n.modelValue);
|
|
3293
3209
|
if (k) {
|
|
3294
3210
|
const P = [];
|
|
3295
|
-
L.geoJSON(k).eachLayer((J) => P.push(J)), P.length && u.addLayer(P[0]), m(),
|
|
3211
|
+
L.geoJSON(k).eachLayer((J) => P.push(J)), P.length && u.addLayer(P[0]), m(), X(), f();
|
|
3296
3212
|
}
|
|
3297
3213
|
});
|
|
3298
|
-
function
|
|
3214
|
+
function z(y) {
|
|
3299
3215
|
if (a) {
|
|
3300
3216
|
switch (c && c.disable(), y) {
|
|
3301
3217
|
case "marker":
|
|
@@ -3317,11 +3233,11 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3317
3233
|
c && (c.enable(), U.value = y);
|
|
3318
3234
|
}
|
|
3319
3235
|
}
|
|
3320
|
-
function
|
|
3236
|
+
function M() {
|
|
3321
3237
|
const y = u.toGeoJSON(), k = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), P = URL.createObjectURL(k), J = document.createElement("a");
|
|
3322
3238
|
J.href = P, J.download = "data.geojson", J.click(), URL.revokeObjectURL(P);
|
|
3323
3239
|
}
|
|
3324
|
-
function
|
|
3240
|
+
function I(y) {
|
|
3325
3241
|
const k = y.target.files?.[0];
|
|
3326
3242
|
if (!k) return;
|
|
3327
3243
|
const P = new FileReader();
|
|
@@ -3329,16 +3245,16 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3329
3245
|
if (typeof P.result == "string")
|
|
3330
3246
|
try {
|
|
3331
3247
|
const J = JSON.parse(P.result);
|
|
3332
|
-
u.clearLayers(), J && L.geoJSON({ type: "Feature", geometry: J }).eachLayer((
|
|
3333
|
-
u.addLayer(
|
|
3334
|
-
}), m(),
|
|
3248
|
+
u.clearLayers(), J && L.geoJSON({ type: "Feature", geometry: J }).eachLayer((ne) => {
|
|
3249
|
+
u.addLayer(ne);
|
|
3250
|
+
}), m(), X(), f();
|
|
3335
3251
|
} finally {
|
|
3336
3252
|
y.target.value = "";
|
|
3337
3253
|
}
|
|
3338
3254
|
}, P.readAsText(k);
|
|
3339
3255
|
}
|
|
3340
3256
|
function G(y) {
|
|
3341
|
-
a && (
|
|
3257
|
+
a && (C && a.removeLayer(C), C = L.tileLayer(R[y].url, { maxZoom: 19, minZoom: 6 }).addTo(a), E.value = y);
|
|
3342
3258
|
}
|
|
3343
3259
|
function oe(y) {
|
|
3344
3260
|
const k = L.latLng(y[0], y[1]);
|
|
@@ -3347,12 +3263,15 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3347
3263
|
te(
|
|
3348
3264
|
() => n.modelValue,
|
|
3349
3265
|
(y) => {
|
|
3350
|
-
u.clearLayers(), y && L.geoJSON({ type: "Feature", geometry: y }).eachLayer((k) => {
|
|
3351
|
-
u.addLayer(k)
|
|
3352
|
-
|
|
3266
|
+
console.log("update map"), u.clearLayers(), y && L.geoJSON({ type: "Feature", geometry: y }).eachLayer((k) => {
|
|
3267
|
+
u.addLayer(k), k.dragging?.enable(), k.dragging?.enabled(), k.on("dragend", (P) => {
|
|
3268
|
+
const ne = P.target.getLatLng();
|
|
3269
|
+
s("update:modelValue", { type: "Point", coordinates: [ne.lng, ne.lat] });
|
|
3270
|
+
});
|
|
3271
|
+
}), b.value = u.getLayers().length, X(), f();
|
|
3353
3272
|
}
|
|
3354
3273
|
);
|
|
3355
|
-
function
|
|
3274
|
+
function de() {
|
|
3356
3275
|
return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((y, k) => Object.assign(y, { key: `b${k}`, preview: y.preview || y.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((y, k) => ({ ...y, [k.key]: k }), {}) : {
|
|
3357
3276
|
topo100: {
|
|
3358
3277
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
|
|
@@ -3368,13 +3287,13 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3368
3287
|
}
|
|
3369
3288
|
};
|
|
3370
3289
|
}
|
|
3371
|
-
const
|
|
3372
|
-
return te(
|
|
3290
|
+
const ke = x(!1);
|
|
3291
|
+
return te(ke, () => {
|
|
3373
3292
|
setTimeout(() => {
|
|
3374
3293
|
a.invalidateSize();
|
|
3375
3294
|
}, 50);
|
|
3376
3295
|
}), (y, k) => (i(), d("div", {
|
|
3377
|
-
class:
|
|
3296
|
+
class: V(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: ke.value }])
|
|
3378
3297
|
}, [
|
|
3379
3298
|
l("div", {
|
|
3380
3299
|
ref_key: "mapContainer",
|
|
@@ -3382,26 +3301,26 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3382
3301
|
class: "w-full h-full"
|
|
3383
3302
|
}, null, 512),
|
|
3384
3303
|
l("div", Kn, [
|
|
3385
|
-
|
|
3304
|
+
B(Pn, { onGoToCoordinates: oe }),
|
|
3386
3305
|
l("div", Zn, [
|
|
3387
3306
|
l("div", Wn, [
|
|
3388
3307
|
l("button", {
|
|
3389
3308
|
type: "button",
|
|
3390
3309
|
class: "vs-btn-row",
|
|
3391
|
-
onClick:
|
|
3310
|
+
onClick: Q
|
|
3392
3311
|
}, "Import"),
|
|
3393
3312
|
l("button", {
|
|
3394
3313
|
type: "button",
|
|
3395
3314
|
class: "vs-btn-row",
|
|
3396
|
-
onClick:
|
|
3397
|
-
disabled:
|
|
3315
|
+
onClick: M,
|
|
3316
|
+
disabled: b.value === 0
|
|
3398
3317
|
}, "Export ", 8, Qn)
|
|
3399
3318
|
]),
|
|
3400
3319
|
l("input", {
|
|
3401
3320
|
ref_key: "importRef",
|
|
3402
3321
|
ref: v,
|
|
3403
3322
|
type: "file",
|
|
3404
|
-
onChange:
|
|
3323
|
+
onChange: I,
|
|
3405
3324
|
accept: ".json,.geojson",
|
|
3406
3325
|
class: "hidden"
|
|
3407
3326
|
}, null, 544)
|
|
@@ -3410,57 +3329,57 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3410
3329
|
l("div", Xn, [
|
|
3411
3330
|
l("div", Yn, [
|
|
3412
3331
|
l("button", {
|
|
3413
|
-
class:
|
|
3332
|
+
class: V(["vs-btn", { "vs-active": U.value === "marker" }]),
|
|
3414
3333
|
"aria-pressed": U.value === "marker",
|
|
3415
3334
|
title: "Point (P)",
|
|
3416
3335
|
"aria-label": "Draw point",
|
|
3417
|
-
onClick: k[0] || (k[0] = (P) =>
|
|
3336
|
+
onClick: k[0] || (k[0] = (P) => z("marker"))
|
|
3418
3337
|
}, [
|
|
3419
|
-
|
|
3338
|
+
B(an)
|
|
3420
3339
|
], 10, er),
|
|
3421
3340
|
l("button", {
|
|
3422
|
-
class:
|
|
3341
|
+
class: V(["vs-btn", { "vs-active": U.value === "polyline" }]),
|
|
3423
3342
|
"aria-pressed": U.value === "polyline",
|
|
3424
3343
|
title: "Line (L)",
|
|
3425
3344
|
"aria-label": "Draw polyline",
|
|
3426
|
-
onClick: k[1] || (k[1] = (P) =>
|
|
3345
|
+
onClick: k[1] || (k[1] = (P) => z("polyline"))
|
|
3427
3346
|
}, [
|
|
3428
|
-
|
|
3347
|
+
B(un)
|
|
3429
3348
|
], 10, tr),
|
|
3430
3349
|
l("button", {
|
|
3431
|
-
class:
|
|
3350
|
+
class: V(["vs-btn", { "vs-active": U.value === "polygon" }]),
|
|
3432
3351
|
"aria-pressed": U.value === "polygon",
|
|
3433
3352
|
title: "Polygon (G)",
|
|
3434
3353
|
"aria-label": "Draw polygon",
|
|
3435
|
-
onClick: k[2] || (k[2] = (P) =>
|
|
3354
|
+
onClick: k[2] || (k[2] = (P) => z("polygon"))
|
|
3436
3355
|
}, [
|
|
3437
|
-
|
|
3356
|
+
B(fn)
|
|
3438
3357
|
], 10, lr),
|
|
3439
3358
|
l("button", {
|
|
3440
|
-
class:
|
|
3359
|
+
class: V(["vs-btn", { "vs-active": U.value === "rectangle" }]),
|
|
3441
3360
|
"aria-pressed": U.value === "rectangle",
|
|
3442
3361
|
title: "Rectangle (R)",
|
|
3443
3362
|
"aria-label": "Draw rectangle",
|
|
3444
|
-
onClick: k[3] || (k[3] = (P) =>
|
|
3363
|
+
onClick: k[3] || (k[3] = (P) => z("rectangle"))
|
|
3445
3364
|
}, [
|
|
3446
|
-
|
|
3365
|
+
B(gn)
|
|
3447
3366
|
], 10, or),
|
|
3448
3367
|
l("button", {
|
|
3449
3368
|
class: "vs-btn mt-5",
|
|
3450
3369
|
onClick: k[4] || (k[4] = (P) => {
|
|
3451
|
-
|
|
3370
|
+
ke.value = !ke.value;
|
|
3452
3371
|
}),
|
|
3453
3372
|
title: "Full Screen",
|
|
3454
3373
|
"aria-label": "Full Screen"
|
|
3455
3374
|
}, [
|
|
3456
|
-
|
|
3375
|
+
B(wn, { style: { width: "12px", height: "12px" } })
|
|
3457
3376
|
])
|
|
3458
3377
|
])
|
|
3459
3378
|
]),
|
|
3460
3379
|
l("div", {
|
|
3461
|
-
class:
|
|
3380
|
+
class: V(["absolute left-4 z-[1000]", S.value ? "bottom-8" : "bottom-4"])
|
|
3462
3381
|
}, [
|
|
3463
|
-
|
|
3382
|
+
B(Jn, {
|
|
3464
3383
|
basemaps: q(R),
|
|
3465
3384
|
onOnLayerChange: G
|
|
3466
3385
|
}, null, 8, ["basemaps"])
|
|
@@ -3468,19 +3387,19 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3468
3387
|
l("div", ar, [
|
|
3469
3388
|
S.value ? (i(), d("div", sr, [
|
|
3470
3389
|
l("div", nr, [
|
|
3471
|
-
k[7] || (k[7] =
|
|
3390
|
+
k[7] || (k[7] = fe(" Тип: ", -1)),
|
|
3472
3391
|
l("span", rr, T(S.value.type), 1)
|
|
3473
3392
|
]),
|
|
3474
3393
|
l("div", ir, [
|
|
3475
3394
|
l("div", ur, [
|
|
3476
|
-
k[8] || (k[8] =
|
|
3395
|
+
k[8] || (k[8] = fe(" Центр: ", -1)),
|
|
3477
3396
|
l("b", null, T(S.value.center.lat.toFixed(5)) + ", " + T(S.value.center.lng.toFixed(5)), 1)
|
|
3478
3397
|
]),
|
|
3479
3398
|
S.value.areaKm2 !== null ? (i(), d("div", dr, [
|
|
3480
|
-
k[9] || (k[9] =
|
|
3399
|
+
k[9] || (k[9] = fe(" Площа: ", -1)),
|
|
3481
3400
|
l("b", null, T(S.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3482
3401
|
])) : (i(), d("div", cr, k[10] || (k[10] = [
|
|
3483
|
-
|
|
3402
|
+
fe(" Площа: ", -1),
|
|
3484
3403
|
l("b", null, "—", -1)
|
|
3485
3404
|
]))),
|
|
3486
3405
|
l("button", {
|
|
@@ -3488,26 +3407,26 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3488
3407
|
title: "Наблизити",
|
|
3489
3408
|
onClick: k[5] || (k[5] = (P) => je())
|
|
3490
3409
|
}, k[11] || (k[11] = [
|
|
3491
|
-
|
|
3410
|
+
ce('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-5a4c21a7><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-5a4c21a7></path><path d="M7 10l6 0" data-v-5a4c21a7></path><path d="M10 7l0 6" data-v-5a4c21a7></path><path d="M21 21l-6 -6" data-v-5a4c21a7></path></svg>', 1)
|
|
3492
3411
|
])),
|
|
3493
3412
|
l("button", {
|
|
3494
3413
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3495
3414
|
title: "Видалити",
|
|
3496
|
-
onClick: k[6] || (k[6] = (P) =>
|
|
3415
|
+
onClick: k[6] || (k[6] = (P) => we())
|
|
3497
3416
|
}, [
|
|
3498
|
-
|
|
3417
|
+
B(Te, { class: "w-3 h-3" })
|
|
3499
3418
|
])
|
|
3500
3419
|
])
|
|
3501
|
-
])) :
|
|
3420
|
+
])) : D("", !0)
|
|
3502
3421
|
])
|
|
3503
3422
|
], 2));
|
|
3504
3423
|
}
|
|
3505
|
-
}), fr = /* @__PURE__ */ H(pr, [["__scopeId", "data-v-
|
|
3424
|
+
}), 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 = {
|
|
3506
3425
|
key: 0,
|
|
3507
3426
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3508
3427
|
}, yr = { class: "flex-1 min-w-[2px]" }, xr = ["placeholder"], wr = { class: "flex items-center shrink-0" }, kr = ["disabled"], _r = /* @__PURE__ */ F({
|
|
3509
3428
|
__name: "vs-input-tag",
|
|
3510
|
-
props: /* @__PURE__ */
|
|
3429
|
+
props: /* @__PURE__ */ Z({
|
|
3511
3430
|
unique: { type: Boolean, default: !0 },
|
|
3512
3431
|
style: { default: () => ({}) },
|
|
3513
3432
|
customClass: { default: "" },
|
|
@@ -3520,49 +3439,49 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3520
3439
|
modelValue: { default: [] },
|
|
3521
3440
|
modelModifiers: {}
|
|
3522
3441
|
}),
|
|
3523
|
-
emits: /* @__PURE__ */
|
|
3442
|
+
emits: /* @__PURE__ */ Z(["update:modelValue"], ["update:modelValue"]),
|
|
3524
3443
|
setup(o, { emit: e }) {
|
|
3525
3444
|
const t = o, n = e;
|
|
3526
|
-
|
|
3527
|
-
const s =
|
|
3528
|
-
|
|
3445
|
+
me(t.style);
|
|
3446
|
+
const s = x(null), r = x(null), a = x(null), u = x(!1), c = x(""), v = W(o, "modelValue"), p = A(() => t.placeholder || "Add tag…"), w = A(() => v.value?.length === 0 && c.value === ""), b = A(() => !t.disabled && v.value?.length > 0), $ = A(() => t.disabled), S = async () => {
|
|
3447
|
+
$.value || await ze(() => a.value?.focus());
|
|
3529
3448
|
}, R = (U) => {
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3532
|
-
},
|
|
3449
|
+
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], c.value = "");
|
|
3451
|
+
}, C = () => {
|
|
3533
3452
|
const U = c.value;
|
|
3534
3453
|
U.trim() !== "" && R(U), c.value = "";
|
|
3535
|
-
},
|
|
3536
|
-
const
|
|
3537
|
-
|
|
3538
|
-
},
|
|
3454
|
+
}, E = (U) => {
|
|
3455
|
+
const O = v.value.slice();
|
|
3456
|
+
O.splice(U, 1), n("update:modelValue", O);
|
|
3457
|
+
}, j = () => {
|
|
3539
3458
|
n("update:modelValue", []);
|
|
3540
3459
|
}, m = () => {
|
|
3541
|
-
|
|
3460
|
+
$.value || (u.value = !0);
|
|
3542
3461
|
}, f = () => {
|
|
3543
3462
|
u.value = !1;
|
|
3544
|
-
},
|
|
3545
|
-
const { key:
|
|
3546
|
-
|
|
3463
|
+
}, Q = (U) => {
|
|
3464
|
+
const { key: O } = U;
|
|
3465
|
+
O === "Enter" ? (U.preventDefault(), C()) : O === "Backspace" && c.value === "" && v.value.length > 0 && E(v.value.length - 1);
|
|
3547
3466
|
};
|
|
3548
|
-
return (U,
|
|
3467
|
+
return (U, O) => (i(), d("div", {
|
|
3549
3468
|
class: "flex gap-1 w-full",
|
|
3550
3469
|
ref_key: "root",
|
|
3551
3470
|
ref: s,
|
|
3552
|
-
onClick:
|
|
3471
|
+
onClick: O[1] || (O[1] = ve(() => {
|
|
3553
3472
|
}, ["stop"]))
|
|
3554
3473
|
}, [
|
|
3555
3474
|
l("div", {
|
|
3556
|
-
class:
|
|
3475
|
+
class: V(["relative w-full font-sans", t.customClass]),
|
|
3557
3476
|
role: "group",
|
|
3558
3477
|
"aria-label": "Tag input"
|
|
3559
3478
|
}, [
|
|
3560
3479
|
l("div", {
|
|
3561
|
-
class:
|
|
3480
|
+
class: V([
|
|
3562
3481
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
3563
3482
|
"border-gray-300 hover:border-gray-400",
|
|
3564
3483
|
u.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
3565
|
-
|
|
3484
|
+
$.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3566
3485
|
]),
|
|
3567
3486
|
"data-focus": u.value ? "true" : "false",
|
|
3568
3487
|
onClick: S
|
|
@@ -3572,19 +3491,19 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3572
3491
|
ref_key: "chipsRef",
|
|
3573
3492
|
ref: r
|
|
3574
3493
|
}, [
|
|
3575
|
-
(i(!0), d(Y, null, le(v.value, (
|
|
3494
|
+
(i(!0), d(Y, null, le(v.value, (ue, ee) => (i(), d("div", {
|
|
3576
3495
|
key: ee,
|
|
3577
3496
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
|
|
3578
3497
|
}, [
|
|
3579
3498
|
l("div", mr, [
|
|
3580
|
-
l("div", hr, T(
|
|
3499
|
+
l("div", hr, T(ue), 1)
|
|
3581
3500
|
]),
|
|
3582
3501
|
l("div", {
|
|
3583
3502
|
role: "button",
|
|
3584
3503
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
3585
|
-
onClick: ve((
|
|
3586
|
-
"aria-label": `Remove ${
|
|
3587
|
-
},
|
|
3504
|
+
onClick: ve((X) => E(ee), ["stop"]),
|
|
3505
|
+
"aria-label": `Remove ${ue}`
|
|
3506
|
+
}, O[2] || (O[2] = [
|
|
3588
3507
|
l("svg", {
|
|
3589
3508
|
height: "14",
|
|
3590
3509
|
width: "14",
|
|
@@ -3597,9 +3516,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3597
3516
|
], -1)
|
|
3598
3517
|
]), 8, gr)
|
|
3599
3518
|
]))), 128)),
|
|
3600
|
-
|
|
3519
|
+
w.value ? (i(), d("div", br, T(p.value), 1)) : D("", !0),
|
|
3601
3520
|
l("div", yr, [
|
|
3602
|
-
|
|
3521
|
+
$.value ? D("", !0) : K((i(), d("input", {
|
|
3603
3522
|
key: 0,
|
|
3604
3523
|
ref_key: "inputRef",
|
|
3605
3524
|
ref: a,
|
|
@@ -3611,25 +3530,25 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3611
3530
|
type: "text",
|
|
3612
3531
|
tabindex: "0",
|
|
3613
3532
|
"aria-label": "Add tag",
|
|
3614
|
-
"onUpdate:modelValue":
|
|
3533
|
+
"onUpdate:modelValue": O[0] || (O[0] = (ue) => c.value = ue),
|
|
3615
3534
|
onFocus: m,
|
|
3616
3535
|
onBlur: f,
|
|
3617
|
-
onKeydown:
|
|
3536
|
+
onKeydown: Q,
|
|
3618
3537
|
placeholder: v.value && v.value.length ? "" : void 0
|
|
3619
3538
|
}, null, 40, xr)), [
|
|
3620
|
-
[
|
|
3539
|
+
[se, c.value]
|
|
3621
3540
|
])
|
|
3622
3541
|
])
|
|
3623
3542
|
], 512),
|
|
3624
3543
|
l("div", wr, [
|
|
3625
|
-
|
|
3544
|
+
b.value ? (i(), d("button", {
|
|
3626
3545
|
key: 0,
|
|
3627
3546
|
type: "button",
|
|
3628
3547
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
3629
3548
|
"aria-label": "Clear all tags",
|
|
3630
|
-
disabled:
|
|
3631
|
-
onClick: ve(
|
|
3632
|
-
},
|
|
3549
|
+
disabled: $.value,
|
|
3550
|
+
onClick: ve(j, ["stop"])
|
|
3551
|
+
}, O[3] || (O[3] = [
|
|
3633
3552
|
l("svg", {
|
|
3634
3553
|
height: "20",
|
|
3635
3554
|
width: "20",
|
|
@@ -3638,7 +3557,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3638
3557
|
}, [
|
|
3639
3558
|
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" })
|
|
3640
3559
|
], -1)
|
|
3641
|
-
]), 8, kr)) :
|
|
3560
|
+
]), 8, kr)) : D("", !0)
|
|
3642
3561
|
])
|
|
3643
3562
|
], 10, vr)
|
|
3644
3563
|
], 2)
|
|
@@ -3646,7 +3565,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3646
3565
|
}
|
|
3647
3566
|
}), $r = { class: "relative flex gap-1 bg-white w-full" }, Cr = ["disabled", "placeholder"], Vr = /* @__PURE__ */ F({
|
|
3648
3567
|
__name: "vs-input-slug",
|
|
3649
|
-
props: /* @__PURE__ */
|
|
3568
|
+
props: /* @__PURE__ */ Z({
|
|
3650
3569
|
disabled: { type: Boolean },
|
|
3651
3570
|
placeholder: {},
|
|
3652
3571
|
parent: {}
|
|
@@ -3656,7 +3575,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3656
3575
|
}),
|
|
3657
3576
|
emits: ["update:modelValue"],
|
|
3658
3577
|
setup(o) {
|
|
3659
|
-
const e = Me("values"), t = o, n =
|
|
3578
|
+
const e = Me("values"), t = o, n = W(o, "modelValue");
|
|
3660
3579
|
function s(a) {
|
|
3661
3580
|
const u = {
|
|
3662
3581
|
а: "a",
|
|
@@ -3711,7 +3630,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3711
3630
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => n.value = c),
|
|
3712
3631
|
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"
|
|
3713
3632
|
}, null, 8, Cr), [
|
|
3714
|
-
[
|
|
3633
|
+
[se, n.value]
|
|
3715
3634
|
]),
|
|
3716
3635
|
l("button", {
|
|
3717
3636
|
class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
|
|
@@ -3725,7 +3644,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3725
3644
|
}, Br = ["onDragstart", "onDrop"], jr = { class: "w-1/3" }, Ir = { class: "w-2/3" }, zr = ["onClick"], Er = {
|
|
3726
3645
|
key: 0,
|
|
3727
3646
|
class: "text-[14px] text-gray-700"
|
|
3728
|
-
},
|
|
3647
|
+
}, Fr = { class: "mt-2 w-full flex items-center" }, Dr = ["disabled"], Or = /* @__PURE__ */ F({
|
|
3729
3648
|
__name: "vs-input-key-value",
|
|
3730
3649
|
props: {
|
|
3731
3650
|
parent: {},
|
|
@@ -3735,101 +3654,101 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3735
3654
|
},
|
|
3736
3655
|
emits: ["update:modelValue"],
|
|
3737
3656
|
setup(o, { emit: e }) {
|
|
3738
|
-
const t = (
|
|
3657
|
+
const t = (C) => `${C}-${Math.random().toString(36).substring(2, 15)}`, n = Me("values"), s = o, r = e, a = s.addButtonText ?? "Додати", u = s.ignore ?? [], c = x([]), v = x(null);
|
|
3739
3658
|
(() => {
|
|
3740
|
-
const
|
|
3741
|
-
c.value = Object.entries(
|
|
3659
|
+
const C = s.parent && n?.value?.[s.parent] || s.modelValue || {};
|
|
3660
|
+
c.value = Object.entries(C).filter(([E]) => !u.includes(E)).map(([E, j]) => ({
|
|
3742
3661
|
id: t("key-value-"),
|
|
3743
|
-
key:
|
|
3744
|
-
value:
|
|
3662
|
+
key: E,
|
|
3663
|
+
value: j
|
|
3745
3664
|
}));
|
|
3746
3665
|
})();
|
|
3747
|
-
function
|
|
3748
|
-
v.value =
|
|
3666
|
+
function w(C) {
|
|
3667
|
+
v.value = C;
|
|
3749
3668
|
}
|
|
3750
|
-
function
|
|
3751
|
-
if (v.value === null || v.value ===
|
|
3752
|
-
const
|
|
3753
|
-
c.value.splice(
|
|
3669
|
+
function b(C) {
|
|
3670
|
+
if (v.value === null || v.value === C) return;
|
|
3671
|
+
const E = c.value.splice(v.value, 1)[0];
|
|
3672
|
+
c.value.splice(C, 0, E), v.value = null;
|
|
3754
3673
|
}
|
|
3755
|
-
const
|
|
3756
|
-
() => c.value.some((
|
|
3674
|
+
const $ = A(
|
|
3675
|
+
() => c.value.some((C) => C.key && !C.value || !C.key && C.value)
|
|
3757
3676
|
), S = () => {
|
|
3758
3677
|
c.value.push({ id: t("key-value-"), key: "", value: "" });
|
|
3759
|
-
}, R = (
|
|
3760
|
-
c.value = c.value.filter((
|
|
3678
|
+
}, R = (C) => {
|
|
3679
|
+
c.value = c.value.filter((E) => E.id !== C);
|
|
3761
3680
|
};
|
|
3762
3681
|
return te(
|
|
3763
3682
|
c,
|
|
3764
|
-
(
|
|
3765
|
-
const
|
|
3766
|
-
|
|
3767
|
-
m.key && m.value !== void 0 && (
|
|
3683
|
+
(C) => {
|
|
3684
|
+
const E = {};
|
|
3685
|
+
C.forEach((m) => {
|
|
3686
|
+
m.key && m.value !== void 0 && (E[m.key] = m.value);
|
|
3768
3687
|
});
|
|
3769
|
-
const
|
|
3688
|
+
const j = {};
|
|
3770
3689
|
u.length && u.forEach((m) => {
|
|
3771
|
-
|
|
3690
|
+
j[m] = s.parent ? n?.value?.[s.parent]?.[m] : void 0;
|
|
3772
3691
|
}), n?.value && s.parent && (n.value[s.parent] = {
|
|
3773
|
-
...
|
|
3774
|
-
...
|
|
3775
|
-
}), r("update:modelValue",
|
|
3692
|
+
...j,
|
|
3693
|
+
...E
|
|
3694
|
+
}), r("update:modelValue", E);
|
|
3776
3695
|
},
|
|
3777
3696
|
{ deep: !0 }
|
|
3778
|
-
), (
|
|
3697
|
+
), (C, E) => (i(), d("div", Lr, [
|
|
3779
3698
|
l("div", Sr, [
|
|
3780
|
-
(i(!0), d(Y, null, le(c.value, (
|
|
3781
|
-
key:
|
|
3782
|
-
class:
|
|
3699
|
+
(i(!0), d(Y, null, le(c.value, (j, m) => (i(), d("div", {
|
|
3700
|
+
key: j.id,
|
|
3701
|
+
class: V(["flex items-center gap-2 w-full", { "opacity-50": v.value === m }]),
|
|
3783
3702
|
draggable: "true",
|
|
3784
|
-
onDragstart: (f) =>
|
|
3785
|
-
onDragover:
|
|
3703
|
+
onDragstart: (f) => w(m),
|
|
3704
|
+
onDragover: E[0] || (E[0] = ve(() => {
|
|
3786
3705
|
}, ["prevent"])),
|
|
3787
|
-
onDrop: (f) =>
|
|
3706
|
+
onDrop: (f) => b(m)
|
|
3788
3707
|
}, [
|
|
3789
|
-
|
|
3708
|
+
E[1] || (E[1] = ce('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
|
|
3790
3709
|
l("div", jr, [
|
|
3791
|
-
|
|
3792
|
-
modelValue:
|
|
3793
|
-
"onUpdate:modelValue": (f) =>
|
|
3710
|
+
B(Ue, {
|
|
3711
|
+
modelValue: j.key,
|
|
3712
|
+
"onUpdate:modelValue": (f) => j.key = f,
|
|
3794
3713
|
placeholder: "Ключ"
|
|
3795
3714
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3796
3715
|
]),
|
|
3797
3716
|
l("div", Ir, [
|
|
3798
|
-
|
|
3799
|
-
modelValue:
|
|
3800
|
-
"onUpdate:modelValue": (f) =>
|
|
3717
|
+
B(Ue, {
|
|
3718
|
+
modelValue: j.value,
|
|
3719
|
+
"onUpdate:modelValue": (f) => j.value = f,
|
|
3801
3720
|
placeholder: "Значення"
|
|
3802
3721
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3803
3722
|
]),
|
|
3804
3723
|
l("button", {
|
|
3805
|
-
onClick: (f) => R(
|
|
3724
|
+
onClick: (f) => R(j.id),
|
|
3806
3725
|
class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
|
|
3807
3726
|
}, [
|
|
3808
|
-
|
|
3727
|
+
B(q(kl), {
|
|
3809
3728
|
height: "16",
|
|
3810
3729
|
width: "16"
|
|
3811
3730
|
})
|
|
3812
3731
|
], 8, zr)
|
|
3813
3732
|
], 42, Br))), 128))
|
|
3814
3733
|
], 512),
|
|
3815
|
-
c.value.length ?
|
|
3816
|
-
l("div",
|
|
3734
|
+
c.value.length ? D("", !0) : (i(), d("span", Er, " Дані для відображення відсутні ")),
|
|
3735
|
+
l("div", Fr, [
|
|
3817
3736
|
l("button", {
|
|
3818
3737
|
type: "button",
|
|
3819
3738
|
onClick: S,
|
|
3820
|
-
disabled:
|
|
3739
|
+
disabled: $.value,
|
|
3821
3740
|
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"
|
|
3822
3741
|
}, [
|
|
3823
|
-
|
|
3742
|
+
B(Fe, {
|
|
3824
3743
|
height: "14",
|
|
3825
3744
|
width: "14"
|
|
3826
3745
|
}),
|
|
3827
|
-
|
|
3828
|
-
], 8,
|
|
3746
|
+
fe(" " + T(q(a)), 1)
|
|
3747
|
+
], 8, Dr)
|
|
3829
3748
|
])
|
|
3830
3749
|
]));
|
|
3831
3750
|
}
|
|
3832
|
-
}),
|
|
3751
|
+
}), Ar = /* @__PURE__ */ H(Or, [["__scopeId", "data-v-a0f7fbfc"]]), Ur = { class: "flex items-center gap-2 w-full" }, Tr = ["disabled"], Rr = /* @__PURE__ */ F({
|
|
3833
3752
|
__name: "vs-input-color",
|
|
3834
3753
|
props: {
|
|
3835
3754
|
style: { default: () => ({}) },
|
|
@@ -3842,7 +3761,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3842
3761
|
},
|
|
3843
3762
|
emits: ["update:modelValue"],
|
|
3844
3763
|
setup(o, { emit: e }) {
|
|
3845
|
-
const t = o, { inputClass: n } =
|
|
3764
|
+
const t = o, { inputClass: n } = me(t.style), s = e, r = A({
|
|
3846
3765
|
get: () => t.modelValue || "#000000",
|
|
3847
3766
|
set: (a) => s("update:modelValue", a)
|
|
3848
3767
|
});
|
|
@@ -3852,16 +3771,16 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3852
3771
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
|
|
3853
3772
|
disabled: a.disabled,
|
|
3854
3773
|
ref: "color",
|
|
3855
|
-
class:
|
|
3774
|
+
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(" ")]),
|
|
3856
3775
|
style: { border: "1px solid #CFD9E0" }
|
|
3857
3776
|
}, null, 10, Tr), [
|
|
3858
|
-
[
|
|
3777
|
+
[se, r.value]
|
|
3859
3778
|
]),
|
|
3860
3779
|
K(l("input", {
|
|
3861
3780
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
|
|
3862
3781
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => r.value = c)
|
|
3863
3782
|
}, null, 512), [
|
|
3864
|
-
[
|
|
3783
|
+
[se, r.value]
|
|
3865
3784
|
])
|
|
3866
3785
|
]));
|
|
3867
3786
|
}
|
|
@@ -3881,7 +3800,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3881
3800
|
},
|
|
3882
3801
|
emits: ["update:modelValue"],
|
|
3883
3802
|
setup(o, { emit: e }) {
|
|
3884
|
-
const t = o, { inputClass: n } =
|
|
3803
|
+
const t = o, { inputClass: n } = me(t.style), s = e, r = A({
|
|
3885
3804
|
get: () => Number(t.modelValue ?? t.min),
|
|
3886
3805
|
set: (a) => s("update:modelValue", Number(a))
|
|
3887
3806
|
});
|
|
@@ -3894,42 +3813,43 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3894
3813
|
step: a.step,
|
|
3895
3814
|
disabled: a.disabled,
|
|
3896
3815
|
ref: "range",
|
|
3897
|
-
class:
|
|
3816
|
+
class: V(["w-full cursor-pointer accent-blue-500", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")])
|
|
3898
3817
|
}, null, 10, Hr), [
|
|
3899
|
-
[
|
|
3818
|
+
[se, r.value]
|
|
3900
3819
|
]),
|
|
3901
3820
|
K(l("input", {
|
|
3902
3821
|
class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
|
|
3903
3822
|
type: "number",
|
|
3904
3823
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => r.value = c)
|
|
3905
3824
|
}, null, 512), [
|
|
3906
|
-
[
|
|
3825
|
+
[se, r.value]
|
|
3907
3826
|
])
|
|
3908
3827
|
]));
|
|
3909
3828
|
}
|
|
3910
3829
|
}), qr = {
|
|
3911
|
-
VsInputText:
|
|
3912
|
-
VsInputRadio:
|
|
3913
|
-
"vs-input-text":
|
|
3830
|
+
VsInputText: Ue,
|
|
3831
|
+
VsInputRadio: rt,
|
|
3832
|
+
"vs-input-text": Ue,
|
|
3833
|
+
"vs-input-password": Wt,
|
|
3914
3834
|
"vs-input-textarea": Qa,
|
|
3915
|
-
"vs-input-mask":
|
|
3916
|
-
"vs-input-number":
|
|
3917
|
-
"vs-input-radio":
|
|
3835
|
+
"vs-input-mask": zl,
|
|
3836
|
+
"vs-input-number": Yt,
|
|
3837
|
+
"vs-input-radio": rt,
|
|
3918
3838
|
"vs-input-select": Za,
|
|
3919
|
-
"vs-input-switcher":
|
|
3920
|
-
"vs-input-static":
|
|
3921
|
-
"vs-input-container":
|
|
3922
|
-
"vs-input-date":
|
|
3923
|
-
"vs-input-checkbox":
|
|
3924
|
-
"vs-input-file":
|
|
3925
|
-
"vs-input-html":
|
|
3926
|
-
"vs-input-email":
|
|
3839
|
+
"vs-input-switcher": bt,
|
|
3840
|
+
"vs-input-static": nt,
|
|
3841
|
+
"vs-input-container": Ea,
|
|
3842
|
+
"vs-input-date": Jl,
|
|
3843
|
+
"vs-input-checkbox": ql,
|
|
3844
|
+
"vs-input-file": zo,
|
|
3845
|
+
"vs-input-html": nt,
|
|
3846
|
+
"vs-input-email": Dl,
|
|
3927
3847
|
"vs-input-datatable": Xs,
|
|
3928
3848
|
"vs-input-map": fr,
|
|
3929
|
-
"vs-input-file-list":
|
|
3849
|
+
"vs-input-file-list": ua,
|
|
3930
3850
|
"vs-input-tag": _r,
|
|
3931
3851
|
"vs-input-slug": Mr,
|
|
3932
|
-
"vs-input-key-value":
|
|
3852
|
+
"vs-input-key-value": Ar,
|
|
3933
3853
|
"vs-input-range": Nr,
|
|
3934
3854
|
"vs-input-color": Rr
|
|
3935
3855
|
}, Gr = /* @__PURE__ */ F({
|
|
@@ -3948,7 +3868,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3948
3868
|
if (!e.api) return;
|
|
3949
3869
|
const s = e.api.replace("{{value}}", e.value), r = await fetch(s);
|
|
3950
3870
|
if (!r.ok) {
|
|
3951
|
-
|
|
3871
|
+
be({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
|
|
3952
3872
|
return;
|
|
3953
3873
|
}
|
|
3954
3874
|
const a = await r.json();
|
|
@@ -3964,9 +3884,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3964
3884
|
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"
|
|
3965
3885
|
}, T(s.button), 1));
|
|
3966
3886
|
}
|
|
3967
|
-
}),
|
|
3887
|
+
}), wt = /* @__PURE__ */ F({
|
|
3968
3888
|
__name: "vs-compact-form-layout",
|
|
3969
|
-
props: /* @__PURE__ */
|
|
3889
|
+
props: /* @__PURE__ */ Z({
|
|
3970
3890
|
item: { default: {} },
|
|
3971
3891
|
layout: { default: "default" },
|
|
3972
3892
|
style: { default: {} },
|
|
@@ -3978,55 +3898,57 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3978
3898
|
}),
|
|
3979
3899
|
emits: ["update:modelValue"],
|
|
3980
3900
|
setup(o) {
|
|
3981
|
-
const e = o, t =
|
|
3901
|
+
const e = o, t = W(o, "modelValue"), n = A(() => Kt[`${e.layout}`]), s = A(() => qr?.[`vs-input-${e.item.type}`]), r = A(() => {
|
|
3982
3902
|
const u = q(s);
|
|
3983
3903
|
if (!u) return /* @__PURE__ */ new Set();
|
|
3984
3904
|
const c = u.props ?? u.__vccOpts?.props;
|
|
3985
3905
|
if (!c) return /* @__PURE__ */ new Set();
|
|
3986
3906
|
const v = Array.isArray(c) ? c : Object.keys(c);
|
|
3987
3907
|
return new Set(v);
|
|
3988
|
-
}), a =
|
|
3908
|
+
}), a = A(() => {
|
|
3989
3909
|
const u = e.item ?? {}, c = r.value;
|
|
3990
3910
|
return c.size ? Object.fromEntries(Object.entries(u).filter(([v]) => c.has(v))) : {};
|
|
3991
3911
|
});
|
|
3992
|
-
return (u, c) => (i(), ae(
|
|
3912
|
+
return (u, c) => (i(), ae(Be(n.value), {
|
|
3993
3913
|
ua: e.item.ua,
|
|
3994
3914
|
error: e.error || "",
|
|
3995
3915
|
item: u.item,
|
|
3996
3916
|
label: e.item.label
|
|
3997
3917
|
}, {
|
|
3998
|
-
default:
|
|
3999
|
-
l("div",
|
|
4000
|
-
|
|
3918
|
+
default: Le(() => [
|
|
3919
|
+
l("div", {
|
|
3920
|
+
class: V(["flex w-full", `${e.item.type}-component`])
|
|
3921
|
+
}, [
|
|
3922
|
+
(i(), ae(Be(s.value), Ee(a.value, {
|
|
4001
3923
|
modelValue: t.value,
|
|
4002
3924
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => t.value = v)
|
|
4003
3925
|
}), null, 16, ["modelValue"])),
|
|
4004
|
-
u.item.behavior?.api && u.item.behavior?.button ? (i(), ae(Gr, Ee({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) :
|
|
4005
|
-
])
|
|
3926
|
+
u.item.behavior?.api && u.item.behavior?.button ? (i(), ae(Gr, Ee({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
|
|
3927
|
+
], 2)
|
|
4006
3928
|
]),
|
|
4007
3929
|
_: 1
|
|
4008
3930
|
}, 8, ["ua", "error", "item", "label"]));
|
|
4009
3931
|
}
|
|
4010
|
-
}),
|
|
3932
|
+
}), kt = {
|
|
4011
3933
|
required: "Це поле є обов’язковим",
|
|
4012
3934
|
email: "Неправильний email"
|
|
4013
|
-
},
|
|
3935
|
+
}, Jr = (o) => o ? !1 : kt.required, Kr = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? kt.email : !1, Zr = (o, e) => {
|
|
4014
3936
|
const t = e.pattern ?? e.regexp;
|
|
4015
3937
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
4016
|
-
},
|
|
3938
|
+
}, Wr = (o, e) => !1, Qr = (o, e) => {
|
|
4017
3939
|
switch (typeof e == "string" ? e : e.type) {
|
|
4018
3940
|
case "required":
|
|
4019
|
-
return
|
|
3941
|
+
return Jr(o);
|
|
4020
3942
|
case "email":
|
|
4021
|
-
return
|
|
3943
|
+
return Kr(o);
|
|
4022
3944
|
case "regexp":
|
|
4023
|
-
return
|
|
3945
|
+
return Zr(o, e);
|
|
4024
3946
|
case "custom":
|
|
4025
|
-
return
|
|
3947
|
+
return Wr();
|
|
4026
3948
|
default:
|
|
4027
3949
|
return !1;
|
|
4028
3950
|
}
|
|
4029
|
-
},
|
|
3951
|
+
}, Xr = {
|
|
4030
3952
|
autocomplete: "select",
|
|
4031
3953
|
combobox: "select",
|
|
4032
3954
|
datepicker: "date",
|
|
@@ -4038,16 +3960,16 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
4038
3960
|
file: "file"
|
|
4039
3961
|
// mask: 'text',
|
|
4040
3962
|
};
|
|
4041
|
-
function
|
|
3963
|
+
function ct(o) {
|
|
4042
3964
|
const e = o.toLowerCase();
|
|
4043
|
-
return
|
|
3965
|
+
return Xr[e] || e;
|
|
4044
3966
|
}
|
|
4045
|
-
function
|
|
3967
|
+
function Yr(o) {
|
|
4046
3968
|
if (Array.isArray(o)) {
|
|
4047
3969
|
const t = [];
|
|
4048
3970
|
return o.forEach((n) => {
|
|
4049
3971
|
const s = { ...n };
|
|
4050
|
-
s.name = (n.name || n.id || n.key || "").toString(), s.type =
|
|
3972
|
+
s.name = (n.name || n.id || n.key || "").toString(), s.type = ct(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, n.data && (s.api = `/api/suggest/${n.data}`), t.push(s);
|
|
4051
3973
|
}), t;
|
|
4052
3974
|
}
|
|
4053
3975
|
const e = [];
|
|
@@ -4055,20 +3977,20 @@ function ei(o) {
|
|
|
4055
3977
|
const n = {
|
|
4056
3978
|
name: t[0],
|
|
4057
3979
|
...t[1],
|
|
4058
|
-
type:
|
|
3980
|
+
type: ct(t[1].type),
|
|
4059
3981
|
label: t[1].label || t[1].ua,
|
|
4060
3982
|
rules: t[1].rules || t[1].validators
|
|
4061
3983
|
};
|
|
4062
3984
|
t[1].type.includes("list") && (n.multiple = !0), t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
|
|
4063
3985
|
}), e;
|
|
4064
3986
|
}
|
|
4065
|
-
function
|
|
4066
|
-
const t =
|
|
3987
|
+
function ei(o, e) {
|
|
3988
|
+
const t = Yr(e), n = x({});
|
|
4067
3989
|
function s(c) {
|
|
4068
3990
|
const v = c?.conditions;
|
|
4069
3991
|
if (!v) return !0;
|
|
4070
|
-
const p = Array.isArray(v) ? v[0] : v,
|
|
4071
|
-
return
|
|
3992
|
+
const p = Array.isArray(v) ? v[0] : v, w = o?.value?.[p];
|
|
3993
|
+
return xt(w, v);
|
|
4072
3994
|
}
|
|
4073
3995
|
const r = (c = t, v = !0) => (c.forEach((p) => {
|
|
4074
3996
|
if (p.rules) {
|
|
@@ -4076,13 +3998,13 @@ function ti(o, e) {
|
|
|
4076
3998
|
delete n.value[p.name];
|
|
4077
3999
|
return;
|
|
4078
4000
|
}
|
|
4079
|
-
p.rules.forEach((
|
|
4080
|
-
const
|
|
4081
|
-
|
|
4001
|
+
p.rules.forEach((w) => {
|
|
4002
|
+
const b = Qr(o.value[p.name], w);
|
|
4003
|
+
b ? n.value[p.name] = b : delete n.value[p.name];
|
|
4082
4004
|
});
|
|
4083
4005
|
}
|
|
4084
4006
|
p.schema && r(p.schema, !1);
|
|
4085
|
-
}), v && Object.values(n.value).some(Boolean) ? n.value : null), a =
|
|
4007
|
+
}), v && Object.values(n.value).some(Boolean) ? n.value : null), a = A(() => t?.filter((c) => s(c)));
|
|
4086
4008
|
return {
|
|
4087
4009
|
errors: n,
|
|
4088
4010
|
validate: r,
|
|
@@ -4092,9 +4014,9 @@ function ti(o, e) {
|
|
|
4092
4014
|
visibleSchema: a
|
|
4093
4015
|
};
|
|
4094
4016
|
}
|
|
4095
|
-
const
|
|
4017
|
+
const De = /* @__PURE__ */ F({
|
|
4096
4018
|
__name: "vs-compact-form",
|
|
4097
|
-
props: /* @__PURE__ */
|
|
4019
|
+
props: /* @__PURE__ */ Z({
|
|
4098
4020
|
schema: { default: () => [] },
|
|
4099
4021
|
style: { default: () => ({}) },
|
|
4100
4022
|
modelValue: {},
|
|
@@ -4106,77 +4028,219 @@ const Oe = /* @__PURE__ */ F({
|
|
|
4106
4028
|
values: { default: () => ({}) },
|
|
4107
4029
|
valuesModifiers: {}
|
|
4108
4030
|
}),
|
|
4109
|
-
emits: /* @__PURE__ */
|
|
4031
|
+
emits: /* @__PURE__ */ Z(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
|
|
4110
4032
|
setup(o, { expose: e, emit: t }) {
|
|
4111
|
-
const n = t, s = o, r =
|
|
4033
|
+
const n = t, s = o, r = W(o, "form"), a = W(o, "values"), {
|
|
4112
4034
|
errors: u,
|
|
4113
4035
|
validate: c,
|
|
4114
4036
|
reset: v,
|
|
4115
4037
|
visibleSchema: p
|
|
4116
|
-
} =
|
|
4038
|
+
} = ei(a, s.schema), w = () => {
|
|
4117
4039
|
n("update:modelValue", a.value), c(), n("handle-submit", a.value);
|
|
4118
4040
|
};
|
|
4119
4041
|
e({
|
|
4120
4042
|
validate: c,
|
|
4121
4043
|
reset: v,
|
|
4122
4044
|
errors: u
|
|
4123
|
-
}),
|
|
4045
|
+
}), xe(() => {
|
|
4124
4046
|
s.modelValue && (a.value = s.modelValue), r.value.value = a.value, r.value.errors = u.value, r.value.reset = v, r.value.validate = c, r.value.formId = s.formId;
|
|
4125
4047
|
});
|
|
4126
|
-
function
|
|
4127
|
-
if (
|
|
4128
|
-
if (typeof
|
|
4129
|
-
const R = Object.keys(
|
|
4130
|
-
return R.length !==
|
|
4048
|
+
function b($, S) {
|
|
4049
|
+
if ($ === S) return !0;
|
|
4050
|
+
if (typeof $ != "object" || typeof S != "object" || !$ || !S) return !1;
|
|
4051
|
+
const R = Object.keys($), C = Object.keys(S);
|
|
4052
|
+
return R.length !== C.length ? !1 : R.every((E) => $[E] === S[E]);
|
|
4131
4053
|
}
|
|
4132
|
-
return
|
|
4133
|
-
onSubmit: ve(
|
|
4134
|
-
class:
|
|
4054
|
+
return st("form", r), st("values", a), ($, S) => (i(), d("form", {
|
|
4055
|
+
onSubmit: ve(w, ["prevent"]),
|
|
4056
|
+
class: V(["grid grid-cols-12", $.layout === "default" ? "gap-6" : "gap-4"])
|
|
4135
4057
|
}, [
|
|
4136
|
-
(i(!0), d(Y, null, le(q(p), (R) => (i(), ae(
|
|
4058
|
+
(i(!0), d(Y, null, le(q(p), (R) => (i(), ae(wt, {
|
|
4137
4059
|
key: R.name,
|
|
4138
|
-
class:
|
|
4139
|
-
style:
|
|
4060
|
+
class: V($.layout === "horizontal" ? "col-span-12" : `col-span-${R.col || 12} `),
|
|
4061
|
+
style: ye($.style),
|
|
4140
4062
|
item: R,
|
|
4141
|
-
layout:
|
|
4063
|
+
layout: $.layout,
|
|
4142
4064
|
"model-value": a.value[R.name],
|
|
4143
|
-
"onUpdate:modelValue": (
|
|
4144
|
-
const
|
|
4145
|
-
|
|
4065
|
+
"onUpdate:modelValue": (C) => {
|
|
4066
|
+
const E = a.value[R.name];
|
|
4067
|
+
b(E, C) || (a.value[R.name] = C);
|
|
4146
4068
|
},
|
|
4147
4069
|
error: q(u)[R.name]
|
|
4148
4070
|
}, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
|
|
4149
4071
|
], 34));
|
|
4150
4072
|
}
|
|
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__ */ F({
|
|
4074
|
+
__name: "modal-edit",
|
|
4075
|
+
props: {
|
|
4076
|
+
schema: {},
|
|
4077
|
+
defaultValue: {},
|
|
4078
|
+
mode: {},
|
|
4079
|
+
token: {},
|
|
4080
|
+
form: {}
|
|
4081
|
+
},
|
|
4082
|
+
emits: ["close", "save", "edit"],
|
|
4083
|
+
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({}), u = x(), c = x(t.mode);
|
|
4085
|
+
async function v() {
|
|
4086
|
+
const w = a.value.validate();
|
|
4087
|
+
if (w) {
|
|
4088
|
+
be({ type: "warning", title: "Помилка валідації", message: Object.entries(w).map(([b, $]) => `${b}: ${$}`).join(`
|
|
4089
|
+
`) });
|
|
4090
|
+
return;
|
|
4091
|
+
}
|
|
4092
|
+
if (u.value)
|
|
4093
|
+
try {
|
|
4094
|
+
const b = await fetch(`/api/table/${u.value}`, {
|
|
4095
|
+
method: c.value === "add" ? "POST" : "PUT",
|
|
4096
|
+
headers: {
|
|
4097
|
+
"Content-Type": "application/json"
|
|
4098
|
+
},
|
|
4099
|
+
body: JSON.stringify(r.value)
|
|
4100
|
+
});
|
|
4101
|
+
if (b.ok)
|
|
4102
|
+
await b.json(), be({
|
|
4103
|
+
type: "success",
|
|
4104
|
+
title: "Успішно",
|
|
4105
|
+
message: `Дані успішно ${c.value === "add" ? "збережено" : "оновлено"}`
|
|
4106
|
+
}), n("save", r.value);
|
|
4107
|
+
else if (b.status === 400) {
|
|
4108
|
+
const $ = await b.json().catch(() => ({}));
|
|
4109
|
+
be({
|
|
4110
|
+
type: "warning",
|
|
4111
|
+
title: "Помилка валідації",
|
|
4112
|
+
message: $.message || "Некоректні дані (400)"
|
|
4113
|
+
});
|
|
4114
|
+
} else b.status === 500 ? be({
|
|
4115
|
+
type: "error",
|
|
4116
|
+
title: "Серверна помилка",
|
|
4117
|
+
message: "Виникла помилка на сервері (500)"
|
|
4118
|
+
}) : be({
|
|
4119
|
+
type: "error",
|
|
4120
|
+
title: "Помилка",
|
|
4121
|
+
message: `Статус: ${b.status}`
|
|
4122
|
+
});
|
|
4123
|
+
} catch (b) {
|
|
4124
|
+
be({
|
|
4125
|
+
type: "error",
|
|
4126
|
+
title: "Помилка з’єднання",
|
|
4127
|
+
message: b.message || "Не вдалося виконати запит"
|
|
4128
|
+
});
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
function p() {
|
|
4132
|
+
n("close");
|
|
4133
|
+
}
|
|
4134
|
+
return xe(async () => {
|
|
4135
|
+
if (t.form) {
|
|
4136
|
+
const w = await fetch(`/api/template/form/${t.form}`).then((b) => b.json());
|
|
4137
|
+
s.value = w.schema, u.value = w.token;
|
|
4138
|
+
} else if (t.token) {
|
|
4139
|
+
u.value = t.token;
|
|
4140
|
+
const w = await fetch(`/api/form/${u.value}`).then((b) => b.json());
|
|
4141
|
+
s.value = w.schema, w.data ? r.value = w.data : c.value = "add";
|
|
4142
|
+
}
|
|
4143
|
+
}), (w, b) => (i(), d("div", ti, [
|
|
4144
|
+
l("div", li, [
|
|
4145
|
+
l("div", oi, [
|
|
4146
|
+
l("div", ai, [
|
|
4147
|
+
l("h3", si, T(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4148
|
+
l("button", {
|
|
4149
|
+
onClick: p,
|
|
4150
|
+
type: "button",
|
|
4151
|
+
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
|
|
4152
|
+
}, b[2] || (b[2] = [
|
|
4153
|
+
l("span", { class: "sr-only" }, "Close", -1),
|
|
4154
|
+
l("svg", {
|
|
4155
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
4156
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4157
|
+
width: "24",
|
|
4158
|
+
height: "24",
|
|
4159
|
+
viewBox: "0 0 24 24",
|
|
4160
|
+
fill: "none",
|
|
4161
|
+
stroke: "currentColor",
|
|
4162
|
+
"stroke-width": "2",
|
|
4163
|
+
"stroke-linecap": "round",
|
|
4164
|
+
"stroke-linejoin": "round"
|
|
4165
|
+
}, [
|
|
4166
|
+
l("path", { d: "M18 6 6 18" }),
|
|
4167
|
+
l("path", { d: "m6 6 12 12" })
|
|
4168
|
+
], -1)
|
|
4169
|
+
]))
|
|
4170
|
+
]),
|
|
4171
|
+
l("div", ni, [
|
|
4172
|
+
s.value ? (i(), ae(De, {
|
|
4173
|
+
key: 0,
|
|
4174
|
+
schema: s.value,
|
|
4175
|
+
values: r.value,
|
|
4176
|
+
"onUpdate:values": b[0] || (b[0] = ($) => r.value = $),
|
|
4177
|
+
form: a.value,
|
|
4178
|
+
"onUpdate:form": b[1] || (b[1] = ($) => a.value = $)
|
|
4179
|
+
}, null, 8, ["schema", "values", "form"])) : D("", !0)
|
|
4180
|
+
]),
|
|
4181
|
+
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
|
+
l("button", {
|
|
4183
|
+
type: "button",
|
|
4184
|
+
onClick: p,
|
|
4185
|
+
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
|
|
4186
|
+
}, " Скасувати "),
|
|
4187
|
+
l("button", {
|
|
4188
|
+
onClick: v,
|
|
4189
|
+
type: "button",
|
|
4190
|
+
class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
|
|
4191
|
+
}, " Зберегти ")
|
|
4192
|
+
])
|
|
4193
|
+
])
|
|
4194
|
+
])
|
|
4195
|
+
]));
|
|
4196
|
+
}
|
|
4197
|
+
}), pt = (o = { mode: "edit", schema: null }) => new Promise((e) => {
|
|
4198
|
+
const { close: t } = Et({
|
|
4199
|
+
title: o.mode === "add" ? "Додати" : "Редагувати",
|
|
4200
|
+
template: "",
|
|
4201
|
+
visible: !0,
|
|
4202
|
+
size: "medium",
|
|
4203
|
+
closeClickBack: !0,
|
|
4204
|
+
content: ri,
|
|
4205
|
+
contentProps: {
|
|
4206
|
+
...o,
|
|
4207
|
+
onClose: () => {
|
|
4208
|
+
e(null), t();
|
|
4209
|
+
},
|
|
4210
|
+
onSave: (n) => {
|
|
4211
|
+
e(n), t();
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
});
|
|
4151
4215
|
});
|
|
4152
|
-
|
|
4153
|
-
e.component("VForm",
|
|
4154
|
-
$form:
|
|
4155
|
-
}), e.provide("form",
|
|
4216
|
+
De.install = function(e) {
|
|
4217
|
+
e.component("VForm", De), Object.assign(e.config.globalProperties, {
|
|
4218
|
+
$form: pt
|
|
4219
|
+
}), e.provide("form", pt), window.v3plugin || (window.v3plugin = {});
|
|
4156
4220
|
};
|
|
4157
4221
|
export {
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4222
|
+
ri as ModalEdit,
|
|
4223
|
+
De as VForm,
|
|
4224
|
+
ql as VsInputCheckbox,
|
|
4161
4225
|
Rr as VsInputColor,
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4226
|
+
Ea as VsInputContainer,
|
|
4227
|
+
Jl as VsInputDate,
|
|
4228
|
+
Dl as VsInputEmail,
|
|
4229
|
+
zo as VsInputFile,
|
|
4230
|
+
ua as VsInputFileList,
|
|
4231
|
+
Ar as VsInputKeyValue,
|
|
4232
|
+
zl as VsInputMask,
|
|
4233
|
+
Yt as VsInputNumber,
|
|
4234
|
+
rt as VsInputRadio,
|
|
4171
4235
|
Nr as VsInputRange,
|
|
4172
4236
|
Za as VsInputSelect,
|
|
4173
4237
|
Mr as VsInputSlug,
|
|
4174
|
-
|
|
4175
|
-
|
|
4238
|
+
nt as VsInputStatic,
|
|
4239
|
+
bt as VsInputSwitcher,
|
|
4176
4240
|
_r as VsInputTag,
|
|
4177
|
-
|
|
4241
|
+
Ue as VsInputText,
|
|
4178
4242
|
Qa as VsInputTextarea,
|
|
4179
|
-
|
|
4243
|
+
De as default,
|
|
4180
4244
|
qr as inputs,
|
|
4181
4245
|
Xs as vsInputDatatable,
|
|
4182
4246
|
fr as vsInputMap
|