@taiga-ui/experimental 4.52.0-canary.6c67ccf → 4.52.0-canary.9fae831
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/accordion/accordion.component.d.ts +1 -1
- package/components/accordion/accordion.directive.d.ts +1 -1
- package/components/dialog/dialog.component.d.ts +1 -1
- package/components/dialog/dialog.options.d.ts +1 -1
- package/components/search-results/search-results.options.d.ts +1 -7
- package/fesm2022/taiga-ui-experimental-components-dialog.mjs +6 -8
- package/fesm2022/taiga-ui-experimental-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-experimental-components-search-results.mjs +5 -5
- package/fesm2022/taiga-ui-experimental-components-search-results.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export declare class TuiAccordionComponent implements AfterViewInit {
|
|
|
10
10
|
readonly expands: QueryList<TuiExpand>;
|
|
11
11
|
readonly directives: QueryList<TuiAccordionDirective>;
|
|
12
12
|
closeOthers: boolean;
|
|
13
|
-
readonly size: import("@angular/core").WritableSignal<"
|
|
13
|
+
readonly size: import("@angular/core").WritableSignal<"m" | "s" | "l">;
|
|
14
14
|
set sizeSetter(size: TuiSizeL | TuiSizeS);
|
|
15
15
|
ngAfterViewInit(): void;
|
|
16
16
|
toggle(directive: TuiAccordionDirective): void;
|
|
@@ -4,7 +4,7 @@ import * as i1 from "@taiga-ui/core/components/button";
|
|
|
4
4
|
import * as i2 from "@taiga-ui/kit/directives/chevron";
|
|
5
5
|
export declare class TuiAccordionDirective implements OnChanges {
|
|
6
6
|
private readonly accordion;
|
|
7
|
-
protected readonly size: import("@angular/core").WritableSignal<"
|
|
7
|
+
protected readonly size: import("@angular/core").WritableSignal<"m" | "s" | "l">;
|
|
8
8
|
tuiAccordion: boolean | string;
|
|
9
9
|
readonly tuiAccordionChange: EventEmitter<boolean>;
|
|
10
10
|
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -8,8 +8,8 @@ export declare class TuiDialogComponent<O, I> {
|
|
|
8
8
|
protected readonly close: import("@angular/core").Signal<string | undefined>;
|
|
9
9
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
10
10
|
protected readonly context: TuiPopover<TuiDialogOptions<I>, O>;
|
|
11
|
+
protected readonly primitive: boolean;
|
|
11
12
|
protected readonly sub: import("rxjs").Subscription;
|
|
12
|
-
protected get primitive(): boolean;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogComponent<any, any>, never>;
|
|
14
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiDialogComponent<any, any>, "tui-dialog", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }]>;
|
|
15
15
|
}
|
|
@@ -24,4 +24,4 @@ export interface TuiDialogOptions<I> {
|
|
|
24
24
|
export interface TuiDialogContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiDialogOptions<I> {
|
|
25
25
|
}
|
|
26
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>> |
|
|
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;
|
|
@@ -10,13 +10,7 @@ export declare const TUI_SEARCH_RESULTS_OPTIONS: import("@angular/core").Injecti
|
|
|
10
10
|
popular: string;
|
|
11
11
|
empty: string;
|
|
12
12
|
remove: string;
|
|
13
|
-
}> |
|
|
14
|
-
key: string;
|
|
15
|
-
history: string;
|
|
16
|
-
popular: string;
|
|
17
|
-
empty: string;
|
|
18
|
-
remove: string;
|
|
19
|
-
}>> | (() => Partial<{
|
|
13
|
+
}> | (() => Partial<{
|
|
20
14
|
key: string;
|
|
21
15
|
history: string;
|
|
22
16
|
popular: string;
|
|
@@ -10,7 +10,7 @@ import { TuiDialogCloseService, TUI_DIALOGS_CLOSE, TUI_DIALOGS } from '@taiga-ui
|
|
|
10
10
|
import { TuiTitle } from '@taiga-ui/core/directives/title';
|
|
11
11
|
import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
12
12
|
import { TuiHeader, TUI_HEADER_OPTIONS } from '@taiga-ui/layout/components/header';
|
|
13
|
-
import { injectContext,
|
|
13
|
+
import { injectContext, PolymorpheusTemplate, PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
14
14
|
import { of, isObservable, Subject, merge, switchMap, exhaustMap, take, map, filter } from 'rxjs';
|
|
15
15
|
import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
|
|
16
16
|
import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
|
|
@@ -26,6 +26,9 @@ class TuiDialogComponent {
|
|
|
26
26
|
this.close = toSignal(inject(TUI_CLOSE_WORD));
|
|
27
27
|
this.icons = inject(TUI_COMMON_ICONS);
|
|
28
28
|
this.context = injectContext();
|
|
29
|
+
this.primitive = !(this.context.content instanceof TemplateRef) &&
|
|
30
|
+
!(this.context.content instanceof PolymorpheusTemplate) &&
|
|
31
|
+
!(this.context.content instanceof PolymorpheusComponent);
|
|
29
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)))
|
|
30
33
|
.pipe(filter(Boolean), takeUntilDestroyed())
|
|
31
34
|
.subscribe(() => {
|
|
@@ -37,11 +40,6 @@ class TuiDialogComponent {
|
|
|
37
40
|
}
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
|
-
get primitive() {
|
|
41
|
-
return (!(this.context.content instanceof TemplateRef) &&
|
|
42
|
-
!(this.context.content instanceof PolymorpheusOutlet) &&
|
|
43
|
-
!(this.context.content instanceof PolymorpheusComponent));
|
|
44
|
-
}
|
|
45
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
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: [
|
|
47
45
|
TuiDialogCloseService,
|
|
@@ -49,7 +47,7 @@ class TuiDialogComponent {
|
|
|
49
47
|
provide: TUI_HEADER_OPTIONS,
|
|
50
48
|
useFactory: () => ({ size: getSize(injectContext()) }),
|
|
51
49
|
},
|
|
52
|
-
], 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) {\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) 2rem;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 }); }
|
|
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 }); }
|
|
53
51
|
}
|
|
54
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
55
53
|
type: Component,
|
|
@@ -64,7 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
64
62
|
'[attr.data-appearance]': 'context.appearance',
|
|
65
63
|
'[attr.data-size]': 'context.size',
|
|
66
64
|
'[class._closable]': 'context.closable',
|
|
67
|
-
}, 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) {\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) 2rem;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"] }]
|
|
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"] }]
|
|
68
66
|
}] });
|
|
69
67
|
function getSize({ appearance, size }) {
|
|
70
68
|
if (appearance.includes('fullscreen')) {
|
|
@@ -1 +1 @@
|
|
|
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 {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TUI_HEADER_OPTIONS, TuiHeader} from '@taiga-ui/layout/components/header';\nimport {\n injectContext,\n PolymorpheusComponent,\n PolymorpheusOutlet,\n} from '@taiga-ui/polymorpheus';\nimport {\n exhaustMap,\n filter,\n isObservable,\n map,\n merge,\n type Observable,\n of,\n Subject,\n switchMap,\n take,\n} from 'rxjs';\n\nimport {type TuiDialogOptions} 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\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 protected get primitive(): boolean {\n return (\n !(this.context.content instanceof TemplateRef) &&\n !(this.context.content instanceof PolymorpheusOutlet) &&\n !(this.context.content instanceof PolymorpheusComponent)\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) {\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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A;;;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
|
+
{"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 {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TUI_HEADER_OPTIONS, TuiHeader} from '@taiga-ui/layout/components/header';\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,EACtE,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAC9B,UAAU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,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;;;;"}
|
|
@@ -21,7 +21,7 @@ import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
|
21
21
|
import { tuiMoveFocus } from '@taiga-ui/cdk/utils/focus';
|
|
22
22
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
23
23
|
import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
24
|
-
import {
|
|
24
|
+
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
25
25
|
import { TuiLoader } from '@taiga-ui/core/components/loader';
|
|
26
26
|
import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
27
27
|
import * as i2 from '@taiga-ui/kit/components/tabs';
|
|
@@ -71,7 +71,7 @@ class TuiSearchHistory {
|
|
|
71
71
|
return JSON.parse(this.storage?.getItem(this.options.key) || '[]');
|
|
72
72
|
}
|
|
73
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHistory, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: "popular" }, ngImport: i0, template: "@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchHistory, isStandalone: true, selector: "tui-search-history", inputs: { popular: "popular" }, ngImport: i0, template: "@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n \uD83D\uDDD1\uFE0F\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n", styles: [":host:not(:empty){display:block;padding:.375rem 0}\n"], dependencies: [{ kind: "directive", type: TuiAvatar, selector: "[tuiAvatar]", inputs: ["size", "round", "badge"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
75
|
}
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchHistory, decorators: [{
|
|
77
77
|
type: Component,
|
|
@@ -138,7 +138,7 @@ class TuiSearchResultsComponent {
|
|
|
138
138
|
return 0;
|
|
139
139
|
}
|
|
140
140
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSearchResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: "results" }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <
|
|
141
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSearchResultsComponent, isStandalone: true, selector: "tui-search-results", inputs: { results: "results" }, host: { listeners: { "keydown.arrowDown.prevent": "onArrow($event.target, 1)", "keydown.arrowUp.prevent": "onArrow($event.target, -1)" } }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TuiBlockStatusComponent, selector: "tui-block-status", inputs: ["card", "size"] }, { kind: "directive", type: i1.TuiBlockStatusDirective, selector: "[tuiSlot]", inputs: ["tuiSlot"] }, { kind: "pipe", type: TuiFilterPipe, name: "tuiFilter" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "directive", type: TuiLet, selector: "[tuiLet]", inputs: ["tuiLet"] }, { kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }, { kind: "component", type: TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "directive", type: i2.TuiTab, selector: "a[tuiTab]:not([routerLink]), a[tuiTab][routerLink][routerLinkActive], button[tuiTab]" }, { kind: "directive", type: i2.TuiTabsHorizontal, selector: "tui-tabs:not([vertical]), nav[tuiTabs]:not([vertical])", inputs: ["underline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
142
142
|
}
|
|
143
143
|
__decorate([
|
|
144
144
|
tuiPure
|
|
@@ -150,7 +150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
150
150
|
NgTemplateOutlet,
|
|
151
151
|
TuiBlockStatus,
|
|
152
152
|
TuiFilterPipe,
|
|
153
|
-
|
|
153
|
+
TuiIcon,
|
|
154
154
|
TuiLet,
|
|
155
155
|
TuiLoader,
|
|
156
156
|
TuiScrollbar,
|
|
@@ -158,7 +158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
158
158
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
159
159
|
'(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',
|
|
160
160
|
'(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',
|
|
161
|
-
}, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <
|
|
161
|
+
}, template: "@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;border-radius:var(--tui-radius-l);background:var(--tui-background-base);box-shadow:inset 0 0 0 1px var(--tui-border-normal)}:host ::ng-deep [tuiCell]{inline-size:stretch;padding:.375rem;margin:.25rem .625rem;border-radius:var(--tui-radius-l)}:host ::ng-deep [tuiCell]>[tuiAvatar]{border-radius:var(--tui-radius-m)}:host ::ng-deep .t-sr-label{display:block;font:var(--tui-font-text-ui-s);color:var(--tui-text-secondary);margin:.75rem 1rem .5rem}.t-loader{margin:1rem 0}.t-status{margin-block-end:2rem}.t-empty{margin-block-start:1.5rem;font-size:6rem;color:var(--tui-text-primary)}.t-tabs{order:-1;margin:0 1rem;box-shadow:none;border-image:linear-gradient(0deg,var(--tui-border-normal) 1px,transparent 0) fill 0/0/0 1rem}.t-tabs:before{background:var(--tui-background-accent-opposite-pressed)}.t-scrollbar{max-block-size:30rem;padding:.375rem 0}\n"] }]
|
|
162
162
|
}], propDecorators: { template: [{
|
|
163
163
|
type: ContentChild,
|
|
164
164
|
args: [TemplateRef]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-experimental-components-search-results.mjs","sources":["../../../projects/experimental/components/search-results/search-results.options.ts","../../../projects/experimental/components/search-results/search-history.component.ts","../../../projects/experimental/components/search-results/search-history.component.html","../../../projects/experimental/components/search-results/search-hotkey.directive.ts","../../../projects/experimental/components/search-results/search-results.component.ts","../../../projects/experimental/components/search-results/search-results.component.html","../../../projects/experimental/components/search-results/search-results.ts","../../../projects/experimental/components/search-results/taiga-ui-experimental-components-search-results.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_SEARCH_RESULTS_OPTIONS, tuiSearchResultsOptionsProvider] =\n tuiCreateOptions({\n key: 'taiga-search-history',\n history: '@tui.clock',\n popular: '@tui.search',\n empty: '@tui.search',\n remove: '@tui.trash',\n });\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {WA_LOCAL_STORAGE} from '@ng-web-apis/common';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\nimport {TuiCell} from '@taiga-ui/layout/components/cell';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {filter, map} from 'rxjs';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-history',\n imports: [TuiAvatar, TuiButton, TuiCell, TuiTitle],\n templateUrl: './search-history.component.html',\n styles: [\n `\n :host:not(:empty) {\n display: block;\n padding: 0.375rem 0;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSearchHistory {\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly storage = inject(WA_LOCAL_STORAGE);\n private readonly control = inject(NgControl);\n\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly $ = this.control.valueChanges\n ?.pipe(\n map(String),\n filter((item) => !!item && !this.popular.includes(item)),\n takeUntilDestroyed(),\n )\n .subscribe((value) => {\n this.store(value);\n });\n\n protected history = this.items;\n\n @Input()\n public popular: readonly string[] = [];\n\n protected store(item: string): void {\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(\n Array.from(new Set([item.trim(), ...this.items]))\n .filter((v, _, a) => v && !a.find((s) => s.startsWith(v) && s !== v))\n .slice(0, 5),\n ),\n );\n }\n\n protected remove(item: string): void {\n this.textfield.input?.nativeElement.focus();\n this.history = this.history.filter((v) => v !== item);\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(this.items.filter((v) => v !== item)),\n );\n }\n\n protected select(item: string): void {\n this.control.control?.setValue(item);\n this.textfield.input?.nativeElement.focus();\n }\n\n private get items(): readonly string[] {\n return JSON.parse(this.storage?.getItem(this.options.key) || '[]');\n }\n}\n","@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n 🗑️\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n","import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiInputSearch} from '@taiga-ui/layout/components/input-search';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {map} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiSearchHotkey]',\n host: {\n '[placeholder]': 'placeholder()',\n '(document:keydown.meta.k.stop)': 'search.open()',\n '(document:keydown.alt.k.stop)': 'search.open()',\n },\n})\nexport class TuiSearchHotkey {\n private readonly platform = inject(WA_NAVIGATOR).platform;\n\n protected readonly search = inject(TuiInputSearch);\n protected readonly placeholder = toSignal(\n inject(TUI_INPUT_SEARCH).pipe(\n map(({hotkey}) =>\n this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`,\n ),\n ),\n );\n}\n","import {type KeyValue, KeyValuePipe, NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n Input,\n type OnChanges,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiLet} from '@taiga-ui/cdk/directives/let';\nimport {TuiFilterPipe} from '@taiga-ui/cdk/pipes/filter';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIconPipe} from '@taiga-ui/core/components/icon';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTabs} from '@taiga-ui/kit/components/tabs';\nimport {TuiBlockStatus} from '@taiga-ui/layout/components/block-status';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-results',\n imports: [\n KeyValuePipe,\n NgTemplateOutlet,\n TuiBlockStatus,\n TuiFilterPipe,\n TuiIconPipe,\n TuiLet,\n TuiLoader,\n TuiScrollbar,\n TuiTabs,\n ],\n templateUrl: './search-results.component.html',\n styleUrls: ['./search-results.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',\n },\n})\nexport class TuiSearchResultsComponent<T> implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected active = 0;\n\n @ContentChild(TemplateRef)\n public readonly template?: TemplateRef<TuiContext<T>>;\n\n @Input()\n public results: Record<string, readonly T[]> | null = {};\n\n public ngOnChanges(): void {\n this.active = 0;\n }\n\n @tuiPure\n protected isEmpty(results: Record<string, readonly T[]>): boolean {\n return !Object.values(results).reduce((total, {length}) => length + total, 0);\n }\n\n protected onArrow(current: HTMLElement, step: number): void {\n const elements = Array.from(this.el.querySelectorAll<HTMLElement>('[tuiCell]'));\n\n if (elements[0] === current && step < 0) {\n this.textfield.input?.nativeElement.focus();\n } else {\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n }\n\n protected tab(step: number): void {\n const max = Object.values(this.results || {}).filter((v) => v.length).length;\n\n this.active = tuiClamp(this.active + step, 0, max);\n this.textfield.input?.nativeElement.focus();\n }\n\n protected notEmpty({value}: KeyValue<string, readonly T[]>): boolean {\n return !!value.length;\n }\n\n protected asIs(): number {\n return 0;\n }\n}\n","@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <img\n alt=\"\"\n tuiSlot=\"top\"\n class=\"t-empty\"\n [src]=\"options.empty | tuiIcon\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n","import {TuiSearchHistory} from './search-history.component';\nimport {TuiSearchHotkey} from './search-hotkey.directive';\nimport {TuiSearchResultsComponent} from './search-results.component';\n\nexport const TuiSearchResults = [\n TuiSearchHotkey,\n TuiSearchHistory,\n TuiSearchResultsComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEa,CAAC,0BAA0B,EAAE,+BAA+B,CAAC,GACtE,gBAAgB,CAAC;AACb,IAAA,GAAG,EAAE,sBAAsB;AAC3B,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,MAAM,EAAE,YAAY;AACvB,CAAA;;MCoBQ,gBAAgB,CAAA;AAd7B,IAAA,WAAA,GAAA;AAeqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;QAEzB,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,0BAA0B,CAAC;AAC5C,QAAA,IAAA,CAAA,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;AAChC,cAAE,IAAI,CACF,GAAG,CAAC,MAAM,CAAC,EACX,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACxD,kBAAkB,EAAE;AAEvB,aAAA,SAAS,CAAC,CAAC,KAAK,KAAI;AACjB,YAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AACrB,SAAC,CAAC;AAEI,QAAA,IAAA,CAAA,OAAO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A,EAAA,EAAA,EAAA,CAAA;;AEhER,MAAA,gBAAgB,GAAG;IAC5B,eAAe;IACf,gBAAgB;IAChB,yBAAyB;;;ACP7B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-experimental-components-search-results.mjs","sources":["../../../projects/experimental/components/search-results/search-results.options.ts","../../../projects/experimental/components/search-results/search-history.component.ts","../../../projects/experimental/components/search-results/search-history.component.html","../../../projects/experimental/components/search-results/search-hotkey.directive.ts","../../../projects/experimental/components/search-results/search-results.component.ts","../../../projects/experimental/components/search-results/search-results.component.html","../../../projects/experimental/components/search-results/search-results.ts","../../../projects/experimental/components/search-results/taiga-ui-experimental-components-search-results.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_SEARCH_RESULTS_OPTIONS, tuiSearchResultsOptionsProvider] =\n tuiCreateOptions({\n key: 'taiga-search-history',\n history: '@tui.clock',\n popular: '@tui.search',\n empty: '@tui.search',\n remove: '@tui.trash',\n });\n","import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {WA_LOCAL_STORAGE} from '@ng-web-apis/common';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiAvatar} from '@taiga-ui/kit/components/avatar';\nimport {TuiCell} from '@taiga-ui/layout/components/cell';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {filter, map} from 'rxjs';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-history',\n imports: [TuiAvatar, TuiButton, TuiCell, TuiTitle],\n templateUrl: './search-history.component.html',\n styles: [\n `\n :host:not(:empty) {\n display: block;\n padding: 0.375rem 0;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSearchHistory {\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly storage = inject(WA_LOCAL_STORAGE);\n private readonly control = inject(NgControl);\n\n protected readonly close = toSignal(inject(TUI_CLOSE_WORD));\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly $ = this.control.valueChanges\n ?.pipe(\n map(String),\n filter((item) => !!item && !this.popular.includes(item)),\n takeUntilDestroyed(),\n )\n .subscribe((value) => {\n this.store(value);\n });\n\n protected history = this.items;\n\n @Input()\n public popular: readonly string[] = [];\n\n protected store(item: string): void {\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(\n Array.from(new Set([item.trim(), ...this.items]))\n .filter((v, _, a) => v && !a.find((s) => s.startsWith(v) && s !== v))\n .slice(0, 5),\n ),\n );\n }\n\n protected remove(item: string): void {\n this.textfield.input?.nativeElement.focus();\n this.history = this.history.filter((v) => v !== item);\n this.storage?.setItem(\n this.options.key,\n JSON.stringify(this.items.filter((v) => v !== item)),\n );\n }\n\n protected select(item: string): void {\n this.control.control?.setValue(item);\n this.textfield.input?.nativeElement.focus();\n }\n\n private get items(): readonly string[] {\n return JSON.parse(this.storage?.getItem(this.options.key) || '[]');\n }\n}\n","@if (history.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.history }}\n </label>\n}\n@for (item of history; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (keydown.backspace)=\"remove(item)\"\n (keydown.delete)=\"remove(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <div [tuiAvatar]=\"options.history\"></div>\n <span tuiTitle>{{ item }}</span>\n <button\n appearance=\"icon\"\n size=\"xs\"\n tabindex=\"-1\"\n tuiIconButton\n type=\"button\"\n [iconStart]=\"options.remove\"\n (click.stop)=\"remove(item)\"\n >\n 🗑️\n </button>\n </button>\n}\n@if (popular.length) {\n <label class=\"t-sr-label\">\n {{ i18n()?.popular }}\n </label>\n}\n@for (item of popular; track item) {\n <button\n tuiCell\n type=\"button\"\n (click)=\"select(item)\"\n (mousedown.prevent)=\"(0)\"\n >\n <span [tuiAvatar]=\"options.popular\"></span>\n <span tuiTitle>{{ item }}</span>\n </button>\n}\n","import {Directive, inject} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {WA_NAVIGATOR} from '@ng-web-apis/common';\nimport {TuiInputSearch} from '@taiga-ui/layout/components/input-search';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {map} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiSearchHotkey]',\n host: {\n '[placeholder]': 'placeholder()',\n '(document:keydown.meta.k.stop)': 'search.open()',\n '(document:keydown.alt.k.stop)': 'search.open()',\n },\n})\nexport class TuiSearchHotkey {\n private readonly platform = inject(WA_NAVIGATOR).platform;\n\n protected readonly search = inject(TuiInputSearch);\n protected readonly placeholder = toSignal(\n inject(TUI_INPUT_SEARCH).pipe(\n map(({hotkey}) =>\n this.platform.startsWith('Mac') ? `⌘+K ${hotkey}` : `Alt+K ${hotkey}`,\n ),\n ),\n );\n}\n","import {type KeyValue, KeyValuePipe, NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n inject,\n Input,\n type OnChanges,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiLet} from '@taiga-ui/cdk/directives/let';\nimport {TuiFilterPipe} from '@taiga-ui/cdk/pipes/filter';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiMoveFocus} from '@taiga-ui/cdk/utils/focus';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {TuiScrollbar} from '@taiga-ui/core/components/scrollbar';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TuiTabs} from '@taiga-ui/kit/components/tabs';\nimport {TuiBlockStatus} from '@taiga-ui/layout/components/block-status';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\n\nimport {TUI_SEARCH_RESULTS_OPTIONS} from './search-results.options';\n\n@Component({\n selector: 'tui-search-results',\n imports: [\n KeyValuePipe,\n NgTemplateOutlet,\n TuiBlockStatus,\n TuiFilterPipe,\n TuiIcon,\n TuiLet,\n TuiLoader,\n TuiScrollbar,\n TuiTabs,\n ],\n templateUrl: './search-results.component.html',\n styleUrls: ['./search-results.component.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keydown.arrowDown.prevent)': 'onArrow($event.target, 1)',\n '(keydown.arrowUp.prevent)': 'onArrow($event.target, -1)',\n },\n})\nexport class TuiSearchResultsComponent<T> implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SEARCH_RESULTS_OPTIONS);\n protected readonly i18n = toSignal(inject(TUI_INPUT_SEARCH));\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected active = 0;\n\n @ContentChild(TemplateRef)\n public readonly template?: TemplateRef<TuiContext<T>>;\n\n @Input()\n public results: Record<string, readonly T[]> | null = {};\n\n public ngOnChanges(): void {\n this.active = 0;\n }\n\n @tuiPure\n protected isEmpty(results: Record<string, readonly T[]>): boolean {\n return !Object.values(results).reduce((total, {length}) => length + total, 0);\n }\n\n protected onArrow(current: HTMLElement, step: number): void {\n const elements = Array.from(this.el.querySelectorAll<HTMLElement>('[tuiCell]'));\n\n if (elements[0] === current && step < 0) {\n this.textfield.input?.nativeElement.focus();\n } else {\n tuiMoveFocus(elements.indexOf(current), elements, step);\n }\n }\n\n protected tab(step: number): void {\n const max = Object.values(this.results || {}).filter((v) => v.length).length;\n\n this.active = tuiClamp(this.active + step, 0, max);\n this.textfield.input?.nativeElement.focus();\n }\n\n protected notEmpty({value}: KeyValue<string, readonly T[]>): boolean {\n return !!value.length;\n }\n\n protected asIs(): number {\n return 0;\n }\n}\n","@if (!textfield.value()) {\n <ng-content />\n} @else {\n @if (!results) {\n <tui-loader class=\"t-loader\" />\n } @else {\n @if (results && isEmpty(results)) {\n <tui-block-status\n size=\"m\"\n class=\"t-status\"\n >\n <tui-icon\n tuiSlot=\"top\"\n class=\"t-empty\"\n [icon]=\"options.empty\"\n />\n {{ i18n()?.empty }}\n </tui-block-status>\n } @else {\n <ng-container *tuiLet=\"(results | keyvalue: asIs) || [] as items\">\n <tui-scrollbar class=\"t-scrollbar\">\n @for (group of items | tuiFilter: notEmpty; track group; let index = $index) {\n @if (!active || active === index + 1) {\n @if (!active && items.length > 1) {\n <label class=\"t-sr-label\">\n {{ group.key }}\n </label>\n }\n @for (item of group.value; track item) {\n <ng-container\n [ngTemplateOutlet]=\"template || null\"\n [ngTemplateOutletContext]=\"{$implicit: item}\"\n />\n }\n }\n }\n </tui-scrollbar>\n @if (items.length > 1) {\n <tui-tabs\n size=\"m\"\n class=\"t-tabs\"\n [(activeItemIndex)]=\"active\"\n (document:keydown.shift.tab.prevent)=\"tab(-1)\"\n (document:keydown.tab.prevent)=\"tab(1)\"\n >\n <button tuiTab>{{ i18n()?.all }}</button>\n @for (group of items; track group) {\n @if (group.value.length) {\n <button tuiTab>\n {{ group.key }}\n </button>\n }\n }\n </tui-tabs>\n }\n </ng-container>\n }\n }\n}\n","import {TuiSearchHistory} from './search-history.component';\nimport {TuiSearchHotkey} from './search-hotkey.directive';\nimport {TuiSearchResultsComponent} from './search-results.component';\n\nexport const TuiSearchResults = [\n TuiSearchHotkey,\n TuiSearchHistory,\n TuiSearchResultsComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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