@verdnatura/vn-front-lib 0.2.0 → 0.3.0

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.
@@ -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 E, onMounted as te, onUnmounted as ne, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveComponent as j, toDisplayString as M, toRefs as N, unref as P, useAttrs as re, useModel as F, vShow as ie, watch as I, withCtx as L, withDirectives as R, withKeys as ae, withModifiers as oe } from "vue";
6
- import * as se from "quasar";
7
- import { QAvatar as ce, QBtn as z, QBtnGroup as B, QCard as le, QCardActions as V, QCardSection as H, QDate as ue, QDialog as U, QForm as de, QIcon as W, QInnerLoading as G, QInput as K, QMenu as q, QSkeleton as J, QSpace as Y, QTooltip as X, date as Z, getCssVar as fe } from "quasar";
8
- import { useI18n as pe } from "vue-i18n";
9
- import me from "axios";
10
- import { onBeforeRouteLeave as he, useRoute as ge, useRouter as _e } from "vue-router";
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 Q(e) {
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
- }, ve = { class: "text-h6" }, ye = ["innerHTML"], be = {
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
- ...se.useDialogPluginComponent.emits
83
+ ...ce.useDialogPluginComponent.emits
84
84
  ],
85
85
  setup(e, { expose: t, emit: n }) {
86
- let { t: r } = pe(), i = e, a = n;
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 } = se.useDialogPluginComponent(), u = i.title || r("Confirm"), d = i.message || i.message !== !1 && r("Are you sure you want to continue?"), f = O(!1);
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) => (D(), m(P(U), {
103
+ return (t, n) => (E(), m(j(U), {
104
104
  ref_key: "dialogRef",
105
105
  ref: o,
106
106
  persistent: e.persistent,
107
- onHide: P(s)
107
+ onHide: j(s)
108
108
  }, {
109
- default: L(() => [b(P(le), { class: w(["q-pa-sm", e.cardClass]) }, {
110
- default: L(() => [
111
- b(P(H), { class: "row items-center q-pb-none" }, {
112
- default: L(() => [
113
- e.icon ? (D(), m(P(ce), {
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", ve, M(P(u)), 1),
121
- b(P(Y)),
122
- e.closable ? (D(), m(P(z), {
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(P(H), {
134
+ b(j(B), {
135
135
  class: "q-pb-none",
136
136
  "data-cy": "VnConfirm_message"
137
137
  }, {
138
- default: L(() => [P(d) === !1 ? h("", !0) : (D(), g("span", {
138
+ default: F(() => [j(d) === !1 ? h("", !0) : (E(), g("span", {
139
139
  key: 0,
140
- innerHTML: P(d)
141
- }, null, 8, ye))]),
140
+ innerHTML: j(d)
141
+ }, null, 8, we))]),
142
142
  _: 1
143
143
  }),
144
- b(P(H), { class: "row items-center q-pt-none" }, {
145
- default: L(() => [A(t.$slots, "custom-html", {}, void 0, !0)]),
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 ? (D(), m(P(V), {
148
+ t.$slots.actions ? (E(), m(j(z), {
149
149
  key: 0,
150
150
  align: "right"
151
151
  }, {
152
- default: L(() => [A(t.$slots, "actions", { actions: {
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
- })) : (D(), m(P(V), {
157
+ })) : (E(), m(j(z), {
158
158
  key: 1,
159
159
  align: "right"
160
160
  }, {
161
- default: L(() => [b(P(z), {
162
- label: P(r)("globals.cancel"),
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(P(z), {
169
- label: P(r)("globals.confirm"),
170
- title: P(r)("globals.confirm"),
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 Q == "function" && Q(be);
192
- var xe = /*#__PURE__*/ $(be, [["__scopeId", "data-v-087d2dc1"]]), Se = { class: "row q-gutter-md q-mb-md" }, Ce = { class: "row q-gutter-md q-mb-md" }, we = { class: "row q-gutter-md q-mb-md" }, Te = {
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) => (D(), g(u, null, [
196
- _("div", Se, [b(P(J), {
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(P(J), {
200
+ }), b(j(J), {
201
201
  type: "QInput",
202
202
  class: "col",
203
203
  square: ""
204
204
  })]),
205
- _("div", Ce, [b(P(J), {
205
+ _("div", Oe, [b(j(J), {
206
206
  type: "QInput",
207
207
  class: "col",
208
208
  square: ""
209
- }), b(P(J), {
209
+ }), b(j(J), {
210
210
  type: "QInput",
211
211
  class: "col",
212
212
  square: ""
213
213
  })]),
214
- _("div", we, [b(P(J), {
214
+ _("div", ke, [b(j(J), {
215
215
  type: "QInput",
216
216
  class: "col",
217
217
  square: ""
218
- }), b(P(J), {
218
+ }), b(j(J), {
219
219
  type: "QInput",
220
220
  class: "col",
221
221
  square: ""
222
222
  })])
223
223
  ], 64));
224
224
  }
225
- }, Ee = /*#__PURE__*/ $({
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 ? (D(), g("div", {
245
+ return (n, r) => e.noTransition ? (E(), g("div", {
246
246
  key: 1,
247
247
  class: "vn-spinner",
248
- style: E({
248
+ style: te({
249
249
  width: t[e.size] || e.size,
250
250
  height: t[e.size] || e.size
251
251
  })
252
- }, null, 4)) : (D(), m(f, {
252
+ }, null, 4)) : (E(), m(f, {
253
253
  key: 0,
254
254
  name: "vn-spinner-fade",
255
255
  appear: ""
256
256
  }, {
257
- default: L(() => [_("div", {
257
+ default: F(() => [_("div", {
258
258
  class: "vn-spinner",
259
- style: E({
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"]]), De = /*#__PURE__*/ $({
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 = F(e, "modelValue");
279
- return (e, n) => (D(), m(P(ue), {
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 Oe(e) {
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 ke = {
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 = re(), { isRequired: a, requiredFieldRule: o } = n(i), { t: s } = pe(), c = r, l = e, u = F(e, "modelValue"), d = [
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
- }, _ = O(null), x = O(!1), S = p(() => l.isOutlined ? {
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 ne = p(() => [
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
- ]), k = (e) => {
497
- e.key !== "Backspace" && l.insertable && e.key.match(/[0-9]/) && j(e);
498
- }, j = (e) => {
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
- }, N = () => {
506
+ }, P = () => {
507
507
  u.value = u.value?.toUpperCase() || "";
508
508
  };
509
- return te(() => {
509
+ return ne(() => {
510
510
  i.autofocus && w();
511
- }), (t, n) => (D(), g("div", {
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(P(K), ee({
514
+ }, [b(j(G), ee({
515
515
  ref_key: "vnInputRef",
516
516
  ref: _,
517
- "model-value": P(u),
517
+ "model-value": j(u),
518
518
  "onUpdate:modelValue": f
519
519
  }, {
520
- ...P(i),
520
+ ...j(i),
521
521
  ...S.value
522
522
  }, {
523
- class: { required: P(a) },
524
- onKeydown: k,
523
+ class: { required: j(a) },
524
+ onKeydown: ie,
525
525
  onFocus: T,
526
526
  clearable: !1,
527
- rules: ne.value,
527
+ rules: re.value,
528
528
  "lazy-rules": !0,
529
529
  "hide-bottom-space": "",
530
- "data-cy": (P(i)["data-cy"] ?? P(i).label) + "_input",
530
+ "data-cy": (j(i)["data-cy"] ?? j(i).label) + "_input",
531
531
  dense: ""
532
532
  }), v({
533
- append: L(() => [
534
- R(b(P(W), {
533
+ append: F(() => [
534
+ oe(b(j(W), {
535
535
  name: "close",
536
536
  size: "xs",
537
537
  class: "cursor-pointer",
538
- style: E({ visibility: x.value && P(u) && !P(i).disabled && !P(i).readonly && l.clearable ? "visible" : "hidden" }),
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: L(() => [b(P(X), null, {
544
- default: L(() => [y(M(P(s)("Remove")), 1)]),
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"]), [[ie, !e.clearOnHover || x.value]]),
549
- !P(i).disabled && !P(i).readonly && l.uppercase ? (D(), m(P(W), {
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: N,
553
+ onClick: P,
554
554
  class: "uppercase-icon"
555
555
  }, {
556
- default: L(() => [b(P(X), null, {
557
- default: L(() => [y(M(P(s)("Convert to uppercase")), 1)]),
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 && !P(i).disabled ? A(t.$slots, "append", {}, void 0, void 0, 1) : h("", !0),
563
- e.info ? (D(), m(P(W), {
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: L(() => [b(P(X), { "max-width": "350px" }, {
568
- default: L(() => [y(M(e.info), 1)]),
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: L(() => [A(t.$slots, "hint")]),
577
+ fn: F(() => [O(t.$slots, "hint")]),
578
578
  key: "0"
579
579
  } : void 0, t.$slots.prepend ? {
580
580
  name: "prepend",
581
- fn: L(() => [A(t.$slots, "prepend")]),
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 Oe == "function" && Oe(ke);
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 Ae(e) {
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 je = "DD/MM/YYYY", Me = {
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 = re(), { t: r } = pe(), { isRequired: i, requiredFieldRule: a } = n(t), o = F(e, "modelValue"), s = e, c = O(null), l = fe("negative"), u = O(""), d = O(), f = O(), _ = [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), je)).join(", ") : Z.formatDate(new Date(v.value), je);
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 = O(""), E = t["data-cy"] ?? t.label, te = E + "_menu", ne = E + "_inputDate", k = (e) => {
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
- }, A = (e) => {
665
- e && (T.value = e.split("/").reverse().join("/"), j(), d.value = !1);
664
+ }, O = (e) => {
665
+ e && (T.value = e.split("/").reverse().join("/"), A(), d.value = !1);
666
666
  };
667
- I(() => o.value, () => {
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), je) : "";
670
- }, { immediate: !0 }), I(d, (e) => {
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 j = () => {
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
- j(), C(() => {
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) => (D(), g("div", {
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(P(K), ee({
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
- ...P(t),
747
+ ...j(t),
748
748
  ...w.value
749
749
  }, {
750
- class: { required: P(i) },
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, ae(oe(N, ["prevent"]), ["enter"])],
758
- onFocusout: j,
757
+ onKeydown: [a[7] ||= (e) => d.value = !1, I(se(N, ["prevent"]), ["enter"])],
758
+ onFocusout: A,
759
759
  "hide-bottom-space": "",
760
- "data-cy": ne,
761
- "onUpdate:modelValue": k,
760
+ "data-cy": re,
761
+ "onUpdate:modelValue": ie,
762
762
  autocomplete: "off"
763
763
  }), {
764
- append: L(() => [(P(t).clearable == null || P(t).clearable) && (!e.clearOnHover || f.value) && T.value && !P(t).disable ? (D(), m(P(W), {
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: L(() => [b(P(X), null, {
774
- default: L(() => [y(M(P(r)("Remove")), 1)]),
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: L(() => [n.$q.screen.gt.xs ? (D(), m(P(q), {
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": te
789
+ "data-cy": ne
790
790
  }, {
791
- default: L(() => [b(De, {
791
+ default: F(() => [b(Me, {
792
792
  modelValue: S.value,
793
- "onUpdate:modelValue": [a[1] ||= (e) => S.value = e, A]
793
+ "onUpdate:modelValue": [a[1] ||= (e) => S.value = e, O]
794
794
  }, null, 8, ["modelValue"])]),
795
795
  _: 1
796
- }, 8, ["modelValue"])) : (D(), m(P(U), {
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: L(() => [b(De, {
801
+ default: F(() => [b(Me, {
802
802
  modelValue: S.value,
803
- "onUpdate:modelValue": [a[3] ||= (e) => S.value = e, A]
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 Ae == "function" && Ae(Me);
818
+ typeof Fe == "function" && Fe(Le);
819
819
  //#endregion
820
820
  //#region lib/components/models/VnFetch.vue
821
- var Ne = {
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 }), te(async () => {
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 me.get(r.url, { params: {
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) => (D(), g("template"));
873
+ return (e, t) => (E(), g("template"));
874
874
  }
875
875
  };
876
876
  //#endregion
877
877
  //#region lib/utils/dataByOrder.js
878
- function Pe(e, t) {
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) => Fe(e, t, n));
890
+ return e.sort((e, t) => Be(e, t, n));
891
891
  }
892
892
  return e;
893
893
  }
894
- function Fe(e, t, n) {
894
+ function Be(e, t, n) {
895
895
  for (let { field: r, way: i } of n) {
896
- let n = Ie(e[r], t[r]) * i;
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 Ie(e, t) {
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 Le = {
914
+ var He = {
915
915
  class: "column items-center full-width",
916
916
  style: { position: "relative" }
917
- }, Re = ["textContent"], ze = /*#__PURE__*/ $({
917
+ }, Ue = ["textContent"], We = /*#__PURE__*/ $({
918
918
  __name: "VnForm",
919
919
  props: {
920
920
  url: {
@@ -1014,6 +1014,10 @@ var Le = {
1014
1014
  title: {
1015
1015
  type: String,
1016
1016
  default: null
1017
+ },
1018
+ responseType: {
1019
+ type: String,
1020
+ default: void 0
1017
1021
  }
1018
1022
  },
1019
1023
  emits: [
@@ -1023,13 +1027,13 @@ var Le = {
1023
1027
  "submit"
1024
1028
  ],
1025
1029
  setup(e, { expose: n, emit: l }) {
1026
- let { push: f } = _e(), v = se.useQuasar(), y = o(), x = c(), { t: S } = pe(), { validate: w, validations: T } = t(), { notify: E } = s(), k = ge(), j = O(null), N = e, re = l, F = p(() => N.model ?? `formModel_${k?.meta?.title ?? k.name}`).value, ie = O(!1), R = i(F), ae = O(!1), ce = O(!1), V = O(!N.observeFormChanges), ue = {}, U = p(() => y.get(F)), W = O(), K = p(() => j.value?.$el), q = p(() => ({
1030
+ 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
1031
  save: {
1028
1032
  dataCy: "saveDefaultBtn",
1029
1033
  color: "primary",
1030
1034
  icon: "save",
1031
1035
  label: "globals.save",
1032
- click: async (e) => J(e),
1036
+ click: async (e) => me(e),
1033
1037
  type: "submit"
1034
1038
  },
1035
1039
  reset: {
@@ -1037,80 +1041,80 @@ var Le = {
1037
1041
  color: "primary",
1038
1042
  icon: "restart_alt",
1039
1043
  label: "globals.reset",
1040
- click: () => Q()
1044
+ click: () => J()
1041
1045
  },
1042
- ...N.defaultButtons
1043
- })), J = async (e) => {
1044
- await j.value.validate() && await Z(e);
1046
+ ...M.defaultButtons
1047
+ })), me = async (e) => {
1048
+ await A.value.validate() && await q(e);
1045
1049
  };
1046
- function Y() {
1047
- ue = N.formUrl ? JSON.parse(k?.query[N.formUrl] ?? "{}") : void 0;
1050
+ function he() {
1051
+ de = M.formUrl ? JSON.parse(ie?.query[M.formUrl] ?? "{}") : void 0;
1048
1052
  }
1049
- te(async () => {
1050
- !R.store.url && N.url && R.setOptions({
1051
- url: N.url,
1052
- filter: N.filter
1053
- }), Y(), C(() => ie.value = !0), N.formInitialData && ue && y.set(F, {
1054
- ...N.formInitialData,
1055
- ...ue
1056
- }), N.formInitialData || (N.autoLoad && N.url ? await X() : R.store.data && ve("onFetch", { val: R.store.data })), N.observeFormChanges && I(() => W.value, (e, t) => {
1057
- t && (V.value = !ce.value && JSON.stringify(e) !== JSON.stringify(U.value), ce.value = !1);
1053
+ ne(async () => {
1054
+ !I.store.url && M.url && I.setOptions({
1055
+ url: M.url,
1056
+ filter: M.filter
1057
+ }), he(), C(() => oe.value = !0), M.formInitialData && de && y.set(N, {
1058
+ ...M.formInitialData,
1059
+ ...de
1060
+ }), M.formInitialData || (M.autoLoad && M.url ? await K() : I.store.data && X("onFetch", { val: I.store.data })), M.observeFormChanges && P(() => U.value, (e, t) => {
1061
+ t && (V.value = !z.value && JSON.stringify(e) !== JSON.stringify(H.value), z.value = !1);
1058
1062
  }, { deep: !0 });
1059
- }), N.url || I(() => R.store.data, (e) => ve("onFetch", { val: e })), I(U, async (e) => {
1060
- e && (W.value = JSON.parse(JSON.stringify(e))), await C(), K.value && a(K.value);
1061
- }, { immediate: !0 }), I(() => [N.url, N.filter], async () => {
1062
- y.set(F, null), Q(), await X();
1063
- }), N.formInitialData && I(() => N.formInitialData, (e) => {
1064
- e && y.set(F, {
1063
+ }), M.url || P(() => I.store.data, (e) => X("onFetch", { val: e })), P(H, async (e) => {
1064
+ e && (U.value = JSON.parse(JSON.stringify(e))), await C(), W.value && a(W.value);
1065
+ }, { immediate: !0 }), P(() => [M.url, M.filter], async () => {
1066
+ y.set(N, null), J(), await K();
1067
+ }), M.formInitialData && P(() => M.formInitialData, (e) => {
1068
+ e && y.set(N, {
1065
1069
  ...e,
1066
- ...ue
1070
+ ...de
1067
1071
  });
1068
- }), he((e, t, n) => {
1069
- V.value && N.observeFormChanges ? v.dialog({
1070
- component: xe,
1072
+ }), ye((e, t, n) => {
1073
+ V.value && M.observeFormChanges ? v.dialog({
1074
+ component: Ee,
1071
1075
  componentProps: {
1072
1076
  title: S("globals.unsavedPopup.title"),
1073
1077
  message: S("globals.unsavedPopup.subtitle"),
1074
1078
  promise: () => n()
1075
1079
  }
1076
1080
  }) : n();
1077
- }), ne(() => {
1078
- if (V.value) return y.set(F, U.value);
1079
- N.clearStoreOnUnmount && y.unset(F);
1081
+ }), re(() => {
1082
+ if (V.value) return y.set(N, H.value);
1083
+ M.clearStoreOnUnmount && y.unset(N);
1080
1084
  });
1081
- async function X() {
1085
+ async function K() {
1082
1086
  try {
1083
1087
  let e;
1084
- e = N.model ? (await R.addFilter({ filter: N.filter })).response?.data : (await me.get(N.url, { params: { filter: JSON.stringify(N.filter) } })).data, Array.isArray(e) && (e = e[0] ?? {}), ve("onFetch", { val: e });
1088
+ 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
1089
  } catch (e) {
1086
- throw y.set(F, {}), e;
1090
+ throw y.set(N, {}), e;
1087
1091
  }
1088
1092
  }
1089
- async function Z() {
1090
- if (N.observeFormChanges && !V.value) return E("globals.noChanges", "negative");
1091
- ae.value = !0;
1093
+ async function q() {
1094
+ if (M.observeFormChanges && !V.value) return te("globals.noChanges", "negative");
1095
+ le.value = !0;
1092
1096
  try {
1093
- W.value = ye(W.value);
1094
- let e = N.urlCreate ? "post" : "patch", t = e === "post" ? N.mapper(W.value) : N.mapper(W.value, U.value), n = N.urlCreate || N.urlUpdate || N.url || R.store.url, r = await Promise.resolve(N.saveFn ? N.saveFn(t) : me[N.customMethod ?? e](n, t));
1095
- N.urlCreate && E("globals.dataCreated", "positive"), V.value = !1, ve("onDataSaved", {
1096
- val: W.value,
1097
+ U.value = Z(U.value);
1098
+ 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, { responseType: M.responseType }));
1099
+ M.urlCreate && te("globals.dataCreated", "positive"), V.value = !1, X("onDataSaved", {
1100
+ val: U.value,
1097
1101
  res: r?.data,
1098
- old: U.value,
1102
+ old: H.value,
1099
1103
  rawRes: r
1100
- }), N.reload && await R.fetch({});
1104
+ }), M.reload && await I.fetch({});
1101
1105
  } catch (e) {
1102
- throw re("onDataSaveFail", W.value), e;
1106
+ throw ae("onDataSaveFail", U.value), e;
1103
1107
  } finally {
1104
- ae.value = !1;
1108
+ le.value = !1;
1105
1109
  }
1106
1110
  }
1107
- async function fe() {
1108
- await Z(!0), f({ path: N.goTo });
1111
+ async function ge() {
1112
+ await q(!0), f({ path: M.goTo });
1109
1113
  }
1110
- function Q() {
1111
- W.value = JSON.parse(JSON.stringify(U.value)), ve("onFetch", { val: U.value }), N.observeFormChanges && (V.value = !1, ce.value = !0);
1114
+ function J() {
1115
+ U.value = JSON.parse(JSON.stringify(H.value)), X("onFetch", { val: H.value }), M.observeFormChanges && (V.value = !1, z.value = !0);
1112
1116
  }
1113
- function $(e, t, n) {
1117
+ function Y(e, t, n) {
1114
1118
  t(() => {
1115
1119
  let { options: t, filterFn: r } = n;
1116
1120
  t.value = r(t, e);
@@ -1118,98 +1122,98 @@ var Le = {
1118
1122
  e.setOptionIndex(-1), e.moveOptionSelection(1, !0);
1119
1123
  });
1120
1124
  }
1121
- async function ve(e, { val: t, res: n, old: r, rawRes: i } = {
1125
+ async function X(e, { val: t, res: n, old: r, rawRes: i } = {
1122
1126
  val: null,
1123
1127
  res: null,
1124
1128
  old: null,
1125
1129
  rawRes: null
1126
1130
  }) {
1127
- y.set(F, t), N.url || (R.store.data = t), re(e, y.get(F), n, r, W, i), K.value && a(K.value);
1131
+ 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
1132
  }
1129
- function ye(e) {
1130
- if (!N.defaultTrim) return e;
1133
+ function Z(e) {
1134
+ if (!M.defaultTrim) return e;
1131
1135
  for (let t in e) typeof e[t] == "string" && (e[t] = e[t].trim());
1132
1136
  return e;
1133
1137
  }
1134
- async function be(e) {
1135
- if (e.key === "Enter" && !N.preventSubmit && V.value) {
1138
+ async function _e(e) {
1139
+ if (e.key === "Enter" && !M.preventSubmit && V.value) {
1136
1140
  let t = e.target;
1137
1141
  if (t.type == "textarea" && e.shiftKey) {
1138
1142
  let { selectionStart: e, selectionEnd: n } = t;
1139
1143
  t.value = t.value.substring(0, e) + "\n" + t.value.substring(n), e = n = e + 1;
1140
1144
  return;
1141
1145
  }
1142
- await j.value.submit(e);
1146
+ await A.value.submit(e);
1143
1147
  }
1144
1148
  }
1145
1149
  return n({
1146
- submitForm: J,
1147
- myForm: j,
1148
- save: Z,
1149
- isLoading: ae,
1150
+ submitForm: me,
1151
+ myForm: A,
1152
+ save: q,
1153
+ isLoading: le,
1150
1154
  hasChanges: V,
1151
- reset: Q,
1152
- fetch: X,
1153
- formData: W
1154
- }), (t, n) => (D(), g(u, null, [_("div", Le, [b(P(G), {
1155
- showing: ae.value,
1156
- label: P(S)("globals.pleaseWait"),
1155
+ reset: J,
1156
+ fetch: K,
1157
+ formData: U
1158
+ }), (t, n) => (E(), g(u, null, [_("div", He, [b(j(pe), {
1159
+ showing: le.value,
1160
+ label: j(S)("globals.pleaseWait"),
1157
1161
  color: "primary",
1158
1162
  style: { "min-width": "100%" }
1159
1163
  }, {
1160
- default: L(() => [b(P(Ee), { size: "md" })]),
1164
+ default: F(() => [b(j(je), { size: "md" })]),
1161
1165
  _: 1
1162
- }, 8, ["showing", "label"]), W.value ? (D(), m(P(de), ee({
1166
+ }, 8, ["showing", "label"]), U.value ? (E(), m(j(fe), ee({
1163
1167
  key: 0,
1164
1168
  id: "vnForm"
1165
1169
  }, t.$attrs, {
1166
1170
  ref_key: "myForm",
1167
- ref: j,
1168
- onSubmit: oe(Z, ["prevent"]),
1169
- onKeyup: oe(be, ["prevent"]),
1170
- onReset: Q,
1171
+ ref: A,
1172
+ onSubmit: se(q, ["prevent"]),
1173
+ onKeyup: se(_e, ["prevent"]),
1174
+ onReset: J,
1171
1175
  class: ["full-width", [e.paddingClass]],
1172
1176
  style: {
1173
1177
  maxWidth: e.maxWidth || "none",
1174
1178
  width: "100%"
1175
1179
  }
1176
1180
  }), {
1177
- default: L(() => [b(P(le), { class: "q-pa-none" }, {
1178
- default: L(() => [e.showTitle ? (D(), m(P(H), {
1181
+ default: F(() => [b(j(ue), { class: "q-pa-none" }, {
1182
+ default: F(() => [e.showTitle ? (E(), m(j(B), {
1179
1183
  key: 0,
1180
1184
  class: "vn-basic-data__header q-px-none q-pb-none"
1181
1185
  }, {
1182
- default: L(() => [_("span", {
1186
+ default: F(() => [_("span", {
1183
1187
  class: "text-h6",
1184
- textContent: M(e.title || t.$t("globals.pageTitles.basicData"))
1185
- }, null, 8, Re)]),
1188
+ textContent: k(e.title || t.$t("globals.pageTitles.basicData"))
1189
+ }, null, 8, Ue)]),
1186
1190
  _: 1
1187
- })) : h("", !0), W.value ? A(t.$slots, "form", {
1188
- data: W.value,
1189
- validate: P(w),
1190
- validations: P(T)(),
1191
- filter: $
1192
- }, void 0, !0, 1) : (D(), m(P(Te), { key: 2 }))]),
1191
+ })) : h("", !0), U.value ? O(t.$slots, "form", {
1192
+ data: U.value,
1193
+ validate: j(w),
1194
+ validations: j(T)(),
1195
+ filter: Y
1196
+ }, void 0, !0, 1) : (E(), m(j(Ae), { key: 2 }))]),
1193
1197
  _: 3
1194
1198
  })]),
1195
1199
  _: 3
1196
- }, 16, ["class", "style"])) : h("", !0)]), N.defaultActions && P(x)?.isSubToolbarShown() && ie.value ? (D(), m(d, {
1200
+ }, 16, ["class", "style"])) : h("", !0)]), M.defaultActions && j(x)?.isSubToolbarShown() && oe.value ? (E(), m(d, {
1197
1201
  key: 0,
1198
1202
  to: "#st-actions"
1199
- }, [b(P(B), {
1203
+ }, [b(j(R), {
1200
1204
  push: "",
1201
1205
  class: "q-gutter-x-sm"
1202
1206
  }, {
1203
- default: L(() => [
1204
- A(t.$slots, "moreActions", {}, void 0, !0),
1205
- b(P(z), {
1206
- label: P(r)(q.value.reset.label),
1207
- color: q.value.reset.color,
1208
- icon: q.value.reset.icon,
1207
+ default: F(() => [
1208
+ O(t.$slots, "moreActions", {}, void 0, !0),
1209
+ b(j(L), {
1210
+ label: j(r)(G.value.reset.label),
1211
+ color: G.value.reset.color,
1212
+ icon: G.value.reset.icon,
1209
1213
  flat: "",
1210
- onClick: q.value.reset.click,
1214
+ onClick: G.value.reset.click,
1211
1215
  disable: !V.value,
1212
- title: P(S)(q.value.reset.label),
1216
+ title: j(S)(G.value.reset.label),
1213
1217
  "data-cy": "resetDefaultBtn"
1214
1218
  }, null, 8, [
1215
1219
  "label",
@@ -1219,15 +1223,15 @@ var Le = {
1219
1223
  "disable",
1220
1224
  "title"
1221
1225
  ]),
1222
- b(P(z), {
1226
+ b(j(L), {
1223
1227
  "data-cy": "saveDefaultBtn",
1224
- label: P(r)("globals.save"),
1228
+ label: j(r)("globals.save"),
1225
1229
  color: "primary",
1226
1230
  icon: "save",
1227
- onClick: q.value.save.click,
1231
+ onClick: G.value.save.click,
1228
1232
  disable: !V.value,
1229
- title: P(S)(q.value.save.label),
1230
- flat: !!N.goTo
1233
+ title: j(S)(G.value.save.label),
1234
+ flat: !!M.goTo
1231
1235
  }, null, 8, [
1232
1236
  "label",
1233
1237
  "onClick",
@@ -1235,12 +1239,12 @@ var Le = {
1235
1239
  "title",
1236
1240
  "flat"
1237
1241
  ]),
1238
- N.goTo ? (D(), m(P(z), {
1242
+ M.goTo ? (E(), m(j(L), {
1239
1243
  key: 0,
1240
1244
  "data-cy": "saveAndContinueDefaultBtn",
1241
- onClick: fe,
1242
- label: P(r)("globals.saveAndContinue") + " " + P(S)("globals." + N.goTo.split("/").pop()),
1243
- title: P(S)("globals.saveAndContinue") + " " + P(S)("globals." + N.goTo.split("/").pop()),
1245
+ onClick: ge,
1246
+ label: j(r)("globals.saveAndContinue") + " " + j(S)("globals." + M.goTo.split("/").pop()),
1247
+ title: j(S)("globals.saveAndContinue") + " " + j(S)("globals." + M.goTo.split("/").pop()),
1244
1248
  disable: !V.value,
1245
1249
  color: "primary",
1246
1250
  icon: "save"
@@ -1253,10 +1257,10 @@ var Le = {
1253
1257
  _: 3
1254
1258
  })])) : h("", !0)], 64));
1255
1259
  }
1256
- }, [["__scopeId", "data-v-addfa85d"]]);
1260
+ }, [["__scopeId", "data-v-cb1e841f"]]);
1257
1261
  //#endregion
1258
1262
  //#region lib/components/selects/VnSelect.vue?vue&type=i18n&index=0&lang.i18n
1259
- function Be(e) {
1263
+ function Ge(e) {
1260
1264
  let t = e;
1261
1265
  t.__i18n = t.__i18n || [], t.__i18n.push({
1262
1266
  locale: "",
@@ -1272,10 +1276,10 @@ function Be(e) {
1272
1276
  }
1273
1277
  //#endregion
1274
1278
  //#region lib/components/selects/VnSelect.vue
1275
- var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
1279
+ var Ke = { key: 0 }, qe = ["title", "textContent"], Je = {
1276
1280
  key: 1,
1277
1281
  class: "no-wrap chip-scroll"
1278
- }, We = ["textContent"], Ge = ["textContent"], Ke = {
1282
+ }, Ye = ["textContent"], Xe = ["textContent"], Ze = {
1279
1283
  __name: "VnSelect",
1280
1284
  props: {
1281
1285
  modelValue: {
@@ -1398,46 +1402,46 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
1398
1402
  "remove"
1399
1403
  ],
1400
1404
  setup(e, { expose: t, emit: r }) {
1401
- let a = r, o = re(), { t: s } = pe(), c = p(() => n(o).isRequired), l = p(() => n(o).requiredFieldRule), d = e, f = [l, ...o.rules ?? []], { optionLabel: S, optionValue: w, optionCaption: ne, optionFilter: F, optionFilterValue: se, options: ce, modelValue: z } = N(d), B = O([]), le = O([]), V = O(/* @__PURE__ */ new Map()), H = O(), ue = O(), U = s("globals.noOne"), de = O({
1405
+ 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
1406
  [w.value]: !1,
1403
1407
  [S.value]: U
1404
- }), W = p(() => d.isOutlined ? {
1408
+ }), pe = p(() => d.isOutlined ? {
1405
1409
  dense: !0,
1406
1410
  outlined: !0,
1407
1411
  rounded: !0
1408
- } : {}), G = O(!1), K = O(!1), q = p(() => d.url), J = p({
1412
+ } : {}), G = D(!1), q = D(!1), J = p(() => d.url), Y = p({
1409
1413
  get() {
1410
1414
  return d.modelValue;
1411
1415
  },
1412
1416
  set(e) {
1413
- _e(le.value), a("update:modelValue", e);
1417
+ $(ue.value), a("update:modelValue", e);
1414
1418
  }
1415
- }), Y = p(() => Array.isArray(d.modelValue) || "multiple" in o || o.isAdvanced), X = d.dataKey ?? (d.url?.length > 0 ? d.url : o.name ?? o.label), Z = i(X, {
1419
+ }), 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
1420
  url: d.url,
1417
1421
  searchUrl: !1,
1418
1422
  mapKey: o["map-key"]
1419
- }), fe = O(!1), me = p(() => d.sortBy ? d.sortBy : typeof d.optionLabel == "string" ? d.optionLabel + " ASC" : "");
1420
- function he(e) {
1423
+ }), ye = D(!1), be = p(() => d.sortBy ? d.sortBy : typeof d.optionLabel == "string" ? d.optionLabel + " ASC" : "");
1424
+ function xe(e) {
1421
1425
  return typeof d.filterBuilder == "function" ? d.filterBuilder(e) : d.useLike ? { like: `%${e}%` } : e;
1422
1426
  }
1423
- I(ce, (e) => {
1424
- _e(e);
1425
- }), I(z, async (e) => {
1427
+ P(le, (e) => {
1428
+ $(e);
1429
+ }), P(L, async (e) => {
1426
1430
  e = (e?.neq || e?.nin || e) ?? [], Array.isArray(e) || (e = [e]);
1427
- for (let t of e) V.value.get(t) || await $(t, !0);
1428
- d.noOne && B.value.unshift(de.value);
1429
- }), I(() => le.value, (e) => {
1430
- for (let t of e) V.value.set(t[w.value], t);
1431
- }), te(() => {
1432
- _e(ce.value), q.value && d.modelValue && !ge() && $(d.modelValue), (d.focusOnMount || d.openOnMount) && setTimeout(() => we(!0, d.openOnMount), 300);
1431
+ for (let t of e) z.value.get(t) || await we(t, !0);
1432
+ d.noOne && R.value.unshift(fe.value);
1433
+ }), P(() => ue.value, (e) => {
1434
+ for (let t of e) z.value.set(t[w.value], t);
1435
+ }), ne(() => {
1436
+ $(le.value), J.value && d.modelValue && !Se() && we(d.modelValue), (d.focusOnMount || d.openOnMount) && setTimeout(() => Me(!0, d.openOnMount), 300);
1433
1437
  });
1434
- function ge() {
1435
- if (d.options) return Q(d.modelValue, d.options)?.length;
1438
+ function Se() {
1439
+ if (d.options) return Ce(d.modelValue, d.options)?.length;
1436
1440
  }
1437
- function _e(e) {
1438
- d.sortOptions && (e = Pe(e, me.value)), B.value = JSON.parse(JSON.stringify(e)), le.value = JSON.parse(JSON.stringify(e)), a("update:options", e);
1441
+ function $(e) {
1442
+ 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
1443
  }
1440
- function Q(e, t) {
1444
+ function Ce(e, t) {
1441
1445
  let n = e?.toString()?.toLowerCase();
1442
1446
  return n ? t.filter((e) => {
1443
1447
  if (d.filterOptions.length) return d.filterOptions.some((t) => String(e[t]).toLowerCase().includes(n));
@@ -1446,11 +1450,11 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
1446
1450
  return t.includes(n) || r.includes(n);
1447
1451
  }) : t;
1448
1452
  }
1449
- async function $(e, t = !1) {
1453
+ async function we(e, t = !1) {
1450
1454
  if (!d.url) return;
1451
1455
  e && typeof e == "object" && (e = e.neq);
1452
- let { fields: n, include: r, limit: i } = d, a = me.value, o = se.value ?? (t || (/* @__PURE__ */ new RegExp(/^\d+$/)).test(e) ? w.value : F.value ?? S.value), s = {};
1453
- s = d.filterOptions.length ? d.filterOptions.reduce((t, n) => (t.or ||= [], t.or.push({ [n]: he(e) }), t), {}) : { [o]: he(e) };
1456
+ 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 = {};
1457
+ s = d.filterOptions.length ? d.filterOptions.reduce((t, n) => (t.or ||= [], t.or.push({ [n]: xe(e) }), t), {}) : { [o]: xe(e) };
1454
1458
  let c = d.noWhere ? {} : {
1455
1459
  ...e ? s : {},
1456
1460
  ...d.where
@@ -1461,245 +1465,242 @@ var Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
1461
1465
  include: r,
1462
1466
  limit: i
1463
1467
  };
1464
- n && (l.fields = n), a && (Z.store.order = a), K.value = !0, Z.resetPagination();
1468
+ n && (l.fields = n), a && (Q.store.order = a), q.value = !0, Q.resetPagination();
1465
1469
  let u;
1466
1470
  try {
1467
- u = (await Z.applyFilter({
1471
+ u = (await Q.applyFilter({
1468
1472
  filter: l,
1469
1473
  params: d.params ?? d.paramsBuilder?.(e)
1470
1474
  }, { updateRouter: !1 }))?.data;
1471
1475
  } finally {
1472
- K.value = !1;
1476
+ q.value = !1;
1473
1477
  }
1474
- return _e(u), u;
1478
+ return $(u), u;
1475
1479
  }
1476
- async function ve(e, t) {
1480
+ async function Te(e, t) {
1477
1481
  let n;
1478
- Te(e) && (e = null), !e && ue.value === e ? t() : (n = d.url && d.limit || !d.limit && Object.keys(B.value).length === 0 ? await $(e) : Q(e, le.value), t(() => {
1479
- d.noOne && U.toLowerCase().includes(e.toLowerCase()) && n.unshift(de.value), B.value = n;
1482
+ 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(() => {
1483
+ d.noOne && U.toLowerCase().includes(e.toLowerCase()) && n.unshift(fe.value), R.value = n;
1480
1484
  }, (t) => {
1481
1485
  e !== "" && t.options.length > 0 && (t.setOptionIndex(-1), t.moveOptionSelection(1, !0));
1482
- })), ue.value = e;
1486
+ })), H.value = e;
1483
1487
  }
1484
- function ye(e) {
1488
+ function Ee(e) {
1485
1489
  return e ?? !0;
1486
1490
  }
1487
- async function be({ to: e, direction: t, from: n, index: r }) {
1488
- let i = B.value.length - 1;
1489
- (n !== 0 || r !== 0) && (q.value || d.fetchRef) && t !== "decrease" && e === i && Z.store.hasMoreData && (await Z.loadMore(), _e(Z.store.data), H.value.scrollTo(i), await C());
1491
+ async function De({ to: e, direction: t, from: n, index: r }) {
1492
+ let i = R.value.length - 1;
1493
+ (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
1494
  }
1491
1495
  t({
1492
- opts: B,
1493
- vnSelectRef: H,
1494
- myOptionsMap: V
1496
+ opts: R,
1497
+ vnSelectRef: B,
1498
+ myOptionsMap: z
1495
1499
  });
1496
- function xe(e) {
1497
- if (ne.value !== !1) return e[ne.value] || e[w.value];
1500
+ function Oe(e) {
1501
+ if (re.value !== !1) return e[re.value] || e[w.value];
1498
1502
  }
1499
- function Se(e) {
1503
+ function ke(e) {
1500
1504
  Array.isArray(e) && (e = e[0]), e && typeof e == "object" && (e = e[w.value]);
1501
- let t = V.value.get(e);
1505
+ let t = z.value.get(e);
1502
1506
  return typeof S.value == "function" ? S.value(t ?? {}) : t?.[S.value] ?? e;
1503
1507
  }
1504
- function Ce(e) {
1505
- e?.code === "Enter" && (e.type === "keydown" && e.ctrlKey && Y.value ? e.stopPropagation() : e.type === "keyup" && !e.ctrlKey && (e.preventDefault(), e.stopPropagation()));
1508
+ function Ae(e) {
1509
+ e?.code === "Enter" && (e.type === "keydown" && e.ctrlKey && Z.value ? e.stopPropagation() : e.type === "keyup" && !e.ctrlKey && (e.preventDefault(), e.stopPropagation()));
1506
1510
  }
1507
- async function we(e, t) {
1508
- (G.value || e) && (G.value = !1, await C(), H.value?.focus(), !fe.value && t && H.value?.showPopup());
1511
+ async function Me(e, t) {
1512
+ (G.value || e) && (G.value = !1, await C(), B.value?.focus(), !ye.value && t && B.value?.showPopup());
1509
1513
  }
1510
- function Te(e) {
1511
- return Y.value && Array.isArray(e) && !e.length;
1514
+ function Ne(e) {
1515
+ return Z.value && Array.isArray(e) && !e.length;
1512
1516
  }
1513
- return (t, n) => {
1514
- let r = j("QTooltip"), i = j("QIcon"), l = j("QItemSection"), d = j("QItemLabel"), p = j("QCheckbox"), te = j("QItem"), ne = j("QChip"), O = j("VnSpinner"), N = j("QSelect");
1515
- return D(), m(N, ee({
1516
- ref_key: "vnSelectRef",
1517
- ref: H,
1518
- modelValue: J.value,
1519
- "onUpdate:modelValue": n[3] ||= (e) => J.value = e,
1520
- for: "vnSelectFor",
1521
- options: B.value,
1522
- "option-label": P(S),
1523
- "option-value": P(w)
1524
- }, {
1525
- ...P(o),
1526
- ...W.value,
1527
- hideSelected: G.value,
1528
- useInput: G.value || !J.value
1529
- }, {
1530
- onFilter: ve,
1531
- "emit-value": ye(P(o)["emit-value"]),
1532
- "map-options": ye(P(o)["map-options"]),
1533
- "no-option-prefetch": "",
1534
- "use-input": G.value || !J.value,
1535
- "fill-input": !1,
1536
- "lazy-rules": "",
1537
- class: [{ required: c.value }, "nowrap"],
1538
- rules: f,
1539
- "virtual-scroll-slice-size": "options.length",
1540
- "hide-bottom-space": "",
1541
- "input-debounce": q.value ? "300" : "0",
1542
- loading: K.value,
1543
- onVirtualScroll: be,
1544
- onPopupHide: n[4] ||= async () => {
1545
- fe.value = !1, K.value || await we();
1546
- },
1547
- onPopupShow: n[5] ||= async () => {
1548
- fe.value = !0, G.value = !0, await t.$nextTick(), H.value?.$el?.querySelector("input")?.focus();
1549
- },
1550
- onKeyup: ae(Ce, ["enter"]),
1551
- "data-cy": P(o).dataCy ?? P(o).label + "_select",
1552
- "data-url": e.url,
1553
- onBlur: n[6] ||= async () => {
1554
- G.value = !1, await C();
1555
- },
1556
- "onUpdate:modelValue": n[7] ||= async (e) => {
1557
- await we(), Te(e) && (J.value = null, a("remove"));
1517
+ return (t, n) => (E(), m(j(ge), ee({
1518
+ ref_key: "vnSelectRef",
1519
+ ref: B,
1520
+ modelValue: Y.value,
1521
+ "onUpdate:modelValue": n[3] ||= (e) => Y.value = e,
1522
+ for: "vnSelectFor",
1523
+ options: R.value,
1524
+ "option-label": j(S),
1525
+ "option-value": j(w)
1526
+ }, {
1527
+ ...j(o),
1528
+ ...pe.value,
1529
+ hideSelected: G.value,
1530
+ useInput: G.value || !Y.value
1531
+ }, {
1532
+ onFilter: Te,
1533
+ "emit-value": Ee(j(o)["emit-value"]),
1534
+ "map-options": Ee(j(o)["map-options"]),
1535
+ "no-option-prefetch": "",
1536
+ "use-input": G.value || !Y.value,
1537
+ "fill-input": !1,
1538
+ "lazy-rules": "",
1539
+ class: [{ required: c.value }, "nowrap"],
1540
+ rules: f,
1541
+ "virtual-scroll-slice-size": "options.length",
1542
+ "hide-bottom-space": "",
1543
+ "input-debounce": J.value ? "300" : "0",
1544
+ loading: q.value,
1545
+ onVirtualScroll: De,
1546
+ onPopupHide: n[4] ||= async () => {
1547
+ ye.value = !1, q.value || await Me();
1548
+ },
1549
+ onPopupShow: n[5] ||= async () => {
1550
+ ye.value = !0, G.value = !0, await t.$nextTick(), B.value?.$el?.querySelector("input")?.focus();
1551
+ },
1552
+ onKeyup: I(Ae, ["enter"]),
1553
+ "data-cy": j(o).dataCy ?? j(o).label + "_select",
1554
+ "data-url": e.url,
1555
+ onBlur: n[6] ||= async () => {
1556
+ G.value = !1, await C();
1557
+ },
1558
+ "onUpdate:modelValue": n[7] ||= async (e) => {
1559
+ await Me(), Ne(e) && (Y.value = null, a("remove"));
1560
+ },
1561
+ "is-required": !1,
1562
+ autocomplete: "off",
1563
+ multiple: Z.value,
1564
+ onKeydownCapture: Ae
1565
+ }), v({
1566
+ append: F(() => [oe(b(j(W), {
1567
+ name: "close",
1568
+ onClick: n[0] ||= () => {
1569
+ Y.value = null, a("remove");
1558
1570
  },
1559
- "is-required": !1,
1560
- autocomplete: "off",
1561
- multiple: Y.value,
1562
- onKeydownCapture: Ce
1563
- }), v({
1564
- append: L(() => [R(b(i, {
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
- })]),
1571
+ class: "cursor-pointer",
1572
+ size: "xs",
1573
+ "data-cy": j(o).dataCy ?? j(o).label + "_select_clear"
1574
+ }, {
1575
+ default: F(() => [b(j(X), null, {
1576
+ default: F(() => [y(k(j(s)("Remove")), 1)]),
1577
1577
  _: 1
1578
- }, 8, ["data-cy"]), [[ie, e.isClearable && J.value != null && J.value !== ""]])]),
1579
- option: L(({ itemProps: e, opt: t, selected: n, toggleOption: r }) => [b(te, T(x(e)), {
1580
- default: L(() => [typeof P(S) == "function" ? (D(), m(l, { key: 0 }, {
1581
- default: L(() => [y(M(P(S)(t)), 1)]),
1582
- _: 2
1583
- }, 1024)) : typeof t == "object" ? t[P(w)] == t[P(S)] ? (D(), m(l, { key: 2 }, {
1584
- default: L(() => [b(d, null, {
1585
- default: L(() => [y(M(t[P(S)]), 1)]),
1586
- _: 2
1587
- }, 1024)]),
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))]),
1578
+ })]),
1579
+ _: 1
1580
+ }, 8, ["data-cy"]), [[N, e.isClearable && Y.value != null && Y.value !== ""]])]),
1581
+ option: F(({ itemProps: e, opt: t, selected: n, toggleOption: r }) => [b(j(me), T(x(e)), {
1582
+ default: F(() => [typeof j(S) == "function" ? (E(), m(j(K), { key: 0 }, {
1583
+ default: F(() => [y(k(j(S)(t)), 1)]),
1584
+ _: 2
1585
+ }, 1024)) : typeof t == "object" ? t[j(w)] == t[j(S)] ? (E(), m(j(K), { key: 2 }, {
1586
+ default: F(() => [b(j(he), null, {
1587
+ default: F(() => [y(k(t[j(S)]), 1)]),
1600
1588
  _: 2
1601
- }, 1024)) : (D(), m(l, { key: 1 }, {
1602
- default: L(() => [y(M(t), 1)]),
1589
+ }, 1024)]),
1590
+ _: 2
1591
+ }, 1024)) : (E(), m(j(K), { key: 3 }, {
1592
+ default: F(() => [b(j(he), null, {
1593
+ default: F(() => [y(k(t[j(S)]), 1)]),
1603
1594
  _: 2
1604
- }, 1024)), Y.value ? (D(), m(l, {
1605
- key: 4,
1606
- side: ""
1595
+ }, 1024), Oe(t) === !1 ? h("", !0) : (E(), m(j(he), {
1596
+ key: 0,
1597
+ caption: ""
1607
1598
  }, {
1608
- default: L(() => [b(p, {
1609
- dense: "",
1610
- "model-value": n,
1611
- "onUpdate:modelValue": (e) => r(t)
1612
- }, null, 8, ["model-value", "onUpdate:modelValue"])]),
1599
+ default: F(() => [y(k(`#${Oe(t)}`), 1)]),
1613
1600
  _: 2
1614
- }, 1024)) : h("", !0)]),
1601
+ }, 1024))]),
1615
1602
  _: 2
1616
- }, 1040)]),
1617
- selected: L(() => [!Y.value && P(z) != null ? (D(), g("span", {
1618
- key: 0,
1619
- class: "nowrap",
1620
- title: Se(P(z)),
1621
- textContent: M(Se(P(z)))
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"
1603
+ }, 1024)) : (E(), m(j(K), { key: 1 }, {
1604
+ default: F(() => [y(k(t), 1)]),
1605
+ _: 2
1606
+ }, 1024)), Z.value ? (E(), m(j(K), {
1607
+ key: 4,
1608
+ side: ""
1643
1609
  }, {
1644
- default: L(() => [y(" +" + M(P(z).length - 1) + " ", 1), b(r, null, {
1645
- default: L(() => [(D(!0), g(u, null, k(P(z).slice(1), (e, t) => (D(), g("div", {
1646
- key: t,
1647
- textContent: M(Se(e))
1648
- }, null, 8, Ge))), 128))]),
1649
- _: 1
1650
- })]),
1610
+ default: F(() => [b(j(V), {
1611
+ dense: "",
1612
+ "model-value": n,
1613
+ "onUpdate:modelValue": (e) => r(t)
1614
+ }, null, 8, ["model-value", "onUpdate:modelValue"])]),
1615
+ _: 2
1616
+ }, 1024)) : h("", !0)]),
1617
+ _: 2
1618
+ }, 1040)]),
1619
+ selected: F(() => [!Z.value && j(L) != null ? (E(), g("span", {
1620
+ key: 0,
1621
+ class: "nowrap",
1622
+ title: ke(j(L)),
1623
+ textContent: k(ke(j(L)))
1624
+ }, null, 8, qe)) : j(L)?.length ? (E(), g("div", Je, [b(j(de), {
1625
+ removable: "",
1626
+ dense: "",
1627
+ class: "vn-chip",
1628
+ style: te({ maxWidth: j(L).length > 1 ? "100px" : "120px" }),
1629
+ onRemove: n[2] ||= () => {
1630
+ j(L).shift(), j(L).length || (Y.value = null), a("remove");
1631
+ },
1632
+ title: ke(j(L)[0]),
1633
+ "data-cy": "vn-select_chip"
1634
+ }, {
1635
+ default: F(() => [_("span", {
1636
+ class: "ellipsis",
1637
+ textContent: k(ke(j(L)[0]))
1638
+ }, null, 8, Ye)]),
1639
+ _: 1
1640
+ }, 8, ["style", "title"]), j(L).length > 1 ? (E(), m(j(de), {
1641
+ key: 0,
1642
+ dense: "",
1643
+ "data-cy": "vn-select_chip-counter",
1644
+ class: "vn-chip q-mx-none"
1645
+ }, {
1646
+ default: F(() => [y(" +" + k(j(L).length - 1) + " ", 1), b(j(X), null, {
1647
+ default: F(() => [(E(!0), g(u, null, ie(j(L).slice(1), (e, t) => (E(), g("div", {
1648
+ key: t,
1649
+ textContent: k(ke(e))
1650
+ }, null, 8, Xe))), 128))]),
1651
1651
  _: 1
1652
- })) : h("", !0)])) : h("", !0)]),
1653
- loading: L(() => [b(O, {
1654
- size: "xs",
1655
- "data-cy": "vnSelectSpinner"
1656
1652
  })]),
1657
- _: 2
1658
- }, [k(t.$slots, (o, c) => ({
1659
- name: c,
1660
- fn: L((o) => [c == "append" ? (D(), g("div", Ve, [R(b(i, {
1661
- name: "close",
1662
- onClick: n[1] ||= oe(() => {
1663
- J.value = null, a("remove");
1664
- }, ["stop"]),
1665
- class: "cursor-pointer",
1666
- size: "xs"
1667
- }, {
1668
- default: L(() => [b(r, null, {
1669
- default: L(() => [y(M(P(s)("Remove")), 1)]),
1670
- _: 1
1671
- })]),
1653
+ _: 1
1654
+ })) : h("", !0)])) : h("", !0)]),
1655
+ loading: F(() => [b(je, {
1656
+ size: "xs",
1657
+ "data-cy": "vnSelectSpinner"
1658
+ })]),
1659
+ _: 2
1660
+ }, [ie(t.$slots, (r, i) => ({
1661
+ name: i,
1662
+ fn: F((r) => [i == "append" ? (E(), g("div", Ke, [oe(b(j(W), {
1663
+ name: "close",
1664
+ onClick: n[1] ||= se(() => {
1665
+ Y.value = null, a("remove");
1666
+ }, ["stop"]),
1667
+ class: "cursor-pointer",
1668
+ size: "xs"
1669
+ }, {
1670
+ default: F(() => [b(j(X), null, {
1671
+ default: F(() => [y(k(j(s)("Remove")), 1)]),
1672
1672
  _: 1
1673
- }, 512), [[ie, e.isClearable && J.value != null && J.value !== ""]]), t.$slots.append ? A(t.$slots, "append", T(x(o ?? {})), void 0, !0, 0) : h("", !0)])) : A(t.$slots, c, ee(o ?? {}, { key: c }), void 0, !0, 1)])
1674
- }))]), 1040, [
1675
- "modelValue",
1676
- "options",
1677
- "option-label",
1678
- "option-value",
1679
- "emit-value",
1680
- "map-options",
1681
- "use-input",
1682
- "class",
1683
- "input-debounce",
1684
- "loading",
1685
- "data-cy",
1686
- "data-url",
1687
- "multiple"
1688
- ]);
1689
- };
1673
+ })]),
1674
+ _: 1
1675
+ }, 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)])
1676
+ }))]), 1040, [
1677
+ "modelValue",
1678
+ "options",
1679
+ "option-label",
1680
+ "option-value",
1681
+ "emit-value",
1682
+ "map-options",
1683
+ "use-input",
1684
+ "class",
1685
+ "input-debounce",
1686
+ "loading",
1687
+ "data-cy",
1688
+ "data-url",
1689
+ "multiple"
1690
+ ]));
1690
1691
  }
1691
1692
  };
1692
- typeof Be == "function" && Be(Ke);
1693
- var qe = /*#__PURE__*/ $(Ke, [["__scopeId", "data-v-e5953317"]]), Je = /* @__PURE__ */ e({
1694
- VnConfirm: () => xe,
1695
- VnDate: () => De,
1696
- VnFetch: () => Ne,
1697
- VnForm: () => ze,
1698
- VnInput: () => ke,
1699
- VnInputDate: () => Me,
1700
- VnSelect: () => qe,
1701
- VnSkeletonForm: () => Te,
1702
- VnSpinner: () => Ee
1693
+ typeof Ge == "function" && Ge(Ze);
1694
+ var Qe = /*#__PURE__*/ $(Ze, [["__scopeId", "data-v-f1cc83a8"]]), $e = /* @__PURE__ */ e({
1695
+ VnConfirm: () => Ee,
1696
+ VnDate: () => Me,
1697
+ VnFetch: () => Re,
1698
+ VnForm: () => We,
1699
+ VnInput: () => Pe,
1700
+ VnInputDate: () => Le,
1701
+ VnSelect: () => Qe,
1702
+ VnSkeletonForm: () => Ae,
1703
+ VnSpinner: () => je
1703
1704
  });
1704
1705
  //#endregion
1705
- export { Me as a, Ee as c, Ne as i, Te as l, qe as n, ke as o, ze as r, De as s, Je as t, xe as u };
1706
+ 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 };