@taiga-ui/core 4.52.0-canary.1ea42f6 → 4.52.0-canary.24b31eb

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.
Files changed (33) hide show
  1. package/components/alert/alert.interfaces.d.ts +1 -1
  2. package/components/dialog/dialog.component.d.ts +6 -11
  3. package/components/dialog/dialog.directive.d.ts +1 -1
  4. package/components/dialog/dialog.factory.d.ts +1 -1
  5. package/components/dialog/dialog.options.d.ts +26 -0
  6. package/components/dialog/{dialog-close.service.d.ts → dialog.providers.d.ts} +4 -1
  7. package/components/dialog/dialog.service.d.ts +1 -1
  8. package/components/dialog/index.d.ts +2 -3
  9. package/components/expand/expand.component.d.ts +9 -28
  10. package/components/expand/index.d.ts +0 -2
  11. package/components/root/root.component.d.ts +1 -2
  12. package/directives/hint/hint-options.directive.d.ts +3 -3
  13. package/directives/hint/hint.component.d.ts +6 -8
  14. package/directives/hint/hint.directive.d.ts +1 -1
  15. package/fesm2022/taiga-ui-core-components-alert.mjs +3 -3
  16. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-core-components-calendar.mjs +2 -2
  18. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-core-components-dialog.mjs +58 -72
  20. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-core-components-expand.mjs +33 -131
  22. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-core-components-root.mjs +2 -4
  24. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +2 -2
  26. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-core-directives-hint.mjs +23 -33
  28. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  29. package/package.json +3 -3
  30. package/components/dialog/dialog.interfaces.d.ts +0 -34
  31. package/components/dialog/dialog.tokens.d.ts +0 -15
  32. package/components/expand/expand-content.directive.d.ts +0 -8
  33. package/components/expand/expand.d.ts +0 -6
@@ -5,7 +5,7 @@ import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
5
5
  export interface TuiAlertOptions<I = undefined> extends Omit<TuiNotificationOptions, 'size'> {
6
6
  readonly autoClose: TuiHandler<string, number> | number;
7
7
  readonly data: I;
8
- readonly closeable: boolean;
8
+ readonly closable: boolean;
9
9
  readonly label: PolymorpheusContent<TuiAlertOptions<I>>;
10
10
  }
11
11
  export interface TuiAlertContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiAlertOptions<I> {
@@ -1,20 +1,15 @@
1
1
  import { type TuiPopover } from '@taiga-ui/cdk/services';
2
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
3
- import { type Observable, Subject } from 'rxjs';
4
- import { type TuiDialogOptions, type TuiDialogSize } from './dialog.interfaces';
2
+ import { Subject } from 'rxjs';
3
+ import { type TuiDialogOptions } from './dialog.options';
5
4
  import * as i0 from "@angular/core";
6
5
  import * as i1 from "@taiga-ui/cdk/directives/animated";
7
6
  export declare class TuiDialogComponent<O, I> {
8
7
  protected readonly close$: Subject<void>;
9
- protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
10
- protected readonly closeWord$: Observable<string>;
8
+ protected readonly close: import("@angular/core").Signal<string | undefined>;
11
9
  protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
12
- protected readonly from: import("@angular/core").Signal<"translateY(100vh)" | "translateY(2.5rem)">;
13
- protected readonly isMobile: import("@angular/core").Signal<boolean | undefined>;
14
- constructor();
15
- protected get size(): TuiDialogSize;
16
- protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>>;
17
- private close;
10
+ protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
11
+ protected readonly primitive: boolean;
12
+ protected readonly sub: import("rxjs").Subscription;
18
13
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogComponent<any, any>, never>;
19
14
  static ɵcmp: i0.ɵɵComponentDeclaration<TuiDialogComponent<any, any>, "tui-dialog", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }]>;
20
15
  }
@@ -1,5 +1,5 @@
1
1
  import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
2
- import { type TuiDialogOptions } from './dialog.interfaces';
2
+ import { type TuiDialogOptions } from './dialog.options';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialog<any>, never>;
@@ -1,6 +1,6 @@
1
1
  import { type Injector } from '@angular/core';
2
2
  import { type Observable } from 'rxjs';
3
- import { type TuiDialogContext, type TuiDialogOptions } from './dialog.interfaces';
3
+ import { type TuiDialogContext, type TuiDialogOptions } from './dialog.options';
4
4
  type SingleUnionOrNever<T, U = T> = [T] extends [never] ? never : T extends U ? [U] extends [T] ? T : never : never;
5
5
  type ReplaceAny<T> = 0 extends T & 1 ? void : T;
6
6
  type ContextKeys<T> = {
@@ -0,0 +1,26 @@
1
+ import { type TuiPopoverContext } from '@taiga-ui/cdk/services';
2
+ import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
3
+ import { type Observable } from 'rxjs';
4
+ /**
5
+ * Options for a dialog
6
+ *
7
+ * appearance - data-appearance attribute of the dialog ('taiga' by default)
8
+ * closable - show close button (true by default)
9
+ * data - arbitrary data for dialog
10
+ * dismissible - close dialog by Esc button or click on overlay (true by default)
11
+ * label - string title for the dialog ('' by default)
12
+ * required - dismissing or closing dialog by X button throws (false by default)
13
+ * size - size of the dialog ('m' by default)
14
+ */
15
+ export interface TuiDialogOptions<I> {
16
+ readonly appearance: string;
17
+ readonly closable: Observable<boolean> | boolean;
18
+ readonly data: I extends void ? undefined : I;
19
+ readonly dismissible: Observable<boolean> | boolean;
20
+ readonly label: string;
21
+ readonly required: boolean;
22
+ readonly size: TuiSizeL | TuiSizeS;
23
+ }
24
+ export interface TuiDialogContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiDialogOptions<I> {
25
+ }
26
+ export declare const TUI_DIALOG_OPTIONS: import("@angular/core").InjectionToken<TuiDialogOptions<void>>, tuiDialogOptionsProvider: (item: Partial<TuiDialogOptions<void>> | (() => Partial<TuiDialogOptions<void>>)) => import("@angular/core").FactoryProvider;
@@ -1,5 +1,8 @@
1
- import { Observable } from 'rxjs';
1
+ import { InjectionToken } from '@angular/core';
2
+ import { BehaviorSubject, Observable } from 'rxjs';
2
3
  import * as i0 from "@angular/core";
4
+ export declare const TUI_DIALOGS: InjectionToken<BehaviorSubject<readonly any[]>>;
5
+ export declare const TUI_DIALOGS_CLOSE: InjectionToken<Observable<unknown>>;
3
6
  export declare class TuiDialogCloseService extends Observable<unknown> {
4
7
  private readonly win;
5
8
  private readonly doc;
@@ -1,5 +1,5 @@
1
1
  import { TuiPopoverService } from '@taiga-ui/cdk/services';
2
- import { type TuiDialogOptions } from './dialog.interfaces';
2
+ import { type TuiDialogOptions } from './dialog.options';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogService, never>;
@@ -1,8 +1,7 @@
1
1
  export * from './dialog.component';
2
2
  export * from './dialog.directive';
3
3
  export * from './dialog.factory';
4
- export type * from './dialog.interfaces';
4
+ export * from './dialog.options';
5
+ export * from './dialog.providers';
5
6
  export * from './dialog.service';
6
- export * from './dialog.tokens';
7
- export * from './dialog-close.service';
8
7
  export * from './dialogs.component';
@@ -1,30 +1,11 @@
1
- import { type NgIfContext } from '@angular/common';
2
- import { TemplateRef } from '@angular/core';
1
+ import { type OnInit, TemplateRef } from '@angular/core';
3
2
  import * as i0 from "@angular/core";
4
- /**
5
- * An event indicating that async data for expand has finished loading.
6
- * Dispatch to finish loading states for {@link TuiExpandComponent}.
7
- */
8
- export declare const TUI_EXPAND_LOADED = "tui-expand-loaded";
9
- /**
10
- * @deprecated use {@link TuiExpand} from @taiga-ui/experimental
11
- */
12
- export declare class TuiExpandComponent {
13
- private readonly contentWrapper?;
14
- private readonly cdr;
15
- private readonly destroyRef;
16
- private state;
17
- protected content: TemplateRef<NgIfContext<boolean>> | null;
18
- protected expanded: boolean | null;
19
- async: boolean;
20
- set expandedSetter(expanded: boolean | null);
21
- get contentVisible(): boolean;
22
- protected get overflow(): boolean;
23
- protected get loading(): boolean;
24
- protected get height(): number | null;
25
- protected onTransitionEnd({ propertyName, pseudoElement }: TransitionEvent): void;
26
- protected onExpandLoaded(event: Event): void;
27
- private retrigger;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiExpandComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiExpandComponent, "tui-expand", never, { "async": { "alias": "async"; "required": false; }; "expandedSetter": { "alias": "expanded"; "required": false; }; }, {}, ["content"], ["*"], true, never>;
3
+ export declare class TuiExpand implements OnInit {
4
+ protected readonly content: import("@angular/core").Signal<TemplateRef<any> | undefined>;
5
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
6
+ readonly expanded: import("@angular/core").InputSignal<boolean>;
7
+ ngOnInit(): void;
8
+ protected onTransitionEnd({ propertyName }: TransitionEvent): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiExpand, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiExpand, "tui-expand", never, { "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, {}, ["content"], ["*"], true, never>;
30
11
  }
@@ -1,3 +1 @@
1
- export * from './expand';
2
1
  export * from './expand.component';
3
- export * from './expand-content.directive';
@@ -2,7 +2,6 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "@taiga-ui/cdk/directives/platform";
3
3
  import * as i2 from "@taiga-ui/cdk/directives/visual-viewport";
4
4
  import * as i3 from "@taiga-ui/cdk/directives/font-size";
5
- import * as i4 from "@taiga-ui/cdk/directives/active-zone";
6
5
  export declare class TuiRoot {
7
6
  private readonly doc;
8
7
  private readonly el;
@@ -14,5 +13,5 @@ export declare class TuiRoot {
14
13
  protected readonly scrollbars: boolean;
15
14
  protected get parent(): boolean;
16
15
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiRoot, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiRoot, "tui-root", never, {}, {}, never, ["*", "tuiOverContent", "tuiOverDialogs", "tuiOverAlerts", "tuiOverDropdowns", "tuiOverHints"], true, [{ directive: typeof i1.TuiPlatform; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiVisualViewport; inputs: {}; outputs: {}; }, { directive: typeof i3.TuiFontSize; inputs: {}; outputs: {}; }, { directive: typeof i4.TuiActiveZone; inputs: {}; outputs: {}; }]>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiRoot, "tui-root", never, {}, {}, never, ["*", "tuiOverContent", "tuiOverDialogs", "tuiOverAlerts", "tuiOverDropdowns", "tuiOverHints"], true, [{ directive: typeof i1.TuiPlatform; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiVisualViewport; inputs: {}; outputs: {}; }, { directive: typeof i3.TuiFontSize; inputs: {}; outputs: {}; }]>;
18
17
  }
@@ -1,11 +1,11 @@
1
1
  import { type FactoryProvider, InjectionToken, type OnChanges } from '@angular/core';
2
+ import { type TuiAppearanceOptions } from '@taiga-ui/core/directives/appearance';
2
3
  import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
3
4
  import { Subject } from 'rxjs';
4
5
  import * as i0 from "@angular/core";
5
6
  export type TuiHintDirection = 'bottom-left' | 'bottom-right' | 'bottom' | 'left-bottom' | 'left-top' | 'left' | 'right-bottom' | 'right-top' | 'right' | 'top-left' | 'top-right' | 'top';
6
7
  export declare const TUI_HINT_DIRECTIONS: readonly TuiHintDirection[];
7
- export interface TuiHintOptions {
8
- readonly appearance: string;
8
+ export interface TuiHintOptions extends TuiAppearanceOptions {
9
9
  readonly direction: TuiHintDirection | TuiHintDirection[];
10
10
  readonly hideDelay: number;
11
11
  readonly icon: string;
@@ -25,7 +25,7 @@ export declare class TuiHintOptionsDirective implements TuiHintOptions, OnChange
25
25
  private readonly options;
26
26
  content: PolymorpheusContent;
27
27
  direction: TuiHintDirection | TuiHintDirection[];
28
- appearance: string;
28
+ appearance: "accent" | "action-destructive" | "action-grayscale" | "action" | "flat-destructive" | "flat-grayscale" | "flat" | "floating" | "glass" | "icon" | "info" | "negative" | "neutral" | "outline-destructive" | "outline-grayscale" | "outline" | "positive" | "primary-destructive" | "primary-grayscale" | "primary" | "secondary-destructive" | "secondary-grayscale" | "secondary" | "textfield" | "warning" | (Record<never, never> & string);
29
29
  showDelay: number;
30
30
  hideDelay: number;
31
31
  icon: string;
@@ -4,9 +4,10 @@ import { TuiPositionService } from '@taiga-ui/core/services';
4
4
  import { TuiHintDirective } from './hint.directive';
5
5
  import { TuiHintPointer } from './hint-pointer.directive';
6
6
  import * as i0 from "@angular/core";
7
- import * as i1 from "@taiga-ui/cdk/directives/animated";
7
+ import * as i1 from "@taiga-ui/core/directives/appearance";
8
+ import * as i2 from "@taiga-ui/cdk/directives/animated";
8
9
  export declare const TUI_HINT_PROVIDERS: (import("@angular/core").FactoryProvider | typeof TuiHoveredService | typeof TuiPositionService)[];
9
- export declare class TuiHintBaseComponent<C = any> {
10
+ export declare class TuiHintComponent<C = any> {
10
11
  private readonly el;
11
12
  private readonly hover;
12
13
  private readonly vvs;
@@ -16,15 +17,12 @@ export declare class TuiHintBaseComponent<C = any> {
16
17
  protected readonly hint: TuiHintDirective<C>;
17
18
  protected readonly isMobile: boolean;
18
19
  protected readonly content: import("@angular/core").WritableSignal<import("@taiga-ui/polymorpheus").PolymorpheusContent<C>>;
19
- protected readonly appearance: string | null | undefined;
20
+ protected readonly theme: string | null | undefined;
21
+ protected readonly appearance: import("@angular/core").WritableSignal<string>;
20
22
  constructor();
21
23
  protected onClick(target: HTMLElement): void;
22
24
  private apply;
23
25
  private update;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiHintBaseComponent<any>, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiHintBaseComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
26
- }
27
- export declare class TuiHintComponent<C = any> extends TuiHintBaseComponent<C> {
28
26
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiHintComponent<any>, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiHintComponent<any>, "tui-hint", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }]>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiHintComponent<any>, "tui-hint", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.TuiAppearance; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }]>;
30
28
  }
@@ -10,7 +10,7 @@ import * as i3 from "./hint-position.directive";
10
10
  export declare class TuiHintDirective<C> implements OnDestroy, TuiPortalItem<C>, TuiRectAccessor, TuiVehicle {
11
11
  private readonly service;
12
12
  context?: C;
13
- appearance: string;
13
+ appearance: "accent" | "action-destructive" | "action-grayscale" | "action" | "flat-destructive" | "flat-grayscale" | "flat" | "floating" | "glass" | "icon" | "info" | "negative" | "neutral" | "outline-destructive" | "outline-grayscale" | "outline" | "positive" | "primary-destructive" | "primary-grayscale" | "primary" | "secondary-destructive" | "secondary-grayscale" | "secondary" | "textfield" | "warning" | (Record<never, never> & string);
14
14
  readonly visible: EventEmitter<boolean>;
15
15
  content: import("@angular/core").WritableSignal<PolymorpheusContent<C>>;
16
16
  component: PolymorpheusComponent<any>;
@@ -19,7 +19,7 @@ import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
19
19
  const TUI_ALERT_DEFAULT_OPTIONS = {
20
20
  autoClose: 3000,
21
21
  label: '',
22
- closeable: true,
22
+ closable: true,
23
23
  data: undefined,
24
24
  };
25
25
  const TUI_ALERT_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_ALERT_OPTIONS' : '', {
@@ -80,7 +80,7 @@ class TuiAlertComponent {
80
80
  return this.position.endsWith('auto') ? 'translateX(100%)' : 'translateX(-100%)';
81
81
  }
82
82
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "style.margin": "position", "style.--tui-from": "from" } }, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closeable]=\"item.closeable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closeable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{display:grid;inline-size:18rem;flex-shrink:0;word-break:break-word}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}:host:not(:first-child){margin-block-start:0!important}:host:not(:last-child){margin-block-end:0!important}.t-wrapper{transition-property:margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;margin-block-end:.75rem;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host.tui-leave .t-wrapper{margin:0}.t-closeable{padding-inline-end:2.5rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiNotification, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: ["appearance", "icon", "size"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
83
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" }, properties: { "style.margin": "position", "style.--tui-from": "from" } }, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{display:grid;inline-size:18rem;flex-shrink:0;word-break:break-word}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}:host:not(:first-child){margin-block-start:0!important}:host:not(:last-child){margin-block-end:0!important}.t-wrapper{transition-property:margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;margin-block-end:.75rem;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host.tui-leave .t-wrapper{margin:0}.t-closable{padding-inline-end:2.5rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiNotification, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: ["appearance", "icon", "size"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
84
84
  }
85
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, decorators: [{
86
86
  type: Component,
@@ -88,7 +88,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
88
88
  role: 'alert',
89
89
  '[style.margin]': 'position',
90
90
  '[style.--tui-from]': 'from',
91
- }, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closeable]=\"item.closeable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closeable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{display:grid;inline-size:18rem;flex-shrink:0;word-break:break-word}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}:host:not(:first-child){margin-block-start:0!important}:host:not(:last-child){margin-block-end:0!important}.t-wrapper{transition-property:margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;margin-block-end:.75rem;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host.tui-leave .t-wrapper{margin:0}.t-closeable{padding-inline-end:2.5rem}\n"] }]
91
+ }, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{display:grid;inline-size:18rem;flex-shrink:0;word-break:break-word}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}:host:not(:first-child){margin-block-start:0!important}:host:not(:last-child){margin-block-end:0!important}.t-wrapper{transition-property:margin;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;margin-block-end:.75rem;background:var(--tui-background-base);border-radius:var(--tui-radius-m);box-shadow:var(--tui-shadow-medium)}:host.tui-leave .t-wrapper{margin:0}.t-closable{padding-inline-end:2.5rem}\n"] }]
92
92
  }] });
93
93
 
94
94
  class TuiAlertService extends TuiPopoverService {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.tokens.ts","../../../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.directive.ts","../../../projects/core/components/alert/alerts.component.ts","../../../projects/core/components/alert/alerts.template.html","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken, type Type} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {BehaviorSubject, combineLatest, map, of} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closeable: true,\n data: undefined,\n};\n\nexport const TUI_ALERT_OPTIONS = new InjectionToken<TuiAlertOptions>(\n ngDevMode ? 'TUI_ALERT_OPTIONS' : '',\n {\n factory: () => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n }),\n },\n);\n\nexport const TUI_ALERT_POSITION = new InjectionToken<string>(\n ngDevMode ? 'TUI_ALERT_POSITION' : '',\n {\n factory: () => (inject(TUI_IS_MOBILE) ? '1rem 1rem 0 auto' : '2rem 3rem 0 auto'),\n },\n);\n\nexport const TUI_ALERTS = new InjectionToken(ngDevMode ? 'TUI_ALERTS' : '', {\n factory: () => new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n});\n\n/**\n * Grouping alerts by their component\n */\nexport const TUI_ALERTS_GROUPED = new InjectionToken(\n ngDevMode ? 'TUI_ALERTS_GROUPED' : '',\n {\n factory: () =>\n combineLatest([\n of(new Map<Type<any>, ReadonlyArray<TuiPopover<any, any>>>()),\n inject(TUI_ALERTS),\n ]).pipe(\n map(([map, alerts]) => {\n map.forEach((_, key) => map.set(key, []));\n\n alerts.forEach((alert) => {\n const key = alert.component.component;\n const value = map.get(key) || [];\n\n map.set(key, [...value, alert]);\n });\n\n return Array.from(map.values());\n }),\n ),\n },\n);\n\nexport function tuiAlertOptionsProvider(\n options: Partial<TuiAlertOptions>,\n): FactoryProvider {\n return {\n provide: TUI_ALERT_OPTIONS,\n useFactory: (): TuiAlertOptions => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...(inject(TUI_ALERT_OPTIONS, {optional: true, skipSelf: true}) ||\n inject(TUI_NOTIFICATION_OPTIONS)),\n ...options,\n }),\n };\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_POSITION} from './alert.tokens';\n\n@Component({\n selector: 'tui-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated],\n host: {\n role: 'alert',\n '[style.margin]': 'position',\n '[style.--tui-from]': 'from',\n },\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly position = inject(TUI_ALERT_POSITION);\n protected readonly item = injectContext<TuiPopover<TuiAlertOptions<I>, O>>();\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n\n public get from(): string {\n return this.position.endsWith('auto') ? 'translateX(100%)' : 'translateX(-100%)';\n }\n}\n","<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closeable]=\"item.closeable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closeable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_OPTIONS, TUI_ALERTS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiAlertService(TUI_ALERTS, TuiAlertComponent, inject(TUI_ALERT_OPTIONS)),\n})\nexport class TuiAlertService extends TuiPopoverService<TuiAlertOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiAlert]',\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n providers: [tuiAsPopover(TuiAlertService)],\n})\nexport class TuiAlert<T> extends TuiPopoverDirective<TuiAlertOptions<T>> {}\n","import {AsyncPipe, NgComponentOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n INJECTOR,\n Injector,\n type Type,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiAnimatedParent} from '@taiga-ui/cdk/directives/animated';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiMapper} from '@taiga-ui/cdk/types';\n// eslint-disable-next-line no-restricted-imports\nimport {POLYMORPHEUS_CONTEXT} from '@taiga-ui/polymorpheus';\nimport {identity} from 'rxjs';\n\nimport {TUI_ALERTS_GROUPED} from './alert.tokens';\n\n@Component({\n selector: 'tui-alerts',\n imports: [AsyncPipe, NgComponentOutlet, TuiAnimatedParent, TuiMapperPipe],\n templateUrl: './alerts.template.html',\n styleUrls: ['./alerts.style.less'],\n encapsulation: ViewEncapsulation.None,\n // So that we do not force OnPush on custom alerts\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiAlerts {\n private readonly injector = inject(INJECTOR);\n\n protected readonly alerts$ = inject(TUI_ALERTS_GROUPED);\n protected readonly trackBy = identity;\n protected readonly mapper: TuiMapper<[Type<any>], Injector> = (useValue) =>\n Injector.create({\n providers: [\n {\n provide: POLYMORPHEUS_CONTEXT,\n useValue,\n },\n ],\n parent: this.injector,\n });\n}\n","@for (group of alerts$ | async; track trackBy(group)) {\n <div\n tuiAnimatedParent\n class=\"t-wrapper\"\n >\n @for (item of group; track item) {\n <ng-container\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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":["../../../projects/core/components/alert/alert.tokens.ts","../../../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.directive.ts","../../../projects/core/components/alert/alerts.component.ts","../../../projects/core/components/alert/alerts.template.html","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken, type Type} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {BehaviorSubject, combineLatest, map, of} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closable: true,\n data: undefined,\n};\n\nexport const TUI_ALERT_OPTIONS = new InjectionToken<TuiAlertOptions>(\n ngDevMode ? 'TUI_ALERT_OPTIONS' : '',\n {\n factory: () => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n }),\n },\n);\n\nexport const TUI_ALERT_POSITION = new InjectionToken<string>(\n ngDevMode ? 'TUI_ALERT_POSITION' : '',\n {\n factory: () => (inject(TUI_IS_MOBILE) ? '1rem 1rem 0 auto' : '2rem 3rem 0 auto'),\n },\n);\n\nexport const TUI_ALERTS = new InjectionToken(ngDevMode ? 'TUI_ALERTS' : '', {\n factory: () => new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n});\n\n/**\n * Grouping alerts by their component\n */\nexport const TUI_ALERTS_GROUPED = new InjectionToken(\n ngDevMode ? 'TUI_ALERTS_GROUPED' : '',\n {\n factory: () =>\n combineLatest([\n of(new Map<Type<any>, ReadonlyArray<TuiPopover<any, any>>>()),\n inject(TUI_ALERTS),\n ]).pipe(\n map(([map, alerts]) => {\n map.forEach((_, key) => map.set(key, []));\n\n alerts.forEach((alert) => {\n const key = alert.component.component;\n const value = map.get(key) || [];\n\n map.set(key, [...value, alert]);\n });\n\n return Array.from(map.values());\n }),\n ),\n },\n);\n\nexport function tuiAlertOptionsProvider(\n options: Partial<TuiAlertOptions>,\n): FactoryProvider {\n return {\n provide: TUI_ALERT_OPTIONS,\n useFactory: (): TuiAlertOptions => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...(inject(TUI_ALERT_OPTIONS, {optional: true, skipSelf: true}) ||\n inject(TUI_NOTIFICATION_OPTIONS)),\n ...options,\n }),\n };\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_POSITION} from './alert.tokens';\n\n@Component({\n selector: 'tui-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated],\n host: {\n role: 'alert',\n '[style.margin]': 'position',\n '[style.--tui-from]': 'from',\n },\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly position = inject(TUI_ALERT_POSITION);\n protected readonly item = injectContext<TuiPopover<TuiAlertOptions<I>, O>>();\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n\n public get from(): string {\n return this.position.endsWith('auto') ? 'translateX(100%)' : 'translateX(-100%)';\n }\n}\n","<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_OPTIONS, TUI_ALERTS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiAlertService(TUI_ALERTS, TuiAlertComponent, inject(TUI_ALERT_OPTIONS)),\n})\nexport class TuiAlertService extends TuiPopoverService<TuiAlertOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiAlert]',\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n providers: [tuiAsPopover(TuiAlertService)],\n})\nexport class TuiAlert<T> extends TuiPopoverDirective<TuiAlertOptions<T>> {}\n","import {AsyncPipe, NgComponentOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n INJECTOR,\n Injector,\n type Type,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiAnimatedParent} from '@taiga-ui/cdk/directives/animated';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiMapper} from '@taiga-ui/cdk/types';\n// eslint-disable-next-line no-restricted-imports\nimport {POLYMORPHEUS_CONTEXT} from '@taiga-ui/polymorpheus';\nimport {identity} from 'rxjs';\n\nimport {TUI_ALERTS_GROUPED} from './alert.tokens';\n\n@Component({\n selector: 'tui-alerts',\n imports: [AsyncPipe, NgComponentOutlet, TuiAnimatedParent, TuiMapperPipe],\n templateUrl: './alerts.template.html',\n styleUrls: ['./alerts.style.less'],\n encapsulation: ViewEncapsulation.None,\n // So that we do not force OnPush on custom alerts\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiAlerts {\n private readonly injector = inject(INJECTOR);\n\n protected readonly alerts$ = inject(TUI_ALERTS_GROUPED);\n protected readonly trackBy = identity;\n protected readonly mapper: TuiMapper<[Type<any>], Injector> = (useValue) =>\n Injector.create({\n providers: [\n {\n provide: POLYMORPHEUS_CONTEXT,\n useValue,\n },\n ],\n parent: this.injector,\n });\n}\n","@for (group of alerts$ | async; track trackBy(group)) {\n <div\n tuiAnimatedParent\n class=\"t-wrapper\"\n >\n @for (item of group; track item) {\n <ng-container\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n />\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAQa,MAAA,yBAAyB,GAAiD;AACnF,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,IAAI,EAAE,SAAS;;AAGN,MAAA,iBAAiB,GAAG,IAAI,cAAc,CAC/C,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;AACI,IAAA,OAAO,EAAE,OAAO;AACZ,QAAA,GAAG,yBAAyB;QAC5B,GAAG,MAAM,CAAC,wBAAwB,CAAC;KACtC,CAAC;AACL,CAAA;AAGQ,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,OAAO,MAAM,CAAC,aAAa,CAAC,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AACnF,CAAA;AAGQ,MAAA,UAAU,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,YAAY,GAAG,EAAE,EAAE;IACxE,OAAO,EAAE,MAAM,IAAI,eAAe,CAAsC,EAAE,CAAC;AAC9E,CAAA;AAED;;AAEG;AACU,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,aAAa,CAAC;AACV,QAAA,EAAE,CAAC,IAAI,GAAG,EAAkD,CAAC;QAC7D,MAAM,CAAC,UAAU,CAAC;AACrB,KAAA,CAAC,CAAC,IAAI,CACH,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,KAAI;AAClB,QAAA,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAA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A,EAAA,MAAA,EAAA,CAAA,+QAAA,CAAA,EAAA;;;AE3BpD;;AAEG;;;;"}
@@ -428,7 +428,7 @@ class TuiCalendar {
428
428
  this.hoveredItemChange.emit(day);
429
429
  }
430
430
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
431
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", min: "min", max: "max", minViewedMonth: "minViewedMonth", maxViewedMonth: "maxViewedMonth", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", markerHandler: "markerHandler", value: "value", initialView: "initialView" }, outputs: { dayClick: "dayClick", monthChange: "monthChange", hoveredItemChange: "hoveredItemChange" }, host: { listeners: { "pointerdown.prevent.zoneless": "0" } }, providers: [tuiAsAuxiliary(TuiCalendar)], ngImport: i0, template: "@if (isInYearView) {\n <tui-scrollbar\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n >\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [rangeMode]=\"options.rangeMode\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n </tui-scrollbar>\n} @else {\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n}\n", styles: [":host{display:block;min-block-size:20.25rem;inline-size:18rem;padding:1rem 1.125rem;box-sizing:border-box;flex-shrink:0}:host-context(tui-dropdown-mobile){inline-size:100%}tui-calendar-year{padding:0}.t-scrollbar{block-size:18.25rem;inline-size:calc(100% + 1rem)}.t-pagination{margin-block-end:1rem}\n"], dependencies: [{ kind: "component", type: TuiCalendarSheet, selector: "tui-calendar-sheet", inputs: ["month", "disabledItemHandler", "markerHandler", "value", "hoveredItem", "showAdjacent", "single"], outputs: ["hoveredItemChange", "dayClick"] }, { kind: "component", type: TuiCalendarSpin, selector: "tui-calendar-spin", inputs: ["value", "min", "max"], outputs: ["valueChange", "yearClick"] }, { kind: "component", type: TuiCalendarYear, selector: "tui-calendar-year", inputs: ["rangeMode", "disabledItemHandler", "initialItem", "min", "max", "value"], outputs: ["yearClick"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
431
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", min: "min", max: "max", minViewedMonth: "minViewedMonth", maxViewedMonth: "maxViewedMonth", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", markerHandler: "markerHandler", value: "value", initialView: "initialView" }, outputs: { dayClick: "dayClick", monthChange: "monthChange", hoveredItemChange: "hoveredItemChange" }, host: { listeners: { "pointerdown.prevent.zoneless": "0" } }, providers: [tuiAsAuxiliary(TuiCalendar)], ngImport: i0, template: "@if (isInYearView) {\n <tui-scrollbar\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n >\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [rangeMode]=\"options.rangeMode\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n </tui-scrollbar>\n} @else {\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n}\n", styles: [":host{display:block;min-block-size:20.25rem;inline-size:18rem;padding:1rem 1.125rem;box-sizing:border-box;flex-shrink:0}:host-context(tui-sheet-dialog){inline-size:100%}tui-calendar-year{padding:0}.t-scrollbar{block-size:18.25rem;inline-size:calc(100% + 1rem)}.t-pagination{margin-block-end:1rem}\n"], dependencies: [{ kind: "component", type: TuiCalendarSheet, selector: "tui-calendar-sheet", inputs: ["month", "disabledItemHandler", "markerHandler", "value", "hoveredItem", "showAdjacent", "single"], outputs: ["hoveredItemChange", "dayClick"] }, { kind: "component", type: TuiCalendarSpin, selector: "tui-calendar-spin", inputs: ["value", "min", "max"], outputs: ["valueChange", "yearClick"] }, { kind: "component", type: TuiCalendarYear, selector: "tui-calendar-year", inputs: ["rangeMode", "disabledItemHandler", "initialItem", "min", "max", "value"], outputs: ["yearClick"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
432
432
  }
433
433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCalendar, decorators: [{
434
434
  type: Component,
@@ -440,7 +440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
440
440
  TuiScrollbar,
441
441
  ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiCalendar)], host: {
442
442
  '(pointerdown.prevent.zoneless)': '0',
443
- }, template: "@if (isInYearView) {\n <tui-scrollbar\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n >\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [rangeMode]=\"options.rangeMode\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n </tui-scrollbar>\n} @else {\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n}\n", styles: [":host{display:block;min-block-size:20.25rem;inline-size:18rem;padding:1rem 1.125rem;box-sizing:border-box;flex-shrink:0}:host-context(tui-dropdown-mobile){inline-size:100%}tui-calendar-year{padding:0}.t-scrollbar{block-size:18.25rem;inline-size:calc(100% + 1rem)}.t-pagination{margin-block-end:1rem}\n"] }]
443
+ }, template: "@if (isInYearView) {\n <tui-scrollbar\n automation-id=\"tui-calendar__scrollbar\"\n class=\"t-scrollbar\"\n >\n <tui-calendar-year\n automation-id=\"tui-calendar__year\"\n [initialItem]=\"month.year\"\n [max]=\"computedMax.year\"\n [min]=\"computedMin.year\"\n [rangeMode]=\"options.rangeMode\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n />\n </tui-scrollbar>\n} @else {\n <tui-calendar-spin\n automation-id=\"tui-calendar__pagination\"\n class=\"t-pagination\"\n [max]=\"computedMaxViewedMonth\"\n [min]=\"computedMinViewedMonth\"\n [value]=\"month\"\n (valueChange)=\"onPaginationValueChange($event)\"\n (yearClick)=\"onPaginationYearClick()\"\n />\n <tui-calendar-sheet\n automation-id=\"tui-calendar__calendar\"\n [disabledItemHandler]=\"disabledItemHandler | tuiMapper: disabledItemHandlerMapper : computedMin : computedMax\"\n [hoveredItem]=\"hoveredItem\"\n [markerHandler]=\"markerHandler\"\n [month]=\"month\"\n [showAdjacent]=\"showAdjacent\"\n [value]=\"value\"\n (dayClick)=\"onDayClick($event)\"\n (hoveredItemChange)=\"onHoveredItemChange($event)\"\n />\n}\n", styles: [":host{display:block;min-block-size:20.25rem;inline-size:18rem;padding:1rem 1.125rem;box-sizing:border-box;flex-shrink:0}:host-context(tui-sheet-dialog){inline-size:100%}tui-calendar-year{padding:0}.t-scrollbar{block-size:18.25rem;inline-size:calc(100% + 1rem)}.t-pagination{margin-block-end:1rem}\n"] }]
444
444
  }], propDecorators: { month: [{
445
445
  type: Input
446
446
  }], disabledItemHandler: [{