@signal24/vue-foundation 4.6.0 → 4.7.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,27 +1,50 @@
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]>;
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>;
25
40
  required: true;
26
41
  };
27
- };
42
+ shouldConfirm: {
43
+ type: import("vue").PropType<boolean>;
44
+ };
45
+ callback: {
46
+ type: import("vue").PropType<(ok: boolean) => void>;
47
+ required: true;
48
+ };
49
+ }>>, {}, {}>;
50
+ export default _default;
@@ -1,27 +1,42 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
- modelValue: string | null | undefined;
3
- nullTitle?: string | undefined;
4
- placeholder?: string | undefined;
5
- options: string[] | Record<string, string>;
6
- formatter?: ((value: any) => string) | undefined;
7
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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, {
8
20
  "update:modelValue": (value: string | null) => void;
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: string[] | Record<string, string>;
14
- formatter?: ((value: any) => string) | undefined;
15
- }>>> & {
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
+ }>> & {
16
40
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
17
41
  }, {}, {}>;
18
42
  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
- };
@@ -1,21 +1,41 @@
1
1
  declare function mask(): void;
2
2
  declare function unmask(): void;
3
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
- id?: string | undefined;
5
- closeOnMaskClick?: boolean | undefined;
6
- scrolls?: boolean | undefined;
7
- closeX?: boolean | undefined;
8
- class?: string | undefined;
9
- }>, {
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
+ id: {
5
+ type: import("vue").PropType<string>;
6
+ };
7
+ closeOnMaskClick: {
8
+ type: import("vue").PropType<boolean>;
9
+ };
10
+ scrolls: {
11
+ type: import("vue").PropType<boolean>;
12
+ };
13
+ closeX: {
14
+ type: import("vue").PropType<boolean>;
15
+ };
16
+ class: {
17
+ type: import("vue").PropType<string>;
18
+ };
19
+ }, {
10
20
  mask: typeof mask;
11
21
  unmask: typeof unmask;
12
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formSubmit"[], "formSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
- id?: string | undefined;
14
- closeOnMaskClick?: boolean | undefined;
15
- scrolls?: boolean | undefined;
16
- closeX?: boolean | undefined;
17
- class?: string | undefined;
18
- }>>> & {
22
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formSubmit"[], "formSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
+ id: {
24
+ type: import("vue").PropType<string>;
25
+ };
26
+ closeOnMaskClick: {
27
+ type: import("vue").PropType<boolean>;
28
+ };
29
+ scrolls: {
30
+ type: import("vue").PropType<boolean>;
31
+ };
32
+ closeX: {
33
+ type: import("vue").PropType<boolean>;
34
+ };
35
+ class: {
36
+ type: import("vue").PropType<string>;
37
+ };
38
+ }>> & {
19
39
  onFormSubmit?: ((...args: any[]) => any) | undefined;
20
40
  }, {}, {}>, {
21
41
  header?(_: {}): any;
@@ -23,15 +43,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
23
43
  footer?(_: {}): any;
24
44
  }>;
25
45
  export default _default;
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToRuntimeProps<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
35
46
  type __VLS_WithTemplateSlots<T, S> = T & {
36
47
  new (): {
37
48
  $slots: S;
@@ -1,23 +1,26 @@
1
1
  import type { OverlayAnchorOptions } from './overlay-types';
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
- }>>>, {}, {}>, {
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
+ }>>, {}, {}>, {
9
21
  default?(_: {}): any;
10
22
  }>;
11
23
  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
- };
21
24
  type __VLS_WithTemplateSlots<T, S> = T & {
22
25
  new (): {
23
26
  $slots: S;
@@ -4,7 +4,7 @@ import type { OverlayAnchorOptions } from './overlay-types';
4
4
  interface OverlayOptions {
5
5
  anchor?: OverlayAnchorOptions;
6
6
  }
7
- interface OverlayInjection<C extends OverlayComponent> {
7
+ export interface OverlayInjection<C extends OverlayComponent> {
8
8
  id: string;
9
9
  component: OverlayComponentUnwrapped<C>;
10
10
  props: OverlayComponentProps<C>;
@@ -5,18 +5,47 @@ export interface IToastOptions {
5
5
  disableClose?: boolean;
6
6
  onClick?: () => void;
7
7
  }
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]>;
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>;
20
48
  required: true;
21
49
  };
22
- };
50
+ }>>, {}, {}>;
51
+ export default _default;
@@ -31,12 +31,14 @@ export declare class ICancelablePromise<T = any> {
31
31
  }
32
32
  interface IWrappedApiClientOptions<P extends ICancelablePromise = ICancelablePromise, Arguments extends unknown[] = any[]> {
33
33
  apiClient: IApiClient;
34
+ wrapper?: (options: IRequestOptions, fn: (options: IRequestOptions) => P) => P;
34
35
  onRequest?: (options: IRequestOptions) => IRequestOptions;
35
36
  onError?: (err: Error, options: IRequestOptions) => Error | null | void;
37
+ afterRequest?: (options: IRequestOptions) => void;
36
38
  CancelablePromise: new (...arguments_: Arguments) => P;
37
39
  }
38
40
  export declare function isApiError(err: any): err is IApiError;
39
- export declare function installApiClientInterceptors({ apiClient, onRequest, onError, CancelablePromise }: IWrappedApiClientOptions): void;
41
+ export declare function installApiClientInterceptors({ apiClient, wrapper, onRequest, onError, afterRequest, CancelablePromise }: IWrappedApiClientOptions): void;
40
42
  export declare class FileUploadRequest {
41
43
  constructor(blob: Blob);
42
44
  validator: null;
@@ -1,11 +1,11 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var v = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { defineComponent as S, defineProps as Ne, defineEmits as Re, ref as T, computed as K, openBlock as d, createElementBlock as u, createElementVNode as E, toDisplayString as x, withDirectives as U, createCommentVNode as O, Fragment as j, renderList as Q, vModelSelect as Ke, getCurrentInstance as J, onMounted as C, normalizeClass as w, normalizeStyle as Ue, withModifiers as ee, renderSlot as R, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as te, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as X, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as xe } from "vue";
4
+ import { defineComponent as S, defineProps as Ne, defineEmits as Re, ref as T, computed as K, openBlock as u, createElementBlock as h, createElementVNode as E, toDisplayString as x, withDirectives as U, createCommentVNode as O, Fragment as j, renderList as J, vModelSelect as Ke, getCurrentInstance as ee, onMounted as C, normalizeClass as w, normalizeStyle as Ue, withModifiers as te, renderSlot as R, reactive as je, h as W, Teleport as We, markRaw as Pe, onBeforeUnmount as ne, resolveDirective as Te, createBlock as ke, createSlots as qe, withCtx as Y, createTextVNode as ae, vModelText as ze, watch as ce, onActivated as Se, onDeactivated as xe } from "vue";
5
5
  import { debounce as Xe, isEqual as Ce, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
6
6
  import { escapeHtml as Je } from "@vue/shared";
7
7
  import { escapeHtml as ss } from "@vue/shared";
8
- import { format as Z } from "date-fns";
8
+ import { format as G } from "date-fns";
9
9
  const et = S({
10
10
  setup() {
11
11
  const e = Ne();
@@ -45,21 +45,21 @@ const et = S({
45
45
  value: null
46
46
  }, st = ["value"];
47
47
  function it(e, t, n, s, i, o) {
48
- return e.renderOptions ? U((d(), u("select", {
48
+ return e.renderOptions ? U((u(), h("select", {
49
49
  key: 1,
50
50
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
51
51
  }, [
52
- e.props.nullText ? (d(), u("option", nt, x(e.props.nullText), 1)) : O("", !0),
53
- (d(!0), u(j, null, Q(e.renderOptions, (r, l) => {
52
+ e.props.nullText ? (u(), h("option", nt, x(e.props.nullText), 1)) : O("", !0),
53
+ (u(!0), h(j, null, J(e.renderOptions, (r, l) => {
54
54
  var c;
55
- return d(), u("option", {
55
+ return u(), h("option", {
56
56
  key: l,
57
57
  value: (c = e.options) == null ? void 0 : c[l]
58
58
  }, x(r), 9, st);
59
59
  }), 128))
60
60
  ], 512)), [
61
61
  [Ke, e.selectedItem]
62
- ]) : (d(), u("select", tt, [
62
+ ]) : (u(), h("select", tt, [
63
63
  E("option", null, x(e.props.loadingText || "Loading..."), 1)
64
64
  ]));
65
65
  }
@@ -70,28 +70,28 @@ const In = /* @__PURE__ */ Le(et, [["render", it]]), ot = ["onClick"], lt = /* @
70
70
  anchor: {}
71
71
  },
72
72
  setup(e) {
73
- const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), o = J();
73
+ const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, s = T({ visibility: "hidden", top: "0", left: "0" }), i = T([]), o = ee();
74
74
  C(r);
75
75
  function r() {
76
- const y = o.vnode.el, { styles: h, classes: a } = l(y, n);
77
- s.value = h, i.value = a;
76
+ const f = o.vnode.el, { styles: g, classes: a } = l(f, n);
77
+ s.value = g, i.value = a;
78
78
  }
79
- function l(y, h) {
80
- const a = t.anchor instanceof HTMLElement ? {} : t.anchor, m = h.getBoundingClientRect(), p = y.getBoundingClientRect();
79
+ function l(f, g) {
80
+ const a = t.anchor instanceof HTMLElement ? {} : t.anchor, m = g.getBoundingClientRect(), p = f.getBoundingClientRect();
81
81
  a.matchWidth && (p.width = m.width), a.matchHeight && (p.height = m.height);
82
- const f = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
82
+ const d = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
83
83
  let b, L;
84
84
  if (a.y === "center")
85
- b = m.top + m.height / 2 - p.height / 2, f.push("anchored-center-y");
85
+ b = m.top + m.height / 2 - p.height / 2, d.push("anchored-center-y");
86
86
  else {
87
87
  const M = (m.bottom + p.height < window.innerHeight || a.y === "below") && a.y !== "above";
88
- b = M ? m.bottom : m.top - p.height, f.push(M ? "anchored-top" : "anchored-bottom");
88
+ b = M ? m.bottom : m.top - p.height, d.push(M ? "anchored-top" : "anchored-bottom");
89
89
  }
90
90
  if (a.x === "center")
91
- L = m.left + m.width / 2 - p.width / 2, f.push("anchored-center-x");
91
+ L = m.left + m.width / 2 - p.width / 2, d.push("anchored-center-x");
92
92
  else {
93
93
  const M = (m.left + p.width < window.innerWidth || a.x === "left") && a.x !== "right";
94
- L = M ? m.left : m.right - p.width, f.push(M ? "anchored-left" : "anchored-right");
94
+ L = M ? m.left : m.right - p.width, d.push(M ? "anchored-left" : "anchored-right");
95
95
  }
96
96
  return {
97
97
  styles: {
@@ -100,7 +100,7 @@ const In = /* @__PURE__ */ Le(et, [["render", it]]), ot = ["onClick"], lt = /* @
100
100
  ...a.matchWidth ? { width: `${p.width}px` } : {},
101
101
  ...a.matchHeight ? { height: `${p.height}px` } : {}
102
102
  },
103
- classes: f
103
+ classes: d
104
104
  };
105
105
  }
106
106
  function c() {
@@ -110,12 +110,12 @@ const In = /* @__PURE__ */ Le(et, [["render", it]]), ot = ["onClick"], lt = /* @
110
110
  setTimeout(() => {
111
111
  window.addEventListener("click", c);
112
112
  }, 10);
113
- }), (y, h) => (d(), u("div", {
113
+ }), (f, g) => (u(), h("div", {
114
114
  class: w(["vf-overlay-anchor", i.value]),
115
115
  style: Ue(s.value),
116
- onClick: ee(c, ["stop"])
116
+ onClick: te(c, ["stop"])
117
117
  }, [
118
- R(y.$slots, "default")
118
+ R(f.$slots, "default")
119
119
  ], 14, ot));
120
120
  }
121
121
  });
@@ -123,11 +123,11 @@ let rt = 0;
123
123
  const k = je([]), _n = S({
124
124
  setup() {
125
125
  return () => W("div", [
126
- Q(k, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
126
+ J(k, (e) => W(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
127
127
  ]);
128
128
  }
129
129
  });
130
- function ne(e, t, n) {
130
+ function se(e, t, n) {
131
131
  const s = document.getElementById("vf-overlay-target") ?? document.createElement("div");
132
132
  s.id = "vf-overlay-target", s.removeAttribute("inert"), document.body.appendChild(s);
133
133
  const i = String(++rt), o = Pe(e), r = W(o, t), l = n != null && n.anchor ? W(lt, { overlayId: i, anchor: n.anchor }, () => [r]) : void 0, c = {
@@ -156,7 +156,7 @@ function ct(e) {
156
156
  const t = k.findIndex((n) => n.id === e);
157
157
  return t >= 0 ? (k[t].props.callback(), !0) : !1;
158
158
  }
159
- function se(e) {
159
+ function P(e) {
160
160
  const t = k.indexOf(e);
161
161
  t >= 0 && k.splice(t, 1);
162
162
  }
@@ -164,39 +164,39 @@ async function ie(e, t, n) {
164
164
  return new Promise((s) => {
165
165
  let i = null;
166
166
  const r = { ...t, callback: (l) => {
167
- se(i), s(l);
167
+ P(i), s(l);
168
168
  } };
169
- i = ne(e, r, n);
169
+ i = se(e, r, n);
170
170
  });
171
171
  }
172
- function P(e, t) {
172
+ function q(e, t) {
173
173
  return { title: t ? e : void 0, message: t ?? e };
174
174
  }
175
175
  async function de(e, t) {
176
- await ie(z, P(e, t));
176
+ await ie(X, q(e, t));
177
177
  }
178
178
  async function Dn(e, t) {
179
- return await ie(z, {
180
- ...P(e, t),
179
+ return await ie(X, {
180
+ ...q(e, t),
181
181
  shouldConfirm: !0
182
182
  }) === !0;
183
183
  }
184
184
  async function $n(e, t) {
185
- return await ie(z, {
186
- ...P(e, t),
185
+ return await ie(X, {
186
+ ...q(e, t),
187
187
  shouldConfirm: !0,
188
188
  classes: ["destructive"]
189
189
  }) === !0;
190
190
  }
191
191
  function An(e, t) {
192
- const n = ne(z, {
193
- ...P(e, t),
192
+ const n = se(X, {
193
+ ...q(e, t),
194
194
  isBare: !0,
195
195
  classes: ["wait"],
196
196
  callback: () => {
197
197
  }
198
198
  });
199
- return () => se(n);
199
+ return () => P(n);
200
200
  }
201
201
  const V = {
202
202
  unhandledErrorSupportText: "please contact support",
@@ -206,13 +206,13 @@ const V = {
206
206
  function Bn(e) {
207
207
  Object.assign(V, e);
208
208
  }
209
- class q extends Error {
209
+ class z extends Error {
210
210
  constructor(t) {
211
211
  super(t), this.name = "UserError";
212
212
  }
213
213
  }
214
214
  function dt(e) {
215
- return e instanceof q ? e.message : `An application error has occurred:
215
+ return e instanceof z ? e.message : `An application error has occurred:
216
216
 
217
217
  ${oe(e).message}
218
218
 
@@ -223,11 +223,11 @@ function oe(e) {
223
223
  }
224
224
  async function Vn(e, t) {
225
225
  const n = oe(e);
226
- return n instanceof q || V.errorHandler(n), t ? de(t, n) : de(n);
226
+ return n instanceof z || V.errorHandler(n), t ? de(t, n) : de(n);
227
227
  }
228
228
  async function Fn(e) {
229
229
  const t = oe(e);
230
- t instanceof q || V.errorHandler(t);
230
+ t instanceof z || V.errorHandler(t);
231
231
  }
232
232
  const D = Symbol("MaskState");
233
233
  function Nn(e, t) {
@@ -248,22 +248,22 @@ function ut(e, t) {
248
248
  function Ie(e) {
249
249
  e[D] && e.removeChild(e[D].maskEl);
250
250
  }
251
- const G = Symbol("FormMaskState");
251
+ const Q = Symbol("FormMaskState");
252
252
  function ht(e, t, n) {
253
253
  const s = e instanceof Element ? e : He(e);
254
254
  s.classList.add("vf-masked");
255
255
  const i = t instanceof Element ? t : s.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = i.tagName === "INPUT" ? i.value : i.innerHTML;
256
256
  i.setAttribute("disabled", "disabled"), i.innerText = n ?? "Please wait...";
257
257
  const l = [...s.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
258
- return l.forEach((c) => c.setAttribute("disabled", "disabled")), s[G] = {
258
+ return l.forEach((c) => c.setAttribute("disabled", "disabled")), s[Q] = {
259
259
  disabledElements: l,
260
260
  waitButton: i,
261
261
  buttonHtml: o
262
262
  }, () => _e(s);
263
263
  }
264
264
  function _e(e) {
265
- const t = e instanceof Element ? e : He(e), n = t[G];
266
- n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[G]);
265
+ const t = e instanceof Element ? e : He(e), n = t[Q];
266
+ n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((s) => s.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Q]);
267
267
  }
268
268
  function He(e) {
269
269
  const t = e.$.vnode.el;
@@ -286,13 +286,13 @@ const ft = ["id"], pt = {
286
286
  },
287
287
  emits: ["formSubmit"],
288
288
  setup(e, { expose: t }) {
289
- const n = e, s = J();
290
- t({ mask: y, unmask: h });
289
+ const n = e, s = ee();
290
+ t({ mask: f, unmask: g });
291
291
  const i = T(), o = T();
292
292
  C(() => {
293
293
  var a;
294
294
  document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", l), (a = i.value) == null || a.addEventListener("click", r));
295
- }), te(() => {
295
+ }), ne(() => {
296
296
  window.removeEventListener("keydown", l), document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
297
297
  });
298
298
  function r(a) {
@@ -307,13 +307,13 @@ const ft = ["id"], pt = {
307
307
  function c() {
308
308
  Me(s);
309
309
  }
310
- function y() {
310
+ function f() {
311
311
  ht(o.value);
312
312
  }
313
- function h() {
313
+ function g() {
314
314
  _e(o.value);
315
315
  }
316
- return (a, m) => (d(), u("div", {
316
+ return (a, m) => (u(), h("div", {
317
317
  id: a.id,
318
318
  class: w(["vf-overlay vf-modal-wrap", n.class]),
319
319
  ref_key: "overlay",
@@ -322,13 +322,13 @@ const ft = ["id"], pt = {
322
322
  E("form", {
323
323
  action: ".",
324
324
  class: w(["vf-modal", { scrolls: a.scrolls }]),
325
- onSubmit: m[0] || (m[0] = ee((p) => a.$emit("formSubmit"), ["prevent"])),
325
+ onSubmit: m[0] || (m[0] = te((p) => a.$emit("formSubmit"), ["prevent"])),
326
326
  ref_key: "form",
327
327
  ref: o
328
328
  }, [
329
- a.$slots.header ? (d(), u("div", pt, [
329
+ a.$slots.header ? (u(), h("div", pt, [
330
330
  R(a.$slots, "header"),
331
- n.closeX ? (d(), u("i", {
331
+ n.closeX ? (u(), h("i", {
332
332
  key: 0,
333
333
  class: "close",
334
334
  onClick: c
@@ -337,14 +337,14 @@ const ft = ["id"], pt = {
337
337
  E("div", mt, [
338
338
  R(a.$slots, "default")
339
339
  ]),
340
- a.$slots.footer ? (d(), u("div", vt, [
340
+ a.$slots.footer ? (u(), h("div", vt, [
341
341
  R(a.$slots, "footer")
342
342
  ])) : O("", !0)
343
343
  ], 34)
344
344
  ], 10, ft));
345
345
  }
346
346
  });
347
- const gt = ["innerHtml"], bt = ["innerText"], z = /* @__PURE__ */ S({
347
+ const gt = ["innerHtml"], bt = ["innerText"], X = /* @__PURE__ */ S({
348
348
  __name: "alert-modal",
349
349
  props: {
350
350
  isBare: { type: Boolean },
@@ -359,15 +359,15 @@ const gt = ["innerHtml"], bt = ["innerText"], z = /* @__PURE__ */ S({
359
359
  const t = e, n = K(() => t.message instanceof Error ? dt(t.message) : t.message);
360
360
  return (s, i) => {
361
361
  const o = Te("autofocus");
362
- return d(), ke(yt, {
362
+ return u(), ke(yt, {
363
363
  class: w(["vf-alert", s.classes])
364
364
  }, qe({
365
- default: X(() => [
366
- s.isHtml ? (d(), u("div", {
365
+ default: Y(() => [
366
+ s.isHtml ? (u(), h("div", {
367
367
  key: 0,
368
368
  innerHtml: s.message,
369
369
  class: "user-message"
370
- }, null, 8, gt)) : (d(), u("div", {
370
+ }, null, 8, gt)) : (u(), h("div", {
371
371
  key: 1,
372
372
  innerText: n.value
373
373
  }, null, 8, bt))
@@ -376,16 +376,16 @@ const gt = ["innerHtml"], bt = ["innerText"], z = /* @__PURE__ */ S({
376
376
  }, [
377
377
  s.title ? {
378
378
  name: "header",
379
- fn: X(() => [
379
+ fn: Y(() => [
380
380
  E("h1", null, x(s.title), 1)
381
381
  ]),
382
382
  key: "0"
383
383
  } : void 0,
384
384
  s.isBare ? void 0 : {
385
385
  name: "footer",
386
- fn: X(() => [
387
- s.shouldConfirm ? (d(), u(j, { key: 0 }, [
388
- U((d(), u("button", {
386
+ fn: Y(() => [
387
+ s.shouldConfirm ? (u(), h(j, { key: 0 }, [
388
+ U((u(), h("button", {
389
389
  class: "primary",
390
390
  onClick: i[0] || (i[0] = () => s.callback(!0))
391
391
  }, [
@@ -397,7 +397,7 @@ const gt = ["innerHtml"], bt = ["innerText"], z = /* @__PURE__ */ S({
397
397
  class: "default",
398
398
  onClick: i[1] || (i[1] = () => s.callback(!1))
399
399
  }, "Cancel")
400
- ], 64)) : U((d(), u("button", {
400
+ ], 64)) : U((u(), h("button", {
401
401
  key: 1,
402
402
  class: "default",
403
403
  onClick: i[2] || (i[2] = () => s.callback(!0))
@@ -420,11 +420,11 @@ function Ot() {
420
420
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
421
421
  return N(Et);
422
422
  }
423
- const g = [];
423
+ const y = [];
424
424
  for (let e = 0; e < 256; ++e)
425
- g.push((e + 256).toString(16).slice(1));
425
+ y.push((e + 256).toString(16).slice(1));
426
426
  function wt(e, t = 0) {
427
- return (g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]]).toLowerCase();
427
+ return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
428
428
  }
429
429
  const Tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ue = {
430
430
  randomUUID: Tt
@@ -537,8 +537,8 @@ const I = Symbol("null"), he = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
537
537
  return this.allOptions.map((e, t) => {
538
538
  var l, c;
539
539
  const n = this.formatter(e), s = (l = this.subtitleFormatter) == null ? void 0 : l.call(this, e), i = n ? n.trim().toLowerCase() : "", o = s ? s.trim().toLowerCase() : "", r = [];
540
- return this.searchFields ? this.searchFields.forEach((y) => {
541
- e[y] && r.push(String(e[y]).toLowerCase());
540
+ return this.searchFields ? this.searchFields.forEach((f) => {
541
+ e[f] && r.push(String(e[f]).toLowerCase());
542
542
  }) : (r.push(i), o && r.push(o)), {
543
543
  // eslint-disable-next-line vue/no-use-computed-property-like-method
544
544
  key: ((c = this.effectiveKeyExtractor) == null ? void 0 : c.call(this, e)) ?? String(t),
@@ -738,7 +738,7 @@ const It = ["placeholder"], _t = {
738
738
  };
739
739
  function Vt(e, t, n, s, i, o) {
740
740
  const r = Te("disabled");
741
- return d(), u("div", {
741
+ return u(), h("div", {
742
742
  class: w(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
743
743
  }, [
744
744
  U(E("input", {
@@ -754,9 +754,9 @@ function Vt(e, t, n, s, i, o) {
754
754
  [ze, e.searchText],
755
755
  [r, o.effectiveDisabled]
756
756
  ]),
757
- e.shouldDisplayOptions ? (d(), u("div", _t, [
758
- e.isLoaded ? (d(), u(j, { key: 1 }, [
759
- (d(!0), u(j, null, Q(o.effectiveOptions, (l) => (d(), u("div", {
757
+ e.shouldDisplayOptions ? (u(), h("div", _t, [
758
+ e.isLoaded ? (u(), h(j, { key: 1 }, [
759
+ (u(!0), h(j, null, J(o.effectiveOptions, (l) => (u(), h("div", {
760
760
  key: String(l.key),
761
761
  class: w(["option", {
762
762
  highlighted: e.highlightedOptionKey === l.key
@@ -768,14 +768,14 @@ function Vt(e, t, n, s, i, o) {
768
768
  class: "title",
769
769
  innerHTML: l.title
770
770
  }, null, 8, $t),
771
- l.subtitle ? (d(), u("div", {
771
+ l.subtitle ? (u(), h("div", {
772
772
  key: 0,
773
773
  class: "subtitle",
774
774
  innerHTML: l.subtitle
775
775
  }, null, 8, At)) : O("", !0)
776
776
  ], 42, Dt))), 128)),
777
- !o.effectiveOptions.length && e.searchText ? (d(), u("div", Bt, x(o.effectiveNoResultsText), 1)) : O("", !0)
778
- ], 64)) : (d(), u("div", Ht, "Loading..."))
777
+ !o.effectiveOptions.length && e.searchText ? (u(), h("div", Bt, x(o.effectiveNoResultsText), 1)) : O("", !0)
778
+ ], 64)) : (u(), h("div", Ht, "Loading..."))
779
779
  ], 512)) : O("", !0)
780
780
  ], 2);
781
781
  }
@@ -805,7 +805,7 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
805
805
  ), ce(o, (r) => {
806
806
  var l;
807
807
  t("update:modelValue", r ? ((l = s.value.find((c) => Ce(c, r))) == null ? void 0 : l.value) ?? null : null);
808
- }), (r, l) => (d(), ke(Ft, {
808
+ }), (r, l) => (u(), ke(Ft, {
809
809
  modelValue: o.value,
810
810
  "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
811
811
  options: s.value,
@@ -842,15 +842,15 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
842
842
  duration: i * 1e3,
843
843
  easing: "linear"
844
844
  }), setTimeout(() => t.callback(), i * 1e3);
845
- }), (i, o) => (d(), u("div", {
845
+ }), (i, o) => (u(), h("div", {
846
846
  class: w(["vf-toast", i.className]),
847
- onClick: ee(n, ["stop"])
847
+ onClick: te(n, ["stop"])
848
848
  }, [
849
849
  E("div", Rt, [
850
850
  E("div", Kt, x(i.message), 1),
851
- i.disableClose ? O("", !0) : (d(), u("div", Ut, "x"))
851
+ i.disableClose ? O("", !0) : (u(), h("div", Ut, "x"))
852
852
  ]),
853
- i.durationSecs !== null ? (d(), u("div", jt, [
853
+ i.durationSecs !== null ? (u(), h("div", jt, [
854
854
  E("div", {
855
855
  ref_key: "progressInnerEl",
856
856
  ref: s,
@@ -861,12 +861,11 @@ const Ft = /* @__PURE__ */ Le(Mt, [["render", Vt]]), jn = /* @__PURE__ */ S({
861
861
  }
862
862
  });
863
863
  function Wn(e) {
864
- const t = ne(Wt, {
864
+ const t = se(Wt, {
865
865
  ...e,
866
- callback: () => {
867
- }
866
+ callback: () => P(t)
868
867
  });
869
- return () => se(t);
868
+ return () => P(t);
870
869
  }
871
870
  function Pt(e) {
872
871
  const t = Math.floor(Math.log(e) / Math.log(1024)), s = (e / Math.pow(1024, t)).toFixed(2), i = ["B", "KB", "MB", "GB", "TB"][t];
@@ -930,25 +929,25 @@ function zn(e, t) {
930
929
  b.classList.add("separator"), s.appendChild(b);
931
930
  return;
932
931
  }
933
- const f = document.createElement("div");
934
- f.classList.add("item"), f.style.userSelect = "none", f.innerText = p.title, s.appendChild(f), p.class && f.classList.add(p.class), p.shouldConfirm ? f.addEventListener("click", (b) => m(b, f, p.handler)) : f.addEventListener("click", () => p.handler());
932
+ const d = document.createElement("div");
933
+ d.classList.add("item"), d.style.userSelect = "none", d.innerText = p.title, s.appendChild(d), p.class && d.classList.add(p.class), p.shouldConfirm ? d.addEventListener("click", (b) => m(b, d, p.handler)) : d.addEventListener("click", () => p.handler());
935
934
  });
936
- const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, c = s.offsetWidth, y = o < c ? e.clientX - c - 1 : e.clientX + 1, h = r < l ? e.clientY - l - 1 : e.clientY + 1;
937
- s.style.left = y + "px", s.style.top = h + "px", setTimeout(() => {
935
+ const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = s.offsetHeight, c = s.offsetWidth, f = o < c ? e.clientX - c - 1 : e.clientX + 1, g = r < l ? e.clientY - l - 1 : e.clientY + 1;
936
+ s.style.left = f + "px", s.style.top = g + "px", setTimeout(() => {
938
937
  s.style.width = s.offsetWidth + "px";
939
938
  }, 50);
940
939
  function a() {
941
940
  t.targetClass && i.classList.remove(t.targetClass), i.classList.remove("context-menu-active"), i.style.userSelect = "", n.remove();
942
941
  }
943
- function m(p, f, b) {
944
- if (f.classList.contains("pending-confirm"))
942
+ function m(p, d, b) {
943
+ if (d.classList.contains("pending-confirm"))
945
944
  return b();
946
- const L = f.innerHTML;
947
- f.classList.add("pending-confirm"), f.innerText = "Confirm";
945
+ const L = d.innerHTML;
946
+ d.classList.add("pending-confirm"), d.innerText = "Confirm";
948
947
  const F = () => {
949
- f.classList.remove("pending-confirm"), f.innerHTML = L, f.removeEventListener("mouseleave", F);
948
+ d.classList.remove("pending-confirm"), d.innerHTML = L, d.removeEventListener("mouseleave", F);
950
949
  };
951
- f.addEventListener("mouseleave", F), p.stopPropagation();
950
+ d.addEventListener("mouseleave", F), p.stopPropagation();
952
951
  }
953
952
  }
954
953
  const tn = (e) => new Promise((t) => setTimeout(t, e)), Xn = (e) => tn(e * 1e3);
@@ -967,26 +966,26 @@ function Zn(e, t) {
967
966
  function sn(e) {
968
967
  return e instanceof Error && "status" in e && "body" in e;
969
968
  }
970
- function Gn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: s }) {
971
- const i = e.request.request.bind(e.request);
972
- e.request.request = (o) => (o = on(o), t && (o = t(o)), new s((r, l, c) => {
973
- const y = i(o);
974
- c(y.cancel), y.then(r).catch((h) => {
975
- if (sn(h) && typeof h.body == "object" && "error" in h.body) {
976
- if (h.status === 422)
977
- return l(new q(h.body.error));
978
- h.message = `${h.body.error} (${h.status})`;
969
+ function Gn({ apiClient: e, wrapper: t, onRequest: n, onError: s, afterRequest: i, CancelablePromise: o }) {
970
+ const r = e.request.request.bind(e.request), l = t ?? ((c, f) => f(c));
971
+ e.request.request = (c) => l(c, (f) => (f = on(f), n && (f = n(f)), new o((g, a, m) => {
972
+ const p = r(f);
973
+ m(p.cancel), p.then(g).catch((d) => {
974
+ if (sn(d) && typeof d.body == "object" && "error" in d.body) {
975
+ if (d.status === 422)
976
+ return a(new z(d.body.error));
977
+ d.message = `${d.body.error} (${d.status})`;
979
978
  }
980
- if (n) {
981
- const a = n(h, o);
982
- if (a === null)
979
+ if (s) {
980
+ const b = s(d, f);
981
+ if (b === null)
983
982
  return;
984
- if (a instanceof Error)
985
- return l(a);
983
+ if (b instanceof Error)
984
+ return a(b);
986
985
  }
987
- l(h);
988
- });
989
- }));
986
+ a(d);
987
+ }).finally(() => i == null ? void 0 : i(f));
988
+ })));
990
989
  }
991
990
  class pe {
992
991
  constructor(t) {
@@ -1014,8 +1013,8 @@ function on(e) {
1014
1013
  }
1015
1014
  const le = Symbol("HookState");
1016
1015
  function Qn(e, t) {
1017
- const n = t ?? J();
1018
- C(() => ln(n, e), n), Se(() => rn(n), n), xe(() => me(n), n), te(() => me(n), n);
1016
+ const n = t ?? ee();
1017
+ C(() => ln(n, e), n), Se(() => rn(n), n), xe(() => me(n), n), ne(() => me(n), n);
1019
1018
  }
1020
1019
  function ln(e, t) {
1021
1020
  const n = {};
@@ -1035,13 +1034,13 @@ function me(e) {
1035
1034
  const t = e[le];
1036
1035
  (n = t == null ? void 0 : t.el) == null || n.uninstall(), (s = t == null ? void 0 : t.ancestor) == null || s.uninstall(), (i = t == null ? void 0 : t.window) == null || i.uninstall();
1037
1036
  }
1038
- const Y = ["auto", "scroll"];
1037
+ const Z = ["auto", "scroll"];
1039
1038
  function De(e) {
1040
1039
  const t = e.parentElement;
1041
1040
  if (!t)
1042
1041
  return null;
1043
1042
  const n = window.getComputedStyle(t);
1044
- return Y.includes(n.overflow) || Y.includes(n.overflowX) || Y.includes(n.overflowY) ? t : De(t);
1043
+ return Z.includes(n.overflow) || Z.includes(n.overflowX) || Z.includes(n.overflowY) ? t : De(t);
1045
1044
  }
1046
1045
  class $ {
1047
1046
  constructor(t, n) {
@@ -1060,7 +1059,7 @@ class $ {
1060
1059
  }
1061
1060
  }
1062
1061
  function Jn(e) {
1063
- C(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), te(() => window.removeEventListener("resize", e));
1062
+ C(() => window.addEventListener("resize", e)), Se(() => window.addEventListener("resize", e)), xe(() => window.removeEventListener("resize", e)), ne(() => window.removeEventListener("resize", e));
1064
1063
  }
1065
1064
  const an = {
1066
1065
  mounted: ye,
@@ -1102,9 +1101,9 @@ const un = {
1102
1101
  function hn(e) {
1103
1102
  e.addEventListener("blur", () => {
1104
1103
  let t = e.value;
1105
- /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + Z(/* @__PURE__ */ new Date(), "yy"));
1104
+ /^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + G(/* @__PURE__ */ new Date(), "yy"));
1106
1105
  const n = Date.parse(t);
1107
- isNaN(n) ? e.value = "" : e.value = Z(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1106
+ isNaN(n) ? e.value = "" : e.value = G(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
1108
1107
  });
1109
1108
  }
1110
1109
  const fn = {
@@ -1115,19 +1114,19 @@ function ge(e, t) {
1115
1114
  t.value == t.oldValue && e.innerHTML.length || (e.innerText = pn(e, t));
1116
1115
  }
1117
1116
  function pn(e, t) {
1118
- var c, y;
1117
+ var c, f;
1119
1118
  if (!t.value)
1120
1119
  return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
1121
1120
  let n = "";
1122
1121
  const s = t.value.replace(/ /g, "T").replace(/\.\d+Z$/, "Z"), i = e.attributes.getNamedItem("local") !== null ? s.replace(/Z$/, "") : s.replace(/(Z|\+00:00)?$/, "Z"), o = new Date(i);
1123
1122
  e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
1124
- let r = (y = e.attributes.getNamedItem("format")) == null ? void 0 : y.value;
1123
+ let r = (f = e.attributes.getNamedItem("format")) == null ? void 0 : f.value;
1125
1124
  if (!r && e.attributes.getNamedItem("relative-date") !== null) {
1126
- const h = /* @__PURE__ */ new Date();
1127
- h.getFullYear() == o.getFullYear() && h.getMonth() == o.getMonth() && h.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1125
+ const g = /* @__PURE__ */ new Date();
1126
+ g.getFullYear() == o.getFullYear() && g.getMonth() == o.getMonth() && g.getDate() == o.getDate() && (n = "at", r = "HH:mm");
1128
1127
  }
1129
1128
  r || (r = V.defaultDateTimeFormat);
1130
- let l = Z(o, r);
1129
+ let l = G(o, r);
1131
1130
  return n && (l = n + " " + l), l;
1132
1131
  }
1133
1132
  const mn = {
@@ -1274,16 +1273,16 @@ function es(e) {
1274
1273
  export {
1275
1274
  pe as FileUploadRequest,
1276
1275
  _n as OverlayContainer,
1277
- q as UserError,
1276
+ z as UserError,
1278
1277
  In as VfAjaxSelect,
1279
- z as VfAlertModal,
1278
+ X as VfAlertModal,
1280
1279
  jn as VfEzSmartSelect,
1281
1280
  yt as VfModal,
1282
1281
  Ft as VfSmartSelect,
1283
1282
  Yn as cloneProp,
1284
1283
  Bn as configureVf,
1285
1284
  Pn as createFilters,
1286
- ne as createOverlayInjection,
1285
+ se as createOverlayInjection,
1287
1286
  St as desnakeCase,
1288
1287
  ct as dismissOverlayInjectionById,
1289
1288
  Hn as dismissOverlayInjectionByInstance,
@@ -1305,7 +1304,7 @@ export {
1305
1304
  Kn as nl2br,
1306
1305
  Zn as nullifyEmptyInputs,
1307
1306
  ie as presentOverlay,
1308
- se as removeOverlayInjection,
1307
+ P as removeOverlayInjection,
1309
1308
  qn as replaceElement,
1310
1309
  de as showAlert,
1311
1310
  Dn 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.6.0",
4
+ "version": "4.7.0",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "bin": {
@@ -39,37 +39,37 @@
39
39
  "dependencies": {
40
40
  "date-fns": "^2.30.0",
41
41
  "lodash": "^4.17.21",
42
- "type-fest": "^3.11.0",
42
+ "type-fest": "^4.1.0",
43
43
  "uuid": "^9.0.0",
44
44
  "vue": "^3.3.4"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@nabla/vite-plugin-eslint": "^1.5.0",
48
- "@rushstack/eslint-patch": "^1.3.0",
49
- "@tsconfig/node18": "^2.0.1",
48
+ "@rushstack/eslint-patch": "^1.3.2",
49
+ "@tsconfig/node18": "^18.2.0",
50
50
  "@types/jsdom": "^21.1.1",
51
- "@types/lodash": "^4.14.194",
52
- "@types/node": "^18.15.11",
53
- "@types/uuid": "^9.0.1",
51
+ "@types/lodash": "^4.14.196",
52
+ "@types/node": "^18.17.1",
53
+ "@types/uuid": "^9.0.2",
54
54
  "@vitejs/plugin-vue": "^4.2.3",
55
- "@vue/eslint-config-prettier": "^7.1.0",
55
+ "@vue/eslint-config-prettier": "^8.0.0",
56
56
  "@vue/eslint-config-typescript": "^11.0.3",
57
- "@vue/test-utils": "^2.3.2",
57
+ "@vue/test-utils": "^2.4.1",
58
58
  "@vue/tsconfig": "^0.4.0",
59
- "cypress": "^12.12.0",
60
- "eslint": "^8.41.0",
59
+ "cypress": "^12.17.2",
60
+ "eslint": "^8.46.0",
61
61
  "eslint-plugin-cypress": "^2.13.3",
62
62
  "eslint-plugin-simple-import-sort": "^10.0.0",
63
- "eslint-plugin-unused-imports": "^2.0.0",
64
- "eslint-plugin-vue": "^9.14.0",
65
- "jsdom": "^22.0.0",
66
- "openapi-typescript-codegen": "^0.24.0",
67
- "prettier": "^2.8.8",
68
- "sass": "^1.62.1",
63
+ "eslint-plugin-unused-imports": "^3.0.0",
64
+ "eslint-plugin-vue": "^9.16.1",
65
+ "jsdom": "^22.1.0",
66
+ "openapi-typescript-codegen": "^0.25.0",
67
+ "prettier": "^3.0.0",
68
+ "sass": "^1.64.2",
69
69
  "start-server-and-test": "^2.0.0",
70
- "typescript": "~5.0.4",
71
- "vite": "^4.3.8",
72
- "vitest": "^0.31.1",
73
- "vue-tsc": "^1.6.5"
70
+ "typescript": "~5.1.6",
71
+ "vite": "^4.4.7",
72
+ "vitest": "^0.33.0",
73
+ "vue-tsc": "^1.8.8"
74
74
  }
75
75
  }
@@ -23,7 +23,7 @@ interface OverlayOptions {
23
23
  anchor?: OverlayAnchorOptions;
24
24
  }
25
25
 
26
- interface OverlayInjection<C extends OverlayComponent> {
26
+ export interface OverlayInjection<C extends OverlayComponent> {
27
27
  id: string;
28
28
  component: OverlayComponentUnwrapped<C>;
29
29
  props: OverlayComponentProps<C>;
@@ -1,10 +1,10 @@
1
- import { createOverlayInjection, removeOverlayInjection } from './overlay-container';
1
+ import { createOverlayInjection, type OverlayInjection, removeOverlayInjection } from './overlay-container';
2
2
  import Toast, { type IToastOptions } from './toast.vue';
3
3
 
4
4
  export function showToast(options: IToastOptions) {
5
- const injection = createOverlayInjection(Toast, {
5
+ const injection: OverlayInjection<typeof Toast> = createOverlayInjection(Toast, {
6
6
  ...options,
7
- callback: () => {}
7
+ callback: () => removeOverlayInjection(injection)
8
8
  });
9
9
  return () => removeOverlayInjection(injection);
10
10
  }
@@ -60,7 +60,10 @@ class VfTooltip {
60
60
  private handleTargetMouseEnterWithContext = this.handleTargetMouseEnter.bind(this);
61
61
  private handleTargetMouseLeaveWithContext = this.handleTargetMouseLeave.bind(this);
62
62
 
63
- constructor(private el: HTMLElement, private config: ITooltipOptions) {
63
+ constructor(
64
+ private el: HTMLElement,
65
+ private config: ITooltipOptions
66
+ ) {
64
67
  el.addEventListener('mouseenter', this.handleTargetMouseEnterWithContext);
65
68
  el.addEventListener('mouseleave', this.handleTargetMouseLeaveWithContext);
66
69
  }
@@ -41,8 +41,10 @@ export declare class ICancelablePromise<T = any> {
41
41
 
42
42
  interface IWrappedApiClientOptions<P extends ICancelablePromise = ICancelablePromise, Arguments extends unknown[] = any[]> {
43
43
  apiClient: IApiClient;
44
+ wrapper?: (options: IRequestOptions, fn: (options: IRequestOptions) => P) => P;
44
45
  onRequest?: (options: IRequestOptions) => IRequestOptions;
45
46
  onError?: (err: Error, options: IRequestOptions) => Error | null | void;
47
+ afterRequest?: (options: IRequestOptions) => void;
46
48
  CancelablePromise: new (...arguments_: Arguments) => P;
47
49
  }
48
50
 
@@ -50,36 +52,42 @@ export function isApiError(err: any): err is IApiError {
50
52
  return err instanceof Error && 'status' in err && 'body' in err;
51
53
  }
52
54
 
53
- export function installApiClientInterceptors({ apiClient, onRequest, onError, CancelablePromise }: IWrappedApiClientOptions) {
55
+ export function installApiClientInterceptors({ apiClient, wrapper, onRequest, onError, afterRequest, CancelablePromise }: IWrappedApiClientOptions) {
54
56
  const originalRequest = apiClient.request.request.bind(apiClient.request);
57
+ const resolvedWrapper = wrapper ?? ((options, fn) => fn(options));
55
58
  apiClient.request.request = (options: IRequestOptions) => {
56
- options = rewriteOptionsForFileUpload(options);
57
-
58
- if (onRequest) {
59
- options = onRequest(options);
60
- }
61
-
62
- return new CancelablePromise((resolve: (value: any) => void, reject: (err: any) => void, onCancel: (handler: () => void) => void) => {
63
- const promise = originalRequest(options);
64
- onCancel(promise.cancel);
65
- promise.then(resolve).catch(err => {
66
- if (isApiError(err) && typeof err.body === 'object' && 'error' in err.body) {
67
- if (err.status === 422) {
68
- return reject(new UserError(err.body.error));
69
- }
70
-
71
- err.message = `${err.body.error} (${err.status})`;
72
- }
73
- if (onError) {
74
- const handlerResult = onError(err, options);
75
- if (handlerResult === null) {
76
- return;
77
- }
78
- if (handlerResult instanceof Error) {
79
- return reject(handlerResult);
80
- }
81
- }
82
- reject(err);
59
+ return resolvedWrapper(options, options => {
60
+ options = rewriteOptionsForFileUpload(options);
61
+
62
+ if (onRequest) {
63
+ options = onRequest(options);
64
+ }
65
+
66
+ return new CancelablePromise((resolve: (value: any) => void, reject: (err: any) => void, onCancel: (handler: () => void) => void) => {
67
+ const promise = originalRequest(options);
68
+ onCancel(promise.cancel);
69
+ promise
70
+ .then(resolve)
71
+ .catch(err => {
72
+ if (isApiError(err) && typeof err.body === 'object' && 'error' in err.body) {
73
+ if (err.status === 422) {
74
+ return reject(new UserError(err.body.error));
75
+ }
76
+
77
+ err.message = `${err.body.error} (${err.status})`;
78
+ }
79
+ if (onError) {
80
+ const handlerResult = onError(err, options);
81
+ if (handlerResult === null) {
82
+ return;
83
+ }
84
+ if (handlerResult instanceof Error) {
85
+ return reject(handlerResult);
86
+ }
87
+ }
88
+ reject(err);
89
+ })
90
+ .finally(() => afterRequest?.(options));
83
91
  });
84
92
  });
85
93
  };
@@ -80,7 +80,10 @@ function discoverScrollableAncestorEl(el: Element): Element | null {
80
80
  export class InfiniteScrollHandler {
81
81
  isTripped = false;
82
82
 
83
- constructor(private el: Element, private handler: (e: Event) => void) {
83
+ constructor(
84
+ private el: Element,
85
+ private handler: (e: Event) => void
86
+ ) {
84
87
  this.install();
85
88
  }
86
89