@signal24/vue-foundation 4.28.1 → 4.28.2

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,8 +1,8 @@
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";
1
+ import { defineComponent as N, ref as S, computed as T, watch as I, onMounted as _, createElementBlock as k, withDirectives as ie, openBlock as b, createElementVNode as $, 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
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
- import { escapeHtml as ps } from "@vue/shared";
5
+ import { escapeHtml as vs } from "@vue/shared";
6
6
  import { format as U, addDays as Jt, parse as Qt } from "date-fns";
7
7
  const en = {
8
8
  key: 0,
@@ -26,14 +26,14 @@ const en = {
26
26
  const E = d;
27
27
  return n.preprocesor ? n.preprocesor(E) : n.displayKey ? E[n.displayKey] : "";
28
28
  }) : null), u = S(n.modelValue ?? null);
29
- O(() => n.loadFn, r), O(
29
+ I(() => n.loadFn, r), I(
30
30
  () => n.modelValue,
31
31
  () => u.value = n.modelValue
32
- ), O(u, () => o("update:modelValue", u.value));
32
+ ), I(u, () => o("update:modelValue", u.value));
33
33
  async function r() {
34
34
  l.value = await n.loadFn();
35
35
  }
36
- return B(r), (c, d) => s.value ? ie((b(), k("select", {
36
+ return _(r), (c, d) => s.value ? ie((b(), k("select", {
37
37
  key: 1,
38
38
  "onUpdate:modelValue": d[0] || (d[0] = (E) => u.value = E)
39
39
  }, [
@@ -45,10 +45,20 @@ const en = {
45
45
  ], 512)), [
46
46
  [Vt, u.value]
47
47
  ]) : (b(), k("select", en, [
48
- A("option", null, R(n.loadingText || "Loading..."), 1)
48
+ $("option", null, R(n.loadingText || "Loading..."), 1)
49
49
  ]));
50
50
  }
51
- }), on = /* @__PURE__ */ N({
51
+ }), F = {
52
+ unhandledErrorSupportText: "please contact support",
53
+ errorHandler: (e) => console.error("Unhandled error:", e),
54
+ defaultDateFormat: "M/d/yy",
55
+ defaultTimeFormat: "H:mm",
56
+ defaultCurrencyDivisor: 1
57
+ };
58
+ function No(e) {
59
+ Object.assign(F, e);
60
+ }
61
+ const on = /* @__PURE__ */ N({
52
62
  __name: "overlay-anchor",
53
63
  props: {
54
64
  overlayId: {},
@@ -56,7 +66,7 @@ const en = {
56
66
  },
57
67
  setup(e) {
58
68
  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
- B(u);
69
+ _(u);
60
70
  function u() {
61
71
  if (!s) return;
62
72
  const d = s.vnode.el, { styles: E, classes: h } = r(d, n);
@@ -70,14 +80,14 @@ const en = {
70
80
  if (h.y === "center")
71
81
  m = g.top + g.height / 2 - a.height / 2, f.push("anchored-center-y");
72
82
  else {
73
- const $ = (g.bottom + a.height < window.innerHeight || h.y === "below") && h.y !== "above";
74
- m = $ ? g.bottom : g.top - a.height, f.push($ ? "anchored-top" : "anchored-bottom");
83
+ const B = (g.bottom + a.height < window.innerHeight || h.y === "below") && h.y !== "above";
84
+ m = B ? g.bottom : g.top - a.height, f.push(B ? "anchored-top" : "anchored-bottom");
75
85
  }
76
86
  if (h.x === "center")
77
87
  C = g.left + g.width / 2 - a.width / 2, f.push("anchored-center-x");
78
88
  else {
79
- const $ = (g.left + a.width < window.innerWidth || h.x === "left") && h.x !== "right";
80
- C = $ ? g.left : g.right - a.width, f.push($ ? "anchored-left" : "anchored-right");
89
+ const B = (g.left + a.width < window.innerWidth || h.x === "left") && h.x !== "right";
90
+ C = B ? g.left : g.right - a.width, f.push(B ? "anchored-left" : "anchored-right");
81
91
  }
82
92
  return {
83
93
  styles: {
@@ -92,7 +102,7 @@ const en = {
92
102
  function c() {
93
103
  window.removeEventListener("click", c), rn(t.overlayId);
94
104
  }
95
- return B(() => {
105
+ return _(() => {
96
106
  setTimeout(() => {
97
107
  window.addEventListener("click", c);
98
108
  }, 10);
@@ -106,10 +116,14 @@ const en = {
106
116
  }
107
117
  });
108
118
  let sn = 0;
109
- const _ = At([]), No = N({
119
+ const A = At([]);
120
+ I(A, () => {
121
+ F.onOverlaysChanged?.(A.length);
122
+ });
123
+ const Ro = N({
110
124
  setup() {
111
125
  return () => ae("div", [
112
- re(_, (e) => ae($t, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
+ re(A, (e) => ae($t, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
113
127
  ]);
114
128
  }
115
129
  });
@@ -124,9 +138,9 @@ function ce(e, t, n) {
124
138
  vnode: u,
125
139
  wrapperVnode: r
126
140
  };
127
- return _.push(c), c;
141
+ return A.push(c), c;
128
142
  }
129
- function Ro(e) {
143
+ function Wo(e) {
130
144
  e.$ && nt(e.$);
131
145
  }
132
146
  function nt(e) {
@@ -135,16 +149,16 @@ function nt(e) {
135
149
  t = t.parent;
136
150
  }
137
151
  function ln(e) {
138
- const t = _.findIndex((n) => n.vnode.component === e.component);
139
- return t >= 0 ? (_[t].props.callback(), !0) : !1;
152
+ const t = A.findIndex((n) => n.vnode.component === e.component);
153
+ return t >= 0 ? (A[t].props.callback(), !0) : !1;
140
154
  }
141
155
  function rn(e) {
142
- const t = _.findIndex((n) => n.id === e);
143
- return t >= 0 ? (_[t].props.callback(), !0) : !1;
156
+ const t = A.findIndex((n) => n.id === e);
157
+ return t >= 0 ? (A[t].props.callback(), !0) : !1;
144
158
  }
145
159
  function Q(e) {
146
- const t = _.indexOf(e);
147
- t >= 0 && _.splice(t, 1);
160
+ const t = A.indexOf(e);
161
+ t >= 0 && A.splice(t, 1);
148
162
  }
149
163
  async function Te(e, t, n) {
150
164
  return new Promise((o) => {
@@ -174,14 +188,14 @@ function te(e, t) {
174
188
  async function un(e, t) {
175
189
  await Te(ne, te(e, t));
176
190
  }
177
- async function Wo(e, t) {
191
+ async function jo(e, t) {
178
192
  const n = te(e, t);
179
193
  return await Te(ne, {
180
194
  ...n,
181
195
  shouldConfirm: !0
182
196
  }) === !0;
183
197
  }
184
- async function jo(e, t) {
198
+ async function Uo(e, t) {
185
199
  const n = te(e, t);
186
200
  return await Te(ne, {
187
201
  ...n,
@@ -189,7 +203,7 @@ async function jo(e, t) {
189
203
  classes: ["destructive", ...n.classes]
190
204
  }) === !0;
191
205
  }
192
- function Uo(e, t) {
206
+ function Po(e, t) {
193
207
  const n = te(e, t), o = ce(ne, {
194
208
  ...n,
195
209
  isBare: !0,
@@ -199,7 +213,7 @@ function Uo(e, t) {
199
213
  });
200
214
  return () => Q(o);
201
215
  }
202
- function Po(e, t) {
216
+ function qo(e, t) {
203
217
  const n = te(e, t), o = ce(ne, {
204
218
  ...n,
205
219
  isBare: !0,
@@ -214,16 +228,6 @@ function Po(e, t) {
214
228
  dismiss: () => Q(o)
215
229
  };
216
230
  }
217
- const F = {
218
- unhandledErrorSupportText: "please contact support",
219
- errorHandler: (e) => console.error("Unhandled error:", e),
220
- defaultDateFormat: "M/d/yy",
221
- defaultTimeFormat: "H:mm",
222
- defaultCurrencyDivisor: 1
223
- };
224
- function qo(e) {
225
- Object.assign(F, e);
226
- }
227
231
  class de extends Error {
228
232
  constructor(t) {
229
233
  super(t), this.name = "UserError";
@@ -274,7 +278,7 @@ function ot(e) {
274
278
  e[Z] && e.removeChild(e[Z].maskEl);
275
279
  }
276
280
  const Ee = Symbol("FormMaskState");
277
- function pn(e, t, n) {
281
+ function vn(e, t, n) {
278
282
  const o = e instanceof Element ? e : it(e);
279
283
  if (!o) return () => {
280
284
  };
@@ -299,7 +303,7 @@ function it(e) {
299
303
  const t = e?.$?.vnode.el;
300
304
  return t ? t.tagName === "FORM" ? t : t.querySelector("form") : null;
301
305
  }
302
- const vn = ["id"], mn = {
306
+ const pn = ["id"], mn = {
303
307
  key: 0,
304
308
  class: "vf-modal-header"
305
309
  }, hn = { class: "vf-modal-content" }, yn = {
@@ -319,7 +323,7 @@ const vn = ["id"], mn = {
319
323
  const n = be(), o = e;
320
324
  t({ mask: h, unmask: g, hide: a, unhide: f });
321
325
  const l = S(), s = S(), u = S(!1), r = T(() => tt([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
322
- B(() => {
326
+ _(() => {
323
327
  document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", d), l.value?.addEventListener("click", c));
324
328
  }), ue(() => {
325
329
  window.removeEventListener("keydown", d), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
@@ -337,7 +341,7 @@ const vn = ["id"], mn = {
337
341
  nt(n);
338
342
  }
339
343
  function h() {
340
- return pn(s.value), () => g();
344
+ return vn(s.value), () => g();
341
345
  }
342
346
  function g() {
343
347
  st(s.value);
@@ -354,7 +358,7 @@ const vn = ["id"], mn = {
354
358
  ref: l,
355
359
  class: H(["vf-overlay vf-modal-wrap", r.value])
356
360
  }, [
357
- A("form", {
361
+ $("form", {
358
362
  ref_key: "form",
359
363
  ref: s,
360
364
  action: ".",
@@ -369,14 +373,14 @@ const vn = ["id"], mn = {
369
373
  onClick: E
370
374
  })) : V("", !0)
371
375
  ])) : V("", !0),
372
- A("div", hn, [
376
+ $("div", hn, [
373
377
  W(m.$slots, "default")
374
378
  ]),
375
379
  m.$slots.footer ? (b(), k("div", yn, [
376
380
  W(m.$slots, "footer")
377
381
  ])) : V("", !0)
378
382
  ], 34)
379
- ], 10, vn));
383
+ ], 10, pn));
380
384
  }
381
385
  }), wn = ["innerHtml"], En = ["innerText"], ne = /* @__PURE__ */ N({
382
386
  __name: "vf-alert-modal",
@@ -432,7 +436,7 @@ const vn = ["id"], mn = {
432
436
  ]))), [
433
437
  [s]
434
438
  ]),
435
- A("button", {
439
+ $("button", {
436
440
  class: "default",
437
441
  onClick: l[1] || (l[1] = () => o.callback(!1))
438
442
  }, "Cancel")
@@ -664,7 +668,7 @@ function Ln(e, t = 0) {
664
668
  }
665
669
  let ye;
666
670
  const Fn = new Uint8Array(16);
667
- function In() {
671
+ function On() {
668
672
  if (!ye) {
669
673
  if (typeof crypto > "u" || !crypto.getRandomValues)
670
674
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
@@ -672,12 +676,12 @@ function In() {
672
676
  }
673
677
  return ye(Fn);
674
678
  }
675
- const On = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: On };
679
+ const In = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = { randomUUID: In };
676
680
  function Dn(e, t, n) {
677
681
  if (je.randomUUID && !e)
678
682
  return je.randomUUID();
679
683
  e = e || {};
680
- const o = e.random ?? e.rng?.() ?? In();
684
+ const o = e.random ?? e.rng?.() ?? On();
681
685
  if (o.length < 16)
682
686
  throw new Error("Random bytes length must be >= 16");
683
687
  return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Ln(o);
@@ -748,30 +752,30 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
748
752
  t({
749
753
  addRemoteOption: Dt
750
754
  });
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 = [];
755
+ 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), B = 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)), Oe = T(() => s.selectionFormatter ? s.selectionFormatter : Fe.value), Ie = T(() => [...yt.value, ...ht.value, ...gt.value]), De = T(() => !!(s.groupField || s.groupFormatter)), ve = T(() => Ie.value.map((i, w) => {
756
+ const p = bt.value?.(i), v = Fe.value(i), y = s.subtitleFormatter?.(i), O = v ? v.trim().toLowerCase() : "", Ne = y ? y.trim().toLowerCase() : "", oe = [];
753
757
  return s.searchFields ? s.searchFields.forEach((Re) => {
754
758
  i[Re] && oe.push(String(i[Re]).toLowerCase());
755
- }) : (oe.push(I), Ne && oe.push(Ne)), {
759
+ }) : (oe.push(O), Ne && oe.push(Ne)), {
756
760
  key: fe.value?.(i) ?? String(w),
757
- group: v,
758
- title: p,
761
+ group: p,
762
+ title: v,
759
763
  subtitle: y,
760
764
  searchContent: oe.join(""),
761
765
  ref: i
762
766
  };
763
767
  })), L = T(() => {
764
- let i = [...pe.value];
768
+ let i = [...ve.value];
765
769
  if (g.value) {
766
770
  const w = a.value.trim().toLowerCase();
767
771
  if (w.length) {
768
772
  i = i.filter((y) => y.searchContent.includes(w));
769
- const v = Gt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), p = new RegExp(`(${v})`, "ig");
773
+ const p = Gt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), v = new RegExp(`(${p})`, "ig");
770
774
  i = i.map((y) => ({
771
775
  ...y,
772
- title: y.title.replace(p, "<mark>$1</mark>"),
773
- subtitle: y.subtitle?.replace(p, "<mark>$1</mark>")
774
- })), $.value && (i.find((I) => I.searchContent === w) !== void 0 || i.push({
776
+ title: y.title.replace(v, "<mark>$1</mark>"),
777
+ subtitle: y.subtitle?.replace(v, "<mark>$1</mark>")
778
+ })), B.value && (i.find((O) => O.searchContent === w) !== void 0 || i.push({
775
779
  key: l,
776
780
  title: mt.value ? "Create <strong>" + a.value.trim() + "</strong>..." : a.value.trim()
777
781
  }));
@@ -789,25 +793,25 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
789
793
  options: L.value
790
794
  }
791
795
  ];
792
- const i = jt(L.value.map((v) => v.group ?? "")), w = Ut(L.value, (v) => v.group ?? "");
793
- return i.map((v) => ({
794
- groupTitle: v,
795
- options: w[v]
796
+ const i = jt(L.value.map((p) => p.group ?? "")), w = Ut(L.value, (p) => p.group ?? "");
797
+ return i.map((p) => ({
798
+ groupTitle: p,
799
+ options: w[p]
796
800
  }));
797
801
  });
798
- O(() => s.modelValue, me), O(pe, () => {
802
+ I(() => s.modelValue, me), I(ve, () => {
799
803
  C.value && setTimeout($e, 0);
800
- }), O(a, () => {
804
+ }), I(a, () => {
801
805
  g.value && !s.remoteSearch && !a.value.trim().length && (g.value = !1);
802
- }), O(C, () => {
806
+ }), I(C, () => {
803
807
  C.value ? setTimeout(Ft, 0) : (g.value = !1, a.value = m.value ?? "", d.value && (d.value.style.visibility = "hidden"));
804
- }), O(L, () => {
808
+ }), I(L, () => {
805
809
  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
- }), B(async () => {
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, () => {
810
+ }), _(async () => {
811
+ B.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(), I(f, () => {
808
812
  const i = We(f.value) && q.value !== null ? q.value(f.value) : f.value;
809
813
  we(s.modelValue, i) || u("update:modelValue", i);
810
- }), s.remoteSearch && O(a, Pt(Tt, 250));
814
+ }), s.remoteSearch && I(a, Pt(Tt, 250));
811
815
  }), ue(() => {
812
816
  d.value?.remove();
813
817
  });
@@ -832,14 +836,14 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
832
836
  return;
833
837
  }
834
838
  if (i.key == "ArrowUp" || i.key == "ArrowDown")
835
- return i.preventDefault(), ve(i.key == "ArrowUp" ? -1 : 1);
839
+ return i.preventDefault(), pe(i.key == "ArrowUp" ? -1 : 1);
836
840
  if (i.key == "PageUp" || i.key == "PageDown")
837
- return i.preventDefault(), ve(i.key == "PageUp" ? -10 : 10);
841
+ return i.preventDefault(), pe(i.key == "PageUp" ? -10 : 10);
838
842
  if (i.key == "Home" || i.key == "End")
839
- return i.preventDefault(), ve(i.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
843
+ return i.preventDefault(), pe(i.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
840
844
  if (i.key == "Enter") {
841
845
  i.preventDefault();
842
- const w = L.value.find((v) => v.key == x.value);
846
+ const w = L.value.find((p) => p.key == x.value);
843
847
  if (w) return Be(w);
844
848
  }
845
849
  if (i.key === "Delete" || i.key === "Backspace") {
@@ -862,40 +866,40 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
862
866
  const w = L.value.find((y) => y.ref === i);
863
867
  if (w)
864
868
  return w;
865
- const v = s.keyExtractor ? (y, I) => s.keyExtractor(y) === s.keyExtractor(I) : we, p = L.value.find((y) => v(y.ref, i));
866
- return p || null;
869
+ const p = s.keyExtractor ? (y, O) => s.keyExtractor(y) === s.keyExtractor(O) : we, v = L.value.find((y) => p(y.ref, i));
870
+ return v || null;
867
871
  }
868
872
  function Lt() {
869
873
  s.debug || (!a.value.length && s.nullTitle && (f.value = null, m.value = null), C.value = !1);
870
874
  }
871
875
  function Ft() {
872
- P.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), It();
876
+ P.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), Ot();
873
877
  }
874
- function It() {
875
- const i = r.value.getBoundingClientRect(), w = i.y + i.height + 2, v = i.x, p = d.value, y = window.getComputedStyle(r.value);
876
- for (let I in y)
877
- /^(font|text)/.test(I) && (p.style[I] = y[I]);
878
- if (p.style.top = w + "px", p.style.left = v + "px", p.style.minWidth = i.width + "px", !y.maxHeight || y.maxHeight == "none") {
879
- const I = window.innerHeight - w - 12;
880
- p.style.maxHeight = I + "px";
878
+ function Ot() {
879
+ const i = r.value.getBoundingClientRect(), w = i.y + i.height + 2, p = i.x, v = d.value, y = window.getComputedStyle(r.value);
880
+ for (let O in y)
881
+ /^(font|text)/.test(O) && (v.style[O] = y[O]);
882
+ if (v.style.top = w + "px", v.style.left = p + "px", v.style.minWidth = i.width + "px", !y.maxHeight || y.maxHeight == "none") {
883
+ const O = window.innerHeight - w - 12;
884
+ v.style.maxHeight = O + "px";
881
885
  }
882
- p.style.visibility = "visible", document.body.appendChild(p), setTimeout($e, 0);
886
+ v.style.visibility = "visible", document.body.appendChild(v), setTimeout($e, 0);
883
887
  }
884
888
  function $e() {
885
889
  if (!P.value || !x.value) return;
886
- const i = L.value.findIndex((p) => p.key == x.value), w = d.value, v = w?.querySelectorAll(".option")[i];
887
- v && (w.scrollTop = v.offsetTop);
890
+ const i = L.value.findIndex((v) => v.key == x.value), w = d.value, p = w?.querySelectorAll(".option")[i];
891
+ p && (w.scrollTop = p.offsetTop);
888
892
  }
889
- function Ot(i) {
893
+ function It(i) {
890
894
  x.value = i ? i.key : null;
891
895
  }
892
- function ve(i) {
893
- const w = L.value.findIndex((I) => I.key == x.value);
894
- let v = w + i;
895
- if (v < 0 ? v = 0 : v >= L.value.length && (v = L.value.length - 1), w == v) return;
896
- x.value = L.value[v].key;
897
- const p = d.value, y = p?.querySelectorAll(".option")[v];
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));
896
+ function pe(i) {
897
+ const w = L.value.findIndex((O) => O.key == x.value);
898
+ let p = w + i;
899
+ if (p < 0 ? p = 0 : p >= L.value.length && (p = L.value.length - 1), w == p) return;
900
+ x.value = L.value[p].key;
901
+ const v = d.value, y = v?.querySelectorAll(".option")[p];
902
+ y && (y.offsetTop < v.scrollTop ? v.scrollTop = y.offsetTop : y.offsetTop + y.offsetHeight > v.scrollTop + v.clientHeight && (v.scrollTop = y.offsetTop + y.offsetHeight - v.clientHeight));
899
903
  }
900
904
  function Be(i) {
901
905
  if (g.value = !1, i.key === o)
@@ -904,13 +908,13 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
904
908
  const w = a.value.trim();
905
909
  a.value = "", f.value = null, m.value = null, s.onCreateItem?.(w);
906
910
  } else {
907
- const v = pe.value.find((p) => p.key == i.key).ref;
908
- f.value = v, m.value = Ie.value(v), a.value = m.value ?? "";
911
+ const p = ve.value.find((v) => v.key == i.key).ref;
912
+ f.value = p, m.value = Oe.value(p), a.value = m.value ?? "";
909
913
  }
910
914
  c.value?.blur(), _e();
911
915
  }
912
916
  function me() {
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 = "");
917
+ s.modelValue !== null ? (f.value = q.value ? Ie.value.find((i) => s.modelValue === q.value(i)) : s.modelValue, m.value = We(f.value) ? Oe.value(f.value) : null, a.value = m.value ?? "") : (f.value = null, m.value = null, a.value = "");
914
918
  }
915
919
  function Dt(i) {
916
920
  h.value.unshift(i);
@@ -923,18 +927,18 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
923
927
  if (!i) return;
924
928
  const w = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
925
929
  if (!w) return;
926
- const v = Array.from(w).findIndex((y) => y === c.value), p = w[v + 1];
927
- p && setTimeout(() => p.focus(), 0);
930
+ const p = Array.from(w).findIndex((y) => y === c.value), v = w[p + 1];
931
+ v && setTimeout(() => v.focus(), 0);
928
932
  }
929
933
  return (i, w) => (b(), k("div", {
930
934
  ref_key: "el",
931
935
  ref: r,
932
936
  class: H(["vf-smart-select", { disabled: Le.value, open: C.value }])
933
937
  }, [
934
- ie(A("input", {
938
+ ie($("input", {
935
939
  ref_key: "searchField",
936
940
  ref: c,
937
- "onUpdate:modelValue": w[0] || (w[0] = (v) => a.value = v),
941
+ "onUpdate:modelValue": w[0] || (w[0] = (p) => a.value = p),
938
942
  type: "text",
939
943
  disabled: Le.value,
940
944
  class: H({ nullable: !!i.nullTitle }),
@@ -954,32 +958,32 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
954
958
  ref: d,
955
959
  class: H(["vf-smart-select-options", { grouped: De.value }])
956
960
  }, [
957
- P.value ? (b(!0), k(le, { key: 1 }, re(kt.value, (v) => (b(), k("div", {
958
- key: v.groupTitle,
961
+ P.value ? (b(!0), k(le, { key: 1 }, re(kt.value, (p) => (b(), k("div", {
962
+ key: p.groupTitle,
959
963
  class: "group"
960
964
  }, [
961
- v.groupTitle ? (b(), k("div", _n, [
965
+ p.groupTitle ? (b(), k("div", _n, [
962
966
  W(i.$slots, "group", {
963
- group: v.groupTitle
967
+ group: p.groupTitle
964
968
  }, () => [
965
- X(R(v.groupTitle), 1)
969
+ X(R(p.groupTitle), 1)
966
970
  ])
967
971
  ])) : V("", !0),
968
- (b(!0), k(le, null, re(v.options, (p) => (b(), k("div", {
969
- key: p.key,
970
- class: H(["option", [x.value === p.key && "highlighted", p.ref && i.classForOption?.(p.ref)]]),
971
- onMousemove: (y) => Ot(p),
972
- onMousedown: (y) => Be(p)
972
+ (b(!0), k(le, null, re(p.options, (v) => (b(), k("div", {
973
+ key: v.key,
974
+ class: H(["option", [x.value === v.key && "highlighted", v.ref && i.classForOption?.(v.ref)]]),
975
+ onMousemove: (y) => It(v),
976
+ onMousedown: (y) => Be(v)
973
977
  }, [
974
- W(i.$slots, "option", { option: p }, () => [
975
- A("div", {
978
+ W(i.$slots, "option", { option: v }, () => [
979
+ $("div", {
976
980
  class: "title",
977
- innerHTML: p.title
981
+ innerHTML: v.title
978
982
  }, null, 8, Rn),
979
- p.subtitle ? (b(), k("div", {
983
+ v.subtitle ? (b(), k("div", {
980
984
  key: 0,
981
985
  class: "subtitle",
982
- innerHTML: p.subtitle
986
+ innerHTML: v.subtitle
983
987
  }, null, 8, Wn)) : V("", !0)
984
988
  ])
985
989
  ], 42, Nn))), 128)),
@@ -1008,12 +1012,12 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
1008
1012
  value: r,
1009
1013
  label: c
1010
1014
  }))), l = T(() => n.formatter ? (r) => n.formatter(r.label, r.value) : (r) => r.label), s = t, u = S(o.value.find((r) => r.value === n.modelValue) ?? null);
1011
- return O(
1015
+ return I(
1012
1016
  () => n.modelValue,
1013
1017
  (r) => {
1014
1018
  u.value = o.value.find((c) => c.value === r) ?? null;
1015
1019
  }
1016
- ), O(u, (r) => {
1020
+ ), I(u, (r) => {
1017
1021
  const c = r ? o.value.find((d) => we(d, r))?.value : null;
1018
1022
  s("update:modelValue", c ?? null);
1019
1023
  }), (r, c) => (b(), Je(Pn, {
@@ -1052,7 +1056,7 @@ const qn = { class: "content" }, zn = { class: "message" }, Kn = {
1052
1056
  t.onClick ? t.onClick() : t.disableClose || t.callback();
1053
1057
  }
1054
1058
  const o = S();
1055
- return t.durationSecs !== null && B(() => {
1059
+ return t.durationSecs !== null && _(() => {
1056
1060
  const l = t.durationSecs ?? 5;
1057
1061
  o.value?.animate([{ width: "0%" }, { width: "100%" }], {
1058
1062
  duration: l * 1e3,
@@ -1062,12 +1066,12 @@ const qn = { class: "content" }, zn = { class: "message" }, Kn = {
1062
1066
  class: H(["vf-toast", l.className]),
1063
1067
  onClick: ke(n, ["stop"])
1064
1068
  }, [
1065
- A("div", qn, [
1066
- A("div", zn, R(l.message), 1),
1069
+ $("div", qn, [
1070
+ $("div", zn, R(l.message), 1),
1067
1071
  l.disableClose ? V("", !0) : (b(), k("div", Kn, "x"))
1068
1072
  ]),
1069
1073
  l.durationSecs !== null ? (b(), k("div", Yn, [
1070
- A("div", {
1074
+ $("div", {
1071
1075
  ref_key: "progressInnerEl",
1072
1076
  ref: o,
1073
1077
  class: "inner"
@@ -1155,7 +1159,7 @@ const Ue = {
1155
1159
  }), xe = Symbol("HookState");
1156
1160
  function as(e, t) {
1157
1161
  const n = t ?? be();
1158
- B(() => fo(n, e), n), Qe(() => po(n), n), et(() => Pe(n), n), ue(() => Pe(n), n);
1162
+ _(() => fo(n, e), n), Qe(() => vo(n), n), et(() => Pe(n), n), ue(() => Pe(n), n);
1159
1163
  }
1160
1164
  function fo(e, t) {
1161
1165
  const n = {};
@@ -1165,7 +1169,7 @@ function fo(e, t) {
1165
1169
  }
1166
1170
  t.windowScrolledToBottom && (n.window = new G(window, t.windowScrolledToBottom)), e[xe] = n;
1167
1171
  }
1168
- function po(e) {
1172
+ function vo(e) {
1169
1173
  const t = e[xe];
1170
1174
  t?.el?.install(), t?.ancestor?.install(), t?.window?.install();
1171
1175
  }
@@ -1197,9 +1201,9 @@ class G {
1197
1201
  }
1198
1202
  }
1199
1203
  function us(e) {
1200
- B(() => window.addEventListener("resize", e)), Qe(() => window.addEventListener("resize", e)), et(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1204
+ _(() => window.addEventListener("resize", e)), Qe(() => window.addEventListener("resize", e)), et(() => window.removeEventListener("resize", e)), ue(() => window.removeEventListener("resize", e));
1201
1205
  }
1202
- const vo = {
1206
+ const po = {
1203
1207
  mounted: ze,
1204
1208
  updated: ze
1205
1209
  }, qe = Symbol("HasAutoFocused");
@@ -1323,7 +1327,7 @@ const xo = {
1323
1327
  unmounted: ft
1324
1328
  }, j = /* @__PURE__ */ new Map();
1325
1329
  function dt(e, t) {
1326
- j.size === 0 && window.addEventListener("keydown", pt), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
1330
+ j.size === 0 && window.addEventListener("keydown", vt), j.set(t.value.toLowerCase(), [...j.get(t.value.toLowerCase()) ?? [], e]);
1327
1331
  }
1328
1332
  function ft(e, t) {
1329
1333
  const n = j.get(t.value.toLowerCase());
@@ -1331,12 +1335,12 @@ function ft(e, t) {
1331
1335
  const o = n.indexOf(e);
1332
1336
  o !== -1 && n.splice(o, 1), n.length === 0 && j.delete(t.value.toLowerCase());
1333
1337
  }
1334
- j.size === 0 && window.removeEventListener("keydown", pt);
1338
+ j.size === 0 && window.removeEventListener("keydown", vt);
1335
1339
  }
1336
1340
  function Mo(e, t) {
1337
1341
  ft(e, t), dt(e, t);
1338
1342
  }
1339
- function pt(e) {
1343
+ function vt(e) {
1340
1344
  if (typeof e.key != "string") return;
1341
1345
  const t = e.key.toLowerCase(), n = j.get(t);
1342
1346
  n && (Yt(n)?.click(), e.preventDefault());
@@ -1358,10 +1362,10 @@ const Y = Symbol("InfiniteScrollHandler"), Lo = {
1358
1362
  function Ze(e, t) {
1359
1363
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1360
1364
  }
1361
- const Io = {
1365
+ const Oo = {
1362
1366
  mounted: Ge,
1363
1367
  updated: Ge,
1364
- unmounted: vt
1368
+ unmounted: pt
1365
1369
  }, J = Symbol("TooltipState");
1366
1370
  function Ge(e, t) {
1367
1371
  let n = e.attributes.getNamedItem("tip")?.value ?? t.value;
@@ -1370,14 +1374,14 @@ function Ge(e, t) {
1370
1374
  content: n,
1371
1375
  html: e.getAttribute("html") !== null
1372
1376
  };
1373
- e[J] ? e[J].configure(o) : e[J] = new Oo(e, o);
1377
+ e[J] ? e[J].configure(o) : e[J] = new Io(e, o);
1374
1378
  } else
1375
- vt(e);
1379
+ pt(e);
1376
1380
  }
1377
- function vt(e) {
1381
+ function pt(e) {
1378
1382
  e[J]?.destroy(), delete e[J];
1379
1383
  }
1380
- class Oo {
1384
+ class Io {
1381
1385
  constructor(t, n) {
1382
1386
  this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext), t.addEventListener("click", this.handleTargetMouseLeaveWithContext);
1383
1387
  }
@@ -1425,13 +1429,13 @@ class Oo {
1425
1429
  }
1426
1430
  }
1427
1431
  function Do(e) {
1428
- e.directive("autofocus", vo), e.directive("confirm-button", mo), e.directive("date-input", yo), e.directive("datetime", wo), e.directive("disabled", bo), e.directive("duration", To), e.directive("hotkey", xo), e.directive("infinite-scroll", Lo), e.directive("readonly", Fo), e.directive("tooltip", Io);
1432
+ e.directive("autofocus", po), e.directive("confirm-button", mo), e.directive("date-input", yo), e.directive("datetime", wo), e.directive("disabled", bo), e.directive("duration", To), e.directive("hotkey", xo), e.directive("infinite-scroll", Lo), e.directive("readonly", Fo), e.directive("tooltip", Oo);
1429
1433
  }
1430
1434
  function cs(e) {
1431
1435
  Do(e);
1432
1436
  }
1433
1437
  export {
1434
- No as OverlayContainer,
1438
+ Ro as OverlayContainer,
1435
1439
  de as UserError,
1436
1440
  _o as VfAjaxSelect,
1437
1441
  ne as VfAlertModal,
@@ -1439,16 +1443,16 @@ export {
1439
1443
  gn as VfModal,
1440
1444
  Pn as VfSmartSelect,
1441
1445
  Qo as cloneProp,
1442
- qo as configureVf,
1446
+ No as configureVf,
1443
1447
  ts as configureVfOpenApiClient,
1444
1448
  rs as createFilters,
1445
1449
  ce as createOverlayInjection,
1446
1450
  Vn as desnakeCase,
1447
1451
  rn as dismissOverlayInjectionById,
1448
- Ro as dismissOverlayInjectionByInstance,
1452
+ Wo as dismissOverlayInjectionByInstance,
1449
1453
  nt as dismissOverlayInjectionByInternalInstance,
1450
1454
  ln as dismissOverlayInjectionByVnode,
1451
- ps as escapeHtml,
1455
+ vs as escapeHtml,
1452
1456
  cn as formatError,
1453
1457
  kn as formatNumber,
1454
1458
  Hn as formatPhone,
@@ -1460,19 +1464,19 @@ export {
1460
1464
  We as isNotNullOrUndefined,
1461
1465
  Yo as maskComponent,
1462
1466
  fn as maskEl,
1463
- pn as maskForm,
1467
+ vn as maskForm,
1464
1468
  ns as nl2br,
1465
1469
  es as nullifyEmptyInputs,
1466
1470
  Te as presentOverlay,
1467
1471
  Q as removeOverlayInjection,
1468
1472
  Zo as replaceElement,
1469
1473
  un as showAlert,
1470
- Wo as showConfirm,
1471
- jo as showConfirmDestroy,
1474
+ jo as showConfirm,
1475
+ Uo as showConfirmDestroy,
1472
1476
  Go as showContextMenu,
1473
- Po as showMutableWait,
1477
+ qo as showMutableWait,
1474
1478
  ls as showToast,
1475
- Uo as showWait,
1479
+ Po as showWait,
1476
1480
  bn as sleep,
1477
1481
  Jo as sleepSecs,
1478
1482
  Se as toError,