@signal24/vue-foundation 4.27.1 → 4.28.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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as N, ref as S, computed as T, watch as O, onMounted as B, createElementBlock as k, withDirectives as ie, openBlock as b, createElementVNode as A, toDisplayString as R, createCommentVNode as H, Fragment as le, renderList as re, vModelSelect as Ht, getCurrentInstance as Ee, withModifiers as be, normalizeStyle as Vt, normalizeClass as V, renderSlot as W, reactive as At, h as ae, Teleport as $t, markRaw as Bt, onBeforeUnmount as ue, resolveDirective as _t, createBlock as Ge, createSlots as Nt, withCtx as he, createTextVNode as X, vModelText as Rt, onActivated as Je, onDeactivated as Qe } from "vue";
2
- import { compact as et, cloneDeep as Wt, uniq as jt, groupBy as Ut, debounce as Pt, isEqual as tt, startCase as qt, upperFirst as zt, remove as Kt, last as Yt } from "lodash";
1
+ import { defineComponent as N, ref as S, computed as T, watch as O, onMounted as B, createElementBlock as k, withDirectives as ie, openBlock as b, createElementVNode as A, toDisplayString as R, createCommentVNode as V, Fragment as le, renderList as re, vModelSelect as Vt, getCurrentInstance as be, withModifiers as ke, normalizeStyle as Ht, normalizeClass as H, renderSlot as W, reactive as At, h as ae, Teleport as $t, markRaw as Bt, onBeforeUnmount as ue, resolveDirective as _t, createBlock as Je, createSlots as Nt, withCtx as he, createTextVNode as X, vModelText as Rt, onActivated as Qe, onDeactivated as et } from "vue";
2
+ import { compact as tt, cloneDeep as Wt, uniq as jt, groupBy as Ut, isEqual as we, debounce as Pt, startCase as qt, upperFirst as zt, remove as Kt, last as Yt } from "lodash";
3
3
  import { configureOpenApiClient as Xt, OpenApiError as Zt } from "@signal24/openapi-client-codegen/browser";
4
4
  import { escapeHtml as Gt } from "@vue/shared";
5
5
  import { escapeHtml as ps } from "@vue/shared";
@@ -37,13 +37,13 @@ const en = {
37
37
  key: 1,
38
38
  "onUpdate:modelValue": d[0] || (d[0] = (E) => u.value = E)
39
39
  }, [
40
- n.nullText ? (b(), k("option", tn, R(n.nullText), 1)) : H("", !0),
40
+ n.nullText ? (b(), k("option", tn, R(n.nullText), 1)) : V("", !0),
41
41
  (b(!0), k(le, null, re(s.value, (E, h) => (b(), k("option", {
42
42
  key: h,
43
43
  value: l.value?.[h]
44
44
  }, R(E), 9, nn))), 128))
45
45
  ], 512)), [
46
- [Ht, u.value]
46
+ [Vt, u.value]
47
47
  ]) : (b(), k("select", en, [
48
48
  A("option", null, R(n.loadingText || "Loading..."), 1)
49
49
  ]));
@@ -55,7 +55,7 @@ const en = {
55
55
  anchor: {}
56
56
  },
57
57
  setup(e) {
58
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = S({ visibility: "hidden", top: "0", left: "0" }), l = S([]), s = Ee();
58
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, o = S({ visibility: "hidden", top: "0", left: "0" }), l = S([]), s = be();
59
59
  B(u);
60
60
  function u() {
61
61
  if (!s) return;
@@ -97,9 +97,9 @@ const en = {
97
97
  window.addEventListener("click", c);
98
98
  }, 10);
99
99
  }), (d, E) => (b(), k("div", {
100
- class: V(["vf-overlay-anchor", l.value]),
101
- style: Vt(o.value),
102
- onClick: be(c, ["stop"])
100
+ class: H(["vf-overlay-anchor", l.value]),
101
+ style: Ht(o.value),
102
+ onClick: ke(c, ["stop"])
103
103
  }, [
104
104
  W(d.$slots, "default")
105
105
  ], 6));
@@ -146,7 +146,7 @@ function Q(e) {
146
146
  const t = _.indexOf(e);
147
147
  t >= 0 && _.splice(t, 1);
148
148
  }
149
- async function ke(e, t, n) {
149
+ async function Te(e, t, n) {
150
150
  return new Promise((o) => {
151
151
  let l = null;
152
152
  const u = { ...t, callback: async (r) => {
@@ -172,18 +172,18 @@ function te(e, t) {
172
172
  } : { title: t ? e : void 0, message: t ?? e, classes: [] };
173
173
  }
174
174
  async function un(e, t) {
175
- await ke(ne, te(e, t));
175
+ await Te(ne, te(e, t));
176
176
  }
177
177
  async function Wo(e, t) {
178
178
  const n = te(e, t);
179
- return await ke(ne, {
179
+ return await Te(ne, {
180
180
  ...n,
181
181
  shouldConfirm: !0
182
182
  }) === !0;
183
183
  }
184
184
  async function jo(e, t) {
185
185
  const n = te(e, t);
186
- return await ke(ne, {
186
+ return await Te(ne, {
187
187
  ...n,
188
188
  shouldConfirm: !0,
189
189
  classes: ["destructive", ...n.classes]
@@ -232,18 +232,18 @@ class de extends Error {
232
232
  function cn(e) {
233
233
  return e instanceof de ? e.message : `An application error has occurred:
234
234
 
235
- ${Te(e).message}
235
+ ${Se(e).message}
236
236
 
237
237
  Please refresh the page and try again. If this error persists, ${F.unhandledErrorSupportText}.`;
238
238
  }
239
- function Te(e) {
239
+ function Se(e) {
240
240
  return dn(e) ? e : new Error(String(e));
241
241
  }
242
242
  function dn(e) {
243
243
  return e instanceof Error || typeof e == "object" && e !== null && "message" in e && "name" in e;
244
244
  }
245
245
  async function zo(e, t) {
246
- const n = Te(e);
246
+ const n = Se(e);
247
247
  return n instanceof de || F.errorHandler(n), un({
248
248
  title: t?.title,
249
249
  message: n,
@@ -251,7 +251,7 @@ async function zo(e, t) {
251
251
  });
252
252
  }
253
253
  async function Ko(e) {
254
- const t = Te(e);
254
+ const t = Se(e);
255
255
  t instanceof de || F.errorHandler(t);
256
256
  }
257
257
  const Z = Symbol("MaskState");
@@ -273,7 +273,7 @@ function fn(e, t) {
273
273
  function ot(e) {
274
274
  e[Z] && e.removeChild(e[Z].maskEl);
275
275
  }
276
- const we = Symbol("FormMaskState");
276
+ const Ee = Symbol("FormMaskState");
277
277
  function pn(e, t, n) {
278
278
  const o = e instanceof Element ? e : it(e);
279
279
  if (!o) return () => {
@@ -283,7 +283,7 @@ function pn(e, t, n) {
283
283
  let s;
284
284
  l && (s = l.tagName === "INPUT" ? l.value : l.innerHTML, l.setAttribute("disabled", "disabled"), l.innerText = n ?? "Please wait...");
285
285
  const r = [...o.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
286
- return r.forEach((c) => c.setAttribute("disabled", "disabled")), o[we] = {
286
+ return r.forEach((c) => c.setAttribute("disabled", "disabled")), o[Ee] = {
287
287
  disabledElements: r,
288
288
  waitButton: l,
289
289
  buttonHtml: s
@@ -292,8 +292,8 @@ function pn(e, t, n) {
292
292
  function st(e) {
293
293
  const t = e instanceof Element ? e : it(e);
294
294
  if (!t) return;
295
- const n = t[we];
296
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[we]);
295
+ const n = t[Ee];
296
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((o) => o.removeAttribute("disabled")), n.waitButton && (n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled")), delete t[Ee]);
297
297
  }
298
298
  function it(e) {
299
299
  const t = e?.$?.vnode.el;
@@ -316,9 +316,9 @@ const vn = ["id"], mn = {
316
316
  },
317
317
  emits: ["formSubmit"],
318
318
  setup(e, { expose: t }) {
319
- const n = Ee(), o = e;
319
+ const n = be(), o = e;
320
320
  t({ mask: h, unmask: g, hide: a, unhide: f });
321
- const l = S(), s = S(), u = S(!1), r = T(() => et([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
321
+ const l = S(), s = S(), u = S(!1), r = T(() => tt([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
322
322
  B(() => {
323
323
  document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", d), l.value?.addEventListener("click", c));
324
324
  }), ue(() => {
@@ -352,14 +352,14 @@ const vn = ["id"], mn = {
352
352
  id: m.id,
353
353
  ref_key: "overlay",
354
354
  ref: l,
355
- class: V(["vf-overlay vf-modal-wrap", r.value])
355
+ class: H(["vf-overlay vf-modal-wrap", r.value])
356
356
  }, [
357
357
  A("form", {
358
358
  ref_key: "form",
359
359
  ref: s,
360
360
  action: ".",
361
- class: V(["vf-modal", { scrolls: m.scrolls }]),
362
- onSubmit: C[0] || (C[0] = be((x) => m.$emit("formSubmit"), ["prevent"]))
361
+ class: H(["vf-modal", { scrolls: m.scrolls }]),
362
+ onSubmit: C[0] || (C[0] = ke((x) => m.$emit("formSubmit"), ["prevent"]))
363
363
  }, [
364
364
  m.$slots.header ? (b(), k("div", mn, [
365
365
  W(m.$slots, "header"),
@@ -367,14 +367,14 @@ const vn = ["id"], mn = {
367
367
  key: 0,
368
368
  class: "close",
369
369
  onClick: E
370
- })) : H("", !0)
371
- ])) : H("", !0),
370
+ })) : V("", !0)
371
+ ])) : V("", !0),
372
372
  A("div", hn, [
373
373
  W(m.$slots, "default")
374
374
  ]),
375
375
  m.$slots.footer ? (b(), k("div", yn, [
376
376
  W(m.$slots, "footer")
377
- ])) : H("", !0)
377
+ ])) : V("", !0)
378
378
  ], 34)
379
379
  ], 10, vn));
380
380
  }
@@ -394,14 +394,14 @@ const vn = ["id"], mn = {
394
394
  const t = e, n = T(() => t.message instanceof Error ? cn(t.message) : t.message);
395
395
  return (o, l) => {
396
396
  const s = _t("autofocus");
397
- return b(), Ge(gn, {
398
- class: V(["vf-alert", ...o.classes ?? []])
397
+ return b(), Je(gn, {
398
+ class: H(["vf-alert", ...o.classes ?? []])
399
399
  }, Nt({
400
400
  default: he(() => [
401
401
  o.iconClass ? (b(), k("i", {
402
402
  key: 0,
403
- class: V(["vf-alert-icon", o.iconClass])
404
- }, null, 2)) : H("", !0),
403
+ class: H(["vf-alert-icon", o.iconClass])
404
+ }, null, 2)) : V("", !0),
405
405
  o.isHtml ? (b(), k("div", {
406
406
  key: 1,
407
407
  innerHtml: o.message,
@@ -502,7 +502,7 @@ function es(e, t) {
502
502
  n[o] === "" && (n[o] = null);
503
503
  return n;
504
504
  }
505
- function Re(e) {
505
+ function We(e) {
506
506
  return e != null;
507
507
  }
508
508
  function ts(e, t) {
@@ -534,7 +534,7 @@ var Tn = {
534
534
  fromCents: !1
535
535
  }, lt = function(t) {
536
536
  return Math.round(t);
537
- }, Se = function(t) {
537
+ }, Ce = function(t) {
538
538
  return Math.pow(10, t);
539
539
  }, Sn = function(t, n) {
540
540
  return lt(t / n) * n;
@@ -543,11 +543,11 @@ function D(e, t) {
543
543
  var n = this;
544
544
  if (!(n instanceof D))
545
545
  return new D(e, t);
546
- var o = Object.assign({}, Tn, t), l = Se(o.precision), s = se(e, o);
546
+ var o = Object.assign({}, Tn, t), l = Ce(o.precision), s = se(e, o);
547
547
  n.intValue = s, n.value = s / l, o.increment = o.increment || 1 / l, o.useVedic ? o.groups = xn : o.groups = Cn, this.s = o, this.p = l;
548
548
  }
549
549
  function se(e, t) {
550
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, l = t.decimal, s = t.errorOnInvalid, u = t.precision, r = t.fromCents, c = Se(u), d = typeof e == "number", E = e instanceof D;
550
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = 0, l = t.decimal, s = t.errorOnInvalid, u = t.precision, r = t.fromCents, c = Ce(u), d = typeof e == "number", E = e instanceof D;
551
551
  if (E && r)
552
552
  return e.intValue;
553
553
  if (d || E)
@@ -592,7 +592,7 @@ D.prototype = {
592
592
  */
593
593
  multiply: function(t) {
594
594
  var n = this.intValue, o = this.s;
595
- return D((n *= t) / (o.fromCents ? 1 : Se(o.precision)), o);
595
+ return D((n *= t) / (o.fromCents ? 1 : Ce(o.precision)), o);
596
596
  },
597
597
  /**
598
598
  * Divides value.
@@ -672,10 +672,10 @@ function In() {
672
672
  }
673
673
  return ye(Fn);
674
674
  }
675
- const On = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), We = { randomUUID: On };
675
+ const On = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: On };
676
676
  function Dn(e, t, n) {
677
- if (We.randomUUID && !e)
678
- return We.randomUUID();
677
+ if (je.randomUUID && !e)
678
+ return je.randomUUID();
679
679
  e = e || {};
680
680
  const o = e.random ?? e.rng?.() ?? In();
681
681
  if (o.length < 16)
@@ -685,10 +685,10 @@ function Dn(e, t, n) {
685
685
  function ns(e) {
686
686
  return e.replace(/\n/g, "<br>");
687
687
  }
688
- function Hn(e) {
688
+ function Vn(e) {
689
689
  return e.replace(/_/g, " ");
690
690
  }
691
- function Vn(e) {
691
+ function Hn(e) {
692
692
  const t = e.replace(/\D/g, "").replace(/^1/, "");
693
693
  return t.length !== 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
694
694
  }
@@ -748,11 +748,11 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
748
748
  t({
749
749
  addRemoteOption: Dt
750
750
  });
751
- const r = S(), c = S(), d = S(), E = S(!1), h = S(), g = S(!1), a = S(""), f = S(null), m = S(null), C = S(!1), x = S(null), $ = S(!1), mt = T(() => s.showCreateTextOnNewItem ?? !0), P = T(() => !!(s.options || h.value)), ht = T(() => s.options ?? h.value ?? []), yt = T(() => s.prependOptions ?? []), gt = T(() => s.appendOptions ?? []), Me = T(() => !!s.disabled || !P.value && !s.loadOptions), z = T(() => s.loadingText || "..."), wt = T(() => !P.value && (!s.loadOptions || s.preload || s.modelValue && (s.valueField || s.valueExtractor)) ? z.value : s.nullTitle ? s.nullTitle : s.placeholder || ""), Et = T(() => s.noResultsText || "No options match your search."), q = T(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (i) => i[s.valueField] : null), fe = T(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (i) => String(i[s.keyField]) : q.value ? (i) => String(q.value(i)) : null), bt = T(() => s.groupFormatter ? s.groupFormatter : s.groupField ? (i) => String(i[s.groupField]) : null), Le = T(() => s.formatter ? s.formatter : s.labelField ? (i) => String(i[s.labelField]) : (i) => String(i)), Fe = T(() => s.selectionFormatter ? s.selectionFormatter : Le.value), Ie = T(() => [...yt.value, ...ht.value, ...gt.value]), Oe = T(() => !!(s.groupField || s.groupFormatter)), pe = T(() => Ie.value.map((i, w) => {
752
- const v = bt.value?.(i), p = Le.value(i), y = s.subtitleFormatter?.(i), I = p ? p.trim().toLowerCase() : "", _e = y ? y.trim().toLowerCase() : "", oe = [];
753
- return s.searchFields ? s.searchFields.forEach((Ne) => {
754
- i[Ne] && oe.push(String(i[Ne]).toLowerCase());
755
- }) : (oe.push(I), _e && oe.push(_e)), {
751
+ const r = S(), c = S(), d = S(), E = S(!1), h = S(), g = S(!1), a = S(""), f = S(null), m = S(null), C = S(!1), x = S(null), $ = S(!1), mt = T(() => s.showCreateTextOnNewItem ?? !0), P = T(() => !!(s.options || h.value)), ht = T(() => s.options ?? h.value ?? []), yt = T(() => s.prependOptions ?? []), gt = T(() => s.appendOptions ?? []), Le = T(() => !!s.disabled || !P.value && !s.loadOptions), z = T(() => s.loadingText || "..."), wt = T(() => !P.value && (!s.loadOptions || s.preload || s.modelValue && (s.valueField || s.valueExtractor)) ? z.value : s.nullTitle ? s.nullTitle : s.placeholder || ""), Et = T(() => s.noResultsText || "No options match your search."), q = T(() => s.valueExtractor ? s.valueExtractor : s.valueField ? (i) => i[s.valueField] : null), fe = T(() => s.keyExtractor ? s.keyExtractor : s.keyField ? (i) => String(i[s.keyField]) : q.value ? (i) => String(q.value(i)) : null), bt = T(() => s.groupFormatter ? s.groupFormatter : s.groupField ? (i) => String(i[s.groupField]) : null), Fe = T(() => s.formatter ? s.formatter : s.labelField ? (i) => String(i[s.labelField]) : (i) => String(i)), Ie = T(() => s.selectionFormatter ? s.selectionFormatter : Fe.value), Oe = T(() => [...yt.value, ...ht.value, ...gt.value]), De = T(() => !!(s.groupField || s.groupFormatter)), pe = T(() => Oe.value.map((i, w) => {
752
+ const v = bt.value?.(i), p = Fe.value(i), y = s.subtitleFormatter?.(i), I = p ? p.trim().toLowerCase() : "", Ne = y ? y.trim().toLowerCase() : "", oe = [];
753
+ return s.searchFields ? s.searchFields.forEach((Re) => {
754
+ i[Re] && oe.push(String(i[Re]).toLowerCase());
755
+ }) : (oe.push(I), Ne && oe.push(Ne)), {
756
756
  key: fe.value?.(i) ?? String(w),
757
757
  group: v,
758
758
  title: p,
@@ -782,7 +782,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
782
782
  });
783
783
  return i;
784
784
  }), kt = T(() => {
785
- if (!Oe.value)
785
+ if (!De.value)
786
786
  return [
787
787
  {
788
788
  groupTitle: "",
@@ -796,7 +796,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
796
796
  }));
797
797
  });
798
798
  O(() => s.modelValue, me), O(pe, () => {
799
- C.value && setTimeout(Ae, 0);
799
+ C.value && setTimeout($e, 0);
800
800
  }), O(a, () => {
801
801
  g.value && !s.remoteSearch && !a.value.trim().length && (g.value = !1);
802
802
  }), O(C, () => {
@@ -804,28 +804,26 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
804
804
  }), O(L, () => {
805
805
  s.modelValue !== null && f.value === null && me(), (x.value !== null || g.value) && !L.value.find((i) => i.key == x.value) && (x.value = L.value[0]?.key ?? o);
806
806
  }), B(async () => {
807
- $.value = s.onCreateItem !== void 0, s.loadOptions && s.preload && (a.value = z.value, await De(), a.value = ""), !s.options && !s.loadOptions && (s.valueField || s.valueExtractor) ? a.value = z.value : me(), O(f, () => {
808
- f.value !== s.modelValue && u(
809
- "update:modelValue",
810
- Re(f.value) && q.value !== null ? q.value(f.value) : f.value
811
- );
807
+ $.value = s.onCreateItem !== void 0, s.loadOptions && s.preload && (a.value = z.value, await Ve(), a.value = ""), !s.options && !s.loadOptions && (s.valueField || s.valueExtractor) ? a.value = z.value : me(), O(f, () => {
808
+ const i = We(f.value) && q.value !== null ? q.value(f.value) : f.value;
809
+ we(s.modelValue, i) || u("update:modelValue", i);
812
810
  }), s.remoteSearch && O(a, Pt(Tt, 250));
813
811
  }), ue(() => {
814
812
  d.value?.remove();
815
813
  });
816
- async function De() {
814
+ async function Ve() {
817
815
  await He(), h.value && u("optionsLoaded", h.value);
818
816
  }
819
817
  async function He() {
820
818
  const i = s.remoteSearch && g.value && a.value.length ? a.value : null;
821
- E.value = !0, h.value = await s.loadOptions?.(i) ?? [], E.value = !1, Ve();
819
+ E.value = !0, h.value = await s.loadOptions?.(i) ?? [], E.value = !1, Ae();
822
820
  }
823
821
  function Tt() {
824
822
  g.value && (He(), g.value = a.value.trim().length > 0);
825
823
  }
826
824
  function St(i) {
827
825
  if (i.key == "Escape") {
828
- i.stopPropagation(), i.target.blur(), Be();
826
+ i.stopPropagation(), i.target.blur(), _e();
829
827
  return;
830
828
  }
831
829
  if (!(i.key == "ArrowLeft" || i.key == "ArrowRight") && i.key != "Tab") {
@@ -842,7 +840,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
842
840
  if (i.key == "Enter") {
843
841
  i.preventDefault();
844
842
  const w = L.value.find((v) => v.key == x.value);
845
- if (w) return $e(w);
843
+ if (w) return Be(w);
846
844
  }
847
845
  if (i.key === "Delete" || i.key === "Backspace") {
848
846
  a.value.length > 1 && (g.value = !0);
@@ -852,9 +850,9 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
852
850
  }
853
851
  }
854
852
  function Ct() {
855
- Ve(), C.value = !0, setTimeout(() => c.value?.select(), 0);
853
+ Ae(), C.value = !0, setTimeout(() => c.value?.select(), 0);
856
854
  }
857
- function Ve(i) {
855
+ function Ae(i) {
858
856
  f.value ? x.value = xt(f.value) : s.nullTitle && (x.value = o);
859
857
  }
860
858
  function xt(i) {
@@ -864,14 +862,14 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
864
862
  const w = L.value.find((y) => y.ref === i);
865
863
  if (w)
866
864
  return w;
867
- const v = s.keyExtractor ? (y, I) => s.keyExtractor(y) === s.keyExtractor(I) : tt, p = L.value.find((y) => v(y.ref, i));
865
+ const v = s.keyExtractor ? (y, I) => s.keyExtractor(y) === s.keyExtractor(I) : we, p = L.value.find((y) => v(y.ref, i));
868
866
  return p || null;
869
867
  }
870
868
  function Lt() {
871
869
  s.debug || (!a.value.length && s.nullTitle && (f.value = null, m.value = null), C.value = !1);
872
870
  }
873
871
  function Ft() {
874
- P.value || De(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), It();
872
+ P.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), It();
875
873
  }
876
874
  function It() {
877
875
  const i = r.value.getBoundingClientRect(), w = i.y + i.height + 2, v = i.x, p = d.value, y = window.getComputedStyle(r.value);
@@ -881,9 +879,9 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
881
879
  const I = window.innerHeight - w - 12;
882
880
  p.style.maxHeight = I + "px";
883
881
  }
884
- p.style.visibility = "visible", document.body.appendChild(p), setTimeout(Ae, 0);
882
+ p.style.visibility = "visible", document.body.appendChild(p), setTimeout($e, 0);
885
883
  }
886
- function Ae() {
884
+ function $e() {
887
885
  if (!P.value || !x.value) return;
888
886
  const i = L.value.findIndex((p) => p.key == x.value), w = d.value, v = w?.querySelectorAll(".option")[i];
889
887
  v && (w.scrollTop = v.offsetTop);
@@ -899,7 +897,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
899
897
  const p = d.value, y = p?.querySelectorAll(".option")[v];
900
898
  y && (y.offsetTop < p.scrollTop ? p.scrollTop = y.offsetTop : y.offsetTop + y.offsetHeight > p.scrollTop + p.clientHeight && (p.scrollTop = y.offsetTop + y.offsetHeight - p.clientHeight));
901
899
  }
902
- function $e(i) {
900
+ function Be(i) {
903
901
  if (g.value = !1, i.key === o)
904
902
  a.value = "", f.value = null, m.value = null;
905
903
  else if (i.key === l) {
@@ -907,17 +905,17 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
907
905
  a.value = "", f.value = null, m.value = null, s.onCreateItem?.(w);
908
906
  } else {
909
907
  const v = pe.value.find((p) => p.key == i.key).ref;
910
- f.value = v, m.value = Fe.value(v), a.value = m.value ?? "";
908
+ f.value = v, m.value = Ie.value(v), a.value = m.value ?? "";
911
909
  }
912
- c.value?.blur(), Be();
910
+ c.value?.blur(), _e();
913
911
  }
914
912
  function me() {
915
- s.modelValue !== null ? (f.value = q.value ? Ie.value.find((i) => s.modelValue === q.value(i)) : s.modelValue, m.value = Re(f.value) ? Fe.value(f.value) : null, a.value = m.value ?? "") : (f.value = null, m.value = null, a.value = "");
913
+ s.modelValue !== null ? (f.value = q.value ? Oe.value.find((i) => s.modelValue === q.value(i)) : s.modelValue, m.value = We(f.value) ? Ie.value(f.value) : null, a.value = m.value ?? "") : (f.value = null, m.value = null, a.value = "");
916
914
  }
917
915
  function Dt(i) {
918
916
  h.value.unshift(i);
919
917
  }
920
- function Be() {
918
+ function _e() {
921
919
  if (!s.autoNext) return;
922
920
  let i = r.value?.parentElement;
923
921
  for (; i && i.tagName !== "FORM" && i.tagName !== "BODY"; )
@@ -931,15 +929,15 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
931
929
  return (i, w) => (b(), k("div", {
932
930
  ref_key: "el",
933
931
  ref: r,
934
- class: V(["vf-smart-select", { disabled: Me.value, open: C.value }])
932
+ class: H(["vf-smart-select", { disabled: Le.value, open: C.value }])
935
933
  }, [
936
934
  ie(A("input", {
937
935
  ref_key: "searchField",
938
936
  ref: c,
939
937
  "onUpdate:modelValue": w[0] || (w[0] = (v) => a.value = v),
940
938
  type: "text",
941
- disabled: Me.value,
942
- class: V({ nullable: !!i.nullTitle }),
939
+ disabled: Le.value,
940
+ class: H({ nullable: !!i.nullTitle }),
943
941
  placeholder: wt.value,
944
942
  required: i.required,
945
943
  name: i.name,
@@ -954,7 +952,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
954
952
  key: 0,
955
953
  ref_key: "optionsContainer",
956
954
  ref: d,
957
- class: V(["vf-smart-select-options", { grouped: Oe.value }])
955
+ class: H(["vf-smart-select-options", { grouped: De.value }])
958
956
  }, [
959
957
  P.value ? (b(!0), k(le, { key: 1 }, re(kt.value, (v) => (b(), k("div", {
960
958
  key: v.groupTitle,
@@ -966,12 +964,12 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
966
964
  }, () => [
967
965
  X(R(v.groupTitle), 1)
968
966
  ])
969
- ])) : H("", !0),
967
+ ])) : V("", !0),
970
968
  (b(!0), k(le, null, re(v.options, (p) => (b(), k("div", {
971
969
  key: p.key,
972
- class: V(["option", [x.value === p.key && "highlighted", p.ref && i.classForOption?.(p.ref)]]),
970
+ class: H(["option", [x.value === p.key && "highlighted", p.ref && i.classForOption?.(p.ref)]]),
973
971
  onMousemove: (y) => Ot(p),
974
- onMousedown: (y) => $e(p)
972
+ onMousedown: (y) => Be(p)
975
973
  }, [
976
974
  W(i.$slots, "option", { option: p }, () => [
977
975
  A("div", {
@@ -982,16 +980,16 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
982
980
  key: 0,
983
981
  class: "subtitle",
984
982
  innerHTML: p.subtitle
985
- }, null, 8, Wn)) : H("", !0)
983
+ }, null, 8, Wn)) : V("", !0)
986
984
  ])
987
985
  ], 42, Nn))), 128)),
988
986
  !L.value.length && a.value ? (b(), k("div", jn, [
989
987
  W(i.$slots, "no-results", {}, () => [
990
988
  X(R(Et.value), 1)
991
989
  ])
992
- ])) : H("", !0)
990
+ ])) : V("", !0)
993
991
  ]))), 128)) : (b(), k("div", Bn, "Loading..."))
994
- ], 2)) : H("", !0)
992
+ ], 2)) : V("", !0)
995
993
  ], 2));
996
994
  }
997
995
  }), ss = /* @__PURE__ */ N({
@@ -1016,9 +1014,9 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
1016
1014
  u.value = o.value.find((c) => c.value === r) ?? null;
1017
1015
  }
1018
1016
  ), O(u, (r) => {
1019
- const c = r ? o.value.find((d) => tt(d, r))?.value : null;
1017
+ const c = r ? o.value.find((d) => we(d, r))?.value : null;
1020
1018
  s("update:modelValue", c ?? null);
1021
- }), (r, c) => (b(), Ge(Pn, {
1019
+ }), (r, c) => (b(), Je(Pn, {
1022
1020
  modelValue: u.value,
1023
1021
  "onUpdate:modelValue": c[0] || (c[0] = (d) => u.value = d),
1024
1022
  options: o.value,
@@ -1061,12 +1059,12 @@ const qn = { class: "content" }, zn = { class: "message" }, Kn = {
1061
1059
  easing: "linear"
1062
1060
  }), setTimeout(() => t.callback(), l * 1e3);
1063
1061
  }), (l, s) => (b(), k("div", {
1064
- class: V(["vf-toast", l.className]),
1065
- onClick: be(n, ["stop"])
1062
+ class: H(["vf-toast", l.className]),
1063
+ onClick: ke(n, ["stop"])
1066
1064
  }, [
1067
1065
  A("div", qn, [
1068
1066
  A("div", zn, R(l.message), 1),
1069
- l.disableClose ? H("", !0) : (b(), k("div", Kn, "x"))
1067
+ l.disableClose ? V("", !0) : (b(), k("div", Kn, "x"))
1070
1068
  ]),
1071
1069
  l.durationSecs !== null ? (b(), k("div", Yn, [
1072
1070
  A("div", {
@@ -1074,7 +1072,7 @@ const qn = { class: "content" }, zn = { class: "message" }, Kn = {
1074
1072
  ref: o,
1075
1073
  class: "inner"
1076
1074
  }, null, 512)
1077
- ])) : H("", !0)
1075
+ ])) : V("", !0)
1078
1076
  ], 2));
1079
1077
  }
1080
1078
  });
@@ -1099,7 +1097,7 @@ function Qn(e) {
1099
1097
  return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : kn(Number(e));
1100
1098
  }
1101
1099
  function eo(e) {
1102
- return e && Vn(e);
1100
+ return e && Hn(e);
1103
1101
  }
1104
1102
  function to(e) {
1105
1103
  return e ? zt(e) : null;
@@ -1114,7 +1112,7 @@ function oo(e) {
1114
1112
  return e ? rt(e.toLowerCase()) : null;
1115
1113
  }
1116
1114
  function so(e) {
1117
- return e ? Hn(e) : null;
1115
+ return e ? Vn(e) : null;
1118
1116
  }
1119
1117
  function io(e, t) {
1120
1118
  return An(e, t);
@@ -1134,7 +1132,7 @@ function uo(e, t) {
1134
1132
  function co(e) {
1135
1133
  return e && U(Jt(Qt(e, "yyyy-MM-dd", /* @__PURE__ */ new Date()), 1), F.defaultDateFormat);
1136
1134
  }
1137
- const je = {
1135
+ const Ue = {
1138
1136
  bytes: Zn,
1139
1137
  dash: Gn,
1140
1138
  dashZeros: Jn,
@@ -1152,12 +1150,12 @@ const je = {
1152
1150
  dateTime: uo,
1153
1151
  oneDayForward: co
1154
1152
  }, rs = (e) => ({
1155
- ...je,
1156
- ...e(je)
1157
- }), Ce = Symbol("HookState");
1153
+ ...Ue,
1154
+ ...e(Ue)
1155
+ }), xe = Symbol("HookState");
1158
1156
  function as(e, t) {
1159
- const n = t ?? Ee();
1160
- B(() => fo(n, e), n), Je(() => po(n), n), Qe(() => Ue(n), n), ue(() => Ue(n), n);
1157
+ const n = t ?? be();
1158
+ B(() => fo(n, e), n), Qe(() => po(n), n), et(() => Pe(n), n), ue(() => Pe(n), n);
1161
1159
  }
1162
1160
  function fo(e, t) {
1163
1161
  const n = {};
@@ -1165,14 +1163,14 @@ function fo(e, t) {
1165
1163
  const o = at(e.vnode.el);
1166
1164
  o ? n.ancestor = new G(o, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
1167
1165
  }
1168
- t.windowScrolledToBottom && (n.window = new G(window, t.windowScrolledToBottom)), e[Ce] = n;
1166
+ t.windowScrolledToBottom && (n.window = new G(window, t.windowScrolledToBottom)), e[xe] = n;
1169
1167
  }
1170
1168
  function po(e) {
1171
- const t = e[Ce];
1169
+ const t = e[xe];
1172
1170
  t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
1173
1171
  }
1174
- function Ue(e) {
1175
- const t = e[Ce];
1172
+ function Pe(e) {
1173
+ const t = e[xe];
1176
1174
  t?.el?.uninstall(), t?.ancestor?.uninstall(), t?.window?.uninstall();
1177
1175
  }
1178
1176
  const ge = ["auto", "scroll"];
@@ -1199,15 +1197,15 @@ class G {
1199
1197
  }
1200
1198
  }
1201
1199
  function us(e) {
1202
- B(() => window.addEventListener("resize", e)), Je(() => window.addEventListener("resize", e)), Qe(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1200
+ B(() => window.addEventListener("resize", e)), Qe(() => window.addEventListener("resize", e)), et(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1203
1201
  }
1204
1202
  const vo = {
1205
- mounted: qe,
1206
- updated: qe
1207
- }, Pe = Symbol("HasAutoFocused");
1208
- function qe(e, t) {
1209
- if (t.value === void 0 && e[Pe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1210
- e[Pe] = !0;
1203
+ mounted: ze,
1204
+ updated: ze
1205
+ }, qe = Symbol("HasAutoFocused");
1206
+ function ze(e, t) {
1207
+ if (t.value === void 0 && e[qe] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue) return;
1208
+ e[qe] = !0;
1211
1209
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1212
1210
  setTimeout(() => n.focus(), 10);
1213
1211
  }
@@ -1246,10 +1244,10 @@ function go(e) {
1246
1244
  });
1247
1245
  }
1248
1246
  const wo = {
1249
- beforeMount: ze,
1250
- updated: ze
1247
+ beforeMount: Ke,
1248
+ updated: Ke
1251
1249
  };
1252
- function ze(e, t) {
1250
+ function Ke(e, t) {
1253
1251
  t.value == t.oldValue && e.innerHTML.length || (e.innerText = Eo(e, t));
1254
1252
  }
1255
1253
  function Eo(e, t) {
@@ -1269,37 +1267,37 @@ function Eo(e, t) {
1269
1267
  const E = /* @__PURE__ */ new Date();
1270
1268
  E.getFullYear() === s.getFullYear() ? (E.getMonth() !== s.getMonth() || E.getDate() !== s.getDate()) && (d = "M/d") : d = "M/d/yy";
1271
1269
  const h = r ? null : F.defaultTimeFormat;
1272
- u = et([d, h]).join(" ");
1270
+ u = tt([d, h]).join(" ");
1273
1271
  }
1274
1272
  u || (r ? u = F.defaultDateFormat : u = `${F.defaultDateFormat} ${F.defaultTimeFormat}`);
1275
1273
  let c = U(s, u);
1276
1274
  return n && (c = n + " " + c), c;
1277
1275
  }
1278
1276
  const bo = {
1279
- beforeMount: Ke,
1280
- updated: Ke,
1277
+ beforeMount: Ye,
1278
+ updated: Ye,
1281
1279
  unmounted: ko
1282
1280
  };
1283
- function Ke(e, t) {
1281
+ function Ye(e, t) {
1284
1282
  e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
1285
1283
  }
1286
1284
  function ko(e) {
1287
1285
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
1288
1286
  }
1289
1287
  const To = {
1290
- beforeMount: Ye,
1291
- updated: Ye,
1288
+ beforeMount: Xe,
1289
+ updated: Xe,
1292
1290
  unmounted: ct
1293
- }, ee = Symbol("HasAutoFocused"), xe = [];
1291
+ }, ee = Symbol("HasAutoFocused"), Me = [];
1294
1292
  function So() {
1295
- xe.forEach(ut);
1293
+ Me.forEach(ut);
1296
1294
  }
1297
1295
  setInterval(So, 1e3);
1298
- function Ye(e, t) {
1296
+ function Xe(e, t) {
1299
1297
  if (t.value == t.oldValue) return;
1300
1298
  if (!t.value) return ct(e);
1301
1299
  const n = new Date(t.value), o = e.attributes.getNamedItem("base-time")?.value, l = n.getTime() - (o ? new Date(o).getTime() - t.value * 1e3 : 0), s = e.getAttribute("no-seconds") === null;
1302
- e[ee] || xe.push(e), e[ee] = {
1300
+ e[ee] || Me.push(e), e[ee] = {
1303
1301
  startTs: l,
1304
1302
  includeSeconds: s
1305
1303
  }, ut(e);
@@ -1309,7 +1307,7 @@ function ut(e) {
1309
1307
  e.innerText = Co(n, t.includeSeconds);
1310
1308
  }
1311
1309
  function ct(e) {
1312
- e[ee] && (Kt(xe, e), delete e[ee]), e.innerText = "-";
1310
+ e[ee] && (Kt(Me, e), delete e[ee]), e.innerText = "-";
1313
1311
  }
1314
1312
  function Co(e, t) {
1315
1313
  const n = [], o = Math.floor(e / 86400);
@@ -1354,18 +1352,18 @@ const Y = Symbol("InfiniteScrollHandler"), Lo = {
1354
1352
  e[Y]?.uninstall(), delete e[Y];
1355
1353
  }
1356
1354
  }, Fo = {
1357
- beforeMount: Xe,
1358
- updated: Xe
1355
+ beforeMount: Ze,
1356
+ updated: Ze
1359
1357
  };
1360
- function Xe(e, t) {
1358
+ function Ze(e, t) {
1361
1359
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1362
1360
  }
1363
1361
  const Io = {
1364
- mounted: Ze,
1365
- updated: Ze,
1362
+ mounted: Ge,
1363
+ updated: Ge,
1366
1364
  unmounted: vt
1367
1365
  }, J = Symbol("TooltipState");
1368
- function Ze(e, t) {
1366
+ function Ge(e, t) {
1369
1367
  let n = e.attributes.getNamedItem("tip")?.value ?? t.value;
1370
1368
  if (t.value || (n = null), n) {
1371
1369
  const o = {
@@ -1445,7 +1443,7 @@ export {
1445
1443
  ts as configureVfOpenApiClient,
1446
1444
  rs as createFilters,
1447
1445
  ce as createOverlayInjection,
1448
- Hn as desnakeCase,
1446
+ Vn as desnakeCase,
1449
1447
  rn as dismissOverlayInjectionById,
1450
1448
  Ro as dismissOverlayInjectionByInstance,
1451
1449
  nt as dismissOverlayInjectionByInternalInstance,
@@ -1453,19 +1451,19 @@ export {
1453
1451
  ps as escapeHtml,
1454
1452
  cn as formatError,
1455
1453
  kn as formatNumber,
1456
- Vn as formatPhone,
1454
+ Hn as formatPhone,
1457
1455
  An as formatUSCurrency,
1458
1456
  Ko as handleError,
1459
1457
  zo as handleErrorAndAlert,
1460
1458
  cs as installVf,
1461
1459
  dn as isError,
1462
- Re as isNotNullOrUndefined,
1460
+ We as isNotNullOrUndefined,
1463
1461
  Yo as maskComponent,
1464
1462
  fn as maskEl,
1465
1463
  pn as maskForm,
1466
1464
  ns as nl2br,
1467
1465
  es as nullifyEmptyInputs,
1468
- ke as presentOverlay,
1466
+ Te as presentOverlay,
1469
1467
  Q as removeOverlayInjection,
1470
1468
  Zo as replaceElement,
1471
1469
  un as showAlert,
@@ -1477,7 +1475,7 @@ export {
1477
1475
  Uo as showWait,
1478
1476
  bn as sleep,
1479
1477
  Jo as sleepSecs,
1480
- Te as toError,
1478
+ Se as toError,
1481
1479
  Xo as unmaskComponent,
1482
1480
  ot as unmaskEl,
1483
1481
  st as unmaskForm,