@taiga-ui/core 3.14.0 → 3.15.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-core-components-alert.umd.js +11 -11
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +16 -16
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +23 -10
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +34 -37
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +16 -16
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +5 -5
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +17 -18
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +17 -17
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +4 -4
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +13 -13
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +6 -6
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +14 -14
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +5 -5
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +10 -10
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +58 -58
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -4
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +7 -7
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +28 -28
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +10 -10
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +18 -18
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +4 -4
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +9 -9
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +94 -91
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +61 -61
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +34 -34
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +9 -9
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +3 -3
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +3 -3
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/components/calendar/calendar.component.d.ts +4 -2
- package/components/expand/expand.component.d.ts +1 -1
- package/directives/dropdown/dropdown-context.directive.d.ts +4 -4
- package/directives/dropdown/dropdown-options.directive.d.ts +3 -5
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -1
- package/directives/dropdown/dropdown.directive.d.ts +1 -1
- package/esm2015/components/alert/alert.component.js +12 -12
- package/esm2015/components/button/button.component.js +17 -17
- package/esm2015/components/calendar/calendar.component.js +21 -12
- package/esm2015/components/data-list/data-list.component.js +17 -17
- package/esm2015/components/data-list/data-list.directive.js +2 -2
- package/esm2015/components/data-list/opt-group.directive.js +5 -5
- package/esm2015/components/data-list/option/option.component.js +14 -17
- package/esm2015/components/dialog/dialog.component.js +14 -14
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- package/esm2015/components/error/error.component.js +6 -6
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +17 -19
- package/esm2015/components/group/group-styles.component.js +4 -4
- package/esm2015/components/group/group.directive.js +15 -15
- package/esm2015/components/hints-host/hints-host.component.js +5 -5
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +13 -13
- package/esm2015/components/label/label.component.js +7 -7
- package/esm2015/components/link/link.component.js +15 -15
- package/esm2015/components/loader/loader.component.js +6 -6
- package/esm2015/components/notification/notification.component.js +11 -11
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +6 -6
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +6 -6
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +6 -6
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +32 -32
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +15 -15
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +5 -5
- package/esm2015/components/root/root.component.js +8 -8
- package/esm2015/components/scroll-controls/scroll-controls.component.js +6 -6
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +9 -9
- package/esm2015/components/svg/svg.component.js +19 -19
- package/esm2015/components/theme-night/theme-night.component.js +5 -5
- package/esm2015/components/tooltip/tooltip.component.js +10 -10
- package/esm2015/directives/dropdown/dropdown-context.directive.js +16 -16
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-host.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +4 -4
- package/esm2015/directives/dropdown/dropdown-manual.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-options.directive.js +19 -15
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +17 -14
- package/esm2015/directives/dropdown/dropdown-position.directive.js +12 -14
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +11 -11
- package/esm2015/directives/dropdown/dropdown.component.js +18 -20
- package/esm2015/directives/dropdown/dropdown.directive.js +7 -7
- package/esm2015/directives/hint/hint-describe.directive.js +5 -5
- package/esm2015/directives/hint/hint-driver.directive.js +2 -2
- package/esm2015/directives/hint/hint-host.directive.js +2 -2
- package/esm2015/directives/hint/hint-hover.directive.js +5 -5
- package/esm2015/directives/hint/hint-manual.directive.js +2 -2
- package/esm2015/directives/hint/hint-options.directive.js +12 -12
- package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
- package/esm2015/directives/hint/hint-position.directive.js +25 -25
- package/esm2015/directives/hint/hint.component.js +10 -10
- package/esm2015/directives/hint/hint.directive.js +5 -5
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-filler.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-icon.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +4 -4
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +4 -4
- package/fesm2015/taiga-ui-core-components-alert.js +11 -11
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +16 -16
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +20 -11
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +34 -37
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +16 -16
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +5 -5
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +17 -19
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +17 -17
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +4 -4
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +13 -13
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +6 -6
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +14 -14
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +5 -5
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +10 -10
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +59 -59
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -4
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +7 -7
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +28 -28
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +10 -10
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +18 -18
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +4 -4
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +9 -9
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +96 -92
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +61 -61
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +34 -34
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +3 -3
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +3 -3
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.module.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n Self,\n} from '@angular/core';\nimport {TuiDestroyService, TuiDialog, tuiIsNumber} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: get rid of $any in template\n@Component({\n selector: `tui-alert`,\n templateUrl: `./alert.template.html`,\n styleUrls: [`./alert.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: `alert`},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === `function`\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding(`@tuiFadeIn`)\n @HostBinding(`@tuiSlideInRight`)\n @HostBinding(`@tuiHeightCollapse`)\n readonly animation = {value: ``, ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n tuiIsNumber(this.autoClose)\n ? this.autoClose\n : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, `mouseenter`)),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, `mouseleave`)),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","<tui-notification\n *ngIf=\"item.hasCloseButton; else noClose\"\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"item.content as text; context: $any(item)\">\n {{ text }}\n </ng-container>\n </div>\n</tui-notification>\n<ng-template #noClose>\n <tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n >\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"item.content as text; context: $any(item)\">\n {{ text }}\n </ng-container>\n </div>\n </tui-notification>\n</ng-template>\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsAlerts} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n providers: [tuiAsAlerts(TuiAlertService)],\n})\nexport class TuiAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsBA;MAUa,iBAAiB,CAAA;IAW1B,WACyC,CAAA,UAAmC,EACpB,QAA2B,EAE9D,OAAsC,EAEtC,gBAAkC,EACZ,IAAsC,EAAA;QANxC,IAAU,CAAA,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;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;oBAClE,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAC5C,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.module.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n Self,\n} from '@angular/core';\nimport {TuiDestroyService, TuiDialog, tuiIsNumber} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding('@tuiFadeIn')\n @HostBinding('@tuiSlideInRight')\n @HostBinding('@tuiHeightCollapse')\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n tuiIsNumber(this.autoClose)\n ? this.autoClose\n : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","<tui-notification\n *ngIf=\"item.hasCloseButton; else noClose\"\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"item.content as text; context: $any(item)\">\n {{ text }}\n </ng-container>\n </div>\n</tui-notification>\n<ng-template #noClose>\n <tui-notification\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n >\n <label\n *ngIf=\"item.label\"\n automation-id=\"tui-notification-alert__heading\"\n class=\"t-heading\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(item.label) as text; context: item\">\n {{ text }}\n </ng-container>\n </label>\n <div\n automation-id=\"tui-notification-alert__content\"\n class=\"t-content\"\n >\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"item.content as text; context: $any(item)\">\n {{ text }}\n </ng-container>\n </div>\n </tui-notification>\n</ng-template>\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsAlerts} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n providers: [tuiAsAlerts(TuiAlertService)],\n})\nexport class TuiAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsBA;M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,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;oBAClE,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AAC5C,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -41,8 +41,8 @@ class TuiButtonComponent extends AbstractTuiInteractive {
|
|
|
41
41
|
this.mode$ = ((_a = this.mode) === null || _a === void 0 ? void 0 : _a.change$) || EMPTY;
|
|
42
42
|
this.appearance = null;
|
|
43
43
|
this.disabled = false;
|
|
44
|
-
this.icon =
|
|
45
|
-
this.iconRight =
|
|
44
|
+
this.icon = '';
|
|
45
|
+
this.iconRight = '';
|
|
46
46
|
this.shape = this.options.shape;
|
|
47
47
|
this.showLoader = false;
|
|
48
48
|
this.size = this.options.size;
|
|
@@ -58,14 +58,14 @@ class TuiButtonComponent extends AbstractTuiInteractive {
|
|
|
58
58
|
return !this.showLoader && tuiIsNativeFocused(this.elementRef.nativeElement);
|
|
59
59
|
}
|
|
60
60
|
get loaderSize() {
|
|
61
|
-
return this.size ===
|
|
61
|
+
return this.size === 'l' || this.size === 'xl' ? 'm' : 's';
|
|
62
62
|
}
|
|
63
63
|
get computedAppearance() {
|
|
64
64
|
var _a;
|
|
65
|
-
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance ||
|
|
65
|
+
return (_a = this.appearance) !== null && _a !== void 0 ? _a : (this.options.appearance || '');
|
|
66
66
|
}
|
|
67
67
|
get nativeDisabled() {
|
|
68
|
-
return this.computedDisabled || this.showLoader ?
|
|
68
|
+
return this.computedDisabled || this.showLoader ? '' : null;
|
|
69
69
|
}
|
|
70
70
|
get tabIndex() {
|
|
71
71
|
return this.focusable ? 0 : -1;
|
|
@@ -104,9 +104,9 @@ __decorate([
|
|
|
104
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiButtonComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
106
106
|
args: [{
|
|
107
|
-
selector:
|
|
108
|
-
templateUrl:
|
|
109
|
-
styleUrls: [
|
|
107
|
+
selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',
|
|
108
|
+
templateUrl: './button.template.html',
|
|
109
|
+
styleUrls: ['./button.style.less'],
|
|
110
110
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
111
111
|
providers: [
|
|
112
112
|
tuiAsFocusableItemAccessor(TuiButtonComponent),
|
|
@@ -140,32 +140,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
140
140
|
type: Input
|
|
141
141
|
}, {
|
|
142
142
|
type: HostBinding,
|
|
143
|
-
args: [
|
|
143
|
+
args: ['attr.data-shape']
|
|
144
144
|
}], showLoader: [{
|
|
145
145
|
type: Input
|
|
146
146
|
}, {
|
|
147
147
|
type: HostBinding,
|
|
148
|
-
args: [
|
|
148
|
+
args: ['class._loading']
|
|
149
149
|
}], size: [{
|
|
150
150
|
type: Input
|
|
151
151
|
}, {
|
|
152
152
|
type: HostBinding,
|
|
153
|
-
args: [
|
|
153
|
+
args: ['attr.data-size']
|
|
154
154
|
}], computedAppearance: [{
|
|
155
155
|
type: HostBinding,
|
|
156
|
-
args: [
|
|
156
|
+
args: ['attr.data-appearance']
|
|
157
157
|
}], nativeDisabled: [{
|
|
158
158
|
type: HostBinding,
|
|
159
|
-
args: [
|
|
159
|
+
args: ['attr.disabled']
|
|
160
160
|
}], tabIndex: [{
|
|
161
161
|
type: HostBinding,
|
|
162
|
-
args: [
|
|
162
|
+
args: ['tabIndex']
|
|
163
163
|
}], onFocused: [{
|
|
164
164
|
type: HostListener,
|
|
165
|
-
args: [
|
|
165
|
+
args: ['focusin', ['true']]
|
|
166
166
|
}, {
|
|
167
167
|
type: HostListener,
|
|
168
|
-
args: [
|
|
168
|
+
args: ['focusout', ['false']]
|
|
169
169
|
}] } });
|
|
170
170
|
|
|
171
171
|
class TuiButtonModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["../../../projects/core/components/button/button-options.ts","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/button/button.module.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n readonly appearance:\n | TuiAppearance\n | string\n | keyof Record<TuiAppearance, string>\n | null;\n readonly shape: 'rounded' | 'square' | null;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\nexport const TUI_BUTTON_OPTIONS = new InjectionToken<TuiButtonOptions>(\n `[TUI_BUTTON_OPTIONS]: Default parameters for button component`,\n {\n factory: () => TUI_BUTTON_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiButtonOptionsProvider: (\n options: Partial<TuiButtonOptions>,\n) => ValueProvider = (options: Partial<TuiButtonOptions>) => ({\n provide: TUI_BUTTON_OPTIONS,\n useValue: {...TUI_BUTTON_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button-options';\n\n@Component({\n selector: `button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]`,\n templateUrl: `./button.template.html`,\n styleUrls: [`./button.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiButtonComponent),\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n @tuiDefaultProp()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n icon: PolymorpheusContent = ``;\n\n @Input()\n @tuiDefaultProp()\n iconRight: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-shape`)\n @tuiDefaultProp()\n shape = this.options.shape;\n\n @Input()\n @HostBinding(`class._loading`)\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && tuiIsNativeFocused(this.elementRef.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === `l` || this.size === `xl` ? `m` : `s`;\n }\n\n @HostBinding(`attr.data-appearance`)\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || ``);\n }\n\n @HostBinding(`attr.disabled`)\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? `` : null;\n }\n\n @HostBinding(`tabIndex`)\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener(`focusin`, [`true`])\n @HostListener(`focusout`, [`false`])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAca,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAuB,SAAA;EACnC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,+DAA+D,EAC/D;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;AAC1D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,0BAA0B,CAAK,EAAA,OAAO,CAAC;AACxD,CAAA;;ACMK,MAAO,kBACT,SAAQ,sBAAsB,CAAA;AA0C9B,IAAA,WAAA,CAGqB,IAA6B,EACT,UAAmC,EACxC,aAAqC,EACxB,OAAyB,EAAA;;AAEtE,QAAA,KAAK,EAAE,CAAC;QALS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAyB;QACT,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAE3B,IAAO,CAAA,OAAA,GAAP,OAAO,CAAkB;QA7CzD,IAAK,CAAA,KAAA,GAAwB,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAO,KAAI,KAAK,CAAC;QAI1E,IAAU,CAAA,UAAA,GAAmC,IAAI,CAAC;QAIl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,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEnB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVf,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["../../../projects/core/components/button/button-options.ts","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/button/button.module.ts","../../../projects/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXL | TuiSizeXS;\n readonly appearance:\n | TuiAppearance\n | string\n | keyof Record<TuiAppearance, string>\n | null;\n readonly shape: 'rounded' | 'square' | null;\n}\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: `l`,\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\nexport const TUI_BUTTON_OPTIONS = new InjectionToken<TuiButtonOptions>(\n `[TUI_BUTTON_OPTIONS]: Default parameters for button component`,\n {\n factory: () => TUI_BUTTON_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiButtonOptionsProvider: (\n options: Partial<TuiButtonOptions>,\n) => ValueProvider = (options: Partial<TuiButtonOptions>) => ({\n provide: TUI_BUTTON_OPTIONS,\n useValue: {...TUI_BUTTON_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Optional,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n tuiIsNativeFocused,\n} from '@taiga-ui/cdk';\nimport {TuiModeDirective} from '@taiga-ui/core/directives';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, startWith} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button-options';\n\n@Component({\n selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiButtonComponent),\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n private readonly mode$: Observable<unknown> = this.mode?.change$ || EMPTY;\n\n @Input()\n @tuiDefaultProp()\n appearance: TuiButtonOptions['appearance'] = null;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n icon: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n iconRight: PolymorpheusContent = '';\n\n @Input()\n @HostBinding('attr.data-shape')\n @tuiDefaultProp()\n shape = this.options.shape;\n\n @Input()\n @HostBinding('class._loading')\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size = this.options.size;\n\n readonly appearance$ = this.mode$.pipe(\n startWith(null),\n map(() => this.computedAppearance),\n distinctUntilChanged(),\n );\n\n constructor(\n @Optional()\n @Inject(TuiModeDirective)\n private readonly mode: TuiModeDirective | null,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && tuiIsNativeFocused(this.elementRef.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n\n @HostBinding('attr.data-appearance')\n get computedAppearance(): string {\n return this.appearance ?? (this.options.appearance || '');\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","<ng-container *ngIf=\"appearance$ | async\"></ng-container>\n<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"computedAppearance\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [disabled]=\"computedDisabled\"\n [focus]=\"computedFocusVisible\"\n>\n <span class=\"t-content\">\n <span\n *ngIf=\"icon\"\n class=\"t-left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"icon as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n <ng-content></ng-content>\n <span\n *ngIf=\"iconRight\"\n class=\"t-right\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconRight as text\"\n class=\"t-icon\"\n [src]=\"text\"\n ></tui-svg>\n </span>\n </span>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"t-loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n ></tui-loader>\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAca,MAAA,0BAA0B,GAAqB;AACxD,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAuB,SAAA;EACnC;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,+DAA+D,EAC/D;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA,EACH;MAEW,wBAAwB,GAEhB,CAAC,OAAkC,MAAM;AAC1D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,0BAA0B,CAAK,EAAA,OAAO,CAAC;AACxD,CAAA;;ACMK,MAAO,kBACT,SAAQ,sBAAsB,CAAA;AA0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,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,YAAA,EAAA,CAHT,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAN7B,YAAY;QACZ,kBAAkB;QAClB,gBAAgB;QAChB,YAAY;AACZ,QAAA,eAAe,aAGT,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEnB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVf,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,kBAAkB;YAClB,gBAAgB;YAChB,YAAY;YACZ,eAAe;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,eAAe;AAClB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import { __decorate } from 'tslib';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
|
|
4
4
|
import * as i6 from '@taiga-ui/cdk';
|
|
5
|
-
import { TuiMonth, ALWAYS_FALSE_HANDLER, TUI_FIRST_DAY, TUI_LAST_DAY, tuiNullableSame, tuiDefaultProp, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
5
|
+
import { TuiMonth, ALWAYS_FALSE_HANDLER, TUI_FIRST_DAY, TUI_LAST_DAY, TuiDay, tuiNullableSame, tuiDefaultProp, TuiMapperPipeModule } from '@taiga-ui/cdk';
|
|
6
6
|
import { TUI_DEFAULT_MARKER_HANDLER } from '@taiga-ui/core/constants';
|
|
7
7
|
import * as i1 from '@taiga-ui/core/components/scrollbar';
|
|
8
8
|
import { TuiScrollbarModule } from '@taiga-ui/core/components/scrollbar';
|
|
@@ -17,8 +17,8 @@ import { CommonModule } from '@angular/common';
|
|
|
17
17
|
|
|
18
18
|
class TuiCalendarComponent {
|
|
19
19
|
constructor() {
|
|
20
|
+
this._value = null;
|
|
20
21
|
this.month = TuiMonth.currentLocal();
|
|
21
|
-
this.value = null;
|
|
22
22
|
this.disabledItemHandler = ALWAYS_FALSE_HANDLER;
|
|
23
23
|
this.min = TUI_FIRST_DAY;
|
|
24
24
|
this.max = TUI_LAST_DAY;
|
|
@@ -33,6 +33,15 @@ class TuiCalendarComponent {
|
|
|
33
33
|
this.year = null;
|
|
34
34
|
this.disabledItemHandlerMapper = (disabledItemHandler, min, max) => item => item.dayBefore(min) || item.dayAfter(max) || disabledItemHandler(item);
|
|
35
35
|
}
|
|
36
|
+
set value(value) {
|
|
37
|
+
this._value = value;
|
|
38
|
+
if (this.showAdjacent && value instanceof TuiDay) {
|
|
39
|
+
this.month = value;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
get value() {
|
|
43
|
+
return this._value;
|
|
44
|
+
}
|
|
36
45
|
get computedMinViewedMonth() {
|
|
37
46
|
return this.minViewedMonth.monthSameOrAfter(this.min)
|
|
38
47
|
? this.minViewedMonth
|
|
@@ -75,13 +84,10 @@ class TuiCalendarComponent {
|
|
|
75
84
|
}
|
|
76
85
|
}
|
|
77
86
|
TuiCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
78
|
-
TuiCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiCalendarComponent, selector: "tui-calendar", inputs: { month: "month",
|
|
87
|
+
TuiCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiCalendarComponent, selector: "tui-calendar", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", min: "min", max: "max", minViewedMonth: "minViewedMonth", maxViewedMonth: "maxViewedMonth", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", markerHandler: "markerHandler", value: "value" }, outputs: { dayClick: "dayClick", monthChange: "monthChange", hoveredItemChange: "hoveredItemChange" }, ngImport: i0, template: "<tui-scrollbar\n *ngIf=\"year; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n automation-id=\"tui-calendar__year\"\n [min]=\"min\"\n [max]=\"max\"\n [initialItem]=\"year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-primitive-year-month-pagination\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [min]=\"computedMinViewedMonth\"\n [max]=\"computedMaxViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick($event)\"\n ></tui-primitive-year-month-pagination>\n <tui-primitive-calendar\n automation-id=\"tui-calendar__calendar\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n [month]=\"month\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper : disabledItemHandlerMapper : min : max\"\n [markerHandler]=\"markerHandler\"\n [hoveredItem]=\"hoveredItem\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar>\n</ng-template>\n", styles: [":host{display:block;height:18.25rem;width:15.75rem;padding:1rem 1.125rem;box-sizing:content-box}.t-scrollbar{height:18.25rem;width:16.875rem}.t-pagination{margin-bottom:1rem}\n"], components: [{ type: i1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i2.TuiPrimitiveYearPickerComponent, selector: "tui-primitive-year-picker", inputs: ["value", "initialItem", "min", "max", "disabledItemHandler"], outputs: ["yearClick"] }, { type: i3.TuiPrimitiveYearMonthPaginationComponent, selector: "tui-primitive-year-month-pagination", inputs: ["value", "min", "max"], outputs: ["valueChange", "yearClick"] }, { type: i4.TuiPrimitiveCalendarComponent, selector: "tui-primitive-calendar", inputs: ["month", "disabledItemHandler", "markerHandler", "value", "hoveredItem", "showAdjacent"], outputs: ["hoveredItemChange", "dayClick"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "tuiMapper": i6.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
79
88
|
__decorate([
|
|
80
89
|
tuiDefaultProp()
|
|
81
90
|
], TuiCalendarComponent.prototype, "month", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
tuiDefaultProp()
|
|
84
|
-
], TuiCalendarComponent.prototype, "value", void 0);
|
|
85
91
|
__decorate([
|
|
86
92
|
tuiDefaultProp()
|
|
87
93
|
], TuiCalendarComponent.prototype, "disabledItemHandler", void 0);
|
|
@@ -106,18 +112,19 @@ __decorate([
|
|
|
106
112
|
__decorate([
|
|
107
113
|
tuiDefaultProp()
|
|
108
114
|
], TuiCalendarComponent.prototype, "markerHandler", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
tuiDefaultProp()
|
|
117
|
+
], TuiCalendarComponent.prototype, "value", null);
|
|
109
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiCalendarComponent, decorators: [{
|
|
110
119
|
type: Component,
|
|
111
120
|
args: [{
|
|
112
|
-
selector:
|
|
113
|
-
templateUrl:
|
|
114
|
-
styleUrls: [
|
|
121
|
+
selector: 'tui-calendar',
|
|
122
|
+
templateUrl: './calendar.template.html',
|
|
123
|
+
styleUrls: ['./calendar.style.less'],
|
|
115
124
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
116
125
|
}]
|
|
117
126
|
}], propDecorators: { month: [{
|
|
118
127
|
type: Input
|
|
119
|
-
}], value: [{
|
|
120
|
-
type: Input
|
|
121
128
|
}], disabledItemHandler: [{
|
|
122
129
|
type: Input
|
|
123
130
|
}], min: [{
|
|
@@ -134,6 +141,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
134
141
|
type: Input
|
|
135
142
|
}], markerHandler: [{
|
|
136
143
|
type: Input
|
|
144
|
+
}], value: [{
|
|
145
|
+
type: Input
|
|
137
146
|
}], dayClick: [{
|
|
138
147
|
type: Output
|
|
139
148
|
}], monthChange: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-calendar.js","sources":["../../../projects/core/components/calendar/calendar.component.ts","../../../projects/core/components/calendar/calendar.template.html","../../../projects/core/components/calendar/calendar.module.ts","../../../projects/core/components/calendar/taiga-ui-core-components-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMapper,\n TuiMonth,\n tuiNullableSame,\n TuiYear,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiWithOptionalMinMax} from '@taiga-ui/core/interfaces';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\n@Component({\n selector: `tui-calendar`,\n templateUrl: `./calendar.template.html`,\n styleUrls: [`./calendar.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiCalendarComponent implements TuiWithOptionalMinMax<TuiDay> {\n @Input()\n @tuiDefaultProp()\n month: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n value: TuiDay | TuiDayRange | null = null;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n min = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n max = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n minViewedMonth: TuiMonth = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n maxViewedMonth: TuiMonth = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n hoveredItem: TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n showAdjacent = true;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Output()\n readonly dayClick = new EventEmitter<TuiDay>();\n\n @Output()\n readonly monthChange = new EventEmitter<TuiMonth>();\n\n @Output()\n readonly hoveredItemChange = new EventEmitter<TuiDay | null>();\n\n year: TuiYear | null = null;\n\n readonly disabledItemHandlerMapper: TuiMapper<\n TuiBooleanHandler<TuiDay>,\n TuiBooleanHandler<TuiDay>\n > = (disabledItemHandler, min: TuiDay, max: TuiDay) => item =>\n item.dayBefore(min) || item.dayAfter(max) || disabledItemHandler(item);\n\n get computedMinViewedMonth(): TuiMonth {\n return this.minViewedMonth.monthSameOrAfter(this.min)\n ? this.minViewedMonth\n : this.min;\n }\n\n get computedMaxViewedMonth(): TuiMonth {\n return this.maxViewedMonth.monthSameOrBefore(this.max)\n ? this.maxViewedMonth\n : this.max;\n }\n\n onPaginationYearClick(year: TuiYear): void {\n this.year = year;\n }\n\n onPickerYearClick({year}: TuiYear): void {\n this.year = null;\n this.updateViewedMonth(new TuiMonth(year, this.month.month));\n }\n\n onPaginationValueChange(month: TuiMonth): void {\n this.updateViewedMonth(month);\n }\n\n onDayClick(day: TuiDay): void {\n this.dayClick.emit(day);\n }\n\n onHoveredItemChange(day: TuiDay | null): void {\n this.updateHoveredDay(day);\n }\n\n private updateViewedMonth(month: TuiMonth): void {\n if (this.month.monthSame(month)) {\n return;\n }\n\n this.month = month;\n this.monthChange.emit(month);\n }\n\n private updateHoveredDay(day: TuiDay | null): void {\n if (tuiNullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n}\n","<tui-scrollbar\n *ngIf=\"year; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n automation-id=\"tui-calendar__year\"\n [min]=\"min\"\n [max]=\"max\"\n [initialItem]=\"year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-primitive-year-month-pagination\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [min]=\"computedMinViewedMonth\"\n [max]=\"computedMaxViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick($event)\"\n ></tui-primitive-year-month-pagination>\n <tui-primitive-calendar\n automation-id=\"tui-calendar__calendar\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n [month]=\"month\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper : disabledItemHandlerMapper : min : max\"\n [markerHandler]=\"markerHandler\"\n [hoveredItem]=\"hoveredItem\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiPrimitiveCalendarModule} from '@taiga-ui/core/components/primitive-calendar';\nimport {TuiPrimitiveYearPickerModule} from '@taiga-ui/core/components/primitive-year-picker';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiPrimitiveYearMonthPaginationModule} from '@taiga-ui/core/internal/primitive-year-month-pagination';\n\nimport {TuiCalendarComponent} from './calendar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiPrimitiveYearMonthPaginationModule,\n TuiPrimitiveCalendarModule,\n TuiPrimitiveYearPickerModule,\n TuiScrollbarModule,\n TuiMapperPipeModule,\n ],\n declarations: [TuiCalendarComponent],\n exports: [TuiCalendarComponent],\n})\nexport class TuiCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MA8Ba,oBAAoB,CAAA;AANjC,IAAA,WAAA,GAAA;AASI,QAAA,IAAA,CAAA,KAAK,GAAa,QAAQ,CAAC,YAAY,EAAE,CAAC;QAI1C,IAAK,CAAA,KAAA,GAAgC,IAAI,CAAC;QAI1C,IAAmB,CAAA,mBAAA,GAA8B,oBAAoB,CAAC;QAItE,IAAG,CAAA,GAAA,GAAG,aAAa,CAAC;QAIpB,IAAG,CAAA,GAAA,GAAG,YAAY,CAAC;QAInB,IAAc,CAAA,cAAA,GAAa,aAAa,CAAC;QAIzC,IAAc,CAAA,cAAA,GAAa,YAAY,CAAC;QAIxC,IAAW,CAAA,WAAA,GAAkB,IAAI,CAAC;QAIlC,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;QAIpB,IAAa,CAAA,aAAA,GAAqB,0BAA0B,CAAC;AAGpD,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAU,CAAC;AAGtC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAY,CAAC;AAG3C,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,YAAY,EAAiB,CAAC;QAE/D,I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../projects/core/components/calendar/calendar.component.ts","../../../projects/core/components/calendar/calendar.template.html","../../../projects/core/components/calendar/calendar.module.ts","../../../projects/core/components/calendar/taiga-ui-core-components-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiBooleanHandler,\n TuiDay,\n TuiDayRange,\n tuiDefaultProp,\n TuiMapper,\n TuiMonth,\n tuiNullableSame,\n TuiYear,\n} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_MARKER_HANDLER} from '@taiga-ui/core/constants';\nimport {TuiWithOptionalMinMax} from '@taiga-ui/core/interfaces';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\n@Component({\n selector: 'tui-calendar',\n templateUrl: './calendar.template.html',\n styleUrls: ['./calendar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiCalendarComponent implements TuiWithOptionalMinMax<TuiDay> {\n private _value: TuiDay | TuiDayRange | null = null;\n\n @Input()\n @tuiDefaultProp()\n month: TuiMonth = TuiMonth.currentLocal();\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<TuiDay> = ALWAYS_FALSE_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n min = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n max = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n minViewedMonth: TuiMonth = TUI_FIRST_DAY;\n\n @Input()\n @tuiDefaultProp()\n maxViewedMonth: TuiMonth = TUI_LAST_DAY;\n\n @Input()\n @tuiDefaultProp()\n hoveredItem: TuiDay | null = null;\n\n @Input()\n @tuiDefaultProp()\n showAdjacent = true;\n\n @Input()\n @tuiDefaultProp()\n markerHandler: TuiMarkerHandler = TUI_DEFAULT_MARKER_HANDLER;\n\n @Input()\n @tuiDefaultProp()\n set value(value: TuiDay | TuiDayRange | null) {\n this._value = value;\n\n if (this.showAdjacent && value instanceof TuiDay) {\n this.month = value;\n }\n }\n\n get value(): TuiDay | TuiDayRange | null {\n return this._value;\n }\n\n @Output()\n readonly dayClick = new EventEmitter<TuiDay>();\n\n @Output()\n readonly monthChange = new EventEmitter<TuiMonth>();\n\n @Output()\n readonly hoveredItemChange = new EventEmitter<TuiDay | null>();\n\n year: TuiYear | null = null;\n\n readonly disabledItemHandlerMapper: TuiMapper<\n TuiBooleanHandler<TuiDay>,\n TuiBooleanHandler<TuiDay>\n > = (disabledItemHandler, min: TuiDay, max: TuiDay) => item =>\n item.dayBefore(min) || item.dayAfter(max) || disabledItemHandler(item);\n\n get computedMinViewedMonth(): TuiMonth {\n return this.minViewedMonth.monthSameOrAfter(this.min)\n ? this.minViewedMonth\n : this.min;\n }\n\n get computedMaxViewedMonth(): TuiMonth {\n return this.maxViewedMonth.monthSameOrBefore(this.max)\n ? this.maxViewedMonth\n : this.max;\n }\n\n onPaginationYearClick(year: TuiYear): void {\n this.year = year;\n }\n\n onPickerYearClick({year}: TuiYear): void {\n this.year = null;\n this.updateViewedMonth(new TuiMonth(year, this.month.month));\n }\n\n onPaginationValueChange(month: TuiMonth): void {\n this.updateViewedMonth(month);\n }\n\n onDayClick(day: TuiDay): void {\n this.dayClick.emit(day);\n }\n\n onHoveredItemChange(day: TuiDay | null): void {\n this.updateHoveredDay(day);\n }\n\n private updateViewedMonth(month: TuiMonth): void {\n if (this.month.monthSame(month)) {\n return;\n }\n\n this.month = month;\n this.monthChange.emit(month);\n }\n\n private updateHoveredDay(day: TuiDay | null): void {\n if (tuiNullableSame(this.hoveredItem, day, (a, b) => a.daySame(b))) {\n return;\n }\n\n this.hoveredItem = day;\n this.hoveredItemChange.emit(day);\n }\n}\n","<tui-scrollbar\n *ngIf=\"year; else calendar\"\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n automation-id=\"tui-calendar__year\"\n [min]=\"min\"\n [max]=\"max\"\n [initialItem]=\"year\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #calendar>\n <tui-primitive-year-month-pagination\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [min]=\"computedMinViewedMonth\"\n [max]=\"computedMaxViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick($event)\"\n ></tui-primitive-year-month-pagination>\n <tui-primitive-calendar\n automation-id=\"tui-calendar__calendar\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n [month]=\"month\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper : disabledItemHandlerMapper : min : max\"\n [markerHandler]=\"markerHandler\"\n [hoveredItem]=\"hoveredItem\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n (dayClick)=\"onDayClick($event)\"\n ></tui-primitive-calendar>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {TuiPrimitiveCalendarModule} from '@taiga-ui/core/components/primitive-calendar';\nimport {TuiPrimitiveYearPickerModule} from '@taiga-ui/core/components/primitive-year-picker';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiPrimitiveYearMonthPaginationModule} from '@taiga-ui/core/internal/primitive-year-month-pagination';\n\nimport {TuiCalendarComponent} from './calendar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiPrimitiveYearMonthPaginationModule,\n TuiPrimitiveCalendarModule,\n TuiPrimitiveYearPickerModule,\n TuiScrollbarModule,\n TuiMapperPipeModule,\n ],\n declarations: [TuiCalendarComponent],\n exports: [TuiCalendarComponent],\n})\nexport class TuiCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;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A,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAjB,iBAAiB,EAAA,YAAA,EAAA,CAHX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAP/B,YAAY;QACZ,qCAAqC;QACrC,0BAA0B;QAC1B,4BAA4B;QAC5B,kBAAkB;AAClB,QAAA,mBAAmB,aAGb,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAErB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAXjB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,qCAAqC;YACrC,0BAA0B;YAC1B,4BAA4B;YAC5B,kBAAkB;YAClB,mBAAmB;AACtB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,qCAAqC;wBACrC,0BAA0B;wBAC1B,4BAA4B;wBAC5B,kBAAkB;wBAClB,mBAAmB;AACtB,qBAAA;oBACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -30,7 +30,7 @@ class TuiOptionComponent {
|
|
|
30
30
|
this.dropdown = dropdown;
|
|
31
31
|
/** @deprecated use size on {@link TuiDataListComponent} instead */
|
|
32
32
|
this.size = null;
|
|
33
|
-
this.role =
|
|
33
|
+
this.role = 'option';
|
|
34
34
|
this.disabled = false;
|
|
35
35
|
}
|
|
36
36
|
get active() {
|
|
@@ -51,7 +51,7 @@ class TuiOptionComponent {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
TuiOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiOptionComponent, deps: [{ token: TUI_OPTION_CONTENT, optional: true }, { token: forwardRef(() => TuiDataListComponent) }, { token: ElementRef }, { token: TUI_DATA_LIST_HOST, optional: true }, { token: TuiDropdownDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
-
TuiOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: { size: "size", role: "role", disabled: "disabled", value: "value" }, host: { attributes: { "tabIndex": "-1", "type": "button" }, listeners: { "click": "onClick()", "mousemove.
|
|
54
|
+
TuiOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: { size: "size", role: "role", disabled: "disabled", value: "value" }, host: { attributes: { "tabIndex": "-1", "type": "button" }, listeners: { "click": "onClick()", "mousemove.silent": "onMouseMove($event)" }, properties: { "attr.disabled": "disabled || null", "attr.data-size": "this.size", "attr.role": "this.role", "class._with-dropdown": "this.active" } }, ngImport: i0, template: "<ng-container *polymorpheusOutlet=\"content || base as text; context: {$implicit: base}\">\n {{ text }}\n</ng-container>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"t-arrow\"\n ></tui-svg>\n</ng-template>\n", styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:space-between;text-align:left;box-sizing:border-box;color:var(--tui-text-01);border-radius:var(--tui-radius-s);outline:none;text-decoration:none;cursor:pointer;background-clip:padding-box;font:var(--tui-font-text-s);min-height:2.5rem;padding:.375rem .5rem;margin:.125rem 0}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host:focus,:host._with-dropdown{background-color:var(--tui-clear)}:host :host-context([data-list-size=\"s\"]),:host :host-context([data-list-size=\"xs\"]),:host[data-size=s][data-size=s],:host[data-size=xs][data-size=xs]{font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .5rem;margin:var(--tui-data-list-margin) 0}:host :host-context([data-list-size=\"m\"]),:host[data-size=m][data-size=m]{font:var(--tui-font-text-s);min-height:2.5rem;padding:.375rem .5rem;margin:var(--tui-data-list-margin) 0}:host :host-context([data-list-size=\"l\"]),:host[data-size=l][data-size=l]{font:var(--tui-font-text-m);min-height:2.75rem;padding:.375rem .625rem;margin:var(--tui-data-list-margin) 0}.t-arrow{margin:0 -.5rem 0 .75rem}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
55
55
|
__decorate([
|
|
56
56
|
tuiDefaultProp()
|
|
57
57
|
], TuiOptionComponent.prototype, "size", void 0);
|
|
@@ -67,14 +67,14 @@ __decorate([
|
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiOptionComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
69
|
args: [{
|
|
70
|
-
selector:
|
|
71
|
-
templateUrl:
|
|
72
|
-
styleUrls: [
|
|
70
|
+
selector: 'button[tuiOption], a[tuiOption]',
|
|
71
|
+
templateUrl: './option.template.html',
|
|
72
|
+
styleUrls: ['./option.style.less'],
|
|
73
73
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
74
74
|
host: {
|
|
75
|
-
tabIndex:
|
|
76
|
-
type:
|
|
77
|
-
'[attr.disabled]':
|
|
75
|
+
tabIndex: '-1',
|
|
76
|
+
type: 'button',
|
|
77
|
+
'[attr.disabled]': 'disabled || null',
|
|
78
78
|
},
|
|
79
79
|
}]
|
|
80
80
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -104,28 +104,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
104
104
|
type: Input
|
|
105
105
|
}, {
|
|
106
106
|
type: HostBinding,
|
|
107
|
-
args: [
|
|
107
|
+
args: ['attr.data-size']
|
|
108
108
|
}], role: [{
|
|
109
109
|
type: Input
|
|
110
110
|
}, {
|
|
111
111
|
type: HostBinding,
|
|
112
|
-
args: [
|
|
112
|
+
args: ['attr.role']
|
|
113
113
|
}], disabled: [{
|
|
114
114
|
type: Input
|
|
115
115
|
}], value: [{
|
|
116
116
|
type: Input
|
|
117
117
|
}], active: [{
|
|
118
118
|
type: HostBinding,
|
|
119
|
-
args: [
|
|
119
|
+
args: ['class._with-dropdown']
|
|
120
120
|
}], onClick: [{
|
|
121
121
|
type: HostListener,
|
|
122
|
-
args: [
|
|
122
|
+
args: ['click']
|
|
123
123
|
}], onMouseMove: [{
|
|
124
124
|
type: HostListener,
|
|
125
|
-
args: [
|
|
126
|
-
}, {
|
|
127
|
-
type: HostListener,
|
|
128
|
-
args: [`mousemove.silent`, [`$event`]]
|
|
125
|
+
args: ['mousemove.silent', ['$event']]
|
|
129
126
|
}] } });
|
|
130
127
|
|
|
131
128
|
// TODO: Consider aria-activedescendant for proper accessibility implementation
|
|
@@ -136,9 +133,9 @@ class TuiDataListComponent {
|
|
|
136
133
|
this.elementRef = elementRef;
|
|
137
134
|
this.defaultEmptyContent$ = defaultEmptyContent$;
|
|
138
135
|
this.options = EMPTY_QUERY;
|
|
139
|
-
this.role =
|
|
140
|
-
this.emptyContent =
|
|
141
|
-
this.size = ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.size) ||
|
|
136
|
+
this.role = 'listbox';
|
|
137
|
+
this.emptyContent = '';
|
|
138
|
+
this.size = ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.size) || 'm';
|
|
142
139
|
}
|
|
143
140
|
get empty$() {
|
|
144
141
|
return tuiItemsQueryListObservable(this.options).pipe(map(({ length }) => !length));
|
|
@@ -174,14 +171,14 @@ class TuiDataListComponent {
|
|
|
174
171
|
this.handleFocusLossIfNecessary(target);
|
|
175
172
|
}
|
|
176
173
|
get elements() {
|
|
177
|
-
return Array.from(this.elementRef.nativeElement.querySelectorAll(
|
|
174
|
+
return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));
|
|
178
175
|
}
|
|
179
176
|
}
|
|
180
177
|
TuiDataListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDataListComponent, deps: [{ token: TUI_TEXTFIELD_WATCHED_CONTROLLER, optional: true }, { token: ElementRef }, { token: TUI_NOTHING_FOUND_MESSAGE }], target: i0.ɵɵFactoryTarget.Component });
|
|
181
178
|
TuiDataListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDataListComponent, selector: "tui-data-list", inputs: { role: "role", emptyContent: "emptyContent", size: "size" }, host: { listeners: { "focusin": "onFocusIn($event.relatedTarget,$event.currentTarget)", "mousedown.prevent": "noop()", "keydown.arrowDown.prevent": "onKeyDownArrow($event.target,1)", "keydown.arrowUp.prevent": "onKeyDownArrow($event.target,-1)", "wheel.silent.passive": "handleFocusLossIfNecessary()", "mouseleave": "handleFocusLossIfNecessary($event.target)" }, properties: { "attr.role": "this.role", "attr.data-list-size": "this.size" } }, providers: [
|
|
182
179
|
tuiAsDataListAccessor(TuiDataListComponent),
|
|
183
180
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
184
|
-
], queries: [{ propertyName: "options", predicate: i0.forwardRef(function () { return TuiOptionComponent; }), descendants: true }], ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n class=\"t-empty\"\n>\n <ng-container *polymorpheusOutlet=\"emptyContent || (defaultEmptyContent$ | async) as text\">\n {{ text }}\n </ng-container>\n</div>\n<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n", styles: ["tui-data-list{--tui-data-list-padding: .25rem;--tui-data-list-margin: .0625rem;display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:calc(var(--tui-data-list-padding) - var(--tui-data-list-margin)) var(--tui-data-list-padding);color:var(--tui-text-03)}tui-data-list:focus-within .t-trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list[data-list-size=s]{--tui-data-list-margin:
|
|
181
|
+
], queries: [{ propertyName: "options", predicate: i0.forwardRef(function () { return TuiOptionComponent; }), descendants: true }], ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n class=\"t-empty\"\n>\n <ng-container *polymorpheusOutlet=\"emptyContent || (defaultEmptyContent$ | async) as text\">\n {{ text }}\n </ng-container>\n</div>\n<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n", styles: ["tui-data-list{--tui-data-list-padding: .25rem;--tui-data-list-margin: .0625rem;display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:calc(var(--tui-data-list-padding) - var(--tui-data-list-margin)) var(--tui-data-list-padding);color:var(--tui-text-03)}tui-data-list:focus-within .t-trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list[data-list-size=s]{--tui-data-list-margin: 0rem}tui-data-list[data-list-size=l]{--tui-data-list-padding: .375rem;--tui-data-list-margin: .125rem}tui-data-list>.t-empty{margin:.75rem 1rem}tui-opt-group{position:relative;display:flex;font:var(--tui-font-text-xs);color:var(--tui-text-02);flex-direction:column;line-height:1rem}tui-data-list[data-list-size=l] tui-opt-group{font:var(--tui-font-text-s);line-height:1.25rem}tui-data-list[data-list-size=l] tui-opt-group:before{padding-left:.625rem;padding-right:.625rem}tui-data-list[data-list-size=l] tui-opt-group:after{left:.625rem;right:.625rem}tui-opt-group:empty:before,tui-opt-group:empty:after{display:none}tui-opt-group:before{content:attr(data-label);padding:var(--tui-data-list-padding) .5rem var(--tui-data-list-padding);margin:var(--tui-data-list-margin) 0;white-space:normal;word-break:break-word}tui-opt-group:after{position:absolute;left:.5rem;right:.5rem;top:var(--tui-data-list-padding);height:1px;background:var(--tui-base-03)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-top:calc(.75rem + var(--tui-data-list-padding))}tui-opt-group:not(:empty)~tui-opt-group[data-label=\"\"]:before{padding:var(--tui-data-list-padding) 0}tui-opt-group:not(:empty)~tui-opt-group:after{content:\"\"}tui-opt-group[data-label=\"\"]:before{padding:0 .5rem}\n"], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i1$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
185
182
|
__decorate([
|
|
186
183
|
tuiDefaultProp()
|
|
187
184
|
], TuiDataListComponent.prototype, "role", void 0);
|
|
@@ -197,9 +194,9 @@ __decorate([
|
|
|
197
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDataListComponent, decorators: [{
|
|
198
195
|
type: Component,
|
|
199
196
|
args: [{
|
|
200
|
-
selector:
|
|
201
|
-
templateUrl:
|
|
202
|
-
styleUrls: [
|
|
197
|
+
selector: 'tui-data-list',
|
|
198
|
+
templateUrl: './data-list.template.html',
|
|
199
|
+
styleUrls: ['./data-list.style.less'],
|
|
203
200
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
204
201
|
encapsulation: ViewEncapsulation.None,
|
|
205
202
|
providers: [
|
|
@@ -225,32 +222,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
225
222
|
type: Input
|
|
226
223
|
}, {
|
|
227
224
|
type: HostBinding,
|
|
228
|
-
args: [
|
|
225
|
+
args: ['attr.role']
|
|
229
226
|
}], emptyContent: [{
|
|
230
227
|
type: Input
|
|
231
228
|
}], size: [{
|
|
232
229
|
type: Input
|
|
233
230
|
}, {
|
|
234
231
|
type: HostBinding,
|
|
235
|
-
args: [
|
|
232
|
+
args: ['attr.data-list-size']
|
|
236
233
|
}], empty$: [], onFocusIn: [{
|
|
237
234
|
type: HostListener,
|
|
238
|
-
args: [
|
|
235
|
+
args: ['focusin', ['$event.relatedTarget', '$event.currentTarget']]
|
|
239
236
|
}], noop: [{
|
|
240
237
|
type: HostListener,
|
|
241
|
-
args: [
|
|
238
|
+
args: ['mousedown.prevent']
|
|
242
239
|
}], onKeyDownArrow: [{
|
|
243
240
|
type: HostListener,
|
|
244
|
-
args: [
|
|
241
|
+
args: ['keydown.arrowDown.prevent', ['$event.target', '1']]
|
|
245
242
|
}, {
|
|
246
243
|
type: HostListener,
|
|
247
|
-
args: [
|
|
244
|
+
args: ['keydown.arrowUp.prevent', ['$event.target', '-1']]
|
|
248
245
|
}], handleFocusLossIfNecessary: [{
|
|
249
246
|
type: HostListener,
|
|
250
|
-
args: [
|
|
247
|
+
args: ['wheel.silent.passive']
|
|
251
248
|
}, {
|
|
252
249
|
type: HostListener,
|
|
253
|
-
args: [
|
|
250
|
+
args: ['mouseleave', ['$event.target']]
|
|
254
251
|
}] } });
|
|
255
252
|
|
|
256
253
|
class TuiDataListDirective {
|
|
@@ -260,13 +257,13 @@ TuiDataListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", v
|
|
|
260
257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDataListDirective, decorators: [{
|
|
261
258
|
type: Directive,
|
|
262
259
|
args: [{
|
|
263
|
-
selector:
|
|
260
|
+
selector: 'ng-template[tuiDataList]',
|
|
264
261
|
}]
|
|
265
262
|
}] });
|
|
266
263
|
|
|
267
264
|
class TuiOptGroupDirective {
|
|
268
265
|
constructor() {
|
|
269
|
-
this.label =
|
|
266
|
+
this.label = '';
|
|
270
267
|
}
|
|
271
268
|
}
|
|
272
269
|
TuiOptGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiOptGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -277,16 +274,16 @@ __decorate([
|
|
|
277
274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiOptGroupDirective, decorators: [{
|
|
278
275
|
type: Directive,
|
|
279
276
|
args: [{
|
|
280
|
-
selector:
|
|
277
|
+
selector: 'tui-opt-group',
|
|
281
278
|
host: {
|
|
282
|
-
role:
|
|
279
|
+
role: 'group',
|
|
283
280
|
},
|
|
284
281
|
}]
|
|
285
282
|
}], propDecorators: { label: [{
|
|
286
283
|
type: Input
|
|
287
284
|
}, {
|
|
288
285
|
type: HostBinding,
|
|
289
|
-
args: [
|
|
286
|
+
args: ['attr.data-label']
|
|
290
287
|
}] } });
|
|
291
288
|
|
|
292
289
|
class TuiDataListModule {
|