@taiga-ui/addon-mobile 3.88.0 → 3.89.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-addon-mobile-components-mobile-calendar-dialog.umd.js +2 -2
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +27 -9
- package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
- package/components/mobile-calendar/mobile-calendar.component.d.ts +5 -3
- package/esm2015/components/mobile-calendar/mobile-calendar.component.js +26 -12
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +1 -1
- package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dropdown.component.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +2 -2
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +25 -11
- package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
- package/package.json +4 -4
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
return TuiMobileCalendarDialogComponent;
|
|
77
77
|
}());
|
|
78
78
|
TuiMobileCalendarDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarDialogComponent, deps: [{ token: ngPolymorpheus.POLYMORPHEUS_CONTEXT }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
79
|
-
TuiMobileCalendarDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarDialogComponent, selector: "tui-mobile-calendar-dialog", ngImport: i0__namespace, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"context.$implicit.complete()\"\n (confirm)=\"context.completeWith($event)\"\n></tui-mobile-calendar>\n", styles: [":host{display:block;height:100vh;margin:-1.5rem -1.5rem -2rem}\n"], components: [{ type: i1__namespace.TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler"], outputs: ["cancel", "confirm"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
79
|
+
TuiMobileCalendarDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarDialogComponent, selector: "tui-mobile-calendar-dialog", ngImport: i0__namespace, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"context.$implicit.complete()\"\n (confirm)=\"context.completeWith($event)\"\n></tui-mobile-calendar>\n", styles: [":host{display:block;height:100vh;margin:-1.5rem -1.5rem -2rem}\n"], components: [{ type: i1__namespace.TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
80
80
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarDialogComponent, decorators: [{
|
|
81
81
|
type: i0.Component,
|
|
82
82
|
args: [{
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
return TuiMobileCalendarDropdownComponent;
|
|
139
139
|
}());
|
|
140
140
|
TuiMobileCalendarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarDropdownComponent, deps: [{ token: i2.TuiActiveZoneDirective }, { token: i4.TUI_ANIMATIONS_DURATION }, { token: i3.TuiInputDateComponent, optional: true }, { token: i3.TuiInputDateMultiComponent, optional: true }, { token: i3.TuiInputDateRangeComponent, optional: true }, { token: i4.TuiHostedDropdownComponent }, { token: i5.TuiKeyboardService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
141
|
-
TuiMobileCalendarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarDropdownComponent, selector: "tui-mobile-calendar-dropdown", host: { properties: { "@tuiSlideInTop": "this.animation", "@tuiFadeIn": "this.animation" } }, ngImport: i0__namespace, template: "<tui-mobile-calendar\n tuiActiveZone\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"!!multi\"\n [single]=\"!!single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n></tui-mobile-calendar>\n", styles: [":host{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--tui-elevation-01);box-shadow:0 10rem var(--tui-elevation-01),0 -90vh 1rem 2rem #000000bf}\n"], components: [{ type: i1__namespace.TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler"], outputs: ["cancel", "confirm"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }], animations: [i4.tuiSlideInTop, i4.tuiFadeIn], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
141
|
+
TuiMobileCalendarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarDropdownComponent, selector: "tui-mobile-calendar-dropdown", host: { properties: { "@tuiSlideInTop": "this.animation", "@tuiFadeIn": "this.animation" } }, ngImport: i0__namespace, template: "<tui-mobile-calendar\n tuiActiveZone\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"!!multi\"\n [single]=\"!!single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n></tui-mobile-calendar>\n", styles: [":host{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--tui-elevation-01);box-shadow:0 10rem var(--tui-elevation-01),0 -90vh 1rem 2rem #000000bf}\n"], components: [{ type: i1__namespace.TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], directives: [{ type: i2__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }], animations: [i4.tuiSlideInTop, i4.tuiFadeIn], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
142
142
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarDropdownComponent, decorators: [{
|
|
143
143
|
type: i0.Component,
|
|
144
144
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js","sources":["../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.template.html","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.module.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiDialogContext} from '@taiga-ui/core';\nimport {TuiMobileCalendarData} from '@taiga-ui/kit';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: 'tui-mobile-calendar-dialog',\n templateUrl: './mobile-calendar-dialog.template.html',\n styleUrls: ['./mobile-calendar-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileCalendarDialogComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialogContext<\n TuiDay | TuiDayRange | readonly TuiDay[],\n TuiMobileCalendarData | undefined\n >,\n ) {}\n\n get single(): boolean {\n return this.context.data?.single === true;\n }\n\n get multi(): boolean {\n return this.context.data?.multi === true;\n }\n\n get min(): TuiDay {\n return this.context.data?.min || TUI_FIRST_DAY;\n }\n\n get max(): TuiDay {\n return this.context.data?.max || TUI_LAST_DAY;\n }\n\n get disabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.context.data?.disabledItemHandler || ALWAYS_FALSE_HANDLER;\n }\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"context.$implicit.complete()\"\n (confirm)=\"context.completeWith($event)\"\n></tui-mobile-calendar>\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Optional,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiActiveZoneDirective,\n} from '@taiga-ui/cdk';\nimport {\n TUI_ANIMATIONS_DURATION,\n tuiFadeIn,\n TuiHostedDropdownComponent,\n tuiSlideInTop,\n} from '@taiga-ui/core';\nimport {\n TuiInputDateComponent,\n TuiInputDateMultiComponent,\n TuiInputDateRangeComponent,\n} from '@taiga-ui/kit';\n\n@Component({\n selector: 'tui-mobile-calendar-dropdown',\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrls: ['./mobile-calendar-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiMobileCalendarDropdownComponent {\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n readonly animation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n readonly min =\n this.single?.min ||\n this.multi?.min ||\n this.range?.maxLengthMapper(\n this.range.computedMin,\n this.range.value,\n this.range.maxLength,\n true,\n ) ||\n TUI_FIRST_DAY;\n\n readonly max =\n this.single?.max ||\n this.multi?.max ||\n this.range?.maxLengthMapper(\n this.range.computedMax,\n this.range.value,\n this.range.maxLength,\n false,\n ) ||\n TUI_LAST_DAY;\n\n readonly disabledItemHandler =\n this.single?.disabledItemHandler ||\n this.multi?.disabledItemHandler ||\n this.range?.disabledItemHandler ||\n ALWAYS_FALSE_HANDLER;\n\n constructor(\n @Inject(TuiActiveZoneDirective) readonly zone: TuiActiveZoneDirective,\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Optional()\n @Inject(TuiInputDateComponent)\n readonly single: TuiInputDateComponent | null,\n @Optional()\n @Inject(TuiInputDateMultiComponent)\n readonly multi: TuiInputDateMultiComponent | null,\n @Optional()\n @Inject(TuiInputDateRangeComponent)\n private readonly range: TuiInputDateRangeComponent | null,\n @Inject(TuiHostedDropdownComponent)\n private readonly dropdown: TuiHostedDropdownComponent,\n @Inject(TuiKeyboardService)\n private readonly keyboard: TuiKeyboardService,\n ) {\n this.keyboard.hide();\n }\n\n close(): void {\n this.dropdown.computedHost.focus();\n this.dropdown.updateOpen(false);\n this.keyboard.show();\n }\n\n confirm(value: any): void {\n const control = this.single || this.multi || this.range;\n\n if (control) {\n control.value = value;\n }\n\n this.close();\n }\n}\n","<tui-mobile-calendar\n tuiActiveZone\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"!!multi\"\n [single]=\"!!single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n></tui-mobile-calendar>\n","import {NgModule} from '@angular/core';\nimport {TuiMobileCalendarModule} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit';\n\nimport {TuiMobileCalendarDialogComponent} from './mobile-calendar-dialog.component';\nimport {TuiMobileCalendarDropdownComponent} from './mobile-calendar-dropdown.component';\n\n@NgModule({\n imports: [TuiMobileCalendarModule, TuiActiveZoneModule],\n declarations: [TuiMobileCalendarDialogComponent, TuiMobileCalendarDropdownComponent],\n providers: [\n {\n provide: TUI_MOBILE_CALENDAR,\n useValue: TuiMobileCalendarDropdownComponent,\n },\n ],\n exports: [TuiMobileCalendarDialogComponent],\n})\nexport class TuiMobileCalendarDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_FIRST_DAY","TUI_LAST_DAY","ALWAYS_FALSE_HANDLER","i0","POLYMORPHEUS_CONTEXT","i1","Component","ChangeDetectionStrategy","Inject","TuiActiveZoneDirective","TUI_ANIMATIONS_DURATION","TuiInputDateComponent","TuiInputDateMultiComponent","TuiInputDateRangeComponent","TuiHostedDropdownComponent","TuiKeyboardService","i2","tuiSlideInTop","tuiFadeIn","Optional","HostBinding","TuiMobileCalendarModule","TuiActiveZoneModule","TUI_MOBILE_CALENDAR","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;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C,CAAC;qBAC9C,CAAA;;;IClBD;;IAEG;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js","sources":["../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.template.html","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dropdown.component.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dropdown.template.html","../../../projects/addon-mobile/components/mobile-calendar-dialog/mobile-calendar-dialog.module.ts","../../../projects/addon-mobile/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiDialogContext} from '@taiga-ui/core';\nimport {TuiMobileCalendarData} from '@taiga-ui/kit';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: 'tui-mobile-calendar-dialog',\n templateUrl: './mobile-calendar-dialog.template.html',\n styleUrls: ['./mobile-calendar-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileCalendarDialogComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialogContext<\n TuiDay | TuiDayRange | readonly TuiDay[],\n TuiMobileCalendarData | undefined\n >,\n ) {}\n\n get single(): boolean {\n return this.context.data?.single === true;\n }\n\n get multi(): boolean {\n return this.context.data?.multi === true;\n }\n\n get min(): TuiDay {\n return this.context.data?.min || TUI_FIRST_DAY;\n }\n\n get max(): TuiDay {\n return this.context.data?.max || TUI_LAST_DAY;\n }\n\n get disabledItemHandler(): TuiBooleanHandler<TuiDay> {\n return this.context.data?.disabledItemHandler || ALWAYS_FALSE_HANDLER;\n }\n}\n","<tui-mobile-calendar\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"multi\"\n [single]=\"single\"\n (cancel)=\"context.$implicit.complete()\"\n (confirm)=\"context.completeWith($event)\"\n></tui-mobile-calendar>\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Optional,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiActiveZoneDirective,\n} from '@taiga-ui/cdk';\nimport {\n TUI_ANIMATIONS_DURATION,\n tuiFadeIn,\n TuiHostedDropdownComponent,\n tuiSlideInTop,\n} from '@taiga-ui/core';\nimport {\n TuiInputDateComponent,\n TuiInputDateMultiComponent,\n TuiInputDateRangeComponent,\n} from '@taiga-ui/kit';\n\n@Component({\n selector: 'tui-mobile-calendar-dropdown',\n templateUrl: './mobile-calendar-dropdown.template.html',\n styleUrls: ['./mobile-calendar-dropdown.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiMobileCalendarDropdownComponent {\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n readonly animation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n readonly min =\n this.single?.min ||\n this.multi?.min ||\n this.range?.maxLengthMapper(\n this.range.computedMin,\n this.range.value,\n this.range.maxLength,\n true,\n ) ||\n TUI_FIRST_DAY;\n\n readonly max =\n this.single?.max ||\n this.multi?.max ||\n this.range?.maxLengthMapper(\n this.range.computedMax,\n this.range.value,\n this.range.maxLength,\n false,\n ) ||\n TUI_LAST_DAY;\n\n readonly disabledItemHandler =\n this.single?.disabledItemHandler ||\n this.multi?.disabledItemHandler ||\n this.range?.disabledItemHandler ||\n ALWAYS_FALSE_HANDLER;\n\n constructor(\n @Inject(TuiActiveZoneDirective) readonly zone: TuiActiveZoneDirective,\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Optional()\n @Inject(TuiInputDateComponent)\n readonly single: TuiInputDateComponent | null,\n @Optional()\n @Inject(TuiInputDateMultiComponent)\n readonly multi: TuiInputDateMultiComponent | null,\n @Optional()\n @Inject(TuiInputDateRangeComponent)\n private readonly range: TuiInputDateRangeComponent | null,\n @Inject(TuiHostedDropdownComponent)\n private readonly dropdown: TuiHostedDropdownComponent,\n @Inject(TuiKeyboardService)\n private readonly keyboard: TuiKeyboardService,\n ) {\n this.keyboard.hide();\n }\n\n close(): void {\n this.dropdown.computedHost.focus();\n this.dropdown.updateOpen(false);\n this.keyboard.show();\n }\n\n confirm(value: any): void {\n const control = this.single || this.multi || this.range;\n\n if (control) {\n control.value = value;\n }\n\n this.close();\n }\n}\n","<tui-mobile-calendar\n tuiActiveZone\n [disabledItemHandler]=\"disabledItemHandler\"\n [max]=\"max\"\n [min]=\"min\"\n [multi]=\"!!multi\"\n [single]=\"!!single\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n></tui-mobile-calendar>\n","import {NgModule} from '@angular/core';\nimport {TuiMobileCalendarModule} from '@taiga-ui/addon-mobile/components/mobile-calendar';\nimport {TuiActiveZoneModule} from '@taiga-ui/cdk';\nimport {TUI_MOBILE_CALENDAR} from '@taiga-ui/kit';\n\nimport {TuiMobileCalendarDialogComponent} from './mobile-calendar-dialog.component';\nimport {TuiMobileCalendarDropdownComponent} from './mobile-calendar-dropdown.component';\n\n@NgModule({\n imports: [TuiMobileCalendarModule, TuiActiveZoneModule],\n declarations: [TuiMobileCalendarDialogComponent, TuiMobileCalendarDropdownComponent],\n providers: [\n {\n provide: TUI_MOBILE_CALENDAR,\n useValue: TuiMobileCalendarDropdownComponent,\n },\n ],\n exports: [TuiMobileCalendarDialogComponent],\n})\nexport class TuiMobileCalendarDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_FIRST_DAY","TUI_LAST_DAY","ALWAYS_FALSE_HANDLER","i0","POLYMORPHEUS_CONTEXT","i1","Component","ChangeDetectionStrategy","Inject","TuiActiveZoneDirective","TUI_ANIMATIONS_DURATION","TuiInputDateComponent","TuiInputDateMultiComponent","TuiInputDateRangeComponent","TuiHostedDropdownComponent","TuiKeyboardService","i2","tuiSlideInTop","tuiFadeIn","Optional","HostBinding","TuiMobileCalendarModule","TuiActiveZoneModule","TUI_MOBILE_CALENDAR","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,QAAA,gCAAA,kBAAA,YAAA;IACI,IAAA,SAAA,gCAAA,CAEa,OAGR,EAAA;IAHQ,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAGf;SACD;IAEJ,IAAA,MAAA,CAAA,cAAA,CAAI,gCAAM,CAAA,SAAA,EAAA,QAAA,EAAA;IAAV,QAAA,GAAA,EAAA,YAAA;;IACI,YAAA,OAAO,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAM,MAAK,IAAI,CAAC;aAC7C;;;IAAA,KAAA,CAAA,CAAA;IAED,IAAA,MAAA,CAAA,cAAA,CAAI,gCAAK,CAAA,SAAA,EAAA,OAAA,EAAA;IAAT,QAAA,GAAA,EAAA,YAAA;;IACI,YAAA,OAAO,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAK,MAAK,IAAI,CAAC;aAC5C;;;IAAA,KAAA,CAAA,CAAA;IAED,IAAA,MAAA,CAAA,cAAA,CAAI,gCAAG,CAAA,SAAA,EAAA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AA,OAAA,EAAA,CAPQ,CAACF,0BAAuB,EAAEC,sBAAmB,CAAC,CAAA,EAAA,CAAA,CAAA;sHAU9C,6BAA6B,EAAA,UAAA,EAAA,CAAA;sBAXzCE,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACN,oBAAA,OAAO,EAAE,CAACH,0BAAuB,EAAEC,sBAAmB,CAAC;IACvD,oBAAA,YAAY,EAAE,CAAC,gCAAgC,EAAE,kCAAkC,CAAC;IACpF,oBAAA,SAAS,EAAE;IACP,wBAAA;IACI,4BAAA,OAAO,EAAEC,sBAAmB;IAC5B,4BAAA,QAAQ,EAAE,kCAAkC;IAC/C,yBAAA;IACJ,qBAAA;wBACD,OAAO,EAAE,CAAC,gCAAgC,CAAC;qBAC9C,CAAA;;;IClBD;;IAEG;;;;;;;;;;;;"}
|
|
@@ -550,6 +550,7 @@
|
|
|
550
550
|
this.chooseDayOrRangeTexts$ = chooseDayOrRangeTexts$;
|
|
551
551
|
this.duration = duration;
|
|
552
552
|
this.ngZone = ngZone;
|
|
553
|
+
this.value$ = new i8.BehaviorSubject(null);
|
|
553
554
|
this.today = i7.TuiDay.currentLocal();
|
|
554
555
|
this.activeYear = 0;
|
|
555
556
|
this.activeMonth = 0;
|
|
@@ -560,7 +561,7 @@
|
|
|
560
561
|
this.disabledItemHandler = i7.ALWAYS_FALSE_HANDLER;
|
|
561
562
|
this.cancel = new i0.EventEmitter();
|
|
562
563
|
this.confirm = new i0.EventEmitter();
|
|
563
|
-
this.
|
|
564
|
+
this.valueChange = this.value$.pipe(operators.skip(1), operators.distinctUntilChanged(function (a, b) { return (a === null || a === void 0 ? void 0 : a.toString()) === (b === null || b === void 0 ? void 0 : b.toString()); }), operators.takeUntil(this.destroy$));
|
|
564
565
|
this.years = Array.from({ length: RANGE }, function (_, i) { return i + STARTING_YEAR; });
|
|
565
566
|
this.months = Array.from({ length: RANGE * 12 }, function (_, i) { return new i7.TuiMonth(Math.floor(i / i7.MONTHS_IN_YEAR) + STARTING_YEAR, i % i7.MONTHS_IN_YEAR); });
|
|
566
567
|
this.initialized = false;
|
|
@@ -571,6 +572,16 @@
|
|
|
571
572
|
_this.value = value;
|
|
572
573
|
});
|
|
573
574
|
}
|
|
575
|
+
Object.defineProperty(TuiMobileCalendarComponent.prototype, "value", {
|
|
576
|
+
get: function () {
|
|
577
|
+
return this.value$.value;
|
|
578
|
+
},
|
|
579
|
+
set: function (value) {
|
|
580
|
+
this.value$.next(value);
|
|
581
|
+
},
|
|
582
|
+
enumerable: false,
|
|
583
|
+
configurable: true
|
|
584
|
+
});
|
|
574
585
|
Object.defineProperty(TuiMobileCalendarComponent.prototype, "yearWidth", {
|
|
575
586
|
get: function () {
|
|
576
587
|
return this.doc.documentElement.clientWidth / YEARS_IN_ROW;
|
|
@@ -602,14 +613,17 @@
|
|
|
602
613
|
else if (this.isMultiValue(this.value)) {
|
|
603
614
|
this.value = kit.tuiImmutableUpdateInputDateMulti(this.value, day);
|
|
604
615
|
}
|
|
605
|
-
else if (this.
|
|
606
|
-
this.value =
|
|
616
|
+
else if (this.value instanceof i7.TuiDay) {
|
|
617
|
+
this.value = i7.TuiDayRange.sort(this.value, day);
|
|
618
|
+
}
|
|
619
|
+
else if (this.value instanceof i7.TuiDayRange && !this.value.isSingleDay) {
|
|
620
|
+
this.value = day;
|
|
607
621
|
}
|
|
608
622
|
else if (this.value instanceof i7.TuiDayRange) {
|
|
609
623
|
this.value = i7.TuiDayRange.sort(this.value.from, day);
|
|
610
624
|
}
|
|
611
625
|
else if (!this.value) {
|
|
612
|
-
this.value =
|
|
626
|
+
this.value = day;
|
|
613
627
|
}
|
|
614
628
|
};
|
|
615
629
|
TuiMobileCalendarComponent.prototype.getState = function (index) {
|
|
@@ -650,9 +664,6 @@
|
|
|
650
664
|
TuiMobileCalendarComponent.prototype.isMultiValue = function (day) {
|
|
651
665
|
return !(day instanceof i7.TuiDay) && !(day instanceof i7.TuiDayRange) && this.multi;
|
|
652
666
|
};
|
|
653
|
-
TuiMobileCalendarComponent.prototype.isSingleValue = function (day) {
|
|
654
|
-
return day instanceof i7.TuiDay || (day instanceof i7.TuiDayRange && !day.isSingleDay);
|
|
655
|
-
};
|
|
656
667
|
Object.defineProperty(TuiMobileCalendarComponent.prototype, "initialYear", {
|
|
657
668
|
get: function () {
|
|
658
669
|
var _a, _b, _c;
|
|
@@ -778,7 +789,7 @@
|
|
|
778
789
|
return TuiMobileCalendarComponent;
|
|
779
790
|
}());
|
|
780
791
|
TuiMobileCalendarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarComponent, deps: [{ token: i7.TUI_IS_IOS }, { token: i7.TUI_IS_E2E }, { token: i4.DOCUMENT }, { token: i7.TuiDestroyService, self: true }, { token: TUI_VALUE_STREAM }, { token: i1.TUI_COMMON_ICONS }, { token: i1.TUI_CLOSE_WORD }, { token: kit.TUI_CANCEL_WORD }, { token: kit.TUI_DONE_WORD }, { token: i1.TUI_SHORT_WEEK_DAYS }, { token: kit.TUI_CHOOSE_DAY_OR_RANGE_TEXTS, optional: true }, { token: i1.TUI_ANIMATIONS_DURATION }, { token: i0.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
781
|
-
TuiMobileCalendarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: { single: "single", multi: "multi", min: "min", max: "max", disabledItemHandler: "disabledItemHandler" }, outputs: { cancel: "cancel", confirm: "confirm" }, host: { properties: { "class._ios": "isIOS", "class._initialized": "initialized" } }, providers: TUI_MOBILE_CALENDAR_PROVIDERS, viewQueries: [{ propertyName: "yearsScrollRef", first: true, predicate: ["yearsScrollRef"], descendants: true }, { propertyName: "monthsScrollRef", first: true, predicate: ["monthsScrollRef"], descendants: true }], ngImport: i0__namespace, template: "<header\n *ngIf=\"chooseDayOrRangeTexts$ | async as texts\"\n class=\"t-header\"\n>\n <button\n appearance=\"\"\n automation-id=\"tui-mobile-calendar__cancel\"\n shape=\"rounded\"\n tuiIconButton\n tuiRipple\n type=\"button\"\n class=\"t-close\"\n [icon]=\"icons.close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClose()\"\n ></button>\n <button\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link t-link_close\"\n (click)=\"onClose()\"\n >\n {{ cancelWord$ | async }}\n </button>\n <h2\n automation-id=\"tui-mobile-calendar__label\"\n class=\"t-label\"\n >\n {{ single ? texts[0] : multi ? texts[2] : texts[1] }}\n </h2>\n <button\n automation-id=\"tui-mobile-calendar__confirm\"\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link\"\n (click)=\"onConfirm()\"\n >\n {{ doneWord$ | async }}\n </button>\n</header>\n<cdk-virtual-scroll-viewport\n #yearsScrollRef\n orientation=\"horizontal\"\n class=\"t-years\"\n [itemSize]=\"yearWidth\"\n>\n <div class=\"t-years-wrapper\">\n <button\n *cdkVirtualFor=\"let index of years\"\n type=\"button\"\n class=\"t-year\"\n [attr.data-state]=\"getState(index)\"\n (click)=\"setYear(index)\"\n >\n {{ index }}\n </button>\n </div>\n</cdk-virtual-scroll-viewport>\n<div class=\"t-week\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-day\"\n >\n {{ day }}\n </div>\n</div>\n<cdk-virtual-scroll-viewport\n #monthsScrollRef\n class=\"t-months\"\n (scrolledIndexChange)=\"onMonthChange($event)\"\n>\n <section\n *cdkVirtualFor=\"let month of months; templateCacheSize: 10\"\n class=\"t-month-wrapper\"\n >\n <h2 class=\"t-month\">{{ month | tuiMonth | async }}</h2>\n <tui-primitive-calendar-mobile\n class=\"t-calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : min : max\"\n [month]=\"month\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar-mobile>\n </section>\n</cdk-virtual-scroll-viewport>\n", styles: [":host{display:block;height:100%;font-family:-apple-system,BlinkMacSystemFont,Roboto,sans-serif;color:var(--tui-text-01);-webkit-tap-highlight-color:transparent}.t-header{position:relative;display:flex;align-items:center;height:3.5rem;padding:0 1rem;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-header{height:2.75rem;border-bottom:none}.t-close{width:1.5rem;height:1.5rem;margin-right:2rem}:host._ios .t-close{display:none}.t-link{margin-left:auto;flex-shrink:0;font-size:.875rem;line-height:1rem;font-weight:500;text-transform:uppercase;color:var(--tui-link)}.t-link_close{display:none}:host._ios .t-link{min-width:3.75rem;text-align:right;font-size:.9375rem;line-height:1.125rem;font-weight:400;letter-spacing:.018125rem;text-transform:none}:host._ios .t-link_close{display:block;margin:0 auto 0 0;text-align:left}.t-label{flex-grow:1;margin:0;font-size:1.25rem;line-height:3.5rem;font-weight:500;letter-spacing:-.0125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-label+.t-link{padding-left:1rem}:host._ios .t-label{font-size:1.0625rem;font-weight:600;letter-spacing:-.025625rem;text-align:center}.t-years{scrollbar-width:none;-ms-overflow-style:none;height:4.0625rem;background-color:var(--tui-base-01);box-shadow:0 .5px var(--tui-base-03)}.t-years::-webkit-scrollbar,.t-years::-webkit-scrollbar-thumb{display:none}:host._ios .t-years{background-color:transparent}.t-years-wrapper{display:flex;height:4.0625rem}.t-year{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;outline:none;width:20vw;flex-shrink:0;font-size:.9375rem;font-weight:700;letter-spacing:.015625rem;cursor:pointer;opacity:.1;transform:scale(.73);transition:color,opacity,transform .2s}.t-year[data-state=adjacent]{transform:scale(.86);opacity:.3}.t-year[data-state=active]{color:var(--tui-link);opacity:1;transform:scale(1)}.t-week{display:flex;align-items:center;height:1.875rem;width:20.75rem;max-width:100%;margin:0 auto;font-size:.75rem}:host._ios .t-week{width:22.625rem;font-size:.6875rem;font-weight:500;color:var(--tui-text-02)}.t-day{flex:1;text-align:center}.t-months{scrollbar-width:none;-ms-overflow-style:none;height:calc(100% - 9.5rem);box-shadow:0 -1px var(--tui-base-03);overflow-x:hidden}.t-months::-webkit-scrollbar,.t-months::-webkit-scrollbar-thumb{display:none}:host._ios .t-months{height:calc(100% - 8.75rem)}.t-month-wrapper{margin:.625rem 0 -.625rem}.t-month{height:2.75rem;line-height:2.75rem;padding-left:1rem;font-size:.875rem;font-weight:500;text-transform:uppercase;margin:0 0 1.25rem;box-sizing:border-box;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-month{height:3.125rem;margin:0;border-bottom:none;text-transform:none;font-size:1.375rem;line-height:3.125rem;letter-spacing:.02rem;font-weight:700}.t-calendar{margin:0 auto;font-family:inherit;font-size:1.125rem;transition:opacity .2s}:host._ios .t-calendar{font-size:1.0625rem}.t-week,.t-years,.t-months{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host(._initialized) .t-week,:host(._initialized) .t-years,:host(._initialized) .t-months{opacity:1}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: i3__namespace.TuiPrimitiveCalendarMobileComponent, selector: "tui-primitive-calendar-mobile" }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiRippleDirective, selector: "[tuiRipple]", inputs: ["tuiRipple"] }, { type: i6__namespace.TuiTouchableDirective, selector: "[tuiTouchable]", inputs: ["tuiTouchable"] }, { type: i2__namespace.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i2__namespace.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4__namespace.AsyncPipe, "tuiOrderWeekDays": i1__namespace.TuiOrderWeekDaysPipe, "tuiMonth": i1__namespace.TuiMonthPipe, "tuiMapper": i7__namespace.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
792
|
+
TuiMobileCalendarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileCalendarComponent, selector: "tui-mobile-calendar", inputs: { single: "single", multi: "multi", min: "min", max: "max", disabledItemHandler: "disabledItemHandler", value: "value" }, outputs: { cancel: "cancel", confirm: "confirm", valueChange: "valueChange" }, host: { properties: { "class._ios": "isIOS", "class._initialized": "initialized" } }, providers: TUI_MOBILE_CALENDAR_PROVIDERS, viewQueries: [{ propertyName: "yearsScrollRef", first: true, predicate: ["yearsScrollRef"], descendants: true }, { propertyName: "monthsScrollRef", first: true, predicate: ["monthsScrollRef"], descendants: true }], ngImport: i0__namespace, template: "<header\n *ngIf=\"chooseDayOrRangeTexts$ | async as texts\"\n class=\"t-header\"\n>\n <button\n appearance=\"\"\n automation-id=\"tui-mobile-calendar__cancel\"\n shape=\"rounded\"\n tuiIconButton\n tuiRipple\n type=\"button\"\n class=\"t-close\"\n [icon]=\"icons.close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClose()\"\n ></button>\n <button\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link t-link_close\"\n (click)=\"onClose()\"\n >\n {{ cancelWord$ | async }}\n </button>\n <h2\n automation-id=\"tui-mobile-calendar__label\"\n class=\"t-label\"\n >\n {{ single ? texts[0] : multi ? texts[2] : texts[1] }}\n </h2>\n <button\n automation-id=\"tui-mobile-calendar__confirm\"\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link\"\n (click)=\"onConfirm()\"\n >\n {{ doneWord$ | async }}\n </button>\n</header>\n<cdk-virtual-scroll-viewport\n #yearsScrollRef\n orientation=\"horizontal\"\n class=\"t-years\"\n [itemSize]=\"yearWidth\"\n>\n <div class=\"t-years-wrapper\">\n <button\n *cdkVirtualFor=\"let index of years\"\n type=\"button\"\n class=\"t-year\"\n [attr.data-state]=\"getState(index)\"\n (click)=\"setYear(index)\"\n >\n {{ index }}\n </button>\n </div>\n</cdk-virtual-scroll-viewport>\n<div class=\"t-week\">\n <div\n *ngFor=\"let day of unorderedWeekDays$ | tuiOrderWeekDays | async\"\n class=\"t-day\"\n >\n {{ day }}\n </div>\n</div>\n<cdk-virtual-scroll-viewport\n #monthsScrollRef\n class=\"t-months\"\n [class._without_header]=\"!chooseDayOrRangeTexts$\"\n (scrolledIndexChange)=\"onMonthChange($event)\"\n>\n <section\n *cdkVirtualFor=\"let month of months; templateCacheSize: 10\"\n class=\"t-month-wrapper\"\n >\n <h2 class=\"t-month\">{{ month | tuiMonth | async }}</h2>\n <tui-primitive-calendar-mobile\n class=\"t-calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : min : max\"\n [month]=\"month\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar-mobile>\n </section>\n</cdk-virtual-scroll-viewport>\n", styles: [":host{display:block;height:100%;font-family:-apple-system,BlinkMacSystemFont,Roboto,sans-serif;color:var(--tui-text-01);-webkit-tap-highlight-color:transparent}.t-header{position:relative;display:flex;align-items:center;height:3.5rem;padding:0 1rem;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-header{height:2.75rem;border-bottom:none}.t-close{width:1.5rem;height:1.5rem;margin-right:2rem}:host._ios .t-close{display:none}.t-link{margin-left:auto;flex-shrink:0;font-size:.875rem;line-height:1rem;font-weight:500;text-transform:uppercase;color:var(--tui-link)}.t-link_close{display:none}:host._ios .t-link{min-width:3.75rem;text-align:right;font-size:.9375rem;line-height:1.125rem;font-weight:400;letter-spacing:.018125rem;text-transform:none}:host._ios .t-link_close{display:block;margin:0 auto 0 0;text-align:left}.t-label{flex-grow:1;margin:0;font-size:1.25rem;line-height:3.5rem;font-weight:500;letter-spacing:-.0125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-label+.t-link{padding-left:1rem}:host._ios .t-label{font-size:1.0625rem;font-weight:600;letter-spacing:-.025625rem;text-align:center}.t-years{scrollbar-width:none;-ms-overflow-style:none;height:4.0625rem;background-color:var(--tui-base-01);box-shadow:0 .5px var(--tui-base-03)}.t-years::-webkit-scrollbar,.t-years::-webkit-scrollbar-thumb{display:none}:host._ios .t-years{background-color:transparent}.t-years-wrapper{display:flex;height:4.0625rem}.t-year{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;outline:none;width:20vw;flex-shrink:0;font-size:.9375rem;font-weight:700;letter-spacing:.015625rem;cursor:pointer;opacity:.1;transform:scale(.73);transition:color,opacity,transform .2s}.t-year[data-state=adjacent]{transform:scale(.86);opacity:.3}.t-year[data-state=active]{color:var(--tui-link);opacity:1;transform:scale(1)}.t-week{display:flex;align-items:center;height:1.875rem;width:20.75rem;max-width:100%;margin:0 auto;font-size:.75rem}:host._ios .t-week{width:22.625rem;font-size:.6875rem;font-weight:500;color:var(--tui-text-02)}.t-day{flex:1;text-align:center}.t-months{scrollbar-width:none;-ms-overflow-style:none;height:calc(100% - 9.5rem);box-shadow:0 -1px var(--tui-base-03);overflow-x:hidden}.t-months::-webkit-scrollbar,.t-months::-webkit-scrollbar-thumb{display:none}:host._ios .t-months{height:calc(100% - 8.75rem)}.t-months._without_header{height:calc(100% - 6rem)}.t-month-wrapper{margin:.625rem 0 -.625rem}.t-month{height:2.75rem;line-height:2.75rem;padding-left:1rem;font-size:.875rem;font-weight:500;text-transform:uppercase;margin:0 0 1.25rem;box-sizing:border-box;border-bottom:.5px solid var(--tui-base-03)}:host._ios .t-month{height:3.125rem;margin:0;border-bottom:none;text-transform:none;font-size:1.375rem;line-height:3.125rem;letter-spacing:.02rem;font-weight:700}.t-calendar{margin:0 auto;font-family:inherit;font-size:1.125rem;transition:opacity .2s}:host._ios .t-calendar{font-size:1.0625rem}.t-week,.t-years,.t-months{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host(._initialized) .t-week,:host(._initialized) .t-years,:host(._initialized) .t-months{opacity:1}\n"], components: [{ type: i1__namespace.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }, { type: i2__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: i3__namespace.TuiPrimitiveCalendarMobileComponent, selector: "tui-primitive-calendar-mobile" }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.TuiRippleDirective, selector: "[tuiRipple]", inputs: ["tuiRipple"] }, { type: i6__namespace.TuiTouchableDirective, selector: "[tuiTouchable]", inputs: ["tuiTouchable"] }, { type: i2__namespace.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i2__namespace.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4__namespace.AsyncPipe, "tuiOrderWeekDays": i1__namespace.TuiOrderWeekDaysPipe, "tuiMonth": i1__namespace.TuiMonthPipe, "tuiMapper": i7__namespace.TuiMapperPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
782
793
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiMobileCalendarComponent, decorators: [{
|
|
783
794
|
type: i0.Component,
|
|
784
795
|
args: [{
|
|
@@ -787,7 +798,10 @@
|
|
|
787
798
|
styleUrls: ['./mobile-calendar.style.less'],
|
|
788
799
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
789
800
|
providers: TUI_MOBILE_CALENDAR_PROVIDERS,
|
|
790
|
-
host: {
|
|
801
|
+
host: {
|
|
802
|
+
'[class._ios]': 'isIOS',
|
|
803
|
+
'[class._initialized]': 'initialized',
|
|
804
|
+
},
|
|
791
805
|
}]
|
|
792
806
|
}], ctorParameters: function () {
|
|
793
807
|
return [{ type: undefined, decorators: [{
|
|
@@ -854,6 +868,10 @@
|
|
|
854
868
|
type: i0.Output
|
|
855
869
|
}], confirm: [{
|
|
856
870
|
type: i0.Output
|
|
871
|
+
}], valueChange: [{
|
|
872
|
+
type: i0.Output
|
|
873
|
+
}], value: [{
|
|
874
|
+
type: i0.Input
|
|
857
875
|
}] } });
|
|
858
876
|
|
|
859
877
|
var TuiMobileCalendarModule = /** @class */ (function () {
|