@taiga-ui/core 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taiga-ui-core-abstract.umd.js +1 -0
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +189 -167
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +2 -2
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +100 -20
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +31 -13
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +45 -25
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +67 -63
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +39 -1
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/components/dialog/dialog-close.service.d.ts +15 -0
- package/components/dialog/dialog.component.d.ts +5 -4
- package/components/dialog/dialog.tokens.d.ts +2 -0
- package/components/dialog/index.d.ts +1 -1
- package/components/notification/notification.component.d.ts +2 -2
- package/components/svg/deprecated-icons.d.ts +1 -0
- package/components/svg/index.d.ts +2 -0
- package/components/svg/svg-options.d.ts +14 -0
- package/components/svg/svg.component.d.ts +5 -7
- package/components/tooltip/tooltip.component.d.ts +2 -2
- package/components/tooltip/tooltip.module.d.ts +5 -4
- package/directives/dropdown/dropdown-hover-options.directive.d.ts +9 -0
- package/directives/dropdown/dropdown-hover.directive.d.ts +3 -1
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -2
- package/directives/dropdown/dropdown-position.directive.d.ts +2 -2
- package/directives/dropdown/index.d.ts +1 -0
- package/directives/hint/hint-hover.directive.d.ts +4 -2
- package/directives/hint/hint-position.directive.d.ts +2 -2
- package/esm2015/abstract/rect-accessor.js +2 -1
- package/esm2015/components/dialog/dialog-close.service.js +51 -0
- package/esm2015/components/dialog/dialog.component.js +26 -10
- package/esm2015/components/dialog/dialog.tokens.js +5 -1
- package/esm2015/components/dialog/index.js +2 -2
- package/esm2015/components/notification/notification.component.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +2 -2
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/components/svg/deprecated-icons.js +59 -0
- package/esm2015/components/svg/index.js +3 -1
- package/esm2015/components/svg/svg-options.js +29 -0
- package/esm2015/components/svg/svg.component.js +13 -18
- package/esm2015/components/tooltip/tooltip.component.js +13 -13
- package/esm2015/components/tooltip/tooltip.module.js +21 -4
- package/esm2015/directives/dropdown/dropdown-hover-options.directive.js +14 -0
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +10 -5
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +12 -12
- package/esm2015/directives/dropdown/dropdown-position.directive.js +11 -11
- package/esm2015/directives/dropdown/index.js +2 -1
- package/esm2015/directives/hint/hint-hover.directive.js +13 -10
- package/esm2015/directives/hint/hint-options.directive.js +2 -2
- package/esm2015/directives/hint/hint-position.directive.js +12 -11
- package/esm2015/directives/hint/hint.component.js +3 -2
- package/esm2015/interfaces/dialog-options.js +1 -1
- package/esm2015/tokens/icon-place.js +5 -2
- package/esm2015/tokens/icons-path.js +4 -1
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/svg-content-processor.js +4 -1
- package/esm2015/tokens/svg-src-processor.js +4 -1
- package/esm2015/tokens/viewport.js +26 -0
- package/fesm2015/taiga-ui-core-abstract.js +1 -0
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +85 -69
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +2 -2
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +98 -21
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +32 -15
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +42 -25
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +30 -27
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +38 -2
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/interfaces/dialog-options.d.ts +4 -3
- package/package.json +4 -4
- package/styles/mixins/textfield.less +4 -22
- package/styles/mixins/textfield.scss +3 -22
- package/styles/theme/wrapper/icon.less +17 -27
- package/tokens/icon-place.d.ts +3 -0
- package/tokens/icons-path.d.ts +3 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/svg-content-processor.d.ts +3 -0
- package/tokens/svg-src-processor.d.ts +3 -0
- package/tokens/viewport.d.ts +4 -0
- package/components/dialog/dialog.providers.d.ts +0 -5
- package/esm2015/components/dialog/dialog.providers.js +0 -51
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { identity } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use {@link TUI_SVG_OPTIONS} instead
|
|
5
|
+
*/
|
|
3
6
|
export const TUI_SVG_SRC_PROCESSOR = new InjectionToken(`[TUI_SVG_SRC_PROCESSOR]: Source path processor for svg`, {
|
|
4
7
|
factory: () => identity,
|
|
5
8
|
});
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ZnLXNyYy1wcm9jZXNzb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3Rva2Vucy9zdmctc3JjLXByb2Nlc3Nvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRzdDLE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFFOUI7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBRyxJQUFJLGNBQWMsQ0FFckQsd0RBQXdELEVBQUU7SUFDeEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLFFBQVE7Q0FDMUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtJbmplY3Rpb25Ub2tlbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQge1NhZmVIdG1sfSBmcm9tICdAYW5ndWxhci9wbGF0Zm9ybS1icm93c2VyJztcbmltcG9ydCB7VHVpSGFuZGxlcn0gZnJvbSAnQHRhaWdhLXVpL2Nkayc7XG5pbXBvcnQge2lkZW50aXR5fSBmcm9tICdyeGpzJztcblxuLyoqXG4gKiBAZGVwcmVjYXRlZCBVc2Uge0BsaW5rIFRVSV9TVkdfT1BUSU9OU30gaW5zdGVhZFxuICovXG5leHBvcnQgY29uc3QgVFVJX1NWR19TUkNfUFJPQ0VTU09SID0gbmV3IEluamVjdGlvblRva2VuPFxuICAgIFR1aUhhbmRsZXI8U2FmZUh0bWwgfCBzdHJpbmcsIFNhZmVIdG1sIHwgc3RyaW5nPlxuPihgW1RVSV9TVkdfU1JDX1BST0NFU1NPUl06IFNvdXJjZSBwYXRoIHByb2Nlc3NvciBmb3Igc3ZnYCwge1xuICAgIGZhY3Rvcnk6ICgpID0+IGlkZW50aXR5LFxufSk7XG4iXX0=
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { inject, InjectionToken } from '@angular/core';
|
|
2
|
+
import { WINDOW } from '@ng-web-apis/common';
|
|
3
|
+
export const TUI_VIEWPORT = new InjectionToken(`[TUI_VIEWPORT]: Viewport accessor`, {
|
|
4
|
+
factory: () => {
|
|
5
|
+
const windowRef = inject(WINDOW);
|
|
6
|
+
return {
|
|
7
|
+
getClientRect() {
|
|
8
|
+
return {
|
|
9
|
+
top: 0,
|
|
10
|
+
left: 0,
|
|
11
|
+
right: windowRef.innerWidth,
|
|
12
|
+
bottom: windowRef.innerHeight,
|
|
13
|
+
width: windowRef.innerWidth,
|
|
14
|
+
height: windowRef.innerHeight,
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export function tuiAsViewport(useExisting) {
|
|
21
|
+
return {
|
|
22
|
+
provide: TUI_VIEWPORT,
|
|
23
|
+
useExisting,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlld3BvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL3Rva2Vucy92aWV3cG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsTUFBTSxFQUFFLGNBQWMsRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDckUsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLHFC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XNzb3JgLFxuICAgIHtcbiAgICAgICAgZmFjdG9yeTogKCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgd2luZG93UmVmID0gaW5qZWN0KFdJTkRPVyk7XG5cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgZ2V0Q2xpZW50UmVjdCgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICByaWdodDogd2luZG93UmVmLmlubmVyV2lkdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBib3R0b206IHdpbmRvd1JlZi5pbm5lckhlaWdodCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiB3aW5kb3dSZWYuaW5uZXJXaWR0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogd2luZG93UmVmLmlubmVySGVpZ2h0LFxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9O1xuICAgICAgICB9LFxuICAgIH0sXG4pO1xuXG5leHBvcnQgZnVuY3Rpb24gdHVpQXNWaWV3cG9ydCh1c2VFeGlzdGluZzogVHlwZTxUdWlSZWN0QWNjZXNzb3I+KTogUHJvdmlkZXIge1xuICAgIHJldHVybiB7XG4gICAgICAgIHByb3ZpZGU6IFRVSV9WSUVXUE9SVCxcbiAgICAgICAgdXNlRXhpc3RpbmcsXG4gICAgfTtcbn1cbiJdfQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-abstract.js","sources":["../../../projects/core/abstract/driver.ts","../../../projects/core/abstract/vehicle.ts","../../../projects/core/abstract/abstract-driver.directive.ts","../../../projects/core/abstract/abstract-textfield-host.ts","../../../projects/core/abstract/position-accessor.ts","../../../projects/core/abstract/rect-accessor.ts","../../../projects/core/abstract/taiga-ui-core-abstract.ts"],"sourcesContent":["import {ExistingProvider, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiDriver extends Observable<boolean> {}\n\nexport function tuiAsDriver(useExisting: Type<TuiDriver>): ExistingProvider {\n return {\n provide: TuiDriver,\n useExisting,\n };\n}\n","import {ExistingProvider, Type} from '@angular/core';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiVehicle {\n abstract toggle(value: boolean): void;\n}\n\nexport function tuiAsVehicle(useExisting: Type<TuiVehicle>): ExistingProvider {\n return {\n provide: TuiVehicle,\n useExisting,\n };\n}\n","import {Directive, Inject, Self} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, takeUntil} from 'rxjs/operators';\n\nimport {TuiDriver} from './driver';\nimport {TuiVehicle} from './vehicle';\n\n@Directive()\nexport abstract class AbstractTuiDriverDirective {\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TuiDriver) driver$: Observable<boolean>,\n @Inject(TuiVehicle) vehicle: TuiVehicle,\n ) {\n driver$.pipe(distinctUntilChanged(), takeUntil(destroy$)).subscribe(value => {\n vehicle.toggle(value);\n });\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n@Directive()\nexport abstract class AbstractTuiTextfieldHost<T extends AbstractTuiControl<any>>\n implements TuiTextfieldHost\n{\n constructor(@Inject(AbstractTuiControl) protected readonly host: T) {}\n\n get readOnly(): boolean {\n return this.host.readOnly;\n }\n\n get disabled(): boolean {\n return this.host.computedDisabled;\n }\n\n get invalid(): boolean {\n return this.host.computedInvalid;\n }\n\n get focusable(): boolean {\n return this.host.computedFocusable;\n }\n\n get value(): string {\n return this.host.value?.toString() || ``;\n }\n\n abstract onValueChange(value: string): void;\n\n process(_input: HTMLInputElement): void {}\n}\n","import {ExistingProvider, Type} from '@angular/core';\nimport {TuiPoint} from '@taiga-ui/core/types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiPositionAccessor {\n abstract getPosition(rect: ClientRect): TuiPoint;\n}\n\nexport function tuiAsPositionAccessor(\n useExisting: Type<TuiPositionAccessor>,\n): ExistingProvider {\n return {\n provide: TuiPositionAccessor,\n useExisting,\n };\n}\n","import {ExistingProvider, Type} from '@angular/core';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiRectAccessor {\n abstract getClientRect(): ClientRect;\n}\n\nexport function tuiAsRectAccessor(useExisting: Type<TuiRectAccessor>): ExistingProvider {\n return {\n provide: TuiRectAccessor,\n useExisting,\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;AACM,MAAgB,SAAU,SAAQ,UAAmB,CAAA;AAAG,CAAA;AAExD,SAAU,WAAW,CAAC,WAA4B,EAAA;IACpD,OAAO;AACH,QAAA,OAAO,EAAE,SAAS;QAClB,WAAW;KACd,CAAC;AACN;;ACTA;MACsB,UAAU,CAAA;AAE/B,CAAA;AAEK,SAAU,YAAY,CAAC,WAA6B,EAAA;IACtD,OAAO;AACH,QAAA,OAAO,EAAE,UAAU;QACnB,WAAW;KACd,CAAC;AACN;;MCHsB,0BAA0B,CAAA;AAC5C,IAAA,WAAA,CACuC,QAA6B,EAC7C,OAA4B,EAC3B,OAAmB,EAAA;AAEvC,QAAA,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,IAAG;AACxE,YAAA,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1B,SAAC,CAAC,CAAC;KACN;;AATiB,0BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAA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AC5C;IAID,OAAO,CAAC,MAAwB,EAAA,GAAU;;AA3BxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,kBAGtB,kBAAkB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;0GAHpB,wBAAwB,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAD7C,SAAS;;0BAIO,MAAM;2BAAC,kBAAkB,CAAA;;;ACL1C;MACsB,mBAAmB,CAAA;AAExC,CAAA;AAEK,SAAU,qBAAqB,CACjC,WAAsC,EAAA;IAEtC,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;QAC5B,WAAW;KACd,CAAC;AACN;;ACbA;MACsB,eAAe,CAAA;AAEpC,CAAA;AAEK,SAAU,iBAAiB,CAAC,WAAkC,EAAA;IAChE,OAAO;AACH,QAAA,OAAO,EAAE,eAAe;QACxB,WAAW;KACd,CAAC;AACN;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-abstract.js","sources":["../../../projects/core/abstract/driver.ts","../../../projects/core/abstract/vehicle.ts","../../../projects/core/abstract/abstract-driver.directive.ts","../../../projects/core/abstract/abstract-textfield-host.ts","../../../projects/core/abstract/position-accessor.ts","../../../projects/core/abstract/rect-accessor.ts","../../../projects/core/abstract/taiga-ui-core-abstract.ts"],"sourcesContent":["import {ExistingProvider, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiDriver extends Observable<boolean> {}\n\nexport function tuiAsDriver(useExisting: Type<TuiDriver>): ExistingProvider {\n return {\n provide: TuiDriver,\n useExisting,\n };\n}\n","import {ExistingProvider, Type} from '@angular/core';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiVehicle {\n abstract toggle(value: boolean): void;\n}\n\nexport function tuiAsVehicle(useExisting: Type<TuiVehicle>): ExistingProvider {\n return {\n provide: TuiVehicle,\n useExisting,\n };\n}\n","import {Directive, Inject, Self} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, takeUntil} from 'rxjs/operators';\n\nimport {TuiDriver} from './driver';\nimport {TuiVehicle} from './vehicle';\n\n@Directive()\nexport abstract class AbstractTuiDriverDirective {\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TuiDriver) driver$: Observable<boolean>,\n @Inject(TuiVehicle) vehicle: TuiVehicle,\n ) {\n driver$.pipe(distinctUntilChanged(), takeUntil(destroy$)).subscribe(value => {\n vehicle.toggle(value);\n });\n }\n}\n","import {Directive, Inject} from '@angular/core';\nimport {AbstractTuiControl} from '@taiga-ui/cdk';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\n@Directive()\nexport abstract class AbstractTuiTextfieldHost<T extends AbstractTuiControl<any>>\n implements TuiTextfieldHost\n{\n constructor(@Inject(AbstractTuiControl) protected readonly host: T) {}\n\n get readOnly(): boolean {\n return this.host.readOnly;\n }\n\n get disabled(): boolean {\n return this.host.computedDisabled;\n }\n\n get invalid(): boolean {\n return this.host.computedInvalid;\n }\n\n get focusable(): boolean {\n return this.host.computedFocusable;\n }\n\n get value(): string {\n return this.host.value?.toString() || ``;\n }\n\n abstract onValueChange(value: string): void;\n\n process(_input: HTMLInputElement): void {}\n}\n","import {ExistingProvider, Type} from '@angular/core';\nimport {TuiPoint} from '@taiga-ui/core/types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiPositionAccessor {\n abstract getPosition(rect: ClientRect): TuiPoint;\n}\n\nexport function tuiAsPositionAccessor(\n useExisting: Type<TuiPositionAccessor>,\n): ExistingProvider {\n return {\n provide: TuiPositionAccessor,\n useExisting,\n };\n}\n","import {ExistingProvider, Type} from '@angular/core';\n\n// TODO: Rename to getBoundingClientRect to match the DOM API\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport abstract class TuiRectAccessor {\n abstract getClientRect(): ClientRect;\n}\n\nexport function tuiAsRectAccessor(useExisting: Type<TuiRectAccessor>): ExistingProvider {\n return {\n provide: TuiRectAccessor,\n useExisting,\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;AACM,MAAgB,SAAU,SAAQ,UAAmB,CAAA;AAAG,CAAA;AAExD,SAAU,WAAW,CAAC,WAA4B,EAAA;IACpD,OAAO;AACH,QAAA,OAAO,EAAE,SAAS;QAClB,WAAW;KACd,CAAC;AACN;;ACTA;MACsB,UAAU,CAAA;AAE/B,CAAA;AAEK,SAAU,YAAY,CAAC,WAA6B,EAAA;IACtD,OAAO;AACH,QAAA,OAAO,EAAE,UAAU;QACnB,WAAW;KACd,CAAC;AACN;;MCHsB,0BAA0B,CAAA;AAC5C,IAAA,WAAA,CACuC,QAA6B,EAC7C,OAA4B,EAC3B,OAAmB,EAAA;AAEvC,QAAA,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,IAAG;AACxE,YAAA,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1B,SAAC,CAAC,CAAC;KACN;;AATiB,0BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,EAExB,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,iBAAiB,EACzB,IAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAAA,SAAS,aACT,UAAU,EAAA,CAAA,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,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;0GAHpB,wBAAwB,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAD7C,SAAS;;0BAIO,MAAM;2BAAC,kBAAkB,CAAA;;;ACL1C;MACsB,mBAAmB,CAAA;AAExC,CAAA;AAEK,SAAU,qBAAqB,CACjC,WAAsC,EAAA;IAEtC,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;QAC5B,WAAW;KACd,CAAC;AACN;;ACbA;AACA;MACsB,eAAe,CAAA;AAEpC,CAAA;AAEK,SAAU,iBAAiB,CAAC,WAAkC,EAAA;IAChE,OAAO;AACH,QAAA,OAAO,EAAE,eAAe;QACxB,WAAW;KACd,CAAC;AACN;;ACbA;;AAEG;;;;"}
|
|
@@ -1,67 +1,88 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { InjectionToken, ElementRef, Injectable, Inject, Component, ChangeDetectionStrategy, Self, HostBinding, inject, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i4 from '@taiga-ui/cdk';
|
|
4
|
-
import {
|
|
4
|
+
import { tuiTypedFromEvent, tuiIsCurrentTarget, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter, TUI_IS_MOBILE, TuiDestroyService, AbstractTuiDialogService, AbstractTuiDialogDirective, TuiPreventDefaultModule, tuiAsDialog } from '@taiga-ui/cdk';
|
|
5
5
|
import { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';
|
|
6
6
|
import { TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD } from '@taiga-ui/core/tokens';
|
|
7
7
|
import * as i3 from '@tinkoff/ng-polymorpheus';
|
|
8
8
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
9
|
+
import * as i5 from 'rxjs';
|
|
10
|
+
import { EMPTY, Observable, merge, Subject, isObservable, of } from 'rxjs';
|
|
11
|
+
import { filter, switchMap, take, map, takeUntil } from 'rxjs/operators';
|
|
9
12
|
import * as i2 from '@angular/common';
|
|
10
13
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
11
14
|
import { WINDOW } from '@ng-web-apis/common';
|
|
12
|
-
import { tuiGetViewportWidth } from '@taiga-ui/core/utils
|
|
13
|
-
import * as i5 from 'rxjs';
|
|
14
|
-
import { EMPTY, merge } from 'rxjs';
|
|
15
|
-
import { filter, switchMap, take, takeUntil } from 'rxjs/operators';
|
|
15
|
+
import { tuiGetViewportWidth } from '@taiga-ui/core/utils';
|
|
16
16
|
import * as i1 from '@taiga-ui/core/components/button';
|
|
17
17
|
import { TuiButtonModule } from '@taiga-ui/core/components/button';
|
|
18
18
|
|
|
19
|
+
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
20
|
+
size: `m`,
|
|
21
|
+
required: false,
|
|
22
|
+
closeable: true,
|
|
23
|
+
dismissible: true,
|
|
24
|
+
label: ``,
|
|
25
|
+
header: ``,
|
|
26
|
+
};
|
|
19
27
|
const TUI_DIALOGS_CLOSE = new InjectionToken(`[TUI_DIALOGS_CLOSE]: A stream to close dialogs`, {
|
|
20
28
|
factory: () => EMPTY,
|
|
21
29
|
});
|
|
30
|
+
const TUI_DIALOG_OPTIONS = new InjectionToken(`[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`, {
|
|
31
|
+
factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
|
|
32
|
+
});
|
|
33
|
+
function tuiDialogOptionsProvider(options) {
|
|
34
|
+
return {
|
|
35
|
+
provide: TUI_DIALOG_OPTIONS,
|
|
36
|
+
useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
const SCROLLBAR_PLACEHOLDER = 17;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]
|
|
41
|
+
class TuiDialogCloseService extends Observable {
|
|
42
|
+
constructor(windowRef, documentRef, elementRef) {
|
|
43
|
+
super(subscriber => merge(this.click$, this.esc$, this.mousedown$).subscribe(subscriber));
|
|
44
|
+
this.windowRef = windowRef;
|
|
45
|
+
this.documentRef = documentRef;
|
|
46
|
+
this.elementRef = elementRef;
|
|
47
|
+
this.click$ = tuiTypedFromEvent(this.element, `click`).pipe(filter(tuiIsCurrentTarget));
|
|
48
|
+
this.esc$ = tuiTypedFromEvent(this.documentRef, `keydown`).pipe(filter(event => {
|
|
49
|
+
const key = event.key;
|
|
50
|
+
const target = tuiGetActualTarget(event);
|
|
51
|
+
return (key === `Escape` &&
|
|
52
|
+
tuiIsElement(target) &&
|
|
53
|
+
(this.element.contains(target) ||
|
|
54
|
+
!tuiContainsOrAfter(this.element, target)));
|
|
55
|
+
}));
|
|
56
|
+
this.mousedown$ = tuiTypedFromEvent(this.documentRef, `mousedown`).pipe(filter(event => {
|
|
57
|
+
const target = tuiGetActualTarget(event);
|
|
58
|
+
const clientX = event.clientX;
|
|
59
|
+
return (tuiIsElement(target) &&
|
|
60
|
+
tuiGetViewportWidth(this.windowRef) - clientX > SCROLLBAR_PLACEHOLDER &&
|
|
61
|
+
!tuiContainsOrAfter(this.element, target));
|
|
62
|
+
}), switchMap(() => tuiTypedFromEvent(this.documentRef, `mouseup`).pipe(take(1), map(tuiGetActualTarget), filter(target => tuiIsElement(target) && !tuiContainsOrAfter(this.element, target)))));
|
|
63
|
+
}
|
|
64
|
+
get element() {
|
|
65
|
+
return this.elementRef.nativeElement;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
TuiDialogCloseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogCloseService, deps: [{ token: WINDOW }, { token: DOCUMENT }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
TuiDialogCloseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogCloseService });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogCloseService, decorators: [{
|
|
71
|
+
type: Injectable
|
|
72
|
+
}], ctorParameters: function () { return [{ type: Window, decorators: [{
|
|
73
|
+
type: Inject,
|
|
74
|
+
args: [WINDOW]
|
|
75
|
+
}] }, { type: Document, decorators: [{
|
|
76
|
+
type: Inject,
|
|
77
|
+
args: [DOCUMENT]
|
|
78
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
79
|
+
type: Inject,
|
|
80
|
+
args: [ElementRef]
|
|
81
|
+
}] }]; } });
|
|
61
82
|
|
|
62
83
|
const REQUIRED_ERROR = new Error('Required dialog was dismissed');
|
|
63
84
|
class TuiDialogComponent {
|
|
64
|
-
constructor(duration, isMobile, context, close$, closeWord$) {
|
|
85
|
+
constructor(duration, isMobile, context, destroy$, dialogClose$, close$, closeWord$) {
|
|
65
86
|
this.duration = duration;
|
|
66
87
|
this.isMobile = isMobile;
|
|
67
88
|
this.context = context;
|
|
@@ -80,7 +101,12 @@ class TuiDialogComponent {
|
|
|
80
101
|
duration: this.duration,
|
|
81
102
|
},
|
|
82
103
|
};
|
|
83
|
-
close
|
|
104
|
+
this.close$ = new Subject();
|
|
105
|
+
merge(merge(dialogClose$, this.close$).pipe(switchMap(() => isObservable(context.closeable)
|
|
106
|
+
? context.closeable
|
|
107
|
+
: of(context.closeable)), filter(Boolean)), close$)
|
|
108
|
+
.pipe(takeUntil(destroy$))
|
|
109
|
+
.subscribe(() => {
|
|
84
110
|
this.close();
|
|
85
111
|
});
|
|
86
112
|
}
|
|
@@ -104,8 +130,8 @@ class TuiDialogComponent {
|
|
|
104
130
|
}
|
|
105
131
|
}
|
|
106
132
|
}
|
|
107
|
-
TuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogComponent, deps: [{ token: TUI_ANIMATIONS_DURATION }, { token: TUI_IS_MOBILE }, { token: POLYMORPHEUS_CONTEXT }, { token:
|
|
108
|
-
TuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDialogComponent, selector: "tui-dialog", host: { properties: { "attr.data-size": "this.size", "class._centered": "this.header", "@tuiSlideInTop": "this.slideInTop", "@tuiFadeIn": "this.slideInTop" } }, providers:
|
|
133
|
+
TuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogComponent, deps: [{ token: TUI_ANIMATIONS_DURATION }, { token: TUI_IS_MOBILE }, { token: POLYMORPHEUS_CONTEXT }, { token: TuiDestroyService, self: true }, { token: TuiDialogCloseService }, { token: TUI_DIALOGS_CLOSE }, { token: TUI_CLOSE_WORD }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
TuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiDialogComponent, selector: "tui-dialog", host: { properties: { "attr.data-size": "this.size", "class._centered": "this.header", "@tuiSlideInTop": "this.slideInTop", "@tuiFadeIn": "this.slideInTop" } }, providers: [TuiDestroyService, TuiDialogCloseService], ngImport: i0, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close$.next()\"\n ></button>\n</div>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:\"\";border-radius:inherit;pointer-events:none}:host[data-size=auto]{width:auto}:host[data-size=s]{width:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size=m]{width:42.5rem}:host[data-size=m] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size=l]{width:55rem}:host[data-size=l] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100%;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=\"fullscreen\"]) .t-close{animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=\"fullscreen\"]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:transparent;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}\n"], components: [{ type: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
109
135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
110
136
|
type: Component,
|
|
111
137
|
args: [{
|
|
@@ -115,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
115
141
|
// So we don't force OnPush on dialog content
|
|
116
142
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
|
117
143
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
118
|
-
providers:
|
|
144
|
+
providers: [TuiDestroyService, TuiDialogCloseService],
|
|
119
145
|
animations: [tuiSlideInTop, tuiFadeIn],
|
|
120
146
|
}]
|
|
121
147
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -129,7 +155,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
129
155
|
args: [POLYMORPHEUS_CONTEXT]
|
|
130
156
|
}] }, { type: i5.Observable, decorators: [{
|
|
131
157
|
type: Inject,
|
|
132
|
-
args: [
|
|
158
|
+
args: [TuiDestroyService]
|
|
159
|
+
}, {
|
|
160
|
+
type: Self
|
|
161
|
+
}] }, { type: i5.Observable, decorators: [{
|
|
162
|
+
type: Inject,
|
|
163
|
+
args: [TuiDialogCloseService]
|
|
164
|
+
}] }, { type: i5.Observable, decorators: [{
|
|
165
|
+
type: Inject,
|
|
166
|
+
args: [TUI_DIALOGS_CLOSE]
|
|
133
167
|
}] }, { type: i5.Observable, decorators: [{
|
|
134
168
|
type: Inject,
|
|
135
169
|
args: [TUI_CLOSE_WORD]
|
|
@@ -147,24 +181,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
147
181
|
args: ['@tuiFadeIn']
|
|
148
182
|
}] } });
|
|
149
183
|
|
|
150
|
-
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
151
|
-
size: `m`,
|
|
152
|
-
required: false,
|
|
153
|
-
closeable: true,
|
|
154
|
-
dismissible: true,
|
|
155
|
-
label: ``,
|
|
156
|
-
header: ``,
|
|
157
|
-
};
|
|
158
|
-
const TUI_DIALOG_OPTIONS = new InjectionToken(`[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`, {
|
|
159
|
-
factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
|
|
160
|
-
});
|
|
161
|
-
function tuiDialogOptionsProvider(options) {
|
|
162
|
-
return {
|
|
163
|
-
provide: TUI_DIALOG_OPTIONS,
|
|
164
|
-
useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
184
|
const DIALOG = new PolymorpheusComponent(TuiDialogComponent);
|
|
169
185
|
class TuiDialogService extends AbstractTuiDialogService {
|
|
170
186
|
constructor() {
|
|
@@ -225,5 +241,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
225
241
|
* Generated bundle index. Do not edit.
|
|
226
242
|
*/
|
|
227
243
|
|
|
228
|
-
export { TUI_DIALOGS_CLOSE,
|
|
244
|
+
export { TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialogCloseService, TuiDialogComponent, TuiDialogDirective, TuiDialogModule, TuiDialogService, tuiDialogOptionsProvider };
|
|
229
245
|
//# sourceMappingURL=taiga-ui-core-components-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dialog.js","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.tokens.ts","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.module.ts","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiContainsOrAfter,\n TuiDestroyService,\n TuiDialog,\n tuiGetActualTarget,\n tuiIsCurrentTarget,\n tuiIsElement,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMap, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOGS_CLOSE]: A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOG_CLOSE_STREAM]: Dialogs closing stream`,\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: (\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n ): Observable<unknown> => {\n return dismissible\n ? merge(\n tuiTypedFromEvent(nativeElement, `click`).pipe(\n filter(tuiIsCurrentTarget),\n ),\n tuiTypedFromEvent(documentRef, `keydown`).pipe(\n filter(event => {\n const key = event.key;\n const target = tuiGetActualTarget(event);\n\n return (\n key === `Escape` &&\n tuiIsElement(target) &&\n (!tuiContainsOrAfter(nativeElement, target) ||\n nativeElement.contains(target))\n );\n }),\n ),\n tuiTypedFromEvent(documentRef, `mousedown`).pipe(\n filter(event => {\n const target = tuiGetActualTarget(event);\n const clientX = event.clientX;\n\n return (\n tuiIsElement(target) &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !tuiContainsOrAfter(nativeElement, target)\n );\n }),\n switchMap(() =>\n tuiTypedFromEvent(documentRef, `mouseup`).pipe(\n take(1),\n filter(event => {\n const target = tuiGetActualTarget(event);\n\n return (\n tuiIsElement(target) &&\n !tuiContainsOrAfter(nativeElement, target)\n );\n }),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n },\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close()\"\n ></button>\n</div>\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\ntype TuiDialogDefaultOptions = Omit<TuiDialogOptions<unknown>, 'data'>;\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogDefaultOptions = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n};\n\nexport const TUI_DIALOG_OPTIONS = new InjectionToken<TuiDialogDefaultOptions>(\n `[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`,\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_DIALOG_OPTIONS,\n useValue: {...TUI_DIALOG_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = {\n ...inject(TUI_DIALOG_OPTIONS),\n data: undefined,\n };\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsDialog, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n providers: [tuiAsDialog(TuiDialogService)],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAkBa,iBAAiB,GAAG,IAAI,cAAc,CAC/C,gDAAgD,EAChD;AACI,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA,EACH;AAEF,MAAM,qBAAqB,GAAG,EAAE,CAAC;MAEpB,uBAAuB,GAAG,IAAI,cAAc,CACrD,CAAmD,iDAAA,CAAA,EACrD;A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EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAE1E,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGvC,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,aAFb,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,EAAA,OAAA,EAAA,CAHjC,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAK5E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;AACrF,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACjD,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAC7C,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog-close.service.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.module.ts","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {EMPTY, Observable} from 'rxjs';\n\ntype TuiDialogDefaultOptions = Omit<TuiDialogOptions<unknown>, 'data'>;\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogDefaultOptions = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n};\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOGS_CLOSE]: A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nexport const TUI_DIALOG_OPTIONS = new InjectionToken<TuiDialogDefaultOptions>(\n `[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`,\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_DIALOG_OPTIONS,\n useValue: {...TUI_DIALOG_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiIsCurrentTarget,\n tuiIsElement,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, switchMap, take} from 'rxjs/operators';\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly click$ = tuiTypedFromEvent(this.element, `click`).pipe(\n filter(tuiIsCurrentTarget),\n );\n\n private readonly esc$ = tuiTypedFromEvent(this.documentRef, `keydown`).pipe(\n filter(event => {\n const key = event.key;\n const target = tuiGetActualTarget(event);\n\n return (\n key === `Escape` &&\n tuiIsElement(target) &&\n (this.element.contains(target) ||\n !tuiContainsOrAfter(this.element, target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.documentRef, `mousedown`).pipe(\n filter(event => {\n const target = tuiGetActualTarget(event);\n const clientX = event.clientX;\n\n return (\n tuiIsElement(target) &&\n tuiGetViewportWidth(this.windowRef) - clientX > SCROLLBAR_PLACEHOLDER &&\n !tuiContainsOrAfter(this.element, target)\n );\n }),\n switchMap(() =>\n tuiTypedFromEvent(this.documentRef, `mouseup`).pipe(\n take(1),\n map(tuiGetActualTarget),\n filter(\n target =>\n tuiIsElement(target) && !tuiContainsOrAfter(this.element, target),\n ),\n ),\n ),\n );\n\n constructor(\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super(subscriber =>\n merge(this.click$, this.esc$, this.mousedown$).subscribe(subscriber),\n );\n }\n\n private get element(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Self,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDestroyService, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {isObservable, merge, Observable, of, Subject} from 'rxjs';\nimport {filter, switchMap, takeUntil} from 'rxjs/operators';\n\nimport {TUI_DIALOGS_CLOSE} from './dialog.tokens';\nimport {TuiDialogCloseService} from './dialog-close.service';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService, TuiDialogCloseService],\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n readonly close$ = new Subject();\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT) readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TuiDestroyService) @Self() destroy$: Observable<void>,\n @Inject(TuiDialogCloseService) dialogClose$: Observable<unknown>,\n @Inject(TUI_DIALOGS_CLOSE) close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n merge(\n merge(dialogClose$, this.close$).pipe(\n switchMap(() =>\n isObservable(context.closeable)\n ? context.closeable\n : of(context.closeable),\n ),\n filter(Boolean),\n ),\n close$,\n )\n .pipe(takeUntil(destroy$))\n .subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close$.next()\"\n ></button>\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = {\n ...inject(TUI_DIALOG_OPTIONS),\n data: undefined,\n };\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsDialog, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n providers: [tuiAsDialog(TuiDialogService)],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAMa,MAAA,0BAA0B,GAA4B;AAC/D,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE,CAAE,CAAA;AACT,IAAA,MAAM,EAAE,CAAE,CAAA;EACZ;MAEW,iBAAiB,GAAG,IAAI,cAAc,CAC/C,gDAAgD,EAChD;AACI,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA,EACH;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,+DAA+D,EAC/D;AACI,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC5C,CAAA,EACH;AAEI,SAAU,wBAAwB,CACpC,OAAyC,EAAA;IAEzC,OAAO;AACH,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,QAAQ,EAAM,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA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,kBAAkB,EAAE,kBAAkB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACjD,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAC7C,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -14,8 +14,8 @@ import * as i4 from 'rxjs';
|
|
|
14
14
|
const STATUS_ICON = {
|
|
15
15
|
info: 'tuiIconInfo',
|
|
16
16
|
success: 'tuiIconCheckCircle',
|
|
17
|
-
error: '
|
|
18
|
-
warning: '
|
|
17
|
+
error: 'tuiIconXCircle',
|
|
18
|
+
warning: 'tuiIconAlertCircle',
|
|
19
19
|
};
|
|
20
20
|
class TuiNotificationComponent {
|
|
21
21
|
constructor(closeWord$, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-notification.js","sources":["../../../projects/core/components/notification/notification.component.ts","../../../projects/core/components/notification/notification.template.html","../../../projects/core/components/notification/notification.module.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiIsObserved} from '@taiga-ui/cdk';\nimport {\n TUI_CLOSE_WORD,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {Observable} from 'rxjs';\n\nexport const STATUS_ICON = {\n info: 'tuiIconInfo',\n success: 'tuiIconCheckCircle',\n error: '
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-notification.js","sources":["../../../projects/core/components/notification/notification.component.ts","../../../projects/core/components/notification/notification.template.html","../../../projects/core/components/notification/notification.module.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiIsObserved} from '@taiga-ui/cdk';\nimport {\n TUI_CLOSE_WORD,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {Observable} from 'rxjs';\n\nexport const STATUS_ICON = {\n info: 'tuiIconInfo',\n success: 'tuiIconCheckCircle',\n error: 'tuiIconXCircle',\n warning: 'tuiIconAlertCircle',\n} as const;\n\n@Component({\n selector: 'tui-notification',\n templateUrl: './notification.template.html',\n styleUrls: ['./notification.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiNotificationComponent {\n @Input()\n @HostBinding('class._has-icon')\n @tuiDefaultProp()\n hasIcon = this.options.hasIcon;\n\n @Input()\n @HostBinding('attr.data-tui-host-status')\n @tuiDefaultProp()\n status: 'error' | 'info' | 'success' | 'warning' = this.options.status;\n\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly close = new EventEmitter<void>();\n\n constructor(\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n readonly options: TuiNotificationDefaultOptions,\n ) {}\n\n get icon(): string {\n return STATUS_ICON[this.status];\n }\n\n @HostBinding('class._has-close-button')\n get hasClose(): boolean {\n return tuiIsObserved(this.close);\n }\n}\n","<tui-svg\n *ngIf=\"hasIcon\"\n automation-id=\"tui-notification__icon\"\n class=\"t-icon\"\n [src]=\"icon\"\n></tui-svg>\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<button\n *ngIf=\"hasClose\"\n tuiIconButton\n type=\"button\"\n automation-id=\"tui-notification__close\"\n size=\"xs\"\n icon=\"tuiIconCloseLarge\"\n appearance=\"icon\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\n\nimport {TuiNotificationComponent} from './notification.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiButtonModule],\n declarations: [TuiNotificationComponent],\n exports: [TuiNotificationComponent],\n})\nexport class TuiNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiBa,MAAA,WAAW,GAAG;AACvB,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,OAAO,EAAE,oBAAoB;EACtB;MAQE,wBAAwB,CAAA;IAejC,WACqC,CAAA,UAA8B,EAEtD,OAAsC,EAAA;QAFd,IAAU,CAAA,UAAA,GAAV,UAAU,CAAoB;QAEtD,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;AAdnD,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAK/B,QAAA,IAAA,CAAA,MAAM,GAA6C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAI9D,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;KAMtC;AAEJ,IAAA,IAAI,IAAI,GAAA;AACJ,QAAA,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACnC;AAED,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACpC;;sHA5BQ,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAgBrB,cAAc,EAAA,EAAA,EAAA,KAAA,EACd,wBAAwB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAjB3B,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,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(TuiPrimitiveTextfieldComponent),
|
|
271
271
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
272
272
|
MODE_PROVIDER,
|
|
273
|
-
], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.name]=\"name\"\n [attr.aria-invalid]=\"computedInvalid\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner || controller.options.iconCleaner as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"hintOptions && hintOptions.content && !computedDisabled\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintOptions.content\"\n [direction]=\"hintOptions.direction\"\n [appearance]=\"hintOptions.appearance\"\n [showDelay]=\"hintOptions.showDelay\"\n [hideDelay]=\"hintOptions.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size=s]{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:\"\";margin-right:-.25rem}:host[data-size=m] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}.t-cleaner:hover{color:var(--tui-text-02)}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size=s] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}.t-icon{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);box-sizing:border-box;cursor:pointer;transition-property:color,transform;position:relative;pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}.t-icon:hover{color:var(--tui-text-02)}:host._readonly .t-icon,:host._disabled .t-icon{pointer-events:none}:host[data-mode=onDark] .t-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-icon:hover{color:var(--tui-text-01-night)}:host:hover:not(._readonly) .t-icon{color:var(--tui-text-02)}:host[data-mode=onDark]:hover:not(._readonly) .t-icon{color:var(--tui-text-01-night)}:host[data-mode=onLight]:hover:not(._readonly) .t-icon{color:var(--tui-text-01)}input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}input::placeholder{color:var(--tui-text-03);opacity:0}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::-ms-input-placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::-ms-input-placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::-ms-input-placeholder{opacity:1}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::placeholder{opacity:1}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
273
|
+
], queries: [{ propertyName: "content", predicate: PolymorpheusOutletDirective, descendants: true }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"content?.changes | async\"></ng-container>\n<ng-container *ngIf=\"hintOptions?.change$ | async\"></ng-container>\n<div\n tuiWrapper\n automation-id=\"tui-primitive-textfield__wrapper\"\n [appearance]=\"appearance\"\n [readOnly]=\"readOnly\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [active]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [style.--text-indent.px]=\"decor.pre$ | async\"\n (mousedown)=\"onMouseDown($event)\"\n (click.prevent.silent)=\"(0)\"\n (tuiAutofilledChange)=\"onAutofilled($event)\"\n>\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"select\"></ng-content>\n <input\n #focusableElement\n tuiMaskAccessor\n automation-id=\"tui-primitive-textfield__native-input\"\n class=\"t-input\"\n [attr.disabled]=\"computedDisabled || null\"\n [attr.name]=\"name\"\n [attr.aria-invalid]=\"computedInvalid\"\n [id]=\"id\"\n [readOnly]=\"readOnly || !editable\"\n [tuiFocusable]=\"computedFocusable\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div\n *ngIf=\"inputHidden\"\n automation-id=\"tui-primitive-textfield__value\"\n class=\"t-input t-input_template\"\n >\n <ng-content select=\"tuiContent\"></ng-content>\n </div>\n <div class=\"t-content\">\n <div\n *ngIf=\"iconLeftContent\"\n class=\"t-icon t-icon_left t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n class=\"t-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <div class=\"t-wrapper\">\n <label\n *ngIf=\"hasPlaceholder\"\n automation-id=\"tui-primitive-textfield__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n [for]=\"computedId\"\n >\n <ng-content></ng-content>\n </label>\n <div class=\"t-wrapper-value-decoration\">\n <tui-value-decoration\n #decor\n automation-id=\"tui-primitive-textfield__value-decoration\"\n aria-hidden=\"true\"\n class=\"t-value-decoration\"\n [class.t-has-value]=\"value\"\n [style.textIndent.px]=\"getIndent$(focusableElement) | async\"\n ></tui-value-decoration>\n </div>\n </div>\n <div\n *ngIf=\"hasCustomContent\"\n automation-id=\"tui-primitive-textfield__custom-content\"\n class=\"t-custom-content\"\n >\n <tui-svg\n *polymorpheusOutlet=\"controller.customContent as src\"\n class=\"t-custom-icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n <span\n *ngIf=\"hasCleaner\"\n tuiWrapper\n appearance=\"icon\"\n automation-id=\"tui-primitive-textfield__cleaner\"\n class=\"t-cleaner\"\n (click.stop)=\"clear()\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconCleaner || controller.options.iconCleaner as src; context: {$implicit: size}\"\n [src]=\"src\"\n ></tui-svg>\n </span>\n <tui-tooltip\n *ngIf=\"hintOptions && hintOptions.content && !computedDisabled\"\n automation-id=\"tui-primitive-textfield__tooltip\"\n [describeId]=\"computedId\"\n [content]=\"hintOptions.content\"\n [direction]=\"hintOptions.direction\"\n [appearance]=\"hintOptions.appearance\"\n [showDelay]=\"hintOptions.showDelay\"\n [hideDelay]=\"hintOptions.hideDelay\"\n ></tui-tooltip>\n <div\n *ngIf=\"iconContent\"\n class=\"t-icon t-textfield-icon\"\n >\n <tui-svg\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiWrapper\n appearance=\"icon\"\n [src]=\"src\"\n ></tui-svg>\n </div>\n </div>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m);text-align:left}:host[data-size=s]{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-size=m]{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-size=l]{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font:var(--tui-font-text-m);line-height:1.25rem}.t-input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0;margin:0;border:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;padding:0 var(--tui-padding-m);border:solid transparent;border-width:0 var(--border-end, 0) 0 var(--border-start, 0);border-inline-start-width:var(--border-start, 0);border-inline-end-width:var(--border-end, 0);text-indent:var(--text-indent);text-align:inherit;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit;resize:none}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}:host[data-mode=onDark] .t-input:-webkit-autofill,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill,:host[data-mode=onDark] .t-input:-webkit-autofill:hover,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:hover,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:hover,:host[data-mode=onDark] .t-input:-webkit-autofill:focus,.t-input :host-context(tui-primitive-textfield[data-mode=\"onDark\"]):-webkit-autofill:focus,.t-input :host-context(tui-text-area[data-mode=\"onDark\"]):-webkit-autofill:focus{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill-night) inset!important}:host[data-size=s] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"s\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"s\"]):not(tui-text-area){padding:0 var(--tui-padding-s)}:host[data-size=l] .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]):not(tui-primitive-textfield),.t-input :host-context(tui-text-area[data-size=\"l\"]):not(tui-text-area){padding:0 var(--tui-padding-l)}:host._disabled .t-input,.t-input :host-context(tui-primitive-textfield._disabled),.t-input :host-context(tui-text-area._disabled){pointer-events:none}:host[data-size=l]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.25rem}:host[data-size=l]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"l\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.8156rem;transform:translateY(-.625rem)}:host[data-size=m]:not(._label-outside) .t-input,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield){padding-top:1.125rem}:host[data-size=m]:not(._label-outside) .t-input:-webkit-autofill+.t-content .t-placeholder,.t-input :host-context(tui-primitive-textfield[data-size=\"m\"]:not(._label-outside)):not(tui-primitive-textfield):-webkit-autofill+.t-content .t-placeholder{font-size:.69rem;transform:translateY(-.5rem)}:host._hidden input.t-input,.t-input :host-context(tui-primitive-textfield._hidden){opacity:0;text-indent:-10em;-webkit-user-select:none}.t-content{display:flex;height:100%;width:100%;padding:0 var(--tui-padding-m);box-sizing:border-box;align-items:center;overflow:hidden}:host[data-size=s] .t-content{padding:0 var(--tui-padding-s)}:host[data-size=l] .t-content{padding:0 var(--tui-padding-l)}.t-content:after{content:\"\";margin-right:-.25rem}:host[data-size=m] .t-content:after{display:none}.t-wrapper{flex:1;min-width:0;padding-right:.25rem;-webkit-padding-end:.25rem;padding-inline-end:.25rem;-webkit-padding-start:0;padding-inline-start:0}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0)}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size=l] .t-placeholder{font-size:.9375rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size=m][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size=l][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size=m][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size=l][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-cleaner{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-icon{position:relative;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin:0 .5rem 0 -.25rem;-webkit-margin-start:-.25rem;margin-inline-start:-.25rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}:host[data-size=s] .t-icon_left{margin-right:.25rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem}:host._autofilled .t-value-decoration:not(.t-has-value){visibility:hidden}:host._autofilled[data-size=s]:not(._focused) .t-placeholder,:host._autofilled[data-size=m]:not(._focused) .t-placeholder{visibility:hidden}.t-custom-content{position:relative;display:flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;margin-right:.25rem;pointer-events:none}.t-custom-icon{width:2rem;height:100%}input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}input::placeholder{color:var(--tui-text-03);opacity:0}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::-ms-input-placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield[data-mode=\"onDark\"]) input::placeholder,:host-context(tui-text-area[data-mode=\"onDark\"]) input::placeholder{color:var(--tui-text-03-night)}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::-ms-input-placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::-ms-input-placeholder{opacity:1}:host-context(tui-primitive-textfield._focused:not(._readonly)) input::placeholder,:host-context(tui-text-area._focused:not(._readonly)) input::placeholder{opacity:1}.t-input:not(:first-child){display:none}:host[data-size] .t-input_template{display:flex;width:calc(100% - 1rem);max-width:calc(100% - 1rem);align-items:center;pointer-events:none;-webkit-padding-end:0;padding-inline-end:0}.t-input:-webkit-autofill,.t-input:-webkit-autofill:first-line{font-size:inherit;line-height:inherit}.t-input::-webkit-caps-lock-indicator,.t-input::-webkit-contacts-auto-fill-button,.t-input::-webkit-credit-card-auto-fill-button,.t-input::-webkit-credentials-auto-fill-button,.t-input::-webkit-strong-password-auto-fill-button{content:none!important;position:absolute;left:-62.4375rem;top:-62.4375rem;z-index:-999;display:none!important;background:transparent!important;pointer-events:none!important}.t-text-template{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-wrapper-value-decoration{position:relative;pointer-events:none}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }, { type: TuiValueDecorationComponent, selector: "tui-value-decoration" }, { type: i3.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i6.TuiAutofilledDirective, selector: "[tuiAutofilledChange]", outputs: ["tuiAutofilledChange"] }, { type: i7.TuiMaskAccessorDirective, selector: "input[tuiMaskAccessor]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
274
274
|
__decorate([
|
|
275
275
|
tuiDefaultProp()
|
|
276
276
|
], TuiPrimitiveTextfieldComponent.prototype, "editable", void 0);
|