@signal24/vue-foundation 4.13.3 → 4.13.5
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.
|
@@ -11,7 +11,7 @@ declare function upperCase(value: null): null;
|
|
|
11
11
|
declare function upperCase(value: string): string;
|
|
12
12
|
declare function desnake(value: null): null;
|
|
13
13
|
declare function desnake(value: string): string;
|
|
14
|
-
declare function usCurrency(value: string | number): string;
|
|
14
|
+
declare function usCurrency(value: string | number, divisor?: number): string;
|
|
15
15
|
declare const FilterFns: {
|
|
16
16
|
bytes: typeof bytes;
|
|
17
17
|
dash: typeof dash;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Ve = Object.defineProperty;
|
|
2
2
|
var Fe = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var E = (e, t, n) => (Fe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { compact as ze, debounce as Xe, isEqual as
|
|
4
|
+
import { defineComponent as x, defineProps as _e, defineEmits as Ne, ref as O, computed as _, openBlock as d, createElementBlock as u, createElementVNode as w, toDisplayString as C, withDirectives as j, createCommentVNode as b, Fragment as U, renderList as J, vModelSelect as Re, getCurrentInstance as ee, onMounted as L, normalizeClass as k, normalizeStyle as Ke, withModifiers as te, renderSlot as K, reactive as je, h as W, Teleport as Ue, markRaw as We, onBeforeUnmount as ne, resolveDirective as Oe, createBlock as be, createSlots as Pe, withCtx as Y, createTextVNode as ae, vModelText as qe, watch as ce, onActivated as ke, onDeactivated as Se } from "vue";
|
|
5
|
+
import { compact as ze, debounce as Xe, isEqual as xe, upperFirst as Ye, startCase as Ze, cloneDeep as Ge, remove as Qe } from "lodash";
|
|
6
6
|
import { escapeHtml as Je } from "@vue/shared";
|
|
7
7
|
import { escapeHtml as ni } from "@vue/shared";
|
|
8
8
|
import { installOpenApiClientInterceptors as et, isOpenApiError as tt } from "@signal24/openapi-client-codegen/browser";
|
|
9
9
|
import { format as G } from "date-fns";
|
|
10
|
-
const nt =
|
|
10
|
+
const nt = x({
|
|
11
11
|
setup() {
|
|
12
12
|
const e = _e();
|
|
13
13
|
Ne(["update:modelValue"]);
|
|
@@ -33,7 +33,7 @@ const nt = C({
|
|
|
33
33
|
this.options = await this.props.loadFn();
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), Ce = (e, t) => {
|
|
37
37
|
const n = e.__vccOpts || e;
|
|
38
38
|
for (const [i, s] of t)
|
|
39
39
|
n[i] = s;
|
|
@@ -50,21 +50,21 @@ function lt(e, t, n, i, s, o) {
|
|
|
50
50
|
key: 1,
|
|
51
51
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.selectedItem = r)
|
|
52
52
|
}, [
|
|
53
|
-
e.props.nullText ? (d(), u("option", st,
|
|
53
|
+
e.props.nullText ? (d(), u("option", st, C(e.props.nullText), 1)) : b("", !0),
|
|
54
54
|
(d(!0), u(U, null, J(e.renderOptions, (r, l) => {
|
|
55
55
|
var a;
|
|
56
56
|
return d(), u("option", {
|
|
57
57
|
key: l,
|
|
58
58
|
value: (a = e.options) == null ? void 0 : a[l]
|
|
59
|
-
},
|
|
59
|
+
}, C(r), 9, ot);
|
|
60
60
|
}), 128))
|
|
61
61
|
], 512)), [
|
|
62
62
|
[Re, e.selectedItem]
|
|
63
63
|
]) : (d(), u("select", it, [
|
|
64
|
-
w("option", null,
|
|
64
|
+
w("option", null, C(e.props.loadingText || "Loading..."), 1)
|
|
65
65
|
]));
|
|
66
66
|
}
|
|
67
|
-
const Mn = /* @__PURE__ */
|
|
67
|
+
const Mn = /* @__PURE__ */ Ce(nt, [["render", lt]]), rt = /* @__PURE__ */ x({
|
|
68
68
|
__name: "overlay-anchor",
|
|
69
69
|
props: {
|
|
70
70
|
overlayId: {},
|
|
@@ -121,7 +121,7 @@ const Mn = /* @__PURE__ */ xe(nt, [["render", lt]]), rt = /* @__PURE__ */ C({
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
let at = 0;
|
|
124
|
-
const S = je([]), In =
|
|
124
|
+
const S = je([]), In = x({
|
|
125
125
|
setup() {
|
|
126
126
|
return () => W("div", [
|
|
127
127
|
J(S, (e) => W(Ue, { key: e.id, to: "#vf-overlay-target" }, [e.wrapperVnode ?? e.vnode]))
|
|
@@ -278,7 +278,7 @@ const pt = ["id"], mt = {
|
|
|
278
278
|
}, vt = { class: "vf-modal-content" }, yt = {
|
|
279
279
|
key: 1,
|
|
280
280
|
class: "vf-modal-footer"
|
|
281
|
-
}, gt = /* @__PURE__ */
|
|
281
|
+
}, gt = /* @__PURE__ */ x({
|
|
282
282
|
__name: "modal",
|
|
283
283
|
props: {
|
|
284
284
|
id: {},
|
|
@@ -352,7 +352,7 @@ const pt = ["id"], mt = {
|
|
|
352
352
|
], 34)
|
|
353
353
|
], 10, pt));
|
|
354
354
|
}
|
|
355
|
-
}), Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */
|
|
355
|
+
}), Et = ["innerHtml"], Tt = ["innerText"], X = /* @__PURE__ */ x({
|
|
356
356
|
__name: "alert-modal",
|
|
357
357
|
props: {
|
|
358
358
|
isBare: { type: Boolean },
|
|
@@ -385,7 +385,7 @@ const pt = ["id"], mt = {
|
|
|
385
385
|
i.title ? {
|
|
386
386
|
name: "header",
|
|
387
387
|
fn: Y(() => [
|
|
388
|
-
w("h1", null,
|
|
388
|
+
w("h1", null, C(i.title), 1)
|
|
389
389
|
]),
|
|
390
390
|
key: "0"
|
|
391
391
|
} : void 0,
|
|
@@ -453,10 +453,10 @@ function St(e, t, n) {
|
|
|
453
453
|
function Rn(e) {
|
|
454
454
|
return e.replace(/\n/g, "<br>");
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function xt(e) {
|
|
457
457
|
return e.replace(/_/g, " ");
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Ct(e) {
|
|
460
460
|
const t = e.replace(/\D/g, "").replace(/^1/, "");
|
|
461
461
|
return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
|
|
462
462
|
}
|
|
@@ -668,11 +668,11 @@ const D = Symbol("null"), he = Symbol("create"), Mt = "`1234567890-=[]\\;',./~!@
|
|
|
668
668
|
return this.effectiveKeyExtractor ? this.effectiveKeyExtractor(this.selectedOption) : ((t = this.getOptionDescriptor(e)) == null ? void 0 : t.key) ?? "";
|
|
669
669
|
},
|
|
670
670
|
getOptionDescriptor(e) {
|
|
671
|
-
const t = this.effectiveOptions.find((
|
|
671
|
+
const t = this.effectiveOptions.find((s) => s.ref === e);
|
|
672
672
|
if (t)
|
|
673
673
|
return t;
|
|
674
|
-
const n = this.effectiveOptions.find((
|
|
675
|
-
return
|
|
674
|
+
const n = this.keyExtractor ? (s, o) => this.keyExtractor(s) === this.keyExtractor(o) : xe, i = this.effectiveOptions.find((s) => n(s.ref, e));
|
|
675
|
+
return i || null;
|
|
676
676
|
},
|
|
677
677
|
handleInputBlurred() {
|
|
678
678
|
this.debug || (!this.searchText.length && this.nullTitle && (this.selectedOption = null, this.selectedOptionTitle = null), this.shouldDisplayOptions = !1);
|
|
@@ -778,12 +778,12 @@ function _t(e, t, n, i, s, o) {
|
|
|
778
778
|
innerHTML: l.subtitle
|
|
779
779
|
}, null, 8, Vt)) : b("", !0)
|
|
780
780
|
], 42, $t))), 128)),
|
|
781
|
-
!o.effectiveOptions.length && e.searchText ? (d(), u("div", Ft,
|
|
781
|
+
!o.effectiveOptions.length && e.searchText ? (d(), u("div", Ft, C(o.effectiveNoResultsText), 1)) : b("", !0)
|
|
782
782
|
], 64)) : (d(), u("div", At, "Loading..."))
|
|
783
783
|
], 512)) : b("", !0)
|
|
784
784
|
], 2);
|
|
785
785
|
}
|
|
786
|
-
const Nt = /* @__PURE__ */
|
|
786
|
+
const Nt = /* @__PURE__ */ Ce(It, [["render", _t]]), jn = /* @__PURE__ */ x({
|
|
787
787
|
__name: "ez-smart-select",
|
|
788
788
|
props: {
|
|
789
789
|
modelValue: {},
|
|
@@ -808,7 +808,7 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
808
808
|
}
|
|
809
809
|
), ce(r, (l) => {
|
|
810
810
|
var a;
|
|
811
|
-
o("update:modelValue", l ? ((a = i.value.find((p) =>
|
|
811
|
+
o("update:modelValue", l ? ((a = i.value.find((p) => xe(p, l))) == null ? void 0 : a.value) ?? null : null);
|
|
812
812
|
}), (l, a) => (d(), be(Nt, {
|
|
813
813
|
modelValue: r.value,
|
|
814
814
|
"onUpdate:modelValue": a[0] || (a[0] = (p) => r.value = p),
|
|
@@ -823,7 +823,7 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
823
823
|
}, Ut = {
|
|
824
824
|
key: 0,
|
|
825
825
|
class: "progress-bar"
|
|
826
|
-
}, Wt = /* @__PURE__ */
|
|
826
|
+
}, Wt = /* @__PURE__ */ x({
|
|
827
827
|
__name: "toast",
|
|
828
828
|
props: {
|
|
829
829
|
message: {},
|
|
@@ -851,7 +851,7 @@ const Nt = /* @__PURE__ */ xe(It, [["render", _t]]), jn = /* @__PURE__ */ C({
|
|
|
851
851
|
onClick: te(n, ["stop"])
|
|
852
852
|
}, [
|
|
853
853
|
w("div", Rt, [
|
|
854
|
-
w("div", Kt,
|
|
854
|
+
w("div", Kt, C(s.message), 1),
|
|
855
855
|
s.disableClose ? b("", !0) : (d(), u("div", jt, "x"))
|
|
856
856
|
]),
|
|
857
857
|
s.durationSecs !== null ? (d(), u("div", Ut, [
|
|
@@ -885,7 +885,7 @@ function Xt(e) {
|
|
|
885
885
|
return e === null || typeof e == "string" && !/^\d+$/.test(e) ? e : nn(Number(e));
|
|
886
886
|
}
|
|
887
887
|
function Yt(e) {
|
|
888
|
-
return e &&
|
|
888
|
+
return e && Ct(e);
|
|
889
889
|
}
|
|
890
890
|
function Zt(e) {
|
|
891
891
|
return e ? Ye(e) : null;
|
|
@@ -897,10 +897,10 @@ function Qt(e) {
|
|
|
897
897
|
return e ? e.toUpperCase() : null;
|
|
898
898
|
}
|
|
899
899
|
function Jt(e) {
|
|
900
|
-
return e ?
|
|
900
|
+
return e ? xt(e) : null;
|
|
901
901
|
}
|
|
902
|
-
function en(e) {
|
|
903
|
-
return Lt(e);
|
|
902
|
+
function en(e, t = 1) {
|
|
903
|
+
return Lt(e, t);
|
|
904
904
|
}
|
|
905
905
|
const fe = {
|
|
906
906
|
bytes: Pt,
|
|
@@ -1251,7 +1251,7 @@ export {
|
|
|
1251
1251
|
Bn as configureVf,
|
|
1252
1252
|
Wn as createFilters,
|
|
1253
1253
|
ie as createOverlayInjection,
|
|
1254
|
-
|
|
1254
|
+
xt as desnakeCase,
|
|
1255
1255
|
dt as dismissOverlayInjectionById,
|
|
1256
1256
|
Hn as dismissOverlayInjectionByInstance,
|
|
1257
1257
|
Le as dismissOverlayInjectionByInternalInstance,
|
|
@@ -1259,7 +1259,7 @@ export {
|
|
|
1259
1259
|
ni as escapeHtml,
|
|
1260
1260
|
ut as formatError,
|
|
1261
1261
|
nn as formatNumber,
|
|
1262
|
-
|
|
1262
|
+
Ct as formatPhone,
|
|
1263
1263
|
Lt as formatUSCurrency,
|
|
1264
1264
|
Fn as handleError,
|
|
1265
1265
|
Vn as handleErrorAndAlert,
|
package/package.json
CHANGED
|
@@ -400,11 +400,14 @@ export default {
|
|
|
400
400
|
return matchedRef;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
//
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
|
|
403
|
+
// didn't find an object match, so we'll try a content match. a couple reasons:
|
|
404
|
+
// 1) the initial selection may have come from an owning object and the object as a whole may differ from the full content list
|
|
405
|
+
// 2) for reasons I've yet to determine, the prepend options, although they are wrapped by proxies and have identical content,
|
|
406
|
+
// are not the same proxy object as selectedOption once assigned -- even though the loaded data *is* the same. I've tried
|
|
407
|
+
// setting them as reactive using the same method (via data props rather than computed) and it didn't change anything.
|
|
408
|
+
// therefore, falling back to an isEqual check here when there's no equal object
|
|
409
|
+
const matcher = this.keyExtractor ? (a: GenericObject, b: GenericObject) => this.keyExtractor!(a) === this.keyExtractor!(b) : isEqual;
|
|
410
|
+
const matchedObj = this.effectiveOptions.find(o => matcher(o.ref!, option));
|
|
408
411
|
if (matchedObj) {
|
|
409
412
|
return matchedObj;
|
|
410
413
|
}
|
package/src/filters/index.ts
CHANGED
|
@@ -53,8 +53,8 @@ function desnake(value: string | null) {
|
|
|
53
53
|
return value ? desnakeCase(value) : null;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
function usCurrency(value: string | number) {
|
|
57
|
-
return formatUSCurrency(value);
|
|
56
|
+
function usCurrency(value: string | number, divisor = 1) {
|
|
57
|
+
return formatUSCurrency(value, divisor);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const FilterFns = {
|