@abp/ng.components 5.0.1 → 5.0.2
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 +3 -3
- package/abp-ng.components.d.ts +5 -5
- package/bundles/abp-ng.components-chart.js.umd.js +141 -141
- package/bundles/abp-ng.components-chart.js.umd.js.map +1 -1
- package/bundles/abp-ng.components-page.umd.js +542 -542
- package/bundles/abp-ng.components-page.umd.js.map +1 -1
- package/bundles/abp-ng.components-tree.umd.js +557 -557
- package/bundles/abp-ng.components-tree.umd.js.map +1 -1
- package/bundles/abp-ng.components.umd.js +2 -2
- package/chart.js/abp-ng.components-chart.js.d.ts +5 -5
- package/chart.js/chart.component.d.ts +30 -30
- package/chart.js/chart.module.d.ts +8 -8
- package/chart.js/public-api.d.ts +3 -3
- package/chart.js/widget-utils.d.ts +1 -1
- package/esm2015/abp-ng.components.js +4 -4
- package/esm2015/chart.js/abp-ng.components-chart.js.js +4 -4
- package/esm2015/chart.js/chart.component.js +141 -141
- package/esm2015/chart.js/chart.module.js +19 -19
- package/esm2015/chart.js/public-api.js +4 -4
- package/esm2015/chart.js/widget-utils.js +11 -11
- package/esm2015/page/abp-ng.components-page.js +4 -4
- package/esm2015/page/page-part.directive.js +79 -79
- package/esm2015/page/page-parts.component.js +45 -45
- package/esm2015/page/page.component.js +61 -61
- package/esm2015/page/page.module.js +38 -38
- package/esm2015/page/public-api.js +5 -5
- package/esm2015/public-api.js +5 -5
- package/esm2015/tree/abp-ng.components-tree.js +4 -4
- package/esm2015/tree/lib/components/tree.component.js +101 -101
- package/esm2015/tree/lib/templates/expanded-icon-template.directive.js +16 -16
- package/esm2015/tree/lib/templates/tree-node-template.directive.js +16 -16
- package/esm2015/tree/lib/tree.module.js +25 -25
- package/esm2015/tree/lib/utils/nz-tree-adapter.js +92 -92
- package/esm2015/tree/public-api.js +6 -6
- package/fesm2015/abp-ng.components-chart.js.js +161 -161
- package/fesm2015/abp-ng.components-chart.js.js.map +1 -1
- package/fesm2015/abp-ng.components-page.js +196 -196
- package/fesm2015/abp-ng.components-page.js.map +1 -1
- package/fesm2015/abp-ng.components-tree.js +219 -219
- package/fesm2015/abp-ng.components-tree.js.map +1 -1
- package/fesm2015/abp-ng.components.js +4 -4
- package/fesm2015/abp-ng.components.js.map +1 -1
- package/package.json +3 -3
- package/page/abp-ng.components-page.d.ts +5 -5
- package/page/page-part.directive.d.ts +31 -31
- package/page/page-parts.component.d.ts +18 -18
- package/page/page.component.d.ts +21 -21
- package/page/page.module.d.ts +13 -13
- package/page/public-api.d.ts +4 -4
- package/public-api.d.ts +1 -1
- package/tree/abp-ng.components-tree.d.ts +5 -5
- package/tree/lib/components/tree.component.d.ts +39 -39
- package/tree/lib/templates/expanded-icon-template.directive.d.ts +8 -8
- package/tree/lib/templates/tree-node-template.directive.d.ts +8 -8
- package/tree/lib/tree.module.d.ts +13 -13
- package/tree/lib/utils/nz-tree-adapter.d.ts +39 -39
- package/tree/public-api.d.ts +5 -5
|
@@ -9,210 +9,210 @@ import * as i0 from '@angular/core';
|
|
|
9
9
|
import { InjectionToken, Directive, Optional, Inject, Input, Component, ViewEncapsulation, ContentChild, NgModule } from '@angular/core';
|
|
10
10
|
import { Observable, of } from 'rxjs';
|
|
11
11
|
|
|
12
|
-
const PAGE_RENDER_STRATEGY = new InjectionToken('PAGE_RENDER_STRATEGY');
|
|
13
|
-
class PagePartDirective {
|
|
14
|
-
constructor(templateRef, viewContainer, renderLogic, injector) {
|
|
15
|
-
this.templateRef = templateRef;
|
|
16
|
-
this.viewContainer = viewContainer;
|
|
17
|
-
this.renderLogic = renderLogic;
|
|
18
|
-
this.injector = injector;
|
|
19
|
-
this.hasRendered = false;
|
|
20
|
-
this.render = (shouldRender) => {
|
|
21
|
-
if (shouldRender && !this.hasRendered) {
|
|
22
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
23
|
-
this.hasRendered = true;
|
|
24
|
-
}
|
|
25
|
-
else if (!shouldRender && this.hasRendered) {
|
|
26
|
-
this.viewContainer.clear();
|
|
27
|
-
this.hasRendered = false;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
set abpPagePart(type) {
|
|
32
|
-
this.type = type;
|
|
33
|
-
this.createRenderStream(type);
|
|
34
|
-
}
|
|
35
|
-
ngOnChanges({ context }) {
|
|
36
|
-
var _a;
|
|
37
|
-
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onContextUpdate) {
|
|
38
|
-
this.renderLogic.onContextUpdate(context);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
ngOnInit() {
|
|
42
|
-
var _a;
|
|
43
|
-
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onInit) {
|
|
44
|
-
this.renderLogic.onInit(this.type, this.injector, this.context);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
ngOnDestroy() {
|
|
48
|
-
var _a;
|
|
49
|
-
this.clearSubscription();
|
|
50
|
-
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onDestroy) {
|
|
51
|
-
this.renderLogic.onDestroy(this.type, this.injector, this.context);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
shouldRender(type) {
|
|
55
|
-
if (this.renderLogic) {
|
|
56
|
-
const willRender = this.renderLogic.shouldRender(type);
|
|
57
|
-
return willRender instanceof Observable ? willRender : of(willRender);
|
|
58
|
-
}
|
|
59
|
-
return of(true);
|
|
60
|
-
}
|
|
61
|
-
createRenderStream(type) {
|
|
62
|
-
this.clearSubscription();
|
|
63
|
-
this.subscription = this.shouldRender(type).subscribe(this.render);
|
|
64
|
-
}
|
|
65
|
-
clearSubscription() {
|
|
66
|
-
if (this.subscription) {
|
|
67
|
-
this.subscription.unsubscribe();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
PagePartDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PagePartDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: PAGE_RENDER_STRATEGY, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
-
PagePartDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: PagePartDirective, selector: "[abpPagePart]", inputs: { context: ["abpPagePartContext", "context"], abpPagePart: "abpPagePart" }, usesOnChanges: true, ngImport: i0 });
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PagePartDirective, decorators: [{
|
|
74
|
-
type: Directive,
|
|
75
|
-
args: [{ selector: '[abpPagePart]' }]
|
|
76
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
|
77
|
-
type: Optional
|
|
78
|
-
}, {
|
|
79
|
-
type: Inject,
|
|
80
|
-
args: [PAGE_RENDER_STRATEGY]
|
|
81
|
-
}] }, { type: i0.Injector }]; }, propDecorators: { context: [{
|
|
82
|
-
type: Input,
|
|
83
|
-
args: ['abpPagePartContext']
|
|
84
|
-
}], abpPagePart: [{
|
|
85
|
-
type: Input
|
|
12
|
+
const PAGE_RENDER_STRATEGY = new InjectionToken('PAGE_RENDER_STRATEGY');
|
|
13
|
+
class PagePartDirective {
|
|
14
|
+
constructor(templateRef, viewContainer, renderLogic, injector) {
|
|
15
|
+
this.templateRef = templateRef;
|
|
16
|
+
this.viewContainer = viewContainer;
|
|
17
|
+
this.renderLogic = renderLogic;
|
|
18
|
+
this.injector = injector;
|
|
19
|
+
this.hasRendered = false;
|
|
20
|
+
this.render = (shouldRender) => {
|
|
21
|
+
if (shouldRender && !this.hasRendered) {
|
|
22
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
23
|
+
this.hasRendered = true;
|
|
24
|
+
}
|
|
25
|
+
else if (!shouldRender && this.hasRendered) {
|
|
26
|
+
this.viewContainer.clear();
|
|
27
|
+
this.hasRendered = false;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
set abpPagePart(type) {
|
|
32
|
+
this.type = type;
|
|
33
|
+
this.createRenderStream(type);
|
|
34
|
+
}
|
|
35
|
+
ngOnChanges({ context }) {
|
|
36
|
+
var _a;
|
|
37
|
+
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onContextUpdate) {
|
|
38
|
+
this.renderLogic.onContextUpdate(context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
var _a;
|
|
43
|
+
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onInit) {
|
|
44
|
+
this.renderLogic.onInit(this.type, this.injector, this.context);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
ngOnDestroy() {
|
|
48
|
+
var _a;
|
|
49
|
+
this.clearSubscription();
|
|
50
|
+
if ((_a = this.renderLogic) === null || _a === void 0 ? void 0 : _a.onDestroy) {
|
|
51
|
+
this.renderLogic.onDestroy(this.type, this.injector, this.context);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
shouldRender(type) {
|
|
55
|
+
if (this.renderLogic) {
|
|
56
|
+
const willRender = this.renderLogic.shouldRender(type);
|
|
57
|
+
return willRender instanceof Observable ? willRender : of(willRender);
|
|
58
|
+
}
|
|
59
|
+
return of(true);
|
|
60
|
+
}
|
|
61
|
+
createRenderStream(type) {
|
|
62
|
+
this.clearSubscription();
|
|
63
|
+
this.subscription = this.shouldRender(type).subscribe(this.render);
|
|
64
|
+
}
|
|
65
|
+
clearSubscription() {
|
|
66
|
+
if (this.subscription) {
|
|
67
|
+
this.subscription.unsubscribe();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
PagePartDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PagePartDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: PAGE_RENDER_STRATEGY, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
PagePartDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: PagePartDirective, selector: "[abpPagePart]", inputs: { context: ["abpPagePartContext", "context"], abpPagePart: "abpPagePart" }, usesOnChanges: true, ngImport: i0 });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PagePartDirective, decorators: [{
|
|
74
|
+
type: Directive,
|
|
75
|
+
args: [{ selector: '[abpPagePart]' }]
|
|
76
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
|
77
|
+
type: Optional
|
|
78
|
+
}, {
|
|
79
|
+
type: Inject,
|
|
80
|
+
args: [PAGE_RENDER_STRATEGY]
|
|
81
|
+
}] }, { type: i0.Injector }]; }, propDecorators: { context: [{
|
|
82
|
+
type: Input,
|
|
83
|
+
args: ['abpPagePartContext']
|
|
84
|
+
}], abpPagePart: [{
|
|
85
|
+
type: Input
|
|
86
86
|
}] } });
|
|
87
87
|
|
|
88
|
-
var PageParts;
|
|
89
|
-
(function (PageParts) {
|
|
90
|
-
PageParts["title"] = "PageTitleContainerComponent";
|
|
91
|
-
PageParts["breadcrumb"] = "PageBreadcrumbContainerComponent";
|
|
92
|
-
PageParts["toolbar"] = "PageToolbarContainerComponent";
|
|
93
|
-
})(PageParts || (PageParts = {}));
|
|
94
|
-
class PageTitleContainerComponent {
|
|
95
|
-
}
|
|
96
|
-
PageTitleContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageTitleContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
|
-
PageTitleContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageTitleContainerComponent, selector: "abp-page-title-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageTitleContainerComponent, decorators: [{
|
|
99
|
-
type: Component,
|
|
100
|
-
args: [{
|
|
101
|
-
selector: 'abp-page-title-container',
|
|
102
|
-
template: ` <ng-content></ng-content> `,
|
|
103
|
-
encapsulation: ViewEncapsulation.None,
|
|
104
|
-
}]
|
|
105
|
-
}] });
|
|
106
|
-
class PageBreadcrumbContainerComponent {
|
|
107
|
-
}
|
|
108
|
-
PageBreadcrumbContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageBreadcrumbContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
-
PageBreadcrumbContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageBreadcrumbContainerComponent, selector: "abp-page-breadcrumb-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageBreadcrumbContainerComponent, decorators: [{
|
|
111
|
-
type: Component,
|
|
112
|
-
args: [{
|
|
113
|
-
selector: 'abp-page-breadcrumb-container',
|
|
114
|
-
template: ` <ng-content></ng-content> `,
|
|
115
|
-
encapsulation: ViewEncapsulation.None,
|
|
116
|
-
}]
|
|
117
|
-
}] });
|
|
118
|
-
class PageToolbarContainerComponent {
|
|
119
|
-
}
|
|
120
|
-
PageToolbarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageToolbarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
-
PageToolbarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageToolbarContainerComponent, selector: "abp-page-toolbar-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageToolbarContainerComponent, decorators: [{
|
|
123
|
-
type: Component,
|
|
124
|
-
args: [{
|
|
125
|
-
selector: 'abp-page-toolbar-container',
|
|
126
|
-
template: ` <ng-content></ng-content> `,
|
|
127
|
-
encapsulation: ViewEncapsulation.None,
|
|
128
|
-
}]
|
|
88
|
+
var PageParts;
|
|
89
|
+
(function (PageParts) {
|
|
90
|
+
PageParts["title"] = "PageTitleContainerComponent";
|
|
91
|
+
PageParts["breadcrumb"] = "PageBreadcrumbContainerComponent";
|
|
92
|
+
PageParts["toolbar"] = "PageToolbarContainerComponent";
|
|
93
|
+
})(PageParts || (PageParts = {}));
|
|
94
|
+
class PageTitleContainerComponent {
|
|
95
|
+
}
|
|
96
|
+
PageTitleContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageTitleContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
|
+
PageTitleContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageTitleContainerComponent, selector: "abp-page-title-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageTitleContainerComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: 'abp-page-title-container',
|
|
102
|
+
template: ` <ng-content></ng-content> `,
|
|
103
|
+
encapsulation: ViewEncapsulation.None,
|
|
104
|
+
}]
|
|
105
|
+
}] });
|
|
106
|
+
class PageBreadcrumbContainerComponent {
|
|
107
|
+
}
|
|
108
|
+
PageBreadcrumbContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageBreadcrumbContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
PageBreadcrumbContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageBreadcrumbContainerComponent, selector: "abp-page-breadcrumb-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageBreadcrumbContainerComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{
|
|
113
|
+
selector: 'abp-page-breadcrumb-container',
|
|
114
|
+
template: ` <ng-content></ng-content> `,
|
|
115
|
+
encapsulation: ViewEncapsulation.None,
|
|
116
|
+
}]
|
|
117
|
+
}] });
|
|
118
|
+
class PageToolbarContainerComponent {
|
|
119
|
+
}
|
|
120
|
+
PageToolbarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageToolbarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
+
PageToolbarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageToolbarContainerComponent, selector: "abp-page-toolbar-container", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageToolbarContainerComponent, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{
|
|
125
|
+
selector: 'abp-page-toolbar-container',
|
|
126
|
+
template: ` <ng-content></ng-content> `,
|
|
127
|
+
encapsulation: ViewEncapsulation.None,
|
|
128
|
+
}]
|
|
129
129
|
}] });
|
|
130
130
|
|
|
131
|
-
class PageComponent {
|
|
132
|
-
constructor() {
|
|
133
|
-
this.toolbarVisible = false;
|
|
134
|
-
this.breadcrumbVisible = true;
|
|
135
|
-
this.pageParts = {
|
|
136
|
-
title: PageParts.title,
|
|
137
|
-
breadcrumb: PageParts.breadcrumb,
|
|
138
|
-
toolbar: PageParts.toolbar,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
set toolbarData(val) {
|
|
142
|
-
this._toolbarData = val;
|
|
143
|
-
this.toolbarVisible = true;
|
|
144
|
-
}
|
|
145
|
-
get toolbarData() {
|
|
146
|
-
return this._toolbarData;
|
|
147
|
-
}
|
|
148
|
-
get shouldRenderRow() {
|
|
149
|
-
return !!(this.title ||
|
|
150
|
-
this.toolbarVisible ||
|
|
151
|
-
this.breadcrumbVisible ||
|
|
152
|
-
this.customTitle ||
|
|
153
|
-
this.customBreadcrumb ||
|
|
154
|
-
this.customToolbar);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
158
|
-
PageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageComponent, selector: "abp-page", inputs: { title: "title", toolbarData: ["toolbar", "toolbarData"], breadcrumbVisible: ["breadcrumb", "breadcrumbVisible"] }, queries: [{ propertyName: "customTitle", first: true, predicate: PageTitleContainerComponent, descendants: true }, { propertyName: "customBreadcrumb", first: true, predicate: PageBreadcrumbContainerComponent, descendants: true }, { propertyName: "customToolbar", first: true, predicate: PageToolbarContainerComponent, descendants: true }], ngImport: i0, template: "<div class=\"row entry-row\" *ngIf=\"shouldRenderRow\">\
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageComponent, decorators: [{
|
|
160
|
-
type: Component,
|
|
161
|
-
args: [{
|
|
162
|
-
selector: 'abp-page',
|
|
163
|
-
templateUrl: './page.component.html',
|
|
164
|
-
encapsulation: ViewEncapsulation.None,
|
|
165
|
-
}]
|
|
166
|
-
}], propDecorators: { title: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], toolbarData: [{
|
|
169
|
-
type: Input,
|
|
170
|
-
args: ['toolbar']
|
|
171
|
-
}], breadcrumbVisible: [{
|
|
172
|
-
type: Input,
|
|
173
|
-
args: ['breadcrumb']
|
|
174
|
-
}], customTitle: [{
|
|
175
|
-
type: ContentChild,
|
|
176
|
-
args: [PageTitleContainerComponent]
|
|
177
|
-
}], customBreadcrumb: [{
|
|
178
|
-
type: ContentChild,
|
|
179
|
-
args: [PageBreadcrumbContainerComponent]
|
|
180
|
-
}], customToolbar: [{
|
|
181
|
-
type: ContentChild,
|
|
182
|
-
args: [PageToolbarContainerComponent]
|
|
131
|
+
class PageComponent {
|
|
132
|
+
constructor() {
|
|
133
|
+
this.toolbarVisible = false;
|
|
134
|
+
this.breadcrumbVisible = true;
|
|
135
|
+
this.pageParts = {
|
|
136
|
+
title: PageParts.title,
|
|
137
|
+
breadcrumb: PageParts.breadcrumb,
|
|
138
|
+
toolbar: PageParts.toolbar,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
set toolbarData(val) {
|
|
142
|
+
this._toolbarData = val;
|
|
143
|
+
this.toolbarVisible = true;
|
|
144
|
+
}
|
|
145
|
+
get toolbarData() {
|
|
146
|
+
return this._toolbarData;
|
|
147
|
+
}
|
|
148
|
+
get shouldRenderRow() {
|
|
149
|
+
return !!(this.title ||
|
|
150
|
+
this.toolbarVisible ||
|
|
151
|
+
this.breadcrumbVisible ||
|
|
152
|
+
this.customTitle ||
|
|
153
|
+
this.customBreadcrumb ||
|
|
154
|
+
this.customToolbar);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
158
|
+
PageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PageComponent, selector: "abp-page", inputs: { title: "title", toolbarData: ["toolbar", "toolbarData"], breadcrumbVisible: ["breadcrumb", "breadcrumbVisible"] }, queries: [{ propertyName: "customTitle", first: true, predicate: PageTitleContainerComponent, descendants: true }, { propertyName: "customBreadcrumb", first: true, predicate: PageBreadcrumbContainerComponent, descendants: true }, { propertyName: "customToolbar", first: true, predicate: PageToolbarContainerComponent, descendants: true }], ngImport: i0, template: "<div class=\"row entry-row\" *ngIf=\"shouldRenderRow\">\n <ng-container *ngIf=\"customTitle; else defaultTitleTemplate\">\n <ng-content select=\"abp-page-title-container\"></ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"customBreadcrumb; else defaultBreadcrumbTemplate\">\n <ng-content select=\"abp-page-breadcrumb-container\"></ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"customToolbar; else defaultPageToolbarTemplate\">\n <ng-content select=\"abp-page-toolbar-container\"></ng-content>\n </ng-container>\n</div>\n\n<ng-content></ng-content>\n\n<ng-template #defaultTitleTemplate>\n <ng-container *ngIf=\"title\">\n <div class=\"col-auto\" *abpPagePart=\"pageParts.title\">\n <h1 class=\"content-header-title\">\n {{ title }}\n </h1>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultBreadcrumbTemplate>\n <ng-container *ngIf=\"breadcrumbVisible\">\n <div class=\"col-lg-auto ps-lg-0\" *abpPagePart=\"pageParts.breadcrumb\">\n <abp-breadcrumb></abp-breadcrumb>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultPageToolbarTemplate>\n <ng-container *ngIf=\"toolbarVisible\">\n <div class=\"col\" *abpPagePart=\"pageParts.toolbar; context: toolbarData\">\n <abp-page-toolbar [record]=\"toolbarData\"></abp-page-toolbar>\n </div>\n </ng-container>\n</ng-template>\n", components: [{ type: i1.BreadcrumbComponent, selector: "abp-breadcrumb" }, { type: i2.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PagePartDirective, selector: "[abpPagePart]", inputs: ["abpPagePartContext", "abpPagePart"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageComponent, decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{
|
|
162
|
+
selector: 'abp-page',
|
|
163
|
+
templateUrl: './page.component.html',
|
|
164
|
+
encapsulation: ViewEncapsulation.None,
|
|
165
|
+
}]
|
|
166
|
+
}], propDecorators: { title: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], toolbarData: [{
|
|
169
|
+
type: Input,
|
|
170
|
+
args: ['toolbar']
|
|
171
|
+
}], breadcrumbVisible: [{
|
|
172
|
+
type: Input,
|
|
173
|
+
args: ['breadcrumb']
|
|
174
|
+
}], customTitle: [{
|
|
175
|
+
type: ContentChild,
|
|
176
|
+
args: [PageTitleContainerComponent]
|
|
177
|
+
}], customBreadcrumb: [{
|
|
178
|
+
type: ContentChild,
|
|
179
|
+
args: [PageBreadcrumbContainerComponent]
|
|
180
|
+
}], customToolbar: [{
|
|
181
|
+
type: ContentChild,
|
|
182
|
+
args: [PageToolbarContainerComponent]
|
|
183
183
|
}] } });
|
|
184
184
|
|
|
185
|
-
const exportedDeclarations = [
|
|
186
|
-
PageComponent,
|
|
187
|
-
PageTitleContainerComponent,
|
|
188
|
-
PageBreadcrumbContainerComponent,
|
|
189
|
-
PageToolbarContainerComponent,
|
|
190
|
-
PagePartDirective,
|
|
191
|
-
];
|
|
192
|
-
class PageModule {
|
|
193
|
-
}
|
|
194
|
-
PageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
195
|
-
PageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, declarations: [PageComponent,
|
|
196
|
-
PageTitleContainerComponent,
|
|
197
|
-
PageBreadcrumbContainerComponent,
|
|
198
|
-
PageToolbarContainerComponent,
|
|
199
|
-
PagePartDirective], imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule], exports: [PageComponent,
|
|
200
|
-
PageTitleContainerComponent,
|
|
201
|
-
PageBreadcrumbContainerComponent,
|
|
202
|
-
PageToolbarContainerComponent,
|
|
203
|
-
PagePartDirective, UiExtensionsModule] });
|
|
204
|
-
PageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, imports: [[CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule], UiExtensionsModule] });
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, decorators: [{
|
|
206
|
-
type: NgModule,
|
|
207
|
-
args: [{
|
|
208
|
-
declarations: [...exportedDeclarations],
|
|
209
|
-
imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule],
|
|
210
|
-
exports: [...exportedDeclarations, UiExtensionsModule],
|
|
211
|
-
}]
|
|
185
|
+
const exportedDeclarations = [
|
|
186
|
+
PageComponent,
|
|
187
|
+
PageTitleContainerComponent,
|
|
188
|
+
PageBreadcrumbContainerComponent,
|
|
189
|
+
PageToolbarContainerComponent,
|
|
190
|
+
PagePartDirective,
|
|
191
|
+
];
|
|
192
|
+
class PageModule {
|
|
193
|
+
}
|
|
194
|
+
PageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
195
|
+
PageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, declarations: [PageComponent,
|
|
196
|
+
PageTitleContainerComponent,
|
|
197
|
+
PageBreadcrumbContainerComponent,
|
|
198
|
+
PageToolbarContainerComponent,
|
|
199
|
+
PagePartDirective], imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule], exports: [PageComponent,
|
|
200
|
+
PageTitleContainerComponent,
|
|
201
|
+
PageBreadcrumbContainerComponent,
|
|
202
|
+
PageToolbarContainerComponent,
|
|
203
|
+
PagePartDirective, UiExtensionsModule] });
|
|
204
|
+
PageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, imports: [[CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule], UiExtensionsModule] });
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PageModule, decorators: [{
|
|
206
|
+
type: NgModule,
|
|
207
|
+
args: [{
|
|
208
|
+
declarations: [...exportedDeclarations],
|
|
209
|
+
imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule],
|
|
210
|
+
exports: [...exportedDeclarations, UiExtensionsModule],
|
|
211
|
+
}]
|
|
212
212
|
}] });
|
|
213
213
|
|
|
214
|
-
/**
|
|
215
|
-
* Generated bundle index. Do not edit.
|
|
214
|
+
/**
|
|
215
|
+
* Generated bundle index. Do not edit.
|
|
216
216
|
*/
|
|
217
217
|
|
|
218
218
|
export { PAGE_RENDER_STRATEGY, PageBreadcrumbContainerComponent, PageComponent, PageModule, PagePartDirective, PageParts, PageTitleContainerComponent, PageToolbarContainerComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.components-page.js","sources":["../../../../packages/components/page/src/page-part.directive.ts","../../../../packages/components/page/src/page-parts.component.ts","../../../../packages/components/page/src/page.component.ts","../../../../packages/components/page/src/page.component.html","../../../../packages/components/page/src/page.module.ts","../../../../packages/components/page/src/abp-ng.components-page.ts"],"sourcesContent":["import {\r\n Directive,\r\n TemplateRef,\r\n ViewContainerRef,\r\n Input,\r\n InjectionToken,\r\n Optional,\r\n Inject,\r\n OnInit,\r\n OnDestroy,\r\n Injector,\r\n OnChanges,\r\n SimpleChanges,\r\n SimpleChange,\r\n} from '@angular/core';\r\nimport { Observable, Subscription, of } from 'rxjs';\r\n\r\nexport interface PageRenderStrategy {\r\n shouldRender(type?: string): boolean | Observable<boolean>;\r\n onInit?(type?: string, injector?: Injector, context?: any): void;\r\n onDestroy?(type?: string, injector?: Injector, context?: any): void;\r\n onContextUpdate?(change?: SimpleChange): void;\r\n}\r\n\r\nexport const PAGE_RENDER_STRATEGY = new InjectionToken<PageRenderStrategy>('PAGE_RENDER_STRATEGY');\r\n\r\n@Directive({ selector: '[abpPagePart]' })\r\nexport class PagePartDirective implements OnInit, OnDestroy, OnChanges {\r\n hasRendered = false;\r\n type: string;\r\n subscription: Subscription;\r\n\r\n @Input('abpPagePartContext') context: any;\r\n @Input() set abpPagePart(type: string) {\r\n this.type = type;\r\n this.createRenderStream(type);\r\n }\r\n\r\n render = (shouldRender: boolean) => {\r\n if (shouldRender && !this.hasRendered) {\r\n this.viewContainer.createEmbeddedView(this.templateRef);\r\n this.hasRendered = true;\r\n } else if (!shouldRender && this.hasRendered) {\r\n this.viewContainer.clear();\r\n this.hasRendered = false;\r\n }\r\n };\r\n\r\n constructor(\r\n private templateRef: TemplateRef<any>,\r\n private viewContainer: ViewContainerRef,\r\n @Optional() @Inject(PAGE_RENDER_STRATEGY) private renderLogic: PageRenderStrategy,\r\n private injector: Injector,\r\n ) {}\r\n\r\n ngOnChanges({ context }: SimpleChanges): void {\r\n if (this.renderLogic?.onContextUpdate) {\r\n this.renderLogic.onContextUpdate(context);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (this.renderLogic?.onInit) {\r\n this.renderLogic.onInit(this.type, this.injector, this.context);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.clearSubscription();\r\n\r\n if (this.renderLogic?.onDestroy) {\r\n this.renderLogic.onDestroy(this.type, this.injector, this.context);\r\n }\r\n }\r\n\r\n shouldRender(type: string) {\r\n if (this.renderLogic) {\r\n const willRender = this.renderLogic.shouldRender(type);\r\n return willRender instanceof Observable ? willRender : of(willRender);\r\n }\r\n return of(true);\r\n }\r\n\r\n protected createRenderStream(type: string) {\r\n this.clearSubscription();\r\n\r\n this.subscription = this.shouldRender(type).subscribe(this.render);\r\n }\r\n\r\n protected clearSubscription() {\r\n if (this.subscription) {\r\n this.subscription.unsubscribe();\r\n }\r\n }\r\n}\r\n","import { Component, ViewEncapsulation } from '@angular/core';\r\n\r\nexport enum PageParts {\r\n title = 'PageTitleContainerComponent',\r\n breadcrumb = 'PageBreadcrumbContainerComponent',\r\n toolbar = 'PageToolbarContainerComponent',\r\n}\r\n\r\n@Component({\r\n selector: 'abp-page-title-container',\r\n template: ` <ng-content></ng-content> `,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PageTitleContainerComponent {}\r\n\r\n@Component({\r\n selector: 'abp-page-breadcrumb-container',\r\n template: ` <ng-content></ng-content> `,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PageBreadcrumbContainerComponent {}\r\n\r\n@Component({\r\n selector: 'abp-page-toolbar-container',\r\n template: ` <ng-content></ng-content> `,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PageToolbarContainerComponent {}\r\n","import { Component, Input, ViewEncapsulation, ContentChild } from '@angular/core';\r\nimport {\r\n PageTitleContainerComponent,\r\n PageBreadcrumbContainerComponent,\r\n PageToolbarContainerComponent,\r\n PageParts,\r\n} from './page-parts.component';\r\n\r\n@Component({\r\n selector: 'abp-page',\r\n templateUrl: './page.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class PageComponent {\r\n @Input() title: string;\r\n\r\n toolbarVisible = false;\r\n _toolbarData: any;\r\n @Input('toolbar') set toolbarData(val: any) {\r\n this._toolbarData = val;\r\n this.toolbarVisible = true;\r\n }\r\n\r\n get toolbarData() {\r\n return this._toolbarData;\r\n }\r\n\r\n @Input('breadcrumb') breadcrumbVisible = true;\r\n\r\n pageParts = {\r\n title: PageParts.title,\r\n breadcrumb: PageParts.breadcrumb,\r\n toolbar: PageParts.toolbar,\r\n };\r\n\r\n @ContentChild(PageTitleContainerComponent) customTitle: PageTitleContainerComponent;\r\n @ContentChild(PageBreadcrumbContainerComponent)\r\n customBreadcrumb: PageBreadcrumbContainerComponent;\r\n @ContentChild(PageToolbarContainerComponent) customToolbar: PageToolbarContainerComponent;\r\n\r\n get shouldRenderRow() {\r\n return !!(\r\n this.title ||\r\n this.toolbarVisible ||\r\n this.breadcrumbVisible ||\r\n this.customTitle ||\r\n this.customBreadcrumb ||\r\n this.customToolbar\r\n );\r\n }\r\n}\r\n","<div class=\"row entry-row\" *ngIf=\"shouldRenderRow\">\r\n <ng-container *ngIf=\"customTitle; else defaultTitleTemplate\">\r\n <ng-content select=\"abp-page-title-container\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"customBreadcrumb; else defaultBreadcrumbTemplate\">\r\n <ng-content select=\"abp-page-breadcrumb-container\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"customToolbar; else defaultPageToolbarTemplate\">\r\n <ng-content select=\"abp-page-toolbar-container\"></ng-content>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-content></ng-content>\r\n\r\n<ng-template #defaultTitleTemplate>\r\n <ng-container *ngIf=\"title\">\r\n <div class=\"col-auto\" *abpPagePart=\"pageParts.title\">\r\n <h1 class=\"content-header-title\">\r\n {{ title }}\r\n </h1>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultBreadcrumbTemplate>\r\n <ng-container *ngIf=\"breadcrumbVisible\">\r\n <div class=\"col-lg-auto ps-lg-0\" *abpPagePart=\"pageParts.breadcrumb\">\r\n <abp-breadcrumb></abp-breadcrumb>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultPageToolbarTemplate>\r\n <ng-container *ngIf=\"toolbarVisible\">\r\n <div class=\"col\" *abpPagePart=\"pageParts.toolbar; context: toolbarData\">\r\n <abp-page-toolbar [record]=\"toolbarData\"></abp-page-toolbar>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n","import { CoreModule } from '@abp/ng.core';\r\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\r\nimport { UiExtensionsModule } from '@abp/ng.theme.shared/extensions';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { PagePartDirective } from './page-part.directive';\r\nimport {\r\n PageBreadcrumbContainerComponent,\r\n PageTitleContainerComponent,\r\n PageToolbarContainerComponent,\r\n} from './page-parts.component';\r\nimport { PageComponent } from './page.component';\r\n\r\nconst exportedDeclarations = [\r\n PageComponent,\r\n PageTitleContainerComponent,\r\n PageBreadcrumbContainerComponent,\r\n PageToolbarContainerComponent,\r\n PagePartDirective,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...exportedDeclarations],\r\n imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule],\r\n exports: [...exportedDeclarations, UiExtensionsModule],\r\n})\r\nexport class PageModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAwBa,oBAAoB,GAAG,IAAI,cAAc,CAAqB,sBAAsB,EAAE;MAGtF,iBAAiB;IAqB5B,YACU,WAA6B,EAC7B,aAA+B,EACW,WAA+B,EACzE,QAAkB;QAHlB,gBAAW,GAAX,WAAW,CAAkB;QAC7B,kBAAa,GAAb,aAAa,CAA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BAAC,SAAS;gBASK,iBAAiB;sBAArC,KAAK;uBAAC,YAAY;gBAQwB,WAAW;sBAArD,YAAY;uBAAC,2BAA2B;gBAEzC,gBAAgB;sBADf,YAAY;uBAAC,gCAAgC;gBAED,aAAa;sBAAzD,YAAY;uBAAC,6BAA6B;;;AEzB7C,MAAM,oBAAoB,GAAG;IAC3B,aAAa;IACb,2BAA2B;IAC3B,gCAAgC;IAChC,6BAA6B;IAC7B,iBAAiB;CAClB,CAAC;MAOW,UAAU;;wGAAV,UAAU;yGAAV,UAAU,iBAZrB,aAAa;QACb,2BAA2B;QAC3B,gCAAgC;QAChC,6BAA6B;QAC7B,iBAAiB,aAKP,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,aATzE,aAAa;QACb,2BAA2B;QAC3B,gCAAgC;QAChC,6BAA6B;QAC7B,iBAAiB,EAMkB,kBAAkB;yGAE1C,UAAU,YAHZ,CAAC,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,CAAC,EACvC,kBAAkB;4FAE1C,UAAU;kBALtB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC;oBACvC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,CAAC;oBAC1E,OAAO,EAAE,CAAC,GAAG,oBAAoB,EAAE,kBAAkB,CAAC;iBACvD;;;ACzBD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"abp-ng.components-page.js","sources":["../../../../packages/components/page/src/page-part.directive.ts","../../../../packages/components/page/src/page-parts.component.ts","../../../../packages/components/page/src/page.component.ts","../../../../packages/components/page/src/page.component.html","../../../../packages/components/page/src/page.module.ts","../../../../packages/components/page/src/abp-ng.components-page.ts"],"sourcesContent":["import {\n Directive,\n TemplateRef,\n ViewContainerRef,\n Input,\n InjectionToken,\n Optional,\n Inject,\n OnInit,\n OnDestroy,\n Injector,\n OnChanges,\n SimpleChanges,\n SimpleChange,\n} from '@angular/core';\nimport { Observable, Subscription, of } from 'rxjs';\n\nexport interface PageRenderStrategy {\n shouldRender(type?: string): boolean | Observable<boolean>;\n onInit?(type?: string, injector?: Injector, context?: any): void;\n onDestroy?(type?: string, injector?: Injector, context?: any): void;\n onContextUpdate?(change?: SimpleChange): void;\n}\n\nexport const PAGE_RENDER_STRATEGY = new InjectionToken<PageRenderStrategy>('PAGE_RENDER_STRATEGY');\n\n@Directive({ selector: '[abpPagePart]' })\nexport class PagePartDirective implements OnInit, OnDestroy, OnChanges {\n hasRendered = false;\n type: string;\n subscription: Subscription;\n\n @Input('abpPagePartContext') context: any;\n @Input() set abpPagePart(type: string) {\n this.type = type;\n this.createRenderStream(type);\n }\n\n render = (shouldRender: boolean) => {\n if (shouldRender && !this.hasRendered) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasRendered = true;\n } else if (!shouldRender && this.hasRendered) {\n this.viewContainer.clear();\n this.hasRendered = false;\n }\n };\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n @Optional() @Inject(PAGE_RENDER_STRATEGY) private renderLogic: PageRenderStrategy,\n private injector: Injector,\n ) {}\n\n ngOnChanges({ context }: SimpleChanges): void {\n if (this.renderLogic?.onContextUpdate) {\n this.renderLogic.onContextUpdate(context);\n }\n }\n\n ngOnInit() {\n if (this.renderLogic?.onInit) {\n this.renderLogic.onInit(this.type, this.injector, this.context);\n }\n }\n\n ngOnDestroy() {\n this.clearSubscription();\n\n if (this.renderLogic?.onDestroy) {\n this.renderLogic.onDestroy(this.type, this.injector, this.context);\n }\n }\n\n shouldRender(type: string) {\n if (this.renderLogic) {\n const willRender = this.renderLogic.shouldRender(type);\n return willRender instanceof Observable ? willRender : of(willRender);\n }\n return of(true);\n }\n\n protected createRenderStream(type: string) {\n this.clearSubscription();\n\n this.subscription = this.shouldRender(type).subscribe(this.render);\n }\n\n protected clearSubscription() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\nexport enum PageParts {\n title = 'PageTitleContainerComponent',\n breadcrumb = 'PageBreadcrumbContainerComponent',\n toolbar = 'PageToolbarContainerComponent',\n}\n\n@Component({\n selector: 'abp-page-title-container',\n template: ` <ng-content></ng-content> `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageTitleContainerComponent {}\n\n@Component({\n selector: 'abp-page-breadcrumb-container',\n template: ` <ng-content></ng-content> `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageBreadcrumbContainerComponent {}\n\n@Component({\n selector: 'abp-page-toolbar-container',\n template: ` <ng-content></ng-content> `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageToolbarContainerComponent {}\n","import { Component, Input, ViewEncapsulation, ContentChild } from '@angular/core';\nimport {\n PageTitleContainerComponent,\n PageBreadcrumbContainerComponent,\n PageToolbarContainerComponent,\n PageParts,\n} from './page-parts.component';\n\n@Component({\n selector: 'abp-page',\n templateUrl: './page.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageComponent {\n @Input() title: string;\n\n toolbarVisible = false;\n _toolbarData: any;\n @Input('toolbar') set toolbarData(val: any) {\n this._toolbarData = val;\n this.toolbarVisible = true;\n }\n\n get toolbarData() {\n return this._toolbarData;\n }\n\n @Input('breadcrumb') breadcrumbVisible = true;\n\n pageParts = {\n title: PageParts.title,\n breadcrumb: PageParts.breadcrumb,\n toolbar: PageParts.toolbar,\n };\n\n @ContentChild(PageTitleContainerComponent) customTitle: PageTitleContainerComponent;\n @ContentChild(PageBreadcrumbContainerComponent)\n customBreadcrumb: PageBreadcrumbContainerComponent;\n @ContentChild(PageToolbarContainerComponent) customToolbar: PageToolbarContainerComponent;\n\n get shouldRenderRow() {\n return !!(\n this.title ||\n this.toolbarVisible ||\n this.breadcrumbVisible ||\n this.customTitle ||\n this.customBreadcrumb ||\n this.customToolbar\n );\n }\n}\n","<div class=\"row entry-row\" *ngIf=\"shouldRenderRow\">\n <ng-container *ngIf=\"customTitle; else defaultTitleTemplate\">\n <ng-content select=\"abp-page-title-container\"></ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"customBreadcrumb; else defaultBreadcrumbTemplate\">\n <ng-content select=\"abp-page-breadcrumb-container\"></ng-content>\n </ng-container>\n\n <ng-container *ngIf=\"customToolbar; else defaultPageToolbarTemplate\">\n <ng-content select=\"abp-page-toolbar-container\"></ng-content>\n </ng-container>\n</div>\n\n<ng-content></ng-content>\n\n<ng-template #defaultTitleTemplate>\n <ng-container *ngIf=\"title\">\n <div class=\"col-auto\" *abpPagePart=\"pageParts.title\">\n <h1 class=\"content-header-title\">\n {{ title }}\n </h1>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultBreadcrumbTemplate>\n <ng-container *ngIf=\"breadcrumbVisible\">\n <div class=\"col-lg-auto ps-lg-0\" *abpPagePart=\"pageParts.breadcrumb\">\n <abp-breadcrumb></abp-breadcrumb>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultPageToolbarTemplate>\n <ng-container *ngIf=\"toolbarVisible\">\n <div class=\"col\" *abpPagePart=\"pageParts.toolbar; context: toolbarData\">\n <abp-page-toolbar [record]=\"toolbarData\"></abp-page-toolbar>\n </div>\n </ng-container>\n</ng-template>\n","import { CoreModule } from '@abp/ng.core';\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\nimport { UiExtensionsModule } from '@abp/ng.theme.shared/extensions';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PagePartDirective } from './page-part.directive';\nimport {\n PageBreadcrumbContainerComponent,\n PageTitleContainerComponent,\n PageToolbarContainerComponent,\n} from './page-parts.component';\nimport { PageComponent } from './page.component';\n\nconst exportedDeclarations = [\n PageComponent,\n PageTitleContainerComponent,\n PageBreadcrumbContainerComponent,\n PageToolbarContainerComponent,\n PagePartDirective,\n];\n\n@NgModule({\n declarations: [...exportedDeclarations],\n imports: [CommonModule, UiExtensionsModule, CoreModule, ThemeSharedModule],\n exports: [...exportedDeclarations, UiExtensionsModule],\n})\nexport class PageModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAwBa,oBAAoB,GAAG,IAAI,cAAc,CAAqB,sBAAsB,EAAE;MAGtF,iBAAiB;IAqB5B,YACU,WAA6B,EAC7B,aAA+B,EACW,WAA+B,EACzE,QAAkB;QAHlB,gBAAW,GAAX,WAAW,CAAkB;QAC7B,kBAAa,GAAb,aAAa,CAAkB;QACW,gBAAW,GAAX,WAAW,CAAoB;QACzE,aAAQ,GAAR,QAAQ,CAAU;QAxB5B,gBAAW,GAAG,KAAK,CAAC;QAUpB,WAAM,GAAG,CAAC,YAAqB;YAC7B,IAAI,YAAY,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;gBACrC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACxD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;aACzB;iBAAM,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE;gBAC5C,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;gBAC3B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;aAC1B;SACF,CAAC;KAOE;IApBJ,IAAa,WAAW,CAAC,IAAY;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAC/B;IAmBD,WAAW,CAAC,EAAE,OAAO,EAAiB;;QACpC,IAAI,MAAA,IAAI,CAAC,WAAW,0CAAE,eAAe,EAAE;YACrC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SAC3C;KACF;IAED,QAAQ;;QACN,IAAI,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,EAAE;YAC5B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,E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