@leaflink/stash 50.13.0 → 50.14.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/CurrencyInput.js +34 -30
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +4 -0
- package/dist/Filters.vue.d.ts +10 -2
- package/dist/InputOptions.js +61 -59
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +22 -2
- package/dist/ListView.vue.d.ts +19 -17
- package/dist/components.css +1 -1
- package/package.json +1 -1
package/dist/CurrencyInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as D, getCurrentInstance as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ref as D, getCurrentInstance as P, version as R, computed as O, watch as S, defineComponent as C, useAttrs as M, createBlock as $, openBlock as A, mergeProps as L, createSlots as T, withCtx as G, createVNode as w } from "vue";
|
|
2
|
+
import k from "lodash-es/isEmpty";
|
|
3
|
+
import B from "./Icon.js";
|
|
4
|
+
import W from "./Input.js";
|
|
5
5
|
/**
|
|
6
6
|
* Vue Currency Input 3.1.0
|
|
7
7
|
* (c) 2018-2024 Matthias Stiller
|
|
@@ -15,13 +15,13 @@ var v;
|
|
|
15
15
|
(function(r) {
|
|
16
16
|
r.precision = "precision", r.thousands = "thousands", r.millions = "millions", r.billions = "billions";
|
|
17
17
|
})(v || (v = {}));
|
|
18
|
-
const x = (r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), I = (r) => r.replace(/^0+(0$|[^0])/, "$1"), V = (r, i) => (r.match(new RegExp(x(i), "g")) || []).length,
|
|
18
|
+
const x = (r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), I = (r) => r.replace(/^0+(0$|[^0])/, "$1"), V = (r, i) => (r.match(new RegExp(x(i), "g")) || []).length, z = (r, i) => r.substring(0, r.indexOf(i)), _ = [
|
|
19
19
|
",",
|
|
20
20
|
".",
|
|
21
21
|
"٫",
|
|
22
22
|
"。"
|
|
23
23
|
], E = "(0|[1-9]\\d*)";
|
|
24
|
-
class
|
|
24
|
+
class j {
|
|
25
25
|
constructor(i) {
|
|
26
26
|
var t, e, n, d, a, l;
|
|
27
27
|
const { currency: m, currencyDisplay: g, locale: o, precision: u, accountingSign: h, useGrouping: c } = i;
|
|
@@ -34,7 +34,7 @@ class z {
|
|
|
34
34
|
};
|
|
35
35
|
const s = new Intl.NumberFormat(o, this.options), f = s.formatToParts(123456);
|
|
36
36
|
this.currency = (t = f.find(({ type: p }) => p === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((p) => p.toLocaleString(o)), this.decimalSymbol = (e = f.find(({ type: p }) => p === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = f.find(({ type: p }) => p === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (d = s.formatToParts(-1).find(({ type: p }) => p === "minusSign")) === null || d === void 0 ? void 0 : d.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof u == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = u : (this.minimumFractionDigits = (a = u == null ? void 0 : u.min) !== null && a !== void 0 ? a : s.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (l = u == null ? void 0 : u.max) !== null && l !== void 0 ? l : s.resolvedOptions().maximumFractionDigits);
|
|
37
|
-
const b = (p) =>
|
|
37
|
+
const b = (p) => z(p, this.digits[1]), F = (p) => p.substring(p.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
|
|
38
38
|
this.prefix = b(s.format(1)), this.suffix = F(s.format(1)), this.negativePrefix = b(s.format(-1)), this.negativeSuffix = F(s.format(-1));
|
|
39
39
|
}
|
|
40
40
|
parse(i) {
|
|
@@ -103,7 +103,7 @@ class N {
|
|
|
103
103
|
this.currencyFormat = i;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class X extends N {
|
|
107
107
|
conformToMask(i, t = "") {
|
|
108
108
|
const e = this.currencyFormat.isNegative(i), n = (s) => s === "" && e && !(this.currencyFormat.minusSign === void 0 ? t === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix : t === this.currencyFormat.negativePrefix), d = (s) => {
|
|
109
109
|
if (n(s))
|
|
@@ -128,7 +128,7 @@ class j extends N {
|
|
|
128
128
|
} : "";
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
class
|
|
131
|
+
class U extends N {
|
|
132
132
|
conformToMask(i, t = "") {
|
|
133
133
|
if (i === "" || this.currencyFormat.parse(t) === 0 && this.currencyFormat.stripCurrency(t, !0).slice(0, -1) === this.currencyFormat.stripCurrency(i, !0))
|
|
134
134
|
return "";
|
|
@@ -139,7 +139,7 @@ class X extends N {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const q = {
|
|
143
143
|
locale: void 0,
|
|
144
144
|
currency: void 0,
|
|
145
145
|
currencyDisplay: void 0,
|
|
@@ -152,7 +152,7 @@ const U = {
|
|
|
152
152
|
useGrouping: void 0,
|
|
153
153
|
valueScaling: void 0
|
|
154
154
|
};
|
|
155
|
-
class
|
|
155
|
+
class Y {
|
|
156
156
|
constructor(i) {
|
|
157
157
|
this.el = i.el, this.onInput = i.onInput, this.onChange = i.onChange, this.addEventListener(), this.init(i.options);
|
|
158
158
|
}
|
|
@@ -168,9 +168,9 @@ class q {
|
|
|
168
168
|
}
|
|
169
169
|
init(i) {
|
|
170
170
|
this.options = {
|
|
171
|
-
...
|
|
171
|
+
...q,
|
|
172
172
|
...i
|
|
173
|
-
}, this.options.autoDecimalDigits && (this.options.hideNegligibleDecimalDigitsOnFocus = !1), this.el.getAttribute("inputmode") || this.el.setAttribute("inputmode", this.options.autoDecimalDigits ? "numeric" : "decimal"), this.currencyFormat = new
|
|
173
|
+
}, this.options.autoDecimalDigits && (this.options.hideNegligibleDecimalDigitsOnFocus = !1), this.el.getAttribute("inputmode") || this.el.setAttribute("inputmode", this.options.autoDecimalDigits ? "numeric" : "decimal"), this.currencyFormat = new j(this.options), this.numberMask = this.options.autoDecimalDigits ? new U(this.currencyFormat) : new X(this.currencyFormat);
|
|
174
174
|
const t = {
|
|
175
175
|
[v.precision]: this.currencyFormat.maximumFractionDigits,
|
|
176
176
|
[v.thousands]: 3,
|
|
@@ -281,20 +281,20 @@ class q {
|
|
|
281
281
|
this.el.setSelectionRange(i, t);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
function
|
|
284
|
+
const Z = (r) => r != null && r.matches("input") ? r : r == null ? void 0 : r.querySelector("input");
|
|
285
|
+
function H(r, i) {
|
|
286
286
|
var t, e, n, d;
|
|
287
287
|
let a;
|
|
288
|
-
const l = D(null), m = D(null), g = D(null), o =
|
|
288
|
+
const l = D(null), m = D(null), g = D(null), o = P();
|
|
289
289
|
o != null && o.emit || ((e = (t = o == null ? void 0 : o.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 || e.bind(o == null ? void 0 : o.proxy));
|
|
290
|
-
const u = (o == null ? void 0 : o.props) || ((n = o == null ? void 0 : o.proxy) === null || n === void 0 ? void 0 : n.$props), h =
|
|
290
|
+
const u = (o == null ? void 0 : o.props) || ((n = o == null ? void 0 : o.proxy) === null || n === void 0 ? void 0 : n.$props), h = R.startsWith("3");
|
|
291
291
|
h && ((d = o == null ? void 0 : o.attrs.modelModifiers) === null || d === void 0 || d.lazy);
|
|
292
292
|
const c = O(() => u == null ? void 0 : u[h ? "modelValue" : "value"]);
|
|
293
293
|
return S(l, (s) => {
|
|
294
294
|
var f;
|
|
295
295
|
if (s) {
|
|
296
|
-
const b =
|
|
297
|
-
b ? (a = new
|
|
296
|
+
const b = Z((f = s == null ? void 0 : s.$el) !== null && f !== void 0 ? f : s);
|
|
297
|
+
b ? (a = new Y({
|
|
298
298
|
el: b,
|
|
299
299
|
options: r,
|
|
300
300
|
onInput: (F) => {
|
|
@@ -313,11 +313,12 @@ function Z(r, i) {
|
|
|
313
313
|
setOptions: (s) => a == null ? void 0 : a.setOptions(s)
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const ti = /* @__PURE__ */ C({
|
|
317
317
|
__name: "CurrencyInput",
|
|
318
318
|
props: {
|
|
319
319
|
inputOptions: { default: void 0 },
|
|
320
320
|
modelValue: { default: "" },
|
|
321
|
+
hidePrepend: { type: Boolean, default: !1 },
|
|
321
322
|
autocomplete: {},
|
|
322
323
|
value: {},
|
|
323
324
|
placeholder: {},
|
|
@@ -348,8 +349,8 @@ const ii = /* @__PURE__ */ C({
|
|
|
348
349
|
accountingSign: !1
|
|
349
350
|
}, n = r, d = t, a = M(), l = O(() => ({
|
|
350
351
|
...e,
|
|
351
|
-
...
|
|
352
|
-
})), { inputRef: m, setOptions: g, setValue: o, numberValue: u } =
|
|
352
|
+
...k(n.inputOptions) ? {} : n.inputOptions
|
|
353
|
+
})), { inputRef: m, setOptions: g, setValue: o, numberValue: u } = H(l.value);
|
|
353
354
|
i({ inputEl: m }), S(
|
|
354
355
|
() => u.value,
|
|
355
356
|
(c) => {
|
|
@@ -373,22 +374,25 @@ const ii = /* @__PURE__ */ C({
|
|
|
373
374
|
const { inputOptions: c, ...s } = n;
|
|
374
375
|
return { ...s, ...a };
|
|
375
376
|
});
|
|
376
|
-
return (c, s) => (A(), $(
|
|
377
|
+
return (c, s) => (A(), $(W, L(h.value, {
|
|
377
378
|
ref_key: "inputEl",
|
|
378
379
|
ref: m,
|
|
379
380
|
class: "stash-currency-input",
|
|
380
381
|
type: "text",
|
|
381
382
|
"data-test": "stash-currency-input",
|
|
382
383
|
inputmode: "decimal"
|
|
383
|
-
}), {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
384
|
+
}), T({ _: 2 }, [
|
|
385
|
+
c.hidePrepend ? void 0 : {
|
|
386
|
+
name: "prepend",
|
|
387
|
+
fn: G(() => [
|
|
388
|
+
w(B, { name: "sign-dollar" })
|
|
389
|
+
]),
|
|
390
|
+
key: "0"
|
|
391
|
+
}
|
|
392
|
+
]), 1040));
|
|
389
393
|
}
|
|
390
394
|
});
|
|
391
395
|
export {
|
|
392
|
-
|
|
396
|
+
ti as default
|
|
393
397
|
};
|
|
394
398
|
//# sourceMappingURL=CurrencyInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyInput.js","sources":["../node_modules/vue-currency-input/dist/index.mjs","../src/components/CurrencyInput/CurrencyInput.vue"],"sourcesContent":["/**\n * Vue Currency Input 3.1.0\n * (c) 2018-2024 Matthias Stiller\n * @license MIT\n */\nimport { ref, getCurrentInstance, version, computed, watch } from 'vue';\n\nvar CurrencyDisplay;\n(function (CurrencyDisplay) {\n CurrencyDisplay[\"symbol\"] = \"symbol\";\n CurrencyDisplay[\"narrowSymbol\"] = \"narrowSymbol\";\n CurrencyDisplay[\"code\"] = \"code\";\n CurrencyDisplay[\"name\"] = \"name\";\n CurrencyDisplay[\"hidden\"] = \"hidden\";\n})(CurrencyDisplay || (CurrencyDisplay = {}));\nvar ValueScaling;\n(function (ValueScaling) {\n ValueScaling[\"precision\"] = \"precision\";\n ValueScaling[\"thousands\"] = \"thousands\";\n ValueScaling[\"millions\"] = \"millions\";\n ValueScaling[\"billions\"] = \"billions\";\n})(ValueScaling || (ValueScaling = {}));\n\nconst escapeRegExp = (str) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\nconst removeLeadingZeros = (str) => {\n return str.replace(/^0+(0$|[^0])/, '$1');\n};\nconst count = (str, search) => {\n return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;\n};\nconst substringBefore = (str, search) => {\n return str.substring(0, str.indexOf(search));\n};\n\nconst DECIMAL_SEPARATORS = [\n ',',\n '.',\n '٫',\n '。'\n];\nconst INTEGER_PATTERN = '(0|[1-9]\\\\d*)';\nclass CurrencyFormat {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f;\n const { currency, currencyDisplay, locale, precision, accountingSign, useGrouping } = options;\n this.locale = locale;\n this.options = {\n currency,\n useGrouping,\n style: 'currency',\n currencySign: accountingSign ? 'accounting' : undefined,\n currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined\n };\n const numberFormat = new Intl.NumberFormat(locale, this.options);\n const formatParts = numberFormat.formatToParts(123456);\n this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;\n this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));\n this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;\n this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;\n this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;\n if (this.decimalSymbol === undefined) {\n this.minimumFractionDigits = this.maximumFractionDigits = 0;\n }\n else if (typeof precision === 'number') {\n this.minimumFractionDigits = this.maximumFractionDigits = precision;\n }\n else {\n this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;\n this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;\n }\n const getPrefix = (str) => {\n return substringBefore(str, this.digits[1]);\n };\n const getSuffix = (str) => {\n return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);\n };\n this.prefix = getPrefix(numberFormat.format(1));\n this.suffix = getSuffix(numberFormat.format(1));\n this.negativePrefix = getPrefix(numberFormat.format(-1));\n this.negativeSuffix = getSuffix(numberFormat.format(-1));\n }\n parse(str) {\n if (str) {\n const negative = this.isNegative(str);\n str = this.normalizeDigits(str);\n str = this.stripCurrency(str, negative);\n str = this.stripSignLiterals(str);\n const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\\\d*))?` : '';\n const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));\n if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {\n return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);\n }\n }\n return null;\n }\n isValidIntegerFormat(formattedNumber, integerNumber) {\n const options = { ...this.options, minimumFractionDigits: 0 };\n return [\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: true })), false),\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: false })), false)\n ].includes(formattedNumber);\n }\n format(value, options = {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: this.maximumFractionDigits\n }) {\n return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';\n }\n toFraction(str) {\n return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substring(1)).substring(0, this.maximumFractionDigits)}`;\n }\n isFractionIncomplete(str) {\n return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));\n }\n isNegative(str) {\n return (str.startsWith(this.negativePrefix) ||\n (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||\n (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));\n }\n insertCurrency(str, negative) {\n return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;\n }\n stripGroupingSeparator(str) {\n return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;\n }\n stripSignLiterals(str) {\n if (this.minusSign !== undefined) {\n return str.replace('-', this.minusSign).replace(this.minusSign, '');\n }\n else {\n return str.replace(/[-()]/g, '');\n }\n }\n stripCurrency(str, negative) {\n return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');\n }\n normalizeDecimalSeparator(str, from) {\n DECIMAL_SEPARATORS.forEach((s) => {\n str = str.substring(0, from) + str.substring(from).replace(s, this.decimalSymbol);\n });\n return str;\n }\n normalizeDigits(str) {\n if (this.digits[0] !== '0') {\n this.digits.forEach((digit, index) => {\n str = str.replace(new RegExp(digit, 'g'), String(index));\n });\n }\n return str;\n }\n onlyDigits(str) {\n return this.normalizeDigits(str).replace(/\\D+/g, '');\n }\n onlyLocaleDigits(str) {\n return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');\n }\n}\n\nclass AbstractInputMask {\n constructor(currencyFormat) {\n this.currencyFormat = currencyFormat;\n }\n}\nclass DefaultInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n const negative = this.currencyFormat.isNegative(str);\n const isEmptyNegativeValue = (str) => str === '' &&\n negative &&\n !(this.currencyFormat.minusSign === undefined\n ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix\n : previousConformedValue === this.currencyFormat.negativePrefix);\n const checkIncompleteValue = (str) => {\n if (isEmptyNegativeValue(str)) {\n return '';\n }\n else if (this.currencyFormat.maximumFractionDigits > 0) {\n if (this.currencyFormat.isFractionIncomplete(str)) {\n return str;\n }\n else if (str.startsWith(this.currencyFormat.decimalSymbol)) {\n return this.currencyFormat.toFraction(str);\n }\n }\n return null;\n };\n let value = str;\n value = this.currencyFormat.stripCurrency(value, negative);\n value = this.currencyFormat.stripSignLiterals(value);\n const incompleteValue = checkIncompleteValue(value);\n if (incompleteValue != null) {\n return this.currencyFormat.insertCurrency(incompleteValue, negative);\n }\n const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);\n const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));\n const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substring(0, this.currencyFormat.maximumFractionDigits);\n const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n const invalidNegativeValue = integerDigits === '' &&\n negative &&\n (this.currencyFormat.minusSign === undefined\n ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix\n : previousConformedValue === str.slice(0, -1));\n if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {\n return previousConformedValue;\n }\n else if (integerDigits.match(/\\d+/)) {\n return {\n numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),\n fractionDigits\n };\n }\n else {\n return '';\n }\n }\n}\nclass AutoDecimalDigitsInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n if (str === '' ||\n (this.currencyFormat.parse(previousConformedValue) === 0 &&\n this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {\n return '';\n }\n const negative = this.currencyFormat.isNegative(str);\n const numberValue = this.currencyFormat.stripSignLiterals(str) === ''\n ? -0\n : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);\n return {\n numberValue,\n fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)\n };\n }\n}\n\nconst DEFAULT_OPTIONS = {\n locale: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n hideGroupingSeparatorOnFocus: true,\n hideCurrencySymbolOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: true,\n precision: undefined,\n autoDecimalDigits: false,\n valueRange: undefined,\n useGrouping: undefined,\n valueScaling: undefined\n};\nclass CurrencyInput {\n constructor(args) {\n this.el = args.el;\n this.onInput = args.onInput;\n this.onChange = args.onChange;\n this.addEventListener();\n this.init(args.options);\n }\n setOptions(options) {\n this.init(options);\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n this.onChange(this.getValue());\n }\n getValue() {\n const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;\n return { number: numberValue, formatted: this.formattedValue };\n }\n setValue(value) {\n const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;\n if (newValue !== this.numberValue) {\n this.format(this.currencyFormat.format(this.validateValueRange(newValue)));\n this.onChange(this.getValue());\n }\n }\n init(options) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n if (this.options.autoDecimalDigits) {\n this.options.hideNegligibleDecimalDigitsOnFocus = false;\n }\n if (!this.el.getAttribute('inputmode')) {\n this.el.setAttribute('inputmode', this.options.autoDecimalDigits ? 'numeric' : 'decimal');\n }\n this.currencyFormat = new CurrencyFormat(this.options);\n this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);\n const valueScalingOptions = {\n [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,\n [ValueScaling.thousands]: 3,\n [ValueScaling.millions]: 6,\n [ValueScaling.billions]: 9\n };\n this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;\n this.valueScalingFractionDigits =\n this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision\n ? this.valueScaling + this.currencyFormat.maximumFractionDigits\n : this.currencyFormat.maximumFractionDigits;\n this.minValue = this.getMinValue();\n this.maxValue = this.getMaxValue();\n }\n getMinValue() {\n var _a, _b;\n let min = this.toFloat(-Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {\n min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));\n }\n return min;\n }\n getMaxValue() {\n var _a, _b;\n let max = this.toFloat(Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {\n max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));\n }\n return max;\n }\n toFloat(value, maxFractionDigits) {\n return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);\n }\n toInteger(value, maxFractionDigits) {\n return Number(value\n .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)\n .split('.')\n .join(''));\n }\n validateValueRange(value) {\n return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;\n }\n format(value, hideNegligibleDecimalDigits = false) {\n if (value != null) {\n if (this.decimalSymbolInsertedAt !== undefined) {\n value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);\n this.decimalSymbolInsertedAt = undefined;\n }\n const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);\n let formattedValue;\n if (typeof conformedValue === 'object') {\n const { numberValue, fractionDigits } = conformedValue;\n let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;\n if (this.focus) {\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(maximumFractionDigits, fractionDigits.length);\n }\n else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {\n minimumFractionDigits = maximumFractionDigits = 0;\n }\n formattedValue =\n this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER\n ? this.formattedValue\n : this.currencyFormat.format(numberValue, {\n useGrouping: this.options.useGrouping !== false && !(this.focus && this.options.hideGroupingSeparatorOnFocus),\n minimumFractionDigits,\n maximumFractionDigits\n });\n }\n else {\n formattedValue = conformedValue;\n }\n if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);\n }\n if (this.minValue >= 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);\n }\n if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {\n formattedValue = formattedValue\n .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')\n .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')\n .replace(this.currencyFormat.prefix, '')\n .replace(this.currencyFormat.suffix, '');\n }\n this.el.value = formattedValue;\n this.numberValue = this.currencyFormat.parse(formattedValue);\n }\n else {\n this.el.value = '';\n this.numberValue = null;\n }\n this.formattedValue = this.el.value;\n this.onInput(this.getValue());\n }\n addEventListener() {\n this.el.addEventListener('input', (e) => {\n const { value, selectionStart } = this.el;\n const inputEvent = e;\n if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {\n this.decimalSymbolInsertedAt = selectionStart - 1;\n }\n this.format(value);\n if (this.focus && selectionStart != null) {\n const getCaretPositionAfterFormat = () => {\n const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;\n let caretPositionFromLeft = value.length - selectionStart;\n const newValueLength = this.formattedValue.length;\n if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {\n return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;\n }\n if (this.formattedValue.substring(selectionStart, 1) === groupingSymbol &&\n count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {\n return newValueLength - caretPositionFromLeft - 1;\n }\n if (newValueLength < caretPositionFromLeft) {\n return selectionStart;\n }\n if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {\n const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;\n if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {\n return this.formattedValue.indexOf(decimalSymbol) + 1;\n }\n else {\n if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {\n if (this.currencyFormat.onlyDigits(value.substring(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n }\n }\n return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden\n ? newValueLength - caretPositionFromLeft\n : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);\n };\n this.setCaretPosition(getCaretPositionAfterFormat());\n }\n });\n this.el.addEventListener('focus', () => {\n this.focus = true;\n this.numberValueOnFocus = this.numberValue;\n setTimeout(() => {\n const { value, selectionStart, selectionEnd } = this.el;\n this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);\n if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {\n this.setCaretPosition(0, this.el.value.length);\n }\n else if (selectionStart != null) {\n const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);\n this.setCaretPosition(caretPositionOnFocus);\n }\n });\n });\n this.el.addEventListener('blur', () => {\n this.focus = false;\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n if (this.numberValueOnFocus !== this.numberValue) {\n this.onChange(this.getValue());\n }\n });\n }\n getCaretPositionOnFocus(value, selectionStart) {\n if (this.numberValue == null) {\n return selectionStart;\n }\n const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;\n const isNegative = this.numberValue < 0;\n const currentPrefix = isNegative ? negativePrefix : prefix;\n const prefixLength = currentPrefix.length;\n if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {\n if (isNegative) {\n if (selectionStart <= 1) {\n return 1;\n }\n else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {\n return this.formattedValue.length - 1;\n }\n }\n }\n else {\n const suffixLength = isNegative ? negativeSuffix.length : suffix.length;\n if (selectionStart >= value.length - suffixLength) {\n return this.formattedValue.length - suffixLength;\n }\n else if (selectionStart < prefixLength) {\n return prefixLength;\n }\n }\n let result = selectionStart;\n if (this.options.hideCurrencySymbolOnFocus &&\n this.options.currencyDisplay !== CurrencyDisplay.hidden &&\n selectionStart >= prefixLength &&\n currency !== undefined &&\n currentPrefix.includes(currency)) {\n result -= prefixLength;\n if (isNegative) {\n result += 1;\n }\n }\n if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {\n result -= count(value.substring(0, selectionStart), groupingSymbol);\n }\n return result;\n }\n setCaretPosition(start, end = start) {\n this.el.setSelectionRange(start, end);\n }\n}\n\nconst findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));\nfunction useCurrencyInput(options, autoEmit) {\n var _a, _b, _c, _d;\n let currencyInput;\n const inputRef = ref(null);\n const formattedValue = ref(null);\n const numberValue = ref(null);\n const vm = getCurrentInstance();\n const emit = (vm === null || vm === void 0 ? void 0 : vm.emit) || ((_b = (_a = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _a === void 0 ? void 0 : _a.$emit) === null || _b === void 0 ? void 0 : _b.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n const props = ((vm === null || vm === void 0 ? void 0 : vm.props) || ((_c = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _c === void 0 ? void 0 : _c.$props));\n const isVue3 = version.startsWith('3');\n const lazyModel = isVue3 && ((_d = vm === null || vm === void 0 ? void 0 : vm.attrs.modelModifiers) === null || _d === void 0 ? void 0 : _d.lazy);\n const modelValue = computed(() => props === null || props === void 0 ? void 0 : props[isVue3 ? 'modelValue' : 'value']);\n const inputEvent = isVue3 ? 'update:modelValue' : 'input';\n const changeEvent = lazyModel ? 'update:modelValue' : 'change';\n watch(inputRef, (value) => {\n var _a;\n if (value) {\n const el = findInput((_a = value === null || value === void 0 ? void 0 : value.$el) !== null && _a !== void 0 ? _a : value);\n if (el) {\n currencyInput = new CurrencyInput({\n el,\n options,\n onInput: (value) => {\n if (!lazyModel && autoEmit !== false && modelValue.value !== value.number) {\n emit === null || emit === void 0 ? void 0 : emit(inputEvent, value.number);\n }\n numberValue.value = value.number;\n formattedValue.value = value.formatted;\n },\n onChange: (value) => {\n if (autoEmit !== false) {\n emit === null || emit === void 0 ? void 0 : emit(changeEvent, value.number);\n }\n }\n });\n currencyInput.setValue(modelValue.value);\n }\n else {\n console.error('No input element found. Please make sure that the \"inputRef\" template ref is properly assigned.');\n }\n }\n else {\n currencyInput = null;\n }\n });\n return {\n inputRef,\n numberValue,\n formattedValue,\n setValue: (value) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setValue(value),\n setOptions: (options) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setOptions(options)\n };\n}\n\nexport { CurrencyDisplay, ValueScaling, useCurrencyInput };\n","<script lang=\"ts\" setup>\n import isEmpty from 'lodash-es/isEmpty';\n import { computed, useAttrs, watch } from 'vue';\n import { CurrencyDisplay, CurrencyInputOptions, useCurrencyInput } from 'vue-currency-input';\n\n import Icon from '../Icon/Icon.vue';\n import Input, { InputProps } from '../Input/Input.vue';\n\n const CURRENCY_INPUT_BASE_OPTIONS: CurrencyInputOptions = {\n currency: 'USD',\n currencyDisplay: CurrencyDisplay.hidden,\n precision: 2,\n hideCurrencySymbolOnFocus: true,\n hideGroupingSeparatorOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: false,\n autoDecimalDigits: true,\n useGrouping: true,\n accountingSign: false,\n };\n\n export interface CurrencyInputProps extends Omit<InputProps, 'modelValue' | 'type'> {\n inputOptions?: Partial<CurrencyInputOptions>;\n modelValue: string | null;\n }\n\n const props = withDefaults(defineProps<CurrencyInputProps>(), {\n // Todo: this default should be removed if its a required prop...\n modelValue: '',\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n id: undefined,\n inputOptions: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes.\n */\n (e: 'update:model-value', v: CurrencyInputProps['modelValue']): void;\n }>();\n\n const attrs = useAttrs();\n\n const currencyInputOptions = computed(() => {\n return {\n ...CURRENCY_INPUT_BASE_OPTIONS,\n ...(!isEmpty(props.inputOptions) ? props.inputOptions : {}),\n };\n });\n\n const { inputRef: inputEl, setOptions, setValue, numberValue } = useCurrencyInput(currencyInputOptions.value, false);\n\n defineExpose({ inputEl });\n\n watch(\n () => numberValue.value,\n (newValue: number | null | string) => {\n let stringValue: string | null;\n\n if (Object.is(newValue, -0)) {\n if (typeof currencyInputOptions.value.precision === 'number') {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision);\n } else {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision?.min || 0);\n }\n } else {\n stringValue = typeof newValue === 'number' ? newValue.toFixed(2) : newValue;\n }\n\n emit('update:model-value', stringValue);\n },\n );\n\n watch(\n () => props.modelValue,\n (newValue: number | null | string) => {\n let numberValue: number | null;\n\n if (typeof newValue === 'string') {\n numberValue = parseFloat(newValue || '0');\n } else {\n numberValue = newValue;\n }\n\n setValue(numberValue);\n },\n );\n\n watch(\n () => props.inputOptions,\n () => {\n setOptions(currencyInputOptions.value);\n },\n );\n\n const inputAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { inputOptions: _, ...propsWithoutCurrencyInputOptions } = props;\n\n return { ...propsWithoutCurrencyInputOptions, ...attrs } as typeof attrs & InputProps;\n });\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n ref=\"inputEl\"\n class=\"stash-currency-input\"\n type=\"text\"\n data-test=\"stash-currency-input\"\n inputmode=\"decimal\"\n >\n <template #prepend>\n <Icon name=\"sign-dollar\" />\n </template>\n </Input>\n</template>\n"],"names":["CurrencyDisplay","ValueScaling","escapeRegExp","str","removeLeadingZeros","count","search","substringBefore","DECIMAL_SEPARATORS","INTEGER_PATTERN","CurrencyFormat","options","_a","_b","_c","_d","_e","_f","currency","currencyDisplay","locale","precision","accountingSign","useGrouping","numberFormat","formatParts","type","i","getPrefix","getSuffix","negative","fraction","match","formattedNumber","integerNumber","value","from","s","digit","index","AbstractInputMask","currencyFormat","DefaultInputMask","previousConformedValue","isEmptyNegativeValue","checkIncompleteValue","incompleteValue","integer","integerDigits","fractionDigits","invalidFraction","invalidNegativeValue","AutoDecimalDigitsInputMask","numberValue","DEFAULT_OPTIONS","CurrencyInput","args","newValue","valueScalingOptions","min","max","maxFractionDigits","hideNegligibleDecimalDigits","conformedValue","formattedValue","maximumFractionDigits","minimumFractionDigits","e","selectionStart","inputEvent","getCaretPositionAfterFormat","prefix","suffix","decimalSymbol","groupingSymbol","caretPositionFromLeft","newValueLength","decimalSymbolPosition","selectionEnd","caretPositionOnFocus","negativePrefix","negativeSuffix","isNegative","currentPrefix","prefixLength","suffixLength","result","start","end","findInput","el","useCurrencyInput","autoEmit","currencyInput","inputRef","ref","vm","getCurrentInstance","props","isVue3","version","modelValue","computed","watch","CURRENCY_INPUT_BASE_OPTIONS","__props","emit","__emit","attrs","useAttrs","currencyInputOptions","isEmpty","inputEl","setOptions","setValue","__expose","stringValue","inputAttrs","_","propsWithoutCurrencyInputOptions"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAIA;AAAA,CACH,SAAUA,GAAiB;AACxB,EAAAA,EAAgB,SAAY,UAC5BA,EAAgB,eAAkB,gBAClCA,EAAgB,OAAU,QAC1BA,EAAgB,OAAU,QAC1BA,EAAgB,SAAY;AAChC,GAAGA,MAAoBA,IAAkB,CAAA,EAAG;AAC5C,IAAIC;AAAA,CACH,SAAUA,GAAc;AACrB,EAAAA,EAAa,YAAe,aAC5BA,EAAa,YAAe,aAC5BA,EAAa,WAAc,YAC3BA,EAAa,W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AAO,IAAaf,EAAS,MAAM;AAEhC,YAAM,EAAE,cAAcgB,GAAG,GAAGC,EAAqC,IAAArB;AAEjE,aAAO,EAAE,GAAGqB,GAAkC,GAAGX,EAAM;AAAA,IAAA,CACxD;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"CurrencyInput.js","sources":["../node_modules/vue-currency-input/dist/index.mjs","../src/components/CurrencyInput/CurrencyInput.vue"],"sourcesContent":["/**\n * Vue Currency Input 3.1.0\n * (c) 2018-2024 Matthias Stiller\n * @license MIT\n */\nimport { ref, getCurrentInstance, version, computed, watch } from 'vue';\n\nvar CurrencyDisplay;\n(function (CurrencyDisplay) {\n CurrencyDisplay[\"symbol\"] = \"symbol\";\n CurrencyDisplay[\"narrowSymbol\"] = \"narrowSymbol\";\n CurrencyDisplay[\"code\"] = \"code\";\n CurrencyDisplay[\"name\"] = \"name\";\n CurrencyDisplay[\"hidden\"] = \"hidden\";\n})(CurrencyDisplay || (CurrencyDisplay = {}));\nvar ValueScaling;\n(function (ValueScaling) {\n ValueScaling[\"precision\"] = \"precision\";\n ValueScaling[\"thousands\"] = \"thousands\";\n ValueScaling[\"millions\"] = \"millions\";\n ValueScaling[\"billions\"] = \"billions\";\n})(ValueScaling || (ValueScaling = {}));\n\nconst escapeRegExp = (str) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\nconst removeLeadingZeros = (str) => {\n return str.replace(/^0+(0$|[^0])/, '$1');\n};\nconst count = (str, search) => {\n return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;\n};\nconst substringBefore = (str, search) => {\n return str.substring(0, str.indexOf(search));\n};\n\nconst DECIMAL_SEPARATORS = [\n ',',\n '.',\n '٫',\n '。'\n];\nconst INTEGER_PATTERN = '(0|[1-9]\\\\d*)';\nclass CurrencyFormat {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f;\n const { currency, currencyDisplay, locale, precision, accountingSign, useGrouping } = options;\n this.locale = locale;\n this.options = {\n currency,\n useGrouping,\n style: 'currency',\n currencySign: accountingSign ? 'accounting' : undefined,\n currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined\n };\n const numberFormat = new Intl.NumberFormat(locale, this.options);\n const formatParts = numberFormat.formatToParts(123456);\n this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;\n this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));\n this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;\n this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;\n this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;\n if (this.decimalSymbol === undefined) {\n this.minimumFractionDigits = this.maximumFractionDigits = 0;\n }\n else if (typeof precision === 'number') {\n this.minimumFractionDigits = this.maximumFractionDigits = precision;\n }\n else {\n this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;\n this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;\n }\n const getPrefix = (str) => {\n return substringBefore(str, this.digits[1]);\n };\n const getSuffix = (str) => {\n return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);\n };\n this.prefix = getPrefix(numberFormat.format(1));\n this.suffix = getSuffix(numberFormat.format(1));\n this.negativePrefix = getPrefix(numberFormat.format(-1));\n this.negativeSuffix = getSuffix(numberFormat.format(-1));\n }\n parse(str) {\n if (str) {\n const negative = this.isNegative(str);\n str = this.normalizeDigits(str);\n str = this.stripCurrency(str, negative);\n str = this.stripSignLiterals(str);\n const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\\\d*))?` : '';\n const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));\n if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {\n return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);\n }\n }\n return null;\n }\n isValidIntegerFormat(formattedNumber, integerNumber) {\n const options = { ...this.options, minimumFractionDigits: 0 };\n return [\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: true })), false),\n this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, { ...options, useGrouping: false })), false)\n ].includes(formattedNumber);\n }\n format(value, options = {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: this.maximumFractionDigits\n }) {\n return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';\n }\n toFraction(str) {\n return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substring(1)).substring(0, this.maximumFractionDigits)}`;\n }\n isFractionIncomplete(str) {\n return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));\n }\n isNegative(str) {\n return (str.startsWith(this.negativePrefix) ||\n (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||\n (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));\n }\n insertCurrency(str, negative) {\n return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;\n }\n stripGroupingSeparator(str) {\n return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;\n }\n stripSignLiterals(str) {\n if (this.minusSign !== undefined) {\n return str.replace('-', this.minusSign).replace(this.minusSign, '');\n }\n else {\n return str.replace(/[-()]/g, '');\n }\n }\n stripCurrency(str, negative) {\n return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');\n }\n normalizeDecimalSeparator(str, from) {\n DECIMAL_SEPARATORS.forEach((s) => {\n str = str.substring(0, from) + str.substring(from).replace(s, this.decimalSymbol);\n });\n return str;\n }\n normalizeDigits(str) {\n if (this.digits[0] !== '0') {\n this.digits.forEach((digit, index) => {\n str = str.replace(new RegExp(digit, 'g'), String(index));\n });\n }\n return str;\n }\n onlyDigits(str) {\n return this.normalizeDigits(str).replace(/\\D+/g, '');\n }\n onlyLocaleDigits(str) {\n return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');\n }\n}\n\nclass AbstractInputMask {\n constructor(currencyFormat) {\n this.currencyFormat = currencyFormat;\n }\n}\nclass DefaultInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n const negative = this.currencyFormat.isNegative(str);\n const isEmptyNegativeValue = (str) => str === '' &&\n negative &&\n !(this.currencyFormat.minusSign === undefined\n ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix\n : previousConformedValue === this.currencyFormat.negativePrefix);\n const checkIncompleteValue = (str) => {\n if (isEmptyNegativeValue(str)) {\n return '';\n }\n else if (this.currencyFormat.maximumFractionDigits > 0) {\n if (this.currencyFormat.isFractionIncomplete(str)) {\n return str;\n }\n else if (str.startsWith(this.currencyFormat.decimalSymbol)) {\n return this.currencyFormat.toFraction(str);\n }\n }\n return null;\n };\n let value = str;\n value = this.currencyFormat.stripCurrency(value, negative);\n value = this.currencyFormat.stripSignLiterals(value);\n const incompleteValue = checkIncompleteValue(value);\n if (incompleteValue != null) {\n return this.currencyFormat.insertCurrency(incompleteValue, negative);\n }\n const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);\n const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));\n const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substring(0, this.currencyFormat.maximumFractionDigits);\n const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;\n const invalidNegativeValue = integerDigits === '' &&\n negative &&\n (this.currencyFormat.minusSign === undefined\n ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix\n : previousConformedValue === str.slice(0, -1));\n if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {\n return previousConformedValue;\n }\n else if (integerDigits.match(/\\d+/)) {\n return {\n numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),\n fractionDigits\n };\n }\n else {\n return '';\n }\n }\n}\nclass AutoDecimalDigitsInputMask extends AbstractInputMask {\n conformToMask(str, previousConformedValue = '') {\n if (str === '' ||\n (this.currencyFormat.parse(previousConformedValue) === 0 &&\n this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {\n return '';\n }\n const negative = this.currencyFormat.isNegative(str);\n const numberValue = this.currencyFormat.stripSignLiterals(str) === ''\n ? -0\n : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);\n return {\n numberValue,\n fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)\n };\n }\n}\n\nconst DEFAULT_OPTIONS = {\n locale: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n hideGroupingSeparatorOnFocus: true,\n hideCurrencySymbolOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: true,\n precision: undefined,\n autoDecimalDigits: false,\n valueRange: undefined,\n useGrouping: undefined,\n valueScaling: undefined\n};\nclass CurrencyInput {\n constructor(args) {\n this.el = args.el;\n this.onInput = args.onInput;\n this.onChange = args.onChange;\n this.addEventListener();\n this.init(args.options);\n }\n setOptions(options) {\n this.init(options);\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n this.onChange(this.getValue());\n }\n getValue() {\n const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;\n return { number: numberValue, formatted: this.formattedValue };\n }\n setValue(value) {\n const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;\n if (newValue !== this.numberValue) {\n this.format(this.currencyFormat.format(this.validateValueRange(newValue)));\n this.onChange(this.getValue());\n }\n }\n init(options) {\n this.options = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n if (this.options.autoDecimalDigits) {\n this.options.hideNegligibleDecimalDigitsOnFocus = false;\n }\n if (!this.el.getAttribute('inputmode')) {\n this.el.setAttribute('inputmode', this.options.autoDecimalDigits ? 'numeric' : 'decimal');\n }\n this.currencyFormat = new CurrencyFormat(this.options);\n this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);\n const valueScalingOptions = {\n [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,\n [ValueScaling.thousands]: 3,\n [ValueScaling.millions]: 6,\n [ValueScaling.billions]: 9\n };\n this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;\n this.valueScalingFractionDigits =\n this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision\n ? this.valueScaling + this.currencyFormat.maximumFractionDigits\n : this.currencyFormat.maximumFractionDigits;\n this.minValue = this.getMinValue();\n this.maxValue = this.getMaxValue();\n }\n getMinValue() {\n var _a, _b;\n let min = this.toFloat(-Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {\n min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));\n }\n return min;\n }\n getMaxValue() {\n var _a, _b;\n let max = this.toFloat(Number.MAX_SAFE_INTEGER);\n if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {\n max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));\n }\n return max;\n }\n toFloat(value, maxFractionDigits) {\n return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);\n }\n toInteger(value, maxFractionDigits) {\n return Number(value\n .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)\n .split('.')\n .join(''));\n }\n validateValueRange(value) {\n return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;\n }\n format(value, hideNegligibleDecimalDigits = false) {\n if (value != null) {\n if (this.decimalSymbolInsertedAt !== undefined) {\n value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);\n this.decimalSymbolInsertedAt = undefined;\n }\n const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);\n let formattedValue;\n if (typeof conformedValue === 'object') {\n const { numberValue, fractionDigits } = conformedValue;\n let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;\n if (this.focus) {\n minimumFractionDigits = hideNegligibleDecimalDigits\n ? fractionDigits.replace(/0+$/, '').length\n : Math.min(maximumFractionDigits, fractionDigits.length);\n }\n else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {\n minimumFractionDigits = maximumFractionDigits = 0;\n }\n formattedValue =\n this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER\n ? this.formattedValue\n : this.currencyFormat.format(numberValue, {\n useGrouping: this.options.useGrouping !== false && !(this.focus && this.options.hideGroupingSeparatorOnFocus),\n minimumFractionDigits,\n maximumFractionDigits\n });\n }\n else {\n formattedValue = conformedValue;\n }\n if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);\n }\n if (this.minValue >= 0) {\n formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);\n }\n if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {\n formattedValue = formattedValue\n .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')\n .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')\n .replace(this.currencyFormat.prefix, '')\n .replace(this.currencyFormat.suffix, '');\n }\n this.el.value = formattedValue;\n this.numberValue = this.currencyFormat.parse(formattedValue);\n }\n else {\n this.el.value = '';\n this.numberValue = null;\n }\n this.formattedValue = this.el.value;\n this.onInput(this.getValue());\n }\n addEventListener() {\n this.el.addEventListener('input', (e) => {\n const { value, selectionStart } = this.el;\n const inputEvent = e;\n if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {\n this.decimalSymbolInsertedAt = selectionStart - 1;\n }\n this.format(value);\n if (this.focus && selectionStart != null) {\n const getCaretPositionAfterFormat = () => {\n const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;\n let caretPositionFromLeft = value.length - selectionStart;\n const newValueLength = this.formattedValue.length;\n if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {\n return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;\n }\n if (this.formattedValue.substring(selectionStart, 1) === groupingSymbol &&\n count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {\n return newValueLength - caretPositionFromLeft - 1;\n }\n if (newValueLength < caretPositionFromLeft) {\n return selectionStart;\n }\n if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {\n const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;\n if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {\n return this.formattedValue.indexOf(decimalSymbol) + 1;\n }\n else {\n if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {\n if (this.currencyFormat.onlyDigits(value.substring(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {\n caretPositionFromLeft -= 1;\n }\n }\n }\n }\n return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden\n ? newValueLength - caretPositionFromLeft\n : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);\n };\n this.setCaretPosition(getCaretPositionAfterFormat());\n }\n });\n this.el.addEventListener('focus', () => {\n this.focus = true;\n this.numberValueOnFocus = this.numberValue;\n setTimeout(() => {\n const { value, selectionStart, selectionEnd } = this.el;\n this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);\n if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {\n this.setCaretPosition(0, this.el.value.length);\n }\n else if (selectionStart != null) {\n const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);\n this.setCaretPosition(caretPositionOnFocus);\n }\n });\n });\n this.el.addEventListener('blur', () => {\n this.focus = false;\n this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue)));\n if (this.numberValueOnFocus !== this.numberValue) {\n this.onChange(this.getValue());\n }\n });\n }\n getCaretPositionOnFocus(value, selectionStart) {\n if (this.numberValue == null) {\n return selectionStart;\n }\n const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;\n const isNegative = this.numberValue < 0;\n const currentPrefix = isNegative ? negativePrefix : prefix;\n const prefixLength = currentPrefix.length;\n if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {\n if (isNegative) {\n if (selectionStart <= 1) {\n return 1;\n }\n else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {\n return this.formattedValue.length - 1;\n }\n }\n }\n else {\n const suffixLength = isNegative ? negativeSuffix.length : suffix.length;\n if (selectionStart >= value.length - suffixLength) {\n return this.formattedValue.length - suffixLength;\n }\n else if (selectionStart < prefixLength) {\n return prefixLength;\n }\n }\n let result = selectionStart;\n if (this.options.hideCurrencySymbolOnFocus &&\n this.options.currencyDisplay !== CurrencyDisplay.hidden &&\n selectionStart >= prefixLength &&\n currency !== undefined &&\n currentPrefix.includes(currency)) {\n result -= prefixLength;\n if (isNegative) {\n result += 1;\n }\n }\n if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {\n result -= count(value.substring(0, selectionStart), groupingSymbol);\n }\n return result;\n }\n setCaretPosition(start, end = start) {\n this.el.setSelectionRange(start, end);\n }\n}\n\nconst findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));\nfunction useCurrencyInput(options, autoEmit) {\n var _a, _b, _c, _d;\n let currencyInput;\n const inputRef = ref(null);\n const formattedValue = ref(null);\n const numberValue = ref(null);\n const vm = getCurrentInstance();\n const emit = (vm === null || vm === void 0 ? void 0 : vm.emit) || ((_b = (_a = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _a === void 0 ? void 0 : _a.$emit) === null || _b === void 0 ? void 0 : _b.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n const props = ((vm === null || vm === void 0 ? void 0 : vm.props) || ((_c = vm === null || vm === void 0 ? void 0 : vm.proxy) === null || _c === void 0 ? void 0 : _c.$props));\n const isVue3 = version.startsWith('3');\n const lazyModel = isVue3 && ((_d = vm === null || vm === void 0 ? void 0 : vm.attrs.modelModifiers) === null || _d === void 0 ? void 0 : _d.lazy);\n const modelValue = computed(() => props === null || props === void 0 ? void 0 : props[isVue3 ? 'modelValue' : 'value']);\n const inputEvent = isVue3 ? 'update:modelValue' : 'input';\n const changeEvent = lazyModel ? 'update:modelValue' : 'change';\n watch(inputRef, (value) => {\n var _a;\n if (value) {\n const el = findInput((_a = value === null || value === void 0 ? void 0 : value.$el) !== null && _a !== void 0 ? _a : value);\n if (el) {\n currencyInput = new CurrencyInput({\n el,\n options,\n onInput: (value) => {\n if (!lazyModel && autoEmit !== false && modelValue.value !== value.number) {\n emit === null || emit === void 0 ? void 0 : emit(inputEvent, value.number);\n }\n numberValue.value = value.number;\n formattedValue.value = value.formatted;\n },\n onChange: (value) => {\n if (autoEmit !== false) {\n emit === null || emit === void 0 ? void 0 : emit(changeEvent, value.number);\n }\n }\n });\n currencyInput.setValue(modelValue.value);\n }\n else {\n console.error('No input element found. Please make sure that the \"inputRef\" template ref is properly assigned.');\n }\n }\n else {\n currencyInput = null;\n }\n });\n return {\n inputRef,\n numberValue,\n formattedValue,\n setValue: (value) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setValue(value),\n setOptions: (options) => currencyInput === null || currencyInput === void 0 ? void 0 : currencyInput.setOptions(options)\n };\n}\n\nexport { CurrencyDisplay, ValueScaling, useCurrencyInput };\n","<script lang=\"ts\" setup>\n import isEmpty from 'lodash-es/isEmpty';\n import { computed, useAttrs, watch } from 'vue';\n import { CurrencyDisplay, CurrencyInputOptions, useCurrencyInput } from 'vue-currency-input';\n\n import Icon from '../Icon/Icon.vue';\n import Input, { InputProps } from '../Input/Input.vue';\n\n const CURRENCY_INPUT_BASE_OPTIONS: CurrencyInputOptions = {\n currency: 'USD',\n currencyDisplay: CurrencyDisplay.hidden,\n precision: 2,\n hideCurrencySymbolOnFocus: true,\n hideGroupingSeparatorOnFocus: true,\n hideNegligibleDecimalDigitsOnFocus: false,\n autoDecimalDigits: true,\n useGrouping: true,\n accountingSign: false,\n };\n\n export interface CurrencyInputProps extends Omit<InputProps, 'modelValue' | 'type'> {\n inputOptions?: Partial<CurrencyInputOptions>;\n modelValue: string | null;\n hidePrepend?: boolean;\n }\n\n const props = withDefaults(defineProps<CurrencyInputProps>(), {\n // Todo: this default should be removed if its a required prop...\n modelValue: '',\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n id: undefined,\n inputOptions: undefined,\n hidePrepend: false,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes.\n */\n (e: 'update:model-value', v: CurrencyInputProps['modelValue']): void;\n }>();\n\n const attrs = useAttrs();\n\n const currencyInputOptions = computed(() => {\n return {\n ...CURRENCY_INPUT_BASE_OPTIONS,\n ...(!isEmpty(props.inputOptions) ? props.inputOptions : {}),\n };\n });\n\n const { inputRef: inputEl, setOptions, setValue, numberValue } = useCurrencyInput(currencyInputOptions.value, false);\n\n defineExpose({ inputEl });\n\n watch(\n () => numberValue.value,\n (newValue: number | null | string) => {\n let stringValue: string | null;\n\n if (Object.is(newValue, -0)) {\n if (typeof currencyInputOptions.value.precision === 'number') {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision);\n } else {\n stringValue = '-0.' + '0'.repeat(currencyInputOptions.value.precision?.min || 0);\n }\n } else {\n stringValue = typeof newValue === 'number' ? newValue.toFixed(2) : newValue;\n }\n\n emit('update:model-value', stringValue);\n },\n );\n\n watch(\n () => props.modelValue,\n (newValue: number | null | string) => {\n let numberValue: number | null;\n\n if (typeof newValue === 'string') {\n numberValue = parseFloat(newValue || '0');\n } else {\n numberValue = newValue;\n }\n\n setValue(numberValue);\n },\n );\n\n watch(\n () => props.inputOptions,\n () => {\n setOptions(currencyInputOptions.value);\n },\n );\n\n const inputAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { inputOptions: _, ...propsWithoutCurrencyInputOptions } = props;\n\n return { ...propsWithoutCurrencyInputOptions, ...attrs } as typeof attrs & InputProps;\n });\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n ref=\"inputEl\"\n class=\"stash-currency-input\"\n type=\"text\"\n data-test=\"stash-currency-input\"\n inputmode=\"decimal\"\n >\n <template v-if=\"!hidePrepend\" #prepend>\n <Icon name=\"sign-dollar\" />\n </template>\n </Input>\n</template>\n"],"names":["CurrencyDisplay","ValueScaling","escapeRegExp","str","removeLeadingZeros","count","search","substringBefore","DECIMAL_SEPARATORS","INTEGER_PATTERN","CurrencyFormat","options","_a","_b","_c","_d","_e","_f","currency","currencyDisplay","locale","precision","accountingSign","useGrouping","numberFormat","formatParts","type","i","getPrefix","getSuffix","negative","fraction","match","formattedNumber","integerNumber","value","from","s","digit","index","AbstractInputMask","currencyFormat","DefaultInputMask","previousConformedValue","isEmptyNegativeValue","checkIncompleteValue","incompleteValue","integer","integerDigits","fractionDigits","invalidFraction","invalidNegativeValue","AutoDecimalDigitsInputMask","numberValue","DEFAULT_OPTIONS","CurrencyInput","args","newValue","valueScalingOptions","min","max","maxFractionDigits","hideNegligibleDecimalDigits","conformedValue","formattedValue","maximumFractionDigits","minimumFractionDigits","e","selectionStart","inputEvent","getCaretPositionAfterFormat","prefix","suffix","decimalSymbol","groupingSymbol","caretPositionFromLeft","newValueLength","decimalSymbolPosition","selectionEnd","caretPositionOnFocus","negativePrefix","negativeSuffix","isNegative","currentPrefix","prefixLength","suffixLength","result","start","end","findInput","el","useCurrencyInput","autoEmit","currencyInput","inputRef","ref","vm","getCurrentInstance","props","isVue3","version","modelValue","computed","watch","CURRENCY_INPUT_BASE_OPTIONS","__props","emit","__emit","attrs","useAttrs","currencyInputOptions","isEmpty","inputEl","setOptions","setValue","__expose","stringValue","inputAttrs","_","propsWithoutCurrencyInputOptions"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAIA;AAAA,CACH,SAAUA,GAAiB;AACxB,EAAAA,EAAgB,SAAY,UAC5BA,EAAgB,eAAkB,gBAClCA,EAAgB,OAAU,QAC1BA,EAAgB,OAAU,QAC1BA,EAAgB,SAAY;AAChC,GAAGA,MAAoBA,IAAkB,CAAA,EAAG;AAC5C,IAAIC;AAAA,CACH,SAAUA,GAAc;AACrB,EAAAA,EAAa,YAAe,aAC5BA,EAAa,YAAe,aAC5BA,EAAa,WAAc,YAC3BA,EAAa,WAAc;AAC/B,GAAGA,MAAiBA,IAAe,CAAA,EAAG;AAEtC,MAAMC,IAAe,CAACC,MACXA,EAAI,QAAQ,uBAAuB,MAA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AGqB,GAAkC,GAAGX,EAAM;AAAA,IAAA,CACxD;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -31,6 +31,7 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
31
31
|
export declare interface CurrencyInputProps extends Omit<InputProps, 'modelValue' | 'type'> {
|
|
32
32
|
inputOptions?: Partial<CurrencyInputOptions>;
|
|
33
33
|
modelValue: string | null;
|
|
34
|
+
hidePrepend?: boolean;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CurrencyInputProps>, {
|
|
@@ -40,6 +41,7 @@ hintText: undefined;
|
|
|
40
41
|
label: undefined;
|
|
41
42
|
id: undefined;
|
|
42
43
|
inputOptions: undefined;
|
|
44
|
+
hidePrepend: boolean;
|
|
43
45
|
}>>, {
|
|
44
46
|
inputEl: Ref<any, any>;
|
|
45
47
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -51,6 +53,7 @@ hintText: undefined;
|
|
|
51
53
|
label: undefined;
|
|
52
54
|
id: undefined;
|
|
53
55
|
inputOptions: undefined;
|
|
56
|
+
hidePrepend: boolean;
|
|
54
57
|
}>>> & Readonly<{
|
|
55
58
|
"onUpdate:model-value"?: ((v: string | null) => any) | undefined;
|
|
56
59
|
}>, {
|
|
@@ -60,6 +63,7 @@ errorText: string;
|
|
|
60
63
|
hintText: string;
|
|
61
64
|
modelValue: string | null;
|
|
62
65
|
inputOptions: Partial<CurrencyInputOptions>;
|
|
66
|
+
hidePrepend: boolean;
|
|
63
67
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
64
68
|
export default _default;
|
|
65
69
|
|
package/dist/Filters.vue.d.ts
CHANGED
|
@@ -1049,8 +1049,16 @@ option?: any;
|
|
|
1049
1049
|
};
|
|
1050
1050
|
noTruncate: boolean;
|
|
1051
1051
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1052
|
-
$slots: {
|
|
1053
|
-
|
|
1052
|
+
$slots: Readonly<{
|
|
1053
|
+
default: (props: {
|
|
1054
|
+
fieldId: string;
|
|
1055
|
+
}) => void;
|
|
1056
|
+
hint: () => void;
|
|
1057
|
+
}> & {
|
|
1058
|
+
default: (props: {
|
|
1059
|
+
fieldId: string;
|
|
1060
|
+
}) => void;
|
|
1061
|
+
hint: () => void;
|
|
1054
1062
|
};
|
|
1055
1063
|
});
|
|
1056
1064
|
'll-radio': DefineComponent<ExtractPropTypes< {
|