@taiga-ui/legacy 4.52.0-canary.05c3268 → 4.52.0-canary.0ec45da
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/dialog/dialog.component.d.ts +2 -2
- package/components/index.d.ts +0 -1
- package/components/input-date-range/input-date-range.module.d.ts +8 -9
- package/components/input-date-time/input-date-time.component.d.ts +4 -3
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
- package/components/multi-select/multi-select.module.d.ts +9 -10
- package/components/pdf-viewer/pdf-viewer.component.d.ts +1 -1
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs +4 -5
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +11 -15
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +4 -4
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +2 -2
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +10 -14
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +4 -5
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select.mjs +4 -4
- package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-tag.mjs +1 -1
- package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components.mjs +0 -1
- package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +1 -2
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-utils.mjs +1 -7
- package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
- package/package.json +5 -9
- package/utils/icons-path-factory.d.ts +1 -1
- package/utils/index.d.ts +0 -1
- package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
- package/components/combo-box/combo-box.component.d.ts +0 -52
- package/components/combo-box/combo-box.directive.d.ts +0 -13
- package/components/combo-box/combo-box.module.d.ts +0 -20
- package/components/combo-box/index.d.ts +0 -4
- package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -299
- package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
- package/utils/is-apple.d.ts +0 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type TuiPopover } from '@taiga-ui/cdk/services';
|
|
2
2
|
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
3
|
-
import {
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
4
|
import { type TuiDialogOptions, type TuiDialogSize } from './dialog.interfaces';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@taiga-ui/cdk/directives/animated";
|
|
7
7
|
export declare class TuiDialogComponent<O, I> {
|
|
8
8
|
protected readonly close$: Subject<void>;
|
|
9
9
|
protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
|
|
10
|
-
protected readonly closeWord
|
|
10
|
+
protected readonly closeWord: import("@angular/core").Signal<string>;
|
|
11
11
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
12
12
|
protected readonly from: import("@angular/core").Signal<"translateY(100vh)" | "translateY(2.5rem)">;
|
|
13
13
|
protected readonly isMobile: import("@angular/core").Signal<boolean | undefined>;
|
package/components/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '@taiga-ui/legacy/components/arrow';
|
|
2
|
-
export * from '@taiga-ui/legacy/components/combo-box';
|
|
3
2
|
export * from '@taiga-ui/legacy/components/dialog';
|
|
4
3
|
export * from '@taiga-ui/legacy/components/input';
|
|
5
4
|
export * from '@taiga-ui/legacy/components/input-date-range';
|
|
@@ -3,20 +3,19 @@ import * as i1 from "./input-date-range.component";
|
|
|
3
3
|
import * as i2 from "./input-date-range.directive";
|
|
4
4
|
import * as i3 from "@angular/common";
|
|
5
5
|
import * as i4 from "@maskito/angular";
|
|
6
|
-
import * as i5 from "@taiga-ui/
|
|
7
|
-
import * as i6 from "@taiga-ui/
|
|
8
|
-
import * as i7 from "@taiga-ui/legacy/
|
|
9
|
-
import * as i8 from "@taiga-ui/
|
|
10
|
-
import * as i9 from "@taiga-ui/
|
|
11
|
-
import * as i10 from "@taiga-ui/core/
|
|
12
|
-
import * as i11 from "@taiga-ui/core/directives/
|
|
13
|
-
import * as i12 from "@taiga-ui/core/directives/dropdown";
|
|
6
|
+
import * as i5 from "@taiga-ui/polymorpheus";
|
|
7
|
+
import * as i6 from "@taiga-ui/legacy/components/primitive-textfield";
|
|
8
|
+
import * as i7 from "@taiga-ui/legacy/directives";
|
|
9
|
+
import * as i8 from "@taiga-ui/kit/components/calendar-range";
|
|
10
|
+
import * as i9 from "@taiga-ui/core/components/icon";
|
|
11
|
+
import * as i10 from "@taiga-ui/core/directives/appearance";
|
|
12
|
+
import * as i11 from "@taiga-ui/core/directives/dropdown";
|
|
14
13
|
/**
|
|
15
14
|
* TODO(v5): delete it
|
|
16
15
|
* @deprecated use new version of {@link https://taiga-ui.dev/components/input-date-range TuiInputDateRange} (from @taiga-ui/kit) instead
|
|
17
16
|
*/
|
|
18
17
|
export declare class TuiInputDateRangeModule {
|
|
19
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputDateRangeModule, never>;
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiInputDateRangeModule, [typeof i1.TuiInputDateRangeComponent, typeof i2.TuiInputDateRangeDirective], [typeof i3.CommonModule, typeof i4.MaskitoDirective, typeof i5.
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiInputDateRangeModule, [typeof i1.TuiInputDateRangeComponent, typeof i2.TuiInputDateRangeDirective], [typeof i3.CommonModule, typeof i4.MaskitoDirective, typeof i5.PolymorpheusOutlet, typeof i5.PolymorpheusTemplate, typeof i6.TuiPrimitiveTextfieldModule, typeof i7.TuiTextfieldControllerModule, typeof i8.TuiCalendarRange, typeof i7.TuiValueAccessorModule, typeof i7.TuiLegacyDropdownOpenMonitorDirective, typeof i9.TuiIcon, typeof i10.TuiAppearance, typeof i11.TuiDropdownOptionsDirective, typeof i11.TuiDropdownDriverDirective, typeof i11.TuiDropdownDirective, typeof i11.TuiDropdownComponent, typeof i11.TuiDropdownOpen, typeof i11.TuiDropdownOpenLegacy, typeof i11.TuiDropdownManual, typeof i11.TuiDropdownHover, typeof i11.TuiDropdownContent, typeof i11.TuiDropdownContext, typeof i11.TuiDropdownPosition, typeof i11.TuiDropdownPositionSided, typeof i11.TuiDropdownSelection], [typeof i1.TuiInputDateRangeComponent, typeof i2.TuiInputDateRangeDirective, typeof i6.TuiTextfieldComponent, typeof i11.TuiDropdownOptionsDirective, typeof i11.TuiDropdownDriverDirective, typeof i11.TuiDropdownDirective, typeof i11.TuiDropdownComponent, typeof i11.TuiDropdownOpen, typeof i11.TuiDropdownOpenLegacy, typeof i11.TuiDropdownManual, typeof i11.TuiDropdownHover, typeof i11.TuiDropdownContent, typeof i11.TuiDropdownContext, typeof i11.TuiDropdownPosition, typeof i11.TuiDropdownPositionSided, typeof i11.TuiDropdownSelection]>;
|
|
21
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<TuiInputDateRangeModule>;
|
|
22
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type MaskitoOptions } from '@maskito/core';
|
|
2
|
+
import { type MaskitoTimeMode } from '@maskito/kit';
|
|
2
3
|
import { type TuiValueTransformer } from '@taiga-ui/cdk/classes';
|
|
3
|
-
import { type TuiDateMode, TuiDay, TuiMonth, TuiTime
|
|
4
|
+
import { type TuiDateMode, TuiDay, TuiMonth, TuiTime } from '@taiga-ui/cdk/date-time';
|
|
4
5
|
import { type TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
5
6
|
import { type TuiBooleanHandler, type TuiContext } from '@taiga-ui/cdk/types';
|
|
6
7
|
import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
|
|
@@ -49,8 +50,8 @@ export declare class TuiInputDateTimeComponent extends AbstractTuiControl<[TuiDa
|
|
|
49
50
|
disabledItemHandler: TuiBooleanHandler<TuiDay>;
|
|
50
51
|
defaultActiveYearMonth: TuiMonth;
|
|
51
52
|
open: boolean;
|
|
52
|
-
set timeMode(value:
|
|
53
|
-
get timeMode():
|
|
53
|
+
set timeMode(value: MaskitoTimeMode);
|
|
54
|
+
get timeMode(): MaskitoTimeMode;
|
|
54
55
|
get nativeFocusableElement(): HTMLInputElement | null;
|
|
55
56
|
get focused(): boolean;
|
|
56
57
|
get computedValue(): string;
|
|
@@ -4,7 +4,7 @@ export declare class TuiMultiSelectGroupComponent<T> {
|
|
|
4
4
|
private readonly options;
|
|
5
5
|
private readonly host;
|
|
6
6
|
private readonly control;
|
|
7
|
-
protected readonly multiSelectTexts
|
|
7
|
+
protected readonly multiSelectTexts: import("@angular/core").Signal<{
|
|
8
8
|
all: string;
|
|
9
9
|
none: string;
|
|
10
10
|
}>;
|
|
@@ -11,21 +11,20 @@ import * as i9 from "@angular/forms";
|
|
|
11
11
|
import * as i10 from "@taiga-ui/polymorpheus";
|
|
12
12
|
import * as i11 from "@taiga-ui/legacy/directives";
|
|
13
13
|
import * as i12 from "@taiga-ui/legacy/components/arrow";
|
|
14
|
-
import * as i13 from "@taiga-ui/
|
|
15
|
-
import * as i14 from "@taiga-ui/legacy/components/
|
|
16
|
-
import * as i15 from "@taiga-ui/
|
|
17
|
-
import * as i16 from "@taiga-ui/
|
|
18
|
-
import * as i17 from "@taiga-ui/
|
|
19
|
-
import * as i18 from "@taiga-ui/
|
|
20
|
-
import * as i19 from "@taiga-ui/core/
|
|
21
|
-
import * as i20 from "@taiga-ui/
|
|
22
|
-
import * as i21 from "@taiga-ui/kit/components/data-list-wrapper";
|
|
14
|
+
import * as i13 from "@taiga-ui/legacy/components/input-tag";
|
|
15
|
+
import * as i14 from "@taiga-ui/legacy/components/multi-select-option";
|
|
16
|
+
import * as i15 from "@taiga-ui/cdk/pipes/mapper";
|
|
17
|
+
import * as i16 from "@taiga-ui/core/components/link";
|
|
18
|
+
import * as i17 from "@taiga-ui/kit/pipes/stringify-content";
|
|
19
|
+
import * as i18 from "@taiga-ui/core/directives/dropdown";
|
|
20
|
+
import * as i19 from "@taiga-ui/core/components/data-list";
|
|
21
|
+
import * as i20 from "@taiga-ui/kit/components/data-list-wrapper";
|
|
23
22
|
/**
|
|
24
23
|
* TODO(v5): delete it
|
|
25
24
|
* @deprecated use new version of {@link https://taiga-ui.dev/components/input-chip TuiInputChip} (from @taiga-ui/kit) instead
|
|
26
25
|
*/
|
|
27
26
|
export declare class TuiMultiSelectModule {
|
|
28
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMultiSelectModule, never>;
|
|
29
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiMultiSelectModule, [typeof i1.TuiMultiSelectComponent, typeof i2.TuiMultiSelectGroupComponent, typeof i3.TuiMultiSelectGroupDirective, typeof i4.TuiHideSelectedPipe, typeof i5.TuiNativeMultiSelectComponent, typeof i6.TuiNativeMultiSelectGroupComponent, typeof i7.TuiMultiSelectDirective], [typeof i8.CommonModule, typeof i9.FormsModule, typeof i10.PolymorpheusOutlet, typeof i10.PolymorpheusTemplate, typeof i11.TuiWrapperModule, typeof i12.TuiArrowComponent, typeof i13.
|
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiMultiSelectModule, [typeof i1.TuiMultiSelectComponent, typeof i2.TuiMultiSelectGroupComponent, typeof i3.TuiMultiSelectGroupDirective, typeof i4.TuiHideSelectedPipe, typeof i5.TuiNativeMultiSelectComponent, typeof i6.TuiNativeMultiSelectGroupComponent, typeof i7.TuiMultiSelectDirective], [typeof i8.CommonModule, typeof i9.FormsModule, typeof i10.PolymorpheusOutlet, typeof i10.PolymorpheusTemplate, typeof i11.TuiWrapperModule, typeof i12.TuiArrowComponent, typeof i13.TuiInputTagModule, typeof i14.TuiMultiSelectOptionModule, typeof i15.TuiMapperPipe, typeof i16.TuiLink, typeof i11.TuiTextfieldControllerModule, typeof i17.TuiStringifyContentPipe, typeof i11.TuiLegacyDropdownOpenMonitorDirective, typeof i18.TuiDropdownOptionsDirective, typeof i18.TuiDropdownDriverDirective, typeof i18.TuiDropdownDirective, typeof i18.TuiDropdownComponent, typeof i18.TuiDropdownOpen, typeof i18.TuiDropdownOpenLegacy, typeof i18.TuiDropdownManual, typeof i18.TuiDropdownHover, typeof i18.TuiDropdownContent, typeof i18.TuiDropdownContext, typeof i18.TuiDropdownPosition, typeof i18.TuiDropdownPositionSided, typeof i18.TuiDropdownSelection, typeof i19.TuiDataListComponent, typeof i19.TuiDataListDirective, typeof i19.TuiOption, typeof i19.TuiOptionNew, typeof i19.TuiOptionWithValue, typeof i19.TuiOptGroup, typeof i20.TuiDataListWrapperComponent, typeof i20.TuiDataListGroupWrapperComponent, typeof i19.TuiDataListDirective], [typeof i1.TuiMultiSelectComponent, typeof i2.TuiMultiSelectGroupComponent, typeof i3.TuiMultiSelectGroupDirective, typeof i4.TuiHideSelectedPipe, typeof i7.TuiMultiSelectDirective, typeof i5.TuiNativeMultiSelectComponent, typeof i6.TuiNativeMultiSelectGroupComponent, typeof i18.TuiDropdownOptionsDirective, typeof i18.TuiDropdownDriverDirective, typeof i18.TuiDropdownDirective, typeof i18.TuiDropdownComponent, typeof i18.TuiDropdownOpen, typeof i18.TuiDropdownOpenLegacy, typeof i18.TuiDropdownManual, typeof i18.TuiDropdownHover, typeof i18.TuiDropdownContent, typeof i18.TuiDropdownContext, typeof i18.TuiDropdownPosition, typeof i18.TuiDropdownPositionSided, typeof i18.TuiDropdownSelection, typeof i19.TuiDataListComponent, typeof i19.TuiDataListDirective, typeof i19.TuiOption, typeof i19.TuiOptionNew, typeof i19.TuiOptionWithValue, typeof i19.TuiOptGroup, typeof i20.TuiDataListWrapperComponent, typeof i20.TuiDataListGroupWrapperComponent, typeof i19.TuiDataListDirective]>;
|
|
30
29
|
static ɵinj: i0.ɵɵInjectorDeclaration<TuiMultiSelectModule>;
|
|
31
30
|
}
|
|
@@ -3,7 +3,7 @@ import { type TuiPdfViewerOptions } from './pdf-viewer.options';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@taiga-ui/cdk/directives/animated";
|
|
5
5
|
export declare class TuiPdfViewerComponent<I, O> {
|
|
6
|
-
protected readonly closeWord
|
|
6
|
+
protected readonly closeWord: import("@angular/core").Signal<string>;
|
|
7
7
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
8
8
|
protected readonly context: TuiPopover<TuiPdfViewerOptions<I>, O>;
|
|
9
9
|
protected onKeyDownEsc(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-components-arrow.mjs","sources":["../../../projects/legacy/components/arrow/arrow.options.ts","../../../projects/legacy/components/arrow/arrow.component.ts","../../../projects/legacy/components/arrow/arrow.template.html","../../../projects/legacy/components/arrow/arrow.providers.ts","../../../projects/legacy/components/arrow/taiga-ui-legacy-components-arrow.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport interface TuiArrowOptions {\n readonly iconLarge: PolymorpheusContent;\n readonly iconSmall: PolymorpheusContent;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport const TUI_ARROW_DEFAULT_OPTIONS: TuiArrowOptions = {\n iconSmall: '@tui.chevron-down',\n iconLarge: '@tui.chevron-down',\n};\n\n/**\n * @deprecated: drop in v5.0\n * Default parameters for arrow component\n */\nexport const TUI_ARROW_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_ARROW_OPTIONS' : '',\n {\n factory: () => TUI_ARROW_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiArrowOptionsProvider(options: Partial<TuiArrowOptions>): Provider {\n return tuiProvideOptions(TUI_ARROW_OPTIONS, options, TUI_ARROW_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {tuiSizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {AbstractTuiControl} from '@taiga-ui/legacy/classes';\nimport {TUI_TEXTFIELD_SIZE} from '@taiga-ui/legacy/directives';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {of} from 'rxjs';\n\nimport {TUI_ARROW_OPTIONS} from './arrow.options';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\n@Component({\n selector: 'tui-arrow',\n imports: [PolymorpheusOutlet, TuiIcon],\n templateUrl: './arrow.template.html',\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-components-arrow.mjs","sources":["../../../projects/legacy/components/arrow/arrow.options.ts","../../../projects/legacy/components/arrow/arrow.component.ts","../../../projects/legacy/components/arrow/arrow.template.html","../../../projects/legacy/components/arrow/arrow.providers.ts","../../../projects/legacy/components/arrow/taiga-ui-legacy-components-arrow.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport interface TuiArrowOptions {\n readonly iconLarge: PolymorpheusContent;\n readonly iconSmall: PolymorpheusContent;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport const TUI_ARROW_DEFAULT_OPTIONS: TuiArrowOptions = {\n iconSmall: '@tui.chevron-down',\n iconLarge: '@tui.chevron-down',\n};\n\n/**\n * @deprecated: drop in v5.0\n * Default parameters for arrow component\n */\nexport const TUI_ARROW_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_ARROW_OPTIONS' : '',\n {\n factory: () => TUI_ARROW_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiArrowOptionsProvider(options: Partial<TuiArrowOptions>): Provider {\n return tuiProvideOptions(TUI_ARROW_OPTIONS, options, TUI_ARROW_DEFAULT_OPTIONS);\n}\n","import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {tuiSizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {AbstractTuiControl} from '@taiga-ui/legacy/classes';\nimport {TUI_TEXTFIELD_SIZE} from '@taiga-ui/legacy/directives';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {of} from 'rxjs';\n\nimport {TUI_ARROW_OPTIONS} from './arrow.options';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\n@Component({\n selector: 'tui-arrow',\n imports: [PolymorpheusOutlet, TuiIcon],\n templateUrl: './arrow.template.html',\n styleUrl: './arrow.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._rotated]': 'rotated()',\n '[class._small]': 'small',\n },\n})\nexport class TuiArrowComponent {\n private readonly control: any = inject(AbstractTuiControl, {optional: true});\n private readonly textfieldSize = inject(TUI_TEXTFIELD_SIZE);\n private readonly options = inject(TUI_ARROW_OPTIONS);\n protected readonly dropdownOpen = toSignal(\n inject(TuiDropdownOpen, {optional: true})?.tuiDropdownOpenChange || of(false),\n );\n\n protected readonly rotated = computed(\n () => this.dropdownOpen() || this.control.pseudoOpen?.(),\n );\n\n protected get small(): boolean {\n return !tuiSizeBigger(this.textfieldSize.size);\n }\n\n protected get arrowIcon(): PolymorpheusContent {\n return !this.small ? this.options.iconLarge : this.options.iconSmall;\n }\n}\n\nexport const TUI_ARROW = new PolymorpheusComponent(TuiArrowComponent);\n","<tui-icon\n *polymorpheusOutlet=\"arrowIcon as src\"\n [icon]=\"src\"\n/>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeL, type TuiSizeM, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_ARROW} from './arrow.component';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport interface TuiArrowMode {\n readonly disabled: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;\n readonly interactive: PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport const TUI_ARROW_DEFAULT_MODE: TuiArrowMode = {\n interactive: TUI_ARROW,\n disabled: TUI_ARROW,\n};\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport const TUI_ARROW_MODE = new InjectionToken(ngDevMode ? 'TUI_ARROW_MODE' : '', {\n factory: () => TUI_ARROW_DEFAULT_MODE,\n});\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChevron}\n */\nexport function tuiArrowModeProvider(options: Partial<TuiArrowMode>): Provider {\n return tuiProvideOptions(TUI_ARROW_MODE, options, TUI_ARROW_DEFAULT_MODE);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAYA;;AAEG;AACU,MAAA,yBAAyB,GAAoB;AACtD,IAAA,SAAS,EAAE,mBAAmB;AAC9B,IAAA,SAAS,EAAE,mBAAmB;;AAGlC;;;AAGG;AACU,MAAA,iBAAiB,GAAG,IAAI,cAAc,CAC/C,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;AACI,IAAA,OAAO,EAAE,MAAM,yBAAyB;AAC3C,CAAA;AAGC,SAAU,uBAAuB,CAAC,OAAiC,EAAA;IACrE,OAAO,iBAAiB,CAAC,iBAAiB,EAAE,OAAO,EAAE,yBAAyB,CAAC;AACnF;;ACjBA;;AAEG;MAYU,iBAAiB,CAAA;AAX9B,IAAA,WAAA,GAAA;QAYqB,IAAO,CAAA,OAAA,GAAQ,MAAM,CAAC,kBAAkB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC1C,QAAA,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAS5B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAX7B,SAAS;+BACI,WAAW,EAAA,OAAA,EACZ,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAGrB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,gBAAgB,EAAE,OAAO;AAC5B,qBAAA,EAAA,QAAA,EAAA,mFAAA,EAAA,MAAA,EAAA,CAAA,oPAAA,CAAA,EAAA;;MAuBQ,SAAS,GAAG,IAAI,qBAAqB,CAAC,iBAAiB;;AEnCpE;;AAEG;AACU,MAAA,sBAAsB,GAAiB;AAChD,IAAA,WAAW,EAAE,SAAS;AACtB,IAAA,QAAQ,EAAE,SAAS;;AAGvB;;AAEG;AACU,MAAA,cAAc,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,gBAAgB,GAAG,EAAE,EAAE;AAChF,IAAA,OAAO,EAAE,MAAM,sBAAsB;AACxC,CAAA;AAED;;AAEG;AACG,SAAU,oBAAoB,CAAC,OAA8B,EAAA;IAC/D,OAAO,iBAAiB,CAAC,cAAc,EAAE,OAAO,EAAE,sBAAsB,CAAC;AAC7E;;ACpCA;;AAEG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AsyncPipe } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { inject, computed, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
|
|
4
3
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -24,7 +23,7 @@ class TuiDialogComponent {
|
|
|
24
23
|
constructor() {
|
|
25
24
|
this.close$ = new Subject();
|
|
26
25
|
this.context = injectContext();
|
|
27
|
-
this.closeWord
|
|
26
|
+
this.closeWord = inject(TUI_CLOSE_WORD);
|
|
28
27
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
29
28
|
this.from = computed(() => this.size === 'fullscreen' || this.size === 'page' || this.isMobile()
|
|
30
29
|
? 'translateY(100vh)'
|
|
@@ -51,16 +50,16 @@ class TuiDialogComponent {
|
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog-legacy", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "size", "class._centered": "header", "style.--tui-from": "from()" } }, providers: [TuiDialogCloseService], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog-legacy", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "size", "class._centered": "header", "style.--tui-from": "from()" } }, providers: [TuiDialogCloseService], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord() }}\n </button>\n}\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:2.5rem;border-radius:1.5rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:25rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:37.5rem}:host[data-size=l]{inline-size:50rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
55
54
|
}
|
|
56
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
57
56
|
type: Component,
|
|
58
|
-
args: [{ selector: 'tui-dialog-legacy', imports: [
|
|
57
|
+
args: [{ selector: 'tui-dialog-legacy', imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton], changeDetection: ChangeDetectionStrategy.Default, providers: [TuiDialogCloseService], hostDirectives: [TuiAnimated], host: {
|
|
59
58
|
'[attr.data-appearance]': 'context.appearance',
|
|
60
59
|
'[attr.data-size]': 'size',
|
|
61
60
|
'[class._centered]': 'header',
|
|
62
61
|
'[style.--tui-from]': 'from()',
|
|
63
|
-
}, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord
|
|
62
|
+
}, template: "@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord() }}\n </button>\n}\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:2.5rem;border-radius:1.5rem}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-popup)}:host[data-size=auto]{inline-size:auto}:host[data-size=s]{inline-size:25rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{font:var(--tui-font-heading-5)}:host[data-size=m]{inline-size:37.5rem}:host[data-size=l]{inline-size:50rem}:host[data-size=fullscreen],:host[data-size=page]{min-inline-size:100vw;min-block-size:100%;border-radius:0;border:none;background:var(--tui-background-elevation-1);box-shadow:0 4rem var(--tui-background-elevation-1)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - 22.5rem)}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{font:var(--tui-font-heading-3)}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-inline-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0;border:none;margin:auto 0 0;background:var(--tui-background-elevation-1);padding-block-end:env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{font:var(--tui-font-heading-5)}:host :host-context(tui-root._mobile)[data-size=fullscreen],:host :host-context(tui-root._mobile)[data-size=page]{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host :host-context(tui-root._mobile)[data-size=fullscreen] .t-close,:host :host-context(tui-root._mobile)[data-size=page] .t-close{top:max(1rem,env(safe-area-inset-top))}:host[data-size=page] .t-content,:host-context(tui-root._mobile) :host[data-size=page] .t-content{padding:0}.t-heading{margin:0 0 .5rem;overflow-wrap:break-word;font:var(--tui-font-heading-4)}.t-heading_closable{padding-inline-end:2rem}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:1.75rem;background:var(--tui-background-elevation-1)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-content>section{border-radius:inherit}.t-filler{flex-grow:1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:1rem;right:1rem}@supports (inset-inline-end: 0){.t-close{right:unset;inset-inline-end:1rem}}.t-buttons{margin-block-start:1.25rem;text-align:end}\n"] }]
|
|
64
63
|
}], ctorParameters: () => [] });
|
|
65
64
|
|
|
66
65
|
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-components-dialog.mjs","sources":["../../../projects/legacy/components/dialog/dialog.component.ts","../../../projects/legacy/components/dialog/dialog.template.html","../../../projects/legacy/components/dialog/dialog.tokens.ts","../../../projects/legacy/components/dialog/dialog.service.ts","../../../projects/legacy/components/dialog/dialog.directive.ts","../../../projects/legacy/components/dialog/dialog.factory.ts","../../../projects/legacy/components/dialog/taiga-ui-legacy-components-dialog.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiAutoFocus} from '@taiga-ui/cdk/directives/auto-focus';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TUI_DIALOGS_CLOSE, TuiDialogCloseService} from '@taiga-ui/core/components/dialog';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {\n injectContext,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {\n exhaustMap,\n filter,\n isObservable,\n map,\n merge,\n type Observable,\n of,\n Subject,\n switchMap,\n take,\n} from 'rxjs';\n\nimport {type TuiDialogOptions, type TuiDialogSize} from './dialog.interfaces';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\nfunction toObservable<T>(valueOrStream: Observable<T> | T): Observable<T> {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\n\n@Component({\n selector: 'tui-dialog-legacy',\n imports: [AsyncPipe, PolymorpheusOutlet, TuiAutoFocus, TuiButton],\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDialogCloseService],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'size',\n '[class._centered]': 'header',\n '[style.--tui-from]': 'from()',\n },\n})\nexport class TuiDialogComponent<O, I> {\n protected readonly close$ = new Subject<void>();\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly from = computed(() =>\n this.size === 'fullscreen' || this.size === 'page' || this.isMobile()\n ? 'translateY(100vh)'\n : 'translateY(2.5rem)',\n );\n\n protected readonly isMobile = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n constructor() {\n merge(\n this.close$.pipe(switchMap(() => toObservable(this.context.closable))),\n inject(TuiDialogCloseService).pipe(\n exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1))),\n ),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => {\n this.close();\n });\n }\n\n protected get size(): TuiDialogSize {\n return this.context.size;\n }\n\n protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord$ | async }}\n </button>\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: '',\n size: 'm',\n required: false,\n closable: true,\n dismissible: true,\n label: '',\n header: '',\n data: undefined,\n};\n\n/**\n * Default parameters for dialog component\n */\nexport const TUI_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),\n})\nexport class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDialog]',\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n providers: [tuiAsPopover(TuiDialogService)],\n})\nexport class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {}\n","import {assertInInjectionContext, inject, INJECTOR, type Injector} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {type TuiDialogContext, type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> | null\n ? K\n : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D> | null\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any> | null\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,+BAA+B,CAAC;AAEjE,SAAS,YAAY,CAAI,aAAgC,EAAA;AACrD,IAAA,OAAO,YAAY,CAAC,aAAa,CAAC,GAAG,aAAa,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EAAE,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;oBACxD,OAAO,EAAE,CAAC,6BAA6B,CAAC;AACxC,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAC9C,iBAAA;;;ACkCK,SAAU,SAAS,CAMrB,SAA0C,EAC1C,EAAC,QAAQ,EAAE,GAAG,OAAO,EAAA,GAAyB,EAAE,EAAA;IAEhD,IAAI,CAAC,QAAQ,EAAE;QACX,wBAAwB,CAAC,SAAS,CAAC;AACnC,QAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;IAG/B,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAEpD,IAAA,OAAO,CAAC,IAAI,KACR,aAAa,CAAC,IAAI,CACd,IAAI,qBAAqB,CAAC,SAAwB,EAAE,QAAQ,CAAC,EAC7D;AACI,QAAA,GAAG,OAAO;QACV,IAAI;AACP,KAAA,CACJ;AACT;;ACvEA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-components-dialog.mjs","sources":["../../../projects/legacy/components/dialog/dialog.component.ts","../../../projects/legacy/components/dialog/dialog.template.html","../../../projects/legacy/components/dialog/dialog.tokens.ts","../../../projects/legacy/components/dialog/dialog.service.ts","../../../projects/legacy/components/dialog/dialog.directive.ts","../../../projects/legacy/components/dialog/dialog.factory.ts","../../../projects/legacy/components/dialog/taiga-ui-legacy-components-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiAutoFocus} from '@taiga-ui/cdk/directives/auto-focus';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TUI_DIALOGS_CLOSE, TuiDialogCloseService} from '@taiga-ui/core/components/dialog';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {\n injectContext,\n type PolymorpheusContent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {\n exhaustMap,\n filter,\n isObservable,\n map,\n merge,\n type Observable,\n of,\n Subject,\n switchMap,\n take,\n} from 'rxjs';\n\nimport {type TuiDialogOptions, type TuiDialogSize} from './dialog.interfaces';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\nfunction toObservable<T>(valueOrStream: Observable<T> | T): Observable<T> {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\n\n@Component({\n selector: 'tui-dialog-legacy',\n imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton],\n templateUrl: './dialog.template.html',\n styleUrl: './dialog.style.less',\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDialogCloseService],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'size',\n '[class._centered]': 'header',\n '[style.--tui-from]': 'from()',\n },\n})\nexport class TuiDialogComponent<O, I> {\n protected readonly close$ = new Subject<void>();\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly closeWord = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly from = computed(() =>\n this.size === 'fullscreen' || this.size === 'page' || this.isMobile()\n ? 'translateY(100vh)'\n : 'translateY(2.5rem)',\n );\n\n protected readonly isMobile = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n constructor() {\n merge(\n this.close$.pipe(switchMap(() => toObservable(this.context.closable))),\n inject(TuiDialogCloseService).pipe(\n exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1))),\n ),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(filter(Boolean), takeUntilDestroyed())\n .subscribe(() => {\n this.close();\n });\n }\n\n protected get size(): TuiDialogSize {\n return this.context.size;\n }\n\n protected get header(): PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","@if (header) {\n <header class=\"t-header\">\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n </header>\n}\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [class.t-heading_closable]=\"context.closable && !header\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable || context.dismissible) {\n <div class=\"t-buttons\">\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data?.button || 'OK' }}\n </button>\n </div>\n }\n </ng-container>\n </section>\n</div>\n<div class=\"t-filler\"></div>\n\n<!-- Close button is insensitive to `context.closable === Observable<false>` by design -->\n@if (context.closable) {\n <button\n automation-id=\"tui-dialog__close\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"isMobile() ? 'icon' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [size]=\"isMobile() ? 'xs' : 's'\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ closeWord() }}\n </button>\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: '',\n size: 'm',\n required: false,\n closable: true,\n dismissible: true,\n label: '',\n header: '',\n data: undefined,\n};\n\n/**\n * Default parameters for dialog component\n */\nexport const TUI_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),\n})\nexport class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiDialog]',\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n providers: [tuiAsPopover(TuiDialogService)],\n})\nexport class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {}\n","import {assertInInjectionContext, inject, INJECTOR, type Injector} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {type TuiDialogContext, type TuiDialogOptions} from './dialog.interfaces';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> | null\n ? K\n : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D> | null\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any> | null\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8BA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,+BAA+B,CAAC;AAEjE,SAAS,YAAY,CAAI,aAAgC,EA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AE,CAAC,6BAA6B,CAAC;AACxC,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAC9C,iBAAA;;;ACkCK,SAAU,SAAS,CAMrB,SAA0C,EAC1C,EAAC,QAAQ,EAAE,GAAG,OAAO,EAAA,GAAyB,EAAE,EAAA;IAEhD,IAAI,CAAC,QAAQ,EAAE;QACX,wBAAwB,CAAC,SAAS,CAAC;AACnC,QAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;IAG/B,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAEpD,IAAA,OAAO,CAAC,IAAI,KACR,aAAa,CAAC,IAAI,CACd,IAAI,qBAAqB,CAAC,SAAwB,EAAE,QAAQ,CAAC,EAC7D;AACI,QAAA,GAAG,OAAO;QACV,IAAI;AACP,KAAA,CACJ;AACT;;ACvEA;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, signal, Input, ViewChild, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { MASKITO_DEFAULT_OPTIONS } from '@maskito/core';
|
|
6
6
|
import { maskitoDateRangeOptionsGenerator } from '@maskito/kit';
|
|
7
7
|
import { tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
@@ -14,28 +14,26 @@ import { tuiAsDataListHost } from '@taiga-ui/core/components/data-list';
|
|
|
14
14
|
import { TUI_DEFAULT_DATE_FORMAT, TUI_DATE_FORMAT } from '@taiga-ui/core/tokens';
|
|
15
15
|
import { TUI_MOBILE_CALENDAR, TUI_INPUT_DATE_OPTIONS, TUI_DATE_TEXTS, TUI_DATE_RANGE_VALUE_TRANSFORMER, tuiDateStreamWithTransformer, TUI_MOBILE_CALENDAR_PROVIDER } from '@taiga-ui/kit/tokens';
|
|
16
16
|
import { AbstractTuiNullableControl, tuiAsControl as tuiAsControl$1, AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i3 from '@taiga-ui/legacy/components/primitive-textfield';
|
|
18
18
|
import { TuiPrimitiveTextfieldComponent, TuiTextfieldComponent, TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i4 from '@taiga-ui/legacy/directives';
|
|
20
20
|
import { TUI_TEXTFIELD_SIZE, TuiTextfieldControllerModule, TuiValueAccessorModule, TuiLegacyDropdownOpenMonitorDirective } from '@taiga-ui/legacy/directives';
|
|
21
21
|
import { tuiAsFocusableItemAccessor, tuiAsTextfieldHost } from '@taiga-ui/legacy/tokens';
|
|
22
22
|
import { TUI_DATE_MODE_MASKITO_ADAPTER } from '@taiga-ui/legacy/utils';
|
|
23
23
|
import { map } from 'rxjs';
|
|
24
24
|
import * as i1 from '@maskito/angular';
|
|
25
25
|
import { MaskitoDirective } from '@maskito/angular';
|
|
26
|
-
import * as i2 from '@taiga-ui/
|
|
27
|
-
import { TuiLet } from '@taiga-ui/cdk/directives/let';
|
|
28
|
-
import * as i3 from '@taiga-ui/polymorpheus';
|
|
26
|
+
import * as i2 from '@taiga-ui/polymorpheus';
|
|
29
27
|
import { PolymorpheusOutlet, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
|
|
30
|
-
import * as
|
|
28
|
+
import * as i5 from '@taiga-ui/kit/components/calendar-range';
|
|
31
29
|
import { TuiCalendarRange } from '@taiga-ui/kit/components/calendar-range';
|
|
32
|
-
import * as
|
|
30
|
+
import * as i6 from '@taiga-ui/core/components/icon';
|
|
33
31
|
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
34
|
-
import * as
|
|
32
|
+
import * as i7 from '@taiga-ui/core/directives/appearance';
|
|
35
33
|
import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
36
34
|
import * as i1$1 from '@taiga-ui/core/directives/dropdown';
|
|
37
35
|
import { TuiDropdown } from '@taiga-ui/core/directives/dropdown';
|
|
38
|
-
import * as
|
|
36
|
+
import * as i9 from '@angular/common';
|
|
39
37
|
import { CommonModule } from '@angular/common';
|
|
40
38
|
|
|
41
39
|
/**
|
|
@@ -50,7 +48,7 @@ class TuiInputDateRangeComponent extends AbstractTuiNullableControl {
|
|
|
50
48
|
this.options = inject(TUI_INPUT_DATE_OPTIONS);
|
|
51
49
|
this.textfieldSize = inject(TUI_TEXTFIELD_SIZE);
|
|
52
50
|
this.nativeValue = signal('');
|
|
53
|
-
this.dateTexts$ = inject(TUI_DATE_TEXTS);
|
|
51
|
+
this.dateTexts$ = toObservable(inject(TUI_DATE_TEXTS));
|
|
54
52
|
this.valueTransformer = inject(TUI_DATE_RANGE_VALUE_TRANSFORMER, { optional: true });
|
|
55
53
|
this.dateFiller$ = this.dateTexts$.pipe(map((dateTexts) => changeDateSeparator(dateTexts[this.dateFormat.mode], this.dateFormat.separator)));
|
|
56
54
|
this.dateFormat = TUI_DEFAULT_DATE_FORMAT;
|
|
@@ -223,7 +221,7 @@ class TuiInputDateRangeComponent extends AbstractTuiNullableControl {
|
|
|
223
221
|
tuiDateStreamWithTransformer(TUI_DATE_RANGE_VALUE_TRANSFORMER),
|
|
224
222
|
tuiAsDataListHost(TuiInputDateRangeComponent),
|
|
225
223
|
TUI_MOBILE_CALENDAR_PROVIDER,
|
|
226
|
-
], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"interactive\"\n [tuiDropdownOpen]=\"open && interactive\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (tuiDropdownOpenChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n
|
|
224
|
+
], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"interactive\"\n [tuiDropdownOpen]=\"open && interactive\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (tuiDropdownOpenChange)=\"onOpenChange($event)\"\n>\n @let dateFiller = dateFiller$ | async;\n <tui-primitive-textfield\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"computedMask\"\n [nativeId]=\"nativeId\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldFiller]=\"getComputedRangeFiller(dateFiller || '')\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n\n @if (showValueTemplate) {\n <div\n ngProjectAs=\"tuiContent\"\n class=\"t-value\"\n >\n <ng-container *polymorpheusOutlet=\"computedContent as text; context: {$implicit: value}\">\n {{ text }}\n </ng-container>\n </div>\n }\n </tui-primitive-textfield>\n\n <ng-template #iconContent>\n <tui-icon\n *polymorpheusOutlet=\"calendarIcon as src; context: {$implicit: size}\"\n automation-id=\"tui-input-date-range__icon\"\n tuiAppearance=\"icon\"\n [class.t-icon_small]=\"size === 's'\"\n [class.t-icon]=\"!computedDisabled\"\n [icon]=\"src.toString()\"\n (click)=\"onIconClick()\"\n />\n </ng-template>\n\n <ng-template #dropdown>\n <tui-calendar-range\n [defaultViewedMonth]=\"defaultViewedMonth\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [items]=\"items\"\n [markerHandler]=\"markerHandler\"\n [max]=\"max\"\n [maxLength]=\"maxLength\"\n [min]=\"min\"\n [minLength]=\"minLength\"\n [value]=\"value\"\n [(item)]=\"selectedActivePeriod\"\n (valueChange)=\"onRangeChange($event)\"\n />\n </ng-template>\n</div>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:start}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}.t-icon{pointer-events:auto}.t-icon_small:before{font-size:1rem}.t-value{display:flex;inline-size:100%;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"], outputs: ["maskitoChange", "maskitoElementChange"] }, { kind: "directive", type: i2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i3.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "iconCleaner", "readOnly", "invalid", "disabled", "value"], outputs: ["valueChange"] }, { kind: "directive", type: i3.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { kind: "directive", type: i4.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { kind: "directive", type: i4.TuiTextfieldFillerDirective, selector: "[tuiTextfieldFiller]", inputs: ["tuiTextfieldFiller"] }, { kind: "component", type: i5.TuiCalendarRange, selector: "tui-calendar-range", inputs: ["disabledItemHandler", "markerHandler", "items", "min", "max", "minLength", "maxLength", "item", "value", "defaultViewedMonth"], outputs: ["valueChange", "itemChange"] }, { kind: "directive", type: i4.TuiValueAccessorDirective, selector: "[tuiValueAccessor]" }, { kind: "directive", type: i4.TuiLegacyDropdownOpenMonitorDirective, selector: "[tuiDropdownOpenMonitor]" }, { kind: "component", type: i6.TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: i7.TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "directive", type: i1$1.TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container):not(ng-template)", inputs: ["tuiDropdown"], exportAs: ["tuiDropdown"] }, { kind: "directive", type: i1$1.TuiDropdownOpen, selector: "[tuiDropdown][tuiDropdownOpen],[tuiDropdown][tuiDropdownOpenChange]", inputs: ["tuiDropdownEnabled", "tuiDropdownOpen"], outputs: ["tuiDropdownOpenChange"] }, { kind: "pipe", type: i9.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
227
225
|
}
|
|
228
226
|
__decorate([
|
|
229
227
|
tuiPure
|
|
@@ -240,7 +238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
240
238
|
], host: {
|
|
241
239
|
'[attr.data-size]': 'size',
|
|
242
240
|
'(click)': 'onClick()',
|
|
243
|
-
}, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"interactive\"\n [tuiDropdownOpen]=\"open && interactive\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (tuiDropdownOpenChange)=\"onOpenChange($event)\"\n>\n <tui-primitive-textfield\n
|
|
241
|
+
}, template: "<div\n tuiDropdownOpenMonitor\n class=\"t-hosted\"\n [tuiDropdown]=\"dropdown\"\n [tuiDropdownEnabled]=\"interactive\"\n [tuiDropdownOpen]=\"open && interactive\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n (tuiDropdownOpenChange)=\"onOpenChange($event)\"\n>\n @let dateFiller = dateFiller$ | async;\n <tui-primitive-textfield\n automation-id=\"tui-input-date-range__textfield\"\n tuiValueAccessor\n class=\"t-textfield\"\n [disabled]=\"computedDisabled\"\n [invalid]=\"computedInvalid\"\n [maskito]=\"computedMask\"\n [nativeId]=\"nativeId\"\n [pseudoActive]=\"pseudoActive\"\n [pseudoFocus]=\"innerPseudoFocused\"\n [pseudoHover]=\"pseudoHover\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldFiller]=\"getComputedRangeFiller(dateFiller || '')\"\n [tuiTextfieldIcon]=\"calendarIcon && iconContent\"\n [value]=\"computedValue\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-content />\n <ng-content\n ngProjectAs=\"input\"\n select=\"input\"\n />\n\n @if (showValueTemplate) {\n <div\n ngProjectAs=\"tuiContent\"\n class=\"t-value\"\n >\n <ng-container *polymorpheusOutlet=\"computedContent as text; context: {$implicit: value}\">\n {{ text }}\n </ng-container>\n </div>\n }\n </tui-primitive-textfield>\n\n <ng-template #iconContent>\n <tui-icon\n *polymorpheusOutlet=\"calendarIcon as src; context: {$implicit: size}\"\n automation-id=\"tui-input-date-range__icon\"\n tuiAppearance=\"icon\"\n [class.t-icon_small]=\"size === 's'\"\n [class.t-icon]=\"!computedDisabled\"\n [icon]=\"src.toString()\"\n (click)=\"onIconClick()\"\n />\n </ng-template>\n\n <ng-template #dropdown>\n <tui-calendar-range\n [defaultViewedMonth]=\"defaultViewedMonth\"\n [disabledItemHandler]=\"disabledItemHandler\"\n [items]=\"items\"\n [markerHandler]=\"markerHandler\"\n [max]=\"max\"\n [maxLength]=\"maxLength\"\n [min]=\"min\"\n [minLength]=\"minLength\"\n [value]=\"value\"\n [(item)]=\"selectedActivePeriod\"\n (valueChange)=\"onRangeChange($event)\"\n />\n </ng-template>\n</div>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:start}:host._disabled,:host :host-context(*:disabled){pointer-events:none}.t-hosted{display:block;border-radius:inherit}.t-textfield{border-radius:inherit;text-align:inherit}.t-icon{pointer-events:auto}.t-icon_small:before{font-size:1rem}.t-value{display:flex;inline-size:100%;align-items:center}\n"] }]
|
|
244
242
|
}], propDecorators: { textfield: [{
|
|
245
243
|
type: ViewChild,
|
|
246
244
|
args: [TuiPrimitiveTextfieldComponent]
|
|
@@ -301,7 +299,6 @@ class TuiInputDateRangeModule {
|
|
|
301
299
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
302
300
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateRangeModule, declarations: [TuiInputDateRangeComponent, TuiInputDateRangeDirective], imports: [CommonModule,
|
|
303
301
|
MaskitoDirective,
|
|
304
|
-
TuiLet,
|
|
305
302
|
PolymorpheusOutlet,
|
|
306
303
|
PolymorpheusTemplate,
|
|
307
304
|
TuiPrimitiveTextfieldModule,
|
|
@@ -326,7 +323,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
326
323
|
imports: [
|
|
327
324
|
CommonModule,
|
|
328
325
|
MaskitoDirective,
|
|
329
|
-
TuiLet,
|
|
330
326
|
PolymorpheusOutlet,
|
|
331
327
|
PolymorpheusTemplate,
|
|
332
328
|
TuiPrimitiveTextfieldModule,
|