@opengis/form 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +278 -190
- package/dist/index.umd.cjs +4 -4
- package/package.json +61 -61
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelRadio, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, vModelCheckbox, createVNode, ref, normalizeStyle, withCtx, reactive, watch, onMounted, createStaticVNode, Transition, vShow, inject, nextTick, onUnmounted, withModifiers, Teleport, useAttrs, provide } from "vue";
|
|
2
|
-
const _hoisted_1$
|
|
2
|
+
const _hoisted_1$x = { class: "w-full relative" }, _hoisted_2$b = { class: "text-[14px] font-medium text-gray-900 mb-2" }, _hoisted_3$5 = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "text-red-500 text-[14px]"
|
|
5
5
|
}, _hoisted_4$4 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
8
|
-
}, _sfc_main$
|
|
8
|
+
}, _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "vs-layout-default",
|
|
10
10
|
props: {
|
|
11
11
|
ua: {
|
|
@@ -26,7 +26,7 @@ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
29
|
+
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
30
30
|
createElementVNode("span", _hoisted_2$b, [
|
|
31
31
|
createElementVNode("span", null, toDisplayString(e.ua || e.label), 1),
|
|
32
32
|
e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$5, "*")) : createCommentVNode("", !0)
|
|
@@ -35,13 +35,13 @@ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text
|
|
|
35
35
|
e.error ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}), _hoisted_1$
|
|
38
|
+
}), _hoisted_1$w = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$a = { class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12" }, _hoisted_3$4 = {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "text-red-500 text-[14px]"
|
|
41
41
|
}, _hoisted_4$3 = {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
44
|
-
}, _sfc_main$
|
|
44
|
+
}, _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
45
45
|
__name: "vs-layout-horizontal",
|
|
46
46
|
props: {
|
|
47
47
|
ua: {
|
|
@@ -62,7 +62,7 @@ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
setup(e) {
|
|
65
|
-
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
65
|
+
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
66
66
|
createElementVNode("span", _hoisted_2$a, [
|
|
67
67
|
createTextVNode(toDisplayString(e.ua || e.label) + " ", 1),
|
|
68
68
|
e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$4, "*")) : createCommentVNode("", !0)
|
|
@@ -71,10 +71,10 @@ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text
|
|
|
71
71
|
e.error ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
|
|
72
72
|
]));
|
|
73
73
|
}
|
|
74
|
-
}), _hoisted_1$
|
|
74
|
+
}), _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$9 = {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
77
|
-
}, _sfc_main$
|
|
77
|
+
}, _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
78
78
|
__name: "vs-layout-inline",
|
|
79
79
|
props: {
|
|
80
80
|
ua: {
|
|
@@ -95,15 +95,15 @@ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
setup(e) {
|
|
98
|
-
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
98
|
+
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
99
99
|
renderSlot(t.$slots, "default", normalizeProps(guardReactiveProps(t.$attrs))),
|
|
100
100
|
e.error ? (openBlock(), createElementBlock("span", _hoisted_2$9, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
|
|
101
101
|
]));
|
|
102
102
|
}
|
|
103
103
|
}), layouts$1 = {
|
|
104
|
-
default: _sfc_main$
|
|
105
|
-
horizontal: _sfc_main$
|
|
106
|
-
inline: _sfc_main$
|
|
104
|
+
default: _sfc_main$C,
|
|
105
|
+
horizontal: _sfc_main$B,
|
|
106
|
+
inline: _sfc_main$A
|
|
107
107
|
};
|
|
108
108
|
function useStyle(e) {
|
|
109
109
|
return {
|
|
@@ -113,7 +113,7 @@ function useStyle(e) {
|
|
|
113
113
|
})
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
const _hoisted_1$
|
|
116
|
+
const _hoisted_1$u = ["placeholder", "disabled"], _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
117
117
|
__name: "vs-input-text",
|
|
118
118
|
props: /* @__PURE__ */ mergeModels({
|
|
119
119
|
style: {
|
|
@@ -148,11 +148,11 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
148
148
|
style: {
|
|
149
149
|
border: "1px solid #CFD9E0"
|
|
150
150
|
}
|
|
151
|
-
}, null, 10, _hoisted_1$
|
|
151
|
+
}, null, 10, _hoisted_1$u)), [
|
|
152
152
|
[vModelText, r.value]
|
|
153
153
|
]);
|
|
154
154
|
}
|
|
155
|
-
}), _hoisted_1$
|
|
155
|
+
}), _hoisted_1$t = ["placeholder"], _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
156
156
|
__name: "vs-input-number",
|
|
157
157
|
props: /* @__PURE__ */ mergeModels({
|
|
158
158
|
style: {
|
|
@@ -178,11 +178,11 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
178
178
|
style: {
|
|
179
179
|
border: "1px solid #CFD9E0"
|
|
180
180
|
}
|
|
181
|
-
}, null, 10, _hoisted_1$
|
|
181
|
+
}, null, 10, _hoisted_1$t)), [
|
|
182
182
|
[vModelText, r.value]
|
|
183
183
|
]);
|
|
184
184
|
}
|
|
185
|
-
}), _hoisted_1$
|
|
185
|
+
}), _hoisted_1$s = ["disabled"], _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
186
186
|
__name: "vs-input-switcher",
|
|
187
187
|
props: /* @__PURE__ */ mergeModels({
|
|
188
188
|
style: {
|
|
@@ -214,9 +214,9 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
214
214
|
"data-state": "checked",
|
|
215
215
|
class: normalizeClass(["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"]])
|
|
216
216
|
}, null, 2)
|
|
217
|
-
], 10, _hoisted_1$
|
|
217
|
+
], 10, _hoisted_1$s));
|
|
218
218
|
}
|
|
219
|
-
}), _hoisted_1$
|
|
219
|
+
}), _hoisted_1$r = ["innerHTML"], _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
220
220
|
__name: "vs-input-static",
|
|
221
221
|
props: {
|
|
222
222
|
html: {
|
|
@@ -232,9 +232,9 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
232
232
|
return (t, n) => (openBlock(), createElementBlock("div", {
|
|
233
233
|
class: normalizeClass(e.customClass),
|
|
234
234
|
innerHTML: e.html
|
|
235
|
-
}, null, 10, _hoisted_1$
|
|
235
|
+
}, null, 10, _hoisted_1$r));
|
|
236
236
|
}
|
|
237
|
-
}), _hoisted_1$
|
|
237
|
+
}), _hoisted_1$q = ["placeholder", "disabled"], _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
238
238
|
__name: "vs-input-mask",
|
|
239
239
|
props: /* @__PURE__ */ mergeModels({
|
|
240
240
|
style: {
|
|
@@ -269,11 +269,11 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
269
269
|
style: {
|
|
270
270
|
border: "1px solid #CFD9E0"
|
|
271
271
|
}
|
|
272
|
-
}, null, 10, _hoisted_1$
|
|
272
|
+
}, null, 10, _hoisted_1$q)), [
|
|
273
273
|
[vModelText, r.value]
|
|
274
274
|
]);
|
|
275
275
|
}
|
|
276
|
-
}), _hoisted_1$
|
|
276
|
+
}), _hoisted_1$p = ["value", "disabled"], _hoisted_2$8 = { class: "text-[13px] text-gray-700" }, _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
277
277
|
__name: "vs-input-radio-default",
|
|
278
278
|
props: /* @__PURE__ */ mergeModels({
|
|
279
279
|
text: {
|
|
@@ -312,7 +312,7 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
312
312
|
value: e.value,
|
|
313
313
|
disabled: e.disabled,
|
|
314
314
|
class: "hidden"
|
|
315
|
-
}, null, 8, _hoisted_1$
|
|
315
|
+
}, null, 8, _hoisted_1$p), [
|
|
316
316
|
[vModelRadio, t.value]
|
|
317
317
|
]),
|
|
318
318
|
createElementVNode("span", {
|
|
@@ -329,7 +329,7 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
329
329
|
createElementVNode("span", _hoisted_2$8, toDisplayString(e.text), 1)
|
|
330
330
|
], 2));
|
|
331
331
|
}
|
|
332
|
-
}), _hoisted_1$
|
|
332
|
+
}), _hoisted_1$o = ["value", "disabled"], _hoisted_2$7 = { class: "text-[13px] text-gray-700" }, _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
333
333
|
__name: "vs-input-radio-buttons",
|
|
334
334
|
props: /* @__PURE__ */ mergeModels({
|
|
335
335
|
text: {
|
|
@@ -371,16 +371,16 @@ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */
|
|
|
371
371
|
value: e.value,
|
|
372
372
|
disabled: e.disabled,
|
|
373
373
|
class: "hidden"
|
|
374
|
-
}, null, 8, _hoisted_1$
|
|
374
|
+
}, null, 8, _hoisted_1$o), [
|
|
375
375
|
[vModelRadio, t.value]
|
|
376
376
|
]),
|
|
377
377
|
createElementVNode("span", _hoisted_2$7, toDisplayString(e.text), 1)
|
|
378
378
|
], 2));
|
|
379
379
|
}
|
|
380
380
|
}), layouts = {
|
|
381
|
-
"vs-input-radio-default": _sfc_main$
|
|
382
|
-
"vs-input-radio-buttons": _sfc_main$
|
|
383
|
-
}, _sfc_main$
|
|
381
|
+
"vs-input-radio-default": _sfc_main$u,
|
|
382
|
+
"vs-input-radio-buttons": _sfc_main$t
|
|
383
|
+
}, _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
384
384
|
__name: "vs-input-radio",
|
|
385
385
|
props: /* @__PURE__ */ mergeModels({
|
|
386
386
|
options: {
|
|
@@ -438,6 +438,14 @@ const isString = typeOfTest("string"), isFunction = typeOfTest("function"), isNu
|
|
|
438
438
|
return !1;
|
|
439
439
|
const t = getPrototypeOf(e);
|
|
440
440
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(toStringTag in e) && !(iterator in e);
|
|
441
|
+
}, isEmptyObject = (e) => {
|
|
442
|
+
if (!isObject(e) || isBuffer(e))
|
|
443
|
+
return !1;
|
|
444
|
+
try {
|
|
445
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
446
|
+
} catch {
|
|
447
|
+
return !1;
|
|
448
|
+
}
|
|
441
449
|
}, isDate = kindOfTest("Date"), isFile = kindOfTest("File"), isBlob = kindOfTest("Blob"), isFileList = kindOfTest("FileList"), isStream = (e) => isObject(e) && isFunction(e.pipe), isFormData = (e) => {
|
|
442
450
|
let t;
|
|
443
451
|
return e && (typeof FormData == "function" && e instanceof FormData || isFunction(e.append) && ((t = kindOf(e)) === "formdata" || // detect form-data instance
|
|
@@ -451,6 +459,8 @@ function forEach(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
451
459
|
for (r = 0, o = e.length; r < o; r++)
|
|
452
460
|
t.call(null, e[r], r, e);
|
|
453
461
|
else {
|
|
462
|
+
if (isBuffer(e))
|
|
463
|
+
return;
|
|
454
464
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), l = s.length;
|
|
455
465
|
let i;
|
|
456
466
|
for (r = 0; r < l; r++)
|
|
@@ -458,6 +468,8 @@ function forEach(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
458
468
|
}
|
|
459
469
|
}
|
|
460
470
|
function findKey(e, t) {
|
|
471
|
+
if (isBuffer(e))
|
|
472
|
+
return null;
|
|
461
473
|
t = t.toLowerCase();
|
|
462
474
|
const n = Object.keys(e);
|
|
463
475
|
let r = n.length, o;
|
|
@@ -561,6 +573,8 @@ const toJSONObject = (e) => {
|
|
|
561
573
|
if (isObject(r)) {
|
|
562
574
|
if (t.indexOf(r) >= 0)
|
|
563
575
|
return;
|
|
576
|
+
if (isBuffer(r))
|
|
577
|
+
return r;
|
|
564
578
|
if (!("toJSON" in r)) {
|
|
565
579
|
t[o] = r;
|
|
566
580
|
const s = isArray(r) ? [] : {};
|
|
@@ -591,6 +605,7 @@ const toJSONObject = (e) => {
|
|
|
591
605
|
isBoolean,
|
|
592
606
|
isObject,
|
|
593
607
|
isPlainObject,
|
|
608
|
+
isEmptyObject,
|
|
594
609
|
isReadableStream,
|
|
595
610
|
isRequest,
|
|
596
611
|
isResponse,
|
|
@@ -736,11 +751,11 @@ function toFormData$1(e, t, n) {
|
|
|
736
751
|
if (utils$1.endsWith(y, "{}"))
|
|
737
752
|
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
|
|
738
753
|
else if (utils$1.isArray(p) && isFlatArray(p) || (utils$1.isFileList(p) || utils$1.endsWith(y, "[]")) && (x = utils$1.toArray(p)))
|
|
739
|
-
return y = removeBrackets(y), x.forEach(function(
|
|
740
|
-
!(utils$1.isUndefined(
|
|
754
|
+
return y = removeBrackets(y), x.forEach(function(w, _) {
|
|
755
|
+
!(utils$1.isUndefined(w) || w === null) && t.append(
|
|
741
756
|
// eslint-disable-next-line no-nested-ternary
|
|
742
757
|
l === !0 ? renderKey([y], _, s) : l === null ? y : y + "[]",
|
|
743
|
-
c(
|
|
758
|
+
c(w)
|
|
744
759
|
);
|
|
745
760
|
}), !1;
|
|
746
761
|
}
|
|
@@ -896,11 +911,12 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", or
|
|
|
896
911
|
...platform$1
|
|
897
912
|
};
|
|
898
913
|
function toURLEncodedForm(e, t) {
|
|
899
|
-
return toFormData$1(e, new platform.classes.URLSearchParams(),
|
|
914
|
+
return toFormData$1(e, new platform.classes.URLSearchParams(), {
|
|
900
915
|
visitor: function(n, r, o, s) {
|
|
901
916
|
return platform.isNode && utils$1.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
902
|
-
}
|
|
903
|
-
|
|
917
|
+
},
|
|
918
|
+
...t
|
|
919
|
+
});
|
|
904
920
|
}
|
|
905
921
|
function parsePropPath(e) {
|
|
906
922
|
return utils$1.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
@@ -1258,7 +1274,7 @@ function speedometer(e, t) {
|
|
|
1258
1274
|
function throttle(e, t) {
|
|
1259
1275
|
let n = 0, r = 1e3 / t, o, s;
|
|
1260
1276
|
const l = (c, a = Date.now()) => {
|
|
1261
|
-
n = a, o = null, s && (clearTimeout(s), s = null), e
|
|
1277
|
+
n = a, o = null, s && (clearTimeout(s), s = null), e(...c);
|
|
1262
1278
|
};
|
|
1263
1279
|
return [(...c) => {
|
|
1264
1280
|
const a = Date.now(), d = a - n;
|
|
@@ -1393,7 +1409,7 @@ function mergeConfig$1(e, t) {
|
|
|
1393
1409
|
validateStatus: i,
|
|
1394
1410
|
headers: (c, a, d) => o(headersToObject(c), headersToObject(a), d, !0)
|
|
1395
1411
|
};
|
|
1396
|
-
return utils$1.forEach(Object.keys(
|
|
1412
|
+
return utils$1.forEach(Object.keys({ ...e, ...t }), function(a) {
|
|
1397
1413
|
const d = u[a] || o, f = d(e[a], t[a], a);
|
|
1398
1414
|
utils$1.isUndefined(f) && d !== i || (n[a] = f);
|
|
1399
1415
|
}), n;
|
|
@@ -1433,20 +1449,20 @@ const resolveConfig = (e) => {
|
|
|
1433
1449
|
function x() {
|
|
1434
1450
|
if (!m)
|
|
1435
1451
|
return;
|
|
1436
|
-
const
|
|
1452
|
+
const w = AxiosHeaders$1.from(
|
|
1437
1453
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1438
1454
|
), k = {
|
|
1439
1455
|
data: !i || i === "text" || i === "json" ? m.responseText : m.response,
|
|
1440
1456
|
status: m.status,
|
|
1441
1457
|
statusText: m.statusText,
|
|
1442
|
-
headers:
|
|
1458
|
+
headers: w,
|
|
1443
1459
|
config: e,
|
|
1444
1460
|
request: m
|
|
1445
1461
|
};
|
|
1446
|
-
settle(function(
|
|
1447
|
-
n(
|
|
1448
|
-
}, function(
|
|
1449
|
-
r(
|
|
1462
|
+
settle(function(S) {
|
|
1463
|
+
n(S), y();
|
|
1464
|
+
}, function(S) {
|
|
1465
|
+
r(S), y();
|
|
1450
1466
|
}, k), m = null;
|
|
1451
1467
|
}
|
|
1452
1468
|
"onloadend" in m ? m.onloadend = x : m.onreadystatechange = function() {
|
|
@@ -1466,8 +1482,8 @@ const resolveConfig = (e) => {
|
|
|
1466
1482
|
)), m = null;
|
|
1467
1483
|
}, s === void 0 && l.setContentType(null), "setRequestHeader" in m && utils$1.forEach(l.toJSON(), function(_, k) {
|
|
1468
1484
|
m.setRequestHeader(k, _);
|
|
1469
|
-
}), utils$1.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), c && ([f, p] = progressEventReducer(c, !0), m.addEventListener("progress", f)), u && m.upload && ([d, h] = progressEventReducer(u), m.upload.addEventListener("progress", d), m.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (a = (
|
|
1470
|
-
m && (r(!
|
|
1485
|
+
}), utils$1.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), c && ([f, p] = progressEventReducer(c, !0), m.addEventListener("progress", f)), u && m.upload && ([d, h] = progressEventReducer(u), m.upload.addEventListener("progress", d), m.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (a = (w) => {
|
|
1486
|
+
m && (r(!w || w.type ? new CanceledError$1(null, e, m) : w), m.abort(), m = null);
|
|
1471
1487
|
}, o.cancelToken && o.cancelToken.subscribe(a), o.signal && (o.signal.aborted ? a() : o.signal.addEventListener("abort", a)));
|
|
1472
1488
|
const $ = parseProtocol(o.url);
|
|
1473
1489
|
if ($ && platform.protocols.indexOf($) === -1) {
|
|
@@ -1626,13 +1642,13 @@ const getBodyLength = async (e) => {
|
|
|
1626
1642
|
method: "POST",
|
|
1627
1643
|
body: r,
|
|
1628
1644
|
duplex: "half"
|
|
1629
|
-
}),
|
|
1630
|
-
if (utils$1.isFormData(r) && (
|
|
1631
|
-
const [
|
|
1645
|
+
}), E;
|
|
1646
|
+
if (utils$1.isFormData(r) && (E = k.headers.get("content-type")) && a.setContentType(E), k.body) {
|
|
1647
|
+
const [S, C] = progressEventDecorator(
|
|
1632
1648
|
m,
|
|
1633
1649
|
progressEventReducer(asyncDecorator(u))
|
|
1634
1650
|
);
|
|
1635
|
-
r = trackStream(k.body, DEFAULT_CHUNK_SIZE,
|
|
1651
|
+
r = trackStream(k.body, DEFAULT_CHUNK_SIZE, S, C);
|
|
1636
1652
|
}
|
|
1637
1653
|
}
|
|
1638
1654
|
utils$1.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1647,27 +1663,27 @@ const getBodyLength = async (e) => {
|
|
|
1647
1663
|
credentials: x ? d : void 0
|
|
1648
1664
|
});
|
|
1649
1665
|
let $ = await fetch(p, f);
|
|
1650
|
-
const
|
|
1651
|
-
if (supportsResponseStream && (i ||
|
|
1666
|
+
const w = supportsResponseStream && (c === "stream" || c === "response");
|
|
1667
|
+
if (supportsResponseStream && (i || w && y)) {
|
|
1652
1668
|
const k = {};
|
|
1653
|
-
["status", "statusText", "headers"].forEach((
|
|
1654
|
-
k[
|
|
1669
|
+
["status", "statusText", "headers"].forEach((b) => {
|
|
1670
|
+
k[b] = $[b];
|
|
1655
1671
|
});
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1672
|
+
const E = utils$1.toFiniteNumber($.headers.get("content-length")), [S, C] = i && progressEventDecorator(
|
|
1673
|
+
E,
|
|
1658
1674
|
progressEventReducer(asyncDecorator(i), !0)
|
|
1659
1675
|
) || [];
|
|
1660
1676
|
$ = new Response(
|
|
1661
|
-
trackStream($.body, DEFAULT_CHUNK_SIZE,
|
|
1662
|
-
|
|
1677
|
+
trackStream($.body, DEFAULT_CHUNK_SIZE, S, () => {
|
|
1678
|
+
C && C(), y && y();
|
|
1663
1679
|
}),
|
|
1664
1680
|
k
|
|
1665
1681
|
);
|
|
1666
1682
|
}
|
|
1667
1683
|
c = c || "text";
|
|
1668
1684
|
let _ = await resolvers[utils$1.findKey(resolvers, c) || "text"]($, e);
|
|
1669
|
-
return !
|
|
1670
|
-
settle(k,
|
|
1685
|
+
return !w && y && y(), await new Promise((k, E) => {
|
|
1686
|
+
settle(k, E, {
|
|
1671
1687
|
data: _,
|
|
1672
1688
|
headers: AxiosHeaders$1.from($.headers),
|
|
1673
1689
|
status: $.status,
|
|
@@ -1751,7 +1767,7 @@ function dispatchRequest(e) {
|
|
|
1751
1767
|
), r.response.headers = AxiosHeaders$1.from(r.response.headers))), Promise.reject(r);
|
|
1752
1768
|
});
|
|
1753
1769
|
}
|
|
1754
|
-
const VERSION$1 = "1.
|
|
1770
|
+
const VERSION$1 = "1.11.0", validators$1 = {};
|
|
1755
1771
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1756
1772
|
validators$1[e] = function(r) {
|
|
1757
1773
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1870,7 +1886,7 @@ let Axios$1 = class {
|
|
|
1870
1886
|
let a, d = 0, f;
|
|
1871
1887
|
if (!u) {
|
|
1872
1888
|
const p = [dispatchRequest.bind(this), void 0];
|
|
1873
|
-
for (p.unshift
|
|
1889
|
+
for (p.unshift(...i), p.push(...c), f = p.length, a = Promise.resolve(n); d < f; )
|
|
1874
1890
|
a = a.then(p[d++], p[d++]);
|
|
1875
1891
|
return a;
|
|
1876
1892
|
}
|
|
@@ -1924,7 +1940,7 @@ utils$1.forEach(["post", "put", "patch"], function(t) {
|
|
|
1924
1940
|
}
|
|
1925
1941
|
Axios$1.prototype[t] = n(), Axios$1.prototype[t + "Form"] = n(!0);
|
|
1926
1942
|
});
|
|
1927
|
-
let CancelToken$1 = class
|
|
1943
|
+
let CancelToken$1 = class V {
|
|
1928
1944
|
constructor(t) {
|
|
1929
1945
|
if (typeof t != "function")
|
|
1930
1946
|
throw new TypeError("executor must be a function.");
|
|
@@ -1990,7 +2006,7 @@ let CancelToken$1 = class C {
|
|
|
1990
2006
|
static source() {
|
|
1991
2007
|
let t;
|
|
1992
2008
|
return {
|
|
1993
|
-
token: new
|
|
2009
|
+
token: new V(function(o) {
|
|
1994
2010
|
t = o;
|
|
1995
2011
|
}),
|
|
1996
2012
|
cancel: t
|
|
@@ -2121,7 +2137,7 @@ const {
|
|
|
2121
2137
|
for (const [r, o] of t)
|
|
2122
2138
|
n[r] = o;
|
|
2123
2139
|
return n;
|
|
2124
|
-
}, _sfc_main$
|
|
2140
|
+
}, _sfc_main$r = {}, _hoisted_1$n = {
|
|
2125
2141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2126
2142
|
viewBox: "0 0 24 24",
|
|
2127
2143
|
fill: "none",
|
|
@@ -2131,8 +2147,8 @@ const {
|
|
|
2131
2147
|
"stroke-linejoin": "round",
|
|
2132
2148
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
2133
2149
|
};
|
|
2134
|
-
function _sfc_render$
|
|
2135
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2150
|
+
function _sfc_render$c(e, t) {
|
|
2151
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$n, t[0] || (t[0] = [
|
|
2136
2152
|
createElementVNode("path", {
|
|
2137
2153
|
stroke: "none",
|
|
2138
2154
|
d: "M0 0h24v24H0z",
|
|
@@ -2141,7 +2157,7 @@ function _sfc_render$b(e, t) {
|
|
|
2141
2157
|
createElementVNode("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
2142
2158
|
]));
|
|
2143
2159
|
}
|
|
2144
|
-
const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2160
|
+
const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$c]]), _hoisted_1$m = { class: "flex items-center gap-[4px]" }, _hoisted_2$6 = ["value", "id", "disabled"], _hoisted_3$3 = ["for"], _hoisted_4$2 = { class: "text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2145
2161
|
__name: "vs-checkbox-default",
|
|
2146
2162
|
props: {
|
|
2147
2163
|
value: { type: [String, Number], default: "" },
|
|
@@ -2157,7 +2173,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2157
2173
|
get: () => r.modelValue,
|
|
2158
2174
|
set: (s) => n("update:modelValue", s)
|
|
2159
2175
|
});
|
|
2160
|
-
return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2176
|
+
return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
2161
2177
|
withDirectives(createElementVNode("input", {
|
|
2162
2178
|
type: "checkbox",
|
|
2163
2179
|
value: e.value,
|
|
@@ -2188,10 +2204,10 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2188
2204
|
], 10, _hoisted_3$3)
|
|
2189
2205
|
]));
|
|
2190
2206
|
}
|
|
2191
|
-
}), _hoisted_1$
|
|
2207
|
+
}), _hoisted_1$l = ["name", "value", "disabled"], _hoisted_2$5 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$2 = {
|
|
2192
2208
|
key: 0,
|
|
2193
2209
|
class: "text-[16px]"
|
|
2194
|
-
}, _hoisted_4$1 = ["src"], _sfc_main$
|
|
2210
|
+
}, _hoisted_4$1 = ["src"], _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2195
2211
|
__name: "vs-checkbox-buttons",
|
|
2196
2212
|
props: {
|
|
2197
2213
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -2224,7 +2240,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2224
2240
|
value: e.value,
|
|
2225
2241
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
|
|
2226
2242
|
disabled: e.disabled
|
|
2227
|
-
}, null, 8, _hoisted_1$
|
|
2243
|
+
}, null, 8, _hoisted_1$l), [
|
|
2228
2244
|
[vModelCheckbox, o.value]
|
|
2229
2245
|
]),
|
|
2230
2246
|
createElementVNode("span", _hoisted_2$5, [
|
|
@@ -2248,9 +2264,9 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2248
2264
|
], 2));
|
|
2249
2265
|
}
|
|
2250
2266
|
}), VsCheckboxViews = {
|
|
2251
|
-
"vs-checkbox-default": _sfc_main$
|
|
2252
|
-
"vs-checkbox-buttons": _sfc_main$
|
|
2253
|
-
}, _hoisted_1$
|
|
2267
|
+
"vs-checkbox-default": _sfc_main$q,
|
|
2268
|
+
"vs-checkbox-buttons": _sfc_main$p
|
|
2269
|
+
}, _hoisted_1$k = { class: "flex items-center" }, _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2254
2270
|
__name: "vs-input-checkbox-item",
|
|
2255
2271
|
props: {
|
|
2256
2272
|
value: { type: [String, Number], default: "" },
|
|
@@ -2279,7 +2295,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2279
2295
|
r("update:modelValue", i);
|
|
2280
2296
|
}
|
|
2281
2297
|
}), l = ref(`vs-checkbox-${n.view || "default"}`);
|
|
2282
|
-
return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2298
|
+
return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
2283
2299
|
(openBlock(), createBlock(resolveDynamicComponent(unref(VsCheckboxViews)?.[l.value]), {
|
|
2284
2300
|
value: e.value,
|
|
2285
2301
|
label: e.label,
|
|
@@ -2299,7 +2315,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2299
2315
|
}, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style"]))
|
|
2300
2316
|
]));
|
|
2301
2317
|
}
|
|
2302
|
-
}), _sfc_main$
|
|
2318
|
+
}), _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2303
2319
|
__name: "vs-input-checkbox",
|
|
2304
2320
|
props: {
|
|
2305
2321
|
options: {
|
|
@@ -2386,7 +2402,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2386
2402
|
}), (a, d) => (openBlock(), createElementBlock("div", {
|
|
2387
2403
|
class: normalizeClass(["p-0 w-full gap-[6px]", [e.position === "vertical" ? "flex-col" : "", e.colSpan ? "grid" : "flex justify-start"]])
|
|
2388
2404
|
}, [
|
|
2389
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (f) => (openBlock(), createBlock(_sfc_main$
|
|
2405
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (f) => (openBlock(), createBlock(_sfc_main$o, {
|
|
2390
2406
|
modelValue: s[l(f)],
|
|
2391
2407
|
"onUpdate:modelValue": (h) => s[l(f)] = h,
|
|
2392
2408
|
value: l(f),
|
|
@@ -2402,7 +2418,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2402
2418
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "slots", "view"]))), 128))
|
|
2403
2419
|
], 2));
|
|
2404
2420
|
}
|
|
2405
|
-
}), VsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2421
|
+
}), VsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-9685f778"]]), _hoisted_1$j = ["placeholder", "disabled"], _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2406
2422
|
__name: "vs-input-date1",
|
|
2407
2423
|
props: /* @__PURE__ */ mergeModels({
|
|
2408
2424
|
style: {
|
|
@@ -2437,7 +2453,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2437
2453
|
style: {
|
|
2438
2454
|
border: "1px solid #CFD9E0"
|
|
2439
2455
|
}
|
|
2440
|
-
}, null, 10, _hoisted_1$
|
|
2456
|
+
}, null, 10, _hoisted_1$j)), [
|
|
2441
2457
|
[vModelText, r.value]
|
|
2442
2458
|
]);
|
|
2443
2459
|
}
|
|
@@ -2471,7 +2487,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2471
2487
|
} catch (t) {
|
|
2472
2488
|
console.error(t.message);
|
|
2473
2489
|
}
|
|
2474
|
-
}, _sfc_main$
|
|
2490
|
+
}, _sfc_main$l = {}, _hoisted_1$i = {
|
|
2475
2491
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2476
2492
|
width: "24",
|
|
2477
2493
|
height: "24",
|
|
@@ -2482,13 +2498,13 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_rend
|
|
|
2482
2498
|
"stroke-linecap": "round",
|
|
2483
2499
|
"stroke-linejoin": "round"
|
|
2484
2500
|
};
|
|
2485
|
-
function _sfc_render$
|
|
2486
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2501
|
+
function _sfc_render$b(e, t) {
|
|
2502
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$i, t[0] || (t[0] = [
|
|
2487
2503
|
createElementVNode("path", { d: "M5 12h14" }, null, -1),
|
|
2488
2504
|
createElementVNode("path", { d: "M12 5v14" }, null, -1)
|
|
2489
2505
|
]));
|
|
2490
2506
|
}
|
|
2491
|
-
const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2507
|
+
const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$b]]), _sfc_main$k = {}, _hoisted_1$h = {
|
|
2492
2508
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2493
2509
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
2494
2510
|
width: "44",
|
|
@@ -2500,12 +2516,12 @@ const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_rende
|
|
|
2500
2516
|
"stroke-linecap": "round",
|
|
2501
2517
|
"stroke-linejoin": "round"
|
|
2502
2518
|
};
|
|
2503
|
-
function _sfc_render$
|
|
2504
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2519
|
+
function _sfc_render$a(e, t, n, r, o, s) {
|
|
2520
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$h, t[0] || (t[0] = [
|
|
2505
2521
|
createStaticVNode('<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)
|
|
2506
2522
|
]));
|
|
2507
2523
|
}
|
|
2508
|
-
const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2524
|
+
const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$a]]), _sfc_main$j = {}, _hoisted_1$g = {
|
|
2509
2525
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2510
2526
|
class: "icon icon-tabler icon-tabler-table",
|
|
2511
2527
|
width: "44",
|
|
@@ -2517,8 +2533,8 @@ const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render
|
|
|
2517
2533
|
"stroke-linecap": "round",
|
|
2518
2534
|
"stroke-linejoin": "round"
|
|
2519
2535
|
};
|
|
2520
|
-
function _sfc_render$
|
|
2521
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2536
|
+
function _sfc_render$9(e, t, n, r, o, s) {
|
|
2537
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$g, t[0] || (t[0] = [
|
|
2522
2538
|
createElementVNode("path", {
|
|
2523
2539
|
stroke: "none",
|
|
2524
2540
|
d: "M0 0h24v24H0z",
|
|
@@ -2545,7 +2561,7 @@ function _sfc_render$8(e, t, n, r, o, s) {
|
|
|
2545
2561
|
}, null, -1)
|
|
2546
2562
|
]));
|
|
2547
2563
|
}
|
|
2548
|
-
const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2564
|
+
const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$9]]), _sfc_main$i = {}, _hoisted_1$f = {
|
|
2549
2565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2550
2566
|
width: "24",
|
|
2551
2567
|
height: "24",
|
|
@@ -2557,12 +2573,12 @@ const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render
|
|
|
2557
2573
|
"stroke-linejoin": "round",
|
|
2558
2574
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
|
|
2559
2575
|
};
|
|
2560
|
-
function _sfc_render$
|
|
2561
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2576
|
+
function _sfc_render$8(e, t, n, r, o, s) {
|
|
2577
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$f, t[0] || (t[0] = [
|
|
2562
2578
|
createStaticVNode('<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)
|
|
2563
2579
|
]));
|
|
2564
2580
|
}
|
|
2565
|
-
const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2581
|
+
const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$8]]), _sfc_main$h = {}, _hoisted_1$e = {
|
|
2566
2582
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2567
2583
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
2568
2584
|
width: "44",
|
|
@@ -2574,12 +2590,12 @@ const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_rende
|
|
|
2574
2590
|
"stroke-linecap": "round",
|
|
2575
2591
|
"stroke-linejoin": "round"
|
|
2576
2592
|
};
|
|
2577
|
-
function _sfc_render$
|
|
2578
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2593
|
+
function _sfc_render$7(e, t, n, r, o, s) {
|
|
2594
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$e, t[0] || (t[0] = [
|
|
2579
2595
|
createStaticVNode('<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)
|
|
2580
2596
|
]));
|
|
2581
2597
|
}
|
|
2582
|
-
const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2598
|
+
const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$7]]), _sfc_main$g = {}, _hoisted_1$d = {
|
|
2583
2599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2584
2600
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
2585
2601
|
width: "44",
|
|
@@ -2591,12 +2607,12 @@ const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
2591
2607
|
"stroke-linecap": "round",
|
|
2592
2608
|
"stroke-linejoin": "round"
|
|
2593
2609
|
};
|
|
2594
|
-
function _sfc_render$
|
|
2595
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2610
|
+
function _sfc_render$6(e, t, n, r, o, s) {
|
|
2611
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$d, t[0] || (t[0] = [
|
|
2596
2612
|
createStaticVNode('<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)
|
|
2597
2613
|
]));
|
|
2598
2614
|
}
|
|
2599
|
-
const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2615
|
+
const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$6]]), getFileType = (e) => {
|
|
2600
2616
|
if (!e) return "";
|
|
2601
2617
|
const t = e?.split(".");
|
|
2602
2618
|
return t[t.length - 1];
|
|
@@ -2609,7 +2625,7 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_re
|
|
|
2609
2625
|
documentsFormat: ["pdf"]
|
|
2610
2626
|
};
|
|
2611
2627
|
return n.imageFormat.includes(t) ? "img" : n.sheetsFormat.includes(t) ? IconCsv : n.textsFormat.includes(t) ? IconGeojson : n.documentsFormat.includes(t) ? iconPdf : n.archivesFormat.includes(t) ? IconZip : IconFile;
|
|
2612
|
-
}, _sfc_main$
|
|
2628
|
+
}, _sfc_main$f = {}, _hoisted_1$c = {
|
|
2613
2629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2614
2630
|
width: "24",
|
|
2615
2631
|
height: "24",
|
|
@@ -2621,12 +2637,12 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_re
|
|
|
2621
2637
|
"stroke-linejoin": "round",
|
|
2622
2638
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
2623
2639
|
};
|
|
2624
|
-
function _sfc_render$
|
|
2625
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2640
|
+
function _sfc_render$5(e, t) {
|
|
2641
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$c, t[0] || (t[0] = [
|
|
2626
2642
|
createStaticVNode('<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)
|
|
2627
2643
|
]));
|
|
2628
2644
|
}
|
|
2629
|
-
const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2645
|
+
const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$5]]), _sfc_main$e = {}, _hoisted_1$b = {
|
|
2630
2646
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2631
2647
|
width: "24",
|
|
2632
2648
|
height: "24",
|
|
@@ -2638,8 +2654,8 @@ const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_ren
|
|
|
2638
2654
|
"stroke-linejoin": "round",
|
|
2639
2655
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
2640
2656
|
};
|
|
2641
|
-
function _sfc_render$
|
|
2642
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2657
|
+
function _sfc_render$4(e, t) {
|
|
2658
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, t[0] || (t[0] = [
|
|
2643
2659
|
createElementVNode("path", {
|
|
2644
2660
|
stroke: "none",
|
|
2645
2661
|
d: "M0 0h24v24H0z",
|
|
@@ -2650,7 +2666,7 @@ function _sfc_render$3(e, t) {
|
|
|
2650
2666
|
createElementVNode("path", { d: "M12 4l0 12" }, null, -1)
|
|
2651
2667
|
]));
|
|
2652
2668
|
}
|
|
2653
|
-
const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2669
|
+
const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$4]]), _hoisted_1$a = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, _hoisted_2$4 = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2654
2670
|
__name: "vs-input-file-list-item",
|
|
2655
2671
|
props: /* @__PURE__ */ mergeModels({
|
|
2656
2672
|
multiple: { type: Boolean }
|
|
@@ -2663,7 +2679,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2663
2679
|
emits: ["update:value", "update:item"],
|
|
2664
2680
|
setup(e) {
|
|
2665
2681
|
const t = useModel(e, "value"), n = useModel(e, "item"), r = e;
|
|
2666
|
-
return (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2682
|
+
return (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
2667
2683
|
(openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(n.value)), {
|
|
2668
2684
|
src: n.value,
|
|
2669
2685
|
alt: "file",
|
|
@@ -2690,10 +2706,10 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2690
2706
|
])
|
|
2691
2707
|
]));
|
|
2692
2708
|
}
|
|
2693
|
-
}), VsInputFileListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2709
|
+
}), VsInputFileListItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-bc0f6d32"]]), _hoisted_1$9 = { class: "flex items-center gap-x-2" }, _hoisted_2$3 = {
|
|
2694
2710
|
key: 1,
|
|
2695
2711
|
class: "flex items-center flex-wrap gap-2"
|
|
2696
|
-
}, _sfc_main$
|
|
2712
|
+
}, _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2697
2713
|
__name: "vs-input-file",
|
|
2698
2714
|
props: /* @__PURE__ */ mergeModels({
|
|
2699
2715
|
multiple: { type: Boolean },
|
|
@@ -2716,7 +2732,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2716
2732
|
const u = await fileUpload(i, "1", "form", "table");
|
|
2717
2733
|
n.value = t.multiple ? [...n.value || [], u.result?.file_path] : u.result?.file_path;
|
|
2718
2734
|
};
|
|
2719
|
-
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2735
|
+
return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2720
2736
|
createElementVNode("input", {
|
|
2721
2737
|
class: "hidden",
|
|
2722
2738
|
ref_key: "fileInput",
|
|
@@ -2757,7 +2773,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2757
2773
|
], 2))
|
|
2758
2774
|
]));
|
|
2759
2775
|
}
|
|
2760
|
-
}), _hoisted_1$
|
|
2776
|
+
}), _hoisted_1$8 = { class: "flex items-center justify-between" }, _hoisted_2$2 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_3$1 = { class: "grid gap-3" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
2761
2777
|
__name: "vs-container-switcher",
|
|
2762
2778
|
props: {
|
|
2763
2779
|
title: {
|
|
@@ -2781,9 +2797,9 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2781
2797
|
n.value = r;
|
|
2782
2798
|
}
|
|
2783
2799
|
), (r, o) => (openBlock(), createElementBlock("div", null, [
|
|
2784
|
-
createElementVNode("div", _hoisted_1$
|
|
2800
|
+
createElementVNode("div", _hoisted_1$8, [
|
|
2785
2801
|
createElementVNode("p", _hoisted_2$2, toDisplayString(e.title), 1),
|
|
2786
|
-
createVNode(_sfc_main$
|
|
2802
|
+
createVNode(_sfc_main$x, {
|
|
2787
2803
|
modelValue: n.value,
|
|
2788
2804
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => n.value = s),
|
|
2789
2805
|
style: normalizeStyle(e.style)
|
|
@@ -2801,7 +2817,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2801
2817
|
})
|
|
2802
2818
|
]));
|
|
2803
2819
|
}
|
|
2804
|
-
}), VsContainerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2820
|
+
}), VsContainerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-479564a3"]]), _sfc_main$a = {}, _hoisted_1$7 = {
|
|
2805
2821
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2806
2822
|
viewBox: "0 0 24 24",
|
|
2807
2823
|
fill: "none",
|
|
@@ -2811,8 +2827,8 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
2811
2827
|
"stroke-linejoin": "round",
|
|
2812
2828
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
2813
2829
|
};
|
|
2814
|
-
function _sfc_render$
|
|
2815
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2830
|
+
function _sfc_render$3(e, t) {
|
|
2831
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$7, t[0] || (t[0] = [
|
|
2816
2832
|
createElementVNode("path", {
|
|
2817
2833
|
stroke: "none",
|
|
2818
2834
|
d: "M0 0h24v24H0z",
|
|
@@ -2821,7 +2837,7 @@ function _sfc_render$2(e, t) {
|
|
|
2821
2837
|
createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
2822
2838
|
]));
|
|
2823
2839
|
}
|
|
2824
|
-
const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2840
|
+
const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$3]]), _sfc_main$9 = {}, _hoisted_1$6 = {
|
|
2825
2841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2826
2842
|
viewBox: "0 0 24 24",
|
|
2827
2843
|
fill: "none",
|
|
@@ -2830,13 +2846,13 @@ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sf
|
|
|
2830
2846
|
"stroke-linecap": "round",
|
|
2831
2847
|
"stroke-linejoin": "round"
|
|
2832
2848
|
};
|
|
2833
|
-
function _sfc_render$
|
|
2834
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2849
|
+
function _sfc_render$2(e, t) {
|
|
2850
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$6, t[0] || (t[0] = [
|
|
2835
2851
|
createElementVNode("path", { d: "m7 15 5 5 5-5" }, null, -1),
|
|
2836
2852
|
createElementVNode("path", { d: "m7 9 5-5 5 5" }, null, -1)
|
|
2837
2853
|
]));
|
|
2838
2854
|
}
|
|
2839
|
-
const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2855
|
+
const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$2]]), _sfc_main$8 = {}, _hoisted_1$5 = {
|
|
2840
2856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2841
2857
|
viewBox: "0 0 24 24",
|
|
2842
2858
|
fill: "none",
|
|
@@ -2846,8 +2862,8 @@ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render"
|
|
|
2846
2862
|
"stroke-linejoin": "round",
|
|
2847
2863
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
2848
2864
|
};
|
|
2849
|
-
function _sfc_render(e, t) {
|
|
2850
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2865
|
+
function _sfc_render$1(e, t) {
|
|
2866
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$5, t[0] || (t[0] = [
|
|
2851
2867
|
createElementVNode("path", {
|
|
2852
2868
|
stroke: "none",
|
|
2853
2869
|
d: "M0 0h24v24H0z",
|
|
@@ -2857,7 +2873,7 @@ function _sfc_render(e, t) {
|
|
|
2857
2873
|
createElementVNode("path", { d: "M6 6l12 12" }, null, -1)
|
|
2858
2874
|
]));
|
|
2859
2875
|
}
|
|
2860
|
-
const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2876
|
+
const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]]), _hoisted_1$4 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_2$1 = { class: "grid gap-3" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2861
2877
|
__name: "vs-container-accordion",
|
|
2862
2878
|
props: {
|
|
2863
2879
|
title: {
|
|
@@ -2889,7 +2905,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
2889
2905
|
createVNode(unref(IconChevronDown), {
|
|
2890
2906
|
class: normalizeClass(["h-4 w-4 duration-300", [n.value ? "-rotate-180" : ""]])
|
|
2891
2907
|
}, null, 8, ["class"]),
|
|
2892
|
-
createElementVNode("span", _hoisted_1$
|
|
2908
|
+
createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)
|
|
2893
2909
|
]),
|
|
2894
2910
|
createVNode(Transition, { name: "slide-fade" }, {
|
|
2895
2911
|
default: withCtx(() => [
|
|
@@ -2903,7 +2919,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
2903
2919
|
})
|
|
2904
2920
|
]));
|
|
2905
2921
|
}
|
|
2906
|
-
}), VsContainerAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2922
|
+
}), VsContainerAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-a37284e6"]]), _hoisted_1$3 = { class: "flex items-center justify-between" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2907
2923
|
__name: "vs-container-default",
|
|
2908
2924
|
props: {
|
|
2909
2925
|
title: {
|
|
@@ -2917,7 +2933,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
2917
2933
|
},
|
|
2918
2934
|
setup(e) {
|
|
2919
2935
|
return (t, n) => (openBlock(), createElementBlock("div", null, [
|
|
2920
|
-
createElementVNode("div", _hoisted_1$
|
|
2936
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
2921
2937
|
createElementVNode("p", null, toDisplayString(e.title), 1)
|
|
2922
2938
|
]),
|
|
2923
2939
|
renderSlot(t.$slots, "default")
|
|
@@ -2926,7 +2942,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
2926
2942
|
}), views = {
|
|
2927
2943
|
switcher: VsContainerSwitcher,
|
|
2928
2944
|
accordion: VsContainerAccordion,
|
|
2929
|
-
default: _sfc_main$
|
|
2945
|
+
default: _sfc_main$6
|
|
2930
2946
|
}, FormConditionsTypes = {
|
|
2931
2947
|
Equal: "==",
|
|
2932
2948
|
Inequal: "!=",
|
|
@@ -2970,7 +2986,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
2970
2986
|
default:
|
|
2971
2987
|
return !0;
|
|
2972
2988
|
}
|
|
2973
|
-
}, _sfc_main$
|
|
2989
|
+
}, _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2974
2990
|
__name: "vs-input-container",
|
|
2975
2991
|
props: {
|
|
2976
2992
|
style: {
|
|
@@ -3057,10 +3073,34 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3057
3073
|
break;
|
|
3058
3074
|
}
|
|
3059
3075
|
f + u > a ? f = a - u - r : f < 0 && (f = r), h + c > d ? h = d - c - r : h < 0 && (h = r), n instanceof HTMLElement && (n.style.top = `${f}px`, n.style.left = `${h}px`, n.style.position = "fixed");
|
|
3060
|
-
},
|
|
3076
|
+
}, _sfc_main$4 = {}, _hoisted_1$2 = {
|
|
3077
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3078
|
+
viewBox: "0 0 24 24",
|
|
3079
|
+
fill: "none",
|
|
3080
|
+
stroke: "currentColor",
|
|
3081
|
+
"stroke-width": "2",
|
|
3082
|
+
"stroke-linecap": "round",
|
|
3083
|
+
"stroke-linejoin": "round",
|
|
3084
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
3085
|
+
};
|
|
3086
|
+
function _sfc_render(e, t) {
|
|
3087
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, t[0] || (t[0] = [
|
|
3088
|
+
createElementVNode("path", {
|
|
3089
|
+
stroke: "none",
|
|
3090
|
+
d: "M0 0h24v24H0z",
|
|
3091
|
+
fill: "none"
|
|
3092
|
+
}, null, -1),
|
|
3093
|
+
createElementVNode("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
|
|
3094
|
+
createElementVNode("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
3095
|
+
]));
|
|
3096
|
+
}
|
|
3097
|
+
const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render]]), _hoisted_1$1 = ["disabled"], _hoisted_2 = { key: 1 }, _hoisted_3 = {
|
|
3061
3098
|
key: 2,
|
|
3062
3099
|
class: "text-gray-400"
|
|
3063
|
-
}, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 =
|
|
3100
|
+
}, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 = {
|
|
3101
|
+
key: 0,
|
|
3102
|
+
class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"
|
|
3103
|
+
}, _hoisted_6 = { class: "h-[30px] shrink-0 flex items-center relative justify-center" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_9 = { key: 2 }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3064
3104
|
__name: "vs-input-select",
|
|
3065
3105
|
props: /* @__PURE__ */ mergeModels({
|
|
3066
3106
|
placeholder: { default: "Оберіть значення" },
|
|
@@ -3072,7 +3112,8 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3072
3112
|
slots: { default: null },
|
|
3073
3113
|
customClass: { default: "" },
|
|
3074
3114
|
style: { default: () => ({}) },
|
|
3075
|
-
disabled: { type: Boolean }
|
|
3115
|
+
disabled: { type: Boolean },
|
|
3116
|
+
mode: {}
|
|
3076
3117
|
}, {
|
|
3077
3118
|
modelValue: {
|
|
3078
3119
|
type: [Number, String],
|
|
@@ -3082,57 +3123,66 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3082
3123
|
}),
|
|
3083
3124
|
emits: ["update:modelValue"],
|
|
3084
3125
|
setup(e) {
|
|
3085
|
-
const t = e, { inputClass: n } = useStyle(t.style)
|
|
3126
|
+
const t = e, { inputClass: n } = useStyle(t.style);
|
|
3127
|
+
console.log(t.mode);
|
|
3128
|
+
const r = useModel(e, "modelValue"), o = ref({}), s = ref(null), l = ref(null), i = ref(!1), u = ref(null), c = ref([]), a = ref(-1), d = ref([]), f = ref(""), h = ref(null);
|
|
3129
|
+
let p = null;
|
|
3130
|
+
const y = computed(() => c.value?.length ? [
|
|
3086
3131
|
u.value,
|
|
3087
3132
|
...c.value?.filter((b) => b?.id !== u.value?.id)
|
|
3088
|
-
].filter((b) => b !== null) : []),
|
|
3133
|
+
].filter((b) => b !== null) : []), m = async () => {
|
|
3089
3134
|
try {
|
|
3090
3135
|
const { data: b } = await axios.get(
|
|
3091
|
-
`${t.host}/${t.prefix}/suggest/${t.data}?json=1`
|
|
3136
|
+
`${t.host}/${t.prefix}/suggest/${t.data}?json=1&key=${f.value}`
|
|
3092
3137
|
);
|
|
3093
3138
|
return b.data;
|
|
3094
3139
|
} catch {
|
|
3095
3140
|
return [];
|
|
3096
3141
|
}
|
|
3097
|
-
},
|
|
3098
|
-
document.body.click(), i.value = b !== void 0 ? b : !i.value, i.value && !c.value?.length && (!t.options?.length && t.data ? c.value = await
|
|
3099
|
-
},
|
|
3100
|
-
u.value = b, r.value = b.id,
|
|
3101
|
-
},
|
|
3142
|
+
}, x = async (b) => {
|
|
3143
|
+
document.body.click(), i.value = b !== void 0 ? b : !i.value, i.value && !c.value?.length && (!t.options?.length && t.data ? c.value = await m() : t.options?.length && (c.value = [...t.options])), i.value && s.value ? (o.value.width = `${s.value.getBoundingClientRect()?.width}px`, t.mode === "search" && h.value.focus(), l.value && dynamicPosition("bottom-start", s.value, l.value)) : a.value = -1;
|
|
3144
|
+
}, $ = () => i.value ? x(!1) : null, w = (b) => {
|
|
3145
|
+
u.value = b, r.value = b.id, x(!1);
|
|
3146
|
+
}, _ = (b, g) => {
|
|
3102
3147
|
if (!b || !g) return;
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3105
|
-
},
|
|
3148
|
+
const v = b.offsetTop, B = v + b.offsetHeight, A = g.scrollTop, R = A + g.clientHeight;
|
|
3149
|
+
v < A ? g.scrollTop = v - 80 : B > R && (g.scrollTop = B - g.clientHeight + 4);
|
|
3150
|
+
}, k = (b) => {
|
|
3106
3151
|
if (!i.value) return;
|
|
3107
3152
|
const { keyCode: g } = b;
|
|
3108
3153
|
if ([38, 40, 13].includes(g) && b.preventDefault(), g == 38) {
|
|
3109
3154
|
if (a.value == 0) return;
|
|
3110
|
-
a.value -= 1,
|
|
3155
|
+
a.value -= 1, _(d.value[a.value], l.value);
|
|
3111
3156
|
} else if (g == 40) {
|
|
3112
|
-
if (a.value + 1 >=
|
|
3113
|
-
a.value += 1,
|
|
3157
|
+
if (a.value + 1 >= y.value?.length) return;
|
|
3158
|
+
a.value += 1, _(d.value[a.value], l.value);
|
|
3114
3159
|
} else if (g == 13) {
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3160
|
+
const v = y.value[a.value];
|
|
3161
|
+
v && w(v);
|
|
3117
3162
|
}
|
|
3118
|
-
},
|
|
3163
|
+
}, E = async (b) => {
|
|
3119
3164
|
if (i.value) return;
|
|
3120
3165
|
const { keyCode: g } = b;
|
|
3121
|
-
[38, 40].includes(g) && (await b.preventDefault(), a.value = 0, setTimeout(() =>
|
|
3122
|
-
},
|
|
3166
|
+
[38, 40].includes(g) && (await b.preventDefault(), a.value = 0, setTimeout(() => x()));
|
|
3167
|
+
}, S = (b) => {
|
|
3123
3168
|
i.value && s.value && l.value && !l.value.contains(b.target) && (i.value = !1);
|
|
3124
|
-
},
|
|
3125
|
-
b?.key === "Escape" && i.value &&
|
|
3169
|
+
}, C = (b) => {
|
|
3170
|
+
b?.key === "Escape" && i.value && x(!1);
|
|
3126
3171
|
};
|
|
3127
3172
|
return onMounted(async () => {
|
|
3128
|
-
addEventListener("click",
|
|
3173
|
+
addEventListener("click", $), addEventListener("keydown", k), addEventListener("scroll", S, !0), addEventListener("keydown", C), r.value && !t.options?.length && t.data && (c.value = await m(), u.value = c.value?.find((b) => b?.id === r.value) || null);
|
|
3129
3174
|
}), onUnmounted(() => {
|
|
3130
|
-
removeEventListener("click",
|
|
3175
|
+
removeEventListener("click", $), removeEventListener("keydown", k), removeEventListener("scroll", S, !0), removeEventListener("keydown", C);
|
|
3176
|
+
}), watch(f, (b) => {
|
|
3177
|
+
let g = !1;
|
|
3178
|
+
(b == "" || b.trimStart().length !== 0) && (g = !0), g && (p && clearTimeout(p), p = setTimeout(async () => {
|
|
3179
|
+
!t.options?.length && t.data ? c.value = await m() : c.value = t.options.filter((v) => v.text.toLowerCase().includes(b.toLowerCase()));
|
|
3180
|
+
}, 200));
|
|
3131
3181
|
}), (b, g) => (openBlock(), createElementBlock("div", {
|
|
3132
3182
|
class: "relative w-full",
|
|
3133
3183
|
ref_key: "select",
|
|
3134
3184
|
ref: s,
|
|
3135
|
-
onClick: g[
|
|
3185
|
+
onClick: g[5] || (g[5] = withModifiers(() => {
|
|
3136
3186
|
}, ["stop"]))
|
|
3137
3187
|
}, [
|
|
3138
3188
|
createElementVNode("button", {
|
|
@@ -3143,8 +3193,8 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3143
3193
|
unref(n),
|
|
3144
3194
|
b.customClass
|
|
3145
3195
|
]]),
|
|
3146
|
-
onKeydown:
|
|
3147
|
-
onClick: g[0] || (g[0] = (
|
|
3196
|
+
onKeydown: E,
|
|
3197
|
+
onClick: g[0] || (g[0] = (v) => x(!i.value)),
|
|
3148
3198
|
disabled: b.disabled,
|
|
3149
3199
|
style: {
|
|
3150
3200
|
border: "1px solid #CFD9E0"
|
|
@@ -3166,7 +3216,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3166
3216
|
u.value?.text ? (openBlock(), createElementBlock("button", {
|
|
3167
3217
|
key: 0,
|
|
3168
3218
|
type: "button",
|
|
3169
|
-
onClick: g[1] || (g[1] = (
|
|
3219
|
+
onClick: g[1] || (g[1] = (v) => {
|
|
3170
3220
|
r.value = null, u.value = null;
|
|
3171
3221
|
}),
|
|
3172
3222
|
class: "absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"
|
|
@@ -3186,35 +3236,61 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3186
3236
|
maxHeight: b.maxHeight + "px",
|
|
3187
3237
|
backgroundColor: "white"
|
|
3188
3238
|
}),
|
|
3189
|
-
onClick: g[
|
|
3239
|
+
onClick: g[4] || (g[4] = withModifiers(() => {
|
|
3190
3240
|
}, ["stop"]))
|
|
3191
3241
|
}, [
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3242
|
+
b.mode === "search" ? (openBlock(), createElementBlock("li", _hoisted_5, [
|
|
3243
|
+
createElementVNode("div", _hoisted_6, [
|
|
3244
|
+
withDirectives(createElementVNode("input", {
|
|
3245
|
+
"onUpdate:modelValue": g[2] || (g[2] = (v) => f.value = v),
|
|
3246
|
+
class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
|
|
3247
|
+
placeholder: "Пошук",
|
|
3248
|
+
type: "text",
|
|
3249
|
+
ref_key: "inputRef",
|
|
3250
|
+
ref: h
|
|
3251
|
+
}, null, 512), [
|
|
3252
|
+
[vModelText, f.value]
|
|
3253
|
+
]),
|
|
3254
|
+
createVNode(IconMagnifyingGlass, {
|
|
3255
|
+
width: "15px",
|
|
3256
|
+
height: "15px",
|
|
3257
|
+
class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"
|
|
3258
|
+
}),
|
|
3259
|
+
f.value != "" ? (openBlock(), createBlock(unref(IconClose), {
|
|
3260
|
+
key: 0,
|
|
3261
|
+
width: "15px",
|
|
3262
|
+
height: "15px",
|
|
3263
|
+
onClick: g[3] || (g[3] = (v) => f.value = ""),
|
|
3264
|
+
class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
|
|
3265
|
+
})) : createCommentVNode("", !0)
|
|
3266
|
+
])
|
|
3267
|
+
])) : createCommentVNode("", !0),
|
|
3268
|
+
y.value?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3269
|
+
g[6] || (g[6] = createElementVNode("li", { class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400" }, " Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ", -1)),
|
|
3270
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (v, B) => (openBlock(), createElementBlock("li", {
|
|
3271
|
+
onClick: (A) => w(v),
|
|
3272
|
+
key: v?.id,
|
|
3197
3273
|
ref_for: !0,
|
|
3198
|
-
ref: (
|
|
3199
|
-
class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [a.value ==
|
|
3274
|
+
ref: (A) => d.value[B] = A,
|
|
3275
|
+
class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [a.value == B ? "bg-gray-100" : ""]])
|
|
3200
3276
|
}, [
|
|
3201
|
-
createElementVNode("span",
|
|
3202
|
-
|
|
3277
|
+
createElementVNode("span", _hoisted_8, [
|
|
3278
|
+
v?.color ? (openBlock(), createElementBlock("span", {
|
|
3203
3279
|
key: 0,
|
|
3204
3280
|
class: "w-[16px] h-[16px] rounded-md block",
|
|
3205
|
-
style: normalizeStyle({ backgroundColor:
|
|
3281
|
+
style: normalizeStyle({ backgroundColor: v?.color })
|
|
3206
3282
|
}, null, 4)) : createCommentVNode("", !0),
|
|
3207
|
-
createTextVNode(" " + toDisplayString(
|
|
3283
|
+
createTextVNode(" " + toDisplayString(v?.text), 1)
|
|
3208
3284
|
]),
|
|
3209
|
-
r.value ==
|
|
3285
|
+
r.value == v?.id ? (openBlock(), createBlock(unref(IconCheck), {
|
|
3210
3286
|
key: 0,
|
|
3211
3287
|
height: "14",
|
|
3212
3288
|
width: "14",
|
|
3213
3289
|
"stroke-width": "2",
|
|
3214
3290
|
class: "absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"
|
|
3215
3291
|
})) : createCommentVNode("", !0)
|
|
3216
|
-
], 10,
|
|
3217
|
-
], 64)) : (openBlock(), createElementBlock("li",
|
|
3292
|
+
], 10, _hoisted_7))), 128))
|
|
3293
|
+
], 64)) : (openBlock(), createElementBlock("li", _hoisted_9, "Дані відсутні"))
|
|
3218
3294
|
], 4), [
|
|
3219
3295
|
[vShow, i.value]
|
|
3220
3296
|
])
|
|
@@ -3261,20 +3337,20 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3261
3337
|
]);
|
|
3262
3338
|
}
|
|
3263
3339
|
}), inputs = {
|
|
3264
|
-
VsInputText: _sfc_main$
|
|
3265
|
-
VsInputRadio: _sfc_main$
|
|
3266
|
-
"vs-input-text": _sfc_main$
|
|
3340
|
+
VsInputText: _sfc_main$z,
|
|
3341
|
+
VsInputRadio: _sfc_main$s,
|
|
3342
|
+
"vs-input-text": _sfc_main$z,
|
|
3267
3343
|
"vs-input-textarea": _sfc_main$2,
|
|
3268
|
-
"vs-input-mask": _sfc_main$
|
|
3269
|
-
"vs-input-number": _sfc_main$
|
|
3270
|
-
"vs-input-radio": _sfc_main$
|
|
3344
|
+
"vs-input-mask": _sfc_main$v,
|
|
3345
|
+
"vs-input-number": _sfc_main$y,
|
|
3346
|
+
"vs-input-radio": _sfc_main$s,
|
|
3271
3347
|
"vs-input-select": _sfc_main$3,
|
|
3272
|
-
"vs-input-switcher": _sfc_main$
|
|
3273
|
-
"vs-input-static": _sfc_main$
|
|
3274
|
-
"vs-input-container": _sfc_main$
|
|
3275
|
-
"vs-input-date": _sfc_main$
|
|
3348
|
+
"vs-input-switcher": _sfc_main$x,
|
|
3349
|
+
"vs-input-static": _sfc_main$w,
|
|
3350
|
+
"vs-input-container": _sfc_main$5,
|
|
3351
|
+
"vs-input-date": _sfc_main$m,
|
|
3276
3352
|
"vs-input-checkbox": VsInputCheckbox,
|
|
3277
|
-
"vs-input-file": _sfc_main$
|
|
3353
|
+
"vs-input-file": _sfc_main$c
|
|
3278
3354
|
}, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3279
3355
|
__name: "vs-compact-form-layout",
|
|
3280
3356
|
props: {
|
|
@@ -3308,13 +3384,25 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_rend
|
|
|
3308
3384
|
}, 16, ["style", "item"]));
|
|
3309
3385
|
}
|
|
3310
3386
|
}), formErrorsUa = {
|
|
3311
|
-
required: "Це поле є
|
|
3387
|
+
required: "Це поле є обов'язковим",
|
|
3312
3388
|
email: "Неправильний email"
|
|
3313
|
-
}, required = (e) => e ? !1 : formErrorsUa.required, email = (e) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) && e ? formErrorsUa.email : !1, regexp = (e, t) =>
|
|
3314
|
-
|
|
3315
|
-
|
|
3389
|
+
}, required = (e) => e ? !1 : formErrorsUa.required, email = (e) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) && e ? formErrorsUa.email : !1, regexp = (e, t) => {
|
|
3390
|
+
try {
|
|
3391
|
+
const n = typeof t.pattern == "string" ? new RegExp(t.pattern) : t.pattern;
|
|
3392
|
+
return !n || typeof n.test != "function" ? (console.warn("Invalid regexp pattern:", t.pattern), !1) : !n.test(e) && e ? t.message : !1;
|
|
3393
|
+
} catch (n) {
|
|
3394
|
+
return console.warn("Error creating regexp pattern:", n), !1;
|
|
3395
|
+
}
|
|
3396
|
+
}, custom = (value, customRule) => {
|
|
3397
|
+
const func = eval(customRule.function);
|
|
3398
|
+
return func(value) ? !1 : customRule.message;
|
|
3316
3399
|
}, checkFormRules = (e, t) => {
|
|
3317
|
-
|
|
3400
|
+
if (!t)
|
|
3401
|
+
return console.warn("Rule is undefined or null"), !1;
|
|
3402
|
+
const n = typeof t == "string" ? t : t.type;
|
|
3403
|
+
if (!n)
|
|
3404
|
+
return console.warn("Rule type is undefined or null:", t), !1;
|
|
3405
|
+
switch (n) {
|
|
3318
3406
|
case "required":
|
|
3319
3407
|
return required(e);
|
|
3320
3408
|
case "email":
|
|
@@ -3356,7 +3444,7 @@ function useForm(e, t) {
|
|
|
3356
3444
|
const n = convertSchema(t), r = ref({}), o = (i = n, u = !0) => {
|
|
3357
3445
|
if (i.forEach((c) => {
|
|
3358
3446
|
c.rules && c.rules.forEach((a) => {
|
|
3359
|
-
r.value[c.name] = checkFormRules(e.value[c.name], a);
|
|
3447
|
+
a && (r.value[c.name] = checkFormRules(e.value[c.name], a));
|
|
3360
3448
|
}), c.schema && o(c.schema, !1);
|
|
3361
3449
|
}), u && Object.values(r.value).some(Boolean))
|
|
3362
3450
|
return r.value;
|
|
@@ -3422,6 +3510,6 @@ _sfc_main.install = function e(t) {
|
|
|
3422
3510
|
};
|
|
3423
3511
|
export {
|
|
3424
3512
|
_sfc_main as VForm,
|
|
3425
|
-
_sfc_main$
|
|
3513
|
+
_sfc_main$z as VsInputText,
|
|
3426
3514
|
_sfc_main as default
|
|
3427
3515
|
};
|