@signal24/vue-foundation 4.4.0 → 4.5.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.
- package/dist/src/helpers/openapi.d.ts +10 -0
- package/dist/vue-foundation.es.js +347 -322
- package/package.json +1 -1
- package/src/helpers/openapi.ts +38 -0
|
@@ -37,4 +37,14 @@ interface IWrappedApiClientOptions<P extends ICancelablePromise = ICancelablePro
|
|
|
37
37
|
}
|
|
38
38
|
export declare function isApiError(err: any): err is IApiError;
|
|
39
39
|
export declare function installApiClientInterceptors({ apiClient, onRequest, onError, CancelablePromise }: IWrappedApiClientOptions): void;
|
|
40
|
+
export declare class FileUploadRequest {
|
|
41
|
+
constructor(blob: Blob);
|
|
42
|
+
validator: null;
|
|
43
|
+
lastModifiedDate: null;
|
|
44
|
+
size: number;
|
|
45
|
+
path: string;
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
blob: Blob;
|
|
49
|
+
}
|
|
40
50
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as x, defineProps as
|
|
5
|
-
import { debounce as
|
|
6
|
-
import { escapeHtml as
|
|
7
|
-
import { escapeHtml as
|
|
1
|
+
var Ve = Object.defineProperty;
|
|
2
|
+
var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var m = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent as x, defineProps as Re, defineEmits as Ne, ref as w, computed as N, openBlock as u, createElementBlock as f, createElementVNode as k, toDisplayString as H, withDirectives as K, createCommentVNode as b, Fragment as U, renderList as G, vModelSelect as Ke, getCurrentInstance as Q, onMounted as B, normalizeClass as T, normalizeStyle as Ue, withModifiers as Ee, renderSlot as R, reactive as je, h as j, Teleport as We, markRaw as Pe, onBeforeUnmount as J, resolveDirective as Oe, createBlock as be, createSlots as qe, withCtx as z, createTextVNode as se, vModelText as ze, watch as oe, onActivated as Te, onDeactivated as we } from "vue";
|
|
5
|
+
import { debounce as Xe, isEqual as ke, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
|
|
6
|
+
import { escapeHtml as Je } from "@vue/shared";
|
|
7
|
+
import { escapeHtml as Zn } from "@vue/shared";
|
|
8
8
|
import { format as Y } from "date-fns";
|
|
9
|
-
const
|
|
9
|
+
const et = x({
|
|
10
10
|
setup() {
|
|
11
|
-
const e =
|
|
12
|
-
|
|
13
|
-
const t =
|
|
11
|
+
const e = Re();
|
|
12
|
+
Ne(["update:modelValue"]);
|
|
13
|
+
const t = w(null), n = N(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = w(e.modelValue ?? null);
|
|
14
14
|
return { props: e, options: t, renderOptions: n, selectedItem: i };
|
|
15
15
|
},
|
|
16
16
|
watch: {
|
|
@@ -32,66 +32,66 @@ const Je = x({
|
|
|
32
32
|
this.options = await this.props.loadFn();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), Se = (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
|
-
},
|
|
40
|
+
}, tt = {
|
|
41
41
|
key: 0,
|
|
42
42
|
disabled: ""
|
|
43
|
-
},
|
|
43
|
+
}, nt = {
|
|
44
44
|
key: 0,
|
|
45
45
|
value: null
|
|
46
|
-
},
|
|
47
|
-
function
|
|
46
|
+
}, it = ["value"];
|
|
47
|
+
function st(e, t, n, i, s, o) {
|
|
48
48
|
return e.renderOptions ? K((u(), 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",
|
|
52
|
+
e.props.nullText ? (u(), f("option", nt, H(e.props.nullText), 1)) : b("", !0),
|
|
53
53
|
(u(!0), f(U, null, G(e.renderOptions, (r, l) => {
|
|
54
54
|
var c;
|
|
55
55
|
return u(), f("option", {
|
|
56
56
|
key: l,
|
|
57
57
|
value: (c = e.options) == null ? void 0 : c[l]
|
|
58
|
-
}, H(r), 9,
|
|
58
|
+
}, H(r), 9, it);
|
|
59
59
|
}), 128))
|
|
60
60
|
], 512)), [
|
|
61
|
-
[
|
|
62
|
-
]) : (u(), f("select",
|
|
61
|
+
[Ke, e.selectedItem]
|
|
62
|
+
]) : (u(), f("select", tt, [
|
|
63
63
|
k("option", null, H(e.props.loadingText || "Loading..."), 1)
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const kn = /* @__PURE__ */ Se(et, [["render", st]]), ot = ["onClick"], lt = /* @__PURE__ */ x({
|
|
67
67
|
__name: "overlay-anchor",
|
|
68
68
|
props: {
|
|
69
69
|
overlayId: {},
|
|
70
70
|
anchor: {}
|
|
71
71
|
},
|
|
72
72
|
setup(e) {
|
|
73
|
-
const t = e, n = t.anchor instanceof HTMLElement ? t.anchor : t.anchor.el, i =
|
|
74
|
-
|
|
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 = Q();
|
|
74
|
+
B(r);
|
|
75
75
|
function r() {
|
|
76
|
-
const
|
|
76
|
+
const v = o.vnode.el, { styles: h, classes: a } = l(v, n);
|
|
77
77
|
i.value = h, s.value = a;
|
|
78
78
|
}
|
|
79
|
-
function l(
|
|
80
|
-
const a = t.anchor instanceof HTMLElement ? {} : t.anchor, p = h.getBoundingClientRect(), d =
|
|
79
|
+
function l(v, h) {
|
|
80
|
+
const a = t.anchor instanceof HTMLElement ? {} : t.anchor, p = h.getBoundingClientRect(), d = v.getBoundingClientRect();
|
|
81
81
|
a.matchWidth && (d.width = p.width), a.matchHeight && (d.height = p.height);
|
|
82
|
-
const
|
|
82
|
+
const g = a.class ? Array.isArray(a.class) ? a.class : [a.class] : [];
|
|
83
83
|
let E, S;
|
|
84
84
|
if (a.y === "center")
|
|
85
|
-
E = p.top + p.height / 2 - d.height / 2,
|
|
85
|
+
E = p.top + p.height / 2 - d.height / 2, g.push("anchored-center-y");
|
|
86
86
|
else {
|
|
87
87
|
const L = (p.bottom + d.height < window.innerHeight || a.y === "below") && a.y !== "above";
|
|
88
|
-
E = L ? p.bottom : p.top - d.height,
|
|
88
|
+
E = L ? p.bottom : p.top - d.height, g.push(L ? "anchored-top" : "anchored-bottom");
|
|
89
89
|
}
|
|
90
90
|
if (a.x === "center")
|
|
91
|
-
S = p.left + p.width / 2 - d.width / 2,
|
|
91
|
+
S = p.left + p.width / 2 - d.width / 2, g.push("anchored-center-x");
|
|
92
92
|
else {
|
|
93
93
|
const L = (p.left + d.width < window.innerWidth || a.x === "left") && a.x !== "right";
|
|
94
|
-
S = L ? p.left : p.right - d.width,
|
|
94
|
+
S = L ? p.left : p.right - d.width, g.push(L ? "anchored-left" : "anchored-right");
|
|
95
95
|
}
|
|
96
96
|
return {
|
|
97
97
|
styles: {
|
|
@@ -100,37 +100,37 @@ const wn = /* @__PURE__ */ ke(Je, [["render", it]]), st = ["onClick"], ot = /* @
|
|
|
100
100
|
...a.matchWidth ? { width: `${d.width}px` } : {},
|
|
101
101
|
...a.matchHeight ? { height: `${d.height}px` } : {}
|
|
102
102
|
},
|
|
103
|
-
classes:
|
|
103
|
+
classes: g
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
function c() {
|
|
107
|
-
window.removeEventListener("click", c),
|
|
107
|
+
window.removeEventListener("click", c), ct(t.overlayId);
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return B(() => {
|
|
110
110
|
setTimeout(() => {
|
|
111
111
|
window.addEventListener("click", c);
|
|
112
112
|
}, 10);
|
|
113
|
-
}), (
|
|
114
|
-
class:
|
|
115
|
-
style:
|
|
116
|
-
onClick:
|
|
113
|
+
}), (v, h) => (u(), f("div", {
|
|
114
|
+
class: T(["vf-overlay-anchor", s.value]),
|
|
115
|
+
style: Ue(i.value),
|
|
116
|
+
onClick: Ee(c, ["stop"])
|
|
117
117
|
}, [
|
|
118
|
-
R(
|
|
119
|
-
], 14,
|
|
118
|
+
R(v.$slots, "default")
|
|
119
|
+
], 14, ot));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
let
|
|
123
|
-
const O =
|
|
122
|
+
let rt = 0;
|
|
123
|
+
const O = je([]), Sn = x({
|
|
124
124
|
setup() {
|
|
125
|
-
return () =>
|
|
126
|
-
G(O, (e) =>
|
|
125
|
+
return () => j("div", [
|
|
126
|
+
G(O, (e) => j(We, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
127
127
|
]);
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
function
|
|
130
|
+
function xe(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(++
|
|
133
|
+
const s = String(++rt), o = Pe(e), r = j(o, t), l = n != null && n.anchor ? j(lt, { overlayId: s, anchor: n.anchor }, () => [r]) : void 0, c = {
|
|
134
134
|
id: s,
|
|
135
135
|
component: o,
|
|
136
136
|
props: t,
|
|
@@ -140,23 +140,23 @@ function Se(e, t, n) {
|
|
|
140
140
|
};
|
|
141
141
|
return O.push(c), c;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
143
|
+
function xn(e) {
|
|
144
|
+
Le(e.$);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Le(e) {
|
|
147
147
|
let t = e;
|
|
148
|
-
for (; t && !
|
|
148
|
+
for (; t && !at(t.vnode); )
|
|
149
149
|
t = t.parent;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function at(e) {
|
|
152
152
|
const t = O.findIndex((n) => n.vnode.component === e.component);
|
|
153
153
|
return t >= 0 ? (O[t].props.callback(), !0) : !1;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ct(e) {
|
|
156
156
|
const t = O.findIndex((n) => n.id === e);
|
|
157
157
|
return t >= 0 ? (O[t].props.callback(), !0) : !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ce(e) {
|
|
160
160
|
const t = O.indexOf(e);
|
|
161
161
|
t >= 0 && O.splice(t, 1);
|
|
162
162
|
}
|
|
@@ -164,46 +164,46 @@ async function ee(e, t, n) {
|
|
|
164
164
|
return new Promise((i) => {
|
|
165
165
|
let s = null;
|
|
166
166
|
const r = { ...t, callback: (l) => {
|
|
167
|
-
|
|
167
|
+
Ce(s), i(l);
|
|
168
168
|
} };
|
|
169
|
-
s =
|
|
169
|
+
s = xe(e, r, n);
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function W(e, t) {
|
|
173
173
|
return { title: t ? e : void 0, message: t ?? e };
|
|
174
174
|
}
|
|
175
175
|
async function le(e, t) {
|
|
176
|
-
await ee(q,
|
|
176
|
+
await ee(q, W(e, t));
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function Ln(e, t) {
|
|
179
179
|
return await ee(q, {
|
|
180
|
-
...
|
|
180
|
+
...W(e, t),
|
|
181
181
|
shouldConfirm: !0
|
|
182
182
|
}) === !0;
|
|
183
183
|
}
|
|
184
|
-
async function
|
|
184
|
+
async function Cn(e, t) {
|
|
185
185
|
return await ee(q, {
|
|
186
|
-
...
|
|
186
|
+
...W(e, t),
|
|
187
187
|
shouldConfirm: !0,
|
|
188
188
|
classes: ["destructive"]
|
|
189
189
|
}) === !0;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
const n =
|
|
193
|
-
...
|
|
191
|
+
function Mn(e, t) {
|
|
192
|
+
const n = xe(q, {
|
|
193
|
+
...W(e, t),
|
|
194
194
|
isBare: !0,
|
|
195
195
|
classes: ["wait"],
|
|
196
196
|
callback: () => {
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
-
return () =>
|
|
199
|
+
return () => Ce(n);
|
|
200
200
|
}
|
|
201
201
|
const V = {
|
|
202
202
|
unhandledErrorSupportText: "please contact support",
|
|
203
203
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
204
204
|
defaultDateTimeFormat: "MM/dd/yy HH:mm"
|
|
205
205
|
};
|
|
206
|
-
function
|
|
206
|
+
function In(e) {
|
|
207
207
|
Object.assign(V, e);
|
|
208
208
|
}
|
|
209
209
|
class P extends Error {
|
|
@@ -211,7 +211,7 @@ class P extends Error {
|
|
|
211
211
|
super(t), this.name = "UserError";
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function dt(e) {
|
|
215
215
|
return e instanceof P ? e.message : `An application error has occurred:
|
|
216
216
|
|
|
217
217
|
${te(e).message}
|
|
@@ -221,36 +221,36 @@ Please refresh the page and try again. If this error persists, ${V.unhandledErro
|
|
|
221
221
|
function te(e) {
|
|
222
222
|
return e instanceof Error ? e : new Error(String(e));
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
224
|
+
async function Hn(e, t) {
|
|
225
225
|
const n = te(e);
|
|
226
226
|
return n instanceof P || V.errorHandler(n), t ? le(t, n) : le(n);
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
228
|
+
async function Dn(e) {
|
|
229
229
|
const t = te(e);
|
|
230
230
|
t instanceof P || V.errorHandler(t);
|
|
231
231
|
}
|
|
232
232
|
const D = Symbol("MaskState");
|
|
233
|
-
function
|
|
233
|
+
function An(e, t) {
|
|
234
234
|
const n = e.$.vnode.el, i = n.closest(".vf-modal");
|
|
235
|
-
return
|
|
235
|
+
return ut(i ?? n, t);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function $n(e) {
|
|
238
238
|
const t = e.$.vnode.el, n = t.closest(".vf-modal");
|
|
239
|
-
return
|
|
239
|
+
return Me(n ?? t);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function ut(e, t) {
|
|
242
242
|
if (!e[D]) {
|
|
243
243
|
const n = document.createElement("div");
|
|
244
244
|
n.classList.add("vf-mask"), e.appendChild(n), e[D] = { maskEl: n };
|
|
245
245
|
}
|
|
246
|
-
return e[D].maskEl.innerText = t ?? "", () =>
|
|
246
|
+
return e[D].maskEl.innerText = t ?? "", () => Me(e);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Me(e) {
|
|
249
249
|
e[D] && e.removeChild(e[D].maskEl);
|
|
250
250
|
}
|
|
251
251
|
const Z = Symbol("FormMaskState");
|
|
252
|
-
function
|
|
253
|
-
const i = e instanceof Element ? e :
|
|
252
|
+
function ht(e, t, n) {
|
|
253
|
+
const i = e instanceof Element ? e : He(e);
|
|
254
254
|
i.classList.add("vf-masked");
|
|
255
255
|
const s = t instanceof Element ? t : i.querySelectorAll(t ?? 'button:not([disabled]):not([type="button"])')[0], o = s.tagName === "INPUT" ? s.value : s.innerHTML;
|
|
256
256
|
s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...";
|
|
@@ -259,23 +259,23 @@ function ut(e, t, n) {
|
|
|
259
259
|
disabledElements: l,
|
|
260
260
|
waitButton: s,
|
|
261
261
|
buttonHtml: o
|
|
262
|
-
}, () =>
|
|
262
|
+
}, () => Ie(i);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
const t = e instanceof Element ? e :
|
|
264
|
+
function Ie(e) {
|
|
265
|
+
const t = e instanceof Element ? e : He(e), n = t[Z];
|
|
266
266
|
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerHTML = n.buttonHtml, n.waitButton.removeAttribute("disabled"), delete t[Z]);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function He(e) {
|
|
269
269
|
const t = e.$.vnode.el;
|
|
270
270
|
return t.tagName === "FORM" ? t : t.querySelector("form");
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const ft = ["id"], pt = {
|
|
273
273
|
key: 0,
|
|
274
274
|
class: "vf-modal-header"
|
|
275
|
-
},
|
|
275
|
+
}, mt = { class: "vf-modal-content" }, vt = {
|
|
276
276
|
key: 1,
|
|
277
277
|
class: "vf-modal-footer"
|
|
278
|
-
},
|
|
278
|
+
}, yt = /* @__PURE__ */ x({
|
|
279
279
|
__name: "modal",
|
|
280
280
|
props: {
|
|
281
281
|
id: {},
|
|
@@ -287,9 +287,9 @@ const ht = ["id"], ft = {
|
|
|
287
287
|
emits: ["formSubmit"],
|
|
288
288
|
setup(e, { expose: t }) {
|
|
289
289
|
const n = e, i = Q();
|
|
290
|
-
t({ mask:
|
|
291
|
-
const s =
|
|
292
|
-
|
|
290
|
+
t({ mask: v, unmask: h });
|
|
291
|
+
const s = w(), o = w();
|
|
292
|
+
B(() => {
|
|
293
293
|
var a;
|
|
294
294
|
document.body.classList.add("vf-modal-open"), n.closeOnMaskClick && (window.addEventListener("keydown", l), (a = s.value) == null || a.addEventListener("click", r));
|
|
295
295
|
}), J(() => {
|
|
@@ -305,46 +305,46 @@ const ht = ["id"], ft = {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
function c() {
|
|
308
|
-
|
|
308
|
+
Le(i);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
|
|
310
|
+
function v() {
|
|
311
|
+
ht(o.value);
|
|
312
312
|
}
|
|
313
313
|
function h() {
|
|
314
|
-
|
|
314
|
+
Ie(o.value);
|
|
315
315
|
}
|
|
316
316
|
return (a, p) => (u(), f("div", {
|
|
317
317
|
id: a.id,
|
|
318
|
-
class:
|
|
318
|
+
class: T(["vf-overlay vf-modal-wrap", n.class]),
|
|
319
319
|
ref_key: "overlay",
|
|
320
320
|
ref: s
|
|
321
321
|
}, [
|
|
322
322
|
k("form", {
|
|
323
323
|
action: ".",
|
|
324
|
-
class:
|
|
325
|
-
onSubmit: p[0] || (p[0] =
|
|
324
|
+
class: T(["vf-modal", { scrolls: a.scrolls }]),
|
|
325
|
+
onSubmit: p[0] || (p[0] = Ee((d) => a.$emit("formSubmit"), ["prevent"])),
|
|
326
326
|
ref_key: "form",
|
|
327
327
|
ref: o
|
|
328
328
|
}, [
|
|
329
|
-
a.$slots.header ? (u(), f("div",
|
|
329
|
+
a.$slots.header ? (u(), f("div", pt, [
|
|
330
330
|
R(a.$slots, "header"),
|
|
331
331
|
n.closeX ? (u(), f("i", {
|
|
332
332
|
key: 0,
|
|
333
333
|
class: "close",
|
|
334
334
|
onClick: c
|
|
335
|
-
})) :
|
|
336
|
-
])) :
|
|
337
|
-
k("div",
|
|
335
|
+
})) : b("", !0)
|
|
336
|
+
])) : b("", !0),
|
|
337
|
+
k("div", mt, [
|
|
338
338
|
R(a.$slots, "default")
|
|
339
339
|
]),
|
|
340
|
-
a.$slots.footer ? (u(), f("div",
|
|
340
|
+
a.$slots.footer ? (u(), f("div", vt, [
|
|
341
341
|
R(a.$slots, "footer")
|
|
342
|
-
])) :
|
|
342
|
+
])) : b("", !0)
|
|
343
343
|
], 34)
|
|
344
|
-
], 10,
|
|
344
|
+
], 10, ft));
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
const
|
|
347
|
+
const gt = ["innerHtml"], Et = ["innerText"], q = /* @__PURE__ */ x({
|
|
348
348
|
__name: "alert-modal",
|
|
349
349
|
props: {
|
|
350
350
|
isBare: { type: Boolean },
|
|
@@ -356,21 +356,21 @@ const yt = ["innerHtml"], gt = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
356
356
|
callback: { type: Function }
|
|
357
357
|
},
|
|
358
358
|
setup(e) {
|
|
359
|
-
const t = e, n = N(() => t.message instanceof Error ?
|
|
359
|
+
const t = e, n = N(() => t.message instanceof Error ? dt(t.message) : t.message);
|
|
360
360
|
return (i, s) => {
|
|
361
|
-
const o =
|
|
362
|
-
return u(),
|
|
363
|
-
class:
|
|
364
|
-
},
|
|
361
|
+
const o = Oe("autofocus");
|
|
362
|
+
return u(), be(yt, {
|
|
363
|
+
class: T(["vf-alert", i.classes])
|
|
364
|
+
}, qe({
|
|
365
365
|
default: z(() => [
|
|
366
366
|
i.isHtml ? (u(), f("div", {
|
|
367
367
|
key: 0,
|
|
368
368
|
innerHtml: i.message,
|
|
369
369
|
class: "user-message"
|
|
370
|
-
}, null, 8,
|
|
370
|
+
}, null, 8, gt)) : (u(), f("div", {
|
|
371
371
|
key: 1,
|
|
372
372
|
innerText: n.value
|
|
373
|
-
}, null, 8,
|
|
373
|
+
}, null, 8, Et))
|
|
374
374
|
]),
|
|
375
375
|
_: 2
|
|
376
376
|
}, [
|
|
@@ -414,26 +414,26 @@ const yt = ["innerHtml"], gt = ["innerText"], q = /* @__PURE__ */ x({
|
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
let F;
|
|
417
|
-
const
|
|
418
|
-
function
|
|
417
|
+
const Ot = new Uint8Array(16);
|
|
418
|
+
function bt() {
|
|
419
419
|
if (!F && (F = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !F))
|
|
420
420
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
421
|
-
return F(
|
|
421
|
+
return F(Ot);
|
|
422
422
|
}
|
|
423
|
-
const
|
|
423
|
+
const y = [];
|
|
424
424
|
for (let e = 0; e < 256; ++e)
|
|
425
|
-
|
|
425
|
+
y.push((e + 256).toString(16).slice(1));
|
|
426
426
|
function Tt(e, t = 0) {
|
|
427
|
-
return (
|
|
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 wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), re = {
|
|
430
430
|
randomUUID: wt
|
|
431
431
|
};
|
|
432
|
-
function
|
|
432
|
+
function kt(e, t, n) {
|
|
433
433
|
if (re.randomUUID && !t && !e)
|
|
434
434
|
return re.randomUUID();
|
|
435
435
|
e = e || {};
|
|
436
|
-
const i = e.random || (e.rng ||
|
|
436
|
+
const i = e.random || (e.rng || bt)();
|
|
437
437
|
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
|
438
438
|
n = n || 0;
|
|
439
439
|
for (let s = 0; s < 16; ++s)
|
|
@@ -442,23 +442,23 @@ function bt(e, t, n) {
|
|
|
442
442
|
}
|
|
443
443
|
return Tt(i);
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Bn(e) {
|
|
446
446
|
return e.replace(/\n/g, "<br>");
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function St(e) {
|
|
449
449
|
return e.replace(/_/g, " ");
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function xt(e) {
|
|
452
452
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
453
453
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Lt(e) {
|
|
456
456
|
return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
return
|
|
458
|
+
function _n() {
|
|
459
|
+
return kt();
|
|
460
460
|
}
|
|
461
|
-
const C = Symbol("null"), ae = Symbol("create"),
|
|
461
|
+
const C = Symbol("null"), ae = Symbol("create"), Ct = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", Mt = {
|
|
462
462
|
props: {
|
|
463
463
|
modelValue: {
|
|
464
464
|
type: null,
|
|
@@ -537,8 +537,8 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
537
537
|
return this.allOptions.map((e, t) => {
|
|
538
538
|
var l, c;
|
|
539
539
|
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 = [];
|
|
540
|
-
return this.searchFields ? this.searchFields.forEach((
|
|
541
|
-
e[
|
|
540
|
+
return this.searchFields ? this.searchFields.forEach((v) => {
|
|
541
|
+
e[v] && r.push(String(e[v]).toLowerCase());
|
|
542
542
|
}) : (r.push(s), 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),
|
|
@@ -555,7 +555,7 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
555
555
|
const t = this.searchText.trim().toLowerCase();
|
|
556
556
|
if (t.length) {
|
|
557
557
|
e = e.filter((s) => s.searchContent.includes(t));
|
|
558
|
-
const n =
|
|
558
|
+
const n = Je(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
|
|
559
559
|
e = e.map((s) => {
|
|
560
560
|
var o;
|
|
561
561
|
return {
|
|
@@ -605,7 +605,7 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
605
605
|
"update:modelValue",
|
|
606
606
|
this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
|
|
607
607
|
);
|
|
608
|
-
}), this.remoteSearch && this.$watch("searchText",
|
|
608
|
+
}), this.remoteSearch && this.$watch("searchText", Xe(this.reloadOptionsIfSearching, 250));
|
|
609
609
|
},
|
|
610
610
|
methods: {
|
|
611
611
|
async loadRemoteOptions() {
|
|
@@ -650,7 +650,7 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
650
650
|
this.searchText.length > 1 && (this.isSearching = !0);
|
|
651
651
|
return;
|
|
652
652
|
}
|
|
653
|
-
!e.metaKey &&
|
|
653
|
+
!e.metaKey && Ct.includes(e.key) && (this.isSearching = !0);
|
|
654
654
|
}
|
|
655
655
|
},
|
|
656
656
|
handleInputFocused() {
|
|
@@ -668,7 +668,7 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
668
668
|
const t = this.effectiveOptions.find((i) => i.ref === e);
|
|
669
669
|
if (t)
|
|
670
670
|
return t;
|
|
671
|
-
const n = this.effectiveOptions.find((i) =>
|
|
671
|
+
const n = this.effectiveOptions.find((i) => ke(i.ref, e));
|
|
672
672
|
return n || null;
|
|
673
673
|
},
|
|
674
674
|
handleInputBlurred() {
|
|
@@ -725,40 +725,40 @@ const C = Symbol("null"), ae = Symbol("create"), Lt = "`1234567890-=[]\\;',./~!@
|
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
};
|
|
728
|
-
const
|
|
728
|
+
const It = ["placeholder"], Ht = {
|
|
729
729
|
key: 0,
|
|
730
730
|
ref: "optionsContainer",
|
|
731
731
|
class: "vf-smart-select-options"
|
|
732
|
-
},
|
|
732
|
+
}, Dt = {
|
|
733
733
|
key: 0,
|
|
734
734
|
class: "no-results"
|
|
735
|
-
},
|
|
735
|
+
}, At = ["onMousemove", "onMousedown"], $t = ["innerHTML"], Bt = ["innerHTML"], _t = {
|
|
736
736
|
key: 0,
|
|
737
737
|
class: "no-results"
|
|
738
738
|
};
|
|
739
|
-
function
|
|
740
|
-
const r =
|
|
739
|
+
function Vt(e, t, n, i, s, o) {
|
|
740
|
+
const r = Oe("disabled");
|
|
741
741
|
return u(), f("div", {
|
|
742
|
-
class:
|
|
742
|
+
class: T(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
|
|
743
743
|
}, [
|
|
744
744
|
K(k("input", {
|
|
745
745
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l),
|
|
746
746
|
ref: "searchField",
|
|
747
747
|
type: "text",
|
|
748
|
-
class:
|
|
748
|
+
class: T({ nullable: !!n.nullTitle }),
|
|
749
749
|
onKeydown: t[1] || (t[1] = (...l) => o.handleKeyDown && o.handleKeyDown(...l)),
|
|
750
750
|
placeholder: o.effectivePlaceholder,
|
|
751
751
|
onFocus: t[2] || (t[2] = (...l) => o.handleInputFocused && o.handleInputFocused(...l)),
|
|
752
752
|
onBlur: t[3] || (t[3] = (...l) => o.handleInputBlurred && o.handleInputBlurred(...l))
|
|
753
|
-
}, null, 42,
|
|
754
|
-
[
|
|
753
|
+
}, null, 42, It), [
|
|
754
|
+
[ze, e.searchText],
|
|
755
755
|
[r, o.effectiveDisabled]
|
|
756
756
|
]),
|
|
757
|
-
e.shouldDisplayOptions ? (u(), f("div",
|
|
757
|
+
e.shouldDisplayOptions ? (u(), f("div", Ht, [
|
|
758
758
|
e.isLoaded ? (u(), f(U, { key: 1 }, [
|
|
759
759
|
(u(!0), f(U, null, G(o.effectiveOptions, (l) => (u(), f("div", {
|
|
760
760
|
key: String(l.key),
|
|
761
|
-
class:
|
|
761
|
+
class: T(["option", {
|
|
762
762
|
highlighted: e.highlightedOptionKey === l.key
|
|
763
763
|
}]),
|
|
764
764
|
onMousemove: (c) => o.handleOptionHover(l),
|
|
@@ -767,19 +767,19 @@ function Bt(e, t, n, i, s, o) {
|
|
|
767
767
|
k("div", {
|
|
768
768
|
class: "title",
|
|
769
769
|
innerHTML: l.title
|
|
770
|
-
}, null, 8,
|
|
770
|
+
}, null, 8, $t),
|
|
771
771
|
l.subtitle ? (u(), f("div", {
|
|
772
772
|
key: 0,
|
|
773
773
|
class: "subtitle",
|
|
774
774
|
innerHTML: l.subtitle
|
|
775
|
-
}, null, 8,
|
|
776
|
-
], 42,
|
|
777
|
-
!o.effectiveOptions.length && e.searchText ? (u(), f("div", _t, H(o.effectiveNoResultsText), 1)) :
|
|
778
|
-
], 64)) : (u(), f("div",
|
|
779
|
-
], 512)) :
|
|
775
|
+
}, null, 8, Bt)) : b("", !0)
|
|
776
|
+
], 42, At))), 128)),
|
|
777
|
+
!o.effectiveOptions.length && e.searchText ? (u(), f("div", _t, H(o.effectiveNoResultsText), 1)) : b("", !0)
|
|
778
|
+
], 64)) : (u(), f("div", Dt, "Loading..."))
|
|
779
|
+
], 512)) : b("", !0)
|
|
780
780
|
], 2);
|
|
781
781
|
}
|
|
782
|
-
const
|
|
782
|
+
const Ft = /* @__PURE__ */ Se(Mt, [["render", Vt]]), Vn = /* @__PURE__ */ x({
|
|
783
783
|
__name: "ez-smart-select",
|
|
784
784
|
props: {
|
|
785
785
|
modelValue: {},
|
|
@@ -796,7 +796,7 @@ const Vt = /* @__PURE__ */ ke(Ct, [["render", Bt]]), _n = /* @__PURE__ */ x({
|
|
|
796
796
|
}))), s = N(() => n.formatter ? (r) => {
|
|
797
797
|
var l;
|
|
798
798
|
return (l = n.formatter) == null ? void 0 : l.call(n, r.label);
|
|
799
|
-
} : (r) => r.label), o =
|
|
799
|
+
} : (r) => r.label), o = w(i.value.find((r) => r.value === n.modelValue) ?? null);
|
|
800
800
|
return oe(
|
|
801
801
|
() => n.modelValue,
|
|
802
802
|
(r) => {
|
|
@@ -804,8 +804,8 @@ const Vt = /* @__PURE__ */ ke(Ct, [["render", Bt]]), _n = /* @__PURE__ */ x({
|
|
|
804
804
|
}
|
|
805
805
|
), oe(o, (r) => {
|
|
806
806
|
var l;
|
|
807
|
-
t("update:modelValue", r ? ((l = i.value.find((c) =>
|
|
808
|
-
}), (r, l) => (u(),
|
|
807
|
+
t("update:modelValue", r ? ((l = i.value.find((c) => ke(c, r))) == null ? void 0 : l.value) ?? null : null);
|
|
808
|
+
}), (r, l) => (u(), be(Ft, {
|
|
809
809
|
modelValue: o.value,
|
|
810
810
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
|
|
811
811
|
options: i.value,
|
|
@@ -814,57 +814,57 @@ const Vt = /* @__PURE__ */ ke(Ct, [["render", Bt]]), _n = /* @__PURE__ */ x({
|
|
|
814
814
|
}, null, 8, ["modelValue", "options", "formatter", "null-title"]));
|
|
815
815
|
}
|
|
816
816
|
});
|
|
817
|
-
function
|
|
817
|
+
function Rt(e) {
|
|
818
818
|
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];
|
|
819
819
|
return `${i} ${s}`;
|
|
820
820
|
}
|
|
821
|
-
function Rt(e) {
|
|
822
|
-
return e != null && String(e).length ? e : "-";
|
|
823
|
-
}
|
|
824
821
|
function Nt(e) {
|
|
825
|
-
return e
|
|
822
|
+
return e != null && String(e).length ? e : "-";
|
|
826
823
|
}
|
|
827
824
|
function Kt(e) {
|
|
828
|
-
return e
|
|
825
|
+
return e || "-";
|
|
829
826
|
}
|
|
830
827
|
function Ut(e) {
|
|
831
|
-
return e &&
|
|
832
|
-
}
|
|
833
|
-
function Wt(e) {
|
|
834
|
-
return e ? Xe(e) : null;
|
|
828
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : Zt(Number(e));
|
|
835
829
|
}
|
|
836
830
|
function jt(e) {
|
|
831
|
+
return e && xt(e);
|
|
832
|
+
}
|
|
833
|
+
function Wt(e) {
|
|
837
834
|
return e ? Ye(e) : null;
|
|
838
835
|
}
|
|
839
836
|
function Pt(e) {
|
|
840
|
-
return e ? e
|
|
837
|
+
return e ? Ze(e) : null;
|
|
841
838
|
}
|
|
842
839
|
function qt(e) {
|
|
843
|
-
return e ?
|
|
840
|
+
return e ? e.toUpperCase() : null;
|
|
844
841
|
}
|
|
845
842
|
function zt(e) {
|
|
846
|
-
return
|
|
843
|
+
return e ? St(e) : null;
|
|
844
|
+
}
|
|
845
|
+
function Xt(e) {
|
|
846
|
+
return Lt(e);
|
|
847
847
|
}
|
|
848
848
|
const ce = {
|
|
849
|
-
bytes:
|
|
850
|
-
dash:
|
|
851
|
-
dashZeros:
|
|
852
|
-
number:
|
|
853
|
-
phone:
|
|
849
|
+
bytes: Rt,
|
|
850
|
+
dash: Nt,
|
|
851
|
+
dashZeros: Kt,
|
|
852
|
+
number: Ut,
|
|
853
|
+
phone: jt,
|
|
854
854
|
upperFirst: Wt,
|
|
855
|
-
startCase:
|
|
856
|
-
upperCase:
|
|
857
|
-
desnake:
|
|
858
|
-
usCurrency:
|
|
859
|
-
},
|
|
855
|
+
startCase: Pt,
|
|
856
|
+
upperCase: qt,
|
|
857
|
+
desnake: zt,
|
|
858
|
+
usCurrency: Xt
|
|
859
|
+
}, Fn = (e) => ({
|
|
860
860
|
...ce,
|
|
861
861
|
...e(ce)
|
|
862
862
|
});
|
|
863
|
-
function
|
|
863
|
+
function Rn(e, t, n) {
|
|
864
864
|
const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
865
865
|
return i === -1 ? !1 : (e.splice(i, 1, n), !0);
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Nn(e, t) {
|
|
868
868
|
const n = document.createElement("div");
|
|
869
869
|
n.classList.add("vf-overlay"), n.addEventListener("click", a), document.body.appendChild(n);
|
|
870
870
|
const i = document.createElement("div");
|
|
@@ -876,19 +876,19 @@ function Fn(e, t) {
|
|
|
876
876
|
E.classList.add("separator"), i.appendChild(E);
|
|
877
877
|
return;
|
|
878
878
|
}
|
|
879
|
-
const
|
|
880
|
-
|
|
879
|
+
const g = document.createElement("div");
|
|
880
|
+
g.classList.add("item"), g.style.userSelect = "none", g.innerText = d.title, i.appendChild(g), d.class && g.classList.add(d.class), d.shouldConfirm ? g.addEventListener("click", () => p(g, d.handler)) : g.addEventListener("click", () => d.handler());
|
|
881
881
|
});
|
|
882
|
-
const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth,
|
|
883
|
-
i.style.left =
|
|
882
|
+
const o = window.innerWidth - e.clientX, r = window.innerHeight - e.clientY, l = i.offsetHeight, c = i.offsetWidth, v = o < c ? e.clientX - c - 1 : e.clientX + 1, h = r < l ? e.clientY - l - 1 : e.clientY + 1;
|
|
883
|
+
i.style.left = v + "px", i.style.top = h + "px", setTimeout(() => {
|
|
884
884
|
i.style.width = i.offsetWidth + "px";
|
|
885
885
|
}, 50);
|
|
886
886
|
function a() {
|
|
887
887
|
t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
|
|
888
888
|
}
|
|
889
|
-
function p(d,
|
|
889
|
+
function p(d, g) {
|
|
890
890
|
if (d.classList.contains("pending-confirm"))
|
|
891
|
-
return
|
|
891
|
+
return g();
|
|
892
892
|
const E = d.innerHTML;
|
|
893
893
|
d.classList.add("pending-confirm"), d.innerText = "Confirm";
|
|
894
894
|
const S = () => {
|
|
@@ -897,28 +897,28 @@ function Fn(e, t) {
|
|
|
897
897
|
d.addEventListener("mouseleave", S), e.stopPropagation();
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
const
|
|
901
|
-
function
|
|
900
|
+
const Yt = (e) => new Promise((t) => setTimeout(t, e)), Kn = (e) => Yt(e * 1e3);
|
|
901
|
+
function Zt(e) {
|
|
902
902
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return e != null ?
|
|
904
|
+
function Un(e, t) {
|
|
905
|
+
return e != null ? Ge(e) : t;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function jn(e, t) {
|
|
908
908
|
const n = { ...e };
|
|
909
909
|
for (const i of t)
|
|
910
910
|
n[i] === "" && (n[i] = null);
|
|
911
911
|
return n;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Gt(e) {
|
|
914
914
|
return e instanceof Error && "status" in e && "body" in e;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Wn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
|
|
917
917
|
const s = e.request.request.bind(e.request);
|
|
918
|
-
e.request.request = (o) => (t && (o = t(o)), new i((r, l, c) => {
|
|
919
|
-
const
|
|
920
|
-
c(
|
|
921
|
-
if (
|
|
918
|
+
e.request.request = (o) => (o = Qt(o), t && (o = t(o)), new i((r, l, c) => {
|
|
919
|
+
const v = s(o);
|
|
920
|
+
c(v.cancel), v.then(r).catch((h) => {
|
|
921
|
+
if (Gt(h) && typeof h.body == "object" && "error" in h.body) {
|
|
922
922
|
if (h.status === 422)
|
|
923
923
|
return l(new P(h.body.error));
|
|
924
924
|
h.message = `${h.body.error} (${h.status})`;
|
|
@@ -934,41 +934,65 @@ function Un({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
|
|
|
934
934
|
});
|
|
935
935
|
}));
|
|
936
936
|
}
|
|
937
|
+
class de {
|
|
938
|
+
constructor(t) {
|
|
939
|
+
m(this, "validator", null);
|
|
940
|
+
m(this, "lastModifiedDate", null);
|
|
941
|
+
m(this, "size", 0);
|
|
942
|
+
m(this, "path", "");
|
|
943
|
+
m(this, "name", "");
|
|
944
|
+
m(this, "type", "");
|
|
945
|
+
m(this, "blob");
|
|
946
|
+
this.blob = t;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
function Qt(e) {
|
|
950
|
+
if (!(typeof e.body == "object" && Object.values(e.body).some((s) => s instanceof de)))
|
|
951
|
+
return e;
|
|
952
|
+
const n = {}, i = {};
|
|
953
|
+
for (const [s, o] of Object.entries(e.body))
|
|
954
|
+
o instanceof de ? n[s] = o.blob : i[s] = o;
|
|
955
|
+
return n._payload = new Blob([JSON.stringify(i)], { type: "application/json" }), {
|
|
956
|
+
...e,
|
|
957
|
+
body: void 0,
|
|
958
|
+
formData: n
|
|
959
|
+
};
|
|
960
|
+
}
|
|
937
961
|
const ne = Symbol("HookState");
|
|
938
|
-
function
|
|
962
|
+
function Pn(e, t) {
|
|
939
963
|
const n = t ?? Q();
|
|
940
|
-
|
|
964
|
+
B(() => Jt(n, e), n), Te(() => en(n), n), we(() => ue(n), n), J(() => ue(n), n);
|
|
941
965
|
}
|
|
942
|
-
function
|
|
966
|
+
function Jt(e, t) {
|
|
943
967
|
const n = {};
|
|
944
968
|
if (t.elScrolledToBottom && (n.el = new A(e.vnode.el, t.elScrolledToBottom)), t.ancestorScrolledToBottom) {
|
|
945
|
-
const i =
|
|
969
|
+
const i = De(e.vnode.el);
|
|
946
970
|
i ? n.ancestor = new A(i, t.ancestorScrolledToBottom) : console.warn("[VueFoundation] No scollable ancestor found for component:", e);
|
|
947
971
|
}
|
|
948
972
|
t.windowScrolledToBottom && (n.window = new A(window, t.windowScrolledToBottom)), e[ne] = n;
|
|
949
973
|
}
|
|
950
|
-
function
|
|
974
|
+
function en(e) {
|
|
951
975
|
var n, i, s;
|
|
952
976
|
const t = e[ne];
|
|
953
977
|
(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();
|
|
954
978
|
}
|
|
955
|
-
function
|
|
979
|
+
function ue(e) {
|
|
956
980
|
var n, i, s;
|
|
957
981
|
const t = e[ne];
|
|
958
982
|
(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();
|
|
959
983
|
}
|
|
960
984
|
const X = ["auto", "scroll"];
|
|
961
|
-
function
|
|
985
|
+
function De(e) {
|
|
962
986
|
const t = e.parentElement;
|
|
963
987
|
if (!t)
|
|
964
988
|
return null;
|
|
965
989
|
const n = window.getComputedStyle(t);
|
|
966
|
-
return X.includes(n.overflow) || X.includes(n.overflowX) || X.includes(n.overflowY) ? t :
|
|
990
|
+
return X.includes(n.overflow) || X.includes(n.overflowX) || X.includes(n.overflowY) ? t : De(t);
|
|
967
991
|
}
|
|
968
992
|
class A {
|
|
969
993
|
constructor(t, n) {
|
|
970
|
-
|
|
971
|
-
|
|
994
|
+
m(this, "isTripped", !1);
|
|
995
|
+
m(this, "onScrollWithContext", this.onScroll.bind(this));
|
|
972
996
|
this.el = t, this.handler = n, this.install();
|
|
973
997
|
}
|
|
974
998
|
install() {
|
|
@@ -981,24 +1005,24 @@ class A {
|
|
|
981
1005
|
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);
|
|
982
1006
|
}
|
|
983
1007
|
}
|
|
984
|
-
function
|
|
985
|
-
|
|
1008
|
+
function qn(e) {
|
|
1009
|
+
B(() => window.addEventListener("resize", e)), Te(() => window.addEventListener("resize", e)), we(() => window.removeEventListener("resize", e)), J(() => window.removeEventListener("resize", e));
|
|
986
1010
|
}
|
|
987
|
-
const
|
|
988
|
-
mounted:
|
|
989
|
-
updated:
|
|
990
|
-
},
|
|
991
|
-
function
|
|
992
|
-
if (t.value === void 0 && e[
|
|
1011
|
+
const tn = {
|
|
1012
|
+
mounted: fe,
|
|
1013
|
+
updated: fe
|
|
1014
|
+
}, he = Symbol("HasAutoFocused");
|
|
1015
|
+
function fe(e, t) {
|
|
1016
|
+
if (t.value === void 0 && e[he] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
|
|
993
1017
|
return;
|
|
994
|
-
e[
|
|
1018
|
+
e[he] = !0;
|
|
995
1019
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
996
1020
|
setTimeout(() => n.focus(), 10);
|
|
997
1021
|
}
|
|
998
|
-
const
|
|
999
|
-
mounted:
|
|
1022
|
+
const nn = {
|
|
1023
|
+
mounted: sn
|
|
1000
1024
|
}, M = Symbol("ConfirmState");
|
|
1001
|
-
function
|
|
1025
|
+
function sn(e) {
|
|
1002
1026
|
e.addEventListener("click", (t) => {
|
|
1003
1027
|
const n = Date.now();
|
|
1004
1028
|
if (e[M]) {
|
|
@@ -1018,10 +1042,10 @@ function tn(e) {
|
|
|
1018
1042
|
e[M] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
|
|
1019
1043
|
});
|
|
1020
1044
|
}
|
|
1021
|
-
const
|
|
1022
|
-
beforeMount:
|
|
1045
|
+
const on = {
|
|
1046
|
+
beforeMount: ln
|
|
1023
1047
|
};
|
|
1024
|
-
function
|
|
1048
|
+
function ln(e) {
|
|
1025
1049
|
e.addEventListener("blur", () => {
|
|
1026
1050
|
let t = e.value;
|
|
1027
1051
|
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + Y(/* @__PURE__ */ new Date(), "yy"));
|
|
@@ -1029,21 +1053,21 @@ function sn(e) {
|
|
|
1029
1053
|
isNaN(n) ? e.value = "" : e.value = Y(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
1030
1054
|
});
|
|
1031
1055
|
}
|
|
1032
|
-
const
|
|
1033
|
-
beforeMount:
|
|
1034
|
-
updated:
|
|
1056
|
+
const rn = {
|
|
1057
|
+
beforeMount: pe,
|
|
1058
|
+
updated: pe
|
|
1035
1059
|
};
|
|
1036
|
-
function
|
|
1037
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
1060
|
+
function pe(e, t) {
|
|
1061
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = an(e, t));
|
|
1038
1062
|
}
|
|
1039
|
-
function
|
|
1040
|
-
var c,
|
|
1063
|
+
function an(e, t) {
|
|
1064
|
+
var c, v;
|
|
1041
1065
|
if (!t.value)
|
|
1042
1066
|
return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
|
|
1043
1067
|
let n = "";
|
|
1044
1068
|
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);
|
|
1045
1069
|
e.attributes.getNamedItem("display-utc") !== null && o.setMinutes(o.getMinutes() - o.getTimezoneOffset());
|
|
1046
|
-
let r = (
|
|
1070
|
+
let r = (v = e.attributes.getNamedItem("format")) == null ? void 0 : v.value;
|
|
1047
1071
|
if (!r && e.attributes.getNamedItem("relative-date") !== null) {
|
|
1048
1072
|
const h = /* @__PURE__ */ new Date();
|
|
1049
1073
|
h.getFullYear() == o.getFullYear() && h.getMonth() == o.getMonth() && h.getDate() == o.getDate() && (n = "at", r = "HH:mm");
|
|
@@ -1052,46 +1076,46 @@ function ln(e, t) {
|
|
|
1052
1076
|
let l = Y(o, r);
|
|
1053
1077
|
return n && (l = n + " " + l), l;
|
|
1054
1078
|
}
|
|
1055
|
-
const
|
|
1056
|
-
beforeMount:
|
|
1057
|
-
updated:
|
|
1058
|
-
unmounted:
|
|
1079
|
+
const cn = {
|
|
1080
|
+
beforeMount: me,
|
|
1081
|
+
updated: me,
|
|
1082
|
+
unmounted: dn
|
|
1059
1083
|
};
|
|
1060
|
-
function
|
|
1084
|
+
function me(e, t) {
|
|
1061
1085
|
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");
|
|
1062
1086
|
}
|
|
1063
|
-
function
|
|
1087
|
+
function dn(e) {
|
|
1064
1088
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
1065
1089
|
}
|
|
1066
|
-
const
|
|
1067
|
-
beforeMount:
|
|
1068
|
-
updated:
|
|
1069
|
-
unmounted:
|
|
1070
|
-
},
|
|
1071
|
-
function
|
|
1072
|
-
ie.forEach(
|
|
1090
|
+
const un = {
|
|
1091
|
+
beforeMount: ve,
|
|
1092
|
+
updated: ve,
|
|
1093
|
+
unmounted: $e
|
|
1094
|
+
}, _ = Symbol("HasAutoFocused"), ie = [];
|
|
1095
|
+
function hn() {
|
|
1096
|
+
ie.forEach(Ae);
|
|
1073
1097
|
}
|
|
1074
|
-
setInterval(
|
|
1075
|
-
function
|
|
1098
|
+
setInterval(hn, 1e3);
|
|
1099
|
+
function ve(e, t) {
|
|
1076
1100
|
var r;
|
|
1077
1101
|
if (t.value == t.oldValue)
|
|
1078
1102
|
return;
|
|
1079
1103
|
if (!t.value)
|
|
1080
|
-
return
|
|
1104
|
+
return $e(e);
|
|
1081
1105
|
const n = new Date(t.value), i = (r = e.attributes.getNamedItem("base-time")) == null ? void 0 : r.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
|
|
1082
|
-
e[
|
|
1106
|
+
e[_] || ie.push(e), e[_] = {
|
|
1083
1107
|
startTs: s,
|
|
1084
1108
|
includeSeconds: o
|
|
1085
|
-
},
|
|
1086
|
-
}
|
|
1087
|
-
function De(e) {
|
|
1088
|
-
const t = e[B], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1089
|
-
e.innerText = un(n, t.includeSeconds);
|
|
1109
|
+
}, Ae(e);
|
|
1090
1110
|
}
|
|
1091
1111
|
function Ae(e) {
|
|
1092
|
-
e[
|
|
1112
|
+
const t = e[_], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
1113
|
+
e.innerText = fn(n, t.includeSeconds);
|
|
1093
1114
|
}
|
|
1094
|
-
function
|
|
1115
|
+
function $e(e) {
|
|
1116
|
+
e[_] && (Qe(ie, e), delete e[_]), e.innerText = "-";
|
|
1117
|
+
}
|
|
1118
|
+
function fn(e, t) {
|
|
1095
1119
|
const n = [], i = Math.floor(e / 86400);
|
|
1096
1120
|
i && n.push(i + "d"), e -= i * 86400;
|
|
1097
1121
|
const s = Math.floor(e / 3600);
|
|
@@ -1099,7 +1123,7 @@ function un(e, t) {
|
|
|
1099
1123
|
const o = Math.floor(e / 60);
|
|
1100
1124
|
return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
|
|
1101
1125
|
}
|
|
1102
|
-
const I = Symbol("InfiniteScrollHandler"),
|
|
1126
|
+
const I = Symbol("InfiniteScrollHandler"), pn = {
|
|
1103
1127
|
mounted(e, t) {
|
|
1104
1128
|
e[I] = new A(e, t.value);
|
|
1105
1129
|
},
|
|
@@ -1111,19 +1135,19 @@ const I = Symbol("InfiniteScrollHandler"), hn = {
|
|
|
1111
1135
|
var t;
|
|
1112
1136
|
(t = e[I]) == null || t.uninstall(), delete e[I];
|
|
1113
1137
|
}
|
|
1114
|
-
},
|
|
1115
|
-
beforeMount:
|
|
1116
|
-
updated:
|
|
1138
|
+
}, mn = {
|
|
1139
|
+
beforeMount: ye,
|
|
1140
|
+
updated: ye
|
|
1117
1141
|
};
|
|
1118
|
-
function
|
|
1142
|
+
function ye(e, t) {
|
|
1119
1143
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1120
1144
|
}
|
|
1121
|
-
const
|
|
1122
|
-
mounted:
|
|
1123
|
-
updated:
|
|
1124
|
-
unmounted:
|
|
1145
|
+
const vn = {
|
|
1146
|
+
mounted: ge,
|
|
1147
|
+
updated: ge,
|
|
1148
|
+
unmounted: Be
|
|
1125
1149
|
}, $ = Symbol("TooltipState");
|
|
1126
|
-
function
|
|
1150
|
+
function ge(e, t) {
|
|
1127
1151
|
var i;
|
|
1128
1152
|
let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
|
|
1129
1153
|
if (t.value || (n = null), n) {
|
|
@@ -1131,26 +1155,26 @@ function ye(e, t) {
|
|
|
1131
1155
|
content: n,
|
|
1132
1156
|
html: e.getAttribute("html") !== null
|
|
1133
1157
|
};
|
|
1134
|
-
e[$] ? e[$].configure(s) : e[$] = new
|
|
1158
|
+
e[$] ? e[$].configure(s) : e[$] = new yn(e, s);
|
|
1135
1159
|
} else
|
|
1136
|
-
|
|
1160
|
+
Be(e);
|
|
1137
1161
|
}
|
|
1138
|
-
function
|
|
1162
|
+
function Be(e) {
|
|
1139
1163
|
var t;
|
|
1140
1164
|
(t = e[$]) == null || t.destroy(), delete e[$];
|
|
1141
1165
|
}
|
|
1142
|
-
class
|
|
1166
|
+
class yn {
|
|
1143
1167
|
constructor(t, n) {
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1168
|
+
m(this, "lastMoveEvt");
|
|
1169
|
+
m(this, "checkInterval");
|
|
1170
|
+
m(this, "shouldShow", !1);
|
|
1171
|
+
m(this, "tipEl");
|
|
1172
|
+
m(this, "titleEl");
|
|
1173
|
+
m(this, "contentEl");
|
|
1174
|
+
m(this, "mouseMoveBound", !1);
|
|
1175
|
+
m(this, "handleMouseMoveWithContext", this.handleMouseMove.bind(this));
|
|
1176
|
+
m(this, "handleTargetMouseEnterWithContext", this.handleTargetMouseEnter.bind(this));
|
|
1177
|
+
m(this, "handleTargetMouseLeaveWithContext", this.handleTargetMouseLeave.bind(this));
|
|
1154
1178
|
this.el = t, this.config = n, t.addEventListener("mouseenter", this.handleTargetMouseEnterWithContext), t.addEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
|
|
1155
1179
|
}
|
|
1156
1180
|
configure(t) {
|
|
@@ -1187,59 +1211,60 @@ class mn {
|
|
|
1187
1211
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
|
|
1188
1212
|
}
|
|
1189
1213
|
}
|
|
1190
|
-
function
|
|
1191
|
-
e.directive("autofocus",
|
|
1214
|
+
function gn(e) {
|
|
1215
|
+
e.directive("autofocus", tn), e.directive("confirm-button", nn), e.directive("date-input", on), e.directive("datetime", rn), e.directive("disabled", cn), e.directive("duration", un), e.directive("infinite-scroll", pn), e.directive("readonly", mn), e.directive("tooltip", vn);
|
|
1192
1216
|
}
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1217
|
+
function zn(e) {
|
|
1218
|
+
gn(e);
|
|
1195
1219
|
}
|
|
1196
1220
|
export {
|
|
1197
|
-
|
|
1221
|
+
de as FileUploadRequest,
|
|
1222
|
+
Sn as OverlayContainer,
|
|
1198
1223
|
P as UserError,
|
|
1199
|
-
|
|
1224
|
+
kn as VfAjaxSelect,
|
|
1200
1225
|
q as VfAlertModal,
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1226
|
+
Vn as VfEzSmartSelect,
|
|
1227
|
+
yt as VfModal,
|
|
1228
|
+
Ft as VfSmartSelect,
|
|
1229
|
+
Un as cloneProp,
|
|
1230
|
+
In as configureVf,
|
|
1231
|
+
Fn as createFilters,
|
|
1232
|
+
xe as createOverlayInjection,
|
|
1233
|
+
St as desnakeCase,
|
|
1234
|
+
ct as dismissOverlayInjectionById,
|
|
1235
|
+
xn as dismissOverlayInjectionByInstance,
|
|
1236
|
+
Le as dismissOverlayInjectionByInternalInstance,
|
|
1237
|
+
at as dismissOverlayInjectionByVnode,
|
|
1238
|
+
Zn as escapeHtml,
|
|
1239
|
+
dt as formatError,
|
|
1240
|
+
Zt as formatNumber,
|
|
1241
|
+
xt as formatPhone,
|
|
1242
|
+
Lt as formatUSCurrency,
|
|
1243
|
+
Dn as handleError,
|
|
1244
|
+
Hn as handleErrorAndAlert,
|
|
1245
|
+
Wn as installApiClientInterceptors,
|
|
1246
|
+
zn as installVf,
|
|
1247
|
+
Gt as isApiError,
|
|
1248
|
+
An as maskComponent,
|
|
1249
|
+
ut as maskEl,
|
|
1250
|
+
ht as maskForm,
|
|
1251
|
+
Bn as nl2br,
|
|
1252
|
+
jn as nullifyEmptyInputs,
|
|
1228
1253
|
ee as presentOverlay,
|
|
1229
|
-
|
|
1230
|
-
|
|
1254
|
+
Ce as removeOverlayInjection,
|
|
1255
|
+
Rn as replaceElement,
|
|
1231
1256
|
le as showAlert,
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1257
|
+
Ln as showConfirm,
|
|
1258
|
+
Cn as showConfirmDestroy,
|
|
1259
|
+
Nn as showContextMenu,
|
|
1260
|
+
Mn as showWait,
|
|
1261
|
+
Yt as sleep,
|
|
1262
|
+
Kn as sleepSecs,
|
|
1238
1263
|
te as toError,
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1264
|
+
$n as unmaskComponent,
|
|
1265
|
+
Me as unmaskEl,
|
|
1266
|
+
Ie as unmaskForm,
|
|
1267
|
+
Pn as useInfiniteScroll,
|
|
1268
|
+
qn as useResizeWatcher,
|
|
1269
|
+
_n as uuid
|
|
1245
1270
|
};
|
package/package.json
CHANGED
package/src/helpers/openapi.ts
CHANGED
|
@@ -53,6 +53,8 @@ export function isApiError(err: any): err is IApiError {
|
|
|
53
53
|
export function installApiClientInterceptors({ apiClient, onRequest, onError, CancelablePromise }: IWrappedApiClientOptions) {
|
|
54
54
|
const originalRequest = apiClient.request.request.bind(apiClient.request);
|
|
55
55
|
apiClient.request.request = (options: IRequestOptions) => {
|
|
56
|
+
options = rewriteOptionsForFileUpload(options);
|
|
57
|
+
|
|
56
58
|
if (onRequest) {
|
|
57
59
|
options = onRequest(options);
|
|
58
60
|
}
|
|
@@ -82,3 +84,39 @@ export function installApiClientInterceptors({ apiClient, onRequest, onError, Ca
|
|
|
82
84
|
});
|
|
83
85
|
};
|
|
84
86
|
}
|
|
87
|
+
|
|
88
|
+
export class FileUploadRequest {
|
|
89
|
+
constructor(blob: Blob) {
|
|
90
|
+
this.blob = blob;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
validator = null;
|
|
94
|
+
lastModifiedDate = null;
|
|
95
|
+
size = 0;
|
|
96
|
+
path = '';
|
|
97
|
+
name = '';
|
|
98
|
+
type = '';
|
|
99
|
+
blob!: Blob;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function rewriteOptionsForFileUpload(options: IRequestOptions): IRequestOptions {
|
|
103
|
+
const hasFileUpload = typeof options.body === 'object' && Object.values(options.body).some(v => v instanceof FileUploadRequest);
|
|
104
|
+
if (!hasFileUpload) return options;
|
|
105
|
+
|
|
106
|
+
const formData: Record<string, any> = {};
|
|
107
|
+
const jsonBody: Record<string, any> = {};
|
|
108
|
+
for (const [key, value] of Object.entries(options.body)) {
|
|
109
|
+
if (value instanceof FileUploadRequest) {
|
|
110
|
+
formData[key] = value.blob;
|
|
111
|
+
} else {
|
|
112
|
+
jsonBody[key] = value;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
formData._payload = new Blob([JSON.stringify(jsonBody)], { type: 'application/json' });
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
...options,
|
|
119
|
+
body: undefined,
|
|
120
|
+
formData
|
|
121
|
+
};
|
|
122
|
+
}
|