@taiga-ui/kit 3.19.0 → 3.20.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-arrow.umd.js +8 -2
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-elastic-container.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +112 -54
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +5 -2
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +28 -9
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-push.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +9 -6
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +4 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +34 -8
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +62 -31
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/components/arrow/arrow-options.d.ts +6 -0
- package/components/avatar/avatar-options.d.ts +3 -0
- package/components/files/file/file-options.d.ts +3 -0
- package/components/input-count/input-count-options.d.ts +3 -0
- package/components/input-date/input-date.component.d.ts +2 -1
- package/components/input-date/input-date.module.d.ts +7 -6
- package/components/input-date/native-date/native-date.component.d.ts +12 -0
- package/components/input-files/input-files.options.d.ts +3 -0
- package/components/input-password/input-password-options.d.ts +3 -0
- package/components/input-phone/input-phone.options.d.ts +3 -0
- package/components/input-phone-international/input-phone-international.options.d.ts +3 -0
- package/components/input-tag/input-tag-options.d.ts +3 -0
- package/components/input-time/input-time-options.d.ts +3 -0
- package/components/line-clamp/line-clamp-options.d.ts +3 -0
- package/components/line-clamp/line-clamp-position.directive.d.ts +2 -1
- package/components/multi-select/multi-select-options.d.ts +3 -0
- package/components/pdf-viewer/pdf-viewer.tokens.d.ts +3 -0
- package/components/push/push.tokens.d.ts +3 -0
- package/components/radio/radio-options.d.ts +3 -0
- package/components/rating/rating-options.d.ts +3 -0
- package/components/select/select-options.d.ts +3 -0
- package/components/slider/slider-options.d.ts +3 -0
- package/components/tabs/tab/tab.providers.d.ts +4 -1
- package/components/tabs/tabs-options.d.ts +3 -0
- package/components/tag/tag-options.d.ts +3 -0
- package/components/toggle/toggle-options.d.ts +3 -0
- package/components/tree/misc/tree.tokens.d.ts +24 -0
- package/esm2015/components/arrow/arrow-options.js +9 -3
- package/esm2015/components/avatar/avatar-options.js +5 -2
- package/esm2015/components/elastic-container/elastic-container.component.js +2 -2
- package/esm2015/components/files/file/file-options.js +5 -2
- package/esm2015/components/input-count/input-count-options.js +5 -2
- package/esm2015/components/input-date/input-date.component.js +15 -11
- package/esm2015/components/input-date/input-date.directive.js +4 -1
- package/esm2015/components/input-date/input-date.module.js +4 -3
- package/esm2015/components/input-date/native-date/native-date.component.js +45 -0
- package/esm2015/components/input-files/input-files.options.js +5 -2
- package/esm2015/components/input-password/input-password-options.js +5 -2
- package/esm2015/components/input-phone/input-phone.options.js +5 -2
- package/esm2015/components/input-phone-international/input-phone-international.options.js +5 -2
- package/esm2015/components/input-phone-international/tokens/countries-masks.js +2 -2
- package/esm2015/components/input-tag/input-tag-options.js +5 -2
- package/esm2015/components/input-time/input-time-options.js +5 -2
- package/esm2015/components/line-clamp/line-clamp-box.component.js +16 -4
- package/esm2015/components/line-clamp/line-clamp-options.js +5 -2
- package/esm2015/components/line-clamp/line-clamp-position.directive.js +8 -6
- package/esm2015/components/multi-select/multi-select-options.js +5 -2
- package/esm2015/components/pdf-viewer/pdf-viewer.tokens.js +5 -2
- package/esm2015/components/push/push.tokens.js +5 -2
- package/esm2015/components/radio/radio-options.js +5 -2
- package/esm2015/components/rating/rating-options.js +5 -2
- package/esm2015/components/select/select-options.js +5 -2
- package/esm2015/components/slider/slider-options.js +5 -2
- package/esm2015/components/tabs/tab/tab.providers.js +5 -2
- package/esm2015/components/tabs/tabs-options.js +5 -2
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +1 -4
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +2 -2
- package/esm2015/components/tag/tag-options.js +5 -2
- package/esm2015/components/toggle/toggle-options.js +5 -2
- package/esm2015/components/tree/directives/tree-controller.directive.js +1 -1
- package/esm2015/components/tree/misc/tree.tokens.js +35 -9
- package/esm2015/tokens/calendar-date-stream.js +5 -2
- package/esm2015/tokens/date-inputs-value-transformers.js +13 -4
- package/esm2015/tokens/i18n.js +22 -22
- package/esm2015/tokens/input-date-options.js +6 -2
- package/esm2015/tokens/items-handlers.js +5 -2
- package/esm2015/tokens/mobile-calendar.js +5 -2
- package/esm2015/tokens/month-formatter.js +5 -2
- package/esm2015/tokens/tab-margin.js +5 -2
- package/esm2015/tokens/validation-errors.js +5 -2
- package/fesm2015/taiga-ui-kit-components-arrow.js +8 -2
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +4 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-elastic-container.js +1 -1
- package/fesm2015/taiga-ui-kit-components-elastic-container.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +4 -1
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +62 -15
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +5 -2
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +4 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +25 -8
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +4 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +4 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-push.js +4 -1
- package/fesm2015/taiga-ui-kit-components-push.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +4 -1
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +4 -1
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +4 -1
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +4 -1
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +9 -6
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +4 -1
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +4 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +34 -8
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +62 -31
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/package.json +4 -4
- package/tokens/calendar-date-stream.d.ts +3 -0
- package/tokens/date-inputs-value-transformers.d.ts +9 -0
- package/tokens/input-date-options.d.ts +4 -0
- package/tokens/items-handlers.d.ts +3 -0
- package/tokens/mobile-calendar.d.ts +3 -0
- package/tokens/month-formatter.d.ts +3 -0
- package/tokens/tab-margin.d.ts +3 -0
- package/tokens/validation-errors.d.ts +3 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/constants'), require('@taiga-ui/kit/tokens'), require('@taiga-ui/kit/utils/mask'), require('@tinkoff/ng-polymorpheus'), require('rxjs/operators'), require('@taiga-ui/kit/directives'), require('@angular/common'), require('rxjs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-date', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/constants', '@taiga-ui/kit/tokens', '@taiga-ui/kit/utils/mask', '@tinkoff/ng-polymorpheus', 'rxjs/operators', '@taiga-ui/kit/directives', '@angular/common', 'rxjs'], 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"] = {}), global.ng.core, global.ng.forms, global.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
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"] = {}), global.ng.core, global.ng.forms, global.i3, global.i1, global["taiga-ui"].kit.constants, global["taiga-ui"].kit.tokens, global["taiga-ui"].kit.utils.mask, global.i5, global.rxjs.operators, global["taiga-ui"].kit.directives, global.ng.common, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i7, i3, i1, constants, tokens, mask, i5, operators, i4, i6, i8) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
26
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
30
27
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
28
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
29
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
32
|
-
var
|
|
30
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
32
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
33
33
|
|
|
34
34
|
/*! *****************************************************************************
|
|
35
35
|
Copyright (c) Microsoft Corporation.
|
|
@@ -349,6 +349,54 @@
|
|
|
349
349
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
+
var TuiNativeDateComponent = /** @class */ (function () {
|
|
353
|
+
function TuiNativeDateComponent(host, dateFormat) {
|
|
354
|
+
this.host = host;
|
|
355
|
+
this.dateFormat = dateFormat;
|
|
356
|
+
}
|
|
357
|
+
Object.defineProperty(TuiNativeDateComponent.prototype, "value", {
|
|
358
|
+
get: function () {
|
|
359
|
+
return this.host.value.length === i3.DATE_FILLER_LENGTH
|
|
360
|
+
? i3.TuiDay.normalizeParse(this.host.value, this.dateFormat).toString('YMD', '-')
|
|
361
|
+
: '';
|
|
362
|
+
},
|
|
363
|
+
enumerable: false,
|
|
364
|
+
configurable: true
|
|
365
|
+
});
|
|
366
|
+
TuiNativeDateComponent.prototype.onChange = function (value) {
|
|
367
|
+
this.host.onValueChange(value ? i3.TuiDay.normalizeParse(value, 'YMD').toString(this.dateFormat) : '');
|
|
368
|
+
};
|
|
369
|
+
return TuiNativeDateComponent;
|
|
370
|
+
}());
|
|
371
|
+
TuiNativeDateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiNativeDateComponent, deps: [{ token: i1.TUI_TEXTFIELD_HOST }, { token: i3.TUI_DATE_FORMAT }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
372
|
+
TuiNativeDateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiNativeDateComponent, selector: "input[tuiDate]", host: { attributes: { "type": "date" }, listeners: { "change": "onChange($event.target.value)", "click.stop.silent": "0", "input.stop.silent": "0", "mousedown.stop.silent": "0" }, properties: { "tabIndex": "-1", "value": "value" } }, ngImport: i0__namespace, template: '', isInline: true, styles: [":host{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:auto;font-size:2rem}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
373
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiNativeDateComponent, decorators: [{
|
|
374
|
+
type: i0.Component,
|
|
375
|
+
args: [{
|
|
376
|
+
selector: 'input[tuiDate]',
|
|
377
|
+
template: '',
|
|
378
|
+
host: {
|
|
379
|
+
type: 'date',
|
|
380
|
+
'[tabIndex]': '-1',
|
|
381
|
+
'[value]': 'value',
|
|
382
|
+
'(change)': 'onChange($event.target.value)',
|
|
383
|
+
'(click.stop.silent)': '0',
|
|
384
|
+
'(input.stop.silent)': '0',
|
|
385
|
+
'(mousedown.stop.silent)': '0',
|
|
386
|
+
},
|
|
387
|
+
styleUrls: ['./native-date.style.less'],
|
|
388
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
389
|
+
}]
|
|
390
|
+
}], ctorParameters: function () {
|
|
391
|
+
return [{ type: undefined, decorators: [{
|
|
392
|
+
type: i0.Inject,
|
|
393
|
+
args: [i1.TUI_TEXTFIELD_HOST]
|
|
394
|
+
}] }, { type: undefined, decorators: [{
|
|
395
|
+
type: i0.Inject,
|
|
396
|
+
args: [i3.TUI_DATE_FORMAT]
|
|
397
|
+
}] }];
|
|
398
|
+
} });
|
|
399
|
+
|
|
352
400
|
var TuiInputDateComponent = /** @class */ (function (_super) {
|
|
353
401
|
__extends(TuiInputDateComponent, _super);
|
|
354
402
|
function TuiInputDateComponent(control, changeDetectorRef, injector, isMobile, dialogService, mobileCalendar, textfieldSize, dateFormat, dateSeparator, dateTexts$, valueTransformer, options) {
|
|
@@ -371,12 +419,12 @@
|
|
|
371
419
|
};
|
|
372
420
|
_this.min = _this.options.min;
|
|
373
421
|
_this.max = _this.options.max;
|
|
374
|
-
_this.disabledItemHandler =
|
|
422
|
+
_this.disabledItemHandler = i3.ALWAYS_FALSE_HANDLER;
|
|
375
423
|
_this.markerHandler = i1.TUI_DEFAULT_MARKER_HANDLER;
|
|
376
424
|
_this.items = [];
|
|
377
|
-
_this.defaultActiveYearMonth =
|
|
425
|
+
_this.defaultActiveYearMonth = i3.TuiMonth.currentLocal();
|
|
378
426
|
_this.open = false;
|
|
379
|
-
_this.filler$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return
|
|
427
|
+
_this.filler$ = _this.dateTexts$.pipe(operators.map(function (dateTexts) { return i3.changeDateSeparator(dateTexts[_this.dateFormat], _this.dateSeparator); }));
|
|
380
428
|
return _this;
|
|
381
429
|
}
|
|
382
430
|
Object.defineProperty(TuiInputDateComponent.prototype, "nativeFocusableElement", {
|
|
@@ -395,7 +443,14 @@
|
|
|
395
443
|
});
|
|
396
444
|
Object.defineProperty(TuiInputDateComponent.prototype, "computedMobile", {
|
|
397
445
|
get: function () {
|
|
398
|
-
return this.isMobile && !!this.mobileCalendar;
|
|
446
|
+
return this.isMobile && (!!this.mobileCalendar || this.nativePicker);
|
|
447
|
+
},
|
|
448
|
+
enumerable: false,
|
|
449
|
+
configurable: true
|
|
450
|
+
});
|
|
451
|
+
Object.defineProperty(TuiInputDateComponent.prototype, "nativePicker", {
|
|
452
|
+
get: function () {
|
|
453
|
+
return this.options.nativePicker;
|
|
399
454
|
},
|
|
400
455
|
enumerable: false,
|
|
401
456
|
configurable: true
|
|
@@ -425,7 +480,7 @@
|
|
|
425
480
|
}
|
|
426
481
|
return (this.month ||
|
|
427
482
|
this.value ||
|
|
428
|
-
|
|
483
|
+
i3.tuiDateClamp(this.defaultActiveYearMonth, this.min, this.max));
|
|
429
484
|
},
|
|
430
485
|
enumerable: false,
|
|
431
486
|
configurable: true
|
|
@@ -494,7 +549,7 @@
|
|
|
494
549
|
return;
|
|
495
550
|
}
|
|
496
551
|
this.dialogService
|
|
497
|
-
.open(new
|
|
552
|
+
.open(new i5.PolymorpheusComponent(this.mobileCalendar, this.injector), {
|
|
498
553
|
size: 'fullscreen',
|
|
499
554
|
closeable: false,
|
|
500
555
|
data: {
|
|
@@ -516,9 +571,9 @@
|
|
|
516
571
|
if (!value) {
|
|
517
572
|
this.onOpenChange(true);
|
|
518
573
|
}
|
|
519
|
-
this.updateValue(value.length !==
|
|
574
|
+
this.updateValue(value.length !== i3.DATE_FILLER_LENGTH
|
|
520
575
|
? null
|
|
521
|
-
:
|
|
576
|
+
: i3.TuiDay.normalizeParse(value, this.dateFormat));
|
|
522
577
|
};
|
|
523
578
|
TuiInputDateComponent.prototype.onDayClick = function (value) {
|
|
524
579
|
this.updateValue(value);
|
|
@@ -542,33 +597,33 @@
|
|
|
542
597
|
this.nativeValue = value ? this.computedValue : '';
|
|
543
598
|
};
|
|
544
599
|
TuiInputDateComponent.prototype.valueIdenticalComparator = function (oldValue, newValue) {
|
|
545
|
-
return
|
|
600
|
+
return i3.tuiNullableSame(oldValue, newValue, function (a, b) { return a.daySame(b); });
|
|
546
601
|
};
|
|
547
602
|
return TuiInputDateComponent;
|
|
548
|
-
}(
|
|
549
|
-
TuiInputDateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateComponent, deps: [{ token:
|
|
603
|
+
}(i3.AbstractTuiNullableControl));
|
|
604
|
+
TuiInputDateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateComponent, deps: [{ token: i7.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: i3.TUI_IS_MOBILE }, { token: i1.TuiDialogService }, { token: tokens.TUI_MOBILE_CALENDAR, optional: true }, { token: i1.TUI_TEXTFIELD_SIZE }, { token: i3.TUI_DATE_FORMAT }, { token: i3.TUI_DATE_SEPARATOR }, { token: tokens.TUI_DATE_TEXTS }, { token: tokens.TUI_DATE_VALUE_TRANSFORMER, optional: true }, { token: tokens.TUI_INPUT_DATE_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
550
605
|
TuiInputDateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputDateComponent, selector: "tui-input-date", inputs: { min: "min", max: "max", disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", items: "items", defaultActiveYearMonth: "defaultActiveYearMonth" }, host: { listeners: { "click": "onClick()" } }, providers: [
|
|
551
|
-
|
|
552
|
-
|
|
606
|
+
i3.tuiAsFocusableItemAccessor(TuiInputDateComponent),
|
|
607
|
+
i3.tuiAsControl(TuiInputDateComponent),
|
|
553
608
|
tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_VALUE_TRANSFORMER),
|
|
554
|
-
], 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]=\"canOpen\"\n [open]=\"open && canOpen\"\n [content]=\"dropdown\"\n (openChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n *tuiLet=\"filler$ | async as filler\"\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [tuiTextfieldFiller]=\"getComputedFiller(filler || '')\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [focusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"computedMask\"\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 automation-id=\"tui-input-date-range__icon\"\n [class.t-icon]=\"!computedDisabled\"\n [src]=\"src\"\n (click)=\"onIconClick()\"\n ></tui-svg>\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__calendar\"\n [min]=\"min\"\n [max]=\"max\"\n [markerHandler]=\"markerHandler\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [month]=\"computedActiveYearMonth\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (monthChange)=\"onMonthChange($event)\"\n ></tui-calendar>\n <div\n *ngIf=\"items.length === 1\"\n tuiPreventDefault=\"mousedown\"\n class=\"t-button\"\n >\n <button\n tuiLink\n type=\"button\"\n (click)=\"onDayClick(items[0].day)\"\n >\n {{ items[0] }}\n </button>\n </div>\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-button button{flex:1;text-align:center}\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"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type:
|
|
609
|
+
], 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]=\"canOpen\"\n [open]=\"open && canOpen\"\n [content]=\"dropdown\"\n (openChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n *tuiLet=\"filler$ | async as filler\"\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [tuiTextfieldFiller]=\"getComputedFiller(filler || '')\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [nativeId]=\"nativeId\"\n [readOnly]=\"readOnly\"\n [focusable]=\"computedFocusable\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"computedMask\"\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 automation-id=\"tui-input-date-range__icon\"\n [class.t-icon]=\"!computedDisabled\"\n [src]=\"src\"\n (click)=\"onIconClick()\"\n ></tui-svg>\n <input\n *ngIf=\"isMobile && nativePicker\"\n tuiDate\n type=\"date\"\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__calendar\"\n [min]=\"min\"\n [max]=\"max\"\n [markerHandler]=\"markerHandler\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [month]=\"computedActiveYearMonth\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (monthChange)=\"onMonthChange($event)\"\n ></tui-calendar>\n <div\n *ngIf=\"items.length === 1\"\n tuiPreventDefault=\"mousedown\"\n class=\"t-button\"\n >\n <button\n tuiLink\n type=\"button\"\n (click)=\"onDayClick(items[0].day)\"\n >\n {{ items[0] }}\n </button>\n </div>\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-button button{flex:1;text-align:center}\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: TuiNativeDateComponent, selector: "input[tuiDate]" }, { type: i1__namespace.TuiCalendarComponent, selector: "tui-calendar", inputs: ["month", "disabledItemHandler", "min", "max", "minViewedMonth", "maxViewedMonth", "hoveredItem", "showAdjacent", "markerHandler", "value"], outputs: ["dayClick", "monthChange", "hoveredItemChange"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i3__namespace.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i1__namespace.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i4__namespace.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { type: i1__namespace.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i1__namespace.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { type: i4__namespace.MaskedInputDirective, selector: "[textMask]", inputs: ["textMask"], exportAs: ["textMask"] }, { type: i5__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.PolymorpheusTemplate, selector: "ng-template[polymorpheus]", inputs: ["polymorpheus"], exportAs: ["polymorpheus"] }, { type: i3__namespace.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i6__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
555
610
|
__decorate([
|
|
556
|
-
|
|
611
|
+
i3.tuiDefaultProp()
|
|
557
612
|
], TuiInputDateComponent.prototype, "min", void 0);
|
|
558
613
|
__decorate([
|
|
559
|
-
|
|
614
|
+
i3.tuiDefaultProp()
|
|
560
615
|
], TuiInputDateComponent.prototype, "max", void 0);
|
|
561
616
|
__decorate([
|
|
562
|
-
|
|
617
|
+
i3.tuiDefaultProp()
|
|
563
618
|
], TuiInputDateComponent.prototype, "disabledItemHandler", void 0);
|
|
564
619
|
__decorate([
|
|
565
|
-
|
|
620
|
+
i3.tuiDefaultProp()
|
|
566
621
|
], TuiInputDateComponent.prototype, "markerHandler", void 0);
|
|
567
622
|
__decorate([
|
|
568
|
-
|
|
623
|
+
i3.tuiDefaultProp()
|
|
569
624
|
], TuiInputDateComponent.prototype, "items", void 0);
|
|
570
625
|
__decorate([
|
|
571
|
-
|
|
626
|
+
i3.tuiDefaultProp()
|
|
572
627
|
], TuiInputDateComponent.prototype, "defaultActiveYearMonth", void 0);
|
|
573
628
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateComponent, decorators: [{
|
|
574
629
|
type: i0.Component,
|
|
@@ -578,19 +633,19 @@
|
|
|
578
633
|
styleUrls: ['./input-date.style.less'],
|
|
579
634
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
580
635
|
providers: [
|
|
581
|
-
|
|
582
|
-
|
|
636
|
+
i3.tuiAsFocusableItemAccessor(TuiInputDateComponent),
|
|
637
|
+
i3.tuiAsControl(TuiInputDateComponent),
|
|
583
638
|
tokens.tuiDateStreamWithTransformer(tokens.TUI_DATE_VALUE_TRANSFORMER),
|
|
584
639
|
],
|
|
585
640
|
}]
|
|
586
641
|
}], ctorParameters: function () {
|
|
587
|
-
return [{ type:
|
|
642
|
+
return [{ type: i7__namespace.NgControl, decorators: [{
|
|
588
643
|
type: i0.Optional
|
|
589
644
|
}, {
|
|
590
645
|
type: i0.Self
|
|
591
646
|
}, {
|
|
592
647
|
type: i0.Inject,
|
|
593
|
-
args: [
|
|
648
|
+
args: [i7.NgControl]
|
|
594
649
|
}] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
|
|
595
650
|
type: i0.Inject,
|
|
596
651
|
args: [i0.ChangeDetectorRef]
|
|
@@ -599,7 +654,7 @@
|
|
|
599
654
|
args: [i0.Injector]
|
|
600
655
|
}] }, { type: undefined, decorators: [{
|
|
601
656
|
type: i0.Inject,
|
|
602
|
-
args: [
|
|
657
|
+
args: [i3.TUI_IS_MOBILE]
|
|
603
658
|
}] }, { type: i1__namespace.TuiDialogService, decorators: [{
|
|
604
659
|
type: i0.Inject,
|
|
605
660
|
args: [i1.TuiDialogService]
|
|
@@ -613,11 +668,11 @@
|
|
|
613
668
|
args: [i1.TUI_TEXTFIELD_SIZE]
|
|
614
669
|
}] }, { type: undefined, decorators: [{
|
|
615
670
|
type: i0.Inject,
|
|
616
|
-
args: [
|
|
671
|
+
args: [i3.TUI_DATE_FORMAT]
|
|
617
672
|
}] }, { type: undefined, decorators: [{
|
|
618
673
|
type: i0.Inject,
|
|
619
|
-
args: [
|
|
620
|
-
}] }, { type:
|
|
674
|
+
args: [i3.TUI_DATE_SEPARATOR]
|
|
675
|
+
}] }, { type: i8__namespace.Observable, decorators: [{
|
|
621
676
|
type: i0.Inject,
|
|
622
677
|
args: [tokens.TUI_DATE_TEXTS]
|
|
623
678
|
}] }, { type: undefined, decorators: [{
|
|
@@ -662,6 +717,9 @@
|
|
|
662
717
|
configurable: true
|
|
663
718
|
});
|
|
664
719
|
TuiInputDateDirective.prototype.onValueChange = function (value) {
|
|
720
|
+
if (!value) {
|
|
721
|
+
this.host.nativeValue = '';
|
|
722
|
+
}
|
|
665
723
|
this.host.onValueChange(value);
|
|
666
724
|
};
|
|
667
725
|
TuiInputDateDirective.prototype.process = function (input) {
|
|
@@ -685,53 +743,53 @@
|
|
|
685
743
|
return TuiInputDateModule;
|
|
686
744
|
}());
|
|
687
745
|
TuiInputDateModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
688
|
-
TuiInputDateModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateModule, declarations: [TuiInputDateComponent, TuiInputDateDirective], imports: [
|
|
689
|
-
|
|
690
|
-
|
|
746
|
+
TuiInputDateModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateModule, declarations: [TuiInputDateComponent, TuiInputDateDirective, TuiNativeDateComponent], imports: [i6.CommonModule,
|
|
747
|
+
i4.TextMaskModule,
|
|
748
|
+
i5.PolymorpheusModule,
|
|
691
749
|
i1.TuiWrapperModule,
|
|
692
|
-
|
|
750
|
+
i3.TuiPreventDefaultModule,
|
|
693
751
|
i1.TuiCalendarModule,
|
|
694
752
|
i1.TuiSvgModule,
|
|
695
753
|
i1.TuiLinkModule,
|
|
696
754
|
i1.TuiHostedDropdownModule,
|
|
697
755
|
i1.TuiPrimitiveTextfieldModule,
|
|
698
|
-
|
|
699
|
-
|
|
756
|
+
i4.TuiValueAccessorModule,
|
|
757
|
+
i3.TuiLetModule,
|
|
700
758
|
i1.TuiTextfieldControllerModule], exports: [TuiInputDateComponent, TuiInputDateDirective, i1.TuiTextfieldComponent] });
|
|
701
759
|
TuiInputDateModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateModule, imports: [[
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
760
|
+
i6.CommonModule,
|
|
761
|
+
i4.TextMaskModule,
|
|
762
|
+
i5.PolymorpheusModule,
|
|
705
763
|
i1.TuiWrapperModule,
|
|
706
|
-
|
|
764
|
+
i3.TuiPreventDefaultModule,
|
|
707
765
|
i1.TuiCalendarModule,
|
|
708
766
|
i1.TuiSvgModule,
|
|
709
767
|
i1.TuiLinkModule,
|
|
710
768
|
i1.TuiHostedDropdownModule,
|
|
711
769
|
i1.TuiPrimitiveTextfieldModule,
|
|
712
|
-
|
|
713
|
-
|
|
770
|
+
i4.TuiValueAccessorModule,
|
|
771
|
+
i3.TuiLetModule,
|
|
714
772
|
i1.TuiTextfieldControllerModule,
|
|
715
773
|
]] });
|
|
716
774
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputDateModule, decorators: [{
|
|
717
775
|
type: i0.NgModule,
|
|
718
776
|
args: [{
|
|
719
777
|
imports: [
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
778
|
+
i6.CommonModule,
|
|
779
|
+
i4.TextMaskModule,
|
|
780
|
+
i5.PolymorpheusModule,
|
|
723
781
|
i1.TuiWrapperModule,
|
|
724
|
-
|
|
782
|
+
i3.TuiPreventDefaultModule,
|
|
725
783
|
i1.TuiCalendarModule,
|
|
726
784
|
i1.TuiSvgModule,
|
|
727
785
|
i1.TuiLinkModule,
|
|
728
786
|
i1.TuiHostedDropdownModule,
|
|
729
787
|
i1.TuiPrimitiveTextfieldModule,
|
|
730
|
-
|
|
731
|
-
|
|
788
|
+
i4.TuiValueAccessorModule,
|
|
789
|
+
i3.TuiLetModule,
|
|
732
790
|
i1.TuiTextfieldControllerModule,
|
|
733
791
|
],
|
|
734
|
-
declarations: [TuiInputDateComponent, TuiInputDateDirective],
|
|
792
|
+
declarations: [TuiInputDateComponent, TuiInputDateDirective, TuiNativeDateComponent],
|
|
735
793
|
exports: [TuiInputDateComponent, TuiInputDateDirective, i1.TuiTextfieldComponent],
|
|
736
794
|
}]
|
|
737
795
|
}] });
|