@taiga-ui/kit 3.34.0 → 3.35.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-kit-components-checkbox-block.umd.js +24 -20
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +18 -27
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +6 -24
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +64 -107
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +18 -17
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +17 -29
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +2 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +6 -2
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +5 -2
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +4 -0
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/components/checkbox-block/checkbox-block.component.d.ts +1 -1
- package/components/checkbox-block/checkbox-block.module.d.ts +6 -5
- package/components/checkbox-labeled/checkbox-labeled.component.d.ts +5 -5
- package/components/input-count/input-count.component.d.ts +0 -3
- package/components/input-number/input-number.component.d.ts +7 -8
- package/components/input-number/input-number.module.d.ts +4 -4
- package/components/input-tag/input-tag.component.d.ts +1 -1
- package/components/radio-block/radio-block.component.d.ts +1 -1
- package/components/radio-block/radio-block.module.d.ts +5 -4
- package/components/radio-labeled/radio-labeled.component.d.ts +5 -5
- package/components/toggle/toggle-options.d.ts +4 -0
- package/components/toggle/toggle.component.d.ts +2 -2
- package/components/tree/components/tree/tree.component.d.ts +3 -2
- package/constants/group-class-names.d.ts +4 -0
- package/esm2015/components/checkbox-block/checkbox-block.component.js +7 -6
- package/esm2015/components/checkbox-block/checkbox-block.module.js +6 -2
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +16 -21
- package/esm2015/components/input-count/input-count.component.js +5 -18
- package/esm2015/components/input-number/input-number.component.js +43 -85
- package/esm2015/components/input-number/input-number.module.js +6 -9
- package/esm2015/components/input-tag/input-tag.component.js +2 -2
- package/esm2015/components/multi-select/multi-select.component.js +2 -2
- package/esm2015/components/radio-block/radio-block.component.js +7 -6
- package/esm2015/components/radio-block/radio-block.module.js +5 -4
- package/esm2015/components/radio-labeled/radio-labeled.component.js +16 -24
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +1 -1
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +3 -1
- package/esm2015/components/toggle/toggle-options.js +6 -1
- package/esm2015/components/toggle/toggle.component.js +4 -4
- package/esm2015/components/tree/components/tree/tree.component.js +6 -3
- package/esm2015/constants/group-class-names.js +5 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +11 -6
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +15 -20
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +4 -17
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +47 -91
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +10 -8
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +15 -23
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +3 -2
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +6 -2
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +5 -2
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +4 -0
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/package.json +11 -11
|
@@ -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.
|
|
5
|
-
})(this, (function (exports, i0, i6,
|
|
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
|
|
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 =
|
|
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
|
-
|
|
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,58 +465,35 @@
|
|
|
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 =
|
|
479
|
+
this.value = cdk.tuiClamp((this.value || 0) + step, this.min, this.max);
|
|
489
480
|
this.nativeValue = this.formattedValue;
|
|
490
481
|
};
|
|
491
|
-
|
|
492
|
-
|
|
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 (
|
|
485
|
+
if (Number.isNaN(parsedValue)) {
|
|
507
486
|
this.value = null;
|
|
508
487
|
return;
|
|
509
488
|
}
|
|
510
489
|
if (this.isNativeValueNotFinished) {
|
|
511
|
-
this.unfinishedValue =
|
|
490
|
+
this.unfinishedValue = nativeValue;
|
|
512
491
|
return;
|
|
513
492
|
}
|
|
514
|
-
|
|
515
|
-
if (capped === null || Number.isNaN(capped)) {
|
|
493
|
+
if (parsedValue < this.min || parsedValue > this.max) {
|
|
516
494
|
return;
|
|
517
495
|
}
|
|
518
|
-
this.value =
|
|
519
|
-
if (capped !==
|
|
520
|
-
i1.tuiMaskedNumberStringToNumber(value, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator)) {
|
|
521
|
-
this.nativeValue = this.formattedValue;
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
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)) {
|
|
533
|
-
event.preventDefault();
|
|
534
|
-
this.setCaretAfterComma();
|
|
535
|
-
}
|
|
496
|
+
this.value = parsedValue;
|
|
536
497
|
};
|
|
537
498
|
TuiInputNumberComponent.prototype.onFocused = function (focused) {
|
|
538
499
|
this.updateFocused(focused);
|
|
@@ -540,14 +501,14 @@
|
|
|
540
501
|
return;
|
|
541
502
|
}
|
|
542
503
|
var nativeNumberValue = this.unfinishedValue
|
|
543
|
-
?
|
|
504
|
+
? kit.maskitoParseNumber(this.unfinishedValue, this.numberFormat.decimalSeparator)
|
|
544
505
|
: this.nativeNumberValue;
|
|
545
506
|
this.unfinishedValue = null;
|
|
546
507
|
if (Number.isNaN(nativeNumberValue)) {
|
|
547
508
|
this.clear();
|
|
548
509
|
return;
|
|
549
510
|
}
|
|
550
|
-
this.value =
|
|
511
|
+
this.value = nativeNumberValue;
|
|
551
512
|
this.nativeValue = this.formattedValue;
|
|
552
513
|
};
|
|
553
514
|
TuiInputNumberComponent.prototype.getFormattedValue = function (value) {
|
|
@@ -562,7 +523,7 @@
|
|
|
562
523
|
if (this.focused && this.decimal !== 'always') {
|
|
563
524
|
decimalLimit = fraction.length;
|
|
564
525
|
}
|
|
565
|
-
return i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit }));
|
|
526
|
+
return i1.tuiFormatNumber(value, Object.assign(Object.assign({}, this.numberFormat), { decimalLimit: decimalLimit })).replace(cdk.CHAR_HYPHEN, cdk.CHAR_MINUS);
|
|
566
527
|
};
|
|
567
528
|
Object.defineProperty(TuiInputNumberComponent.prototype, "isNativeValueNotFinished", {
|
|
568
529
|
get: function () {
|
|
@@ -588,39 +549,41 @@
|
|
|
588
549
|
enumerable: false,
|
|
589
550
|
configurable: true
|
|
590
551
|
});
|
|
552
|
+
TuiInputNumberComponent.prototype.writeValue = function (value) {
|
|
553
|
+
_super.prototype.writeValue.call(this, value);
|
|
554
|
+
this.nativeValue = this.formattedValue;
|
|
555
|
+
};
|
|
591
556
|
Object.defineProperty(TuiInputNumberComponent.prototype, "nativeNumberValue", {
|
|
592
557
|
get: function () {
|
|
593
|
-
return
|
|
558
|
+
return kit.maskitoParseNumber(this.nativeValue, this.numberFormat.decimalSeparator);
|
|
594
559
|
},
|
|
595
560
|
enumerable: false,
|
|
596
561
|
configurable: true
|
|
597
562
|
});
|
|
563
|
+
TuiInputNumberComponent.prototype.calculateMask = function (precision, decimalMode, decimalSeparator, thousandSeparator, min, max) {
|
|
564
|
+
return kit.maskitoNumberOptionsGenerator({
|
|
565
|
+
decimalSeparator: decimalSeparator,
|
|
566
|
+
thousandSeparator: thousandSeparator,
|
|
567
|
+
min: min,
|
|
568
|
+
max: max,
|
|
569
|
+
precision: decimalMode === 'never' ? 0 : precision,
|
|
570
|
+
decimalZeroPadding: decimalMode === 'always',
|
|
571
|
+
});
|
|
572
|
+
};
|
|
598
573
|
TuiInputNumberComponent.prototype.clear = function () {
|
|
599
574
|
this.nativeValue = '';
|
|
600
575
|
this.value = null;
|
|
601
576
|
};
|
|
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
|
-
};
|
|
610
|
-
TuiInputNumberComponent.prototype.setCaretAfterComma = function () {
|
|
611
|
-
if (!this.nativeFocusableElement) {
|
|
612
|
-
return;
|
|
613
|
-
}
|
|
614
|
-
var afterCommaPosition = this.nativeValue.length - this.precision;
|
|
615
|
-
this.nativeFocusableElement.setSelectionRange(afterCommaPosition, afterCommaPosition);
|
|
616
|
-
};
|
|
617
577
|
return TuiInputNumberComponent;
|
|
618
|
-
}(
|
|
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:
|
|
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)"
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
], queries: [{ propertyName: "polymorpheusValueContent", predicate:
|
|
578
|
+
}(cdk.AbstractTuiNullableControl));
|
|
579
|
+
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 });
|
|
580
|
+
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: [
|
|
581
|
+
cdk.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
|
|
582
|
+
cdk.tuiAsControl(TuiInputNumberComponent),
|
|
583
|
+
], 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>\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 });
|
|
584
|
+
__decorate([
|
|
585
|
+
cdk.tuiPure
|
|
586
|
+
], TuiInputNumberComponent.prototype, "calculateMask", null);
|
|
624
587
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberComponent, decorators: [{
|
|
625
588
|
type: i0.Component,
|
|
626
589
|
args: [{
|
|
@@ -629,8 +592,8 @@
|
|
|
629
592
|
styleUrls: ['./input-number.style.less'],
|
|
630
593
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
631
594
|
providers: [
|
|
632
|
-
|
|
633
|
-
|
|
595
|
+
cdk.tuiAsFocusableItemAccessor(TuiInputNumberComponent),
|
|
596
|
+
cdk.tuiAsControl(TuiInputNumberComponent),
|
|
634
597
|
],
|
|
635
598
|
}]
|
|
636
599
|
}], ctorParameters: function () {
|
|
@@ -652,7 +615,7 @@
|
|
|
652
615
|
args: [i1.TUI_NUMBER_FORMAT]
|
|
653
616
|
}] }, { type: undefined, decorators: [{
|
|
654
617
|
type: i0.Inject,
|
|
655
|
-
args: [
|
|
618
|
+
args: [cdk.TUI_IS_IOS]
|
|
656
619
|
}] }];
|
|
657
620
|
}, propDecorators: { primitiveTextfield: [{
|
|
658
621
|
type: i0.ViewChild,
|
|
@@ -673,17 +636,14 @@
|
|
|
673
636
|
type: i0.Input
|
|
674
637
|
}], polymorpheusValueContent: [{
|
|
675
638
|
type: i0.ContentChildren,
|
|
676
|
-
args: [
|
|
639
|
+
args: [i5.PolymorpheusOutletDirective, { descendants: true }]
|
|
677
640
|
}], onArrow: [{
|
|
678
641
|
type: i0.HostListener,
|
|
679
642
|
args: ['keydown.arrowDown', ['-step']]
|
|
680
643
|
}, {
|
|
681
644
|
type: i0.HostListener,
|
|
682
645
|
args: ['keydown.arrowUp', ['step']]
|
|
683
|
-
}],
|
|
684
|
-
type: i0.HostListener,
|
|
685
|
-
args: ['keydown.0', ['$event']]
|
|
686
|
-
}] } });
|
|
646
|
+
}], calculateMask: [] } });
|
|
687
647
|
|
|
688
648
|
var TuiInputNumberDirective = /** @class */ (function (_super) {
|
|
689
649
|
__extends(TuiInputNumberDirective, _super);
|
|
@@ -725,35 +685,32 @@
|
|
|
725
685
|
return TuiInputNumberModule;
|
|
726
686
|
}());
|
|
727
687
|
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: [
|
|
729
|
-
|
|
730
|
-
i5.TuiMapperPipeModule,
|
|
688
|
+
TuiInputNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, declarations: [TuiInputNumberComponent, TuiInputNumberDirective], imports: [i4.CommonModule,
|
|
689
|
+
i3.MaskitoModule,
|
|
731
690
|
i1.TuiPrimitiveTextfieldModule,
|
|
732
691
|
i1.TuiTextfieldControllerModule,
|
|
733
692
|
i2.TuiValueAccessorModule,
|
|
734
|
-
|
|
693
|
+
i5.PolymorpheusModule,
|
|
735
694
|
i1.TuiButtonModule], exports: [TuiInputNumberComponent, TuiInputNumberDirective, i1.TuiTextfieldComponent] });
|
|
736
695
|
TuiInputNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, imports: [[
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
i5.TuiMapperPipeModule,
|
|
696
|
+
i4.CommonModule,
|
|
697
|
+
i3.MaskitoModule,
|
|
740
698
|
i1.TuiPrimitiveTextfieldModule,
|
|
741
699
|
i1.TuiTextfieldControllerModule,
|
|
742
700
|
i2.TuiValueAccessorModule,
|
|
743
|
-
|
|
701
|
+
i5.PolymorpheusModule,
|
|
744
702
|
i1.TuiButtonModule,
|
|
745
703
|
]] });
|
|
746
704
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputNumberModule, decorators: [{
|
|
747
705
|
type: i0.NgModule,
|
|
748
706
|
args: [{
|
|
749
707
|
imports: [
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
i5.TuiMapperPipeModule,
|
|
708
|
+
i4.CommonModule,
|
|
709
|
+
i3.MaskitoModule,
|
|
753
710
|
i1.TuiPrimitiveTextfieldModule,
|
|
754
711
|
i1.TuiTextfieldControllerModule,
|
|
755
712
|
i2.TuiValueAccessorModule,
|
|
756
|
-
|
|
713
|
+
i5.PolymorpheusModule,
|
|
757
714
|
i1.TuiButtonModule,
|
|
758
715
|
],
|
|
759
716
|
declarations: [TuiInputNumberComponent, TuiInputNumberDirective],
|