@signal24/vue-foundation 4.30.9 → 4.30.10

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,4 +1,4 @@
1
- import { defineComponent as q, ref as N, computed as O, watch as $, onMounted as z, createElementBlock as I, withDirectives as fe, openBlock as S, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as he, renderList as pe, vModelSelect as _t, getCurrentInstance as Le, withModifiers as ve, normalizeStyle as Wt, normalizeClass as j, renderSlot as K, reactive as jt, h as me, Teleport as Pt, markRaw as Ut, onBeforeUnmount as ye, resolveDirective as zt, createBlock as lt, createSlots as qt, withCtx as Ie, createTextVNode as te, onUpdated as Jt, vModelText as Kt, onActivated as ut, onDeactivated as ct } from "vue";
1
+ import { defineComponent as q, ref as N, computed as O, watch as $, onMounted as z, createElementBlock as I, withDirectives as he, openBlock as S, createElementVNode as U, toDisplayString as J, createCommentVNode as W, Fragment as pe, renderList as ve, vModelSelect as _t, getCurrentInstance as Le, withModifiers as ie, normalizeStyle as Wt, normalizeClass as j, renderSlot as K, reactive as jt, h as me, Teleport as Pt, markRaw as Ut, onBeforeUnmount as ye, resolveDirective as zt, createBlock as lt, createSlots as qt, withCtx as Ie, createTextVNode as te, onUpdated as Jt, vModelText as Kt, onActivated as ut, onDeactivated as ct } from "vue";
2
2
  import { compact as dt, cloneDeep as Yt, isMatch as Xt, isEqual as ge, uniq as Zt, groupBy as Gt, debounce as Qt, startCase as en, upperFirst as tn, remove as nn, last as on } from "lodash";
3
3
  import { configureOpenApiClient as rn, OpenApiError as an } from "@signal24/openapi-client-codegen";
4
4
  import { escapeHtml as Fr } from "@vue/shared";
@@ -32,12 +32,12 @@ const un = {
32
32
  async function y() {
33
33
  c.value = await o.loadFn();
34
34
  }
35
- return z(y), (E, v) => l.value ? fe((S(), I("select", {
35
+ return z(y), (E, v) => l.value ? he((S(), I("select", {
36
36
  key: 1,
37
37
  "onUpdate:modelValue": v[0] || (v[0] = (d) => g.value = d)
38
38
  }, [
39
39
  o.nullText ? (S(), I("option", cn, J(o.nullText), 1)) : W("", !0),
40
- (S(!0), I(he, null, pe(l.value, (d, n) => (S(), I("option", {
40
+ (S(!0), I(pe, null, ve(l.value, (d, n) => (S(), I("option", {
41
41
  key: n,
42
42
  value: c.value?.[n]
43
43
  }, J(d), 9, dn))), 128))
@@ -108,7 +108,7 @@ const fn = /* @__PURE__ */ q({
108
108
  }), (v, d) => (S(), I("div", {
109
109
  class: j(["vf-overlay-anchor", c.value]),
110
110
  style: Wt(i.value),
111
- onClick: ve(E, ["stop"])
111
+ onClick: ie(E, ["stop"])
112
112
  }, [
113
113
  K(v.$slots, "default")
114
114
  ], 6));
@@ -122,7 +122,7 @@ $(P, () => {
122
122
  const nr = q({
123
123
  setup() {
124
124
  return () => me("div", [
125
- pe(P, (e) => me(Pt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
125
+ ve(P, (e) => me(Pt, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
126
  ]);
127
127
  }
128
128
  });
@@ -155,7 +155,7 @@ function vn(e) {
155
155
  const t = P.findIndex((o) => o.id === e);
156
156
  return t >= 0 ? (P[t].props.callback?.(), !0) : !1;
157
157
  }
158
- function ie(e) {
158
+ function ae(e) {
159
159
  const t = P.indexOf(e);
160
160
  t >= 0 && P.splice(t, 1);
161
161
  }
@@ -168,7 +168,7 @@ async function Re(e, t, o) {
168
168
  if (typeof E == "object" && "then" in E && typeof E.then == "function" && await E === !1)
169
169
  return;
170
170
  }
171
- ie(c), i(y);
171
+ ae(c), i(y);
172
172
  } };
173
173
  c = Ee(e, g, o);
174
174
  });
@@ -178,42 +178,42 @@ async function mn(e, t) {
178
178
  for (const i in t)
179
179
  o[i] = t[i];
180
180
  }
181
- function se(e, t) {
181
+ function le(e, t) {
182
182
  return typeof e == "object" && !(e instanceof Error) ? {
183
183
  ...e,
184
184
  classes: e.classes ?? []
185
185
  } : { title: t ? e : void 0, message: t ?? e, classes: [] };
186
186
  }
187
187
  async function ht(e, t) {
188
- await Re(le, se(e, t));
188
+ await Re(ue, le(e, t));
189
189
  }
190
190
  async function rr(e, t) {
191
- const o = se(e, t);
192
- return await Re(le, {
191
+ const o = le(e, t);
192
+ return await Re(ue, {
193
193
  ...o,
194
194
  shouldConfirm: !0
195
195
  }) === !0;
196
196
  }
197
197
  async function ir(e, t) {
198
- const o = se(e, t);
199
- return await Re(le, {
198
+ const o = le(e, t);
199
+ return await Re(ue, {
200
200
  ...o,
201
201
  shouldConfirm: !0,
202
202
  classes: ["destructive", ...o.classes]
203
203
  }) === !0;
204
204
  }
205
205
  function ar(e, t) {
206
- const o = se(e, t), i = Ee(le, {
206
+ const o = le(e, t), i = Ee(ue, {
207
207
  ...o,
208
208
  isBare: !0,
209
209
  classes: ["wait", ...o.classes],
210
210
  callback: () => {
211
211
  }
212
212
  });
213
- return () => ie(i);
213
+ return () => ae(i);
214
214
  }
215
215
  function sr(e, t) {
216
- const o = se(e, t), i = Ee(le, {
216
+ const o = le(e, t), i = Ee(ue, {
217
217
  ...o,
218
218
  isBare: !0,
219
219
  classes: ["wait", ...o.classes],
@@ -224,7 +224,7 @@ function sr(e, t) {
224
224
  update: (c) => {
225
225
  mn(i, { message: c });
226
226
  },
227
- dismiss: () => ie(i)
227
+ dismiss: () => ae(i)
228
228
  };
229
229
  }
230
230
  class ke extends Error {
@@ -364,7 +364,7 @@ const xn = ["id"], wn = {
364
364
  ref: l,
365
365
  action: ".",
366
366
  class: j(["vf-modal", { scrolls: e.scrolls }]),
367
- onSubmit: p[0] || (p[0] = ve((h) => u.$emit("formSubmit"), ["prevent"]))
367
+ onSubmit: p[0] || (p[0] = ie((h) => u.$emit("formSubmit"), ["prevent"]))
368
368
  }, [
369
369
  u.$slots.header ? (S(), I("div", wn, [
370
370
  K(u.$slots, "header"),
@@ -383,7 +383,7 @@ const xn = ["id"], wn = {
383
383
  ], 34)
384
384
  ], 10, xn));
385
385
  }
386
- }), In = ["innerHTML"], Mn = ["innerText"], le = /* @__PURE__ */ q({
386
+ }), In = ["innerHTML"], Mn = ["innerText"], ue = /* @__PURE__ */ q({
387
387
  __name: "vf-alert-modal",
388
388
  props: {
389
389
  isBare: { type: Boolean },
@@ -401,7 +401,9 @@ const xn = ["id"], wn = {
401
401
  const l = zt("autofocus");
402
402
  return S(), lt(Sn, {
403
403
  class: j(["vf-alert", ...e.classes ?? []]),
404
- scrolls: ""
404
+ scrolls: "",
405
+ onClick: c[3] || (c[3] = ie(() => {
406
+ }, ["stop"]))
405
407
  }, qt({
406
408
  default: Ie(() => [
407
409
  e.iconClass ? (S(), I("i", {
@@ -429,11 +431,11 @@ const xn = ["id"], wn = {
429
431
  e.isBare ? void 0 : {
430
432
  name: "footer",
431
433
  fn: Ie(() => [
432
- e.shouldConfirm ? (S(), I(he, { key: 0 }, [
433
- fe((S(), I("button", {
434
+ e.shouldConfirm ? (S(), I(pe, { key: 0 }, [
435
+ he((S(), I("button", {
434
436
  class: "primary",
435
437
  onClick: c[0] || (c[0] = () => e.callback(!0))
436
- }, [...c[3] || (c[3] = [
438
+ }, [...c[4] || (c[4] = [
437
439
  te("Confirm", -1)
438
440
  ])])), [
439
441
  [l]
@@ -442,11 +444,11 @@ const xn = ["id"], wn = {
442
444
  class: "default",
443
445
  onClick: c[1] || (c[1] = () => e.callback(!1))
444
446
  }, "Cancel")
445
- ], 64)) : fe((S(), I("button", {
447
+ ], 64)) : he((S(), I("button", {
446
448
  key: 1,
447
449
  class: "default",
448
450
  onClick: c[2] || (c[2] = () => e.callback(!0))
449
- }, [...c[4] || (c[4] = [
451
+ }, [...c[5] || (c[5] = [
450
452
  te("OK", -1)
451
453
  ])])), [
452
454
  [l]
@@ -461,8 +463,8 @@ const xn = ["id"], wn = {
461
463
  function Cn(e) {
462
464
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
463
465
  }
464
- var ce = { exports: {} };
465
- var On = ce.exports, Ke;
466
+ var de = { exports: {} };
467
+ var On = de.exports, Ke;
466
468
  function Nn() {
467
469
  return Ke || (Ke = 1, (function(e, t) {
468
470
  (function(o, i) {
@@ -1076,7 +1078,7 @@ function Nn() {
1076
1078
  }
1077
1079
  return E;
1078
1080
  }));
1079
- })(ce)), ce.exports;
1081
+ })(de)), de.exports;
1080
1082
  }
1081
1083
  var Ln = Nn();
1082
1084
  const Rn = /* @__PURE__ */ Cn(Ln);
@@ -1198,10 +1200,10 @@ function _(e, t) {
1198
1200
  var o = this;
1199
1201
  if (!(o instanceof _))
1200
1202
  return new _(e, t);
1201
- var i = Object.assign({}, Bn, t), c = Fe(i.precision), l = de(e, i);
1203
+ var i = Object.assign({}, Bn, t), c = Fe(i.precision), l = fe(e, i);
1202
1204
  o.intValue = l, o.value = l / c, i.increment = i.increment || 1 / c, i.useVedic ? i.groups = jn : i.groups = Wn, this.s = i, this.p = c;
1203
1205
  }
1204
- function de(e, t) {
1206
+ function fe(e, t) {
1205
1207
  var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, i = 0, c = t.decimal, l = t.errorOnInvalid, g = t.precision, y = t.fromCents, E = Fe(g), v = typeof e == "number", d = e instanceof _;
1206
1208
  if (d && y)
1207
1209
  return e.intValue;
@@ -1229,7 +1231,7 @@ _.prototype = {
1229
1231
  */
1230
1232
  add: function(t) {
1231
1233
  var o = this.intValue, i = this.s, c = this.p;
1232
- return _((o += de(t, i)) / (i.fromCents ? 1 : c), i);
1234
+ return _((o += fe(t, i)) / (i.fromCents ? 1 : c), i);
1233
1235
  },
1234
1236
  /**
1235
1237
  * Subtracts value.
@@ -1238,7 +1240,7 @@ _.prototype = {
1238
1240
  */
1239
1241
  subtract: function(t) {
1240
1242
  var o = this.intValue, i = this.s, c = this.p;
1241
- return _((o -= de(t, i)) / (i.fromCents ? 1 : c), i);
1243
+ return _((o -= fe(t, i)) / (i.fromCents ? 1 : c), i);
1242
1244
  },
1243
1245
  /**
1244
1246
  * Multiplies values.
@@ -1256,7 +1258,7 @@ _.prototype = {
1256
1258
  */
1257
1259
  divide: function(t) {
1258
1260
  var o = this.intValue, i = this.s;
1259
- return _(o /= de(t, i, !1), i);
1261
+ return _(o /= fe(t, i, !1), i);
1260
1262
  },
1261
1263
  /**
1262
1264
  * Takes the currency amount and distributes the values evenly. Any extra pennies
@@ -1405,17 +1407,17 @@ const Qn = ["disabled", "placeholder", "required", "name"], eo = {
1405
1407
  addRemoteOption: Bt
1406
1408
  });
1407
1409
  const y = N(), E = N(), v = N(), d = N(!1), n = N(), a = N(!1), r = N(""), s = N(null), u = N(null), p = N(!1), h = N(null), m = N(!1), w = O(() => l.showCreateTextOnNewItem ?? !0), T = O(() => !!(l.options || n.value)), C = O(() => l.options ?? n.value ?? []), L = O(() => l.prependOptions ?? []), R = O(() => l.appendOptions ?? []), F = O(() => !!l.disabled || !T.value && !l.loadOptions), H = O(() => l.loadingText || "..."), we = O(() => !T.value && (!l.loadOptions || l.preload || l.modelValue && (l.valueField || l.valueExtractor)) ? H.value : l.nullTitle ? l.nullTitle : l.placeholder || ""), It = O(() => l.noResultsText || "No options match your search."), Z = O(() => l.valueExtractor ? l.valueExtractor : l.valueField ? (f) => f[l.valueField] : null), be = O(() => l.keyExtractor ? l.keyExtractor : l.keyField ? (f) => String(f[l.keyField]) : Z.value ? (f) => String(Z.value(f)) : null), Mt = O(() => l.groupFormatter ? l.groupFormatter : l.groupField ? (f) => String(f[l.groupField]) : null), Ve = O(() => l.formatter ? l.formatter : l.labelField ? (f) => String(f[l.labelField]) : (f) => String(f)), $e = O(() => l.selectionFormatter ? l.selectionFormatter : Ve.value), He = O(() => [...L.value, ...C.value, ...R.value]), Be = O(() => !!(l.groupField || l.groupFormatter)), Te = O(() => He.value.map((f, b) => {
1408
- const k = Mt.value?.(f), x = Ve.value(f), M = l.subtitleFormatter?.(f), B = x ? x.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ue = [];
1410
+ const k = Mt.value?.(f), x = Ve.value(f), M = l.subtitleFormatter?.(f), B = x ? x.trim().toLowerCase() : "", qe = M ? M.trim().toLowerCase() : "", ce = [];
1409
1411
  return l.searchFields ? l.searchFields.forEach((Je) => {
1410
- f[Je] && ue.push(
1412
+ f[Je] && ce.push(
1411
1413
  String(f[Je]).toLowerCase().replace(/^[a-z0-9 ]+$/i, "")
1412
1414
  );
1413
- }) : (ue.push(B), qe && ue.push(qe)), {
1415
+ }) : (ce.push(B), qe && ce.push(qe)), {
1414
1416
  key: be.value?.(f) ?? String(b),
1415
1417
  group: k,
1416
1418
  title: x,
1417
1419
  subtitle: M,
1418
- searchContent: ue.join(""),
1420
+ searchContent: ce.join(""),
1419
1421
  ref: f
1420
1422
  };
1421
1423
  })), V = O(() => {
@@ -1595,7 +1597,7 @@ const Qn = ["disabled", "placeholder", "required", "name"], eo = {
1595
1597
  ref: y,
1596
1598
  class: j(["vf-smart-select", { disabled: F.value, open: p.value }])
1597
1599
  }, [
1598
- fe(U("input", {
1600
+ he(U("input", {
1599
1601
  ref_key: "searchField",
1600
1602
  ref: E,
1601
1603
  "onUpdate:modelValue": b[0] || (b[0] = (k) => r.value = k),
@@ -1619,7 +1621,7 @@ const Qn = ["disabled", "placeholder", "required", "name"], eo = {
1619
1621
  ref: v,
1620
1622
  class: j(["vf-smart-select-options", { grouped: Be.value }])
1621
1623
  }, [
1622
- T.value ? (S(!0), I(he, { key: 1 }, pe(Ct.value, (k) => (S(), I("div", {
1624
+ T.value ? (S(!0), I(pe, { key: 1 }, ve(Ct.value, (k) => (S(), I("div", {
1623
1625
  key: k.groupTitle,
1624
1626
  class: "group"
1625
1627
  }, [
@@ -1630,7 +1632,7 @@ const Qn = ["disabled", "placeholder", "required", "name"], eo = {
1630
1632
  te(J(k.groupTitle), 1)
1631
1633
  ])
1632
1634
  ])) : W("", !0),
1633
- (S(!0), I(he, null, pe(k.options, (x) => (S(), I("div", {
1635
+ (S(!0), I(pe, null, ve(k.options, (x) => (S(), I("div", {
1634
1636
  key: x.key,
1635
1637
  class: j(["option", [h.value === x.key && "highlighted", x.ref && e.classForOption?.(x.ref)]]),
1636
1638
  onMousemove: (M) => Ht(x),
@@ -1726,14 +1728,14 @@ const lo = { class: "content" }, uo = { class: "message" }, co = {
1726
1728
  }), setTimeout(() => t.callback(), l * 1e3);
1727
1729
  }), (l, g) => (S(), I("div", {
1728
1730
  class: j(["vf-toast", [e.className, { top: e.position === "top", bottom: e.position !== "top" }]]),
1729
- onClick: ve(o, ["stop"])
1731
+ onClick: ie(o, ["stop"])
1730
1732
  }, [
1731
1733
  U("div", lo, [
1732
1734
  U("div", uo, J(e.message), 1),
1733
1735
  e.disableClose ? W("", !0) : (S(), I("div", {
1734
1736
  key: 0,
1735
1737
  class: "close",
1736
- onClick: ve(i, ["stop"])
1738
+ onClick: ie(i, ["stop"])
1737
1739
  }, "x"))
1738
1740
  ]),
1739
1741
  e.durationSecs !== null ? (S(), I("div", co, [
@@ -1749,9 +1751,9 @@ const lo = { class: "content" }, uo = { class: "message" }, co = {
1749
1751
  function Ir(e) {
1750
1752
  const t = Ee(fo, {
1751
1753
  ...e,
1752
- callback: () => ie(t)
1754
+ callback: () => ae(t)
1753
1755
  });
1754
- return () => ie(t);
1756
+ return () => ae(t);
1755
1757
  }
1756
1758
  function ho(e) {
1757
1759
  const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), c = ["B", "KB", "MB", "GB", "TB"][t];
@@ -1958,7 +1960,7 @@ const Bo = {
1958
1960
  beforeMount: ot,
1959
1961
  updated: ot,
1960
1962
  unmounted: xt
1961
- }, ae = /* @__PURE__ */ Symbol("HasAutoFocused"), De = [];
1963
+ }, se = /* @__PURE__ */ Symbol("HasAutoFocused"), De = [];
1962
1964
  function _o() {
1963
1965
  De.forEach(kt);
1964
1966
  }
@@ -1967,17 +1969,17 @@ function ot(e, t) {
1967
1969
  if (t.value == t.oldValue) return;
1968
1970
  if (!t.value) return xt(e);
1969
1971
  const o = new Date(t.value), i = e.attributes.getNamedItem("base-time")?.value, c = o.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), l = e.getAttribute("no-seconds") === null;
1970
- e[ae] || De.push(e), e[ae] = {
1972
+ e[se] || De.push(e), e[se] = {
1971
1973
  startTs: c,
1972
1974
  includeSeconds: l
1973
1975
  }, kt(e);
1974
1976
  }
1975
1977
  function kt(e) {
1976
- const t = e[ae], o = Math.round((Date.now() - t.startTs) / 1e3);
1978
+ const t = e[se], o = Math.round((Date.now() - t.startTs) / 1e3);
1977
1979
  e.innerText = Wo(o, t.includeSeconds);
1978
1980
  }
1979
1981
  function xt(e) {
1980
- e[ae] && (nn(De, e), delete e[ae]), e.innerText = "-";
1982
+ e[se] && (nn(De, e), delete e[se]), e.innerText = "-";
1981
1983
  }
1982
1984
  function Wo(e, t) {
1983
1985
  const o = [], i = Math.floor(e / 86400);
@@ -2134,7 +2136,7 @@ export {
2134
2136
  nr as OverlayContainer,
2135
2137
  ke as UserError,
2136
2138
  er as VfAjaxSelect,
2137
- le as VfAlertModal,
2139
+ ue as VfAlertModal,
2138
2140
  Tr as VfEzSmartSelect,
2139
2141
  Sn as VfModal,
2140
2142
  so as VfSmartSelect,
@@ -2171,7 +2173,7 @@ export {
2171
2173
  Dn as objectKeys,
2172
2174
  Er as patchObject,
2173
2175
  Re as presentOverlay,
2174
- ie as removeOverlayInjection,
2176
+ ae as removeOverlayInjection,
2175
2177
  fr as replaceElement,
2176
2178
  ht as showAlert,
2177
2179
  rr as showConfirm,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.30.9",
4
+ "version": "4.30.10",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Modal :class="['vf-alert', ...(classes ?? [])]" scrolls>
2
+ <Modal :class="['vf-alert', ...(classes ?? [])]" scrolls @click.stop>
3
3
  <template v-if="title" #header>
4
4
  {{ title }}
5
5
  </template>