@signal24/vue-foundation 4.1.1 → 4.2.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/.prettierrc.json +9 -1
- package/dist/src/components/ajax-select.vue.d.ts +5 -5
- package/dist/src/components/alert-modal.vue.d.ts +1 -1
- package/dist/src/components/ez-smart-select.vue.d.ts +1 -1
- package/dist/src/components/modal-container.d.ts +1 -1
- package/dist/src/components/modal.vue.d.ts +5 -5
- package/dist/src/components/smart-select.vue.d.ts +1 -1
- package/dist/vue-foundation.es.js +312 -312
- package/package.json +23 -21
- package/src/components/alert-modal.vue +1 -1
- package/src/components/ez-smart-select.vue +1 -1
- package/src/components/modal.vue +1 -1
- package/tsconfig.app.json +2 -6
- package/tsconfig.node.json +2 -1
- package/tsconfig.vite-plugins.json +2 -1
- package/tsconfig.vitest.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var f = (e, t, n) => (
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { debounce as
|
|
6
|
-
import { escapeHtml as
|
|
7
|
-
import { escapeHtml as
|
|
8
|
-
import { format as
|
|
9
|
-
const
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
2
|
+
var Le = (e, t, n) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var f = (e, t, n) => (Le(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { defineComponent as x, defineProps as Ie, defineEmits as De, ref as I, computed as D, openBlock as a, createElementBlock as d, createElementVNode as v, toDisplayString as w, withDirectives as H, createCommentVNode as g, Fragment as $, renderList as P, vModelSelect as He, reactive as $e, h as ue, markRaw as Ae, onMounted as W, onBeforeUnmount as q, getCurrentInstance as he, createBlock as U, Teleport as Be, normalizeClass as E, withModifiers as Ve, renderSlot as F, resolveDirective as fe, createSlots as Fe, withCtx as _, createTextVNode as Q, vModelText as _e, watch as J, onActivated as pe, onDeactivated as me } from "vue";
|
|
5
|
+
import { debounce as Ne, isEqual as ve, upperFirst as Ke, startCase as Re, cloneDeep as je, remove as Pe } from "lodash";
|
|
6
|
+
import { escapeHtml as We } from "@vue/shared";
|
|
7
|
+
import { escapeHtml as Hn } from "@vue/shared";
|
|
8
|
+
import { format as R } from "date-fns";
|
|
9
|
+
const qe = x({
|
|
10
10
|
setup() {
|
|
11
|
-
const e =
|
|
12
|
-
|
|
11
|
+
const e = Ie();
|
|
12
|
+
De(["update:modelValue"]);
|
|
13
13
|
const t = I(null), n = D(() => t.value ? t.value.map((o) => e.preprocesor ? e.preprocesor(o) : o[e.displayKey ?? ""]) : null), i = I(e.modelValue ?? null);
|
|
14
14
|
return { props: e, options: t, renderOptions: n, selectedItem: i };
|
|
15
15
|
},
|
|
@@ -32,116 +32,116 @@ const Ue = M({
|
|
|
32
32
|
this.options = await this.props.loadFn();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), ge = (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
|
+
}, Ue = {
|
|
41
41
|
key: 0,
|
|
42
42
|
disabled: ""
|
|
43
|
-
},
|
|
43
|
+
}, ze = {
|
|
44
44
|
key: 0,
|
|
45
45
|
value: null
|
|
46
|
-
},
|
|
47
|
-
function
|
|
46
|
+
}, Xe = ["value"];
|
|
47
|
+
function Ye(e, t, n, i, s, o) {
|
|
48
48
|
return e.renderOptions ? H((a(), d("select", {
|
|
49
49
|
key: 1,
|
|
50
50
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.selectedItem = l)
|
|
51
51
|
}, [
|
|
52
|
-
e.props.nullText ? (a(), d("option",
|
|
53
|
-
(a(!0), d($, null,
|
|
52
|
+
e.props.nullText ? (a(), d("option", ze, w(e.props.nullText), 1)) : g("", !0),
|
|
53
|
+
(a(!0), d($, null, P(e.renderOptions, (l, r) => {
|
|
54
54
|
var c;
|
|
55
55
|
return a(), d("option", {
|
|
56
56
|
key: r,
|
|
57
57
|
value: (c = e.options) == null ? void 0 : c[r]
|
|
58
|
-
}, w(l), 9,
|
|
58
|
+
}, w(l), 9, Xe);
|
|
59
59
|
}), 128))
|
|
60
60
|
], 512)), [
|
|
61
|
-
[
|
|
62
|
-
]) : (a(), d("select",
|
|
61
|
+
[He, e.selectedItem]
|
|
62
|
+
]) : (a(), d("select", Ue, [
|
|
63
63
|
v("option", null, w(e.props.loadingText || "Loading..."), 1)
|
|
64
64
|
]));
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
const y =
|
|
66
|
+
const rn = /* @__PURE__ */ ge(qe, [["render", Ye]]);
|
|
67
|
+
let Ze = 0;
|
|
68
|
+
const y = $e([]), an = x({
|
|
69
69
|
setup() {
|
|
70
|
-
return () =>
|
|
71
|
-
|
|
70
|
+
return () => ue("div", { id: "modal-container" }, [
|
|
71
|
+
P(y, (e) => e.vnode)
|
|
72
72
|
]);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
function
|
|
75
|
+
function ye(e, t) {
|
|
76
76
|
const n = document.getElementById("vf-modal-target") ?? document.createElement("div");
|
|
77
77
|
n.id = "vf-modal-target", n.removeAttribute("inert"), document.body.appendChild(n);
|
|
78
|
-
const i =
|
|
79
|
-
id: String(++
|
|
78
|
+
const i = Ae(e), s = {
|
|
79
|
+
id: String(++Ze),
|
|
80
80
|
component: i,
|
|
81
81
|
props: t,
|
|
82
|
-
vnode:
|
|
82
|
+
vnode: ue(i, t)
|
|
83
83
|
};
|
|
84
84
|
return y.push(s), s;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ee(e) {
|
|
87
87
|
const t = y.indexOf(e);
|
|
88
88
|
t >= 0 && y.splice(t, 1);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function cn(e) {
|
|
91
|
+
Te(e.$);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Te(e) {
|
|
94
94
|
let t = e;
|
|
95
|
-
for (; t && !
|
|
95
|
+
for (; t && !Ge(t.vnode); )
|
|
96
96
|
t = t.parent;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Ge(e) {
|
|
99
99
|
var n, i;
|
|
100
100
|
const t = y.findIndex((s) => s.vnode.component === e.component);
|
|
101
101
|
return t >= 0 ? ((i = (n = y[t].props).callback) == null || i.call(n, void 0), y.splice(t, 1), !0) : !1;
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
103
|
+
async function z(e, t) {
|
|
104
104
|
return new Promise((n) => {
|
|
105
105
|
let i = null;
|
|
106
106
|
const o = { ...t, callback: (l) => {
|
|
107
|
-
|
|
107
|
+
Ee(i), n(l);
|
|
108
108
|
} };
|
|
109
|
-
i =
|
|
109
|
+
i = ye(e, o);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function A(e, t) {
|
|
113
113
|
return { title: t ? e : void 0, message: t ?? e };
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
116
|
-
await
|
|
115
|
+
async function ee(e, t) {
|
|
116
|
+
await z(V, A(e, t));
|
|
117
117
|
}
|
|
118
|
-
async function
|
|
119
|
-
return await
|
|
118
|
+
async function dn(e, t) {
|
|
119
|
+
return await z(V, {
|
|
120
120
|
...A(e, t),
|
|
121
121
|
shouldConfirm: !0
|
|
122
122
|
}) === !0;
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
125
|
-
return await
|
|
124
|
+
async function un(e, t) {
|
|
125
|
+
return await z(V, {
|
|
126
126
|
...A(e, t),
|
|
127
127
|
shouldConfirm: !0,
|
|
128
128
|
classes: ["destructive"]
|
|
129
129
|
}) === !0;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
const n =
|
|
131
|
+
function hn(e, t) {
|
|
132
|
+
const n = ye(V, {
|
|
133
133
|
...A(e, t),
|
|
134
134
|
callback: () => {
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
return () =>
|
|
137
|
+
return () => Ee(n);
|
|
138
138
|
}
|
|
139
139
|
const C = {
|
|
140
140
|
unhandledErrorSupportText: "please contact support",
|
|
141
141
|
errorHandler: (e) => console.error("Unhandled error:", e),
|
|
142
142
|
defaultDateTimeFormat: "MM/dd/yy HH:mm"
|
|
143
143
|
};
|
|
144
|
-
function
|
|
144
|
+
function fn(e) {
|
|
145
145
|
Object.assign(C, e);
|
|
146
146
|
}
|
|
147
147
|
class B extends Error {
|
|
@@ -149,46 +149,46 @@ class B extends Error {
|
|
|
149
149
|
super(t), this.name = "UserError";
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Qe(e) {
|
|
153
153
|
return e instanceof B ? e.message : `An application error has occurred:
|
|
154
154
|
|
|
155
|
-
${
|
|
155
|
+
${X(e).message}
|
|
156
156
|
|
|
157
157
|
Please refresh the page and try again. If this error persists, ${C.unhandledErrorSupportText}.`;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function X(e) {
|
|
160
160
|
return e instanceof Error ? e : new Error(String(e));
|
|
161
161
|
}
|
|
162
|
-
async function
|
|
163
|
-
const n =
|
|
164
|
-
return n instanceof B || C.errorHandler(n), t ?
|
|
162
|
+
async function pn(e, t) {
|
|
163
|
+
const n = X(e);
|
|
164
|
+
return n instanceof B || C.errorHandler(n), t ? ee(t, n) : ee(n);
|
|
165
165
|
}
|
|
166
|
-
async function
|
|
167
|
-
const t =
|
|
166
|
+
async function mn(e) {
|
|
167
|
+
const t = X(e);
|
|
168
168
|
t instanceof B || C.errorHandler(t);
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const Je = ["id"], et = {
|
|
171
171
|
key: 0,
|
|
172
172
|
class: "vf-modal-header"
|
|
173
|
-
},
|
|
173
|
+
}, tt = { class: "vf-modal-content" }, nt = {
|
|
174
174
|
key: 1,
|
|
175
175
|
class: "vf-modal-footer"
|
|
176
|
-
},
|
|
176
|
+
}, it = /* @__PURE__ */ x({
|
|
177
177
|
__name: "modal",
|
|
178
178
|
props: {
|
|
179
|
-
id:
|
|
179
|
+
id: {},
|
|
180
180
|
closeOnMaskClick: { type: Boolean },
|
|
181
181
|
scrolls: { type: Boolean },
|
|
182
182
|
closeX: { type: Boolean },
|
|
183
|
-
class:
|
|
183
|
+
class: {}
|
|
184
184
|
},
|
|
185
185
|
emits: ["formSubmit"],
|
|
186
186
|
setup(e) {
|
|
187
187
|
const t = e, n = I();
|
|
188
|
-
|
|
188
|
+
W(() => {
|
|
189
189
|
var l;
|
|
190
190
|
window.addEventListener("keydown", s), document.body.classList.add("vf-modal-open"), t.closeOnMaskClick && ((l = n.value) == null || l.addEventListener("click", i));
|
|
191
|
-
}),
|
|
191
|
+
}), q(() => {
|
|
192
192
|
document.body.querySelectorAll(".vf-modal").length > 0 || document.body.classList.remove("vf-modal-open");
|
|
193
193
|
});
|
|
194
194
|
function i(l) {
|
|
@@ -201,22 +201,22 @@ const et = ["id"], tt = {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
function o() {
|
|
204
|
-
const l =
|
|
205
|
-
|
|
204
|
+
const l = he();
|
|
205
|
+
Te(l);
|
|
206
206
|
}
|
|
207
|
-
return (l, r) => (a(),
|
|
207
|
+
return (l, r) => (a(), U(Be, { to: "#vf-modal-target" }, [
|
|
208
208
|
v("div", {
|
|
209
|
-
id:
|
|
209
|
+
id: l.id,
|
|
210
210
|
class: E(["vf-overlay vf-modal-wrap", t.class]),
|
|
211
211
|
ref_key: "overlay",
|
|
212
212
|
ref: n
|
|
213
213
|
}, [
|
|
214
214
|
v("form", {
|
|
215
215
|
action: ".",
|
|
216
|
-
class: E(["vf-modal", { scrolls:
|
|
217
|
-
onSubmit: r[0] || (r[0] =
|
|
216
|
+
class: E(["vf-modal", { scrolls: l.scrolls }]),
|
|
217
|
+
onSubmit: r[0] || (r[0] = Ve((c) => l.$emit("formSubmit"), ["prevent"]))
|
|
218
218
|
}, [
|
|
219
|
-
l.$slots.header ? (a(), d("div",
|
|
219
|
+
l.$slots.header ? (a(), d("div", et, [
|
|
220
220
|
F(l.$slots, "header"),
|
|
221
221
|
t.closeX ? (a(), d("i", {
|
|
222
222
|
key: 0,
|
|
@@ -224,76 +224,76 @@ const et = ["id"], tt = {
|
|
|
224
224
|
onClick: o
|
|
225
225
|
})) : g("", !0)
|
|
226
226
|
])) : g("", !0),
|
|
227
|
-
v("div",
|
|
227
|
+
v("div", tt, [
|
|
228
228
|
F(l.$slots, "default")
|
|
229
229
|
]),
|
|
230
|
-
l.$slots.footer ? (a(), d("div",
|
|
230
|
+
l.$slots.footer ? (a(), d("div", nt, [
|
|
231
231
|
F(l.$slots, "footer")
|
|
232
232
|
])) : g("", !0)
|
|
233
233
|
], 34)
|
|
234
|
-
], 10,
|
|
234
|
+
], 10, Je)
|
|
235
235
|
]));
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
|
-
const
|
|
238
|
+
const st = ["innerHtml"], ot = ["innerText"], V = /* @__PURE__ */ x({
|
|
239
239
|
__name: "alert-modal",
|
|
240
240
|
props: {
|
|
241
241
|
isBare: { type: Boolean },
|
|
242
242
|
isHtml: { type: Boolean },
|
|
243
|
-
classes:
|
|
244
|
-
title:
|
|
245
|
-
message:
|
|
243
|
+
classes: {},
|
|
244
|
+
title: {},
|
|
245
|
+
message: {},
|
|
246
246
|
shouldConfirm: { type: Boolean },
|
|
247
247
|
callback: { type: Function }
|
|
248
248
|
},
|
|
249
249
|
setup(e) {
|
|
250
|
-
const t = e, n = D(() => t.message instanceof Error ?
|
|
250
|
+
const t = e, n = D(() => t.message instanceof Error ? Qe(t.message) : t.message);
|
|
251
251
|
return (i, s) => {
|
|
252
|
-
const o =
|
|
253
|
-
return a(),
|
|
254
|
-
class: E(["vf-alert",
|
|
255
|
-
},
|
|
256
|
-
default:
|
|
257
|
-
|
|
252
|
+
const o = fe("autofocus");
|
|
253
|
+
return a(), U(it, {
|
|
254
|
+
class: E(["vf-alert", i.classes])
|
|
255
|
+
}, Fe({
|
|
256
|
+
default: _(() => [
|
|
257
|
+
i.isHtml ? (a(), d("div", {
|
|
258
258
|
key: 0,
|
|
259
|
-
innerHtml:
|
|
259
|
+
innerHtml: i.message,
|
|
260
260
|
class: "user-message"
|
|
261
|
-
}, null, 8,
|
|
261
|
+
}, null, 8, st)) : (a(), d("div", {
|
|
262
262
|
key: 1,
|
|
263
|
-
innerText:
|
|
264
|
-
}, null, 8,
|
|
263
|
+
innerText: n.value
|
|
264
|
+
}, null, 8, ot))
|
|
265
265
|
]),
|
|
266
266
|
_: 2
|
|
267
267
|
}, [
|
|
268
|
-
|
|
268
|
+
i.isBare ? void 0 : {
|
|
269
269
|
name: "header",
|
|
270
|
-
fn:
|
|
271
|
-
v("h1", null, w(
|
|
270
|
+
fn: _(() => [
|
|
271
|
+
v("h1", null, w(i.title), 1)
|
|
272
272
|
]),
|
|
273
273
|
key: "0"
|
|
274
274
|
},
|
|
275
|
-
|
|
275
|
+
i.isBare ? void 0 : {
|
|
276
276
|
name: "footer",
|
|
277
|
-
fn:
|
|
278
|
-
|
|
277
|
+
fn: _(() => [
|
|
278
|
+
i.shouldConfirm ? (a(), d($, { key: 0 }, [
|
|
279
279
|
H((a(), d("button", {
|
|
280
280
|
class: "primary",
|
|
281
|
-
onClick: s[0] || (s[0] = () =>
|
|
281
|
+
onClick: s[0] || (s[0] = () => i.callback(!0))
|
|
282
282
|
}, [
|
|
283
|
-
|
|
283
|
+
Q("Confirm")
|
|
284
284
|
])), [
|
|
285
285
|
[o]
|
|
286
286
|
]),
|
|
287
287
|
v("button", {
|
|
288
288
|
class: "default",
|
|
289
|
-
onClick: s[1] || (s[1] = () =>
|
|
289
|
+
onClick: s[1] || (s[1] = () => i.callback(!1))
|
|
290
290
|
}, "Cancel")
|
|
291
291
|
], 64)) : H((a(), d("button", {
|
|
292
292
|
key: 1,
|
|
293
293
|
class: "default",
|
|
294
|
-
onClick: s[2] || (s[2] = () =>
|
|
294
|
+
onClick: s[2] || (s[2] = () => i.callback(!0))
|
|
295
295
|
}, [
|
|
296
|
-
|
|
296
|
+
Q("OK")
|
|
297
297
|
])), [
|
|
298
298
|
[o]
|
|
299
299
|
])
|
|
@@ -304,20 +304,20 @@ const ot = ["innerHtml"], lt = ["innerText"], V = /* @__PURE__ */ M({
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
function
|
|
307
|
+
function vn(e) {
|
|
308
308
|
return e.replace(/\n/g, "<br>");
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function lt(e) {
|
|
311
311
|
return e.replace(/_/g, " ");
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function rt(e) {
|
|
314
314
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
315
315
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function at(e) {
|
|
318
318
|
return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
319
319
|
}
|
|
320
|
-
const O = Symbol("null"),
|
|
320
|
+
const O = Symbol("null"), te = Symbol("create"), ct = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM", dt = {
|
|
321
321
|
props: {
|
|
322
322
|
modelValue: {
|
|
323
323
|
type: null,
|
|
@@ -414,7 +414,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
414
414
|
const t = this.searchText.trim().toLowerCase();
|
|
415
415
|
if (t.length) {
|
|
416
416
|
e = e.filter((s) => s.searchContent.includes(t));
|
|
417
|
-
const n =
|
|
417
|
+
const n = We(this.searchText).replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(`(${n})`, "ig");
|
|
418
418
|
e = e.map((s) => {
|
|
419
419
|
var o;
|
|
420
420
|
return {
|
|
@@ -423,7 +423,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
423
423
|
subtitle: (o = s.subtitle) == null ? void 0 : o.replace(i, "<mark>$1</mark>")
|
|
424
424
|
};
|
|
425
425
|
}), this.shouldShowCreateOption && (e.find((o) => o.searchContent === t) !== void 0 || e.push({
|
|
426
|
-
key:
|
|
426
|
+
key: te,
|
|
427
427
|
title: "Create <strong>" + this.searchText.trim() + "</strong>..."
|
|
428
428
|
}));
|
|
429
429
|
}
|
|
@@ -464,7 +464,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
464
464
|
"update:modelValue",
|
|
465
465
|
this.selectedOption && this.valueExtractor ? this.valueExtractor(this.selectedOption) : this.selectedOption
|
|
466
466
|
);
|
|
467
|
-
}), this.remoteSearch && this.$watch("searchText",
|
|
467
|
+
}), this.remoteSearch && this.$watch("searchText", Ne(this.reloadOptionsIfSearching, 250));
|
|
468
468
|
},
|
|
469
469
|
methods: {
|
|
470
470
|
async loadRemoteOptions() {
|
|
@@ -509,7 +509,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
509
509
|
this.searchText.length > 1 && (this.isSearching = !0);
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
|
-
!e.metaKey &&
|
|
512
|
+
!e.metaKey && ct.includes(e.key) && (this.isSearching = !0);
|
|
513
513
|
}
|
|
514
514
|
},
|
|
515
515
|
handleInputFocused() {
|
|
@@ -527,7 +527,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
527
527
|
const t = this.effectiveOptions.find((i) => i.ref === e);
|
|
528
528
|
if (t)
|
|
529
529
|
return t;
|
|
530
|
-
const n = this.effectiveOptions.find((i) =>
|
|
530
|
+
const n = this.effectiveOptions.find((i) => ve(i.ref, e));
|
|
531
531
|
return n || null;
|
|
532
532
|
},
|
|
533
533
|
handleInputBlurred() {
|
|
@@ -567,7 +567,7 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
567
567
|
selectOption(e) {
|
|
568
568
|
if (this.isSearching = !1, e.key == O)
|
|
569
569
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null;
|
|
570
|
-
else if (e.key ===
|
|
570
|
+
else if (e.key === te) {
|
|
571
571
|
const t = this.searchText.trim();
|
|
572
572
|
this.searchText = "", this.selectedOption = null, this.selectedOptionTitle = null, this.$emit("createItem", t);
|
|
573
573
|
} else {
|
|
@@ -584,19 +584,19 @@ const O = Symbol("null"), ne = Symbol("create"), dt = "`1234567890-=[]\\;',./~!@
|
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
|
-
const
|
|
587
|
+
const ut = ["placeholder"], ht = {
|
|
588
588
|
key: 0,
|
|
589
589
|
ref: "optionsContainer",
|
|
590
590
|
class: "vf-smart-select-options"
|
|
591
|
-
},
|
|
591
|
+
}, ft = {
|
|
592
592
|
key: 0,
|
|
593
593
|
class: "no-results"
|
|
594
|
-
},
|
|
594
|
+
}, pt = ["onMousemove", "onMousedown"], mt = ["innerHTML"], vt = ["innerHTML"], gt = {
|
|
595
595
|
key: 0,
|
|
596
596
|
class: "no-results"
|
|
597
597
|
};
|
|
598
|
-
function
|
|
599
|
-
const l =
|
|
598
|
+
function yt(e, t, n, i, s, o) {
|
|
599
|
+
const l = fe("disabled");
|
|
600
600
|
return a(), d("div", {
|
|
601
601
|
class: E(["vf-smart-select", { disabled: o.effectiveDisabled, open: e.shouldDisplayOptions }])
|
|
602
602
|
}, [
|
|
@@ -609,13 +609,13 @@ function Et(e, t, n, i, s, o) {
|
|
|
609
609
|
placeholder: o.effectivePlaceholder,
|
|
610
610
|
onFocus: t[2] || (t[2] = (...r) => o.handleInputFocused && o.handleInputFocused(...r)),
|
|
611
611
|
onBlur: t[3] || (t[3] = (...r) => o.handleInputBlurred && o.handleInputBlurred(...r))
|
|
612
|
-
}, null, 42,
|
|
612
|
+
}, null, 42, ut), [
|
|
613
613
|
[_e, e.searchText],
|
|
614
614
|
[l, o.effectiveDisabled]
|
|
615
615
|
]),
|
|
616
|
-
e.shouldDisplayOptions ? (a(), d("div",
|
|
616
|
+
e.shouldDisplayOptions ? (a(), d("div", ht, [
|
|
617
617
|
e.isLoaded ? (a(), d($, { key: 1 }, [
|
|
618
|
-
(a(!0), d($, null,
|
|
618
|
+
(a(!0), d($, null, P(o.effectiveOptions, (r) => (a(), d("div", {
|
|
619
619
|
key: String(r.key),
|
|
620
620
|
class: E(["option", {
|
|
621
621
|
highlighted: e.highlightedOptionKey === r.key
|
|
@@ -626,25 +626,25 @@ function Et(e, t, n, i, s, o) {
|
|
|
626
626
|
v("div", {
|
|
627
627
|
class: "title",
|
|
628
628
|
innerHTML: r.title
|
|
629
|
-
}, null, 8,
|
|
629
|
+
}, null, 8, mt),
|
|
630
630
|
r.subtitle ? (a(), d("div", {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "subtitle",
|
|
633
633
|
innerHTML: r.subtitle
|
|
634
|
-
}, null, 8,
|
|
635
|
-
], 42,
|
|
636
|
-
!o.effectiveOptions.length && e.searchText ? (a(), d("div",
|
|
637
|
-
], 64)) : (a(), d("div",
|
|
634
|
+
}, null, 8, vt)) : g("", !0)
|
|
635
|
+
], 42, pt))), 128)),
|
|
636
|
+
!o.effectiveOptions.length && e.searchText ? (a(), d("div", gt, w(o.effectiveNoResultsText), 1)) : g("", !0)
|
|
637
|
+
], 64)) : (a(), d("div", ft, "Loading..."))
|
|
638
638
|
], 512)) : g("", !0)
|
|
639
639
|
], 2);
|
|
640
640
|
}
|
|
641
|
-
const
|
|
641
|
+
const Et = /* @__PURE__ */ ge(dt, [["render", yt]]), gn = /* @__PURE__ */ x({
|
|
642
642
|
__name: "ez-smart-select",
|
|
643
643
|
props: {
|
|
644
|
-
modelValue:
|
|
645
|
-
nullTitle:
|
|
646
|
-
placeholder:
|
|
647
|
-
options:
|
|
644
|
+
modelValue: {},
|
|
645
|
+
nullTitle: {},
|
|
646
|
+
placeholder: {},
|
|
647
|
+
options: {},
|
|
648
648
|
formatter: { type: Function }
|
|
649
649
|
},
|
|
650
650
|
emits: ["update:modelValue"],
|
|
@@ -656,74 +656,74 @@ const Tt = /* @__PURE__ */ ye(ut, [["render", Et]]), yn = /* @__PURE__ */ M({
|
|
|
656
656
|
var r;
|
|
657
657
|
return (r = n.formatter) == null ? void 0 : r.call(n, l.label);
|
|
658
658
|
} : (l) => l.label), o = I(i.value.find((l) => l.value === n.modelValue) ?? null);
|
|
659
|
-
return
|
|
659
|
+
return J(
|
|
660
660
|
() => n.modelValue,
|
|
661
661
|
(l) => {
|
|
662
662
|
o.value = i.value.find((r) => r.value === l) ?? null;
|
|
663
663
|
}
|
|
664
|
-
),
|
|
664
|
+
), J(o, (l) => {
|
|
665
665
|
var r;
|
|
666
|
-
t("update:modelValue", l ? ((r = i.value.find((c) =>
|
|
667
|
-
}), (l, r) => (a(),
|
|
666
|
+
t("update:modelValue", l ? ((r = i.value.find((c) => ve(c, l))) == null ? void 0 : r.value) ?? null : null);
|
|
667
|
+
}), (l, r) => (a(), U(Et, {
|
|
668
668
|
modelValue: o.value,
|
|
669
669
|
"onUpdate:modelValue": r[0] || (r[0] = (c) => o.value = c),
|
|
670
|
-
options:
|
|
671
|
-
formatter:
|
|
672
|
-
"null-title":
|
|
670
|
+
options: i.value,
|
|
671
|
+
formatter: s.value,
|
|
672
|
+
"null-title": l.nullTitle
|
|
673
673
|
}, null, 8, ["modelValue", "options", "formatter", "null-title"]));
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
|
-
function
|
|
676
|
+
function Tt(e) {
|
|
677
677
|
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];
|
|
678
678
|
return `${i} ${s}`;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Ot(e) {
|
|
681
681
|
return e != null && String(e).length ? e : "-";
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function bt(e) {
|
|
684
684
|
return e || "-";
|
|
685
685
|
}
|
|
686
|
+
function wt(e) {
|
|
687
|
+
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : $t(Number(e));
|
|
688
|
+
}
|
|
686
689
|
function St(e) {
|
|
687
|
-
return e
|
|
690
|
+
return e && rt(e);
|
|
688
691
|
}
|
|
689
692
|
function kt(e) {
|
|
690
|
-
return e
|
|
693
|
+
return e ? Ke(e) : null;
|
|
691
694
|
}
|
|
692
|
-
function
|
|
695
|
+
function Mt(e) {
|
|
693
696
|
return e ? Re(e) : null;
|
|
694
697
|
}
|
|
695
|
-
function
|
|
696
|
-
return e ?
|
|
698
|
+
function xt(e) {
|
|
699
|
+
return e ? e.toUpperCase() : null;
|
|
697
700
|
}
|
|
698
701
|
function Ct(e) {
|
|
699
|
-
return e ? e
|
|
702
|
+
return e ? lt(e) : null;
|
|
700
703
|
}
|
|
701
704
|
function Lt(e) {
|
|
702
|
-
return
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
number: St,
|
|
712
|
-
phone: kt,
|
|
713
|
-
upperFirst: xt,
|
|
705
|
+
return at(e);
|
|
706
|
+
}
|
|
707
|
+
const ne = {
|
|
708
|
+
bytes: Tt,
|
|
709
|
+
dash: Ot,
|
|
710
|
+
dashZeros: bt,
|
|
711
|
+
number: wt,
|
|
712
|
+
phone: St,
|
|
713
|
+
upperFirst: kt,
|
|
714
714
|
startCase: Mt,
|
|
715
|
-
upperCase:
|
|
716
|
-
desnake:
|
|
717
|
-
usCurrency:
|
|
718
|
-
},
|
|
719
|
-
...
|
|
720
|
-
...e(
|
|
715
|
+
upperCase: xt,
|
|
716
|
+
desnake: Ct,
|
|
717
|
+
usCurrency: Lt
|
|
718
|
+
}, yn = (e) => ({
|
|
719
|
+
...ne,
|
|
720
|
+
...e(ne)
|
|
721
721
|
});
|
|
722
|
-
function
|
|
722
|
+
function En(e, t, n) {
|
|
723
723
|
const i = typeof t == "function" ? e.findIndex(t) : e.indexOf(t);
|
|
724
724
|
return i === -1 ? !1 : (e.splice(i, 1, n), !0);
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Tn(e, t) {
|
|
727
727
|
const n = document.createElement("div");
|
|
728
728
|
n.classList.add("vf-overlay"), n.addEventListener("click", T), document.body.appendChild(n);
|
|
729
729
|
const i = document.createElement("div");
|
|
@@ -736,7 +736,7 @@ function On(e, t) {
|
|
|
736
736
|
return;
|
|
737
737
|
}
|
|
738
738
|
const m = document.createElement("div");
|
|
739
|
-
m.classList.add("item"), m.style.userSelect = "none", m.innerText = u.title, i.appendChild(m), u.class && m.classList.add(u.class), u.shouldConfirm ? m.addEventListener("click", () => u.handler()) : m.addEventListener("click", () =>
|
|
739
|
+
m.classList.add("item"), m.style.userSelect = "none", m.innerText = u.title, i.appendChild(m), u.class && m.classList.add(u.class), u.shouldConfirm ? m.addEventListener("click", () => u.handler()) : m.addEventListener("click", () => xe(m, u.handler));
|
|
740
740
|
});
|
|
741
741
|
const o = window.innerWidth - e.clientX, l = window.innerHeight - e.clientY, r = i.offsetHeight, c = i.offsetWidth, p = o < c ? e.clientX - c - 1 : e.clientX + 1, h = l < r ? e.clientY - r - 1 : e.clientY + 1;
|
|
742
742
|
i.style.left = p + "px", i.style.top = h + "px", setTimeout(() => {
|
|
@@ -745,62 +745,62 @@ function On(e, t) {
|
|
|
745
745
|
function T() {
|
|
746
746
|
t.targetClass && s.classList.remove(t.targetClass), s.classList.remove("context-menu-active"), s.style.userSelect = "", n.remove();
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function xe(u, m) {
|
|
749
749
|
if (u.classList.contains("pending-confirm"))
|
|
750
750
|
return m();
|
|
751
751
|
const L = u.innerHTML;
|
|
752
752
|
u.classList.add("pending-confirm"), u.innerText = "Confirm";
|
|
753
|
-
const
|
|
754
|
-
u.classList.remove("pending-confirm"), u.innerHTML = L, u.removeEventListener("mouseleave",
|
|
753
|
+
const G = () => {
|
|
754
|
+
u.classList.remove("pending-confirm"), u.innerHTML = L, u.removeEventListener("mouseleave", G);
|
|
755
755
|
};
|
|
756
|
-
u.addEventListener("mouseleave",
|
|
756
|
+
u.addEventListener("mouseleave", G), e.stopPropagation();
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
const
|
|
760
|
-
function
|
|
759
|
+
const It = (e) => new Promise((t) => setTimeout(t, e)), On = (e) => It(e * 1e3), S = Symbol("MaskState");
|
|
760
|
+
function bn(e, t) {
|
|
761
761
|
const n = e.$.vnode.el, i = n.closest(".vf-modal");
|
|
762
|
-
return
|
|
762
|
+
return Dt(i ?? n, t);
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function wn(e) {
|
|
765
765
|
const t = e.$.vnode.el, n = t.closest(".vf-modal");
|
|
766
|
-
return
|
|
766
|
+
return Oe(n ?? t);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Dt(e, t) {
|
|
769
769
|
if (!e[S]) {
|
|
770
770
|
const n = document.createElement("div");
|
|
771
771
|
n.classList.add("vf-mask"), e.appendChild(n), e[S] = { maskEl: n };
|
|
772
772
|
}
|
|
773
|
-
return e[S].maskEl.innerText = t ?? "", () =>
|
|
773
|
+
return e[S].maskEl.innerText = t ?? "", () => Oe(e);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Oe(e) {
|
|
776
776
|
e[S] && e.removeChild(e[S].maskEl);
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
function
|
|
780
|
-
const i = e instanceof Element ? e :
|
|
778
|
+
const j = Symbol("FormMaskState");
|
|
779
|
+
function Sn(e, t, n) {
|
|
780
|
+
const i = e instanceof Element ? e : be(e);
|
|
781
781
|
i.classList.add("vf-masked");
|
|
782
782
|
const s = t instanceof Element ? t : i.querySelectorAll(t ?? "button:not([disabled])")[0], o = s.tagName === "INPUT" ? s.value : s.innerText;
|
|
783
783
|
s.setAttribute("disabled", "disabled"), s.innerText = n ?? "Please wait...";
|
|
784
784
|
const r = [...i.querySelectorAll("input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled])")];
|
|
785
|
-
return r.forEach((c) => c.setAttribute("disabled", "disabled")), i[
|
|
785
|
+
return r.forEach((c) => c.setAttribute("disabled", "disabled")), i[j] = {
|
|
786
786
|
disabledElements: r,
|
|
787
787
|
waitButton: s,
|
|
788
788
|
buttonText: o
|
|
789
|
-
}, () =>
|
|
789
|
+
}, () => Ht(i);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
const t = e instanceof Element ? e :
|
|
793
|
-
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerText = n.buttonText, n.waitButton.removeAttribute("disabled"), delete t[
|
|
791
|
+
function Ht(e) {
|
|
792
|
+
const t = e instanceof Element ? e : be(e), n = t[j];
|
|
793
|
+
n && (t.classList.remove("vf-masked"), n.disabledElements.forEach((i) => i.removeAttribute("disabled")), n.waitButton.innerText = n.buttonText, n.waitButton.removeAttribute("disabled"), delete t[j]);
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function be(e) {
|
|
796
796
|
const t = e.$.vnode.el;
|
|
797
797
|
return t.tagName === "FORM" ? t : t.querySelector("form");
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function $t(e) {
|
|
800
800
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return e != null ?
|
|
802
|
+
function kn(e, t) {
|
|
803
|
+
return e != null ? je(e) : t;
|
|
804
804
|
}
|
|
805
805
|
function Mn(e, t) {
|
|
806
806
|
const n = { ...e };
|
|
@@ -808,15 +808,15 @@ function Mn(e, t) {
|
|
|
808
808
|
n[i] === "" && (n[i] = null);
|
|
809
809
|
return n;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function At(e) {
|
|
812
812
|
return e instanceof Error && "status" in e && "body" in e;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function xn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
|
|
815
815
|
const s = e.request.request.bind(e.request);
|
|
816
816
|
e.request.request = (o) => (t && (o = t(o)), new i((l, r, c) => {
|
|
817
817
|
const p = s(o);
|
|
818
818
|
c(p.cancel), p.then(l).catch((h) => {
|
|
819
|
-
if (
|
|
819
|
+
if (At(h) && typeof h.body == "object" && "error" in h.body && h.status === 422)
|
|
820
820
|
return r(new B(h.body.error));
|
|
821
821
|
if (n) {
|
|
822
822
|
const T = n(h, o);
|
|
@@ -829,36 +829,36 @@ function Cn({ apiClient: e, onRequest: t, onError: n, CancelablePromise: i }) {
|
|
|
829
829
|
});
|
|
830
830
|
}));
|
|
831
831
|
}
|
|
832
|
-
const
|
|
833
|
-
function
|
|
834
|
-
const n = t ??
|
|
835
|
-
|
|
832
|
+
const Y = Symbol("HookState");
|
|
833
|
+
function Bt(e, t) {
|
|
834
|
+
const n = t ?? he();
|
|
835
|
+
W(() => Vt(n, e), n), pe(() => Ft(n), n), me(() => ie(n), n), q(() => ie(n), n);
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function Vt(e, t) {
|
|
838
838
|
const n = {};
|
|
839
839
|
if (t.elScrolledToBottom && (n.el = new K(e.vnode.el, t.elScrolledToBottom), n.el.install()), t.ancestorScrolledToBottom) {
|
|
840
|
-
const i =
|
|
840
|
+
const i = we(e.vnode.el);
|
|
841
841
|
i ? (n.ancestor = new K(i, t.ancestorScrolledToBottom), n.ancestor.install()) : console.warn("no scollable ancestor found for component:", e);
|
|
842
842
|
}
|
|
843
|
-
t.windowScrolledToBottom && (n.window = new K(window, t.windowScrolledToBottom), n.window.install()), e[
|
|
843
|
+
t.windowScrolledToBottom && (n.window = new K(window, t.windowScrolledToBottom), n.window.install()), e[Y] = n;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function Ft(e) {
|
|
846
846
|
var n, i, s;
|
|
847
|
-
const t = e[
|
|
847
|
+
const t = e[Y];
|
|
848
848
|
(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();
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function ie(e) {
|
|
851
851
|
var n, i, s;
|
|
852
|
-
const t = e[
|
|
852
|
+
const t = e[Y];
|
|
853
853
|
(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();
|
|
854
854
|
}
|
|
855
|
-
const
|
|
856
|
-
function
|
|
855
|
+
const N = ["auto", "scroll"];
|
|
856
|
+
function we(e) {
|
|
857
857
|
const t = e.parentElement;
|
|
858
858
|
if (!t)
|
|
859
859
|
return null;
|
|
860
860
|
const n = window.getComputedStyle(t);
|
|
861
|
-
return
|
|
861
|
+
return N.includes(n.overflow) || N.includes(n.overflowX) || N.includes(n.overflowY) ? t : we(t);
|
|
862
862
|
}
|
|
863
863
|
class K {
|
|
864
864
|
constructor(t, n) {
|
|
@@ -876,24 +876,24 @@ class K {
|
|
|
876
876
|
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);
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
|
-
function
|
|
880
|
-
|
|
879
|
+
function Cn(e) {
|
|
880
|
+
W(() => window.addEventListener("resize", e)), pe(() => window.addEventListener("resize", e)), me(() => window.removeEventListener("resize", e)), q(() => window.removeEventListener("resize", e));
|
|
881
881
|
}
|
|
882
882
|
const _t = {
|
|
883
|
-
mounted:
|
|
884
|
-
updated:
|
|
885
|
-
},
|
|
886
|
-
function
|
|
887
|
-
if (t.value === void 0 && e[
|
|
883
|
+
mounted: oe,
|
|
884
|
+
updated: oe
|
|
885
|
+
}, se = Symbol("HasAutoFocused");
|
|
886
|
+
function oe(e, t) {
|
|
887
|
+
if (t.value === void 0 && e[se] || t.value !== void 0 && !t.value || t.oldValue !== void 0 && t.value == t.oldValue)
|
|
888
888
|
return;
|
|
889
|
-
e[
|
|
889
|
+
e[se] = !0;
|
|
890
890
|
const n = ["BUTTON", "INPUT", "TEXTAREA", "SELECT"].indexOf(e.tagName) > -1 ? e : e.querySelectorAll("input")[0];
|
|
891
891
|
setTimeout(() => n.focus(), 10);
|
|
892
892
|
}
|
|
893
|
-
const
|
|
894
|
-
mounted:
|
|
893
|
+
const Nt = {
|
|
894
|
+
mounted: Kt
|
|
895
895
|
}, b = Symbol("ConfirmState");
|
|
896
|
-
function
|
|
896
|
+
function Kt(e) {
|
|
897
897
|
e.addEventListener("click", (t) => {
|
|
898
898
|
const n = Date.now();
|
|
899
899
|
if (e[b]) {
|
|
@@ -913,25 +913,25 @@ function Rt(e) {
|
|
|
913
913
|
e[b] = i, e.innerHTML = "Confirm", e.addEventListener("mouseout", i.resetHandler);
|
|
914
914
|
});
|
|
915
915
|
}
|
|
916
|
-
const
|
|
917
|
-
beforeMount:
|
|
916
|
+
const Rt = {
|
|
917
|
+
beforeMount: jt
|
|
918
918
|
};
|
|
919
|
-
function
|
|
919
|
+
function jt(e) {
|
|
920
920
|
e.addEventListener("blur", () => {
|
|
921
921
|
let t = e.value;
|
|
922
|
-
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" +
|
|
922
|
+
/^\d{1,2}\/\d{1,2}$/.test(t) && (t += "/" + R(/* @__PURE__ */ new Date(), "yy"));
|
|
923
923
|
const n = Date.parse(t);
|
|
924
|
-
isNaN(n) ? e.value = "" : e.value =
|
|
924
|
+
isNaN(n) ? e.value = "" : e.value = R(n, "MM/dd/yyyy"), e.dispatchEvent(new Event("input"));
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
|
-
const
|
|
928
|
-
beforeMount:
|
|
929
|
-
updated:
|
|
927
|
+
const Pt = {
|
|
928
|
+
beforeMount: le,
|
|
929
|
+
updated: le
|
|
930
930
|
};
|
|
931
|
-
function
|
|
932
|
-
t.value == t.oldValue && e.innerHTML.length || (e.innerText =
|
|
931
|
+
function le(e, t) {
|
|
932
|
+
t.value == t.oldValue && e.innerHTML.length || (e.innerText = Wt(e, t));
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Wt(e, t) {
|
|
935
935
|
var c, p;
|
|
936
936
|
if (!t.value)
|
|
937
937
|
return ((c = e.attributes.getNamedItem("placeholder")) == null ? void 0 : c.value) ?? "";
|
|
@@ -944,49 +944,49 @@ function qt(e, t) {
|
|
|
944
944
|
h.getFullYear() == o.getFullYear() && h.getMonth() == o.getMonth() && h.getDate() == o.getDate() && (n = "at", l = "HH:mm");
|
|
945
945
|
}
|
|
946
946
|
l || (l = C.defaultDateTimeFormat);
|
|
947
|
-
let r =
|
|
947
|
+
let r = R(o, l);
|
|
948
948
|
return n && (r = n + " " + r), r;
|
|
949
949
|
}
|
|
950
|
-
const
|
|
951
|
-
beforeMount:
|
|
952
|
-
updated:
|
|
953
|
-
unmounted:
|
|
950
|
+
const qt = {
|
|
951
|
+
beforeMount: re,
|
|
952
|
+
updated: re,
|
|
953
|
+
unmounted: Ut
|
|
954
954
|
};
|
|
955
|
-
function
|
|
955
|
+
function re(e, t) {
|
|
956
956
|
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");
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function Ut(e) {
|
|
959
959
|
e.tagName === "LABEL" && (e.classList.remove("disabled"), e = e.querySelector("input")), e.removeAttribute("disabled");
|
|
960
960
|
}
|
|
961
|
-
const
|
|
962
|
-
beforeMount:
|
|
963
|
-
updated:
|
|
964
|
-
unmounted:
|
|
965
|
-
},
|
|
966
|
-
function
|
|
967
|
-
|
|
961
|
+
const zt = {
|
|
962
|
+
beforeMount: ae,
|
|
963
|
+
updated: ae,
|
|
964
|
+
unmounted: ke
|
|
965
|
+
}, M = Symbol("HasAutoFocused"), Z = [];
|
|
966
|
+
function Xt() {
|
|
967
|
+
Z.forEach(Se);
|
|
968
968
|
}
|
|
969
|
-
setInterval(
|
|
970
|
-
function
|
|
969
|
+
setInterval(Xt, 1e3);
|
|
970
|
+
function ae(e, t) {
|
|
971
971
|
var l;
|
|
972
972
|
if (t.value == t.oldValue)
|
|
973
973
|
return;
|
|
974
974
|
if (!t.value)
|
|
975
|
-
return
|
|
975
|
+
return ke(e);
|
|
976
976
|
const n = new Date(t.value), i = (l = e.attributes.getNamedItem("base-time")) == null ? void 0 : l.value, s = n.getTime() - (i ? new Date(i).getTime() - t.value * 1e3 : 0), o = e.getAttribute("no-seconds") === null;
|
|
977
|
-
e[
|
|
977
|
+
e[M] || Z.push(e), e[M] = {
|
|
978
978
|
startTs: s,
|
|
979
979
|
includeSeconds: o
|
|
980
|
-
},
|
|
980
|
+
}, Se(e);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
983
|
-
const t = e[
|
|
984
|
-
e.innerText =
|
|
982
|
+
function Se(e) {
|
|
983
|
+
const t = e[M], n = Math.round((Date.now() - t.startTs) / 1e3);
|
|
984
|
+
e.innerText = Yt(n, t.includeSeconds);
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
e[
|
|
986
|
+
function ke(e) {
|
|
987
|
+
e[M] && (Pe(Z, e), delete e[M]), e.innerText = "-";
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function Yt(e, t) {
|
|
990
990
|
const n = [], i = Math.floor(e / 86400);
|
|
991
991
|
i && n.push(i + "d"), e -= i * 86400;
|
|
992
992
|
const s = Math.floor(e / 3600);
|
|
@@ -994,23 +994,23 @@ function Zt(e, t) {
|
|
|
994
994
|
const o = Math.floor(e / 60);
|
|
995
995
|
return (i || s || o) && n.push(o + "m"), t ? n.length || n.push("0m") : (e -= o * 60, n.push(e + "s")), n.join(" ");
|
|
996
996
|
}
|
|
997
|
-
const
|
|
997
|
+
const Zt = {
|
|
998
998
|
created(e, t) {
|
|
999
|
-
|
|
999
|
+
Bt(t.value, t.instance.$);
|
|
1000
1000
|
}
|
|
1001
|
-
},
|
|
1002
|
-
beforeMount:
|
|
1003
|
-
updated:
|
|
1001
|
+
}, Gt = {
|
|
1002
|
+
beforeMount: ce,
|
|
1003
|
+
updated: ce
|
|
1004
1004
|
};
|
|
1005
|
-
function
|
|
1005
|
+
function ce(e, t) {
|
|
1006
1006
|
e.tagName == "LABEL" && (e = e.querySelector("input")), t.value ? e.setAttribute("readonly", "readonly") : e.removeAttribute("readonly");
|
|
1007
1007
|
}
|
|
1008
|
-
const
|
|
1009
|
-
mounted:
|
|
1010
|
-
updated:
|
|
1008
|
+
const Qt = {
|
|
1009
|
+
mounted: de,
|
|
1010
|
+
updated: de,
|
|
1011
1011
|
unmounted: Me
|
|
1012
1012
|
}, k = Symbol("TooltipState");
|
|
1013
|
-
function
|
|
1013
|
+
function de(e, t) {
|
|
1014
1014
|
var i;
|
|
1015
1015
|
let n = ((i = e.attributes.getNamedItem("tip")) == null ? void 0 : i.value) ?? t.value;
|
|
1016
1016
|
if (t.value || (n = null), n) {
|
|
@@ -1018,7 +1018,7 @@ function ue(e, t) {
|
|
|
1018
1018
|
content: n,
|
|
1019
1019
|
html: e.getAttribute("html") !== null
|
|
1020
1020
|
};
|
|
1021
|
-
e[k] ? e[k].configure(s) : e[k] = new
|
|
1021
|
+
e[k] ? e[k].configure(s) : e[k] = new Jt(e, s);
|
|
1022
1022
|
} else
|
|
1023
1023
|
Me(e);
|
|
1024
1024
|
}
|
|
@@ -1026,7 +1026,7 @@ function Me(e) {
|
|
|
1026
1026
|
var t;
|
|
1027
1027
|
(t = e[k]) == null || t.destroy(), delete e[k];
|
|
1028
1028
|
}
|
|
1029
|
-
class
|
|
1029
|
+
class Jt {
|
|
1030
1030
|
constructor(t, n) {
|
|
1031
1031
|
f(this, "lastMoveEvt");
|
|
1032
1032
|
f(this, "checkInterval");
|
|
@@ -1074,56 +1074,56 @@ class en {
|
|
|
1074
1074
|
this.shouldShow = !1, this.removeTooltip(), this.el.removeEventListener("mouseenter", this.handleTargetMouseEnterWithContext), this.el.removeEventListener("mouseleave", this.handleTargetMouseLeaveWithContext);
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
e.directive("autofocus", _t), e.directive("confirm-button",
|
|
1077
|
+
function en(e) {
|
|
1078
|
+
e.directive("autofocus", _t), e.directive("confirm-button", Nt), e.directive("date-input", Rt), e.directive("datetime", Pt), e.directive("disabled", qt), e.directive("duration", zt), e.directive("infinite-scroll", Zt), e.directive("readonly", Gt), e.directive("tooltip", Qt);
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1081
|
-
|
|
1080
|
+
function Ln(e) {
|
|
1081
|
+
en(e);
|
|
1082
1082
|
}
|
|
1083
1083
|
export {
|
|
1084
|
-
|
|
1084
|
+
an as ModalContainer,
|
|
1085
1085
|
B as UserError,
|
|
1086
|
-
|
|
1086
|
+
rn as VfAjaxSelect,
|
|
1087
1087
|
V as VfAlertModal,
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1088
|
+
gn as VfEzSmartSelect,
|
|
1089
|
+
it as VfModal,
|
|
1090
|
+
Et as VfSmartSelect,
|
|
1091
|
+
kn as cloneProp,
|
|
1092
|
+
fn as configureVf,
|
|
1093
|
+
yn as createFilters,
|
|
1094
|
+
ye as createModalInjection,
|
|
1095
|
+
lt as desnakeCase,
|
|
1096
|
+
Hn as escapeHtml,
|
|
1097
|
+
Qe as formatError,
|
|
1098
|
+
$t as formatNumber,
|
|
1099
|
+
rt as formatPhone,
|
|
1100
|
+
at as formatUSCurrency,
|
|
1101
|
+
mn as handleError,
|
|
1102
|
+
pn as handleErrorAndAlert,
|
|
1103
|
+
xn as installApiClientInterceptors,
|
|
1104
|
+
Ln as installVf,
|
|
1105
|
+
bn as maskComponent,
|
|
1106
|
+
Dt as maskEl,
|
|
1107
|
+
Sn as maskForm,
|
|
1108
|
+
vn as nl2br,
|
|
1109
1109
|
Mn as nullifyEmptyInputs,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1110
|
+
z as presentModal,
|
|
1111
|
+
Ee as removeModalInjection,
|
|
1112
|
+
cn as removeModalInjectionByInstance,
|
|
1113
|
+
Te as removeModalInjectionByInternalInstance,
|
|
1114
|
+
Ge as removeModalInjectionByVnode,
|
|
1115
|
+
En as replaceElement,
|
|
1116
|
+
ee as showAlert,
|
|
1117
|
+
dn as showConfirm,
|
|
1118
|
+
un as showConfirmDestroy,
|
|
1119
|
+
Tn as showContextMenu,
|
|
1120
|
+
hn as showWait,
|
|
1121
|
+
It as sleep,
|
|
1122
|
+
On as sleepSecs,
|
|
1123
|
+
X as toError,
|
|
1124
|
+
wn as unmaskComponent,
|
|
1125
|
+
Oe as unmaskEl,
|
|
1126
|
+
Ht as unmaskForm,
|
|
1127
|
+
Bt as useInfiniteScroll,
|
|
1128
|
+
Cn as useResizeWatcher
|
|
1129
1129
|
};
|