@taiga-ui/experimental 4.52.0-canary.1ea42f6 → 4.52.0-canary.24b31eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.d.ts +0 -5
- package/fesm2022/taiga-ui-experimental-components.mjs +0 -5
- package/fesm2022/taiga-ui-experimental-components.mjs.map +1 -1
- package/package.json +1 -21
- package/components/accordion/accordion.component.d.ts +0 -20
- package/components/accordion/accordion.d.ts +0 -5
- package/components/accordion/accordion.directive.d.ts +0 -15
- package/components/accordion/index.d.ts +0 -3
- package/components/dialog/dialog.component.d.ts +0 -15
- package/components/dialog/dialog.directive.d.ts +0 -7
- package/components/dialog/dialog.options.d.ts +0 -27
- package/components/dialog/dialog.service.d.ts +0 -7
- package/components/dialog/index.d.ts +0 -4
- package/components/expand/expand.component.d.ts +0 -13
- package/components/expand/index.d.ts +0 -1
- package/components/hint/hint.component.d.ts +0 -26
- package/components/hint/index.d.ts +0 -1
- package/components/input-phone-international/index.d.ts +0 -1
- package/components/input-phone-international/input-phone-international.component.d.ts +0 -45
- package/fesm2022/taiga-ui-experimental-components-accordion.mjs +0 -147
- package/fesm2022/taiga-ui-experimental-components-accordion.mjs.map +0 -1
- package/fesm2022/taiga-ui-experimental-components-dialog.mjs +0 -117
- package/fesm2022/taiga-ui-experimental-components-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-experimental-components-expand.mjs +0 -63
- package/fesm2022/taiga-ui-experimental-components-expand.mjs.map +0 -1
- package/fesm2022/taiga-ui-experimental-components-hint.mjs +0 -118
- package/fesm2022/taiga-ui-experimental-components-hint.mjs.map +0 -1
- package/fesm2022/taiga-ui-experimental-components-input-phone-international.mjs +0 -187
- package/fesm2022/taiga-ui-experimental-components-input-phone-international.mjs.map +0 -1
package/components/index.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export * from '@taiga-ui/experimental/components/accordion';
|
|
2
|
-
export * from '@taiga-ui/experimental/components/dialog';
|
|
3
|
-
export * from '@taiga-ui/experimental/components/expand';
|
|
4
|
-
export * from '@taiga-ui/experimental/components/hint';
|
|
5
|
-
export * from '@taiga-ui/experimental/components/input-phone-international';
|
|
6
1
|
export * from '@taiga-ui/experimental/components/search-results';
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export * from '@taiga-ui/experimental/components/accordion';
|
|
2
|
-
export * from '@taiga-ui/experimental/components/dialog';
|
|
3
|
-
export * from '@taiga-ui/experimental/components/expand';
|
|
4
|
-
export * from '@taiga-ui/experimental/components/hint';
|
|
5
|
-
export * from '@taiga-ui/experimental/components/input-phone-international';
|
|
6
1
|
export * from '@taiga-ui/experimental/components/search-results';
|
|
7
2
|
|
|
8
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components.mjs","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components.mjs","sources":["../../../projects/experimental/components/taiga-ui-experimental-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/experimental",
|
|
3
|
-
"version": "4.52.0-canary.
|
|
3
|
+
"version": "4.52.0-canary.24b31eb",
|
|
4
4
|
"description": "A package with Taiga UI experimental components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -35,26 +35,6 @@
|
|
|
35
35
|
"types": "./components/index.d.ts",
|
|
36
36
|
"default": "./fesm2022/taiga-ui-experimental-components.mjs"
|
|
37
37
|
},
|
|
38
|
-
"./components/accordion": {
|
|
39
|
-
"types": "./components/accordion/index.d.ts",
|
|
40
|
-
"default": "./fesm2022/taiga-ui-experimental-components-accordion.mjs"
|
|
41
|
-
},
|
|
42
|
-
"./components/dialog": {
|
|
43
|
-
"types": "./components/dialog/index.d.ts",
|
|
44
|
-
"default": "./fesm2022/taiga-ui-experimental-components-dialog.mjs"
|
|
45
|
-
},
|
|
46
|
-
"./components/expand": {
|
|
47
|
-
"types": "./components/expand/index.d.ts",
|
|
48
|
-
"default": "./fesm2022/taiga-ui-experimental-components-expand.mjs"
|
|
49
|
-
},
|
|
50
|
-
"./components/hint": {
|
|
51
|
-
"types": "./components/hint/index.d.ts",
|
|
52
|
-
"default": "./fesm2022/taiga-ui-experimental-components-hint.mjs"
|
|
53
|
-
},
|
|
54
|
-
"./components/input-phone-international": {
|
|
55
|
-
"types": "./components/input-phone-international/index.d.ts",
|
|
56
|
-
"default": "./fesm2022/taiga-ui-experimental-components-input-phone-international.mjs"
|
|
57
|
-
},
|
|
58
38
|
"./components/search-results": {
|
|
59
39
|
"types": "./components/search-results/index.d.ts",
|
|
60
40
|
"default": "./fesm2022/taiga-ui-experimental-components-search-results.mjs"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type AfterViewInit, type QueryList } from '@angular/core';
|
|
2
|
-
import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
|
|
3
|
-
import { TuiExpand } from '@taiga-ui/experimental/components/expand';
|
|
4
|
-
import { TuiAccordionDirective } from './accordion.directive';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@taiga-ui/core/directives/group";
|
|
7
|
-
export declare class TuiAccordionComponent implements AfterViewInit {
|
|
8
|
-
private readonly destroyRef;
|
|
9
|
-
private readonly toggle$;
|
|
10
|
-
readonly expands: QueryList<TuiExpand>;
|
|
11
|
-
readonly directives: QueryList<TuiAccordionDirective>;
|
|
12
|
-
closeOthers: boolean;
|
|
13
|
-
readonly size: import("@angular/core").WritableSignal<"m" | "s" | "l">;
|
|
14
|
-
set sizeSetter(size: TuiSizeL | TuiSizeS);
|
|
15
|
-
ngAfterViewInit(): void;
|
|
16
|
-
toggle(directive: TuiAccordionDirective): void;
|
|
17
|
-
private expand;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAccordionComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiAccordionComponent, "tui-accordion", never, { "closeOthers": { "alias": "closeOthers"; "required": false; }; "sizeSetter": { "alias": "size"; "required": false; }; }, {}, ["expands", "directives"], ["*"], true, [{ directive: typeof i1.TuiGroup; inputs: {}; outputs: {}; }]>;
|
|
20
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
2
|
-
import { TuiExpand } from '@taiga-ui/experimental/components/expand';
|
|
3
|
-
import { TuiAccordionComponent } from './accordion.component';
|
|
4
|
-
import { TuiAccordionDirective } from './accordion.directive';
|
|
5
|
-
export declare const TuiAccordion: readonly [typeof TuiAccordionComponent, typeof TuiAccordionDirective, typeof TuiExpand, typeof TuiItem];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, type OnChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@taiga-ui/core/components/button";
|
|
4
|
-
import * as i2 from "@taiga-ui/kit/directives/chevron";
|
|
5
|
-
export declare class TuiAccordionDirective implements OnChanges {
|
|
6
|
-
private readonly accordion;
|
|
7
|
-
protected readonly size: import("@angular/core").WritableSignal<"m" | "s" | "l">;
|
|
8
|
-
tuiAccordion: boolean | string;
|
|
9
|
-
readonly tuiAccordionChange: EventEmitter<boolean>;
|
|
10
|
-
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
-
ngOnChanges(): void;
|
|
12
|
-
toggle(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAccordionDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAccordionDirective, "button[tuiAccordion]", never, { "tuiAccordion": { "alias": "tuiAccordion"; "required": false; }; }, { "tuiAccordionChange": "tuiAccordionChange"; }, never, never, true, [{ directive: typeof i1.TuiButton; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiChevron; inputs: {}; outputs: {}; }]>;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type TuiPopover } from '@taiga-ui/cdk/services';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { type TuiDialogOptions } from './dialog.options';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@taiga-ui/cdk/directives/animated";
|
|
6
|
-
export declare class TuiDialogComponent<O, I> {
|
|
7
|
-
protected readonly close$: Subject<void>;
|
|
8
|
-
protected readonly close: import("@angular/core").Signal<string | undefined>;
|
|
9
|
-
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
10
|
-
protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
|
|
11
|
-
protected readonly primitive: boolean;
|
|
12
|
-
protected readonly sub: import("rxjs").Subscription;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogComponent<any, any>, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiDialogComponent<any, any>, "tui-dialog", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }]>;
|
|
15
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
|
|
2
|
-
import { type TuiDialogOptions } from './dialog.options';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiDialog<T> extends TuiPopoverDirective<TuiDialogOptions<T>> {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialog<any>, never>;
|
|
6
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDialog<any>, "ng-template[tuiDialog]", never, { "options": { "alias": "tuiDialogOptions"; "required": false; }; "open": { "alias": "tuiDialog"; "required": false; }; }, { "openChange": "tuiDialogChange"; }, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type TuiPopoverContext } from '@taiga-ui/cdk/services';
|
|
2
|
-
import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
|
|
3
|
-
import { type Observable } from 'rxjs';
|
|
4
|
-
/**
|
|
5
|
-
* Options for a dialog
|
|
6
|
-
*
|
|
7
|
-
* appearance - data-appearance attribute of the dialog ('taiga' by default)
|
|
8
|
-
* closable - show close button (true by default)
|
|
9
|
-
* data - arbitrary data for dialog
|
|
10
|
-
* dismissible - close dialog by Esc button or click on overlay (true by default)
|
|
11
|
-
* label - string title for the dialog ('' by default)
|
|
12
|
-
* required - dismissing or closing dialog by X button throws (false by default)
|
|
13
|
-
* size - size of the dialog ('m' by default)
|
|
14
|
-
*/
|
|
15
|
-
export interface TuiDialogOptions<I> {
|
|
16
|
-
readonly appearance: string;
|
|
17
|
-
readonly closable: Observable<boolean> | boolean;
|
|
18
|
-
readonly data: I extends void ? undefined : I;
|
|
19
|
-
readonly dismissible: Observable<boolean> | boolean;
|
|
20
|
-
readonly label: string;
|
|
21
|
-
readonly required: boolean;
|
|
22
|
-
readonly size: TuiSizeL | TuiSizeS;
|
|
23
|
-
}
|
|
24
|
-
export interface TuiDialogContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiDialogOptions<I> {
|
|
25
|
-
}
|
|
26
|
-
export declare const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void>;
|
|
27
|
-
export declare const TUI_DIALOG_OPTIONS: import("@angular/core").InjectionToken<TuiDialogOptions<void>>, tuiDialogOptionsProvider: (item: Partial<TuiDialogOptions<void>> | (() => Partial<TuiDialogOptions<void>>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TuiPopoverService } from '@taiga-ui/cdk/services';
|
|
2
|
-
import { type TuiDialogOptions } from './dialog.options';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiDialogService extends TuiPopoverService<TuiDialogOptions<any>> {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiDialogService>;
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiExpand {
|
|
4
|
-
private readonly el;
|
|
5
|
-
private readonly cdr;
|
|
6
|
-
protected content?: TemplateRef<any>;
|
|
7
|
-
protected readonly signal: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
-
protected readonly animating: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
-
set expanded(expanded: boolean);
|
|
10
|
-
protected onTransitionEnd({ propertyName }: TransitionEvent): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiExpand, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiExpand, "tui-expand", never, { "expanded": { "alias": "expanded"; "required": false; }; }, {}, ["content"], ["*"], true, never>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './expand.component';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Provider } from '@angular/core';
|
|
2
|
-
import { TuiRectAccessor } from '@taiga-ui/core/classes';
|
|
3
|
-
import { type TuiHintDirective, TuiHintPointer } from '@taiga-ui/core/directives/hint';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@taiga-ui/core/directives/appearance";
|
|
6
|
-
import * as i2 from "@taiga-ui/cdk/directives/animated";
|
|
7
|
-
export declare class TuiHintComponent<C = any> {
|
|
8
|
-
private readonly el;
|
|
9
|
-
private readonly hover;
|
|
10
|
-
private readonly vvs;
|
|
11
|
-
private readonly viewport;
|
|
12
|
-
protected readonly pointer: TuiHintPointer | null;
|
|
13
|
-
protected readonly accessor: TuiRectAccessor;
|
|
14
|
-
protected readonly hint: TuiHintDirective<C>;
|
|
15
|
-
protected readonly isMobile: boolean;
|
|
16
|
-
protected readonly content: import("@angular/core").WritableSignal<import("@taiga-ui/polymorpheus").PolymorpheusContent<C>>;
|
|
17
|
-
protected readonly theme: string | null | undefined;
|
|
18
|
-
protected readonly appearance: import("@angular/core").WritableSignal<string>;
|
|
19
|
-
constructor();
|
|
20
|
-
protected onClick(target: HTMLElement): void;
|
|
21
|
-
private apply;
|
|
22
|
-
private update;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiHintComponent<any>, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiHintComponent<any>, "tui-hint", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.TuiAppearance; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }]>;
|
|
25
|
-
}
|
|
26
|
-
export declare function tuiProvideExperimentalHint(): Provider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hint.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-phone-international.component';
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ElementRef, type QueryList } from '@angular/core';
|
|
2
|
-
import { type MaskitoOptions } from '@maskito/core';
|
|
3
|
-
import { TuiControl } from '@taiga-ui/cdk/classes';
|
|
4
|
-
import { type TuiCountryIsoCode } from '@taiga-ui/i18n/types';
|
|
5
|
-
import { type MetadataJson } from 'libphonenumber-js/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@maskito/angular";
|
|
8
|
-
import * as i2 from "@taiga-ui/core/components/textfield";
|
|
9
|
-
export declare class TuiInputPhoneInternational extends TuiControl<string> {
|
|
10
|
-
protected readonly list: QueryList<ElementRef<HTMLButtonElement>>;
|
|
11
|
-
protected readonly el: HTMLInputElement;
|
|
12
|
-
protected readonly ios: boolean;
|
|
13
|
-
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
14
|
-
protected readonly options: import("@taiga-ui/kit/components/input-phone-international").TuiInputPhoneInternationalOptions;
|
|
15
|
-
protected readonly countries: import("@angular/core").WritableSignal<readonly TuiCountryIsoCode[]>;
|
|
16
|
-
protected readonly code: import("@angular/core").WritableSignal<TuiCountryIsoCode>;
|
|
17
|
-
protected readonly label: import("@angular/core").Signal<string | undefined>;
|
|
18
|
-
protected readonly metadata: import("@angular/core").Signal<MetadataJson | undefined>;
|
|
19
|
-
protected readonly names: import("@angular/core").Signal<Record<TuiCountryIsoCode, string> | undefined>;
|
|
20
|
-
protected readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
-
protected readonly search: import("@angular/core").WritableSignal<string>;
|
|
22
|
-
protected readonly size: import("@angular/core").WritableSignal<"m" | "l" | "s">;
|
|
23
|
-
protected readonly mask: import("@angular/core").Signal<MaskitoOptions | null>;
|
|
24
|
-
protected readonly masked: import("@angular/core").WritableSignal<string>;
|
|
25
|
-
protected valueChangeEffect: import("@angular/core").EffectRef;
|
|
26
|
-
protected readonly filtered: import("@angular/core").Signal<{
|
|
27
|
-
iso: TuiCountryIsoCode;
|
|
28
|
-
name: string;
|
|
29
|
-
code: string;
|
|
30
|
-
}[]>;
|
|
31
|
-
protected readonly enabled: import("@angular/core").Signal<boolean>;
|
|
32
|
-
protected readonly $: import("rxjs").Subscription;
|
|
33
|
-
countrySearch: boolean;
|
|
34
|
-
readonly countryIsoCodeChange: import("rxjs").Observable<TuiCountryIsoCode>;
|
|
35
|
-
set countriesValue(value: readonly TuiCountryIsoCode[]);
|
|
36
|
-
set isoCode(code: TuiCountryIsoCode);
|
|
37
|
-
writeValue(unmasked: string | null): void;
|
|
38
|
-
protected onPaste(event: Event): void;
|
|
39
|
-
protected onItemClick(code: TuiCountryIsoCode): void;
|
|
40
|
-
private computeMask;
|
|
41
|
-
private unmask;
|
|
42
|
-
private getCountryCode;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputPhoneInternational, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputPhoneInternational, "input[tuiInputPhoneInternational]", never, { "countrySearch": { "alias": "countrySearch"; "required": false; }; "countriesValue": { "alias": "countries"; "required": false; }; "isoCode": { "alias": "countryIsoCode"; "required": false; }; }, { "countryIsoCodeChange": "countryIsoCodeChange"; }, never, never, true, [{ directive: typeof i1.MaskitoDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
|
|
45
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
2
|
-
import { TuiExpand } from '@taiga-ui/experimental/components/expand';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, EventEmitter, signal, Output, Input, Directive, DestroyRef, ContentChildren, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
5
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
7
|
-
import * as i1$1 from '@taiga-ui/core/directives/group';
|
|
8
|
-
import { tuiGroupOptionsProvider, TuiGroup } from '@taiga-ui/core/directives/group';
|
|
9
|
-
import { ReplaySubject, merge, combineLatest, withLatestFrom, map } from 'rxjs';
|
|
10
|
-
import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils';
|
|
11
|
-
import * as i1 from '@taiga-ui/core/components/button';
|
|
12
|
-
import { TuiButton, tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
13
|
-
import { tuiAvatarOptionsProvider } from '@taiga-ui/kit/components/avatar';
|
|
14
|
-
import * as i2 from '@taiga-ui/kit/directives/chevron';
|
|
15
|
-
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
16
|
-
|
|
17
|
-
class TuiAccordionDirective {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.accordion = inject(TuiAccordionComponent);
|
|
20
|
-
this.size = tuiDirectiveBinding(TuiButton, 'size', this.accordion.size);
|
|
21
|
-
this.tuiAccordion = '';
|
|
22
|
-
this.tuiAccordionChange = new EventEmitter();
|
|
23
|
-
this.open = tuiDirectiveBinding(TuiChevron, 'rotated', signal(false));
|
|
24
|
-
}
|
|
25
|
-
ngOnChanges() {
|
|
26
|
-
this.open.set(!!this.tuiAccordion);
|
|
27
|
-
this.accordion.toggle(this);
|
|
28
|
-
}
|
|
29
|
-
toggle() {
|
|
30
|
-
this.open.set(!this.open());
|
|
31
|
-
this.tuiAccordion = this.open();
|
|
32
|
-
this.tuiAccordionChange.emit(this.open());
|
|
33
|
-
this.accordion.toggle(this);
|
|
34
|
-
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
36
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiAccordionDirective, isStandalone: true, selector: "button[tuiAccordion]", inputs: { tuiAccordion: "tuiAccordion" }, outputs: { tuiAccordionChange: "tuiAccordionChange" }, host: { attributes: { "tuiButton": "", "tuiAccordion": "", "type": "button" }, listeners: { "click": "toggle()" }, properties: { "class._open": "open()" } }, providers: [
|
|
37
|
-
tuiAvatarOptionsProvider({ size: 's' }),
|
|
38
|
-
tuiButtonOptionsProvider({ appearance: 'outline-grayscale' }),
|
|
39
|
-
], usesOnChanges: true, hostDirectives: [{ directive: i1.TuiButton }, { directive: i2.TuiChevron }], ngImport: i0 }); }
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAccordionDirective, decorators: [{
|
|
42
|
-
type: Directive,
|
|
43
|
-
args: [{
|
|
44
|
-
standalone: true,
|
|
45
|
-
selector: 'button[tuiAccordion]',
|
|
46
|
-
providers: [
|
|
47
|
-
tuiAvatarOptionsProvider({ size: 's' }),
|
|
48
|
-
tuiButtonOptionsProvider({ appearance: 'outline-grayscale' }),
|
|
49
|
-
],
|
|
50
|
-
hostDirectives: [TuiButton, TuiChevron],
|
|
51
|
-
host: {
|
|
52
|
-
tuiButton: '',
|
|
53
|
-
tuiAccordion: '',
|
|
54
|
-
type: 'button',
|
|
55
|
-
'[class._open]': 'open()',
|
|
56
|
-
'(click)': 'toggle()',
|
|
57
|
-
},
|
|
58
|
-
}]
|
|
59
|
-
}], propDecorators: { tuiAccordion: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], tuiAccordionChange: [{
|
|
62
|
-
type: Output
|
|
63
|
-
}] } });
|
|
64
|
-
|
|
65
|
-
class TuiAccordionComponent {
|
|
66
|
-
constructor() {
|
|
67
|
-
this.destroyRef = inject(DestroyRef);
|
|
68
|
-
this.toggle$ = new ReplaySubject(Infinity);
|
|
69
|
-
this.expands = EMPTY_QUERY;
|
|
70
|
-
this.directives = EMPTY_QUERY;
|
|
71
|
-
this.closeOthers = true;
|
|
72
|
-
this.size = signal('l');
|
|
73
|
-
}
|
|
74
|
-
set sizeSetter(size) {
|
|
75
|
-
this.size.set(size);
|
|
76
|
-
}
|
|
77
|
-
ngAfterViewInit() {
|
|
78
|
-
merge(combineLatest([this.directives.changes, this.expands.changes]).pipe(withLatestFrom(this.toggle$), map(([, accordion]) => accordion)), this.toggle$)
|
|
79
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
80
|
-
.subscribe((accordion) => this.expand(accordion));
|
|
81
|
-
}
|
|
82
|
-
toggle(directive) {
|
|
83
|
-
this.toggle$.next(directive);
|
|
84
|
-
}
|
|
85
|
-
expand(accordion) {
|
|
86
|
-
if (this.closeOthers && accordion.open()) {
|
|
87
|
-
this.expands.forEach((expand) => {
|
|
88
|
-
expand.expanded = false;
|
|
89
|
-
});
|
|
90
|
-
this.directives.forEach((dir) => {
|
|
91
|
-
if (dir === accordion) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
dir.open.set(false);
|
|
95
|
-
dir.tuiAccordion = false;
|
|
96
|
-
dir.tuiAccordionChange.emit(false);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
const expand = this.expands.get(this.directives.toArray().indexOf(accordion));
|
|
100
|
-
if (expand) {
|
|
101
|
-
expand.expanded = accordion.open();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiAccordionComponent, isStandalone: true, selector: "tui-accordion", inputs: { closeOthers: "closeOthers", sizeSetter: ["size", "sizeSetter"] }, host: { properties: { "attr.data-size": "size()" } }, providers: [
|
|
106
|
-
tuiGroupOptionsProvider({
|
|
107
|
-
orientation: 'vertical',
|
|
108
|
-
collapsed: true,
|
|
109
|
-
}),
|
|
110
|
-
], queries: [{ propertyName: "expands", predicate: TuiExpand }, { propertyName: "directives", predicate: TuiAccordionDirective }], hostDirectives: [{ directive: i1$1.TuiGroup }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-accordion{inline-size:stretch;border-radius:var(--t-group-radius);font:var(--tui-font-text-m);overflow:hidden}tui-accordion>[tuiAccordion]{text-align:start;justify-content:flex-start}tui-accordion>[tuiAccordion]:last-of-type:not(._open){-webkit-mask-image:var(--t-group-mask-end);mask-image:var(--t-group-mask-end);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}tui-accordion>[tuiAccordion]:first-child{border-top-left-radius:inherit!important;border-top-right-radius:inherit!important}tui-accordion>[tuiAccordion]:first-child:last-of-type:not(._open){mask:none}tui-accordion>[tuiAccordion]:after{margin-inline-start:auto!important}tui-accordion>[tuiAccordion]._open+tui-expand{visibility:visible}tui-accordion>[tuiAccordion]>[tuiAvatar]{margin:0}tui-accordion>tui-expand{visibility:hidden;min-block-size:1px!important;padding:1.25rem;transition-property:grid-template-rows,padding,visibility!important;box-shadow:inset 0 0 0 1px var(--tui-border-normal)}tui-accordion>tui-expand:last-child{border-bottom-left-radius:inherit!important;border-bottom-right-radius:inherit!important}tui-accordion[data-size=m]{font:var(--tui-font-text-s)}tui-accordion[data-size=m]>tui-expand{padding:1rem}tui-accordion[data-size=s]{font:var(--tui-font-text-s)}tui-accordion[data-size=s]>tui-expand{padding:.625rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
111
|
-
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAccordionComponent, decorators: [{
|
|
113
|
-
type: Component,
|
|
114
|
-
args: [{ standalone: true, selector: 'tui-accordion', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
115
|
-
tuiGroupOptionsProvider({
|
|
116
|
-
orientation: 'vertical',
|
|
117
|
-
collapsed: true,
|
|
118
|
-
}),
|
|
119
|
-
], hostDirectives: [TuiGroup], host: {
|
|
120
|
-
'[attr.data-size]': 'size()',
|
|
121
|
-
}, styles: ["tui-accordion{inline-size:stretch;border-radius:var(--t-group-radius);font:var(--tui-font-text-m);overflow:hidden}tui-accordion>[tuiAccordion]{text-align:start;justify-content:flex-start}tui-accordion>[tuiAccordion]:last-of-type:not(._open){-webkit-mask-image:var(--t-group-mask-end);mask-image:var(--t-group-mask-end);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}tui-accordion>[tuiAccordion]:first-child{border-top-left-radius:inherit!important;border-top-right-radius:inherit!important}tui-accordion>[tuiAccordion]:first-child:last-of-type:not(._open){mask:none}tui-accordion>[tuiAccordion]:after{margin-inline-start:auto!important}tui-accordion>[tuiAccordion]._open+tui-expand{visibility:visible}tui-accordion>[tuiAccordion]>[tuiAvatar]{margin:0}tui-accordion>tui-expand{visibility:hidden;min-block-size:1px!important;padding:1.25rem;transition-property:grid-template-rows,padding,visibility!important;box-shadow:inset 0 0 0 1px var(--tui-border-normal)}tui-accordion>tui-expand:last-child{border-bottom-left-radius:inherit!important;border-bottom-right-radius:inherit!important}tui-accordion[data-size=m]{font:var(--tui-font-text-s)}tui-accordion[data-size=m]>tui-expand{padding:1rem}tui-accordion[data-size=s]{font:var(--tui-font-text-s)}tui-accordion[data-size=s]>tui-expand{padding:.625rem}\n"] }]
|
|
122
|
-
}], propDecorators: { expands: [{
|
|
123
|
-
type: ContentChildren,
|
|
124
|
-
args: [TuiExpand]
|
|
125
|
-
}], directives: [{
|
|
126
|
-
type: ContentChildren,
|
|
127
|
-
args: [TuiAccordionDirective]
|
|
128
|
-
}], closeOthers: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], sizeSetter: [{
|
|
131
|
-
type: Input,
|
|
132
|
-
args: ['size']
|
|
133
|
-
}] } });
|
|
134
|
-
|
|
135
|
-
const TuiAccordion = [
|
|
136
|
-
TuiAccordionComponent,
|
|
137
|
-
TuiAccordionDirective,
|
|
138
|
-
TuiExpand,
|
|
139
|
-
TuiItem,
|
|
140
|
-
];
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Generated bundle index. Do not edit.
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
export { TuiAccordion, TuiAccordionComponent, TuiAccordionDirective };
|
|
147
|
-
//# sourceMappingURL=taiga-ui-experimental-components-accordion.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-accordion.mjs","sources":["../../../projects/experimental/components/accordion/accordion.directive.ts","../../../projects/experimental/components/accordion/accordion.component.ts","../../../projects/experimental/components/accordion/accordion.ts","../../../projects/experimental/components/accordion/taiga-ui-experimental-components-accordion.ts"],"sourcesContent":["import {\n Directive,\n EventEmitter,\n inject,\n Input,\n type OnChanges,\n Output,\n signal,\n} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils';\nimport {TuiButton, tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {tuiAvatarOptionsProvider} from '@taiga-ui/kit/components/avatar';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\n\nimport {TuiAccordionComponent} from './accordion.component';\n\n@Directive({\n standalone: true,\n selector: 'button[tuiAccordion]',\n providers: [\n tuiAvatarOptionsProvider({size: 's'}),\n tuiButtonOptionsProvider({appearance: 'outline-grayscale'}),\n ],\n hostDirectives: [TuiButton, TuiChevron],\n host: {\n tuiButton: '',\n tuiAccordion: '',\n type: 'button',\n '[class._open]': 'open()',\n '(click)': 'toggle()',\n },\n})\nexport class TuiAccordionDirective implements OnChanges {\n private readonly accordion = inject(TuiAccordionComponent);\n\n protected readonly size = tuiDirectiveBinding(TuiButton, 'size', this.accordion.size);\n\n @Input()\n public tuiAccordion: boolean | string = '';\n\n @Output()\n public readonly tuiAccordionChange = new EventEmitter<boolean>();\n\n public readonly open = tuiDirectiveBinding(TuiChevron, 'rotated', signal(false));\n\n public ngOnChanges(): void {\n this.open.set(!!this.tuiAccordion);\n this.accordion.toggle(this);\n }\n\n public toggle(): void {\n this.open.set(!this.open());\n this.tuiAccordion = this.open();\n this.tuiAccordionChange.emit(this.open());\n this.accordion.toggle(this);\n }\n}\n","import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DestroyRef,\n inject,\n Input,\n type QueryList,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiGroup, tuiGroupOptionsProvider} from '@taiga-ui/core/directives/group';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {TuiExpand} from '@taiga-ui/experimental/components/expand';\nimport {combineLatest, map, merge, ReplaySubject, withLatestFrom} from 'rxjs';\n\nimport {TuiAccordionDirective} from './accordion.directive';\n\n@Component({\n standalone: true,\n selector: 'tui-accordion',\n template: '<ng-content />',\n styleUrls: ['./accordion.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiGroupOptionsProvider({\n orientation: 'vertical',\n collapsed: true,\n }),\n ],\n hostDirectives: [TuiGroup],\n host: {\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiAccordionComponent implements AfterViewInit {\n private readonly destroyRef = inject(DestroyRef);\n private readonly toggle$ = new ReplaySubject<TuiAccordionDirective>(Infinity);\n\n @ContentChildren(TuiExpand)\n public readonly expands: QueryList<TuiExpand> = EMPTY_QUERY;\n\n @ContentChildren(TuiAccordionDirective)\n public readonly directives: QueryList<TuiAccordionDirective> = EMPTY_QUERY;\n\n @Input()\n public closeOthers = true;\n\n public readonly size = signal<TuiSizeL | TuiSizeS>('l');\n\n @Input('size')\n public set sizeSetter(size: TuiSizeL | TuiSizeS) {\n this.size.set(size);\n }\n\n public ngAfterViewInit(): void {\n merge(\n combineLatest([this.directives.changes, this.expands.changes]).pipe(\n withLatestFrom(this.toggle$),\n map(([, accordion]) => accordion),\n ),\n this.toggle$,\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((accordion) => this.expand(accordion));\n }\n\n public toggle(directive: TuiAccordionDirective): void {\n this.toggle$.next(directive);\n }\n\n private expand(accordion: TuiAccordionDirective): void {\n if (this.closeOthers && accordion.open()) {\n this.expands.forEach((expand) => {\n expand.expanded = false;\n });\n\n this.directives.forEach((dir) => {\n if (dir === accordion) {\n return;\n }\n\n dir.open.set(false);\n dir.tuiAccordion = false;\n dir.tuiAccordionChange.emit(false);\n });\n }\n\n const expand = this.expands.get(this.directives.toArray().indexOf(accordion));\n\n if (expand) {\n expand.expanded = accordion.open();\n }\n }\n}\n","import {TuiItem} from '@taiga-ui/cdk/directives/item';\nimport {TuiExpand} from '@taiga-ui/experimental/components/expand';\n\nimport {TuiAccordionComponent} from './accordion.component';\nimport {TuiAccordionDirective} from './accordion.directive';\n\nexport const TuiAccordion = [\n TuiAccordionComponent,\n TuiAccordionDirective,\n TuiExpand,\n TuiItem,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;MAgCa,qBAAqB,CAAA;AAhBlC,IAAA,WAAA,GAAA;AAiBqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAEvC,QAAA,IAAA,CAAA,IAAI,GAAG,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAG9E,IAAY,CAAA,YAAA,GAAqB,EAAE;AAG1B,QAAA,IAAA,CAAA,kBAAkB,GAAG,IAAI,YAAY,EAAW;AAEhD,QAAA,IAAA,CAAA,IAAI,GAAG,mBAAmB,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAanF;IAXU,WAAW,GAAA;QACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;AAClC,QAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;;IAGxB,MAAM,GAAA;QACT,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAC3B,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,EAAE;QAC/B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACzC,QAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CA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AA;8BAOe,OAAO,EAAA,CAAA;sBADtB,eAAe;uBAAC,SAAS;gBAIV,UAAU,EAAA,CAAA;sBADzB,eAAe;uBAAC,qBAAqB;gBAI/B,WAAW,EAAA,CAAA;sBADjB;gBAMU,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,MAAM;;;AChDJ,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,SAAS;IACT,OAAO;;;ACVX;;AAEG;;;;"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, Directive } from '@angular/core';
|
|
3
|
-
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
5
|
-
import * as i1 from '@taiga-ui/cdk/directives/animated';
|
|
6
|
-
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
7
|
-
import { TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
|
|
8
|
-
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
9
|
-
import { TuiDialogCloseService, TUI_DIALOGS_CLOSE, TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
|
|
10
|
-
import { TuiHeader, TUI_HEADER_OPTIONS } from '@taiga-ui/core/components/header';
|
|
11
|
-
import { TuiTitle } from '@taiga-ui/core/directives/title';
|
|
12
|
-
import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
13
|
-
import { injectContext, PolymorpheusTemplate, PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
14
|
-
import { of, isObservable, Subject, merge, switchMap, exhaustMap, take, map, filter } from 'rxjs';
|
|
15
|
-
import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
|
|
16
|
-
import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
|
|
17
|
-
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
18
|
-
|
|
19
|
-
const REQUIRED_ERROR = new Error('Required dialog was dismissed');
|
|
20
|
-
function toObservable(valueOrStream) {
|
|
21
|
-
return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);
|
|
22
|
-
}
|
|
23
|
-
class TuiDialogComponent {
|
|
24
|
-
constructor() {
|
|
25
|
-
this.close$ = new Subject();
|
|
26
|
-
this.close = toSignal(inject(TUI_CLOSE_WORD));
|
|
27
|
-
this.icons = inject(TUI_COMMON_ICONS);
|
|
28
|
-
this.context = injectContext();
|
|
29
|
-
this.primitive = !(this.context.content instanceof TemplateRef) &&
|
|
30
|
-
!(this.context.content instanceof PolymorpheusTemplate) &&
|
|
31
|
-
!(this.context.content instanceof PolymorpheusComponent);
|
|
32
|
-
this.sub = merge(this.close$.pipe(switchMap(() => toObservable(this.context.closable))), inject(TuiDialogCloseService).pipe(exhaustMap(() => toObservable(this.context.dismissible).pipe(take(1)))), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
|
|
33
|
-
.pipe(filter(Boolean), takeUntilDestroyed())
|
|
34
|
-
.subscribe(() => {
|
|
35
|
-
if (this.context.required) {
|
|
36
|
-
this.context.$implicit.error(REQUIRED_ERROR);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.context.$implicit.complete();
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { attributes: { "new": "" }, properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "context.size", "class._closable": "context.closable" } }, providers: [
|
|
45
|
-
TuiDialogCloseService,
|
|
46
|
-
{
|
|
47
|
-
provide: TUI_HEADER_OPTIONS,
|
|
48
|
-
useFactory: () => ({ size: getSize(injectContext()) }),
|
|
49
|
-
},
|
|
50
|
-
], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance === 'fullscreen' ? 'action' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ close() }}\n </button>\n}\n\n@if (!primitive && context.label) {\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n </hgroup>\n </header>\n}\n\n<ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n <p [innerHTML]=\"text\"></p>\n </hgroup>\n </header>\n @if (context.closable || context.dismissible) {\n <footer>\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n</ng-container>\n", styles: ["tui-dialog[new]{position:relative;box-sizing:border-box;font:var(--tui-font-text-m);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-popup)}tui-dialog[new]:not([data-appearance~=fullscreen])._closable>header,tui-dialog[new]:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog[new]>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[new][data-appearance~=taiga]{max-inline-size:calc(100vw - 5rem);margin:2.5rem;padding:1.75rem;border-radius:1.5rem;--tui-from: translateY(2.5rem)}tui-dialog[new][data-appearance~=taiga].tui-enter,tui-dialog[new][data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[new][data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[new][data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[new][data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[new][data-appearance~=taiga][data-size=s]>footer,tui-dialog[new][data-appearance~=taiga][data-size=s]>ng-component>footer,tui-dialog[new][data-appearance~=taiga][data-size=s]>tui-confirm>footer{margin-block-start:1.25rem}tui-dialog[new][data-appearance~=taiga][data-size=m]{inline-size:37.5rem}tui-dialog[new][data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[new][data-appearance~=taiga]>header:not(:last-child),tui-dialog[new][data-appearance~=taiga]>ng-component>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[new][data-appearance~=taiga]>footer,tui-dialog[new][data-appearance~=taiga]>ng-component>footer,tui-dialog[new][data-appearance~=taiga]>tui-confirm>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[new][data-appearance~=fullscreen]{display:flex;flex-direction:column;block-size:100%;inline-size:100%;padding:env(safe-area-inset-top) max(calc(50vw - var(--tui-width) / 2),1rem) max(2rem,env(safe-area-inset-bottom));background:var(--tui-background-base);box-shadow:none;--tui-width: 45rem;--tui-from: translateY(2rem)}tui-dialog[new][data-appearance~=fullscreen].tui-enter,tui-dialog[new][data-appearance~=fullscreen].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[new][data-appearance~=fullscreen]>.t-close{position:sticky;top:env(safe-area-inset-top);block-size:4rem;inline-size:auto;align-self:flex-end;margin-block-end:2rem;border-radius:0!important;font:var(--tui-font-text-m)!important;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0 / 0 / env(safe-area-inset-top) 100vw 0}tui-dialog[new][data-appearance~=fullscreen]>.t-close:before{display:none}tui-dialog[new][data-appearance~=fullscreen].tui-app-bar .t-close{display:none}tui-dialog[new][data-appearance~=fullscreen]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[new][data-appearance~=fullscreen]>tui-app-bar,tui-dialog[new][data-appearance~=fullscreen]>ng-component>tui-app-bar{position:sticky;top:0;z-index:1;order:-1;border-inline-end:calc(50vw - var(--tui-width) / 2) solid transparent;border-inline-start:calc(50vw - var(--tui-width) / 2) solid transparent;margin:0 calc(var(--tui-width) / 2 - 50vw) 2rem}tui-dialog[new][data-appearance~=fullscreen]>header,tui-dialog[new][data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-dialog[new][data-appearance~=fullscreen]>ng-component>header,tui-dialog[new][data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin-block-end:2rem}tui-dialog[new][data-appearance~=fullscreen]>footer,tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{display:flex;gap:.5rem .75rem;padding:2rem calc(50vw - var(--tui-width) / 2);margin:0 calc(var(--tui-width) / 2 - 50vw) calc(-2rem - env(safe-area-inset-top))}tui-dialog[new][data-appearance~=fullscreen]>footer:before,tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{flex-direction:row;background:color-mix(in hsl,var(--tui-background-base) 80%,transparent);-webkit-backdrop-filter:blur(2rem);backdrop-filter:blur(2rem)}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer:before,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer>button,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer>a,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>tui-app-bar,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>tui-app-bar{margin:calc(-1*env(safe-area-inset-top)) -1rem 1rem;padding-block-start:env(safe-area-inset-top);box-sizing:content-box}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>footer,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{padding:0 1rem max(1rem,env(safe-area-inset-bottom));margin:1.5rem -1rem calc(-1*max(1rem,env(safe-area-inset-bottom)))}\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"] }, { kind: "directive", type: TuiHeader, selector: "[tuiHeader]", inputs: ["tuiHeader"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{ selector: 'tui-dialog', imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton, TuiHeader, TuiTitle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [
|
|
55
|
-
TuiDialogCloseService,
|
|
56
|
-
{
|
|
57
|
-
provide: TUI_HEADER_OPTIONS,
|
|
58
|
-
useFactory: () => ({ size: getSize(injectContext()) }),
|
|
59
|
-
},
|
|
60
|
-
], hostDirectives: [TuiAnimated], host: {
|
|
61
|
-
new: '',
|
|
62
|
-
'[attr.data-appearance]': 'context.appearance',
|
|
63
|
-
'[attr.data-size]': 'context.size',
|
|
64
|
-
'[class._closable]': 'context.closable',
|
|
65
|
-
}, template: "@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance === 'fullscreen' ? 'action' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ close() }}\n </button>\n}\n\n@if (!primitive && context.label) {\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n </hgroup>\n </header>\n}\n\n<ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n <p [innerHTML]=\"text\"></p>\n </hgroup>\n </header>\n @if (context.closable || context.dismissible) {\n <footer>\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n</ng-container>\n", styles: ["tui-dialog[new]{position:relative;box-sizing:border-box;font:var(--tui-font-text-m);background:var(--tui-background-elevation-1);box-shadow:var(--tui-shadow-popup)}tui-dialog[new]:not([data-appearance~=fullscreen])._closable>header,tui-dialog[new]:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog[new]>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[new][data-appearance~=taiga]{max-inline-size:calc(100vw - 5rem);margin:2.5rem;padding:1.75rem;border-radius:1.5rem;--tui-from: translateY(2.5rem)}tui-dialog[new][data-appearance~=taiga].tui-enter,tui-dialog[new][data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[new][data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[new][data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[new][data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[new][data-appearance~=taiga][data-size=s]>footer,tui-dialog[new][data-appearance~=taiga][data-size=s]>ng-component>footer,tui-dialog[new][data-appearance~=taiga][data-size=s]>tui-confirm>footer{margin-block-start:1.25rem}tui-dialog[new][data-appearance~=taiga][data-size=m]{inline-size:37.5rem}tui-dialog[new][data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[new][data-appearance~=taiga]>header:not(:last-child),tui-dialog[new][data-appearance~=taiga]>ng-component>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[new][data-appearance~=taiga]>footer,tui-dialog[new][data-appearance~=taiga]>ng-component>footer,tui-dialog[new][data-appearance~=taiga]>tui-confirm>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[new][data-appearance~=fullscreen]{display:flex;flex-direction:column;block-size:100%;inline-size:100%;padding:env(safe-area-inset-top) max(calc(50vw - var(--tui-width) / 2),1rem) max(2rem,env(safe-area-inset-bottom));background:var(--tui-background-base);box-shadow:none;--tui-width: 45rem;--tui-from: translateY(2rem)}tui-dialog[new][data-appearance~=fullscreen].tui-enter,tui-dialog[new][data-appearance~=fullscreen].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[new][data-appearance~=fullscreen]>.t-close{position:sticky;top:env(safe-area-inset-top);block-size:4rem;inline-size:auto;align-self:flex-end;margin-block-end:2rem;border-radius:0!important;font:var(--tui-font-text-m)!important;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0 / 0 / env(safe-area-inset-top) 100vw 0}tui-dialog[new][data-appearance~=fullscreen]>.t-close:before{display:none}tui-dialog[new][data-appearance~=fullscreen].tui-app-bar .t-close{display:none}tui-dialog[new][data-appearance~=fullscreen]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[new][data-appearance~=fullscreen]>tui-app-bar,tui-dialog[new][data-appearance~=fullscreen]>ng-component>tui-app-bar{position:sticky;top:0;z-index:1;order:-1;border-inline-end:calc(50vw - var(--tui-width) / 2) solid transparent;border-inline-start:calc(50vw - var(--tui-width) / 2) solid transparent;margin:0 calc(var(--tui-width) / 2 - 50vw) 2rem}tui-dialog[new][data-appearance~=fullscreen]>header,tui-dialog[new][data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-dialog[new][data-appearance~=fullscreen]>ng-component>header,tui-dialog[new][data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin-block-end:2rem}tui-dialog[new][data-appearance~=fullscreen]>footer,tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{display:flex;gap:.5rem .75rem;padding:2rem calc(50vw - var(--tui-width) / 2);margin:0 calc(var(--tui-width) / 2 - 50vw) calc(-2rem - env(safe-area-inset-top))}tui-dialog[new][data-appearance~=fullscreen]>footer:before,tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{flex-direction:row;background:color-mix(in hsl,var(--tui-background-base) 80%,transparent);-webkit-backdrop-filter:blur(2rem);backdrop-filter:blur(2rem)}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer:before,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer>button,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>footer>a,tui-root:not(._mobile) tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>tui-app-bar,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>tui-app-bar{margin:calc(-1*env(safe-area-inset-top)) -1rem 1rem;padding-block-start:env(safe-area-inset-top);box-sizing:content-box}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>header,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>footer,tui-root._mobile tui-dialog[new][data-appearance~=fullscreen]>ng-component>footer{padding:0 1rem max(1rem,env(safe-area-inset-bottom));margin:1.5rem -1rem calc(-1*max(1rem,env(safe-area-inset-bottom)))}\n"] }]
|
|
66
|
-
}] });
|
|
67
|
-
function getSize({ appearance, size }) {
|
|
68
|
-
if (appearance.includes('fullscreen')) {
|
|
69
|
-
return 'h3';
|
|
70
|
-
}
|
|
71
|
-
return size === 's' ? 'h5' : 'h4';
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
75
|
-
appearance: 'taiga',
|
|
76
|
-
size: 'm',
|
|
77
|
-
required: false,
|
|
78
|
-
closable: true,
|
|
79
|
-
dismissible: true,
|
|
80
|
-
label: '',
|
|
81
|
-
data: undefined,
|
|
82
|
-
};
|
|
83
|
-
const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions(TUI_DIALOG_DEFAULT_OPTIONS);
|
|
84
|
-
|
|
85
|
-
class TuiDialogService extends TuiPopoverService {
|
|
86
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, providedIn: 'root', useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)) }); }
|
|
88
|
-
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, decorators: [{
|
|
90
|
-
type: Injectable,
|
|
91
|
-
args: [{
|
|
92
|
-
providedIn: 'root',
|
|
93
|
-
useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),
|
|
94
|
-
}]
|
|
95
|
-
}] });
|
|
96
|
-
|
|
97
|
-
class TuiDialog extends TuiPopoverDirective {
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
99
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDialog, isStandalone: true, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [tuiAsPopover(TuiDialogService)], usesInheritance: true, ngImport: i0 }); }
|
|
100
|
-
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, decorators: [{
|
|
102
|
-
type: Directive,
|
|
103
|
-
args: [{
|
|
104
|
-
standalone: true,
|
|
105
|
-
selector: 'ng-template[tuiDialog]',
|
|
106
|
-
inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],
|
|
107
|
-
outputs: ['openChange: tuiDialogChange'],
|
|
108
|
-
providers: [tuiAsPopover(TuiDialogService)],
|
|
109
|
-
}]
|
|
110
|
-
}] });
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Generated bundle index. Do not edit.
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
export { TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialog, TuiDialogComponent, TuiDialogService, tuiDialogOptionsProvider };
|
|
117
|
-
//# sourceMappingURL=taiga-ui-experimental-components-dialog.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-dialog.mjs","sources":["../../../projects/experimental/components/dialog/dialog.component.ts","../../../projects/experimental/components/dialog/dialog.template.html","../../../projects/experimental/components/dialog/dialog.options.ts","../../../projects/experimental/components/dialog/dialog.service.ts","../../../projects/experimental/components/dialog/dialog.directive.ts","../../../projects/experimental/components/dialog/taiga-ui-experimental-components-dialog.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n inject,\n TemplateRef,\n ViewEncapsulation,\n} 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 {TUI_HEADER_OPTIONS, TuiHeader} from '@taiga-ui/core/components/header';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {\n injectContext,\n PolymorpheusComponent,\n PolymorpheusOutlet,\n PolymorpheusTemplate,\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} from './dialog.options';\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',\n imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton, TuiHeader, TuiTitle],\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n encapsulation: ViewEncapsulation.None,\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: [\n TuiDialogCloseService,\n {\n provide: TUI_HEADER_OPTIONS,\n useFactory: (): {\n size: string;\n } => ({size: getSize(injectContext())}),\n },\n ],\n hostDirectives: [TuiAnimated],\n host: {\n new: '',\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'context.size',\n '[class._closable]': 'context.closable',\n },\n})\nexport class TuiDialogComponent<O, I> {\n protected readonly close$ = new Subject<void>();\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly context = injectContext<TuiPopover<TuiDialogOptions<I>, O>>();\n protected readonly primitive =\n !(this.context.content instanceof TemplateRef) &&\n !(this.context.content instanceof PolymorpheusTemplate) &&\n !(this.context.content instanceof PolymorpheusComponent);\n\n protected readonly sub = 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 if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n });\n}\n\nfunction getSize({appearance, size}: TuiDialogOptions<unknown>): 'h3' | 'h4' | 'h5' {\n if (appearance.includes('fullscreen')) {\n return 'h3';\n }\n\n return size === 's' ? 'h5' : 'h4';\n}\n","@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance === 'fullscreen' ? 'action' : 'neutral'\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"close$.next()\"\n (mousedown.prevent.zoneless)=\"(0)\"\n >\n {{ close() }}\n </button>\n}\n\n@if (!primitive && context.label) {\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n </hgroup>\n </header>\n}\n\n<ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <header tuiHeader>\n <hgroup tuiTitle>\n <h2\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></h2>\n <p [innerHTML]=\"text\"></p>\n </hgroup>\n </header>\n @if (context.closable || context.dismissible) {\n <footer>\n <button\n size=\"m\"\n tuiAutoFocus\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n</ng-container>\n","import {type TuiPopoverContext} from '@taiga-ui/cdk/services';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type Observable} from 'rxjs';\n\n/**\n * Options for a dialog\n *\n * appearance - data-appearance attribute of the dialog ('taiga' by default)\n * closable - show close button (true by default)\n * data - arbitrary data for dialog\n * dismissible - close dialog by Esc button or click on overlay (true by default)\n * label - string title for the dialog ('' by default)\n * required - dismissing or closing dialog by X button throws (false by default)\n * size - size of the dialog ('m' by default)\n */\nexport interface TuiDialogOptions<I> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I extends void ? undefined : I;\n readonly dismissible: Observable<boolean> | boolean;\n readonly label: string;\n readonly required: boolean;\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nexport interface TuiDialogContext<O = void, I = undefined>\n extends TuiPopoverContext<O>,\n TuiDialogOptions<I> {}\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void> = {\n appearance: 'taiga',\n size: 'm',\n required: false,\n closable: true,\n dismissible: true,\n label: '',\n data: undefined,\n};\n\nexport const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions(\n 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 {TUI_DIALOG_OPTIONS, type TuiDialogOptions} from './dialog.options';\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.options';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAsCA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,+BAA+B,CAAC;AAEjE,SAAS,YAAY,CAAI,aAAgC,EAAA;AACrD,IAAA,OAAO,YAAY,CAAC,aAAa,CAAC,GAAG,aAAa,GAAG,EAAE,CAAC,aAAa,CAAC;AAC1E;MA4Ba,kBAAkB,CAAA;AA1B/B,IAAA,WAAA,GAAA;AA2BuB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ;QAC5B,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAChC,IAAO,CAAA,OAAA,GAAG,aAAa,EAAsC;QAC7D,IAAS,CAAA,SAAA,GACxB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,YAAY,WAAW,CAAC;YAC9C,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,YAAY,oBAAoB,CAAC;YACvD,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,YAAY,qBAAqB,CAAC;AAEzC,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,E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C,CAAC,EAAA,CAAA,CAAA;;4FAE5E,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AAClB,oBAAA,UAAU,EAAE,MACR,IAAqB,gBAAA,CAAA,WAAW,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACxF,iBAAA;;;ACGK,MAAO,SAAa,SAAQ,mBAAwC,CAAA;+GAA7D,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,oMAFP,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAElC,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,MAAM,EAAE,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;oBACxD,OAAO,EAAE,CAAC,6BAA6B,CAAC;AACxC,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAC9C,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ChangeDetectorRef, signal, TemplateRef, Input, ContentChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { TuiItem } from '@taiga-ui/cdk/directives/item';
|
|
5
|
-
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
6
|
-
|
|
7
|
-
class TuiExpand {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.el = tuiInjectElement();
|
|
10
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
11
|
-
this.signal = signal(false);
|
|
12
|
-
this.animating = signal(false);
|
|
13
|
-
}
|
|
14
|
-
set expanded(expanded) {
|
|
15
|
-
if (expanded === this.signal()) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
this.signal.set(expanded);
|
|
19
|
-
// TODO: try removing in Angular 17
|
|
20
|
-
this.cdr.detectChanges();
|
|
21
|
-
this.el.classList.toggle('_expanded', expanded);
|
|
22
|
-
}
|
|
23
|
-
onTransitionEnd({ propertyName }) {
|
|
24
|
-
if (propertyName === 'grid-template-rows') {
|
|
25
|
-
this.animating.set(this.signal());
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiExpand, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiExpand, isStandalone: true, selector: "tui-expand", inputs: { expanded: "expanded" }, host: { listeners: { "transitionend.self": "onTransitionEnd($event)" }, properties: { "class._expanded": "signal()" } }, queries: [{ propertyName: "content", first: true, predicate: TuiItem, descendants: true, read: TemplateRef }], ngImport: i0, template: `
|
|
30
|
-
<div class="t-wrapper">
|
|
31
|
-
@if (signal() || animating()) {
|
|
32
|
-
<ng-container [ngTemplateOutlet]="content || null" />
|
|
33
|
-
}
|
|
34
|
-
<ng-content />
|
|
35
|
-
</div>
|
|
36
|
-
`, isInline: true, styles: [":host{transition-property:grid-template-rows,padding;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:grid;grid-template-rows:0fr;transition-delay:1ms}:host:not(._expanded){padding-block:0}:host._expanded{grid-template-rows:1fr}:host._expanded .t-wrapper{opacity:1;visibility:visible}.t-wrapper{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;opacity:0;visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiExpand, decorators: [{
|
|
39
|
-
type: Component,
|
|
40
|
-
args: [{ selector: 'tui-expand', imports: [NgTemplateOutlet], template: `
|
|
41
|
-
<div class="t-wrapper">
|
|
42
|
-
@if (signal() || animating()) {
|
|
43
|
-
<ng-container [ngTemplateOutlet]="content || null" />
|
|
44
|
-
}
|
|
45
|
-
<ng-content />
|
|
46
|
-
</div>
|
|
47
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
48
|
-
'[class._expanded]': 'signal()',
|
|
49
|
-
'(transitionend.self)': 'onTransitionEnd($event)',
|
|
50
|
-
}, styles: [":host{transition-property:grid-template-rows,padding;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:grid;grid-template-rows:0fr;transition-delay:1ms}:host:not(._expanded){padding-block:0}:host._expanded{grid-template-rows:1fr}:host._expanded .t-wrapper{opacity:1;visibility:visible}.t-wrapper{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;opacity:0;visibility:hidden}\n"] }]
|
|
51
|
-
}], propDecorators: { content: [{
|
|
52
|
-
type: ContentChild,
|
|
53
|
-
args: [TuiItem, { read: TemplateRef }]
|
|
54
|
-
}], expanded: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}] } });
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Generated bundle index. Do not edit.
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
export { TuiExpand };
|
|
63
|
-
//# sourceMappingURL=taiga-ui-experimental-components-expand.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-expand.mjs","sources":["../../../projects/experimental/components/expand/expand.component.ts","../../../projects/experimental/components/expand/taiga-ui-experimental-components-expand.ts"],"sourcesContent":["import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n inject,\n Input,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport {TuiItem} from '@taiga-ui/cdk/directives/item';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Component({\n selector: 'tui-expand',\n imports: [NgTemplateOutlet],\n template: `\n <div class=\"t-wrapper\">\n @if (signal() || animating()) {\n <ng-container [ngTemplateOutlet]=\"content || null\" />\n }\n <ng-content />\n </div>\n `,\n styleUrls: ['./expand.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._expanded]': 'signal()',\n '(transitionend.self)': 'onTransitionEnd($event)',\n },\n})\nexport class TuiExpand {\n private readonly el = tuiInjectElement();\n private readonly cdr = inject(ChangeDetectorRef);\n\n @ContentChild(TuiItem, {read: TemplateRef})\n protected content?: TemplateRef<any>;\n\n protected readonly signal = signal(false);\n protected readonly animating = signal(false);\n\n @Input()\n public set expanded(expanded: boolean) {\n if (expanded === this.signal()) {\n return;\n }\n\n this.signal.set(expanded);\n // TODO: try removing in Angular 17\n this.cdr.detectChanges();\n this.el.classList.toggle('_expanded', expanded);\n }\n\n protected onTransitionEnd({propertyName}: TransitionEvent): void {\n if (propertyName === 'grid-template-rows') {\n this.animating.set(this.signal());\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mapp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,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,OAAO,EAAS,WAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAW,EAnB/B,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;AAOT,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ohBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EARS,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAgBjB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAlBrB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACb,OAAA,EAAA,CAAC,gBAAgB,CAAC,EACjB,QAAA,EAAA;;;;;;;KAOT,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,yBAAyB;AACpD,qBAAA,EAAA,MAAA,EAAA,CAAA,ohBAAA,CAAA,EAAA;8BAOS,OAAO,EAAA,CAAA;sBADhB,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAC,IAAI,EAAE,WAAW,EAAC;gBAO/B,QAAQ,EAAA,CAAA;sBADlB;;;AC1CL;;AAEG;;;;"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { EMPTY_CLIENT_RECT } from '@taiga-ui/cdk/constants';
|
|
6
|
-
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
7
|
-
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
8
|
-
import { TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
|
|
9
|
-
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
10
|
-
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
11
|
-
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
12
|
-
import { tuiPx, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
|
-
import { TuiRectAccessor } from '@taiga-ui/core/classes';
|
|
14
|
-
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
15
|
-
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
16
|
-
import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
|
|
17
|
-
import { TuiHintHover, TuiHintPointer, TuiHintUnstyledComponent, TUI_HINT_PROVIDERS, TUI_HINT_COMPONENT } from '@taiga-ui/core/directives/hint';
|
|
18
|
-
import { TuiVisualViewportService, TuiPositionService } from '@taiga-ui/core/services';
|
|
19
|
-
import { TUI_VIEWPORT } from '@taiga-ui/core/tokens';
|
|
20
|
-
import { tuiIsObscured } from '@taiga-ui/core/utils';
|
|
21
|
-
import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
22
|
-
import { takeWhile, map } from 'rxjs';
|
|
23
|
-
|
|
24
|
-
const GAP = 8;
|
|
25
|
-
class TuiHintComponent {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.el = tuiInjectElement();
|
|
28
|
-
this.hover = inject(TuiHintHover);
|
|
29
|
-
this.vvs = inject(TuiVisualViewportService);
|
|
30
|
-
this.viewport = inject(TUI_VIEWPORT);
|
|
31
|
-
this.pointer = inject(TuiHintPointer, { optional: true });
|
|
32
|
-
this.accessor = inject(TuiRectAccessor);
|
|
33
|
-
this.hint = injectContext().$implicit;
|
|
34
|
-
this.isMobile = inject(TUI_IS_MOBILE);
|
|
35
|
-
this.content = this.hint.component.component === TuiHintUnstyledComponent
|
|
36
|
-
? signal('')
|
|
37
|
-
: this.hint.content;
|
|
38
|
-
this.theme = this.hint.el
|
|
39
|
-
.closest('[tuiTheme]')
|
|
40
|
-
?.getAttribute('tuiTheme');
|
|
41
|
-
this.appearance = tuiAppearance(this.hint.appearance);
|
|
42
|
-
inject(TuiPositionService)
|
|
43
|
-
.pipe(takeWhile(() => this.hint.el.isConnected), map((point) => this.vvs.correct(point)), takeUntilDestroyed())
|
|
44
|
-
.subscribe({
|
|
45
|
-
next: ([top, left]) => this.update(top, left),
|
|
46
|
-
complete: () => this.hover.toggle(false),
|
|
47
|
-
});
|
|
48
|
-
inject(TuiHoveredService)
|
|
49
|
-
.pipe(takeUntilDestroyed())
|
|
50
|
-
.subscribe((hover) => this.hover.toggle(hover));
|
|
51
|
-
}
|
|
52
|
-
onClick(target) {
|
|
53
|
-
if ((!target.closest(this.el.tagName) && !this.hint.el.contains(target)) ||
|
|
54
|
-
tuiIsObscured(this.hint.el)) {
|
|
55
|
-
this.hover.toggle(false);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
apply(top, left, beakTop, beakLeft) {
|
|
59
|
-
this.el.style.top = top;
|
|
60
|
-
this.el.style.left = left;
|
|
61
|
-
this.el.style.setProperty('--t-top', `${beakTop}%`);
|
|
62
|
-
this.el.style.setProperty('--t-left', `${beakLeft}%`);
|
|
63
|
-
this.el.style.setProperty('--t-rotate', !beakLeft || Math.ceil(beakLeft) === 100 ? '90deg' : '0deg');
|
|
64
|
-
}
|
|
65
|
-
update(top, left) {
|
|
66
|
-
const { clientHeight, clientWidth } = this.el;
|
|
67
|
-
const rect = this.accessor.getClientRect();
|
|
68
|
-
if (rect === EMPTY_CLIENT_RECT || !clientHeight || !clientWidth) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const viewport = this.viewport.getClientRect();
|
|
72
|
-
const safeLeft = tuiClamp(Math.max(GAP, left), viewport.left + GAP, Math.max(GAP, viewport.width + viewport.left - clientWidth - GAP));
|
|
73
|
-
const [beakTop, beakLeft] = this.vvs.correct([
|
|
74
|
-
rect.top + rect.height / 2 - top,
|
|
75
|
-
rect.left + rect.width / 2 - safeLeft,
|
|
76
|
-
]);
|
|
77
|
-
this.apply(tuiPx(Math.round(top)), tuiPx(Math.round(safeLeft)), Math.round((tuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100), Math.round((tuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100));
|
|
78
|
-
}
|
|
79
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }], ngImport: i0, template: `
|
|
81
|
-
<ng-content />
|
|
82
|
-
<span
|
|
83
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
84
|
-
[innerHTML]="text"
|
|
85
|
-
></span>
|
|
86
|
-
`, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
87
|
-
}
|
|
88
|
-
__decorate([
|
|
89
|
-
tuiPure
|
|
90
|
-
], TuiHintComponent.prototype, "apply", null);
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, decorators: [{
|
|
92
|
-
type: Component,
|
|
93
|
-
args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
|
|
94
|
-
<ng-content />
|
|
95
|
-
<span
|
|
96
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
97
|
-
[innerHTML]="text"
|
|
98
|
-
></span>
|
|
99
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated], host: {
|
|
100
|
-
'[class._untouchable]': 'pointer',
|
|
101
|
-
'[class._mobile]': 'isMobile',
|
|
102
|
-
'[attr.tuiTheme]': 'theme',
|
|
103
|
-
'(document:click)': 'onClick($event.target)',
|
|
104
|
-
}, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
|
|
105
|
-
}], ctorParameters: () => [], propDecorators: { apply: [] } });
|
|
106
|
-
function tuiProvideExperimentalHint() {
|
|
107
|
-
return {
|
|
108
|
-
provide: TUI_HINT_COMPONENT,
|
|
109
|
-
useValue: TuiHintComponent,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Generated bundle index. Do not edit.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
export { TuiHintComponent, tuiProvideExperimentalHint };
|
|
118
|
-
//# sourceMappingURL=taiga-ui-experimental-components-hint.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-hint.mjs","sources":["../../../projects/experimental/components/hint/hint.component.ts","../../../projects/experimental/components/hint/taiga-ui-experimental-components-hint.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n inject,\n type Provider,\n signal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_CLIENT_RECT} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiHoveredService} from '@taiga-ui/cdk/directives/hovered';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure, tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiRectAccessor} from '@taiga-ui/core/classes';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiAppearance, tuiAppearance} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_HINT_COMPONENT,\n TUI_HINT_PROVIDERS,\n type TuiHintDirective,\n TuiHintHover,\n TuiHintPointer,\n TuiHintUnstyledComponent,\n} from '@taiga-ui/core/directives/hint';\nimport {TuiPositionService, TuiVisualViewportService} from '@taiga-ui/core/services';\nimport {TUI_VIEWPORT} from '@taiga-ui/core/tokens';\nimport {tuiIsObscured} from '@taiga-ui/core/utils';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {map, takeWhile} from 'rxjs';\n\nconst GAP = 8;\n\n@Component({\n selector: 'tui-hint',\n imports: [PolymorpheusOutlet],\n template: `\n <ng-content />\n <span\n *polymorpheusOutlet=\"content() as text; context: hint.context\"\n [innerHTML]=\"text\"\n ></span>\n `,\n styleUrls: ['./hint.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({size: 's'})],\n hostDirectives: [TuiAppearance, TuiAnimated],\n host: {\n '[class._untouchable]': 'pointer',\n '[class._mobile]': 'isMobile',\n '[attr.tuiTheme]': 'theme',\n '(document:click)': 'onClick($event.target)',\n },\n})\nexport class TuiHintComponent<C = any> {\n private readonly el = tuiInjectElement();\n private readonly hover = inject(TuiHintHover);\n private readonly vvs = inject(TuiVisualViewportService);\n private readonly viewport = inject(TUI_VIEWPORT);\n\n protected readonly pointer = inject(TuiHintPointer, {optional: true});\n protected readonly accessor = inject(TuiRectAccessor);\n protected readonly hint = injectContext<TuiContext<TuiHintDirective<C>>>().$implicit;\n protected readonly isMobile = inject(TUI_IS_MOBILE);\n\n protected readonly content =\n this.hint.component.component === TuiHintUnstyledComponent\n ? signal('')\n : this.hint.content;\n\n protected readonly theme = this.hint.el\n .closest('[tuiTheme]')\n ?.getAttribute('tuiTheme');\n\n protected readonly appearance = tuiAppearance(this.hint.appearance);\n\n constructor() {\n inject(TuiPositionService)\n .pipe(\n takeWhile(() => this.hint.el.isConnected),\n map((point) => this.vvs.correct(point)),\n takeUntilDestroyed(),\n )\n .subscribe({\n next: ([top, left]) => this.update(top, left),\n complete: () => this.hover.toggle(false),\n });\n\n inject(TuiHoveredService)\n .pipe(takeUntilDestroyed())\n .subscribe((hover) => this.hover.toggle(hover));\n }\n\n protected onClick(target: HTMLElement): void {\n if (\n (!target.closest(this.el.tagName) && !this.hint.el.contains(target)) ||\n tuiIsObscured(this.hint.el)\n ) {\n this.hover.toggle(false);\n }\n }\n\n @tuiPure\n private apply(top: string, left: string, beakTop: number, beakLeft: number): void {\n this.el.style.top = top;\n this.el.style.left = left;\n this.el.style.setProperty('--t-top', `${beakTop}%`);\n this.el.style.setProperty('--t-left', `${beakLeft}%`);\n this.el.style.setProperty(\n '--t-rotate',\n !beakLeft || Math.ceil(beakLeft) === 100 ? '90deg' : '0deg',\n );\n }\n\n private update(top: number, left: number): void {\n const {clientHeight, clientWidth} = this.el;\n const rect = this.accessor.getClientRect();\n\n if (rect === EMPTY_CLIENT_RECT || !clientHeight || !clientWidth) {\n return;\n }\n\n const viewport = this.viewport.getClientRect();\n const safeLeft = tuiClamp(\n Math.max(GAP, left),\n viewport.left + GAP,\n Math.max(GAP, viewport.width + viewport.left - clientWidth - GAP),\n );\n\n const [beakTop, beakLeft] = this.vvs.correct([\n rect.top + rect.height / 2 - top,\n rect.left + rect.width / 2 - safeLeft,\n ]);\n\n this.apply(\n tuiPx(Math.round(top)),\n tuiPx(Math.round(safeLeft)),\n Math.round((tuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100),\n Math.round((tuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100),\n );\n }\n}\n\nexport function tuiProvideExperimentalHint(): Provider {\n return {\n provide: TUI_HINT_COMPONENT,\n useValue: TuiHintComponent,\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,GAAG,GAAG,CAAC;MAuBA,gBAAgB,CAAA;AAsBzB,IAAA,WAAA,GAAA;QArBiB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC;QAE7B,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC,cAAc,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAClD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;AAClC,QAAA,IAAA,CAAA,IAAI,GAAG,aAAa,EAAmC,CAAC,SAAS;AACjE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAEhC,IAAO,CAAA,OAAA,GACtB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,KAAK;AAC9B,cAAE,MAAM,CAAC,EAAE;AACX,cAAE,IAAI,CAAC,IAAI,CAAC,OAAO;AAER,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;aAChC,OAAO,CAAC,YAAY;AACrB,cAAE,YAAY,CAAC,UAAU,CAAC;QAEX,IAAU,CAAA,UAAA,GAAG,aAAa,CAAC,IAAI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AA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;AAoEpB,UAAA,CAAA;IADP;AAUA,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,IAAA,CAAA;4FA1DQ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBArB5B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EACX,OAAA,EAAA,CAAC,kBAAkB,CAAC,EACnB,QAAA,EAAA;;;;;;KAMT,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EAAA,cAAA,EACtD,CAAC,aAAa,EAAE,WAAW,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,sBAAsB,EAAE,SAAS;AACjC,wBAAA,iBAAiB,EAAE,UAAU;AAC7B,wBAAA,iBAAiB,EAAE,OAAO;AAC1B,wBAAA,kBAAkB,EAAE,wBAAwB;AAC/C,qBAAA,EAAA,MAAA,EAAA,CAAA,+zIAAA,CAAA,EAAA;wDAmDO,KAAK,EAAA,EAAA,EAAA,EAAA,CAAA;SAwCD,0BAA0B,GAAA;IACtC,OAAO;AACH,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,QAAQ,EAAE,gBAAgB;KAC7B;AACL;;ACtJA;;AAEG;;;;"}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, signal, computed, effect, ElementRef, Input, Output, ViewChildren, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
-
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
|
-
import * as i3 from '@angular/forms';
|
|
5
|
-
import { FormsModule } from '@angular/forms';
|
|
6
|
-
import * as i1 from '@maskito/angular';
|
|
7
|
-
import { MaskitoDirective } from '@maskito/angular';
|
|
8
|
-
import { maskitoTransform, MASKITO_DEFAULT_OPTIONS, maskitoInitialCalibrationPlugin } from '@maskito/core';
|
|
9
|
-
import { maskitoPhoneOptionsGenerator, maskitoGetCountryFromNumber } from '@maskito/phone';
|
|
10
|
-
import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
11
|
-
import { EMPTY_QUERY, TUI_ALLOW_SIGNAL_WRITES, TUI_DEFAULT_MATCHER, CHAR_PLUS } from '@taiga-ui/cdk/constants';
|
|
12
|
-
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
13
|
-
import { TuiAutoFocus, tuiAutoFocusOptionsProvider } from '@taiga-ui/cdk/directives/auto-focus';
|
|
14
|
-
import { TUI_IS_IOS, tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
|
|
15
|
-
import { tuiInjectElement, tuiValue, tuiIsInputEvent } from '@taiga-ui/cdk/utils/dom';
|
|
16
|
-
import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
17
|
-
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
18
|
-
import { TuiCell } from '@taiga-ui/core/components/cell';
|
|
19
|
-
import * as i4 from '@taiga-ui/core/components/data-list';
|
|
20
|
-
import { TuiOptionNew, TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
21
|
-
import * as i2 from '@taiga-ui/core/components/textfield';
|
|
22
|
-
import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiWithTextfield, TuiTextfield } from '@taiga-ui/core/components/textfield';
|
|
23
|
-
import { tuiDropdownOpen, TuiDropdownOpen } from '@taiga-ui/core/directives/dropdown';
|
|
24
|
-
import { TuiTitle } from '@taiga-ui/core/directives/title';
|
|
25
|
-
import { TuiFlagPipe } from '@taiga-ui/core/pipes';
|
|
26
|
-
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
27
|
-
import { TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS } from '@taiga-ui/kit/components/input-phone-international';
|
|
28
|
-
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
29
|
-
import { TUI_INTERNATIONAL_SEARCH, TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
|
|
30
|
-
import { tuiMaskito, tuiGetCallingCode } from '@taiga-ui/kit/utils';
|
|
31
|
-
import { validatePhoneNumberLength } from 'libphonenumber-js';
|
|
32
|
-
import { from, filter, skip } from 'rxjs';
|
|
33
|
-
|
|
34
|
-
const NOT_FORM_CONTROL_SYMBOLS = /[^+\d]/g;
|
|
35
|
-
class TuiInputPhoneInternational extends TuiControl {
|
|
36
|
-
constructor() {
|
|
37
|
-
super(...arguments);
|
|
38
|
-
this.list = EMPTY_QUERY;
|
|
39
|
-
this.el = tuiInjectElement();
|
|
40
|
-
this.ios = inject(TUI_IS_IOS);
|
|
41
|
-
this.icons = inject(TUI_COMMON_ICONS);
|
|
42
|
-
this.options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);
|
|
43
|
-
this.countries = signal(this.options.countries);
|
|
44
|
-
this.code = signal(this.options.countryIsoCode);
|
|
45
|
-
this.label = toSignal(inject(TUI_INTERNATIONAL_SEARCH));
|
|
46
|
-
this.metadata = toSignal(from(this.options.metadata));
|
|
47
|
-
this.names = toSignal(inject(TUI_COUNTRIES));
|
|
48
|
-
this.open = tuiDropdownOpen();
|
|
49
|
-
this.search = signal('');
|
|
50
|
-
this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
|
|
51
|
-
this.mask = tuiMaskito(computed(() => this.computeMask(this.code(), this.metadata())));
|
|
52
|
-
this.masked = tuiValue(this.el);
|
|
53
|
-
this.valueChangeEffect = effect(() => {
|
|
54
|
-
this.onChange(this.unmask(this.masked()));
|
|
55
|
-
}, TUI_ALLOW_SIGNAL_WRITES);
|
|
56
|
-
this.filtered = computed(() => this.countries()
|
|
57
|
-
.map((iso) => ({
|
|
58
|
-
iso,
|
|
59
|
-
name: this.names()?.[iso] || '',
|
|
60
|
-
code: tuiGetCallingCode(iso, this.metadata()),
|
|
61
|
-
}))
|
|
62
|
-
.filter(({ name, code }) => TUI_DEFAULT_MATCHER(name + code, this.search())));
|
|
63
|
-
this.enabled = tuiDirectiveBinding(TuiDropdownOpen, 'tuiDropdownEnabled', this.interactive, {});
|
|
64
|
-
this.$ = inject(TuiActiveZone)
|
|
65
|
-
.tuiActiveZoneChange.pipe(filter(() => !this.readOnly()), takeUntilDestroyed())
|
|
66
|
-
.subscribe((active) => {
|
|
67
|
-
const prefix = `${tuiGetCallingCode(this.code(), this.metadata())} `;
|
|
68
|
-
this.search.set('');
|
|
69
|
-
this.masked.update((value) => {
|
|
70
|
-
const fallback = active ? value || prefix : value;
|
|
71
|
-
return value === prefix ? '' : fallback;
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
this.countrySearch = false;
|
|
75
|
-
this.countryIsoCodeChange = toObservable(this.code).pipe(skip(1));
|
|
76
|
-
}
|
|
77
|
-
set countriesValue(value) {
|
|
78
|
-
this.countries.set(value);
|
|
79
|
-
}
|
|
80
|
-
set isoCode(code) {
|
|
81
|
-
this.code.set(code);
|
|
82
|
-
}
|
|
83
|
-
writeValue(unmasked) {
|
|
84
|
-
const code = this.getCountryCode(unmasked ?? '');
|
|
85
|
-
if (code) {
|
|
86
|
-
this.code.set(code);
|
|
87
|
-
}
|
|
88
|
-
super.writeValue(unmasked);
|
|
89
|
-
this.masked.set(maskitoTransform(this.value() ?? '', this.mask() || MASKITO_DEFAULT_OPTIONS));
|
|
90
|
-
}
|
|
91
|
-
onPaste(event) {
|
|
92
|
-
const data = tuiIsInputEvent(event) && event.data;
|
|
93
|
-
if (!data ||
|
|
94
|
-
(!event.inputType.includes('Drop') && !event.inputType.includes('Paste'))) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const code = this.getCountryCode(data);
|
|
98
|
-
if (code) {
|
|
99
|
-
this.code.set(code);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
onItemClick(code) {
|
|
103
|
-
this.el.focus();
|
|
104
|
-
this.open.set(false);
|
|
105
|
-
this.code.set(code);
|
|
106
|
-
this.search.set('');
|
|
107
|
-
this.masked.set(maskitoTransform(this.value() || tuiGetCallingCode(code, this.metadata()), this.mask() || MASKITO_DEFAULT_OPTIONS));
|
|
108
|
-
}
|
|
109
|
-
computeMask(countryIsoCode, metadata) {
|
|
110
|
-
if (!metadata) {
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
const { plugins, ...options } = maskitoPhoneOptionsGenerator({
|
|
114
|
-
countryIsoCode,
|
|
115
|
-
metadata,
|
|
116
|
-
separator: this.options.separator,
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
...options,
|
|
120
|
-
plugins: [...plugins, maskitoInitialCalibrationPlugin()],
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
unmask(maskedValue) {
|
|
124
|
-
const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');
|
|
125
|
-
return value === tuiGetCallingCode(this.code(), this.metadata()) ? '' : value;
|
|
126
|
-
}
|
|
127
|
-
getCountryCode(value) {
|
|
128
|
-
const metadata = this.metadata();
|
|
129
|
-
const phone = value.startsWith(CHAR_PLUS) ? value : CHAR_PLUS + value;
|
|
130
|
-
return metadata && validatePhoneNumberLength(phone) !== 'TOO_SHORT'
|
|
131
|
-
? (maskitoGetCountryFromNumber(phone, metadata) ?? null)
|
|
132
|
-
: null;
|
|
133
|
-
}
|
|
134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternational, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
135
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputPhoneInternational, isStandalone: true, selector: "input[tuiInputPhoneInternational]", inputs: { countrySearch: "countrySearch", countriesValue: ["countries", "countriesValue"], isoCode: ["countryIsoCode", "isoCode"] }, outputs: { countryIsoCodeChange: "countryIsoCodeChange" }, host: { attributes: { "type": "tel", "ngSkipHydration": "true" }, listeners: { "input": "masked.set($event.target.value)", "click": "open.set(false)", "beforeinput.capture": "onPaste($event)" }, properties: { "attr.inputmode": "!ios && open() ? \"none\" : null", "disabled": "disabled()" } }, providers: [
|
|
136
|
-
tuiAsControl(TuiInputPhoneInternational),
|
|
137
|
-
tuiFallbackValueProvider(''),
|
|
138
|
-
tuiAutoFocusOptionsProvider({ preventScroll: true }),
|
|
139
|
-
], viewQueries: [{ propertyName: "list", predicate: TuiOptionNew, descendants: true, read: ElementRef }], usesInheritance: true, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithTextfield }], ngImport: i0, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (pointerdown.prevent)=\"interactive() && open.set(!open())\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()?.[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-container *tuiTextfieldDropdown>\n @if (countrySearch) {\n <div\n #element\n class=\"t-ipi-search\"\n >\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiTextfield\n type=\"text\"\n [focused]=\"true\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!!element.closest('tui-dropdown-mobile')\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n }\n\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track item) {\n <button\n new\n tuiOption\n type=\"button\"\n [tuiCell]=\"size()\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}tui-root:has(tui-dropdown-mobile) [tuiInputPhoneInternational][tuiInputPhoneInternational]{caret-color:transparent}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { 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: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i4.TuiOptionNew, selector: "button[tuiOption][new], a[tuiOption][new], label[tuiOption][new]", inputs: ["disabled"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "component", type: i2.TuiTextfieldComponent, selector: "tui-textfield:not([multi])" }, { kind: "directive", type: i2.TuiTextfieldDirective, selector: "input[tuiTextfield]" }, { kind: "directive", type: i2.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i2.TuiTextfieldDropdownDirective, selector: "ng-template[tuiTextfieldDropdown]" }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
140
|
-
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputPhoneInternational, decorators: [{
|
|
142
|
-
type: Component,
|
|
143
|
-
args: [{ selector: 'input[tuiInputPhoneInternational]', imports: [
|
|
144
|
-
FormsModule,
|
|
145
|
-
TuiAutoFocus,
|
|
146
|
-
TuiButton,
|
|
147
|
-
TuiCell,
|
|
148
|
-
TuiChevron,
|
|
149
|
-
TuiDataList,
|
|
150
|
-
TuiFlagPipe,
|
|
151
|
-
TuiTextfield,
|
|
152
|
-
TuiTextfieldContent,
|
|
153
|
-
TuiTitle,
|
|
154
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
155
|
-
tuiAsControl(TuiInputPhoneInternational),
|
|
156
|
-
tuiFallbackValueProvider(''),
|
|
157
|
-
tuiAutoFocusOptionsProvider({ preventScroll: true }),
|
|
158
|
-
], hostDirectives: [MaskitoDirective, TuiWithTextfield], host: {
|
|
159
|
-
type: 'tel',
|
|
160
|
-
ngSkipHydration: 'true',
|
|
161
|
-
'[attr.inputmode]': '!ios && open() ? "none" : null',
|
|
162
|
-
'[disabled]': 'disabled()',
|
|
163
|
-
'(input)': 'masked.set($event.target.value)',
|
|
164
|
-
'(click)': 'open.set(false)',
|
|
165
|
-
'(beforeinput.capture)': 'onPaste($event)',
|
|
166
|
-
}, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (pointerdown.prevent)=\"interactive() && open.set(!open())\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()?.[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-container *tuiTextfieldDropdown>\n @if (countrySearch) {\n <div\n #element\n class=\"t-ipi-search\"\n >\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiTextfield\n type=\"text\"\n [focused]=\"true\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!!element.closest('tui-dropdown-mobile')\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n }\n\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track item) {\n <button\n new\n tuiOption\n type=\"button\"\n [tuiCell]=\"size()\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}tui-root:has(tui-dropdown-mobile) [tuiInputPhoneInternational][tuiInputPhoneInternational]{caret-color:transparent}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}\n"] }]
|
|
167
|
-
}], propDecorators: { list: [{
|
|
168
|
-
type: ViewChildren,
|
|
169
|
-
args: [TuiOptionNew, { read: ElementRef }]
|
|
170
|
-
}], countrySearch: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], countryIsoCodeChange: [{
|
|
173
|
-
type: Output
|
|
174
|
-
}], countriesValue: [{
|
|
175
|
-
type: Input,
|
|
176
|
-
args: ['countries']
|
|
177
|
-
}], isoCode: [{
|
|
178
|
-
type: Input,
|
|
179
|
-
args: ['countryIsoCode']
|
|
180
|
-
}] } });
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Generated bundle index. Do not edit.
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
export { TuiInputPhoneInternational };
|
|
187
|
-
//# sourceMappingURL=taiga-ui-experimental-components-input-phone-international.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-input-phone-international.mjs","sources":["../../../projects/experimental/components/input-phone-international/input-phone-international.component.ts","../../../projects/experimental/components/input-phone-international/input-phone-international.template.html","../../../projects/experimental/components/input-phone-international/taiga-ui-experimental-components-input-phone-international.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {FormsModule} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n maskitoInitialCalibrationPlugin,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoGetCountryFromNumber, maskitoPhoneOptionsGenerator} from '@maskito/phone';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {\n CHAR_PLUS,\n EMPTY_QUERY,\n TUI_ALLOW_SIGNAL_WRITES,\n TUI_DEFAULT_MATCHER,\n} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {\n TuiAutoFocus,\n tuiAutoFocusOptionsProvider,\n} from '@taiga-ui/cdk/directives/auto-focus';\nimport {TUI_IS_IOS, tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsInputEvent, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiCell} from '@taiga-ui/core/components/cell';\nimport {TuiDataList, TuiOptionNew} from '@taiga-ui/core/components/data-list';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfield,\n TuiTextfieldContent,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownOpen, tuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TuiFlagPipe} from '@taiga-ui/core/pipes';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS} from '@taiga-ui/kit/components/input-phone-international';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {TUI_COUNTRIES, TUI_INTERNATIONAL_SEARCH} from '@taiga-ui/kit/tokens';\nimport {tuiGetCallingCode, tuiMaskito} from '@taiga-ui/kit/utils';\nimport {validatePhoneNumberLength} from 'libphonenumber-js';\nimport {type MetadataJson} from 'libphonenumber-js/core';\nimport {filter, from, skip} from 'rxjs';\n\nconst NOT_FORM_CONTROL_SYMBOLS = /[^+\\d]/g;\n\n@Component({\n selector: 'input[tuiInputPhoneInternational]',\n imports: [\n FormsModule,\n TuiAutoFocus,\n TuiButton,\n TuiCell,\n TuiChevron,\n TuiDataList,\n TuiFlagPipe,\n TuiTextfield,\n TuiTextfieldContent,\n TuiTitle,\n ],\n templateUrl: './input-phone-international.template.html',\n styleUrls: ['./input-phone-international.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsControl(TuiInputPhoneInternational),\n tuiFallbackValueProvider(''),\n tuiAutoFocusOptionsProvider({preventScroll: true}),\n ],\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n type: 'tel',\n ngSkipHydration: 'true',\n '[attr.inputmode]': '!ios && open() ? \"none\" : null',\n '[disabled]': 'disabled()',\n '(input)': 'masked.set($event.target.value)',\n '(click)': 'open.set(false)',\n '(beforeinput.capture)': 'onPaste($event)',\n },\n})\nexport class TuiInputPhoneInternational extends TuiControl<string> {\n @ViewChildren(TuiOptionNew, {read: ElementRef})\n protected readonly list: QueryList<ElementRef<HTMLButtonElement>> = EMPTY_QUERY;\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly ios = inject(TUI_IS_IOS);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);\n protected readonly countries = signal(this.options.countries);\n protected readonly code = signal(this.options.countryIsoCode);\n protected readonly label = toSignal(inject(TUI_INTERNATIONAL_SEARCH));\n protected readonly metadata = toSignal(from(this.options.metadata));\n protected readonly names = toSignal(inject(TUI_COUNTRIES));\n protected readonly open = tuiDropdownOpen();\n protected readonly search = signal<string>('');\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n\n protected readonly mask = tuiMaskito(\n computed(() => this.computeMask(this.code(), this.metadata())),\n );\n\n protected readonly masked = tuiValue(this.el);\n\n protected valueChangeEffect = effect(() => {\n this.onChange(this.unmask(this.masked()));\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly filtered = computed(() =>\n this.countries()\n .map((iso) => ({\n iso,\n name: this.names()?.[iso] || '',\n code: tuiGetCallingCode(iso, this.metadata()),\n }))\n .filter(({name, code}) => TUI_DEFAULT_MATCHER(name + code, this.search())),\n );\n\n protected readonly enabled = tuiDirectiveBinding(\n TuiDropdownOpen,\n 'tuiDropdownEnabled',\n this.interactive,\n {},\n );\n\n protected readonly $ = inject(TuiActiveZone)\n .tuiActiveZoneChange.pipe(\n filter(() => !this.readOnly()),\n takeUntilDestroyed(),\n )\n .subscribe((active) => {\n const prefix = `${tuiGetCallingCode(this.code(), this.metadata())} `;\n\n this.search.set('');\n this.masked.update((value) => {\n const fallback = active ? value || prefix : value;\n\n return value === prefix ? '' : fallback;\n });\n });\n\n @Input()\n public countrySearch = false;\n\n @Output()\n public readonly countryIsoCodeChange = toObservable(this.code).pipe(skip(1));\n\n @Input('countries')\n public set countriesValue(value: readonly TuiCountryIsoCode[]) {\n this.countries.set(value);\n }\n\n @Input('countryIsoCode')\n public set isoCode(code: TuiCountryIsoCode) {\n this.code.set(code);\n }\n\n public override writeValue(unmasked: string | null): void {\n const code = this.getCountryCode(unmasked ?? '');\n\n if (code) {\n this.code.set(code);\n }\n\n super.writeValue(unmasked);\n this.masked.set(\n maskitoTransform(this.value() ?? '', this.mask() || MASKITO_DEFAULT_OPTIONS),\n );\n }\n\n protected onPaste(event: Event): void {\n const data = tuiIsInputEvent(event) && event.data;\n\n if (\n !data ||\n (!event.inputType.includes('Drop') && !event.inputType.includes('Paste'))\n ) {\n return;\n }\n\n const code = this.getCountryCode(data);\n\n if (code) {\n this.code.set(code);\n }\n }\n\n protected onItemClick(code: TuiCountryIsoCode): void {\n this.el.focus();\n this.open.set(false);\n this.code.set(code);\n this.search.set('');\n this.masked.set(\n maskitoTransform(\n this.value() || tuiGetCallingCode(code, this.metadata()),\n this.mask() || MASKITO_DEFAULT_OPTIONS,\n ),\n );\n }\n\n private computeMask(\n countryIsoCode: TuiCountryIsoCode,\n metadata?: MetadataJson,\n ): MaskitoOptions | null {\n if (!metadata) {\n return null;\n }\n\n const {plugins, ...options} = maskitoPhoneOptionsGenerator({\n countryIsoCode,\n metadata,\n separator: this.options.separator,\n });\n\n return {\n ...options,\n plugins: [...plugins, maskitoInitialCalibrationPlugin()],\n };\n }\n\n private unmask(maskedValue: string): string {\n const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');\n\n return value === tuiGetCallingCode(this.code(), this.metadata()) ? '' : value;\n }\n\n private getCountryCode(value: string): TuiCountryIsoCode | null {\n const metadata = this.metadata();\n const phone = value.startsWith(CHAR_PLUS) ? value : CHAR_PLUS + value;\n\n return metadata && validatePhoneNumberLength(phone) !== 'TOO_SHORT'\n ? (maskitoGetCountryFromNumber(phone, metadata) ?? null)\n : null;\n }\n}\n","<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (pointerdown.prevent)=\"interactive() && open.set(!open())\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()?.[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-container *tuiTextfieldDropdown>\n @if (countrySearch) {\n <div\n #element\n class=\"t-ipi-search\"\n >\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiTextfield\n type=\"text\"\n [focused]=\"true\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!!element.closest('tui-dropdown-mobile')\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n }\n\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track item) {\n <button\n new\n tuiOption\n type=\"button\"\n [tuiCell]=\"size()\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,MAAM,wBAAwB,GAAG,SAAS;AAoCpC,MAAO,0BAA2B,SAAQ,UAAkB,CAAA;AAlClE,IAAA,WAAA,GAAA;;QAoCuB,IAAI,CAAA,IAAA,GAA6C,WAAW;Q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