@citizenplane/pimp 8.1.1 → 8.1.2
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/pimp.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, createCommentVNode, createElementVNode, resolveDynamicComponent, mergeProps, withCtx, createVNode, resolveDirective, createTextVNode, toDisplayString, withDirectives, vModelText, Fragment, renderList, vModelSelect, defineComponent, watch, h, Transition, normalizeStyle, withKeys, TransitionGroup, vShow, ref, withModifiers, vModelCheckbox } from "vue";
|
|
2
|
-
function _mergeNamespaces(n2,
|
|
3
|
-
|
|
2
|
+
function _mergeNamespaces(n2, m) {
|
|
3
|
+
m.forEach(function(e) {
|
|
4
4
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
5
5
|
if (k !== "default" && !(k in n2)) {
|
|
6
6
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
@@ -15,10 +15,10 @@ function _mergeNamespaces(n2, m2) {
|
|
|
15
15
|
});
|
|
16
16
|
return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
|
|
17
17
|
}
|
|
18
|
-
/*! maska v2.1.
|
|
18
|
+
/*! maska v2.1.2 | (c) Alexander Shabunevich | Released under the MIT license */
|
|
19
19
|
var L = Object.defineProperty;
|
|
20
20
|
var b = (n2, t, s2) => t in n2 ? L(n2, t, { enumerable: true, configurable: true, writable: true, value: s2 }) : n2[t] = s2;
|
|
21
|
-
var
|
|
21
|
+
var f = (n2, t, s2) => (b(n2, typeof t != "symbol" ? t + "" : t, s2), s2);
|
|
22
22
|
const R = {
|
|
23
23
|
"#": { pattern: /[0-9]/ },
|
|
24
24
|
"@": { pattern: /[a-zA-Z]/ },
|
|
@@ -26,8 +26,8 @@ const R = {
|
|
|
26
26
|
};
|
|
27
27
|
class w {
|
|
28
28
|
constructor(t = {}) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
f(this, "opts", {});
|
|
30
|
+
f(this, "memo", /* @__PURE__ */ new Map());
|
|
31
31
|
var e;
|
|
32
32
|
const s2 = { ...t };
|
|
33
33
|
if (s2.tokens != null) {
|
|
@@ -67,7 +67,7 @@ class w {
|
|
|
67
67
|
if (typeof s2 == "function")
|
|
68
68
|
return s2(t);
|
|
69
69
|
const e = this.process(t, (a = s2.slice(-1).pop()) != null ? a : "", false);
|
|
70
|
-
return (i = s2.find((
|
|
70
|
+
return (i = s2.find((p) => this.process(t, p, false).length >= e.length)) != null ? i : "";
|
|
71
71
|
}
|
|
72
72
|
escapeMask(t) {
|
|
73
73
|
const s2 = [], e = [];
|
|
@@ -82,34 +82,34 @@ class w {
|
|
|
82
82
|
const a = `value=${t},mask=${s2},masked=${e ? 1 : 0}`;
|
|
83
83
|
if (this.memo.has(a))
|
|
84
84
|
return this.memo.get(a);
|
|
85
|
-
const { mask: i, escaped:
|
|
86
|
-
let E, d = -1, o = this.isReversed() ? i.length - 1 : 0,
|
|
87
|
-
for (;
|
|
88
|
-
const
|
|
89
|
-
if (!
|
|
85
|
+
const { mask: i, escaped: p } = this.escapeMask(s2), l2 = [], k = this.opts.tokens != null ? this.opts.tokens : {}, r = this.isReversed() ? -1 : 1, u = this.isReversed() ? "unshift" : "push", g = this.isReversed() ? 0 : i.length - 1, V = this.isReversed() ? () => o > -1 && c > -1 : () => o < i.length && c < t.length, W = (m) => !this.isReversed() && m <= g || this.isReversed() && m >= g;
|
|
86
|
+
let E, d = -1, o = this.isReversed() ? i.length - 1 : 0, c = this.isReversed() ? t.length - 1 : 0;
|
|
87
|
+
for (; V(); ) {
|
|
88
|
+
const m = i.charAt(o), h2 = k[m], M = (h2 == null ? void 0 : h2.transform) != null ? h2.transform(t.charAt(c)) : t.charAt(c);
|
|
89
|
+
if (!p.includes(o) && h2 != null) {
|
|
90
90
|
if (M.match(h2.pattern) != null)
|
|
91
91
|
l2[u](M), h2.repeated ? (d === -1 ? d = o : o === g && o !== d && (o = d - r), g === d && (o -= r)) : h2.multiple && (o -= r), o += r;
|
|
92
92
|
else if (h2.multiple) {
|
|
93
|
-
const P = ((v = l2[
|
|
94
|
-
P && A !== "" && k[A] == null ? (o += r,
|
|
93
|
+
const P = ((v = l2[c - r]) == null ? void 0 : v.match(h2.pattern)) != null, A = i.charAt(o + r);
|
|
94
|
+
P && A !== "" && k[A] == null ? (o += r, c -= r) : l2[u]("");
|
|
95
95
|
} else
|
|
96
|
-
M === E ? E = void 0 : h2.optional && (o += r,
|
|
97
|
-
|
|
96
|
+
M === E ? E = void 0 : h2.optional && (o += r, c -= r);
|
|
97
|
+
c += r;
|
|
98
98
|
} else
|
|
99
|
-
e && !this.isEager() && l2[u](
|
|
99
|
+
e && !this.isEager() && l2[u](m), M === m && !this.isEager() ? c += r : E = m, this.isEager() || (o += r);
|
|
100
100
|
if (this.isEager())
|
|
101
|
-
for (; W(o) && (k[i.charAt(o)] == null ||
|
|
102
|
-
e ? l2[u](i.charAt(o)) : i.charAt(o) === t.charAt(
|
|
101
|
+
for (; W(o) && (k[i.charAt(o)] == null || p.includes(o)); )
|
|
102
|
+
e ? l2[u](i.charAt(o)) : i.charAt(o) === t.charAt(c) && (c += r), o += r;
|
|
103
103
|
}
|
|
104
104
|
return this.memo.set(a, l2.join("")), this.memo.get(a);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const S = (n2) => JSON.parse(n2.replaceAll("'", '"')), O = (n2, t = {}) => {
|
|
108
108
|
const s2 = { ...t };
|
|
109
109
|
return n2.dataset.maska != null && n2.dataset.maska !== "" && (s2.mask = x(n2.dataset.maska)), n2.dataset.maskaEager != null && (s2.eager = y(n2.dataset.maskaEager)), n2.dataset.maskaReversed != null && (s2.reversed = y(n2.dataset.maskaReversed)), n2.dataset.maskaTokensReplace != null && (s2.tokensReplace = y(n2.dataset.maskaTokensReplace)), n2.dataset.maskaTokens != null && (s2.tokens = J(n2.dataset.maskaTokens)), s2;
|
|
110
|
-
}, y = (n2) => n2 !== "" ? Boolean(JSON.parse(n2)) : true, x = (n2) => n2.startsWith("[") && n2.endsWith("]") ?
|
|
110
|
+
}, y = (n2) => n2 !== "" ? Boolean(JSON.parse(n2)) : true, x = (n2) => n2.startsWith("[") && n2.endsWith("]") ? S(n2) : n2, J = (n2) => {
|
|
111
111
|
if (n2.startsWith("{") && n2.endsWith("}"))
|
|
112
|
-
return
|
|
112
|
+
return S(n2);
|
|
113
113
|
const t = {};
|
|
114
114
|
return n2.split("|").forEach((s2) => {
|
|
115
115
|
const e = s2.split(":");
|
|
@@ -123,21 +123,21 @@ const C = (n2) => JSON.parse(n2.replaceAll("'", '"')), O = (n2, t = {}) => {
|
|
|
123
123
|
};
|
|
124
124
|
class N {
|
|
125
125
|
constructor(t, s2 = {}) {
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
f(this, "items", /* @__PURE__ */ new Map());
|
|
127
|
+
f(this, "beforeinputEvent", (t2) => {
|
|
128
128
|
const s3 = t2.target, e = this.items.get(s3);
|
|
129
129
|
e.isEager() && "inputType" in t2 && t2.inputType.startsWith("delete") && e.unmasked(s3.value).length <= 1 && this.setMaskedValue(s3, "");
|
|
130
130
|
});
|
|
131
|
-
|
|
131
|
+
f(this, "inputEvent", (t2) => {
|
|
132
132
|
if (t2 instanceof CustomEvent && t2.type === "input" && t2.detail != null && "masked" in t2.detail)
|
|
133
133
|
return;
|
|
134
|
-
const s3 = t2.target, e = this.items.get(s3), a = s3.value, i = s3.selectionStart,
|
|
134
|
+
const s3 = t2.target, e = this.items.get(s3), a = s3.value, i = s3.selectionStart, p = s3.selectionEnd;
|
|
135
135
|
let l2 = a;
|
|
136
136
|
if (e.isEager()) {
|
|
137
137
|
const k = e.unmasked(a), r = e.masked(k);
|
|
138
138
|
k === "" && "data" in t2 && t2.data != null ? l2 = t2.data : (r.startsWith(a) || e.completed(k)) && (l2 = k);
|
|
139
139
|
}
|
|
140
|
-
this.setMaskedValue(s3, l2), "inputType" in t2 && (t2.inputType.startsWith("delete") || i != null && i < a.length) && s3.setSelectionRange(i,
|
|
140
|
+
this.setMaskedValue(s3, l2), "inputType" in t2 && (t2.inputType.startsWith("delete") || i != null && i < a.length) && s3.setSelectionRange(i, p);
|
|
141
141
|
});
|
|
142
142
|
this.options = s2, typeof t == "string" ? this.init(
|
|
143
143
|
Array.from(document.querySelectorAll(t)),
|
|
@@ -168,7 +168,7 @@ class N {
|
|
|
168
168
|
}
|
|
169
169
|
setMaskedValue(t, s2) {
|
|
170
170
|
const e = this.items.get(t);
|
|
171
|
-
this.options.preProcess != null && (s2 = this.options.preProcess(s2)), s2 = e.masked(s2), this.options.postProcess != null && (s2 = this.options.postProcess(s2)), t.value = s2;
|
|
171
|
+
this.options.preProcess != null && (s2 = this.options.preProcess(s2)), s2 = e.masked(s2), this.options.postProcess != null && (s2 = this.options.postProcess(s2)), t.value = s2, t.dataset.maskaValue = s2;
|
|
172
172
|
const a = {
|
|
173
173
|
masked: e.masked(s2),
|
|
174
174
|
unmasked: e.unmasked(s2),
|
|
@@ -177,24 +177,27 @@ class N {
|
|
|
177
177
|
this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((i) => i(a)) : this.options.onMaska(a)), t.dispatchEvent(new CustomEvent("maska", { detail: a })), t.dispatchEvent(new CustomEvent("input", { detail: a }));
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
const T = /* @__PURE__ */ new WeakMap(),
|
|
180
|
+
const T = /* @__PURE__ */ new WeakMap(), C = (n2) => {
|
|
181
|
+
const t = n2.dataset.maskaValue;
|
|
182
|
+
(t == null && n2.value !== "" || t != null && t !== n2.value) && n2.dispatchEvent(new CustomEvent("input"));
|
|
183
|
+
}, I = (n2, t) => {
|
|
181
184
|
const s2 = n2 instanceof HTMLInputElement ? n2 : n2.querySelector("input"), e = { ...t.arg };
|
|
182
185
|
if (s2 == null)
|
|
183
186
|
return;
|
|
184
187
|
const a = T.get(s2);
|
|
185
188
|
if (a != null) {
|
|
186
|
-
if (!a.needUpdate(s2, e))
|
|
189
|
+
if (C(s2), !a.needUpdate(s2, e))
|
|
187
190
|
return;
|
|
188
191
|
a.destroy();
|
|
189
192
|
}
|
|
190
193
|
if (t.value != null) {
|
|
191
|
-
const i = t.value,
|
|
194
|
+
const i = t.value, p = (l2) => {
|
|
192
195
|
i.masked = l2.masked, i.unmasked = l2.unmasked, i.completed = l2.completed;
|
|
193
196
|
};
|
|
194
|
-
e.onMaska = e.onMaska == null ?
|
|
197
|
+
e.onMaska = e.onMaska == null ? p : Array.isArray(e.onMaska) ? [...e.onMaska, p] : [e.onMaska, p];
|
|
195
198
|
}
|
|
196
199
|
T.set(s2, new N(s2, e)), setTimeout(() => {
|
|
197
|
-
s2
|
|
200
|
+
C(s2);
|
|
198
201
|
});
|
|
199
202
|
};
|
|
200
203
|
var ClickOutside = {
|
|
@@ -652,19 +655,19 @@ function intlConfigString(localeStr, numberingSystem, outputCalendar) {
|
|
|
652
655
|
return localeStr;
|
|
653
656
|
}
|
|
654
657
|
}
|
|
655
|
-
function mapMonths(
|
|
658
|
+
function mapMonths(f2) {
|
|
656
659
|
const ms = [];
|
|
657
660
|
for (let i = 1; i <= 12; i++) {
|
|
658
661
|
const dt = DateTime.utc(2016, i, 1);
|
|
659
|
-
ms.push(
|
|
662
|
+
ms.push(f2(dt));
|
|
660
663
|
}
|
|
661
664
|
return ms;
|
|
662
665
|
}
|
|
663
|
-
function mapWeekdays(
|
|
666
|
+
function mapWeekdays(f2) {
|
|
664
667
|
const ms = [];
|
|
665
668
|
for (let i = 1; i <= 7; i++) {
|
|
666
669
|
const dt = DateTime.utc(2016, 11, 13 + i);
|
|
667
|
-
ms.push(
|
|
670
|
+
ms.push(f2(dt));
|
|
668
671
|
}
|
|
669
672
|
return ms;
|
|
670
673
|
}
|
|
@@ -880,7 +883,7 @@ class Locale {
|
|
|
880
883
|
});
|
|
881
884
|
}
|
|
882
885
|
extract(dt, intlOpts, field) {
|
|
883
|
-
const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((
|
|
886
|
+
const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field);
|
|
884
887
|
return matching ? matching.value : null;
|
|
885
888
|
}
|
|
886
889
|
numberFormatter(opts = {}) {
|
|
@@ -1143,8 +1146,8 @@ function parseMillis(fraction) {
|
|
|
1143
1146
|
if (isUndefined(fraction) || fraction === null || fraction === "") {
|
|
1144
1147
|
return void 0;
|
|
1145
1148
|
} else {
|
|
1146
|
-
const
|
|
1147
|
-
return Math.floor(
|
|
1149
|
+
const f2 = parseFloat("0." + fraction) * 1e3;
|
|
1150
|
+
return Math.floor(f2);
|
|
1148
1151
|
}
|
|
1149
1152
|
}
|
|
1150
1153
|
function roundTo(number, digits, towardZero = false) {
|
|
@@ -1204,7 +1207,7 @@ function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {
|
|
|
1204
1207
|
intlOpts.timeZone = timeZone;
|
|
1205
1208
|
}
|
|
1206
1209
|
const modified = { timeZoneName: offsetFormat, ...intlOpts };
|
|
1207
|
-
const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((
|
|
1210
|
+
const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename");
|
|
1208
1211
|
return parsed ? parsed.value : null;
|
|
1209
1212
|
}
|
|
1210
1213
|
function signedOffset(offHourStr, offMinuteStr) {
|
|
@@ -1664,13 +1667,13 @@ class Invalid {
|
|
|
1664
1667
|
}
|
|
1665
1668
|
const ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
1666
1669
|
function combineRegexes(...regexes) {
|
|
1667
|
-
const full = regexes.reduce((
|
|
1670
|
+
const full = regexes.reduce((f2, r) => f2 + r.source, "");
|
|
1668
1671
|
return RegExp(`^${full}$`);
|
|
1669
1672
|
}
|
|
1670
1673
|
function combineExtractors(...extractors) {
|
|
1671
|
-
return (
|
|
1674
|
+
return (m) => extractors.reduce(
|
|
1672
1675
|
([mergedVals, mergedZone, cursor], ex) => {
|
|
1673
|
-
const [val, zone, next] = ex(
|
|
1676
|
+
const [val, zone, next] = ex(m, cursor);
|
|
1674
1677
|
return [{ ...mergedVals, ...val }, zone || mergedZone, next];
|
|
1675
1678
|
},
|
|
1676
1679
|
[{}, null, 1]
|
|
@@ -1681,9 +1684,9 @@ function parse(s2, ...patterns) {
|
|
|
1681
1684
|
return [null, null];
|
|
1682
1685
|
}
|
|
1683
1686
|
for (const [regex, extractor] of patterns) {
|
|
1684
|
-
const
|
|
1685
|
-
if (
|
|
1686
|
-
return extractor(
|
|
1687
|
+
const m = regex.exec(s2);
|
|
1688
|
+
if (m) {
|
|
1689
|
+
return extractor(m);
|
|
1687
1690
|
}
|
|
1688
1691
|
}
|
|
1689
1692
|
return [null, null];
|
|
@@ -1714,8 +1717,8 @@ const sqlTimeRegex = RegExp(
|
|
|
1714
1717
|
);
|
|
1715
1718
|
const sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);
|
|
1716
1719
|
function int(match2, pos, fallback) {
|
|
1717
|
-
const
|
|
1718
|
-
return isUndefined(
|
|
1720
|
+
const m = match2[pos];
|
|
1721
|
+
return isUndefined(m) ? fallback : parseInteger(m);
|
|
1719
1722
|
}
|
|
1720
1723
|
function extractISOYmd(match2, cursor) {
|
|
1721
1724
|
const item = {
|
|
@@ -2857,7 +2860,7 @@ function oneOf(strings, startIndex) {
|
|
|
2857
2860
|
}
|
|
2858
2861
|
}
|
|
2859
2862
|
function offset(regex, groups) {
|
|
2860
|
-
return { regex, deser: ([, h2,
|
|
2863
|
+
return { regex, deser: ([, h2, m]) => signedOffset(h2, m), groups };
|
|
2861
2864
|
}
|
|
2862
2865
|
function simple(regex) {
|
|
2863
2866
|
return { regex, deser: ([s2]) => s2 };
|
|
@@ -3037,7 +3040,7 @@ function tokenForPart(part, locale, formatOpts) {
|
|
|
3037
3040
|
return void 0;
|
|
3038
3041
|
}
|
|
3039
3042
|
function buildRegex(units) {
|
|
3040
|
-
const re = units.map((u) => u.regex).reduce((
|
|
3043
|
+
const re = units.map((u) => u.regex).reduce((f2, r) => `${f2}(${r.source})`, "");
|
|
3041
3044
|
return [`^${re}$`, units];
|
|
3042
3045
|
}
|
|
3043
3046
|
function match(input, regex, handlers) {
|
|
@@ -3121,9 +3124,9 @@ function dateTimeFromMatches(matches) {
|
|
|
3121
3124
|
matches.S = parseMillis(matches.u);
|
|
3122
3125
|
}
|
|
3123
3126
|
const vals = Object.keys(matches).reduce((r, k) => {
|
|
3124
|
-
const
|
|
3125
|
-
if (
|
|
3126
|
-
r[
|
|
3127
|
+
const f2 = toField(k);
|
|
3128
|
+
if (f2) {
|
|
3129
|
+
r[f2] = matches[k];
|
|
3127
3130
|
}
|
|
3128
3131
|
return r;
|
|
3129
3132
|
}, {});
|
|
@@ -5982,14 +5985,14 @@ var feather$2 = { exports: {} };
|
|
|
5982
5985
|
var toInteger = __webpack_require__("./node_modules/core-js/internals/to-integer.js");
|
|
5983
5986
|
var requireObjectCoercible = __webpack_require__("./node_modules/core-js/internals/require-object-coercible.js");
|
|
5984
5987
|
module2.exports = function(that, pos, CONVERT_TO_STRING) {
|
|
5985
|
-
var
|
|
5988
|
+
var S2 = String(requireObjectCoercible(that));
|
|
5986
5989
|
var position = toInteger(pos);
|
|
5987
|
-
var size =
|
|
5990
|
+
var size = S2.length;
|
|
5988
5991
|
var first, second;
|
|
5989
5992
|
if (position < 0 || position >= size)
|
|
5990
5993
|
return CONVERT_TO_STRING ? "" : void 0;
|
|
5991
|
-
first =
|
|
5992
|
-
return first < 55296 || first > 56319 || position + 1 === size || (second =
|
|
5994
|
+
first = S2.charCodeAt(position);
|
|
5995
|
+
return first < 55296 || first > 56319 || position + 1 === size || (second = S2.charCodeAt(position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? S2.charAt(position) : first : CONVERT_TO_STRING ? S2.slice(position, position + 2) : (first - 55296 << 10) + (second - 56320) + 65536;
|
|
5993
5996
|
};
|
|
5994
5997
|
},
|
|
5995
5998
|
"./node_modules/core-js/internals/to-absolute-index.js": function(module2, exports2, __webpack_require__) {
|
|
@@ -6030,15 +6033,15 @@ var feather$2 = { exports: {} };
|
|
|
6030
6033
|
},
|
|
6031
6034
|
"./node_modules/core-js/internals/to-primitive.js": function(module2, exports2, __webpack_require__) {
|
|
6032
6035
|
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
|
|
6033
|
-
module2.exports = function(it,
|
|
6036
|
+
module2.exports = function(it, S2) {
|
|
6034
6037
|
if (!isObject(it))
|
|
6035
6038
|
return it;
|
|
6036
6039
|
var fn, val;
|
|
6037
|
-
if (
|
|
6040
|
+
if (S2 && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
|
|
6038
6041
|
return val;
|
|
6039
6042
|
if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it)))
|
|
6040
6043
|
return val;
|
|
6041
|
-
if (!
|
|
6044
|
+
if (!S2 && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
|
|
6042
6045
|
return val;
|
|
6043
6046
|
throw TypeError("Can't convert object to primitive value");
|
|
6044
6047
|
};
|
|
@@ -6649,7 +6652,7 @@ const _sfc_main$e = {
|
|
|
6649
6652
|
return dtDateTwo < dtDateOne;
|
|
6650
6653
|
},
|
|
6651
6654
|
visibleMonths() {
|
|
6652
|
-
const firstMonthArray = this.months.filter((
|
|
6655
|
+
const firstMonthArray = this.months.filter((m, index) => index > 0);
|
|
6653
6656
|
const numberOfMonthsArray = [];
|
|
6654
6657
|
for (let i = 0; i < this.showMonths; i++) {
|
|
6655
6658
|
numberOfMonthsArray.push(i);
|
|
@@ -7564,6 +7567,9 @@ const _sfc_main$b = {
|
|
|
7564
7567
|
},
|
|
7565
7568
|
DOMElement() {
|
|
7566
7569
|
return this.$refs.cpInputContainer.children.namedItem(this.inputIdentifier);
|
|
7570
|
+
},
|
|
7571
|
+
displayErrorMessage() {
|
|
7572
|
+
return this.isInputInvalid && this.errorMessage.length;
|
|
7567
7573
|
}
|
|
7568
7574
|
},
|
|
7569
7575
|
mounted() {
|
|
@@ -7659,7 +7665,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7659
7665
|
], 2),
|
|
7660
7666
|
createVNode(_component_transition_expand, null, {
|
|
7661
7667
|
default: withCtx(() => [
|
|
7662
|
-
$options.
|
|
7668
|
+
$options.displayErrorMessage ? (openBlock(), createBlock(_component_base_input_label, {
|
|
7663
7669
|
key: 0,
|
|
7664
7670
|
"is-invalid": $props.isInvalid,
|
|
7665
7671
|
for: $setup.inputIdentifier,
|
|
@@ -8307,6 +8313,9 @@ const _sfc_main$7 = {
|
|
|
8307
8313
|
inputLabelTitle() {
|
|
8308
8314
|
const requiredLabel = this.required && this.label ? "*" : "";
|
|
8309
8315
|
return `${this.label} ${requiredLabel}`;
|
|
8316
|
+
},
|
|
8317
|
+
displayErrorMessage() {
|
|
8318
|
+
return this.isInvalid && this.errorMessage.length;
|
|
8310
8319
|
}
|
|
8311
8320
|
},
|
|
8312
8321
|
mounted() {
|
|
@@ -8347,7 +8356,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8347
8356
|
}, null, 46, _hoisted_2$7),
|
|
8348
8357
|
createVNode(_component_transition_expand, null, {
|
|
8349
8358
|
default: withCtx(() => [
|
|
8350
|
-
$
|
|
8359
|
+
$options.displayErrorMessage ? (openBlock(), createBlock(_component_base_input_label, {
|
|
8351
8360
|
key: 0,
|
|
8352
8361
|
for: $data.inputReferenceId,
|
|
8353
8362
|
"is-invalid": "",
|
|
@@ -8434,6 +8443,9 @@ const _sfc_main$6 = {
|
|
|
8434
8443
|
"cpSelect--isDisabled": this.disabled,
|
|
8435
8444
|
"cpSelect--isLarge": this.isLarge
|
|
8436
8445
|
};
|
|
8446
|
+
},
|
|
8447
|
+
displayErrorMessage() {
|
|
8448
|
+
return this.isInvalid && this.errorMessage.length;
|
|
8437
8449
|
}
|
|
8438
8450
|
},
|
|
8439
8451
|
mounted() {
|
|
@@ -8488,7 +8500,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8488
8500
|
]),
|
|
8489
8501
|
createVNode(_component_transition_expand, null, {
|
|
8490
8502
|
default: withCtx(() => [
|
|
8491
|
-
$
|
|
8503
|
+
$options.displayErrorMessage ? (openBlock(), createBlock(_component_base_input_label, {
|
|
8492
8504
|
key: 0,
|
|
8493
8505
|
"is-invalid": $props.isInvalid,
|
|
8494
8506
|
for: $data.selectReferenceId,
|
|
@@ -8891,7 +8903,7 @@ function rgbToRgba(rgbValue) {
|
|
|
8891
8903
|
}
|
|
8892
8904
|
function hexToRgba(hexValue) {
|
|
8893
8905
|
var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
8894
|
-
var hex = hexValue.replace(rgx, function(
|
|
8906
|
+
var hex = hexValue.replace(rgx, function(m, r2, g2, b3) {
|
|
8895
8907
|
return r2 + r2 + g2 + g2 + b3 + b3;
|
|
8896
8908
|
});
|
|
8897
8909
|
var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -9019,9 +9031,9 @@ function getElementTransforms(el) {
|
|
|
9019
9031
|
var str = el.style.transform || "";
|
|
9020
9032
|
var reg = /(\w+)\(([^)]*)\)/g;
|
|
9021
9033
|
var transforms = /* @__PURE__ */ new Map();
|
|
9022
|
-
var
|
|
9023
|
-
while (
|
|
9024
|
-
transforms.set(
|
|
9034
|
+
var m;
|
|
9035
|
+
while (m = reg.exec(str)) {
|
|
9036
|
+
transforms.set(m[1], m[2]);
|
|
9025
9037
|
}
|
|
9026
9038
|
return transforms;
|
|
9027
9039
|
}
|