@taiga-ui/kit 3.33.1-dev.main-1fa4789 → 3.34.0-dev.main-23baa20

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/kit/directives'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-number', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@tinkoff/ng-polymorpheus', '@taiga-ui/kit/directives', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-number"] = {}), global.ng.core, global.ng.forms, global.i5, global.i1, global.i4, global["taiga-ui"].kit.directives, global.ng.common));
5
- })(this, (function (exports, i0, i6, i5, i1, i4, i2, i3) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@maskito/kit'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@tinkoff/ng-polymorpheus'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-number', ['exports', '@angular/core', '@angular/forms', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@tinkoff/ng-polymorpheus', '@taiga-ui/kit/directives', '@maskito/angular', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-number"] = {}), global.ng.core, global.ng.forms, global.kit, global.cdk, global.i1, global.i5, global["taiga-ui"].kit.directives, global.i3, global.ng.common));
5
+ })(this, (function (exports, i0, i6, kit, cdk, i1, i5, i2, i3, i4) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,11 +24,11 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
28
27
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
28
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
30
29
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
30
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
32
32
 
33
33
  /*! *****************************************************************************
34
34
  Copyright (c) Microsoft Corporation.
@@ -389,20 +389,7 @@
389
389
  _this.prefix = '';
390
390
  /** @deprecated use `tuiTextfieldPostfix` from {@link TuiTextfieldControllerModule} instead */
391
391
  _this.postfix = '';
392
- _this.polymorpheusValueContent = i5.EMPTY_QUERY;
393
- _this.mask = function (allowNegative, decimal, decimalLimit, nativeFocusableElement) { return ({
394
- mask: i1.tuiCreateNumberMask({
395
- allowNegative: allowNegative,
396
- decimalLimit: decimalLimit,
397
- allowDecimal: decimal !== 'never',
398
- requireDecimal: decimal === 'always',
399
- decimalSymbol: _this.numberFormat.decimalSeparator,
400
- thousandSymbol: _this.numberFormat.thousandSeparator,
401
- autoCorrectDecimalSymbol: i1.tuiEnableAutoCorrectDecimalSymbol(_this.numberFormat),
402
- }),
403
- pipe: i1.tuiCreateAutoCorrectedNumberPipe(decimal === 'always' ? decimalLimit : 0, _this.numberFormat.decimalSeparator, _this.numberFormat.thousandSeparator, nativeFocusableElement, allowNegative, _this.isIOS),
404
- guide: false,
405
- }); };
392
+ _this.polymorpheusValueContent = cdk.EMPTY_QUERY;
406
393
  return _this;
407
394
  }
408
395
  Object.defineProperty(TuiInputNumberComponent.prototype, "nativeFocusableElement", {
@@ -452,17 +439,14 @@
452
439
  });
453
440
  Object.defineProperty(TuiInputNumberComponent.prototype, "formattedValue", {
454
441
  get: function () {
455
- return this.getFormattedValue(this.value || 0);
442
+ return this.value !== null ? this.getFormattedValue(this.value || 0) : '';
456
443
  },
457
444
  enumerable: false,
458
445
  configurable: true
459
446
  });
460
447
  Object.defineProperty(TuiInputNumberComponent.prototype, "computedValue", {
461
448
  get: function () {
462
- if (this.focused) {
463
- return this.nativeValue;
464
- }
465
- return this.value === null ? '' : this.formattedValue;
449
+ return this.focused ? this.nativeValue : this.formattedValue;
466
450
  },
467
451
  enumerable: false,
468
452
  configurable: true
@@ -481,55 +465,40 @@
481
465
  enumerable: false,
482
466
  configurable: true
483
467
  });
468
+ Object.defineProperty(TuiInputNumberComponent.prototype, "mask", {
469
+ get: function () {
470
+ return this.calculateMask(this.precision, this.decimal, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator, this.min, this.max);
471
+ },
472
+ enumerable: false,
473
+ configurable: true
474
+ });
484
475
  TuiInputNumberComponent.prototype.onArrow = function (step) {
485
476
  if (!step) {
486
477
  return;
487
478
  }
488
- this.value = i5.tuiClamp((this.value || 0) + step, this.min, this.max);
479
+ this.value = cdk.tuiClamp((this.value || 0) + step, this.min, this.max);
489
480
  this.nativeValue = this.formattedValue;
490
481
  };
491
- // TODO: Review if it's still necessary with maskito
492
- TuiInputNumberComponent.prototype.onZero = function (event) {
493
- var decimal = this.nativeValue.split(this.numberFormat.decimalSeparator)[1] || '';
494
- var nativeFocusableElement = this.nativeFocusableElement;
495
- if (decimal.length < this.precision ||
496
- !nativeFocusableElement ||
497
- !nativeFocusableElement.selectionStart ||
498
- this.nativeValue[nativeFocusableElement.selectionStart] !== '0') {
499
- return;
500
- }
501
- event.preventDefault();
502
- nativeFocusableElement.selectionStart++;
503
- };
504
- TuiInputNumberComponent.prototype.onValueChange = function (value) {
482
+ TuiInputNumberComponent.prototype.onValueChange = function (nativeValue) {
483
+ var parsedValue = kit.maskitoParseNumber(nativeValue, this.numberFormat.decimalSeparator);
505
484
  this.unfinishedValue = null;
506
- if (i1.tuiMaskedMoneyValueIsEmpty(value)) {
485
+ if (Number.isNaN(parsedValue)) {
507
486
  this.value = null;
508
487
  return;
509
488
  }
510
489
  if (this.isNativeValueNotFinished) {
511
- this.unfinishedValue = value;
490
+ this.unfinishedValue = nativeValue;
512
491
  return;
513
492
  }
514
- var capped = this.absoluteCapInputValue(value);
515
- if (capped === null || Number.isNaN(capped)) {
493
+ if (parsedValue < this.min || parsedValue > this.max) {
516
494
  return;
517
495
  }
518
- this.value = capped;
519
- if (capped !==
520
- i1.tuiMaskedNumberStringToNumber(value, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator)) {
521
- this.nativeValue = this.formattedValue;
522
- }
496
+ this.value = parsedValue;
523
497
  };
498
+ // TODO: delete this method after fix: https://github.com/Tinkoff/maskito/issues/330
524
499
  TuiInputNumberComponent.prototype.onKeyDown = function (event) {
525
- if (!i1.TUI_DECIMAL_SYMBOLS.includes(event.key)) {
526
- return;
527
- }
528
- if (this.decimal === 'never') {
529
- event.preventDefault();
530
- return;
531
- }
532
- if (this.nativeValue.includes(this.numberFormat.decimalSeparator)) {
500
+ if (i1.TUI_DECIMAL_SYMBOLS.includes(event.key) &&
501
+ this.nativeValue.includes(this.numberFormat.decimalSeparator)) {
533
502
  event.preventDefault();
534
503
  this.setCaretAfterComma();
535
504
  }
@@ -540,14 +509,14 @@
540
509
  return;
541
510
  }
542
511
  var nativeNumberValue = this.unfinishedValue
543
- ? i1.tuiMaskedNumberStringToNumber(this.unfinishedValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator)
512
+ ? kit.maskitoParseNumber(this.unfinishedValue, this.numberFormat.decimalSeparator)
544
513
  : this.nativeNumberValue;
545
514
  this.unfinishedValue = null;
546
515
  if (Number.isNaN(nativeNumberValue)) {
547
516
  this.clear();
548
517
  return;
549
518
  }
550
- this.value = Math.min(this.max, Math.max(this.min, nativeNumberValue));
519
+ this.value = nativeNumberValue;
551
520
  this.nativeValue = this.formattedValue;
552
521
  };
553
522
  TuiInputNumberComponent.prototype.getFormattedValue = function (value) {
@@ -562,7 +531,7 @@
562
531
  if (this.focused && this.decimal !== 'always') {
563
532
  decimalLimit = fraction.length;
564
533
  }
565
- return i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit }));
534
+ return i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit })).replace(cdk.CHAR_HYPHEN, cdk.CHAR_MINUS);
566
535
  };
567
536
  Object.defineProperty(TuiInputNumberComponent.prototype, "isNativeValueNotFinished", {
568
537
  get: function () {
@@ -588,25 +557,32 @@
588
557
  enumerable: false,
589
558
  configurable: true
590
559
  });
560
+ TuiInputNumberComponent.prototype.writeValue = function (value) {
561
+ _super.prototype.writeValue.call(this, value);
562
+ this.nativeValue = this.formattedValue;
563
+ };
591
564
  Object.defineProperty(TuiInputNumberComponent.prototype, "nativeNumberValue", {
592
565
  get: function () {
593
- return i1.tuiMaskedNumberStringToNumber(this.nativeValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
566
+ return kit.maskitoParseNumber(this.nativeValue, this.numberFormat.decimalSeparator);
594
567
  },
595
568
  enumerable: false,
596
569
  configurable: true
597
570
  });
571
+ TuiInputNumberComponent.prototype.calculateMask = function (precision, decimalMode, decimalSeparator, thousandSeparator, min, max) {
572
+ return kit.maskitoNumberOptionsGenerator({
573
+ decimalSeparator: decimalSeparator,
574
+ thousandSeparator: thousandSeparator,
575
+ min: min,
576
+ max: max,
577
+ precision: decimalMode === 'never' ? 0 : precision,
578
+ decimalZeroPadding: decimalMode === 'always',
579
+ });
580
+ };
598
581
  TuiInputNumberComponent.prototype.clear = function () {
599
582
  this.nativeValue = '';
600
583
  this.value = null;
601
584
  };
602
- TuiInputNumberComponent.prototype.absoluteCapInputValue = function (inputValue) {
603
- var value = i1.tuiMaskedNumberStringToNumber(inputValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
604
- var capped = value < 0
605
- ? Math.max(Math.max(this.min, Number.MIN_SAFE_INTEGER), value)
606
- : Math.min(value, Math.min(this.max, Number.MAX_SAFE_INTEGER));
607
- var ineligibleValue = Number.isNaN(capped) || capped < this.min || capped > this.max;
608
- return ineligibleValue ? null : capped;
609
- };
585
+ // TODO: delete this method after fix: https://github.com/Tinkoff/maskito/issues/330
610
586
  TuiInputNumberComponent.prototype.setCaretAfterComma = function () {
611
587
  if (!this.nativeFocusableElement) {
612
588
  return;
@@ -615,12 +591,15 @@
615
591
  this.nativeFocusableElement.setSelectionRange(afterCommaPosition, afterCommaPosition);
616
592
  };
617
593
  return TuiInputNumberComponent;
618
- }(i5.AbstractTuiNullableControl));
619
- TuiInputNumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: TUI_INPUT_NUMBER_OPTIONS }, { token: i1.TUI_NUMBER_FORMAT }, { token: i5.TUI_IS_IOS }], target: i0__namespace.ɵɵFactoryTarget.Component });
620
- TuiInputNumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberComponent, selector: "tui-input-number", inputs: { min: "min", max: "max", decimal: "decimal", precision: "precision", step: "step", prefix: "prefix", postfix: "postfix" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)", "keydown.0": "onZero($event)" } }, providers: [
621
- i5.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
622
- i5.tuiAsControl(TuiInputNumberComponent),
623
- ], queries: [{ propertyName: "polymorpheusValueContent", predicate: i4.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "primitiveTextfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-primitive-textfield\n #textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"isNegativeAllowed | tuiMapper : mask : decimal : precision : nativeFocusableElement\"\n [value]=\"computedValue\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [focusable]=\"focusable\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<section\n *ngIf=\"step\"\n class=\"t-buttons\"\n>\n <button\n tuiIconButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [icon]=\"options.icons.up\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canIncrement\"\n [focusable]=\"false\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n (click.prevent)=\"onArrow(step)\"\n >\n +\n </button>\n <button\n tuiIconButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [icon]=\"options.icons.down\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canDecrement\"\n [focusable]=\"false\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n (click.prevent)=\"onArrow(-step)\"\n >\n -\n </button>\n</section>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n", styles: [":host{display:flex;border-radius:var(--tui-radius-m);text-align:left}.t-textfield{flex:1;max-width:100%;border-radius:inherit;text-align:inherit}.t-textfield:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.t-value-content{width:100%}.t-buttons{display:flex;flex-direction:column;align-items:stretch;margin-left:.125rem}[data-size=s]+.t-buttons{flex-direction:row-reverse}[data-size=s]+.t-buttons .t-button:first-child{margin:0 0 0 .125rem;border-radius:0 var(--tui-radius-m) var(--tui-radius-m) 0}[data-size=s]+.t-buttons .t-button:last-child{border-radius:0}[data-size=m]+.t-buttons .t-button{width:calc(var(--tui-height-m) * .75)}[data-size=l]+.t-buttons .t-button{width:calc(var(--tui-height-l) * .75)}.t-button{display:flex;flex:1;height:auto}.t-button:first-child{margin-bottom:.125rem;border-radius:0 var(--tui-radius-m) 0 0}.t-button:last-child{border-radius:0 0 var(--tui-radius-m)}\n"], components: [{ type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i2__namespace.MaskedInputDirective, selector: "[textMask]", inputs: ["textMask"], exportAs: ["textMask"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "tuiMapper": i5__namespace.TuiMapperPipe, "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
594
+ }(cdk.AbstractTuiNullableControl));
595
+ TuiInputNumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: TUI_INPUT_NUMBER_OPTIONS }, { token: i1.TUI_NUMBER_FORMAT }, { token: cdk.TUI_IS_IOS }], target: i0__namespace.ɵɵFactoryTarget.Component });
596
+ TuiInputNumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputNumberComponent, selector: "tui-input-number", inputs: { min: "min", max: "max", decimal: "decimal", precision: "precision", step: "step", prefix: "prefix", postfix: "postfix" }, host: { listeners: { "keydown.arrowDown": "onArrow(-step)", "keydown.arrowUp": "onArrow(step)" } }, providers: [
597
+ cdk.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
598
+ cdk.tuiAsControl(TuiInputNumberComponent),
599
+ ], queries: [{ propertyName: "polymorpheusValueContent", predicate: i5.PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "primitiveTextfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-primitive-textfield\n #textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [maskito]=\"mask\"\n [value]=\"computedValue\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [focusable]=\"focusable\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<section\n *ngIf=\"step\"\n class=\"t-buttons\"\n>\n <button\n tuiIconButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [icon]=\"options.icons.up\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canIncrement\"\n [focusable]=\"false\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n (click.prevent)=\"onArrow(step)\"\n >\n +\n </button>\n <button\n tuiIconButton\n type=\"button\"\n size=\"s\"\n class=\"t-button\"\n [icon]=\"options.icons.down\"\n [appearance]=\"textfield.appearance\"\n [disabled]=\"!canDecrement\"\n [focusable]=\"false\"\n (mousedown.prevent)=\"nativeFocusableElement?.focus()\"\n (click.prevent)=\"onArrow(-step)\"\n >\n -\n </button>\n</section>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n", styles: [":host{display:flex;border-radius:var(--tui-radius-m);text-align:left}.t-textfield{flex:1;max-width:100%;border-radius:inherit;text-align:inherit}.t-textfield:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.t-value-content{width:100%}.t-buttons{display:flex;flex-direction:column;align-items:stretch;margin-left:.125rem}[data-size=s]+.t-buttons{flex-direction:row-reverse}[data-size=s]+.t-buttons .t-button:first-child{margin:0 0 0 .125rem;border-radius:0 var(--tui-radius-m) var(--tui-radius-m) 0}[data-size=s]+.t-buttons .t-button:last-child{border-radius:0}[data-size=m]+.t-buttons .t-button{width:calc(var(--tui-height-m) * .75)}[data-size=l]+.t-buttons .t-button{width:calc(var(--tui-height-l) * .75)}.t-button{display:flex;flex:1;height:auto}.t-button:first-child{margin-bottom:.125rem;border-radius:0 var(--tui-radius-m) 0 0}.t-button:last-child{border-radius:0 0 var(--tui-radius-m)}\n"], components: [{ type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i3__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
600
+ __decorate([
601
+ cdk.tuiPure
602
+ ], TuiInputNumberComponent.prototype, "calculateMask", null);
624
603
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, decorators: [{
625
604
  type: i0.Component,
626
605
  args: [{
@@ -629,8 +608,8 @@
629
608
  styleUrls: ['./input-number.style.less'],
630
609
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
631
610
  providers: [
632
- i5.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
633
- i5.tuiAsControl(TuiInputNumberComponent),
611
+ cdk.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
612
+ cdk.tuiAsControl(TuiInputNumberComponent),
634
613
  ],
635
614
  }]
636
615
  }], ctorParameters: function () {
@@ -652,7 +631,7 @@
652
631
  args: [i1.TUI_NUMBER_FORMAT]
653
632
  }] }, { type: undefined, decorators: [{
654
633
  type: i0.Inject,
655
- args: [i5.TUI_IS_IOS]
634
+ args: [cdk.TUI_IS_IOS]
656
635
  }] }];
657
636
  }, propDecorators: { primitiveTextfield: [{
658
637
  type: i0.ViewChild,
@@ -673,17 +652,14 @@
673
652
  type: i0.Input
674
653
  }], polymorpheusValueContent: [{
675
654
  type: i0.ContentChildren,
676
- args: [i4.PolymorpheusOutletDirective, { descendants: true }]
655
+ args: [i5.PolymorpheusOutletDirective, { descendants: true }]
677
656
  }], onArrow: [{
678
657
  type: i0.HostListener,
679
658
  args: ['keydown.arrowDown', ['-step']]
680
659
  }, {
681
660
  type: i0.HostListener,
682
661
  args: ['keydown.arrowUp', ['step']]
683
- }], onZero: [{
684
- type: i0.HostListener,
685
- args: ['keydown.0', ['$event']]
686
- }] } });
662
+ }], calculateMask: [] } });
687
663
 
688
664
  var TuiInputNumberDirective = /** @class */ (function (_super) {
689
665
  __extends(TuiInputNumberDirective, _super);
@@ -725,35 +701,32 @@
725
701
  return TuiInputNumberModule;
726
702
  }());
727
703
  TuiInputNumberModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
728
- TuiInputNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, declarations: [TuiInputNumberComponent, TuiInputNumberDirective], imports: [i3.CommonModule,
729
- i2.TextMaskModule,
730
- i5.TuiMapperPipeModule,
704
+ TuiInputNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, declarations: [TuiInputNumberComponent, TuiInputNumberDirective], imports: [i4.CommonModule,
705
+ i3.MaskitoModule,
731
706
  i1.TuiPrimitiveTextfieldModule,
732
707
  i1.TuiTextfieldControllerModule,
733
708
  i2.TuiValueAccessorModule,
734
- i4.PolymorpheusModule,
709
+ i5.PolymorpheusModule,
735
710
  i1.TuiButtonModule], exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent] });
736
711
  TuiInputNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, imports: [[
737
- i3.CommonModule,
738
- i2.TextMaskModule,
739
- i5.TuiMapperPipeModule,
712
+ i4.CommonModule,
713
+ i3.MaskitoModule,
740
714
  i1.TuiPrimitiveTextfieldModule,
741
715
  i1.TuiTextfieldControllerModule,
742
716
  i2.TuiValueAccessorModule,
743
- i4.PolymorpheusModule,
717
+ i5.PolymorpheusModule,
744
718
  i1.TuiButtonModule,
745
719
  ]] });
746
720
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, decorators: [{
747
721
  type: i0.NgModule,
748
722
  args: [{
749
723
  imports: [
750
- i3.CommonModule,
751
- i2.TextMaskModule,
752
- i5.TuiMapperPipeModule,
724
+ i4.CommonModule,
725
+ i3.MaskitoModule,
753
726
  i1.TuiPrimitiveTextfieldModule,
754
727
  i1.TuiTextfieldControllerModule,
755
728
  i2.TuiValueAccessorModule,
756
- i4.PolymorpheusModule,
729
+ i5.PolymorpheusModule,
757
730
  i1.TuiButtonModule,
758
731
  ],
759
732
  declarations: [TuiInputNumberComponent, TuiInputNumberDirective],