@signal24/vue-foundation 4.28.2 → 4.29.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.
@@ -1,6 +1,6 @@
1
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
- import { configureOpenApiClient as Xt, OpenApiError as Zt } from "@signal24/openapi-client-codegen/browser";
3
+ import { configureOpenApiClient as Xt, OpenApiError as Zt } from "@signal24/openapi-client-codegen";
4
4
  import { escapeHtml as Gt } from "@vue/shared";
5
5
  import { escapeHtml as vs } from "@vue/shared";
6
6
  import { format as U, addDays as Jt, parse as Qt } from "date-fns";
@@ -23,8 +23,8 @@ const en = {
23
23
  emits: ["update:modelValue"],
24
24
  setup(e, { emit: t }) {
25
25
  const n = e, o = t, l = S(null), s = T(() => l.value ? l.value.map((d) => {
26
- const E = d;
27
- return n.preprocesor ? n.preprocesor(E) : n.displayKey ? E[n.displayKey] : "";
26
+ const g = d;
27
+ return n.preprocesor ? n.preprocesor(g) : n.displayKey ? g[n.displayKey] : "";
28
28
  }) : null), u = S(n.modelValue ?? null);
29
29
  I(() => n.loadFn, r), I(
30
30
  () => n.modelValue,
@@ -35,13 +35,13 @@ const en = {
35
35
  }
36
36
  return _(r), (c, d) => s.value ? ie((b(), k("select", {
37
37
  key: 1,
38
- "onUpdate:modelValue": d[0] || (d[0] = (E) => u.value = E)
38
+ "onUpdate:modelValue": d[0] || (d[0] = (g) => u.value = g)
39
39
  }, [
40
40
  n.nullText ? (b(), k("option", tn, R(n.nullText), 1)) : V("", !0),
41
- (b(!0), k(le, null, re(s.value, (E, h) => (b(), k("option", {
41
+ (b(!0), k(le, null, re(s.value, (g, h) => (b(), k("option", {
42
42
  key: h,
43
43
  value: l.value?.[h]
44
- }, R(E), 9, nn))), 128))
44
+ }, R(g), 9, nn))), 128))
45
45
  ], 512)), [
46
46
  [Vt, u.value]
47
47
  ]) : (b(), k("select", en, [
@@ -69,25 +69,25 @@ const on = /* @__PURE__ */ N({
69
69
  _(u);
70
70
  function u() {
71
71
  if (!s) return;
72
- const d = s.vnode.el, { styles: E, classes: h } = r(d, n);
73
- o.value = E, l.value = h;
72
+ const d = s.vnode.el, { styles: g, classes: h } = r(d, n);
73
+ o.value = g, l.value = h;
74
74
  }
75
- function r(d, E) {
76
- const h = t.anchor instanceof HTMLElement ? {} : t.anchor, g = E.getBoundingClientRect(), a = d.getBoundingClientRect();
77
- h.matchWidth && (a.width = g.width), h.matchHeight && (a.height = g.height);
75
+ function r(d, g) {
76
+ const h = t.anchor instanceof HTMLElement ? {} : t.anchor, w = g.getBoundingClientRect(), a = d.getBoundingClientRect();
77
+ h.matchWidth && (a.width = w.width), h.matchHeight && (a.height = w.height);
78
78
  const f = h.class ? Array.isArray(h.class) ? h.class : [h.class] : [];
79
79
  let m, C;
80
80
  if (h.y === "center")
81
- m = g.top + g.height / 2 - a.height / 2, f.push("anchored-center-y");
81
+ m = w.top + w.height / 2 - a.height / 2, f.push("anchored-center-y");
82
82
  else {
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");
83
+ const B = (w.bottom + a.height < window.innerHeight || h.y === "below") && h.y !== "above";
84
+ m = B ? w.bottom : w.top - a.height, f.push(B ? "anchored-top" : "anchored-bottom");
85
85
  }
86
86
  if (h.x === "center")
87
- C = g.left + g.width / 2 - a.width / 2, f.push("anchored-center-x");
87
+ C = w.left + w.width / 2 - a.width / 2, f.push("anchored-center-x");
88
88
  else {
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");
89
+ const B = (w.left + a.width < window.innerWidth || h.x === "left") && h.x !== "right";
90
+ C = B ? w.left : w.right - a.width, f.push(B ? "anchored-left" : "anchored-right");
91
91
  }
92
92
  return {
93
93
  styles: {
@@ -106,7 +106,7 @@ const on = /* @__PURE__ */ N({
106
106
  setTimeout(() => {
107
107
  window.addEventListener("click", c);
108
108
  }, 10);
109
- }), (d, E) => (b(), k("div", {
109
+ }), (d, g) => (b(), k("div", {
110
110
  class: H(["vf-overlay-anchor", l.value]),
111
111
  style: Ht(o.value),
112
112
  onClick: ke(c, ["stop"])
@@ -321,7 +321,7 @@ const pn = ["id"], mn = {
321
321
  emits: ["formSubmit"],
322
322
  setup(e, { expose: t }) {
323
323
  const n = be(), o = e;
324
- t({ mask: h, unmask: g, hide: a, unhide: f });
324
+ t({ mask: h, unmask: w, hide: a, unhide: f });
325
325
  const l = S(), s = S(), u = S(!1), r = T(() => tt([...Array.isArray(o.class) ? o.class : [o.class], u.value && "hidden"]));
326
326
  _(() => {
327
327
  document.body.classList.add("vf-modal-open"), o.closeOnMaskClick && (window.addEventListener("keydown", d), l.value?.addEventListener("click", c));
@@ -329,21 +329,21 @@ const pn = ["id"], mn = {
329
329
  window.removeEventListener("keydown", d), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
330
330
  });
331
331
  function c(m) {
332
- m.target == l.value && E();
332
+ m.target == l.value && g();
333
333
  }
334
334
  function d(m) {
335
335
  if (m.key === "Esc" || m.key === "Escape") {
336
336
  const C = document.querySelectorAll(".vf-modal-wrap");
337
- C[C.length - 1] === l.value && E();
337
+ C[C.length - 1] === l.value && g();
338
338
  }
339
339
  }
340
- function E() {
340
+ function g() {
341
341
  nt(n);
342
342
  }
343
343
  function h() {
344
- return vn(s.value), () => g();
344
+ return vn(s.value), () => w();
345
345
  }
346
- function g() {
346
+ function w() {
347
347
  st(s.value);
348
348
  }
349
349
  function a() {
@@ -370,7 +370,7 @@ const pn = ["id"], mn = {
370
370
  o.closeX ? (b(), k("i", {
371
371
  key: 0,
372
372
  class: "close",
373
- onClick: E
373
+ onClick: g
374
374
  })) : V("", !0)
375
375
  ])) : V("", !0),
376
376
  $("div", hn, [
@@ -473,16 +473,16 @@ function Go(e, t) {
473
473
  return;
474
474
  }
475
475
  const f = document.createElement("div");
476
- f.classList.add("item"), f.style.userSelect = "none", f.innerText = a.title, o.appendChild(f), a.class && f.classList.add(a.class), a.shouldConfirm ? f.addEventListener("click", (m) => g(m, f, a.handler)) : f.addEventListener("click", () => a.handler());
476
+ f.classList.add("item"), f.style.userSelect = "none", f.innerText = a.title, o.appendChild(f), a.class && f.classList.add(a.class), a.shouldConfirm ? f.addEventListener("click", (m) => w(m, f, a.handler)) : f.addEventListener("click", () => a.handler());
477
477
  });
478
- const s = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, c = o.offsetWidth, d = s < c ? e.clientX - c - 1 : e.clientX + 1, E = u < r ? e.clientY - r - 1 : e.clientY + 1;
479
- o.style.left = d + "px", o.style.top = E + "px", setTimeout(() => {
478
+ const s = window.innerWidth - e.clientX, u = window.innerHeight - e.clientY, r = o.offsetHeight, c = o.offsetWidth, d = s < c ? e.clientX - c - 1 : e.clientX + 1, g = u < r ? e.clientY - r - 1 : e.clientY + 1;
479
+ o.style.left = d + "px", o.style.top = g + "px", setTimeout(() => {
480
480
  o.style.width = o.offsetWidth + "px";
481
481
  }, 50);
482
482
  function h() {
483
483
  t.targetClass && l.classList.remove(t.targetClass), l.classList.remove("context-menu-active"), l.style.userSelect = "", n.remove();
484
484
  }
485
- function g(a, f, m) {
485
+ function w(a, f, m) {
486
486
  if (f.classList.contains("pending-confirm"))
487
487
  return m();
488
488
  const C = f.innerHTML;
@@ -551,14 +551,14 @@ function D(e, t) {
551
551
  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;
552
552
  }
553
553
  function se(e, t) {
554
- 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;
555
- if (E && r)
554
+ 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", g = e instanceof D;
555
+ if (g && r)
556
556
  return e.intValue;
557
- if (d || E)
558
- o = E ? e.value : e;
557
+ if (d || g)
558
+ o = g ? e.value : e;
559
559
  else if (typeof e == "string") {
560
- var h = new RegExp("[^-\\d" + l + "]", "g"), g = new RegExp("\\" + l, "g");
561
- o = e.replace(/\((.*)\)/, "-$1").replace(h, "").replace(g, "."), o = o || 0;
560
+ var h = new RegExp("[^-\\d" + l + "]", "g"), w = new RegExp("\\" + l, "g");
561
+ o = e.replace(/\((.*)\)/, "-$1").replace(h, "").replace(w, "."), o = o || 0;
562
562
  } else {
563
563
  if (s)
564
564
  throw Error("Invalid Input");
@@ -567,8 +567,8 @@ function se(e, t) {
567
567
  return r || (o *= c, o = o.toFixed(4)), n ? lt(o) : o;
568
568
  }
569
569
  function Mn(e, t) {
570
- var n = t.pattern, o = t.negativePattern, l = t.symbol, s = t.separator, u = t.decimal, r = t.groups, c = ("" + e).replace(/^-/, "").split("."), d = c[0], E = c[1];
571
- return (e.value >= 0 ? n : o).replace("!", l).replace("#", d.replace(r, "$1" + s) + (E ? u + E : ""));
570
+ var n = t.pattern, o = t.negativePattern, l = t.symbol, s = t.separator, u = t.decimal, r = t.groups, c = ("" + e).replace(/^-/, "").split("."), d = c[0], g = c[1];
571
+ return (e.value >= 0 ? n : o).replace("!", l).replace("#", d.replace(r, "$1" + s) + (g ? u + g : ""));
572
572
  }
573
573
  D.prototype = {
574
574
  /**
@@ -752,12 +752,12 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
752
752
  t({
753
753
  addRemoteOption: Dt
754
754
  });
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) => {
755
+ const r = S(), c = S(), d = S(), g = S(!1), h = S(), w = 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 && (g.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, E) => {
756
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 = [];
757
757
  return s.searchFields ? s.searchFields.forEach((Re) => {
758
758
  i[Re] && oe.push(String(i[Re]).toLowerCase());
759
759
  }) : (oe.push(O), Ne && oe.push(Ne)), {
760
- key: fe.value?.(i) ?? String(w),
760
+ key: fe.value?.(i) ?? String(E),
761
761
  group: p,
762
762
  title: v,
763
763
  subtitle: y,
@@ -766,16 +766,16 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
766
766
  };
767
767
  })), L = T(() => {
768
768
  let i = [...ve.value];
769
- if (g.value) {
770
- const w = a.value.trim().toLowerCase();
771
- if (w.length) {
772
- i = i.filter((y) => y.searchContent.includes(w));
769
+ if (w.value) {
770
+ const E = a.value.trim().toLowerCase();
771
+ if (E.length) {
772
+ i = i.filter((y) => y.searchContent.includes(E));
773
773
  const p = Gt(a.value).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), v = new RegExp(`(${p})`, "ig");
774
774
  i = i.map((y) => ({
775
775
  ...y,
776
776
  title: y.title.replace(v, "<mark>$1</mark>"),
777
777
  subtitle: y.subtitle?.replace(v, "<mark>$1</mark>")
778
- })), B.value && (i.find((O) => O.searchContent === w) !== void 0 || i.push({
778
+ })), B.value && (i.find((O) => O.searchContent === E) !== void 0 || i.push({
779
779
  key: l,
780
780
  title: mt.value ? "Create <strong>" + a.value.trim() + "</strong>..." : a.value.trim()
781
781
  }));
@@ -793,20 +793,20 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
793
793
  options: L.value
794
794
  }
795
795
  ];
796
- const i = jt(L.value.map((p) => p.group ?? "")), w = Ut(L.value, (p) => p.group ?? "");
796
+ const i = jt(L.value.map((p) => p.group ?? "")), E = Ut(L.value, (p) => p.group ?? "");
797
797
  return i.map((p) => ({
798
798
  groupTitle: p,
799
- options: w[p]
799
+ options: E[p]
800
800
  }));
801
801
  });
802
802
  I(() => s.modelValue, me), I(ve, () => {
803
803
  C.value && setTimeout($e, 0);
804
804
  }), I(a, () => {
805
- g.value && !s.remoteSearch && !a.value.trim().length && (g.value = !1);
805
+ w.value && !s.remoteSearch && !a.value.trim().length && (w.value = !1);
806
806
  }), I(C, () => {
807
- C.value ? setTimeout(Ft, 0) : (g.value = !1, a.value = m.value ?? "", d.value && (d.value.style.visibility = "hidden"));
807
+ C.value ? setTimeout(Ft, 0) : (w.value = !1, a.value = m.value ?? "", d.value && (d.value.style.visibility = "hidden"));
808
808
  }), I(L, () => {
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);
809
+ s.modelValue !== null && f.value === null && me(), (x.value !== null || w.value) && !L.value.find((i) => i.key == x.value) && (x.value = L.value[0]?.key ?? o);
810
810
  }), _(async () => {
811
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, () => {
812
812
  const i = We(f.value) && q.value !== null ? q.value(f.value) : f.value;
@@ -819,11 +819,11 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
819
819
  await He(), h.value && u("optionsLoaded", h.value);
820
820
  }
821
821
  async function He() {
822
- const i = s.remoteSearch && g.value && a.value.length ? a.value : null;
823
- E.value = !0, h.value = await s.loadOptions?.(i) ?? [], E.value = !1, Ae();
822
+ const i = s.remoteSearch && w.value && a.value.length ? a.value : null;
823
+ g.value = !0, h.value = await s.loadOptions?.(i) ?? [], g.value = !1, Ae();
824
824
  }
825
825
  function Tt() {
826
- g.value && (He(), g.value = a.value.trim().length > 0);
826
+ w.value && (He(), w.value = a.value.trim().length > 0);
827
827
  }
828
828
  function St(i) {
829
829
  if (i.key == "Escape") {
@@ -832,7 +832,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
832
832
  }
833
833
  if (!(i.key == "ArrowLeft" || i.key == "ArrowRight") && i.key != "Tab") {
834
834
  if (!P.value) {
835
- g.value || i.preventDefault();
835
+ w.value || i.preventDefault();
836
836
  return;
837
837
  }
838
838
  if (i.key == "ArrowUp" || i.key == "ArrowDown")
@@ -843,14 +843,14 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
843
843
  return i.preventDefault(), pe(i.key == "Home" ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER);
844
844
  if (i.key == "Enter") {
845
845
  i.preventDefault();
846
- const w = L.value.find((p) => p.key == x.value);
847
- if (w) return Be(w);
846
+ const E = L.value.find((p) => p.key == x.value);
847
+ if (E) return Be(E);
848
848
  }
849
849
  if (i.key === "Delete" || i.key === "Backspace") {
850
- a.value.length > 1 && (g.value = !0);
850
+ a.value.length > 1 && (w.value = !0);
851
851
  return;
852
852
  }
853
- !i.metaKey && Un.includes(i.key) && (g.value = !0);
853
+ !i.metaKey && Un.includes(i.key) && (w.value = !0);
854
854
  }
855
855
  }
856
856
  function Ct() {
@@ -863,9 +863,9 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
863
863
  return fe.value ? fe.value(f.value) : Mt(i)?.key ?? "";
864
864
  }
865
865
  function Mt(i) {
866
- const w = L.value.find((y) => y.ref === i);
867
- if (w)
868
- return w;
866
+ const E = L.value.find((y) => y.ref === i);
867
+ if (E)
868
+ return E;
869
869
  const p = s.keyExtractor ? (y, O) => s.keyExtractor(y) === s.keyExtractor(O) : we, v = L.value.find((y) => p(y.ref, i));
870
870
  return v || null;
871
871
  }
@@ -876,37 +876,37 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
876
876
  P.value || Ve(), s.optionsListId && d.value?.setAttribute("id", s.optionsListId), Ot();
877
877
  }
878
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);
879
+ const i = r.value.getBoundingClientRect(), E = i.y + i.height + 2, p = i.x, v = d.value, y = window.getComputedStyle(r.value);
880
880
  for (let O in y)
881
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;
882
+ if (v.style.top = E + "px", v.style.left = p + "px", v.style.minWidth = i.width + "px", !y.maxHeight || y.maxHeight == "none") {
883
+ const O = window.innerHeight - E - 12;
884
884
  v.style.maxHeight = O + "px";
885
885
  }
886
886
  v.style.visibility = "visible", document.body.appendChild(v), setTimeout($e, 0);
887
887
  }
888
888
  function $e() {
889
889
  if (!P.value || !x.value) return;
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);
890
+ const i = L.value.findIndex((v) => v.key == x.value), E = d.value, p = E?.querySelectorAll(".option")[i];
891
+ p && (E.scrollTop = p.offsetTop);
892
892
  }
893
893
  function It(i) {
894
894
  x.value = i ? i.key : null;
895
895
  }
896
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;
897
+ const E = L.value.findIndex((O) => O.key == x.value);
898
+ let p = E + i;
899
+ if (p < 0 ? p = 0 : p >= L.value.length && (p = L.value.length - 1), E == p) return;
900
900
  x.value = L.value[p].key;
901
901
  const v = d.value, y = v?.querySelectorAll(".option")[p];
902
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));
903
903
  }
904
904
  function Be(i) {
905
- if (g.value = !1, i.key === o)
905
+ if (w.value = !1, i.key === o)
906
906
  a.value = "", f.value = null, m.value = null;
907
907
  else if (i.key === l) {
908
- const w = a.value.trim();
909
- a.value = "", f.value = null, m.value = null, s.onCreateItem?.(w);
908
+ const E = a.value.trim();
909
+ a.value = "", f.value = null, m.value = null, s.onCreateItem?.(E);
910
910
  } else {
911
911
  const p = ve.value.find((v) => v.key == i.key).ref;
912
912
  f.value = p, m.value = Oe.value(p), a.value = m.value ?? "";
@@ -925,12 +925,12 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
925
925
  for (; i && i.tagName !== "FORM" && i.tagName !== "BODY"; )
926
926
  i = i.parentElement;
927
927
  if (!i) return;
928
- const w = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
929
- if (!w) return;
930
- const p = Array.from(w).findIndex((y) => y === c.value), v = w[p + 1];
928
+ const E = i.querySelectorAll('input, button, textarea, select, [tabindex]:not([tabindex="-1"])');
929
+ if (!E) return;
930
+ const p = Array.from(E).findIndex((y) => y === c.value), v = E[p + 1];
931
931
  v && setTimeout(() => v.focus(), 0);
932
932
  }
933
- return (i, w) => (b(), k("div", {
933
+ return (i, E) => (b(), k("div", {
934
934
  ref_key: "el",
935
935
  ref: r,
936
936
  class: H(["vf-smart-select", { disabled: Le.value, open: C.value }])
@@ -938,7 +938,7 @@ const $n = ["disabled", "placeholder", "required", "name"], Bn = {
938
938
  ie($("input", {
939
939
  ref_key: "searchField",
940
940
  ref: c,
941
- "onUpdate:modelValue": w[0] || (w[0] = (p) => a.value = p),
941
+ "onUpdate:modelValue": E[0] || (E[0] = (p) => a.value = p),
942
942
  type: "text",
943
943
  disabled: Le.value,
944
944
  class: H({ nullable: !!i.nullTitle }),
@@ -1268,8 +1268,8 @@ function Eo(e, t) {
1268
1268
  }
1269
1269
  if (!u && e.attributes.getNamedItem("simplified-date") !== null) {
1270
1270
  let d = null;
1271
- const E = /* @__PURE__ */ new Date();
1272
- E.getFullYear() === s.getFullYear() ? (E.getMonth() !== s.getMonth() || E.getDate() !== s.getDate()) && (d = "M/d") : d = "M/d/yy";
1271
+ const g = /* @__PURE__ */ new Date();
1272
+ g.getFullYear() === s.getFullYear() ? (g.getMonth() !== s.getMonth() || g.getDate() !== s.getDate()) && (d = "M/d") : d = "M/d/yy";
1273
1273
  const h = r ? null : F.defaultTimeFormat;
1274
1274
  u = tt([d, h]).join(" ");
1275
1275
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.28.2",
4
+ "version": "4.29.1",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@eslint/js": "9.30.1",
46
46
  "@nabla/vite-plugin-eslint": "^2.0.5",
47
- "@signal24/openapi-client-codegen": "^2.5.2",
47
+ "@signal24/openapi-client-codegen": "^2.6.0",
48
48
  "@tsconfig/node22": "^22.0.2",
49
49
  "@types/jsdom": "^21.1.7",
50
50
  "@types/lodash": "^4.17.20",
@@ -38,6 +38,7 @@ export interface OverlayInjection<C extends OverlayComponent, R extends Componen
38
38
  }
39
39
 
40
40
  let overlayCount = 0;
41
+
41
42
  const OverlayInjections: OverlayInjection<any, any>[] = reactive([]);
42
43
  watch(OverlayInjections, () => {
43
44
  VfOptions.onOverlaysChanged?.(OverlayInjections.length);
@@ -126,7 +126,7 @@ const loadedOptions = computed(() => props.options ?? remoteOptions.value ?? [])
126
126
 
127
127
  const effectivePrependOptions = computed(() => props.prependOptions ?? []);
128
128
  const effectiveAppendOptions = computed(() => props.appendOptions ?? []);
129
- const effectiveDisabled = computed(() => !!props.disabled || (!isLoaded.value && !props.loadOptions));
129
+ const effectiveDisabled = computed(() => !!props.disabled || (!isLoaded.value && (isLoading.value || !props.loadOptions))); // need to check this. what about with typeahead?
130
130
  const effectiveLoadingText = computed(() => props.loadingText || '...');
131
131
  const effectivePlaceholder = computed(() => {
132
132
  if (!isLoaded.value) {
@@ -1,4 +1,4 @@
1
- import { configureOpenApiClient, type OpenApiClient, type OpenApiClientOptions, OpenApiError } from '@signal24/openapi-client-codegen/browser';
1
+ import { configureOpenApiClient, type OpenApiClient, type OpenApiClientOptions, OpenApiError } from '@signal24/openapi-client-codegen';
2
2
 
3
3
  import { UserError } from '.';
4
4
 
@@ -1,4 +1,4 @@
1
- import { createWatchfulOpenapiClientGenerators } from '@signal24/openapi-client-codegen/node';
1
+ import { createWatchfulOpenapiClientGenerators } from '@signal24/openapi-client-codegen/generator';
2
2
 
3
3
  export function openapiClientGeneratorPlugin(): {
4
4
  name: string;
package/vite.config.ts CHANGED
@@ -30,7 +30,7 @@ export default defineConfig({
30
30
  input: {
31
31
  main: path.resolve(__dirname, 'src/index.ts')
32
32
  },
33
- external: ['date-fns', 'lodash', 'vue', '@vue/shared', '@signal24/openapi-client-codegen/browser'],
33
+ external: ['date-fns', 'lodash', 'vue', '@vue/shared', '@signal24/openapi-client-codegen'],
34
34
  output: {
35
35
  assetFileNames: assetInfo => {
36
36
  if (assetInfo.name === 'main.css') return 'vue-foundation.css';