@cuby-ui/core 0.0.57 → 0.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/dialog/dialog.component.d.ts +6 -2
- package/esm2020/components/dialog/dialog.component.mjs +15 -3
- package/esm2020/components/dialog/dialogs.component.mjs +2 -2
- package/fesm2015/cuby-ui-core.mjs +15 -4
- package/fesm2015/cuby-ui-core.mjs.map +1 -1
- package/fesm2020/cuby-ui-core.mjs +15 -4
- package/fesm2020/cuby-ui-core.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnInit, Type } from '@angular/core';
|
|
1
|
+
import type { OnDestroy, OnInit, Type } from '@angular/core';
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
3
|
import type { CuiValueOf } from '@cuby-ui/cdk';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -8,7 +8,8 @@ export declare const ContentType: {
|
|
|
8
8
|
readonly Component: "component";
|
|
9
9
|
};
|
|
10
10
|
export type IContentType = CuiValueOf<typeof ContentType>;
|
|
11
|
-
export declare class CuiDialogComponent implements OnInit {
|
|
11
|
+
export declare class CuiDialogComponent implements OnInit, OnDestroy {
|
|
12
|
+
protected readonly document: Document;
|
|
12
13
|
protected readonly context: import("@cuby-ui/cdk").CuiPopover<import("./dialog.interfaces").CuiDialogOptions>;
|
|
13
14
|
protected readonly ContentType: {
|
|
14
15
|
readonly String: "string";
|
|
@@ -17,10 +18,13 @@ export declare class CuiDialogComponent implements OnInit {
|
|
|
17
18
|
};
|
|
18
19
|
protected contentType: IContentType;
|
|
19
20
|
ngOnInit(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
20
22
|
protected get contentTemplateRef(): TemplateRef<unknown>;
|
|
21
23
|
protected get componentType(): Type<unknown>;
|
|
22
24
|
protected onClose(): void;
|
|
23
25
|
private initContentType;
|
|
26
|
+
private initBodyScrollHiding;
|
|
27
|
+
private destroyBodyScrollHiding;
|
|
24
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiDialogComponent, never>;
|
|
25
29
|
static ɵcmp: i0.ɵɵComponentDeclaration<CuiDialogComponent, "cui-dialog", never, {}, {}, never, never, false, never>;
|
|
26
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
1
2
|
import { ChangeDetectionStrategy, Component, inject, TemplateRef } from '@angular/core';
|
|
2
3
|
import { CUI_DIALOG_CONTEXT } from './dialog.tokens';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
@@ -10,13 +11,18 @@ export const ContentType = {
|
|
|
10
11
|
};
|
|
11
12
|
export class CuiDialogComponent {
|
|
12
13
|
constructor() {
|
|
14
|
+
this.document = inject(DOCUMENT);
|
|
13
15
|
this.context = inject(CUI_DIALOG_CONTEXT);
|
|
14
16
|
this.ContentType = ContentType;
|
|
15
17
|
this.contentType = ContentType.Component;
|
|
16
18
|
}
|
|
17
19
|
ngOnInit() {
|
|
20
|
+
this.initBodyScrollHiding();
|
|
18
21
|
this.initContentType();
|
|
19
22
|
}
|
|
23
|
+
ngOnDestroy() {
|
|
24
|
+
this.destroyBodyScrollHiding();
|
|
25
|
+
}
|
|
20
26
|
get contentTemplateRef() {
|
|
21
27
|
return this.context.content;
|
|
22
28
|
}
|
|
@@ -37,11 +43,17 @@ export class CuiDialogComponent {
|
|
|
37
43
|
return;
|
|
38
44
|
}
|
|
39
45
|
}
|
|
46
|
+
initBodyScrollHiding() {
|
|
47
|
+
this.document.body.style.overflow = 'hidden';
|
|
48
|
+
}
|
|
49
|
+
destroyBodyScrollHiding() {
|
|
50
|
+
this.document.body.style.overflow = '';
|
|
51
|
+
}
|
|
40
52
|
}
|
|
41
53
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}
|
|
54
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
43
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
44
56
|
type: Component,
|
|
45
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}
|
|
57
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}\n"] }]
|
|
46
58
|
}] });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9kaWFsb2cvZGlhbG9nLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9kaWFsb2cvZGlhbG9nLnRlbXBsYXRlLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUd4RixPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQzs7OztBQUVyRCxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUc7SUFDekIsTUFBTSxFQUFFLFFBQVE7SUFDaEIsUUFBUSxFQUFFLFVBQVU7SUFDcEIsU0FBUyxFQUFFLFdBQVc7Q0FDZCxDQUFDO0FBVVgsTUFBTSxPQUFPLGtCQUFrQjtJQU4vQjtRQU9xQixhQUFRLEdBQUcsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1FBQzVCLFlBQU8sR0FBRyxNQUFNLENBQUMsa0JBQWtCLENBQUMsQ0FBQztRQ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lxuICA+PC9idXR0b24+XG48L2hlYWRlcj5cbjxkaXZcbiAgW25nU3dpdGNoXT1cImNvbnRlbnRUeXBlXCJcbiAgY2xhc3M9XCLRgS1jb250ZW50XCJcbj5cbiAgPG5nLWNvbnRhaW5lciAqbmdTd2l0Y2hDYXNlPVwiQ29udGVudFR5cGUuU3RyaW5nXCI+XG4gICAge3sgY29udGV4dC5jb250ZW50IH19XG4gIDwvbmctY29udGFpbmVyPlxuICA8bmctY29udGFpbmVyICpuZ1N3aXRjaENhc2U9XCJDb250ZW50VHlwZS5UZW1wbGF0ZVwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJjb250ZW50VGVtcGxhdGVSZWY7IGNvbnRleHQ6IGNvbnRleHRcIj48L25nLWNvbnRhaW5lcj5cbiAgPC9uZy1jb250YWluZXI+XG4gIDxuZy1jb250YWluZXIgKm5nU3dpdGNoQ2FzZT1cIkNvbnRlbnRUeXBlLkNvbXBvbmVudFwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PVwiY29tcG9uZW50VHlwZVwiPjwvbmctY29udGFpbmVyPlxuICA8L25nLWNvbnRhaW5lcj5cbjwvZGl2PlxuIl19
|
|
@@ -25,9 +25,9 @@ export class CuiDialogsComponent {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
CuiDialogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
-
CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
|
+
CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{position:relative;z-index:1}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
|
-
args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
|
|
31
|
+
args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{position:relative;z-index:1}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
|
|
32
32
|
}] });
|
|
33
33
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9ncy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi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gIC5zdWJzY3JpYmUoZGlhbG9ncyA9PiB0aGlzLmRpYWxvZ0luamVjdG9ycyA9IGRpYWxvZ3MubWFwKHVzZVZhbHVlID0+IEluamVjdG9yLmNyZWF0ZSh7XG4gICAgICAgIHByb3ZpZGVyczogW3sgcHJvdmlkZTogQ1VJX0RJQUxPR19DT05URVhULCB1c2VWYWx1ZSB9XVxuICAgICAgfSkpKTtcbiAgfVxufVxuIiwiPG5nLWNvbnRhaW5lciAqY3VpTGV0PVwiZGlhbG9ncyQgfCBhc3luYyBhcyBkaWFsb2dzXCI+XG4gIDxkaXZcbiAgICAqbmdJZj1cImRpYWxvZ3MhLmxlbmd0aFwiXG4gICAgY2xhc3M9XCJjLW92ZXJsYXlcIlxuICA+PC9kaXY+XG4gIDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IGRpYWxvZyBvZiBkaWFsb2dzOyBsZXQgaSA9IGluZGV4OyB0cmFja0J5OiB0cmFja0J5Rm5cIj5cbiAgICA8bmctY29udGFpbmVyICpuZ0NvbXBvbmVudE91dGxldD1cImRpYWxvZy5jb21wb25lbnQ7IGluamVjdG9yOiBkaWFsb2dJbmplY3RvcnNbaV1cIj48L25nLWNvbnRhaW5lcj5cbiAgPC9uZy1jb250YWluZXI+XG48L25nLWNvbnRhaW5lcj5cbiJdfQ==
|
|
@@ -863,13 +863,18 @@ const ContentType = {
|
|
|
863
863
|
};
|
|
864
864
|
class CuiDialogComponent {
|
|
865
865
|
constructor() {
|
|
866
|
+
this.document = inject(DOCUMENT);
|
|
866
867
|
this.context = inject(CUI_DIALOG_CONTEXT);
|
|
867
868
|
this.ContentType = ContentType;
|
|
868
869
|
this.contentType = ContentType.Component;
|
|
869
870
|
}
|
|
870
871
|
ngOnInit() {
|
|
872
|
+
this.initBodyScrollHiding();
|
|
871
873
|
this.initContentType();
|
|
872
874
|
}
|
|
875
|
+
ngOnDestroy() {
|
|
876
|
+
this.destroyBodyScrollHiding();
|
|
877
|
+
}
|
|
873
878
|
get contentTemplateRef() {
|
|
874
879
|
return this.context.content;
|
|
875
880
|
}
|
|
@@ -890,12 +895,18 @@ class CuiDialogComponent {
|
|
|
890
895
|
return;
|
|
891
896
|
}
|
|
892
897
|
}
|
|
898
|
+
initBodyScrollHiding() {
|
|
899
|
+
this.document.body.style.overflow = 'hidden';
|
|
900
|
+
}
|
|
901
|
+
destroyBodyScrollHiding() {
|
|
902
|
+
this.document.body.style.overflow = '';
|
|
903
|
+
}
|
|
893
904
|
}
|
|
894
905
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
895
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}
|
|
906
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
896
907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
897
908
|
type: Component,
|
|
898
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}
|
|
909
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}\n"] }]
|
|
899
910
|
}] });
|
|
900
911
|
|
|
901
912
|
class CuiDialogsComponent {
|
|
@@ -918,10 +929,10 @@ class CuiDialogsComponent {
|
|
|
918
929
|
}
|
|
919
930
|
}
|
|
920
931
|
CuiDialogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
921
|
-
CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
932
|
+
CuiDialogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogsComponent, selector: "cui-dialogs", providers: [CuiDestroyService], ngImport: i0, template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{position:relative;z-index:1}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CuiLetDirective, selector: "[cuiLet]", inputs: ["cuiLet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
922
933
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogsComponent, decorators: [{
|
|
923
934
|
type: Component,
|
|
924
|
-
args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
|
|
935
|
+
args: [{ selector: 'cui-dialogs', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiDestroyService], template: "<ng-container *cuiLet=\"dialogs$ | async as dialogs\">\n <div\n *ngIf=\"dialogs!.length\"\n class=\"c-overlay\"\n ></div>\n <ng-container *ngFor=\"let dialog of dialogs; let i = index; trackBy: trackByFn\">\n <ng-container *ngComponentOutlet=\"dialog.component; injector: dialogInjectors[i]\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{position:relative;z-index:1}.c-overlay{position:fixed;inset:0;background:var(--cui-base-900);opacity:.3}\n"] }]
|
|
925
936
|
}] });
|
|
926
937
|
|
|
927
938
|
class CuiDialogModule {
|