@taiga-ui/experimental 5.11.0 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/calendar/calendar.component.d.ts +2 -1
- package/components/date-picker/date-picker.component.d.ts +6 -12
- package/fesm2022/taiga-ui-experimental-components-calendar.mjs +6 -4
- package/fesm2022/taiga-ui-experimental-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-experimental-components-data-grid.mjs +4 -4
- package/fesm2022/taiga-ui-experimental-components-data-grid.mjs.map +1 -1
- package/fesm2022/taiga-ui-experimental-components-date-picker.mjs +61 -50
- package/fesm2022/taiga-ui-experimental-components-date-picker.mjs.map +1 -1
- package/fesm2022/taiga-ui-experimental-components-file.mjs +8 -8
- package/fesm2022/taiga-ui-experimental-components-popout.mjs +12 -12
- package/fesm2022/taiga-ui-experimental-components-search-results.mjs +9 -9
- package/package.json +10 -10
|
@@ -9,6 +9,7 @@ export declare class TuiCalendar {
|
|
|
9
9
|
private readonly days;
|
|
10
10
|
protected readonly today: TuiDay;
|
|
11
11
|
protected readonly hovered: import("@angular/core").WritableSignal<TuiDay | null>;
|
|
12
|
+
protected readonly dayType: import("@taiga-ui/cdk/types").TuiHandler<TuiDay, string>;
|
|
12
13
|
protected readonly week: import("@angular/core").Signal<string[]>;
|
|
13
14
|
readonly pick: import("@angular/core").OutputEmitterRef<TuiDay>;
|
|
14
15
|
readonly month: import("@angular/core").InputSignal<TuiMonth>;
|
|
@@ -16,5 +17,5 @@ export declare class TuiCalendar {
|
|
|
16
17
|
readonly disabledItemHandler: import("@angular/core").InputSignal<TuiBooleanHandler<TuiDay>>;
|
|
17
18
|
protected getRange(day: TuiDay): 'end' | 'middle' | 'single' | 'start' | null;
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiCalendar, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiCalendar, "tui-calendar", never, { "month": { "alias": "month"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; "isSignal": true; }; }, { "pick": "pick"; }, never, never, true, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TuiCalendar, "tui-calendar[new]", never, { "month": { "alias": "month"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; "isSignal": true; }; }, { "pick": "pick"; }, never, never, true, never>;
|
|
20
21
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { type TuiDay, TuiDayRange, TuiMonth } from '@taiga-ui/cdk/date-time';
|
|
2
|
-
import { type
|
|
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
|
-
import * as i0 from "@angular/core";
|
|
6
6
|
type DatePicker<T> = T extends 'single' ? TuiDay : T extends 'multi' ? readonly TuiDay[] : TuiDayRange;
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated: work in progress, do not use!
|
|
9
9
|
*/
|
|
10
|
-
export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'single'> {
|
|
10
|
+
export declare class TuiDatePicker<T extends 'multi' | 'range' | 'single' = 'single'> extends AbstractTuiCalendar<DatePicker<T>> {
|
|
11
11
|
protected readonly carousel: import("@angular/core").Signal<TuiCarouselComponent | undefined>;
|
|
12
12
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
13
13
|
protected readonly texts: import("@angular/core").Signal<readonly [previous: string, next: string]>;
|
|
14
14
|
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
|
|
15
|
+
protected readonly dropdown: import("@angular/core").ElementRef<Element> | null;
|
|
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,20 +24,13 @@ 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<"
|
|
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;
|
|
36
32
|
protected onYear(year: number): void;
|
|
37
33
|
protected onMonth(index: number): void;
|
|
38
34
|
protected onDay(day: TuiDay): void;
|
|
39
|
-
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>;
|
|
41
35
|
}
|
|
42
36
|
export {};
|
|
@@ -3,6 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { inject, signal, computed, output, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import { TuiDay, TuiMonth, TuiDayRange } from '@taiga-ui/cdk/date-time';
|
|
6
|
+
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
6
7
|
import { TUI_CALENDAR_OPTIONS, TuiCalendarSheetPipe } from '@taiga-ui/core/components/calendar';
|
|
7
8
|
import { TUI_SHORT_WEEK_DAYS } from '@taiga-ui/core/tokens';
|
|
8
9
|
|
|
@@ -15,6 +16,7 @@ class TuiCalendar {
|
|
|
15
16
|
this.days = inject(TUI_SHORT_WEEK_DAYS);
|
|
16
17
|
this.today = TuiDay.currentLocal();
|
|
17
18
|
this.hovered = signal(null);
|
|
19
|
+
this.dayType = inject(TUI_CALENDAR_OPTIONS).dayType;
|
|
18
20
|
this.week = computed((week = convert(this.days())) => [
|
|
19
21
|
...week.slice(this.options.weekStart()),
|
|
20
22
|
...week.slice(0, this.options.weekStart()),
|
|
@@ -44,12 +46,12 @@ class TuiCalendar {
|
|
|
44
46
|
}
|
|
45
47
|
return range.dayInRange(day) ? 'middle' : null;
|
|
46
48
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiCalendar, isStandalone: true, selector: "tui-calendar[new]", 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 tabindex=\"-1\"\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [attr.data-type]=\"day | tuiMapper: dayType\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_end]=\"$last\"\n [class.t-day_start]=\"$first\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n (pointerdown.prevent.zoneless)=\"(0)\"\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-body-m);grid-template:2rem / repeat(7,1fr);gap:.25rem 0;place-items:center;isolation:isolate}.t-day{position:relative;inline-size:100%;min-block-size:2rem;padding:0;border:0;background:transparent;font:inherit;color:var(--tui-text-primary);cursor:pointer;overflow:hidden}.t-day:before{content:\"\";position:absolute;inset:50%;z-index:-1;block-size:100%;min-inline-size:2rem;aspect-ratio:1;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_start{border-start-start-radius:var(--tui-radius-s);border-end-start-radius:var(--tui-radius-s)}.t-day_end{border-start-end-radius:var(--tui-radius-s);border-end-end-radius:var(--tui-radius-s)}.t-day[data-type~=weekend]{color:var(--tui-text-negative)}.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" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
49
51
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiCalendar, decorators: [{
|
|
51
53
|
type: Component,
|
|
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-
|
|
54
|
+
args: [{ selector: 'tui-calendar[new]', imports: [TuiCalendarSheetPipe, TuiMapperPipe], 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 tabindex=\"-1\"\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [attr.data-type]=\"day | tuiMapper: dayType\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_end]=\"$last\"\n [class.t-day_start]=\"$first\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n (pointerdown.prevent.zoneless)=\"(0)\"\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-body-m);grid-template:2rem / repeat(7,1fr);gap:.25rem 0;place-items:center;isolation:isolate}.t-day{position:relative;inline-size:100%;min-block-size:2rem;padding:0;border:0;background:transparent;font:inherit;color:var(--tui-text-primary);cursor:pointer;overflow:hidden}.t-day:before{content:\"\";position:absolute;inset:50%;z-index:-1;block-size:100%;min-inline-size:2rem;aspect-ratio:1;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_start{border-start-start-radius:var(--tui-radius-s);border-end-start-radius:var(--tui-radius-s)}.t-day_end{border-start-end-radius:var(--tui-radius-s);border-end-end-radius:var(--tui-radius-s)}.t-day[data-type~=weekend]{color:var(--tui-text-negative)}.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
55
|
}] });
|
|
54
56
|
function convert(week) {
|
|
55
57
|
return [week[week.length - 1] || '', ...week.slice(0, week.length - 1)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-calendar.mjs","sources":["../../../projects/experimental/components/calendar/calendar.component.ts","../../../projects/experimental/components/calendar/calendar.component.html","../../../projects/experimental/components/calendar/taiga-ui-experimental-components-calendar.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiDay, TuiDayRange, TuiMonth} from '@taiga-ui/cdk/date-time';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {\n TUI_CALENDAR_OPTIONS,\n TuiCalendarSheetPipe,\n} from '@taiga-ui/core/components/calendar';\nimport {TUI_SHORT_WEEK_DAYS} from '@taiga-ui/core/tokens';\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-calendar',\n imports: [TuiCalendarSheetPipe],\n templateUrl: './calendar.component.html',\n styleUrl: './calendar.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'(mouseleave)': 'hovered.set(null)'},\n})\nexport class TuiCalendar {\n private readonly options = inject(TUI_CALENDAR_OPTIONS);\n private readonly days = inject(TUI_SHORT_WEEK_DAYS);\n\n protected readonly today = TuiDay.currentLocal();\n protected readonly hovered = signal<TuiDay | null>(null);\n\n protected readonly week = computed((week = convert(this.days())) => [\n ...week.slice(this.options.weekStart()),\n ...week.slice(0, this.options.weekStart()),\n ]);\n\n public readonly pick = output<TuiDay>();\n public readonly month = input(TuiMonth.currentLocal());\n public readonly value = input<TuiDay | TuiDayRange | readonly TuiDay[] | null>(null);\n\n public readonly disabledItemHandler =\n input<TuiBooleanHandler<TuiDay>>(TUI_FALSE_HANDLER);\n\n protected getRange(day: TuiDay): 'end' | 'middle' | 'single' | 'start' | null {\n const value = this.value() || [];\n\n if (!(value instanceof TuiDayRange)) {\n return coerceArray(value).find((item) => day.daySame(item)) ? 'single' : null;\n }\n\n const hovered = this.hovered();\n\n const range =\n value.from === value.to && hovered\n ? TuiDayRange.sort(hovered, value.to)\n : value;\n\n if (range.isSingleDay && day.daySame(range.from)) {\n return 'single';\n }\n\n if (day.daySame(range.from)) {\n return 'start';\n }\n\n if (day.daySame(range.to)) {\n return 'end';\n }\n\n return range.dayInRange(day) ? 'middle' : null;\n }\n}\n\nfunction convert(week: readonly string[]): readonly string[] {\n return [week[week.length - 1] || '', ...week.slice(0, week.length - 1)];\n}\n","@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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-calendar.mjs","sources":["../../../projects/experimental/components/calendar/calendar.component.ts","../../../projects/experimental/components/calendar/calendar.component.html","../../../projects/experimental/components/calendar/taiga-ui-experimental-components-calendar.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiDay, TuiDayRange, TuiMonth} from '@taiga-ui/cdk/date-time';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {\n TUI_CALENDAR_OPTIONS,\n TuiCalendarSheetPipe,\n} from '@taiga-ui/core/components/calendar';\nimport {TUI_SHORT_WEEK_DAYS} from '@taiga-ui/core/tokens';\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-calendar[new]',\n imports: [TuiCalendarSheetPipe, TuiMapperPipe],\n templateUrl: './calendar.component.html',\n styleUrl: './calendar.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'(mouseleave)': 'hovered.set(null)'},\n})\nexport class TuiCalendar {\n private readonly options = inject(TUI_CALENDAR_OPTIONS);\n private readonly days = inject(TUI_SHORT_WEEK_DAYS);\n\n protected readonly today = TuiDay.currentLocal();\n protected readonly hovered = signal<TuiDay | null>(null);\n protected readonly dayType = inject(TUI_CALENDAR_OPTIONS).dayType;\n\n protected readonly week = computed((week = convert(this.days())) => [\n ...week.slice(this.options.weekStart()),\n ...week.slice(0, this.options.weekStart()),\n ]);\n\n public readonly pick = output<TuiDay>();\n public readonly month = input(TuiMonth.currentLocal());\n public readonly value = input<TuiDay | TuiDayRange | readonly TuiDay[] | null>(null);\n\n public readonly disabledItemHandler =\n input<TuiBooleanHandler<TuiDay>>(TUI_FALSE_HANDLER);\n\n protected getRange(day: TuiDay): 'end' | 'middle' | 'single' | 'start' | null {\n const value = this.value() || [];\n\n if (!(value instanceof TuiDayRange)) {\n return coerceArray(value).find((item) => day.daySame(item)) ? 'single' : null;\n }\n\n const hovered = this.hovered();\n\n const range =\n value.from === value.to && hovered\n ? TuiDayRange.sort(hovered, value.to)\n : value;\n\n if (range.isSingleDay && day.daySame(range.from)) {\n return 'single';\n }\n\n if (day.daySame(range.from)) {\n return 'start';\n }\n\n if (day.daySame(range.to)) {\n return 'end';\n }\n\n return range.dayInRange(day) ? 'middle' : null;\n }\n}\n\nfunction convert(week: readonly string[]): readonly string[] {\n return [week[week.length - 1] || '', ...week.slice(0, week.length - 1)];\n}\n","@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 tabindex=\"-1\"\n type=\"button\"\n class=\"t-day\"\n [attr.data-range]=\"getRange(day)\"\n [attr.data-type]=\"day | tuiMapper: dayType\"\n [class.t-day_adjacent]=\"day.month !== month().month\"\n [class.t-day_end]=\"$last\"\n [class.t-day_start]=\"$first\"\n [class.t-day_today]=\"day.daySame(today)\"\n [disabled]=\"disabledItemHandler()(day)\"\n (click)=\"pick.emit(day)\"\n (mouseenter)=\"hovered.set(day)\"\n (pointerdown.prevent.zoneless)=\"(0)\"\n >\n {{ day.day }}\n </button>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoBA;;AAEG;MASU,WAAW,CAAA;AARxB,IAAA,WAAA,GAAA;AASqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACtC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAEhC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,YAAY,EAAE;AAC7B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgB,IAAI,CAAC;AACrC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC,OAAO;AAE9C,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK;YAChE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;AACvC,YAAA,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;AAC7C,SAAA,CAAC;QAEc,IAAA,CAAA,IAAI,GAAG,MAAM,EAAU;QACvB,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;AACtC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK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,EAAA,CAAA,ioEAAA,CAAA,EAAA;;AAoD/C,SAAS,OAAO,CAAC,IAAuB,EAAA;IACpC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC3E;;AEnFA;;AAEG;;;;"}
|
|
@@ -15,12 +15,12 @@ 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.
|
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
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;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;block-size:2.5rem;min-inline-size:0;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
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDataGrid, decorators: [{
|
|
22
22
|
type: Component,
|
|
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"] }]
|
|
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;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;block-size:2.5rem;min-inline-size:0;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
|
}] });
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-data-grid.mjs","sources":["../../../projects/experimental/components/data-grid/data-grid.component.ts","../../../projects/experimental/components/data-grid/data-grid.component.html","../../../projects/experimental/components/data-grid/taiga-ui-experimental-components-data-grid.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {ChangeDetectionStrategy, Component, input, output} from '@angular/core';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {type TuiBooleanHandler, type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-data-grid',\n imports: [PolymorpheusOutlet],\n templateUrl: './data-grid.component.html',\n styleUrl: './data-grid.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiDataGrid<T> {\n public readonly pick = output<T>();\n public readonly items = input<readonly T[]>([]);\n public readonly content = input<PolymorpheusContent<TuiContext<T>>>();\n public readonly value = input([], {transform: coerceArray<T>});\n public readonly disabledItemHandler = input<TuiBooleanHandler<T>>(TUI_FALSE_HANDLER);\n}\n","@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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;AAEG;MAQU,WAAW,CAAA;AAPxB,IAAA,WAAA,GAAA;QAQoB,IAAA,CAAA,IAAI,GAAG,MAAM,EAAK;AAClB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE,CAAC;QAC/B,IAAA,CAAA,OAAO,GAAG,KAAK,EAAsC;AACrD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,EAAE,EAAE,EAAC,SAAS,GAAE,WAAc,CAAA,EAAC,CAAC;AAC9C,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAuB,iBAAiB,CAAC;AACvF,IAAA;+GANY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,mBAAA,EAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBxB,gbAaA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-data-grid.mjs","sources":["../../../projects/experimental/components/data-grid/data-grid.component.ts","../../../projects/experimental/components/data-grid/data-grid.component.html","../../../projects/experimental/components/data-grid/taiga-ui-experimental-components-data-grid.ts"],"sourcesContent":["import {coerceArray} from '@angular/cdk/coercion';\nimport {ChangeDetectionStrategy, Component, input, output} from '@angular/core';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {type TuiBooleanHandler, type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n/**\n * @deprecated: work in progress, do not use!\n */\n@Component({\n selector: 'tui-data-grid',\n imports: [PolymorpheusOutlet],\n templateUrl: './data-grid.component.html',\n styleUrl: './data-grid.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiDataGrid<T> {\n public readonly pick = output<T>();\n public readonly items = input<readonly T[]>([]);\n public readonly content = input<PolymorpheusContent<TuiContext<T>>>();\n public readonly value = input([], {transform: coerceArray<T>});\n public readonly disabledItemHandler = input<TuiBooleanHandler<T>>(TUI_FALSE_HANDLER);\n}\n","@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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;AAEG;MAQU,WAAW,CAAA;AAPxB,IAAA,WAAA,GAAA;QAQoB,IAAA,CAAA,IAAI,GAAG,MAAM,EAAK;AAClB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,EAAE,CAAC;QAC/B,IAAA,CAAA,OAAO,GAAG,KAAK,EAAsC;AACrD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,EAAE,EAAE,EAAC,SAAS,GAAE,WAAc,CAAA,EAAC,CAAC;AAC9C,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAuB,iBAAiB,CAAC;AACvF,IAAA;+GANY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,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A,EAAA,gbAAA,EAAA,MAAA,EAAA,CAAA,s1BAAA,CAAA,EAAA;;;AEdnD;;AAEG;;;;"}
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
1
2
|
import { coerceArray } from '@angular/cdk/coercion';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TuiDayRange, TuiMonth, TUI_FIRST_DAY, TUI_LAST_DAY } from '@taiga-ui/cdk/date-time';
|
|
3
|
+
import { viewChild, inject, computed, model, input, Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
4
|
+
import { FormsModule } from '@angular/forms';
|
|
5
|
+
import { TuiDayRange, TuiMonth } from '@taiga-ui/cdk/date-time';
|
|
6
6
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
7
|
+
import { tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
7
8
|
import { tuiArrayToggle } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
9
|
+
import { tuiButtonOptionsProvider, TuiButton } from '@taiga-ui/core/components/button';
|
|
10
|
+
import { AbstractTuiCalendar } from '@taiga-ui/core/components/calendar';
|
|
10
11
|
import { TuiCarouselComponent, TuiCarousel } from '@taiga-ui/core/components/carousel';
|
|
11
12
|
import { TuiLink } from '@taiga-ui/core/components/link';
|
|
12
|
-
import {
|
|
13
|
+
import { tuiTextfieldOptionsProvider } from '@taiga-ui/core/components/textfield';
|
|
14
|
+
import { TUI_DROPDOWN_HOST } from '@taiga-ui/core/portals/dropdown';
|
|
15
|
+
import { TUI_COMMON_ICONS, TUI_SPIN_TEXTS, TUI_MONTHS, tuiAsAuxiliary } from '@taiga-ui/core/tokens';
|
|
13
16
|
import { TuiCalendar } from '@taiga-ui/experimental/components/calendar';
|
|
14
17
|
import { TuiDataGrid } from '@taiga-ui/experimental/components/data-grid';
|
|
18
|
+
import { TuiInputDate } from '@taiga-ui/kit/components/input-date';
|
|
19
|
+
import { TuiInputDateMulti } from '@taiga-ui/kit/components/input-date-multi';
|
|
20
|
+
import { TuiInputDateRange } from '@taiga-ui/kit/components/input-date-range';
|
|
15
21
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
16
22
|
import { TuiSlides } from '@taiga-ui/layout/components/slides';
|
|
17
|
-
import * as i2 from '@taiga-ui/cdk/directives/item';
|
|
18
23
|
|
|
19
24
|
/**
|
|
20
25
|
* @deprecated: work in progress, do not use!
|
|
21
26
|
*/
|
|
22
|
-
class TuiDatePicker {
|
|
27
|
+
let TuiDatePicker = class TuiDatePicker extends AbstractTuiCalendar {
|
|
23
28
|
constructor() {
|
|
29
|
+
super(...arguments);
|
|
24
30
|
this.carousel = viewChild(TuiCarouselComponent);
|
|
25
31
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
26
32
|
this.texts = inject(TUI_SPIN_TEXTS);
|
|
27
33
|
this.i18n = inject(TUI_MONTHS);
|
|
28
|
-
this.
|
|
34
|
+
this.dropdown = inject(TUI_DROPDOWN_HOST, { optional: true });
|
|
35
|
+
this.content = computed(() => (c) => this.i18n()[c.$implicit]);
|
|
29
36
|
this.years = computed((value = this.value()) => value instanceof TuiDayRange
|
|
30
37
|
? Array.from({ length: value.to.year - value.from.year + 1 }, (_, index) => value.from.year + index)
|
|
31
38
|
: Array.from(new Set(coerceArray(value ?? []).map(({ year }) => year))));
|
|
32
39
|
this.months = computed((value = this.value()) => Array.from({ length: 12 }, (_, index) => index).filter((index) => value instanceof TuiDayRange
|
|
33
|
-
? value.monthInRange(new TuiMonth(this.
|
|
34
|
-
: coerceArray(value ?? []).some(({ month, year }) => this.
|
|
40
|
+
? value.monthInRange(new TuiMonth(this.month().year, index))
|
|
41
|
+
: coerceArray(value ?? []).some(({ month, year }) => this.month().year === year && index === month)));
|
|
35
42
|
this.button = computed(() => this.view() === 'day'
|
|
36
|
-
? `${this.i18n()[this.
|
|
37
|
-
: this.
|
|
38
|
-
this.yearMin = computed(() => Math.ceil((this.min().year - this.
|
|
39
|
-
this.yearMax = computed(() => Math.floor((this.max().year - this.
|
|
43
|
+
? `${this.i18n()[this.month().month]} ${this.month().formattedYear}`
|
|
44
|
+
: this.month().formattedYear);
|
|
45
|
+
this.yearMin = computed(() => Math.ceil((this.min().year - this.month().year - 5) / 12));
|
|
46
|
+
this.yearMax = computed(() => Math.floor((this.max().year - this.month().year + 6) / 12));
|
|
40
47
|
this.disabledDay = computed(() => (day) => day < this.min() || day > this.max() || this.disabledItemHandler()(day));
|
|
41
|
-
this.disabledMonth = computed(() => (month) => this.
|
|
42
|
-
this.
|
|
48
|
+
this.disabledMonth = computed(() => (month) => this.month().year * 12 + month < this.min().year * 12 + this.min().month ||
|
|
49
|
+
this.month().year * 12 + month > this.max().year * 12 + this.max().month);
|
|
43
50
|
this.disabledYear = computed(() => (year) => year < this.min().year || year > this.max().year);
|
|
44
51
|
this.start = computed((carousel = this.carousel()) => this.view() === 'month'
|
|
45
|
-
? this.
|
|
52
|
+
? this.month().year === this.min().year
|
|
46
53
|
: carousel?.index() === carousel?.min());
|
|
47
54
|
this.end = computed((carousel = this.carousel()) => this.view() === 'month'
|
|
48
|
-
? this.
|
|
55
|
+
? this.month().year === this.max().year
|
|
49
56
|
: carousel?.index() === carousel?.max());
|
|
50
57
|
this.view = model('day');
|
|
51
|
-
this.value = model(null);
|
|
52
|
-
this.current = model(TuiMonth.currentLocal());
|
|
53
58
|
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
59
|
}
|
|
62
60
|
getMonth(index) {
|
|
63
61
|
return new TuiMonth(Math.floor(index / 12), index % 12);
|
|
@@ -68,22 +66,22 @@ class TuiDatePicker {
|
|
|
68
66
|
onSpin(step) {
|
|
69
67
|
this.carousel()?.[step > 0 ? 'next' : 'prev']();
|
|
70
68
|
if (this.view() === 'month') {
|
|
71
|
-
this.
|
|
69
|
+
this.month.update((month) => month.append({ year: step }));
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
onYear(year) {
|
|
75
|
-
this.
|
|
73
|
+
this.month.update(({ month }) => new TuiMonth(year, month));
|
|
76
74
|
this.view.set('month');
|
|
77
75
|
}
|
|
78
76
|
onMonth(index) {
|
|
79
|
-
this.
|
|
77
|
+
this.month.update(({ year }) => new TuiMonth(year, index));
|
|
80
78
|
this.view.set('day');
|
|
81
79
|
}
|
|
82
80
|
onDay(day) {
|
|
83
|
-
if (day.monthAfter(this.
|
|
81
|
+
if (day.monthAfter(this.month())) {
|
|
84
82
|
this.carousel()?.next();
|
|
85
83
|
}
|
|
86
|
-
else if (day.monthBefore(this.
|
|
84
|
+
else if (day.monthBefore(this.month())) {
|
|
87
85
|
this.carousel()?.prev();
|
|
88
86
|
}
|
|
89
87
|
if (this.mode() === 'range') {
|
|
@@ -100,22 +98,35 @@ class TuiDatePicker {
|
|
|
100
98
|
this.value.set(day);
|
|
101
99
|
}
|
|
102
100
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
101
|
+
};
|
|
102
|
+
TuiDatePicker = __decorate([
|
|
103
|
+
Component({
|
|
104
|
+
selector: 'tui-date-picker',
|
|
105
|
+
imports: [
|
|
106
|
+
FormsModule,
|
|
107
|
+
TuiButton,
|
|
108
|
+
TuiCalendar,
|
|
109
|
+
TuiCarousel,
|
|
110
|
+
TuiChevron,
|
|
111
|
+
TuiDataGrid,
|
|
112
|
+
TuiInputDate,
|
|
113
|
+
TuiInputDateMulti,
|
|
114
|
+
TuiInputDateRange,
|
|
115
|
+
TuiLink,
|
|
116
|
+
TuiMapperPipe,
|
|
117
|
+
TuiSlides,
|
|
118
|
+
],
|
|
119
|
+
templateUrl: './date-picker.component.html',
|
|
120
|
+
styleUrl: './date-picker.component.less',
|
|
121
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
122
|
+
providers: [
|
|
123
|
+
tuiAsAuxiliary(TuiDatePicker),
|
|
124
|
+
tuiProvide(AbstractTuiCalendar, TuiDatePicker),
|
|
125
|
+
tuiButtonOptionsProvider({ size: 'xs', appearance: 'flat' }),
|
|
126
|
+
tuiTextfieldOptionsProvider({ size: signal('m'), cleaner: signal(false) }),
|
|
127
|
+
],
|
|
128
|
+
})
|
|
129
|
+
], TuiDatePicker);
|
|
119
130
|
|
|
120
131
|
/**
|
|
121
132
|
* Generated bundle index. Do not edit.
|
|
@@ -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,CA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ClB;wBACL,SAAS;wBACT,WAAW;wBACX,WAAW;wBACX,UAAU;wBACV,WAAW;wBACX,OAAO;wBACP,aAAa;wBACb,SAAS;AACZ,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,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/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 signal,\n viewChild,\n} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\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 {tuiProvide} from '@taiga-ui/cdk/utils/di';\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 {tuiTextfieldOptionsProvider} from '@taiga-ui/core/components/textfield';\nimport {TUI_DROPDOWN_HOST} from '@taiga-ui/core/portals/dropdown';\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 {TuiInputDate} from '@taiga-ui/kit/components/input-date';\nimport {TuiInputDateMulti} from '@taiga-ui/kit/components/input-date-multi';\nimport {TuiInputDateRange} from '@taiga-ui/kit/components/input-date-range';\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 FormsModule,\n TuiButton,\n TuiCalendar,\n TuiCarousel,\n TuiChevron,\n TuiDataGrid,\n TuiInputDate,\n TuiInputDateMulti,\n TuiInputDateRange,\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 tuiProvide(AbstractTuiCalendar, TuiDatePicker),\n tuiButtonOptionsProvider({size: 'xs', appearance: 'flat'}),\n tuiTextfieldOptionsProvider({size: signal('m'), cleaner: signal(false)}),\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 protected readonly dropdown = inject(TUI_DROPDOWN_HOST, {optional: true});\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4CA;;AAEG;AA2BI,IAAM,aAAa,GAAnB,MAAM,aAEX,SAAQ,mBAAkC,CAAA;AAFrC,IAAA,WAAA,GAAA;;AAGgB,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;QACzB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;QAEtD,IAAA,CAAA,OAAO,GAAG,QAAQ,CACjC,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;A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DeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
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.
|
|
43
|
+
`, isInline: true, styles: ["[data-tui-version=\"5.12.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 }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
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.24", 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.
|
|
68
|
+
}, styles: ["[data-tui-version=\"5.12.0\"]{@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.
|
|
84
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
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.
|
|
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
|
}] });
|
|
@@ -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.
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
123
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
139
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
151
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
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.
|
|
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.
|
|
71
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
86
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
135
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
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.
|
|
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.
|
|
3
|
+
"version": "5.12.0",
|
|
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.
|
|
34
|
-
"@taiga-ui/cdk": "5.
|
|
35
|
-
"@taiga-ui/core": "5.
|
|
36
|
-
"@taiga-ui/kit": "5.
|
|
37
|
-
"@taiga-ui/layout": "5.
|
|
33
|
+
"@taiga-ui/addon-commerce": "5.12.0",
|
|
34
|
+
"@taiga-ui/cdk": "5.12.0",
|
|
35
|
+
"@taiga-ui/core": "5.12.0",
|
|
36
|
+
"@taiga-ui/kit": "5.12.0",
|
|
37
|
+
"@taiga-ui/layout": "5.12.0",
|
|
38
38
|
"@taiga-ui/polymorpheus": "^5.0.1",
|
|
39
39
|
"rxjs": ">=7.0.0"
|
|
40
40
|
},
|
|
@@ -52,10 +52,6 @@
|
|
|
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"
|
|
@@ -64,6 +60,10 @@
|
|
|
64
60
|
"types": "./components/data-grid/index.d.ts",
|
|
65
61
|
"default": "./fesm2022/taiga-ui-experimental-components-data-grid.mjs"
|
|
66
62
|
},
|
|
63
|
+
"./components/date-picker": {
|
|
64
|
+
"types": "./components/date-picker/index.d.ts",
|
|
65
|
+
"default": "./fesm2022/taiga-ui-experimental-components-date-picker.mjs"
|
|
66
|
+
},
|
|
67
67
|
"./components/file": {
|
|
68
68
|
"types": "./components/file/index.d.ts",
|
|
69
69
|
"default": "./fesm2022/taiga-ui-experimental-components-file.mjs"
|