@signal24/vue-foundation 4.9.0 → 4.10.0

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,50 +1,27 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- isBare: {
3
- type: import("vue").PropType<boolean>;
4
- };
5
- isHtml: {
6
- type: import("vue").PropType<boolean>;
7
- };
8
- classes: {
9
- type: import("vue").PropType<string[]>;
10
- };
11
- title: {
12
- type: import("vue").PropType<string>;
13
- };
14
- message: {
15
- type: import("vue").PropType<string | Error>;
16
- required: true;
17
- };
18
- shouldConfirm: {
19
- type: import("vue").PropType<boolean>;
20
- };
21
- callback: {
22
- type: import("vue").PropType<(ok: boolean) => void>;
23
- required: true;
24
- };
25
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
- isBare: {
27
- type: import("vue").PropType<boolean>;
28
- };
29
- isHtml: {
30
- type: import("vue").PropType<boolean>;
31
- };
32
- classes: {
33
- type: import("vue").PropType<string[]>;
34
- };
35
- title: {
36
- type: import("vue").PropType<string>;
37
- };
38
- message: {
39
- type: import("vue").PropType<string | Error>;
40
- required: true;
41
- };
42
- shouldConfirm: {
43
- type: import("vue").PropType<boolean>;
44
- };
45
- callback: {
46
- type: import("vue").PropType<(ok: boolean) => void>;
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
+ isBare?: boolean | undefined;
3
+ isHtml?: boolean | undefined;
4
+ classes?: string[] | undefined;
5
+ title?: string | undefined;
6
+ message: string | Error;
7
+ shouldConfirm?: boolean | undefined;
8
+ callback: (ok: boolean) => void;
9
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ isBare?: boolean | undefined;
11
+ isHtml?: boolean | undefined;
12
+ classes?: string[] | undefined;
13
+ title?: string | undefined;
14
+ message: string | Error;
15
+ shouldConfirm?: boolean | undefined;
16
+ callback: (ok: boolean) => void;
17
+ }>>>, {}, {}>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
47
25
  required: true;
48
26
  };
49
- }>>, {}, {}>;
50
- export default _default;
27
+ };
@@ -1,42 +1,27 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- modelValue: {
3
- type: import("vue").PropType<string | null | undefined>;
4
- required: true;
5
- };
6
- nullTitle: {
7
- type: import("vue").PropType<string>;
8
- };
9
- placeholder: {
10
- type: import("vue").PropType<string>;
11
- };
12
- options: {
13
- type: import("vue").PropType<string[] | Record<string, string>>;
14
- required: true;
15
- };
16
- formatter: {
17
- type: import("vue").PropType<(value: any) => string>;
18
- };
19
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
+ modelValue: string | null | undefined;
3
+ nullTitle?: string | undefined;
4
+ placeholder?: string | undefined;
5
+ options: Record<string, string> | string[];
6
+ formatter?: ((value: any) => string) | undefined;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
8
  "update:modelValue": (value: string | null) => void;
21
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
- modelValue: {
23
- type: import("vue").PropType<string | null | undefined>;
24
- required: true;
25
- };
26
- nullTitle: {
27
- type: import("vue").PropType<string>;
28
- };
29
- placeholder: {
30
- type: import("vue").PropType<string>;
31
- };
32
- options: {
33
- type: import("vue").PropType<string[] | Record<string, string>>;
34
- required: true;
35
- };
36
- formatter: {
37
- type: import("vue").PropType<(value: any) => string>;
38
- };
39
- }>> & {
9
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
+ modelValue: string | null | undefined;
11
+ nullTitle?: string | undefined;
12
+ placeholder?: string | undefined;
13
+ options: Record<string, string> | string[];
14
+ formatter?: ((value: any) => string) | undefined;
15
+ }>>> & {
40
16
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
41
17
  }, {}, {}>;
42
18
  export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
@@ -2,46 +2,26 @@ declare function mask(): void;
2
2
  declare function unmask(): void;
3
3
  declare function hide(): void;
4
4
  declare function unhide(): void;
5
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
6
- id: {
7
- type: import("vue").PropType<string>;
8
- };
9
- closeOnMaskClick: {
10
- type: import("vue").PropType<boolean>;
11
- };
12
- scrolls: {
13
- type: import("vue").PropType<boolean>;
14
- };
15
- closeX: {
16
- type: import("vue").PropType<boolean>;
17
- };
18
- class: {
19
- type: import("vue").PropType<string>;
20
- };
21
- }, {
5
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
6
+ id?: string | undefined;
7
+ closeOnMaskClick?: boolean | undefined;
8
+ scrolls?: boolean | undefined;
9
+ closeX?: boolean | undefined;
10
+ class?: string | undefined;
11
+ }>, {
22
12
  mask: typeof mask;
23
13
  unmask: typeof unmask;
24
14
  hide: typeof hide;
25
15
  unhide: typeof unhide;
26
16
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
17
  formSubmit: (...args: any[]) => void;
28
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
29
- id: {
30
- type: import("vue").PropType<string>;
31
- };
32
- closeOnMaskClick: {
33
- type: import("vue").PropType<boolean>;
34
- };
35
- scrolls: {
36
- type: import("vue").PropType<boolean>;
37
- };
38
- closeX: {
39
- type: import("vue").PropType<boolean>;
40
- };
41
- class: {
42
- type: import("vue").PropType<string>;
43
- };
44
- }>> & {
18
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
+ id?: string | undefined;
20
+ closeOnMaskClick?: boolean | undefined;
21
+ scrolls?: boolean | undefined;
22
+ closeX?: boolean | undefined;
23
+ class?: string | undefined;
24
+ }>>> & {
45
25
  onFormSubmit?: ((...args: any[]) => any) | undefined;
46
26
  }, {}, {}>, {
47
27
  header?(_: {}): any;
@@ -49,6 +29,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
49
29
  footer?(_: {}): any;
50
30
  }>;
51
31
  export default _default;
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToRuntimeProps<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
52
41
  type __VLS_WithTemplateSlots<T, S> = T & {
53
42
  new (): {
54
43
  $slots: S;
@@ -1,26 +1,23 @@
1
1
  import type { OverlayAnchorOptions } from './overlay-types';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
- overlayId: {
4
- type: import("vue").PropType<string>;
5
- required: true;
6
- };
7
- anchor: {
8
- type: import("vue").PropType<OverlayAnchorOptions>;
9
- required: true;
10
- };
11
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
- overlayId: {
13
- type: import("vue").PropType<string>;
14
- required: true;
15
- };
16
- anchor: {
17
- type: import("vue").PropType<OverlayAnchorOptions>;
18
- required: true;
19
- };
20
- }>>, {}, {}>, {
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ overlayId: string;
4
+ anchor: OverlayAnchorOptions;
5
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ overlayId: string;
7
+ anchor: OverlayAnchorOptions;
8
+ }>>>, {}, {}>, {
21
9
  default?(_: {}): any;
22
10
  }>;
23
11
  export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
24
21
  type __VLS_WithTemplateSlots<T, S> = T & {
25
22
  new (): {
26
23
  $slots: S;
@@ -5,47 +5,18 @@ export interface IToastOptions {
5
5
  disableClose?: boolean;
6
6
  onClick?: () => void;
7
7
  }
8
- declare const _default: import("vue").DefineComponent<{
9
- message: {
10
- type: import("vue").PropType<string>;
11
- required: true;
12
- };
13
- className: {
14
- type: import("vue").PropType<string>;
15
- };
16
- durationSecs: {
17
- type: import("vue").PropType<number | null>;
18
- };
19
- disableClose: {
20
- type: import("vue").PropType<boolean>;
21
- };
22
- onClick: {
23
- type: import("vue").PropType<() => void>;
24
- };
25
- callback: {
26
- type: import("vue").PropType<() => void>;
27
- required: true;
28
- };
29
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
- message: {
31
- type: import("vue").PropType<string>;
32
- required: true;
33
- };
34
- className: {
35
- type: import("vue").PropType<string>;
36
- };
37
- durationSecs: {
38
- type: import("vue").PropType<number | null>;
39
- };
40
- disableClose: {
41
- type: import("vue").PropType<boolean>;
42
- };
43
- onClick: {
44
- type: import("vue").PropType<() => void>;
45
- };
46
- callback: {
47
- type: import("vue").PropType<() => void>;
8
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<IToastOptions & {
9
+ callback: () => void;
10
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IToastOptions & {
11
+ callback: () => void;
12
+ }>>>, {}, {}>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToRuntimeProps<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: import('vue').PropType<T[K]>;
48
20
  required: true;
49
21
  };
50
- }>>, {}, {}>;
51
- export default _default;
22
+ };
@@ -1,7 +1,7 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Ne = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var v = (e, t, n) => (Ne(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as x, defineProps as Re, defineEmits as Ue, ref as w, computed as F, openBlock as u, createElementBlock as f, createElementVNode as T, toDisplayString as C, withDirectives as K, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as je, withModifiers as te, renderSlot as U, reactive as We, h as W, Teleport as Pe, markRaw as qe, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as ke, createSlots as ze, withCtx as Y, createTextVNode as ce, vModelText as Xe, watch as de, onActivated as Se, onDeactivated as xe } from "vue";
4
+ import { defineComponent as x, defineProps as Re, defineEmits as Ue, ref as w, computed as F, openBlock as h, createElementBlock as f, createElementVNode as T, toDisplayString as C, withDirectives as K, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as je, withModifiers as te, renderSlot as U, reactive as We, h as W, Teleport as Pe, markRaw as qe, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as ke, createSlots as ze, withCtx as Y, createTextVNode as ce, vModelText as Xe, watch as de, onActivated as Se, onDeactivated as xe } from "vue";
5
5
  import { compact as Ye, debounce as Ze, isEqual as Ce, upperFirst as Ge, startCase as Qe, cloneDeep as Je, remove as et } from "lodash";
6
6
  import { escapeHtml as tt } from "@vue/shared";
7
7
  import { escapeHtml as ri } from "@vue/shared";
@@ -45,21 +45,21 @@ const nt = x({
45
45
  value: null
46
46
  }, ot = ["value"];
47
47
  function lt(e, t, n, i, s, o) {
48
- return e.renderOptions ? K((u(), f("select", {
48
+ return e.renderOptions ? K((h(), f("select", {
49
49
  key: 1,
50
50
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
51
51
  }, [
52
- e.props.nullText ? (u(), f("option", st, C(e.props.nullText), 1)) : O("", !0),
53
- (u(!0), f(j, null, J(e.renderOptions, (r, l) => {
54
- var c;
55
- return u(), f("option", {
52
+ e.props.nullText ? (h(), f("option", st, C(e.props.nullText), 1)) : O("", !0),
53
+ (h(!0), f(j, null, J(e.renderOptions, (r, l) => {
54
+ var a;
55
+ return h(), f("option", {
56
56
  key: l,
57
- value: (c = e.options) == null ? void 0 : c[l]
57
+ value: (a = e.options) == null ? void 0 : a[l]
58
58
  }, C(r), 9, ot);
59
59
  }), 128))
60
60
  ], 512)), [
61
61
  [Ke, e.selectedItem]
62
- ]) : (u(), f("select", it, [
62
+ ]) : (h(), f("select", it, [
63
63
  T("option", null, C(e.props.loadingText || "Loading..."), 1)
64
64
  ]));
65
65
  }
@@ -73,25 +73,25 @@ const $n = /* @__PURE__ */ Le(nt, [["render", lt]]), rt = ["onClick"], at = /* @
73
73
  const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i = w({ visibility: "hidden", top: "0", left: "0" }), s = w([]), o = ee();
74
74
  L(r);
75
75
  function r() {
76
- const h = o.vnode.el, { styles: b, classes: m } = l(h, n);
76
+ const u = o.vnode.el, { styles: b, classes: m } = l(u, n);
77
77
  i.value = b, s.value = m;
78
78
  }
79
- function l(h, b) {
80
- const m = t.anchor instanceof HTMLElement ? {} : t.anchor, y = b.getBoundingClientRect(), p = h.getBoundingClientRect();
79
+ function l(u, b) {
80
+ const m = t.anchor instanceof HTMLElement ? {} : t.anchor, y = b.getBoundingClientRect(), p = u.getBoundingClientRect();
81
81
  m.matchWidth && (p.width = y.width), m.matchHeight && (p.height = y.height);
82
- const a = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
82
+ const c = m.class ? Array.isArray(m.class) ? m.class : [m.class] : [];
83
83
  let d, E;
84
84
  if (m.y === "center")
85
- d = y.top + y.height / 2 - p.height / 2, a.push("anchored-center-y");
85
+ d = y.top + y.height / 2 - p.height / 2, c.push("anchored-center-y");
86
86
  else {
87
87
  const I = (y.bottom + p.height < window.innerHeight || m.y === "below") && m.y !== "above";
88
- d = I ? y.bottom : y.top - p.height, a.push(I ? "anchored-top" : "anchored-bottom");
88
+ d = I ? y.bottom : y.top - p.height, c.push(I ? "anchored-top" : "anchored-bottom");
89
89
  }
90
90
  if (m.x === "center")
91
- E = y.left + y.width / 2 - p.width / 2, a.push("anchored-center-x");
91
+ E = y.left + y.width / 2 - p.width / 2, c.push("anchored-center-x");
92
92
  else {
93
93
  const I = (y.left + p.width < window.innerWidth || m.x === "left") && m.x !== "right";
94
- E = I ? y.left : y.right - p.width, a.push(I ? "anchored-left" : "anchored-right");
94
+ E = I ? y.left : y.right - p.width, c.push(I ? "anchored-left" : "anchored-right");
95
95
  }
96
96
  return {
97
97
  styles: {
@@ -100,22 +100,22 @@ const $n = /* @__PURE__ */ Le(nt, [["render", lt]]), rt = ["onClick"], at = /* @
100
100
  ...m.matchWidth ? { width: `${p.width}px` } : {},
101
101
  ...m.matchHeight ? { height: `${p.height}px` } : {}
102
102
  },
103
- classes: a
103
+ classes: c
104
104
  };
105
105
  }
106
- function c() {
107
- window.removeEventListener("click", c), ut(t.overlayId);
106
+ function a() {
107
+ window.removeEventListener("click", a), ut(t.overlayId);
108
108
  }
109
109
  return L(() => {
110
110
  setTimeout(() => {
111
- window.addEventListener("click", c);
111
+ window.addEventListener("click", a);
112
112
  }, 10);
113
- }), (h, b) => (u(), f("div", {
113
+ }), (u, b) => (h(), f("div", {
114
114
  class: k(["vf-overlay-anchor", s.value]),
115
115
  style: je(i.value),
116
- onClick: te(c, ["stop"])
116
+ onClick: te(a, ["stop"])
117
117
  }, [
118
- U(h.$slots, "default")
118
+ U(u.$slots, "default")
119
119
  ], 14, rt));
120
120
  }
121
121
  });
@@ -130,7 +130,7 @@ const S = We([]), An = x({
130
130
  function ie(e, t, n) {
131
131
  const i = document.getElementById("vf-overlay-target") ?? document.createElement("div");
132
132
  i.id = "vf-overlay-target", i.removeAttribute("inert"), document.body.appendChild(i);
133
- const s = String(++ct), o = qe(e), r = W(o, t), l = n != null && n.anchor ? W(at, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, c = {
133
+ const s = String(++ct), o = qe(e), r = W(o, t), l = n != null && n.anchor ? W(at, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, a = {
134
134
  id: s,
135
135
  component: o,
136
136
  props: t,
@@ -138,7 +138,7 @@ function ie(e, t, n) {
138
138
  vnode: r,
139
139
  wrapperVnode: l
140
140
  };
141
- return S.push(c), c;
141
+ return S.push(a), a;
142
142
  }
143
143
  function Bn(e) {
144
144
  Me(e.$);
@@ -256,7 +256,7 @@ function pt(e, t, n) {
256
256
  let o;
257
257
  s && (o = s.tagName === "INPUT" ? s.value : s.innerHTML, s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...");
258
258
  const l = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
259
- return l.forEach((c) => c.setAttribute("disabled", "disabled")), i[Q] = {
259
+ return l.forEach((a) => a.setAttribute("disabled", "disabled")), i[Q] = {
260
260
  disabledElements: l,
261
261
  waitButton: s,
262
262
  buttonHtml: o
@@ -287,26 +287,26 @@ const mt = ["id"], vt = {
287
287
  },
288
288
  emits: ["formSubmit"],
289
289
  setup(e, { expose: t }) {
290
- const n = e, i = ee();
291
- t({ mask: m, unmask: y, hide: p, unhide: a });
292
- const s = w(), o = w(), r = w(!1), l = F(() => Ye([n.class, r.value && "hidden"]));
290
+ const n = ee(), i = e;
291
+ t({ mask: m, unmask: y, hide: p, unhide: c });
292
+ const s = w(), o = w(), r = w(!1), l = F(() => Ye([i.class, r.value && "hidden"]));
293
293
  L(() => {
294
294
  var d;
295
- document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", h), (d = s.value) == null || d.addEventListener("click", c));
295
+ document.body.classList.add("vf-modal-open"), i.closeOnMaskClick && (window.addEventListener("keydown", u), (d = s.value) == null || d.addEventListener("click", a));
296
296
  }), ne(() => {
297
- window.removeEventListener("keydown", h), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
297
+ window.removeEventListener("keydown", u), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
298
298
  });
299
- function c(d) {
299
+ function a(d) {
300
300
  d.target == s.value && b();
301
301
  }
302
- function h(d) {
302
+ function u(d) {
303
303
  if (d.key === "Esc" || d.key === "Escape") {
304
304
  const E = document.querySelectorAll(".vf-modal-wrap");
305
305
  E[E.length - 1] === s.value && b();
306
306
  }
307
307
  }
308
308
  function b() {
309
- Me(i);
309
+ Me(n);
310
310
  }
311
311
  function m() {
312
312
  pt(o.value);
@@ -317,10 +317,10 @@ const mt = ["id"], vt = {
317
317
  function p() {
318
318
  r.value = !0;
319
319
  }
320
- function a() {
320
+ function c() {
321
321
  r.value = !1;
322
322
  }
323
- return (d, E) => (u(), f("div", {
323
+ return (d, E) => (h(), f("div", {
324
324
  id: d.id,
325
325
  class: k(["vf-overlay vf-modal-wrap", l.value]),
326
326
  ref_key: "overlay",
@@ -333,9 +333,9 @@ const mt = ["id"], vt = {
333
333
  ref_key: "form",
334
334
  ref: o
335
335
  }, [
336
- d.$slots.header ? (u(), f("div", vt, [
336
+ d.$slots.header ? (h(), f("div", vt, [
337
337
  U(d.$slots, "header"),
338
- n.closeX ? (u(), f("i", {
338
+ i.closeX ? (h(), f("i", {
339
339
  key: 0,
340
340
  class: "close",
341
341
  onClick: b
@@ -344,7 +344,7 @@ const mt = ["id"], vt = {
344
344
  T("div", yt, [
345
345
  U(d.$slots, "default")
346
346
  ]),
347
- d.$slots.footer ? (u(), f("div", gt, [
347
+ d.$slots.footer ? (h(), f("div", gt, [
348
348
  U(d.$slots, "footer")
349
349
  ])) : O("", !0)
350
350
  ], 34)
@@ -366,15 +366,15 @@ const Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
366
366
  const t = e, n = F(() => t.message instanceof Error ? ht(t.message) : t.message);
367
367
  return (i, s) => {
368
368
  const o = Oe("autofocus");
369
- return u(), ke(bt, {
369
+ return h(), ke(bt, {
370
370
  class: k(["vf-alert", i.classes])
371
371
  }, ze({
372
372
  default: Y(() => [
373
- i.isHtml ? (u(), f("div", {
373
+ i.isHtml ? (h(), f("div", {
374
374
  key: 0,
375
375
  innerHtml: i.message,
376
376
  class: "user-message"
377
- }, null, 8, Et)) : (u(), f("div", {
377
+ }, null, 8, Et)) : (h(), f("div", {
378
378
  key: 1,
379
379
  innerText: n.value
380
380
  }, null, 8, Tt))
@@ -391,8 +391,8 @@ const Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
391
391
  i.isBare ? void 0 : {
392
392
  name: "footer",
393
393
  fn: Y(() => [
394
- i.shouldConfirm ? (u(), f(j, { key: 0 }, [
395
- K((u(), f("button", {
394
+ i.shouldConfirm ? (h(), f(j, { key: 0 }, [
395
+ K((h(), f("button", {
396
396
  class: "primary",
397
397
  onClick: s[0] || (s[0] = () => i.callback(!0))
398
398
  }, [
@@ -404,7 +404,7 @@ const Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
404
404
  class: "default",
405
405
  onClick: s[1] || (s[1] = () => i.callback(!1))
406
406
  }, "Cancel")
407
- ], 64)) : K((u(), f("button", {
407
+ ], 64)) : K((h(), f("button", {
408
408
  key: 1,
409
409
  class: "default",
410
410
  onClick: s[2] || (s[2] = () => i.callback(!0))
@@ -542,13 +542,13 @@ const H = Symbol("null"), fe = Symbol("create"), It = "`1234567890-=[]\\;',./~!@
542
542
  },
543
543
  optionsDescriptors() {
544
544
  return this.allOptions.map((e, t) => {
545
- var l, c;
545
+ var l, a;
546
546
  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 = [];
547
- return this.searchFields ? this.searchFields.forEach((h) => {
548
- e[h] && r.push(String(e[h]).toLowerCase());
547
+ return this.searchFields ? this.searchFields.forEach((u) => {
548
+ e[u] && r.push(String(e[u]).toLowerCase());
549
549
  }) : (r.push(s), o && r.push(o)), {
550
550
  // eslint-disable-next-line vue/no-use-computed-property-like-method
551
- key: ((c = this.effectiveKeyExtractor) == null ? void 0 : c.call(this, e)) ?? String(t),
551
+ key: ((a = this.effectiveKeyExtractor) == null ? void 0 : a.call(this, e)) ?? String(t),
552
552
  title: n,
553
553
  subtitle: i,
554
554
  searchContent: r.join(""),
@@ -741,7 +741,7 @@ const _t = ["placeholder", "required"], Dt = {
741
741
  };
742
742
  function Nt(e, t, n, i, s, o) {
743
743
  const r = Oe("disabled");
744
- return u(), f("div", {
744
+ return h(), f("div", {
745
745
  class: k(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
746
746
  }, [
747
747
  K(T("input", {
@@ -758,28 +758,28 @@ function Nt(e, t, n, i, s, o) {
758
758
  [Xe, e.searchText],
759
759
  [r, o.effectiveDisabled]
760
760
  ]),
761
- e.shouldDisplayOptions ? (u(), f("div", Dt, [
762
- e.isLoaded ? (u(), f(j, { key: 1 }, [
763
- (u(!0), f(j, null, J(o.effectiveOptions, (l) => (u(), f("div", {
761
+ e.shouldDisplayOptions ? (h(), f("div", Dt, [
762
+ e.isLoaded ? (h(), f(j, { key: 1 }, [
763
+ (h(!0), f(j, null, J(o.effectiveOptions, (l) => (h(), f("div", {
764
764
  key: String(l.key),
765
765
  class: k(["option", {
766
766
  highlighted: e.highlightedOptionKey === l.key
767
767
  }]),
768
- onMousemove: (c) => o.handleOptionHover(l),
769
- onMousedown: (c) => o.selectOption(l)
768
+ onMousemove: (a) => o.handleOptionHover(l),
769
+ onMousedown: (a) => o.selectOption(l)
770
770
  }, [
771
771
  T("div", {
772
772
  class: "title",
773
773
  innerHTML: l.title
774
774
  }, null, 8, Bt),
775
- l.subtitle ? (u(), f("div", {
775
+ l.subtitle ? (h(), f("div", {
776
776
  key: 0,
777
777
  class: "subtitle",
778
778
  innerHTML: l.subtitle
779
779
  }, null, 8, Ft)) : O("", !0)
780
780
  ], 42, At))), 128)),
781
- !o.effectiveOptions.length && e.searchText ? (u(), f("div", Vt, C(o.effectiveNoResultsText), 1)) : O("", !0)
782
- ], 64)) : (u(), f("div", $t, "Loading..."))
781
+ !o.effectiveOptions.length && e.searchText ? (h(), f("div", Vt, C(o.effectiveNoResultsText), 1)) : O("", !0)
782
+ ], 64)) : (h(), f("div", $t, "Loading..."))
783
783
  ], 512)) : O("", !0)
784
784
  ], 2);
785
785
  }
@@ -794,27 +794,27 @@ const Rt = /* @__PURE__ */ Le(Ht, [["render", Nt]]), zn = /* @__PURE__ */ x({
794
794
  },
795
795
  emits: ["update:modelValue"],
796
796
  setup(e, { emit: t }) {
797
- const n = e, i = F(() => Array.isArray(n.options) ? n.options.map((r) => ({ value: r, label: r })) : Object.entries(n.options).map(([r, l]) => ({
798
- value: r,
799
- label: l
800
- }))), s = F(() => n.formatter ? (r) => {
801
- var l;
802
- return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
803
- } : (r) => r.label), o = w(i.value.find((r) => r.value === n.modelValue) ?? null);
797
+ const n = e, i = F(() => Array.isArray(n.options) ? n.options.map((l) => ({ value: l, label: l })) : Object.entries(n.options).map(([l, a]) => ({
798
+ value: l,
799
+ label: a
800
+ }))), s = F(() => n.formatter ? (l) => {
801
+ var a;
802
+ return (a = n.formatter) == null ? void 0 : a.call(n, l.label);
803
+ } : (l) => l.label), o = t, r = w(i.value.find((l) => l.value === n.modelValue) ?? null);
804
804
  return de(
805
805
  () => n.modelValue,
806
- (r) => {
807
- o.value = i.value.find((l) => l.value === r) ?? null;
806
+ (l) => {
807
+ r.value = i.value.find((a) => a.value === l) ?? null;
808
808
  }
809
- ), de(o, (r) => {
810
- var l;
811
- t("update:modelValue", r ? ((l = i.value.find((c) => Ce(c, r))) == null ? void 0 : l.value) ?? null : null);
812
- }), (r, l) => (u(), ke(Rt, {
813
- modelValue: o.value,
814
- "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
809
+ ), de(r, (l) => {
810
+ var a;
811
+ o("update:modelValue", l ? ((a = i.value.find((u) => Ce(u, l))) == null ? void 0 : a.value) ?? null : null);
812
+ }), (l, a) => (h(), ke(Rt, {
813
+ modelValue: r.value,
814
+ "onUpdate:modelValue": a[0] || (a[0] = (u) => r.value = u),
815
815
  options: i.value,
816
816
  formatter: s.value,
817
- "null-title": r.nullTitle
817
+ "null-title": l.nullTitle
818
818
  }, null, 8, ["modelValue", "options", "formatter", "null-title"]));
819
819
  }
820
820
  }), Ut = ["onClick"], Kt = { class: "content" }, jt = { class: "message" }, Wt = {
@@ -846,15 +846,15 @@ const Rt = /* @__PURE__ */ Le(Ht, [["render", Nt]]), zn = /* @__PURE__ */ x({
846
846
  duration: s * 1e3,
847
847
  easing: "linear"
848
848
  }), setTimeout(() => t.callback(), s * 1e3);
849
- }), (s, o) => (u(), f("div", {
849
+ }), (s, o) => (h(), f("div", {
850
850
  class: k(["vf-toast", s.className]),
851
851
  onClick: te(n, ["stop"])
852
852
  }, [
853
853
  T("div", Kt, [
854
854
  T("div", jt, C(s.message), 1),
855
- s.disableClose ? O("", !0) : (u(), f("div", Wt, "x"))
855
+ s.disableClose ? O("", !0) : (h(), f("div", Wt, "x"))
856
856
  ]),
857
- s.durationSecs !== null ? (u(), f("div", Pt, [
857
+ s.durationSecs !== null ? (h(), f("div", Pt, [
858
858
  T("div", {
859
859
  ref_key: "progressInnerEl",
860
860
  ref: i,
@@ -933,25 +933,25 @@ function Gn(e, t) {
933
933
  d.classList.add("separator"), i.appendChild(d);
934
934
  return;
935
935
  }
936
- const a = document.createElement("div");
937
- a.classList.add("item"), a.style.userSelect = "none", a.innerText = p.title, i.appendChild(a), p.class && a.classList.add(p.class), p.shouldConfirm ? a.addEventListener("click", (d) => y(d, a, p.handler)) : a.addEventListener("click", () => p.handler());
936
+ const c = document.createElement("div");
937
+ c.classList.add("item"), c.style.userSelect = "none", c.innerText = p.title, i.appendChild(c), p.class && c.classList.add(p.class), p.shouldConfirm ? c.addEventListener("click", (d) => y(d, c, p.handler)) : c.addEventListener("click", () => p.handler());
938
938
  });
939
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth, h = o < c ? e.clientX - c - 1 : e.clientX + 1, b = r < l ? e.clientY - l - 1 : e.clientY + 1;
940
- i.style.left = h + "px", i.style.top = b + "px", setTimeout(() => {
939
+ const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, a = i.offsetWidth, u = o < a ? e.clientX - a - 1 : e.clientX + 1, b = r < l ? e.clientY - l - 1 : e.clientY + 1;
940
+ i.style.left = u + "px", i.style.top = b + "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(p, a, d) {
947
- if (a.classList.contains("pending-confirm"))
946
+ function y(p, c, d) {
947
+ if (c.classList.contains("pending-confirm"))
948
948
  return d();
949
- const E = a.innerHTML;
950
- a.classList.add("pending-confirm"), a.innerText = "Confirm";
949
+ const E = c.innerHTML;
950
+ c.classList.add("pending-confirm"), c.innerText = "Confirm";
951
951
  const M = () => {
952
- a.classList.remove("pending-confirm"), a.innerHTML = E, a.removeEventListener("mouseleave", M);
952
+ c.classList.remove("pending-confirm"), c.innerHTML = E, c.removeEventListener("mouseleave", M);
953
953
  };
954
- a.addEventListener("mouseleave", M), p.stopPropagation();
954
+ c.addEventListener("mouseleave", M), p.stopPropagation();
955
955
  }
956
956
  }
957
957
  const sn = (e) => new Promise((t) => setTimeout(t, e)), Qn = (e) => sn(e * 1e3);
@@ -971,19 +971,19 @@ function De(e) {
971
971
  return e instanceof Error && "status" in e && "body" in e;
972
972
  }
973
973
  function ln({ apiClient: e, wrapper: t, onRequest: n, onError: i, afterRequest: s, CancelablePromise: o }) {
974
- const r = e.request.request.bind(e.request), l = t ?? ((c, h) => h(c));
975
- e.request.request = (c) => l(c, (h) => (h = cn(h), n && (h = n(h)), new o((b, m, y) => {
976
- const p = r(h);
977
- y(p.cancel), p.then(b).catch((a) => {
978
- if (De(a) && typeof a.body == "object" && "error" in a.body && (a.message = `${a.body.error} (${a.status})`), i) {
979
- const d = i(a, h);
974
+ const r = e.request.request.bind(e.request), l = t ?? ((a, u) => u(a));
975
+ e.request.request = (a) => l(a, (u) => (u = cn(u), n && (u = n(u)), new o((b, m, y) => {
976
+ const p = r(u);
977
+ y(p.cancel), p.then(b).catch((c) => {
978
+ if (De(c) && typeof c.body == "object" && "error" in c.body && (c.message = `${c.body.error} (${c.status})`), i) {
979
+ const d = i(c, u);
980
980
  if (d === null)
981
981
  return;
982
982
  if (d instanceof Error)
983
983
  return m(d);
984
984
  }
985
- m(a);
986
- }).finally(() => s == null ? void 0 : s(h));
985
+ m(c);
986
+ }).finally(() => s == null ? void 0 : s(u));
987
987
  })));
988
988
  }
989
989
  class le {
@@ -1026,8 +1026,10 @@ function ti(e) {
1026
1026
  ln({
1027
1027
  ...e,
1028
1028
  onError(t, n) {
1029
- var i;
1030
- De(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new z(t.body.error)), (i = e.onError) == null || i.call(e, t, n);
1029
+ var s;
1030
+ De(t) && t.status === 422 && typeof t.body == "object" && "error" in t.body && (t = new z(t.body.error));
1031
+ const i = (s = e.onError) == null ? void 0 : s.call(e, t, n);
1032
+ return i !== void 0 ? i : t;
1031
1033
  }
1032
1034
  });
1033
1035
  }
@@ -1134,13 +1136,13 @@ function ge(e, t) {
1134
1136
  t.value == t.oldValue && e.innerHTML.length || (e.innerText = gn(e, t));
1135
1137
  }
1136
1138
  function gn(e, t) {
1137
- var c, h;
1139
+ var a, u;
1138
1140
  if (!t.value)
1139
- return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
1141
+ return ((a = e.attributes.getNamedItem("placeholder")) == null ? void 0 : a.value) ?? "";
1140
1142
  let n = "";
1141
1143
  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);
1142
1144
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1143
- let r = (h = e.attributes.getNamedItem("format")) == null ? void 0 : h.value;
1145
+ let r = (u = e.attributes.getNamedItem("format")) == null ? void 0 : u.value;
1144
1146
  if (!r && e.attributes.getNamedItem("relative-date") !== null) {
1145
1147
  const b = /* @__PURE__ */ new Date();
1146
1148
  b.getFullYear() == o.getFullYear() && b.getMonth() == o.getMonth() && b.getDate() == o.getDate() && (n = "at", r = "HH:mm");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.9.0",
4
+ "version": "4.10.0",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -37,36 +37,36 @@
37
37
  "@signal24/openapi-client-codegen": "^1.1.0",
38
38
  "date-fns": "^2.30.0",
39
39
  "lodash": "^4.17.21",
40
- "type-fest": "^4.5.0",
40
+ "type-fest": "^4.6.0",
41
41
  "uuid": "^9.0.1",
42
- "vue": "^3.3.4"
42
+ "vue": "^3.3.7"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@nabla/vite-plugin-eslint": "^1.5.0",
46
46
  "@rushstack/eslint-patch": "^1.5.1",
47
- "@tsconfig/node18": "^18.2.2",
47
+ "@tsconfig/node20": "^20.1.2",
48
48
  "@types/jsdom": "^21.1.4",
49
49
  "@types/lodash": "^4.14.200",
50
- "@types/node": "^20.8.7",
50
+ "@types/node": "^20.8.9",
51
51
  "@types/uuid": "^9.0.6",
52
52
  "@vitejs/plugin-vue": "^4.4.0",
53
53
  "@vue/eslint-config-prettier": "^8.0.0",
54
54
  "@vue/eslint-config-typescript": "^12.0.0",
55
55
  "@vue/test-utils": "^2.4.1",
56
56
  "@vue/tsconfig": "^0.4.0",
57
- "cypress": "^13.3.1",
58
- "eslint": "^8.51.0",
57
+ "cypress": "^13.3.3",
58
+ "eslint": "^8.52.0",
59
59
  "eslint-plugin-cypress": "^2.15.1",
60
60
  "eslint-plugin-simple-import-sort": "^10.0.0",
61
61
  "eslint-plugin-unused-imports": "^3.0.0",
62
- "eslint-plugin-vue": "^9.17.0",
62
+ "eslint-plugin-vue": "^9.18.1",
63
63
  "jsdom": "^22.1.0",
64
64
  "prettier": "^3.0.3",
65
- "sass": "^1.69.4",
65
+ "sass": "^1.69.5",
66
66
  "start-server-and-test": "^2.0.1",
67
67
  "typescript": "~5.2.2",
68
68
  "vite": "^4.5.0",
69
69
  "vitest": "^0.34.6",
70
- "vue-tsc": "^1.8.19"
70
+ "vue-tsc": "^1.8.22"
71
71
  }
72
72
  }
@@ -10,7 +10,12 @@ export function installApiClientInterceptors(clientOptions: Parameters<typeof in
10
10
  err = new UserError(err.body.error);
11
11
  }
12
12
 
13
- clientOptions.onError?.(err, options);
13
+ const onErrResult = clientOptions.onError?.(err, options);
14
+ if (onErrResult !== undefined) {
15
+ return onErrResult;
16
+ }
17
+
18
+ return err;
14
19
  }
15
20
  });
16
21
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/node18/tsconfig.json",
2
+ "extends": "@tsconfig/node20/tsconfig.json",
3
3
  "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
4
4
  "compilerOptions": {
5
5
  "composite": true,
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/node18/tsconfig.json",
2
+ "extends": "@tsconfig/node20/tsconfig.json",
3
3
  "include": ["src/vite-plugins/*"],
4
4
  "compilerOptions": {
5
5
  "composite": true,