@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.
Files changed (49) hide show
  1. package/abp-ng.components.d.ts +5 -5
  2. package/bundles/abp-ng.components-chart.js.umd.js +141 -141
  3. package/bundles/abp-ng.components-page.umd.js +542 -542
  4. package/bundles/abp-ng.components-tree.umd.js +557 -557
  5. package/bundles/abp-ng.components.umd.js +2 -2
  6. package/chart.js/abp-ng.components-chart.js.d.ts +5 -5
  7. package/chart.js/chart.component.d.ts +30 -30
  8. package/chart.js/chart.module.d.ts +8 -8
  9. package/chart.js/public-api.d.ts +3 -3
  10. package/chart.js/widget-utils.d.ts +1 -1
  11. package/esm2015/abp-ng.components.js +4 -4
  12. package/esm2015/chart.js/abp-ng.components-chart.js.js +4 -4
  13. package/esm2015/chart.js/chart.component.js +114 -114
  14. package/esm2015/chart.js/chart.module.js +18 -18
  15. package/esm2015/chart.js/public-api.js +3 -3
  16. package/esm2015/chart.js/widget-utils.js +10 -10
  17. package/esm2015/page/abp-ng.components-page.js +4 -4
  18. package/esm2015/page/page-part.directive.js +78 -78
  19. package/esm2015/page/page-parts.component.js +44 -44
  20. package/esm2015/page/page.component.js +60 -60
  21. package/esm2015/page/page.module.js +37 -37
  22. package/esm2015/page/public-api.js +4 -4
  23. package/esm2015/public-api.js +4 -4
  24. package/esm2015/tree/abp-ng.components-tree.js +4 -4
  25. package/esm2015/tree/lib/components/tree.component.js +100 -100
  26. package/esm2015/tree/lib/templates/expanded-icon-template.directive.js +15 -15
  27. package/esm2015/tree/lib/templates/tree-node-template.directive.js +15 -15
  28. package/esm2015/tree/lib/tree.module.js +24 -24
  29. package/esm2015/tree/lib/utils/nz-tree-adapter.js +91 -91
  30. package/esm2015/tree/public-api.js +5 -5
  31. package/fesm2015/abp-ng.components-chart.js.js +135 -135
  32. package/fesm2015/abp-ng.components-page.js +196 -196
  33. package/fesm2015/abp-ng.components-tree.js +219 -219
  34. package/fesm2015/abp-ng.components.js +4 -4
  35. package/package.json +4 -4
  36. package/page/abp-ng.components-page.d.ts +5 -5
  37. package/page/page-part.directive.d.ts +31 -31
  38. package/page/page-parts.component.d.ts +18 -18
  39. package/page/page.component.d.ts +21 -21
  40. package/page/page.module.d.ts +13 -13
  41. package/page/public-api.d.ts +4 -4
  42. package/public-api.d.ts +1 -1
  43. package/tree/abp-ng.components-tree.d.ts +5 -5
  44. package/tree/lib/components/tree.component.d.ts +39 -39
  45. package/tree/lib/templates/expanded-icon-template.directive.d.ts +8 -8
  46. package/tree/lib/templates/tree-node-template.directive.d.ts +8 -8
  47. package/tree/lib/tree.module.d.ts +13 -13
  48. package/tree/lib/utils/nz-tree-adapter.d.ts +39 -39
  49. package/tree/public-api.d.ts +5 -5
@@ -1,6 +1,6 @@
1
- export * from './lib/tree.module';
2
- export * from './lib/components/tree.component';
3
- export * from './lib/utils/nz-tree-adapter';
4
- export * from './lib/templates/tree-node-template.directive';
5
- export * from './lib/templates/expanded-icon-template.directive';
1
+ export * from './lib/tree.module';
2
+ export * from './lib/components/tree.component';
3
+ export * from './lib/utils/nz-tree-adapter';
4
+ export * from './lib/templates/tree-node-template.directive';
5
+ export * from './lib/templates/expanded-icon-template.directive';
6
6
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBvbmVudHMvdHJlZS9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsaUNBQWlDLENBQUM7QUFDaEQsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLDhDQUE4QyxDQUFDO0FBQzdELGNBQWMsa0RBQWtELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi90cmVlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL3RyZWUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3V0aWxzL256LXRyZWUtYWRhcHRlcic7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90ZW1wbGF0ZXMvdHJlZS1ub2RlLXRlbXBsYXRlLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90ZW1wbGF0ZXMvZXhwYW5kZWQtaWNvbi10ZW1wbGF0ZS5kaXJlY3RpdmUnO1xuIl19
@@ -2,87 +2,87 @@ import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
 
5
- let Chart;
6
- class ChartComponent {
7
- constructor(el, cdr) {
8
- this.el = el;
9
- this.cdr = cdr;
10
- this.data = {};
11
- this.options = {};
12
- this.plugins = [];
13
- this.responsive = true;
14
- this.dataSelect = new EventEmitter();
15
- this.initialized = new EventEmitter();
16
- this.initChart = () => {
17
- const opts = this.options || {};
18
- opts.responsive = this.responsive;
19
- // allows chart to resize in responsive mode
20
- if (opts.responsive && (this.height || this.width)) {
21
- opts.maintainAspectRatio = false;
22
- }
23
- this.chart = new Chart(this.canvas.nativeElement, {
24
- type: this.type,
25
- data: this.data,
26
- options: this.options,
27
- });
28
- };
29
- this.getCanvas = () => {
30
- return this.canvas.nativeElement;
31
- };
32
- this.getBase64Image = () => {
33
- return this.chart.toBase64Image();
34
- };
35
- this.generateLegend = () => {
36
- if (this.chart) {
37
- return this.chart.generateLegend();
38
- }
39
- };
40
- this.refresh = () => {
41
- if (this.chart) {
42
- this.chart.update();
43
- this.cdr.detectChanges();
44
- }
45
- };
46
- this.reinit = () => {
47
- if (!this.chart)
48
- return;
49
- this.chart.destroy();
50
- this.initChart();
51
- };
52
- }
53
- ngAfterViewInit() {
54
- import('chart.js/auto').then(module => {
55
- Chart = module.default;
56
- this.initChart();
57
- this.initialized.emit(true);
58
- });
59
- }
60
- onCanvasClick(event) {
61
- if (this.chart) {
62
- const element = this.chart.getElementsAtEventForMode(event, 'nearest', { intersect: true }, false);
63
- const dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);
64
- if (element && element[0] && dataset) {
65
- this.dataSelect.emit({ originalEvent: event, element: element[0], dataset: dataset });
66
- }
67
- }
68
- }
69
- ngOnDestroy() {
70
- if (this.chart) {
71
- this.chart.destroy();
72
- this.chart = null;
73
- }
74
- }
75
- ngOnChanges(changes) {
76
- var _a, _b;
77
- if (!this.chart)
78
- return;
79
- if (((_a = changes.data) === null || _a === void 0 ? void 0 : _a.currentValue) || ((_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue)) {
80
- this.chart.destroy();
81
- this.initChart();
82
- }
83
- }
84
- }
85
- ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5
+ let Chart;
6
+ class ChartComponent {
7
+ constructor(el, cdr) {
8
+ this.el = el;
9
+ this.cdr = cdr;
10
+ this.data = {};
11
+ this.options = {};
12
+ this.plugins = [];
13
+ this.responsive = true;
14
+ this.dataSelect = new EventEmitter();
15
+ this.initialized = new EventEmitter();
16
+ this.initChart = () => {
17
+ const opts = this.options || {};
18
+ opts.responsive = this.responsive;
19
+ // allows chart to resize in responsive mode
20
+ if (opts.responsive && (this.height || this.width)) {
21
+ opts.maintainAspectRatio = false;
22
+ }
23
+ this.chart = new Chart(this.canvas.nativeElement, {
24
+ type: this.type,
25
+ data: this.data,
26
+ options: this.options,
27
+ });
28
+ };
29
+ this.getCanvas = () => {
30
+ return this.canvas.nativeElement;
31
+ };
32
+ this.getBase64Image = () => {
33
+ return this.chart.toBase64Image();
34
+ };
35
+ this.generateLegend = () => {
36
+ if (this.chart) {
37
+ return this.chart.generateLegend();
38
+ }
39
+ };
40
+ this.refresh = () => {
41
+ if (this.chart) {
42
+ this.chart.update();
43
+ this.cdr.detectChanges();
44
+ }
45
+ };
46
+ this.reinit = () => {
47
+ if (!this.chart)
48
+ return;
49
+ this.chart.destroy();
50
+ this.initChart();
51
+ };
52
+ }
53
+ ngAfterViewInit() {
54
+ import('chart.js/auto').then(module => {
55
+ Chart = module.default;
56
+ this.initChart();
57
+ this.initialized.emit(true);
58
+ });
59
+ }
60
+ onCanvasClick(event) {
61
+ if (this.chart) {
62
+ const element = this.chart.getElementsAtEventForMode(event, 'nearest', { intersect: true }, false);
63
+ const dataset = this.chart.getElementsAtEventForMode(event, 'dataset', { intersect: true }, false);
64
+ if (element && element[0] && dataset) {
65
+ this.dataSelect.emit({ originalEvent: event, element: element[0], dataset: dataset });
66
+ }
67
+ }
68
+ }
69
+ ngOnDestroy() {
70
+ if (this.chart) {
71
+ this.chart.destroy();
72
+ this.chart = null;
73
+ }
74
+ }
75
+ ngOnChanges(changes) {
76
+ var _a, _b;
77
+ if (!this.chart)
78
+ return;
79
+ if (((_a = changes.data) === null || _a === void 0 ? void 0 : _a.currentValue) || ((_b = changes.options) === null || _b === void 0 ? void 0 : _b.currentValue)) {
80
+ this.chart.destroy();
81
+ this.initChart();
82
+ }
83
+ }
84
+ }
85
+ ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
86
86
  ChartComponent.ɵcmp = i0.ɵɵ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, template: `
87
87
  <div
88
88
  style="position:relative"
@@ -96,11 +96,11 @@ ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
96
96
  (click)="onCanvasClick($event)"
97
97
  ></canvas>
98
98
  </div>
99
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartComponent, decorators: [{
101
- type: Component,
102
- args: [{
103
- selector: 'abp-chart',
99
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartComponent, decorators: [{
101
+ type: Component,
102
+ args: [{
103
+ selector: 'abp-chart',
104
104
  template: `
105
105
  <div
106
106
  style="position:relative"
@@ -114,61 +114,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
114
114
  (click)="onCanvasClick($event)"
115
115
  ></canvas>
116
116
  </div>
117
- `,
118
- changeDetection: ChangeDetectionStrategy.OnPush,
119
- exportAs: 'abpChart',
120
- }]
121
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { type: [{
122
- type: Input
123
- }], data: [{
124
- type: Input
125
- }], options: [{
126
- type: Input
127
- }], plugins: [{
128
- type: Input
129
- }], width: [{
130
- type: Input
131
- }], height: [{
132
- type: Input
133
- }], responsive: [{
134
- type: Input
135
- }], dataSelect: [{
136
- type: Output
137
- }], initialized: [{
138
- type: Output
139
- }], canvas: [{
140
- type: ViewChild,
141
- args: ['canvas']
117
+ `,
118
+ changeDetection: ChangeDetectionStrategy.OnPush,
119
+ exportAs: 'abpChart',
120
+ }]
121
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { type: [{
122
+ type: Input
123
+ }], data: [{
124
+ type: Input
125
+ }], options: [{
126
+ type: Input
127
+ }], plugins: [{
128
+ type: Input
129
+ }], width: [{
130
+ type: Input
131
+ }], height: [{
132
+ type: Input
133
+ }], responsive: [{
134
+ type: Input
135
+ }], dataSelect: [{
136
+ type: Output
137
+ }], initialized: [{
138
+ type: Output
139
+ }], canvas: [{
140
+ type: ViewChild,
141
+ args: ['canvas']
142
142
  }] } });
143
143
 
144
- class ChartModule {
145
- }
146
- ChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
147
- ChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, declarations: [ChartComponent], imports: [CommonModule], exports: [ChartComponent] });
148
- ChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, providers: [], imports: [[CommonModule]] });
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, decorators: [{
150
- type: NgModule,
151
- args: [{
152
- imports: [CommonModule],
153
- exports: [ChartComponent],
154
- declarations: [ChartComponent],
155
- providers: [],
156
- }]
144
+ class ChartModule {
145
+ }
146
+ ChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
147
+ ChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, declarations: [ChartComponent], imports: [CommonModule], exports: [ChartComponent] });
148
+ ChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, providers: [], imports: [[CommonModule]] });
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ChartModule, decorators: [{
150
+ type: NgModule,
151
+ args: [{
152
+ imports: [CommonModule],
153
+ exports: [ChartComponent],
154
+ declarations: [ChartComponent],
155
+ providers: [],
156
+ }]
157
157
  }] });
158
158
 
159
- function getRandomBackgroundColor(count) {
160
- const colors = [];
161
- for (let i = 0; i < count; i++) {
162
- const r = ((i + 5) * (i + 5) * 474) % 255;
163
- const g = ((i + 5) * (i + 5) * 1600) % 255;
164
- const b = ((i + 5) * (i + 5) * 84065) % 255;
165
- colors.push('rgba(' + r + ', ' + g + ', ' + b + ', 0.7)');
166
- }
167
- return colors;
159
+ function getRandomBackgroundColor(count) {
160
+ const colors = [];
161
+ for (let i = 0; i < count; i++) {
162
+ const r = ((i + 5) * (i + 5) * 474) % 255;
163
+ const g = ((i + 5) * (i + 5) * 1600) % 255;
164
+ const b = ((i + 5) * (i + 5) * 84065) % 255;
165
+ colors.push('rgba(' + r + ', ' + g + ', ' + b + ', 0.7)');
166
+ }
167
+ return colors;
168
168
  }
169
169
 
170
- /**
171
- * Generated bundle index. Do not edit.
170
+ /**
171
+ * Generated bundle index. Do not edit.
172
172
  */
173
173
 
174
174
  export { ChartComponent, ChartModule, getRandomBackgroundColor };