@signal24/vue-foundation 4.2.2 → 4.2.4

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,3 +1,4 @@
1
1
  import type { ObjectDirective } from 'vue';
2
- import { type IInfiniteScrollOptions } from '../hooks/infinite-scroll';
3
- export declare const vInfiniteScroll: ObjectDirective<Element, IInfiniteScrollOptions>;
2
+ type InfiniteScrollBindingValue = () => void;
3
+ export declare const vInfiniteScroll: ObjectDirective<Element, InfiniteScrollBindingValue>;
4
+ export {};
@@ -1,20 +1,22 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { existsSync, readFileSync, watch } from 'node:fs';
2
+ import { copyFileSync, existsSync, readFileSync, watch } from 'node:fs';
3
3
  import { rm } from 'node:fs/promises';
4
4
  import * as OpenAPI from 'openapi-typescript-codegen';
5
5
  const DEFAULT_OUT_PATH = './src/openapi-client-generated';
6
6
  let generatedHash = null;
7
7
  let overridesMap = null;
8
+ let overridesInverseMap = null;
8
9
  export function loadOpenapiOverrides() {
9
- if (!existsSync('./openapi-specs.overrides.json')) {
10
+ if (!existsSync('./openapi-specs.dev.json')) {
10
11
  return;
11
12
  }
12
13
  try {
13
- const overridesContent = readFileSync('./openapi-specs.overrides.json', 'utf8');
14
+ const overridesContent = readFileSync('./openapi-specs.dev.json', 'utf8');
14
15
  overridesMap = JSON.parse(overridesContent);
16
+ overridesInverseMap = Object.fromEntries(Object.entries(overridesMap).map(([k, v]) => [v, k]));
15
17
  }
16
18
  catch (e) {
17
- console.error('Failed to load openapi-specs.overrides.json:', e);
19
+ console.error('Failed to load openapi-specs.dev.json:', e);
18
20
  }
19
21
  }
20
22
  export function openapiClientGeneratorPlugin(openapiYamlPath, outPath = DEFAULT_OUT_PATH) {
@@ -73,6 +75,9 @@ async function generateOpenapiClientInternal(openapiYamlPath, outPath = DEFAULT_
73
75
  useOptions: true,
74
76
  useUnionTypes: true
75
77
  });
78
+ if (overridesInverseMap?.[openapiYamlPath]) {
79
+ copyFileSync(openapiYamlPath, overridesInverseMap[openapiYamlPath]);
80
+ }
76
81
  console.log(`[${new Date().toISOString()}] Generated client from ${openapiYamlPath} to ${outPath}/`);
77
82
  }
78
83
  catch (err) {
@@ -1,16 +1,16 @@
1
1
  var De = Object.defineProperty;
2
- var He = (e, t, n) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var p = (e, t, n) => (He(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as L, defineProps as Ae, defineEmits as $e, ref as H, computed as A, openBlock as a, createElementBlock as d, createElementVNode as g, toDisplayString as S, withDirectives as $, createCommentVNode as y, Fragment as B, renderList as W, vModelSelect as Be, reactive as Ve, h as pe, markRaw as Fe, onMounted as q, onBeforeUnmount as z, getCurrentInstance as me, createBlock as X, Teleport as _e, normalizeClass as T, withModifiers as Ne, renderSlot as N, resolveDirective as ve, createSlots as Ke, withCtx as K, createTextVNode as ee, vModelText as Re, watch as te, onActivated as ge, onDeactivated as ye } from "vue";
5
- import { debounce as Ue, isEqual as Ee, upperFirst as je, startCase as Pe, cloneDeep as We, remove as qe } from "lodash";
6
- import { escapeHtml as ze } from "@vue/shared";
7
- import { escapeHtml as Rn } from "@vue/shared";
8
- import { format as j } from "date-fns";
9
- const Xe = L({
2
+ var Ae = (e, t, n) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var p = (e, t, n) => (Ae(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ import { defineComponent as I, defineProps as $e, defineEmits as Ve, ref as $, computed as V, openBlock as a, createElementBlock as d, createElementVNode as g, toDisplayString as k, withDirectives as B, createCommentVNode as y, Fragment as F, renderList as q, vModelSelect as Be, reactive as Fe, h as me, markRaw as _e, onMounted as z, onBeforeUnmount as X, getCurrentInstance as ve, createBlock as Y, Teleport as Ne, normalizeClass as T, withModifiers as Ke, renderSlot as R, resolveDirective as ge, createSlots as Re, withCtx as U, createTextVNode as te, vModelText as Ue, watch as ne, onActivated as ye, onDeactivated as Ee } from "vue";
5
+ import { debounce as je, isEqual as Te, upperFirst as Pe, startCase as We, cloneDeep as qe, remove as ze } from "lodash";
6
+ import { escapeHtml as Xe } from "@vue/shared";
7
+ import { escapeHtml as Un } from "@vue/shared";
8
+ import { format as P } from "date-fns";
9
+ const Ye = I({
10
10
  setup() {
11
- const e = Ae();
12
- $e(["update:modelValue"]);
13
- const t = H(null), n = A(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = H(e.modelValue ?? null);
11
+ const e = $e();
12
+ Ve(["update:modelValue"]);
13
+ const t = $(null), n = V(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = $(e.modelValue ?? null);
14
14
  return { props: e, options: t, renderOptions: n, selectedItem: i };
15
15
  },
16
16
  watch: {
@@ -32,148 +32,148 @@ const Xe = L({
32
32
  this.options = await this.props.loadFn();
33
33
  }
34
34
  }
35
- }), Te = (e, t) => {
35
+ }), Oe = (e, t) => {
36
36
  const n = e.__vccOpts || e;
37
37
  for (const [i, s] of t)
38
38
  n[i] = s;
39
39
  return n;
40
- }, Ye = {
40
+ }, Ze = {
41
41
  key: 0,
42
42
  disabled: ""
43
- }, Ze = {
43
+ }, Ge = {
44
44
  key: 0,
45
45
  value: null
46
- }, Ge = ["value"];
47
- function Qe(e, t, n, i, s, o) {
48
- return e.renderOptions ? $((a(), d("select", {
46
+ }, Qe = ["value"];
47
+ function Je(e, t, n, i, s, o) {
48
+ return e.renderOptions ? B((a(), d("select", {
49
49
  key: 1,
50
50
  "onUpdate:modelValue": t[0] || (t[0] = (l) => e.selectedItem = l)
51
51
  }, [
52
- e.props.nullText ? (a(), d("option", Ze, S(e.props.nullText), 1)) : y("", !0),
53
- (a(!0), d(B, null, W(e.renderOptions, (l, r) => {
52
+ e.props.nullText ? (a(), d("option", Ge, k(e.props.nullText), 1)) : y("", !0),
53
+ (a(!0), d(F, null, q(e.renderOptions, (l, r) => {
54
54
  var c;
55
55
  return a(), d("option", {
56
56
  key: r,
57
57
  value: (c = e.options) == null ? void 0 : c[r]
58
- }, S(l), 9, Ge);
58
+ }, k(l), 9, Qe);
59
59
  }), 128))
60
60
  ], 512)), [
61
61
  [Be, e.selectedItem]
62
- ]) : (a(), d("select", Ye, [
63
- g("option", null, S(e.props.loadingText || "Loading..."), 1)
62
+ ]) : (a(), d("select", Ze, [
63
+ g("option", null, k(e.props.loadingText || "Loading..."), 1)
64
64
  ]));
65
65
  }
66
- const mn = /* @__PURE__ */ Te(Xe, [["render", Qe]]);
67
- let Je = 0;
68
- const E = Ve([]), vn = L({
66
+ const mn = /* @__PURE__ */ Oe(Ye, [["render", Je]]);
67
+ let et = 0;
68
+ const E = Fe([]), vn = I({
69
69
  setup() {
70
- return () => pe("div", { id: "modal-container" }, [
71
- W(E, (e) => e.vnode)
70
+ return () => me("div", { id: "modal-container" }, [
71
+ q(E, (e) => e.vnode)
72
72
  ]);
73
73
  }
74
74
  });
75
- function Oe(e, t) {
75
+ function be(e, t) {
76
76
  const n = document.getElementById("vf-modal-target") ?? document.createElement("div");
77
77
  n.id = "vf-modal-target", n.removeAttribute("inert"), document.body.appendChild(n);
78
- const i = Fe(e), s = {
79
- id: String(++Je),
78
+ const i = _e(e), s = {
79
+ id: String(++et),
80
80
  component: i,
81
81
  props: t,
82
- vnode: pe(i, t)
82
+ vnode: me(i, t)
83
83
  };
84
84
  return E.push(s), s;
85
85
  }
86
- function be(e) {
86
+ function we(e) {
87
87
  const t = E.indexOf(e);
88
88
  t >= 0 && E.splice(t, 1);
89
89
  }
90
90
  function gn(e) {
91
- we(e.$);
91
+ Se(e.$);
92
92
  }
93
- function we(e) {
93
+ function Se(e) {
94
94
  let t = e;
95
- for (; t && !et(t.vnode); )
95
+ for (; t && !tt(t.vnode); )
96
96
  t = t.parent;
97
97
  }
98
- function et(e) {
98
+ function tt(e) {
99
99
  var n, i;
100
100
  const t = E.findIndex((s) => s.vnode.component === e.component);
101
101
  return t >= 0 ? ((i = (n = E[t].props).callback) == null || i.call(n, void 0), E.splice(t, 1), !0) : !1;
102
102
  }
103
- async function Y(e, t) {
103
+ async function Z(e, t) {
104
104
  return new Promise((n) => {
105
105
  let i = null;
106
106
  const o = { ...t, callback: (l) => {
107
- be(i), n(l);
107
+ we(i), n(l);
108
108
  } };
109
- i = Oe(e, o);
109
+ i = be(e, o);
110
110
  });
111
111
  }
112
- function V(e, t) {
112
+ function _(e, t) {
113
113
  return { title: t ? e : void 0, message: t ?? e };
114
114
  }
115
- async function ne(e, t) {
116
- await Y(_, V(e, t));
115
+ async function ie(e, t) {
116
+ await Z(K, _(e, t));
117
117
  }
118
118
  async function yn(e, t) {
119
- return await Y(_, {
120
- ...V(e, t),
119
+ return await Z(K, {
120
+ ..._(e, t),
121
121
  shouldConfirm: !0
122
122
  }) === !0;
123
123
  }
124
124
  async function En(e, t) {
125
- return await Y(_, {
126
- ...V(e, t),
125
+ return await Z(K, {
126
+ ..._(e, t),
127
127
  shouldConfirm: !0,
128
128
  classes: ["destructive"]
129
129
  }) === !0;
130
130
  }
131
131
  function Tn(e, t) {
132
- const n = Oe(_, {
133
- ...V(e, t),
132
+ const n = be(K, {
133
+ ..._(e, t),
134
134
  callback: () => {
135
135
  }
136
136
  });
137
- return () => be(n);
137
+ return () => we(n);
138
138
  }
139
- const C = {
139
+ const H = {
140
140
  unhandledErrorSupportText: "please contact support",
141
141
  errorHandler: (e) => console.error("Unhandled error:", e),
142
142
  defaultDateTimeFormat: "MM/dd/yy HH:mm"
143
143
  };
144
144
  function On(e) {
145
- Object.assign(C, e);
145
+ Object.assign(H, e);
146
146
  }
147
- class F extends Error {
147
+ class N extends Error {
148
148
  constructor(t) {
149
149
  super(t), this.name = "UserError";
150
150
  }
151
151
  }
152
- function tt(e) {
153
- return e instanceof F ? e.message : `An application error has occurred:
152
+ function nt(e) {
153
+ return e instanceof N ? e.message : `An application error has occurred:
154
154
 
155
- ${Z(e).message}
155
+ ${G(e).message}
156
156
 
157
- Please refresh the page and try again. If this error persists, ${C.unhandledErrorSupportText}.`;
157
+ Please refresh the page and try again. If this error persists, ${H.unhandledErrorSupportText}.`;
158
158
  }
159
- function Z(e) {
159
+ function G(e) {
160
160
  return e instanceof Error ? e : new Error(String(e));
161
161
  }
162
162
  async function bn(e, t) {
163
- const n = Z(e);
164
- return n instanceof F || C.errorHandler(n), t ? ne(t, n) : ne(n);
163
+ const n = G(e);
164
+ return n instanceof N || H.errorHandler(n), t ? ie(t, n) : ie(n);
165
165
  }
166
166
  async function wn(e) {
167
- const t = Z(e);
168
- t instanceof F || C.errorHandler(t);
167
+ const t = G(e);
168
+ t instanceof N || H.errorHandler(t);
169
169
  }
170
- const nt = ["id"], it = {
170
+ const it = ["id"], st = {
171
171
  key: 0,
172
172
  class: "vf-modal-header"
173
- }, st = { class: "vf-modal-content" }, ot = {
173
+ }, ot = { class: "vf-modal-content" }, lt = {
174
174
  key: 1,
175
175
  class: "vf-modal-footer"
176
- }, lt = /* @__PURE__ */ L({
176
+ }, rt = /* @__PURE__ */ I({
177
177
  __name: "modal",
178
178
  props: {
179
179
  id: {},
@@ -184,11 +184,11 @@ const nt = ["id"], it = {
184
184
  },
185
185
  emits: ["formSubmit"],
186
186
  setup(e) {
187
- const t = e, n = H();
188
- q(() => {
187
+ const t = e, n = $();
188
+ z(() => {
189
189
  var l;
190
190
  window.addEventListener("keydown", s), document.body.classList.add("vf-modal-open"), t.closeOnMaskClick && ((l = n.value) == null || l.addEventListener("click", i));
191
- }), z(() => {
191
+ }), X(() => {
192
192
  document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
193
193
  });
194
194
  function i(l) {
@@ -201,10 +201,10 @@ const nt = ["id"], it = {
201
201
  }
202
202
  }
203
203
  function o() {
204
- const l = me();
205
- we(l);
204
+ const l = ve();
205
+ Se(l);
206
206
  }
207
- return (l, r) => (a(), X(_e, { to: "#vf-modal-target" }, [
207
+ return (l, r) => (a(), Y(Ne, { to: "#vf-modal-target" }, [
208
208
  g("div", {
209
209
  id: l.id,
210
210
  class: T(["vf-overlay vf-modal-wrap", t.class]),
@@ -214,28 +214,28 @@ const nt = ["id"], it = {
214
214
  g("form", {
215
215
  action: ".",
216
216
  class: T(["vf-modal", { scrolls: l.scrolls }]),
217
- onSubmit: r[0] || (r[0] = Ne((c) => l.$emit("formSubmit"), ["prevent"]))
217
+ onSubmit: r[0] || (r[0] = Ke((c) => l.$emit("formSubmit"), ["prevent"]))
218
218
  }, [
219
- l.$slots.header ? (a(), d("div", it, [
220
- N(l.$slots, "header"),
219
+ l.$slots.header ? (a(), d("div", st, [
220
+ R(l.$slots, "header"),
221
221
  t.closeX ? (a(), d("i", {
222
222
  key: 0,
223
223
  class: "close",
224
224
  onClick: o
225
225
  })) : y("", !0)
226
226
  ])) : y("", !0),
227
- g("div", st, [
228
- N(l.$slots, "default")
227
+ g("div", ot, [
228
+ R(l.$slots, "default")
229
229
  ]),
230
- l.$slots.footer ? (a(), d("div", ot, [
231
- N(l.$slots, "footer")
230
+ l.$slots.footer ? (a(), d("div", lt, [
231
+ R(l.$slots, "footer")
232
232
  ])) : y("", !0)
233
233
  ], 34)
234
- ], 10, nt)
234
+ ], 10, it)
235
235
  ]));
236
236
  }
237
237
  });
238
- const rt = ["innerHtml"], at = ["innerText"], _ = /* @__PURE__ */ L({
238
+ const at = ["innerHtml"], ct = ["innerText"], K = /* @__PURE__ */ I({
239
239
  __name: "alert-modal",
240
240
  props: {
241
241
  isBare: { type: Boolean },
@@ -247,40 +247,40 @@ const rt = ["innerHtml"], at = ["innerText"], _ = /* @__PURE__ */ L({
247
247
  callback: { type: Function }
248
248
  },
249
249
  setup(e) {
250
- const t = e, n = A(() => t.message instanceof Error ? tt(t.message) : t.message);
250
+ const t = e, n = V(() => t.message instanceof Error ? nt(t.message) : t.message);
251
251
  return (i, s) => {
252
- const o = ve("autofocus");
253
- return a(), X(lt, {
252
+ const o = ge("autofocus");
253
+ return a(), Y(rt, {
254
254
  class: T(["vf-alert", i.classes])
255
- }, Ke({
256
- default: K(() => [
255
+ }, Re({
256
+ default: U(() => [
257
257
  i.isHtml ? (a(), d("div", {
258
258
  key: 0,
259
259
  innerHtml: i.message,
260
260
  class: "user-message"
261
- }, null, 8, rt)) : (a(), d("div", {
261
+ }, null, 8, at)) : (a(), d("div", {
262
262
  key: 1,
263
263
  innerText: n.value
264
- }, null, 8, at))
264
+ }, null, 8, ct))
265
265
  ]),
266
266
  _: 2
267
267
  }, [
268
- i.isBare ? void 0 : {
268
+ !i.isBare && i.title ? {
269
269
  name: "header",
270
- fn: K(() => [
271
- g("h1", null, S(i.title), 1)
270
+ fn: U(() => [
271
+ g("h1", null, k(i.title), 1)
272
272
  ]),
273
273
  key: "0"
274
- },
274
+ } : void 0,
275
275
  i.isBare ? void 0 : {
276
276
  name: "footer",
277
- fn: K(() => [
278
- i.shouldConfirm ? (a(), d(B, { key: 0 }, [
279
- $((a(), d("button", {
277
+ fn: U(() => [
278
+ i.shouldConfirm ? (a(), d(F, { key: 0 }, [
279
+ B((a(), d("button", {
280
280
  class: "primary",
281
281
  onClick: s[0] || (s[0] = () => i.callback(!0))
282
282
  }, [
283
- ee("Confirm")
283
+ te("Confirm")
284
284
  ])), [
285
285
  [o]
286
286
  ]),
@@ -288,12 +288,12 @@ const rt = ["innerHtml"], at = ["innerText"], _ = /* @__PURE__ */ L({
288
288
  class: "default",
289
289
  onClick: s[1] || (s[1] = () => i.callback(!1))
290
290
  }, "Cancel")
291
- ], 64)) : $((a(), d("button", {
291
+ ], 64)) : B((a(), d("button", {
292
292
  key: 1,
293
293
  class: "default",
294
294
  onClick: s[2] || (s[2] = () => i.callback(!0))
295
295
  }, [
296
- ee("OK")
296
+ te("OK")
297
297
  ])), [
298
298
  [o]
299
299
  ])
@@ -304,52 +304,52 @@ const rt = ["innerHtml"], at = ["innerText"], _ = /* @__PURE__ */ L({
304
304
  };
305
305
  }
306
306
  });
307
- let D;
308
- const ct = new Uint8Array(16);
309
- function dt() {
310
- if (!D && (D = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !D))
307
+ let A;
308
+ const dt = new Uint8Array(16);
309
+ function ut() {
310
+ if (!A && (A = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !A))
311
311
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
312
- return D(ct);
312
+ return A(dt);
313
313
  }
314
314
  const u = [];
315
315
  for (let e = 0; e < 256; ++e)
316
316
  u.push((e + 256).toString(16).slice(1));
317
- function ut(e, t = 0) {
317
+ function ht(e, t = 0) {
318
318
  return (u[e[t + 0]] + u[e[t + 1]] + u[e[t + 2]] + u[e[t + 3]] + "-" + u[e[t + 4]] + u[e[t + 5]] + "-" + u[e[t + 6]] + u[e[t + 7]] + "-" + u[e[t + 8]] + u[e[t + 9]] + "-" + u[e[t + 10]] + u[e[t + 11]] + u[e[t + 12]] + u[e[t + 13]] + u[e[t + 14]] + u[e[t + 15]]).toLowerCase();
319
319
  }
320
- const ht = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ie = {
321
- randomUUID: ht
320
+ const ft = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {
321
+ randomUUID: ft
322
322
  };
323
- function ft(e, t, n) {
324
- if (ie.randomUUID && !t && !e)
325
- return ie.randomUUID();
323
+ function pt(e, t, n) {
324
+ if (se.randomUUID && !t && !e)
325
+ return se.randomUUID();
326
326
  e = e || {};
327
- const i = e.random || (e.rng || dt)();
327
+ const i = e.random || (e.rng || ut)();
328
328
  if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
329
329
  n = n || 0;
330
330
  for (let s = 0; s < 16; ++s)
331
331
  t[n + s] = i[s];
332
332
  return t;
333
333
  }
334
- return ut(i);
334
+ return ht(i);
335
335
  }
336
336
  function Sn(e) {
337
337
  return e.replace(/\n/g, "<br>");
338
338
  }
339
- function pt(e) {
339
+ function mt(e) {
340
340
  return e.replace(/_/g, " ");
341
341
  }
342
- function mt(e) {
342
+ function vt(e) {
343
343
  const t = e.replace(/\D/g, "").replace(/^1/, "");
344
344
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
345
345
  }
346
- function vt(e) {
346
+ function gt(e) {
347
347
  return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
348
348
  }
349
349
  function kn() {
350
- return ft();
350
+ return pt();
351
351
  }
352
- const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", yt = {
352
+ const b = Symbol("null"), oe = Symbol("create"), yt = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Et = {
353
353
  props: {
354
354
  modelValue: {
355
355
  type: null,
@@ -446,7 +446,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
446
446
  const t = this.searchText.trim().toLowerCase();
447
447
  if (t.length) {
448
448
  e = e.filter((s) => s.searchContent.includes(t));
449
- const n = ze(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
449
+ const n = Xe(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
450
450
  e = e.map((s) => {
451
451
  var o;
452
452
  return {
@@ -455,7 +455,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
455
455
  subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
456
456
  };
457
457
  }), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
458
- key: se,
458
+ key: oe,
459
459
  title: "Create <strong>" + this.searchText.trim() + "</strong>..."
460
460
  }));
461
461
  }
@@ -496,7 +496,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
496
496
  "update:modelValue",
497
497
  this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
498
498
  );
499
- }), this.remoteSearch && this.$watch("searchText", Ue(this.reloadOptionsIfSearching, 250));
499
+ }), this.remoteSearch && this.$watch("searchText", je(this.reloadOptionsIfSearching, 250));
500
500
  },
501
501
  methods: {
502
502
  async loadRemoteOptions() {
@@ -541,7 +541,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
541
541
  this.searchText.length > 1 && (this.isSearching = !0);
542
542
  return;
543
543
  }
544
- !e.metaKey && gt.includes(e.key) && (this.isSearching = !0);
544
+ !e.metaKey && yt.includes(e.key) && (this.isSearching = !0);
545
545
  }
546
546
  },
547
547
  handleInputFocused() {
@@ -559,7 +559,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
559
559
  const t = this.effectiveOptions.find((i) => i.ref === e);
560
560
  if (t)
561
561
  return t;
562
- const n = this.effectiveOptions.find((i) => Ee(i.ref, e));
562
+ const n = this.effectiveOptions.find((i) => Te(i.ref, e));
563
563
  return n || null;
564
564
  },
565
565
  handleInputBlurred() {
@@ -599,7 +599,7 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
599
599
  selectOption(e) {
600
600
  if (this.isSearching = !1, e.key == b)
601
601
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
602
- else if (e.key === se) {
602
+ else if (e.key === oe) {
603
603
  const t = this.searchText.trim();
604
604
  this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, this.$emit("createItem", t);
605
605
  } else {
@@ -616,23 +616,23 @@ const b = Symbol("null"), se = Symbol("create"), gt = "`1234567890-=[]\\;',./~!@
616
616
  }
617
617
  }
618
618
  };
619
- const Et = ["placeholder"], Tt = {
619
+ const Tt = ["placeholder"], Ot = {
620
620
  key: 0,
621
621
  ref: "optionsContainer",
622
622
  class: "vf-smart-select-options"
623
- }, Ot = {
623
+ }, bt = {
624
624
  key: 0,
625
625
  class: "no-results"
626
- }, bt = ["onMousemove", "onMousedown"], wt = ["innerHTML"], St = ["innerHTML"], kt = {
626
+ }, wt = ["onMousemove", "onMousedown"], St = ["innerHTML"], kt = ["innerHTML"], Mt = {
627
627
  key: 0,
628
628
  class: "no-results"
629
629
  };
630
- function Mt(e, t, n, i, s, o) {
631
- const l = ve("disabled");
630
+ function xt(e, t, n, i, s, o) {
631
+ const l = ge("disabled");
632
632
  return a(), d("div", {
633
633
  class: T(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
634
634
  }, [
635
- $(g("input", {
635
+ B(g("input", {
636
636
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.searchText = r),
637
637
  ref: "searchField",
638
638
  type: "text",
@@ -641,13 +641,13 @@ function Mt(e, t, n, i, s, o) {
641
641
  placeholder: o.effectivePlaceholder,
642
642
  onFocus: t[2] || (t[2] = (...r) => o.handleInputFocused && o.handleInputFocused(...r)),
643
643
  onBlur: t[3] || (t[3] = (...r) => o.handleInputBlurred && o.handleInputBlurred(...r))
644
- }, null, 42, Et), [
645
- [Re, e.searchText],
644
+ }, null, 42, Tt), [
645
+ [Ue, e.searchText],
646
646
  [l, o.effectiveDisabled]
647
647
  ]),
648
- e.shouldDisplayOptions ? (a(), d("div", Tt, [
649
- e.isLoaded ? (a(), d(B, { key: 1 }, [
650
- (a(!0), d(B, null, W(o.effectiveOptions, (r) => (a(), d("div", {
648
+ e.shouldDisplayOptions ? (a(), d("div", Ot, [
649
+ e.isLoaded ? (a(), d(F, { key: 1 }, [
650
+ (a(!0), d(F, null, q(o.effectiveOptions, (r) => (a(), d("div", {
651
651
  key: String(r.key),
652
652
  class: T(["option", {
653
653
  highlighted: e.highlightedOptionKey === r.key
@@ -658,19 +658,19 @@ function Mt(e, t, n, i, s, o) {
658
658
  g("div", {
659
659
  class: "title",
660
660
  innerHTML: r.title
661
- }, null, 8, wt),
661
+ }, null, 8, St),
662
662
  r.subtitle ? (a(), d("div", {
663
663
  key: 0,
664
664
  class: "subtitle",
665
665
  innerHTML: r.subtitle
666
- }, null, 8, St)) : y("", !0)
667
- ], 42, bt))), 128)),
668
- !o.effectiveOptions.length && e.searchText ? (a(), d("div", kt, S(o.effectiveNoResultsText), 1)) : y("", !0)
669
- ], 64)) : (a(), d("div", Ot, "Loading..."))
666
+ }, null, 8, kt)) : y("", !0)
667
+ ], 42, wt))), 128)),
668
+ !o.effectiveOptions.length && e.searchText ? (a(), d("div", Mt, k(o.effectiveNoResultsText), 1)) : y("", !0)
669
+ ], 64)) : (a(), d("div", bt, "Loading..."))
670
670
  ], 512)) : y("", !0)
671
671
  ], 2);
672
672
  }
673
- const xt = /* @__PURE__ */ Te(yt, [["render", Mt]]), Mn = /* @__PURE__ */ L({
673
+ const Lt = /* @__PURE__ */ Oe(Et, [["render", xt]]), Mn = /* @__PURE__ */ I({
674
674
  __name: "ez-smart-select",
675
675
  props: {
676
676
  modelValue: {},
@@ -681,22 +681,22 @@ const xt = /* @__PURE__ */ Te(yt, [["render", Mt]]), Mn = /* @__PURE__ */ L({
681
681
  },
682
682
  emits: ["update:modelValue"],
683
683
  setup(e, { emit: t }) {
684
- const n = e, i = A(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, r]) => ({
684
+ const n = e, i = V(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, r]) => ({
685
685
  value: l,
686
686
  label: r
687
- }))), s = A(() => n.formatter ? (l) => {
687
+ }))), s = V(() => n.formatter ? (l) => {
688
688
  var r;
689
689
  return (r = n.formatter) == null ? void 0 : r.call(n, l.label);
690
- } : (l) => l.label), o = H(i.value.find((l) => l.value === n.modelValue) ?? null);
691
- return te(
690
+ } : (l) => l.label), o = $(i.value.find((l) => l.value === n.modelValue) ?? null);
691
+ return ne(
692
692
  () => n.modelValue,
693
693
  (l) => {
694
694
  o.value = i.value.find((r) => r.value === l) ?? null;
695
695
  }
696
- ), te(o, (l) => {
696
+ ), ne(o, (l) => {
697
697
  var r;
698
- t("update:modelValue", l ? ((r = i.value.find((c) => Ee(c, l))) == null ? void 0 : r.value) ?? null : null);
699
- }), (l, r) => (a(), X(xt, {
698
+ t("update:modelValue", l ? ((r = i.value.find((c) => Te(c, l))) == null ? void 0 : r.value) ?? null : null);
699
+ }), (l, r) => (a(), Y(Lt, {
700
700
  modelValue: o.value,
701
701
  "onUpdate:modelValue": r[0] || (r[0] = (c) => o.value = c),
702
702
  options: i.value,
@@ -705,51 +705,51 @@ const xt = /* @__PURE__ */ Te(yt, [["render", Mt]]), Mn = /* @__PURE__ */ L({
705
705
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
706
706
  }
707
707
  });
708
- function Lt(e) {
708
+ function Ct(e) {
709
709
  const t = Math.floor(Math.log(e) / Math.log(1024)), i = (e / Math.pow(1024, t)).toFixed(2), s = ["B", "KB", "MB", "GB", "TB"][t];
710
710
  return `${i} ${s}`;
711
711
  }
712
- function Ct(e) {
712
+ function It(e) {
713
713
  return e != null && String(e).length ? e : "-";
714
714
  }
715
- function It(e) {
715
+ function Ht(e) {
716
716
  return e || "-";
717
717
  }
718
718
  function Dt(e) {
719
- return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Rt(Number(e));
720
- }
721
- function Ht(e) {
722
- return e && mt(e);
719
+ return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Ut(Number(e));
723
720
  }
724
721
  function At(e) {
725
- return e ? je(e) : null;
722
+ return e && vt(e);
726
723
  }
727
724
  function $t(e) {
728
725
  return e ? Pe(e) : null;
729
726
  }
727
+ function Vt(e) {
728
+ return e ? We(e) : null;
729
+ }
730
730
  function Bt(e) {
731
731
  return e ? e.toUpperCase() : null;
732
732
  }
733
- function Vt(e) {
734
- return e ? pt(e) : null;
735
- }
736
733
  function Ft(e) {
737
- return vt(e);
734
+ return e ? mt(e) : null;
738
735
  }
739
- const oe = {
740
- bytes: Lt,
741
- dash: Ct,
742
- dashZeros: It,
736
+ function _t(e) {
737
+ return gt(e);
738
+ }
739
+ const le = {
740
+ bytes: Ct,
741
+ dash: It,
742
+ dashZeros: Ht,
743
743
  number: Dt,
744
- phone: Ht,
745
- upperFirst: At,
746
- startCase: $t,
744
+ phone: At,
745
+ upperFirst: $t,
746
+ startCase: Vt,
747
747
  upperCase: Bt,
748
- desnake: Vt,
749
- usCurrency: Ft
748
+ desnake: Ft,
749
+ usCurrency: _t
750
750
  }, xn = (e) => ({
751
- ...oe,
752
- ...e(oe)
751
+ ...le,
752
+ ...e(le)
753
753
  });
754
754
  function Ln(e, t, n) {
755
755
  const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
@@ -763,12 +763,12 @@ function Cn(e, t) {
763
763
  const s = e.currentTarget;
764
764
  s.style.userSelect = "none", s.classList.add("context-menu-active"), t.targetClass && s.classList.add(t.targetClass), t.class && i.classList.add(t.class), t.items.forEach((h) => {
765
765
  if (h == "-") {
766
- const I = document.createElement("div");
767
- I.classList.add("separator"), i.appendChild(I);
766
+ const D = document.createElement("div");
767
+ D.classList.add("separator"), i.appendChild(D);
768
768
  return;
769
769
  }
770
770
  const v = document.createElement("div");
771
- v.classList.add("item"), v.style.userSelect = "none", v.innerText = h.title, i.appendChild(v), h.class && v.classList.add(h.class), h.shouldConfirm ? v.addEventListener("click", () => h.handler()) : v.addEventListener("click", () => Ie(v, h.handler));
771
+ v.classList.add("item"), v.style.userSelect = "none", v.innerText = h.title, i.appendChild(v), h.class && v.classList.add(h.class), h.shouldConfirm ? v.addEventListener("click", () => h.handler()) : v.addEventListener("click", () => He(v, h.handler));
772
772
  });
773
773
  const o = window.innerWidth - e.clientX, l = window.innerHeight - e.clientY, r = i.offsetHeight, c = i.offsetWidth, m = o < c ? e.clientX - c - 1 : e.clientX + 1, f = l < r ? e.clientY - r - 1 : e.clientY + 1;
774
774
  i.style.left = m + "px", i.style.top = f + "px", setTimeout(() => {
@@ -777,79 +777,79 @@ function Cn(e, t) {
777
777
  function O() {
778
778
  t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
779
779
  }
780
- function Ie(h, v) {
780
+ function He(h, v) {
781
781
  if (h.classList.contains("pending-confirm"))
782
782
  return v();
783
- const I = h.innerHTML;
783
+ const D = h.innerHTML;
784
784
  h.classList.add("pending-confirm"), h.innerText = "Confirm";
785
- const J = () => {
786
- h.classList.remove("pending-confirm"), h.innerHTML = I, h.removeEventListener("mouseleave", J);
785
+ const ee = () => {
786
+ h.classList.remove("pending-confirm"), h.innerHTML = D, h.removeEventListener("mouseleave", ee);
787
787
  };
788
- h.addEventListener("mouseleave", J), e.stopPropagation();
788
+ h.addEventListener("mouseleave", ee), e.stopPropagation();
789
789
  }
790
790
  }
791
- const _t = (e) => new Promise((t) => setTimeout(t, e)), In = (e) => _t(e * 1e3), k = Symbol("MaskState");
792
- function Dn(e, t) {
791
+ const Nt = (e) => new Promise((t) => setTimeout(t, e)), In = (e) => Nt(e * 1e3), M = Symbol("MaskState");
792
+ function Hn(e, t) {
793
793
  const n = e.$.vnode.el, i = n.closest(".vf-modal");
794
- return Nt(i ?? n, t);
794
+ return Kt(i ?? n, t);
795
795
  }
796
- function Hn(e) {
796
+ function Dn(e) {
797
797
  const t = e.$.vnode.el, n = t.closest(".vf-modal");
798
- return Se(n ?? t);
798
+ return ke(n ?? t);
799
799
  }
800
- function Nt(e, t) {
801
- if (!e[k]) {
800
+ function Kt(e, t) {
801
+ if (!e[M]) {
802
802
  const n = document.createElement("div");
803
- n.classList.add("vf-mask"), e.appendChild(n), e[k] = { maskEl: n };
803
+ n.classList.add("vf-mask"), e.appendChild(n), e[M] = { maskEl: n };
804
804
  }
805
- return e[k].maskEl.innerText = t ?? "", () => Se(e);
805
+ return e[M].maskEl.innerText = t ?? "", () => ke(e);
806
806
  }
807
- function Se(e) {
808
- e[k] && e.removeChild(e[k].maskEl);
807
+ function ke(e) {
808
+ e[M] && e.removeChild(e[M].maskEl);
809
809
  }
810
- const P = Symbol("FormMaskState");
810
+ const W = Symbol("FormMaskState");
811
811
  function An(e, t, n) {
812
- const i = e instanceof Element ? e : ke(e);
812
+ const i = e instanceof Element ? e : Me(e);
813
813
  i.classList.add("vf-masked");
814
814
  const s = t instanceof Element ? t : i.querySelectorAll(t ?? "button:not([disabled])")[0], o = s.tagName === "INPUT" ? s.value : s.innerHTML;
815
815
  s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...";
816
816
  const r = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
817
- return r.forEach((c) => c.setAttribute("disabled", "disabled")), i[P] = {
817
+ return r.forEach((c) => c.setAttribute("disabled", "disabled")), i[W] = {
818
818
  disabledElements: r,
819
819
  waitButton: s,
820
820
  buttonHtml: o
821
- }, () => Kt(i);
821
+ }, () => Rt(i);
822
822
  }
823
- function Kt(e) {
824
- const t = e instanceof Element ? e : ke(e), n = t[P];
825
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[P]);
823
+ function Rt(e) {
824
+ const t = e instanceof Element ? e : Me(e), n = t[W];
825
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[W]);
826
826
  }
827
- function ke(e) {
827
+ function Me(e) {
828
828
  const t = e.$.vnode.el;
829
829
  return t.tagName === "FORM" ? t : t.querySelector("form");
830
830
  }
831
- function Rt(e) {
831
+ function Ut(e) {
832
832
  return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
833
833
  }
834
834
  function $n(e, t) {
835
- return e != null ? We(e) : t;
835
+ return e != null ? qe(e) : t;
836
836
  }
837
- function Bn(e, t) {
837
+ function Vn(e, t) {
838
838
  const n = { ...e };
839
839
  for (const i of t)
840
840
  n[i] === "" && (n[i] = null);
841
841
  return n;
842
842
  }
843
- function Ut(e) {
843
+ function jt(e) {
844
844
  return e instanceof Error && "status" in e && "body" in e;
845
845
  }
846
- function Vn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
846
+ function Bn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
847
847
  const s = e.request.request.bind(e.request);
848
848
  e.request.request = (o) => (t && (o = t(o)), new i((l, r, c) => {
849
849
  const m = s(o);
850
850
  c(m.cancel), m.then(l).catch((f) => {
851
- if (Ut(f) && typeof f.body == "object" && "error" in f.body && f.status === 422)
852
- return r(new F(f.body.error));
851
+ if (jt(f) && typeof f.body == "object" && "error" in f.body && f.status === 422)
852
+ return r(new N(f.body.error));
853
853
  if (n) {
854
854
  const O = n(f, o);
855
855
  if (O === null)
@@ -861,42 +861,42 @@ function Vn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
861
861
  });
862
862
  }));
863
863
  }
864
- const G = Symbol("HookState");
865
- function jt(e, t) {
866
- const n = t ?? me();
867
- q(() => Pt(n, e), n), ge(() => Wt(n), n), ye(() => le(n), n), z(() => le(n), n);
864
+ const Q = Symbol("HookState");
865
+ function Fn(e, t) {
866
+ const n = t ?? ve();
867
+ z(() => Pt(n, e), n), ye(() => Wt(n), n), Ee(() => re(n), n), X(() => re(n), n);
868
868
  }
869
869
  function Pt(e, t) {
870
870
  const n = {};
871
- if (t.elScrolledToBottom && (n.el = new U(e.vnode.el, t.elScrolledToBottom), n.el.install()), t.ancestorScrolledToBottom) {
872
- const i = Me(e.vnode.el);
873
- i ? (n.ancestor = new U(i, t.ancestorScrolledToBottom), n.ancestor.install()) : console.warn("no scollable ancestor found for component:", e);
871
+ if (t.elScrolledToBottom && (n.el = new x(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
872
+ const i = xe(e.vnode.el);
873
+ i ? n.ancestor = new x(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
874
874
  }
875
- t.windowScrolledToBottom && (n.window = new U(window, t.windowScrolledToBottom), n.window.install()), e[G] = n;
875
+ t.windowScrolledToBottom && (n.window = new x(window, t.windowScrolledToBottom)), e[Q] = n;
876
876
  }
877
877
  function Wt(e) {
878
878
  var n, i, s;
879
- const t = e[G];
879
+ const t = e[Q];
880
880
  (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();
881
881
  }
882
- function le(e) {
882
+ function re(e) {
883
883
  var n, i, s;
884
- const t = e[G];
884
+ const t = e[Q];
885
885
  (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();
886
886
  }
887
- const R = ["auto", "scroll"];
888
- function Me(e) {
887
+ const j = ["auto", "scroll"];
888
+ function xe(e) {
889
889
  const t = e.parentElement;
890
890
  if (!t)
891
891
  return null;
892
892
  const n = window.getComputedStyle(t);
893
- return R.includes(n.overflow) || R.includes(n.overflowX) || R.includes(n.overflowY) ? t : Me(t);
893
+ return j.includes(n.overflow) || j.includes(n.overflowX) || j.includes(n.overflowY) ? t : xe(t);
894
894
  }
895
- class U {
895
+ class x {
896
896
  constructor(t, n) {
897
897
  p(this, "isTripped", !1);
898
898
  p(this, "onScrollWithContext", this.onScroll.bind(this));
899
- this.el = t, this.handler = n;
899
+ this.el = t, this.handler = n, this.install();
900
900
  }
901
901
  install() {
902
902
  this.el.addEventListener("scroll", this.onScrollWithContext);
@@ -908,17 +908,17 @@ class U {
908
908
  Math.ceil(this.el.scrollTop + this.el.clientHeight + 5) >= this.el.scrollHeight ? this.isTripped || (this.handler(t), this.isTripped = !0) : this.isTripped && (this.isTripped = !1);
909
909
  }
910
910
  }
911
- function Fn(e) {
912
- q(() => window.addEventListener("resize", e)), ge(() => window.addEventListener("resize", e)), ye(() => window.removeEventListener("resize", e)), z(() => window.removeEventListener("resize", e));
911
+ function _n(e) {
912
+ z(() => window.addEventListener("resize", e)), ye(() => window.addEventListener("resize", e)), Ee(() => window.removeEventListener("resize", e)), X(() => window.removeEventListener("resize", e));
913
913
  }
914
914
  const qt = {
915
- mounted: ae,
916
- updated: ae
917
- }, re = Symbol("HasAutoFocused");
918
- function ae(e, t) {
919
- if (t.value === void 0 && e[re] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
915
+ mounted: ce,
916
+ updated: ce
917
+ }, ae = Symbol("HasAutoFocused");
918
+ function ce(e, t) {
919
+ if (t.value === void 0 && e[ae] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
920
920
  return;
921
- e[re] = !0;
921
+ e[ae] = !0;
922
922
  const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
923
923
  setTimeout(() => n.focus(), 10);
924
924
  }
@@ -951,16 +951,16 @@ const Yt = {
951
951
  function Zt(e) {
952
952
  e.addEventListener("blur", () => {
953
953
  let t = e.value;
954
- /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + j(/* @__PURE__ */ new Date(), "yy"));
954
+ /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + P(/* @__PURE__ */ new Date(), "yy"));
955
955
  const n = Date.parse(t);
956
- isNaN(n) ? e.value = "" : e.value = j(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
956
+ isNaN(n) ? e.value = "" : e.value = P(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
957
957
  });
958
958
  }
959
959
  const Gt = {
960
- beforeMount: ce,
961
- updated: ce
960
+ beforeMount: de,
961
+ updated: de
962
962
  };
963
- function ce(e, t) {
963
+ function de(e, t) {
964
964
  t.value == t.oldValue && e.innerHTML.length || (e.innerText = Qt(e, t));
965
965
  }
966
966
  function Qt(e, t) {
@@ -975,48 +975,48 @@ function Qt(e, t) {
975
975
  const f = /* @__PURE__ */ new Date();
976
976
  f.getFullYear() == o.getFullYear() && f.getMonth() == o.getMonth() && f.getDate() == o.getDate() && (n = "at", l = "HH:mm");
977
977
  }
978
- l || (l = C.defaultDateTimeFormat);
979
- let r = j(o, l);
978
+ l || (l = H.defaultDateTimeFormat);
979
+ let r = P(o, l);
980
980
  return n && (r = n + " " + r), r;
981
981
  }
982
982
  const Jt = {
983
- beforeMount: de,
984
- updated: de,
983
+ beforeMount: ue,
984
+ updated: ue,
985
985
  unmounted: en
986
986
  };
987
- function de(e, t) {
987
+ function ue(e, t) {
988
988
  e.tagName === "LABEL" && (t.value ? e.classList.remove("disabled") : e.classList.add("disabled"), e = e.querySelector("input")), t.value ? e.setAttribute("disabled", "disabled") : e.removeAttribute("disabled");
989
989
  }
990
990
  function en(e) {
991
991
  e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
992
992
  }
993
993
  const tn = {
994
- beforeMount: ue,
995
- updated: ue,
996
- unmounted: Le
997
- }, x = Symbol("HasAutoFocused"), Q = [];
994
+ beforeMount: he,
995
+ updated: he,
996
+ unmounted: Ce
997
+ }, C = Symbol("HasAutoFocused"), J = [];
998
998
  function nn() {
999
- Q.forEach(xe);
999
+ J.forEach(Le);
1000
1000
  }
1001
1001
  setInterval(nn, 1e3);
1002
- function ue(e, t) {
1002
+ function he(e, t) {
1003
1003
  var l;
1004
1004
  if (t.value == t.oldValue)
1005
1005
  return;
1006
1006
  if (!t.value)
1007
- return Le(e);
1007
+ return Ce(e);
1008
1008
  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;
1009
- e[x] || Q.push(e), e[x] = {
1009
+ e[C] || J.push(e), e[C] = {
1010
1010
  startTs: s,
1011
1011
  includeSeconds: o
1012
- }, xe(e);
1012
+ }, Le(e);
1013
1013
  }
1014
- function xe(e) {
1015
- const t = e[x], n = Math.round((Date.now() - t.startTs) / 1e3);
1014
+ function Le(e) {
1015
+ const t = e[C], n = Math.round((Date.now() - t.startTs) / 1e3);
1016
1016
  e.innerText = sn(n, t.includeSeconds);
1017
1017
  }
1018
- function Le(e) {
1019
- e[x] && (qe(Q, e), delete e[x]), e.innerText = "-";
1018
+ function Ce(e) {
1019
+ e[C] && (ze(J, e), delete e[C]), e.innerText = "-";
1020
1020
  }
1021
1021
  function sn(e, t) {
1022
1022
  const n = [], i = Math.floor(e / 86400);
@@ -1026,23 +1026,31 @@ function sn(e, t) {
1026
1026
  const o = Math.floor(e / 60);
1027
1027
  return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
1028
1028
  }
1029
- const on = {
1030
- created(e, t) {
1031
- jt(t.value, t.instance.$);
1029
+ const S = Symbol("InfiniteScrollHandler"), on = {
1030
+ mounted(e, t) {
1031
+ e[S] = new x(e, t.value);
1032
+ },
1033
+ updated(e, t) {
1034
+ var n;
1035
+ (n = e[S]) == null || n.uninstall(), e[S] = new x(e, t.value);
1036
+ },
1037
+ unmounted(e) {
1038
+ var t;
1039
+ (t = e[S]) == null || t.uninstall(), delete e[S];
1032
1040
  }
1033
1041
  }, ln = {
1034
- beforeMount: he,
1035
- updated: he
1042
+ beforeMount: fe,
1043
+ updated: fe
1036
1044
  };
1037
- function he(e, t) {
1045
+ function fe(e, t) {
1038
1046
  e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
1039
1047
  }
1040
1048
  const rn = {
1041
- mounted: fe,
1042
- updated: fe,
1043
- unmounted: Ce
1044
- }, M = Symbol("TooltipState");
1045
- function fe(e, t) {
1049
+ mounted: pe,
1050
+ updated: pe,
1051
+ unmounted: Ie
1052
+ }, L = Symbol("TooltipState");
1053
+ function pe(e, t) {
1046
1054
  var i;
1047
1055
  let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
1048
1056
  if (t.value || (n = null), n) {
@@ -1050,13 +1058,13 @@ function fe(e, t) {
1050
1058
  content: n,
1051
1059
  html: e.getAttribute("html") !== null
1052
1060
  };
1053
- e[M] ? e[M].configure(s) : e[M] = new an(e, s);
1061
+ e[L] ? e[L].configure(s) : e[L] = new an(e, s);
1054
1062
  } else
1055
- Ce(e);
1063
+ Ie(e);
1056
1064
  }
1057
- function Ce(e) {
1065
+ function Ie(e) {
1058
1066
  var t;
1059
- (t = e[M]) == null || t.destroy(), delete e[M];
1067
+ (t = e[L]) == null || t.destroy(), delete e[L];
1060
1068
  }
1061
1069
  class an {
1062
1070
  constructor(t, n) {
@@ -1109,55 +1117,55 @@ class an {
1109
1117
  function cn(e) {
1110
1118
  e.directive("autofocus", qt), e.directive("confirm-button", zt), e.directive("date-input", Yt), e.directive("datetime", Gt), e.directive("disabled", Jt), e.directive("duration", tn), e.directive("infinite-scroll", on), e.directive("readonly", ln), e.directive("tooltip", rn);
1111
1119
  }
1112
- function _n(e) {
1120
+ function Nn(e) {
1113
1121
  cn(e);
1114
1122
  }
1115
1123
  export {
1116
1124
  vn as ModalContainer,
1117
- F as UserError,
1125
+ N as UserError,
1118
1126
  mn as VfAjaxSelect,
1119
- _ as VfAlertModal,
1127
+ K as VfAlertModal,
1120
1128
  Mn as VfEzSmartSelect,
1121
- lt as VfModal,
1122
- xt as VfSmartSelect,
1129
+ rt as VfModal,
1130
+ Lt as VfSmartSelect,
1123
1131
  $n as cloneProp,
1124
1132
  On as configureVf,
1125
1133
  xn as createFilters,
1126
- Oe as createModalInjection,
1127
- pt as desnakeCase,
1128
- Rn as escapeHtml,
1129
- tt as formatError,
1130
- Rt as formatNumber,
1131
- mt as formatPhone,
1132
- vt as formatUSCurrency,
1134
+ be as createModalInjection,
1135
+ mt as desnakeCase,
1136
+ Un as escapeHtml,
1137
+ nt as formatError,
1138
+ Ut as formatNumber,
1139
+ vt as formatPhone,
1140
+ gt as formatUSCurrency,
1133
1141
  wn as handleError,
1134
1142
  bn as handleErrorAndAlert,
1135
- Vn as installApiClientInterceptors,
1136
- _n as installVf,
1137
- Ut as isApiError,
1138
- Dn as maskComponent,
1139
- Nt as maskEl,
1143
+ Bn as installApiClientInterceptors,
1144
+ Nn as installVf,
1145
+ jt as isApiError,
1146
+ Hn as maskComponent,
1147
+ Kt as maskEl,
1140
1148
  An as maskForm,
1141
1149
  Sn as nl2br,
1142
- Bn as nullifyEmptyInputs,
1143
- Y as presentModal,
1144
- be as removeModalInjection,
1150
+ Vn as nullifyEmptyInputs,
1151
+ Z as presentModal,
1152
+ we as removeModalInjection,
1145
1153
  gn as removeModalInjectionByInstance,
1146
- we as removeModalInjectionByInternalInstance,
1147
- et as removeModalInjectionByVnode,
1154
+ Se as removeModalInjectionByInternalInstance,
1155
+ tt as removeModalInjectionByVnode,
1148
1156
  Ln as replaceElement,
1149
- ne as showAlert,
1157
+ ie as showAlert,
1150
1158
  yn as showConfirm,
1151
1159
  En as showConfirmDestroy,
1152
1160
  Cn as showContextMenu,
1153
1161
  Tn as showWait,
1154
- _t as sleep,
1162
+ Nt as sleep,
1155
1163
  In as sleepSecs,
1156
- Z as toError,
1157
- Hn as unmaskComponent,
1158
- Se as unmaskEl,
1159
- Kt as unmaskForm,
1160
- jt as useInfiniteScroll,
1161
- Fn as useResizeWatcher,
1164
+ G as toError,
1165
+ Dn as unmaskComponent,
1166
+ ke as unmaskEl,
1167
+ Rt as unmaskForm,
1168
+ Fn as useInfiniteScroll,
1169
+ _n as useResizeWatcher,
1162
1170
  kn as uuid
1163
1171
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.2.2",
4
+ "version": "4.2.4",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "bin": {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Modal class="vf-alert" :class="classes">
3
- <template v-if="!isBare" v-slot:header>
3
+ <template v-if="!isBare && title" v-slot:header>
4
4
  <h1>{{ title }}</h1>
5
5
  </template>
6
6
 
@@ -1,9 +1,23 @@
1
1
  import type { DirectiveBinding, ObjectDirective } from 'vue';
2
2
 
3
- import { type IInfiniteScrollOptions, useInfiniteScroll } from '../hooks/infinite-scroll';
3
+ import { InfiniteScrollHandler } from '../hooks/infinite-scroll';
4
4
 
5
- export const vInfiniteScroll: ObjectDirective<Element, IInfiniteScrollOptions> = {
6
- created(_el: Element, binding: DirectiveBinding<IInfiniteScrollOptions>) {
7
- useInfiniteScroll(binding.value, binding.instance!.$);
5
+ const HandlerSymbol = Symbol('InfiniteScrollHandler');
6
+ type InfiniteScrollElement = Element & { [HandlerSymbol]?: InfiniteScrollHandler };
7
+ type InfiniteScrollBindingValue = () => void;
8
+
9
+ export const vInfiniteScroll: ObjectDirective<Element, InfiniteScrollBindingValue> = {
10
+ mounted(el: InfiniteScrollElement, binding: DirectiveBinding<InfiniteScrollBindingValue>) {
11
+ el[HandlerSymbol] = new InfiniteScrollHandler(el, binding.value);
12
+ },
13
+
14
+ updated(el: InfiniteScrollElement, binding: DirectiveBinding<InfiniteScrollBindingValue>) {
15
+ el[HandlerSymbol]?.uninstall();
16
+ el[HandlerSymbol] = new InfiniteScrollHandler(el, binding.value);
17
+ },
18
+
19
+ unmounted(el: InfiniteScrollElement) {
20
+ el[HandlerSymbol]?.uninstall();
21
+ delete el[HandlerSymbol];
8
22
  }
9
23
  };
@@ -27,22 +27,19 @@ export function installScrollHook(cmp: InfiniteScrollComponent, options: IInfini
27
27
 
28
28
  if (options.elScrolledToBottom) {
29
29
  hookState.el = new InfiniteScrollHandler(cmp.vnode.el as Element, options.elScrolledToBottom);
30
- hookState.el.install();
31
30
  }
32
31
 
33
32
  if (options.ancestorScrolledToBottom) {
34
33
  const scrollableAncestorEl = discoverScrollableAncestorEl(cmp.vnode.el as Element);
35
34
  if (scrollableAncestorEl) {
36
35
  hookState.ancestor = new InfiniteScrollHandler(scrollableAncestorEl, options.ancestorScrolledToBottom);
37
- hookState.ancestor.install();
38
36
  } else {
39
- console.warn('no scollable ancestor found for component:', cmp);
37
+ console.warn('[VueFoundation] No scollable ancestor found for component:', cmp);
40
38
  }
41
39
  }
42
40
 
43
41
  if (options.windowScrolledToBottom) {
44
42
  hookState.window = new InfiniteScrollHandler(window as unknown as Element, options.windowScrolledToBottom);
45
- hookState.window.install();
46
43
  }
47
44
 
48
45
  cmp[HookState] = hookState;
@@ -83,7 +80,9 @@ function discoverScrollableAncestorEl(el: Element): Element | null {
83
80
  export class InfiniteScrollHandler {
84
81
  isTripped = false;
85
82
 
86
- constructor(private el: Element, private handler: (e: Event) => void) {}
83
+ constructor(private el: Element, private handler: (e: Event) => void) {
84
+ this.install();
85
+ }
87
86
 
88
87
  install() {
89
88
  this.el.addEventListener('scroll', this.onScrollWithContext);
@@ -1,5 +1,5 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { existsSync, readFileSync, watch } from 'node:fs';
2
+ import { copyFileSync, existsSync, readFileSync, watch } from 'node:fs';
3
3
  import { rm } from 'node:fs/promises';
4
4
 
5
5
  import * as OpenAPI from 'openapi-typescript-codegen';
@@ -8,17 +8,19 @@ const DEFAULT_OUT_PATH = './src/openapi-client-generated';
8
8
 
9
9
  let generatedHash: string | null = null;
10
10
  let overridesMap: Record<string, string> | null = null;
11
+ let overridesInverseMap: Record<string, string> | null = null;
11
12
 
12
13
  export function loadOpenapiOverrides() {
13
- if (!existsSync('./openapi-specs.overrides.json')) {
14
+ if (!existsSync('./openapi-specs.dev.json')) {
14
15
  return;
15
16
  }
16
17
 
17
18
  try {
18
- const overridesContent = readFileSync('./openapi-specs.overrides.json', 'utf8');
19
+ const overridesContent = readFileSync('./openapi-specs.dev.json', 'utf8');
19
20
  overridesMap = JSON.parse(overridesContent);
21
+ overridesInverseMap = Object.fromEntries(Object.entries(overridesMap!).map(([k, v]) => [v, k]));
20
22
  } catch (e) {
21
- console.error('Failed to load openapi-specs.overrides.json:', e);
23
+ console.error('Failed to load openapi-specs.dev.json:', e);
22
24
  }
23
25
  }
24
26
 
@@ -99,6 +101,10 @@ async function generateOpenapiClientInternal(openapiYamlPath: string, outPath: s
99
101
  useUnionTypes: true
100
102
  });
101
103
 
104
+ if (overridesInverseMap?.[openapiYamlPath]) {
105
+ copyFileSync(openapiYamlPath, overridesInverseMap[openapiYamlPath]);
106
+ }
107
+
102
108
  console.log(`[${new Date().toISOString()}] Generated client from ${openapiYamlPath} to ${outPath}/`);
103
109
  } catch (err) {
104
110
  console.error(`[${new Date().toISOString()}] Error generating client from ${openapiYamlPath}:`, err);