vc-create-dashboard 3.0.83 → 3.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/esm2022/lib/configurations.mjs +7 -7
- package/esm2022/lib/create-dashboard-container/categories/categories-config.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/categories/categories.component.mjs +212 -212
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.mjs +350 -350
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/configure-widgets/configure-widgets.module.mjs +47 -47
- package/esm2022/lib/create-dashboard-container/constants/assets.constant.mjs +37 -37
- package/esm2022/lib/create-dashboard-container/create-dashboard-config.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/create-dashboard.component.mjs +1601 -1520
- package/esm2022/lib/create-dashboard-container/create-dashboard.module.mjs +127 -127
- package/esm2022/lib/create-dashboard-container/directives/directives.module.mjs +24 -24
- package/esm2022/lib/create-dashboard-container/directives/scroll-in-view.directive.mjs +36 -36
- package/esm2022/lib/create-dashboard-container/form-group/form-group.component.mjs +153 -153
- package/esm2022/lib/create-dashboard-container/frequency/frequency.component.mjs +309 -309
- package/esm2022/lib/create-dashboard-container/interfaces/widget-data-model.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/pipes/filter.pipe.mjs +30 -30
- package/esm2022/lib/create-dashboard-container/pipes/search-program.pipe.mjs +37 -37
- package/esm2022/lib/create-dashboard-container/pipes/search.pipe.mjs +25 -25
- package/esm2022/lib/create-dashboard-container/pipes/text-count.pipe.mjs +18 -19
- package/esm2022/lib/create-dashboard-container/program-list/constant.mjs +31 -31
- package/esm2022/lib/create-dashboard-container/program-list/information-block/information-block.component.mjs +13 -13
- package/esm2022/lib/create-dashboard-container/program-list/interfaces/list-item.interface.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/program-list/list-container/list-container.component.mjs +50 -50
- package/esm2022/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.mjs +23 -23
- package/esm2022/lib/create-dashboard-container/program-list/program-list/program-list.component.mjs +294 -294
- package/esm2022/lib/create-dashboard-container/program-list/program-list.module.mjs +60 -60
- package/esm2022/lib/create-dashboard-container/program-list/services/list-utils.service.mjs +27 -27
- package/esm2022/lib/create-dashboard-container/program-list/services/program-list-api.service.mjs +28 -35
- package/esm2022/lib/create-dashboard-container/responsibility-center/responsibility-center.component.mjs +224 -149
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories-config.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/risk-categories/risk-categories.component.mjs +206 -206
- package/esm2022/lib/create-dashboard-container/services/configure-widgets.service.mjs +233 -238
- package/esm2022/lib/create-dashboard-container/services/create-dashboard.service.mjs +227 -243
- package/esm2022/lib/create-dashboard-container/services/pagination.service.mjs +28 -28
- package/esm2022/lib/create-dashboard-container/user-list/user-list.component.mjs +440 -440
- package/esm2022/lib/create-dashboard-container/user-list/user-list.config.mjs +2 -2
- package/esm2022/lib/create-dashboard-container/utils/dashboard-edit.utils.mjs +181 -181
- package/esm2022/lib/create-dashboard.service.mjs +14 -14
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.mjs +52 -52
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer-config.mjs +2 -2
- package/esm2022/lib/ui-kit/dashboard-footer/dashboard-footer.module.mjs +32 -32
- package/esm2022/lib/ui-kit/dialog/dialog-config.mjs +7 -7
- package/esm2022/lib/ui-kit/dialog/dialog-injector.mjs +17 -17
- package/esm2022/lib/ui-kit/dialog/dialog-ref.mjs +11 -11
- package/esm2022/lib/ui-kit/dialog/dialog.component.mjs +96 -96
- package/esm2022/lib/ui-kit/dialog/dialog.module.mjs +20 -20
- package/esm2022/lib/ui-kit/dialog/dialog.service.mjs +56 -56
- package/esm2022/lib/ui-kit/dialog/insertion.directive.mjs +17 -17
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.component.mjs +57 -57
- package/esm2022/lib/ui-kit/floating-bar/floating-bar.module.mjs +32 -32
- package/esm2022/lib/ui-kit/formgroup/click-outside.directive.mjs +30 -30
- package/esm2022/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.mjs +29 -29
- package/esm2022/lib/ui-kit/formgroup/cs-radio/cs-radio.component.mjs +34 -34
- package/esm2022/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.mjs +14 -14
- package/esm2022/lib/ui-kit/formgroup/cs-select/cs-select.component.mjs +119 -119
- package/esm2022/lib/ui-kit/formgroup/cs-switch/cs-switch.component.mjs +39 -39
- package/esm2022/lib/ui-kit/formgroup/formgroup.module.mjs +55 -55
- package/esm2022/lib/ui-kit/formgroup/pipes/pascal.pipe.mjs +19 -19
- package/esm2022/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.mjs +24 -24
- package/esm2022/lib/ui-kit/loaders/loaders.module.mjs +24 -24
- package/esm2022/lib/ui-kit/loaders/table-loader/table-loader.component.mjs +18 -18
- package/esm2022/lib/ui-kit/no-data/no-data.component.mjs +47 -47
- package/esm2022/lib/ui-kit/no-data/no-data.module.mjs +18 -18
- package/esm2022/lib/ui-kit/pagination/pagination.component.mjs +130 -130
- package/esm2022/lib/ui-kit/pagination/pagination.module.mjs +18 -18
- package/esm2022/lib/ui-kit/popover/popover.component.mjs +129 -129
- package/esm2022/lib/ui-kit/popover/popover.directive.mjs +93 -93
- package/esm2022/lib/ui-kit/popover/popover.module.mjs +21 -21
- package/esm2022/lib/ui-kit/popover/popover.service.mjs +23 -23
- package/esm2022/lib/ui-kit/select/cs-option/cs-option.component.mjs +41 -41
- package/esm2022/lib/ui-kit/select/cs-select/cs-select.component.mjs +107 -107
- package/esm2022/lib/ui-kit/select/safe-html.pipe.mjs +21 -21
- package/esm2022/lib/ui-kit/select/select.module.mjs +21 -21
- package/esm2022/lib/ui-kit/services/cs-select.service.mjs +16 -16
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.component.mjs +52 -52
- package/esm2022/lib/ui-kit/smiley-dialog/smiley-dialog.module.mjs +18 -18
- package/esm2022/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.mjs +46 -46
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.module.mjs +18 -18
- package/esm2022/lib/ui-kit/snack-bar/snack-bar.service.mjs +23 -23
- package/esm2022/lib/ui-kit/tooltip/tooltip.directive.mjs +168 -168
- package/esm2022/lib/ui-kit/tooltip/tooltip.module.mjs +18 -18
- package/esm2022/lib/ui-kit/v-loader/loader/loader.component.mjs +24 -24
- package/esm2022/lib/ui-kit/v-loader/loader-inline/loader-inline.component.mjs +24 -24
- package/esm2022/lib/ui-kit/v-loader/v-loader.module.mjs +19 -19
- package/esm2022/public-api.mjs +10 -10
- package/esm2022/vc-create-dashboard.mjs +4 -4
- package/fesm2022/vc-create-dashboard.mjs +6438 -6333
- package/fesm2022/vc-create-dashboard.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/configurations.d.ts +4 -4
- package/lib/create-dashboard-container/categories/categories-config.d.ts +18 -18
- package/lib/create-dashboard-container/categories/categories.component.d.ts +66 -66
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/configure-widgets.component.d.ts +113 -113
- package/lib/create-dashboard-container/configure-widgets/configure-widgets/widget.interface.d.ts +9 -9
- package/lib/create-dashboard-container/configure-widgets/configure-widgets.module.d.ts +14 -14
- package/lib/create-dashboard-container/constants/assets.constant.d.ts +35 -35
- package/lib/create-dashboard-container/create-dashboard-config.d.ts +18 -18
- package/lib/create-dashboard-container/create-dashboard.component.d.ts +219 -216
- package/lib/create-dashboard-container/create-dashboard.module.d.ts +37 -37
- package/lib/create-dashboard-container/directives/directives.module.d.ts +8 -8
- package/lib/create-dashboard-container/directives/scroll-in-view.directive.d.ts +12 -12
- package/lib/create-dashboard-container/form-group/form-group.component.d.ts +48 -48
- package/lib/create-dashboard-container/frequency/frequency.component.d.ts +39 -39
- package/lib/create-dashboard-container/interfaces/widget-data-model.d.ts +8 -8
- package/lib/create-dashboard-container/pipes/filter.pipe.d.ts +7 -7
- package/lib/create-dashboard-container/pipes/search-program.pipe.d.ts +7 -7
- package/lib/create-dashboard-container/pipes/search.pipe.d.ts +7 -7
- package/lib/create-dashboard-container/pipes/text-count.pipe.d.ts +7 -7
- package/lib/create-dashboard-container/program-list/constant.d.ts +24 -24
- package/lib/create-dashboard-container/program-list/information-block/information-block.component.d.ts +6 -6
- package/lib/create-dashboard-container/program-list/interfaces/list-item.interface.d.ts +5 -5
- package/lib/create-dashboard-container/program-list/list-container/list-container.component.d.ts +9 -9
- package/lib/create-dashboard-container/program-list/pipes/check-selected-items.pipes.d.ts +7 -7
- package/lib/create-dashboard-container/program-list/program-list/program-list.component.d.ts +119 -119
- package/lib/create-dashboard-container/program-list/program-list.module.d.ts +17 -17
- package/lib/create-dashboard-container/program-list/services/list-utils.service.d.ts +7 -7
- package/lib/create-dashboard-container/program-list/services/program-list-api.service.d.ts +12 -14
- package/lib/create-dashboard-container/responsibility-center/responsibility-center.component.d.ts +70 -62
- package/lib/create-dashboard-container/risk-categories/risk-categories-config.d.ts +18 -18
- package/lib/create-dashboard-container/risk-categories/risk-categories.component.d.ts +66 -66
- package/lib/create-dashboard-container/services/configure-widgets.service.d.ts +21 -23
- package/lib/create-dashboard-container/services/create-dashboard.service.d.ts +80 -82
- package/lib/create-dashboard-container/services/pagination.service.d.ts +12 -12
- package/lib/create-dashboard-container/user-list/user-list.component.d.ts +123 -123
- package/lib/create-dashboard-container/user-list/user-list.config.d.ts +13 -13
- package/lib/create-dashboard-container/utils/dashboard-edit.utils.d.ts +16 -16
- package/lib/create-dashboard.service.d.ts +6 -6
- package/lib/ui-kit/dashboard-footer/dashboard-footer/dashboard-footer.component.d.ts +17 -17
- package/lib/ui-kit/dashboard-footer/dashboard-footer-config.d.ts +11 -11
- package/lib/ui-kit/dashboard-footer/dashboard-footer.module.d.ts +10 -10
- package/lib/ui-kit/dialog/dialog-config.d.ts +6 -6
- package/lib/ui-kit/dialog/dialog-injector.d.ts +7 -7
- package/lib/ui-kit/dialog/dialog-ref.d.ts +7 -7
- package/lib/ui-kit/dialog/dialog.component.d.ts +33 -33
- package/lib/ui-kit/dialog/dialog.module.d.ts +9 -9
- package/lib/ui-kit/dialog/dialog.service.d.ts +17 -17
- package/lib/ui-kit/dialog/insertion.directive.d.ts +8 -8
- package/lib/ui-kit/floating-bar/floating-bar.component.d.ts +20 -20
- package/lib/ui-kit/floating-bar/floating-bar.module.d.ts +10 -10
- package/lib/ui-kit/formgroup/click-outside.directive.d.ts +10 -10
- package/lib/ui-kit/formgroup/cs-checkbox/cs-checkbox.component.d.ts +13 -13
- package/lib/ui-kit/formgroup/cs-radio/cs-radio.component.d.ts +15 -15
- package/lib/ui-kit/formgroup/cs-radio-group/cs-radio-group.component.d.ts +8 -8
- package/lib/ui-kit/formgroup/cs-select/cs-select.component.d.ts +36 -36
- package/lib/ui-kit/formgroup/cs-switch/cs-switch.component.d.ts +15 -15
- package/lib/ui-kit/formgroup/formgroup.module.d.ts +17 -17
- package/lib/ui-kit/formgroup/pipes/pascal.pipe.d.ts +7 -7
- package/lib/ui-kit/formgroup/pipes/searchMultiSelect.pipe.d.ts +7 -7
- package/lib/ui-kit/loaders/loaders.module.d.ts +8 -8
- package/lib/ui-kit/loaders/table-loader/table-loader.component.d.ts +9 -9
- package/lib/ui-kit/no-data/no-data.component.d.ts +19 -19
- package/lib/ui-kit/no-data/no-data.module.d.ts +8 -8
- package/lib/ui-kit/pagination/pagination.component.d.ts +21 -21
- package/lib/ui-kit/pagination/pagination.module.d.ts +8 -8
- package/lib/ui-kit/popover/popover.component.d.ts +28 -28
- package/lib/ui-kit/popover/popover.directive.d.ts +17 -17
- package/lib/ui-kit/popover/popover.module.d.ts +9 -9
- package/lib/ui-kit/popover/popover.service.d.ts +13 -13
- package/lib/ui-kit/select/cs-option/cs-option.component.d.ts +16 -16
- package/lib/ui-kit/select/cs-select/cs-select.component.d.ts +32 -32
- package/lib/ui-kit/select/safe-html.pipe.d.ts +10 -10
- package/lib/ui-kit/select/select.module.d.ts +11 -11
- package/lib/ui-kit/services/cs-select.service.d.ts +7 -7
- package/lib/ui-kit/smiley-dialog/smiley-dialog.component.d.ts +17 -17
- package/lib/ui-kit/smiley-dialog/smiley-dialog.module.d.ts +8 -8
- package/lib/ui-kit/snack-bar/snack-bar/snack-bar.component.d.ts +17 -17
- package/lib/ui-kit/snack-bar/snack-bar.module.d.ts +8 -8
- package/lib/ui-kit/snack-bar/snack-bar.service.d.ts +9 -9
- package/lib/ui-kit/tooltip/tooltip.directive.d.ts +28 -28
- package/lib/ui-kit/tooltip/tooltip.module.d.ts +8 -8
- package/lib/ui-kit/v-loader/loader/loader.component.d.ts +11 -11
- package/lib/ui-kit/v-loader/loader-inline/loader-inline.component.d.ts +11 -11
- package/lib/ui-kit/v-loader/v-loader.module.d.ts +9 -9
- package/package.json +1 -1
- package/public-api.d.ts +3 -3
- package/esm2022/lib/create-dashboard-container/services/auth.service.mjs +0 -31
- package/lib/create-dashboard-container/services/auth.service.d.ts +0 -11
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { Component, ViewChild, } from '@angular/core';
|
|
2
|
-
import { InsertionDirective } from './insertion.directive';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { NavigationEnd, NavigationError, NavigationStart, } from '@angular/router';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "./dialog-ref";
|
|
7
|
-
import * as i2 from "./dialog-config";
|
|
8
|
-
import * as i3 from "@angular/router";
|
|
9
|
-
import * as i4 from "@angular/common";
|
|
10
|
-
import * as i5 from "./insertion.directive";
|
|
11
|
-
export class DialogComponent {
|
|
12
|
-
componentFactoryResolver;
|
|
13
|
-
cd;
|
|
14
|
-
dialogRef;
|
|
15
|
-
config;
|
|
16
|
-
router;
|
|
17
|
-
componentRef;
|
|
18
|
-
position;
|
|
19
|
-
background;
|
|
20
|
-
pointer;
|
|
21
|
-
insertionPoint;
|
|
22
|
-
animation = true;
|
|
23
|
-
onDialogClose = new Subject();
|
|
24
|
-
onClose = this.onDialogClose.asObservable();
|
|
25
|
-
childComponentType;
|
|
26
|
-
constructor(componentFactoryResolver, cd, dialogRef, config, router) {
|
|
27
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
28
|
-
this.cd = cd;
|
|
29
|
-
this.dialogRef = dialogRef;
|
|
30
|
-
this.config = config;
|
|
31
|
-
this.router = router;
|
|
32
|
-
// this.componentRef = this.componentRef;
|
|
33
|
-
// this.animate = this.animate;
|
|
34
|
-
// this.insertionPoint = this.insertionPoint;
|
|
35
|
-
// this.childComponentType = this.childComponentType;
|
|
36
|
-
}
|
|
37
|
-
ngOnInit() {
|
|
38
|
-
this.position = this.config.position;
|
|
39
|
-
this.background = this.config.background;
|
|
40
|
-
document.body.style.overflow = 'hidden';
|
|
41
|
-
setTimeout(() => {
|
|
42
|
-
this.animation = false;
|
|
43
|
-
}, 200);
|
|
44
|
-
this.routeAction();
|
|
45
|
-
}
|
|
46
|
-
routeAction() {
|
|
47
|
-
this.router.events.subscribe((event) => {
|
|
48
|
-
if (event instanceof NavigationStart) {
|
|
49
|
-
// Show loading indicator
|
|
50
|
-
}
|
|
51
|
-
if (event instanceof NavigationEnd) {
|
|
52
|
-
// Hide loading indicator
|
|
53
|
-
this.dialogRef.close();
|
|
54
|
-
}
|
|
55
|
-
if (event instanceof NavigationError) {
|
|
56
|
-
// Hide loading indicator
|
|
57
|
-
// Present error to user
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
ngAfterViewInit() {
|
|
62
|
-
this.loadChildComponent(this.childComponentType);
|
|
63
|
-
this.cd.detectChanges();
|
|
64
|
-
}
|
|
65
|
-
onOverlayClicked(evt) {
|
|
66
|
-
// this.dialogRef.close();
|
|
67
|
-
}
|
|
68
|
-
onDialogClicked(evt) {
|
|
69
|
-
evt.stopPropagation();
|
|
70
|
-
}
|
|
71
|
-
loadChildComponent(componentType) {
|
|
72
|
-
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);
|
|
73
|
-
const viewContainerRef = this.insertionPoint.viewContainerRef;
|
|
74
|
-
viewContainerRef.clear();
|
|
75
|
-
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
|
76
|
-
}
|
|
77
|
-
ngOnDestroy() {
|
|
78
|
-
if (this.componentRef) {
|
|
79
|
-
this.componentRef.destroy();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
close(data) {
|
|
83
|
-
this.onDialogClose.next(data);
|
|
84
|
-
document.body.style.overflow = 'auto';
|
|
85
|
-
}
|
|
86
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i1.DialogRef }, { token: i2.DialogConfig }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DialogComponent, selector: "app-dialog", viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: InsertionDirective, descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"overlay\"\n (click)=\"onOverlayClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER',\n black: background === 'black'\n }\" [class.pointer-none]=\"pointer === 'none'\"\n>\n <div\n class=\"dialog\"\n [class.animate]=\"animation\"\n (click)=\"onDialogClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER'\n }\"\n >\n <ng-template appInsertion></ng-template>\n </div>\n</div>\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:9}.overlay.low{z-index:1}.overlay.black{background:#000000b3}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.InsertionDirective, selector: "[appInsertion]" }] });
|
|
88
|
-
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, decorators: [{
|
|
90
|
-
type: Component,
|
|
91
|
-
args: [{ selector: 'app-dialog', template: "<div\n class=\"overlay\"\n (click)=\"onOverlayClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER',\n black: background === 'black'\n }\" [class.pointer-none]=\"pointer === 'none'\"\n>\n <div\n class=\"dialog\"\n [class.animate]=\"animation\"\n (click)=\"onDialogClicked($event)\"\n [ngClass]=\"{\n top: position === 'TOP',\n right: position === 'RIGHT',\n bottom: position === 'BOTTOM',\n left: position === 'LEFT',\n center: position === 'CENTER'\n }\"\n >\n <ng-template appInsertion></ng-template>\n </div>\n</div>\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:9}.overlay.low{z-index:1}.overlay.black{background:#000000b3}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"] }]
|
|
92
|
-
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i1.DialogRef }, { type: i2.DialogConfig }, { type: i3.Router }]; }, propDecorators: { insertionPoint: [{
|
|
93
|
-
type: ViewChild,
|
|
94
|
-
args: [InsertionDirective, { static: true }]
|
|
95
|
-
}] } });
|
|
96
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ViewChild, } from '@angular/core';
|
|
2
|
+
import { InsertionDirective } from './insertion.directive';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { NavigationEnd, NavigationError, NavigationStart, } from '@angular/router';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "./dialog-ref";
|
|
7
|
+
import * as i2 from "./dialog-config";
|
|
8
|
+
import * as i3 from "@angular/router";
|
|
9
|
+
import * as i4 from "@angular/common";
|
|
10
|
+
import * as i5 from "./insertion.directive";
|
|
11
|
+
export class DialogComponent {
|
|
12
|
+
componentFactoryResolver;
|
|
13
|
+
cd;
|
|
14
|
+
dialogRef;
|
|
15
|
+
config;
|
|
16
|
+
router;
|
|
17
|
+
componentRef;
|
|
18
|
+
position;
|
|
19
|
+
background;
|
|
20
|
+
pointer;
|
|
21
|
+
insertionPoint;
|
|
22
|
+
animation = true;
|
|
23
|
+
onDialogClose = new Subject();
|
|
24
|
+
onClose = this.onDialogClose.asObservable();
|
|
25
|
+
childComponentType;
|
|
26
|
+
constructor(componentFactoryResolver, cd, dialogRef, config, router) {
|
|
27
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
28
|
+
this.cd = cd;
|
|
29
|
+
this.dialogRef = dialogRef;
|
|
30
|
+
this.config = config;
|
|
31
|
+
this.router = router;
|
|
32
|
+
// this.componentRef = this.componentRef;
|
|
33
|
+
// this.animate = this.animate;
|
|
34
|
+
// this.insertionPoint = this.insertionPoint;
|
|
35
|
+
// this.childComponentType = this.childComponentType;
|
|
36
|
+
}
|
|
37
|
+
ngOnInit() {
|
|
38
|
+
this.position = this.config.position;
|
|
39
|
+
this.background = this.config.background;
|
|
40
|
+
document.body.style.overflow = 'hidden';
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
this.animation = false;
|
|
43
|
+
}, 200);
|
|
44
|
+
this.routeAction();
|
|
45
|
+
}
|
|
46
|
+
routeAction() {
|
|
47
|
+
this.router.events.subscribe((event) => {
|
|
48
|
+
if (event instanceof NavigationStart) {
|
|
49
|
+
// Show loading indicator
|
|
50
|
+
}
|
|
51
|
+
if (event instanceof NavigationEnd) {
|
|
52
|
+
// Hide loading indicator
|
|
53
|
+
this.dialogRef.close();
|
|
54
|
+
}
|
|
55
|
+
if (event instanceof NavigationError) {
|
|
56
|
+
// Hide loading indicator
|
|
57
|
+
// Present error to user
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
ngAfterViewInit() {
|
|
62
|
+
this.loadChildComponent(this.childComponentType);
|
|
63
|
+
this.cd.detectChanges();
|
|
64
|
+
}
|
|
65
|
+
onOverlayClicked(evt) {
|
|
66
|
+
// this.dialogRef.close();
|
|
67
|
+
}
|
|
68
|
+
onDialogClicked(evt) {
|
|
69
|
+
evt.stopPropagation();
|
|
70
|
+
}
|
|
71
|
+
loadChildComponent(componentType) {
|
|
72
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);
|
|
73
|
+
const viewContainerRef = this.insertionPoint.viewContainerRef;
|
|
74
|
+
viewContainerRef.clear();
|
|
75
|
+
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
|
76
|
+
}
|
|
77
|
+
ngOnDestroy() {
|
|
78
|
+
if (this.componentRef) {
|
|
79
|
+
this.componentRef.destroy();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
close(data) {
|
|
83
|
+
this.onDialogClose.next(data);
|
|
84
|
+
document.body.style.overflow = 'auto';
|
|
85
|
+
}
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i1.DialogRef }, { token: i2.DialogConfig }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DialogComponent, selector: "app-dialog", viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: InsertionDirective, descendants: true, static: true }], ngImport: i0, template: "<div\r\n class=\"overlay\"\r\n (click)=\"onOverlayClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER',\r\n black: background === 'black'\r\n }\" [class.pointer-none]=\"pointer === 'none'\"\r\n>\r\n <div\r\n class=\"dialog\"\r\n [class.animate]=\"animation\"\r\n (click)=\"onDialogClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER'\r\n }\"\r\n >\r\n <ng-template appInsertion></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:9}.overlay.low{z-index:1}.overlay.black{background:#000000b3}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.InsertionDirective, selector: "[appInsertion]" }] });
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogComponent, decorators: [{
|
|
90
|
+
type: Component,
|
|
91
|
+
args: [{ selector: 'app-dialog', template: "<div\r\n class=\"overlay\"\r\n (click)=\"onOverlayClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER',\r\n black: background === 'black'\r\n }\" [class.pointer-none]=\"pointer === 'none'\"\r\n>\r\n <div\r\n class=\"dialog\"\r\n [class.animate]=\"animation\"\r\n (click)=\"onDialogClicked($event)\"\r\n [ngClass]=\"{\r\n top: position === 'TOP',\r\n right: position === 'RIGHT',\r\n bottom: position === 'BOTTOM',\r\n left: position === 'LEFT',\r\n center: position === 'CENTER'\r\n }\"\r\n >\r\n <ng-template appInsertion></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".overlay{display:flex;position:fixed;inset:0;align-items:center;justify-content:center;z-index:9}.overlay.low{z-index:1}.overlay.black{background:#000000b3}.overlay.top{align-items:flex-start}.overlay.right{justify-content:flex-end}.overlay.bottom{align-items:flex-end}.overlay.left{justify-content:flex-start}.dialog{position:relative}.dialog.animate.top{animation:animate-top .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-top{0%{transform:translateY(-100px)}to{transform:translateY(0)}}.dialog.animate.right{animation:animate-right .2s cubic-bezier(.25,.46,.45,.94) both}@keyframes animate-right{0%{transform:translate(100%)}to{transform:translate(0)}}.pointer-none{pointer-events:none}\n"] }]
|
|
92
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i1.DialogRef }, { type: i2.DialogConfig }, { type: i3.Router }]; }, propDecorators: { insertionPoint: [{
|
|
93
|
+
type: ViewChild,
|
|
94
|
+
args: [InsertionDirective, { static: true }]
|
|
95
|
+
}] } });
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyZWF0ZS1kYXNoYm9hcmQvc3JjL2xpYi91aS1raXQvZGlhbG9nL2RpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmVhdGUtZGFzaGJvYXJkL3NyYy9saWIvdWkta2l0L2RpYWxvZy9kaWFsb2cuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFHVCxTQUFTLEdBTVYsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDM0QsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUcvQixPQUFPLEVBQ0wsYUFBYSxFQUNiLGVBQWUsRUFDZixlQUFlLEdBRWhCLE1BQU0saUJBQWlCLENBQUM7Ozs7Ozs7QUFPekIsTUFBTSxPQUFPLGVBQWU7SUFlaEI7SUFDQTtJQUNBO0lBQ0Q7SUFDQztJQWxCVixZQUFZLENBQXFCO0lBQ2pDLFFBQVEsQ0FBTTtJQUNkLFVBQVUsQ0FBTTtJQUNoQixPQUFPLENBQU07SUFFYixjQUFjLENBQXNCO0lBQ3BDLFNBQVMsR0FBRy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ICAgYm90dG9tOiBwb3NpdGlvbiA9PT0gJ0JPVFRPTScsXHJcbiAgICAgIGxlZnQ6IHBvc2l0aW9uID09PSAnTEVGVCcsXHJcbiAgICAgIGNlbnRlcjogcG9zaXRpb24gPT09ICdDRU5URVInXHJcbiAgICB9XCJcclxuICA+XHJcbiAgICA8bmctdGVtcGxhdGUgYXBwSW5zZXJ0aW9uPjwvbmctdGVtcGxhdGU+XHJcbiAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { DialogComponent } from './dialog.component';
|
|
4
|
-
import { InsertionDirective } from './insertion.directive';
|
|
5
|
-
import { DialogRef } from './dialog-ref';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class DialogModule {
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, declarations: [DialogComponent, InsertionDirective], imports: [CommonModule] });
|
|
10
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, providers: [DialogRef], imports: [CommonModule] });
|
|
11
|
-
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, decorators: [{
|
|
13
|
-
type: NgModule,
|
|
14
|
-
args: [{
|
|
15
|
-
imports: [CommonModule],
|
|
16
|
-
declarations: [DialogComponent, InsertionDirective],
|
|
17
|
-
providers: [DialogRef]
|
|
18
|
-
}]
|
|
19
|
-
}] });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DialogComponent } from './dialog.component';
|
|
4
|
+
import { InsertionDirective } from './insertion.directive';
|
|
5
|
+
import { DialogRef } from './dialog-ref';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class DialogModule {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, declarations: [DialogComponent, InsertionDirective], imports: [CommonModule] });
|
|
10
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, providers: [DialogRef], imports: [CommonModule] });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogModule, decorators: [{
|
|
13
|
+
type: NgModule,
|
|
14
|
+
args: [{
|
|
15
|
+
imports: [CommonModule],
|
|
16
|
+
declarations: [DialogComponent, InsertionDirective],
|
|
17
|
+
providers: [DialogRef]
|
|
18
|
+
}]
|
|
19
|
+
}] });
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyZWF0ZS1kYXNoYm9hcmQvc3JjL2xpYi91aS1raXQvZGlhbG9nL2RpYWxvZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQU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uRGlyZWN0aXZlXSxcclxuICAgIHByb3ZpZGVyczogW0RpYWxvZ1JlZl1cclxufSlcclxuZXhwb3J0IGNsYXNzIERpYWxvZ01vZHVsZSB7fVxyXG4iXX0=
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { DialogModule } from './dialog.module';
|
|
3
|
-
import { DialogComponent } from './dialog.component';
|
|
4
|
-
import { DialogInjector } from './dialog-injector';
|
|
5
|
-
import { DialogConfig } from './dialog-config';
|
|
6
|
-
import { DialogRef } from './dialog-ref';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export class DialogService {
|
|
9
|
-
componentFactoryResolver;
|
|
10
|
-
appRef;
|
|
11
|
-
injector;
|
|
12
|
-
dialogComponentRef;
|
|
13
|
-
constructor(componentFactoryResolver, appRef, injector) {
|
|
14
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
15
|
-
this.appRef = appRef;
|
|
16
|
-
this.injector = injector;
|
|
17
|
-
}
|
|
18
|
-
open(componentType, config) {
|
|
19
|
-
const dialogRef = this.appendDialogComponentToBody(config);
|
|
20
|
-
this.dialogComponentRef.instance.childComponentType = componentType;
|
|
21
|
-
return dialogRef;
|
|
22
|
-
}
|
|
23
|
-
appendDialogComponentToBody(config) {
|
|
24
|
-
const map = new WeakMap();
|
|
25
|
-
map.set(DialogConfig, config);
|
|
26
|
-
const dialogRef = new DialogRef();
|
|
27
|
-
map.set(DialogRef, dialogRef);
|
|
28
|
-
const sub = dialogRef.afterClosed.subscribe(() => {
|
|
29
|
-
this.removeDialogComponentFromBody();
|
|
30
|
-
sub.unsubscribe();
|
|
31
|
-
});
|
|
32
|
-
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DialogComponent);
|
|
33
|
-
const componentRef = componentFactory.create(new DialogInjector(this.injector, map));
|
|
34
|
-
this.appRef.attachView(componentRef.hostView);
|
|
35
|
-
const domElem = componentRef.hostView.rootNodes[0];
|
|
36
|
-
document.body.appendChild(domElem);
|
|
37
|
-
this.dialogComponentRef = componentRef;
|
|
38
|
-
this.dialogComponentRef.instance.onClose.subscribe(() => {
|
|
39
|
-
this.removeDialogComponentFromBody();
|
|
40
|
-
});
|
|
41
|
-
return dialogRef;
|
|
42
|
-
}
|
|
43
|
-
removeDialogComponentFromBody() {
|
|
44
|
-
this.appRef.detachView(this.dialogComponentRef.hostView);
|
|
45
|
-
this.dialogComponentRef.destroy();
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
48
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, providedIn: DialogModule });
|
|
49
|
-
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, decorators: [{
|
|
51
|
-
type: Injectable,
|
|
52
|
-
args: [{
|
|
53
|
-
providedIn: DialogModule,
|
|
54
|
-
}]
|
|
55
|
-
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }]; } });
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { DialogModule } from './dialog.module';
|
|
3
|
+
import { DialogComponent } from './dialog.component';
|
|
4
|
+
import { DialogInjector } from './dialog-injector';
|
|
5
|
+
import { DialogConfig } from './dialog-config';
|
|
6
|
+
import { DialogRef } from './dialog-ref';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export class DialogService {
|
|
9
|
+
componentFactoryResolver;
|
|
10
|
+
appRef;
|
|
11
|
+
injector;
|
|
12
|
+
dialogComponentRef;
|
|
13
|
+
constructor(componentFactoryResolver, appRef, injector) {
|
|
14
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
15
|
+
this.appRef = appRef;
|
|
16
|
+
this.injector = injector;
|
|
17
|
+
}
|
|
18
|
+
open(componentType, config) {
|
|
19
|
+
const dialogRef = this.appendDialogComponentToBody(config);
|
|
20
|
+
this.dialogComponentRef.instance.childComponentType = componentType;
|
|
21
|
+
return dialogRef;
|
|
22
|
+
}
|
|
23
|
+
appendDialogComponentToBody(config) {
|
|
24
|
+
const map = new WeakMap();
|
|
25
|
+
map.set(DialogConfig, config);
|
|
26
|
+
const dialogRef = new DialogRef();
|
|
27
|
+
map.set(DialogRef, dialogRef);
|
|
28
|
+
const sub = dialogRef.afterClosed.subscribe(() => {
|
|
29
|
+
this.removeDialogComponentFromBody();
|
|
30
|
+
sub.unsubscribe();
|
|
31
|
+
});
|
|
32
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DialogComponent);
|
|
33
|
+
const componentRef = componentFactory.create(new DialogInjector(this.injector, map));
|
|
34
|
+
this.appRef.attachView(componentRef.hostView);
|
|
35
|
+
const domElem = componentRef.hostView.rootNodes[0];
|
|
36
|
+
document.body.appendChild(domElem);
|
|
37
|
+
this.dialogComponentRef = componentRef;
|
|
38
|
+
this.dialogComponentRef.instance.onClose.subscribe(() => {
|
|
39
|
+
this.removeDialogComponentFromBody();
|
|
40
|
+
});
|
|
41
|
+
return dialogRef;
|
|
42
|
+
}
|
|
43
|
+
removeDialogComponentFromBody() {
|
|
44
|
+
this.appRef.detachView(this.dialogComponentRef.hostView);
|
|
45
|
+
this.dialogComponentRef.destroy();
|
|
46
|
+
}
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
48
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, providedIn: DialogModule });
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogService, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{
|
|
53
|
+
providedIn: DialogModule,
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }]; } });
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmVhdGUtZGFzaGJvYXJkL3NyYy9saWIvdWkta2l0L2RpYWxvZy9kaWFsb2cuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUEyRixNQUFNLGVBQWUsQ0FBQztBQUNwSSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQzs7QUFLekMsTUFBTSxPQUFPLGFBQWE7SUFHSjtJQUE0RDtJQUFnQztJQUZoSCxrQkFBa0IsQ0FBaUM7SUFFbkQsWUFBb0Isd0JBQWtELEVBQVUsTUFBc0IsRUFBVSxRQUFrQjtRQUE5Ryw2QkFBd0IsR0FBe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bnN0YW5jZS5vbkNsb3NlLnN1YnNjcmliZSgoKSA9PiB7XHJcbiAgICAgIHRoaXMucmVtb3ZlRGlhbG9nQ29tcG9uZW50RnJvbUJvZHkoKTtcclxuICAgIH0pO1xyXG5cclxuICAgIHJldHVybiBkaWFsb2dSZWY7XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIHJlbW92ZURpYWxvZ0NvbXBvbmVudEZyb21Cb2R5KCkge1xyXG4gICAgdGhpcy5hcHBSZWYuZGV0YWNoVmlldyh0aGlzLmRpYWxvZ0NvbXBvbmVudFJlZi5ob3N0Vmlldyk7XHJcbiAgICB0aGlzLmRpYWxvZ0NvbXBvbmVudFJlZi5kZXN0cm95KCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class InsertionDirective {
|
|
4
|
-
viewContainerRef;
|
|
5
|
-
constructor(viewContainerRef) {
|
|
6
|
-
this.viewContainerRef = viewContainerRef;
|
|
7
|
-
}
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertionDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: InsertionDirective, selector: "[appInsertion]", ngImport: i0 });
|
|
10
|
-
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertionDirective, decorators: [{
|
|
12
|
-
type: Directive,
|
|
13
|
-
args: [{
|
|
14
|
-
selector: '[appInsertion]',
|
|
15
|
-
}]
|
|
16
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class InsertionDirective {
|
|
4
|
+
viewContainerRef;
|
|
5
|
+
constructor(viewContainerRef) {
|
|
6
|
+
this.viewContainerRef = viewContainerRef;
|
|
7
|
+
}
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertionDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: InsertionDirective, selector: "[appInsertion]", ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertionDirective, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{
|
|
14
|
+
selector: '[appInsertion]',
|
|
15
|
+
}]
|
|
16
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zZXJ0aW9uLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NyZWF0ZS1kYXNoYm9hcmQvc3JjL2xpYi91aS1raXQvZGlhbG9nL2luc2VydGlvbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBb0IsTUFBTSxlQUFlLENBQUM7O0FBSzVELE1BQU0sT0FBTyxrQkFBa0I7SUFDVjtJQUFuQixZQUFtQixnQkFBa0M7UUFBbEMscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFrQjtJQUFHLENBQUM7d0dBRDlDLGtCQUFrQjs0RkFBbEIsa0JBQWtCOzs0RkFBbEIsa0JBQWtCO2tCQUg5QixTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSxnQkFBZ0I7aUJBQzNCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGlyZWN0aXZlLCBWaWV3Q29udGFpbmVyUmVmIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ARGlyZWN0aXZlKHtcclxuICBzZWxlY3RvcjogJ1thcHBJbnNlcnRpb25dJyxcclxufSlcclxuZXhwb3J0IGNsYXNzIEluc2VydGlvbkRpcmVjdGl2ZSB7XHJcbiAgY29uc3RydWN0b3IocHVibGljIHZpZXdDb250YWluZXJSZWY6IFZpZXdDb250YWluZXJSZWYpIHt9XHJcbn1cclxuIl19
|