@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.
@@ -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: {
@@ -1023,13 +1023,13 @@ var Le = {
1023
1023
  "submit"
1024
1024
  ],
1025
1025
  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(() => ({
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) => J(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: () => Q()
1040
+ click: () => J()
1041
1041
  },
1042
- ...N.defaultButtons
1043
- })), J = async (e) => {
1044
- await j.value.validate() && await Z(e);
1042
+ ...M.defaultButtons
1043
+ })), me = async (e) => {
1044
+ await A.value.validate() && await q(e);
1045
1045
  };
1046
- function Y() {
1047
- ue = N.formUrl ? JSON.parse(k?.query[N.formUrl] ?? "{}") : void 0;
1046
+ function he() {
1047
+ de = M.formUrl ? JSON.parse(ie?.query[M.formUrl] ?? "{}") : void 0;
1048
1048
  }
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);
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
- }), 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, {
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
- ...ue
1066
+ ...de
1067
1067
  });
1068
- }), he((e, t, n) => {
1069
- V.value && N.observeFormChanges ? v.dialog({
1070
- component: xe,
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
- }), ne(() => {
1078
- if (V.value) return y.set(F, U.value);
1079
- N.clearStoreOnUnmount && y.unset(F);
1077
+ }), re(() => {
1078
+ if (V.value) return y.set(N, H.value);
1079
+ M.clearStoreOnUnmount && y.unset(N);
1080
1080
  });
1081
- async function X() {
1081
+ async function K() {
1082
1082
  try {
1083
1083
  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 });
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(F, {}), e;
1086
+ throw y.set(N, {}), e;
1087
1087
  }
1088
1088
  }
1089
- async function Z() {
1090
- if (N.observeFormChanges && !V.value) return E("globals.noChanges", "negative");
1091
- ae.value = !0;
1089
+ async function q() {
1090
+ if (M.observeFormChanges && !V.value) return te("globals.noChanges", "negative");
1091
+ le.value = !0;
1092
1092
  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,
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: U.value,
1098
+ old: H.value,
1099
1099
  rawRes: r
1100
- }), N.reload && await R.fetch({});
1100
+ }), M.reload && await I.fetch({});
1101
1101
  } catch (e) {
1102
- throw re("onDataSaveFail", W.value), e;
1102
+ throw ae("onDataSaveFail", U.value), e;
1103
1103
  } finally {
1104
- ae.value = !1;
1104
+ le.value = !1;
1105
1105
  }
1106
1106
  }
1107
- async function fe() {
1108
- await Z(!0), f({ path: N.goTo });
1107
+ async function ge() {
1108
+ await q(!0), f({ path: M.goTo });
1109
1109
  }
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);
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 $(e, t, n) {
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 ve(e, { val: t, res: n, old: r, rawRes: i } = {
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(F, t), N.url || (R.store.data = t), re(e, y.get(F), n, r, W, i), K.value && a(K.value);
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 ye(e) {
1130
- if (!N.defaultTrim) return e;
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 be(e) {
1135
- if (e.key === "Enter" && !N.preventSubmit && V.value) {
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 j.value.submit(e);
1142
+ await A.value.submit(e);
1143
1143
  }
1144
1144
  }
1145
1145
  return n({
1146
- submitForm: J,
1147
- myForm: j,
1148
- save: Z,
1149
- isLoading: ae,
1146
+ submitForm: me,
1147
+ myForm: A,
1148
+ save: q,
1149
+ isLoading: le,
1150
1150
  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"),
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: L(() => [b(P(Ee), { size: "md" })]),
1160
+ default: F(() => [b(j(je), { size: "md" })]),
1161
1161
  _: 1
1162
- }, 8, ["showing", "label"]), W.value ? (D(), m(P(de), ee({
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: j,
1168
- onSubmit: oe(Z, ["prevent"]),
1169
- onKeyup: oe(be, ["prevent"]),
1170
- onReset: Q,
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: L(() => [b(P(le), { class: "q-pa-none" }, {
1178
- default: L(() => [e.showTitle ? (D(), m(P(H), {
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: L(() => [_("span", {
1182
+ default: F(() => [_("span", {
1183
1183
  class: "text-h6",
1184
- textContent: M(e.title || t.$t("globals.pageTitles.basicData"))
1185
- }, null, 8, Re)]),
1184
+ textContent: k(e.title || t.$t("globals.pageTitles.basicData"))
1185
+ }, null, 8, Ue)]),
1186
1186
  _: 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 }))]),
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)]), N.defaultActions && P(x)?.isSubToolbarShown() && ie.value ? (D(), m(d, {
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(P(B), {
1199
+ }, [b(j(R), {
1200
1200
  push: "",
1201
1201
  class: "q-gutter-x-sm"
1202
1202
  }, {
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,
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: q.value.reset.click,
1210
+ onClick: G.value.reset.click,
1211
1211
  disable: !V.value,
1212
- title: P(S)(q.value.reset.label),
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(P(z), {
1222
+ b(j(L), {
1223
1223
  "data-cy": "saveDefaultBtn",
1224
- label: P(r)("globals.save"),
1224
+ label: j(r)("globals.save"),
1225
1225
  color: "primary",
1226
1226
  icon: "save",
1227
- onClick: q.value.save.click,
1227
+ onClick: G.value.save.click,
1228
1228
  disable: !V.value,
1229
- title: P(S)(q.value.save.label),
1230
- flat: !!N.goTo
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
- N.goTo ? (D(), m(P(z), {
1238
+ M.goTo ? (E(), m(j(L), {
1239
1239
  key: 0,
1240
1240
  "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()),
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 Be(e) {
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 Ve = { key: 0 }, He = ["title", "textContent"], Ue = {
1275
+ var Ke = { key: 0 }, qe = ["title", "textContent"], Je = {
1276
1276
  key: 1,
1277
1277
  class: "no-wrap chip-scroll"
1278
- }, We = ["textContent"], Ge = ["textContent"], Ke = {
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 = 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({
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
- }), W = p(() => d.isOutlined ? {
1404
+ }), pe = p(() => d.isOutlined ? {
1405
1405
  dense: !0,
1406
1406
  outlined: !0,
1407
1407
  rounded: !0
1408
- } : {}), G = O(!1), K = O(!1), q = p(() => d.url), J = p({
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
- _e(le.value), a("update:modelValue", e);
1413
+ $(ue.value), a("update:modelValue", e);
1414
1414
  }
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, {
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
- }), fe = O(!1), me = p(() => d.sortBy ? d.sortBy : typeof d.optionLabel == "string" ? d.optionLabel + " ASC" : "");
1420
- function he(e) {
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
- I(ce, (e) => {
1424
- _e(e);
1425
- }), I(z, async (e) => {
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) 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);
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 ge() {
1435
- if (d.options) return Q(d.modelValue, d.options)?.length;
1434
+ function Se() {
1435
+ if (d.options) return Ce(d.modelValue, d.options)?.length;
1436
1436
  }
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);
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 Q(e, t) {
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 $(e, t = !1) {
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 = 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) };
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 && (Z.store.order = a), K.value = !0, Z.resetPagination();
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 Z.applyFilter({
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
- K.value = !1;
1472
+ q.value = !1;
1473
1473
  }
1474
- return _e(u), u;
1474
+ return $(u), u;
1475
1475
  }
1476
- async function ve(e, t) {
1476
+ async function Te(e, t) {
1477
1477
  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;
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
- })), ue.value = e;
1482
+ })), H.value = e;
1483
1483
  }
1484
- function ye(e) {
1484
+ function Ee(e) {
1485
1485
  return e ?? !0;
1486
1486
  }
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());
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: B,
1493
- vnSelectRef: H,
1494
- myOptionsMap: V
1492
+ opts: R,
1493
+ vnSelectRef: B,
1494
+ myOptionsMap: z
1495
1495
  });
1496
- function xe(e) {
1497
- if (ne.value !== !1) return e[ne.value] || e[w.value];
1496
+ function Oe(e) {
1497
+ if (re.value !== !1) return e[re.value] || e[w.value];
1498
1498
  }
1499
- function Se(e) {
1499
+ function ke(e) {
1500
1500
  Array.isArray(e) && (e = e[0]), e && typeof e == "object" && (e = e[w.value]);
1501
- let t = V.value.get(e);
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 Ce(e) {
1505
- e?.code === "Enter" && (e.type === "keydown" && e.ctrlKey && Y.value ? e.stopPropagation() : e.type === "keyup" && !e.ctrlKey && (e.preventDefault(), e.stopPropagation()));
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 we(e, t) {
1508
- (G.value || e) && (G.value = !1, await C(), H.value?.focus(), !fe.value && t && H.value?.showPopup());
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 Te(e) {
1511
- return Y.value && Array.isArray(e) && !e.length;
1510
+ function Ne(e) {
1511
+ return Z.value && Array.isArray(e) && !e.length;
1512
1512
  }
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"));
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
- "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
- })]),
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
- }, 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))]),
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)) : (D(), m(l, { key: 1 }, {
1602
- default: L(() => [y(M(t), 1)]),
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)), Y.value ? (D(), m(l, {
1605
- key: 4,
1606
- side: ""
1591
+ }, 1024), Oe(t) === !1 ? h("", !0) : (E(), m(j(he), {
1592
+ key: 0,
1593
+ caption: ""
1607
1594
  }, {
1608
- default: L(() => [b(p, {
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)) : h("", !0)]),
1597
+ }, 1024))]),
1615
1598
  _: 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"
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: 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
- })]),
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
- _: 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
- })]),
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
- }, 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
- };
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 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
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 { 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 };
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 };