@signal24/vue-foundation 4.13.4 → 4.13.6

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
- declare function mask(): void;
1
+ declare function mask(): () => void;
2
2
  declare function unmask(): void;
3
- declare function hide(): void;
3
+ declare function hide(): () => void;
4
4
  declare function unhide(): void;
5
5
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
6
6
  id?: string | undefined;
@@ -1,13 +1,13 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var E = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as C, defineProps as _e, defineEmits as Ne, ref as O, computed as _, openBlock as d, createElementBlock as u, createElementVNode as w, toDisplayString as x, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
5
- import { compact as ze, debounce as Xe, isEqual as Ce, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
4
+ import { defineComponent as x, defineProps as _e, defineEmits as Ne, ref as O, computed as _, openBlock as d, createElementBlock as h, createElementVNode as w, toDisplayString as C, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
5
+ import { compact as ze, debounce as Xe, isEqual as xe, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
6
6
  import { escapeHtml as Je } from "@vue/shared";
7
7
  import { escapeHtml as ni } from "@vue/shared";
8
8
  import { installOpenApiClientInterceptors as et, isOpenApiError as tt } from "@signal24/openapi-client-codegen/browser";
9
9
  import { format as G } from "date-fns";
10
- const nt = C({
10
+ const nt = x({
11
11
  setup() {
12
12
  const e = _e();
13
13
  Ne(["update:modelValue"]);
@@ -33,7 +33,7 @@ const nt = C({
33
33
  this.options = await this.props.loadFn();
34
34
  }
35
35
  }
36
- }), xe = (e, t) => {
36
+ }), Ce = (e, t) => {
37
37
  const n = e.__vccOpts || e;
38
38
  for (const [i, s] of t)
39
39
  n[i] = s;
@@ -45,26 +45,26 @@ const nt = C({
45
45
  key: 0,
46
46
  value: null
47
47
  }, ot = ["value"];
48
- function lt(e, t, n, i, s, o) {
49
- return e.renderOptions ? j((d(), u("select", {
48
+ function rt(e, t, n, i, s, o) {
49
+ return e.renderOptions ? j((d(), h("select", {
50
50
  key: 1,
51
- "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
51
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => e.selectedItem = l)
52
52
  }, [
53
- e.props.nullText ? (d(), u("option", st, x(e.props.nullText), 1)) : b("", !0),
54
- (d(!0), u(U, null, J(e.renderOptions, (r, l) => {
53
+ e.props.nullText ? (d(), h("option", st, C(e.props.nullText), 1)) : b("", !0),
54
+ (d(!0), h(U, null, J(e.renderOptions, (l, r) => {
55
55
  var a;
56
- return d(), u("option", {
57
- key: l,
58
- value: (a = e.options) == null ? void 0 : a[l]
59
- }, x(r), 9, ot);
56
+ return d(), h("option", {
57
+ key: r,
58
+ value: (a = e.options) == null ? void 0 : a[r]
59
+ }, C(l), 9, ot);
60
60
  }), 128))
61
61
  ], 512)), [
62
62
  [Re, e.selectedItem]
63
- ]) : (d(), u("select", it, [
64
- w("option", null, x(e.props.loadingText || "Loading..."), 1)
63
+ ]) : (d(), h("select", it, [
64
+ w("option", null, C(e.props.loadingText || "Loading..."), 1)
65
65
  ]));
66
66
  }
67
- const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
67
+ const Mn = /* @__PURE__ */ Ce(nt, [["render", rt]]), lt = /* @__PURE__ */ x({
68
68
  __name: "overlay-anchor",
69
69
  props: {
70
70
  overlayId: {},
@@ -72,27 +72,27 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
72
72
  },
73
73
  setup(e) {
74
74
  const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = O({ visibility: "hidden", top: "0", left: "0" }), s = O([]), o = ee();
75
- L(r);
76
- function r() {
77
- const p = o.vnode.el, { styles: g, classes: m } = l(p, n);
75
+ L(l);
76
+ function l() {
77
+ const p = o.vnode.el, { styles: g, classes: m } = r(p, n);
78
78
  i.value = g, s.value = m;
79
79
  }
80
- function l(p, g) {
81
- const m = t.anchor instanceof HTMLElement ? {} : t.anchor, y = g.getBoundingClientRect(), f = p.getBoundingClientRect();
82
- m.matchWidth && (f.width = y.width), m.matchHeight && (f.height = y.height);
83
- const h = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
80
+ function r(p, g) {
81
+ const m = t.anchor instanceof HTMLElement ? {} : t.anchor, v = g.getBoundingClientRect(), f = p.getBoundingClientRect();
82
+ m.matchWidth && (f.width = v.width), m.matchHeight && (f.height = v.height);
83
+ const u = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
84
84
  let c, T;
85
85
  if (m.y === "center")
86
- c = y.top + y.height / 2 - f.height / 2, h.push("anchored-center-y");
86
+ c = v.top + v.height / 2 - f.height / 2, u.push("anchored-center-y");
87
87
  else {
88
- const H = (y.bottom + f.height < window.innerHeight || m.y === "below") && m.y !== "above";
89
- c = H ? y.bottom : y.top - f.height, h.push(H ? "anchored-top" : "anchored-bottom");
88
+ const H = (v.bottom + f.height < window.innerHeight || m.y === "below") && m.y !== "above";
89
+ c = H ? v.bottom : v.top - f.height, u.push(H ? "anchored-top" : "anchored-bottom");
90
90
  }
91
91
  if (m.x === "center")
92
- T = y.left + y.width / 2 - f.width / 2, h.push("anchored-center-x");
92
+ T = v.left + v.width / 2 - f.width / 2, u.push("anchored-center-x");
93
93
  else {
94
- const H = (y.left + f.width < window.innerWidth || m.x === "left") && m.x !== "right";
95
- T = H ? y.left : y.right - f.width, h.push(H ? "anchored-left" : "anchored-right");
94
+ const H = (v.left + f.width < window.innerWidth || m.x === "left") && m.x !== "right";
95
+ T = H ? v.left : v.right - f.width, u.push(H ? "anchored-left" : "anchored-right");
96
96
  }
97
97
  return {
98
98
  styles: {
@@ -101,7 +101,7 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
101
101
  ...m.matchWidth ? { width: `${f.width}px` } : {},
102
102
  ...m.matchHeight ? { height: `${f.height}px` } : {}
103
103
  },
104
- classes: h
104
+ classes: u
105
105
  };
106
106
  }
107
107
  function a() {
@@ -111,7 +111,7 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
111
111
  setTimeout(() => {
112
112
  window.addEventListener("click", a);
113
113
  }, 10);
114
- }), (p, g) => (d(), u("div", {
114
+ }), (p, g) => (d(), h("div", {
115
115
  class: k(["vf-overlay-anchor", s.value]),
116
116
  style: Ke(i.value),
117
117
  onClick: te(a, ["stop"])
@@ -121,7 +121,7 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
121
121
  }
122
122
  });
123
123
  let at = 0;
124
- const S = je([]), In = C({
124
+ const S = je([]), In = x({
125
125
  setup() {
126
126
  return () => W("div", [
127
127
  J(S, (e) => W(Ue, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
@@ -131,13 +131,13 @@ const S = je([]), In = C({
131
131
  function ie(e, t, n) {
132
132
  const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
133
133
  i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
134
- const s = String(++at), o = We(e), r = W(o, t), l = n != null && n.anchor ? W(rt, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, a = {
134
+ const s = String(++at), o = We(e), l = W(o, t), r = n != null && n.anchor ? W(lt, { overlayId: s, anchor: n.anchor }, () => [l]) : void 0, a = {
135
135
  id: s,
136
136
  component: o,
137
137
  props: t,
138
138
  options: n ?? {},
139
- vnode: r,
140
- wrapperVnode: l
139
+ vnode: l,
140
+ wrapperVnode: r
141
141
  };
142
142
  return S.push(a), a;
143
143
  }
@@ -164,10 +164,10 @@ function P(e) {
164
164
  async function se(e, t, n) {
165
165
  return new Promise((i) => {
166
166
  let s = null;
167
- const r = { ...t, callback: (l) => {
168
- P(s), i(l);
167
+ const l = { ...t, callback: (r) => {
168
+ P(s), i(r);
169
169
  } };
170
- s = ie(e, r, n);
170
+ s = ie(e, l, n);
171
171
  });
172
172
  }
173
173
  function q(e, t) {
@@ -257,9 +257,9 @@ function ft(e, t, n) {
257
257
  const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0];
258
258
  let o;
259
259
  s && (o = s.tagName === "INPUT" ? s.value : s.innerHTML, s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...");
260
- const l = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
261
- return l.forEach((a) => a.setAttribute("disabled", "disabled")), i[Q] = {
262
- disabledElements: l,
260
+ const r = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
261
+ return r.forEach((a) => a.setAttribute("disabled", "disabled")), i[Q] = {
262
+ disabledElements: r,
263
263
  waitButton: s,
264
264
  buttonHtml: o
265
265
  }, () => Ie(i);
@@ -278,7 +278,7 @@ const pt = ["id"], mt = {
278
278
  }, vt = { class: "vf-modal-content" }, yt = {
279
279
  key: 1,
280
280
  class: "vf-modal-footer"
281
- }, gt = /* @__PURE__ */ C({
281
+ }, gt = /* @__PURE__ */ x({
282
282
  __name: "modal",
283
283
  props: {
284
284
  id: {},
@@ -290,8 +290,8 @@ const pt = ["id"], mt = {
290
290
  emits: ["formSubmit"],
291
291
  setup(e, { expose: t }) {
292
292
  const n = ee(), i = e;
293
- t({ mask: m, unmask: y, hide: f, unhide: h });
294
- const s = O(), o = O(), r = O(!1), l = _(() => ze([i.class, r.value && "hidden"]));
293
+ t({ mask: m, unmask: v, hide: f, unhide: u });
294
+ const s = O(), o = O(), l = O(!1), r = _(() => ze([i.class, l.value && "hidden"]));
295
295
  L(() => {
296
296
  var c;
297
297
  document.body.classList.add("vf-modal-open"), i.closeOnMaskClick && (window.addEventListener("keydown", p), (c = s.value) == null || c.addEventListener("click", a));
@@ -311,20 +311,20 @@ const pt = ["id"], mt = {
311
311
  Le(n);
312
312
  }
313
313
  function m() {
314
- ft(o.value);
314
+ return ft(o.value), () => v();
315
315
  }
316
- function y() {
316
+ function v() {
317
317
  Ie(o.value);
318
318
  }
319
319
  function f() {
320
- r.value = !0;
320
+ return l.value = !0, () => u();
321
321
  }
322
- function h() {
323
- r.value = !1;
322
+ function u() {
323
+ l.value = !1;
324
324
  }
325
- return (c, T) => (d(), u("div", {
325
+ return (c, T) => (d(), h("div", {
326
326
  id: c.id,
327
- class: k(["vf-overlay vf-modal-wrap", l.value]),
327
+ class: k(["vf-overlay vf-modal-wrap", r.value]),
328
328
  ref_key: "overlay",
329
329
  ref: s
330
330
  }, [
@@ -335,9 +335,9 @@ const pt = ["id"], mt = {
335
335
  ref_key: "form",
336
336
  ref: o
337
337
  }, [
338
- c.$slots.header ? (d(), u("div", mt, [
338
+ c.$slots.header ? (d(), h("div", mt, [
339
339
  K(c.$slots, "header"),
340
- i.closeX ? (d(), u("i", {
340
+ i.closeX ? (d(), h("i", {
341
341
  key: 0,
342
342
  class: "close",
343
343
  onClick: g
@@ -346,13 +346,13 @@ const pt = ["id"], mt = {
346
346
  w("div", vt, [
347
347
  K(c.$slots, "default")
348
348
  ]),
349
- c.$slots.footer ? (d(), u("div", yt, [
349
+ c.$slots.footer ? (d(), h("div", yt, [
350
350
  K(c.$slots, "footer")
351
351
  ])) : b("", !0)
352
352
  ], 34)
353
353
  ], 10, pt));
354
354
  }
355
- }), Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ C({
355
+ }), Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
356
356
  __name: "alert-modal",
357
357
  props: {
358
358
  isBare: { type: Boolean },
@@ -371,11 +371,11 @@ const pt = ["id"], mt = {
371
371
  class: k(["vf-alert", i.classes])
372
372
  }, Pe({
373
373
  default: Y(() => [
374
- i.isHtml ? (d(), u("div", {
374
+ i.isHtml ? (d(), h("div", {
375
375
  key: 0,
376
376
  innerHtml: i.message,
377
377
  class: "user-message"
378
- }, null, 8, Et)) : (d(), u("div", {
378
+ }, null, 8, Et)) : (d(), h("div", {
379
379
  key: 1,
380
380
  innerText: n.value
381
381
  }, null, 8, Tt))
@@ -385,15 +385,15 @@ const pt = ["id"], mt = {
385
385
  i.title ? {
386
386
  name: "header",
387
387
  fn: Y(() => [
388
- w("h1", null, x(i.title), 1)
388
+ w("h1", null, C(i.title), 1)
389
389
  ]),
390
390
  key: "0"
391
391
  } : void 0,
392
392
  i.isBare ? void 0 : {
393
393
  name: "footer",
394
394
  fn: Y(() => [
395
- i.shouldConfirm ? (d(), u(U, { key: 0 }, [
396
- j((d(), u("button", {
395
+ i.shouldConfirm ? (d(), h(U, { key: 0 }, [
396
+ j((d(), h("button", {
397
397
  class: "primary",
398
398
  onClick: s[0] || (s[0] = () => i.callback(!0))
399
399
  }, [
@@ -405,7 +405,7 @@ const pt = ["id"], mt = {
405
405
  class: "default",
406
406
  onClick: s[1] || (s[1] = () => i.callback(!1))
407
407
  }, "Cancel")
408
- ], 64)) : j((d(), u("button", {
408
+ ], 64)) : j((d(), h("button", {
409
409
  key: 1,
410
410
  class: "default",
411
411
  onClick: s[2] || (s[2] = () => i.callback(!0))
@@ -428,11 +428,11 @@ function Ot() {
428
428
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
429
429
  return R(wt);
430
430
  }
431
- const v = [];
431
+ const y = [];
432
432
  for (let e = 0; e < 256; ++e)
433
- v.push((e + 256).toString(16).slice(1));
433
+ y.push((e + 256).toString(16).slice(1));
434
434
  function bt(e, t = 0) {
435
- return v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]];
435
+ return y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]];
436
436
  }
437
437
  const kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
438
438
  randomUUID: kt
@@ -453,10 +453,10 @@ function St(e, t, n) {
453
453
  function Rn(e) {
454
454
  return e.replace(/\n/g, "<br>");
455
455
  }
456
- function Ct(e) {
456
+ function xt(e) {
457
457
  return e.replace(/_/g, " ");
458
458
  }
459
- function xt(e) {
459
+ function Ct(e) {
460
460
  const t = e.replace(/\D/g, "").replace(/^1/, "");
461
461
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
462
462
  }
@@ -543,16 +543,16 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
543
543
  },
544
544
  optionsDescriptors() {
545
545
  return this.allOptions.map((e, t) => {
546
- var l, a;
547
- const n = this.formatter(e), i = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), s = n ? n.trim().toLowerCase() : "", o = i ? i.trim().toLowerCase() : "", r = [];
546
+ var r, a;
547
+ const n = this.formatter(e), i = (r = this.subtitleFormatter) == null ? void 0 : r.call(this, e), s = n ? n.trim().toLowerCase() : "", o = i ? i.trim().toLowerCase() : "", l = [];
548
548
  return this.searchFields ? this.searchFields.forEach((p) => {
549
- e[p] && r.push(String(e[p]).toLowerCase());
550
- }) : (r.push(s), o && r.push(o)), {
549
+ e[p] && l.push(String(e[p]).toLowerCase());
550
+ }) : (l.push(s), o && l.push(o)), {
551
551
  // eslint-disable-next-line vue/no-use-computed-property-like-method
552
552
  key: ((a = this.effectiveKeyExtractor) == null ? void 0 : a.call(this, e)) ?? String(t),
553
553
  title: n,
554
554
  subtitle: i,
555
- searchContent: r.join(""),
555
+ searchContent: l.join(""),
556
556
  ref: e
557
557
  };
558
558
  });
@@ -668,11 +668,11 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
668
668
  return this.effectiveKeyExtractor ? this.effectiveKeyExtractor(this.selectedOption) : ((t = this.getOptionDescriptor(e)) == null ? void 0 : t.key) ?? "";
669
669
  },
670
670
  getOptionDescriptor(e) {
671
- const t = this.effectiveOptions.find((i) => i.ref === e);
671
+ const t = this.effectiveOptions.find((s) => s.ref === e);
672
672
  if (t)
673
673
  return t;
674
- const n = this.effectiveOptions.find((i) => Ce(i.ref, e));
675
- return n || null;
674
+ const n = this.keyExtractor ? (s, o) => this.keyExtractor(s) === this.keyExtractor(o) : xe, i = this.effectiveOptions.find((s) => n(s.ref, e));
675
+ return i || null;
676
676
  },
677
677
  handleInputBlurred() {
678
678
  this.debug || (!this.searchText.length && this.nullTitle && (this.selectedOption = null, this.selectedOptionTitle = null), this.shouldDisplayOptions = !1);
@@ -740,50 +740,50 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
740
740
  class: "no-results"
741
741
  };
742
742
  function _t(e, t, n, i, s, o) {
743
- const r = Oe("disabled");
744
- return d(), u("div", {
743
+ const l = Oe("disabled");
744
+ return d(), h("div", {
745
745
  class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
746
746
  }, [
747
747
  j(w("input", {
748
- "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
748
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => e.searchText = r),
749
749
  ref: "searchField",
750
750
  type: "text",
751
751
  class: k({ nullable: !!n.nullTitle }),
752
- onKeydown: t[1] || (t[1] = (...l) => o.handleKeyDown && o.handleKeyDown(...l)),
752
+ onKeydown: t[1] || (t[1] = (...r) => o.handleKeyDown && o.handleKeyDown(...r)),
753
753
  placeholder: o.effectivePlaceholder,
754
- onFocus: t[2] || (t[2] = (...l) => o.handleInputFocused && o.handleInputFocused(...l)),
755
- onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l)),
754
+ onFocus: t[2] || (t[2] = (...r) => o.handleInputFocused && o.handleInputFocused(...r)),
755
+ onBlur: t[3] || (t[3] = (...r) => o.handleInputBlurred && o.handleInputBlurred(...r)),
756
756
  required: n.required
757
757
  }, null, 42, Ht), [
758
758
  [qe, e.searchText],
759
- [r, o.effectiveDisabled]
759
+ [l, o.effectiveDisabled]
760
760
  ]),
761
- e.shouldDisplayOptions ? (d(), u("div", Dt, [
762
- e.isLoaded ? (d(), u(U, { key: 1 }, [
763
- (d(!0), u(U, null, J(o.effectiveOptions, (l) => (d(), u("div", {
764
- key: String(l.key),
761
+ e.shouldDisplayOptions ? (d(), h("div", Dt, [
762
+ e.isLoaded ? (d(), h(U, { key: 1 }, [
763
+ (d(!0), h(U, null, J(o.effectiveOptions, (r) => (d(), h("div", {
764
+ key: String(r.key),
765
765
  class: k(["option", {
766
- highlighted: e.highlightedOptionKey === l.key
766
+ highlighted: e.highlightedOptionKey === r.key
767
767
  }]),
768
- onMousemove: (a) => o.handleOptionHover(l),
769
- onMousedown: (a) => o.selectOption(l)
768
+ onMousemove: (a) => o.handleOptionHover(r),
769
+ onMousedown: (a) => o.selectOption(r)
770
770
  }, [
771
771
  w("div", {
772
772
  class: "title",
773
- innerHTML: l.title
773
+ innerHTML: r.title
774
774
  }, null, 8, Bt),
775
- l.subtitle ? (d(), u("div", {
775
+ r.subtitle ? (d(), h("div", {
776
776
  key: 0,
777
777
  class: "subtitle",
778
- innerHTML: l.subtitle
778
+ innerHTML: r.subtitle
779
779
  }, null, 8, Vt)) : b("", !0)
780
780
  ], 42, $t))), 128)),
781
- !o.effectiveOptions.length && e.searchText ? (d(), u("div", Ft, x(o.effectiveNoResultsText), 1)) : b("", !0)
782
- ], 64)) : (d(), u("div", At, "Loading..."))
781
+ !o.effectiveOptions.length && e.searchText ? (d(), h("div", Ft, C(o.effectiveNoResultsText), 1)) : b("", !0)
782
+ ], 64)) : (d(), h("div", At, "Loading..."))
783
783
  ], 512)) : b("", !0)
784
784
  ], 2);
785
785
  }
786
- const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
786
+ const Nt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ x({
787
787
  __name: "ez-smart-select",
788
788
  props: {
789
789
  modelValue: {},
@@ -794,27 +794,27 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
794
794
  },
795
795
  emits: ["update:modelValue"],
796
796
  setup(e, { emit: t }) {
797
- const n = e, i = _(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
798
- value: l,
797
+ const n = e, i = _(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, a]) => ({
798
+ value: r,
799
799
  label: a
800
- }))), s = _(() => n.formatter ? (l) => {
800
+ }))), s = _(() => n.formatter ? (r) => {
801
801
  var a;
802
- return (a = n.formatter) == null ? void 0 : a.call(n, l.label);
803
- } : (l) => l.label), o = t, r = O(i.value.find((l) => l.value === n.modelValue) ?? null);
802
+ return (a = n.formatter) == null ? void 0 : a.call(n, r.label);
803
+ } : (r) => r.label), o = t, l = O(i.value.find((r) => r.value === n.modelValue) ?? null);
804
804
  return ce(
805
805
  () => n.modelValue,
806
- (l) => {
807
- r.value = i.value.find((a) => a.value === l) ?? null;
806
+ (r) => {
807
+ l.value = i.value.find((a) => a.value === r) ?? null;
808
808
  }
809
- ), ce(r, (l) => {
809
+ ), ce(l, (r) => {
810
810
  var a;
811
- o("update:modelValue", l ? ((a = i.value.find((p) => Ce(p, l))) == null ? void 0 : a.value) ?? null : null);
812
- }), (l, a) => (d(), be(Nt, {
813
- modelValue: r.value,
814
- "onUpdate:modelValue": a[0] || (a[0] = (p) => r.value = p),
811
+ o("update:modelValue", r ? ((a = i.value.find((p) => xe(p, r))) == null ? void 0 : a.value) ?? null : null);
812
+ }), (r, a) => (d(), be(Nt, {
813
+ modelValue: l.value,
814
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => l.value = p),
815
815
  options: i.value,
816
816
  formatter: s.value,
817
- "null-title": l.nullTitle
817
+ "null-title": r.nullTitle
818
818
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
819
819
  }
820
820
  }), Rt = { class: "content" }, Kt = { class: "message" }, jt = {
@@ -823,7 +823,7 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
823
823
  }, Ut = {
824
824
  key: 0,
825
825
  class: "progress-bar"
826
- }, Wt = /* @__PURE__ */ C({
826
+ }, Wt = /* @__PURE__ */ x({
827
827
  __name: "toast",
828
828
  props: {
829
829
  message: {},
@@ -846,15 +846,15 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
846
846
  duration: s * 1e3,
847
847
  easing: "linear"
848
848
  }), setTimeout(() => t.callback(), s * 1e3);
849
- }), (s, o) => (d(), u("div", {
849
+ }), (s, o) => (d(), h("div", {
850
850
  class: k(["vf-toast", s.className]),
851
851
  onClick: te(n, ["stop"])
852
852
  }, [
853
853
  w("div", Rt, [
854
- w("div", Kt, x(s.message), 1),
855
- s.disableClose ? b("", !0) : (d(), u("div", jt, "x"))
854
+ w("div", Kt, C(s.message), 1),
855
+ s.disableClose ? b("", !0) : (d(), h("div", jt, "x"))
856
856
  ]),
857
- s.durationSecs !== null ? (d(), u("div", Ut, [
857
+ s.durationSecs !== null ? (d(), h("div", Ut, [
858
858
  w("div", {
859
859
  ref_key: "progressInnerEl",
860
860
  ref: i,
@@ -885,7 +885,7 @@ function Xt(e) {
885
885
  return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : nn(Number(e));
886
886
  }
887
887
  function Yt(e) {
888
- return e && xt(e);
888
+ return e && Ct(e);
889
889
  }
890
890
  function Zt(e) {
891
891
  return e ? Ye(e) : null;
@@ -897,7 +897,7 @@ function Qt(e) {
897
897
  return e ? e.toUpperCase() : null;
898
898
  }
899
899
  function Jt(e) {
900
- return e ? Ct(e) : null;
900
+ return e ? xt(e) : null;
901
901
  }
902
902
  function en(e, t = 1) {
903
903
  return Lt(e, t);
@@ -933,25 +933,25 @@ function qn(e, t) {
933
933
  c.classList.add("separator"), i.appendChild(c);
934
934
  return;
935
935
  }
936
- const h = document.createElement("div");
937
- h.classList.add("item"), h.style.userSelect = "none", h.innerText = f.title, i.appendChild(h), f.class && h.classList.add(f.class), f.shouldConfirm ? h.addEventListener("click", (c) => y(c, h, f.handler)) : h.addEventListener("click", () => f.handler());
936
+ const u = document.createElement("div");
937
+ u.classList.add("item"), u.style.userSelect = "none", u.innerText = f.title, i.appendChild(u), f.class && u.classList.add(f.class), f.shouldConfirm ? u.addEventListener("click", (c) => v(c, u, f.handler)) : u.addEventListener("click", () => f.handler());
938
938
  });
939
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, a = i.offsetWidth, p = o < a ? e.clientX - a - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
939
+ const o = window.innerWidth - e.clientX, l = window.innerHeight - e.clientY, r = i.offsetHeight, a = i.offsetWidth, p = o < a ? e.clientX - a - 1 : e.clientX + 1, g = l < r ? e.clientY - r - 1 : e.clientY + 1;
940
940
  i.style.left = p + "px", i.style.top = g + "px", setTimeout(() => {
941
941
  i.style.width = i.offsetWidth + "px";
942
942
  }, 50);
943
943
  function m() {
944
944
  t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
945
945
  }
946
- function y(f, h, c) {
947
- if (h.classList.contains("pending-confirm"))
946
+ function v(f, u, c) {
947
+ if (u.classList.contains("pending-confirm"))
948
948
  return c();
949
- const T = h.innerHTML;
950
- h.classList.add("pending-confirm"), h.innerText = "Confirm";
949
+ const T = u.innerHTML;
950
+ u.classList.add("pending-confirm"), u.innerText = "Confirm";
951
951
  const I = () => {
952
- h.classList.remove("pending-confirm"), h.innerHTML = T, h.removeEventListener("mouseleave", I);
952
+ u.classList.remove("pending-confirm"), u.innerHTML = T, u.removeEventListener("mouseleave", I);
953
953
  };
954
- h.addEventListener("mouseleave", I), f.stopPropagation();
954
+ u.addEventListener("mouseleave", I), f.stopPropagation();
955
955
  }
956
956
  }
957
957
  const tn = (e) => new Promise((t) => setTimeout(t, e)), zn = (e) => tn(e * 1e3);
@@ -978,7 +978,7 @@ function Zn(e) {
978
978
  }
979
979
  });
980
980
  }
981
- const le = Symbol("HookState");
981
+ const re = Symbol("HookState");
982
982
  function Gn(e, t) {
983
983
  const n = t ?? ee();
984
984
  L(() => sn(n, e), n), ke(() => on(n), n), Se(() => pe(n), n), ne(() => pe(n), n);
@@ -989,16 +989,16 @@ function sn(e, t) {
989
989
  const i = De(e.vnode.el);
990
990
  i ? n.ancestor = new V(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
991
991
  }
992
- t.windowScrolledToBottom && (n.window = new V(window, t.windowScrolledToBottom)), e[le] = n;
992
+ t.windowScrolledToBottom && (n.window = new V(window, t.windowScrolledToBottom)), e[re] = n;
993
993
  }
994
994
  function on(e) {
995
995
  var n, i, s;
996
- const t = e[le];
996
+ const t = e[re];
997
997
  (n = t == null ? void 0 : t.el) == null || n.install(), (i = t == null ? void 0 : t.ancestor) == null || i.install(), (s = t == null ? void 0 : t.window) == null || s.install();
998
998
  }
999
999
  function pe(e) {
1000
1000
  var n, i, s;
1001
- const t = e[le];
1001
+ const t = e[re];
1002
1002
  (n = t == null ? void 0 : t.el) == null || n.uninstall(), (i = t == null ? void 0 : t.ancestor) == null || i.uninstall(), (s = t == null ? void 0 : t.window) == null || s.uninstall();
1003
1003
  }
1004
1004
  const Z = ["auto", "scroll"];
@@ -1028,7 +1028,7 @@ class V {
1028
1028
  function Qn(e) {
1029
1029
  L(() => window.addEventListener("resize", e)), ke(() => window.addEventListener("resize", e)), Se(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1030
1030
  }
1031
- const ln = {
1031
+ const rn = {
1032
1032
  mounted: ve,
1033
1033
  updated: ve
1034
1034
  }, me = Symbol("HasAutoFocused");
@@ -1039,13 +1039,13 @@ function ve(e, t) {
1039
1039
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
1040
1040
  setTimeout(() => n.focus(), 10);
1041
1041
  }
1042
- const rn = {
1042
+ const ln = {
1043
1043
  mounted: an
1044
1044
  }, A = Symbol("ConfirmState");
1045
1045
  function an(e, t) {
1046
1046
  e.addEventListener("click", (n) => {
1047
- var r, l;
1048
- const i = Date.now(), s = ((r = t.value) == null ? void 0 : r.text) !== void 0 ? t.value.text : "Confirm";
1047
+ var l, r;
1048
+ const i = Date.now(), s = ((l = t.value) == null ? void 0 : l.text) !== void 0 ? t.value.text : "Confirm";
1049
1049
  if (e[A]) {
1050
1050
  if (i - e[A].initTime < 300)
1051
1051
  return;
@@ -1061,7 +1061,7 @@ function an(e, t) {
1061
1061
  s && (e.innerHTML = o.preconfirmHtml), (a = t.value) != null && a.class && e.classList.remove(t.value.class), e.blur(), e.removeEventListener("mouseout", o.resetHandler), delete e[A];
1062
1062
  }
1063
1063
  };
1064
- e[A] = o, s && (e.innerHTML = s), (l = t.value) != null && l.class && e.classList.add(t.value.class), e.addEventListener("mouseout", o.resetHandler);
1064
+ e[A] = o, s && (e.innerHTML = s), (r = t.value) != null && r.class && e.classList.add(t.value.class), e.addEventListener("mouseout", o.resetHandler);
1065
1065
  });
1066
1066
  }
1067
1067
  const cn = {
@@ -1089,14 +1089,14 @@ function hn(e, t) {
1089
1089
  let n = "";
1090
1090
  const i = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), s = e.attributes.getNamedItem("local") !== null ? i.replace(/Z$/, "") : i.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(s);
1091
1091
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1092
- let r = (p = e.attributes.getNamedItem("format")) == null ? void 0 : p.value;
1093
- if (!r && e.attributes.getNamedItem("relative-date") !== null) {
1092
+ let l = (p = e.attributes.getNamedItem("format")) == null ? void 0 : p.value;
1093
+ if (!l && e.attributes.getNamedItem("relative-date") !== null) {
1094
1094
  const g = /* @__PURE__ */ new Date();
1095
- g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1095
+ g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", l = "HH:mm");
1096
1096
  }
1097
- r || (e.attributes.getNamedItem("date-only") !== null ? r = M.defaultDateFormat : r = M.defaultDateTimeFormat);
1098
- let l = G(o, r);
1099
- return n && (l = n + " " + l), l;
1097
+ l || (e.attributes.getNamedItem("date-only") !== null ? l = M.defaultDateFormat : l = M.defaultDateTimeFormat);
1098
+ let r = G(o, l);
1099
+ return n && (r = n + " " + r), r;
1100
1100
  }
1101
1101
  const fn = {
1102
1102
  beforeMount: ge,
@@ -1113,19 +1113,19 @@ const mn = {
1113
1113
  beforeMount: Ee,
1114
1114
  updated: Ee,
1115
1115
  unmounted: $e
1116
- }, N = Symbol("HasAutoFocused"), re = [];
1116
+ }, N = Symbol("HasAutoFocused"), le = [];
1117
1117
  function vn() {
1118
- re.forEach(Ae);
1118
+ le.forEach(Ae);
1119
1119
  }
1120
1120
  setInterval(vn, 1e3);
1121
1121
  function Ee(e, t) {
1122
- var r;
1122
+ var l;
1123
1123
  if (t.value == t.oldValue)
1124
1124
  return;
1125
1125
  if (!t.value)
1126
1126
  return $e(e);
1127
- const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1128
- e[N] || re.push(e), e[N] = {
1127
+ const n = new Date(t.value), i = (l = e.attributes.getNamedItem("base-time")) == null ? void 0 : l.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
1128
+ e[N] || le.push(e), e[N] = {
1129
1129
  startTs: s,
1130
1130
  includeSeconds: o
1131
1131
  }, Ae(e);
@@ -1135,7 +1135,7 @@ function Ae(e) {
1135
1135
  e.innerText = yn(n, t.includeSeconds);
1136
1136
  }
1137
1137
  function $e(e) {
1138
- e[N] && (Qe(re, e), delete e[N]), e.innerText = "-";
1138
+ e[N] && (Qe(le, e), delete e[N]), e.innerText = "-";
1139
1139
  }
1140
1140
  function yn(e, t) {
1141
1141
  const n = [], i = Math.floor(e / 86400);
@@ -1222,8 +1222,8 @@ class wn {
1222
1222
  }
1223
1223
  handleMouseMove(t) {
1224
1224
  const n = this.tipEl.offsetWidth, i = this.tipEl.offsetHeight, s = window.innerWidth, o = window.innerHeight;
1225
- let r = t.pageX + 10, l = t.pageY + 20;
1226
- r + n > s && (r = t.pageX - 5 - n), l + i > o && (l = t.pageY - 5 - i), this.tipEl.style.left = r + "px", this.tipEl.style.top = l + "px", this.lastMoveEvt = t;
1225
+ let l = t.pageX + 10, r = t.pageY + 20;
1226
+ l + n > s && (l = t.pageX - 5 - n), r + i > o && (r = t.pageY - 5 - i), this.tipEl.style.left = l + "px", this.tipEl.style.top = r + "px", this.lastMoveEvt = t;
1227
1227
  }
1228
1228
  checkMoveEvent() {
1229
1229
  var t;
@@ -1234,7 +1234,7 @@ class wn {
1234
1234
  }
1235
1235
  }
1236
1236
  function On(e) {
1237
- e.directive("autofocus", ln), e.directive("confirm-button", rn), e.directive("date-input", cn), e.directive("datetime", un), e.directive("disabled", fn), e.directive("duration", mn), e.directive("infinite-scroll", gn), e.directive("readonly", En), e.directive("tooltip", Tn);
1237
+ e.directive("autofocus", rn), e.directive("confirm-button", ln), e.directive("date-input", cn), e.directive("datetime", un), e.directive("disabled", fn), e.directive("duration", mn), e.directive("infinite-scroll", gn), e.directive("readonly", En), e.directive("tooltip", Tn);
1238
1238
  }
1239
1239
  function Jn(e) {
1240
1240
  On(e);
@@ -1251,7 +1251,7 @@ export {
1251
1251
  Bn as configureVf,
1252
1252
  Wn as createFilters,
1253
1253
  ie as createOverlayInjection,
1254
- Ct as desnakeCase,
1254
+ xt as desnakeCase,
1255
1255
  dt as dismissOverlayInjectionById,
1256
1256
  Hn as dismissOverlayInjectionByInstance,
1257
1257
  Le as dismissOverlayInjectionByInternalInstance,
@@ -1259,7 +1259,7 @@ export {
1259
1259
  ni as escapeHtml,
1260
1260
  ut as formatError,
1261
1261
  nn as formatNumber,
1262
- xt as formatPhone,
1262
+ Ct as formatPhone,
1263
1263
  Lt as formatUSCurrency,
1264
1264
  Fn as handleError,
1265
1265
  Vn as handleErrorAndAlert,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.13.4",
4
+ "version": "4.13.6",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -82,6 +82,7 @@ function closeParent() {
82
82
 
83
83
  function mask() {
84
84
  maskForm(form.value!);
85
+ return () => unmask();
85
86
  }
86
87
 
87
88
  function unmask() {
@@ -90,6 +91,7 @@ function unmask() {
90
91
 
91
92
  function hide() {
92
93
  isHidden.value = true;
94
+ return () => unhide();
93
95
  }
94
96
 
95
97
  function unhide() {
@@ -400,11 +400,14 @@ export default {
400
400
  return matchedRef;
401
401
  }
402
402
 
403
- // for reasons I've yet to determine, the prepend options, although they are wrapped by proxies and have identical content,
404
- // are not the same proxy object as selectedOption once assigned -- even though the loaded data *is* the same. I've tried
405
- // setting them as reactive using the same method (via data props rather than computed) and it didn't change anything.
406
- // therefore, falling back to an isEqual check here when there's no equal object
407
- const matchedObj = this.effectiveOptions.find(o => isEqual(o.ref, option));
403
+ // didn't find an object match, so we'll try a content match. a couple reasons:
404
+ // 1) the initial selection may have come from an owning object and the object as a whole may differ from the full content list
405
+ // 2) for reasons I've yet to determine, the prepend options, although they are wrapped by proxies and have identical content,
406
+ // are not the same proxy object as selectedOption once assigned -- even though the loaded data *is* the same. I've tried
407
+ // setting them as reactive using the same method (via data props rather than computed) and it didn't change anything.
408
+ // therefore, falling back to an isEqual check here when there's no equal object
409
+ const matcher = this.keyExtractor ? (a: GenericObject, b: GenericObject) => this.keyExtractor!(a) === this.keyExtractor!(b) : isEqual;
410
+ const matchedObj = this.effectiveOptions.find(o => matcher(o.ref!, option));
408
411
  if (matchedObj) {
409
412
  return matchedObj;
410
413
  }