q2-tecton-elements 1.13.0-alpha.0 → 1.13.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/cjs/click-elsewhere.cjs.entry.js +5 -7
- package/dist/cjs/{icons-4595ee47.js → icons-08ffe5c9.js} +394 -384
- package/dist/cjs/{index-c2e53804.js → index-7febb200.js} +112 -65
- package/dist/cjs/{index-a55d3c34.js → index-dd823ee6.js} +27 -14
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge.cjs.entry.js +43 -0
- package/dist/cjs/q2-btn_2.cjs.entry.js +13 -13
- package/dist/cjs/q2-calendar.cjs.entry.js +54 -59
- package/dist/cjs/q2-card.cjs.entry.js +127 -0
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +5 -5
- package/dist/cjs/q2-carousel.cjs.entry.js +318 -106
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js +19 -11
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +7 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js +8 -17
- package/dist/cjs/q2-editable-field.cjs.entry.js +5 -8
- package/dist/cjs/q2-icon.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js +439 -437
- package/dist/cjs/q2-loading-element.cjs.entry.js +3 -3
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +5 -5
- package/dist/cjs/q2-optgroup.cjs.entry.js +3 -3
- package/dist/cjs/q2-option-list.cjs.entry.js +359 -0
- package/dist/cjs/q2-option.cjs.entry.js +3 -11
- package/dist/cjs/q2-pagination.cjs.entry.js +116 -0
- package/dist/cjs/q2-pill.cjs.entry.js +137 -0
- package/dist/cjs/q2-radio-group.cjs.entry.js +43 -18
- package/dist/cjs/q2-radio.cjs.entry.js +21 -4
- package/dist/cjs/q2-section.cjs.entry.js +5 -7
- package/dist/cjs/q2-select.cjs.entry.js +36 -31
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +42 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +278 -0
- package/dist/cjs/q2-stepper.cjs.entry.js +10 -12
- package/dist/cjs/q2-tab-container.cjs.entry.js +12 -8
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +94 -0
- package/dist/cjs/q2-tecton-elements.cjs.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js +8 -8
- package/dist/cjs/{shapes-086c0365.js → shapes-305746b5.js} +9 -16
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -5
- package/dist/collection/collection-manifest.json +10 -3
- package/dist/collection/components/click-elsewhere/index.js +4 -6
- package/dist/collection/components/q2-badge/index.js +148 -0
- package/dist/collection/components/q2-badge/styles.css +134 -0
- package/dist/collection/components/q2-btn/index.js +14 -14
- package/dist/collection/components/q2-btn/styles.css +1 -1
- package/dist/collection/components/q2-calendar/helpers.js +22 -20
- package/dist/collection/components/q2-calendar/index.js +45 -37
- package/dist/collection/components/q2-calendar/validation.js +4 -2
- package/dist/collection/components/q2-card/index.js +347 -0
- package/dist/collection/components/q2-card/styles.css +177 -0
- package/dist/collection/components/q2-carousel/index.js +11 -16
- package/dist/collection/components/q2-carousel/styles.css +3 -3
- package/dist/collection/components/q2-carousel-pane/index.js +2 -2
- package/dist/collection/components/q2-carousel-pane/styles.css +8 -3
- package/dist/collection/components/q2-checkbox/index.js +36 -11
- package/dist/collection/components/q2-checkbox/styles.css +1 -0
- package/dist/collection/components/q2-checkbox-group/index.js +22 -1
- package/dist/collection/components/q2-dropdown/index.js +6 -15
- package/dist/collection/components/q2-dropdown-item/index.js +5 -5
- package/dist/collection/components/q2-editable-field/index.js +3 -6
- package/dist/collection/components/q2-icon/icons.js +393 -383
- package/dist/collection/components/q2-input/formatting/credit-card.js +15 -13
- package/dist/collection/components/q2-input/formatting/currency.js +162 -162
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js +7 -8
- package/dist/collection/components/q2-input/formatting/number.js +6 -9
- package/dist/collection/components/q2-input/formatting/numeric.js +5 -5
- package/dist/collection/components/q2-input/formatting/phone.js +215 -215
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/index.js +81 -25
- package/dist/collection/components/q2-input/styles.css +19 -14
- package/dist/collection/components/q2-loading/index.js +4 -4
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js +8 -15
- package/dist/collection/components/q2-message/index.js +3 -3
- package/dist/collection/components/q2-optgroup/index.js +1 -1
- package/dist/collection/components/q2-option/index.js +19 -25
- package/dist/collection/components/q2-option/styles.css +5 -0
- package/dist/collection/components/q2-option-list/index.js +648 -0
- package/dist/collection/components/q2-option-list/styles.css +128 -0
- package/dist/collection/components/q2-pagination/index.js +275 -0
- package/dist/collection/components/q2-pagination/styles.css +120 -0
- package/dist/collection/components/q2-pill/index.js +324 -0
- package/dist/collection/components/q2-pill/styles.css +229 -0
- package/dist/collection/components/q2-radio/index.js +38 -1
- package/dist/collection/components/q2-radio-group/index.js +66 -24
- package/dist/collection/components/q2-section/index.js +5 -7
- package/dist/collection/components/q2-select/index.js +53 -30
- package/dist/collection/components/q2-stepper/index.js +8 -10
- package/dist/collection/components/q2-stepper/styles.css +5 -5
- package/dist/collection/components/q2-stepper-pane/index.js +133 -5
- package/dist/collection/components/q2-stepper-vertical/index.js +346 -0
- package/dist/collection/components/q2-stepper-vertical/styles.css +273 -0
- package/dist/collection/components/q2-tab-container/index.js +11 -7
- package/dist/collection/components/q2-tag/index.js +200 -0
- package/dist/collection/components/q2-tag/styles.css +141 -0
- package/dist/collection/components/q2-textarea/index.js +6 -6
- package/dist/collection/components/tecton-tab-pane/index.js +3 -10
- package/dist/collection/utils/index.js +25 -13
- package/dist/esm/click-elsewhere.entry.js +5 -7
- package/dist/esm/{icons-3ee662ea.js → icons-b1e11526.js} +394 -384
- package/dist/esm/{index-ec6660af.js → index-0ff8de52.js} +27 -15
- package/dist/esm/{index-be8376c0.js → index-dbfb3ecc.js} +112 -65
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge.entry.js +39 -0
- package/dist/esm/q2-btn_2.entry.js +13 -13
- package/dist/esm/q2-calendar.entry.js +54 -59
- package/dist/esm/q2-card.entry.js +123 -0
- package/dist/esm/q2-carousel-pane.entry.js +5 -5
- package/dist/esm/q2-carousel.entry.js +318 -106
- package/dist/esm/q2-checkbox-group.entry.js +6 -3
- package/dist/esm/q2-checkbox.entry.js +19 -11
- package/dist/esm/q2-dropdown-item.entry.js +7 -7
- package/dist/esm/q2-dropdown.entry.js +8 -17
- package/dist/esm/q2-editable-field.entry.js +5 -8
- package/dist/esm/q2-icon.entry.js +3 -3
- package/dist/esm/q2-input.entry.js +439 -437
- package/dist/esm/q2-loading-element.entry.js +3 -3
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +5 -5
- package/dist/esm/q2-optgroup.entry.js +3 -3
- package/dist/esm/q2-option-list.entry.js +355 -0
- package/dist/esm/q2-option.entry.js +3 -11
- package/dist/esm/q2-pagination.entry.js +112 -0
- package/dist/esm/q2-pill.entry.js +133 -0
- package/dist/esm/q2-radio-group.entry.js +43 -18
- package/dist/esm/q2-radio.entry.js +21 -4
- package/dist/esm/q2-section.entry.js +5 -7
- package/dist/esm/q2-select.entry.js +36 -31
- package/dist/esm/q2-stepper-pane.entry.js +42 -4
- package/dist/esm/q2-stepper-vertical.entry.js +274 -0
- package/dist/esm/q2-stepper.entry.js +10 -12
- package/dist/esm/q2-tab-container.entry.js +12 -8
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +90 -0
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +8 -8
- package/dist/esm/{shapes-81c11dfe.js → shapes-cff4e1f0.js} +9 -16
- package/dist/esm/tecton-tab-pane.entry.js +2 -5
- package/dist/loader/index.d.ts +0 -1
- package/dist/q2-tecton-elements/{p-75e87cca.entry.js → p-00e8f782.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-01ae8461.entry.js +1 -0
- package/dist/q2-tecton-elements/p-0900bec1.entry.js +1 -0
- package/dist/q2-tecton-elements/p-10264ecb.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-fbf7c5e6.entry.js → p-1305ec5f.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-148391d6.entry.js +1 -0
- package/dist/q2-tecton-elements/p-1dfaee64.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-32ad664c.entry.js → p-221abbf6.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-c90a6016.js → p-255b2b4c.js} +1 -1
- package/dist/q2-tecton-elements/p-27736b6b.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2846ab94.entry.js +1 -0
- package/dist/q2-tecton-elements/p-2bc1de01.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-8ea2c4f7.entry.js → p-2c15414c.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-2caa89fd.js +1 -0
- package/dist/q2-tecton-elements/p-327cca41.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3a420dbf.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3abcb09d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-3fe98e3e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-bb2e110a.entry.js → p-430a979b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e6fc65d.entry.js → p-45eb7739.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-750bcd33.entry.js → p-49b2abc4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9b50c3c3.entry.js → p-4ab30466.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5bbf2bfe.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-ac859fcc.entry.js → p-6fec9235.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-824aebd9.js +1 -0
- package/dist/q2-tecton-elements/p-a4ae89cc.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-50967020.entry.js → p-a5562aaa.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ae130f70.entry.js +1 -0
- package/dist/q2-tecton-elements/p-b2302cd3.entry.js +1 -0
- package/dist/q2-tecton-elements/p-c20cbb2d.entry.js +1 -0
- package/dist/q2-tecton-elements/p-ca7a3380.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a6f8d09a.entry.js → p-d33e152c.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9024859f.entry.js → p-d5218cd6.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-d52b435e.entry.js +1 -0
- package/dist/q2-tecton-elements/p-dd02cf8d.js +1 -0
- package/dist/q2-tecton-elements/{p-07a5d703.entry.js → p-e0e7ae8b.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-7e030e92.entry.js → p-ede12fc1.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-df182f61.entry.js → p-fdfbe75b.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-ffbded54.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/elements/q2-tag-test.js +151 -0
- package/dist/test/helpers.js +20 -9
- package/dist/types/components/q2-badge/index.d.ts +13 -0
- package/dist/types/components/q2-btn/index.d.ts +3 -3
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +2 -1
- package/dist/types/components/q2-calendar/validation.d.ts +1 -1
- package/dist/types/components/q2-card/index.d.ts +35 -0
- package/dist/types/components/q2-checkbox/index.d.ts +3 -1
- package/dist/types/components/q2-checkbox-group/index.d.ts +1 -0
- package/dist/types/components/q2-dropdown/index.d.ts +1 -1
- package/dist/types/components/q2-editable-field/index.d.ts +1 -1
- package/dist/types/components/q2-input/formatting/credit-card.d.ts +1 -3
- package/dist/types/components/q2-input/index.d.ts +5 -2
- package/dist/types/components/q2-option/index.d.ts +2 -3
- package/dist/types/components/q2-option-list/index.d.ts +62 -0
- package/dist/types/components/q2-pagination/index.d.ts +30 -0
- package/dist/types/components/q2-pill/index.d.ts +39 -0
- package/dist/types/components/q2-radio/index.d.ts +4 -1
- package/dist/types/components/q2-radio-group/index.d.ts +5 -1
- package/dist/types/components/q2-select/index.d.ts +2 -1
- package/dist/types/components/q2-stepper/index.d.ts +1 -1
- package/dist/types/components/q2-stepper-pane/index.d.ts +16 -1
- package/dist/types/components/q2-stepper-vertical/index.d.ts +52 -0
- package/dist/types/components/q2-tab-container/index.d.ts +1 -1
- package/dist/types/components/q2-tag/index.d.ts +28 -0
- package/dist/types/components/tecton-tab-pane/index.d.ts +2 -2
- package/dist/types/components.d.ts +235 -11
- package/dist/types/global.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/util.d.ts +2 -10
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/workspace/workspace/tecton-production_release_1.13.x/packages/q2-tecton-elements/.stencil/test/elements/q2-tag-test.d.ts +1 -0
- package/dist/types/workspace/workspace/{_production_release_1.11.0-alpha → tecton-production_release_1.13.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +6 -3
- package/package.json +13 -13
- package/dist/q2-tecton-elements/p-06fff43d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-080839ed.js +0 -1
- package/dist/q2-tecton-elements/p-29a37091.entry.js +0 -1
- package/dist/q2-tecton-elements/p-37aba2a4.js +0 -1
- package/dist/q2-tecton-elements/p-4cd00f1a.js +0 -1
- package/dist/q2-tecton-elements/p-6702eb4d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-768e3a5d.entry.js +0 -1
- package/dist/q2-tecton-elements/p-843b1ee9.entry.js +0 -1
- package/dist/q2-tecton-elements/p-943c7745.entry.js +0 -1
- package/dist/q2-tecton-elements/p-95a73559.entry.js +0 -1
- package/dist/q2-tecton-elements/p-9a977ee6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-b281c349.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c5e55b9f.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ccbe9158.entry.js +0 -1
- package/dist/q2-tecton-elements/p-db6f90ac.entry.js +0 -1
- package/dist/q2-tecton-elements/p-fa6eea5c.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { c as createGuid,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-dbfb3ecc.js';
|
|
2
|
+
import { c as createGuid, d as setMessageHeight, h as handleAriaLabel, o as overrideFocus, l as loc, i as isEventFromElement, m as messagesDOM, e as labelDOM } from './index-0ff8de52.js';
|
|
3
3
|
|
|
4
4
|
function formatNumber(val = '', options = {
|
|
5
5
|
prefix: '',
|
|
@@ -8,15 +8,14 @@ function formatNumber(val = '', options = {
|
|
|
8
8
|
decimalSeparator: '.',
|
|
9
9
|
thousandsSeparator: '',
|
|
10
10
|
allowDecimal: false,
|
|
11
|
-
allowNegative: true
|
|
11
|
+
allowNegative: true,
|
|
12
12
|
}, explicit = false) {
|
|
13
13
|
const isNegative = val[0] === '-';
|
|
14
14
|
let value = val;
|
|
15
15
|
const allowDecimal = !!options.allowDecimal && !!options.decimals;
|
|
16
16
|
if (explicit) {
|
|
17
17
|
const parsedValue = value.replace(/[^\d.]/g, '');
|
|
18
|
-
value =
|
|
19
|
-
(parsedValue && Number(parsedValue).toFixed(allowDecimal ? options.decimals : 0)) || '';
|
|
18
|
+
value = (parsedValue && Number(parsedValue).toFixed(allowDecimal ? options.decimals : 0)) || '';
|
|
20
19
|
}
|
|
21
20
|
value = value.replace(/[^\d]/g, '');
|
|
22
21
|
let { integerString, decimalString } = splitValue(value, allowDecimal, options.decimals);
|
|
@@ -31,9 +30,7 @@ function formatNumber(val = '', options = {
|
|
|
31
30
|
value = `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}`;
|
|
32
31
|
// format integerString
|
|
33
32
|
integerString = integerString.replace(/\B(?=(\d{3})+(?!\d))/g, options.thousandsSeparator);
|
|
34
|
-
const formattedValue = negativeSymbol || integerString
|
|
35
|
-
? `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}`
|
|
36
|
-
: '';
|
|
33
|
+
const formattedValue = negativeSymbol || integerString ? `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}` : '';
|
|
37
34
|
const fullyFormattedValue = negativeSymbol || integerString
|
|
38
35
|
? `${negativeSymbol}${options.prefix}${integerString}${decimalSeparator}${decimalString}${options.suffix}`
|
|
39
36
|
: '';
|
|
@@ -52,14 +49,14 @@ function formatNumber(val = '', options = {
|
|
|
52
49
|
suffix: '',
|
|
53
50
|
formattingCharacterCount,
|
|
54
51
|
maxlength,
|
|
55
|
-
unformattedValue
|
|
52
|
+
unformattedValue,
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
55
|
function splitValue(value, allowDecimal = false, decimals) {
|
|
59
56
|
if (!allowDecimal) {
|
|
60
57
|
return {
|
|
61
58
|
integerString: value,
|
|
62
|
-
decimalString: ''
|
|
59
|
+
decimalString: '',
|
|
63
60
|
};
|
|
64
61
|
}
|
|
65
62
|
const splitIndex = value.length - decimals;
|
|
@@ -70,7 +67,7 @@ function splitValue(value, allowDecimal = false, decimals) {
|
|
|
70
67
|
const decimalString = value.substring(splitIndex).padStart(decimals, '0');
|
|
71
68
|
return {
|
|
72
69
|
integerString,
|
|
73
|
-
decimalString
|
|
70
|
+
decimalString,
|
|
74
71
|
};
|
|
75
72
|
}
|
|
76
73
|
|
|
@@ -85,7 +82,7 @@ function formatValue(value = '', mask = '', options) {
|
|
|
85
82
|
fullyFormattedValue,
|
|
86
83
|
prefix: prefix.trim() || suffix.trim(),
|
|
87
84
|
formattingCharacterCount: 0,
|
|
88
|
-
unformattedValue: value
|
|
85
|
+
unformattedValue: value,
|
|
89
86
|
};
|
|
90
87
|
}
|
|
91
88
|
const { unformattedValue, formattedValue, formattingCharacterCount } = generateMask(value, mask);
|
|
@@ -100,7 +97,7 @@ function formatValue(value = '', mask = '', options) {
|
|
|
100
97
|
formattingCharacterCount,
|
|
101
98
|
maxlength,
|
|
102
99
|
minFormattedLength,
|
|
103
|
-
unformattedValue
|
|
100
|
+
unformattedValue,
|
|
104
101
|
};
|
|
105
102
|
}
|
|
106
103
|
const optionalValidatingChars = ['?'];
|
|
@@ -112,8 +109,8 @@ function isKnownValidatingChar(character) {
|
|
|
112
109
|
return knownValidatingChars.includes(character);
|
|
113
110
|
}
|
|
114
111
|
function getStaticFormattingChars(mask) {
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
const knownChars = knownValidatingChars.join('|');
|
|
113
|
+
const formattingChars = mask.replace(new RegExp(`[${knownChars}]`, 'g'), '').split('');
|
|
117
114
|
return new Set(formattingChars);
|
|
118
115
|
}
|
|
119
116
|
function isStaticFormattingChar(character, formattingChars) {
|
|
@@ -140,7 +137,7 @@ function getValidatedChar(char, matcher) {
|
|
|
140
137
|
}
|
|
141
138
|
function generateMask(value, mask) {
|
|
142
139
|
const maskArray = mask.split('');
|
|
143
|
-
|
|
140
|
+
const formattingChars = getStaticFormattingChars(mask);
|
|
144
141
|
let currentValueIndex = 0;
|
|
145
142
|
let formattingCharacterCount = 0;
|
|
146
143
|
let unformattedValue = '';
|
|
@@ -148,8 +145,7 @@ function generateMask(value, mask) {
|
|
|
148
145
|
if (currentValueIndex >= value.length) {
|
|
149
146
|
return acc;
|
|
150
147
|
}
|
|
151
|
-
if (isOptionalValidatingChar(character) &&
|
|
152
|
-
isStaticFormattingChar(value[currentValueIndex], formattingChars)) {
|
|
148
|
+
if (isOptionalValidatingChar(character) && isStaticFormattingChar(value[currentValueIndex], formattingChars)) {
|
|
153
149
|
return acc;
|
|
154
150
|
}
|
|
155
151
|
if (isKnownValidatingChar(character)) {
|
|
@@ -177,7 +173,7 @@ function generateMask(value, mask) {
|
|
|
177
173
|
return {
|
|
178
174
|
unformattedValue,
|
|
179
175
|
formattedValue,
|
|
180
|
-
formattingCharacterCount
|
|
176
|
+
formattingCharacterCount,
|
|
181
177
|
};
|
|
182
178
|
}
|
|
183
179
|
function getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars) {
|
|
@@ -200,1128 +196,1128 @@ const currencyFormats = {
|
|
|
200
196
|
suffix: 'د.إ',
|
|
201
197
|
decimals: 2,
|
|
202
198
|
decimalSeparator: '.',
|
|
203
|
-
thousandsSeparator: ','
|
|
199
|
+
thousandsSeparator: ',',
|
|
204
200
|
},
|
|
205
201
|
AFN: {
|
|
206
202
|
prefix: '¤',
|
|
207
203
|
suffix: '',
|
|
208
204
|
decimals: 2,
|
|
209
205
|
decimalSeparator: '.',
|
|
210
|
-
thousandsSeparator: ','
|
|
206
|
+
thousandsSeparator: ',',
|
|
211
207
|
},
|
|
212
208
|
ALL: {
|
|
213
209
|
prefix: 'L',
|
|
214
210
|
suffix: '',
|
|
215
211
|
decimals: 2,
|
|
216
212
|
decimalSeparator: '.',
|
|
217
|
-
thousandsSeparator: ','
|
|
213
|
+
thousandsSeparator: ',',
|
|
218
214
|
},
|
|
219
215
|
AMD: {
|
|
220
216
|
prefix: 'դր.',
|
|
221
217
|
suffix: '',
|
|
222
218
|
decimals: 2,
|
|
223
219
|
decimalSeparator: '.',
|
|
224
|
-
thousandsSeparator: ','
|
|
220
|
+
thousandsSeparator: ',',
|
|
225
221
|
},
|
|
226
222
|
ANG: {
|
|
227
223
|
prefix: 'ƒ',
|
|
228
224
|
suffix: '',
|
|
229
225
|
decimals: 2,
|
|
230
226
|
decimalSeparator: '.',
|
|
231
|
-
thousandsSeparator: ','
|
|
227
|
+
thousandsSeparator: ',',
|
|
232
228
|
},
|
|
233
229
|
AOA: {
|
|
234
230
|
prefix: 'Kz',
|
|
235
231
|
suffix: '',
|
|
236
232
|
decimals: 2,
|
|
237
233
|
decimalSeparator: '.',
|
|
238
|
-
thousandsSeparator: ','
|
|
234
|
+
thousandsSeparator: ',',
|
|
239
235
|
},
|
|
240
236
|
ARS: {
|
|
241
237
|
prefix: '$',
|
|
242
238
|
suffix: '',
|
|
243
239
|
decimals: 2,
|
|
244
240
|
decimalSeparator: '.',
|
|
245
|
-
thousandsSeparator: ','
|
|
241
|
+
thousandsSeparator: ',',
|
|
246
242
|
},
|
|
247
243
|
AUD: {
|
|
248
244
|
prefix: '$',
|
|
249
245
|
suffix: '',
|
|
250
246
|
decimals: 2,
|
|
251
247
|
decimalSeparator: '.',
|
|
252
|
-
thousandsSeparator: ','
|
|
248
|
+
thousandsSeparator: ',',
|
|
253
249
|
},
|
|
254
250
|
AWG: {
|
|
255
251
|
prefix: 'ƒ',
|
|
256
252
|
suffix: '',
|
|
257
253
|
decimals: 2,
|
|
258
254
|
decimalSeparator: '.',
|
|
259
|
-
thousandsSeparator: ','
|
|
255
|
+
thousandsSeparator: ',',
|
|
260
256
|
},
|
|
261
257
|
AZN: {
|
|
262
258
|
prefix: '¤',
|
|
263
259
|
suffix: '',
|
|
264
260
|
decimals: 2,
|
|
265
261
|
decimalSeparator: '.',
|
|
266
|
-
thousandsSeparator: ','
|
|
262
|
+
thousandsSeparator: ',',
|
|
267
263
|
},
|
|
268
264
|
BAM: {
|
|
269
265
|
prefix: 'КМ',
|
|
270
266
|
suffix: '',
|
|
271
267
|
decimals: 2,
|
|
272
268
|
decimalSeparator: '.',
|
|
273
|
-
thousandsSeparator: ','
|
|
269
|
+
thousandsSeparator: ',',
|
|
274
270
|
},
|
|
275
271
|
BBD: {
|
|
276
272
|
prefix: '$',
|
|
277
273
|
suffix: '',
|
|
278
274
|
decimals: 2,
|
|
279
275
|
decimalSeparator: '.',
|
|
280
|
-
thousandsSeparator: ','
|
|
276
|
+
thousandsSeparator: ',',
|
|
281
277
|
},
|
|
282
278
|
BDT: {
|
|
283
279
|
prefix: '৳',
|
|
284
280
|
suffix: '',
|
|
285
281
|
decimals: 2,
|
|
286
282
|
decimalSeparator: '.',
|
|
287
|
-
thousandsSeparator: ','
|
|
283
|
+
thousandsSeparator: ',',
|
|
288
284
|
},
|
|
289
285
|
BGN: {
|
|
290
286
|
prefix: '৳',
|
|
291
287
|
suffix: '',
|
|
292
288
|
decimals: 2,
|
|
293
289
|
decimalSeparator: '.',
|
|
294
|
-
thousandsSeparator: ','
|
|
290
|
+
thousandsSeparator: ',',
|
|
295
291
|
},
|
|
296
292
|
BHD: {
|
|
297
293
|
prefix: '',
|
|
298
294
|
suffix: 'ب.د',
|
|
299
295
|
decimals: 3,
|
|
300
296
|
decimalSeparator: '.',
|
|
301
|
-
thousandsSeparator: ','
|
|
297
|
+
thousandsSeparator: ',',
|
|
302
298
|
},
|
|
303
299
|
BIF: {
|
|
304
300
|
prefix: 'Fr',
|
|
305
301
|
suffix: '',
|
|
306
302
|
decimals: 0,
|
|
307
303
|
decimalSeparator: '.',
|
|
308
|
-
thousandsSeparator: ','
|
|
304
|
+
thousandsSeparator: ',',
|
|
309
305
|
},
|
|
310
306
|
BMD: {
|
|
311
307
|
prefix: '$',
|
|
312
308
|
suffix: '',
|
|
313
309
|
decimals: 2,
|
|
314
310
|
decimalSeparator: '.',
|
|
315
|
-
thousandsSeparator: ','
|
|
311
|
+
thousandsSeparator: ',',
|
|
316
312
|
},
|
|
317
313
|
BND: {
|
|
318
314
|
prefix: '$',
|
|
319
315
|
suffix: '',
|
|
320
316
|
decimals: 2,
|
|
321
317
|
decimalSeparator: '.',
|
|
322
|
-
thousandsSeparator: ','
|
|
318
|
+
thousandsSeparator: ',',
|
|
323
319
|
},
|
|
324
320
|
BOB: {
|
|
325
321
|
prefix: 'Bs.',
|
|
326
322
|
suffix: '',
|
|
327
323
|
decimals: 2,
|
|
328
324
|
decimalSeparator: '.',
|
|
329
|
-
thousandsSeparator: ','
|
|
325
|
+
thousandsSeparator: ',',
|
|
330
326
|
},
|
|
331
327
|
BRL: {
|
|
332
328
|
prefix: 'R$',
|
|
333
329
|
suffix: '',
|
|
334
330
|
decimals: 2,
|
|
335
331
|
decimalSeparator: '.',
|
|
336
|
-
thousandsSeparator: ','
|
|
332
|
+
thousandsSeparator: ',',
|
|
337
333
|
},
|
|
338
334
|
BSD: {
|
|
339
335
|
prefix: '$',
|
|
340
336
|
suffix: '',
|
|
341
337
|
decimals: 2,
|
|
342
338
|
decimalSeparator: '.',
|
|
343
|
-
thousandsSeparator: ','
|
|
339
|
+
thousandsSeparator: ',',
|
|
344
340
|
},
|
|
345
341
|
BTN: {
|
|
346
342
|
prefix: '¤',
|
|
347
343
|
suffix: '',
|
|
348
344
|
decimals: 2,
|
|
349
345
|
decimalSeparator: '.',
|
|
350
|
-
thousandsSeparator: ','
|
|
346
|
+
thousandsSeparator: ',',
|
|
351
347
|
},
|
|
352
348
|
BWP: {
|
|
353
349
|
prefix: 'P',
|
|
354
350
|
suffix: '',
|
|
355
351
|
decimals: 2,
|
|
356
352
|
decimalSeparator: '.',
|
|
357
|
-
thousandsSeparator: ','
|
|
353
|
+
thousandsSeparator: ',',
|
|
358
354
|
},
|
|
359
355
|
BYN: {
|
|
360
356
|
prefix: 'Br',
|
|
361
357
|
suffix: '',
|
|
362
358
|
decimals: 0,
|
|
363
359
|
decimalSeparator: '.',
|
|
364
|
-
thousandsSeparator: ','
|
|
360
|
+
thousandsSeparator: ',',
|
|
365
361
|
},
|
|
366
362
|
BZD: {
|
|
367
363
|
prefix: '$',
|
|
368
364
|
suffix: '',
|
|
369
365
|
decimals: 2,
|
|
370
366
|
decimalSeparator: '.',
|
|
371
|
-
thousandsSeparator: ','
|
|
367
|
+
thousandsSeparator: ',',
|
|
372
368
|
},
|
|
373
369
|
CAD: {
|
|
374
370
|
prefix: '$',
|
|
375
371
|
suffix: '',
|
|
376
372
|
decimals: 2,
|
|
377
373
|
decimalSeparator: '.',
|
|
378
|
-
thousandsSeparator: ','
|
|
374
|
+
thousandsSeparator: ',',
|
|
379
375
|
},
|
|
380
376
|
CDF: {
|
|
381
377
|
prefix: 'Fr',
|
|
382
378
|
suffix: '',
|
|
383
379
|
decimals: 2,
|
|
384
380
|
decimalSeparator: '.',
|
|
385
|
-
thousandsSeparator: ','
|
|
381
|
+
thousandsSeparator: ',',
|
|
386
382
|
},
|
|
387
383
|
CHF: {
|
|
388
384
|
prefix: 'Fr',
|
|
389
385
|
suffix: '',
|
|
390
386
|
decimals: 2,
|
|
391
387
|
decimalSeparator: '.',
|
|
392
|
-
thousandsSeparator: ','
|
|
388
|
+
thousandsSeparator: ',',
|
|
393
389
|
},
|
|
394
390
|
CLF: {
|
|
395
391
|
prefix: 'Fr',
|
|
396
392
|
suffix: '',
|
|
397
393
|
decimals: 4,
|
|
398
394
|
decimalSeparator: '.',
|
|
399
|
-
thousandsSeparator: ','
|
|
395
|
+
thousandsSeparator: ',',
|
|
400
396
|
},
|
|
401
397
|
CLP: {
|
|
402
398
|
prefix: '$',
|
|
403
399
|
suffix: '',
|
|
404
400
|
decimals: 0,
|
|
405
401
|
decimalSeparator: '.',
|
|
406
|
-
thousandsSeparator: ','
|
|
402
|
+
thousandsSeparator: ',',
|
|
407
403
|
},
|
|
408
404
|
CNY: {
|
|
409
405
|
prefix: '¥',
|
|
410
406
|
suffix: '',
|
|
411
407
|
decimals: 2,
|
|
412
408
|
decimalSeparator: '.',
|
|
413
|
-
thousandsSeparator: ','
|
|
409
|
+
thousandsSeparator: ',',
|
|
414
410
|
},
|
|
415
411
|
COP: {
|
|
416
412
|
prefix: '$',
|
|
417
413
|
suffix: '',
|
|
418
414
|
decimals: 2,
|
|
419
415
|
decimalSeparator: '.',
|
|
420
|
-
thousandsSeparator: ','
|
|
416
|
+
thousandsSeparator: ',',
|
|
421
417
|
},
|
|
422
418
|
CRC: {
|
|
423
419
|
prefix: '₡',
|
|
424
420
|
suffix: '',
|
|
425
421
|
decimals: 2,
|
|
426
422
|
decimalSeparator: '.',
|
|
427
|
-
thousandsSeparator: ','
|
|
423
|
+
thousandsSeparator: ',',
|
|
428
424
|
},
|
|
429
425
|
CUC: {
|
|
430
426
|
prefix: '$',
|
|
431
427
|
suffix: '',
|
|
432
428
|
decimals: 2,
|
|
433
429
|
decimalSeparator: '.',
|
|
434
|
-
thousandsSeparator: ','
|
|
430
|
+
thousandsSeparator: ',',
|
|
435
431
|
},
|
|
436
432
|
CUP: {
|
|
437
433
|
prefix: '$',
|
|
438
434
|
suffix: '',
|
|
439
435
|
decimals: 2,
|
|
440
436
|
decimalSeparator: '.',
|
|
441
|
-
thousandsSeparator: ','
|
|
437
|
+
thousandsSeparator: ',',
|
|
442
438
|
},
|
|
443
439
|
CVE: {
|
|
444
440
|
prefix: '$',
|
|
445
441
|
suffix: '',
|
|
446
442
|
decimals: 0,
|
|
447
443
|
decimalSeparator: '.',
|
|
448
|
-
thousandsSeparator: ','
|
|
444
|
+
thousandsSeparator: ',',
|
|
449
445
|
},
|
|
450
446
|
CZK: {
|
|
451
447
|
prefix: 'Kč',
|
|
452
448
|
suffix: '',
|
|
453
449
|
decimals: 2,
|
|
454
450
|
decimalSeparator: '.',
|
|
455
|
-
thousandsSeparator: ','
|
|
451
|
+
thousandsSeparator: ',',
|
|
456
452
|
},
|
|
457
453
|
DJF: {
|
|
458
454
|
prefix: 'Fr',
|
|
459
455
|
suffix: '',
|
|
460
456
|
decimals: 0,
|
|
461
457
|
decimalSeparator: '.',
|
|
462
|
-
thousandsSeparator: ','
|
|
458
|
+
thousandsSeparator: ',',
|
|
463
459
|
},
|
|
464
460
|
DKK: {
|
|
465
461
|
prefix: 'kr',
|
|
466
462
|
suffix: '',
|
|
467
463
|
decimals: 2,
|
|
468
464
|
decimalSeparator: '.',
|
|
469
|
-
thousandsSeparator: ','
|
|
465
|
+
thousandsSeparator: ',',
|
|
470
466
|
},
|
|
471
467
|
DOP: {
|
|
472
468
|
prefix: '$',
|
|
473
469
|
suffix: '',
|
|
474
470
|
decimals: 2,
|
|
475
471
|
decimalSeparator: '.',
|
|
476
|
-
thousandsSeparator: ','
|
|
472
|
+
thousandsSeparator: ',',
|
|
477
473
|
},
|
|
478
474
|
DZD: {
|
|
479
475
|
prefix: '',
|
|
480
476
|
suffix: 'د.ج',
|
|
481
477
|
decimals: 2,
|
|
482
478
|
decimalSeparator: '.',
|
|
483
|
-
thousandsSeparator: ','
|
|
479
|
+
thousandsSeparator: ',',
|
|
484
480
|
},
|
|
485
481
|
EEK: {
|
|
486
482
|
prefix: 'KR',
|
|
487
483
|
suffix: '',
|
|
488
484
|
decimals: 2,
|
|
489
485
|
decimalSeparator: '.',
|
|
490
|
-
thousandsSeparator: ','
|
|
486
|
+
thousandsSeparator: ',',
|
|
491
487
|
},
|
|
492
488
|
EGP: {
|
|
493
489
|
prefix: '£',
|
|
494
490
|
suffix: '',
|
|
495
491
|
decimals: 2,
|
|
496
492
|
decimalSeparator: '.',
|
|
497
|
-
thousandsSeparator: ','
|
|
493
|
+
thousandsSeparator: ',',
|
|
498
494
|
},
|
|
499
495
|
ERN: {
|
|
500
496
|
prefix: 'Nfk',
|
|
501
497
|
suffix: '',
|
|
502
498
|
decimals: 2,
|
|
503
499
|
decimalSeparator: '.',
|
|
504
|
-
thousandsSeparator: ','
|
|
500
|
+
thousandsSeparator: ',',
|
|
505
501
|
},
|
|
506
502
|
ETB: {
|
|
507
503
|
prefix: '¤',
|
|
508
504
|
suffix: '',
|
|
509
505
|
decimals: 2,
|
|
510
506
|
decimalSeparator: '.',
|
|
511
|
-
thousandsSeparator: ','
|
|
507
|
+
thousandsSeparator: ',',
|
|
512
508
|
},
|
|
513
509
|
EUR: {
|
|
514
510
|
prefix: '€',
|
|
515
511
|
suffix: '',
|
|
516
512
|
decimals: 2,
|
|
517
513
|
decimalSeparator: '.',
|
|
518
|
-
thousandsSeparator: ','
|
|
514
|
+
thousandsSeparator: ',',
|
|
519
515
|
},
|
|
520
516
|
FJD: {
|
|
521
517
|
prefix: '$',
|
|
522
518
|
suffix: '',
|
|
523
519
|
decimals: 2,
|
|
524
520
|
decimalSeparator: '.',
|
|
525
|
-
thousandsSeparator: ','
|
|
521
|
+
thousandsSeparator: ',',
|
|
526
522
|
},
|
|
527
523
|
FKP: {
|
|
528
524
|
prefix: '£',
|
|
529
525
|
suffix: '',
|
|
530
526
|
decimals: 2,
|
|
531
527
|
decimalSeparator: '.',
|
|
532
|
-
thousandsSeparator: ','
|
|
528
|
+
thousandsSeparator: ',',
|
|
533
529
|
},
|
|
534
530
|
GBP: {
|
|
535
531
|
prefix: '£',
|
|
536
532
|
suffix: '',
|
|
537
533
|
decimals: 2,
|
|
538
534
|
decimalSeparator: '.',
|
|
539
|
-
thousandsSeparator: ','
|
|
535
|
+
thousandsSeparator: ',',
|
|
540
536
|
},
|
|
541
537
|
GEL: {
|
|
542
538
|
prefix: 'ლ',
|
|
543
539
|
suffix: '',
|
|
544
540
|
decimals: 2,
|
|
545
541
|
decimalSeparator: '.',
|
|
546
|
-
thousandsSeparator: ','
|
|
542
|
+
thousandsSeparator: ',',
|
|
547
543
|
},
|
|
548
544
|
GHS: {
|
|
549
545
|
prefix: '¤',
|
|
550
546
|
suffix: '',
|
|
551
547
|
decimals: 2,
|
|
552
548
|
decimalSeparator: '.',
|
|
553
|
-
thousandsSeparator: ','
|
|
549
|
+
thousandsSeparator: ',',
|
|
554
550
|
},
|
|
555
551
|
GIP: {
|
|
556
552
|
prefix: '£',
|
|
557
553
|
suffix: '',
|
|
558
554
|
decimals: 2,
|
|
559
555
|
decimalSeparator: '.',
|
|
560
|
-
thousandsSeparator: ','
|
|
556
|
+
thousandsSeparator: ',',
|
|
561
557
|
},
|
|
562
558
|
GMD: {
|
|
563
559
|
prefix: 'D',
|
|
564
560
|
suffix: '',
|
|
565
561
|
decimals: 2,
|
|
566
562
|
decimalSeparator: '.',
|
|
567
|
-
thousandsSeparator: ','
|
|
563
|
+
thousandsSeparator: ',',
|
|
568
564
|
},
|
|
569
565
|
GNF: {
|
|
570
566
|
prefix: 'Fr',
|
|
571
567
|
suffix: '',
|
|
572
568
|
decimals: 0,
|
|
573
569
|
decimalSeparator: '.',
|
|
574
|
-
thousandsSeparator: ','
|
|
570
|
+
thousandsSeparator: ',',
|
|
575
571
|
},
|
|
576
572
|
GTQ: {
|
|
577
573
|
prefix: 'Q',
|
|
578
574
|
suffix: '',
|
|
579
575
|
decimals: 2,
|
|
580
576
|
decimalSeparator: '.',
|
|
581
|
-
thousandsSeparator: ','
|
|
577
|
+
thousandsSeparator: ',',
|
|
582
578
|
},
|
|
583
579
|
GYD: {
|
|
584
580
|
prefix: '$',
|
|
585
581
|
suffix: '',
|
|
586
582
|
decimals: 2,
|
|
587
583
|
decimalSeparator: '.',
|
|
588
|
-
thousandsSeparator: ','
|
|
584
|
+
thousandsSeparator: ',',
|
|
589
585
|
},
|
|
590
586
|
HKD: {
|
|
591
587
|
prefix: '$',
|
|
592
588
|
suffix: '',
|
|
593
589
|
decimals: 2,
|
|
594
590
|
decimalSeparator: '.',
|
|
595
|
-
thousandsSeparator: ','
|
|
591
|
+
thousandsSeparator: ',',
|
|
596
592
|
},
|
|
597
593
|
HNL: {
|
|
598
594
|
prefix: 'L',
|
|
599
595
|
suffix: '',
|
|
600
596
|
decimals: 2,
|
|
601
597
|
decimalSeparator: '.',
|
|
602
|
-
thousandsSeparator: ','
|
|
598
|
+
thousandsSeparator: ',',
|
|
603
599
|
},
|
|
604
600
|
HRK: {
|
|
605
601
|
prefix: 'kn',
|
|
606
602
|
suffix: '',
|
|
607
603
|
decimals: 2,
|
|
608
604
|
decimalSeparator: '.',
|
|
609
|
-
thousandsSeparator: ','
|
|
605
|
+
thousandsSeparator: ',',
|
|
610
606
|
},
|
|
611
607
|
HTG: {
|
|
612
608
|
prefix: 'G',
|
|
613
609
|
suffix: '',
|
|
614
610
|
decimals: 2,
|
|
615
611
|
decimalSeparator: '.',
|
|
616
|
-
thousandsSeparator: ','
|
|
612
|
+
thousandsSeparator: ',',
|
|
617
613
|
},
|
|
618
614
|
HUF: {
|
|
619
615
|
prefix: 'Ft',
|
|
620
616
|
suffix: '',
|
|
621
617
|
decimals: 2,
|
|
622
618
|
decimalSeparator: '.',
|
|
623
|
-
thousandsSeparator: ','
|
|
619
|
+
thousandsSeparator: ',',
|
|
624
620
|
},
|
|
625
621
|
IDR: {
|
|
626
622
|
prefix: 'Rs',
|
|
627
623
|
suffix: '',
|
|
628
624
|
decimals: 2,
|
|
629
625
|
decimalSeparator: '.',
|
|
630
|
-
thousandsSeparator: ','
|
|
626
|
+
thousandsSeparator: ',',
|
|
631
627
|
},
|
|
632
628
|
ILS: {
|
|
633
629
|
prefix: '₪',
|
|
634
630
|
suffix: '',
|
|
635
631
|
decimals: 2,
|
|
636
632
|
decimalSeparator: '.',
|
|
637
|
-
thousandsSeparator: ','
|
|
633
|
+
thousandsSeparator: ',',
|
|
638
634
|
},
|
|
639
635
|
INR: {
|
|
640
636
|
prefix: '₨',
|
|
641
637
|
suffix: '',
|
|
642
638
|
decimals: 2,
|
|
643
639
|
decimalSeparator: '.',
|
|
644
|
-
thousandsSeparator: ','
|
|
640
|
+
thousandsSeparator: ',',
|
|
645
641
|
},
|
|
646
642
|
IQD: {
|
|
647
643
|
prefix: '',
|
|
648
644
|
suffix: 'ع.د',
|
|
649
645
|
decimals: 3,
|
|
650
646
|
decimalSeparator: '.',
|
|
651
|
-
thousandsSeparator: ','
|
|
647
|
+
thousandsSeparator: ',',
|
|
652
648
|
},
|
|
653
649
|
IRR: {
|
|
654
650
|
prefix: '¤',
|
|
655
651
|
suffix: '',
|
|
656
652
|
decimals: 2,
|
|
657
653
|
decimalSeparator: '.',
|
|
658
|
-
thousandsSeparator: ','
|
|
654
|
+
thousandsSeparator: ',',
|
|
659
655
|
},
|
|
660
656
|
ISK: {
|
|
661
657
|
prefix: 'kr',
|
|
662
658
|
suffix: '',
|
|
663
659
|
decimals: 0,
|
|
664
660
|
decimalSeparator: '.',
|
|
665
|
-
thousandsSeparator: ','
|
|
661
|
+
thousandsSeparator: ',',
|
|
666
662
|
},
|
|
667
663
|
JMD: {
|
|
668
664
|
prefix: '$',
|
|
669
665
|
suffix: '',
|
|
670
666
|
decimals: 2,
|
|
671
667
|
decimalSeparator: '.',
|
|
672
|
-
thousandsSeparator: ','
|
|
668
|
+
thousandsSeparator: ',',
|
|
673
669
|
},
|
|
674
670
|
JOD: {
|
|
675
671
|
prefix: '',
|
|
676
672
|
suffix: 'د.ا',
|
|
677
673
|
decimals: 3,
|
|
678
674
|
decimalSeparator: '.',
|
|
679
|
-
thousandsSeparator: ','
|
|
675
|
+
thousandsSeparator: ',',
|
|
680
676
|
},
|
|
681
677
|
JPY: {
|
|
682
678
|
prefix: '¥',
|
|
683
679
|
suffix: '',
|
|
684
680
|
decimals: 0,
|
|
685
681
|
decimalSeparator: '.',
|
|
686
|
-
thousandsSeparator: ','
|
|
682
|
+
thousandsSeparator: ',',
|
|
687
683
|
},
|
|
688
684
|
KES: {
|
|
689
685
|
prefix: 'Sh',
|
|
690
686
|
suffix: '',
|
|
691
687
|
decimals: 2,
|
|
692
688
|
decimalSeparator: '.',
|
|
693
|
-
thousandsSeparator: ','
|
|
689
|
+
thousandsSeparator: ',',
|
|
694
690
|
},
|
|
695
691
|
KGS: {
|
|
696
692
|
prefix: '¤',
|
|
697
693
|
suffix: '',
|
|
698
694
|
decimals: 2,
|
|
699
695
|
decimalSeparator: '.',
|
|
700
|
-
thousandsSeparator: ','
|
|
696
|
+
thousandsSeparator: ',',
|
|
701
697
|
},
|
|
702
698
|
KHR: {
|
|
703
699
|
prefix: '¤',
|
|
704
700
|
suffix: '',
|
|
705
701
|
decimals: 2,
|
|
706
702
|
decimalSeparator: '.',
|
|
707
|
-
thousandsSeparator: ','
|
|
703
|
+
thousandsSeparator: ',',
|
|
708
704
|
},
|
|
709
705
|
KMF: {
|
|
710
706
|
prefix: 'Fr',
|
|
711
707
|
suffix: '',
|
|
712
708
|
decimals: 0,
|
|
713
709
|
decimalSeparator: '.',
|
|
714
|
-
thousandsSeparator: ','
|
|
710
|
+
thousandsSeparator: ',',
|
|
715
711
|
},
|
|
716
712
|
KPW: {
|
|
717
713
|
prefix: '₩',
|
|
718
714
|
suffix: '',
|
|
719
715
|
decimals: 2,
|
|
720
716
|
decimalSeparator: '.',
|
|
721
|
-
thousandsSeparator: ','
|
|
717
|
+
thousandsSeparator: ',',
|
|
722
718
|
},
|
|
723
719
|
KRW: {
|
|
724
720
|
prefix: '₩',
|
|
725
721
|
suffix: '',
|
|
726
722
|
decimals: 0,
|
|
727
723
|
decimalSeparator: '.',
|
|
728
|
-
thousandsSeparator: ','
|
|
724
|
+
thousandsSeparator: ',',
|
|
729
725
|
},
|
|
730
726
|
KWD: {
|
|
731
727
|
prefix: 'د.ك',
|
|
732
728
|
suffix: '',
|
|
733
729
|
decimals: 3,
|
|
734
730
|
decimalSeparator: '.',
|
|
735
|
-
thousandsSeparator: ','
|
|
731
|
+
thousandsSeparator: ',',
|
|
736
732
|
},
|
|
737
733
|
KYD: {
|
|
738
734
|
prefix: '$',
|
|
739
735
|
suffix: '',
|
|
740
736
|
decimals: 2,
|
|
741
737
|
decimalSeparator: '.',
|
|
742
|
-
thousandsSeparator: ','
|
|
738
|
+
thousandsSeparator: ',',
|
|
743
739
|
},
|
|
744
740
|
KZT: {
|
|
745
741
|
prefix: '〒',
|
|
746
742
|
suffix: '',
|
|
747
743
|
decimals: 2,
|
|
748
744
|
decimalSeparator: '.',
|
|
749
|
-
thousandsSeparator: ','
|
|
745
|
+
thousandsSeparator: ',',
|
|
750
746
|
},
|
|
751
747
|
LAK: {
|
|
752
748
|
prefix: '₭',
|
|
753
749
|
suffix: '',
|
|
754
750
|
decimals: 2,
|
|
755
751
|
decimalSeparator: '.',
|
|
756
|
-
thousandsSeparator: ','
|
|
752
|
+
thousandsSeparator: ',',
|
|
757
753
|
},
|
|
758
754
|
LBP: {
|
|
759
755
|
prefix: '',
|
|
760
756
|
suffix: 'ل.ل',
|
|
761
757
|
decimals: 2,
|
|
762
758
|
decimalSeparator: '.',
|
|
763
|
-
thousandsSeparator: ','
|
|
759
|
+
thousandsSeparator: ',',
|
|
764
760
|
},
|
|
765
761
|
LKR: {
|
|
766
762
|
prefix: 'Rs',
|
|
767
763
|
suffix: '',
|
|
768
764
|
decimals: 2,
|
|
769
765
|
decimalSeparator: '.',
|
|
770
|
-
thousandsSeparator: ','
|
|
766
|
+
thousandsSeparator: ',',
|
|
771
767
|
},
|
|
772
768
|
LRD: {
|
|
773
769
|
prefix: '$',
|
|
774
770
|
suffix: '',
|
|
775
771
|
decimals: 2,
|
|
776
772
|
decimalSeparator: '.',
|
|
777
|
-
thousandsSeparator: ','
|
|
773
|
+
thousandsSeparator: ',',
|
|
778
774
|
},
|
|
779
775
|
LSL: {
|
|
780
776
|
prefix: 'L',
|
|
781
777
|
suffix: '',
|
|
782
778
|
decimals: 2,
|
|
783
779
|
decimalSeparator: '.',
|
|
784
|
-
thousandsSeparator: ','
|
|
780
|
+
thousandsSeparator: ',',
|
|
785
781
|
},
|
|
786
782
|
LTL: {
|
|
787
783
|
prefix: 'Lt',
|
|
788
784
|
suffix: '',
|
|
789
785
|
decimals: 2,
|
|
790
786
|
decimalSeparator: '.',
|
|
791
|
-
thousandsSeparator: ','
|
|
787
|
+
thousandsSeparator: ',',
|
|
792
788
|
},
|
|
793
789
|
LVL: {
|
|
794
790
|
prefix: 'Ls',
|
|
795
791
|
suffix: '',
|
|
796
792
|
decimals: 2,
|
|
797
793
|
decimalSeparator: '.',
|
|
798
|
-
thousandsSeparator: ','
|
|
794
|
+
thousandsSeparator: ',',
|
|
799
795
|
},
|
|
800
796
|
LYD: {
|
|
801
797
|
prefix: '',
|
|
802
798
|
suffix: 'ل.د',
|
|
803
799
|
decimals: 3,
|
|
804
800
|
decimalSeparator: '.',
|
|
805
|
-
thousandsSeparator: ','
|
|
801
|
+
thousandsSeparator: ',',
|
|
806
802
|
},
|
|
807
803
|
MAD: {
|
|
808
804
|
prefix: '',
|
|
809
805
|
suffix: 'د.م.',
|
|
810
806
|
decimals: 2,
|
|
811
807
|
decimalSeparator: '.',
|
|
812
|
-
thousandsSeparator: ','
|
|
808
|
+
thousandsSeparator: ',',
|
|
813
809
|
},
|
|
814
810
|
MDL: {
|
|
815
811
|
prefix: 'L',
|
|
816
812
|
suffix: '',
|
|
817
813
|
decimals: 2,
|
|
818
814
|
decimalSeparator: '.',
|
|
819
|
-
thousandsSeparator: ','
|
|
815
|
+
thousandsSeparator: ',',
|
|
820
816
|
},
|
|
821
817
|
MGA: {
|
|
822
818
|
prefix: '¤',
|
|
823
819
|
suffix: '',
|
|
824
820
|
decimals: 1,
|
|
825
821
|
decimalSeparator: '.',
|
|
826
|
-
thousandsSeparator: ','
|
|
822
|
+
thousandsSeparator: ',',
|
|
827
823
|
},
|
|
828
824
|
MKD: {
|
|
829
825
|
prefix: 'ден',
|
|
830
826
|
suffix: '',
|
|
831
827
|
decimals: 2,
|
|
832
828
|
decimalSeparator: '.',
|
|
833
|
-
thousandsSeparator: ','
|
|
829
|
+
thousandsSeparator: ',',
|
|
834
830
|
},
|
|
835
831
|
MMK: {
|
|
836
832
|
prefix: 'K',
|
|
837
833
|
suffix: '',
|
|
838
834
|
decimals: 2,
|
|
839
835
|
decimalSeparator: '.',
|
|
840
|
-
thousandsSeparator: ','
|
|
836
|
+
thousandsSeparator: ',',
|
|
841
837
|
},
|
|
842
838
|
MNT: {
|
|
843
839
|
prefix: '₮',
|
|
844
840
|
suffix: '',
|
|
845
841
|
decimals: 2,
|
|
846
842
|
decimalSeparator: '.',
|
|
847
|
-
thousandsSeparator: ','
|
|
843
|
+
thousandsSeparator: ',',
|
|
848
844
|
},
|
|
849
845
|
MOP: {
|
|
850
846
|
prefix: 'P',
|
|
851
847
|
suffix: '',
|
|
852
848
|
decimals: 2,
|
|
853
849
|
decimalSeparator: '.',
|
|
854
|
-
thousandsSeparator: ','
|
|
850
|
+
thousandsSeparator: ',',
|
|
855
851
|
},
|
|
856
852
|
MRU: {
|
|
857
853
|
prefix: 'UM',
|
|
858
854
|
suffix: '',
|
|
859
855
|
decimals: 1,
|
|
860
856
|
decimalSeparator: '.',
|
|
861
|
-
thousandsSeparator: ','
|
|
857
|
+
thousandsSeparator: ',',
|
|
862
858
|
},
|
|
863
859
|
MUR: {
|
|
864
860
|
prefix: '₨',
|
|
865
861
|
suffix: '',
|
|
866
862
|
decimals: 2,
|
|
867
863
|
decimalSeparator: '.',
|
|
868
|
-
thousandsSeparator: ','
|
|
864
|
+
thousandsSeparator: ',',
|
|
869
865
|
},
|
|
870
866
|
MVR: {
|
|
871
867
|
prefix: '¤',
|
|
872
868
|
suffix: '',
|
|
873
869
|
decimals: 2,
|
|
874
870
|
decimalSeparator: '.',
|
|
875
|
-
thousandsSeparator: ','
|
|
871
|
+
thousandsSeparator: ',',
|
|
876
872
|
},
|
|
877
873
|
MWK: {
|
|
878
874
|
prefix: 'MK',
|
|
879
875
|
suffix: '',
|
|
880
876
|
decimals: 2,
|
|
881
877
|
decimalSeparator: '.',
|
|
882
|
-
thousandsSeparator: ','
|
|
878
|
+
thousandsSeparator: ',',
|
|
883
879
|
},
|
|
884
880
|
MXN: {
|
|
885
881
|
prefix: '$',
|
|
886
882
|
suffix: '',
|
|
887
883
|
decimals: 2,
|
|
888
884
|
decimalSeparator: '.',
|
|
889
|
-
thousandsSeparator: ','
|
|
885
|
+
thousandsSeparator: ',',
|
|
890
886
|
},
|
|
891
887
|
MYR: {
|
|
892
888
|
prefix: 'RM',
|
|
893
889
|
suffix: '',
|
|
894
890
|
decimals: 2,
|
|
895
891
|
decimalSeparator: '.',
|
|
896
|
-
thousandsSeparator: ','
|
|
892
|
+
thousandsSeparator: ',',
|
|
897
893
|
},
|
|
898
894
|
MZN: {
|
|
899
895
|
prefix: 'MTn',
|
|
900
896
|
suffix: '',
|
|
901
897
|
decimals: 2,
|
|
902
898
|
decimalSeparator: '.',
|
|
903
|
-
thousandsSeparator: ','
|
|
899
|
+
thousandsSeparator: ',',
|
|
904
900
|
},
|
|
905
901
|
NAD: {
|
|
906
902
|
prefix: '$',
|
|
907
903
|
suffix: '',
|
|
908
904
|
decimals: 2,
|
|
909
905
|
decimalSeparator: '.',
|
|
910
|
-
thousandsSeparator: ','
|
|
906
|
+
thousandsSeparator: ',',
|
|
911
907
|
},
|
|
912
908
|
NGN: {
|
|
913
909
|
prefix: '₦',
|
|
914
910
|
suffix: '',
|
|
915
911
|
decimals: 2,
|
|
916
912
|
decimalSeparator: '.',
|
|
917
|
-
thousandsSeparator: ','
|
|
913
|
+
thousandsSeparator: ',',
|
|
918
914
|
},
|
|
919
915
|
NIO: {
|
|
920
916
|
prefix: 'C$',
|
|
921
917
|
suffix: '',
|
|
922
918
|
decimals: 2,
|
|
923
919
|
decimalSeparator: '.',
|
|
924
|
-
thousandsSeparator: ','
|
|
920
|
+
thousandsSeparator: ',',
|
|
925
921
|
},
|
|
926
922
|
NOK: {
|
|
927
923
|
prefix: 'kr',
|
|
928
924
|
suffix: '',
|
|
929
925
|
decimals: 2,
|
|
930
926
|
decimalSeparator: '.',
|
|
931
|
-
thousandsSeparator: ','
|
|
927
|
+
thousandsSeparator: ',',
|
|
932
928
|
},
|
|
933
929
|
NPR: {
|
|
934
930
|
prefix: '₨',
|
|
935
931
|
suffix: '',
|
|
936
932
|
decimals: 2,
|
|
937
933
|
decimalSeparator: '.',
|
|
938
|
-
thousandsSeparator: ','
|
|
934
|
+
thousandsSeparator: ',',
|
|
939
935
|
},
|
|
940
936
|
NZD: {
|
|
941
937
|
prefix: '$',
|
|
942
938
|
suffix: '',
|
|
943
939
|
decimals: 2,
|
|
944
940
|
decimalSeparator: '.',
|
|
945
|
-
thousandsSeparator: ','
|
|
941
|
+
thousandsSeparator: ',',
|
|
946
942
|
},
|
|
947
943
|
OMR: {
|
|
948
944
|
prefix: '',
|
|
949
945
|
suffix: 'ر.ع.',
|
|
950
946
|
decimals: 3,
|
|
951
947
|
decimalSeparator: '.',
|
|
952
|
-
thousandsSeparator: ','
|
|
948
|
+
thousandsSeparator: ',',
|
|
953
949
|
},
|
|
954
950
|
PAB: {
|
|
955
951
|
prefix: 'B/.',
|
|
956
952
|
suffix: '',
|
|
957
953
|
decimals: 2,
|
|
958
954
|
decimalSeparator: '.',
|
|
959
|
-
thousandsSeparator: ','
|
|
955
|
+
thousandsSeparator: ',',
|
|
960
956
|
},
|
|
961
957
|
PEN: {
|
|
962
958
|
prefix: 'S/.',
|
|
963
959
|
suffix: '',
|
|
964
960
|
decimals: 2,
|
|
965
961
|
decimalSeparator: '.',
|
|
966
|
-
thousandsSeparator: ','
|
|
962
|
+
thousandsSeparator: ',',
|
|
967
963
|
},
|
|
968
964
|
PGK: {
|
|
969
965
|
prefix: 'K',
|
|
970
966
|
suffix: '',
|
|
971
967
|
decimals: 2,
|
|
972
968
|
decimalSeparator: '.',
|
|
973
|
-
thousandsSeparator: ','
|
|
969
|
+
thousandsSeparator: ',',
|
|
974
970
|
},
|
|
975
971
|
PHP: {
|
|
976
972
|
prefix: 'p',
|
|
977
973
|
suffix: '',
|
|
978
974
|
decimals: 2,
|
|
979
975
|
decimalSeparator: '.',
|
|
980
|
-
thousandsSeparator: ','
|
|
976
|
+
thousandsSeparator: ',',
|
|
981
977
|
},
|
|
982
978
|
PKR: {
|
|
983
979
|
prefix: '₨',
|
|
984
980
|
suffix: '',
|
|
985
981
|
decimals: 2,
|
|
986
982
|
decimalSeparator: '.',
|
|
987
|
-
thousandsSeparator: ','
|
|
983
|
+
thousandsSeparator: ',',
|
|
988
984
|
},
|
|
989
985
|
PLN: {
|
|
990
986
|
prefix: 'zł',
|
|
991
987
|
suffix: '',
|
|
992
988
|
decimals: 2,
|
|
993
989
|
decimalSeparator: '.',
|
|
994
|
-
thousandsSeparator: ','
|
|
990
|
+
thousandsSeparator: ',',
|
|
995
991
|
},
|
|
996
992
|
PYG: {
|
|
997
993
|
prefix: '¤',
|
|
998
994
|
suffix: '',
|
|
999
995
|
decimals: 0,
|
|
1000
996
|
decimalSeparator: '.',
|
|
1001
|
-
thousandsSeparator: ','
|
|
997
|
+
thousandsSeparator: ',',
|
|
1002
998
|
},
|
|
1003
999
|
QAR: {
|
|
1004
1000
|
prefix: '',
|
|
1005
1001
|
suffix: 'ر.ق',
|
|
1006
1002
|
decimals: 2,
|
|
1007
1003
|
decimalSeparator: '.',
|
|
1008
|
-
thousandsSeparator: ','
|
|
1004
|
+
thousandsSeparator: ',',
|
|
1009
1005
|
},
|
|
1010
1006
|
RON: {
|
|
1011
1007
|
prefix: 'L',
|
|
1012
1008
|
suffix: '',
|
|
1013
1009
|
decimals: 2,
|
|
1014
1010
|
decimalSeparator: '.',
|
|
1015
|
-
thousandsSeparator: ','
|
|
1011
|
+
thousandsSeparator: ',',
|
|
1016
1012
|
},
|
|
1017
1013
|
RSD: {
|
|
1018
1014
|
prefix: 'дин.',
|
|
1019
1015
|
suffix: '',
|
|
1020
1016
|
decimals: 2,
|
|
1021
1017
|
decimalSeparator: '.',
|
|
1022
|
-
thousandsSeparator: ','
|
|
1018
|
+
thousandsSeparator: ',',
|
|
1023
1019
|
},
|
|
1024
1020
|
RUB: {
|
|
1025
1021
|
prefix: 'руб.',
|
|
1026
1022
|
suffix: '',
|
|
1027
1023
|
decimals: 2,
|
|
1028
1024
|
decimalSeparator: '.',
|
|
1029
|
-
thousandsSeparator: ','
|
|
1025
|
+
thousandsSeparator: ',',
|
|
1030
1026
|
},
|
|
1031
1027
|
RWF: {
|
|
1032
1028
|
prefix: 'Fr',
|
|
1033
1029
|
suffix: '',
|
|
1034
1030
|
decimals: 0,
|
|
1035
1031
|
decimalSeparator: '.',
|
|
1036
|
-
thousandsSeparator: ','
|
|
1032
|
+
thousandsSeparator: ',',
|
|
1037
1033
|
},
|
|
1038
1034
|
SAR: {
|
|
1039
1035
|
prefix: '',
|
|
1040
1036
|
suffix: 'ر.س',
|
|
1041
1037
|
decimals: 2,
|
|
1042
1038
|
decimalSeparator: '.',
|
|
1043
|
-
thousandsSeparator: ','
|
|
1039
|
+
thousandsSeparator: ',',
|
|
1044
1040
|
},
|
|
1045
1041
|
SBD: {
|
|
1046
1042
|
prefix: '$',
|
|
1047
1043
|
suffix: '',
|
|
1048
1044
|
decimals: 2,
|
|
1049
1045
|
decimalSeparator: '.',
|
|
1050
|
-
thousandsSeparator: ','
|
|
1046
|
+
thousandsSeparator: ',',
|
|
1051
1047
|
},
|
|
1052
1048
|
SCR: {
|
|
1053
1049
|
prefix: '₨',
|
|
1054
1050
|
suffix: '',
|
|
1055
1051
|
decimals: 2,
|
|
1056
1052
|
decimalSeparator: '.',
|
|
1057
|
-
thousandsSeparator: ','
|
|
1053
|
+
thousandsSeparator: ',',
|
|
1058
1054
|
},
|
|
1059
1055
|
SDG: {
|
|
1060
1056
|
prefix: '£',
|
|
1061
1057
|
suffix: '',
|
|
1062
1058
|
decimals: 2,
|
|
1063
1059
|
decimalSeparator: '.',
|
|
1064
|
-
thousandsSeparator: ','
|
|
1060
|
+
thousandsSeparator: ',',
|
|
1065
1061
|
},
|
|
1066
1062
|
SEK: {
|
|
1067
1063
|
prefix: 'kr',
|
|
1068
1064
|
suffix: '',
|
|
1069
1065
|
decimals: 2,
|
|
1070
1066
|
decimalSeparator: '.',
|
|
1071
|
-
thousandsSeparator: ','
|
|
1067
|
+
thousandsSeparator: ',',
|
|
1072
1068
|
},
|
|
1073
1069
|
SGD: {
|
|
1074
1070
|
prefix: '$',
|
|
1075
1071
|
suffix: '',
|
|
1076
1072
|
decimals: 2,
|
|
1077
1073
|
decimalSeparator: '.',
|
|
1078
|
-
thousandsSeparator: ','
|
|
1074
|
+
thousandsSeparator: ',',
|
|
1079
1075
|
},
|
|
1080
1076
|
SHP: {
|
|
1081
1077
|
prefix: '£',
|
|
1082
1078
|
suffix: '',
|
|
1083
1079
|
decimals: 2,
|
|
1084
1080
|
decimalSeparator: '.',
|
|
1085
|
-
thousandsSeparator: ','
|
|
1081
|
+
thousandsSeparator: ',',
|
|
1086
1082
|
},
|
|
1087
1083
|
SKK: {
|
|
1088
1084
|
prefix: 'Sk',
|
|
1089
1085
|
suffix: '',
|
|
1090
1086
|
decimals: 2,
|
|
1091
1087
|
decimalSeparator: '.',
|
|
1092
|
-
thousandsSeparator: ','
|
|
1088
|
+
thousandsSeparator: ',',
|
|
1093
1089
|
},
|
|
1094
1090
|
SLL: {
|
|
1095
1091
|
prefix: 'Le',
|
|
1096
1092
|
suffix: '',
|
|
1097
1093
|
decimals: 2,
|
|
1098
1094
|
decimalSeparator: '.',
|
|
1099
|
-
thousandsSeparator: ','
|
|
1095
|
+
thousandsSeparator: ',',
|
|
1100
1096
|
},
|
|
1101
1097
|
SOS: {
|
|
1102
1098
|
prefix: 'Sh',
|
|
1103
1099
|
suffix: '',
|
|
1104
1100
|
decimals: 2,
|
|
1105
1101
|
decimalSeparator: '.',
|
|
1106
|
-
thousandsSeparator: ','
|
|
1102
|
+
thousandsSeparator: ',',
|
|
1107
1103
|
},
|
|
1108
1104
|
SRD: {
|
|
1109
1105
|
prefix: '$',
|
|
1110
1106
|
suffix: '',
|
|
1111
1107
|
decimals: 2,
|
|
1112
1108
|
decimalSeparator: '.',
|
|
1113
|
-
thousandsSeparator: ','
|
|
1109
|
+
thousandsSeparator: ',',
|
|
1114
1110
|
},
|
|
1115
1111
|
STN: {
|
|
1116
1112
|
prefix: 'Db',
|
|
1117
1113
|
suffix: '',
|
|
1118
1114
|
decimals: 2,
|
|
1119
1115
|
decimalSeparator: '.',
|
|
1120
|
-
thousandsSeparator: ','
|
|
1116
|
+
thousandsSeparator: ',',
|
|
1121
1117
|
},
|
|
1122
1118
|
SVC: {
|
|
1123
1119
|
prefix: '₡',
|
|
1124
1120
|
suffix: '',
|
|
1125
1121
|
decimals: 2,
|
|
1126
1122
|
decimalSeparator: '.',
|
|
1127
|
-
thousandsSeparator: ','
|
|
1123
|
+
thousandsSeparator: ',',
|
|
1128
1124
|
},
|
|
1129
1125
|
SYP: {
|
|
1130
1126
|
prefix: '£',
|
|
1131
1127
|
suffix: '',
|
|
1132
1128
|
decimals: 2,
|
|
1133
1129
|
decimalSeparator: '.',
|
|
1134
|
-
thousandsSeparator: ','
|
|
1130
|
+
thousandsSeparator: ',',
|
|
1135
1131
|
},
|
|
1136
1132
|
SZL: {
|
|
1137
1133
|
prefix: 'L',
|
|
1138
1134
|
suffix: '',
|
|
1139
1135
|
decimals: 2,
|
|
1140
1136
|
decimalSeparator: '.',
|
|
1141
|
-
thousandsSeparator: ','
|
|
1137
|
+
thousandsSeparator: ',',
|
|
1142
1138
|
},
|
|
1143
1139
|
THB: {
|
|
1144
1140
|
prefix: '฿',
|
|
1145
1141
|
suffix: '',
|
|
1146
1142
|
decimals: 2,
|
|
1147
1143
|
decimalSeparator: '.',
|
|
1148
|
-
thousandsSeparator: ','
|
|
1144
|
+
thousandsSeparator: ',',
|
|
1149
1145
|
},
|
|
1150
1146
|
TJS: {
|
|
1151
1147
|
prefix: 'ЅМ',
|
|
1152
1148
|
suffix: '',
|
|
1153
1149
|
decimals: 2,
|
|
1154
1150
|
decimalSeparator: '.',
|
|
1155
|
-
thousandsSeparator: ','
|
|
1151
|
+
thousandsSeparator: ',',
|
|
1156
1152
|
},
|
|
1157
1153
|
TMM: {
|
|
1158
1154
|
prefix: 'm',
|
|
1159
1155
|
suffix: '',
|
|
1160
1156
|
decimals: 2,
|
|
1161
1157
|
decimalSeparator: '.',
|
|
1162
|
-
thousandsSeparator: ','
|
|
1158
|
+
thousandsSeparator: ',',
|
|
1163
1159
|
},
|
|
1164
1160
|
TND: {
|
|
1165
1161
|
prefix: '',
|
|
1166
1162
|
suffix: 'د.ت',
|
|
1167
1163
|
decimals: 3,
|
|
1168
1164
|
decimalSeparator: '.',
|
|
1169
|
-
thousandsSeparator: ','
|
|
1165
|
+
thousandsSeparator: ',',
|
|
1170
1166
|
},
|
|
1171
1167
|
TOP: {
|
|
1172
1168
|
prefix: 'T$',
|
|
1173
1169
|
suffix: '',
|
|
1174
1170
|
decimals: 2,
|
|
1175
1171
|
decimalSeparator: '.',
|
|
1176
|
-
thousandsSeparator: ','
|
|
1172
|
+
thousandsSeparator: ',',
|
|
1177
1173
|
},
|
|
1178
1174
|
TRY: {
|
|
1179
1175
|
prefix: 'YTL',
|
|
1180
1176
|
suffix: '',
|
|
1181
1177
|
decimals: 2,
|
|
1182
1178
|
decimalSeparator: '.',
|
|
1183
|
-
thousandsSeparator: ','
|
|
1179
|
+
thousandsSeparator: ',',
|
|
1184
1180
|
},
|
|
1185
1181
|
TTD: {
|
|
1186
1182
|
prefix: '$',
|
|
1187
1183
|
suffix: '',
|
|
1188
1184
|
decimals: 2,
|
|
1189
1185
|
decimalSeparator: '.',
|
|
1190
|
-
thousandsSeparator: ','
|
|
1186
|
+
thousandsSeparator: ',',
|
|
1191
1187
|
},
|
|
1192
1188
|
TWD: {
|
|
1193
1189
|
prefix: '$',
|
|
1194
1190
|
suffix: '',
|
|
1195
1191
|
decimals: 2,
|
|
1196
1192
|
decimalSeparator: '.',
|
|
1197
|
-
thousandsSeparator: ','
|
|
1193
|
+
thousandsSeparator: ',',
|
|
1198
1194
|
},
|
|
1199
1195
|
TZS: {
|
|
1200
1196
|
prefix: 'Sh',
|
|
1201
1197
|
suffix: '',
|
|
1202
1198
|
decimals: 2,
|
|
1203
1199
|
decimalSeparator: '.',
|
|
1204
|
-
thousandsSeparator: ','
|
|
1200
|
+
thousandsSeparator: ',',
|
|
1205
1201
|
},
|
|
1206
1202
|
UAH: {
|
|
1207
1203
|
prefix: '¤',
|
|
1208
1204
|
suffix: '',
|
|
1209
1205
|
decimals: 2,
|
|
1210
1206
|
decimalSeparator: '.',
|
|
1211
|
-
thousandsSeparator: ','
|
|
1207
|
+
thousandsSeparator: ',',
|
|
1212
1208
|
},
|
|
1213
1209
|
UGX: {
|
|
1214
1210
|
prefix: 'Sh',
|
|
1215
1211
|
suffix: '',
|
|
1216
1212
|
decimals: 0,
|
|
1217
1213
|
decimalSeparator: '.',
|
|
1218
|
-
thousandsSeparator: ','
|
|
1214
|
+
thousandsSeparator: ',',
|
|
1219
1215
|
},
|
|
1220
1216
|
USD: {
|
|
1221
1217
|
prefix: '$',
|
|
1222
1218
|
suffix: '',
|
|
1223
1219
|
decimals: 2,
|
|
1224
1220
|
decimalSeparator: '.',
|
|
1225
|
-
thousandsSeparator: ','
|
|
1221
|
+
thousandsSeparator: ',',
|
|
1226
1222
|
},
|
|
1227
1223
|
UYU: {
|
|
1228
1224
|
prefix: '$',
|
|
1229
1225
|
suffix: '',
|
|
1230
1226
|
decimals: 0,
|
|
1231
1227
|
decimalSeparator: '.',
|
|
1232
|
-
thousandsSeparator: ','
|
|
1228
|
+
thousandsSeparator: ',',
|
|
1233
1229
|
},
|
|
1234
1230
|
UZS: {
|
|
1235
1231
|
prefix: '¤',
|
|
1236
1232
|
suffix: '',
|
|
1237
1233
|
decimals: 2,
|
|
1238
1234
|
decimalSeparator: '.',
|
|
1239
|
-
thousandsSeparator: ','
|
|
1235
|
+
thousandsSeparator: ',',
|
|
1240
1236
|
},
|
|
1241
1237
|
VEF: {
|
|
1242
1238
|
prefix: 'Bs F',
|
|
1243
1239
|
suffix: '',
|
|
1244
1240
|
decimals: 2,
|
|
1245
1241
|
decimalSeparator: '.',
|
|
1246
|
-
thousandsSeparator: ','
|
|
1242
|
+
thousandsSeparator: ',',
|
|
1247
1243
|
},
|
|
1248
1244
|
VND: {
|
|
1249
1245
|
prefix: '₫',
|
|
1250
1246
|
suffix: '',
|
|
1251
1247
|
decimals: 0,
|
|
1252
1248
|
decimalSeparator: '.',
|
|
1253
|
-
thousandsSeparator: ','
|
|
1249
|
+
thousandsSeparator: ',',
|
|
1254
1250
|
},
|
|
1255
1251
|
VUV: {
|
|
1256
1252
|
prefix: 'Vt',
|
|
1257
1253
|
suffix: '',
|
|
1258
1254
|
decimals: 0,
|
|
1259
1255
|
decimalSeparator: '.',
|
|
1260
|
-
thousandsSeparator: ','
|
|
1256
|
+
thousandsSeparator: ',',
|
|
1261
1257
|
},
|
|
1262
1258
|
WST: {
|
|
1263
1259
|
prefix: 'T',
|
|
1264
1260
|
suffix: '',
|
|
1265
1261
|
decimals: 2,
|
|
1266
1262
|
decimalSeparator: '.',
|
|
1267
|
-
thousandsSeparator: ','
|
|
1263
|
+
thousandsSeparator: ',',
|
|
1268
1264
|
},
|
|
1269
1265
|
XAF: {
|
|
1270
1266
|
prefix: 'Fr',
|
|
1271
1267
|
suffix: '',
|
|
1272
1268
|
decimals: 0,
|
|
1273
1269
|
decimalSeparator: '.',
|
|
1274
|
-
thousandsSeparator: ','
|
|
1270
|
+
thousandsSeparator: ',',
|
|
1275
1271
|
},
|
|
1276
1272
|
XCD: {
|
|
1277
1273
|
prefix: '$',
|
|
1278
1274
|
suffix: '',
|
|
1279
1275
|
decimals: 2,
|
|
1280
1276
|
decimalSeparator: '.',
|
|
1281
|
-
thousandsSeparator: ','
|
|
1277
|
+
thousandsSeparator: ',',
|
|
1282
1278
|
},
|
|
1283
1279
|
XOF: {
|
|
1284
1280
|
prefix: 'Fr',
|
|
1285
1281
|
suffix: '',
|
|
1286
1282
|
decimals: 0,
|
|
1287
1283
|
decimalSeparator: '.',
|
|
1288
|
-
thousandsSeparator: ','
|
|
1284
|
+
thousandsSeparator: ',',
|
|
1289
1285
|
},
|
|
1290
1286
|
XPF: {
|
|
1291
1287
|
prefix: 'Fr',
|
|
1292
1288
|
suffix: '',
|
|
1293
1289
|
decimals: 0,
|
|
1294
1290
|
decimalSeparator: '.',
|
|
1295
|
-
thousandsSeparator: ','
|
|
1291
|
+
thousandsSeparator: ',',
|
|
1296
1292
|
},
|
|
1297
1293
|
YER: {
|
|
1298
1294
|
prefix: '¤',
|
|
1299
1295
|
suffix: '',
|
|
1300
1296
|
decimals: 2,
|
|
1301
1297
|
decimalSeparator: '.',
|
|
1302
|
-
thousandsSeparator: ','
|
|
1298
|
+
thousandsSeparator: ',',
|
|
1303
1299
|
},
|
|
1304
1300
|
ZAR: {
|
|
1305
1301
|
prefix: 'R',
|
|
1306
1302
|
suffix: '',
|
|
1307
1303
|
decimals: 2,
|
|
1308
1304
|
decimalSeparator: '.',
|
|
1309
|
-
thousandsSeparator: ','
|
|
1305
|
+
thousandsSeparator: ',',
|
|
1310
1306
|
},
|
|
1311
1307
|
ZMW: {
|
|
1312
1308
|
prefix: 'ZK',
|
|
1313
1309
|
suffix: '',
|
|
1314
1310
|
decimals: 2,
|
|
1315
1311
|
decimalSeparator: '.',
|
|
1316
|
-
thousandsSeparator: ','
|
|
1312
|
+
thousandsSeparator: ',',
|
|
1317
1313
|
},
|
|
1318
1314
|
ZWD: {
|
|
1319
1315
|
prefix: '$',
|
|
1320
1316
|
suffix: '',
|
|
1321
1317
|
decimals: 2,
|
|
1322
1318
|
decimalSeparator: '.',
|
|
1323
|
-
thousandsSeparator: ','
|
|
1324
|
-
} // '$9,999.99'
|
|
1319
|
+
thousandsSeparator: ',',
|
|
1320
|
+
}, // '$9,999.99'
|
|
1325
1321
|
};
|
|
1326
1322
|
function formatCurrency(value, currencyCode = 'USD', explicit = false) {
|
|
1327
1323
|
let processedCurrencyCode = currencyCode || '';
|
|
@@ -1341,52 +1337,52 @@ function formatCurrency(value, currencyCode = 'USD', explicit = false) {
|
|
|
1341
1337
|
const phoneNumberFormats = {
|
|
1342
1338
|
AF: {
|
|
1343
1339
|
mask: '(##) #######',
|
|
1344
|
-
prefix: '+93 '
|
|
1340
|
+
prefix: '+93 ',
|
|
1345
1341
|
},
|
|
1346
1342
|
AL: {
|
|
1347
1343
|
mask: '#######',
|
|
1348
|
-
prefix: '+355 '
|
|
1344
|
+
prefix: '+355 ',
|
|
1349
1345
|
},
|
|
1350
1346
|
DZ: {
|
|
1351
1347
|
mask: '(##) ###-###',
|
|
1352
|
-
prefix: '+213 '
|
|
1348
|
+
prefix: '+213 ',
|
|
1353
1349
|
},
|
|
1354
1350
|
// AS
|
|
1355
1351
|
AD: {
|
|
1356
1352
|
mask: '(#) #####',
|
|
1357
|
-
prefix: '+376 '
|
|
1353
|
+
prefix: '+376 ',
|
|
1358
1354
|
},
|
|
1359
1355
|
AO: {
|
|
1360
1356
|
mask: '#########',
|
|
1361
|
-
prefix: '+244 '
|
|
1357
|
+
prefix: '+244 ',
|
|
1362
1358
|
},
|
|
1363
1359
|
AI: {
|
|
1364
1360
|
mask: '(###) ###-####',
|
|
1365
|
-
prefix: '+1 '
|
|
1361
|
+
prefix: '+1 ',
|
|
1366
1362
|
},
|
|
1367
1363
|
AG: {
|
|
1368
1364
|
mask: '(###) ###-####',
|
|
1369
|
-
prefix: '+1 '
|
|
1365
|
+
prefix: '+1 ',
|
|
1370
1366
|
},
|
|
1371
1367
|
AR: {
|
|
1372
1368
|
mask: '##########',
|
|
1373
|
-
prefix: '+54 '
|
|
1369
|
+
prefix: '+54 ',
|
|
1374
1370
|
},
|
|
1375
1371
|
AM: {
|
|
1376
1372
|
mask: '########',
|
|
1377
|
-
prefix: '+375 '
|
|
1373
|
+
prefix: '+375 ',
|
|
1378
1374
|
},
|
|
1379
1375
|
AQ: {
|
|
1380
1376
|
mask: '##-####',
|
|
1381
|
-
prefix: '+672 '
|
|
1377
|
+
prefix: '+672 ',
|
|
1382
1378
|
},
|
|
1383
1379
|
AW: {
|
|
1384
1380
|
mask: '###-####',
|
|
1385
|
-
prefix: '+297 '
|
|
1381
|
+
prefix: '+297 ',
|
|
1386
1382
|
},
|
|
1387
1383
|
AU: {
|
|
1388
1384
|
mask: '(##) ####-####',
|
|
1389
|
-
prefix: '+61 '
|
|
1385
|
+
prefix: '+61 ',
|
|
1390
1386
|
},
|
|
1391
1387
|
/* AT: {
|
|
1392
1388
|
mask:'####?????????',
|
|
@@ -1394,7 +1390,7 @@ const phoneNumberFormats = {
|
|
|
1394
1390
|
}, */
|
|
1395
1391
|
AT: {
|
|
1396
1392
|
mask: '#############',
|
|
1397
|
-
prefix: '+43 '
|
|
1393
|
+
prefix: '+43 ',
|
|
1398
1394
|
},
|
|
1399
1395
|
/* AZ: {
|
|
1400
1396
|
mask:'########?',
|
|
@@ -1402,15 +1398,15 @@ const phoneNumberFormats = {
|
|
|
1402
1398
|
}, */
|
|
1403
1399
|
AZ: {
|
|
1404
1400
|
mask: '#########',
|
|
1405
|
-
prefix: '+994 '
|
|
1401
|
+
prefix: '+994 ',
|
|
1406
1402
|
},
|
|
1407
1403
|
BS: {
|
|
1408
1404
|
mask: '(###) ###-####',
|
|
1409
|
-
prefix: '+1 '
|
|
1405
|
+
prefix: '+1 ',
|
|
1410
1406
|
},
|
|
1411
1407
|
BH: {
|
|
1412
1408
|
mask: '####-####',
|
|
1413
|
-
prefix: '+973 '
|
|
1409
|
+
prefix: '+973 ',
|
|
1414
1410
|
},
|
|
1415
1411
|
/* BD: {
|
|
1416
1412
|
mask:'#######??',
|
|
@@ -1418,43 +1414,43 @@ const phoneNumberFormats = {
|
|
|
1418
1414
|
}, */
|
|
1419
1415
|
BD: {
|
|
1420
1416
|
mask: '#########',
|
|
1421
|
-
prefix: '+880 '
|
|
1417
|
+
prefix: '+880 ',
|
|
1422
1418
|
},
|
|
1423
1419
|
BB: {
|
|
1424
1420
|
mask: '(###) ###-####',
|
|
1425
|
-
prefix: '+1 '
|
|
1421
|
+
prefix: '+1 ',
|
|
1426
1422
|
},
|
|
1427
1423
|
BY: {
|
|
1428
1424
|
mask: '#########',
|
|
1429
|
-
prefix: '+375 '
|
|
1425
|
+
prefix: '+375 ',
|
|
1430
1426
|
},
|
|
1431
1427
|
BE: {
|
|
1432
1428
|
mask: '########??',
|
|
1433
|
-
prefix: '+32 '
|
|
1429
|
+
prefix: '+32 ',
|
|
1434
1430
|
},
|
|
1435
1431
|
BZ: {
|
|
1436
1432
|
mask: '#######',
|
|
1437
|
-
prefix: '+501 '
|
|
1433
|
+
prefix: '+501 ',
|
|
1438
1434
|
},
|
|
1439
1435
|
BJ: {
|
|
1440
1436
|
mask: '(##) ###-###',
|
|
1441
|
-
prefix: '+229 '
|
|
1437
|
+
prefix: '+229 ',
|
|
1442
1438
|
},
|
|
1443
1439
|
BM: {
|
|
1444
1440
|
mask: '(###) ###-####',
|
|
1445
|
-
prefix: '+1 '
|
|
1441
|
+
prefix: '+1 ',
|
|
1446
1442
|
},
|
|
1447
1443
|
BT: {
|
|
1448
1444
|
mask: '(#) ###-###',
|
|
1449
|
-
prefix: '+975 '
|
|
1445
|
+
prefix: '+975 ',
|
|
1450
1446
|
},
|
|
1451
1447
|
BO: {
|
|
1452
1448
|
mask: '(#) ###-####',
|
|
1453
|
-
prefix: '+591 '
|
|
1449
|
+
prefix: '+591 ',
|
|
1454
1450
|
},
|
|
1455
1451
|
BA: {
|
|
1456
1452
|
mask: '(##) ##-##-##',
|
|
1457
|
-
prefix: '+387 '
|
|
1453
|
+
prefix: '+387 ',
|
|
1458
1454
|
},
|
|
1459
1455
|
/* BW: {
|
|
1460
1456
|
mask:'#######?',
|
|
@@ -1462,55 +1458,55 @@ const phoneNumberFormats = {
|
|
|
1462
1458
|
}, */
|
|
1463
1459
|
BW: {
|
|
1464
1460
|
mask: '########',
|
|
1465
|
-
prefix: '+267 '
|
|
1461
|
+
prefix: '+267 ',
|
|
1466
1462
|
},
|
|
1467
1463
|
BR: {
|
|
1468
1464
|
mask: '(##) ####-####',
|
|
1469
|
-
prefix: '+55 '
|
|
1465
|
+
prefix: '+55 ',
|
|
1470
1466
|
},
|
|
1471
1467
|
BN: {
|
|
1472
1468
|
mask: '###-####',
|
|
1473
|
-
prefix: '+673 '
|
|
1469
|
+
prefix: '+673 ',
|
|
1474
1470
|
},
|
|
1475
1471
|
BG: {
|
|
1476
1472
|
mask: '#######?',
|
|
1477
|
-
prefix: '+359 '
|
|
1473
|
+
prefix: '+359 ',
|
|
1478
1474
|
},
|
|
1479
1475
|
BF: {
|
|
1480
1476
|
mask: '##-##-##-##',
|
|
1481
|
-
prefix: '+226 '
|
|
1477
|
+
prefix: '+226 ',
|
|
1482
1478
|
},
|
|
1483
1479
|
BI: {
|
|
1484
1480
|
mask: '####-####',
|
|
1485
|
-
prefix: '+257 '
|
|
1481
|
+
prefix: '+257 ',
|
|
1486
1482
|
},
|
|
1487
1483
|
KH: {
|
|
1488
1484
|
mask: '(##) ######',
|
|
1489
|
-
prefix: '+855 '
|
|
1485
|
+
prefix: '+855 ',
|
|
1490
1486
|
},
|
|
1491
1487
|
CM: {
|
|
1492
1488
|
mask: '####-####',
|
|
1493
|
-
prefix: '+237 '
|
|
1489
|
+
prefix: '+237 ',
|
|
1494
1490
|
},
|
|
1495
1491
|
CA: {
|
|
1496
1492
|
mask: '(###) ###-####',
|
|
1497
|
-
prefix: '+1 '
|
|
1493
|
+
prefix: '+1 ',
|
|
1498
1494
|
},
|
|
1499
1495
|
CV: {
|
|
1500
1496
|
mask: '###-####',
|
|
1501
|
-
prefix: '+238 '
|
|
1497
|
+
prefix: '+238 ',
|
|
1502
1498
|
},
|
|
1503
1499
|
KY: {
|
|
1504
1500
|
mask: '(###) ###-####',
|
|
1505
|
-
prefix: '+1 '
|
|
1501
|
+
prefix: '+1 ',
|
|
1506
1502
|
},
|
|
1507
1503
|
CF: {
|
|
1508
1504
|
mask: '###-###',
|
|
1509
|
-
prefix: '+236 '
|
|
1505
|
+
prefix: '+236 ',
|
|
1510
1506
|
},
|
|
1511
1507
|
TD: {
|
|
1512
1508
|
mask: '###-##-##',
|
|
1513
|
-
prefix: '+235 '
|
|
1509
|
+
prefix: '+235 ',
|
|
1514
1510
|
},
|
|
1515
1511
|
/* CL: {
|
|
1516
1512
|
mask:'########?',
|
|
@@ -1518,7 +1514,7 @@ const phoneNumberFormats = {
|
|
|
1518
1514
|
}, */
|
|
1519
1515
|
CL: {
|
|
1520
1516
|
mask: '#########',
|
|
1521
|
-
prefix: '+56 '
|
|
1517
|
+
prefix: '+56 ',
|
|
1522
1518
|
},
|
|
1523
1519
|
/* CN: {
|
|
1524
1520
|
mask:'########???',
|
|
@@ -1526,7 +1522,7 @@ const phoneNumberFormats = {
|
|
|
1526
1522
|
}, */
|
|
1527
1523
|
CN: {
|
|
1528
1524
|
mask: '###########',
|
|
1529
|
-
prefix: '+86 '
|
|
1525
|
+
prefix: '+86 ',
|
|
1530
1526
|
},
|
|
1531
1527
|
/* CO: {
|
|
1532
1528
|
mask:'########??',
|
|
@@ -1534,32 +1530,32 @@ const phoneNumberFormats = {
|
|
|
1534
1530
|
}, */
|
|
1535
1531
|
CO: {
|
|
1536
1532
|
mask: '##########',
|
|
1537
|
-
prefix: '57 '
|
|
1533
|
+
prefix: '57 ',
|
|
1538
1534
|
},
|
|
1539
1535
|
KM: {
|
|
1540
1536
|
mask: '###-####',
|
|
1541
|
-
prefix: '+269 '
|
|
1537
|
+
prefix: '+269 ',
|
|
1542
1538
|
},
|
|
1543
1539
|
CD: {
|
|
1544
1540
|
mask: '###-####',
|
|
1545
|
-
prefix: '+243 '
|
|
1541
|
+
prefix: '+243 ',
|
|
1546
1542
|
},
|
|
1547
1543
|
CG: {
|
|
1548
1544
|
mask: '###-####',
|
|
1549
|
-
prefix: '+242 '
|
|
1545
|
+
prefix: '+242 ',
|
|
1550
1546
|
},
|
|
1551
1547
|
// CK
|
|
1552
1548
|
CR: {
|
|
1553
1549
|
mask: '####-####',
|
|
1554
|
-
prefix: '+506 '
|
|
1550
|
+
prefix: '+506 ',
|
|
1555
1551
|
},
|
|
1556
1552
|
CI: {
|
|
1557
1553
|
mask: '####-####',
|
|
1558
|
-
prefix: '+225 '
|
|
1554
|
+
prefix: '+225 ',
|
|
1559
1555
|
},
|
|
1560
1556
|
HR: {
|
|
1561
1557
|
mask: '########?',
|
|
1562
|
-
prefix: '+385 '
|
|
1558
|
+
prefix: '+385 ',
|
|
1563
1559
|
},
|
|
1564
1560
|
/* CU: {
|
|
1565
1561
|
mask:'#####?ID:?????',
|
|
@@ -1567,39 +1563,39 @@ const phoneNumberFormats = {
|
|
|
1567
1563
|
}, */
|
|
1568
1564
|
CU: {
|
|
1569
1565
|
mask: '###########',
|
|
1570
|
-
prefix: '+53 '
|
|
1566
|
+
prefix: '+53 ',
|
|
1571
1567
|
},
|
|
1572
1568
|
CY: {
|
|
1573
1569
|
mask: '####-####',
|
|
1574
|
-
prefix: '+357 '
|
|
1570
|
+
prefix: '+357 ',
|
|
1575
1571
|
},
|
|
1576
1572
|
CZ: {
|
|
1577
1573
|
mask: '#########',
|
|
1578
|
-
prefix: '+420 '
|
|
1574
|
+
prefix: '+420 ',
|
|
1579
1575
|
},
|
|
1580
1576
|
DK: {
|
|
1581
1577
|
mask: '####-####',
|
|
1582
|
-
prefix: '+45 '
|
|
1578
|
+
prefix: '+45 ',
|
|
1583
1579
|
},
|
|
1584
1580
|
DJ: {
|
|
1585
1581
|
mask: '##-##-##-##',
|
|
1586
|
-
prefix: '+253 '
|
|
1582
|
+
prefix: '+253 ',
|
|
1587
1583
|
},
|
|
1588
1584
|
DM: {
|
|
1589
1585
|
mask: '(###) ###-####',
|
|
1590
|
-
prefix: '+1 '
|
|
1586
|
+
prefix: '+1 ',
|
|
1591
1587
|
},
|
|
1592
1588
|
DO: {
|
|
1593
1589
|
mask: '(###) ###-####',
|
|
1594
|
-
prefix: '+1 '
|
|
1590
|
+
prefix: '+1 ',
|
|
1595
1591
|
},
|
|
1596
1592
|
TL: {
|
|
1597
1593
|
mask: '###-####',
|
|
1598
|
-
prefix: '+670 '
|
|
1594
|
+
prefix: '+670 ',
|
|
1599
1595
|
},
|
|
1600
1596
|
EC: {
|
|
1601
1597
|
mask: '(##) ###-####',
|
|
1602
|
-
prefix: '+593 '
|
|
1598
|
+
prefix: '+593 ',
|
|
1603
1599
|
},
|
|
1604
1600
|
/* EG: {
|
|
1605
1601
|
mask:'########??',
|
|
@@ -1607,36 +1603,36 @@ const phoneNumberFormats = {
|
|
|
1607
1603
|
}, */
|
|
1608
1604
|
EG: {
|
|
1609
1605
|
mask: '##########',
|
|
1610
|
-
prefix: '+20 '
|
|
1606
|
+
prefix: '+20 ',
|
|
1611
1607
|
},
|
|
1612
1608
|
SV: {
|
|
1613
1609
|
mask: '####-####',
|
|
1614
|
-
prefix: '+503 '
|
|
1610
|
+
prefix: '+503 ',
|
|
1615
1611
|
},
|
|
1616
1612
|
GQ: {
|
|
1617
1613
|
mask: '##-####',
|
|
1618
|
-
prefix: '+240 '
|
|
1614
|
+
prefix: '+240 ',
|
|
1619
1615
|
},
|
|
1620
|
-
//ER:
|
|
1616
|
+
// ER:
|
|
1621
1617
|
EE: {
|
|
1622
1618
|
mask: '#######?',
|
|
1623
|
-
prefix: '+372 '
|
|
1619
|
+
prefix: '+372 ',
|
|
1624
1620
|
},
|
|
1625
1621
|
ET: {
|
|
1626
1622
|
mask: '(##) ###-####',
|
|
1627
|
-
prefix: '+251 '
|
|
1623
|
+
prefix: '+251 ',
|
|
1628
1624
|
},
|
|
1629
1625
|
FK: {
|
|
1630
1626
|
mask: '#####',
|
|
1631
|
-
prefix: '+500 '
|
|
1627
|
+
prefix: '+500 ',
|
|
1632
1628
|
},
|
|
1633
1629
|
FO: {
|
|
1634
1630
|
mask: '######',
|
|
1635
|
-
prefix: '+298 '
|
|
1631
|
+
prefix: '+298 ',
|
|
1636
1632
|
},
|
|
1637
1633
|
FJ: {
|
|
1638
1634
|
mask: '###-####',
|
|
1639
|
-
prefix: '+679 '
|
|
1635
|
+
prefix: '+679 ',
|
|
1640
1636
|
},
|
|
1641
1637
|
/* FI: {
|
|
1642
1638
|
mask:'#####???????',
|
|
@@ -1644,11 +1640,11 @@ const phoneNumberFormats = {
|
|
|
1644
1640
|
}, */
|
|
1645
1641
|
FI: {
|
|
1646
1642
|
mask: '############',
|
|
1647
|
-
prefix: '+358 '
|
|
1643
|
+
prefix: '+358 ',
|
|
1648
1644
|
},
|
|
1649
1645
|
FR: {
|
|
1650
1646
|
mask: '#########',
|
|
1651
|
-
prefix: '+33 '
|
|
1647
|
+
prefix: '+33 ',
|
|
1652
1648
|
},
|
|
1653
1649
|
/* GF: {
|
|
1654
1650
|
mask:'#########?',
|
|
@@ -1656,23 +1652,23 @@ const phoneNumberFormats = {
|
|
|
1656
1652
|
}, */
|
|
1657
1653
|
GF: {
|
|
1658
1654
|
mask: '##########',
|
|
1659
|
-
prefix: '+594 '
|
|
1655
|
+
prefix: '+594 ',
|
|
1660
1656
|
},
|
|
1661
1657
|
PF: {
|
|
1662
1658
|
mask: '######',
|
|
1663
|
-
prefix: '+689 '
|
|
1659
|
+
prefix: '+689 ',
|
|
1664
1660
|
},
|
|
1665
1661
|
GA: {
|
|
1666
1662
|
mask: '######?',
|
|
1667
|
-
prefix: '+241 '
|
|
1663
|
+
prefix: '+241 ',
|
|
1668
1664
|
},
|
|
1669
1665
|
GM: {
|
|
1670
1666
|
mask: '###-####',
|
|
1671
|
-
prefix: '+220 '
|
|
1667
|
+
prefix: '+220 ',
|
|
1672
1668
|
},
|
|
1673
1669
|
GE: {
|
|
1674
1670
|
mask: '########',
|
|
1675
|
-
prefix: '+995 '
|
|
1671
|
+
prefix: '+995 ',
|
|
1676
1672
|
},
|
|
1677
1673
|
/* DE: {
|
|
1678
1674
|
mask:'######?????',
|
|
@@ -1680,7 +1676,7 @@ const phoneNumberFormats = {
|
|
|
1680
1676
|
}, */
|
|
1681
1677
|
DE: {
|
|
1682
1678
|
mask: '###########',
|
|
1683
|
-
prefix: '+49 '
|
|
1679
|
+
prefix: '+49 ',
|
|
1684
1680
|
},
|
|
1685
1681
|
/* GH: {
|
|
1686
1682
|
mask:'########?',
|
|
@@ -1688,63 +1684,63 @@ const phoneNumberFormats = {
|
|
|
1688
1684
|
}, */
|
|
1689
1685
|
GH: {
|
|
1690
1686
|
mask: '#########',
|
|
1691
|
-
prefix: '+233 '
|
|
1687
|
+
prefix: '+233 ',
|
|
1692
1688
|
},
|
|
1693
1689
|
GI: {
|
|
1694
1690
|
mask: '####-####',
|
|
1695
|
-
prefix: '+350 '
|
|
1691
|
+
prefix: '+350 ',
|
|
1696
1692
|
},
|
|
1697
1693
|
GR: {
|
|
1698
1694
|
mask: '##########',
|
|
1699
|
-
prefix: '+30 '
|
|
1695
|
+
prefix: '+30 ',
|
|
1700
1696
|
},
|
|
1701
1697
|
GL: {
|
|
1702
1698
|
mask: '###-###',
|
|
1703
|
-
prefix: '+299 '
|
|
1699
|
+
prefix: '+299 ',
|
|
1704
1700
|
},
|
|
1705
1701
|
GD: {
|
|
1706
1702
|
mask: '(###) ###-####',
|
|
1707
|
-
prefix: '+1 '
|
|
1703
|
+
prefix: '+1 ',
|
|
1708
1704
|
},
|
|
1709
1705
|
GP: {
|
|
1710
1706
|
mask: '##########',
|
|
1711
|
-
prefix: '+590 '
|
|
1707
|
+
prefix: '+590 ',
|
|
1712
1708
|
},
|
|
1713
1709
|
GU: {
|
|
1714
1710
|
mask: '(###) ###-####',
|
|
1715
|
-
prefix: '+1 '
|
|
1711
|
+
prefix: '+1 ',
|
|
1716
1712
|
},
|
|
1717
1713
|
GT: {
|
|
1718
1714
|
mask: '####-####',
|
|
1719
|
-
prefix: '+502 '
|
|
1715
|
+
prefix: '+502 ',
|
|
1720
1716
|
},
|
|
1721
1717
|
GN: {
|
|
1722
1718
|
mask: '####-####',
|
|
1723
|
-
prefix: '+224 '
|
|
1719
|
+
prefix: '+224 ',
|
|
1724
1720
|
},
|
|
1725
1721
|
GW: {
|
|
1726
1722
|
mask: '###-####',
|
|
1727
|
-
prefix: '+245 '
|
|
1723
|
+
prefix: '+245 ',
|
|
1728
1724
|
},
|
|
1729
1725
|
GY: {
|
|
1730
1726
|
mask: '(###) ####',
|
|
1731
|
-
prefix: '+592 '
|
|
1727
|
+
prefix: '+592 ',
|
|
1732
1728
|
},
|
|
1733
1729
|
HK: {
|
|
1734
1730
|
mask: '####-####',
|
|
1735
|
-
prefix: '+852 '
|
|
1731
|
+
prefix: '+852 ',
|
|
1736
1732
|
},
|
|
1737
1733
|
HN: {
|
|
1738
1734
|
mask: '########',
|
|
1739
|
-
prefix: '+504 '
|
|
1735
|
+
prefix: '+504 ',
|
|
1740
1736
|
},
|
|
1741
1737
|
HT: {
|
|
1742
1738
|
mask: '####-####',
|
|
1743
|
-
prefix: '+509 '
|
|
1739
|
+
prefix: '+509 ',
|
|
1744
1740
|
},
|
|
1745
1741
|
HU: {
|
|
1746
1742
|
mask: '########??',
|
|
1747
|
-
prefix: '+36 '
|
|
1743
|
+
prefix: '+36 ',
|
|
1748
1744
|
},
|
|
1749
1745
|
/* IS: {
|
|
1750
1746
|
mask:'#######??',
|
|
@@ -1752,11 +1748,11 @@ const phoneNumberFormats = {
|
|
|
1752
1748
|
}, */
|
|
1753
1749
|
IS: {
|
|
1754
1750
|
mask: '#########',
|
|
1755
|
-
prefix: '+354 '
|
|
1751
|
+
prefix: '+354 ',
|
|
1756
1752
|
},
|
|
1757
1753
|
IN: {
|
|
1758
1754
|
mask: '##########',
|
|
1759
|
-
prefix: '+91 '
|
|
1755
|
+
prefix: '+91 ',
|
|
1760
1756
|
},
|
|
1761
1757
|
/* ID: {
|
|
1762
1758
|
mask:'#######???',
|
|
@@ -1764,11 +1760,11 @@ const phoneNumberFormats = {
|
|
|
1764
1760
|
}, */
|
|
1765
1761
|
ID: {
|
|
1766
1762
|
mask: '##########',
|
|
1767
|
-
prefix: '+62 '
|
|
1763
|
+
prefix: '+62 ',
|
|
1768
1764
|
},
|
|
1769
1765
|
IR: {
|
|
1770
1766
|
mask: '##########',
|
|
1771
|
-
prefix: '+98 '
|
|
1767
|
+
prefix: '+98 ',
|
|
1772
1768
|
},
|
|
1773
1769
|
/* IQ: {
|
|
1774
1770
|
mask:'########??',
|
|
@@ -1776,7 +1772,7 @@ const phoneNumberFormats = {
|
|
|
1776
1772
|
}, */
|
|
1777
1773
|
IQ: {
|
|
1778
1774
|
mask: '##########',
|
|
1779
|
-
prefix: '+964 '
|
|
1775
|
+
prefix: '+964 ',
|
|
1780
1776
|
},
|
|
1781
1777
|
/* IE: {
|
|
1782
1778
|
mask:'#######??',
|
|
@@ -1784,7 +1780,7 @@ const phoneNumberFormats = {
|
|
|
1784
1780
|
}, */
|
|
1785
1781
|
IE: {
|
|
1786
1782
|
mask: '#########',
|
|
1787
|
-
prefix: '+353 '
|
|
1783
|
+
prefix: '+353 ',
|
|
1788
1784
|
},
|
|
1789
1785
|
/* IL: {
|
|
1790
1786
|
mask:'########?',
|
|
@@ -1792,7 +1788,7 @@ const phoneNumberFormats = {
|
|
|
1792
1788
|
}, */
|
|
1793
1789
|
IL: {
|
|
1794
1790
|
mask: '#########',
|
|
1795
|
-
prefix: '+972 '
|
|
1791
|
+
prefix: '+972 ',
|
|
1796
1792
|
},
|
|
1797
1793
|
/* IT: {
|
|
1798
1794
|
mask:'######????',
|
|
@@ -1800,15 +1796,15 @@ const phoneNumberFormats = {
|
|
|
1800
1796
|
}, */
|
|
1801
1797
|
IT: {
|
|
1802
1798
|
mask: '##########',
|
|
1803
|
-
prefix: '+39 '
|
|
1799
|
+
prefix: '+39 ',
|
|
1804
1800
|
},
|
|
1805
1801
|
JM: {
|
|
1806
1802
|
mask: '(###) ###-####',
|
|
1807
|
-
prefix: '+1 '
|
|
1803
|
+
prefix: '+1 ',
|
|
1808
1804
|
},
|
|
1809
1805
|
JP: {
|
|
1810
1806
|
mask: '#########',
|
|
1811
|
-
prefix: '+81 '
|
|
1807
|
+
prefix: '+81 ',
|
|
1812
1808
|
},
|
|
1813
1809
|
/* JO: {
|
|
1814
1810
|
mask:'#######??',
|
|
@@ -1816,11 +1812,11 @@ const phoneNumberFormats = {
|
|
|
1816
1812
|
}, */
|
|
1817
1813
|
JO: {
|
|
1818
1814
|
mask: '#########',
|
|
1819
|
-
prefix: '+962 '
|
|
1815
|
+
prefix: '+962 ',
|
|
1820
1816
|
},
|
|
1821
1817
|
KZ: {
|
|
1822
1818
|
mask: '(###) ####-###',
|
|
1823
|
-
prefix: '+7 '
|
|
1819
|
+
prefix: '+7 ',
|
|
1824
1820
|
},
|
|
1825
1821
|
/* KE: {
|
|
1826
1822
|
mask:'######????',
|
|
@@ -1828,44 +1824,44 @@ const phoneNumberFormats = {
|
|
|
1828
1824
|
}, */
|
|
1829
1825
|
KE: {
|
|
1830
1826
|
mask: '##########',
|
|
1831
|
-
prefix: '+254 '
|
|
1827
|
+
prefix: '+254 ',
|
|
1832
1828
|
},
|
|
1833
1829
|
KI: {
|
|
1834
1830
|
mask: '##-###',
|
|
1835
|
-
prefix: '+686 '
|
|
1831
|
+
prefix: '+686 ',
|
|
1836
1832
|
},
|
|
1837
|
-
//kp
|
|
1833
|
+
// kp
|
|
1838
1834
|
/* KR: {
|
|
1839
1835
|
mask:'####??????',
|
|
1840
1836
|
prefix: ''
|
|
1841
1837
|
}, */
|
|
1842
1838
|
KR: {
|
|
1843
1839
|
mask: '##########',
|
|
1844
|
-
prefix: '+82 '
|
|
1840
|
+
prefix: '+82 ',
|
|
1845
1841
|
},
|
|
1846
1842
|
KW: {
|
|
1847
1843
|
mask: '####-####',
|
|
1848
|
-
prefix: '+965 '
|
|
1844
|
+
prefix: '+965 ',
|
|
1849
1845
|
},
|
|
1850
1846
|
KG: {
|
|
1851
1847
|
mask: '#########',
|
|
1852
|
-
prefix: '+996 '
|
|
1848
|
+
prefix: '+996 ',
|
|
1853
1849
|
},
|
|
1854
1850
|
LA: {
|
|
1855
1851
|
mask: '########?',
|
|
1856
|
-
prefix: '+856 '
|
|
1852
|
+
prefix: '+856 ',
|
|
1857
1853
|
},
|
|
1858
1854
|
LV: {
|
|
1859
1855
|
mask: '####-####',
|
|
1860
|
-
prefix: '+371 '
|
|
1856
|
+
prefix: '+371 ',
|
|
1861
1857
|
},
|
|
1862
1858
|
LB: {
|
|
1863
1859
|
mask: '#######?',
|
|
1864
|
-
prefix: '+961 '
|
|
1860
|
+
prefix: '+961 ',
|
|
1865
1861
|
},
|
|
1866
1862
|
LS: {
|
|
1867
1863
|
mask: '##-###-###',
|
|
1868
|
-
prefix: '+266 '
|
|
1864
|
+
prefix: '+266 ',
|
|
1869
1865
|
},
|
|
1870
1866
|
// LR
|
|
1871
1867
|
/* LY: {
|
|
@@ -1874,15 +1870,15 @@ const phoneNumberFormats = {
|
|
|
1874
1870
|
}, */
|
|
1875
1871
|
LY: {
|
|
1876
1872
|
mask: '########?',
|
|
1877
|
-
prefix: '+218 '
|
|
1873
|
+
prefix: '+218 ',
|
|
1878
1874
|
},
|
|
1879
1875
|
LI: {
|
|
1880
1876
|
mask: '###-####',
|
|
1881
|
-
prefix: '+423 '
|
|
1877
|
+
prefix: '+423 ',
|
|
1882
1878
|
},
|
|
1883
1879
|
LT: {
|
|
1884
1880
|
mask: '########',
|
|
1885
|
-
prefix: '+370 '
|
|
1881
|
+
prefix: '+370 ',
|
|
1886
1882
|
},
|
|
1887
1883
|
/* LU: {
|
|
1888
1884
|
mask:'#####??????',
|
|
@@ -1890,19 +1886,19 @@ const phoneNumberFormats = {
|
|
|
1890
1886
|
}, */
|
|
1891
1887
|
LU: {
|
|
1892
1888
|
mask: '###########',
|
|
1893
|
-
prefix: '+352 '
|
|
1889
|
+
prefix: '+352 ',
|
|
1894
1890
|
},
|
|
1895
1891
|
MO: {
|
|
1896
1892
|
mask: '####-####',
|
|
1897
|
-
prefix: '+853 '
|
|
1893
|
+
prefix: '+853 ',
|
|
1898
1894
|
},
|
|
1899
1895
|
MK: {
|
|
1900
1896
|
mask: '########',
|
|
1901
|
-
prefix: '+389 '
|
|
1897
|
+
prefix: '+389 ',
|
|
1902
1898
|
},
|
|
1903
1899
|
MG: {
|
|
1904
1900
|
mask: '##-##-###-##',
|
|
1905
|
-
prefix: '+261 '
|
|
1901
|
+
prefix: '+261 ',
|
|
1906
1902
|
},
|
|
1907
1903
|
/* MW: {
|
|
1908
1904
|
mask:'#######??',
|
|
@@ -1910,7 +1906,7 @@ const phoneNumberFormats = {
|
|
|
1910
1906
|
}, */
|
|
1911
1907
|
MW: {
|
|
1912
1908
|
mask: '#########',
|
|
1913
|
-
prefix: '+265 '
|
|
1909
|
+
prefix: '+265 ',
|
|
1914
1910
|
},
|
|
1915
1911
|
/* MY: {
|
|
1916
1912
|
mask:'#######???',
|
|
@@ -1918,46 +1914,46 @@ const phoneNumberFormats = {
|
|
|
1918
1914
|
}, */
|
|
1919
1915
|
MY: {
|
|
1920
1916
|
mask: '##########',
|
|
1921
|
-
prefix: '+60 '
|
|
1917
|
+
prefix: '+60 ',
|
|
1922
1918
|
},
|
|
1923
1919
|
MV: {
|
|
1924
1920
|
mask: '###-####',
|
|
1925
|
-
prefix: '+960 '
|
|
1921
|
+
prefix: '+960 ',
|
|
1926
1922
|
},
|
|
1927
1923
|
ML: {
|
|
1928
1924
|
mask: '####-####',
|
|
1929
|
-
prefix: '+223 '
|
|
1925
|
+
prefix: '+223 ',
|
|
1930
1926
|
},
|
|
1931
1927
|
MT: {
|
|
1932
1928
|
mask: '##-##-##-##',
|
|
1933
|
-
prefix: '+356 '
|
|
1929
|
+
prefix: '+356 ',
|
|
1934
1930
|
},
|
|
1935
1931
|
MH: {
|
|
1936
1932
|
mask: '###-####',
|
|
1937
|
-
prefix: '+692 '
|
|
1933
|
+
prefix: '+692 ',
|
|
1938
1934
|
},
|
|
1939
1935
|
MQ: {
|
|
1940
1936
|
mask: '###-######',
|
|
1941
|
-
prefix: '+596 '
|
|
1937
|
+
prefix: '+596 ',
|
|
1942
1938
|
},
|
|
1943
1939
|
// MR
|
|
1944
1940
|
MU: {
|
|
1945
1941
|
mask: '###-####',
|
|
1946
|
-
prefix: '+230 '
|
|
1942
|
+
prefix: '+230 ',
|
|
1947
1943
|
},
|
|
1948
1944
|
// YT
|
|
1949
1945
|
MX: {
|
|
1950
1946
|
mask: '(###) ###-####',
|
|
1951
|
-
prefix: '+52 '
|
|
1947
|
+
prefix: '+52 ',
|
|
1952
1948
|
},
|
|
1953
1949
|
// FM
|
|
1954
1950
|
MD: {
|
|
1955
1951
|
mask: '########',
|
|
1956
|
-
prefix: '+373 '
|
|
1952
|
+
prefix: '+373 ',
|
|
1957
1953
|
},
|
|
1958
1954
|
MC: {
|
|
1959
1955
|
mask: '####-####',
|
|
1960
|
-
prefix: '+377 '
|
|
1956
|
+
prefix: '+377 ',
|
|
1961
1957
|
},
|
|
1962
1958
|
/* MN: {
|
|
1963
1959
|
mask:'######?????',
|
|
@@ -1965,15 +1961,15 @@ const phoneNumberFormats = {
|
|
|
1965
1961
|
}, */
|
|
1966
1962
|
MN: {
|
|
1967
1963
|
mask: '###########',
|
|
1968
|
-
prefix: '+976 '
|
|
1964
|
+
prefix: '+976 ',
|
|
1969
1965
|
},
|
|
1970
1966
|
MS: {
|
|
1971
1967
|
mask: '(###) ###-####',
|
|
1972
|
-
prefix: '+1 '
|
|
1968
|
+
prefix: '+1 ',
|
|
1973
1969
|
},
|
|
1974
1970
|
MA: {
|
|
1975
1971
|
mask: '##-###-####',
|
|
1976
|
-
prefix: '+212 '
|
|
1972
|
+
prefix: '+212 ',
|
|
1977
1973
|
},
|
|
1978
1974
|
/* MZ: {
|
|
1979
1975
|
mask:'########?',
|
|
@@ -1981,7 +1977,7 @@ const phoneNumberFormats = {
|
|
|
1981
1977
|
}, */
|
|
1982
1978
|
MZ: {
|
|
1983
1979
|
mask: '#########',
|
|
1984
|
-
prefix: '+258 '
|
|
1980
|
+
prefix: '+258 ',
|
|
1985
1981
|
},
|
|
1986
1982
|
/* MM: {
|
|
1987
1983
|
mask:'#######?',
|
|
@@ -1989,7 +1985,7 @@ const phoneNumberFormats = {
|
|
|
1989
1985
|
}, */
|
|
1990
1986
|
MM: {
|
|
1991
1987
|
mask: '########',
|
|
1992
|
-
prefix: '+95 '
|
|
1988
|
+
prefix: '+95 ',
|
|
1993
1989
|
},
|
|
1994
1990
|
/* NA: {
|
|
1995
1991
|
mask:'######????',
|
|
@@ -1997,7 +1993,7 @@ const phoneNumberFormats = {
|
|
|
1997
1993
|
}, */
|
|
1998
1994
|
NA: {
|
|
1999
1995
|
mask: '##########',
|
|
2000
|
-
prefix: '+264 '
|
|
1996
|
+
prefix: '+264 ',
|
|
2001
1997
|
},
|
|
2002
1998
|
// NR
|
|
2003
1999
|
/* NP: {
|
|
@@ -2006,11 +2002,11 @@ const phoneNumberFormats = {
|
|
|
2006
2002
|
}, */
|
|
2007
2003
|
NP: {
|
|
2008
2004
|
mask: '##########',
|
|
2009
|
-
prefix: '+977 '
|
|
2005
|
+
prefix: '+977 ',
|
|
2010
2006
|
},
|
|
2011
2007
|
NL: {
|
|
2012
2008
|
mask: '#########',
|
|
2013
|
-
prefix: '+31 '
|
|
2009
|
+
prefix: '+31 ',
|
|
2014
2010
|
},
|
|
2015
2011
|
/* AN: {
|
|
2016
2012
|
mask:'#######?',
|
|
@@ -2018,11 +2014,11 @@ const phoneNumberFormats = {
|
|
|
2018
2014
|
}, */
|
|
2019
2015
|
AN: {
|
|
2020
2016
|
mask: '########',
|
|
2021
|
-
prefix: '+599 '
|
|
2017
|
+
prefix: '+599 ',
|
|
2022
2018
|
},
|
|
2023
2019
|
NC: {
|
|
2024
2020
|
mask: '###-###',
|
|
2025
|
-
prefix: '+687 '
|
|
2021
|
+
prefix: '+687 ',
|
|
2026
2022
|
},
|
|
2027
2023
|
/* NZ: {
|
|
2028
2024
|
mask:'########??',
|
|
@@ -2030,15 +2026,15 @@ const phoneNumberFormats = {
|
|
|
2030
2026
|
}, */
|
|
2031
2027
|
NZ: {
|
|
2032
2028
|
mask: '##########',
|
|
2033
|
-
prefix: '+64 '
|
|
2029
|
+
prefix: '+64 ',
|
|
2034
2030
|
},
|
|
2035
2031
|
NI: {
|
|
2036
2032
|
mask: '####-####',
|
|
2037
|
-
prefix: '+505 '
|
|
2033
|
+
prefix: '+505 ',
|
|
2038
2034
|
},
|
|
2039
2035
|
NE: {
|
|
2040
2036
|
mask: '##-###-###',
|
|
2041
|
-
prefix: '+227 '
|
|
2037
|
+
prefix: '+227 ',
|
|
2042
2038
|
},
|
|
2043
2039
|
/* NG: {
|
|
2044
2040
|
mask:'########??',
|
|
@@ -2046,20 +2042,20 @@ const phoneNumberFormats = {
|
|
|
2046
2042
|
}, */
|
|
2047
2043
|
NG: {
|
|
2048
2044
|
mask: '##########',
|
|
2049
|
-
prefix: '+234 '
|
|
2045
|
+
prefix: '+234 ',
|
|
2050
2046
|
},
|
|
2051
2047
|
// NU
|
|
2052
2048
|
MP: {
|
|
2053
2049
|
mask: '(###) ###-####',
|
|
2054
|
-
prefix: '+1 '
|
|
2050
|
+
prefix: '+1 ',
|
|
2055
2051
|
},
|
|
2056
2052
|
NO: {
|
|
2057
2053
|
mask: '####-####',
|
|
2058
|
-
prefix: '+47 '
|
|
2054
|
+
prefix: '+47 ',
|
|
2059
2055
|
},
|
|
2060
2056
|
OM: {
|
|
2061
2057
|
mask: '####-####',
|
|
2062
|
-
prefix: '+968 '
|
|
2058
|
+
prefix: '+968 ',
|
|
2063
2059
|
},
|
|
2064
2060
|
/* PK: {
|
|
2065
2061
|
mask:'#########?',
|
|
@@ -2067,11 +2063,11 @@ const phoneNumberFormats = {
|
|
|
2067
2063
|
}, */
|
|
2068
2064
|
PK: {
|
|
2069
2065
|
mask: '##########',
|
|
2070
|
-
prefix: '+92 '
|
|
2066
|
+
prefix: '+92 ',
|
|
2071
2067
|
},
|
|
2072
2068
|
PW: {
|
|
2073
2069
|
mask: '###-####',
|
|
2074
|
-
prefix: '+680 '
|
|
2070
|
+
prefix: '+680 ',
|
|
2075
2071
|
},
|
|
2076
2072
|
/* PA: {
|
|
2077
2073
|
mask:'#######?',
|
|
@@ -2079,7 +2075,7 @@ const phoneNumberFormats = {
|
|
|
2079
2075
|
}, */
|
|
2080
2076
|
PA: {
|
|
2081
2077
|
mask: '########',
|
|
2082
|
-
prefix: '+507 '
|
|
2078
|
+
prefix: '+507 ',
|
|
2083
2079
|
},
|
|
2084
2080
|
/* PG: {
|
|
2085
2081
|
mask:'#######?',
|
|
@@ -2087,7 +2083,7 @@ const phoneNumberFormats = {
|
|
|
2087
2083
|
}, */
|
|
2088
2084
|
PG: {
|
|
2089
2085
|
mask: '########',
|
|
2090
|
-
prefix: '+675 '
|
|
2086
|
+
prefix: '+675 ',
|
|
2091
2087
|
},
|
|
2092
2088
|
// PY
|
|
2093
2089
|
/* PE: {
|
|
@@ -2096,7 +2092,7 @@ const phoneNumberFormats = {
|
|
|
2096
2092
|
}, */
|
|
2097
2093
|
PE: {
|
|
2098
2094
|
mask: '###########',
|
|
2099
|
-
prefix: '+51 '
|
|
2095
|
+
prefix: '+51 ',
|
|
2100
2096
|
},
|
|
2101
2097
|
/* PH: {
|
|
2102
2098
|
mask:'########??',
|
|
@@ -2104,62 +2100,62 @@ const phoneNumberFormats = {
|
|
|
2104
2100
|
}, */
|
|
2105
2101
|
PH: {
|
|
2106
2102
|
mask: '##########',
|
|
2107
|
-
prefix: '+63 '
|
|
2103
|
+
prefix: '+63 ',
|
|
2108
2104
|
},
|
|
2109
2105
|
PL: {
|
|
2110
2106
|
mask: '#########',
|
|
2111
|
-
prefix: '+48 '
|
|
2107
|
+
prefix: '+48 ',
|
|
2112
2108
|
},
|
|
2113
2109
|
PT: {
|
|
2114
2110
|
mask: '#-####-####',
|
|
2115
|
-
prefix: '+351 '
|
|
2111
|
+
prefix: '+351 ',
|
|
2116
2112
|
},
|
|
2117
2113
|
PR: {
|
|
2118
2114
|
mask: '(###) ###-####',
|
|
2119
|
-
prefix: '+1 '
|
|
2115
|
+
prefix: '+1 ',
|
|
2120
2116
|
},
|
|
2121
2117
|
QA: {
|
|
2122
2118
|
mask: '###-####',
|
|
2123
|
-
prefix: '+974 '
|
|
2119
|
+
prefix: '+974 ',
|
|
2124
2120
|
},
|
|
2125
2121
|
RE: {
|
|
2126
2122
|
mask: '###-###-###',
|
|
2127
|
-
prefix: '+262 '
|
|
2123
|
+
prefix: '+262 ',
|
|
2128
2124
|
},
|
|
2129
2125
|
RO: {
|
|
2130
2126
|
mask: '#########',
|
|
2131
|
-
prefix: '+40 '
|
|
2127
|
+
prefix: '+40 ',
|
|
2132
2128
|
},
|
|
2133
2129
|
RU: {
|
|
2134
2130
|
mask: '##########',
|
|
2135
|
-
prefix: '+7 '
|
|
2131
|
+
prefix: '+7 ',
|
|
2136
2132
|
},
|
|
2137
2133
|
RW: {
|
|
2138
2134
|
mask: '###-###-###',
|
|
2139
|
-
prefix: '+250 '
|
|
2135
|
+
prefix: '+250 ',
|
|
2140
2136
|
},
|
|
2141
2137
|
SH: {
|
|
2142
2138
|
mask: '#-###',
|
|
2143
|
-
prefix: '+290 '
|
|
2139
|
+
prefix: '+290 ',
|
|
2144
2140
|
},
|
|
2145
2141
|
// PM
|
|
2146
2142
|
KN: {
|
|
2147
2143
|
mask: '(###) ###-####',
|
|
2148
|
-
prefix: '+1 '
|
|
2144
|
+
prefix: '+1 ',
|
|
2149
2145
|
},
|
|
2150
2146
|
LC: {
|
|
2151
2147
|
mask: '(###) ###-####',
|
|
2152
|
-
prefix: '+1 '
|
|
2148
|
+
prefix: '+1 ',
|
|
2153
2149
|
},
|
|
2154
2150
|
VC: {
|
|
2155
2151
|
mask: '(###) ###-####',
|
|
2156
|
-
prefix: '+1 '
|
|
2152
|
+
prefix: '+1 ',
|
|
2157
2153
|
},
|
|
2158
2154
|
// WS
|
|
2159
2155
|
// SM
|
|
2160
2156
|
ST: {
|
|
2161
2157
|
mask: '##-####',
|
|
2162
|
-
prefix: '+239 '
|
|
2158
|
+
prefix: '+239 ',
|
|
2163
2159
|
},
|
|
2164
2160
|
/* SA: {
|
|
2165
2161
|
mask:'########?',
|
|
@@ -2167,60 +2163,60 @@ const phoneNumberFormats = {
|
|
|
2167
2163
|
}, */
|
|
2168
2164
|
SA: {
|
|
2169
2165
|
mask: '#########',
|
|
2170
|
-
prefix: '+966 '
|
|
2166
|
+
prefix: '+966 ',
|
|
2171
2167
|
},
|
|
2172
2168
|
SN: {
|
|
2173
2169
|
mask: '##-###-####',
|
|
2174
|
-
prefix: '+221 '
|
|
2170
|
+
prefix: '+221 ',
|
|
2175
2171
|
},
|
|
2176
2172
|
SC: {
|
|
2177
2173
|
mask: '###-###',
|
|
2178
|
-
prefix: '+248 '
|
|
2174
|
+
prefix: '+248 ',
|
|
2179
2175
|
},
|
|
2180
2176
|
SL: {
|
|
2181
2177
|
mask: '(##) ###-###',
|
|
2182
|
-
prefix: '+232 '
|
|
2178
|
+
prefix: '+232 ',
|
|
2183
2179
|
},
|
|
2184
2180
|
SG: {
|
|
2185
2181
|
mask: '####-####',
|
|
2186
|
-
prefix: '+65 '
|
|
2182
|
+
prefix: '+65 ',
|
|
2187
2183
|
},
|
|
2188
2184
|
SK: {
|
|
2189
2185
|
mask: '#########',
|
|
2190
|
-
prefix: '+421 '
|
|
2186
|
+
prefix: '+421 ',
|
|
2191
2187
|
},
|
|
2192
2188
|
SI: {
|
|
2193
2189
|
mask: '########',
|
|
2194
|
-
prefix: '+386 '
|
|
2190
|
+
prefix: '+386 ',
|
|
2195
2191
|
},
|
|
2196
2192
|
SB: {
|
|
2197
2193
|
mask: '##-###',
|
|
2198
|
-
prefix: '+677 '
|
|
2194
|
+
prefix: '+677 ',
|
|
2199
2195
|
},
|
|
2200
2196
|
// SO
|
|
2201
2197
|
ZA: {
|
|
2202
2198
|
mask: '(##) ###-####',
|
|
2203
|
-
prefix: '+27 '
|
|
2199
|
+
prefix: '+27 ',
|
|
2204
2200
|
},
|
|
2205
2201
|
ES: {
|
|
2206
2202
|
mask: '###-###-###',
|
|
2207
|
-
prefix: '+34 '
|
|
2203
|
+
prefix: '+34 ',
|
|
2208
2204
|
},
|
|
2209
2205
|
LK: {
|
|
2210
2206
|
mask: '(##) ###-####',
|
|
2211
|
-
prefix: '+94 '
|
|
2207
|
+
prefix: '+94 ',
|
|
2212
2208
|
},
|
|
2213
2209
|
SD: {
|
|
2214
2210
|
mask: '##-###-####',
|
|
2215
|
-
prefix: '+249 '
|
|
2211
|
+
prefix: '+249 ',
|
|
2216
2212
|
},
|
|
2217
2213
|
SR: {
|
|
2218
2214
|
mask: '######?',
|
|
2219
|
-
prefix: '+597 '
|
|
2215
|
+
prefix: '+597 ',
|
|
2220
2216
|
},
|
|
2221
2217
|
SZ: {
|
|
2222
2218
|
mask: '###-####',
|
|
2223
|
-
prefix: '+268 '
|
|
2219
|
+
prefix: '+268 ',
|
|
2224
2220
|
},
|
|
2225
2221
|
/* SE: {
|
|
2226
2222
|
mask:'######?????',
|
|
@@ -2228,11 +2224,11 @@ const phoneNumberFormats = {
|
|
|
2228
2224
|
}, */
|
|
2229
2225
|
SE: {
|
|
2230
2226
|
mask: '###########',
|
|
2231
|
-
prefix: '+46 '
|
|
2227
|
+
prefix: '+46 ',
|
|
2232
2228
|
},
|
|
2233
2229
|
CH: {
|
|
2234
2230
|
mask: '(##) ###-####',
|
|
2235
|
-
prefix: '+41 '
|
|
2231
|
+
prefix: '+41 ',
|
|
2236
2232
|
},
|
|
2237
2233
|
/* SY: {
|
|
2238
2234
|
mask:'########?',
|
|
@@ -2240,15 +2236,15 @@ const phoneNumberFormats = {
|
|
|
2240
2236
|
}, */
|
|
2241
2237
|
SY: {
|
|
2242
2238
|
mask: '#########',
|
|
2243
|
-
prefix: '+963 '
|
|
2239
|
+
prefix: '+963 ',
|
|
2244
2240
|
},
|
|
2245
2241
|
TJ: {
|
|
2246
2242
|
mask: '#########',
|
|
2247
|
-
prefix: '+992 '
|
|
2243
|
+
prefix: '+992 ',
|
|
2248
2244
|
},
|
|
2249
2245
|
TZ: {
|
|
2250
2246
|
mask: '#########',
|
|
2251
|
-
prefix: '+255 '
|
|
2247
|
+
prefix: '+255 ',
|
|
2252
2248
|
},
|
|
2253
2249
|
/* TH: {
|
|
2254
2250
|
mask:'########?',
|
|
@@ -2256,42 +2252,42 @@ const phoneNumberFormats = {
|
|
|
2256
2252
|
}, */
|
|
2257
2253
|
TH: {
|
|
2258
2254
|
mask: '#########',
|
|
2259
|
-
prefix: '+66 '
|
|
2255
|
+
prefix: '+66 ',
|
|
2260
2256
|
},
|
|
2261
2257
|
TG: {
|
|
2262
2258
|
mask: '###-####',
|
|
2263
|
-
prefix: '+228 '
|
|
2259
|
+
prefix: '+228 ',
|
|
2264
2260
|
},
|
|
2265
2261
|
// TK
|
|
2266
2262
|
// TO
|
|
2267
2263
|
TT: {
|
|
2268
2264
|
mask: '(###) ###-####',
|
|
2269
|
-
prefix: '+1 '
|
|
2265
|
+
prefix: '+1 ',
|
|
2270
2266
|
},
|
|
2271
2267
|
TN: {
|
|
2272
2268
|
mask: '##-###-###',
|
|
2273
|
-
prefix: '+216 '
|
|
2269
|
+
prefix: '+216 ',
|
|
2274
2270
|
},
|
|
2275
2271
|
TR: {
|
|
2276
2272
|
mask: '(###) ###-####',
|
|
2277
|
-
prefix: '+90 '
|
|
2273
|
+
prefix: '+90 ',
|
|
2278
2274
|
},
|
|
2279
2275
|
TM: {
|
|
2280
2276
|
mask: '########',
|
|
2281
|
-
prefix: '+993 '
|
|
2277
|
+
prefix: '+993 ',
|
|
2282
2278
|
},
|
|
2283
2279
|
TC: {
|
|
2284
2280
|
mask: '(###) ###-####',
|
|
2285
|
-
prefix: '+1 '
|
|
2281
|
+
prefix: '+1 ',
|
|
2286
2282
|
},
|
|
2287
2283
|
// TV
|
|
2288
2284
|
UG: {
|
|
2289
2285
|
mask: '#########',
|
|
2290
|
-
prefix: '+256 '
|
|
2286
|
+
prefix: '+256 ',
|
|
2291
2287
|
},
|
|
2292
2288
|
UA: {
|
|
2293
2289
|
mask: '(##) ###-####',
|
|
2294
|
-
prefix: '+380 '
|
|
2290
|
+
prefix: '+380 ',
|
|
2295
2291
|
},
|
|
2296
2292
|
/* AE: {
|
|
2297
2293
|
mask:'########?',
|
|
@@ -2299,7 +2295,7 @@ const phoneNumberFormats = {
|
|
|
2299
2295
|
}, */
|
|
2300
2296
|
AE: {
|
|
2301
2297
|
mask: '#########',
|
|
2302
|
-
prefix: '+971 '
|
|
2298
|
+
prefix: '+971 ',
|
|
2303
2299
|
},
|
|
2304
2300
|
/* GB: {
|
|
2305
2301
|
mask:'##########???',
|
|
@@ -2307,33 +2303,33 @@ const phoneNumberFormats = {
|
|
|
2307
2303
|
}, */
|
|
2308
2304
|
GB: {
|
|
2309
2305
|
mask: '#############',
|
|
2310
|
-
prefix: '+44 '
|
|
2306
|
+
prefix: '+44 ',
|
|
2311
2307
|
},
|
|
2312
2308
|
UY: {
|
|
2313
2309
|
mask: '########?',
|
|
2314
|
-
prefix: '+598 '
|
|
2310
|
+
prefix: '+598 ',
|
|
2315
2311
|
},
|
|
2316
2312
|
UZ: {
|
|
2317
2313
|
mask: '(##) ###-####',
|
|
2318
|
-
prefix: '+998 '
|
|
2314
|
+
prefix: '+998 ',
|
|
2319
2315
|
},
|
|
2320
2316
|
// VU
|
|
2321
2317
|
// VA
|
|
2322
2318
|
VE: {
|
|
2323
2319
|
mask: '(###) ###-####',
|
|
2324
|
-
prefix: '+58 '
|
|
2320
|
+
prefix: '+58 ',
|
|
2325
2321
|
},
|
|
2326
2322
|
VN: {
|
|
2327
2323
|
mask: '#######????',
|
|
2328
|
-
prefix: '+84 '
|
|
2324
|
+
prefix: '+84 ',
|
|
2329
2325
|
},
|
|
2330
2326
|
VG: {
|
|
2331
2327
|
mask: '(###) ###-####',
|
|
2332
|
-
prefix: '+1 '
|
|
2328
|
+
prefix: '+1 ',
|
|
2333
2329
|
},
|
|
2334
2330
|
VI: {
|
|
2335
2331
|
mask: '(###) ###-####',
|
|
2336
|
-
prefix: '+1 '
|
|
2332
|
+
prefix: '+1 ',
|
|
2337
2333
|
},
|
|
2338
2334
|
// WF
|
|
2339
2335
|
/* YE: {
|
|
@@ -2342,12 +2338,12 @@ const phoneNumberFormats = {
|
|
|
2342
2338
|
}, */
|
|
2343
2339
|
YE: {
|
|
2344
2340
|
mask: '#########',
|
|
2345
|
-
prefix: '+967 '
|
|
2341
|
+
prefix: '+967 ',
|
|
2346
2342
|
},
|
|
2347
2343
|
// YU
|
|
2348
2344
|
ZM: {
|
|
2349
2345
|
mask: '#########',
|
|
2350
|
-
prefix: '+260 '
|
|
2346
|
+
prefix: '+260 ',
|
|
2351
2347
|
},
|
|
2352
2348
|
/* ZW: {
|
|
2353
2349
|
mask:'####?????',
|
|
@@ -2355,15 +2351,15 @@ const phoneNumberFormats = {
|
|
|
2355
2351
|
}, */
|
|
2356
2352
|
ZW: {
|
|
2357
2353
|
mask: '#########',
|
|
2358
|
-
prefix: '+263 '
|
|
2354
|
+
prefix: '+263 ',
|
|
2359
2355
|
},
|
|
2360
2356
|
AC: {
|
|
2361
2357
|
mask: '####',
|
|
2362
|
-
prefix: '+247 '
|
|
2358
|
+
prefix: '+247 ',
|
|
2363
2359
|
},
|
|
2364
2360
|
ME: {
|
|
2365
2361
|
mask: '(##) ###-####',
|
|
2366
|
-
prefix: '+382 '
|
|
2362
|
+
prefix: '+382 ',
|
|
2367
2363
|
},
|
|
2368
2364
|
/* PS: {
|
|
2369
2365
|
mask:'########?',
|
|
@@ -2371,7 +2367,7 @@ const phoneNumberFormats = {
|
|
|
2371
2367
|
}, */
|
|
2372
2368
|
PS: {
|
|
2373
2369
|
mask: '#########',
|
|
2374
|
-
prefix: '+970 '
|
|
2370
|
+
prefix: '+970 ',
|
|
2375
2371
|
},
|
|
2376
2372
|
/* RS: {
|
|
2377
2373
|
mask:'#######??',
|
|
@@ -2379,7 +2375,7 @@ const phoneNumberFormats = {
|
|
|
2379
2375
|
}, */
|
|
2380
2376
|
RS: {
|
|
2381
2377
|
mask: '#########',
|
|
2382
|
-
prefix: '+381 '
|
|
2378
|
+
prefix: '+381 ',
|
|
2383
2379
|
},
|
|
2384
2380
|
/* TW: {
|
|
2385
2381
|
mask:'########?',
|
|
@@ -2387,23 +2383,23 @@ const phoneNumberFormats = {
|
|
|
2387
2383
|
}, */
|
|
2388
2384
|
TW: {
|
|
2389
2385
|
mask: '#########',
|
|
2390
|
-
prefix: '+886 '
|
|
2386
|
+
prefix: '+886 ',
|
|
2391
2387
|
},
|
|
2392
2388
|
CW: {
|
|
2393
2389
|
mask: '#-###-####',
|
|
2394
|
-
prefix: '+599 '
|
|
2390
|
+
prefix: '+599 ',
|
|
2395
2391
|
},
|
|
2396
2392
|
US: {
|
|
2397
2393
|
mask: '(###) ###-####',
|
|
2398
|
-
prefix: ''
|
|
2399
|
-
}
|
|
2394
|
+
prefix: '',
|
|
2395
|
+
},
|
|
2400
2396
|
};
|
|
2401
2397
|
function formatPhoneNumber(value, isoCode = 'US') {
|
|
2402
|
-
const { mask, prefix } = phoneNumberFormats[isoCode] || phoneNumberFormats
|
|
2398
|
+
const { mask, prefix } = phoneNumberFormats[isoCode] || phoneNumberFormats.US;
|
|
2403
2399
|
const options = {
|
|
2404
|
-
prefix
|
|
2400
|
+
prefix,
|
|
2405
2401
|
};
|
|
2406
|
-
|
|
2402
|
+
const val = value || '';
|
|
2407
2403
|
return formatValue(val, mask, options);
|
|
2408
2404
|
}
|
|
2409
2405
|
|
|
@@ -2435,7 +2431,7 @@ const numberFormats = {
|
|
|
2435
2431
|
decimalSeparator: '.',
|
|
2436
2432
|
thousandsSeparator: ',',
|
|
2437
2433
|
allowDecimal: false,
|
|
2438
|
-
allowNegative: true
|
|
2434
|
+
allowNegative: true,
|
|
2439
2435
|
},
|
|
2440
2436
|
integer: {
|
|
2441
2437
|
prefix: '',
|
|
@@ -2444,7 +2440,7 @@ const numberFormats = {
|
|
|
2444
2440
|
decimalSeparator: '.',
|
|
2445
2441
|
thousandsSeparator: '',
|
|
2446
2442
|
allowDecimal: true,
|
|
2447
|
-
allowNegative: true
|
|
2443
|
+
allowNegative: true,
|
|
2448
2444
|
},
|
|
2449
2445
|
dec: {
|
|
2450
2446
|
prefix: '',
|
|
@@ -2453,8 +2449,8 @@ const numberFormats = {
|
|
|
2453
2449
|
decimalSeparator: '.',
|
|
2454
2450
|
thousandsSeparator: ',',
|
|
2455
2451
|
allowDecimal: true,
|
|
2456
|
-
allowNegative: true
|
|
2457
|
-
}
|
|
2452
|
+
allowNegative: true,
|
|
2453
|
+
},
|
|
2458
2454
|
};
|
|
2459
2455
|
function getNumberFormat(key) {
|
|
2460
2456
|
let decimals;
|
|
@@ -2481,7 +2477,7 @@ function formatNumeric(value = '', modifier = '', explicit = false) {
|
|
|
2481
2477
|
return formatNumber(value, numberFormat, explicit);
|
|
2482
2478
|
}
|
|
2483
2479
|
function formatPercentage(value = '', modifier = '', explicit = false) {
|
|
2484
|
-
|
|
2480
|
+
const numberFormat = getNumberFormat(modifier);
|
|
2485
2481
|
if (!numberFormat) {
|
|
2486
2482
|
const val = (value || '').replace(/[^\d.,-]/g, '');
|
|
2487
2483
|
return formatValue(val, undefined, { suffix: '%' });
|
|
@@ -2685,7 +2681,7 @@ const postalCodeFormats = {
|
|
|
2685
2681
|
WF: '986##',
|
|
2686
2682
|
ZM: '#####',
|
|
2687
2683
|
US: '#####',
|
|
2688
|
-
'US+4': '#####-####'
|
|
2684
|
+
'US+4': '#####-####',
|
|
2689
2685
|
};
|
|
2690
2686
|
function formatPostalCode(value, modifier = 'US') {
|
|
2691
2687
|
const mask = postalCodeFormats[modifier];
|
|
@@ -2715,7 +2711,7 @@ const dateFormats = {
|
|
|
2715
2711
|
'DD-MM-YYYY': '##-##-####',
|
|
2716
2712
|
'D-M-YYYY': '#?-#?-####',
|
|
2717
2713
|
'DD-MM-YY': '##-##-##',
|
|
2718
|
-
'D-M-YY': '#?-#?-##'
|
|
2714
|
+
'D-M-YY': '#?-#?-##',
|
|
2719
2715
|
};
|
|
2720
2716
|
function formatDate(value, format = 'MM/DD/YYYY') {
|
|
2721
2717
|
const mask = dateFormats[format] || dateFormats['MM/DD/YYYY'];
|
|
@@ -2724,10 +2720,10 @@ function formatDate(value, format = 'MM/DD/YYYY') {
|
|
|
2724
2720
|
}
|
|
2725
2721
|
|
|
2726
2722
|
function format(value) {
|
|
2727
|
-
//have a initial generic mask which then converts to specific mask
|
|
2723
|
+
// have a initial generic mask which then converts to specific mask
|
|
2728
2724
|
const detectedType = formatCreditCard.detectCreditCardTypeFromValue(value);
|
|
2729
2725
|
const formattedValueObject = creditCardFormatters[detectedType](value);
|
|
2730
|
-
if (value.length < 2 && detectedType
|
|
2726
|
+
if (value.length < 2 && detectedType === 'unknown') {
|
|
2731
2727
|
formattedValueObject.leftIcon = 'card';
|
|
2732
2728
|
}
|
|
2733
2729
|
return formattedValueObject;
|
|
@@ -2762,8 +2758,9 @@ const creditCardFormatters = {
|
|
|
2762
2758
|
masterCard: masterCardFormatter,
|
|
2763
2759
|
visa: visaFormatter,
|
|
2764
2760
|
dinersClub: dinersClubInternationalFormatter,
|
|
2765
|
-
unknown: unknownFormatter
|
|
2761
|
+
unknown: unknownFormatter,
|
|
2766
2762
|
};
|
|
2763
|
+
/* tslint:disable:cyclomatic-complexity */
|
|
2767
2764
|
function detectCreditCardTypeFromValue(value) {
|
|
2768
2765
|
// use value and some algorithm from the internet to detect and return card type based on string
|
|
2769
2766
|
// return string 'unknown' if algorithm cannot detect or returns a type that is not one of our 5 supported types
|
|
@@ -2784,13 +2781,13 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2784
2781
|
}
|
|
2785
2782
|
break;
|
|
2786
2783
|
case 3:
|
|
2787
|
-
if (secondInt
|
|
2784
|
+
if (secondInt === 4 || secondInt === 7) {
|
|
2788
2785
|
return 'amex';
|
|
2789
2786
|
}
|
|
2790
|
-
if (secondInt
|
|
2787
|
+
if (secondInt === 0) {
|
|
2791
2788
|
if (value.length > 2) {
|
|
2792
2789
|
const thirdInt = parseInt(value.charAt(2));
|
|
2793
|
-
if (thirdInt < 6 || thirdInt
|
|
2790
|
+
if (thirdInt < 6 || thirdInt === 9) {
|
|
2794
2791
|
return 'dinersClub';
|
|
2795
2792
|
}
|
|
2796
2793
|
}
|
|
@@ -2798,7 +2795,7 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2798
2795
|
return 'dinersClub';
|
|
2799
2796
|
}
|
|
2800
2797
|
}
|
|
2801
|
-
if (secondInt
|
|
2798
|
+
if (secondInt === 6 || secondInt === 8 || secondInt === 9) {
|
|
2802
2799
|
return 'dinersClub';
|
|
2803
2800
|
}
|
|
2804
2801
|
break;
|
|
@@ -2810,10 +2807,10 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2810
2807
|
}
|
|
2811
2808
|
break;
|
|
2812
2809
|
case 6:
|
|
2813
|
-
if (secondInt
|
|
2810
|
+
if (secondInt === 0) {
|
|
2814
2811
|
if (value.length > 3) {
|
|
2815
2812
|
const firstfour = value.substr(0, 4);
|
|
2816
|
-
if (firstfour
|
|
2813
|
+
if (firstfour === '6011') {
|
|
2817
2814
|
return 'discover';
|
|
2818
2815
|
}
|
|
2819
2816
|
}
|
|
@@ -2821,7 +2818,7 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2821
2818
|
return 'discover';
|
|
2822
2819
|
}
|
|
2823
2820
|
}
|
|
2824
|
-
if (secondInt
|
|
2821
|
+
if (secondInt === 4) {
|
|
2825
2822
|
if (value.length > 2) {
|
|
2826
2823
|
const firstthree = parseInt(value.substr(0, 3));
|
|
2827
2824
|
if (firstthree > 643) {
|
|
@@ -2832,10 +2829,10 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2832
2829
|
return 'discover';
|
|
2833
2830
|
}
|
|
2834
2831
|
}
|
|
2835
|
-
if (secondInt
|
|
2832
|
+
if (secondInt === 5) {
|
|
2836
2833
|
return 'discover';
|
|
2837
2834
|
}
|
|
2838
|
-
if (secondInt
|
|
2835
|
+
if (secondInt === 2) {
|
|
2839
2836
|
if (value.length > 5) {
|
|
2840
2837
|
const firstsix = parseInt(value.substr(0, 6));
|
|
2841
2838
|
if (firstsix >= 622126 && firstsix <= 622925) {
|
|
@@ -2852,6 +2849,7 @@ function detectCreditCardTypeFromValue(value) {
|
|
|
2852
2849
|
}
|
|
2853
2850
|
return 'unknown';
|
|
2854
2851
|
}
|
|
2852
|
+
/* tslint:enable:cyclomatic-complexity */
|
|
2855
2853
|
const formatCreditCard = {
|
|
2856
2854
|
detectCreditCardTypeFromValue,
|
|
2857
2855
|
format,
|
|
@@ -2860,10 +2858,10 @@ const formatCreditCard = {
|
|
|
2860
2858
|
discoverFormatter,
|
|
2861
2859
|
masterCardFormatter,
|
|
2862
2860
|
visaFormatter,
|
|
2863
|
-
unknownFormatter
|
|
2861
|
+
unknownFormatter,
|
|
2864
2862
|
};
|
|
2865
2863
|
|
|
2866
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;margin-top:var(--tct-input-margin-top, var(--t-input-margin-top, var(--app-scale-6x, 30px)));margin-bottom:var(--tct-input-margin-bottom, var(--t-input-margin-bottom, var(--app-scale-6x, 30px)));font-size:var(--tct-input-font-size, var(--t-input-font-size, var(--app-font-size, inherit)))}:host([hidden]){display:none}.field-container,.input-container{position:relative}.field-container{--comp-input-tween:var(--tct-input-tween, var(--t-input-tween, var(--tct-tween-2, var(--app-tween-2, 0.4s ease))))}label{display:block;padding-left:var(--tct-input-label-padding-left, var(--t-input-label-padding-left, 0));padding-right:var(--tct-input-label-padding-right, var(--t-input-label-padding-right, 0));margin-top:var(--tct-input-label-margin-top, var(--t-input-label-margin-top, 0));margin-bottom:var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit));font-size:var(--tct-input-label-font-size, var(--t-input-label-font-size, inherit));font-weight:var(--tct-input-label-font-weight, var(--t-input-label-font-weight, 600));text-transform:var(--tct-input-label-text-transform, var(--t-input-label-text-transform, none));letter-spacing:var(--tct-input-label-letter-spacing, var(--t-input-label-letter-spacing, normal));transition:color var(--comp-input-tween)}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.input-container{background-color:var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))));display:flex;align-items:center;--comp-input-horizontal-gap:var(--tct-input-horizontal-gap, var(--t-input-horizontal-gap, 8px));--comp-input-border-top-left-radius:var(--tct-input-border-top-left-radius, var(--t-input-border-top-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-top-right-radius:var(--tct-input-border-top-right-radius, var(--t-input-border-top-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-right-radius:var(--tct-input-border-bottom-right-radius, var(--t-input-border-bottom-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-left-radius:var(--tct-input-border-bottom-left-radius, var(--t-input-border-bottom-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-radius:var(--comp-input-border-top-left-radius)\n var(--comp-input-border-top-right-radius) var(--comp-input-border-bottom-right-radius)\n var(--comp-input-border-bottom-left-radius);--comp-input-border-width:var(--tct-input-border-top-width, 1px)\n var(--tct-input-border-right-width, 1px) var(--tct-input-border-bottom-width, 1px)\n var(--tct-input-border-left-width, 1px);--comp-input-focus-border-width:var(--tct-input-focus-border-top-width, 1px)\n var(--tct-input-focus-border-right-width, 1px)\n var(--tct-input-focus-border-bottom-width, 1px)\n var(--tct-input-focus-border-left-width, 1px);--comp-input-prefix-clearance:calc(\n 3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px)\n );--comp-input-icon-clearance:34px;--comp-input-min-height:44px;border-width:var(--comp-input-border-width);border-style:solid;border-color:var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, #cccccc))));border-radius:var(--comp-input-border-radius);box-shadow:var(--tct-input-box-shadow, var(--t-input-box-shadow, none));transition:border-width var(--comp-input-tween), border-color var(--comp-input-tween), box-shadow var(--comp-input-tween)}:host([disabled]) .input-container{cursor:not-allowed;opacity:var(--tct-input-disabled-opacity, var(--t-input-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}.input-field{flex:1;border:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;min-height:var(--comp-input-min-height);height:var(--tct-input-height, var(--t-input-height, 44px));width:100%;padding:0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-2, 10px))));background-color:transparent;color:var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));}.input-field:focus{outline:none;box-shadow:none}.input-field::-webkit-outer-spin-button,.input-field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-field[type=number]{-moz-appearance:textfield}.input-field[disabled]{cursor:not-allowed}.right-aligned .input-field{text-align:right}.input-container:focus-within{border-width:var(--comp-input-focus-border-width, 1px);border-color:var(--tct-input-focus-border-color, var(--t-input-focus-border-color, var(--tct-gray-9, var(--t-gray-9, #999999))));box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff)), var(--tct-input-focus-box-shadow, var(--t-input-focus-box-shadow, 0 0 transparent))}input{display:inline-block}input::-ms-clear{display:none}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input::placeholder,.placeholder-text{color:var(--tct-input-placeholder-font-color, var(--t-input-placeholder-font-color, var(--t-textA, var(--app-gray-d1, rgba(77, 77, 77, 0.77)))))}.pseudo-input{display:inline-flex;align-items:center}.pseudo-input span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-icons-container-left,.input-icons-container-right{display:flex;flex-direction:row;align-items:center;gap:var(--comp-input-horizontal-gap)}.input-icons-container-left:empty,.input-icons-container-right:empty{display:none}.input-icons-container-left{padding-left:var(--comp-input-horizontal-gap)}.input-icons-container-right{padding-right:var(--comp-input-horizontal-gap)}.input-icons-container-right .btn-visibility-toggle{color:var(--tct-primary, var(--t-primary, #006eb2));font-size:12px}q2-icon{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);pointer-events:none;color:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))));--tct-icon-stroke-primary:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))))}.icon-left-muted{opacity:0.5}.input-prefix,.input-suffix{margin-left:calc(var(--comp-input-horizontal-gap) * -1);margin-right:calc(var(--comp-input-horizontal-gap) * -1);width:3em;display:inline-flex;align-items:center;justify-content:center;min-height:calc(\n var(--comp-input-min-height) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) -\n var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))\n );height:calc(\n var(--tct-input-height, var(--t-input-height, 44px)) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))\n );font-size:var(--tct-input-prefix-font-size, var(--t-input-prefix-font-size, inherit));color:var(--tct-input-prefix-font-color, var(--t-input-prefix-font-color, inherit));background-color:var(--tct-input-prefix-bg, var(--t-input-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))))));transition:color var(--comp-input-tween), background-color var(--comp-input-tween)}.input-prefix{border-top-left-radius:calc(\n var(--comp-input-border-top-left-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );border-bottom-left-radius:calc(\n var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );pointer-events:none;}.input-suffix{border-top-right-radius:calc(\n var(--comp-input-border-top-right-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n );border-bottom-right-radius:calc(\n var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n )}.icon-error{color:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000));--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000))}.pw-show{position:absolute;margin-right:var(--tct-scale-2, var(--app-scale-2, 20px))}.btn-clear{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);height:22px;--tct-btn-icon-width:17px;--tct-btn-icon-height:22px;--tct-icon-size:17px}.messages-container{height:0px;overflow:hidden;background-color:var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))));box-shadow:var(--tct-input-message-box-shadow, var(--t-input-message-box-shadow, var(--tct-box-shadow-1, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)))));transition:height var(--tct-input-messages-tween, var(--t-input-messages-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));margin-top:2px;z-index:1;position:absolute;width:100%;color:var(--tct-input-messages-font-color, var(--t-input-messages-font-color, inherit))}.has-error label{color:var(--tct-input-error-label-font-color, var(--t-input-error-label-font-color, var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit))))}.has-error:not(.has-focus) .input-prefix,.has-error:not(.has-focus) .input-suffix{color:var(--tct-input-error-prefix-font-color, var(--t-input-error-prefix-font-color, inherit));background-color:var(--tct-input-error-prefix-bg, var(--t-input-error-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))))}.has-error .input-container:not(:focus-within){border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000))}.icon-left{width:26px;height:26px}.vertical-separator{height:calc(var(--comp-input-min-height) - 2px);border-right:1px solid var(--tct-input-prefix-border-color, var(--t-input-prefix-border-color, var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))))}";
|
|
2864
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;margin-top:var(--tct-input-margin-top, var(--t-input-margin-top, var(--app-scale-6x, 30px)));margin-bottom:var(--tct-input-margin-bottom, var(--t-input-margin-bottom, var(--app-scale-6x, 30px)));font-size:var(--tct-input-font-size, var(--t-input-font-size, var(--app-font-size, inherit)))}:host([hidden]){display:none}.field-container,.input-container{position:relative}.field-container{--comp-input-tween:var(--tct-input-tween, var(--t-input-tween, var(--tct-tween-2, var(--app-tween-2, 0.4s ease))))}label{display:block;padding-left:var(--tct-input-label-padding-left, var(--t-input-label-padding-left, 0));padding-right:var(--tct-input-label-padding-right, var(--t-input-label-padding-right, 0));margin-top:var(--tct-input-label-margin-top, var(--t-input-label-margin-top, 0));margin-bottom:var(--tct-input-label-margin-bottom, var(--t-input-label-margin-bottom, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit));font-size:var(--tct-input-label-font-size, var(--t-input-label-font-size, inherit));font-weight:var(--tct-input-label-font-weight, var(--t-input-label-font-weight, 600));text-transform:var(--tct-input-label-text-transform, var(--t-input-label-text-transform, none));letter-spacing:var(--tct-input-label-letter-spacing, var(--t-input-label-letter-spacing, normal));transition:color var(--comp-input-tween)}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.input-container{background-color:var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))));display:flex;align-items:center;--comp-input-horizontal-gap:var(--tct-input-horizontal-gap, var(--t-input-horizontal-gap, 8px));--comp-input-border-top-left-radius:var(--tct-input-border-top-left-radius, var(--t-input-border-top-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-top-right-radius:var(--tct-input-border-top-right-radius, var(--t-input-border-top-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-right-radius:var(--tct-input-border-bottom-right-radius, var(--t-input-border-bottom-right-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-bottom-left-radius:var(--tct-input-border-bottom-left-radius, var(--t-input-border-bottom-left-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));--comp-input-border-radius:var(--comp-input-border-top-left-radius)\n var(--comp-input-border-top-right-radius) var(--comp-input-border-bottom-right-radius)\n var(--comp-input-border-bottom-left-radius);--comp-input-border-width:var(--tct-input-border-top-width, 1px)\n var(--tct-input-border-right-width, 1px) var(--tct-input-border-bottom-width, 1px)\n var(--tct-input-border-left-width, 1px);--comp-input-focus-border-width:var(--tct-input-focus-border-top-width, 1px)\n var(--tct-input-focus-border-right-width, 1px)\n var(--tct-input-focus-border-bottom-width, 1px)\n var(--tct-input-focus-border-left-width, 1px);--comp-input-prefix-clearance:calc(\n 3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px)\n );--comp-input-icon-clearance:34px;--comp-input-min-height:var(--tct-input-min-height, 44px);border-width:var(--comp-input-border-width);border-style:solid;border-color:var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, #cccccc))));border-radius:var(--comp-input-border-radius);box-shadow:var(--tct-input-box-shadow, var(--t-input-box-shadow, none));transition:border-width var(--comp-input-tween), border-color var(--comp-input-tween), box-shadow var(--comp-input-tween)}:host([disabled]) .input-container{cursor:not-allowed;opacity:var(--tct-input-disabled-opacity, var(--t-input-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}.input-field{flex:1;border:0;-webkit-appearance:none;appearance:none;box-sizing:border-box;min-height:var(--comp-input-min-height);height:var(--tct-input-height, var(--t-input-height, 44px));width:100%;padding:0 var(--tct-input-horizontal-padding, var(--t-input-horizontal-padding, var(--tct-scale-2, var(--app-scale-2, 10px))));background-color:transparent;color:var(--tct-input-font-color, var(--t-input-font-color, var(--t-text, inherit)));display:inline-block;text-align:var(--tct-input-align, \"start\");}.input-field:focus{outline:none;box-shadow:none}.input-field::-webkit-outer-spin-button,.input-field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-field[type=number]{-moz-appearance:textfield}.input-field::-ms-clear{display:none}.input-field[type=search]::-webkit-search-decoration,.input-field[type=search]::-webkit-search-cancel-button,.input-field[type=search]::-webkit-search-results-button,.input-field[type=search]::-webkit-search-results-decoration{display:none}.input-field[disabled]{cursor:not-allowed}.right-aligned .input-field{text-align:right}.input-field:is(input){flex:1}.input-field:is(button){display:inline-flex;align-items:center}.input-container:focus-within{border-width:var(--comp-input-focus-border-width, 1px);border-color:var(--tct-input-focus-border-color, var(--t-input-focus-border-color, var(--tct-gray-9, var(--t-gray-9, #999999))));box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff)), var(--tct-input-focus-box-shadow, var(--t-input-focus-box-shadow, 0 0 transparent))}.input-field::placeholder,.placeholder-text{color:var(--tct-input-placeholder-font-color, var(--t-input-placeholder-font-color, var(--t-textA, var(--app-gray-d1, rgba(77, 77, 77, 0.77)))))}.pseudo-input{min-width:0;flex:1}.pseudo-input span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-icons-container-left,.input-icons-container-right{display:flex;flex-direction:row;align-items:center;gap:var(--comp-input-horizontal-gap)}.input-icons-container-left:empty,.input-icons-container-right:empty{display:none}.input-icons-container-left{padding-left:var(--comp-input-horizontal-gap)}.input-icons-container-right{padding-right:var(--comp-input-horizontal-gap)}.input-icons-container-right .btn-visibility-toggle{color:var(--tct-primary, var(--t-primary, #006eb2));font-size:12px}q2-icon{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);pointer-events:none;color:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))));--tct-icon-stroke-primary:var(--tct-input-icon-stroke-primary, var(--t-input-icon-stroke-primary, var(--t-textA, var(--app-gray, rgba(77, 77, 77, 0.77)))))}.icon-left-muted{opacity:0.5}.input-prefix,.input-suffix{margin-left:calc(var(--comp-input-horizontal-gap) * -1);margin-right:calc(var(--comp-input-horizontal-gap) * -1);width:3em;display:inline-flex;align-items:center;justify-content:center;min-height:calc(\n var(--comp-input-min-height) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) -\n var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))\n );height:calc(\n var(--tct-input-height, var(--t-input-height, 44px)) - var(--tct-input-focus-border-top-width, var(--t-input-focus-border-top-width, 1px)) - var(--tct-input-focus-border-bottom-width, var(--t-input-focus-border-bottom-width, 1px))\n );font-size:var(--tct-input-prefix-font-size, var(--t-input-prefix-font-size, inherit));color:var(--tct-input-prefix-font-color, var(--t-input-prefix-font-color, inherit));background-color:var(--tct-input-prefix-bg, var(--t-input-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, #f2f2f2))))));transition:color var(--comp-input-tween), background-color var(--comp-input-tween)}.input-prefix{border-top-left-radius:calc(\n var(--comp-input-border-top-left-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );border-bottom-left-radius:calc(\n var(--comp-input-border-bottom-left-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-left-width, var(--t-input-border-left-width, 1px))\n );pointer-events:none;}.input-suffix{border-top-right-radius:calc(\n var(--comp-input-border-top-right-radius) - var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n );border-bottom-right-radius:calc(\n var(--comp-input-border-bottom-right-radius) - var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) - var(--tct-input-border-right-width, var(--t-input-border-right-width, 1px))\n )}.icon-error{color:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000));--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #c30000))}.pw-show{position:absolute;margin-right:var(--tct-scale-2, var(--app-scale-2, 20px))}.btn-clear{margin-top:calc(var(--tct-input-border-top-width, var(--t-input-border-top-width, 1px)) / 2);margin-bottom:calc(var(--tct-input-border-bottom-width, var(--t-input-border-bottom-width, 1px)) / 2);height:22px;--tct-btn-icon-width:17px;--tct-btn-icon-height:22px;--tct-icon-size:17px}.messages-container{height:0px;overflow:hidden;background-color:var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))));box-shadow:var(--tct-input-message-box-shadow, var(--t-input-message-box-shadow, var(--tct-box-shadow-1, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)))));transition:height var(--tct-input-messages-tween, var(--t-input-messages-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));margin-top:2px;z-index:1;position:absolute;width:100%;color:var(--tct-input-messages-font-color, var(--t-input-messages-font-color, inherit))}.has-error label{color:var(--tct-input-error-label-font-color, var(--t-input-error-label-font-color, var(--tct-input-label-font-color, var(--t-input-label-font-color, inherit))))}.has-error:not(.has-focus) .input-prefix,.has-error:not(.has-focus) .input-suffix{color:var(--tct-input-error-prefix-font-color, var(--t-input-error-prefix-font-color, inherit));background-color:var(--tct-input-error-prefix-bg, var(--t-input-error-prefix-bg, var(--tct-input-bg, var(--t-input-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))))))}.has-error .input-container:not(:focus-within){border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000))}.icon-left{width:26px;height:26px}.vertical-separator{height:calc(var(--comp-input-min-height) - 2px);border-right:1px solid var(--tct-input-prefix-border-color, var(--t-input-prefix-border-color, var(--tct-input-border-color, var(--t-input-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))))}";
|
|
2867
2865
|
|
|
2868
2866
|
const Q2Input = class {
|
|
2869
2867
|
constructor(hostRef) {
|
|
@@ -2918,7 +2916,7 @@ const Q2Input = class {
|
|
|
2918
2916
|
const eventDetail = {
|
|
2919
2917
|
value: '',
|
|
2920
2918
|
formattedValue: '',
|
|
2921
|
-
minFormattedLength: this.formattedValueObject.minFormattedLength
|
|
2919
|
+
minFormattedLength: this.formattedValueObject.minFormattedLength,
|
|
2922
2920
|
};
|
|
2923
2921
|
this.input.emit(eventDetail);
|
|
2924
2922
|
this.change.emit(eventDetail);
|
|
@@ -2957,17 +2955,17 @@ const Q2Input = class {
|
|
|
2957
2955
|
percentage: formatPercentage,
|
|
2958
2956
|
postal: formatPostalCode,
|
|
2959
2957
|
date: formatDate,
|
|
2960
|
-
'credit-card': formatCreditCard.format
|
|
2958
|
+
'credit-card': formatCreditCard.format,
|
|
2961
2959
|
};
|
|
2962
2960
|
if (formattingFunctions[this.type]) {
|
|
2963
2961
|
return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);
|
|
2964
2962
|
}
|
|
2965
2963
|
return {
|
|
2966
|
-
value
|
|
2964
|
+
value,
|
|
2967
2965
|
formattedValue: value,
|
|
2968
2966
|
fullyFormattedValue: value,
|
|
2969
2967
|
formattingCharacterCount: 0,
|
|
2970
|
-
unformattedValue: value
|
|
2968
|
+
unformattedValue: value,
|
|
2971
2969
|
};
|
|
2972
2970
|
}
|
|
2973
2971
|
get canClear() {
|
|
@@ -3004,7 +3002,7 @@ const Q2Input = class {
|
|
|
3004
3002
|
'percentage',
|
|
3005
3003
|
'postal',
|
|
3006
3004
|
'date',
|
|
3007
|
-
'credit-card'
|
|
3005
|
+
'credit-card',
|
|
3008
3006
|
];
|
|
3009
3007
|
return maskedTypes.includes(this.type);
|
|
3010
3008
|
}
|
|
@@ -3039,7 +3037,7 @@ const Q2Input = class {
|
|
|
3039
3037
|
percentage: 'tel',
|
|
3040
3038
|
postal: 'tel',
|
|
3041
3039
|
date: 'tel',
|
|
3042
|
-
'credit-card': 'tel'
|
|
3040
|
+
'credit-card': 'tel',
|
|
3043
3041
|
};
|
|
3044
3042
|
if (['password', 'text'].includes(this.type) && this.textHidden) {
|
|
3045
3043
|
return 'password';
|
|
@@ -3119,15 +3117,14 @@ const Q2Input = class {
|
|
|
3119
3117
|
handleDataInput(newFormattedValue) {
|
|
3120
3118
|
if (this.maxlength === undefined ||
|
|
3121
3119
|
newFormattedValue.unformattedValue.length <= this.maxlength ||
|
|
3122
|
-
newFormattedValue.unformattedValue.length <=
|
|
3123
|
-
this.formattedValueObject.unformattedValue.length) {
|
|
3120
|
+
newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length) {
|
|
3124
3121
|
this.formattedValueObject = newFormattedValue;
|
|
3125
3122
|
}
|
|
3126
3123
|
else if (this.maxlength) {
|
|
3127
3124
|
newFormattedValue = this.getFormattedValue(newFormattedValue.unformattedValue.substring(0, this.maxlength), false);
|
|
3128
3125
|
this.formattedValueObject = newFormattedValue;
|
|
3129
3126
|
}
|
|
3130
|
-
//ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position
|
|
3127
|
+
// ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position
|
|
3131
3128
|
const cursorPosition = this.calculateCursorPositionOnInput();
|
|
3132
3129
|
this.inputField.value = this.formattedValueObject.formattedValue;
|
|
3133
3130
|
this.input.emit(Object.assign({ value: this.formattedValueObject.value, formattedValue: this.formattedValueObject.fullyFormattedValue, minFormattedLength: this.formattedValueObject.minFormattedLength }, (this.formattedValueObject.type && { type: this.formattedValueObject.type })));
|
|
@@ -3137,25 +3134,32 @@ const Q2Input = class {
|
|
|
3137
3134
|
render() {
|
|
3138
3135
|
return (h("div", { class: this.wrapperClasses }, labelDOM(this), this.inputDOM(), messagesDOM(this)));
|
|
3139
3136
|
}
|
|
3137
|
+
/* tslint:disable:cyclomatic-complexity */
|
|
3140
3138
|
inputDOM() {
|
|
3141
|
-
return (h("div", { class: "input-container" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("span", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft })), this.showIconSeperator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("q2-icon", { type: "error", class: "icon-error" }))), this.pseudo ? (this.pseudoInputDOM()) : (h("input", { class: "input-field", id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": this.hideLabel && this.label ? loc(this.label) : undefined, autocomplete: this.autocomplete ? this.autocomplete : 'off', autocapitalize: this.autocapitalize === 'on' ? 'on' : 'off', autocorrect: this.autocorrect === 'on' ? 'on' : 'off', placeholder: (this.placeholder && loc(this.placeholder)) || undefined, role: (this.role && `${this.role}`) || undefined, "test-id": "inputField", readonly: !!this.readonly, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onKeyDown: this.onInputKeydown, onInput: this.onInputInput, onPaste: this.onInputPaste })), h("div", { class: "input-icons-container-right" }, this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput }, h("q2-icon", { type: "close", class: "icon-clear" }))), ['password', 'text'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)), this.iconRight && !this.formattedValueObject.suffix && (h("q2-icon", { type: this.iconRight, class: "icon-right" })), this.hasError && this.type !== 'currency' && (h("q2-icon", { type: "error", class: "icon-error" })))));
|
|
3139
|
+
return (h("div", { class: "input-container" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("span", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft })), this.showIconSeperator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("q2-icon", { type: "error", class: "icon-error" }))), this.pseudo ? (this.pseudoInputDOM()) : (h("input", { class: "input-field", id: this.inputId, type: this.computedType, size: this.formattedValueObject.prefix ? 10 : undefined, max: this.max, min: this.min, "aria-current": this.current || undefined, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": this.hideLabel && this.label ? loc(this.label) : undefined, autocomplete: this.autocomplete ? this.autocomplete : 'off', autocapitalize: this.autocapitalize === 'on' ? 'on' : 'off', autocorrect: this.autocorrect === 'on' ? 'on' : 'off', placeholder: (this.placeholder && loc(this.placeholder)) || undefined, role: (this.role && `${this.role}`) || undefined, "test-id": "inputField", readonly: !!this.readonly, disabled: !!this.disabled, onFocus: this.onInputFocus, onBlur: this.onInputBlur, onKeyDown: this.onInputKeydown, onInput: this.onInputInput, onPaste: this.onInputPaste })), h("div", { class: "input-icons-container-right" }, this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput }, h("q2-icon", { type: "close", class: "icon-clear" }))), ['password', 'text'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)), this.iconRight && !this.formattedValueObject.suffix && (h("q2-icon", { type: this.iconRight, class: "icon-right" })), this.hasError && this.type !== 'currency' && (h("q2-icon", { type: "error", class: "icon-error" })))));
|
|
3142
3140
|
}
|
|
3141
|
+
/* tslint:enable:cyclomatic-complexity */
|
|
3143
3142
|
pseudoInputDOM() {
|
|
3144
3143
|
const showPlaceholder = !this.value && !!this.placeholder;
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3144
|
+
let ariaLabelSuffix = '';
|
|
3145
|
+
if (this.optional) {
|
|
3146
|
+
ariaLabelSuffix = loc('tecton.element.input.optional');
|
|
3147
|
+
}
|
|
3148
|
+
if (this.readonly) {
|
|
3149
|
+
ariaLabelSuffix = loc('tecton.element.input.readonly');
|
|
3150
|
+
}
|
|
3151
|
+
return (h("div", { class: "pseudo-input" }, h("button", { class: "input-field", type: "button", id: this.inputId, "aria-describedby": this.inputDescribedBy, "aria-required": `${!this.optional}`, "aria-invalid": `${this.hasError}`, "aria-controls": (this.ariaControls && `${this.ariaControls}`) || undefined, "aria-owns": (this.ariaOwns && `${this.ariaOwns}`) || undefined, "aria-haspopup": (this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined, "aria-expanded": (!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined, "aria-activedescendant": this.ariaActivedescendant && `${this.ariaActivedescendant}`, "aria-label": `${this.value}, ${(this.label && loc(this.label)) || ''}${ariaLabelSuffix}`, role: (this.role && `${this.role}`) || undefined, disabled: !!this.disabled, "test-id": "q2InputInnerClearButton" }, h("span", { class: showPlaceholder ? 'placeholder-text' : '' }, showPlaceholder ? this.placeholder : this.value))));
|
|
3149
3152
|
}
|
|
3150
3153
|
calculateCursorPositionOnInput() {
|
|
3151
3154
|
const input = this.inputField;
|
|
3152
3155
|
const formattedLength = this.formattedValueObject.formattedValue.length;
|
|
3153
3156
|
const currentValueLength = input.value.length;
|
|
3157
|
+
const defaultPosition = this.type === 'currency' ? formattedLength : 0;
|
|
3154
3158
|
return {
|
|
3155
|
-
startingPosition: (input && input.selectionStart) ||
|
|
3159
|
+
startingPosition: (input && input.selectionStart) || defaultPosition,
|
|
3156
3160
|
valueLength: formattedLength,
|
|
3157
3161
|
previousValueLength: input && currentValueLength,
|
|
3158
|
-
hasSelection: false
|
|
3162
|
+
hasSelection: false,
|
|
3159
3163
|
};
|
|
3160
3164
|
}
|
|
3161
3165
|
calculateCursorPositionOnFocus() {
|
|
@@ -3166,16 +3170,14 @@ const Q2Input = class {
|
|
|
3166
3170
|
startingPosition,
|
|
3167
3171
|
valueLength,
|
|
3168
3172
|
previousValueLength: valueLength,
|
|
3169
|
-
hasSelection: getSelection().toString().length > 0
|
|
3173
|
+
hasSelection: getSelection().toString().length > 0,
|
|
3170
3174
|
};
|
|
3171
3175
|
}
|
|
3172
3176
|
setCursorPosition(cursorData) {
|
|
3173
3177
|
if (this.canSetSelection && !cursorData.hasSelection) {
|
|
3174
3178
|
const input = this.inputField;
|
|
3175
3179
|
const { valueLength, previousValueLength, startingPosition } = cursorData;
|
|
3176
|
-
if (startingPosition === valueLength &&
|
|
3177
|
-
valueLength >= previousValueLength &&
|
|
3178
|
-
this.type === 'currency') {
|
|
3180
|
+
if (startingPosition === valueLength && valueLength >= previousValueLength && this.type === 'currency') {
|
|
3179
3181
|
input.setSelectionRange(valueLength, valueLength);
|
|
3180
3182
|
}
|
|
3181
3183
|
else {
|