@taiga-ui/core 3.60.0 → 3.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-core-abstract.umd.js +525 -671
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-animations.umd.js +146 -146
- package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +9 -155
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +522 -668
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +673 -819
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +15 -161
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +787 -933
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +3 -3
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +459 -605
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1029 -1175
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +459 -605
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +6 -152
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +65 -211
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +374 -520
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +449 -595
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +31 -31
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +1360 -1506
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +1141 -1287
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +375 -521
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-number-format.umd.js +397 -543
- package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +9 -155
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-observables.umd.js +2 -2
- package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-flag.umd.js +4 -4
- package/bundles/taiga-ui-core-pipes-flag.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +3 -3
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +384 -530
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +2 -2
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +634 -780
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +44 -190
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +19 -19
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +21 -167
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +34 -180
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +7 -7
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/constants/cache-basting-payload.d.ts +1 -1
- package/esm2015/abstract/abstract-textfield-host.js +3 -3
- package/esm2015/animations/animations.js +148 -148
- package/esm2015/components/alert/alert.providers.js +2 -2
- package/esm2015/components/alert/alert.service.js +3 -3
- package/esm2015/components/button/button.options.js +2 -2
- package/esm2015/components/dialog/dialog-close.service.js +5 -5
- package/esm2015/components/dialog/dialog.service.js +3 -3
- package/esm2015/components/dialog/dialog.tokens.js +4 -4
- package/esm2015/components/hosted-dropdown/hosted-dropdown.token.js +2 -2
- package/esm2015/components/loader/loader.options.js +2 -2
- package/esm2015/components/primitive-checkbox/checkbox.options.js +4 -4
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/components/svg/deprecated-icons.js +57 -57
- package/esm2015/components/svg/svg-options.js +4 -4
- package/esm2015/constants/decimal-symbols.js +2 -2
- package/esm2015/constants/default-icons-path.js +2 -2
- package/esm2015/constants/default-number-format.js +4 -4
- package/esm2015/constants/editing-keys.js +10 -10
- package/esm2015/constants/events.js +5 -5
- package/esm2015/constants/hint-directions.js +13 -13
- package/esm2015/constants/mask-caret-trap.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +2 -2
- package/esm2015/directives/textfield-controller/textfield.controller.js +2 -2
- package/esm2015/directives/textfield-controller/textfield.options.js +2 -2
- package/esm2015/enums/appearance.js +1 -1
- package/esm2015/enums/dropdown-animation.js +1 -1
- package/esm2015/enums/interactive-state.js +1 -1
- package/esm2015/enums/notification.js +1 -1
- package/esm2015/enums/range-state.js +1 -1
- package/esm2015/observables/smart-search.js +3 -3
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +2 -2
- package/esm2015/pipes/flag/flag.pipe.js +5 -5
- package/esm2015/pipes/format-date/format-date.pipe.js +2 -2
- package/esm2015/pipes/format-number/format-number.pipe.js +2 -2
- package/esm2015/pipes/format-phone/format-phone.pipe.js +4 -4
- package/esm2015/pipes/month/month.pipe.js +2 -2
- package/esm2015/pipes/order-week-days/order-week-days.pipe.js +2 -2
- package/esm2015/providers/is-mobile-resolution.provider.js +2 -2
- package/esm2015/providers/mode.provider.js +2 -2
- package/esm2015/services/breakpoint.service.js +3 -3
- package/esm2015/services/format-date.service.js +5 -5
- package/esm2015/services/hint.service.js +3 -3
- package/esm2015/services/night-theme.service.js +5 -5
- package/esm2015/services/svg.service.js +5 -5
- package/esm2015/services/visual-viewport.service.js +3 -3
- package/esm2015/tokens/animation-options.js +2 -2
- package/esm2015/tokens/common-icon.js +5 -5
- package/esm2015/tokens/data-list-accessor.js +2 -2
- package/esm2015/tokens/data-list-host.js +2 -2
- package/esm2015/tokens/day-type-handler.js +2 -2
- package/esm2015/tokens/document-or-shadow-root.js +2 -2
- package/esm2015/tokens/element-ref.js +2 -2
- package/esm2015/tokens/i18n.js +7 -7
- package/esm2015/tokens/icon-place.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +2 -2
- package/esm2015/tokens/legacy-mask.js +2 -2
- package/esm2015/tokens/mode.js +2 -2
- package/esm2015/tokens/notification-options.js +9 -9
- package/esm2015/tokens/option-content.js +2 -2
- package/esm2015/tokens/reduced-motion.js +2 -2
- package/esm2015/tokens/sanitizer.js +2 -2
- package/esm2015/tokens/selection-stream.js +2 -2
- package/esm2015/tokens/spin-icons.js +3 -3
- package/esm2015/tokens/textfield-host.js +2 -2
- package/esm2015/tokens/theme.js +2 -2
- package/esm2015/tokens/value-accessor.js +2 -2
- package/esm2015/tokens/viewport.js +2 -2
- package/esm2015/utils/dom/check-fixed-position.js +3 -3
- package/esm2015/utils/dom/get-safe-area-size.js +4 -4
- package/esm2015/utils/dom/get-word-range.js +5 -5
- package/esm2015/utils/dom/process-icon.js +11 -11
- package/esm2015/utils/format/format-number.js +4 -4
- package/esm2015/utils/format/format-phone.js +9 -9
- package/esm2015/utils/format/get-fractional-part-padded.js +2 -2
- package/esm2015/utils/format/number-to-string-without-exp.js +3 -3
- package/esm2015/utils/format/other-decimal-symbol.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +11 -11
- package/esm2015/utils/mask/create-correction-mask.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +13 -13
- package/esm2015/utils/mask/masked-money-value-is-empty.js +3 -3
- package/esm2015/utils/mask/masked-number-string-to-number.js +2 -2
- package/esm2015/utils/miscellaneous/get-border.js +3 -3
- package/esm2015/utils/miscellaneous/icons-path-factory.js +3 -3
- package/esm2015/utils/miscellaneous/is-obscured.js +2 -2
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +2 -2
- package/esm2015/utils/miscellaneous/size-bigger.js +2 -2
- package/fesm2015/taiga-ui-core-abstract.js +2 -2
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-animations.js +146 -146
- package/fesm2015/taiga-ui-core-animations.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +3 -3
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +9 -9
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +3 -3
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +59 -59
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +31 -31
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +3 -3
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-observables.js +2 -2
- package/fesm2015/taiga-ui-core-observables.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-flag.js +4 -4
- package/fesm2015/taiga-ui-core-pipes-flag.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-date.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-date.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +3 -3
- package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-order-week-days.js +1 -1
- package/fesm2015/taiga-ui-core-pipes-order-week-days.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +2 -2
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +18 -18
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +38 -38
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +19 -19
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +15 -15
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +27 -27
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js +7 -7
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/package.json +4 -4
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
})(this, (function (exports, cdk, constants, format) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function addDecimalSymbolIfNeeded(value, decimalSymbol) {
|
|
8
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
8
|
+
if (decimalSymbol === void 0) { decimalSymbol = ','; }
|
|
9
9
|
return !value.includes(decimalSymbol) ? value + decimalSymbol : value;
|
|
10
10
|
}
|
|
11
11
|
function calculateSafariCaret(previousValue, current, previousCaret, decimalSymbol) {
|
|
12
|
-
if (previousValue === void 0) { previousValue =
|
|
13
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
12
|
+
if (previousValue === void 0) { previousValue = ''; }
|
|
13
|
+
if (decimalSymbol === void 0) { decimalSymbol = ','; }
|
|
14
14
|
var tailRegex = new RegExp(decimalSymbol + ".+");
|
|
15
|
-
var previousWithoutTail = previousValue.replace(tailRegex,
|
|
16
|
-
var currentWithoutTail = current.replace(tailRegex,
|
|
15
|
+
var previousWithoutTail = previousValue.replace(tailRegex, '');
|
|
16
|
+
var currentWithoutTail = current.replace(tailRegex, '');
|
|
17
17
|
var pasteOrCutOperation = Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;
|
|
18
18
|
if (pasteOrCutOperation) {
|
|
19
19
|
return current.length;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
function calculateChangedTailIndex(previous, current) {
|
|
36
36
|
for (var i = 0; i < current.length; i++) {
|
|
37
37
|
if (previous[i] !== current[i]) {
|
|
38
|
-
return current[i] ===
|
|
38
|
+
return current[i] === '0' ? i : i + 1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return current.length;
|
|
42
42
|
}
|
|
43
43
|
function calculateCaretGap(previousValue, current, thousandSymbol) {
|
|
44
|
-
if (previousValue === void 0) { previousValue =
|
|
44
|
+
if (previousValue === void 0) { previousValue = ''; }
|
|
45
45
|
var pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;
|
|
46
46
|
if (pasteOrCutOperation) {
|
|
47
47
|
return 0;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
*/
|
|
58
58
|
function tuiCreateAutoCorrectedNumberPipe(decimalLimit, decimalSymbol, thousandSymbol, nativeInput, allowNegative, isIOS) {
|
|
59
59
|
if (decimalLimit === void 0) { decimalLimit = 0; }
|
|
60
|
-
if (decimalSymbol === void 0) { decimalSymbol =
|
|
60
|
+
if (decimalSymbol === void 0) { decimalSymbol = ','; }
|
|
61
61
|
if (thousandSymbol === void 0) { thousandSymbol = cdk.CHAR_NO_BREAK_SPACE; }
|
|
62
62
|
if (isIOS === void 0) { isIOS = false; }
|
|
63
63
|
ngDevMode && cdk.tuiAssert.assert(decimalLimit >= 0);
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
var previousCaret = -1;
|
|
66
66
|
var unlucky = (!!nativeInput && cdk.tuiIsSafari(nativeInput)) || isIOS;
|
|
67
67
|
if (nativeInput && unlucky) {
|
|
68
|
-
nativeInput.addEventListener(
|
|
68
|
+
nativeInput.addEventListener('beforeinput', function () {
|
|
69
69
|
previousCaret = nativeInput.selectionStart || 0;
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -91,19 +91,19 @@
|
|
|
91
91
|
nativeInput.setSelectionRange(realCaretPosition_1, realCaretPosition_1);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
if (conformedValue ===
|
|
94
|
+
if (conformedValue === '' || !decimalLimit || !Number.isInteger(decimalLimit)) {
|
|
95
95
|
return { value: conformedValue };
|
|
96
96
|
}
|
|
97
97
|
var withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);
|
|
98
98
|
var decimalPart = withDecimalSymbol.split(decimalSymbol)[1];
|
|
99
99
|
var zeroPaddingSize = decimalLimit - decimalPart.length;
|
|
100
100
|
return {
|
|
101
|
-
value: withDecimalSymbol +
|
|
101
|
+
value: withDecimalSymbol + '0'.repeat(zeroPaddingSize),
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
/*! *****************************************************************************
|
|
107
107
|
Copyright (c) Microsoft Corporation.
|
|
108
108
|
|
|
109
109
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
118
118
|
PERFORMANCE OF THIS SOFTWARE.
|
|
119
119
|
***************************************************************************** */
|
|
120
|
-
/* global Reflect, Promise
|
|
120
|
+
/* global Reflect, Promise */
|
|
121
121
|
var extendStatics = function (d, b) {
|
|
122
122
|
extendStatics = Object.setPrototypeOf ||
|
|
123
123
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -170,64 +170,6 @@
|
|
|
170
170
|
function __param(paramIndex, decorator) {
|
|
171
171
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
172
172
|
}
|
|
173
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
174
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
175
|
-
throw new TypeError("Function expected"); return f; }
|
|
176
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
177
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
178
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
179
|
-
var _, done = false;
|
|
180
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
181
|
-
var context = {};
|
|
182
|
-
for (var p in contextIn)
|
|
183
|
-
context[p] = p === "access" ? {} : contextIn[p];
|
|
184
|
-
for (var p in contextIn.access)
|
|
185
|
-
context.access[p] = contextIn.access[p];
|
|
186
|
-
context.addInitializer = function (f) { if (done)
|
|
187
|
-
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
188
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
189
|
-
if (kind === "accessor") {
|
|
190
|
-
if (result === void 0)
|
|
191
|
-
continue;
|
|
192
|
-
if (result === null || typeof result !== "object")
|
|
193
|
-
throw new TypeError("Object expected");
|
|
194
|
-
if (_ = accept(result.get))
|
|
195
|
-
descriptor.get = _;
|
|
196
|
-
if (_ = accept(result.set))
|
|
197
|
-
descriptor.set = _;
|
|
198
|
-
if (_ = accept(result.init))
|
|
199
|
-
initializers.unshift(_);
|
|
200
|
-
}
|
|
201
|
-
else if (_ = accept(result)) {
|
|
202
|
-
if (kind === "field")
|
|
203
|
-
initializers.unshift(_);
|
|
204
|
-
else
|
|
205
|
-
descriptor[key] = _;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
if (target)
|
|
209
|
-
Object.defineProperty(target, contextIn.name, descriptor);
|
|
210
|
-
done = true;
|
|
211
|
-
}
|
|
212
|
-
;
|
|
213
|
-
function __runInitializers(thisArg, initializers, value) {
|
|
214
|
-
var useValue = arguments.length > 2;
|
|
215
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
216
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
217
|
-
}
|
|
218
|
-
return useValue ? value : void 0;
|
|
219
|
-
}
|
|
220
|
-
;
|
|
221
|
-
function __propKey(x) {
|
|
222
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
|
223
|
-
}
|
|
224
|
-
;
|
|
225
|
-
function __setFunctionName(f, name, prefix) {
|
|
226
|
-
if (typeof name === "symbol")
|
|
227
|
-
name = name.description ? "[".concat(name.description, "]") : "";
|
|
228
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
229
|
-
}
|
|
230
|
-
;
|
|
231
173
|
function __metadata(metadataKey, metadataValue) {
|
|
232
174
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
233
175
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -259,7 +201,7 @@
|
|
|
259
201
|
function step(op) {
|
|
260
202
|
if (f)
|
|
261
203
|
throw new TypeError("Generator is already executing.");
|
|
262
|
-
while (
|
|
204
|
+
while (_)
|
|
263
205
|
try {
|
|
264
206
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
265
207
|
return t;
|
|
@@ -323,11 +265,7 @@
|
|
|
323
265
|
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
324
266
|
if (k2 === undefined)
|
|
325
267
|
k2 = k;
|
|
326
|
-
|
|
327
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
328
|
-
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
329
|
-
}
|
|
330
|
-
Object.defineProperty(o, k2, desc);
|
|
268
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
331
269
|
}) : (function (o, m, k, k2) {
|
|
332
270
|
if (k2 === undefined)
|
|
333
271
|
k2 = k;
|
|
@@ -400,7 +338,7 @@
|
|
|
400
338
|
ar[i] = from[i];
|
|
401
339
|
}
|
|
402
340
|
}
|
|
403
|
-
return to.concat(ar ||
|
|
341
|
+
return to.concat(ar || from);
|
|
404
342
|
}
|
|
405
343
|
function __await(v) {
|
|
406
344
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -427,7 +365,7 @@
|
|
|
427
365
|
function __asyncDelegator(o) {
|
|
428
366
|
var i, p;
|
|
429
367
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
430
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done:
|
|
368
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
431
369
|
}
|
|
432
370
|
function __asyncValues(o) {
|
|
433
371
|
if (!Symbol.asyncIterator)
|
|
@@ -482,99 +420,15 @@
|
|
|
482
420
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
483
421
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
484
422
|
}
|
|
485
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
486
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
487
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
488
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
489
|
-
}
|
|
490
|
-
function __addDisposableResource(env, value, async) {
|
|
491
|
-
if (value !== null && value !== void 0) {
|
|
492
|
-
if (typeof value !== "object" && typeof value !== "function")
|
|
493
|
-
throw new TypeError("Object expected.");
|
|
494
|
-
var dispose;
|
|
495
|
-
if (async) {
|
|
496
|
-
if (!Symbol.asyncDispose)
|
|
497
|
-
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
498
|
-
dispose = value[Symbol.asyncDispose];
|
|
499
|
-
}
|
|
500
|
-
if (dispose === void 0) {
|
|
501
|
-
if (!Symbol.dispose)
|
|
502
|
-
throw new TypeError("Symbol.dispose is not defined.");
|
|
503
|
-
dispose = value[Symbol.dispose];
|
|
504
|
-
}
|
|
505
|
-
if (typeof dispose !== "function")
|
|
506
|
-
throw new TypeError("Object not disposable.");
|
|
507
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
508
|
-
}
|
|
509
|
-
else if (async) {
|
|
510
|
-
env.stack.push({ async: true });
|
|
511
|
-
}
|
|
512
|
-
return value;
|
|
513
|
-
}
|
|
514
|
-
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
515
|
-
var e = new Error(message);
|
|
516
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
517
|
-
};
|
|
518
|
-
function __disposeResources(env) {
|
|
519
|
-
function fail(e) {
|
|
520
|
-
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
521
|
-
env.hasError = true;
|
|
522
|
-
}
|
|
523
|
-
function next() {
|
|
524
|
-
while (env.stack.length) {
|
|
525
|
-
var rec = env.stack.pop();
|
|
526
|
-
try {
|
|
527
|
-
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
528
|
-
if (rec.async)
|
|
529
|
-
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
530
|
-
}
|
|
531
|
-
catch (e) {
|
|
532
|
-
fail(e);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
if (env.hasError)
|
|
536
|
-
throw env.error;
|
|
537
|
-
}
|
|
538
|
-
return next();
|
|
539
|
-
}
|
|
540
|
-
var tslib_es6 = {
|
|
541
|
-
__extends: __extends,
|
|
542
|
-
__assign: __assign,
|
|
543
|
-
__rest: __rest,
|
|
544
|
-
__decorate: __decorate,
|
|
545
|
-
__param: __param,
|
|
546
|
-
__metadata: __metadata,
|
|
547
|
-
__awaiter: __awaiter,
|
|
548
|
-
__generator: __generator,
|
|
549
|
-
__createBinding: __createBinding,
|
|
550
|
-
__exportStar: __exportStar,
|
|
551
|
-
__values: __values,
|
|
552
|
-
__read: __read,
|
|
553
|
-
__spread: __spread,
|
|
554
|
-
__spreadArrays: __spreadArrays,
|
|
555
|
-
__spreadArray: __spreadArray,
|
|
556
|
-
__await: __await,
|
|
557
|
-
__asyncGenerator: __asyncGenerator,
|
|
558
|
-
__asyncDelegator: __asyncDelegator,
|
|
559
|
-
__asyncValues: __asyncValues,
|
|
560
|
-
__makeTemplateObject: __makeTemplateObject,
|
|
561
|
-
__importStar: __importStar,
|
|
562
|
-
__importDefault: __importDefault,
|
|
563
|
-
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
564
|
-
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
565
|
-
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
566
|
-
__addDisposableResource: __addDisposableResource,
|
|
567
|
-
__disposeResources: __disposeResources,
|
|
568
|
-
};
|
|
569
423
|
|
|
570
|
-
var ASSERTION =
|
|
424
|
+
var ASSERTION = 'Correction function must return single char or null';
|
|
571
425
|
/**
|
|
572
426
|
* TODO: delete in v4.0
|
|
573
427
|
* @deprecated Use {@link https://maskito.dev/core-concepts/processors processors} from {@link https://github.com/taiga-family/maskito Maskito}
|
|
574
428
|
*/
|
|
575
429
|
function tuiCreateCorrectionMask(allowed, correctionHandler) {
|
|
576
430
|
return function (rawValue) {
|
|
577
|
-
var mask = rawValue.split(
|
|
431
|
+
var mask = rawValue.split('').reduce(function (result, char, index) {
|
|
578
432
|
var corrected = correctionHandler(char, index);
|
|
579
433
|
ngDevMode &&
|
|
580
434
|
cdk.tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);
|
|
@@ -633,7 +487,7 @@
|
|
|
633
487
|
}
|
|
634
488
|
function convertToMask(strNumber) {
|
|
635
489
|
return strNumber
|
|
636
|
-
.split(
|
|
490
|
+
.split('')
|
|
637
491
|
.map(function (char) { return (constants.TUI_DIGIT_REGEXP.test(char) ? constants.TUI_DIGIT_REGEXP : char); });
|
|
638
492
|
}
|
|
639
493
|
function addThousandsSeparator(strNumber, thousandSymbol) {
|
|
@@ -649,19 +503,19 @@
|
|
|
649
503
|
* Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}
|
|
650
504
|
*/
|
|
651
505
|
function tuiCreateNumberMask(_a) {
|
|
652
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.allowDecimal, allowDecimal = _c === void 0 ? false : _c, _d = _b.decimalSymbol, decimalSymbol = _d === void 0 ?
|
|
506
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.allowDecimal, allowDecimal = _c === void 0 ? false : _c, _d = _b.decimalSymbol, decimalSymbol = _d === void 0 ? ',' : _d, _e = _b.thousandSymbol, thousandSymbol = _e === void 0 ? cdk.CHAR_NO_BREAK_SPACE : _e, _f = _b.autoCorrectDecimalSymbol, autoCorrectDecimalSymbol = _f === void 0 ? true : _f, _g = _b.decimalLimit, decimalLimit = _g === void 0 ? 2 : _g, _h = _b.requireDecimal, requireDecimal = _h === void 0 ? false : _h, _j = _b.allowNegative, allowNegative = _j === void 0 ? false : _j, _k = _b.integerLimit, integerLimit = _k === void 0 ? 0 : _k;
|
|
653
507
|
ngDevMode && cdk.tuiAssert.assert(decimalLimit >= 0);
|
|
654
508
|
ngDevMode && cdk.tuiAssert.assert(Number.isInteger(integerLimit));
|
|
655
509
|
ngDevMode && cdk.tuiAssert.assert(integerLimit >= 0);
|
|
656
510
|
return function (rawValue, _a) {
|
|
657
511
|
var previousConformedValue = _a.previousConformedValue;
|
|
658
512
|
if (previousConformedValue && requireDecimal) {
|
|
659
|
-
var conformedWithoutSeparator = rawValue.split(thousandSymbol).join(
|
|
513
|
+
var conformedWithoutSeparator = rawValue.split(thousandSymbol).join('');
|
|
660
514
|
var previousConformedValueWithoutDecimalSymbolAndSeparator = previousConformedValue
|
|
661
515
|
.split(thousandSymbol)
|
|
662
|
-
.join(
|
|
516
|
+
.join('')
|
|
663
517
|
.split(decimalSymbol)
|
|
664
|
-
.join(
|
|
518
|
+
.join('');
|
|
665
519
|
// Forbid removal of decimal separator if decimal part is required
|
|
666
520
|
if (conformedWithoutSeparator ===
|
|
667
521
|
previousConformedValueWithoutDecimalSymbolAndSeparator) {
|
|
@@ -672,7 +526,7 @@
|
|
|
672
526
|
allowNegative;
|
|
673
527
|
if (isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&
|
|
674
528
|
allowDecimal) {
|
|
675
|
-
return [
|
|
529
|
+
return ['0', decimalSymbol, constants.TUI_DIGIT_REGEXP];
|
|
676
530
|
}
|
|
677
531
|
if (isNegative) {
|
|
678
532
|
rawValue = rawValue.slice(1);
|
|
@@ -680,21 +534,21 @@
|
|
|
680
534
|
var decimalIndex = getDecimalSymbolIndex(rawValue, decimalSymbol, autoCorrectDecimalSymbol);
|
|
681
535
|
var hasDecimal = decimalIndex !== -1;
|
|
682
536
|
var integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;
|
|
683
|
-
var thousandSeparators = integer.match(new RegExp(thousandSymbol,
|
|
537
|
+
var thousandSeparators = integer.match(new RegExp(thousandSymbol, 'g')) || [];
|
|
684
538
|
var integerCapped = integerLimit
|
|
685
539
|
? integer.slice(0, integerLimit + thousandSeparators.length)
|
|
686
540
|
: integer;
|
|
687
|
-
var integerCappedClean = integerCapped.replace(constants.TUI_NON_DIGITS_REGEXP,
|
|
688
|
-
var _b = __read(integerCappedClean.match(constants.TUI_LEADING_ZEROES_REGEXP) || [
|
|
541
|
+
var integerCappedClean = integerCapped.replace(constants.TUI_NON_DIGITS_REGEXP, '');
|
|
542
|
+
var _b = __read(integerCappedClean.match(constants.TUI_LEADING_ZEROES_REGEXP) || [''], 1), leadingZerosMatch = _b[0];
|
|
689
543
|
var leadingZerosAmount = leadingZerosMatch.length;
|
|
690
544
|
var integerCappedZerosClean = integerCappedClean
|
|
691
|
-
.replace(/^0+(?!\.|$)/,
|
|
545
|
+
.replace(/^0+(?!\.|$)/, '')
|
|
692
546
|
.trim();
|
|
693
547
|
var withSeparator = addThousandsSeparator(integerCappedZerosClean, thousandSymbol);
|
|
694
548
|
var mask = convertToMask(withSeparator);
|
|
695
549
|
if ((hasDecimal && allowDecimal) || requireDecimal) {
|
|
696
550
|
var fraction = hasDecimal
|
|
697
|
-
? convertToMask(rawValue.slice(decimalIndex + 1).replace(constants.TUI_NON_DIGITS_REGEXP,
|
|
551
|
+
? convertToMask(rawValue.slice(decimalIndex + 1).replace(constants.TUI_NON_DIGITS_REGEXP, ''))
|
|
698
552
|
: [];
|
|
699
553
|
var fractionCapped = decimalLimit
|
|
700
554
|
? fraction.slice(0, decimalLimit)
|
|
@@ -707,7 +561,7 @@
|
|
|
707
561
|
mask.push(constants.TUI_DIGIT_REGEXP);
|
|
708
562
|
}
|
|
709
563
|
}
|
|
710
|
-
var isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean ===
|
|
564
|
+
var isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === '0';
|
|
711
565
|
if (isNegative) {
|
|
712
566
|
if (mask.length === 0) {
|
|
713
567
|
mask.push(constants.TUI_DIGIT_REGEXP);
|
|
@@ -736,9 +590,9 @@
|
|
|
736
590
|
*/
|
|
737
591
|
function tuiMaskedMoneyValueIsEmpty(value) {
|
|
738
592
|
switch (value) {
|
|
739
|
-
case
|
|
593
|
+
case '':
|
|
740
594
|
case cdk.CHAR_HYPHEN:
|
|
741
|
-
case
|
|
595
|
+
case ',':
|
|
742
596
|
case cdk.CHAR_HYPHEN + ",":
|
|
743
597
|
return true;
|
|
744
598
|
default:
|
|
@@ -751,7 +605,7 @@
|
|
|
751
605
|
* @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead
|
|
752
606
|
*/
|
|
753
607
|
function tuiMaskedNumberStringToNumber(value, decimalsSymbol, thousandSymbol) {
|
|
754
|
-
return parseFloat(value.split(thousandSymbol).join(
|
|
608
|
+
return parseFloat(value.split(thousandSymbol).join('').split(decimalsSymbol).join('.'));
|
|
755
609
|
}
|
|
756
610
|
|
|
757
611
|
/**
|