@taiga-ui/core 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b
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/README.md +1 -1
- package/classes/accessors.d.ts +1 -1
- package/components/calendar/calendar-sheet.options.d.ts +1 -3
- package/components/data-list/data-list.component.d.ts +6 -8
- package/components/data-list/opt-group.directive.d.ts +2 -2
- package/components/data-list/option/option.directive.d.ts +5 -6
- package/components/dialog/dialog.component.d.ts +2 -3
- package/components/dialog/dialog.directive.d.ts +4 -3
- package/components/dialog/dialog.options.d.ts +2 -3
- package/components/dialog/dialog.providers.d.ts +1 -2
- package/components/dialog/dialog.service.d.ts +5 -2
- package/components/dialog/index.d.ts +0 -1
- package/components/index.d.ts +1 -2
- package/components/link/link.directive.d.ts +2 -2
- package/components/link/link.options.d.ts +1 -3
- package/components/loader/loader.component.d.ts +7 -7
- package/components/loader/loader.options.d.ts +1 -3
- package/components/modal/index.d.ts +2 -0
- package/components/modal/modal.component.d.ts +17 -0
- package/components/modal/modal.service.d.ts +13 -0
- package/components/notification/index.d.ts +3 -0
- package/components/notification/notification.component.d.ts +14 -0
- package/components/notification/notification.d.ts +3 -0
- package/components/notification/notification.directive.d.ts +7 -12
- package/components/notification/notification.options.d.ts +9 -7
- package/components/notification/notification.service.d.ts +17 -0
- package/components/root/root.component.d.ts +1 -1
- package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/components/scrollbar/scrollbar.directive.d.ts +2 -2
- package/components/spin-button/spin-button.component.d.ts +7 -8
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +2 -2
- package/components/textfield/textfield.component.d.ts +3 -4
- package/components/textfield/textfield.directive.d.ts +9 -12
- package/directives/{notification/notification.directive.d.ts → alert/alert.directive.d.ts} +3 -3
- package/directives/{notification/notification.service.d.ts → alert/alert.service.d.ts} +3 -3
- package/directives/alert/index.d.ts +2 -0
- package/directives/date-format/date-format.directive.d.ts +3 -7
- package/directives/dropdown/dropdown-hover.options.d.ts +1 -3
- package/directives/dropdown/dropdown-position.directive.d.ts +1 -1
- package/directives/group/group.options.d.ts +1 -3
- package/directives/index.d.ts +1 -1
- package/directives/number-format/number-format.directive.d.ts +3 -7
- package/fesm2022/taiga-ui-core-classes.mjs +1 -1
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +9 -15
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +36 -70
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +33 -90
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +10 -16
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +14 -32
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
- package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-notification.mjs +98 -41
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +5 -7
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +35 -43
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +12 -24
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +38 -75
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +1 -2
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-alert.mjs +73 -0
- package/fesm2022/taiga-ui-core-directives-alert.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +0 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +18 -45
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +4 -8
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +5 -8
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +0 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +0 -3
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-popup.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +1 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -12
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +21 -15
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +1 -0
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/package.json +13 -14
- package/pipes/format-number/format-number.pipe.d.ts +5 -3
- package/styles/components/link.less +1 -0
- package/styles/mixins/appearance.less +1 -1
- package/styles/mixins/mixins.less +0 -5
- package/styles/mixins/mixins.scss +0 -5
- package/styles/theme/variables.less +2 -4
- package/tokens/common-icons.d.ts +1 -3
- package/tokens/date-format.d.ts +2 -3
- package/tokens/number-format.d.ts +2 -3
- package/components/alert/alert.component.d.ts +0 -14
- package/components/alert/alert.directive.d.ts +0 -8
- package/components/alert/alert.interfaces.d.ts +0 -13
- package/components/alert/alert.service.d.ts +0 -11
- package/components/alert/alert.tokens.d.ts +0 -6
- package/components/alert/index.d.ts +0 -5
- package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
- package/components/dialog/dialogs.component.d.ts +0 -8
- package/components/header/header.directive.d.ts +0 -17
- package/components/header/index.d.ts +0 -1
- package/directives/notification/index.d.ts +0 -2
- package/fesm2022/taiga-ui-core-components-alert.mjs +0 -110
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
- package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
- package/fesm2022/taiga-ui-core-directives-notification.mjs +0 -73
- package/fesm2022/taiga-ui-core-directives-notification.mjs.map +0 -1
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
|
|
3
|
-
import { takeUntilDestroyed
|
|
2
|
+
import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive, assertInInjectionContext, INJECTOR } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/animated';
|
|
6
|
-
import { TuiAnimated
|
|
6
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
7
7
|
import { TuiAutoFocus } from '@taiga-ui/cdk/directives/auto-focus';
|
|
8
8
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
9
|
-
import { TuiHeader, tuiHeaderOptionsProvider } from '@taiga-ui/core/components/header';
|
|
10
9
|
import { TuiTitle } from '@taiga-ui/core/directives/title';
|
|
11
10
|
import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
12
11
|
import { injectContext, PolymorpheusOutlet, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
13
|
-
import {
|
|
12
|
+
import { filter, Observable, merge, switchMap, take, map, of, isObservable, Subject, exhaustMap } from 'rxjs';
|
|
14
13
|
import { DOCUMENT } from '@angular/common';
|
|
15
14
|
import { Router, ActivationStart } from '@angular/router';
|
|
16
15
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
17
16
|
import { tuiCloseWatcher, tuiZonefull, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
18
17
|
import { tuiInjectElement, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter } from '@taiga-ui/cdk/utils/dom';
|
|
19
18
|
import { tuiGetViewportWidth } from '@taiga-ui/core/utils';
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
19
|
+
import * as i1$1 from '@taiga-ui/cdk/portals';
|
|
20
|
+
import { tuiAsPortal, TuiPortalDirective } from '@taiga-ui/cdk/portals';
|
|
21
|
+
import { TuiModalService } from '@taiga-ui/core/components/modal';
|
|
22
22
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
23
|
-
import { TuiFocusTrap } from '@taiga-ui/cdk/directives/focus-trap';
|
|
24
|
-
import { TuiScrollControls, TuiScrollRef } from '@taiga-ui/core/components/scrollbar';
|
|
25
|
-
import * as i1$1 from '@taiga-ui/cdk/directives/active-zone';
|
|
26
|
-
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
27
|
-
import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
|
|
28
23
|
|
|
29
|
-
const TUI_DIALOGS = new InjectionToken(ngDevMode ? 'TUI_DIALOGS' : '', {
|
|
30
|
-
factory: () => new BehaviorSubject([]),
|
|
31
|
-
});
|
|
32
24
|
const TUI_DIALOGS_CLOSE = new InjectionToken(ngDevMode ? 'TUI_DIALOGS_CLOSE' : '', {
|
|
33
25
|
factory: () => inject(Router).events.pipe(filter((e) => e instanceof ActivationStart)),
|
|
34
26
|
});
|
|
@@ -86,28 +78,17 @@ class TuiDialogComponent {
|
|
|
86
78
|
});
|
|
87
79
|
}
|
|
88
80
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "context.size", "class._closable": "context.closable" } }, providers: [
|
|
90
|
-
TuiDialogCloseService,
|
|
91
|
-
tuiHeaderOptionsProvider(() => ({ size: getSize(injectContext()) })),
|
|
92
|
-
], 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{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:not([data-appearance~=fullscreen])._closable>header,tui-dialog:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[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[data-appearance~=taiga].tui-enter,tui-dialog[data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[data-appearance~=taiga][data-size=s]>footer,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>footer,tui-dialog[data-appearance~=taiga][data-size=s]>tui-confirm>footer{margin-block-start:1.25rem}tui-dialog[data-appearance~=taiga][data-size=m]{inline-size:37.5rem}tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[data-appearance~=taiga]>header:not(:last-child),tui-dialog[data-appearance~=taiga]>ng-component>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[data-appearance~=taiga]>footer,tui-dialog[data-appearance~=taiga]>ng-component>footer,tui-dialog[data-appearance~=taiga]>tui-confirm>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[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[data-appearance~=fullscreen].tui-enter,tui-dialog[data-appearance~=fullscreen].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[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[data-appearance~=fullscreen]>.t-close:before{display:none}tui-dialog[data-appearance~=fullscreen].tui-app-bar .t-close{display:none}tui-dialog[data-appearance~=fullscreen]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-dialog[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[data-appearance~=fullscreen]>header,tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin-block-end:2rem}tui-dialog[data-appearance~=fullscreen]>footer,tui-dialog[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[data-appearance~=fullscreen]>footer:before,tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer,tui-root:not(._mobile) tui-dialog[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[data-appearance~=fullscreen]>footer:before,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>footer>a,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[data-appearance~=fullscreen]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[data-appearance~=fullscreen] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>tui-app-bar,tui-root._mobile tui-dialog[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[data-appearance~=fullscreen]>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen]>footer,tui-root._mobile tui-dialog[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 }); }
|
|
81
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogComponent, isStandalone: true, selector: "tui-dialog", host: { properties: { "attr.data-appearance": "context.appearance", "attr.data-size": "context.size", "class._closable": "context.closable", "class.tui-backdrop-hidden": "context.appearance.includes(\"fullscreen\")" } }, providers: [TuiDialogCloseService], 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.includes('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>\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>\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{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:not([data-appearance~=fullscreen])._closable>header,tui-dialog:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog>header,tui-dialog>ng-component>header{font:var(--tui-font-heading-5)}tui-dialog>header [tuiTitle],tui-dialog>ng-component>header [tuiTitle]{font:inherit}tui-dialog>header p,tui-dialog>ng-component>header p{margin:.25rem 0 0;font:var(--tui-font-text-m)}tui-dialog>header p:empty,tui-dialog>ng-component>header p:empty{display:none}tui-dialog>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[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[data-appearance~=taiga].tui-enter,tui-dialog[data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[data-appearance~=taiga][data-size=s]>header,tui-dialog[data-appearance~=taiga][data-size=s]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-5)}tui-dialog[data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>[tuiSlides]>*>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[data-appearance~=taiga][data-size=s]>footer,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>footer{margin-block-start:1.25rem}tui-dialog[data-appearance~=taiga][data-size=m],tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:37.5rem}tui-dialog[data-appearance~=taiga][data-size=m]>header,tui-dialog[data-appearance~=taiga][data-size=l]>header,tui-dialog[data-appearance~=taiga][data-size=m]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=l]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-4)}tui-dialog[data-appearance~=taiga][data-size=m]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>[tuiSlides]>*>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[data-appearance~=taiga]>footer,tui-dialog[data-appearance~=taiga]>ng-component>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[data-appearance~=fullscreen][data-size]{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[data-appearance~=fullscreen][data-size].tui-enter,tui-dialog[data-appearance~=fullscreen][data-size].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=fullscreen][data-size]>.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[data-appearance~=fullscreen][data-size]>.t-close:before{display:none}tui-dialog[data-appearance~=fullscreen][data-size].tui-app-bar .t-close{display:none}tui-dialog[data-appearance~=fullscreen][data-size]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[data-appearance~=fullscreen][data-size]>tui-app-bar,tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>header,tui-dialog[data-appearance~=fullscreen][data-size]>[tuiSlides]>*>header,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>header,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-3);margin-block-end:2rem}tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>footer:before,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>footer:before,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer>a,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>tui-app-bar,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>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: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
93
82
|
}
|
|
94
83
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
95
84
|
type: Component,
|
|
96
|
-
args: [{ selector: 'tui-dialog', imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton,
|
|
97
|
-
TuiDialogCloseService,
|
|
98
|
-
tuiHeaderOptionsProvider(() => ({ size: getSize(injectContext()) })),
|
|
99
|
-
], hostDirectives: [TuiAnimated], host: {
|
|
85
|
+
args: [{ selector: 'tui-dialog', imports: [PolymorpheusOutlet, TuiAutoFocus, TuiButton, TuiTitle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [TuiDialogCloseService], hostDirectives: [TuiAnimated], host: {
|
|
100
86
|
'[attr.data-appearance]': 'context.appearance',
|
|
101
87
|
'[attr.data-size]': 'context.size',
|
|
102
88
|
'[class._closable]': 'context.closable',
|
|
103
|
-
|
|
89
|
+
'[class.tui-backdrop-hidden]': 'context.appearance.includes("fullscreen")',
|
|
90
|
+
}, template: "@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance.includes('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>\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>\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{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:not([data-appearance~=fullscreen])._closable>header,tui-dialog:not([data-appearance~=fullscreen])._closable>ng-component>header{padding-inline-end:2.5rem}tui-dialog>header,tui-dialog>ng-component>header{font:var(--tui-font-heading-5)}tui-dialog>header [tuiTitle],tui-dialog>ng-component>header [tuiTitle]{font:inherit}tui-dialog>header p,tui-dialog>ng-component>header p{margin:.25rem 0 0;font:var(--tui-font-text-m)}tui-dialog>header p:empty,tui-dialog>ng-component>header p:empty{display:none}tui-dialog>.t-close{position:absolute;top:1rem;z-index:1;inset-inline-end:1rem}tui-dialog[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[data-appearance~=taiga].tui-enter,tui-dialog[data-appearance~=taiga].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=taiga][data-size=s]{inline-size:25rem;padding:1.5rem}tui-dialog[data-appearance~=taiga][data-size=s]>header,tui-dialog[data-appearance~=taiga][data-size=s]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-5)}tui-dialog[data-appearance~=taiga][data-size=s]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>[tuiSlides]>*>header:not(:last-child){margin-block-end:1.25rem}tui-dialog[data-appearance~=taiga][data-size=s]>footer,tui-dialog[data-appearance~=taiga][data-size=s]>ng-component>footer{margin-block-start:1.25rem}tui-dialog[data-appearance~=taiga][data-size=m],tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:37.5rem}tui-dialog[data-appearance~=taiga][data-size=m]>header,tui-dialog[data-appearance~=taiga][data-size=l]>header,tui-dialog[data-appearance~=taiga][data-size=m]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=l]>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>header,tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>[tuiSlides]>*>header,tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-4)}tui-dialog[data-appearance~=taiga][data-size=m]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=m]>ng-component>[tuiSlides]>*>header:not(:last-child),tui-dialog[data-appearance~=taiga][data-size=l]>ng-component>[tuiSlides]>*>header:not(:last-child){margin-block-end:1.5rem}tui-dialog[data-appearance~=taiga][data-size=l]{inline-size:50rem}tui-dialog[data-appearance~=taiga]>footer,tui-dialog[data-appearance~=taiga]>ng-component>footer{display:flex;justify-content:flex-end;flex-wrap:wrap-reverse;gap:.75rem;margin-block-start:2rem}tui-dialog[data-appearance~=fullscreen][data-size]{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[data-appearance~=fullscreen][data-size].tui-enter,tui-dialog[data-appearance~=fullscreen][data-size].tui-leave{animation-name:tuiFade,tuiSlide}tui-dialog[data-appearance~=fullscreen][data-size]>.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[data-appearance~=fullscreen][data-size]>.t-close:before{display:none}tui-dialog[data-appearance~=fullscreen][data-size].tui-app-bar .t-close{display:none}tui-dialog[data-appearance~=fullscreen][data-size]:not(._closable):not(.tui-app-bar):before{content:\"\";block-size:1.5rem}tui-dialog[data-appearance~=fullscreen][data-size]>tui-app-bar,tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>header,tui-dialog[data-appearance~=fullscreen][data-size]>[tuiSlides]>*>header,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>header,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>[tuiSlides]>*>header{font:var(--tui-font-heading-3);margin-block-end:2rem}tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>footer:before,tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer:before{left:0;right:0}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>footer:before,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer:before{display:none}tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer>button,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>footer>a,tui-root:not(._mobile) tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>footer>a{inline-size:auto}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]{padding-block-end:max(1rem,env(safe-area-inset-bottom));--tui-from: translateY(4rem)}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size] .t-close{align-self:flex-start;block-size:3.5rem;margin-block-end:1rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>tui-app-bar,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>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[data-appearance~=fullscreen][data-size]>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>[tuiSlides]>*>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>header,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>ng-component>[tuiSlides]>*>header{margin:-.25rem 0 1.5rem}tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>footer,tui-root._mobile tui-dialog[data-appearance~=fullscreen][data-size]>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"] }]
|
|
104
91
|
}] });
|
|
105
|
-
function getSize({ appearance, size }) {
|
|
106
|
-
if (appearance.includes('fullscreen')) {
|
|
107
|
-
return 'h3';
|
|
108
|
-
}
|
|
109
|
-
return size === 's' ? 'h5' : 'h4';
|
|
110
|
-
}
|
|
111
92
|
|
|
112
93
|
const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions({
|
|
113
94
|
appearance: 'taiga',
|
|
@@ -119,30 +100,41 @@ const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions({
|
|
|
119
100
|
data: undefined,
|
|
120
101
|
});
|
|
121
102
|
|
|
122
|
-
class TuiDialogService extends
|
|
103
|
+
class TuiDialogService extends TuiModalService {
|
|
104
|
+
constructor() {
|
|
105
|
+
super(...arguments);
|
|
106
|
+
this.options = inject(TUI_DIALOG_OPTIONS);
|
|
107
|
+
this.content = TuiDialogComponent;
|
|
108
|
+
}
|
|
123
109
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
124
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, providedIn: 'root'
|
|
110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, providedIn: 'root' }); }
|
|
125
111
|
}
|
|
126
112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogService, decorators: [{
|
|
127
113
|
type: Injectable,
|
|
128
114
|
args: [{
|
|
129
115
|
providedIn: 'root',
|
|
130
|
-
useFactory: () => new TuiDialogService(TUI_DIALOGS, TuiDialogComponent, inject(TUI_DIALOG_OPTIONS)),
|
|
131
116
|
}]
|
|
132
117
|
}] });
|
|
133
118
|
|
|
134
|
-
class TuiDialog
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
class TuiDialog {
|
|
120
|
+
constructor() {
|
|
121
|
+
this.tuiDialogOptions = input({});
|
|
122
|
+
}
|
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
124
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiDialog, isStandalone: true, selector: "ng-template[tuiDialog]", inputs: { tuiDialogOptions: { classPropertyName: "tuiDialogOptions", publicName: "tuiDialogOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsPortal(TuiDialogService)], hostDirectives: [{ directive: i1$1.TuiPortalDirective, inputs: ["options", "tuiDialogOptions", "open", "tuiDialog"], outputs: ["openChange", "tuiDialogChange"] }], ngImport: i0 }); }
|
|
137
125
|
}
|
|
138
126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialog, decorators: [{
|
|
139
127
|
type: Directive,
|
|
140
128
|
args: [{
|
|
141
|
-
standalone: true,
|
|
142
129
|
selector: 'ng-template[tuiDialog]',
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
130
|
+
providers: [tuiAsPortal(TuiDialogService)],
|
|
131
|
+
hostDirectives: [
|
|
132
|
+
{
|
|
133
|
+
directive: TuiPortalDirective,
|
|
134
|
+
inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],
|
|
135
|
+
outputs: ['openChange: tuiDialogChange'],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
146
138
|
}]
|
|
147
139
|
}] });
|
|
148
140
|
|
|
@@ -158,58 +150,9 @@ function tuiDialog(component, { injector, ...options } = {}) {
|
|
|
158
150
|
});
|
|
159
151
|
}
|
|
160
152
|
|
|
161
|
-
class TuiActiveZoneAdapter {
|
|
162
|
-
constructor() {
|
|
163
|
-
this.current = inject(TuiActiveZone);
|
|
164
|
-
this.parent = findActive(inject(TuiActiveZone, { skipSelf: true }), tuiGetFocused(inject(DOCUMENT)));
|
|
165
|
-
}
|
|
166
|
-
ngOnInit() {
|
|
167
|
-
this.current.tuiActiveZoneParentSetter = this.parent;
|
|
168
|
-
}
|
|
169
|
-
ngOnDestroy() {
|
|
170
|
-
this.current.tuiActiveZoneParentSetter = null;
|
|
171
|
-
}
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
173
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiActiveZoneAdapter, isStandalone: true, selector: "[tuiActiveZoneAdapter]", hostDirectives: [{ directive: i1$1.TuiActiveZone }], ngImport: i0 }); }
|
|
174
|
-
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiActiveZoneAdapter, decorators: [{
|
|
176
|
-
type: Directive,
|
|
177
|
-
args: [{
|
|
178
|
-
standalone: true,
|
|
179
|
-
selector: '[tuiActiveZoneAdapter]',
|
|
180
|
-
hostDirectives: [TuiActiveZone],
|
|
181
|
-
}]
|
|
182
|
-
}] });
|
|
183
|
-
function findActive(zone, el) {
|
|
184
|
-
if (!el || !zone.contains(el)) {
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
const active = zone.children.find((child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el));
|
|
188
|
-
return active ? findActive(active, el) : zone;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
class TuiDialogs {
|
|
192
|
-
constructor() {
|
|
193
|
-
this.dialogs = toSignal(inject(TUI_DIALOGS), { initialValue: [] });
|
|
194
|
-
}
|
|
195
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDialogs, isStandalone: true, selector: "tui-dialogs", ngImport: i0, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;display:grid;place-items:center;overscroll-behavior:none;filter:brightness(.25)}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZoneAdapter, selector: "[tuiActiveZoneAdapter]" }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }, { kind: "directive", type: TuiFocusTrap, selector: "[tuiFocusTrap]" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }, { kind: "directive", type: TuiScrollRef, selector: "[tuiScrollRef]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
197
|
-
}
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDialogs, decorators: [{
|
|
199
|
-
type: Component,
|
|
200
|
-
args: [{ selector: 'tui-dialogs', imports: [
|
|
201
|
-
PolymorpheusOutlet,
|
|
202
|
-
TuiActiveZoneAdapter,
|
|
203
|
-
TuiAnimatedParent,
|
|
204
|
-
TuiFocusTrap,
|
|
205
|
-
TuiScrollControls,
|
|
206
|
-
TuiScrollRef,
|
|
207
|
-
], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;scrollbar-width:none;-ms-overflow-style:none;pointer-events:none;overflow:hidden;overscroll-behavior:none;overflow-wrap:break-word;margin-block-start:var(--t-root-top)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:has(section){pointer-events:auto;overflow:auto}:host:has(section:only-of-type ::ng-deep tui-dialog[data-appearance~=fullscreen])>.t-overlay,:host:has(section:only-of-type ::ng-deep tui-notification-middle)>.t-overlay{opacity:0}:host:before{content:\"\";display:block;block-size:200%}.t-overlay,.t-dialog{transition-property:filter;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;bottom:0;right:0;display:flex;block-size:100%;align-items:flex-start;outline:none;overflow:auto}.t-overlay::-webkit-scrollbar,.t-dialog::-webkit-scrollbar,.t-overlay::-webkit-scrollbar-thumb,.t-dialog::-webkit-scrollbar-thumb{display:none}.t-dialog{position:sticky;display:grid;place-items:center;overscroll-behavior:none;filter:brightness(.25)}.t-dialog ::ng-deep>.tui-enter+.t-scrollbars .t-bar_vertical,.t-dialog ::ng-deep>.tui-leave+.t-scrollbars .t-bar_vertical{display:none}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;background:var(--tui-service-backdrop);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none);opacity:0;transition-timing-function:ease-in}.t-overlay_visible{opacity:1;transition-timing-function:ease-out}.t-dialog:last-child{pointer-events:auto;filter:none}.t-scrollbars{position:fixed;top:0;left:0;bottom:0;right:0;margin:0;color:#747474}.t-scrollbars ::ng-deep .t-bar_horizontal,.t-scrollbars ::ng-deep .t-bar_vertical .t-thumb[style*=\"height: 100%\"]{display:none}\n"] }]
|
|
208
|
-
}] });
|
|
209
|
-
|
|
210
153
|
/**
|
|
211
154
|
* Generated bundle index. Do not edit.
|
|
212
155
|
*/
|
|
213
156
|
|
|
214
|
-
export {
|
|
157
|
+
export { TUI_DIALOGS_CLOSE, TUI_DIALOG_OPTIONS, TuiDialog, TuiDialogCloseService, TuiDialogComponent, TuiDialogService, tuiDialog, tuiDialogOptionsProvider };
|
|
215
158
|
//# sourceMappingURL=taiga-ui-core-components-dialog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dialog.mjs","sources":["../../../projects/core/components/dialog/dialog.providers.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.options.ts","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.factory.ts","../../../projects/core/components/dialog/active-zone-adapter.directive.ts","../../../projects/core/components/dialog/dialogs.component.ts","../../../projects/core/components/dialog/dialogs.template.html","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, InjectionToken} from '@angular/core';\nimport {ActivationStart, Router} from '@angular/router';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiCloseWatcher, tuiTypedFromEvent, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {BehaviorSubject, filter, map, merge, Observable, switchMap, take} from 'rxjs';\n\nexport const TUI_DIALOGS = new InjectionToken(ngDevMode ? 'TUI_DIALOGS' : '', {\n factory: () => new BehaviorSubject<ReadonlyArray<TuiPopover<any, any>>>([]),\n});\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_DIALOGS_CLOSE' : '',\n {\n factory: () =>\n inject(Router).events.pipe(filter((e) => e instanceof ActivationStart)),\n },\n);\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly win = inject(WA_WINDOW);\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n private readonly esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(\n filter((event) => {\n const target = tuiGetActualTarget(event);\n\n return (\n // @ts-ignore\n typeof CloseWatcher === 'undefined' &&\n event.key?.toLowerCase() === 'escape' &&\n !event.defaultPrevented &&\n (this.el.contains(target) || this.isOutside(target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(\n filter(\n (event) =>\n // Scrollbars\n tuiGetViewportWidth(this.win) - event.clientX > 17 &&\n this.isOutside(tuiGetActualTarget(event)),\n ),\n switchMap(() =>\n tuiTypedFromEvent(this.doc, 'mouseup').pipe(\n take(1),\n map(tuiGetActualTarget),\n filter((target) => this.isOutside(target)),\n ),\n ),\n );\n\n constructor() {\n super((subscriber) =>\n merge(\n this.esc$,\n this.mousedown$,\n tuiCloseWatcher().pipe(tuiZonefull()),\n ).subscribe(subscriber),\n );\n }\n\n private isOutside(target: EventTarget): boolean {\n return tuiIsElement(target) && !tuiContainsOrAfter(this.el, target);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} 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 {TuiHeader, tuiHeaderOptionsProvider} 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 {injectContext, PolymorpheusOutlet} 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';\nimport {TUI_DIALOGS_CLOSE, TuiDialogCloseService} from './dialog.providers';\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 styleUrl: './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 tuiHeaderOptionsProvider(() => ({size: getSize(injectContext())})),\n ],\n hostDirectives: [TuiAnimated],\n host: {\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 = 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 typeof this.context.content === 'function' ||\n Object(this.context.content) !== this.context.content;\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_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions<\n TuiDialogOptions<void>\n>({\n appearance: 'taiga',\n size: 'm',\n required: false,\n closable: true,\n dismissible: true,\n label: '',\n data: undefined,\n});\n","import {inject, Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS, type TuiDialogOptions} from './dialog.options';\nimport {TUI_DIALOGS} from './dialog.providers';\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","import {assertInInjectionContext, inject, INJECTOR, type Injector} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {type TuiDialogContext, type TuiDialogOptions} from './dialog.options';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> | null\n ? K\n : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D> | null\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any> | null\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, type OnDestroy, type OnInit} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n standalone: true,\n selector: '[tuiActiveZoneAdapter]',\n hostDirectives: [TuiActiveZone],\n})\nexport class TuiActiveZoneAdapter implements OnDestroy, OnInit {\n private readonly current = inject(TuiActiveZone);\n private readonly parent = findActive(\n inject(TuiActiveZone, {skipSelf: true}),\n tuiGetFocused(inject(DOCUMENT)),\n );\n\n public ngOnInit(): void {\n this.current.tuiActiveZoneParentSetter = this.parent;\n }\n\n public ngOnDestroy(): void {\n this.current.tuiActiveZoneParentSetter = null;\n }\n}\n\nfunction findActive(zone: TuiActiveZone, el: Element | null): TuiActiveZone | null {\n if (!el || !zone.contains(el)) {\n return null;\n }\n\n const active = zone.children.find(\n (child) => !child['el'].matches('[tuiActiveZoneAdapter]') && child.contains(el),\n );\n\n return active ? findActive(active, el) : zone;\n}\n","import {ChangeDetectionStrategy, Component, inject, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TuiAnimatedParent} from '@taiga-ui/cdk/directives/animated';\nimport {TuiFocusTrap} from '@taiga-ui/cdk/directives/focus-trap';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiActiveZoneAdapter} from './active-zone-adapter.directive';\nimport {TUI_DIALOGS} from './dialog.providers';\n\n@Component({\n selector: 'tui-dialogs',\n imports: [\n PolymorpheusOutlet,\n TuiActiveZoneAdapter,\n TuiAnimatedParent,\n TuiFocusTrap,\n TuiScrollControls,\n TuiScrollRef,\n ],\n templateUrl: './dialogs.template.html',\n styleUrl: './dialogs.style.less',\n // So that we do not force OnPush on custom dialogs\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TuiDialogs {\n protected readonly dialogs: Signal<ReadonlyArray<TuiPopover<any, any>>> = toSignal(\n inject(TUI_DIALOGS),\n {initialValue: []},\n );\n}\n","<div\n class=\"t-overlay\"\n [class.t-overlay_visible]=\"dialogs().length\"\n></div>\n<!--TODO: Rename to <article> in v5-->\n@for (item of dialogs(); track item) {\n <section\n aria-modal=\"true\"\n role=\"dialog\"\n tuiActiveZoneAdapter\n tuiAnimatedParent\n tuiFocusTrap\n tuiScrollRef\n class=\"t-dialog\"\n [attr.aria-labelledby]=\"item.id\"\n >\n <ng-container *polymorpheusOutlet=\"item.component; context: item\" />\n <tui-scroll-controls class=\"t-scrollbars\" />\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAea,MAAA,WAAW,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,aAAa,GAAG,EAAE,EAAE;IAC1E,OAAO,EAAE,MAAM,IAAI,eAAe,CAAsC,EAAE,CAAC;AAC9E,CAAA;AAEY,MAAA,iBAAiB,GAAG,IAAI,cAAc,CAC/C,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;IACI,OAAO,EAAE,MACL,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,eAAe,CAAC,CAAC;AAC9E,CAAA;AAIC,MAAO,qBAAsB,SAAQ,UAAmB,CAAA;AAkC1D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KACb,KAAK,CACD,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,UAAU,EACf,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CACxC,CAAC,SAAS,CAAC,UAAU,CAAC,CAC1B;AAxCY,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,IAAI,CAC/D,MAAM,CAAC,CAAC,KAAK,KAAI;AACb,YAAA,MAAM,MAAM,GAAG,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,EAAA,UAAU,EC3BvB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,ikBAoBA,EDNQ,MAAA,EAAA,CAAA,s3DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,EAClB,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,oBAAoB,EACpB,QAAA,EAAA,wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,EACjB,QAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,YAAY,EACZ,QAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,gEACjB,YAAY,EAAA,QAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA;;4FAQP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAhBtB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EACd,OAAA,EAAA;wBACL,kBAAkB;wBAClB,oBAAoB;wBACpB,iBAAiB;wBACjB,YAAY;wBACZ,iBAAiB;wBACjB,YAAY;qBACf,EAKgB,eAAA,EAAA,uBAAuB,CAAC,OAAO,EAAA,QAAA,EAAA,ikBAAA,EAAA,MAAA,EAAA,CAAA,s3DAAA,CAAA,EAAA;;;AEzBpD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-dialog.mjs","sources":["../../../projects/core/components/dialog/dialog.providers.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.options.ts","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.factory.ts","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, InjectionToken} from '@angular/core';\nimport {ActivationStart, Router} from '@angular/router';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiCloseWatcher, tuiTypedFromEvent, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {filter, map, merge, Observable, switchMap, take} from 'rxjs';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_DIALOGS_CLOSE' : '',\n {\n factory: () =>\n inject(Router).events.pipe(filter((e) => e instanceof ActivationStart)),\n },\n);\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly win = inject(WA_WINDOW);\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n private readonly esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(\n filter((event) => {\n const target = tuiGetActualTarget(event);\n\n return (\n // @ts-ignore\n typeof CloseWatcher === 'undefined' &&\n event.key?.toLowerCase() === 'escape' &&\n !event.defaultPrevented &&\n (this.el.contains(target) || this.isOutside(target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(\n filter(\n (event) =>\n // Scrollbars\n tuiGetViewportWidth(this.win) - event.clientX > 17 &&\n this.isOutside(tuiGetActualTarget(event)),\n ),\n switchMap(() =>\n tuiTypedFromEvent(this.doc, 'mouseup').pipe(\n take(1),\n map(tuiGetActualTarget),\n filter((target) => this.isOutside(target)),\n ),\n ),\n );\n\n constructor() {\n super((subscriber) =>\n merge(\n this.esc$,\n this.mousedown$,\n tuiCloseWatcher().pipe(tuiZonefull()),\n ).subscribe(subscriber),\n );\n }\n\n private isOutside(target: EventTarget): boolean {\n return tuiIsElement(target) && !tuiContainsOrAfter(this.el, target);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} 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 {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} 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 TuiDialogContext} from './dialog.options';\nimport {TUI_DIALOGS_CLOSE, TuiDialogCloseService} from './dialog.providers';\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, TuiTitle],\n templateUrl: './dialog.template.html',\n styleUrl: './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: [TuiDialogCloseService],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[attr.data-size]': 'context.size',\n '[class._closable]': 'context.closable',\n '[class.tui-backdrop-hidden]': 'context.appearance.includes(\"fullscreen\")',\n },\n})\nexport class TuiDialogComponent<O, I> {\n protected readonly close$ = new Subject<void>();\n protected readonly close = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly context = injectContext<TuiDialogContext<I, O>>();\n\n protected readonly primitive =\n typeof this.context.content === 'function' ||\n Object(this.context.content) !== this.context.content;\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","@if (context.closable) {\n <button\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [appearance]=\"context.appearance.includes('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>\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>\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 TuiPortalContext} from '@taiga-ui/cdk/portals';\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 type TuiDialogContext<O = void, I = undefined> = TuiPortalContext<\n TuiDialogOptions<I>,\n O\n>;\n\nexport const [TUI_DIALOG_OPTIONS, tuiDialogOptionsProvider] = tuiCreateOptions<\n TuiDialogOptions<void>\n>({\n appearance: 'taiga',\n size: 'm',\n required: false,\n closable: true,\n dismissible: true,\n label: '',\n data: undefined,\n});\n","import {inject, Injectable} from '@angular/core';\nimport {TuiModalService} from '@taiga-ui/core/components/modal';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS, type TuiDialogOptions} from './dialog.options';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiDialogService extends TuiModalService<TuiDialogOptions<any>> {\n protected readonly options = inject(TUI_DIALOG_OPTIONS);\n protected readonly content = TuiDialogComponent;\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiDialogOptions} from './dialog.options';\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [tuiAsPortal(TuiDialogService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n },\n ],\n})\nexport class TuiDialog<T> {\n public readonly tuiDialogOptions = input<Partial<TuiDialogOptions<T>>>({});\n}\n","import {assertInInjectionContext, inject, INJECTOR, type Injector} from '@angular/core';\nimport {PolymorpheusComponent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {type TuiDialogContext, type TuiDialogOptions} from './dialog.options';\nimport {TuiDialogService} from './dialog.service';\n\ntype SingleUnionOrNever<T, U = T> = [T] extends [never]\n ? never\n : T extends U\n ? [U] extends [T]\n ? T\n : never\n : never;\n\ntype ReplaceAny<T> = 0 extends T & 1 ? void : T;\n\ntype ContextKeys<T> = {\n [K in keyof T]: ReplaceAny<T[K]> extends TuiDialogContext<any, any> | null\n ? K\n : never;\n}[keyof T];\n\ntype AssertNotMultipleContexts<T, K extends keyof T> = [K] extends [never]\n ? new (...args: any[]) => T\n : [SingleUnionOrNever<K>] extends [never]\n ? 'Component has multiple context. Cannot determine the type...'\n : new (...args: any[]) => T;\n\ntype ExtractDialogData<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<any, infer D> | null\n ? D\n : void;\n\ntype ExtractDialogResult<T, K extends keyof T = ContextKeys<T>> = [K] extends [never]\n ? void\n : [SingleUnionOrNever<K>] extends [never]\n ? never\n : T[K] extends TuiDialogContext<infer R, any> | null\n ? R\n : void;\n\ntype Options<T> = Omit<TuiDialogOptions<T>, 'data'> & {injector: Injector};\n\nexport function tuiDialog<\n T,\n K extends ContextKeys<T>,\n D extends ExtractDialogData<T, K>,\n R extends ExtractDialogResult<T, K>,\n>(\n component: AssertNotMultipleContexts<T, K>,\n {injector, ...options}: Partial<Options<D>> = {},\n): (data: D) => Observable<R> {\n if (!injector) {\n assertInInjectionContext(tuiDialog);\n injector = inject(INJECTOR);\n }\n\n const dialogService = injector.get(TuiDialogService);\n\n return (data) =>\n dialogService.open(\n new PolymorpheusComponent(component as new () => T, injector),\n {\n ...options,\n data,\n },\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAca,MAAA,iBAAiB,GAAG,IAAI,cAAc,CAC/C,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;IACI,OAAO,EAAE,MACL,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,eAAe,CAAC,CAAC;AAC9E,CAAA;AAIC,MAAO,qBAAsB,SAAQ,UAAmB,CAAA;AAkC1D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KACb,KAAK,CACD,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,UAAU,EACf,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CACxC,CAAC,SAAS,CAAC,UAAU,CAAC,CAC1B;AAxCY,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,IAAI,CAC/D,MAAM,CAAC,CAAC,KAAK,KAAI;AACb,YAAA,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC;YAExC;;YAEI,OAAO,YAAY,KAAK,WAAW;AACnC,gBAAA,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,QAAQ;gBACrC,CAAC,KAAK,CAAC,gBAAgB;AACvB,iBAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,S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/B,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAEpD,IAAA,OAAO,CAAC,IAAI,KACR,aAAa,CAAC,IAAI,CACd,IAAI,qBAAqB,CAAC,SAAwB,EAAE,QAAQ,CAAC,EAC7D;AACI,QAAA,GAAG,OAAO;QACV,IAAI;AACP,KAAA,CACJ;AACT;;ACvEA;;AAEG;;;;"}
|
|
@@ -15,7 +15,7 @@ class TuiIcon {
|
|
|
15
15
|
}
|
|
16
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcon, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
|
-
args: [{
|
|
18
|
+
args: [{ selector: 'tui-icon:not([tuiBadge])', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
19
19
|
{
|
|
20
20
|
directive: TuiIcons,
|
|
21
21
|
inputs: ['iconStart: icon', 'iconEnd: badge'],
|
|
@@ -35,7 +35,6 @@ class TuiIconPipe {
|
|
|
35
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIconPipe, decorators: [{
|
|
36
36
|
type: Pipe,
|
|
37
37
|
args: [{
|
|
38
|
-
standalone: true,
|
|
39
38
|
name: 'tuiIcon',
|
|
40
39
|
}]
|
|
41
40
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives';\n\n@Component({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives';\n\n@Component({\n // :not([tuiBadge]) is required to avoid double matching of TuiIcons\n selector: 'tui-icon:not([tuiBadge])',\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/icon.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart: icon', 'iconEnd: badge'],\n },\n ],\n host: {\n '[style.--t-icon-bg]': 'mask()',\n },\n})\nexport class TuiIcon {\n protected readonly icons = inject(TuiIcons);\n protected readonly mask = computed(() => this.icons.resolve(this.background()));\n\n public readonly background = input('');\n}\n","import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n@Pipe({\n name: 'tuiIcon',\n})\nexport class TuiIconPipe implements PipeTransform {\n public readonly transform: TuiStringHandler<string> = tuiInjectIconResolver();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA2Ba,OAAO,CAAA;AAjBpB,IAAA,WAAA,GAAA;AAkBuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;AACzC;+GALY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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@@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, inject, Directive } from '@angular/core';
|
|
3
|
+
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
4
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
5
5
|
import { tuiAppearanceOptionsProvider, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
6
6
|
import * as i2 from '@taiga-ui/core/directives/icons';
|
|
7
7
|
import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
|
|
8
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
8
9
|
|
|
9
10
|
const TUI_LINK_DEFAULT_OPTIONS = {
|
|
10
11
|
appearance: 'action',
|
|
11
12
|
pseudo: false,
|
|
12
13
|
};
|
|
13
|
-
const TUI_LINK_OPTIONS =
|
|
14
|
-
factory: () => TUI_LINK_DEFAULT_OPTIONS,
|
|
15
|
-
});
|
|
16
|
-
function tuiLinkOptionsProvider(options) {
|
|
17
|
-
return tuiProvideOptions(TUI_LINK_OPTIONS, options, TUI_LINK_DEFAULT_OPTIONS);
|
|
18
|
-
}
|
|
14
|
+
const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions(TUI_LINK_DEFAULT_OPTIONS);
|
|
19
15
|
|
|
20
16
|
class Styles {
|
|
21
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][tuiWrapper]:hover:not(._no-hover),[tuiLink][tuiWrapper][data-state=hover]{text-decoration-color:currentColor}}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][tuiWrapper]:active:not(._no-active),[tuiLink][tuiWrapper][data-state=active],[tuiLink][tuiWrapper][data-state=active]:hover{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
23
19
|
}
|
|
24
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
|
|
25
21
|
type: Component,
|
|
26
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-link' }, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100
|
|
22
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-link' }, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][tuiWrapper]:hover:not(._no-hover),[tuiLink][tuiWrapper][data-state=hover]{text-decoration-color:currentColor}}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][tuiWrapper]:active:not(._no-active),[tuiLink][tuiWrapper][data-state=active],[tuiLink][tuiWrapper][data-state=active]:hover{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"] }]
|
|
27
23
|
}] });
|
|
28
24
|
class TuiLink {
|
|
29
25
|
constructor() {
|
|
@@ -32,10 +28,10 @@ class TuiLink {
|
|
|
32
28
|
* @deprecated: use on host
|
|
33
29
|
* [style.text-decoration-line]="'underline'"
|
|
34
30
|
*/
|
|
35
|
-
this.pseudo = inject(TUI_LINK_OPTIONS).pseudo;
|
|
31
|
+
this.pseudo = input(inject(TUI_LINK_OPTIONS).pseudo);
|
|
36
32
|
}
|
|
37
33
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
38
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiLink, isStandalone: true, selector: "a[tuiLink], button[tuiLink]", inputs: { pseudo: { classPropertyName: "pseudo", publicName: "pseudo", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiLink": "" }, properties: { "style.text-decoration-line": "pseudo() ? \"underline\" : null" } }, providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiWithIcons }], ngImport: i0 }); }
|
|
39
35
|
}
|
|
40
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLink, decorators: [{
|
|
41
37
|
type: Directive,
|
|
@@ -45,12 +41,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
45
41
|
hostDirectives: [TuiWithAppearance, TuiWithIcons],
|
|
46
42
|
host: {
|
|
47
43
|
tuiLink: '',
|
|
48
|
-
'[style.text-decoration-line]': 'pseudo ? "underline" : null',
|
|
44
|
+
'[style.text-decoration-line]': 'pseudo() ? "underline" : null',
|
|
49
45
|
},
|
|
50
46
|
}]
|
|
51
|
-
}]
|
|
52
|
-
type: Input
|
|
53
|
-
}] } });
|
|
47
|
+
}] });
|
|
54
48
|
|
|
55
49
|
/**
|
|
56
50
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.options.ts","../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.options.ts","../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\n\n// TODO: remove in v5\nexport interface TuiLinkOptions extends TuiAppearanceOptions {\n /**\n * @deprecated: use on host\n * [style.text-decoration-line]=\"'underline'\"\n */\n readonly pseudo: boolean;\n}\n\nexport const TUI_LINK_DEFAULT_OPTIONS: TuiLinkOptions = {\n appearance: 'action',\n pseudo: false,\n};\n\nexport const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions(\n TUI_LINK_DEFAULT_OPTIONS,\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_LINK_OPTIONS} from './link.options';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/link.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-link'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'a[tuiLink], button[tuiLink]',\n providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n tuiLink: '',\n '[style.text-decoration-line]': 'pseudo() ? \"underline\" : null',\n },\n})\nexport class TuiLink {\n protected readonly nothing = tuiWithStyles(Styles);\n\n /**\n * @deprecated: use on host\n * [style.text-decoration-line]=\"'underline'\"\n */\n public readonly pseudo = input(inject(TUI_LINK_OPTIONS).pseudo);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYa,MAAA,wBAAwB,GAAmB;AACpD,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,MAAM,EAAE,KAAK;;AAGV,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GAAG,gBAAgB,CACtE,wBAAwB;;ACD5B,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,E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