@taiga-ui/experimental 5.10.0 → 5.11.0-canary.8834a0e

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.
@@ -1,5 +1,6 @@
1
1
  import { type TuiDay, TuiDayRange, TuiMonth } from '@taiga-ui/cdk/date-time';
2
- import { type TuiBooleanHandler, type TuiContext } from '@taiga-ui/cdk/types';
2
+ import { type TuiContext } from '@taiga-ui/cdk/types';
3
+ import { AbstractTuiCalendar } from '@taiga-ui/core/components/calendar';
3
4
  import { TuiCarouselComponent } from '@taiga-ui/core/components/carousel';
4
5
  import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
5
6
  import * as i0 from "@angular/core";
@@ -7,12 +8,12 @@ type DatePicker<T> = T extends 'single' ? TuiDay : T extends 'multi' ? readonly
7
8
  /**
8
9
  * @deprecated: work in progress, do not use!
9
10
  */
10
- export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'single'> {
11
+ export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'single'> extends AbstractTuiCalendar<DatePicker<T>> {
11
12
  protected readonly carousel: import("@angular/core").Signal<TuiCarouselComponent | undefined>;
12
13
  protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
13
14
  protected readonly texts: import("@angular/core").Signal<readonly [previous: string, next: string]>;
14
15
  protected readonly i18n: import("@angular/core").Signal<readonly [January: string, February: string, March: string, April: string, May: string, June: string, July: string, August: string, September: string, October: string, November: string, December: string]>;
15
- protected readonly month: import("@angular/core").Signal<PolymorpheusContent<TuiContext<number>>>;
16
+ protected readonly content: import("@angular/core").Signal<PolymorpheusContent<TuiContext<number>>>;
16
17
  protected readonly years: import("@angular/core").Signal<number[]>;
17
18
  protected readonly months: import("@angular/core").Signal<number[]>;
18
19
  protected readonly button: import("@angular/core").Signal<string>;
@@ -23,13 +24,8 @@ export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'sin
23
24
  protected readonly disabledYear: import("@angular/core").Signal<(year: number) => boolean>;
24
25
  protected readonly start: import("@angular/core").Signal<boolean>;
25
26
  protected readonly end: import("@angular/core").Signal<boolean>;
26
- readonly view: import("@angular/core").ModelSignal<"year" | "month" | "day">;
27
- readonly value: import("@angular/core").ModelSignal<DatePicker<T> | null>;
28
- readonly current: import("@angular/core").ModelSignal<TuiMonth>;
27
+ readonly view: import("@angular/core").ModelSignal<"day" | "month" | "year">;
29
28
  readonly mode: import("@angular/core").InputSignal<T | undefined>;
30
- readonly disabledItemHandler: import("@angular/core").InputSignal<TuiBooleanHandler<TuiDay>>;
31
- readonly min: import("@angular/core").InputSignalWithTransform<TuiDay, TuiDay | null | undefined>;
32
- readonly max: import("@angular/core").InputSignalWithTransform<TuiDay, TuiDay | null | undefined>;
33
29
  protected getMonth(index: number): TuiMonth;
34
30
  protected getItems(initial: number): readonly number[];
35
31
  protected onSpin(step: number): void;
@@ -37,6 +33,6 @@ export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'sin
37
33
  protected onMonth(index: number): void;
38
34
  protected onDay(day: TuiDay): void;
39
35
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDatePicker<any>, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDatePicker<any>, "tui-date-picker", never, { "view": { "alias": "view"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "current": { "alias": "current"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "view": "viewChange"; "value": "valueChange"; "current": "currentChange"; }, never, never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiDatePicker<any>, "tui-date-picker", never, { "view": { "alias": "view"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "view": "viewChange"; }, never, never, true, never>;
41
37
  }
42
38
  export {};
@@ -44,10 +44,10 @@ class TuiCalendar {
44
44
  }
45
45
  return range.dayInRange(day) ? 'middle' : null;
46
46
  }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
48
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pick: "pick" }, host: { listeners: { "mouseleave": "hovered.set(null)" } }, ngImport: i0, template: "@for (day of week(); track $index) {\n <span>{{ day }}</span>\n}\n@for (week of month() | tuiCalendarSheet: true; track week) {\n @for (day of week; track day) {\n <button\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n >\n {{ day.day }}\n </button>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;color:var(--tui-text-secondary);font:var(--tui-typography-ui-s);grid-template:2rem / repeat(7,1fr);gap:.25rem 0;place-items:center;isolation:isolate}.t-day{position:relative;inline-size:100%;block-size:2rem;padding:0;border:0;background:transparent;font:var(--tui-typography-ui-m);color:var(--tui-text-primary);cursor:pointer;overflow:hidden}.t-day:before{content:\"\";position:absolute;inset:50%;z-index:-1;block-size:2rem;inline-size:2rem;border-radius:100%;transform:translate(calc(var(--tui-inline) * -50%),-50%)}.t-day:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-day_adjacent{opacity:var(--tui-disabled-opacity)}.t-day_today:after{content:\"\";position:absolute;inset-block-end:.25rem;inset-inline-start:50%;margin-inline-start:-.125rem;inline-size:.25rem;block-size:.25rem;border-radius:100%;background:var(--tui-background-accent-2)}.t-day[data-range=single],.t-day[data-range=start],.t-day[data-range=end]{color:var(--tui-text-primary-on-accent-2)}.t-day[data-range=single]:before,.t-day[data-range=start]:before,.t-day[data-range=end]:before{background:var(--tui-background-accent-2)}.t-day[data-range=single]:after,.t-day[data-range=start]:after,.t-day[data-range=end]:after{background:currentColor}.t-day[data-range=start]:before{box-shadow:calc(var(--tui-inline) * 11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=end]:before{box-shadow:calc(var(--tui-inline) * -11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=middle]:before{box-shadow:0 0 0 10rem var(--tui-background-neutral-1),inset 0 0 0 10rem var(--tui-background-neutral-1)}@media(hover:hover)and (pointer:fine){.t-day:hover:before{background:var(--tui-background-neutral-1-hover)}.t-day[data-range=single]:hover:before,.t-day[data-range=start]:hover:before,.t-day[data-range=end]:hover:before{background:var(--tui-background-accent-2-hover)}}\n"], dependencies: [{ kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
48
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiCalendar, isStandalone: true, selector: "tui-calendar", inputs: { month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pick: "pick" }, host: { listeners: { "mouseleave": "hovered.set(null)" } }, ngImport: i0, template: "@for (day of week(); track $index) {\n <span>{{ day }}</span>\n}\n@for (week of month() | tuiCalendarSheet: true; track week) {\n @for (day of week; track day) {\n <button\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n >\n {{ day.day }}\n </button>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;color:var(--tui-text-secondary);font:var(--tui-typography-ui-s);grid-template:2rem / repeat(7,1fr);gap:.25rem 0;place-items:center;isolation:isolate}.t-day{position:relative;inline-size:100%;block-size:2rem;padding:0;border:0;background:transparent;font:var(--tui-typography-ui-m);color:var(--tui-text-primary);cursor:pointer;overflow:hidden}.t-day:before{content:\"\";position:absolute;inset:50%;z-index:-1;block-size:2rem;inline-size:2rem;border-radius:100%;transform:translate(calc(var(--tui-inline) * -50%),-50%)}.t-day:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-day_adjacent{opacity:var(--tui-disabled-opacity)}.t-day_today:after{content:\"\";position:absolute;inset-block-end:.25rem;inset-inline-start:50%;margin-inline-start:-.125rem;inline-size:.25rem;block-size:.25rem;border-radius:100%;background:var(--tui-background-accent-2)}.t-day[data-range=single],.t-day[data-range=start],.t-day[data-range=end]{color:var(--tui-text-primary-on-accent-2)}.t-day[data-range=single]:before,.t-day[data-range=start]:before,.t-day[data-range=end]:before{background:var(--tui-background-accent-2)}.t-day[data-range=single]:after,.t-day[data-range=start]:after,.t-day[data-range=end]:after{background:currentColor}.t-day[data-range=start]:before{box-shadow:calc(var(--tui-inline) * 11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=end]:before{box-shadow:calc(var(--tui-inline) * -11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=middle]:before{box-shadow:0 0 0 10rem var(--tui-background-neutral-1),inset 0 0 0 10rem var(--tui-background-neutral-1)}@media(hover:hover)and (pointer:fine){.t-day:hover:before{background:var(--tui-background-neutral-1-hover)}.t-day[data-range=single]:hover:before,.t-day[data-range=start]:hover:before,.t-day[data-range=end]:hover:before{background:var(--tui-background-accent-2-hover)}}\n"], dependencies: [{ kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiCalendar, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiCalendar, decorators: [{
51
51
  type: Component,
52
52
  args: [{ selector: 'tui-calendar', imports: [TuiCalendarSheetPipe], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(mouseleave)': 'hovered.set(null)' }, template: "@for (day of week(); track $index) {\n <span>{{ day }}</span>\n}\n@for (week of month() | tuiCalendarSheet: true; track week) {\n @for (day of week; track day) {\n <button\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n >\n {{ day.day }}\n </button>\n }\n}\n", styles: [":host{display:grid;inline-size:100%;color:var(--tui-text-secondary);font:var(--tui-typography-ui-s);grid-template:2rem / repeat(7,1fr);gap:.25rem 0;place-items:center;isolation:isolate}.t-day{position:relative;inline-size:100%;block-size:2rem;padding:0;border:0;background:transparent;font:var(--tui-typography-ui-m);color:var(--tui-text-primary);cursor:pointer;overflow:hidden}.t-day:before{content:\"\";position:absolute;inset:50%;z-index:-1;block-size:2rem;inline-size:2rem;border-radius:100%;transform:translate(calc(var(--tui-inline) * -50%),-50%)}.t-day:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-day_adjacent{opacity:var(--tui-disabled-opacity)}.t-day_today:after{content:\"\";position:absolute;inset-block-end:.25rem;inset-inline-start:50%;margin-inline-start:-.125rem;inline-size:.25rem;block-size:.25rem;border-radius:100%;background:var(--tui-background-accent-2)}.t-day[data-range=single],.t-day[data-range=start],.t-day[data-range=end]{color:var(--tui-text-primary-on-accent-2)}.t-day[data-range=single]:before,.t-day[data-range=start]:before,.t-day[data-range=end]:before{background:var(--tui-background-accent-2)}.t-day[data-range=single]:after,.t-day[data-range=start]:after,.t-day[data-range=end]:after{background:currentColor}.t-day[data-range=start]:before{box-shadow:calc(var(--tui-inline) * 11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=end]:before{box-shadow:calc(var(--tui-inline) * -11rem) 0 0 10rem var(--tui-background-neutral-1)}.t-day[data-range=middle]:before{box-shadow:0 0 0 10rem var(--tui-background-neutral-1),inset 0 0 0 10rem var(--tui-background-neutral-1)}@media(hover:hover)and (pointer:fine){.t-day:hover:before{background:var(--tui-background-neutral-1-hover)}.t-day[data-range=single]:hover:before,.t-day[data-range=start]:hover:before,.t-day[data-range=end]:hover:before{background:var(--tui-background-accent-2-hover)}}\n"] }]
53
53
  }] });
@@ -15,10 +15,10 @@ class TuiDataGrid {
15
15
  this.value = input([], { transform: (coerceArray) });
16
16
  this.disabledItemHandler = input(TUI_FALSE_HANDLER);
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiDataGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TuiDataGrid, isStandalone: true, selector: "tui-data-grid", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pick: "pick" }, ngImport: i0, template: "@for (item of items(); track item) {\n <button\n type=\"button\"\n class=\"t-item\"\n [class.t-item_active]=\"value().includes(item)\"\n [disabled]=\"disabledItemHandler()(item)\"\n (click)=\"pick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || `${item}` as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n}\n", styles: [":host{display:grid;inline-size:100%;grid-template-columns:repeat(3,calc(33% - .625rem));gap:1rem .5rem;place-content:center}.t-item{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:block;block-size:2.5rem;border-radius:10rem;border:none;background:var(--tui-background-neutral-1);color:var(--tui-text-primary);font:var(--tui-typography-ui-s)}.t-item:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-item_active{background:var(--tui-background-accent-2);color:var(--tui-text-primary-on-accent-2)}@media(hover:hover)and (pointer:fine){.t-item:hover{background:var(--tui-background-neutral-1-hover);cursor:pointer}.t-item_active:hover{background:var(--tui-background-accent-2-hover)}}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDataGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiDataGrid, isStandalone: true, selector: "tui-data-grid", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pick: "pick" }, ngImport: i0, template: "@for (item of items(); track item) {\n <button\n type=\"button\"\n class=\"t-item\"\n [class.t-item_active]=\"value().includes(item)\"\n [disabled]=\"disabledItemHandler()(item)\"\n (click)=\"pick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || `${item}` as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n}\n", styles: [":host{display:grid;inline-size:100%;grid-template-columns:repeat(3,calc(33% - .625rem));gap:1rem .5rem;place-content:center}.t-item{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:block;block-size:2.5rem;border-radius:10rem;border:none;background:var(--tui-background-neutral-1);color:var(--tui-text-primary);font:var(--tui-typography-ui-s)}.t-item:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-item_active{background:var(--tui-background-accent-2);color:var(--tui-text-primary-on-accent-2)}@media(hover:hover)and (pointer:fine){.t-item:hover{background:var(--tui-background-neutral-1-hover);cursor:pointer}.t-item_active:hover{background:var(--tui-background-accent-2-hover)}}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiDataGrid, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDataGrid, decorators: [{
22
22
  type: Component,
23
23
  args: [{ selector: 'tui-data-grid', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (item of items(); track item) {\n <button\n type=\"button\"\n class=\"t-item\"\n [class.t-item_active]=\"value().includes(item)\"\n [disabled]=\"disabledItemHandler()(item)\"\n (click)=\"pick.emit(item)\"\n >\n <ng-container *polymorpheusOutlet=\"content() || `${item}` as text; context: {$implicit: item}\">\n {{ text }}\n </ng-container>\n </button>\n}\n", styles: [":host{display:grid;inline-size:100%;grid-template-columns:repeat(3,calc(33% - .625rem));gap:1rem .5rem;place-content:center}.t-item{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:block;block-size:2.5rem;border-radius:10rem;border:none;background:var(--tui-background-neutral-1);color:var(--tui-text-primary);font:var(--tui-typography-ui-s)}.t-item:disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-item_active{background:var(--tui-background-accent-2);color:var(--tui-text-primary-on-accent-2)}@media(hover:hover)and (pointer:fine){.t-item:hover{background:var(--tui-background-neutral-1-hover);cursor:pointer}.t-item_active:hover{background:var(--tui-background-accent-2-hover)}}\n"] }]
24
24
  }] });
@@ -1,15 +1,15 @@
1
1
  import { coerceArray } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
3
  import { viewChild, inject, computed, model, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
5
- import { TuiDayRange, TuiMonth, TUI_FIRST_DAY, TUI_LAST_DAY } from '@taiga-ui/cdk/date-time';
4
+ import { TuiDayRange, TuiMonth } from '@taiga-ui/cdk/date-time';
6
5
  import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
7
6
  import { tuiArrayToggle } from '@taiga-ui/cdk/utils/miscellaneous';
8
7
  import { TuiButton, tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
8
+ import { AbstractTuiCalendar } from '@taiga-ui/core/components/calendar';
9
9
  import * as i1 from '@taiga-ui/core/components/carousel';
10
10
  import { TuiCarouselComponent, TuiCarousel } from '@taiga-ui/core/components/carousel';
11
11
  import { TuiLink } from '@taiga-ui/core/components/link';
12
- import { TUI_COMMON_ICONS, TUI_SPIN_TEXTS, TUI_MONTHS } from '@taiga-ui/core/tokens';
12
+ import { TUI_COMMON_ICONS, TUI_SPIN_TEXTS, TUI_MONTHS, tuiAsAuxiliary } from '@taiga-ui/core/tokens';
13
13
  import { TuiCalendar } from '@taiga-ui/experimental/components/calendar';
14
14
  import { TuiDataGrid } from '@taiga-ui/experimental/components/data-grid';
15
15
  import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
@@ -19,45 +19,37 @@ import * as i2 from '@taiga-ui/cdk/directives/item';
19
19
  /**
20
20
  * @deprecated: work in progress, do not use!
21
21
  */
22
- class TuiDatePicker {
22
+ class TuiDatePicker extends AbstractTuiCalendar {
23
23
  constructor() {
24
+ super(...arguments);
24
25
  this.carousel = viewChild(TuiCarouselComponent);
25
26
  this.icons = inject(TUI_COMMON_ICONS);
26
27
  this.texts = inject(TUI_SPIN_TEXTS);
27
28
  this.i18n = inject(TUI_MONTHS);
28
- this.month = computed(() => (c) => this.i18n()[c.$implicit]);
29
+ this.content = computed(() => (c) => this.i18n()[c.$implicit]);
29
30
  this.years = computed((value = this.value()) => value instanceof TuiDayRange
30
31
  ? Array.from({ length: value.to.year - value.from.year + 1 }, (_, index) => value.from.year + index)
31
32
  : Array.from(new Set(coerceArray(value ?? []).map(({ year }) => year))));
32
33
  this.months = computed((value = this.value()) => Array.from({ length: 12 }, (_, index) => index).filter((index) => value instanceof TuiDayRange
33
- ? value.monthInRange(new TuiMonth(this.current().year, index))
34
- : coerceArray(value ?? []).some(({ month, year }) => this.current().year === year && index === month)));
34
+ ? value.monthInRange(new TuiMonth(this.month().year, index))
35
+ : coerceArray(value ?? []).some(({ month, year }) => this.month().year === year && index === month)));
35
36
  this.button = computed(() => this.view() === 'day'
36
- ? `${this.i18n()[this.current().month]} ${this.current().formattedYear}`
37
- : this.current().formattedYear);
38
- this.yearMin = computed(() => Math.ceil((this.min().year - this.current().year - 5) / 12));
39
- this.yearMax = computed(() => Math.floor((this.max().year - this.current().year + 6) / 12));
37
+ ? `${this.i18n()[this.month().month]} ${this.month().formattedYear}`
38
+ : this.month().formattedYear);
39
+ this.yearMin = computed(() => Math.ceil((this.min().year - this.month().year - 5) / 12));
40
+ this.yearMax = computed(() => Math.floor((this.max().year - this.month().year + 6) / 12));
40
41
  this.disabledDay = computed(() => (day) => day < this.min() || day > this.max() || this.disabledItemHandler()(day));
41
- this.disabledMonth = computed(() => (month) => this.current().year * 12 + month < this.min().year * 12 + this.min().month ||
42
- this.current().year * 12 + month > this.max().year * 12 + this.max().month);
42
+ this.disabledMonth = computed(() => (month) => this.month().year * 12 + month < this.min().year * 12 + this.min().month ||
43
+ this.month().year * 12 + month > this.max().year * 12 + this.max().month);
43
44
  this.disabledYear = computed(() => (year) => year < this.min().year || year > this.max().year);
44
45
  this.start = computed((carousel = this.carousel()) => this.view() === 'month'
45
- ? this.current().year === this.min().year
46
+ ? this.month().year === this.min().year
46
47
  : carousel?.index() === carousel?.min());
47
48
  this.end = computed((carousel = this.carousel()) => this.view() === 'month'
48
- ? this.current().year === this.max().year
49
+ ? this.month().year === this.max().year
49
50
  : carousel?.index() === carousel?.max());
50
51
  this.view = model('day');
51
- this.value = model(null);
52
- this.current = model(TuiMonth.currentLocal());
53
52
  this.mode = input();
54
- this.disabledItemHandler = input(TUI_FALSE_HANDLER);
55
- this.min = input(TUI_FIRST_DAY, {
56
- transform: (min) => min ?? TUI_FIRST_DAY,
57
- });
58
- this.max = input(TUI_LAST_DAY, {
59
- transform: (max) => max ?? TUI_LAST_DAY,
60
- });
61
53
  }
62
54
  getMonth(index) {
63
55
  return new TuiMonth(Math.floor(index / 12), index % 12);
@@ -68,22 +60,22 @@ class TuiDatePicker {
68
60
  onSpin(step) {
69
61
  this.carousel()?.[step > 0 ? 'next' : 'prev']();
70
62
  if (this.view() === 'month') {
71
- this.current.update((current) => current.append({ year: step }));
63
+ this.month.update((month) => month.append({ year: step }));
72
64
  }
73
65
  }
74
66
  onYear(year) {
75
- this.current.update(({ month }) => new TuiMonth(year, month));
67
+ this.month.update(({ month }) => new TuiMonth(year, month));
76
68
  this.view.set('month');
77
69
  }
78
70
  onMonth(index) {
79
- this.current.update(({ year }) => new TuiMonth(year, index));
71
+ this.month.update(({ year }) => new TuiMonth(year, index));
80
72
  this.view.set('day');
81
73
  }
82
74
  onDay(day) {
83
- if (day.monthAfter(this.current())) {
75
+ if (day.monthAfter(this.month())) {
84
76
  this.carousel()?.next();
85
77
  }
86
- else if (day.monthBefore(this.current())) {
78
+ else if (day.monthBefore(this.month())) {
87
79
  this.carousel()?.prev();
88
80
  }
89
81
  if (this.mode() === 'range') {
@@ -100,10 +92,13 @@ class TuiDatePicker {
100
92
  this.value.set(day);
101
93
  }
102
94
  }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TuiDatePicker, isStandalone: true, selector: "tui-date-picker", inputs: { view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange", value: "valueChange", current: "currentChange" }, providers: [tuiButtonOptionsProvider({ size: 'xs', appearance: 'flat' })], viewQueries: [{ propertyName: "carousel", first: true, predicate: TuiCarouselComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"current().year * 12 + current().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"current.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"month()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"current().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n", styles: [":host{display:block;min-inline-size:17.5rem}.t-header{display:flex;gap:.25rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem 1rem}.t-button{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-typography-ui-l);font-weight:700;text-decoration:none;margin-inline-end:auto}@media(hover:hover)and (pointer:fine){.t-button:hover{opacity:var(--tui-disabled-opacity)}}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiCalendar, selector: "tui-calendar", inputs: ["month", "value", "disabledItemHandler"], outputs: ["pick"] }, { kind: "component", type: i1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["index", "min", "max"], outputs: ["indexChange"] }, { kind: "directive", type: i2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: TuiDataGrid, selector: "tui-data-grid", inputs: ["items", "content", "value", "disabledItemHandler"], outputs: ["pick"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: TuiSlides, selector: "[tuiSlides]", inputs: ["tuiSlides"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
95
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDatePicker, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
96
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiDatePicker, isStandalone: true, selector: "tui-date-picker", inputs: { view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange" }, providers: [
97
+ tuiAsAuxiliary(TuiDatePicker),
98
+ tuiButtonOptionsProvider({ size: 'xs', appearance: 'flat' }),
99
+ ], viewQueries: [{ propertyName: "carousel", first: true, predicate: TuiCarouselComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"month().year * 12 + month().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"month.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"content()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"month().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n", styles: [":host{display:block;min-inline-size:17.5rem}.t-header{display:flex;gap:.25rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem 1rem}.t-button{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-typography-ui-l);font-weight:700;text-decoration:none;margin-inline-end:auto}@media(hover:hover)and (pointer:fine){.t-button:hover{opacity:var(--tui-disabled-opacity)}}\n"], dependencies: [{ kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "component", type: TuiCalendar, selector: "tui-calendar", inputs: ["month", "value", "disabledItemHandler"], outputs: ["pick"] }, { kind: "component", type: i1.TuiCarouselComponent, selector: "tui-carousel", inputs: ["index", "min", "max"], outputs: ["indexChange"] }, { kind: "directive", type: i2.TuiItem, selector: "[tuiItem]" }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: TuiDataGrid, selector: "tui-data-grid", inputs: ["items", "content", "value", "disabledItemHandler"], outputs: ["pick"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "directive", type: TuiSlides, selector: "[tuiSlides]", inputs: ["tuiSlides"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
105
100
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiDatePicker, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDatePicker, decorators: [{
107
102
  type: Component,
108
103
  args: [{ selector: 'tui-date-picker', imports: [
109
104
  TuiButton,
@@ -114,7 +109,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
114
109
  TuiLink,
115
110
  TuiMapperPipe,
116
111
  TuiSlides,
117
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiButtonOptionsProvider({ size: 'xs', appearance: 'flat' })], template: "<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"current().year * 12 + current().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"current.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"month()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"current().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n", styles: [":host{display:block;min-inline-size:17.5rem}.t-header{display:flex;gap:.25rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem 1rem}.t-button{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-typography-ui-l);font-weight:700;text-decoration:none;margin-inline-end:auto}@media(hover:hover)and (pointer:fine){.t-button:hover{opacity:var(--tui-disabled-opacity)}}\n"] }]
112
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
113
+ tuiAsAuxiliary(TuiDatePicker),
114
+ tuiButtonOptionsProvider({ size: 'xs', appearance: 'flat' }),
115
+ ], template: "<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"month().year * 12 + month().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"month.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"content()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"month().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n", styles: [":host{display:block;min-inline-size:17.5rem}.t-header{display:flex;gap:.25rem;align-items:center;justify-content:flex-end;padding:.5rem .75rem 1rem}.t-button{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-typography-ui-l);font-weight:700;text-decoration:none;margin-inline-end:auto}@media(hover:hover)and (pointer:fine){.t-button:hover{opacity:var(--tui-disabled-opacity)}}\n"] }]
118
116
  }] });
119
117
 
120
118
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-date-picker.mjs","sources":["../../../projects/experimental/components/date-picker/date-picker.component.ts","../../../projects/experimental/components/date-picker/date-picker.component.html","../../../projects/experimental/components/date-picker/taiga-ui-experimental-components-date-picker.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n type TuiDay,\n TuiDayRange,\n TuiMonth,\n} from '@taiga-ui/cdk/date-time';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiBooleanHandler, type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiArrayToggle} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiCarousel, TuiCarouselComponent} from '@taiga-ui/core/components/carousel';\nimport {TuiLink} from '@taiga-ui/core/components/link';\nimport {TUI_COMMON_ICONS, TUI_MONTHS, TUI_SPIN_TEXTS} from '@taiga-ui/core/tokens';\nimport {TuiCalendar} from '@taiga-ui/experimental/components/calendar';\nimport {TuiDataGrid} from '@taiga-ui/experimental/components/data-grid';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {TuiSlides} from '@taiga-ui/layout/components/slides';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\ntype DatePicker<T> = T extends 'single'\n ? TuiDay\n : T extends 'multi'\n ? readonly TuiDay[]\n : TuiDayRange;\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-date-picker',\n imports: [\n TuiButton,\n TuiCalendar,\n TuiCarousel,\n TuiChevron,\n TuiDataGrid,\n TuiLink,\n TuiMapperPipe,\n TuiSlides,\n ],\n templateUrl: './date-picker.component.html',\n styleUrl: './date-picker.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiButtonOptionsProvider({size: 'xs', appearance: 'flat'})],\n})\nexport class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'single'> {\n protected readonly carousel = viewChild(TuiCarouselComponent);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly texts = inject(TUI_SPIN_TEXTS);\n protected readonly i18n = inject(TUI_MONTHS);\n\n protected readonly month = computed<PolymorpheusContent<TuiContext<number>>>(\n () => (c) => this.i18n()[c.$implicit],\n );\n\n protected readonly years = computed((value = this.value()) =>\n value instanceof TuiDayRange\n ? Array.from(\n {length: value.to.year - value.from.year + 1},\n (_, index) => value.from.year + index,\n )\n : Array.from(new Set(coerceArray<TuiDay>(value ?? []).map(({year}) => year))),\n );\n\n protected readonly months = computed((value = this.value()) =>\n Array.from({length: 12}, (_, index) => index).filter((index) =>\n value instanceof TuiDayRange\n ? value.monthInRange(new TuiMonth(this.current().year, index))\n : coerceArray<TuiDay>(value ?? []).some(\n ({month, year}) => this.current().year === year && index === month,\n ),\n ),\n );\n\n protected readonly button = computed(() =>\n this.view() === 'day'\n ? `${this.i18n()[this.current().month]} ${this.current().formattedYear}`\n : this.current().formattedYear,\n );\n\n protected readonly yearMin = computed(() =>\n Math.ceil((this.min().year - this.current().year - 5) / 12),\n );\n\n protected readonly yearMax = computed(() =>\n Math.floor((this.max().year - this.current().year + 6) / 12),\n );\n\n protected readonly disabledDay = computed(\n () => (day: TuiDay) =>\n day < this.min() || day > this.max() || this.disabledItemHandler()(day),\n );\n\n protected readonly disabledMonth = computed(\n () => (month: number) =>\n this.current().year * 12 + month < this.min().year * 12 + this.min().month ||\n this.current().year * 12 + month > this.max().year * 12 + this.max().month,\n );\n\n protected readonly disabledYear = computed(\n () => (year: number) => year < this.min().year || year > this.max().year,\n );\n\n protected readonly start = computed((carousel = this.carousel()) =>\n this.view() === 'month'\n ? this.current().year === this.min().year\n : carousel?.index() === carousel?.min(),\n );\n\n protected readonly end = computed((carousel = this.carousel()) =>\n this.view() === 'month'\n ? this.current().year === this.max().year\n : carousel?.index() === carousel?.max(),\n );\n\n public readonly view = model<'day' | 'month' | 'year'>('day');\n public readonly value = model<DatePicker<T> | null>(null);\n public readonly current = model(TuiMonth.currentLocal());\n public readonly mode = input<T>();\n\n public readonly disabledItemHandler =\n input<TuiBooleanHandler<TuiDay>>(TUI_FALSE_HANDLER);\n\n public readonly min = input(TUI_FIRST_DAY, {\n transform: (min?: TuiDay | null) => min ?? TUI_FIRST_DAY,\n });\n\n public readonly max = input(TUI_LAST_DAY, {\n transform: (max?: TuiDay | null) => max ?? TUI_LAST_DAY,\n });\n\n protected getMonth(index: number): TuiMonth {\n return new TuiMonth(Math.floor(index / 12), index % 12);\n }\n\n protected getItems(initial: number): readonly number[] {\n return Array.from({length: 12}, (_, index) => initial + index);\n }\n\n protected onSpin(step: number): void {\n this.carousel()?.[step > 0 ? 'next' : 'prev']();\n\n if (this.view() === 'month') {\n this.current.update((current) => current.append({year: step}));\n }\n }\n\n protected onYear(year: number): void {\n this.current.update(({month}) => new TuiMonth(year, month));\n this.view.set('month');\n }\n\n protected onMonth(index: number): void {\n this.current.update(({year}) => new TuiMonth(year, index));\n this.view.set('day');\n }\n\n protected onDay(day: TuiDay): void {\n if (day.monthAfter(this.current())) {\n this.carousel()?.next();\n } else if (day.monthBefore(this.current())) {\n this.carousel()?.prev();\n }\n\n if (this.mode() === 'range') {\n this.value.update((value): any =>\n value instanceof TuiDayRange && value.from === value.to\n ? TuiDayRange.sort(value.to, day.append({}))\n : new TuiDayRange(day, day),\n );\n } else if (this.mode() === 'multi') {\n this.value.update((value): any =>\n Array.isArray(value)\n ? tuiArrayToggle(value, day, (a: TuiDay, b: TuiDay) => a.daySame(b))\n : [day],\n );\n } else {\n this.value.set(day as any);\n }\n }\n}\n","<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"current().year * 12 + current().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"current.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"month()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"current().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAqCA;;AAEG;MAkBU,aAAa,CAAA;AAjB1B,IAAA,WAAA,GAAA;AAkBuB,QAAA,IAAA,CAAA,QAAQ,GAAG,SAAS,CAAC,oBAAoB,CAAC;AAC1C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QAEzB,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC/B,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACxC;AAEkB,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACrD,KAAK,YAAY;AACb,cAAE,KAAK,CAAC,IAAI,CACN,EAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAC,EAC7C,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK;AAE3C,cAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,CAAS,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CACpF;AAEkB,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,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AAE,MAAM,EAAC,CAAC,CAAC,EAAA,QAAA,EAAA,m2EAAA,EAAA,MAAA,EAAA,CAAA,ycAAA,CAAA,EAAA;;;AEvD3E;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-date-picker.mjs","sources":["../../../projects/experimental/components/date-picker/date-picker.component.ts","../../../projects/experimental/components/date-picker/date-picker.component.html","../../../projects/experimental/components/date-picker/taiga-ui-experimental-components-date-picker.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport {type TuiDay, TuiDayRange, TuiMonth} from '@taiga-ui/cdk/date-time';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiArrayToggle} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {AbstractTuiCalendar} from '@taiga-ui/core/components/calendar';\nimport {TuiCarousel, TuiCarouselComponent} from '@taiga-ui/core/components/carousel';\nimport {TuiLink} from '@taiga-ui/core/components/link';\nimport {\n TUI_COMMON_ICONS,\n TUI_MONTHS,\n TUI_SPIN_TEXTS,\n tuiAsAuxiliary,\n} from '@taiga-ui/core/tokens';\nimport {TuiCalendar} from '@taiga-ui/experimental/components/calendar';\nimport {TuiDataGrid} from '@taiga-ui/experimental/components/data-grid';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {TuiSlides} from '@taiga-ui/layout/components/slides';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\ntype DatePicker<T> = T extends 'single'\n ? TuiDay\n : T extends 'multi'\n ? readonly TuiDay[]\n : TuiDayRange;\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-date-picker',\n imports: [\n TuiButton,\n TuiCalendar,\n TuiCarousel,\n TuiChevron,\n TuiDataGrid,\n TuiLink,\n TuiMapperPipe,\n TuiSlides,\n ],\n templateUrl: './date-picker.component.html',\n styleUrl: './date-picker.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsAuxiliary(TuiDatePicker),\n tuiButtonOptionsProvider({size: 'xs', appearance: 'flat'}),\n ],\n})\nexport class TuiDatePicker<\n T extends 'multi' | 'range' | 'single' = 'single',\n> extends AbstractTuiCalendar<DatePicker<T>> {\n protected readonly carousel = viewChild(TuiCarouselComponent);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly texts = inject(TUI_SPIN_TEXTS);\n protected readonly i18n = inject(TUI_MONTHS);\n\n protected readonly content = computed<PolymorpheusContent<TuiContext<number>>>(\n () => (c) => this.i18n()[c.$implicit],\n );\n\n protected readonly years = computed((value = this.value()) =>\n value instanceof TuiDayRange\n ? Array.from(\n {length: value.to.year - value.from.year + 1},\n (_, index) => value.from.year + index,\n )\n : Array.from(new Set(coerceArray<TuiDay>(value ?? []).map(({year}) => year))),\n );\n\n protected readonly months = computed((value = this.value()) =>\n Array.from({length: 12}, (_, index) => index).filter((index) =>\n value instanceof TuiDayRange\n ? value.monthInRange(new TuiMonth(this.month().year, index))\n : coerceArray<TuiDay>(value ?? []).some(\n ({month, year}) => this.month().year === year && index === month,\n ),\n ),\n );\n\n protected readonly button = computed(() =>\n this.view() === 'day'\n ? `${this.i18n()[this.month().month]} ${this.month().formattedYear}`\n : this.month().formattedYear,\n );\n\n protected readonly yearMin = computed(() =>\n Math.ceil((this.min().year - this.month().year - 5) / 12),\n );\n\n protected readonly yearMax = computed(() =>\n Math.floor((this.max().year - this.month().year + 6) / 12),\n );\n\n protected readonly disabledDay = computed(\n () => (day: TuiDay) =>\n day < this.min() || day > this.max() || this.disabledItemHandler()(day),\n );\n\n protected readonly disabledMonth = computed(\n () => (month: number) =>\n this.month().year * 12 + month < this.min().year * 12 + this.min().month ||\n this.month().year * 12 + month > this.max().year * 12 + this.max().month,\n );\n\n protected readonly disabledYear = computed(\n () => (year: number) => year < this.min().year || year > this.max().year,\n );\n\n protected readonly start = computed((carousel = this.carousel()) =>\n this.view() === 'month'\n ? this.month().year === this.min().year\n : carousel?.index() === carousel?.min(),\n );\n\n protected readonly end = computed((carousel = this.carousel()) =>\n this.view() === 'month'\n ? this.month().year === this.max().year\n : carousel?.index() === carousel?.max(),\n );\n\n public readonly view = model<'day' | 'month' | 'year'>('day');\n public readonly mode = input<T>();\n\n protected getMonth(index: number): TuiMonth {\n return new TuiMonth(Math.floor(index / 12), index % 12);\n }\n\n protected getItems(initial: number): readonly number[] {\n return Array.from({length: 12}, (_, index) => initial + index);\n }\n\n protected onSpin(step: number): void {\n this.carousel()?.[step > 0 ? 'next' : 'prev']();\n\n if (this.view() === 'month') {\n this.month.update((month) => month.append({year: step}));\n }\n }\n\n protected onYear(year: number): void {\n this.month.update(({month}) => new TuiMonth(year, month));\n this.view.set('month');\n }\n\n protected onMonth(index: number): void {\n this.month.update(({year}) => new TuiMonth(year, index));\n this.view.set('day');\n }\n\n protected onDay(day: TuiDay): void {\n if (day.monthAfter(this.month())) {\n this.carousel()?.next();\n } else if (day.monthBefore(this.month())) {\n this.carousel()?.prev();\n }\n\n if (this.mode() === 'range') {\n this.value.update((value): any =>\n value instanceof TuiDayRange && value.from === value.to\n ? TuiDayRange.sort(value.to, day.append({}))\n : new TuiDayRange(day, day),\n );\n } else if (this.mode() === 'multi') {\n this.value.update((value): any =>\n Array.isArray(value)\n ? tuiArrayToggle(value, day, (a: TuiDay, b: TuiDay) => a.daySame(b))\n : [day],\n );\n } else {\n this.value.set(day as any);\n }\n }\n}\n","<header class=\"t-header\">\n @if (view() !== 'year') {\n <button\n appearance=\"\"\n tuiChevron\n tuiLink\n type=\"button\"\n class=\"t-button\"\n [textContent]=\"button()\"\n (click)=\"view.set(view() === 'day' ? 'month' : 'year')\"\n ></button>\n }\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"start()\"\n [iconStart]=\"icons.decrement\"\n (click)=\"onSpin(-1)\"\n >\n {{ texts()[0] }}\n </button>\n <button\n tuiIconButton\n type=\"button\"\n class=\"t-chevron\"\n [disabled]=\"end()\"\n [iconStart]=\"icons.increment\"\n (click)=\"onSpin(1)\"\n >\n {{ texts()[1] }}\n </button>\n</header>\n<section tuiSlides>\n @switch (view()) {\n @case ('day') {\n <tui-carousel\n [index]=\"month().year * 12 + month().month\"\n [max]=\"max().year * 12 + max().month\"\n [min]=\"min().year * 12 + min().month\"\n (indexChange)=\"month.set(getMonth($event))\"\n >\n <tui-calendar\n *tuiItem=\"let index\"\n [disabledItemHandler]=\"disabledDay()\"\n [month]=\"index | tuiMapper: getMonth\"\n [value]=\"value()\"\n (pick)=\"onDay($event)\"\n />\n </tui-carousel>\n }\n\n @case ('month') {\n <tui-data-grid\n [content]=\"content()\"\n [disabledItemHandler]=\"disabledMonth()\"\n [items]=\"0 | tuiMapper: getItems\"\n [value]=\"months()\"\n (pick)=\"onMonth($event)\"\n />\n }\n\n @case ('year') {\n <tui-carousel\n [max]=\"yearMax()\"\n [min]=\"yearMin()\"\n >\n <tui-data-grid\n *tuiItem=\"let offset\"\n [disabledItemHandler]=\"disabledYear()\"\n [items]=\"month().year + offset * 12 - 6 | tuiMapper: getItems\"\n [value]=\"years()\"\n (pick)=\"onYear($event)\"\n />\n </tui-carousel>\n }\n }\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAoCA;;AAEG;AAqBG,MAAO,aAEX,SAAQ,mBAAkC,CAAA;AAtB5C,IAAA,WAAA,GAAA;;AAuBuB,QAAA,IAAA,CAAA,QAAQ,GAAG,SAAS,CAAC,oBAAoB,CAAC;AAC1C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA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OAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACX,OAAO,EAAA,QAAA,EAAA,6BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACP,aAAa,kDACb,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAUJ,aAAa,EAAA,UAAA,EAAA,CAAA;kBApBzB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACL,SAAS;wBACT,WAAW;wBACX,WAAW;wBACX,UAAU;wBACV,WAAW;wBACX,OAAO;wBACP,aAAa;wBACb,SAAS;qBACZ,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACP,wBAAA,cAAc,CAAA,aAAA,CAAe;wBAC7B,wBAAwB,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;AAC7D,qBAAA,EAAA,QAAA,EAAA,61EAAA,EAAA,MAAA,EAAA,CAAA,ycAAA,CAAA,EAAA;;;AEzDL;;AAEG;;;;"}
@@ -21,8 +21,8 @@ class TuiFile {
21
21
  constructor() {
22
22
  this.orientation = input(inject(TUI_FILE_OPTIONS_OPTIONS).orientation);
23
23
  }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.21", type: TuiFile, isStandalone: true, selector: "[tuiFile]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiFile": "" }, properties: { "attr.data-orientation": "orientation()" } }, providers: [
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFile, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiFile, isStandalone: true, selector: "[tuiFile]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiFile": "" }, properties: { "attr.data-orientation": "orientation()" } }, providers: [
26
26
  tuiCellOptionsProvider(() => ({ size: inject(TUI_FILE_OPTIONS_OPTIONS).size })),
27
27
  tuiAvatarOptionsProvider({ round: false, appearance: 'secondary-grayscale' }),
28
28
  tuiButtonOptionsProvider({ size: 's', appearance: 'action' }),
@@ -40,9 +40,9 @@ class TuiFile {
40
40
  <ng-content select="[tuiTitle]" />
41
41
  </label>
42
42
  <ng-content select="[tuiButtonX]" />
43
- `, isInline: true, styles: ["[data-tui-version=\"5.10.0\"]{@import \"./file.styles.less\";}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiSlides, selector: "[tuiSlides]", inputs: ["tuiSlides"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
43
+ `, isInline: true, styles: ["[data-tui-version=\"5.11.0-canary.8834a0e\"]{@import \"./file.styles.less\";}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiSlides, selector: "[tuiSlides]", inputs: ["tuiSlides"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
44
44
  }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFile, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFile, decorators: [{
46
46
  type: Component,
47
47
  args: [{ selector: '[tuiFile]', imports: [TuiAvatar, TuiSlides], template: `
48
48
  <label>
@@ -65,7 +65,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
65
65
  ], hostDirectives: [{ directive: TuiCell, inputs: ['tuiCell: size'] }], host: {
66
66
  tuiFile: '',
67
67
  '[attr.data-orientation]': 'orientation()',
68
- }, styles: ["[data-tui-version=\"5.10.0\"]{@import \"./file.styles.less\";}\n"] }]
68
+ }, styles: ["[data-tui-version=\"5.11.0-canary.8834a0e\"]{@import \"./file.styles.less\";}\n"] }]
69
69
  }] });
70
70
 
71
71
  class TuiFilePipe {
@@ -80,10 +80,10 @@ class TuiFilePipe {
80
80
  ngOnDestroy() {
81
81
  URL.revokeObjectURL(this.url);
82
82
  }
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFilePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
84
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.21", ngImport: i0, type: TuiFilePipe, isStandalone: true, name: "tuiFile" }); }
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFilePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
84
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: TuiFilePipe, isStandalone: true, name: "tuiFile" }); }
85
85
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiFilePipe, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiFilePipe, decorators: [{
87
87
  type: Pipe,
88
88
  args: [{ name: 'tuiFile' }]
89
89
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-experimental-components-file.mjs","sources":["../../../projects/experimental/components/file/file.options.ts","../../../projects/experimental/components/file/file.directive.ts","../../../projects/experimental/components/file/file.pipe.ts","../../../projects/experimental/components/file/taiga-ui-experimental-components-file.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiOrientation, type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiFileOptions {\n readonly size: TuiSizeL | TuiSizeS | '';\n readonly orientation: TuiOrientation;\n}\n\nexport const TUI_FILE_OPTIONS_DEFAULT_OPTIONS: TuiFileOptions = {\n size: 'l',\n orientation: 'vertical',\n};\n\nexport const [TUI_FILE_OPTIONS_OPTIONS, tuiFileOptionsProvider] = tuiCreateOptions(\n TUI_FILE_OPTIONS_DEFAULT_OPTIONS,\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiCell, tuiCellOptionsProvider} from '@taiga-ui/core/components/cell';\nimport {tuiLoaderOptionsProvider} from '@taiga-ui/core/components/loader';\nimport {tuiButtonXOptionsProvider} from '@taiga-ui/core/directives/button-x';\nimport {tuiHintOptionsProvider} from '@taiga-ui/core/portals/hint';\nimport {TuiAvatar, tuiAvatarOptionsProvider} from '@taiga-ui/kit/components/avatar';\nimport {TuiSlides} from '@taiga-ui/layout/components/slides';\n\nimport {TUI_FILE_OPTIONS_OPTIONS} from './file.options';\n\n@Component({\n selector: '[tuiFile]',\n imports: [TuiAvatar, TuiSlides],\n template: `\n <label>\n <span\n tuiSlides\n tuiAvatar\n >\n <ng-content />\n </span>\n <ng-content select=\"[tuiTitle]\" />\n </label>\n <ng-content select=\"[tuiButtonX]\" />\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './file.styles.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiCellOptionsProvider(() => ({size: inject(TUI_FILE_OPTIONS_OPTIONS).size})),\n tuiAvatarOptionsProvider({round: false, appearance: 'secondary-grayscale'}),\n tuiButtonOptionsProvider({size: 's', appearance: 'action'}),\n tuiButtonXOptionsProvider({size: 'xs', appearance: 'icon'}),\n tuiLoaderOptionsProvider({size: 'm', inheritColor: true}),\n tuiHintOptionsProvider({appearance: 'floating', direction: 'top'}),\n ],\n hostDirectives: [{directive: TuiCell, inputs: ['tuiCell: size']}],\n host: {\n tuiFile: '',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class TuiFile {\n public readonly orientation = input(inject(TUI_FILE_OPTIONS_OPTIONS).orientation);\n}\n","import {type OnDestroy, Pipe, type PipeTransform} from '@angular/core';\n\n@Pipe({name: 'tuiFile'})\nexport class TuiFilePipe implements PipeTransform, OnDestroy {\n private url = '';\n\n public transform(value: File): string {\n URL.revokeObjectURL(this.url);\n this.url = URL.createObjectURL(value);\n\n return this.url;\n }\n\n public ngOnDestroy(): void {\n URL.revokeObjectURL(this.url);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAQO,MAAM,gCAAgC,GAAmB;AAC5D,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,WAAW,EAAE,UAAU;;AAGpB,MAAM,CAAC,wBAAwB,EAAE,sBAAsB,CAAC,GAAG,gBAAgB,CAC9E,gCAAgC;;MCwCvB,OAAO,CAAA;AApCpB,IAAA,WAAA,GAAA;QAqCoB,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,WAAW,CAAC;AACpF,IAAA;+GAFY,OAAO,EAAA,IAAA,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S,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,eAAe,CAAC,EAAC,CAAC,EAAA,IAAA,EAC3D;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,yBAAyB,EAAE,eAAe;AAC7C,qBAAA,EAAA,MAAA,EAAA,CAAA,kEAAA,CAAA,EAAA;;;MCjDQ,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAEY,IAAA,CAAA,GAAG,GAAG,EAAE;AAYnB,IAAA;AAVU,IAAA,SAAS,CAAC,KAAW,EAAA;AACxB,QAAA,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC;QAErC,OAAO,IAAI,CAAC,GAAG;IACnB;IAEO,WAAW,GAAA;AACd,QAAA,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;IACjC;+GAZS,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;;ACFvB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-experimental-components-file.mjs","sources":["../../../projects/experimental/components/file/file.options.ts","../../../projects/experimental/components/file/file.directive.ts","../../../projects/experimental/components/file/file.pipe.ts","../../../projects/experimental/components/file/taiga-ui-experimental-components-file.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiOrientation, type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiFileOptions {\n readonly size: TuiSizeL | TuiSizeS | '';\n readonly orientation: TuiOrientation;\n}\n\nexport const TUI_FILE_OPTIONS_DEFAULT_OPTIONS: TuiFileOptions = {\n size: 'l',\n orientation: 'vertical',\n};\n\nexport const [TUI_FILE_OPTIONS_OPTIONS, tuiFileOptionsProvider] = tuiCreateOptions(\n TUI_FILE_OPTIONS_DEFAULT_OPTIONS,\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiCell, tuiCellOptionsProvider} from '@taiga-ui/core/components/cell';\nimport {tuiLoaderOptionsProvider} from '@taiga-ui/core/components/loader';\nimport {tuiButtonXOptionsProvider} from '@taiga-ui/core/directives/button-x';\nimport {tuiHintOptionsProvider} from '@taiga-ui/core/portals/hint';\nimport {TuiAvatar, tuiAvatarOptionsProvider} from '@taiga-ui/kit/components/avatar';\nimport {TuiSlides} from '@taiga-ui/layout/components/slides';\n\nimport {TUI_FILE_OPTIONS_OPTIONS} from './file.options';\n\n@Component({\n selector: '[tuiFile]',\n imports: [TuiAvatar, TuiSlides],\n template: `\n <label>\n <span\n tuiSlides\n tuiAvatar\n >\n <ng-content />\n </span>\n <ng-content select=\"[tuiTitle]\" />\n </label>\n <ng-content select=\"[tuiButtonX]\" />\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './file.styles.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiCellOptionsProvider(() => ({size: inject(TUI_FILE_OPTIONS_OPTIONS).size})),\n tuiAvatarOptionsProvider({round: false, appearance: 'secondary-grayscale'}),\n tuiButtonOptionsProvider({size: 's', appearance: 'action'}),\n tuiButtonXOptionsProvider({size: 'xs', appearance: 'icon'}),\n tuiLoaderOptionsProvider({size: 'm', inheritColor: true}),\n tuiHintOptionsProvider({appearance: 'floating', direction: 'top'}),\n ],\n hostDirectives: [{directive: TuiCell, inputs: ['tuiCell: size']}],\n host: {\n tuiFile: '',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class TuiFile {\n public readonly orientation = input(inject(TUI_FILE_OPTIONS_OPTIONS).orientation);\n}\n","import {type OnDestroy, Pipe, type PipeTransform} from '@angular/core';\n\n@Pipe({name: 'tuiFile'})\nexport class TuiFilePipe implements PipeTransform, OnDestroy {\n private url = '';\n\n public transform(value: File): string {\n URL.revokeObjectURL(this.url);\n this.url = URL.createObjectURL(value);\n\n return this.url;\n }\n\n public ngOnDestroy(): void {\n URL.revokeObjectURL(this.url);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAQO,MAAM,gCAAgC,GAAmB;AAC5D,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,WAAW,EAAE,UAAU;;AAGpB,MAAM,CAAC,wBAAwB,EAAE,sBAAsB,CAAC,GAAG,gBAAgB,CAC9E,gCAAgC;;MCwCvB,OAAO,CAAA;AApCpB,IAAA,WAAA,GAAA;QAqCoB,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,WAAW,CAAC;AACpF,IAAA;+GAFY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EA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AAK,CAAC;QAErC,OAAO,IAAI,CAAC,GAAG;IACnB;IAEO,WAAW,GAAA;AACd,QAAA,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;IACjC;+GAZS,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,EAAC;;;ACFvB;;AAEG;;;;"}
@@ -14,8 +14,8 @@ class TuiPopoutComponent {
14
14
  constructor() {
15
15
  this.context = injectContext();
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: TuiPopoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TuiPopoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
19
19
  <tui-root>
20
20
  <ng-container *polymorpheusOutlet="context.content as text; context: context">
21
21
  {{ text }}
@@ -23,7 +23,7 @@ class TuiPopoutComponent {
23
23
  </tui-root>
24
24
  `, isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
25
25
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopoutComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopoutComponent, decorators: [{
27
27
  type: Component,
28
28
  args: [{
29
29
  imports: [PolymorpheusOutlet, TuiRoot],
@@ -119,10 +119,10 @@ class PopoutComponent {
119
119
  throw error;
120
120
  });
121
121
  }
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: PopoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
123
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: PopoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PopoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
123
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: PopoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
124
124
  }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: PopoutComponent, decorators: [{
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PopoutComponent, decorators: [{
126
126
  type: Component,
127
127
  args: [{
128
128
  template: '',
@@ -135,10 +135,10 @@ class TuiPopoutService extends TuiPortal {
135
135
  this.component = PopoutComponent;
136
136
  this.options = { title: '', features: {}, pip: false };
137
137
  }
138
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
139
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopoutService, providedIn: 'root' }); }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
139
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopoutService, providedIn: 'root' }); }
140
140
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopoutService, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopoutService, decorators: [{
142
142
  type: Injectable,
143
143
  args: [{ providedIn: 'root' }]
144
144
  }], ctorParameters: () => [] });
@@ -147,10 +147,10 @@ class TuiPopout {
147
147
  constructor() {
148
148
  this.tuiPopoutOptions = input({});
149
149
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopout, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.21", type: TuiPopout, isStandalone: true, selector: "ng-template[tuiPopout]", inputs: { tuiPopoutOptions: { classPropertyName: "tuiPopoutOptions", publicName: "tuiPopoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsPortal(TuiPopoutService)], hostDirectives: [{ directive: i1.TuiPortalDirective, inputs: ["options", "tuiPopoutOptions", "open", "tuiPopout"], outputs: ["openChange", "tuiPopoutChange"] }], ngImport: i0 }); }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopout, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiPopout, isStandalone: true, selector: "ng-template[tuiPopout]", inputs: { tuiPopoutOptions: { classPropertyName: "tuiPopoutOptions", publicName: "tuiPopoutOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsPortal(TuiPopoutService)], hostDirectives: [{ directive: i1.TuiPortalDirective, inputs: ["options", "tuiPopoutOptions", "open", "tuiPopout"], outputs: ["openChange", "tuiPopoutChange"] }], ngImport: i0 }); }
152
152
  }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiPopout, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiPopout, decorators: [{
154
154
  type: Directive,
155
155
  args: [{
156
156
  selector: 'ng-template[tuiPopout]',
@@ -67,10 +67,10 @@ class TuiSearchHistory {
67
67
  get items() {
68
68
  return JSON.parse(this.storage?.getItem(this.options.key) || '[]');
69
69
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchHistory, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: { classPropertyName: "popular", publicName: "popular", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (history.length) {\n <label class=\"t-sr-label\">{{ i18n().history }}</label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular().length) {\n <label class=\"t-sr-label\">{{ i18n().popular }}</label>\n}\n@for (item of popular(); track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchHistory, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: { classPropertyName: "popular", publicName: "popular", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (history.length) {\n <label class=\"t-sr-label\">{{ i18n().history }}</label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular().length) {\n <label class=\"t-sr-label\">{{ i18n().popular }}</label>\n}\n@for (item of popular(); track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchHistory, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchHistory, decorators: [{
74
74
  type: Component,
75
75
  args: [{ selector: 'tui-search-history', imports: [TuiAvatar, TuiButton, TuiCell, TuiTitle], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (history.length) {\n <label class=\"t-sr-label\">{{ i18n().history }}</label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular().length) {\n <label class=\"t-sr-label\">{{ i18n().popular }}</label>\n}\n@for (item of popular(); track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"] }]
76
76
  }] });
@@ -82,10 +82,10 @@ class TuiSearchHotkey {
82
82
  this.search = inject(TuiInputSearch);
83
83
  this.placeholder = computed(({ hotkey } = this.texts()) => this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`);
84
84
  }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchHotkey, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
86
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: TuiSearchHotkey, isStandalone: true, selector: "input[tuiSearchHotkey]", host: { listeners: { "document:keydown.alt.k.stop": "search.open()", "document:keydown.meta.k.stop": "search.open()" }, properties: { "placeholder": "placeholder()" } }, ngImport: i0 }); }
85
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchHotkey, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
86
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TuiSearchHotkey, isStandalone: true, selector: "input[tuiSearchHotkey]", host: { listeners: { "document:keydown.alt.k.stop": "search.open()", "document:keydown.meta.k.stop": "search.open()" }, properties: { "placeholder": "placeholder()" } }, ngImport: i0 }); }
87
87
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchHotkey, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchHotkey, decorators: [{
89
89
  type: Directive,
90
90
  args: [{
91
91
  selector: 'input[tuiSearchHotkey]',
@@ -131,10 +131,10 @@ class TuiSearchResultsComponent {
131
131
  asIs() {
132
132
  return 0;
133
133
  }
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: { classPropertyName: "results", publicName: "results", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results()) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (empty()) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n().empty }}\n </tui-block-status>\n } @else {\n @let items = (results() | keyvalue: asIs) || [];\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group) {\n @if (!active || active === $index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template() || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n().all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:calc(100% - 2rem);padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-typography-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }, { kind: "directive", type: i2.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "directive", type: i2.TuiTabsHorizontal, selector: "tui-tabs:not([vertical])", inputs: ["underline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: { classPropertyName: "results", publicName: "results", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results()) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (empty()) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n().empty }}\n </tui-block-status>\n } @else {\n @let items = (results() | keyvalue: asIs) || [];\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group) {\n @if (!active || active === $index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template() || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n().all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:calc(100% - 2rem);padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-typography-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar" }, { kind: "directive", type: i2.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "directive", type: i2.TuiTabsHorizontal, selector: "tui-tabs:not([vertical])", inputs: ["underline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
136
136
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TuiSearchResultsComponent, decorators: [{
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSearchResultsComponent, decorators: [{
138
138
  type: Component,
139
139
  args: [{ selector: 'tui-search-results', imports: [
140
140
  KeyValuePipe,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/experimental",
3
- "version": "5.10.0",
3
+ "version": "5.11.0-canary.8834a0e",
4
4
  "description": "A package with Taiga UI experimental components",
5
5
  "keywords": [
6
6
  "angular",
@@ -30,11 +30,11 @@
30
30
  "peerDependencies": {
31
31
  "@angular/common": ">=19.0.0",
32
32
  "@angular/core": ">=19.0.0",
33
- "@taiga-ui/addon-commerce": "5.10.0",
34
- "@taiga-ui/cdk": "5.10.0",
35
- "@taiga-ui/core": "5.10.0",
36
- "@taiga-ui/kit": "5.10.0",
37
- "@taiga-ui/layout": "5.10.0",
33
+ "@taiga-ui/addon-commerce": "5.11.0",
34
+ "@taiga-ui/cdk": "5.11.0",
35
+ "@taiga-ui/core": "5.11.0",
36
+ "@taiga-ui/kit": "5.11.0",
37
+ "@taiga-ui/layout": "5.11.0",
38
38
  "@taiga-ui/polymorpheus": "^5.0.1",
39
39
  "rxjs": ">=7.0.0"
40
40
  },
@@ -52,14 +52,14 @@
52
52
  "types": "./components/index.d.ts",
53
53
  "default": "./fesm2022/taiga-ui-experimental-components.mjs"
54
54
  },
55
- "./components/date-picker": {
56
- "types": "./components/date-picker/index.d.ts",
57
- "default": "./fesm2022/taiga-ui-experimental-components-date-picker.mjs"
58
- },
59
55
  "./components/calendar": {
60
56
  "types": "./components/calendar/index.d.ts",
61
57
  "default": "./fesm2022/taiga-ui-experimental-components-calendar.mjs"
62
58
  },
59
+ "./components/date-picker": {
60
+ "types": "./components/date-picker/index.d.ts",
61
+ "default": "./fesm2022/taiga-ui-experimental-components-date-picker.mjs"
62
+ },
63
63
  "./components/data-grid": {
64
64
  "types": "./components/data-grid/index.d.ts",
65
65
  "default": "./fesm2022/taiga-ui-experimental-components-data-grid.mjs"