@abp/ng.components 4.4.0 → 5.0.0-beta.1
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/abp-ng.components.d.ts +1 -0
- package/bundles/abp-ng.components-chart.js.umd.js +185 -0
- package/bundles/abp-ng.components-chart.js.umd.js.map +1 -0
- package/bundles/abp-ng.components-page.umd.js +183 -120
- package/bundles/abp-ng.components-page.umd.js.map +1 -1
- package/bundles/abp-ng.components-tree.umd.js +117 -62
- package/bundles/abp-ng.components-tree.umd.js.map +1 -1
- package/bundles/abp-ng.components.umd.js.map +1 -1
- package/chart.js/abp-ng.components-chart.js.d.ts +5 -0
- package/chart.js/chart.component.d.ts +30 -0
- package/chart.js/chart.module.d.ts +8 -0
- package/chart.js/package.json +10 -0
- package/chart.js/public-api.d.ts +3 -0
- package/chart.js/widget-utils.d.ts +1 -0
- package/esm2015/abp-ng.components.js +1 -1
- package/esm2015/abp-ng.components.js.map +1 -0
- package/esm2015/chart.js/abp-ng.components-chart.js.js +5 -0
- package/esm2015/chart.js/abp-ng.components-chart.js.js.map +1 -0
- package/esm2015/chart.js/chart.component.js +141 -0
- package/esm2015/chart.js/chart.component.js.map +1 -0
- package/esm2015/chart.js/chart.module.js +19 -0
- package/esm2015/chart.js/chart.module.js.map +1 -0
- package/esm2015/chart.js/public-api.js +4 -0
- package/esm2015/chart.js/public-api.js.map +1 -0
- package/esm2015/chart.js/widget-utils.js +11 -0
- package/esm2015/chart.js/widget-utils.js.map +1 -0
- package/esm2015/page/abp-ng.components-page.js +1 -1
- package/esm2015/page/abp-ng.components-page.js.map +1 -0
- package/esm2015/page/page-part.directive.js +18 -14
- package/esm2015/page/page-part.directive.js.map +1 -0
- package/esm2015/page/page-parts.component.js +32 -28
- package/esm2015/page/page-parts.component.js.map +1 -0
- package/esm2015/page/page.component.js +33 -16
- package/esm2015/page/page.component.js.map +1 -0
- package/esm2015/page/page.module.js +27 -14
- package/esm2015/page/page.module.js.map +1 -0
- package/esm2015/page/public-api.js +1 -1
- package/esm2015/page/public-api.js.map +1 -0
- package/esm2015/public-api.js +1 -1
- package/esm2015/public-api.js.map +1 -0
- package/esm2015/tree/abp-ng.components-tree.js +1 -1
- package/esm2015/tree/abp-ng.components-tree.js.map +1 -0
- package/esm2015/tree/lib/components/tree.component.js +59 -29
- package/esm2015/tree/lib/components/tree.component.js.map +1 -0
- package/esm2015/tree/lib/templates/expanded-icon-template.directive.js +10 -9
- package/esm2015/tree/lib/templates/expanded-icon-template.directive.js.map +1 -0
- package/esm2015/tree/lib/templates/tree-node-template.directive.js +10 -9
- package/esm2015/tree/lib/templates/tree-node-template.directive.js.map +1 -0
- package/esm2015/tree/lib/tree.module.js +13 -8
- package/esm2015/tree/lib/tree.module.js.map +1 -0
- package/esm2015/tree/lib/utils/nz-tree-adapter.js +1 -1
- package/esm2015/tree/lib/utils/nz-tree-adapter.js.map +1 -0
- package/esm2015/tree/public-api.js +1 -1
- package/esm2015/tree/public-api.js.map +1 -0
- package/fesm2015/abp-ng.components-chart.js.js +175 -0
- package/fesm2015/abp-ng.components-chart.js.js.map +1 -0
- package/fesm2015/abp-ng.components-page.js +140 -106
- package/fesm2015/abp-ng.components-page.js.map +1 -1
- package/fesm2015/abp-ng.components-tree.js +85 -51
- package/fesm2015/abp-ng.components-tree.js.map +1 -1
- package/fesm2015/abp-ng.components.js.map +1 -1
- package/package.json +5 -5
- package/page/abp-ng.components-page.d.ts +1 -0
- package/page/package.json +0 -1
- package/page/page-part.directive.d.ts +3 -0
- package/page/page-parts.component.d.ts +7 -0
- package/page/page.component.d.ts +3 -0
- package/page/page.module.d.ts +11 -0
- package/tree/abp-ng.components-tree.d.ts +1 -0
- package/tree/lib/components/tree.component.d.ts +3 -0
- package/tree/lib/templates/expanded-icon-template.directive.d.ts +3 -0
- package/tree/lib/templates/tree-node-template.directive.d.ts +3 -0
- package/tree/lib/tree.module.d.ts +11 -0
- package/tree/package.json +0 -1
- package/abp-ng.components.metadata.json +0 -1
- package/bundles/abp-ng.components-page.umd.min.js +0 -16
- package/bundles/abp-ng.components-page.umd.min.js.map +0 -1
- package/bundles/abp-ng.components-tree.umd.min.js +0 -16
- package/bundles/abp-ng.components-tree.umd.min.js.map +0 -1
- package/bundles/abp-ng.components.umd.min.js +0 -2
- package/bundles/abp-ng.components.umd.min.js.map +0 -1
- package/page/abp-ng.components-page.metadata.json +0 -1
- package/tree/abp-ng.components-tree.metadata.json +0 -1
|
@@ -1,37 +1,43 @@
|
|
|
1
|
+
import * as i5 from '@abp/ng.core';
|
|
1
2
|
import { CoreModule } from '@abp/ng.core';
|
|
2
|
-
import
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Directive, EventEmitter, Component, ViewEncapsulation, ContentChild, Output, Input, NgModule } from '@angular/core';
|
|
5
|
+
import * as i4 from '@ng-bootstrap/ng-bootstrap';
|
|
3
6
|
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
7
|
+
import * as i2 from 'ng-zorro-antd/core/no-animation';
|
|
4
8
|
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
|
|
9
|
+
import * as i1 from 'ng-zorro-antd/tree';
|
|
5
10
|
import { NzTreeModule } from 'ng-zorro-antd/tree';
|
|
6
11
|
import { of } from 'rxjs';
|
|
12
|
+
import * as i3 from '@angular/common';
|
|
7
13
|
|
|
8
14
|
class TreeNodeTemplateDirective {
|
|
9
15
|
constructor(template) {
|
|
10
16
|
this.template = template;
|
|
11
17
|
}
|
|
12
18
|
}
|
|
13
|
-
TreeNodeTemplateDirective
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
];
|
|
19
|
+
TreeNodeTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeNodeTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
TreeNodeTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]", ngImport: i0 });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeNodeTemplateDirective, decorators: [{
|
|
22
|
+
type: Directive,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: '[abpTreeNodeTemplate],[abp-tree-node-template]',
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
21
27
|
|
|
22
28
|
class ExpandedIconTemplateDirective {
|
|
23
29
|
constructor(template) {
|
|
24
30
|
this.template = template;
|
|
25
31
|
}
|
|
26
32
|
}
|
|
27
|
-
ExpandedIconTemplateDirective
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
];
|
|
33
|
+
ExpandedIconTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExpandedIconTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
34
|
+
ExpandedIconTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]", ngImport: i0 });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ExpandedIconTemplateDirective, decorators: [{
|
|
36
|
+
type: Directive,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: '[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]',
|
|
39
|
+
}]
|
|
40
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
35
41
|
|
|
36
42
|
class TreeComponent {
|
|
37
43
|
constructor() {
|
|
@@ -72,45 +78,73 @@ class TreeComponent {
|
|
|
72
78
|
this.dropdowns[key] = dropdown;
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
|
-
TreeComponent
|
|
76
|
-
{ type: Component, args: [{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
styles: [".ant-tree-checkbox,.ant-tree-checkbox-wrapper{box-sizing:border-box;font-variant:tabular-nums;list-style:none;font-feature-settings:\"tnum\"}@-webkit-keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree.ant-tree-directory .ant-tree-treenode{position:relative}.ant-tree.ant-tree-directory .ant-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background-color .3s;content:\"\";pointer-events:none}.ant-tree.ant-tree-directory .ant-tree-treenode:hover:before{background:#f5f5f5}.ant-tree.ant-tree-directory .ant-tree-treenode>*{z-index:1}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher{transition:color .3s}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper{border-radius:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background:0 0}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper.ant-tree-node-selected{color:#fff;background:0 0}.ant-tree.ant-tree-directory .ant-tree-treenode-selected:before,.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover:before{background:#1890ff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher{color:#fff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-node-content-wrapper{color:#fff;background:0 0}.ant-tree-checkbox{padding:0;color:rgba(0,0,0,.85);font-size:14px;position:relative;line-height:1;white-space:nowrap;outline:0;cursor:pointer}.ant-tree-checkbox-input:focus+.ant-tree-checkbox-inner,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner,.ant-tree-checkbox:hover .ant-tree-checkbox-inner{border-color:#1890ff}.ant-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #1890ff;border-radius:2px;visibility:hidden;-webkit-animation:antCheckboxEffect .36s ease-in-out;animation:antCheckboxEffect .36s ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;content:\"\"}.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox:after,.ant-tree-checkbox:hover:after{visibility:visible}.ant-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;border-collapse:separate;transition:all .3s}.ant-tree-checkbox-inner:after{position:absolute;top:50%;left:22%;display:table;width:5.71px;height:9.14px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:\" \"}.ant-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-tree-checkbox-disabled,.ant-tree-checkbox-disabled+span,.ant-tree-checkbox-disabled .ant-tree-checkbox-input{cursor:not-allowed}.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:\" \"}.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background-color:#1890ff;border-color:#1890ff}.ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:rgba(0,0,0,.25);-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled+span{color:rgba(0,0,0,.25)}.ant-tree-checkbox-disabled:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled:after{visibility:hidden}.ant-tree-checkbox-wrapper{margin:0;padding:0;color:rgba(0,0,0,.85);font-size:14px;display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-tree-checkbox-wrapper+.ant-tree-checkbox-wrapper{margin-left:8px}.ant-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-tree,.ant-tree-checkbox-group{box-sizing:border-box;padding:0;color:rgba(0,0,0,.85);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:\"tnum\"}.ant-tree-checkbox-group{margin:0;display:inline-block}.ant-tree-checkbox-group-item{margin-right:8px}.ant-tree-checkbox-group-item:last-child{margin-right:0}.ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:0}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{top:50%;left:50%;width:8px;height:8px;background-color:#1890ff;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{background-color:rgba(0,0,0,.25);border-color:rgba(0,0,0,.25)}.ant-tree{margin:0;background:#fff;border-radius:2px;transition:background-color .3s}.ant-tree-focused:not(:hover):not(.ant-tree-active-focused){background:#e6f7ff}.ant-tree-list-holder-inner{align-items:flex-start}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner{align-items:stretch}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-node-content-wrapper{flex:auto}.ant-tree .ant-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:0}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover{background:0 0}.ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper{background:#f5f5f5}.ant-tree .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node .ant-tree-title{color:inherit;font-weight:500}.ant-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-indent-unit{display:inline-block;width:24px}.ant-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-switcher .ant-select-tree-switcher-icon,.ant-tree-switcher .ant-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-tree-switcher .ant-select-tree-switcher-icon svg,.ant-tree-switcher .ant-tree-switcher-icon svg{transition:transform .3s}.ant-tree-switcher-noop{cursor:default}.ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-tree-switcher-loading-icon{color:#1890ff}.ant-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-tree-switcher-leaf-line:after,.ant-tree-switcher-leaf-line:before{position:absolute;margin-left:-1px;content:\" \"}.ant-tree-switcher-leaf-line:before{top:0;bottom:-4px;border-left:1px solid #d9d9d9}.ant-tree-switcher-leaf-line:after{width:10px;height:14px;border-bottom:1px solid #d9d9d9}.ant-tree-checkbox{top:auto;margin:4px 8px 0 0}.ant-tree .ant-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:0 0;border-radius:2px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-tree .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:#bae7ff}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-tree-show-line .ant-tree-indent-unit-end:before,.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty{display:none}.ant-tree-unselectable .ant-tree-node-content-wrapper:hover{background-color:transparent}.ant-tree-node-content-wrapper[draggable=true]{line-height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#1890ff;border-radius:1px;pointer-events:none}.ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #1890ff;border-radius:50%;content:\"\"}.ant-tree .ant-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #1890ff}.ant-tree-show-line .ant-tree-indent-unit{position:relative;height:100%}.ant-tree-show-line .ant-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:\"\"}.ant-tree-show-line .ant-tree-switcher{background:#fff}.ant-tree-show-line .ant-tree-switcher-line-icon{vertical-align:-.225em}.ant-tree-rtl{direction:rtl}.ant-tree-rtl .ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{right:-6px;left:unset}.ant-tree .ant-tree-treenode-rtl{direction:rtl}.ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit:before{right:auto;left:-13px;border-right:none;border-left:1px solid #d9d9d9}.ant-tree-rtl.ant-tree-checkbox,.ant-tree-select-dropdown-rtl .ant-select-tree-checkbox{margin:4px 0 0 8px}.font-highlight{color:#ff4d4f}.ant-tree-child-tree{overflow:hidden}nz-tree{display:block}", ".ant-tree{color:inherit}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}.ant-tree .ant-tree-switcher{line-height:17px}.ant-tree .ant-tree-node-content-wrapper{width:100%;padding:0}.ant-tree .node-wrapper{width:100%;position:relative;display:inline-block;margin:0;line-height:24px;text-decoration:none;vertical-align:top;border-radius:2px;cursor:pointer;padding:0 5px 0 8px;border:1px solid transparent}.ant-tree .ellipsis{position:absolute;right:8px;top:1px;cursor:pointer}"]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
81
|
+
TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: TreeComponent, selector: "abp-tree", inputs: { noAnimation: "noAnimation", draggable: "draggable", checkable: "checkable", checkStrictly: "checkStrictly", checkedKeys: "checkedKeys", nodes: "nodes", expandedKeys: "expandedKeys", selectedNode: "selectedNode", isNodeSelected: "isNodeSelected", beforeDrop: "beforeDrop" }, outputs: { checkedKeysChange: "checkedKeysChange", expandedKeysChange: "expandedKeysChange", selectedNodeChange: "selectedNodeChange", dropOver: "dropOver" }, queries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true }, { propertyName: "customNodeTemplate", first: true, predicate: TreeNodeTemplateDirective, descendants: true }, { propertyName: "expandedIconTemplate", first: true, predicate: ExpandedIconTemplateDirective, descendants: true }], ngImport: i0, template: "<nz-tree\n [nzBeforeDrop]=\"beforeDrop\"\n [nzDraggable]=\"draggable\"\n [nzCheckStrictly]=\"checkStrictly\"\n [nzCheckable]=\"checkable\"\n [nzCheckedKeys]=\"checkedKeys\"\n [nzData]=\"nodes\"\n [nzTreeTemplate]=\"treeTemplate\"\n [nzExpandedKeys]=\"expandedKeys\"\n [nzExpandedIcon]=\"expandedIconTemplate?.template || defaultIconTemplate\"\n (nzExpandChange)=\"onExpandedKeysChange($event)\"\n (nzCheckBoxChange)=\"onCheckboxChange($event)\"\n (nzOnDrop)=\"onDrop($event)\"\n [nzNoAnimation]=\"noAnimation\"\n (nzContextMenu)=\"dropdowns[$event.node?.key]?.toggle()\"\n></nz-tree>\n<ng-template #treeTemplate let-node>\n <div\n class=\"node-wrapper\"\n [class.selected]=\"isNodeSelected(node)\"\n [title]=\"node.title\"\n (click)=\"onSelectedNodeChange(node)\"\n >\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context: { $implicit: node }\"></ng-container>\n\n <ng-template #nodeTemplate let-node>\n <div class=\"d-inline-block\">\n <ng-container\n *ngTemplateOutlet=\"\n customNodeTemplate ? customNodeTemplate?.template : defaultNodeTemplate;\n context: { $implicit: node }\n \"\n ></ng-container>\n </div>\n\n <div\n #dropdown=\"ngbDropdown\"\n *ngIf=\"menu\"\n class=\"d-inline-block ml-1\"\n ngbDropdown\n placement=\"bottom\"\n container=\"body\"\n (abpInit)=\"initDropdown(node.key, dropdown)\"\n >\n <i\n class=\"fas fa-caret-down text-muted\"\n ngbDropdownToggle\n [class.dropdown-toggle]=\"false\"\n ></i>\n <div ngbDropdownMenu>\n <ng-template *ngTemplateOutlet=\"menu; context: { $implicit: node }\"></ng-template>\n </div>\n </div>\n </ng-template>\n\n <ng-template #defaultNodeTemplate let-node>\n <span>{{ node.title }}</span>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #defaultIconTemplate let-node let-origin=\"origin\">\n <i style=\"line-height: 28px\" aria-hidden=\"true\">\n <ng-container *ngTemplateOutlet=\"node.isExpanded ? minusIcon : plusIcon\"></ng-container\n ></i>\n</ng-template>\n\n<ng-template #minusIcon>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm-6.5 10h13v1h-13v-1z\"\n />\n </svg>\n</ng-template>\n\n<ng-template #plusIcon>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm.5 10h6v1h-6v6h-1v-6h-6v-1h6v-6h1v6z\"\n />\n </svg>\n</ng-template>\n", styles: [".ant-tree-checkbox,.ant-tree-checkbox-wrapper{font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:\"tnum\",\"tnum\"}@-webkit-keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree.ant-tree-directory .ant-tree-treenode{position:relative}.ant-tree.ant-tree-directory .ant-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background-color .3s;content:\"\";pointer-events:none}.ant-tree.ant-tree-directory .ant-tree-treenode:hover:before{background:#f5f5f5}.ant-tree.ant-tree-directory .ant-tree-treenode>*{z-index:1}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher{transition:color .3s}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper{border-radius:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background:0 0}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper.ant-tree-node-selected{color:#fff;background:0 0}.ant-tree.ant-tree-directory .ant-tree-treenode-selected:before,.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover:before{background:#1890ff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher{color:#fff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-node-content-wrapper{color:#fff;background:0 0}.ant-tree-checkbox{box-sizing:border-box;padding:0;color:#000000d9;position:relative;line-height:1;white-space:nowrap;outline:0;cursor:pointer}.ant-tree-checkbox-input:focus+.ant-tree-checkbox-inner,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner,.ant-tree-checkbox:hover .ant-tree-checkbox-inner{border-color:#1890ff}.ant-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #1890ff;border-radius:2px;visibility:hidden;-webkit-animation:antCheckboxEffect .36s ease-in-out;animation:antCheckboxEffect .36s ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;content:\"\"}.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox:after,.ant-tree-checkbox:hover:after{visibility:visible}.ant-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;border-collapse:separate;transition:all .3s}.ant-tree-checkbox-inner:after{position:absolute;top:50%;left:22%;display:table;width:5.71px;height:9.14px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:\" \"}.ant-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-tree-checkbox-disabled,.ant-tree-checkbox-disabled .ant-tree-checkbox-input,.ant-tree-checkbox-disabled+span{cursor:not-allowed}.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:\" \"}.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background-color:#1890ff;border-color:#1890ff}.ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:#00000040;-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled+span{color:#00000040}.ant-tree-checkbox-disabled:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled:after{visibility:hidden}.ant-tree-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-tree-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:\"\\a0\"}.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-tree-checkbox-wrapper+.ant-tree-checkbox-wrapper{margin-left:8px}.ant-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-tree,.ant-tree-checkbox-group{box-sizing:border-box;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:\"tnum\",\"tnum\"}.ant-tree-checkbox-group{margin:0;display:inline-block}.ant-tree-checkbox-group-item{margin-right:8px}.ant-tree-checkbox-group-item:last-child{margin-right:0}.ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:0}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{top:50%;left:50%;width:8px;height:8px;background-color:#1890ff;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:\" \"}.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-tree{margin:0;background:#fff;border-radius:2px;transition:background-color .3s}.ant-tree-focused:not(:hover):not(.ant-tree-active-focused){background:#e6f7ff}.ant-tree-list-holder-inner{align-items:flex-start}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner{align-items:stretch}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-node-content-wrapper{flex:auto}.ant-tree .ant-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:0}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper{color:#00000040;cursor:not-allowed}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover{background:0 0}.ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper{background:#f5f5f5}.ant-tree .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node .ant-tree-title{color:inherit;font-weight:500}.ant-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-indent-unit{display:inline-block;width:24px}.ant-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-switcher .ant-select-tree-switcher-icon,.ant-tree-switcher .ant-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-tree-switcher .ant-select-tree-switcher-icon svg,.ant-tree-switcher .ant-tree-switcher-icon svg{transition:transform .3s}.ant-tree-switcher-noop{cursor:default}.ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-tree-switcher-loading-icon{color:#1890ff}.ant-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-tree-switcher-leaf-line:after,.ant-tree-switcher-leaf-line:before{position:absolute;margin-left:-1px;content:\" \"}.ant-tree-switcher-leaf-line:before{top:0;bottom:-4px;border-left:1px solid #d9d9d9}.ant-tree-switcher-leaf-line:after{width:10px;height:14px;border-bottom:1px solid #d9d9d9}.ant-tree-checkbox{top:auto;top:initial;margin:4px 8px 0 0}.ant-tree .ant-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:0 0;border-radius:2px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-tree .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:#bae7ff}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty,.ant-tree-show-line .ant-tree-indent-unit-end:before{display:none}.ant-tree-unselectable .ant-tree-node-content-wrapper:hover{background-color:transparent}.ant-tree-node-content-wrapper[draggable=true]{line-height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#1890ff;border-radius:1px;pointer-events:none}.ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #1890ff;border-radius:50%;content:\"\"}.ant-tree .ant-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #1890ff}.ant-tree-show-line .ant-tree-indent-unit{position:relative;height:100%}.ant-tree-show-line .ant-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:\"\"}.ant-tree-show-line .ant-tree-switcher{background:#fff}.ant-tree-show-line .ant-tree-switcher-line-icon{vertical-align:-.225em}.ant-tree-rtl{direction:rtl}.ant-tree-rtl .ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{right:-6px;left:unset}.ant-tree .ant-tree-treenode-rtl{direction:rtl}.ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit:before{right:auto;left:-13px;border-right:none;border-left:1px solid #d9d9d9}.ant-tree-rtl.ant-tree-checkbox,.ant-tree-select-dropdown-rtl .ant-select-tree-checkbox{margin:4px 0 0 8px}.font-highlight{color:#ff4d4f}.ant-tree-child-tree{overflow:hidden}nz-tree{display:block}\n", ".ant-tree{color:inherit}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}.ant-tree .ant-tree-switcher{line-height:17px}.ant-tree .ant-tree-node-content-wrapper{width:100%;padding:0}.ant-tree .node-wrapper{width:100%;position:relative;display:inline-block;margin:0;line-height:24px;text-decoration:none;vertical-align:top;border-radius:2px;cursor:pointer;padding:0 5px 0 8px;border:1px solid transparent}.ant-tree .ellipsis{position:absolute;right:8px;top:1px;cursor:pointer}\n"], components: [{ type: i1.NzTreeComponent, selector: "nz-tree", inputs: ["nzShowIcon", "nzHideUnMatched", "nzBlockNode", "nzExpandAll", "nzSelectMode", "nzCheckStrictly", "nzShowExpand", "nzShowLine", "nzCheckable", "nzAsyncData", "nzDraggable", "nzMultiple", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzData", "nzExpandedKeys", "nzSelectedKeys", "nzCheckedKeys", "nzSearchValue", "nzExpandedIcon", "nzTreeTemplate", "nzBeforeDrop", "nzSearchFunc"], outputs: ["nzExpandedKeysChange", "nzSelectedKeysChange", "nzCheckedKeysChange", "nzSearchValueChange", "nzClick", "nzDblClick", "nzContextMenu", "nzCheckBoxChange", "nzExpandChange", "nzOnDragStart", "nzOnDragEnter", "nzOnDragOver", "nzOnDragLeave", "nzOnDrop", "nzOnDragEnd"], exportAs: ["nzTree"] }], directives: [{ type: i2.NzNoAnimationDirective, selector: "[nzNoAnimation]", inputs: ["nzNoAnimation"], exportAs: ["nzNoAnimation"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgbDropdown, selector: "[ngbDropdown]", inputs: ["open", "placement", "container", "autoClose", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { type: i5.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { type: i4.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { type: i4.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }], encapsulation: i0.ViewEncapsulation.None });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeComponent, decorators: [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: 'abp-tree',
|
|
87
|
+
templateUrl: 'tree.component.html',
|
|
88
|
+
styleUrls: [
|
|
89
|
+
'../../../../../../node_modules/ng-zorro-antd/tree/style/index.min.css',
|
|
90
|
+
'tree.component.scss',
|
|
91
|
+
],
|
|
92
|
+
encapsulation: ViewEncapsulation.None,
|
|
93
|
+
}]
|
|
94
|
+
}], propDecorators: { menu: [{
|
|
95
|
+
type: ContentChild,
|
|
96
|
+
args: ['menu']
|
|
97
|
+
}], customNodeTemplate: [{
|
|
98
|
+
type: ContentChild,
|
|
99
|
+
args: [TreeNodeTemplateDirective]
|
|
100
|
+
}], expandedIconTemplate: [{
|
|
101
|
+
type: ContentChild,
|
|
102
|
+
args: [ExpandedIconTemplateDirective]
|
|
103
|
+
}], checkedKeysChange: [{
|
|
104
|
+
type: Output
|
|
105
|
+
}], expandedKeysChange: [{
|
|
106
|
+
type: Output
|
|
107
|
+
}], selectedNodeChange: [{
|
|
108
|
+
type: Output
|
|
109
|
+
}], dropOver: [{
|
|
110
|
+
type: Output
|
|
111
|
+
}], noAnimation: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], draggable: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], checkable: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], checkStrictly: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], checkedKeys: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], nodes: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], expandedKeys: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], selectedNode: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], isNodeSelected: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], beforeDrop: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}] } });
|
|
102
132
|
|
|
103
133
|
const templates = [TreeNodeTemplateDirective, ExpandedIconTemplateDirective];
|
|
104
134
|
const exported = [...templates, TreeComponent];
|
|
105
135
|
class TreeModule {
|
|
106
136
|
}
|
|
107
|
-
TreeModule
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
]
|
|
137
|
+
TreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
138
|
+
TreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeModule, declarations: [TreeNodeTemplateDirective, ExpandedIconTemplateDirective, TreeComponent], imports: [CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule], exports: [TreeNodeTemplateDirective, ExpandedIconTemplateDirective, TreeComponent] });
|
|
139
|
+
TreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeModule, imports: [[CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule]] });
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TreeModule, decorators: [{
|
|
141
|
+
type: NgModule,
|
|
142
|
+
args: [{
|
|
143
|
+
imports: [CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule],
|
|
144
|
+
exports: [...exported],
|
|
145
|
+
declarations: [...exported],
|
|
146
|
+
}]
|
|
147
|
+
}] });
|
|
114
148
|
|
|
115
149
|
class BaseNode {
|
|
116
150
|
constructor(id, parentId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.components-tree.js","sources":["../../../packages/components/tree/src/lib/templates/tree-node-template.directive.ts","../../../packages/components/tree/src/lib/templates/expanded-icon-template.directive.ts","../../../packages/components/tree/src/lib/components/tree.component.ts","../../../packages/components/tree/src/lib/tree.module.ts","../../../packages/components/tree/src/lib/utils/nz-tree-adapter.ts","../../../packages/components/tree/src/abp-ng.components-tree.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[abpTreeNodeTemplate],[abp-tree-node-template]',\n})\nexport class TreeNodeTemplateDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]',\n})\nexport class ExpandedIconTemplateDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import {\n Component,\n ContentChild,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NzFormatEmitEvent, NzFormatBeforeDropEvent } from 'ng-zorro-antd/tree';\nimport { of } from 'rxjs';\nimport { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive';\nimport { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive';\nimport { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';\n\nexport type DropEvent = NzFormatEmitEvent & { pos: number };\n\n@Component({\n selector: 'abp-tree',\n templateUrl: 'tree.component.html',\n styleUrls: [\n '../../../../../../node_modules/ng-zorro-antd/tree/style/index.min.css',\n 'tree.component.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TreeComponent {\n dropPosition: number;\n\n dropdowns = {} as { [key: string]: NgbDropdown };\n\n @ContentChild('menu') menu: TemplateRef<any>;\n @ContentChild(TreeNodeTemplateDirective) customNodeTemplate: TreeNodeTemplateDirective;\n @ContentChild(ExpandedIconTemplateDirective) expandedIconTemplate: ExpandedIconTemplateDirective;\n @Output() readonly checkedKeysChange = new EventEmitter();\n @Output() readonly expandedKeysChange = new EventEmitter<string[]>();\n @Output() readonly selectedNodeChange = new EventEmitter();\n @Output() readonly dropOver = new EventEmitter<DropEvent>();\n @Input() noAnimation = true;\n @Input() draggable: boolean;\n @Input() checkable: boolean;\n @Input() checkStrictly: boolean;\n @Input() checkedKeys = [];\n @Input() nodes = [];\n @Input() expandedKeys: string[] = [];\n @Input() selectedNode: any;\n @Input() isNodeSelected = node => this.selectedNode?.id === node.key;\n @Input() beforeDrop = (event: NzFormatBeforeDropEvent) => {\n this.dropPosition = event.pos;\n return of(false);\n };\n\n onSelectedNodeChange(node) {\n this.selectedNode = node.origin.entity;\n this.selectedNodeChange.emit(node.origin.entity);\n }\n\n onCheckboxChange(event) {\n this.checkedKeys = [...event.keys];\n this.checkedKeysChange.emit(event.keys);\n }\n\n onExpandedKeysChange(event) {\n this.expandedKeys = [...event.keys];\n this.expandedKeysChange.emit(event.keys);\n }\n\n onDrop(event: DropEvent) {\n event.event.stopPropagation();\n event.event.preventDefault();\n event.pos = this.dropPosition;\n\n this.dropOver.emit(event);\n }\n\n initDropdown(key: string, dropdown: NgbDropdown) {\n this.dropdowns[key] = dropdown;\n }\n}\n","import { CoreModule } from '@abp/ng.core';\nimport { NgModule } from '@angular/core';\nimport { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';\nimport { NzTreeModule } from 'ng-zorro-antd/tree';\nimport { TreeComponent } from './components/tree.component';\nimport { ExpandedIconTemplateDirective } from './templates/expanded-icon-template.directive';\nimport { TreeNodeTemplateDirective } from './templates/tree-node-template.directive';\n\nconst templates = [TreeNodeTemplateDirective, ExpandedIconTemplateDirective];\n\nconst exported = [...templates, TreeComponent];\n\n@NgModule({\n imports: [CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule],\n exports: [...exported],\n declarations: [...exported],\n})\nexport class TreeModule {}\n","export abstract class BaseNode {\n name?: string;\n displayName?: string;\n\n constructor(public id: string, public parentId: string | null) {}\n}\n\nclass TreeNode<T extends BaseNode> extends BaseNode {\n title: string | undefined;\n key: string;\n icon: string | null = null;\n children: TreeNode<T>[] = [];\n isLeaf = true;\n checked = false;\n selected = false;\n expanded = false;\n selectable = true;\n disabled = false;\n disableCheckbox = false;\n parentNode?: TreeNode<T> | null;\n\n constructor(public entity: T, private nameResolver = ent => ent.displayName || ent.name) {\n super(entity.id, entity.parentId);\n this.key = entity.id;\n this.title = nameResolver(entity);\n }\n}\n\nexport class TreeAdapter<T extends BaseNode = BaseNode> {\n private tree: TreeNode<T>[];\n\n constructor(private list: T[] = []) {\n this.tree = createTreeFromList(this.list);\n }\n\n getList() {\n return this.list;\n }\n\n getTree() {\n return this.tree;\n }\n\n handleDrop({ key, parentNode }: TreeNode<T>) {\n const index = this.list.findIndex(({ id }) => id === key);\n this.list[index].parentId = parentNode ? parentNode.key : null;\n this.tree = createTreeFromList(this.list);\n }\n\n handleRemove({ key }: TreeNode<T>) {\n this.updateTreeFromList(this.list.filter(item => item.id !== key));\n }\n\n handleUpdate({ key, children }: { key: string; children: T[] }) {\n /**\n * When we need to update a node with new children, first we need to remove any descendant nodes.\n * If we remove immediate children and create a new tree, any other descendant nodes will be removed\n * and we won't need to recursively remove sub children.\n * Then, you simply add back the new children and create a new tree.\n */\n const listWithDescendantNodesRemoved = this.updateTreeFromList(\n this.list.filter(item => item.parentId !== key),\n );\n this.updateTreeFromList(listWithDescendantNodesRemoved.concat(children));\n }\n\n updateTreeFromList(list: T[]) {\n this.tree = createTreeFromList(list);\n this.list = createListFromTree(this.tree);\n return this.list;\n }\n}\n\n// UTILITY FUNCTIONS\n\nfunction createTreeFromList<T extends BaseNode>(list: T[]): TreeNode<T>[] {\n const map = createMapFromList(list);\n const tree: TreeNode<T>[] = [];\n\n list.forEach(row => {\n const parentId = row.parentId;\n const node = map.get(row.id);\n if (parentId) {\n const parent = map.get(parentId);\n if (!parent) return;\n parent.children.push(node);\n parent.isLeaf = false;\n } else {\n tree.push(node);\n }\n });\n\n return tree;\n}\n\nfunction createListFromTree<T extends BaseNode>(tree: TreeNode<T>[], list: T[] = []): T[] {\n tree.forEach(node => {\n list.push({ ...node.entity, parentId: node.parentId });\n if (node.children) createListFromTree(node.children, list);\n });\n\n return list;\n}\n\nfunction createMapFromList<T extends BaseNode>(\n list: T[],\n map = new Map<string, TreeNode<T>>(),\n): Map<string, TreeNode<T>> {\n list.forEach(row => map.set(row.id, new TreeNode(row)));\n\n return map;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;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AI,QAAQ,EAAE;YACZ,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM;gBAAE,OAAO;YACpB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;SACvB;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACjB;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,kBAAkB,CAAqB,IAAmB,EAAE,OAAY,EAAE;IACjF,IAAI,CAAC,OAAO,CAAC,IAAI;QACf,IAAI,CAAC,IAAI,iCAAM,IAAI,CAAC,MAAM,KAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAG,CAAC;QACvD,IAAI,IAAI,CAAC,QAAQ;YAAE,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;KAC5D,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,iBAAiB,CACxB,IAAS,EACT,MAAM,IAAI,GAAG,EAAuB;IAEpC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAExD,OAAO,GAAG,CAAC;AACb;;AC/GA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"abp-ng.components-tree.js","sources":["../../../../packages/components/tree/src/lib/templates/tree-node-template.directive.ts","../../../../packages/components/tree/src/lib/templates/expanded-icon-template.directive.ts","../../../../packages/components/tree/src/lib/components/tree.component.ts","../../../../packages/components/tree/src/lib/components/tree.component.html","../../../../packages/components/tree/src/lib/tree.module.ts","../../../../packages/components/tree/src/lib/utils/nz-tree-adapter.ts","../../../../packages/components/tree/src/abp-ng.components-tree.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[abpTreeNodeTemplate],[abp-tree-node-template]',\n})\nexport class TreeNodeTemplateDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]',\n})\nexport class ExpandedIconTemplateDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import {\n Component,\n ContentChild,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NzFormatEmitEvent, NzFormatBeforeDropEvent } from 'ng-zorro-antd/tree';\nimport { of } from 'rxjs';\nimport { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive';\nimport { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive';\nimport { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';\n\nexport type DropEvent = NzFormatEmitEvent & { pos: number };\n\n@Component({\n selector: 'abp-tree',\n templateUrl: 'tree.component.html',\n styleUrls: [\n '../../../../../../node_modules/ng-zorro-antd/tree/style/index.min.css',\n 'tree.component.scss',\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TreeComponent {\n dropPosition: number;\n\n dropdowns = {} as { [key: string]: NgbDropdown };\n\n @ContentChild('menu') menu: TemplateRef<any>;\n @ContentChild(TreeNodeTemplateDirective) customNodeTemplate: TreeNodeTemplateDirective;\n @ContentChild(ExpandedIconTemplateDirective) expandedIconTemplate: ExpandedIconTemplateDirective;\n @Output() readonly checkedKeysChange = new EventEmitter();\n @Output() readonly expandedKeysChange = new EventEmitter<string[]>();\n @Output() readonly selectedNodeChange = new EventEmitter();\n @Output() readonly dropOver = new EventEmitter<DropEvent>();\n @Input() noAnimation = true;\n @Input() draggable: boolean;\n @Input() checkable: boolean;\n @Input() checkStrictly: boolean;\n @Input() checkedKeys = [];\n @Input() nodes = [];\n @Input() expandedKeys: string[] = [];\n @Input() selectedNode: any;\n @Input() isNodeSelected = node => this.selectedNode?.id === node.key;\n @Input() beforeDrop = (event: NzFormatBeforeDropEvent) => {\n this.dropPosition = event.pos;\n return of(false);\n };\n\n onSelectedNodeChange(node) {\n this.selectedNode = node.origin.entity;\n this.selectedNodeChange.emit(node.origin.entity);\n }\n\n onCheckboxChange(event) {\n this.checkedKeys = [...event.keys];\n this.checkedKeysChange.emit(event.keys);\n }\n\n onExpandedKeysChange(event) {\n this.expandedKeys = [...event.keys];\n this.expandedKeysChange.emit(event.keys);\n }\n\n onDrop(event: DropEvent) {\n event.event.stopPropagation();\n event.event.preventDefault();\n event.pos = this.dropPosition;\n\n this.dropOver.emit(event);\n }\n\n initDropdown(key: string, dropdown: NgbDropdown) {\n this.dropdowns[key] = dropdown;\n }\n}\n","<nz-tree\n [nzBeforeDrop]=\"beforeDrop\"\n [nzDraggable]=\"draggable\"\n [nzCheckStrictly]=\"checkStrictly\"\n [nzCheckable]=\"checkable\"\n [nzCheckedKeys]=\"checkedKeys\"\n [nzData]=\"nodes\"\n [nzTreeTemplate]=\"treeTemplate\"\n [nzExpandedKeys]=\"expandedKeys\"\n [nzExpandedIcon]=\"expandedIconTemplate?.template || defaultIconTemplate\"\n (nzExpandChange)=\"onExpandedKeysChange($event)\"\n (nzCheckBoxChange)=\"onCheckboxChange($event)\"\n (nzOnDrop)=\"onDrop($event)\"\n [nzNoAnimation]=\"noAnimation\"\n (nzContextMenu)=\"dropdowns[$event.node?.key]?.toggle()\"\n></nz-tree>\n<ng-template #treeTemplate let-node>\n <div\n class=\"node-wrapper\"\n [class.selected]=\"isNodeSelected(node)\"\n [title]=\"node.title\"\n (click)=\"onSelectedNodeChange(node)\"\n >\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context: { $implicit: node }\"></ng-container>\n\n <ng-template #nodeTemplate let-node>\n <div class=\"d-inline-block\">\n <ng-container\n *ngTemplateOutlet=\"\n customNodeTemplate ? customNodeTemplate?.template : defaultNodeTemplate;\n context: { $implicit: node }\n \"\n ></ng-container>\n </div>\n\n <div\n #dropdown=\"ngbDropdown\"\n *ngIf=\"menu\"\n class=\"d-inline-block ml-1\"\n ngbDropdown\n placement=\"bottom\"\n container=\"body\"\n (abpInit)=\"initDropdown(node.key, dropdown)\"\n >\n <i\n class=\"fas fa-caret-down text-muted\"\n ngbDropdownToggle\n [class.dropdown-toggle]=\"false\"\n ></i>\n <div ngbDropdownMenu>\n <ng-template *ngTemplateOutlet=\"menu; context: { $implicit: node }\"></ng-template>\n </div>\n </div>\n </ng-template>\n\n <ng-template #defaultNodeTemplate let-node>\n <span>{{ node.title }}</span>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #defaultIconTemplate let-node let-origin=\"origin\">\n <i style=\"line-height: 28px\" aria-hidden=\"true\">\n <ng-container *ngTemplateOutlet=\"node.isExpanded ? minusIcon : plusIcon\"></ng-container\n ></i>\n</ng-template>\n\n<ng-template #minusIcon>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm-6.5 10h13v1h-13v-1z\"\n />\n </svg>\n</ng-template>\n\n<ng-template #plusIcon>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm.5 10h6v1h-6v6h-1v-6h-6v-1h6v-6h1v6z\"\n />\n </svg>\n</ng-template>\n","import { CoreModule } from '@abp/ng.core';\nimport { NgModule } from '@angular/core';\nimport { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';\nimport { NzTreeModule } from 'ng-zorro-antd/tree';\nimport { TreeComponent } from './components/tree.component';\nimport { ExpandedIconTemplateDirective } from './templates/expanded-icon-template.directive';\nimport { TreeNodeTemplateDirective } from './templates/tree-node-template.directive';\n\nconst templates = [TreeNodeTemplateDirective, ExpandedIconTemplateDirective];\n\nconst exported = [...templates, TreeComponent];\n\n@NgModule({\n imports: [CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule],\n exports: [...exported],\n declarations: [...exported],\n})\nexport class TreeModule {}\n","export abstract class BaseNode {\n name?: string;\n displayName?: string;\n\n constructor(public id: string, public parentId: string | null) {}\n}\n\nclass TreeNode<T extends BaseNode> extends BaseNode {\n title: string | undefined;\n key: string;\n icon: string | null = null;\n children: TreeNode<T>[] = [];\n isLeaf = true;\n checked = false;\n selected = false;\n expanded = false;\n selectable = true;\n disabled = false;\n disableCheckbox = false;\n parentNode?: TreeNode<T> | null;\n\n constructor(public entity: T, private nameResolver = ent => ent.displayName || ent.name) {\n super(entity.id, entity.parentId);\n this.key = entity.id;\n this.title = nameResolver(entity);\n }\n}\n\nexport class TreeAdapter<T extends BaseNode = BaseNode> {\n private tree: TreeNode<T>[];\n\n constructor(private list: T[] = []) {\n this.tree = createTreeFromList(this.list);\n }\n\n getList() {\n return this.list;\n }\n\n getTree() {\n return this.tree;\n }\n\n handleDrop({ key, parentNode }: TreeNode<T>) {\n const index = this.list.findIndex(({ id }) => id === key);\n this.list[index].parentId = parentNode ? parentNode.key : null;\n this.tree = createTreeFromList(this.list);\n }\n\n handleRemove({ key }: TreeNode<T>) {\n this.updateTreeFromList(this.list.filter(item => item.id !== key));\n }\n\n handleUpdate({ key, children }: { key: string; children: T[] }) {\n /**\n * When we need to update a node with new children, first we need to remove any descendant nodes.\n * If we remove immediate children and create a new tree, any other descendant nodes will be removed\n * and we won't need to recursively remove sub children.\n * Then, you simply add back the new children and create a new tree.\n */\n const listWithDescendantNodesRemoved = this.updateTreeFromList(\n this.list.filter(item => item.parentId !== key),\n );\n this.updateTreeFromList(listWithDescendantNodesRemoved.concat(children));\n }\n\n updateTreeFromList(list: T[]) {\n this.tree = createTreeFromList(list);\n this.list = createListFromTree(this.tree);\n return this.list;\n }\n}\n\n// UTILITY FUNCTIONS\n\nfunction createTreeFromList<T extends BaseNode>(list: T[]): TreeNode<T>[] {\n const map = createMapFromList(list);\n const tree: TreeNode<T>[] = [];\n\n list.forEach(row => {\n const parentId = row.parentId;\n const node = map.get(row.id);\n if (parentId) {\n const parent = map.get(parentId);\n if (!parent) return;\n parent.children.push(node);\n parent.isLeaf = false;\n } else {\n tree.push(node);\n }\n });\n\n return tree;\n}\n\nfunction createListFromTree<T extends BaseNode>(tree: TreeNode<T>[], list: T[] = []): T[] {\n tree.forEach(node => {\n list.push({ ...node.entity, parentId: node.parentId });\n if (node.children) createListFromTree(node.children, list);\n });\n\n return list;\n}\n\nfunction createMapFromList<T extends BaseNode>(\n list: T[],\n map = new Map<string, TreeNode<T>>(),\n): Map<string, TreeNode<T>> {\n list.forEach(row => map.set(row.id, new TreeNode(row)));\n\n return map;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAKa,yBAAyB;IACpC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAI;;sHADtC,yBAAyB;0GAAzB,yBAAyB;2FAAzB,yBAAyB;kBAHrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,gDAAgD;iBAC3D;;;MCCY,6BAA6B;IACxC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ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AG,EAAuB;IAEpC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAExD,OAAO,GAAG,CAAC;AACb;;AC/GA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.components.js","sources":["
|
|
1
|
+
{"version":3,"file":"abp-ng.components.js","sources":["../../../../packages/components/src/public-api.ts","../../../../packages/components/src/abp-ng.components.ts"],"sourcesContent":["/*\n * Public API Surface of components\n */\n\nexport {};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;ACAA;;"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abp/ng.components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.1",
|
|
4
4
|
"homepage": "https://abp.io",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/abpframework/abp.git"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@abp/ng.core": ">=4.4.
|
|
11
|
-
"@abp/ng.theme.shared": ">=4.4.
|
|
10
|
+
"@abp/ng.core": ">=4.4.3",
|
|
11
|
+
"@abp/ng.theme.shared": ">=4.4.3",
|
|
12
12
|
"@ng-bootstrap/ng-bootstrap": ">=6.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"
|
|
15
|
+
"chart.js": "^3.5.1",
|
|
16
|
+
"ng-zorro-antd": "^12.0.1",
|
|
16
17
|
"tslib": "^2.0.0"
|
|
17
18
|
},
|
|
18
19
|
"publishConfig": {
|
|
@@ -24,6 +25,5 @@
|
|
|
24
25
|
"esm2015": "esm2015/abp-ng.components.js",
|
|
25
26
|
"fesm2015": "fesm2015/abp-ng.components.js",
|
|
26
27
|
"typings": "abp-ng.components.d.ts",
|
|
27
|
-
"metadata": "abp-ng.components.metadata.json",
|
|
28
28
|
"sideEffects": false
|
|
29
29
|
}
|
package/page/package.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"esm2015": "../esm2015/page/abp-ng.components-page.js",
|
|
6
6
|
"fesm2015": "../fesm2015/abp-ng.components-page.js",
|
|
7
7
|
"typings": "abp-ng.components-page.d.ts",
|
|
8
|
-
"metadata": "abp-ng.components-page.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@abp/ng.components/page"
|
|
11
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TemplateRef, ViewContainerRef, InjectionToken, OnInit, OnDestroy, Injector, OnChanges, SimpleChanges, SimpleChange } from '@angular/core';
|
|
2
2
|
import { Observable, Subscription } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export interface PageRenderStrategy {
|
|
4
5
|
shouldRender(type?: string): boolean | Observable<boolean>;
|
|
5
6
|
onInit?(type?: string, injector?: Injector, context?: any): void;
|
|
@@ -25,4 +26,6 @@ export declare class PagePartDirective implements OnInit, OnDestroy, OnChanges {
|
|
|
25
26
|
shouldRender(type: string): Observable<boolean>;
|
|
26
27
|
protected createRenderStream(type: string): void;
|
|
27
28
|
protected clearSubscription(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PagePartDirective, [null, null, { optional: true; }, null]>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PagePartDirective, "[abpPagePart]", never, { "context": "abpPagePartContext"; "abpPagePart": "abpPagePart"; }, {}, never>;
|
|
28
31
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
export declare enum PageParts {
|
|
2
3
|
title = "PageTitleContainerComponent",
|
|
3
4
|
breadcrumb = "PageBreadcrumbContainerComponent",
|
|
4
5
|
toolbar = "PageToolbarContainerComponent"
|
|
5
6
|
}
|
|
6
7
|
export declare class PageTitleContainerComponent {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageTitleContainerComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageTitleContainerComponent, "abp-page-title-container", never, {}, {}, never, ["*"]>;
|
|
7
10
|
}
|
|
8
11
|
export declare class PageBreadcrumbContainerComponent {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageBreadcrumbContainerComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageBreadcrumbContainerComponent, "abp-page-breadcrumb-container", never, {}, {}, never, ["*"]>;
|
|
9
14
|
}
|
|
10
15
|
export declare class PageToolbarContainerComponent {
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageToolbarContainerComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageToolbarContainerComponent, "abp-page-toolbar-container", never, {}, {}, never, ["*"]>;
|
|
11
18
|
}
|
package/page/page.component.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PageTitleContainerComponent, PageBreadcrumbContainerComponent, PageToolbarContainerComponent, PageParts } from './page-parts.component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class PageComponent {
|
|
3
4
|
title: string;
|
|
4
5
|
toolbarVisible: boolean;
|
|
@@ -15,4 +16,6 @@ export declare class PageComponent {
|
|
|
15
16
|
customBreadcrumb: PageBreadcrumbContainerComponent;
|
|
16
17
|
customToolbar: PageToolbarContainerComponent;
|
|
17
18
|
get shouldRenderRow(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageComponent, "abp-page", never, { "title": "title"; "toolbarData": "toolbar"; "breadcrumbVisible": "breadcrumb"; }, {}, ["customTitle", "customBreadcrumb", "customToolbar"], ["abp-page-title-container", "abp-page-breadcrumb-container", "abp-page-toolbar-container", "*"]>;
|
|
18
21
|
}
|
package/page/page.module.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./page.component";
|
|
3
|
+
import * as i2 from "./page-parts.component";
|
|
4
|
+
import * as i3 from "./page-part.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@abp/ng.theme.shared/extensions";
|
|
7
|
+
import * as i6 from "@abp/ng.core";
|
|
8
|
+
import * as i7 from "@abp/ng.theme.shared";
|
|
1
9
|
export declare class PageModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PageModule, [typeof i1.PageComponent, typeof i2.PageTitleContainerComponent, typeof i2.PageBreadcrumbContainerComponent, typeof i2.PageToolbarContainerComponent, typeof i3.PagePartDirective], [typeof i4.CommonModule, typeof i5.UiExtensionsModule, typeof i6.CoreModule, typeof i7.ThemeSharedModule], [typeof i1.PageComponent, typeof i2.PageTitleContainerComponent, typeof i2.PageBreadcrumbContainerComponent, typeof i2.PageToolbarContainerComponent, typeof i3.PagePartDirective, typeof i5.UiExtensionsModule]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PageModule>;
|
|
2
13
|
}
|
|
@@ -3,6 +3,7 @@ import { NzFormatEmitEvent, NzFormatBeforeDropEvent } from 'ng-zorro-antd/tree';
|
|
|
3
3
|
import { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive';
|
|
4
4
|
import { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive';
|
|
5
5
|
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export declare type DropEvent = NzFormatEmitEvent & {
|
|
7
8
|
pos: number;
|
|
8
9
|
};
|
|
@@ -33,4 +34,6 @@ export declare class TreeComponent {
|
|
|
33
34
|
onExpandedKeysChange(event: any): void;
|
|
34
35
|
onDrop(event: DropEvent): void;
|
|
35
36
|
initDropdown(key: string, dropdown: NgbDropdown): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "abp-tree", never, { "noAnimation": "noAnimation"; "draggable": "draggable"; "checkable": "checkable"; "checkStrictly": "checkStrictly"; "checkedKeys": "checkedKeys"; "nodes": "nodes"; "expandedKeys": "expandedKeys"; "selectedNode": "selectedNode"; "isNodeSelected": "isNodeSelected"; "beforeDrop": "beforeDrop"; }, { "checkedKeysChange": "checkedKeysChange"; "expandedKeysChange": "expandedKeysChange"; "selectedNodeChange": "selectedNodeChange"; "dropOver": "dropOver"; }, ["menu", "customNodeTemplate", "expandedIconTemplate"], never>;
|
|
36
39
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class ExpandedIconTemplateDirective {
|
|
3
4
|
template: TemplateRef<any>;
|
|
4
5
|
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpandedIconTemplateDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ExpandedIconTemplateDirective, "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]", never, {}, {}, never>;
|
|
5
8
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class TreeNodeTemplateDirective {
|
|
3
4
|
template: TemplateRef<any>;
|
|
4
5
|
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeNodeTemplateDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeNodeTemplateDirective, "[abpTreeNodeTemplate],[abp-tree-node-template]", never, {}, {}, never>;
|
|
5
8
|
}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./templates/tree-node-template.directive";
|
|
3
|
+
import * as i2 from "./templates/expanded-icon-template.directive";
|
|
4
|
+
import * as i3 from "./components/tree.component";
|
|
5
|
+
import * as i4 from "@abp/ng.core";
|
|
6
|
+
import * as i5 from "ng-zorro-antd/tree";
|
|
7
|
+
import * as i6 from "@ng-bootstrap/ng-bootstrap";
|
|
8
|
+
import * as i7 from "ng-zorro-antd/core/no-animation";
|
|
1
9
|
export declare class TreeModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TreeModule, [typeof i1.TreeNodeTemplateDirective, typeof i2.ExpandedIconTemplateDirective, typeof i3.TreeComponent], [typeof i4.CoreModule, typeof i5.NzTreeModule, typeof i6.NgbDropdownModule, typeof i7.NzNoAnimationModule], [typeof i1.TreeNodeTemplateDirective, typeof i2.ExpandedIconTemplateDirective, typeof i3.TreeComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TreeModule>;
|
|
2
13
|
}
|
package/tree/package.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"esm2015": "../esm2015/tree/abp-ng.components-tree.js",
|
|
6
6
|
"fesm2015": "../fesm2015/abp-ng.components-tree.js",
|
|
7
7
|
"typings": "abp-ng.components-tree.d.ts",
|
|
8
|
-
"metadata": "abp-ng.components-tree.metadata.json",
|
|
9
8
|
"sideEffects": false,
|
|
10
9
|
"name": "@abp/ng.components/tree"
|
|
11
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"exports":[{"from":"./public-api"}],"metadata":{},"origins":{},"importAs":"@abp/ng.components"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@abp/ng.theme.shared/extensions"),require("@abp/ng.theme.shared"),require("@abp/ng.core"),require("rxjs")):"function"==typeof define&&define.amd?define("@abp/ng.components/page",["exports","@angular/core","@angular/common","@abp/ng.theme.shared/extensions","@abp/ng.theme.shared","@abp/ng.core","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).abp=e.abp||{},e.abp.ng=e.abp.ng||{},e.abp.ng.components=e.abp.ng.components||{},e.abp.ng.components.page={}),e.ng.core,e.ng.common,e.extensions,e.ng_theme_shared,e.ng_core,e.rxjs)}(this,(function(e,t,n,o,r,a,i){"use strict";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}var l;Object.create;e.PageParts=void 0,(l=e.PageParts||(e.PageParts={})).title="PageTitleContainerComponent",l.breadcrumb="PageBreadcrumbContainerComponent",l.toolbar="PageToolbarContainerComponent";var p=function(){};p.decorators=[{type:t.Component,args:[{selector:"abp-page-title-container",template:"\n <ng-content></ng-content>\n ",encapsulation:t.ViewEncapsulation.None}]}];var g=function(){};g.decorators=[{type:t.Component,args:[{selector:"abp-page-breadcrumb-container",template:"\n <ng-content></ng-content>\n ",encapsulation:t.ViewEncapsulation.None}]}];var u=function(){};u.decorators=[{type:t.Component,args:[{selector:"abp-page-toolbar-container",template:"\n <ng-content></ng-content>\n ",encapsulation:t.ViewEncapsulation.None}]}];var b=function(){function t(){this.toolbarVisible=!1,this.breadcrumbVisible=!0,this.pageParts={title:e.PageParts.title,breadcrumb:e.PageParts.breadcrumb,toolbar:e.PageParts.toolbar}}return Object.defineProperty(t.prototype,"toolbarData",{get:function(){return this._toolbarData},set:function(e){this._toolbarData=e,this.toolbarVisible=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldRenderRow",{get:function(){return!!(this.title||this.toolbarVisible||this.breadcrumbVisible||this.customTitle||this.customBreadcrumb||this.customToolbar)},enumerable:!1,configurable:!0}),t}();b.decorators=[{type:t.Component,args:[{selector:"abp-page",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 pl-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',encapsulation:t.ViewEncapsulation.None}]}],b.propDecorators={title:[{type:t.Input}],toolbarData:[{type:t.Input,args:["toolbar"]}],breadcrumbVisible:[{type:t.Input,args:["breadcrumb"]}],customTitle:[{type:t.ContentChild,args:[p]}],customBreadcrumb:[{type:t.ContentChild,args:[g]}],customToolbar:[{type:t.ContentChild,args:[u]}]};var d=new t.InjectionToken("PAGE_RENDER_STRATEGY"),m=function(){function e(e,t,n,o){var r=this;this.templateRef=e,this.viewContainer=t,this.renderLogic=n,this.injector=o,this.hasRendered=!1,this.render=function(e){e&&!r.hasRendered?(r.viewContainer.createEmbeddedView(r.templateRef),r.hasRendered=!0):!e&&r.hasRendered&&(r.viewContainer.clear(),r.hasRendered=!1)}}return Object.defineProperty(e.prototype,"abpPagePart",{set:function(e){this.type=e,this.createRenderStream(e)},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){var t,n=e.context;(null===(t=this.renderLogic)||void 0===t?void 0:t.onContextUpdate)&&this.renderLogic.onContextUpdate(n)},e.prototype.ngOnInit=function(){var e;(null===(e=this.renderLogic)||void 0===e?void 0:e.onInit)&&this.renderLogic.onInit(this.type,this.injector,this.context)},e.prototype.ngOnDestroy=function(){var e;this.clearSubscription(),(null===(e=this.renderLogic)||void 0===e?void 0:e.onDestroy)&&this.renderLogic.onDestroy(this.type,this.injector,this.context)},e.prototype.shouldRender=function(e){if(this.renderLogic){var t=this.renderLogic.shouldRender(e);return t instanceof i.Observable?t:i.of(t)}return i.of(!0)},e.prototype.createRenderStream=function(e){this.clearSubscription(),this.subscription=this.shouldRender(e).subscribe(this.render)},e.prototype.clearSubscription=function(){this.subscription&&this.subscription.unsubscribe()},e}();m.decorators=[{type:t.Directive,args:[{selector:"[abpPagePart]"}]}],m.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[d]}]},{type:t.Injector}]},m.propDecorators={context:[{type:t.Input,args:["abpPagePartContext"]}],abpPagePart:[{type:t.Input}]};var h=[b,p,g,u,m],f=function(){};f.decorators=[{type:t.NgModule,args:[{declarations:s(h),imports:[n.CommonModule,o.UiExtensionsModule,a.CoreModule,r.ThemeSharedModule],exports:s(h)}]}],e.PAGE_RENDER_STRATEGY=d,e.PageBreadcrumbContainerComponent=g,e.PageComponent=b,e.PageModule=f,e.PagePartDirective=m,e.PageTitleContainerComponent=p,e.PageToolbarContainerComponent=u,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
|
-
//# sourceMappingURL=abp-ng.components-page.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../packages/components/page/src/page-parts.component.ts","../../../packages/components/page/src/page.component.ts","../../../packages/components/page/src/page-part.directive.ts","../../../packages/components/page/src/page.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","PageParts","Component","args","selector","template","encapsulation","ViewEncapsulation","None","PageComponent","this","toolbarVisible","breadcrumbVisible","pageParts","title","breadcrumb","toolbar","defineProperty","prototype","_toolbarData","val","customTitle","customBreadcrumb","customToolbar","Input","ContentChild","PageTitleContainerComponent","PageBreadcrumbContainerComponent","PageToolbarContainerComponent","PAGE_RENDER_STRATEGY","InjectionToken","PagePartDirective","templateRef","viewContainer","renderLogic","injector","_this","hasRendered","render","shouldRender","createEmbeddedView","clear","type","createRenderStream","ngOnChanges","_b","context","_a","onContextUpdate","ngOnInit","onInit","ngOnDestroy","clearSubscription","onDestroy","willRender","Observable","of","subscription","subscribe","unsubscribe","Directive","TemplateRef","ViewContainerRef","Optional","Inject","Injector","exportedDeclarations","NgModule","declarations","imports","CommonModule","UiExtensionsModule","CoreModule","ThemeSharedModule","exports"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,WAIKM,IACZ,IAAK,IAAIN,EAAK,GAAIF,EAAI,EAAGA,EAAIS,UAAUC,OAAQV,IAC3CE,EAAKA,EAAGS,OAAOnB,EAAOiB,UAAUT,KACpC,OAAOE,EAyDX,IC/MYU,ED+MatB,OAAOC,OC/MpBqB,EAAAA,eAAAA,GAAAA,EAAAA,EAAAA,YAAAA,EAAAA,UAAS,KACnB,MAAA,8BACAA,EAAA,WAAA,mCACAA,EAAA,QAAA,sCAUF,iCAPCC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,2BACVC,SAAU,sCAGVC,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AA,iDAgDGC,EAAAA,UAAQ,CAAArB,KAAIsB,EAAAA,OAAM7D,KAAA,CAAC0B,YAzCtBoC,EAAAA,6CAsBCzC,EAAAA,MAAKrB,KAAA,CAAC,2CACNqB,EAAAA,SCpBH,IAAM0C,EAAuB,CAC3BzD,EACAiB,EACAC,EACAC,EACAG,KAQF,iCALCoC,EAAAA,SAAQhE,KAAA,CAAC,CACRiE,aAAYvE,EAAMqE,GAClBG,QAAS,CAACC,EAAAA,aAAcC,EAAAA,mBAAoBC,EAAAA,WAAYC,EAAAA,mBACxDC,QAAO7E,EAAMqE","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\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: `\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageTitleContainerComponent {}\n\n@Component({\n selector: 'abp-page-breadcrumb-container',\n template: `\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PageBreadcrumbContainerComponent {}\n\n@Component({\n selector: 'abp-page-toolbar-container',\n template: `\n <ng-content></ng-content>\n `,\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","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 { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UiExtensionsModule } from '@abp/ng.theme.shared/extensions';\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\nimport { CoreModule } from '@abp/ng.core';\nimport { PageComponent } from './page.component';\nimport {\n PageTitleContainerComponent,\n PageBreadcrumbContainerComponent,\n PageToolbarContainerComponent,\n} from './page-parts.component';\nimport { PagePartDirective } from './page-part.directive';\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],\n})\nexport class PageModule {}\n"]}
|