@verdnatura/vn-front-lib 0.2.0 → 0.2.1
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-DmGc4N0k.cjs → components-CU9aOdoo.cjs} +1 -1
- package/dist/{components-C8Wdf_CB.js → components-Dg6_uXLX.js} +459 -462
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/vn-front-lib.cjs +1 -1
- package/dist/vn-front-lib.css +1 -1
- package/dist/vn-front-lib.js +1 -1
- package/lib/components/selects/VnSelect.vue +11 -0
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
|
2
2
|
import { _ as t, g as n, h as r, m as i, p as a, t as o, u as s } from "./composables-CWY0-8uj.js";
|
|
3
3
|
import { useStateStore as c } from "./stores.js";
|
|
4
4
|
import { onBeforeSave as l } from "./filters.js";
|
|
5
|
-
import { Fragment as u, Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, mergeModels as S, mergeProps as ee, nextTick as C, normalizeClass as w, normalizeProps as T, normalizeStyle as
|
|
6
|
-
import * as
|
|
7
|
-
import { QAvatar as
|
|
8
|
-
import { useI18n as
|
|
9
|
-
import
|
|
10
|
-
import { onBeforeRouteLeave as
|
|
5
|
+
import { Fragment as u, Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, guardReactiveProps as x, mergeModels as S, mergeProps as ee, nextTick as C, normalizeClass as w, normalizeProps as T, normalizeStyle as te, onMounted as ne, onUnmounted as re, openBlock as E, ref as D, renderList as ie, renderSlot as O, toDisplayString as k, toRefs as A, unref as j, useAttrs as M, useModel as ae, vShow as N, watch as P, withCtx as F, withDirectives as oe, withKeys as I, withModifiers as se } from "vue";
|
|
6
|
+
import * as ce from "quasar";
|
|
7
|
+
import { QAvatar as le, QBtn as L, QBtnGroup as R, QCard as ue, QCardActions as z, QCardSection as B, QCheckbox as V, QChip as de, QDate as H, QDialog as U, QForm as fe, QIcon as W, QInnerLoading as pe, QInput as G, QItem as me, QItemLabel as he, QItemSection as K, QMenu as q, QSelect as ge, QSkeleton as J, QSpace as Y, QTooltip as X, date as Z, getCssVar as _e } from "quasar";
|
|
8
|
+
import { useI18n as ve } from "vue-i18n";
|
|
9
|
+
import Q from "axios";
|
|
10
|
+
import { onBeforeRouteLeave as ye, useRoute as be, useRouter as xe } from "vue-router";
|
|
11
11
|
//#region lib/components/dialogs/VnConfirm.vue?vue&type=i18n&index=0&lang.i18n
|
|
12
|
-
function
|
|
12
|
+
function Se(e) {
|
|
13
13
|
let t = e;
|
|
14
14
|
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
15
15
|
locale: "",
|
|
@@ -39,7 +39,7 @@ var $ = (e, t) => {
|
|
|
39
39
|
let n = e.__vccOpts || e;
|
|
40
40
|
for (let [e, r] of t) n[e] = r;
|
|
41
41
|
return n;
|
|
42
|
-
},
|
|
42
|
+
}, Ce = { class: "text-h6" }, we = ["innerHTML"], Te = {
|
|
43
43
|
__name: "VnConfirm",
|
|
44
44
|
props: {
|
|
45
45
|
icon: {
|
|
@@ -80,15 +80,15 @@ var $ = (e, t) => {
|
|
|
80
80
|
emits: [
|
|
81
81
|
"confirm",
|
|
82
82
|
"cancel",
|
|
83
|
-
...
|
|
83
|
+
...ce.useDialogPluginComponent.emits
|
|
84
84
|
],
|
|
85
85
|
setup(e, { expose: t, emit: n }) {
|
|
86
|
-
let { t: r } =
|
|
86
|
+
let { t: r } = ve(), i = e, a = n;
|
|
87
87
|
t({
|
|
88
88
|
show: () => o.value.show(),
|
|
89
89
|
hide: () => o.value.hide()
|
|
90
90
|
});
|
|
91
|
-
let { dialogRef: o, onDialogHide: s, onDialogOK: c, onDialogCancel: l } =
|
|
91
|
+
let { dialogRef: o, onDialogHide: s, onDialogOK: c, onDialogCancel: l } = ce.useDialogPluginComponent(), u = i.title || r("Confirm"), d = i.message || i.message !== !1 && r("Are you sure you want to continue?"), f = D(!1);
|
|
92
92
|
async function p() {
|
|
93
93
|
if (f.value = !0, i.promise) try {
|
|
94
94
|
await i.promise(i.data);
|
|
@@ -100,26 +100,26 @@ var $ = (e, t) => {
|
|
|
100
100
|
function v() {
|
|
101
101
|
a("cancel"), l();
|
|
102
102
|
}
|
|
103
|
-
return (t, n) => (
|
|
103
|
+
return (t, n) => (E(), m(j(U), {
|
|
104
104
|
ref_key: "dialogRef",
|
|
105
105
|
ref: o,
|
|
106
106
|
persistent: e.persistent,
|
|
107
|
-
onHide:
|
|
107
|
+
onHide: j(s)
|
|
108
108
|
}, {
|
|
109
|
-
default:
|
|
110
|
-
default:
|
|
111
|
-
b(
|
|
112
|
-
default:
|
|
113
|
-
e.icon ? (
|
|
109
|
+
default: F(() => [b(j(ue), { class: w(["q-pa-sm", e.cardClass]) }, {
|
|
110
|
+
default: F(() => [
|
|
111
|
+
b(j(B), { class: "row items-center q-pb-none" }, {
|
|
112
|
+
default: F(() => [
|
|
113
|
+
e.icon ? (E(), m(j(le), {
|
|
114
114
|
key: 0,
|
|
115
115
|
icon: e.icon,
|
|
116
116
|
color: "primary",
|
|
117
117
|
"text-color": "white",
|
|
118
118
|
size: "xl"
|
|
119
119
|
}, null, 8, ["icon"])) : h("", !0),
|
|
120
|
-
_("span",
|
|
121
|
-
b(
|
|
122
|
-
e.closable ? (
|
|
120
|
+
_("span", Ce, k(j(u)), 1),
|
|
121
|
+
b(j(Y)),
|
|
122
|
+
e.closable ? (E(), m(j(L), {
|
|
123
123
|
key: 1,
|
|
124
124
|
icon: "close",
|
|
125
125
|
disable: f.value,
|
|
@@ -131,43 +131,43 @@ var $ = (e, t) => {
|
|
|
131
131
|
]),
|
|
132
132
|
_: 1
|
|
133
133
|
}),
|
|
134
|
-
b(
|
|
134
|
+
b(j(B), {
|
|
135
135
|
class: "q-pb-none",
|
|
136
136
|
"data-cy": "VnConfirm_message"
|
|
137
137
|
}, {
|
|
138
|
-
default:
|
|
138
|
+
default: F(() => [j(d) === !1 ? h("", !0) : (E(), g("span", {
|
|
139
139
|
key: 0,
|
|
140
|
-
innerHTML:
|
|
141
|
-
}, null, 8,
|
|
140
|
+
innerHTML: j(d)
|
|
141
|
+
}, null, 8, we))]),
|
|
142
142
|
_: 1
|
|
143
143
|
}),
|
|
144
|
-
b(
|
|
145
|
-
default:
|
|
144
|
+
b(j(B), { class: "row items-center q-pt-none" }, {
|
|
145
|
+
default: F(() => [O(t.$slots, "custom-html", {}, void 0, !0)]),
|
|
146
146
|
_: 3
|
|
147
147
|
}),
|
|
148
|
-
t.$slots.actions ? (
|
|
148
|
+
t.$slots.actions ? (E(), m(j(z), {
|
|
149
149
|
key: 0,
|
|
150
150
|
align: "right"
|
|
151
151
|
}, {
|
|
152
|
-
default:
|
|
152
|
+
default: F(() => [O(t.$slots, "actions", { actions: {
|
|
153
153
|
confirm: p,
|
|
154
154
|
cancel: v
|
|
155
155
|
} }, void 0, !0)]),
|
|
156
156
|
_: 3
|
|
157
|
-
})) : (
|
|
157
|
+
})) : (E(), m(j(z), {
|
|
158
158
|
key: 1,
|
|
159
159
|
align: "right"
|
|
160
160
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
label:
|
|
161
|
+
default: F(() => [b(j(L), {
|
|
162
|
+
label: j(r)("globals.cancel"),
|
|
163
163
|
color: "primary",
|
|
164
164
|
disable: f.value,
|
|
165
165
|
flat: "",
|
|
166
166
|
onClick: n[1] ||= (e) => v(),
|
|
167
167
|
"data-cy": "VnConfirm_cancel"
|
|
168
|
-
}, null, 8, ["label", "disable"]), b(
|
|
169
|
-
label:
|
|
170
|
-
title:
|
|
168
|
+
}, null, 8, ["label", "disable"]), b(j(L), {
|
|
169
|
+
label: j(r)("globals.confirm"),
|
|
170
|
+
title: j(r)("globals.confirm"),
|
|
171
171
|
color: "primary",
|
|
172
172
|
loading: f.value,
|
|
173
173
|
onClick: n[2] ||= (e) => p(),
|
|
@@ -188,41 +188,41 @@ var $ = (e, t) => {
|
|
|
188
188
|
}, 8, ["persistent", "onHide"]));
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
typeof
|
|
192
|
-
var
|
|
191
|
+
typeof Se == "function" && Se(Te);
|
|
192
|
+
var Ee = /*#__PURE__*/ $(Te, [["__scopeId", "data-v-087d2dc1"]]), De = { class: "row q-gutter-md q-mb-md" }, Oe = { class: "row q-gutter-md q-mb-md" }, ke = { class: "row q-gutter-md q-mb-md" }, Ae = {
|
|
193
193
|
__name: "VnSkeletonForm",
|
|
194
194
|
setup(e) {
|
|
195
|
-
return (e, t) => (
|
|
196
|
-
_("div",
|
|
195
|
+
return (e, t) => (E(), g(u, null, [
|
|
196
|
+
_("div", De, [b(j(J), {
|
|
197
197
|
type: "QInput",
|
|
198
198
|
class: "col",
|
|
199
199
|
square: ""
|
|
200
|
-
}), b(
|
|
200
|
+
}), b(j(J), {
|
|
201
201
|
type: "QInput",
|
|
202
202
|
class: "col",
|
|
203
203
|
square: ""
|
|
204
204
|
})]),
|
|
205
|
-
_("div",
|
|
205
|
+
_("div", Oe, [b(j(J), {
|
|
206
206
|
type: "QInput",
|
|
207
207
|
class: "col",
|
|
208
208
|
square: ""
|
|
209
|
-
}), b(
|
|
209
|
+
}), b(j(J), {
|
|
210
210
|
type: "QInput",
|
|
211
211
|
class: "col",
|
|
212
212
|
square: ""
|
|
213
213
|
})]),
|
|
214
|
-
_("div",
|
|
214
|
+
_("div", ke, [b(j(J), {
|
|
215
215
|
type: "QInput",
|
|
216
216
|
class: "col",
|
|
217
217
|
square: ""
|
|
218
|
-
}), b(
|
|
218
|
+
}), b(j(J), {
|
|
219
219
|
type: "QInput",
|
|
220
220
|
class: "col",
|
|
221
221
|
square: ""
|
|
222
222
|
})])
|
|
223
223
|
], 64));
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, je = /*#__PURE__*/ $({
|
|
226
226
|
__name: "VnSpinner",
|
|
227
227
|
props: {
|
|
228
228
|
size: {
|
|
@@ -242,21 +242,21 @@ var xe = /*#__PURE__*/ $(be, [["__scopeId", "data-v-087d2dc1"]]), Se = { class:
|
|
|
242
242
|
lg: "56px",
|
|
243
243
|
xl: "72px"
|
|
244
244
|
};
|
|
245
|
-
return (n, r) => e.noTransition ? (
|
|
245
|
+
return (n, r) => e.noTransition ? (E(), g("div", {
|
|
246
246
|
key: 1,
|
|
247
247
|
class: "vn-spinner",
|
|
248
|
-
style:
|
|
248
|
+
style: te({
|
|
249
249
|
width: t[e.size] || e.size,
|
|
250
250
|
height: t[e.size] || e.size
|
|
251
251
|
})
|
|
252
|
-
}, null, 4)) : (
|
|
252
|
+
}, null, 4)) : (E(), m(f, {
|
|
253
253
|
key: 0,
|
|
254
254
|
name: "vn-spinner-fade",
|
|
255
255
|
appear: ""
|
|
256
256
|
}, {
|
|
257
|
-
default:
|
|
257
|
+
default: F(() => [_("div", {
|
|
258
258
|
class: "vn-spinner",
|
|
259
|
-
style:
|
|
259
|
+
style: te({
|
|
260
260
|
width: t[e.size] || e.size,
|
|
261
261
|
height: t[e.size] || e.size
|
|
262
262
|
})
|
|
@@ -264,7 +264,7 @@ var xe = /*#__PURE__*/ $(be, [["__scopeId", "data-v-087d2dc1"]]), Se = { class:
|
|
|
264
264
|
_: 1
|
|
265
265
|
}));
|
|
266
266
|
}
|
|
267
|
-
}, [["__scopeId", "data-v-e5edebae"]]),
|
|
267
|
+
}, [["__scopeId", "data-v-e5edebae"]]), Me = /*#__PURE__*/ $({
|
|
268
268
|
__name: "VnDate",
|
|
269
269
|
props: {
|
|
270
270
|
modelValue: {
|
|
@@ -275,8 +275,8 @@ var xe = /*#__PURE__*/ $(be, [["__scopeId", "data-v-087d2dc1"]]), Se = { class:
|
|
|
275
275
|
},
|
|
276
276
|
emits: ["update:modelValue"],
|
|
277
277
|
setup(e) {
|
|
278
|
-
let t =
|
|
279
|
-
return (e, n) => (
|
|
278
|
+
let t = ae(e, "modelValue");
|
|
279
|
+
return (e, n) => (E(), m(j(H), {
|
|
280
280
|
modelValue: t.value,
|
|
281
281
|
"onUpdate:modelValue": n[0] ||= (e) => t.value = e,
|
|
282
282
|
"today-btn": !0,
|
|
@@ -287,7 +287,7 @@ var xe = /*#__PURE__*/ $(be, [["__scopeId", "data-v-087d2dc1"]]), Se = { class:
|
|
|
287
287
|
}, [["__scopeId", "data-v-8338d4d1"]]);
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region lib/components/inputs/VnInput.vue?vue&type=i18n&index=0&lang.i18n
|
|
290
|
-
function
|
|
290
|
+
function Ne(e) {
|
|
291
291
|
let t = e;
|
|
292
292
|
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
293
293
|
locale: "",
|
|
@@ -409,7 +409,7 @@ function Oe(e) {
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region lib/components/inputs/VnInput.vue
|
|
412
|
-
var
|
|
412
|
+
var Pe = {
|
|
413
413
|
__name: "VnInput",
|
|
414
414
|
props: /*@__PURE__*/ S({
|
|
415
415
|
isOutlined: {
|
|
@@ -450,7 +450,7 @@ var ke = {
|
|
|
450
450
|
}),
|
|
451
451
|
emits: /*@__PURE__*/ S(["remove"], ["update:modelValue"]),
|
|
452
452
|
setup(e, { expose: t, emit: r }) {
|
|
453
|
-
let i =
|
|
453
|
+
let i = M(), { isRequired: a, requiredFieldRule: o } = n(i), { t: s } = ve(), c = r, l = e, u = ae(e, "modelValue"), d = [
|
|
454
454
|
"number",
|
|
455
455
|
"search",
|
|
456
456
|
"tel",
|
|
@@ -459,7 +459,7 @@ var ke = {
|
|
|
459
459
|
], f = (e) => {
|
|
460
460
|
let t = e;
|
|
461
461
|
l.emptyToNull && t === "" && (t = null), u.value = t;
|
|
462
|
-
}, _ =
|
|
462
|
+
}, _ = D(null), x = D(!1), S = p(() => l.isOutlined ? {
|
|
463
463
|
dense: !0,
|
|
464
464
|
outlined: !0,
|
|
465
465
|
rounded: !0
|
|
@@ -484,7 +484,7 @@ var ke = {
|
|
|
484
484
|
focus: w,
|
|
485
485
|
vnInputRef: _
|
|
486
486
|
});
|
|
487
|
-
let
|
|
487
|
+
let re = p(() => [
|
|
488
488
|
o,
|
|
489
489
|
...i.rules ?? [],
|
|
490
490
|
(e) => {
|
|
@@ -493,9 +493,9 @@ var ke = {
|
|
|
493
493
|
let { min: n, max: r } = i, a = n === void 0 ? void 0 : Number(n), o = r === void 0 ? void 0 : Number(r);
|
|
494
494
|
return a !== void 0 && a >= 0 && Math.floor(e) < a ? s("inputMin", { value: a }) : o !== void 0 && o > 0 && Math.floor(e) > o ? s("inputMax", { value: o }) : !0;
|
|
495
495
|
}
|
|
496
|
-
]),
|
|
497
|
-
e.key !== "Backspace" && l.insertable && e.key.match(/[0-9]/) &&
|
|
498
|
-
},
|
|
496
|
+
]), ie = (e) => {
|
|
497
|
+
e.key !== "Backspace" && l.insertable && e.key.match(/[0-9]/) && A(e);
|
|
498
|
+
}, A = (e) => {
|
|
499
499
|
e.preventDefault();
|
|
500
500
|
let t = e.target, n = t.selectionStart, r = l.maxlength, i = u.value;
|
|
501
501
|
i ||= e.key;
|
|
@@ -503,69 +503,69 @@ var ke = {
|
|
|
503
503
|
a && !isNaN(a) && n < r && f(i.substring(0, n) + a + i.substring(n + 1)), C(() => {
|
|
504
504
|
t.setSelectionRange(n + 1, n + 1);
|
|
505
505
|
});
|
|
506
|
-
},
|
|
506
|
+
}, P = () => {
|
|
507
507
|
u.value = u.value?.toUpperCase() || "";
|
|
508
508
|
};
|
|
509
|
-
return
|
|
509
|
+
return ne(() => {
|
|
510
510
|
i.autofocus && w();
|
|
511
|
-
}), (t, n) => (
|
|
511
|
+
}), (t, n) => (E(), g("div", {
|
|
512
512
|
onMouseover: n[1] ||= (e) => x.value = !0,
|
|
513
513
|
onMouseleave: n[2] ||= (e) => x.value = !1
|
|
514
|
-
}, [b(
|
|
514
|
+
}, [b(j(G), ee({
|
|
515
515
|
ref_key: "vnInputRef",
|
|
516
516
|
ref: _,
|
|
517
|
-
"model-value":
|
|
517
|
+
"model-value": j(u),
|
|
518
518
|
"onUpdate:modelValue": f
|
|
519
519
|
}, {
|
|
520
|
-
...
|
|
520
|
+
...j(i),
|
|
521
521
|
...S.value
|
|
522
522
|
}, {
|
|
523
|
-
class: { required:
|
|
524
|
-
onKeydown:
|
|
523
|
+
class: { required: j(a) },
|
|
524
|
+
onKeydown: ie,
|
|
525
525
|
onFocus: T,
|
|
526
526
|
clearable: !1,
|
|
527
|
-
rules:
|
|
527
|
+
rules: re.value,
|
|
528
528
|
"lazy-rules": !0,
|
|
529
529
|
"hide-bottom-space": "",
|
|
530
|
-
"data-cy": (
|
|
530
|
+
"data-cy": (j(i)["data-cy"] ?? j(i).label) + "_input",
|
|
531
531
|
dense: ""
|
|
532
532
|
}), v({
|
|
533
|
-
append:
|
|
534
|
-
|
|
533
|
+
append: F(() => [
|
|
534
|
+
oe(b(j(W), {
|
|
535
535
|
name: "close",
|
|
536
536
|
size: "xs",
|
|
537
537
|
class: "cursor-pointer",
|
|
538
|
-
style:
|
|
538
|
+
style: te({ visibility: x.value && j(u) && !j(i).disabled && !j(i).readonly && l.clearable ? "visible" : "hidden" }),
|
|
539
539
|
onClick: n[0] ||= () => {
|
|
540
540
|
f(null), _.value?.focus(), c("remove");
|
|
541
541
|
}
|
|
542
542
|
}, {
|
|
543
|
-
default:
|
|
544
|
-
default:
|
|
543
|
+
default: F(() => [b(j(X), null, {
|
|
544
|
+
default: F(() => [y(k(j(s)("Remove")), 1)]),
|
|
545
545
|
_: 1
|
|
546
546
|
})]),
|
|
547
547
|
_: 1
|
|
548
|
-
}, 8, ["style"]), [[
|
|
549
|
-
!
|
|
548
|
+
}, 8, ["style"]), [[N, !e.clearOnHover || x.value]]),
|
|
549
|
+
!j(i).disabled && !j(i).readonly && l.uppercase ? (E(), m(j(W), {
|
|
550
550
|
key: 0,
|
|
551
551
|
name: "match_case",
|
|
552
552
|
size: "xs",
|
|
553
|
-
onClick:
|
|
553
|
+
onClick: P,
|
|
554
554
|
class: "uppercase-icon"
|
|
555
555
|
}, {
|
|
556
|
-
default:
|
|
557
|
-
default:
|
|
556
|
+
default: F(() => [b(j(X), null, {
|
|
557
|
+
default: F(() => [y(k(j(s)("Convert to uppercase")), 1)]),
|
|
558
558
|
_: 1
|
|
559
559
|
})]),
|
|
560
560
|
_: 1
|
|
561
561
|
})) : h("", !0),
|
|
562
|
-
t.$slots.append && !
|
|
563
|
-
e.info ? (
|
|
562
|
+
t.$slots.append && !j(i).disabled ? O(t.$slots, "append", {}, void 0, void 0, 1) : h("", !0),
|
|
563
|
+
e.info ? (E(), m(j(W), {
|
|
564
564
|
key: 2,
|
|
565
565
|
name: "info"
|
|
566
566
|
}, {
|
|
567
|
-
default:
|
|
568
|
-
default:
|
|
567
|
+
default: F(() => [b(j(X), { "max-width": "350px" }, {
|
|
568
|
+
default: F(() => [y(k(e.info), 1)]),
|
|
569
569
|
_: 1
|
|
570
570
|
})]),
|
|
571
571
|
_: 1
|
|
@@ -574,11 +574,11 @@ var ke = {
|
|
|
574
574
|
_: 2
|
|
575
575
|
}, [t.$slots.hint ? {
|
|
576
576
|
name: "hint",
|
|
577
|
-
fn:
|
|
577
|
+
fn: F(() => [O(t.$slots, "hint")]),
|
|
578
578
|
key: "0"
|
|
579
579
|
} : void 0, t.$slots.prepend ? {
|
|
580
580
|
name: "prepend",
|
|
581
|
-
fn:
|
|
581
|
+
fn: F(() => [O(t.$slots, "prepend")]),
|
|
582
582
|
key: "1"
|
|
583
583
|
} : void 0]), 1040, [
|
|
584
584
|
"model-value",
|
|
@@ -588,10 +588,10 @@ var ke = {
|
|
|
588
588
|
])], 32));
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
|
-
typeof
|
|
591
|
+
typeof Ne == "function" && Ne(Pe);
|
|
592
592
|
//#endregion
|
|
593
593
|
//#region lib/components/inputs/VnInputDate.vue?vue&type=i18n&index=0&lang.i18n
|
|
594
|
-
function
|
|
594
|
+
function Fe(e) {
|
|
595
595
|
let t = e;
|
|
596
596
|
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
597
597
|
locale: "",
|
|
@@ -617,7 +617,7 @@ function Ae(e) {
|
|
|
617
617
|
}
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region lib/components/inputs/VnInputDate.vue
|
|
620
|
-
var
|
|
620
|
+
var Ie = "DD/MM/YYYY", Le = {
|
|
621
621
|
__name: "VnInputDate",
|
|
622
622
|
props: /*@__PURE__*/ S({
|
|
623
623
|
isOutlined: {
|
|
@@ -646,8 +646,8 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
646
646
|
}),
|
|
647
647
|
emits: ["update:modelValue"],
|
|
648
648
|
setup(e) {
|
|
649
|
-
let t =
|
|
650
|
-
if (v.value) return Array.isArray(v.value) ? v.value.map((e) => Z.formatDate(new Date(e),
|
|
649
|
+
let t = M(), { t: r } = ve(), { isRequired: i, requiredFieldRule: a } = n(t), o = ae(e, "modelValue"), s = e, c = D(null), l = _e("negative"), u = D(""), d = D(), f = D(), _ = [a, ...t.rules ?? []], v = p(() => o.value?.neq || o.value?.nin || o.value), x = p(() => {
|
|
650
|
+
if (v.value) return Array.isArray(v.value) ? v.value.map((e) => Z.formatDate(new Date(e), Ie)).join(", ") : Z.formatDate(new Date(v.value), Ie);
|
|
651
651
|
}), S = p(() => {
|
|
652
652
|
let e = Array.isArray(v.value) ? v.value[0] : v.value;
|
|
653
653
|
return e && Z.formatDate(new Date(e), "YYYY/MM/DD");
|
|
@@ -655,19 +655,19 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
655
655
|
dense: !0,
|
|
656
656
|
outlined: !0,
|
|
657
657
|
rounded: !0
|
|
658
|
-
} : {}), T =
|
|
658
|
+
} : {}), T = D(""), te = t["data-cy"] ?? t.label, ne = te + "_menu", re = te + "_inputDate", ie = (e) => {
|
|
659
659
|
if (!e && t.clearable) {
|
|
660
660
|
T.value = null, o.value = null;
|
|
661
661
|
return;
|
|
662
662
|
}
|
|
663
663
|
T.value = e.replace(/[^0-9./-]/g, "");
|
|
664
|
-
},
|
|
665
|
-
e && (T.value = e.split("/").reverse().join("/"),
|
|
664
|
+
}, O = (e) => {
|
|
665
|
+
e && (T.value = e.split("/").reverse().join("/"), A(), d.value = !1);
|
|
666
666
|
};
|
|
667
|
-
|
|
667
|
+
P(() => o.value, () => {
|
|
668
668
|
let e = Array.isArray(v.value) ? v.value[0] : v.value;
|
|
669
|
-
T.value = e ? Z.formatDate(new Date(e),
|
|
670
|
-
}, { immediate: !0 }),
|
|
669
|
+
T.value = e ? Z.formatDate(new Date(e), Ie) : "";
|
|
670
|
+
}, { immediate: !0 }), P(d, (e) => {
|
|
671
671
|
e && s.hideYearNavigation && C(() => {
|
|
672
672
|
let e = [
|
|
673
673
|
"back",
|
|
@@ -679,7 +679,7 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
679
679
|
});
|
|
680
680
|
});
|
|
681
681
|
});
|
|
682
|
-
let
|
|
682
|
+
let A = () => {
|
|
683
683
|
let e = T.value;
|
|
684
684
|
if (!e || e === o.value) {
|
|
685
685
|
u.value = "";
|
|
@@ -723,7 +723,7 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
723
723
|
let h = m.toISOString();
|
|
724
724
|
o.value?.neq ? o.value = { neq: h } : o.value?.nin ? o.value = { nin: [...o.value.nin, h] } : o.value = h, u.value = "";
|
|
725
725
|
}, N = (e) => {
|
|
726
|
-
|
|
726
|
+
A(), C(() => {
|
|
727
727
|
let e = new KeyboardEvent("keydown", {
|
|
728
728
|
key: "Enter",
|
|
729
729
|
code: "Enter",
|
|
@@ -733,10 +733,10 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
733
733
|
c.value?.$el?.dispatchEvent(e);
|
|
734
734
|
});
|
|
735
735
|
};
|
|
736
|
-
return (n, a) => (
|
|
736
|
+
return (n, a) => (E(), g("div", {
|
|
737
737
|
onMouseover: a[8] ||= (e) => f.value = !0,
|
|
738
738
|
onMouseleave: a[9] ||= (e) => f.value = !1
|
|
739
|
-
}, [b(
|
|
739
|
+
}, [b(j(G), ee({
|
|
740
740
|
ref_key: "vnInputDateRef",
|
|
741
741
|
ref: c,
|
|
742
742
|
modelValue: T.value,
|
|
@@ -744,24 +744,24 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
744
744
|
class: "vn-input-date",
|
|
745
745
|
placeholder: "dd/mm/aaaa"
|
|
746
746
|
}, {
|
|
747
|
-
...
|
|
747
|
+
...j(t),
|
|
748
748
|
...w.value
|
|
749
749
|
}, {
|
|
750
|
-
class: { required:
|
|
750
|
+
class: { required: j(i) },
|
|
751
751
|
rules: _,
|
|
752
752
|
clearable: !1,
|
|
753
753
|
"input-style": { color: u.value },
|
|
754
754
|
"input-class": { "text-strike": !!(o.value?.neq || o.value?.nin) },
|
|
755
755
|
title: x.value,
|
|
756
756
|
onClick: a[6] ||= (e) => d.value = !d.value,
|
|
757
|
-
onKeydown: [a[7] ||= (e) => d.value = !1,
|
|
758
|
-
onFocusout:
|
|
757
|
+
onKeydown: [a[7] ||= (e) => d.value = !1, I(se(N, ["prevent"]), ["enter"])],
|
|
758
|
+
onFocusout: A,
|
|
759
759
|
"hide-bottom-space": "",
|
|
760
|
-
"data-cy":
|
|
761
|
-
"onUpdate:modelValue":
|
|
760
|
+
"data-cy": re,
|
|
761
|
+
"onUpdate:modelValue": ie,
|
|
762
762
|
autocomplete: "off"
|
|
763
763
|
}), {
|
|
764
|
-
append:
|
|
764
|
+
append: F(() => [(j(t).clearable == null || j(t).clearable) && (!e.clearOnHover || f.value) && T.value && !j(t).disable ? (E(), m(j(W), {
|
|
765
765
|
key: 0,
|
|
766
766
|
name: "close",
|
|
767
767
|
size: "xs",
|
|
@@ -770,13 +770,13 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
770
770
|
c.value.focus(), T.value = null, o.value = null, d.value = !1;
|
|
771
771
|
}
|
|
772
772
|
}, {
|
|
773
|
-
default:
|
|
774
|
-
default:
|
|
773
|
+
default: F(() => [b(j(X), null, {
|
|
774
|
+
default: F(() => [y(k(j(r)("Remove")), 1)]),
|
|
775
775
|
_: 1
|
|
776
776
|
})]),
|
|
777
777
|
_: 1
|
|
778
778
|
})) : h("", !0)]),
|
|
779
|
-
default:
|
|
779
|
+
default: F(() => [n.$q.screen.gt.xs ? (E(), m(j(q), {
|
|
780
780
|
key: 0,
|
|
781
781
|
"transition-show": "scale",
|
|
782
782
|
"transition-hide": "scale",
|
|
@@ -786,21 +786,21 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
786
786
|
self: "top start",
|
|
787
787
|
"no-focus": !0,
|
|
788
788
|
"no-parent-event": !0,
|
|
789
|
-
"data-cy":
|
|
789
|
+
"data-cy": ne
|
|
790
790
|
}, {
|
|
791
|
-
default:
|
|
791
|
+
default: F(() => [b(Me, {
|
|
792
792
|
modelValue: S.value,
|
|
793
|
-
"onUpdate:modelValue": [a[1] ||= (e) => S.value = e,
|
|
793
|
+
"onUpdate:modelValue": [a[1] ||= (e) => S.value = e, O]
|
|
794
794
|
}, null, 8, ["modelValue"])]),
|
|
795
795
|
_: 1
|
|
796
|
-
}, 8, ["modelValue"])) : (
|
|
796
|
+
}, 8, ["modelValue"])) : (E(), m(j(U), {
|
|
797
797
|
key: 1,
|
|
798
798
|
modelValue: d.value,
|
|
799
799
|
"onUpdate:modelValue": a[4] ||= (e) => d.value = e
|
|
800
800
|
}, {
|
|
801
|
-
default:
|
|
801
|
+
default: F(() => [b(Me, {
|
|
802
802
|
modelValue: S.value,
|
|
803
|
-
"onUpdate:modelValue": [a[3] ||= (e) => S.value = e,
|
|
803
|
+
"onUpdate:modelValue": [a[3] ||= (e) => S.value = e, O]
|
|
804
804
|
}, null, 8, ["modelValue"])]),
|
|
805
805
|
_: 1
|
|
806
806
|
}, 8, ["modelValue"]))]),
|
|
@@ -815,10 +815,10 @@ var je = "DD/MM/YYYY", Me = {
|
|
|
815
815
|
])], 32));
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
|
-
typeof
|
|
818
|
+
typeof Fe == "function" && Fe(Le);
|
|
819
819
|
//#endregion
|
|
820
820
|
//#region lib/components/models/VnFetch.vue
|
|
821
|
-
var
|
|
821
|
+
var Re = {
|
|
822
822
|
__name: "VnFetch",
|
|
823
823
|
props: {
|
|
824
824
|
autoLoad: {
|
|
@@ -853,7 +853,7 @@ var Ne = {
|
|
|
853
853
|
emits: ["onFetch"],
|
|
854
854
|
setup(e, { expose: t, emit: n }) {
|
|
855
855
|
let r = e, i = n;
|
|
856
|
-
t({ fetch: a }),
|
|
856
|
+
t({ fetch: a }), ne(async () => {
|
|
857
857
|
r.autoLoad && await a();
|
|
858
858
|
});
|
|
859
859
|
async function a(e = {}) {
|
|
@@ -863,19 +863,19 @@ var Ne = {
|
|
|
863
863
|
...r.filter
|
|
864
864
|
};
|
|
865
865
|
r.where && !e.where && (t.where = r.where), r.sortBy && (t.order = r.sortBy), r.limit && (t.limit = r.limit);
|
|
866
|
-
let { data: n } = await
|
|
866
|
+
let { data: n } = await Q.get(r.url, { params: {
|
|
867
867
|
filter: JSON.stringify(t),
|
|
868
868
|
...r.params
|
|
869
869
|
} });
|
|
870
870
|
return i("onFetch", n), n;
|
|
871
871
|
} catch {}
|
|
872
872
|
}
|
|
873
|
-
return (e, t) => (
|
|
873
|
+
return (e, t) => (E(), g("template"));
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
//#endregion
|
|
877
877
|
//#region lib/utils/dataByOrder.js
|
|
878
|
-
function
|
|
878
|
+
function ze(e, t) {
|
|
879
879
|
if (typeof t == "function") return e.sort(e);
|
|
880
880
|
if (typeof t == "string" && (t = [t]), !Array.isArray(e)) return [];
|
|
881
881
|
if (Array.isArray(t)) {
|
|
@@ -887,18 +887,18 @@ function Pe(e, t) {
|
|
|
887
887
|
way: t[1] === "DESC" ? -1 : 1
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
|
-
return e.sort((e, t) =>
|
|
890
|
+
return e.sort((e, t) => Be(e, t, n));
|
|
891
891
|
}
|
|
892
892
|
return e;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function Be(e, t, n) {
|
|
895
895
|
for (let { field: r, way: i } of n) {
|
|
896
|
-
let n =
|
|
896
|
+
let n = Ve(e[r], t[r]) * i;
|
|
897
897
|
if (n !== 0) return n;
|
|
898
898
|
}
|
|
899
899
|
return 0;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ve(e, t) {
|
|
902
902
|
if (e === t) return 0;
|
|
903
903
|
let n = typeof e;
|
|
904
904
|
if (n === typeof t) switch (n) {
|
|
@@ -911,10 +911,10 @@ function Ie(e, t) {
|
|
|
911
911
|
}
|
|
912
912
|
//#endregion
|
|
913
913
|
//#region lib/components/models/VnForm.vue
|
|
914
|
-
var
|
|
914
|
+
var He = {
|
|
915
915
|
class: "column items-center full-width",
|
|
916
916
|
style: { position: "relative" }
|
|
917
|
-
},
|
|
917
|
+
}, Ue = ["textContent"], We = /*#__PURE__*/ $({
|
|
918
918
|
__name: "VnForm",
|
|
919
919
|
props: {
|
|
920
920
|
url: {
|
|
@@ -1023,13 +1023,13 @@ var Le = {
|
|
|
1023
1023
|
"submit"
|
|
1024
1024
|
],
|
|
1025
1025
|
setup(e, { expose: n, emit: l }) {
|
|
1026
|
-
let { push: f } =
|
|
1026
|
+
let { push: f } = xe(), v = ce.useQuasar(), y = o(), x = c(), { t: S } = ve(), { validate: w, validations: T } = t(), { notify: te } = s(), ie = be(), A = D(null), M = e, ae = l, N = p(() => M.model ?? `formModel_${ie?.meta?.title ?? ie.name}`).value, oe = D(!1), I = i(N), le = D(!1), z = D(!1), V = D(!M.observeFormChanges), de = {}, H = p(() => y.get(N)), U = D(), W = p(() => A.value?.$el), G = p(() => ({
|
|
1027
1027
|
save: {
|
|
1028
1028
|
dataCy: "saveDefaultBtn",
|
|
1029
1029
|
color: "primary",
|
|
1030
1030
|
icon: "save",
|
|
1031
1031
|
label: "globals.save",
|
|
1032
|
-
click: async (e) =>
|
|
1032
|
+
click: async (e) => me(e),
|
|
1033
1033
|
type: "submit"
|
|
1034
1034
|
},
|
|
1035
1035
|
reset: {
|
|
@@ -1037,80 +1037,80 @@ var Le = {
|
|
|
1037
1037
|
color: "primary",
|
|
1038
1038
|
icon: "restart_alt",
|
|
1039
1039
|
label: "globals.reset",
|
|
1040
|
-
click: () =>
|
|
1040
|
+
click: () => J()
|
|
1041
1041
|
},
|
|
1042
|
-
...
|
|
1043
|
-
})),
|
|
1044
|
-
await
|
|
1042
|
+
...M.defaultButtons
|
|
1043
|
+
})), me = async (e) => {
|
|
1044
|
+
await A.value.validate() && await q(e);
|
|
1045
1045
|
};
|
|
1046
|
-
function
|
|
1047
|
-
|
|
1046
|
+
function he() {
|
|
1047
|
+
de = M.formUrl ? JSON.parse(ie?.query[M.formUrl] ?? "{}") : void 0;
|
|
1048
1048
|
}
|
|
1049
|
-
|
|
1050
|
-
!
|
|
1051
|
-
url:
|
|
1052
|
-
filter:
|
|
1053
|
-
}),
|
|
1054
|
-
...
|
|
1055
|
-
...
|
|
1056
|
-
}),
|
|
1057
|
-
t && (V.value = !
|
|
1049
|
+
ne(async () => {
|
|
1050
|
+
!I.store.url && M.url && I.setOptions({
|
|
1051
|
+
url: M.url,
|
|
1052
|
+
filter: M.filter
|
|
1053
|
+
}), he(), C(() => oe.value = !0), M.formInitialData && de && y.set(N, {
|
|
1054
|
+
...M.formInitialData,
|
|
1055
|
+
...de
|
|
1056
|
+
}), M.formInitialData || (M.autoLoad && M.url ? await K() : I.store.data && X("onFetch", { val: I.store.data })), M.observeFormChanges && P(() => U.value, (e, t) => {
|
|
1057
|
+
t && (V.value = !z.value && JSON.stringify(e) !== JSON.stringify(H.value), z.value = !1);
|
|
1058
1058
|
}, { deep: !0 });
|
|
1059
|
-
}),
|
|
1060
|
-
e && (
|
|
1061
|
-
}, { immediate: !0 }),
|
|
1062
|
-
y.set(
|
|
1063
|
-
}),
|
|
1064
|
-
e && y.set(
|
|
1059
|
+
}), M.url || P(() => I.store.data, (e) => X("onFetch", { val: e })), P(H, async (e) => {
|
|
1060
|
+
e && (U.value = JSON.parse(JSON.stringify(e))), await C(), W.value && a(W.value);
|
|
1061
|
+
}, { immediate: !0 }), P(() => [M.url, M.filter], async () => {
|
|
1062
|
+
y.set(N, null), J(), await K();
|
|
1063
|
+
}), M.formInitialData && P(() => M.formInitialData, (e) => {
|
|
1064
|
+
e && y.set(N, {
|
|
1065
1065
|
...e,
|
|
1066
|
-
...
|
|
1066
|
+
...de
|
|
1067
1067
|
});
|
|
1068
|
-
}),
|
|
1069
|
-
V.value &&
|
|
1070
|
-
component:
|
|
1068
|
+
}), ye((e, t, n) => {
|
|
1069
|
+
V.value && M.observeFormChanges ? v.dialog({
|
|
1070
|
+
component: Ee,
|
|
1071
1071
|
componentProps: {
|
|
1072
1072
|
title: S("globals.unsavedPopup.title"),
|
|
1073
1073
|
message: S("globals.unsavedPopup.subtitle"),
|
|
1074
1074
|
promise: () => n()
|
|
1075
1075
|
}
|
|
1076
1076
|
}) : n();
|
|
1077
|
-
}),
|
|
1078
|
-
if (V.value) return y.set(
|
|
1079
|
-
|
|
1077
|
+
}), re(() => {
|
|
1078
|
+
if (V.value) return y.set(N, H.value);
|
|
1079
|
+
M.clearStoreOnUnmount && y.unset(N);
|
|
1080
1080
|
});
|
|
1081
|
-
async function
|
|
1081
|
+
async function K() {
|
|
1082
1082
|
try {
|
|
1083
1083
|
let e;
|
|
1084
|
-
e =
|
|
1084
|
+
e = M.model ? (await I.addFilter({ filter: M.filter })).response?.data : (await Q.get(M.url, { params: { filter: JSON.stringify(M.filter) } })).data, Array.isArray(e) && (e = e[0] ?? {}), X("onFetch", { val: e });
|
|
1085
1085
|
} catch (e) {
|
|
1086
|
-
throw y.set(
|
|
1086
|
+
throw y.set(N, {}), e;
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
|
-
async function
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1089
|
+
async function q() {
|
|
1090
|
+
if (M.observeFormChanges && !V.value) return te("globals.noChanges", "negative");
|
|
1091
|
+
le.value = !0;
|
|
1092
1092
|
try {
|
|
1093
|
-
|
|
1094
|
-
let e =
|
|
1095
|
-
|
|
1096
|
-
val:
|
|
1093
|
+
U.value = Z(U.value);
|
|
1094
|
+
let e = M.urlCreate ? "post" : "patch", t = e === "post" ? M.mapper(U.value) : M.mapper(U.value, H.value), n = M.urlCreate || M.urlUpdate || M.url || I.store.url, r = await Promise.resolve(M.saveFn ? M.saveFn(t) : Q[M.customMethod ?? e](n, t));
|
|
1095
|
+
M.urlCreate && te("globals.dataCreated", "positive"), V.value = !1, X("onDataSaved", {
|
|
1096
|
+
val: U.value,
|
|
1097
1097
|
res: r?.data,
|
|
1098
|
-
old:
|
|
1098
|
+
old: H.value,
|
|
1099
1099
|
rawRes: r
|
|
1100
|
-
}),
|
|
1100
|
+
}), M.reload && await I.fetch({});
|
|
1101
1101
|
} catch (e) {
|
|
1102
|
-
throw
|
|
1102
|
+
throw ae("onDataSaveFail", U.value), e;
|
|
1103
1103
|
} finally {
|
|
1104
|
-
|
|
1104
|
+
le.value = !1;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
async function
|
|
1108
|
-
await
|
|
1107
|
+
async function ge() {
|
|
1108
|
+
await q(!0), f({ path: M.goTo });
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1111
|
-
|
|
1110
|
+
function J() {
|
|
1111
|
+
U.value = JSON.parse(JSON.stringify(H.value)), X("onFetch", { val: H.value }), M.observeFormChanges && (V.value = !1, z.value = !0);
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Y(e, t, n) {
|
|
1114
1114
|
t(() => {
|
|
1115
1115
|
let { options: t, filterFn: r } = n;
|
|
1116
1116
|
t.value = r(t, e);
|
|
@@ -1118,98 +1118,98 @@ var Le = {
|
|
|
1118
1118
|
e.setOptionIndex(-1), e.moveOptionSelection(1, !0);
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
async function
|
|
1121
|
+
async function X(e, { val: t, res: n, old: r, rawRes: i } = {
|
|
1122
1122
|
val: null,
|
|
1123
1123
|
res: null,
|
|
1124
1124
|
old: null,
|
|
1125
1125
|
rawRes: null
|
|
1126
1126
|
}) {
|
|
1127
|
-
y.set(
|
|
1127
|
+
y.set(N, t), M.url || (I.store.data = t), ae(e, y.get(N), n, r, U, i), W.value && a(W.value);
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
if (!
|
|
1129
|
+
function Z(e) {
|
|
1130
|
+
if (!M.defaultTrim) return e;
|
|
1131
1131
|
for (let t in e) typeof e[t] == "string" && (e[t] = e[t].trim());
|
|
1132
1132
|
return e;
|
|
1133
1133
|
}
|
|
1134
|
-
async function
|
|
1135
|
-
if (e.key === "Enter" && !
|
|
1134
|
+
async function _e(e) {
|
|
1135
|
+
if (e.key === "Enter" && !M.preventSubmit && V.value) {
|
|
1136
1136
|
let t = e.target;
|
|
1137
1137
|
if (t.type == "textarea" && e.shiftKey) {
|
|
1138
1138
|
let { selectionStart: e, selectionEnd: n } = t;
|
|
1139
1139
|
t.value = t.value.substring(0, e) + "\n" + t.value.substring(n), e = n = e + 1;
|
|
1140
1140
|
return;
|
|
1141
1141
|
}
|
|
1142
|
-
await
|
|
1142
|
+
await A.value.submit(e);
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
return n({
|
|
1146
|
-
submitForm:
|
|
1147
|
-
myForm:
|
|
1148
|
-
save:
|
|
1149
|
-
isLoading:
|
|
1146
|
+
submitForm: me,
|
|
1147
|
+
myForm: A,
|
|
1148
|
+
save: q,
|
|
1149
|
+
isLoading: le,
|
|
1150
1150
|
hasChanges: V,
|
|
1151
|
-
reset:
|
|
1152
|
-
fetch:
|
|
1153
|
-
formData:
|
|
1154
|
-
}), (t, n) => (
|
|
1155
|
-
showing:
|
|
1156
|
-
label:
|
|
1151
|
+
reset: J,
|
|
1152
|
+
fetch: K,
|
|
1153
|
+
formData: U
|
|
1154
|
+
}), (t, n) => (E(), g(u, null, [_("div", He, [b(j(pe), {
|
|
1155
|
+
showing: le.value,
|
|
1156
|
+
label: j(S)("globals.pleaseWait"),
|
|
1157
1157
|
color: "primary",
|
|
1158
1158
|
style: { "min-width": "100%" }
|
|
1159
1159
|
}, {
|
|
1160
|
-
default:
|
|
1160
|
+
default: F(() => [b(j(je), { size: "md" })]),
|
|
1161
1161
|
_: 1
|
|
1162
|
-
}, 8, ["showing", "label"]),
|
|
1162
|
+
}, 8, ["showing", "label"]), U.value ? (E(), m(j(fe), ee({
|
|
1163
1163
|
key: 0,
|
|
1164
1164
|
id: "vnForm"
|
|
1165
1165
|
}, t.$attrs, {
|
|
1166
1166
|
ref_key: "myForm",
|
|
1167
|
-
ref:
|
|
1168
|
-
onSubmit:
|
|
1169
|
-
onKeyup:
|
|
1170
|
-
onReset:
|
|
1167
|
+
ref: A,
|
|
1168
|
+
onSubmit: se(q, ["prevent"]),
|
|
1169
|
+
onKeyup: se(_e, ["prevent"]),
|
|
1170
|
+
onReset: J,
|
|
1171
1171
|
class: ["full-width", [e.paddingClass]],
|
|
1172
1172
|
style: {
|
|
1173
1173
|
maxWidth: e.maxWidth || "none",
|
|
1174
1174
|
width: "100%"
|
|
1175
1175
|
}
|
|
1176
1176
|
}), {
|
|
1177
|
-
default:
|
|
1178
|
-
default:
|
|
1177
|
+
default: F(() => [b(j(ue), { class: "q-pa-none" }, {
|
|
1178
|
+
default: F(() => [e.showTitle ? (E(), m(j(B), {
|
|
1179
1179
|
key: 0,
|
|
1180
1180
|
class: "vn-basic-data__header q-px-none q-pb-none"
|
|
1181
1181
|
}, {
|
|
1182
|
-
default:
|
|
1182
|
+
default: F(() => [_("span", {
|
|
1183
1183
|
class: "text-h6",
|
|
1184
|
-
textContent:
|
|
1185
|
-
}, null, 8,
|
|
1184
|
+
textContent: k(e.title || t.$t("globals.pageTitles.basicData"))
|
|
1185
|
+
}, null, 8, Ue)]),
|
|
1186
1186
|
_: 1
|
|
1187
|
-
})) : h("", !0),
|
|
1188
|
-
data:
|
|
1189
|
-
validate:
|
|
1190
|
-
validations:
|
|
1191
|
-
filter:
|
|
1192
|
-
}, void 0, !0, 1) : (
|
|
1187
|
+
})) : h("", !0), U.value ? O(t.$slots, "form", {
|
|
1188
|
+
data: U.value,
|
|
1189
|
+
validate: j(w),
|
|
1190
|
+
validations: j(T)(),
|
|
1191
|
+
filter: Y
|
|
1192
|
+
}, void 0, !0, 1) : (E(), m(j(Ae), { key: 2 }))]),
|
|
1193
1193
|
_: 3
|
|
1194
1194
|
})]),
|
|
1195
1195
|
_: 3
|
|
1196
|
-
}, 16, ["class", "style"])) : h("", !0)]),
|
|
1196
|
+
}, 16, ["class", "style"])) : h("", !0)]), M.defaultActions && j(x)?.isSubToolbarShown() && oe.value ? (E(), m(d, {
|
|
1197
1197
|
key: 0,
|
|
1198
1198
|
to: "#st-actions"
|
|
1199
|
-
}, [b(
|
|
1199
|
+
}, [b(j(R), {
|
|
1200
1200
|
push: "",
|
|
1201
1201
|
class: "q-gutter-x-sm"
|
|
1202
1202
|
}, {
|
|
1203
|
-
default:
|
|
1204
|
-
|
|
1205
|
-
b(
|
|
1206
|
-
label:
|
|
1207
|
-
color:
|
|
1208
|
-
icon:
|
|
1203
|
+
default: F(() => [
|
|
1204
|
+
O(t.$slots, "moreActions", {}, void 0, !0),
|
|
1205
|
+
b(j(L), {
|
|
1206
|
+
label: j(r)(G.value.reset.label),
|
|
1207
|
+
color: G.value.reset.color,
|
|
1208
|
+
icon: G.value.reset.icon,
|
|
1209
1209
|
flat: "",
|
|
1210
|
-
onClick:
|
|
1210
|
+
onClick: G.value.reset.click,
|
|
1211
1211
|
disable: !V.value,
|
|
1212
|
-
title:
|
|
1212
|
+
title: j(S)(G.value.reset.label),
|
|
1213
1213
|
"data-cy": "resetDefaultBtn"
|
|
1214
1214
|
}, null, 8, [
|
|
1215
1215
|
"label",
|
|
@@ -1219,15 +1219,15 @@ var Le = {
|
|
|
1219
1219
|
"disable",
|
|
1220
1220
|
"title"
|
|
1221
1221
|
]),
|
|
1222
|
-
b(
|
|
1222
|
+
b(j(L), {
|
|
1223
1223
|
"data-cy": "saveDefaultBtn",
|
|
1224
|
-
label:
|
|
1224
|
+
label: j(r)("globals.save"),
|
|
1225
1225
|
color: "primary",
|
|
1226
1226
|
icon: "save",
|
|
1227
|
-
onClick:
|
|
1227
|
+
onClick: G.value.save.click,
|
|
1228
1228
|
disable: !V.value,
|
|
1229
|
-
title:
|
|
1230
|
-
flat: !!
|
|
1229
|
+
title: j(S)(G.value.save.label),
|
|
1230
|
+
flat: !!M.goTo
|
|
1231
1231
|
}, null, 8, [
|
|
1232
1232
|
"label",
|
|
1233
1233
|
"onClick",
|
|
@@ -1235,12 +1235,12 @@ var Le = {
|
|
|
1235
1235
|
"title",
|
|
1236
1236
|
"flat"
|
|
1237
1237
|
]),
|
|
1238
|
-
|
|
1238
|
+
M.goTo ? (E(), m(j(L), {
|
|
1239
1239
|
key: 0,
|
|
1240
1240
|
"data-cy": "saveAndContinueDefaultBtn",
|
|
1241
|
-
onClick:
|
|
1242
|
-
label:
|
|
1243
|
-
title:
|
|
1241
|
+
onClick: ge,
|
|
1242
|
+
label: j(r)("globals.saveAndContinue") + " " + j(S)("globals." + M.goTo.split("/").pop()),
|
|
1243
|
+
title: j(S)("globals.saveAndContinue") + " " + j(S)("globals." + M.goTo.split("/").pop()),
|
|
1244
1244
|
disable: !V.value,
|
|
1245
1245
|
color: "primary",
|
|
1246
1246
|
icon: "save"
|
|
@@ -1256,7 +1256,7 @@ var Le = {
|
|
|
1256
1256
|
}, [["__scopeId", "data-v-addfa85d"]]);
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region lib/components/selects/VnSelect.vue?vue&type=i18n&index=0&lang.i18n
|
|
1259
|
-
function
|
|
1259
|
+
function Ge(e) {
|
|
1260
1260
|
let t = e;
|
|
1261
1261
|
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
1262
1262
|
locale: "",
|
|
@@ -1272,10 +1272,10 @@ function Be(e) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
//#endregion
|
|
1274
1274
|
//#region lib/components/selects/VnSelect.vue
|
|
1275
|
-
var
|
|
1275
|
+
var Ke = { key: 0 }, qe = ["title", "textContent"], Je = {
|
|
1276
1276
|
key: 1,
|
|
1277
1277
|
class: "no-wrap chip-scroll"
|
|
1278
|
-
},
|
|
1278
|
+
}, Ye = ["textContent"], Xe = ["textContent"], Ze = {
|
|
1279
1279
|
__name: "VnSelect",
|
|
1280
1280
|
props: {
|
|
1281
1281
|
modelValue: {
|
|
@@ -1398,46 +1398,46 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
|
|
|
1398
1398
|
"remove"
|
|
1399
1399
|
],
|
|
1400
1400
|
setup(e, { expose: t, emit: r }) {
|
|
1401
|
-
let a = r, o =
|
|
1401
|
+
let a = r, o = M(), { t: s } = ve(), c = p(() => n(o).isRequired), l = p(() => n(o).requiredFieldRule), d = e, f = [l, ...o.rules ?? []], { optionLabel: S, optionValue: w, optionCaption: re, optionFilter: ae, optionFilterValue: ce, options: le, modelValue: L } = A(d), R = D([]), ue = D([]), z = D(/* @__PURE__ */ new Map()), B = D(), H = D(), U = s("globals.noOne"), fe = D({
|
|
1402
1402
|
[w.value]: !1,
|
|
1403
1403
|
[S.value]: U
|
|
1404
|
-
}),
|
|
1404
|
+
}), pe = p(() => d.isOutlined ? {
|
|
1405
1405
|
dense: !0,
|
|
1406
1406
|
outlined: !0,
|
|
1407
1407
|
rounded: !0
|
|
1408
|
-
} : {}), G =
|
|
1408
|
+
} : {}), G = D(!1), q = D(!1), J = p(() => d.url), Y = p({
|
|
1409
1409
|
get() {
|
|
1410
1410
|
return d.modelValue;
|
|
1411
1411
|
},
|
|
1412
1412
|
set(e) {
|
|
1413
|
-
|
|
1413
|
+
$(ue.value), a("update:modelValue", e);
|
|
1414
1414
|
}
|
|
1415
|
-
}),
|
|
1415
|
+
}), Z = p(() => Array.isArray(d.modelValue) || "multiple" in o || o.isAdvanced), _e = d.dataKey ?? (d.url?.length > 0 ? d.url : o.name ?? o.label), Q = i(_e, {
|
|
1416
1416
|
url: d.url,
|
|
1417
1417
|
searchUrl: !1,
|
|
1418
1418
|
mapKey: o["map-key"]
|
|
1419
|
-
}),
|
|
1420
|
-
function
|
|
1419
|
+
}), ye = D(!1), be = p(() => d.sortBy ? d.sortBy : typeof d.optionLabel == "string" ? d.optionLabel + " ASC" : "");
|
|
1420
|
+
function xe(e) {
|
|
1421
1421
|
return typeof d.filterBuilder == "function" ? d.filterBuilder(e) : d.useLike ? { like: `%${e}%` } : e;
|
|
1422
1422
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}),
|
|
1423
|
+
P(le, (e) => {
|
|
1424
|
+
$(e);
|
|
1425
|
+
}), P(L, async (e) => {
|
|
1426
1426
|
e = (e?.neq || e?.nin || e) ?? [], Array.isArray(e) || (e = [e]);
|
|
1427
|
-
for (let t of e)
|
|
1428
|
-
d.noOne &&
|
|
1429
|
-
}),
|
|
1430
|
-
for (let t of e)
|
|
1431
|
-
}),
|
|
1432
|
-
|
|
1427
|
+
for (let t of e) z.value.get(t) || await we(t, !0);
|
|
1428
|
+
d.noOne && R.value.unshift(fe.value);
|
|
1429
|
+
}), P(() => ue.value, (e) => {
|
|
1430
|
+
for (let t of e) z.value.set(t[w.value], t);
|
|
1431
|
+
}), ne(() => {
|
|
1432
|
+
$(le.value), J.value && d.modelValue && !Se() && we(d.modelValue), (d.focusOnMount || d.openOnMount) && setTimeout(() => Me(!0, d.openOnMount), 300);
|
|
1433
1433
|
});
|
|
1434
|
-
function
|
|
1435
|
-
if (d.options) return
|
|
1434
|
+
function Se() {
|
|
1435
|
+
if (d.options) return Ce(d.modelValue, d.options)?.length;
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
d.sortOptions && (e =
|
|
1437
|
+
function $(e) {
|
|
1438
|
+
d.sortOptions && (e = ze(e, be.value)), R.value = JSON.parse(JSON.stringify(e)), ue.value = JSON.parse(JSON.stringify(e)), a("update:options", e);
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function Ce(e, t) {
|
|
1441
1441
|
let n = e?.toString()?.toLowerCase();
|
|
1442
1442
|
return n ? t.filter((e) => {
|
|
1443
1443
|
if (d.filterOptions.length) return d.filterOptions.some((t) => String(e[t]).toLowerCase().includes(n));
|
|
@@ -1446,11 +1446,11 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
|
|
|
1446
1446
|
return t.includes(n) || r.includes(n);
|
|
1447
1447
|
}) : t;
|
|
1448
1448
|
}
|
|
1449
|
-
async function
|
|
1449
|
+
async function we(e, t = !1) {
|
|
1450
1450
|
if (!d.url) return;
|
|
1451
1451
|
e && typeof e == "object" && (e = e.neq);
|
|
1452
|
-
let { fields: n, include: r, limit: i } = d, a =
|
|
1453
|
-
s = d.filterOptions.length ? d.filterOptions.reduce((t, n) => (t.or ||= [], t.or.push({ [n]:
|
|
1452
|
+
let { fields: n, include: r, limit: i } = d, a = be.value, o = ce.value ?? (t || (/* @__PURE__ */ new RegExp(/^\d+$/)).test(e) ? w.value : ae.value ?? S.value), s = {};
|
|
1453
|
+
s = d.filterOptions.length ? d.filterOptions.reduce((t, n) => (t.or ||= [], t.or.push({ [n]: xe(e) }), t), {}) : { [o]: xe(e) };
|
|
1454
1454
|
let c = d.noWhere ? {} : {
|
|
1455
1455
|
...e ? s : {},
|
|
1456
1456
|
...d.where
|
|
@@ -1461,245 +1461,242 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
|
|
|
1461
1461
|
include: r,
|
|
1462
1462
|
limit: i
|
|
1463
1463
|
};
|
|
1464
|
-
n && (l.fields = n), a && (
|
|
1464
|
+
n && (l.fields = n), a && (Q.store.order = a), q.value = !0, Q.resetPagination();
|
|
1465
1465
|
let u;
|
|
1466
1466
|
try {
|
|
1467
|
-
u = (await
|
|
1467
|
+
u = (await Q.applyFilter({
|
|
1468
1468
|
filter: l,
|
|
1469
1469
|
params: d.params ?? d.paramsBuilder?.(e)
|
|
1470
1470
|
}, { updateRouter: !1 }))?.data;
|
|
1471
1471
|
} finally {
|
|
1472
|
-
|
|
1472
|
+
q.value = !1;
|
|
1473
1473
|
}
|
|
1474
|
-
return
|
|
1474
|
+
return $(u), u;
|
|
1475
1475
|
}
|
|
1476
|
-
async function
|
|
1476
|
+
async function Te(e, t) {
|
|
1477
1477
|
let n;
|
|
1478
|
-
|
|
1479
|
-
d.noOne && U.toLowerCase().includes(e.toLowerCase()) && n.unshift(
|
|
1478
|
+
Ne(e) && (e = null), !e && H.value === e ? t() : (n = d.url && d.limit || !d.limit && Object.keys(R.value).length === 0 ? await we(e) : Ce(e, ue.value), t(() => {
|
|
1479
|
+
d.noOne && U.toLowerCase().includes(e.toLowerCase()) && n.unshift(fe.value), R.value = n;
|
|
1480
1480
|
}, (t) => {
|
|
1481
1481
|
e !== "" && t.options.length > 0 && (t.setOptionIndex(-1), t.moveOptionSelection(1, !0));
|
|
1482
|
-
})),
|
|
1482
|
+
})), H.value = e;
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function Ee(e) {
|
|
1485
1485
|
return e ?? !0;
|
|
1486
1486
|
}
|
|
1487
|
-
async function
|
|
1488
|
-
let i =
|
|
1489
|
-
(n !== 0 || r !== 0) && (
|
|
1487
|
+
async function De({ to: e, direction: t, from: n, index: r }) {
|
|
1488
|
+
let i = R.value.length - 1;
|
|
1489
|
+
(n !== 0 || r !== 0) && (J.value || d.fetchRef) && t !== "decrease" && e === i && Q.store.hasMoreData && (await Q.loadMore(), $(Q.store.data), B.value.scrollTo(i), await C());
|
|
1490
1490
|
}
|
|
1491
1491
|
t({
|
|
1492
|
-
opts:
|
|
1493
|
-
vnSelectRef:
|
|
1494
|
-
myOptionsMap:
|
|
1492
|
+
opts: R,
|
|
1493
|
+
vnSelectRef: B,
|
|
1494
|
+
myOptionsMap: z
|
|
1495
1495
|
});
|
|
1496
|
-
function
|
|
1497
|
-
if (
|
|
1496
|
+
function Oe(e) {
|
|
1497
|
+
if (re.value !== !1) return e[re.value] || e[w.value];
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function ke(e) {
|
|
1500
1500
|
Array.isArray(e) && (e = e[0]), e && typeof e == "object" && (e = e[w.value]);
|
|
1501
|
-
let t =
|
|
1501
|
+
let t = z.value.get(e);
|
|
1502
1502
|
return typeof S.value == "function" ? S.value(t ?? {}) : t?.[S.value] ?? e;
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1505
|
-
e?.code === "Enter" && (e.type === "keydown" && e.ctrlKey &&
|
|
1504
|
+
function Ae(e) {
|
|
1505
|
+
e?.code === "Enter" && (e.type === "keydown" && e.ctrlKey && Z.value ? e.stopPropagation() : e.type === "keyup" && !e.ctrlKey && (e.preventDefault(), e.stopPropagation()));
|
|
1506
1506
|
}
|
|
1507
|
-
async function
|
|
1508
|
-
(G.value || e) && (G.value = !1, await C(),
|
|
1507
|
+
async function Me(e, t) {
|
|
1508
|
+
(G.value || e) && (G.value = !1, await C(), B.value?.focus(), !ye.value && t && B.value?.showPopup());
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1510
|
+
function Ne(e) {
|
|
1511
|
+
return Z.value && Array.isArray(e) && !e.length;
|
|
1512
1512
|
}
|
|
1513
|
-
return (t, n) => {
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1513
|
+
return (t, n) => (E(), m(j(ge), ee({
|
|
1514
|
+
ref_key: "vnSelectRef",
|
|
1515
|
+
ref: B,
|
|
1516
|
+
modelValue: Y.value,
|
|
1517
|
+
"onUpdate:modelValue": n[3] ||= (e) => Y.value = e,
|
|
1518
|
+
for: "vnSelectFor",
|
|
1519
|
+
options: R.value,
|
|
1520
|
+
"option-label": j(S),
|
|
1521
|
+
"option-value": j(w)
|
|
1522
|
+
}, {
|
|
1523
|
+
...j(o),
|
|
1524
|
+
...pe.value,
|
|
1525
|
+
hideSelected: G.value,
|
|
1526
|
+
useInput: G.value || !Y.value
|
|
1527
|
+
}, {
|
|
1528
|
+
onFilter: Te,
|
|
1529
|
+
"emit-value": Ee(j(o)["emit-value"]),
|
|
1530
|
+
"map-options": Ee(j(o)["map-options"]),
|
|
1531
|
+
"no-option-prefetch": "",
|
|
1532
|
+
"use-input": G.value || !Y.value,
|
|
1533
|
+
"fill-input": !1,
|
|
1534
|
+
"lazy-rules": "",
|
|
1535
|
+
class: [{ required: c.value }, "nowrap"],
|
|
1536
|
+
rules: f,
|
|
1537
|
+
"virtual-scroll-slice-size": "options.length",
|
|
1538
|
+
"hide-bottom-space": "",
|
|
1539
|
+
"input-debounce": J.value ? "300" : "0",
|
|
1540
|
+
loading: q.value,
|
|
1541
|
+
onVirtualScroll: De,
|
|
1542
|
+
onPopupHide: n[4] ||= async () => {
|
|
1543
|
+
ye.value = !1, q.value || await Me();
|
|
1544
|
+
},
|
|
1545
|
+
onPopupShow: n[5] ||= async () => {
|
|
1546
|
+
ye.value = !0, G.value = !0, await t.$nextTick(), B.value?.$el?.querySelector("input")?.focus();
|
|
1547
|
+
},
|
|
1548
|
+
onKeyup: I(Ae, ["enter"]),
|
|
1549
|
+
"data-cy": j(o).dataCy ?? j(o).label + "_select",
|
|
1550
|
+
"data-url": e.url,
|
|
1551
|
+
onBlur: n[6] ||= async () => {
|
|
1552
|
+
G.value = !1, await C();
|
|
1553
|
+
},
|
|
1554
|
+
"onUpdate:modelValue": n[7] ||= async (e) => {
|
|
1555
|
+
await Me(), Ne(e) && (Y.value = null, a("remove"));
|
|
1556
|
+
},
|
|
1557
|
+
"is-required": !1,
|
|
1558
|
+
autocomplete: "off",
|
|
1559
|
+
multiple: Z.value,
|
|
1560
|
+
onKeydownCapture: Ae
|
|
1561
|
+
}), v({
|
|
1562
|
+
append: F(() => [oe(b(j(W), {
|
|
1563
|
+
name: "close",
|
|
1564
|
+
onClick: n[0] ||= () => {
|
|
1565
|
+
Y.value = null, a("remove");
|
|
1558
1566
|
},
|
|
1559
|
-
"
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
name: "close",
|
|
1566
|
-
onClick: n[0] ||= () => {
|
|
1567
|
-
J.value = null, a("remove");
|
|
1568
|
-
},
|
|
1569
|
-
class: "cursor-pointer",
|
|
1570
|
-
size: "xs",
|
|
1571
|
-
"data-cy": P(o).dataCy ?? P(o).label + "_select_clear"
|
|
1572
|
-
}, {
|
|
1573
|
-
default: L(() => [b(r, null, {
|
|
1574
|
-
default: L(() => [y(M(P(s)("Remove")), 1)]),
|
|
1575
|
-
_: 1
|
|
1576
|
-
})]),
|
|
1567
|
+
class: "cursor-pointer",
|
|
1568
|
+
size: "xs",
|
|
1569
|
+
"data-cy": j(o).dataCy ?? j(o).label + "_select_clear"
|
|
1570
|
+
}, {
|
|
1571
|
+
default: F(() => [b(j(X), null, {
|
|
1572
|
+
default: F(() => [y(k(j(s)("Remove")), 1)]),
|
|
1577
1573
|
_: 1
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
_: 2
|
|
1589
|
-
}, 1024)) : (D(), m(l, { key: 3 }, {
|
|
1590
|
-
default: L(() => [b(d, null, {
|
|
1591
|
-
default: L(() => [y(M(t[P(S)]), 1)]),
|
|
1592
|
-
_: 2
|
|
1593
|
-
}, 1024), xe(t) === !1 ? h("", !0) : (D(), m(d, {
|
|
1594
|
-
key: 0,
|
|
1595
|
-
caption: ""
|
|
1596
|
-
}, {
|
|
1597
|
-
default: L(() => [y(M(`#${xe(t)}`), 1)]),
|
|
1598
|
-
_: 2
|
|
1599
|
-
}, 1024))]),
|
|
1574
|
+
})]),
|
|
1575
|
+
_: 1
|
|
1576
|
+
}, 8, ["data-cy"]), [[N, e.isClearable && Y.value != null && Y.value !== ""]])]),
|
|
1577
|
+
option: F(({ itemProps: e, opt: t, selected: n, toggleOption: r }) => [b(j(me), T(x(e)), {
|
|
1578
|
+
default: F(() => [typeof j(S) == "function" ? (E(), m(j(K), { key: 0 }, {
|
|
1579
|
+
default: F(() => [y(k(j(S)(t)), 1)]),
|
|
1580
|
+
_: 2
|
|
1581
|
+
}, 1024)) : typeof t == "object" ? t[j(w)] == t[j(S)] ? (E(), m(j(K), { key: 2 }, {
|
|
1582
|
+
default: F(() => [b(j(he), null, {
|
|
1583
|
+
default: F(() => [y(k(t[j(S)]), 1)]),
|
|
1600
1584
|
_: 2
|
|
1601
|
-
}, 1024))
|
|
1602
|
-
|
|
1585
|
+
}, 1024)]),
|
|
1586
|
+
_: 2
|
|
1587
|
+
}, 1024)) : (E(), m(j(K), { key: 3 }, {
|
|
1588
|
+
default: F(() => [b(j(he), null, {
|
|
1589
|
+
default: F(() => [y(k(t[j(S)]), 1)]),
|
|
1603
1590
|
_: 2
|
|
1604
|
-
}, 1024)
|
|
1605
|
-
key:
|
|
1606
|
-
|
|
1591
|
+
}, 1024), Oe(t) === !1 ? h("", !0) : (E(), m(j(he), {
|
|
1592
|
+
key: 0,
|
|
1593
|
+
caption: ""
|
|
1607
1594
|
}, {
|
|
1608
|
-
default:
|
|
1609
|
-
dense: "",
|
|
1610
|
-
"model-value": n,
|
|
1611
|
-
"onUpdate:modelValue": (e) => r(t)
|
|
1612
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])]),
|
|
1595
|
+
default: F(() => [y(k(`#${Oe(t)}`), 1)]),
|
|
1613
1596
|
_: 2
|
|
1614
|
-
}, 1024))
|
|
1597
|
+
}, 1024))]),
|
|
1615
1598
|
_: 2
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
}, null, 8, He)) : P(z)?.length ? (D(), g("div", Ue, [b(ne, {
|
|
1623
|
-
removable: "",
|
|
1624
|
-
dense: "",
|
|
1625
|
-
class: "vn-chip",
|
|
1626
|
-
style: E({ maxWidth: P(z).length > 1 ? "100px" : "120px" }),
|
|
1627
|
-
onRemove: n[2] ||= () => {
|
|
1628
|
-
P(z).shift(), P(z).length || (J.value = null), a("remove");
|
|
1629
|
-
},
|
|
1630
|
-
title: Se(P(z)[0]),
|
|
1631
|
-
"data-cy": "vn-select_chip"
|
|
1632
|
-
}, {
|
|
1633
|
-
default: L(() => [_("span", {
|
|
1634
|
-
class: "ellipsis",
|
|
1635
|
-
textContent: M(Se(P(z)[0]))
|
|
1636
|
-
}, null, 8, We)]),
|
|
1637
|
-
_: 1
|
|
1638
|
-
}, 8, ["style", "title"]), P(z).length > 1 ? (D(), m(ne, {
|
|
1639
|
-
key: 0,
|
|
1640
|
-
dense: "",
|
|
1641
|
-
"data-cy": "vn-select_chip-counter",
|
|
1642
|
-
class: "vn-chip q-mx-none"
|
|
1599
|
+
}, 1024)) : (E(), m(j(K), { key: 1 }, {
|
|
1600
|
+
default: F(() => [y(k(t), 1)]),
|
|
1601
|
+
_: 2
|
|
1602
|
+
}, 1024)), Z.value ? (E(), m(j(K), {
|
|
1603
|
+
key: 4,
|
|
1604
|
+
side: ""
|
|
1643
1605
|
}, {
|
|
1644
|
-
default:
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1606
|
+
default: F(() => [b(j(V), {
|
|
1607
|
+
dense: "",
|
|
1608
|
+
"model-value": n,
|
|
1609
|
+
"onUpdate:modelValue": (e) => r(t)
|
|
1610
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])]),
|
|
1611
|
+
_: 2
|
|
1612
|
+
}, 1024)) : h("", !0)]),
|
|
1613
|
+
_: 2
|
|
1614
|
+
}, 1040)]),
|
|
1615
|
+
selected: F(() => [!Z.value && j(L) != null ? (E(), g("span", {
|
|
1616
|
+
key: 0,
|
|
1617
|
+
class: "nowrap",
|
|
1618
|
+
title: ke(j(L)),
|
|
1619
|
+
textContent: k(ke(j(L)))
|
|
1620
|
+
}, null, 8, qe)) : j(L)?.length ? (E(), g("div", Je, [b(j(de), {
|
|
1621
|
+
removable: "",
|
|
1622
|
+
dense: "",
|
|
1623
|
+
class: "vn-chip",
|
|
1624
|
+
style: te({ maxWidth: j(L).length > 1 ? "100px" : "120px" }),
|
|
1625
|
+
onRemove: n[2] ||= () => {
|
|
1626
|
+
j(L).shift(), j(L).length || (Y.value = null), a("remove");
|
|
1627
|
+
},
|
|
1628
|
+
title: ke(j(L)[0]),
|
|
1629
|
+
"data-cy": "vn-select_chip"
|
|
1630
|
+
}, {
|
|
1631
|
+
default: F(() => [_("span", {
|
|
1632
|
+
class: "ellipsis",
|
|
1633
|
+
textContent: k(ke(j(L)[0]))
|
|
1634
|
+
}, null, 8, Ye)]),
|
|
1635
|
+
_: 1
|
|
1636
|
+
}, 8, ["style", "title"]), j(L).length > 1 ? (E(), m(j(de), {
|
|
1637
|
+
key: 0,
|
|
1638
|
+
dense: "",
|
|
1639
|
+
"data-cy": "vn-select_chip-counter",
|
|
1640
|
+
class: "vn-chip q-mx-none"
|
|
1641
|
+
}, {
|
|
1642
|
+
default: F(() => [y(" +" + k(j(L).length - 1) + " ", 1), b(j(X), null, {
|
|
1643
|
+
default: F(() => [(E(!0), g(u, null, ie(j(L).slice(1), (e, t) => (E(), g("div", {
|
|
1644
|
+
key: t,
|
|
1645
|
+
textContent: k(ke(e))
|
|
1646
|
+
}, null, 8, Xe))), 128))]),
|
|
1651
1647
|
_: 1
|
|
1652
|
-
})) : h("", !0)])) : h("", !0)]),
|
|
1653
|
-
loading: L(() => [b(O, {
|
|
1654
|
-
size: "xs",
|
|
1655
|
-
"data-cy": "vnSelectSpinner"
|
|
1656
1648
|
})]),
|
|
1657
|
-
_:
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1649
|
+
_: 1
|
|
1650
|
+
})) : h("", !0)])) : h("", !0)]),
|
|
1651
|
+
loading: F(() => [b(je, {
|
|
1652
|
+
size: "xs",
|
|
1653
|
+
"data-cy": "vnSelectSpinner"
|
|
1654
|
+
})]),
|
|
1655
|
+
_: 2
|
|
1656
|
+
}, [ie(t.$slots, (r, i) => ({
|
|
1657
|
+
name: i,
|
|
1658
|
+
fn: F((r) => [i == "append" ? (E(), g("div", Ke, [oe(b(j(W), {
|
|
1659
|
+
name: "close",
|
|
1660
|
+
onClick: n[1] ||= se(() => {
|
|
1661
|
+
Y.value = null, a("remove");
|
|
1662
|
+
}, ["stop"]),
|
|
1663
|
+
class: "cursor-pointer",
|
|
1664
|
+
size: "xs"
|
|
1665
|
+
}, {
|
|
1666
|
+
default: F(() => [b(j(X), null, {
|
|
1667
|
+
default: F(() => [y(k(j(s)("Remove")), 1)]),
|
|
1672
1668
|
_: 1
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1669
|
+
})]),
|
|
1670
|
+
_: 1
|
|
1671
|
+
}, 512), [[N, e.isClearable && Y.value != null && Y.value !== ""]]), t.$slots.append ? O(t.$slots, "append", T(x(r ?? {})), void 0, !0, 0) : h("", !0)])) : O(t.$slots, i, ee(r ?? {}, { key: i }), void 0, !0, 1)])
|
|
1672
|
+
}))]), 1040, [
|
|
1673
|
+
"modelValue",
|
|
1674
|
+
"options",
|
|
1675
|
+
"option-label",
|
|
1676
|
+
"option-value",
|
|
1677
|
+
"emit-value",
|
|
1678
|
+
"map-options",
|
|
1679
|
+
"use-input",
|
|
1680
|
+
"class",
|
|
1681
|
+
"input-debounce",
|
|
1682
|
+
"loading",
|
|
1683
|
+
"data-cy",
|
|
1684
|
+
"data-url",
|
|
1685
|
+
"multiple"
|
|
1686
|
+
]));
|
|
1690
1687
|
}
|
|
1691
1688
|
};
|
|
1692
|
-
typeof
|
|
1693
|
-
var
|
|
1694
|
-
VnConfirm: () =>
|
|
1695
|
-
VnDate: () =>
|
|
1696
|
-
VnFetch: () =>
|
|
1697
|
-
VnForm: () =>
|
|
1698
|
-
VnInput: () =>
|
|
1699
|
-
VnInputDate: () =>
|
|
1700
|
-
VnSelect: () =>
|
|
1701
|
-
VnSkeletonForm: () =>
|
|
1702
|
-
VnSpinner: () =>
|
|
1689
|
+
typeof Ge == "function" && Ge(Ze);
|
|
1690
|
+
var Qe = /*#__PURE__*/ $(Ze, [["__scopeId", "data-v-f1cc83a8"]]), $e = /* @__PURE__ */ e({
|
|
1691
|
+
VnConfirm: () => Ee,
|
|
1692
|
+
VnDate: () => Me,
|
|
1693
|
+
VnFetch: () => Re,
|
|
1694
|
+
VnForm: () => We,
|
|
1695
|
+
VnInput: () => Pe,
|
|
1696
|
+
VnInputDate: () => Le,
|
|
1697
|
+
VnSelect: () => Qe,
|
|
1698
|
+
VnSkeletonForm: () => Ae,
|
|
1699
|
+
VnSpinner: () => je
|
|
1703
1700
|
});
|
|
1704
1701
|
//#endregion
|
|
1705
|
-
export {
|
|
1702
|
+
export { Le as a, je as c, Re as i, Ae as l, Qe as n, Pe as o, We as r, Me as s, $e as t, Ee as u };
|