@abp/ng.components 5.0.0-rc.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abp-ng.components.d.ts +5 -5
- package/bundles/abp-ng.components-chart.js.umd.js +141 -141
- package/bundles/abp-ng.components-page.umd.js +542 -542
- package/bundles/abp-ng.components-tree.umd.js +557 -557
- package/bundles/abp-ng.components.umd.js +2 -2
- package/chart.js/abp-ng.components-chart.js.d.ts +5 -5
- package/chart.js/chart.component.d.ts +30 -30
- package/chart.js/chart.module.d.ts +8 -8
- package/chart.js/public-api.d.ts +3 -3
- package/chart.js/widget-utils.d.ts +1 -1
- package/esm2015/abp-ng.components.js +4 -4
- package/esm2015/chart.js/abp-ng.components-chart.js.js +4 -4
- package/esm2015/chart.js/chart.component.js +114 -114
- package/esm2015/chart.js/chart.module.js +18 -18
- package/esm2015/chart.js/public-api.js +3 -3
- package/esm2015/chart.js/widget-utils.js +10 -10
- package/esm2015/page/abp-ng.components-page.js +4 -4
- package/esm2015/page/page-part.directive.js +78 -78
- package/esm2015/page/page-parts.component.js +44 -44
- package/esm2015/page/page.component.js +60 -60
- package/esm2015/page/page.module.js +37 -37
- package/esm2015/page/public-api.js +4 -4
- package/esm2015/public-api.js +4 -4
- package/esm2015/tree/abp-ng.components-tree.js +4 -4
- package/esm2015/tree/lib/components/tree.component.js +100 -100
- package/esm2015/tree/lib/templates/expanded-icon-template.directive.js +15 -15
- package/esm2015/tree/lib/templates/tree-node-template.directive.js +15 -15
- package/esm2015/tree/lib/tree.module.js +24 -24
- package/esm2015/tree/lib/utils/nz-tree-adapter.js +91 -91
- package/esm2015/tree/public-api.js +5 -5
- package/fesm2015/abp-ng.components-chart.js.js +135 -135
- package/fesm2015/abp-ng.components-page.js +196 -196
- package/fesm2015/abp-ng.components-tree.js +219 -219
- package/fesm2015/abp-ng.components.js +4 -4
- package/package.json +4 -4
- package/page/abp-ng.components-page.d.ts +5 -5
- package/page/page-part.directive.d.ts +31 -31
- package/page/page-parts.component.d.ts +18 -18
- package/page/page.component.d.ts +21 -21
- package/page/page.module.d.ts +13 -13
- package/page/public-api.d.ts +4 -4
- package/public-api.d.ts +1 -1
- package/tree/abp-ng.components-tree.d.ts +5 -5
- package/tree/lib/components/tree.component.d.ts +39 -39
- package/tree/lib/templates/expanded-icon-template.directive.d.ts +8 -8
- package/tree/lib/templates/tree-node-template.directive.d.ts +8 -8
- package/tree/lib/tree.module.d.ts +13 -13
- package/tree/lib/utils/nz-tree-adapter.d.ts +39 -39
- package/tree/public-api.d.ts +5 -5
package/abp-ng.components.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="@abp/ng.components" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@abp/ng.components" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -24,153 +24,153 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
|
|
27
|
-
var Chart;
|
|
28
|
-
var ChartComponent = /** @class */ (function () {
|
|
29
|
-
function ChartComponent(el, cdr) {
|
|
30
|
-
var _this = this;
|
|
31
|
-
this.el = el;
|
|
32
|
-
this.cdr = cdr;
|
|
33
|
-
this.data = {};
|
|
34
|
-
this.options = {};
|
|
35
|
-
this.plugins = [];
|
|
36
|
-
this.responsive = true;
|
|
37
|
-
this.dataSelect = new i0.EventEmitter();
|
|
38
|
-
this.initialized = new i0.EventEmitter();
|
|
39
|
-
this.initChart = function () {
|
|
40
|
-
var opts = _this.options || {};
|
|
41
|
-
opts.responsive = _this.responsive;
|
|
42
|
-
// allows chart to resize in responsive mode
|
|
43
|
-
if (opts.responsive && (_this.height || _this.width)) {
|
|
44
|
-
opts.maintainAspectRatio = false;
|
|
45
|
-
}
|
|
46
|
-
_this.chart = new Chart(_this.canvas.nativeElement, {
|
|
47
|
-
type: _this.type,
|
|
48
|
-
data: _this.data,
|
|
49
|
-
options: _this.options,
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
this.getCanvas = function () {
|
|
53
|
-
return _this.canvas.nativeElement;
|
|
54
|
-
};
|
|
55
|
-
this.getBase64Image = function () {
|
|
56
|
-
return _this.chart.toBase64Image();
|
|
57
|
-
};
|
|
58
|
-
this.generateLegend = function () {
|
|
59
|
-
if (_this.chart) {
|
|
60
|
-
return _this.chart.generateLegend();
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
this.refresh = function () {
|
|
64
|
-
if (_this.chart) {
|
|
65
|
-
_this.chart.update();
|
|
66
|
-
_this.cdr.detectChanges();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
this.reinit = function () {
|
|
70
|
-
if (!_this.chart)
|
|
71
|
-
return;
|
|
72
|
-
_this.chart.destroy();
|
|
73
|
-
_this.initChart();
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
ChartComponent.prototype.ngAfterViewInit = function () {
|
|
77
|
-
var _this = this;
|
|
78
|
-
import('chart.js/auto').then(function (module) {
|
|
79
|
-
Chart = module.default;
|
|
80
|
-
_this.initChart();
|
|
81
|
-
_this.initialized.emit(true);
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
ChartComponent.prototype.onCanvasClick = function (event) {
|
|
85
|
-
if (this.chart) {
|
|
86
|
-
var element = this.chart.getElementsAtEventForMode(event, 'nearest', { intersect: true }, false);
|
|
87
|
-
var dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);
|
|
88
|
-
if (element && element[0] && dataset) {
|
|
89
|
-
this.dataSelect.emit({ originalEvent: event, element: element[0], dataset: dataset });
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
ChartComponent.prototype.ngOnDestroy = function () {
|
|
94
|
-
if (this.chart) {
|
|
95
|
-
this.chart.destroy();
|
|
96
|
-
this.chart = null;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
ChartComponent.prototype.ngOnChanges = function (changes) {
|
|
100
|
-
var _a, _b;
|
|
101
|
-
if (!this.chart)
|
|
102
|
-
return;
|
|
103
|
-
if (((_a = changes.data) === null || _a === void 0 ? void 0 : _a.currentValue) || ((_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue)) {
|
|
104
|
-
this.chart.destroy();
|
|
105
|
-
this.initChart();
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
return ChartComponent;
|
|
109
|
-
}());
|
|
110
|
-
ChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
111
|
-
ChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ChartComponent, selector: "abp-chart", inputs: { type: "type", data: "data", options: "options", plugins: "plugins", width: "width", height: "height", responsive: "responsive" }, outputs: { dataSelect: "dataSelect", initialized: "initialized" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], exportAs: ["abpChart"], usesOnChanges: true, ngImport: i0__namespace, template: "\n <div\n style=\"position:relative\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\"\n >\n <canvas\n #canvas\n [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\"\n (click)=\"onCanvasClick($event)\"\n ></canvas>\n </div>\n ", isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
112
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartComponent, decorators: [{
|
|
113
|
-
type: i0.Component,
|
|
114
|
-
args: [{
|
|
115
|
-
selector: 'abp-chart',
|
|
116
|
-
template: "\n <div\n style=\"position:relative\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\"\n >\n <canvas\n #canvas\n [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\"\n (click)=\"onCanvasClick($event)\"\n ></canvas>\n </div>\n ",
|
|
117
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
118
|
-
exportAs: 'abpChart',
|
|
119
|
-
}]
|
|
120
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { type: [{
|
|
121
|
-
type: i0.Input
|
|
122
|
-
}], data: [{
|
|
123
|
-
type: i0.Input
|
|
124
|
-
}], options: [{
|
|
125
|
-
type: i0.Input
|
|
126
|
-
}], plugins: [{
|
|
127
|
-
type: i0.Input
|
|
128
|
-
}], width: [{
|
|
129
|
-
type: i0.Input
|
|
130
|
-
}], height: [{
|
|
131
|
-
type: i0.Input
|
|
132
|
-
}], responsive: [{
|
|
133
|
-
type: i0.Input
|
|
134
|
-
}], dataSelect: [{
|
|
135
|
-
type: i0.Output
|
|
136
|
-
}], initialized: [{
|
|
137
|
-
type: i0.Output
|
|
138
|
-
}], canvas: [{
|
|
139
|
-
type: i0.ViewChild,
|
|
140
|
-
args: ['canvas']
|
|
27
|
+
var Chart;
|
|
28
|
+
var ChartComponent = /** @class */ (function () {
|
|
29
|
+
function ChartComponent(el, cdr) {
|
|
30
|
+
var _this = this;
|
|
31
|
+
this.el = el;
|
|
32
|
+
this.cdr = cdr;
|
|
33
|
+
this.data = {};
|
|
34
|
+
this.options = {};
|
|
35
|
+
this.plugins = [];
|
|
36
|
+
this.responsive = true;
|
|
37
|
+
this.dataSelect = new i0.EventEmitter();
|
|
38
|
+
this.initialized = new i0.EventEmitter();
|
|
39
|
+
this.initChart = function () {
|
|
40
|
+
var opts = _this.options || {};
|
|
41
|
+
opts.responsive = _this.responsive;
|
|
42
|
+
// allows chart to resize in responsive mode
|
|
43
|
+
if (opts.responsive && (_this.height || _this.width)) {
|
|
44
|
+
opts.maintainAspectRatio = false;
|
|
45
|
+
}
|
|
46
|
+
_this.chart = new Chart(_this.canvas.nativeElement, {
|
|
47
|
+
type: _this.type,
|
|
48
|
+
data: _this.data,
|
|
49
|
+
options: _this.options,
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
this.getCanvas = function () {
|
|
53
|
+
return _this.canvas.nativeElement;
|
|
54
|
+
};
|
|
55
|
+
this.getBase64Image = function () {
|
|
56
|
+
return _this.chart.toBase64Image();
|
|
57
|
+
};
|
|
58
|
+
this.generateLegend = function () {
|
|
59
|
+
if (_this.chart) {
|
|
60
|
+
return _this.chart.generateLegend();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
this.refresh = function () {
|
|
64
|
+
if (_this.chart) {
|
|
65
|
+
_this.chart.update();
|
|
66
|
+
_this.cdr.detectChanges();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
this.reinit = function () {
|
|
70
|
+
if (!_this.chart)
|
|
71
|
+
return;
|
|
72
|
+
_this.chart.destroy();
|
|
73
|
+
_this.initChart();
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
ChartComponent.prototype.ngAfterViewInit = function () {
|
|
77
|
+
var _this = this;
|
|
78
|
+
import('chart.js/auto').then(function (module) {
|
|
79
|
+
Chart = module.default;
|
|
80
|
+
_this.initChart();
|
|
81
|
+
_this.initialized.emit(true);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
ChartComponent.prototype.onCanvasClick = function (event) {
|
|
85
|
+
if (this.chart) {
|
|
86
|
+
var element = this.chart.getElementsAtEventForMode(event, 'nearest', { intersect: true }, false);
|
|
87
|
+
var dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);
|
|
88
|
+
if (element && element[0] && dataset) {
|
|
89
|
+
this.dataSelect.emit({ originalEvent: event, element: element[0], dataset: dataset });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
ChartComponent.prototype.ngOnDestroy = function () {
|
|
94
|
+
if (this.chart) {
|
|
95
|
+
this.chart.destroy();
|
|
96
|
+
this.chart = null;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
ChartComponent.prototype.ngOnChanges = function (changes) {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
if (!this.chart)
|
|
102
|
+
return;
|
|
103
|
+
if (((_a = changes.data) === null || _a === void 0 ? void 0 : _a.currentValue) || ((_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue)) {
|
|
104
|
+
this.chart.destroy();
|
|
105
|
+
this.initChart();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
return ChartComponent;
|
|
109
|
+
}());
|
|
110
|
+
ChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
111
|
+
ChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ChartComponent, selector: "abp-chart", inputs: { type: "type", data: "data", options: "options", plugins: "plugins", width: "width", height: "height", responsive: "responsive" }, outputs: { dataSelect: "dataSelect", initialized: "initialized" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], exportAs: ["abpChart"], usesOnChanges: true, ngImport: i0__namespace, template: "\n <div\n style=\"position:relative\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\"\n >\n <canvas\n #canvas\n [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\"\n (click)=\"onCanvasClick($event)\"\n ></canvas>\n </div>\n ", isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
112
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartComponent, decorators: [{
|
|
113
|
+
type: i0.Component,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: 'abp-chart',
|
|
116
|
+
template: "\n <div\n style=\"position:relative\"\n [style.width]=\"responsive && !width ? null : width\"\n [style.height]=\"responsive && !height ? null : height\"\n >\n <canvas\n #canvas\n [attr.width]=\"responsive && !width ? null : width\"\n [attr.height]=\"responsive && !height ? null : height\"\n (click)=\"onCanvasClick($event)\"\n ></canvas>\n </div>\n ",
|
|
117
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
118
|
+
exportAs: 'abpChart',
|
|
119
|
+
}]
|
|
120
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { type: [{
|
|
121
|
+
type: i0.Input
|
|
122
|
+
}], data: [{
|
|
123
|
+
type: i0.Input
|
|
124
|
+
}], options: [{
|
|
125
|
+
type: i0.Input
|
|
126
|
+
}], plugins: [{
|
|
127
|
+
type: i0.Input
|
|
128
|
+
}], width: [{
|
|
129
|
+
type: i0.Input
|
|
130
|
+
}], height: [{
|
|
131
|
+
type: i0.Input
|
|
132
|
+
}], responsive: [{
|
|
133
|
+
type: i0.Input
|
|
134
|
+
}], dataSelect: [{
|
|
135
|
+
type: i0.Output
|
|
136
|
+
}], initialized: [{
|
|
137
|
+
type: i0.Output
|
|
138
|
+
}], canvas: [{
|
|
139
|
+
type: i0.ViewChild,
|
|
140
|
+
args: ['canvas']
|
|
141
141
|
}] } });
|
|
142
142
|
|
|
143
|
-
var ChartModule = /** @class */ (function () {
|
|
144
|
-
function ChartModule() {
|
|
145
|
-
}
|
|
146
|
-
return ChartModule;
|
|
147
|
-
}());
|
|
148
|
-
ChartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
149
|
-
ChartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, declarations: [ChartComponent], imports: [common.CommonModule], exports: [ChartComponent] });
|
|
150
|
-
ChartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, providers: [], imports: [[common.CommonModule]] });
|
|
151
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, decorators: [{
|
|
152
|
-
type: i0.NgModule,
|
|
153
|
-
args: [{
|
|
154
|
-
imports: [common.CommonModule],
|
|
155
|
-
exports: [ChartComponent],
|
|
156
|
-
declarations: [ChartComponent],
|
|
157
|
-
providers: [],
|
|
158
|
-
}]
|
|
143
|
+
var ChartModule = /** @class */ (function () {
|
|
144
|
+
function ChartModule() {
|
|
145
|
+
}
|
|
146
|
+
return ChartModule;
|
|
147
|
+
}());
|
|
148
|
+
ChartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
149
|
+
ChartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, declarations: [ChartComponent], imports: [common.CommonModule], exports: [ChartComponent] });
|
|
150
|
+
ChartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, providers: [], imports: [[common.CommonModule]] });
|
|
151
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ChartModule, decorators: [{
|
|
152
|
+
type: i0.NgModule,
|
|
153
|
+
args: [{
|
|
154
|
+
imports: [common.CommonModule],
|
|
155
|
+
exports: [ChartComponent],
|
|
156
|
+
declarations: [ChartComponent],
|
|
157
|
+
providers: [],
|
|
158
|
+
}]
|
|
159
159
|
}] });
|
|
160
160
|
|
|
161
|
-
function getRandomBackgroundColor(count) {
|
|
162
|
-
var colors = [];
|
|
163
|
-
for (var i = 0; i < count; i++) {
|
|
164
|
-
var r = ((i + 5) * (i + 5) * 474) % 255;
|
|
165
|
-
var g = ((i + 5) * (i + 5) * 1600) % 255;
|
|
166
|
-
var b = ((i + 5) * (i + 5) * 84065) % 255;
|
|
167
|
-
colors.push('rgba(' + r + ', ' + g + ', ' + b + ', 0.7)');
|
|
168
|
-
}
|
|
169
|
-
return colors;
|
|
161
|
+
function getRandomBackgroundColor(count) {
|
|
162
|
+
var colors = [];
|
|
163
|
+
for (var i = 0; i < count; i++) {
|
|
164
|
+
var r = ((i + 5) * (i + 5) * 474) % 255;
|
|
165
|
+
var g = ((i + 5) * (i + 5) * 1600) % 255;
|
|
166
|
+
var b = ((i + 5) * (i + 5) * 84065) % 255;
|
|
167
|
+
colors.push('rgba(' + r + ', ' + g + ', ' + b + ', 0.7)');
|
|
168
|
+
}
|
|
169
|
+
return colors;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
/**
|
|
173
|
-
* Generated bundle index. Do not edit.
|
|
172
|
+
/**
|
|
173
|
+
* Generated bundle index. Do not edit.
|
|
174
174
|
*/
|
|
175
175
|
|
|
176
176
|
exports.ChartComponent = ChartComponent;
|