@taiga-ui/kit 3.28.0-dev.main-f289acd → 3.29.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-input-date-time.umd.js +90 -85
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +2 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +8 -0
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-mask.umd.js +1 -1
- package/bundles/taiga-ui-kit-directives-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +9 -0
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/components/input-date-time/input-date-time.component.d.ts +5 -2
- package/components/input-date-time/input-date-time.module.d.ts +3 -2
- package/constants/empty-mask.d.ts +4 -0
- package/constants/masks.d.ts +4 -0
- package/esm2015/components/input-date-time/input-date-time.component.js +46 -43
- package/esm2015/components/input-date-time/input-date-time.module.js +6 -5
- package/esm2015/components/input-slider/input-slider.component.js +2 -2
- package/esm2015/components/range/range.component.js +2 -2
- package/esm2015/components/slider/helpers/slider-key-steps.directive.js +3 -2
- package/esm2015/constants/empty-mask.js +5 -1
- package/esm2015/constants/masks.js +5 -1
- package/esm2015/directives/mask/legacy-mask.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -1
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +5 -1
- package/esm2015/utils/mask/create-auto-corrected-time-pipe.js +2 -1
- package/esm2015/utils/mask/create-date-mask.js +2 -1
- package/esm2015/utils/mask/create-time-mask.js +2 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +49 -45
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +2 -1
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +8 -0
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-mask.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +9 -0
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/package.json +7 -7
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +3 -0
- package/utils/mask/create-auto-corrected-date-time-pipe.d.ts +4 -0
- package/utils/mask/create-auto-corrected-time-pipe.d.ts +1 -0
- package/utils/mask/create-date-mask.d.ts +1 -0
- package/utils/mask/create-time-mask.d.ts +1 -0
|
@@ -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('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-date-time', ['exports', '@angular/core', '@angular/forms', '@
|
|
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-date-time"] = {}), global.ng.core, global.ng.forms, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
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('@taiga-ui/kit/constants'), require('@taiga-ui/kit/tokens'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/kit/directives'), require('@maskito/angular'), require('@tinkoff/ng-polymorpheus'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-date-time', ['exports', '@angular/core', '@angular/forms', '@maskito/kit', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/constants', '@taiga-ui/kit/tokens', 'rxjs', 'rxjs/operators', '@taiga-ui/kit/directives', '@maskito/angular', '@tinkoff/ng-polymorpheus', '@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-date-time"] = {}), global.ng.core, global.ng.forms, global.kit, global.i7, global.i1, global["taiga-ui"].kit.constants, global["taiga-ui"].kit.tokens, global.rxjs, global.rxjs.operators, global["taiga-ui"].kit.directives, global.i3, global.i4, global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, i8, kit, i7, i1, constants, tokens, i9, operators, i2, i3, i4, i5) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
26
27
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
27
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
28
28
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var
|
|
29
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
30
30
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
31
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
32
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
33
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
33
34
|
|
|
34
35
|
/*! *****************************************************************************
|
|
35
36
|
Copyright (c) Microsoft Corporation.
|
|
@@ -370,8 +371,8 @@
|
|
|
370
371
|
return;
|
|
371
372
|
}
|
|
372
373
|
var date = new Date(value);
|
|
373
|
-
var day =
|
|
374
|
-
var time =
|
|
374
|
+
var day = i7.TuiDay.fromLocalNativeDate(date);
|
|
375
|
+
var time = i7.TuiTime.fromLocalNativeDate(date);
|
|
375
376
|
this.host.writeValue([day, time]);
|
|
376
377
|
};
|
|
377
378
|
return TuiNativeDateTimeDirective;
|
|
@@ -415,26 +416,26 @@
|
|
|
415
416
|
_this.month = null;
|
|
416
417
|
_this.min = _this.options.min;
|
|
417
418
|
_this.max = _this.options.max;
|
|
418
|
-
_this.disabledItemHandler =
|
|
419
|
-
_this.defaultActiveYearMonth =
|
|
419
|
+
_this.disabledItemHandler = i7.ALWAYS_FALSE_HANDLER;
|
|
420
|
+
_this.defaultActiveYearMonth = i7.TuiMonth.currentLocal();
|
|
420
421
|
_this.timeMode = 'HH:MM';
|
|
421
422
|
_this.open = false;
|
|
422
|
-
_this.filler$ =
|
|
423
|
-
_this.dateTexts$.pipe(operators.map(function (dateTexts) { return
|
|
423
|
+
_this.filler$ = i9.combineLatest([
|
|
424
|
+
_this.dateTexts$.pipe(operators.map(function (dateTexts) { return i7.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); })),
|
|
424
425
|
_this.timeTexts$.pipe(operators.map(function (texts) { return texts[_this.timeMode]; })),
|
|
425
426
|
]).pipe(operators.map(function (fillers) { return _this.getDateTimeString.apply(_this, __spreadArray([], __read(fillers))); }));
|
|
426
427
|
return _this;
|
|
427
428
|
}
|
|
428
429
|
Object.defineProperty(TuiInputDateTimeComponent.prototype, "fillerLength", {
|
|
429
430
|
get: function () {
|
|
430
|
-
return
|
|
431
|
+
return i7.DATE_FILLER_LENGTH + constants.DATE_TIME_SEPARATOR.length + this.timeMode.length;
|
|
431
432
|
},
|
|
432
433
|
enumerable: false,
|
|
433
434
|
configurable: true
|
|
434
435
|
});
|
|
435
|
-
Object.defineProperty(TuiInputDateTimeComponent.prototype, "
|
|
436
|
+
Object.defineProperty(TuiInputDateTimeComponent.prototype, "maskOptions", {
|
|
436
437
|
get: function () {
|
|
437
|
-
return this.calculateMask(this.
|
|
438
|
+
return this.calculateMask(this.min, this.max, this.timeMode, this.dateFormat, this.dateSeparator);
|
|
438
439
|
},
|
|
439
440
|
enumerable: false,
|
|
440
441
|
configurable: true
|
|
@@ -478,7 +479,7 @@
|
|
|
478
479
|
get: function () {
|
|
479
480
|
var _a = this, value = _a.value, nativeValue = _a.nativeValue, timeMode = _a.timeMode;
|
|
480
481
|
var _b = __read(value, 2), date = _b[0], time = _b[1];
|
|
481
|
-
var hasTimeInputChars = nativeValue.length >
|
|
482
|
+
var hasTimeInputChars = nativeValue.length > i7.DATE_FILLER_LENGTH;
|
|
482
483
|
if (!date || (!time && hasTimeInputChars)) {
|
|
483
484
|
return nativeValue;
|
|
484
485
|
}
|
|
@@ -512,7 +513,7 @@
|
|
|
512
513
|
get: function () {
|
|
513
514
|
return (this.month ||
|
|
514
515
|
this.value[0] ||
|
|
515
|
-
|
|
516
|
+
i7.tuiDateClamp(this.defaultActiveYearMonth, Array.isArray(this.min) ? this.min[0] : this.min, Array.isArray(this.max) ? this.max[0] : this.max));
|
|
516
517
|
},
|
|
517
518
|
enumerable: false,
|
|
518
519
|
configurable: true
|
|
@@ -544,14 +545,14 @@
|
|
|
544
545
|
if (!value) {
|
|
545
546
|
this.onOpenChange(true);
|
|
546
547
|
}
|
|
547
|
-
if (value.length <
|
|
548
|
+
if (value.length < i7.DATE_FILLER_LENGTH) {
|
|
548
549
|
this.value = [null, null];
|
|
549
550
|
return;
|
|
550
551
|
}
|
|
551
552
|
var _a = __read(value.split(constants.DATE_TIME_SEPARATOR), 2), date = _a[0], time = _a[1];
|
|
552
|
-
var parsedDate =
|
|
553
|
+
var parsedDate = i7.TuiDay.normalizeParse(date, this.dateFormat);
|
|
553
554
|
var parsedTime = time && time.length === this.timeMode.length
|
|
554
|
-
?
|
|
555
|
+
? i7.TuiTime.fromString(time)
|
|
555
556
|
: null;
|
|
556
557
|
this.open = false;
|
|
557
558
|
this.value = [parsedDate, parsedTime];
|
|
@@ -571,8 +572,13 @@
|
|
|
571
572
|
TuiInputDateTimeComponent.prototype.onFocused = function (focused) {
|
|
572
573
|
var _this = this;
|
|
573
574
|
this.updateFocused(focused);
|
|
574
|
-
if (focused
|
|
575
|
-
|
|
575
|
+
if (focused) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
setTimeout(function () {
|
|
579
|
+
_this.nativeValue = _this.trimTrailingSeparator(_this.nativeValue);
|
|
580
|
+
});
|
|
581
|
+
if (this.value[0] === null ||
|
|
576
582
|
this.value[1] !== null ||
|
|
577
583
|
this.nativeValue.length <= this.fillerLength + constants.DATE_TIME_SEPARATOR.length ||
|
|
578
584
|
this.timeMode === 'HH:MM') {
|
|
@@ -582,13 +588,8 @@
|
|
|
582
588
|
if (!time) {
|
|
583
589
|
return;
|
|
584
590
|
}
|
|
585
|
-
var parsedTime =
|
|
591
|
+
var parsedTime = i7.TuiTime.fromString(time);
|
|
586
592
|
this.value = [this.value[0], parsedTime];
|
|
587
|
-
setTimeout(function () {
|
|
588
|
-
if (_this.nativeValue.endsWith('.') || _this.nativeValue.endsWith(':')) {
|
|
589
|
-
_this.nativeValue = _this.nativeValue.slice(0, -1);
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
593
|
};
|
|
593
594
|
TuiInputDateTimeComponent.prototype.setDisabledState = function () {
|
|
594
595
|
_super.prototype.setDisabledState.call(this);
|
|
@@ -603,33 +604,27 @@
|
|
|
603
604
|
return [null, null];
|
|
604
605
|
};
|
|
605
606
|
TuiInputDateTimeComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
|
|
606
|
-
return (
|
|
607
|
-
|
|
607
|
+
return (i7.tuiNullableSame(oldValue[0], newValue[0], function (a, b) { return a.daySame(b); }) &&
|
|
608
|
+
i7.tuiNullableSame(oldValue[1], newValue[1], function (a, b) { return String(a) === String(b); }));
|
|
608
609
|
};
|
|
609
|
-
TuiInputDateTimeComponent.prototype.calculateMask = function (
|
|
610
|
-
return {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
min: min,
|
|
618
|
-
max: max,
|
|
619
|
-
dateFormat: dateFormat,
|
|
620
|
-
dateSeparator: dateSeparator,
|
|
621
|
-
timeMode: timeMode,
|
|
622
|
-
}),
|
|
623
|
-
guide: false,
|
|
624
|
-
};
|
|
610
|
+
TuiInputDateTimeComponent.prototype.calculateMask = function (min, max, timeMode, dateFormat, dateSeparator) {
|
|
611
|
+
return kit.maskitoDateTimeOptionsGenerator({
|
|
612
|
+
timeMode: timeMode,
|
|
613
|
+
dateSeparator: dateSeparator,
|
|
614
|
+
dateMode: constants.TUI_DATE_MODE_MASKITO_ADAPTER[dateFormat],
|
|
615
|
+
min: this.toNativeDate(min),
|
|
616
|
+
max: this.toNativeDate(max),
|
|
617
|
+
});
|
|
625
618
|
};
|
|
626
619
|
TuiInputDateTimeComponent.prototype.getDateTimeString = function (date, time, timeMode) {
|
|
627
620
|
if (timeMode === void 0) { timeMode = 'HH:MM'; }
|
|
628
|
-
var dateString = date instanceof
|
|
621
|
+
var dateString = date instanceof i7.TuiDay
|
|
629
622
|
? date.toString(this.dateFormat, this.dateSeparator)
|
|
630
623
|
: date;
|
|
631
|
-
var timeString = time instanceof
|
|
632
|
-
return
|
|
624
|
+
var timeString = time instanceof i7.TuiTime ? time.toString(timeMode) : time || '';
|
|
625
|
+
return timeString
|
|
626
|
+
? "" + dateString + constants.DATE_TIME_SEPARATOR + timeString
|
|
627
|
+
: dateString;
|
|
633
628
|
};
|
|
634
629
|
TuiInputDateTimeComponent.prototype.updateNativeValue = function (day) {
|
|
635
630
|
var time = this.nativeValue.split(constants.DATE_TIME_SEPARATOR)[1] || '';
|
|
@@ -643,36 +638,46 @@
|
|
|
643
638
|
var max = Array.isArray(this.max) && day.daySame(this.calendarMaxDay)
|
|
644
639
|
? this.max[1].toAbsoluteMilliseconds()
|
|
645
640
|
: Infinity;
|
|
646
|
-
return
|
|
641
|
+
return i7.TuiTime.fromAbsoluteMilliseconds(i7.tuiClamp(ms, min, max));
|
|
642
|
+
};
|
|
643
|
+
TuiInputDateTimeComponent.prototype.trimTrailingSeparator = function (value) {
|
|
644
|
+
return value.replace(new RegExp("(\\" + this.dateSeparator + "|" + constants.DATE_TIME_SEPARATOR + "|\\.)$"), '');
|
|
645
|
+
};
|
|
646
|
+
TuiInputDateTimeComponent.prototype.toNativeDate = function (value) {
|
|
647
|
+
if (!Array.isArray(value)) {
|
|
648
|
+
return value.toLocalNativeDate();
|
|
649
|
+
}
|
|
650
|
+
var _a = __read(value, 2), _b = _a[0], year = _b.year, month = _b.month, day = _b.day, _c = _a[1], hours = _c.hours, minutes = _c.minutes, seconds = _c.seconds, ms = _c.ms;
|
|
651
|
+
return new Date(year, month, day, hours, minutes, seconds, ms);
|
|
647
652
|
};
|
|
648
653
|
return TuiInputDateTimeComponent;
|
|
649
|
-
}(
|
|
650
|
-
TuiInputDateTimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeComponent, deps: [{ token:
|
|
654
|
+
}(i7.AbstractTuiControl));
|
|
655
|
+
TuiInputDateTimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeComponent, deps: [{ token: i8.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i1.TUI_TEXTFIELD_SIZE }, { token: i7.TUI_DATE_FORMAT }, { token: i7.TUI_DATE_SEPARATOR }, { token: tokens.TUI_TIME_TEXTS }, { token: tokens.TUI_DATE_TEXTS }, { token: tokens.TUI_DATE_TIME_VALUE_TRANSFORMER, optional: true }, { token: tokens.TUI_INPUT_DATE_OPTIONS }, { token: i7.TUI_IS_MOBILE }, { token: i7.TUI_IS_IOS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
651
656
|
TuiInputDateTimeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateTimeComponent, selector: "tui-input-date-time", inputs: { min: "min", max: "max", disabledItemHandler: "disabledItemHandler", defaultActiveYearMonth: "defaultActiveYearMonth", timeMode: "timeMode" }, host: { listeners: { "click": "onClick()" } }, providers: [
|
|
652
|
-
|
|
653
|
-
|
|
657
|
+
i7.tuiAsFocusableItemAccessor(TuiInputDateTimeComponent),
|
|
658
|
+
i7.tuiAsControl(TuiInputDateTimeComponent),
|
|
654
659
|
tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_TIME_VALUE_TRANSFORMER),
|
|
655
|
-
], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive && !showNativePicker\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input-date-time__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [tuiTextfieldFiller]=\"(filler$ | async) || ''\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [
|
|
660
|
+
], viewQueries: [{ propertyName: "textfield", first: true, predicate: i1.TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<tui-hosted-dropdown\n class=\"t-hosted\"\n [canOpen]=\"interactive && !showNativePicker\"\n [content]=\"dropdown\"\n [open]=\"open && interactive\"\n (openChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n automation-id=\"tui-input-date-time__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [tuiTextfieldFiller]=\"(filler$ | async) || ''\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [maskito]=\"maskOptions\"\n [value]=\"computedValue\"\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 </tui-primitive-textfield>\n\n <ng-template #iconContent>\n <tui-svg\n *polymorpheusOutlet=\"calendarIcon as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [class.t-icon]=\"!computedDisabled\"\n [src]=\"src\"\n ></tui-svg>\n <input\n *ngIf=\"showNativePicker\"\n tuiDateTime\n class=\"t-native-input\"\n />\n </ng-template>\n\n <ng-template\n #dropdown=\"polymorpheus\"\n [polymorpheus]=\"type\"\n >\n <tui-calendar\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-input-date-time__calendar\"\n [min]=\"calendarMinDay\"\n [max]=\"calendarMaxDay\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [month]=\"computedActiveYearMonth\"\n [value]=\"calendarValue\"\n (dayClick)=\"onDayClick($event)\"\n (monthChange)=\"onMonthChange($event)\"\n ></tui-calendar>\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}.t-icon{pointer-events:auto}.t-button{display:flex;height:2.75rem;justify-content:center;box-shadow:inset 0 1px var(--tui-base-03)}.t-native-input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:auto;font-size:2rem}\n"], components: [{ type: i1__namespace.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "sided", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1__namespace.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1__namespace.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: i1__namespace.TuiCalendarComponent, selector: "tui-calendar", inputs: ["month", "disabledItemHandler", "min", "max", "minViewedMonth", "maxViewedMonth", "hoveredItem", "showAdjacent", "markerHandler", "value"], outputs: ["dayClick", "monthChange", "hoveredItemChange"] }], directives: [{ type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i2__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i3__namespace.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { type: i4__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TuiNativeDateTimeDirective, selector: "input[tuiDateTime]" }, { type: i4__namespace.PolymorpheusTemplate, selector: "ng-template[polymorpheus]", inputs: ["polymorpheus"], exportAs: ["polymorpheus"] }, { type: i7__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
656
661
|
__decorate([
|
|
657
|
-
|
|
662
|
+
i7.tuiDefaultProp()
|
|
658
663
|
], TuiInputDateTimeComponent.prototype, "min", void 0);
|
|
659
664
|
__decorate([
|
|
660
|
-
|
|
665
|
+
i7.tuiDefaultProp()
|
|
661
666
|
], TuiInputDateTimeComponent.prototype, "max", void 0);
|
|
662
667
|
__decorate([
|
|
663
|
-
|
|
668
|
+
i7.tuiDefaultProp()
|
|
664
669
|
], TuiInputDateTimeComponent.prototype, "disabledItemHandler", void 0);
|
|
665
670
|
__decorate([
|
|
666
|
-
|
|
671
|
+
i7.tuiDefaultProp()
|
|
667
672
|
], TuiInputDateTimeComponent.prototype, "defaultActiveYearMonth", void 0);
|
|
668
673
|
__decorate([
|
|
669
|
-
|
|
674
|
+
i7.tuiDefaultProp()
|
|
670
675
|
], TuiInputDateTimeComponent.prototype, "timeMode", void 0);
|
|
671
676
|
__decorate([
|
|
672
|
-
|
|
677
|
+
i7.tuiPure
|
|
673
678
|
], TuiInputDateTimeComponent.prototype, "calculateMask", null);
|
|
674
679
|
__decorate([
|
|
675
|
-
|
|
680
|
+
i7.tuiPure
|
|
676
681
|
], TuiInputDateTimeComponent.prototype, "getDateTimeString", null);
|
|
677
682
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeComponent, decorators: [{
|
|
678
683
|
type: i0.Component,
|
|
@@ -682,19 +687,19 @@
|
|
|
682
687
|
styleUrls: ['./input-date-time.style.less'],
|
|
683
688
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
684
689
|
providers: [
|
|
685
|
-
|
|
686
|
-
|
|
690
|
+
i7.tuiAsFocusableItemAccessor(TuiInputDateTimeComponent),
|
|
691
|
+
i7.tuiAsControl(TuiInputDateTimeComponent),
|
|
687
692
|
tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_TIME_VALUE_TRANSFORMER),
|
|
688
693
|
],
|
|
689
694
|
}]
|
|
690
695
|
}], ctorParameters: function () {
|
|
691
|
-
return [{ type:
|
|
696
|
+
return [{ type: i8__namespace.NgControl, decorators: [{
|
|
692
697
|
type: i0.Optional
|
|
693
698
|
}, {
|
|
694
699
|
type: i0.Self
|
|
695
700
|
}, {
|
|
696
701
|
type: i0.Inject,
|
|
697
|
-
args: [
|
|
702
|
+
args: [i8.NgControl]
|
|
698
703
|
}] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
|
|
699
704
|
type: i0.Inject,
|
|
700
705
|
args: [i0.ChangeDetectorRef]
|
|
@@ -703,17 +708,17 @@
|
|
|
703
708
|
args: [i1.TUI_TEXTFIELD_SIZE]
|
|
704
709
|
}] }, { type: undefined, decorators: [{
|
|
705
710
|
type: i0.Inject,
|
|
706
|
-
args: [
|
|
711
|
+
args: [i7.TUI_DATE_FORMAT]
|
|
707
712
|
}] }, { type: undefined, decorators: [{
|
|
708
713
|
type: i0.Inject,
|
|
709
|
-
args: [
|
|
710
|
-
}] }, { type:
|
|
714
|
+
args: [i7.TUI_DATE_SEPARATOR]
|
|
715
|
+
}] }, { type: i9__namespace.Observable, decorators: [{
|
|
711
716
|
type: i0.Inject,
|
|
712
717
|
args: [tokens.TUI_TIME_TEXTS]
|
|
713
|
-
}] }, { type:
|
|
718
|
+
}] }, { type: i9__namespace.Observable, decorators: [{
|
|
714
719
|
type: i0.Inject,
|
|
715
720
|
args: [tokens.TUI_DATE_TEXTS]
|
|
716
|
-
}] }, { type:
|
|
721
|
+
}] }, { type: i7__namespace.AbstractTuiValueTransformer, decorators: [{
|
|
717
722
|
type: i0.Optional
|
|
718
723
|
}, {
|
|
719
724
|
type: i0.Inject,
|
|
@@ -723,10 +728,10 @@
|
|
|
723
728
|
args: [tokens.TUI_INPUT_DATE_OPTIONS]
|
|
724
729
|
}] }, { type: undefined, decorators: [{
|
|
725
730
|
type: i0.Inject,
|
|
726
|
-
args: [
|
|
731
|
+
args: [i7.TUI_IS_MOBILE]
|
|
727
732
|
}] }, { type: undefined, decorators: [{
|
|
728
733
|
type: i0.Inject,
|
|
729
|
-
args: [
|
|
734
|
+
args: [i7.TUI_IS_IOS]
|
|
730
735
|
}] }];
|
|
731
736
|
}, propDecorators: { textfield: [{
|
|
732
737
|
type: i0.ViewChild,
|
|
@@ -794,11 +799,11 @@
|
|
|
794
799
|
TuiInputDateTimeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
795
800
|
TuiInputDateTimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeModule, declarations: [TuiInputDateTimeComponent,
|
|
796
801
|
TuiInputDateTimeDirective,
|
|
797
|
-
TuiNativeDateTimeDirective], imports: [
|
|
798
|
-
|
|
799
|
-
|
|
802
|
+
TuiNativeDateTimeDirective], imports: [i5.CommonModule,
|
|
803
|
+
i3.MaskitoModule,
|
|
804
|
+
i4.PolymorpheusModule,
|
|
800
805
|
i1.TuiWrapperModule,
|
|
801
|
-
|
|
806
|
+
i7.TuiPreventDefaultModule,
|
|
802
807
|
i1.TuiCalendarModule,
|
|
803
808
|
i1.TuiSvgModule,
|
|
804
809
|
i1.TuiLinkModule,
|
|
@@ -809,11 +814,11 @@
|
|
|
809
814
|
TuiInputDateTimeDirective,
|
|
810
815
|
i1.TuiTextfieldComponent] });
|
|
811
816
|
TuiInputDateTimeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateTimeModule, imports: [[
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
817
|
+
i5.CommonModule,
|
|
818
|
+
i3.MaskitoModule,
|
|
819
|
+
i4.PolymorpheusModule,
|
|
815
820
|
i1.TuiWrapperModule,
|
|
816
|
-
|
|
821
|
+
i7.TuiPreventDefaultModule,
|
|
817
822
|
i1.TuiCalendarModule,
|
|
818
823
|
i1.TuiSvgModule,
|
|
819
824
|
i1.TuiLinkModule,
|
|
@@ -826,11 +831,11 @@
|
|
|
826
831
|
type: i0.NgModule,
|
|
827
832
|
args: [{
|
|
828
833
|
imports: [
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
834
|
+
i5.CommonModule,
|
|
835
|
+
i3.MaskitoModule,
|
|
836
|
+
i4.PolymorpheusModule,
|
|
832
837
|
i1.TuiWrapperModule,
|
|
833
|
-
|
|
838
|
+
i7.TuiPreventDefaultModule,
|
|
834
839
|
i1.TuiCalendarModule,
|
|
835
840
|
i1.TuiSvgModule,
|
|
836
841
|
i1.TuiLinkModule,
|