@delon/chart 13.0.0 → 13.1.0

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 (91) hide show
  1. package/core/g2.base.component.d.ts +3 -2
  2. package/esm2020/bar/bar.component.mjs +5 -4
  3. package/esm2020/bar/bar.module.mjs +4 -4
  4. package/esm2020/card/card.component.mjs +3 -3
  5. package/esm2020/card/card.module.mjs +4 -4
  6. package/esm2020/chart-echarts/echarts.component.mjs +3 -3
  7. package/esm2020/chart-echarts/echarts.module.mjs +4 -4
  8. package/esm2020/chart-echarts/echarts.service.mjs +3 -3
  9. package/esm2020/core/g2.base.component.mjs +8 -5
  10. package/esm2020/core/g2.servicce.mjs +3 -3
  11. package/esm2020/custom/custom.component.mjs +3 -3
  12. package/esm2020/custom/custom.module.mjs +4 -4
  13. package/esm2020/gauge/gauge.component.mjs +7 -6
  14. package/esm2020/gauge/gauge.module.mjs +4 -4
  15. package/esm2020/mini-area/mini-area.component.mjs +5 -4
  16. package/esm2020/mini-area/mini-area.module.mjs +4 -4
  17. package/esm2020/mini-bar/mini-bar.component.mjs +5 -4
  18. package/esm2020/mini-bar/mini-bar.module.mjs +4 -4
  19. package/esm2020/mini-progress/mini-progress.component.mjs +3 -3
  20. package/esm2020/mini-progress/mini-progress.module.mjs +4 -4
  21. package/esm2020/number-info/number-info.component.mjs +3 -3
  22. package/esm2020/number-info/number-info.module.mjs +4 -4
  23. package/esm2020/pie/pie.component.mjs +5 -4
  24. package/esm2020/pie/pie.module.mjs +4 -4
  25. package/esm2020/radar/radar.component.mjs +5 -4
  26. package/esm2020/radar/radar.module.mjs +4 -4
  27. package/esm2020/single-bar/single-bar.component.mjs +5 -4
  28. package/esm2020/single-bar/single-bar.module.mjs +4 -4
  29. package/esm2020/tag-cloud/tag-cloud.component.mjs +5 -4
  30. package/esm2020/tag-cloud/tag-cloud.module.mjs +4 -4
  31. package/esm2020/timeline/timeline.component.mjs +5 -4
  32. package/esm2020/timeline/timeline.module.mjs +4 -4
  33. package/esm2020/trend/trend.component.mjs +3 -3
  34. package/esm2020/trend/trend.module.mjs +4 -4
  35. package/esm2020/water-wave/water-wave.component.mjs +3 -3
  36. package/esm2020/water-wave/water-wave.module.mjs +4 -4
  37. package/fesm2015/bar.mjs +8 -7
  38. package/fesm2015/bar.mjs.map +1 -1
  39. package/fesm2015/card.mjs +7 -7
  40. package/fesm2015/chart-echarts.mjs +10 -10
  41. package/fesm2015/core.mjs +10 -7
  42. package/fesm2015/core.mjs.map +1 -1
  43. package/fesm2015/custom.mjs +7 -7
  44. package/fesm2015/gauge.mjs +10 -9
  45. package/fesm2015/gauge.mjs.map +1 -1
  46. package/fesm2015/mini-area.mjs +8 -7
  47. package/fesm2015/mini-area.mjs.map +1 -1
  48. package/fesm2015/mini-bar.mjs +8 -7
  49. package/fesm2015/mini-bar.mjs.map +1 -1
  50. package/fesm2015/mini-progress.mjs +7 -7
  51. package/fesm2015/number-info.mjs +7 -7
  52. package/fesm2015/pie.mjs +8 -7
  53. package/fesm2015/pie.mjs.map +1 -1
  54. package/fesm2015/radar.mjs +8 -7
  55. package/fesm2015/radar.mjs.map +1 -1
  56. package/fesm2015/single-bar.mjs +8 -7
  57. package/fesm2015/single-bar.mjs.map +1 -1
  58. package/fesm2015/tag-cloud.mjs +8 -7
  59. package/fesm2015/tag-cloud.mjs.map +1 -1
  60. package/fesm2015/timeline.mjs +8 -7
  61. package/fesm2015/timeline.mjs.map +1 -1
  62. package/fesm2015/trend.mjs +7 -7
  63. package/fesm2015/water-wave.mjs +7 -7
  64. package/fesm2020/bar.mjs +8 -7
  65. package/fesm2020/bar.mjs.map +1 -1
  66. package/fesm2020/card.mjs +7 -7
  67. package/fesm2020/chart-echarts.mjs +10 -10
  68. package/fesm2020/core.mjs +10 -7
  69. package/fesm2020/core.mjs.map +1 -1
  70. package/fesm2020/custom.mjs +7 -7
  71. package/fesm2020/gauge.mjs +10 -9
  72. package/fesm2020/gauge.mjs.map +1 -1
  73. package/fesm2020/mini-area.mjs +8 -7
  74. package/fesm2020/mini-area.mjs.map +1 -1
  75. package/fesm2020/mini-bar.mjs +8 -7
  76. package/fesm2020/mini-bar.mjs.map +1 -1
  77. package/fesm2020/mini-progress.mjs +7 -7
  78. package/fesm2020/number-info.mjs +7 -7
  79. package/fesm2020/pie.mjs +8 -7
  80. package/fesm2020/pie.mjs.map +1 -1
  81. package/fesm2020/radar.mjs +8 -7
  82. package/fesm2020/radar.mjs.map +1 -1
  83. package/fesm2020/single-bar.mjs +8 -7
  84. package/fesm2020/single-bar.mjs.map +1 -1
  85. package/fesm2020/tag-cloud.mjs +8 -7
  86. package/fesm2020/tag-cloud.mjs.map +1 -1
  87. package/fesm2020/timeline.mjs +8 -7
  88. package/fesm2020/timeline.mjs.map +1 -1
  89. package/fesm2020/trend.mjs +7 -7
  90. package/fesm2020/water-wave.mjs +7 -7
  91. package/package.json +3 -3
package/fesm2020/bar.mjs CHANGED
@@ -70,6 +70,7 @@ class G2BarComponent extends G2BaseComponent {
70
70
  chart.on(`interval:click`, (ev) => {
71
71
  this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));
72
72
  });
73
+ this.ready.next(chart);
73
74
  this.changeData();
74
75
  chart.render();
75
76
  this.installResizeEvent();
@@ -94,8 +95,8 @@ class G2BarComponent extends G2BaseComponent {
94
95
  .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));
95
96
  }
96
97
  }
97
- G2BarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
98
- G2BarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2BarComponent, selector: "g2-bar", inputs: { title: "title", color: "color", height: "height", padding: "padding", data: "data", autoLabel: "autoLabel", interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
98
+ G2BarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
99
+ G2BarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2BarComponent, selector: "g2-bar", inputs: { title: "title", color: "color", height: "height", padding: "padding", data: "data", autoLabel: "autoLabel", interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
99
100
  <ng-container *nzStringTemplateOutlet="title">
100
101
  <h4 style="margin-bottom: 20px;">{{ title }}</h4>
101
102
  </ng-container>
@@ -108,7 +109,7 @@ __decorate([
108
109
  __decorate([
109
110
  InputBoolean()
110
111
  ], G2BarComponent.prototype, "autoLabel", void 0);
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarComponent, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarComponent, decorators: [{
112
113
  type: Component,
113
114
  args: [{
114
115
  selector: 'g2-bar',
@@ -148,10 +149,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
148
149
  const COMPONENTS = [G2BarComponent];
149
150
  class G2BarModule {
150
151
  }
151
- G2BarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
152
- G2BarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, declarations: [G2BarComponent], imports: [CommonModule, NzOutletModule, NzSkeletonModule], exports: [G2BarComponent] });
153
- G2BarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, imports: [[CommonModule, NzOutletModule, NzSkeletonModule]] });
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BarModule, decorators: [{
152
+ G2BarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
153
+ G2BarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarModule, declarations: [G2BarComponent], imports: [CommonModule, NzOutletModule, NzSkeletonModule], exports: [G2BarComponent] });
154
+ G2BarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarModule, imports: [[CommonModule, NzOutletModule, NzSkeletonModule]] });
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BarModule, decorators: [{
155
156
  type: NgModule,
156
157
  args: [{
157
158
  imports: [CommonModule, NzOutletModule, NzSkeletonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"bar.mjs","sources":["../../../../packages/chart/bar/bar.component.ts","../../../../packages/chart/bar/bar.module.ts","../../../../packages/chart/bar/bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, G2InteractionType } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nconst TITLE_HEIGHT = 41;\n\nexport interface G2BarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2BarClickItem {\n item: G2BarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-bar',\n exportAs: 'g2Bar',\n template: `\n <ng-container *nzStringTemplateOutlet=\"title\">\n <h4 style=\"margin-bottom: 20px;\">{{ title }}</h4>\n </ng-container>\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container></div>\n `,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2BarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_autoLabel: BooleanInput;\n\n // #region fields\n\n @Input() title?: string | TemplateRef<void>;\n @Input() color = 'rgba(24, 144, 255, 0.85)';\n @Input() @InputNumber() height = 0;\n @Input() padding: number | number[] | 'auto' = 'auto';\n @Input() data: G2BarData[] = [];\n @Input() @InputBoolean() autoLabel = true;\n @Input() interaction: G2InteractionType = 'none';\n @Output() readonly clickItem = new EventEmitter<G2BarClickItem>();\n\n // #endregion\n\n private getHeight(): number {\n return this.title ? this.height - TITLE_HEIGHT : this.height;\n }\n\n install(): void {\n const { node, padding, interaction, theme } = this;\n\n const container = node.nativeElement as HTMLElement;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container,\n autoFit: true,\n height: this.getHeight(),\n padding,\n theme\n }));\n this.updatelabel();\n chart.axis('y', {\n title: null,\n line: null,\n tickLine: null\n });\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.tooltip({\n showTitle: false\n });\n if (interaction !== 'none') {\n chart.interaction(interaction);\n }\n chart.legend(false);\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : this.color;\n })\n .tooltip('x*y', (x, y) => ({ name: x, value: y }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.changeData();\n chart.render();\n this.installResizeEvent();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n\n private updatelabel(): void {\n const { node, data, _chart } = this;\n const canvasWidth = node.nativeElement.clientWidth;\n const minWidth = data.length * 30;\n _chart.axis('x', canvasWidth > minWidth).render();\n }\n\n private installResizeEvent(): void {\n if (!this.autoLabel || this.resize$) return;\n\n this.resize$ = fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2BarComponent } from './bar.component';\n\nconst COMPONENTS = [G2BarComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2BarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,EAAE,CAAC;MA+BX,cAAe,SAAQ,eAAe;IAjBnD;;QAwBW,UAAK,GAAG,0BAA0B,CAAC;QACpB,WAAM,GAAG,CAAC,CAAC;QAC1B,YAAO,GAA+B,MAAM,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACP,cAAS,GAAG,IAAI,CAAC;QACjC,gBAAW,GAAsB,MAAM,CAAC;QAC9B,cAAS,GAAG,IAAI,YAAY,EAAkB,CAAC;KAmFnE;;IA/ES,SAAS;QACf,OAAO,IAAI,CAAC,KAAK,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cAAc,EAAE,gBAAgB,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
1
+ {"version":3,"file":"bar.mjs","sources":["../../../../packages/chart/bar/bar.component.ts","../../../../packages/chart/bar/bar.module.ts","../../../../packages/chart/bar/bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, G2InteractionType } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nconst TITLE_HEIGHT = 41;\n\nexport interface G2BarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2BarClickItem {\n item: G2BarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-bar',\n exportAs: 'g2Bar',\n template: `\n <ng-container *nzStringTemplateOutlet=\"title\">\n <h4 style=\"margin-bottom: 20px;\">{{ title }}</h4>\n </ng-container>\n <nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n <div #container></div>\n `,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2BarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_autoLabel: BooleanInput;\n\n // #region fields\n\n @Input() title?: string | TemplateRef<void>;\n @Input() color = 'rgba(24, 144, 255, 0.85)';\n @Input() @InputNumber() height = 0;\n @Input() padding: number | number[] | 'auto' = 'auto';\n @Input() data: G2BarData[] = [];\n @Input() @InputBoolean() autoLabel = true;\n @Input() interaction: G2InteractionType = 'none';\n @Output() readonly clickItem = new EventEmitter<G2BarClickItem>();\n\n // #endregion\n\n private getHeight(): number {\n return this.title ? this.height - TITLE_HEIGHT : this.height;\n }\n\n install(): void {\n const { node, padding, interaction, theme } = this;\n\n const container = node.nativeElement as HTMLElement;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container,\n autoFit: true,\n height: this.getHeight(),\n padding,\n theme\n }));\n this.updatelabel();\n chart.axis('y', {\n title: null,\n line: null,\n tickLine: null\n });\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.tooltip({\n showTitle: false\n });\n if (interaction !== 'none') {\n chart.interaction(interaction);\n }\n chart.legend(false);\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : this.color;\n })\n .tooltip('x*y', (x, y) => ({ name: x, value: y }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.ready.next(chart);\n\n this.changeData();\n chart.render();\n this.installResizeEvent();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n\n private updatelabel(): void {\n const { node, data, _chart } = this;\n const canvasWidth = node.nativeElement.clientWidth;\n const minWidth = data.length * 30;\n _chart.axis('x', canvasWidth > minWidth).render();\n }\n\n private installResizeEvent(): void {\n if (!this.autoLabel || this.resize$) return;\n\n this.resize$ = fromEvent(window, 'resize')\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2BarComponent } from './bar.component';\n\nconst COMPONENTS = [G2BarComponent];\n\n@NgModule({\n imports: [CommonModule, NzOutletModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2BarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,EAAE,CAAC;MA+BX,cAAe,SAAQ,eAAe;IAjBnD;;QAwBW,UAAK,GAAG,0BAA0B,CAAC;QACpB,WAAM,GAAG,CAAC,CAAC;QAC1B,YAAO,GAA+B,MAAM,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACP,cAAS,GAAG,IAAI,CAAC;QACjC,gBAAW,GAAsB,MAAM,CAAC;QAC9B,cAAS,GAAG,IAAI,YAAY,EAAkB,CAAC;KAqFnE;;IAjFS,SAAS;QACf,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO;QACL,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEnD,MAAM,SAAS,GAAG,IAAI,CAAC,aAA4B,CAAC;QACpD,MAAM,KAAK,IAAW,IAAI,CAAC,MAAM,GAAG,IAAK,MAAoB,CAAC,EAAE,CAAC,KAAK,CAAC;YACrE,SAAS;YACT,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE;YACxB,OAAO;YACP,KAAK;SACN,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACd,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,CAAC;YACV,CAAC,EA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,mBAAmB,EAAE,QAAQ;qBAC9B;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAOU,KAAK;sBAAb,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACkB,MAAM;sBAA7B,KAAK;gBACG,OAAO;sBAAf,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACmB,SAAS;sBAAjC,KAAK;gBACG,WAAW;sBAAnB,KAAK;gBACa,SAAS;sBAA3B,MAAM;;;ACtDT,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;MAOvB,WAAW;;wGAAX,WAAW;yGAAX,WAAW,iBAPJ,cAAc,aAGtB,YAAY,EAAE,cAAc,EAAE,gBAAgB,aAHtC,cAAc;yGAOrB,WAAW,YAJb,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;2FAI9C,WAAW;kBALvB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC;oBACzD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACdD;;;;;;"}
package/fesm2020/card.mjs CHANGED
@@ -29,15 +29,15 @@ class G2CardComponent {
29
29
  this.cdr.detectChanges();
30
30
  }
31
31
  }
32
- G2CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
33
- G2CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2CardComponent, selector: "g2-card", inputs: { bordered: "bordered", avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: "loading" }, host: { properties: { "class.g2-card": "true" } }, exportAs: ["g2Card"], usesOnChanges: true, ngImport: i0, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", components: [{ type: i1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }], directives: [{ type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
32
+ G2CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
33
+ G2CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2CardComponent, selector: "g2-card", inputs: { bordered: "bordered", avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: "loading" }, host: { properties: { "class.g2-card": "true" } }, exportAs: ["g2Card"], usesOnChanges: true, ngImport: i0, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n", components: [{ type: i1.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzBorderless", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }], directives: [{ type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34
34
  __decorate([
35
35
  InputBoolean()
36
36
  ], G2CardComponent.prototype, "bordered", void 0);
37
37
  __decorate([
38
38
  InputBoolean()
39
39
  ], G2CardComponent.prototype, "loading", void 0);
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardComponent, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardComponent, decorators: [{
41
41
  type: Component,
42
42
  args: [{ selector: 'g2-card', exportAs: 'g2Card', host: { '[class.g2-card]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<nz-card [nzBodyStyle]=\"{ padding: '20px 24px 8px 24px' }\" [nzBordered]=\"bordered\">\n <nz-spin [nzSpinning]=\"loading\">\n <div class=\"g2-card__top\">\n <div class=\"g2-card__avatar\">\n <ng-container *nzStringTemplateOutlet=\"avatar\">{{ avatar }}</ng-container>\n </div>\n <div class=\"g2-card__meta-wrap\">\n <div class=\"g2-card__meta\">\n <span class=\"g2-card__meta-title\" *ngIf=\"title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n <span class=\"g2-card__meta-action\" *ngIf=\"action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n </div>\n <p *ngIf=\"total\" class=\"g2-card__total\">{{ total }}</p>\n </div>\n </div>\n <div class=\"g2-card__desc\" [ngStyle]=\"{ height: _height }\">\n <div [ngClass]=\"{ 'g2-card__fixed': !!_orgHeight }\">\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"g2-card__footer\" *ngIf=\"footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n </nz-spin>\n</nz-card>\n" }]
43
43
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { bordered: [{
@@ -61,10 +61,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
61
61
  const COMPONENTS = [G2CardComponent];
62
62
  class G2CardModule {
63
63
  }
64
- G2CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
- G2CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, declarations: [G2CardComponent], imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule], exports: [G2CardComponent] });
66
- G2CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, imports: [[CommonModule, NzCardModule, NzSpinModule, NzOutletModule]] });
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CardModule, decorators: [{
64
+ G2CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
+ G2CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardModule, declarations: [G2CardComponent], imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule], exports: [G2CardComponent] });
66
+ G2CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardModule, imports: [[CommonModule, NzCardModule, NzSpinModule, NzOutletModule]] });
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CardModule, decorators: [{
68
68
  type: NgModule,
69
69
  args: [{
70
70
  imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule],
@@ -60,9 +60,9 @@ class ChartEChartsService {
60
60
  this.notify$.unsubscribe();
61
61
  }
62
62
  }
63
- ChartEChartsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
64
- ChartEChartsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsService, decorators: [{
63
+ ChartEChartsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsService, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
64
+ ChartEChartsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsService, decorators: [{
66
66
  type: Injectable,
67
67
  args: [{ providedIn: 'root' }]
68
68
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
@@ -174,15 +174,15 @@ class ChartEChartsComponent {
174
174
  this.destroy();
175
175
  }
176
176
  }
177
- ChartEChartsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsComponent, deps: [{ token: ChartEChartsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Component });
178
- ChartEChartsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ChartEChartsComponent, selector: "chart-echarts, [chart-echarts]", inputs: { width: "width", height: "height", theme: "theme", initOpt: "initOpt", option: "option", on: "on" }, outputs: { events: "events" }, host: { properties: { "style.display": "'inline-block'", "style.width": "_width", "style.height": "_height" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["chartECharts"], ngImport: i0, template: `
177
+ ChartEChartsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsComponent, deps: [{ token: ChartEChartsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Component });
178
+ ChartEChartsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: ChartEChartsComponent, selector: "chart-echarts, [chart-echarts]", inputs: { width: "width", height: "height", theme: "theme", initOpt: "initOpt", option: "option", on: "on" }, outputs: { events: "events" }, host: { properties: { "style.display": "'inline-block'", "style.width": "_width", "style.height": "_height" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["chartECharts"], ngImport: i0, template: `
179
179
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
180
180
  <div #container [style.width]="_width" [style.height]="_height"></div>
181
181
  `, isInline: true, components: [{ type: i3.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
182
  __decorate([
183
183
  ZoneOutside()
184
184
  ], ChartEChartsComponent.prototype, "load", null);
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsComponent, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsComponent, decorators: [{
186
186
  type: Component,
187
187
  args: [{
188
188
  selector: 'chart-echarts, [chart-echarts]',
@@ -222,10 +222,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
222
222
  const COMPONENTS = [ChartEChartsComponent];
223
223
  class ChartEChartsModule {
224
224
  }
225
- ChartEChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
- ChartEChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, declarations: [ChartEChartsComponent], imports: [CommonModule, NzSkeletonModule], exports: [ChartEChartsComponent] });
227
- ChartEChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, imports: [[CommonModule, NzSkeletonModule]] });
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ChartEChartsModule, decorators: [{
225
+ ChartEChartsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
226
+ ChartEChartsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsModule, declarations: [ChartEChartsComponent], imports: [CommonModule, NzSkeletonModule], exports: [ChartEChartsComponent] });
227
+ ChartEChartsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsModule, imports: [[CommonModule, NzSkeletonModule]] });
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ChartEChartsModule, decorators: [{
229
229
  type: NgModule,
230
230
  args: [{
231
231
  imports: [CommonModule, NzSkeletonModule],
package/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Directive, Input, ViewChild } from '@angular/core';
2
+ import { Injectable, EventEmitter, Directive, Input, ViewChild, Output } from '@angular/core';
3
3
  import { Subject } from 'rxjs';
4
4
  import * as i1 from '@delon/util/config';
5
5
  import * as i2 from '@delon/util/other';
@@ -50,9 +50,9 @@ class G2Service {
50
50
  this.notify$.unsubscribe();
51
51
  }
52
52
  }
53
- G2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
54
- G2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, providedIn: 'root' });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2Service, decorators: [{
53
+ G2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2Service, deps: [{ token: i1.AlainConfigService }, { token: i2.LazyService }], target: i0.ɵɵFactoryTarget.Injectable });
54
+ G2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2Service, providedIn: 'root' });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2Service, decorators: [{
56
56
  type: Injectable,
57
57
  args: [{ providedIn: 'root' }]
58
58
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }, { type: i2.LazyService }]; } });
@@ -68,6 +68,7 @@ class G2BaseComponent {
68
68
  this.destroy$ = new Subject();
69
69
  this.loaded = false;
70
70
  this.delay = 0;
71
+ this.ready = new EventEmitter();
71
72
  this.theme = srv.cog.theme;
72
73
  this.srv.notify
73
74
  .pipe(takeUntil(this.destroy$), filter(() => !this.loaded))
@@ -131,8 +132,8 @@ class G2BaseComponent {
131
132
  this.destroyChart();
132
133
  }
133
134
  }
134
- G2BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BaseComponent, deps: [{ token: G2Service }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2$1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
135
- G2BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: G2BaseComponent, inputs: { repaint: "repaint", delay: "delay", theme: "theme" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
135
+ G2BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BaseComponent, deps: [{ token: G2Service }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2$1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
136
+ G2BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.2", type: G2BaseComponent, inputs: { repaint: "repaint", delay: "delay", theme: "theme" }, outputs: { ready: "ready" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
136
137
  __decorate([
137
138
  InputBoolean()
138
139
  ], G2BaseComponent.prototype, "repaint", void 0);
@@ -145,7 +146,7 @@ __decorate([
145
146
  __decorate([
146
147
  ZoneOutside()
147
148
  ], G2BaseComponent.prototype, "destroyChart", null);
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2BaseComponent, decorators: [{
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2BaseComponent, decorators: [{
149
150
  type: Directive
150
151
  }], ctorParameters: function () { return [{ type: G2Service }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2$1.Platform }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { repaint: [{
151
152
  type: Input
@@ -156,6 +157,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
156
157
  type: Input
157
158
  }], theme: [{
158
159
  type: Input
160
+ }], ready: [{
161
+ type: Output
159
162
  }], load: [], destroyChart: [] } });
160
163
 
161
164
  function genMiniTooltipOptions(type, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"core.mjs","sources":["../../../../packages/chart/core/g2.servicce.ts","../../../../packages/chart/core/g2.base.component.ts","../../../../packages/chart/core/utils.ts","../../../../packages/chart/core/core.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class G2Service implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n libs: [\n 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js',\n 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'\n ]\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.libs!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { G2Service } from './g2.servicce';\n\n@Directive()\nexport abstract class G2BaseComponent implements OnInit, OnChanges, OnDestroy {\n get chart(): Chart {\n return this._chart;\n }\n\n constructor(\n protected srv: G2Service,\n protected el: ElementRef<HTMLElement>,\n protected ngZone: NgZone,\n protected platform: Platform,\n protected cdr: ChangeDetectorRef\n ) {\n this.theme = srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n static ngAcceptInputType_repaint: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n @Input() @InputBoolean() repaint = true;\n\n @ViewChild('container', { static: true }) protected node!: ElementRef;\n protected resize$?: Subscription;\n protected destroy$ = new Subject<void>();\n protected _chart!: Chart;\n loaded = false;\n\n @Input() @InputNumber() delay = 0;\n @Input() theme: string | Types.LooseObject;\n\n /** 检查是否只变更数据 */\n onlyChangeData?: (changes: SimpleChanges) => boolean;\n\n abstract install(): void;\n\n /** G2数据变更 */\n changeData(): void {}\n\n /** 等同 `ngOnInit` */\n onInit(): void {}\n\n /** 等同 `ngOnChanges` */\n onChanges(_: SimpleChanges): void {}\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n setTimeout(() => this.install(), this.delay);\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.onInit();\n if ((window as NzSafeAny).G2) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.onChanges(changes);\n\n const isOnlyChangeData = this.onlyChangeData\n ? this.onlyChangeData(changes)\n : Object.keys(changes).length === 1 && !!changes.data;\n if (isOnlyChangeData) {\n this.changeData();\n return;\n }\n if (!this.chart || !this.repaint) return;\n this.ngZone.runOutsideAngular(() => {\n this.destroyChart().install();\n });\n }\n\n @ZoneOutside()\n protected destroyChart(): this {\n if (this._chart) {\n this._chart.destroy();\n }\n return this;\n }\n\n ngOnDestroy(): void {\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n this.destroy$.next();\n this.destroy$.complete();\n this.destroyChart();\n }\n}\n","import type { Types } from '@antv/g2';\n\nexport function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg {\n const res: Types.TooltipCfg = {\n showTitle: false,\n showMarkers: true,\n enterable: true,\n domStyles: {\n 'g2-tooltip': { padding: '0px' },\n 'g2-tooltip-title': { display: 'none' },\n 'g2-tooltip-list-item': { margin: '4px' }\n },\n ...options\n };\n if (type === 'mini') {\n res.position = 'top';\n res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' };\n res.itemTpl = `<li>{value}</li>`;\n res.offset = 8;\n }\n\n return res;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,SAAS;IAuBpB,YAAoB,MAA0B,EAAU,OAAoB;QAAxD,WAAM,GAAN,MAAM,CAAoB;QAAU,YAAO,GAAP,OAAO,CAAa;QArBpE,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAG,IAAI,OAAO,EAAQ,CAAC;QAoBpC,IAAI,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KAC1B;IAnBD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;IACD,IAAI,GAAG,CAAC,GAAqB;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;YACE,KAAK,EAAE,EAAE;YACT,IAAI,EAAE;gBACJ,mEAAmE;gBACnE,2EAA2E;aAC5E;SACkB,EACrB,GAAG,CACH,CAAC;KACJ;IAMD,OAAO;QACL,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aACrB;YACD,OAAO,IAAI,CAAC;SACb;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAK,CAAC,CAAC,IAAI,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SACrB,CAA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,CAAC;QACzB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;;4GAnGmB,eAAe;gGAAf,eAAe;AAsBV;IAAf,YAAY,EAAE;gDAAgB;AAQhB;IAAd,WAAW,EAAE;8CAAW;AAkBlC;IADC,WAAW,EAAE;2CAOb;AA+BD;IADC,WAAW,EAAE;mDAMb;2FA1FmB,eAAe;kBADpC,SAAS;oMAuBiB,OAAO;sBAA/B,KAAK;gBAE8C,IAAI;sBAAvD,SAAS;uBAAC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAMhB,KAAK;sBAA5B,KAAK;gBACG,KAAK;sBAAb,KAAK;gBAiBE,IAAI,MAqCF,YAAY;;SC3GR,qBAAqB,CAAC,IAAwB,EAAE,OAA0B;IACxF,MAAM,GAAG,GAAqB;QAC5B,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE;YACT,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;YAChC,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;YACvC,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;SAC1C;QACD,GAAG,OAAO;KACX,CAAC;IACF,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;QACrB,GAAG,CAAC,SAAU,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACrG,GAAG,CAAC,OAAO,GAAG,kBAAkB,CAAC;QACjC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;KAChB;IAED,OAAO,GAAG,CAAC;AACb;;ACtBA;;;;;;"}
1
+ {"version":3,"file":"core.mjs","sources":["../../../../packages/chart/core/g2.servicce.ts","../../../../packages/chart/core/g2.base.component.ts","../../../../packages/chart/core/utils.ts","../../../../packages/chart/core/core.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { AlainChartConfig, AlainConfigService } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class G2Service implements OnDestroy {\n private _cog!: AlainChartConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainChartConfig {\n return this._cog;\n }\n set cog(val: AlainChartConfig) {\n this._cog = this.cogSrv.merge(\n 'chart',\n {\n theme: '',\n libs: [\n 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js',\n 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js'\n ]\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor(private cogSrv: AlainConfigService, private lazySrv: LazyService) {\n this.cog = { theme: '' };\n }\n\n libLoad(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.libs!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n get notify(): Observable<void> {\n return this.notify$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.notify$.unsubscribe();\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { G2Service } from './g2.servicce';\n\n@Directive()\nexport abstract class G2BaseComponent implements OnInit, OnChanges, OnDestroy {\n get chart(): Chart {\n return this._chart;\n }\n\n constructor(\n protected srv: G2Service,\n protected el: ElementRef<HTMLElement>,\n protected ngZone: NgZone,\n protected platform: Platform,\n protected cdr: ChangeDetectorRef\n ) {\n this.theme = srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n static ngAcceptInputType_repaint: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n @Input() @InputBoolean() repaint = true;\n\n @ViewChild('container', { static: true }) protected node!: ElementRef;\n protected resize$?: Subscription;\n protected destroy$ = new Subject<void>();\n protected _chart!: Chart;\n loaded = false;\n\n @Input() @InputNumber() delay = 0;\n @Input() theme: string | Types.LooseObject;\n @Output() readonly ready = new EventEmitter<Chart>();\n\n /** 检查是否只变更数据 */\n onlyChangeData?: (changes: SimpleChanges) => boolean;\n\n abstract install(): void;\n\n /** G2数据变更 */\n changeData(): void {}\n\n /** 等同 `ngOnInit` */\n onInit(): void {}\n\n /** 等同 `ngOnChanges` */\n onChanges(_: SimpleChanges): void {}\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n setTimeout(() => this.install(), this.delay);\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.onInit();\n if ((window as NzSafeAny).G2) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.onChanges(changes);\n\n const isOnlyChangeData = this.onlyChangeData\n ? this.onlyChangeData(changes)\n : Object.keys(changes).length === 1 && !!changes.data;\n if (isOnlyChangeData) {\n this.changeData();\n return;\n }\n if (!this.chart || !this.repaint) return;\n this.ngZone.runOutsideAngular(() => {\n this.destroyChart().install();\n });\n }\n\n @ZoneOutside()\n protected destroyChart(): this {\n if (this._chart) {\n this._chart.destroy();\n }\n return this;\n }\n\n ngOnDestroy(): void {\n if (this.resize$) {\n this.resize$.unsubscribe();\n }\n this.destroy$.next();\n this.destroy$.complete();\n this.destroyChart();\n }\n}\n","import type { Types } from '@antv/g2';\n\nexport function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg {\n const res: Types.TooltipCfg = {\n showTitle: false,\n showMarkers: true,\n enterable: true,\n domStyles: {\n 'g2-tooltip': { padding: '0px' },\n 'g2-tooltip-title': { display: 'none' },\n 'g2-tooltip-list-item': { margin: '4px' }\n },\n ...options\n };\n if (type === 'mini') {\n res.position = 'top';\n res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' };\n res.itemTpl = `<li>{value}</li>`;\n res.offset = 8;\n }\n\n return res;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,SAAS;IAuBpB,YAAoB,MAA0B,EAAU,OAAoB;QAAxD,WAAM,GAAN,MAAM,CAAoB;QAAU,YAAO,GAAP,OAAO,CAAa;QArBpE,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAG,IAAI,OAAO,EAAQ,CAAC;QAoBpC,IAAI,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KAC1B;IAnBD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;KAClB;IACD,IAAI,GAAG,CAAC,GAAqB;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;YACE,KAAK,EAAE,EAAE;YACT,IAAI,EAAE;gBACJ,mEAAmE;gBACnE,2EAA2E;aAC5E;SACkB,EACrB,GAAG,CACH,CAAC;KACJ;IAMD,OAAO;QACL,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;aACrB;YACD,OAAO,IAAI,CAAC;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E,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACrG,GAAG,CAAC,OAAO,GAAG,kBAAkB,CAAC;QACjC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;KAChB;IAED,OAAO,GAAG,CAAC;AACb;;ACtBA;;;;;;"}
@@ -32,8 +32,8 @@ class G2CustomComponent extends G2BaseComponent {
32
32
  .subscribe(() => this.resize.emit(this.el));
33
33
  }
34
34
  }
35
- G2CustomComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
36
- G2CustomComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2CustomComponent, selector: "g2,g2-custom", inputs: { height: "height", resizeTime: "resizeTime" }, outputs: { render: "render", resize: "resize", destroy: "destroy" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Custom"], usesInheritance: true, ngImport: i0, template: `
35
+ G2CustomComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
36
+ G2CustomComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2CustomComponent, selector: "g2,g2-custom", inputs: { height: "height", resizeTime: "resizeTime" }, outputs: { render: "render", resize: "resize", destroy: "destroy" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Custom"], usesInheritance: true, ngImport: i0, template: `
37
37
  <nz-skeleton *ngIf="!loaded"></nz-skeleton>
38
38
  <ng-content></ng-content>
39
39
  `, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -43,7 +43,7 @@ __decorate([
43
43
  __decorate([
44
44
  InputNumber()
45
45
  ], G2CustomComponent.prototype, "resizeTime", void 0);
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomComponent, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomComponent, decorators: [{
47
47
  type: Component,
48
48
  args: [{
49
49
  selector: 'g2,g2-custom',
@@ -74,10 +74,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
74
74
  const COMPONENTS = [G2CustomComponent];
75
75
  class G2CustomModule {
76
76
  }
77
- G2CustomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
78
- G2CustomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomModule, declarations: [G2CustomComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2CustomComponent] });
79
- G2CustomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomModule, imports: [[CommonModule, NzSkeletonModule]] });
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2CustomModule, decorators: [{
77
+ G2CustomModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
78
+ G2CustomModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomModule, declarations: [G2CustomComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2CustomComponent] });
79
+ G2CustomModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomModule, imports: [[CommonModule, NzSkeletonModule]] });
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2CustomModule, decorators: [{
81
81
  type: NgModule,
82
82
  args: [{
83
83
  imports: [CommonModule, NzSkeletonModule],
@@ -80,6 +80,7 @@ class G2GaugeComponent extends G2BaseComponent {
80
80
  grid: null
81
81
  });
82
82
  chart.point().position('value*1').shape('pointer');
83
+ this.ready.next(chart);
83
84
  this.changeData();
84
85
  chart.render();
85
86
  }
@@ -116,7 +117,7 @@ class G2GaugeComponent extends G2BaseComponent {
116
117
  content: title,
117
118
  style: {
118
119
  fontSize: 12,
119
- fill: 'rgba(0, 0, 0, 0.43)',
120
+ fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.43)' : 'rgba(0, 0, 0, 0.43)',
120
121
  textAlign: 'center'
121
122
  }
122
123
  });
@@ -125,7 +126,7 @@ class G2GaugeComponent extends G2BaseComponent {
125
126
  content: `${val} %`,
126
127
  style: {
127
128
  fontSize: 20,
128
- fill: 'rgba(0, 0, 0, 0.85)',
129
+ fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.85)' : 'rgba(0, 0, 0, 0.85)',
129
130
  textAlign: 'center'
130
131
  },
131
132
  offsetY: 15
@@ -133,15 +134,15 @@ class G2GaugeComponent extends G2BaseComponent {
133
134
  _chart.changeData(data);
134
135
  }
135
136
  }
136
- G2GaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
137
- G2GaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2GaugeComponent, selector: "g2-gauge", inputs: { title: "title", height: "height", color: "color", bgColor: "bgColor", format: "format", percent: "percent", padding: "padding" }, host: { properties: { "class.g2-gauge": "true" } }, exportAs: ["g2Gauge"], usesInheritance: true, ngImport: i0, template: `<nz-skeleton *ngIf="!loaded"></nz-skeleton>`, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
137
+ G2GaugeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
138
+ G2GaugeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2GaugeComponent, selector: "g2-gauge", inputs: { title: "title", height: "height", color: "color", bgColor: "bgColor", format: "format", percent: "percent", padding: "padding" }, host: { properties: { "class.g2-gauge": "true" } }, exportAs: ["g2Gauge"], usesInheritance: true, ngImport: i0, template: `<nz-skeleton *ngIf="!loaded"></nz-skeleton>`, isInline: true, components: [{ type: i1.NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
138
139
  __decorate([
139
140
  InputNumber()
140
141
  ], G2GaugeComponent.prototype, "height", void 0);
141
142
  __decorate([
142
143
  InputNumber()
143
144
  ], G2GaugeComponent.prototype, "percent", void 0);
144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeComponent, decorators: [{
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeComponent, decorators: [{
145
146
  type: Component,
146
147
  args: [{
147
148
  selector: 'g2-gauge',
@@ -173,10 +174,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
173
174
  const COMPONENTS = [G2GaugeComponent];
174
175
  class G2GaugeModule {
175
176
  }
176
- G2GaugeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
177
- G2GaugeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeModule, declarations: [G2GaugeComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2GaugeComponent] });
178
- G2GaugeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeModule, imports: [[CommonModule, NzSkeletonModule]] });
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2GaugeModule, decorators: [{
177
+ G2GaugeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
178
+ G2GaugeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeModule, declarations: [G2GaugeComponent], imports: [CommonModule, NzSkeletonModule], exports: [G2GaugeComponent] });
179
+ G2GaugeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeModule, imports: [[CommonModule, NzSkeletonModule]] });
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2GaugeModule, decorators: [{
180
181
  type: NgModule,
181
182
  args: [{
182
183
  imports: [CommonModule, NzSkeletonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"gauge.mjs","sources":["../../../../packages/chart/gauge/gauge.component.ts","../../../../packages/chart/gauge/gauge.module.ts","../../../../packages/chart/gauge/gauge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-gauge',\n exportAs: 'g2Gauge',\n template: `<nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>`,\n host: {\n '[class.g2-gauge]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2GaugeComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n\n // #region fields\n\n @Input() title?: string;\n @Input() @InputNumber() height?: number;\n @Input() color = '#2f9cff';\n @Input() bgColor?: string; // = '#f0f2f5';\n @Input() format?: (text: string, item: NzSafeAny, index: number) => string;\n @Input() @InputNumber() percent?: number;\n @Input() padding: number | number[] | 'auto' = [10, 10, 30, 10];\n\n // #endregion\n\n install(): void {\n // 自定义Shape 部分\n (window as NzSafeAny).G2.registerShape('point', 'pointer', {\n draw(cfg: NzSafeAny, container: NzSafeAny) {\n const group = container.addGroup({});\n // 获取极坐标系下画布中心点\n const center = (this as NzSafeAny).parsePoint({ x: 0, y: 0 });\n // 绘制指针\n group.addShape('line', {\n attrs: {\n x1: center.x,\n y1: center.y,\n x2: cfg.x,\n y2: cfg.y,\n stroke: cfg.color,\n lineWidth: 2.5,\n lineCap: 'round'\n }\n });\n group.addShape('circle', {\n attrs: {\n x: center.x,\n y: center.y,\n r: 5.75,\n stroke: cfg.color,\n lineWidth: 2,\n fill: '#fff'\n }\n });\n return group;\n }\n });\n\n const { el, height, padding, format, theme } = this;\n\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.legend(false);\n chart.animate(false);\n chart.tooltip(false);\n chart.coordinate('polar', {\n startAngle: (-9 / 8) * Math.PI,\n endAngle: (1 / 8) * Math.PI,\n radius: 0.75\n });\n chart.scale('value', {\n min: 0,\n max: 100,\n nice: true,\n tickCount: 6\n });\n chart.axis('1', false);\n chart.axis('value', {\n line: null,\n label: {\n offset: -14,\n formatter: format\n },\n tickLine: null,\n grid: null\n });\n chart.point().position('value*1').shape('pointer');\n\n this.changeData();\n\n chart.render();\n }\n\n changeData(): void {\n const { _chart, percent, color, bgColor, title } = this;\n if (!_chart) return;\n\n const data = [{ name: title, value: percent }];\n const val = data[0].value;\n _chart.annotation().clear(true);\n _chart.geometries[0].color(color);\n // 绘制仪表盘背景\n _chart.annotation().arc({\n top: false,\n start: [0, 0.95],\n end: [100, 0.95],\n style: {\n stroke: bgColor,\n lineWidth: 12,\n lineDash: null\n }\n });\n _chart.annotation().arc({\n start: [0, 0.95],\n end: [data[0].value!, 0.95],\n style: {\n stroke: color,\n lineWidth: 12,\n lineDash: null\n }\n });\n\n _chart.annotation().text({\n position: ['50%', '85%'],\n content: title,\n style: {\n fontSize: 12,\n fill: 'rgba(0, 0, 0, 0.43)',\n textAlign: 'center'\n }\n });\n _chart.annotation().text({\n position: ['50%', '90%'],\n content: `${val} %`,\n style: {\n fontSize: 20,\n fill: 'rgba(0, 0, 0, 0.85)',\n textAlign: 'center'\n },\n offsetY: 15\n });\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2GaugeComponent } from './gauge.component';\n\nconst COMPONENTS = [G2GaugeComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2GaugeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,gBAAiB,SAAQ,eAAe;IAXrD;;QAmBW,UAAK,GAAG,SAAS,CAAC;QAIlB,YAAO,GAA+B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;KAgIjE;;IA5HC,OAAO;;QAEJ,MAAoB,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE;YACzD,IAAI,CAAC,GAAc,EAAE,SAAoB;gBACvC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;;gBAErC,MAAM,MAAM,GAAI,IAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;gBAE9D,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACrB,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,MAAM,EAAE,GAAG,CAAC,KAAK;wBACjB,SAAS,EAAE,GAAG;wBACd,OAAO,EAAE,OAAO;qBACjB;iBACF,CAAC,CAAC;gBACH,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE;oBACvB,KAAK,EAAE;wBACL,CAAC,EAAE,MAAM,CAAC,CAAC;wBACX,CAAC,EAAE,MAAM,CAAC,CAAC;wBACX,CAAC,EAAE,IAAI;wBACP,MAAM,EAAE,GAAG,CAAC,KAAK;wBACjB,SAAS,EAAE,C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B,gBAAgB;2GAOvB,aAAa,YAJf,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,aAAa;kBALzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
1
+ {"version":3,"file":"gauge.mjs","sources":["../../../../packages/chart/gauge/gauge.component.ts","../../../../packages/chart/gauge/gauge.module.ts","../../../../packages/chart/gauge/gauge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-gauge',\n exportAs: 'g2Gauge',\n template: `<nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>`,\n host: {\n '[class.g2-gauge]': 'true'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2GaugeComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n\n // #region fields\n\n @Input() title?: string;\n @Input() @InputNumber() height?: number;\n @Input() color = '#2f9cff';\n @Input() bgColor?: string; // = '#f0f2f5';\n @Input() format?: (text: string, item: NzSafeAny, index: number) => string;\n @Input() @InputNumber() percent?: number;\n @Input() padding: number | number[] | 'auto' = [10, 10, 30, 10];\n\n // #endregion\n\n install(): void {\n // 自定义Shape 部分\n (window as NzSafeAny).G2.registerShape('point', 'pointer', {\n draw(cfg: NzSafeAny, container: NzSafeAny) {\n const group = container.addGroup({});\n // 获取极坐标系下画布中心点\n const center = (this as NzSafeAny).parsePoint({ x: 0, y: 0 });\n // 绘制指针\n group.addShape('line', {\n attrs: {\n x1: center.x,\n y1: center.y,\n x2: cfg.x,\n y2: cfg.y,\n stroke: cfg.color,\n lineWidth: 2.5,\n lineCap: 'round'\n }\n });\n group.addShape('circle', {\n attrs: {\n x: center.x,\n y: center.y,\n r: 5.75,\n stroke: cfg.color,\n lineWidth: 2,\n fill: '#fff'\n }\n });\n return group;\n }\n });\n\n const { el, height, padding, format, theme } = this;\n\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.legend(false);\n chart.animate(false);\n chart.tooltip(false);\n chart.coordinate('polar', {\n startAngle: (-9 / 8) * Math.PI,\n endAngle: (1 / 8) * Math.PI,\n radius: 0.75\n });\n chart.scale('value', {\n min: 0,\n max: 100,\n nice: true,\n tickCount: 6\n });\n chart.axis('1', false);\n chart.axis('value', {\n line: null,\n label: {\n offset: -14,\n formatter: format\n },\n tickLine: null,\n grid: null\n });\n chart.point().position('value*1').shape('pointer');\n\n this.ready.next(chart);\n\n this.changeData();\n\n chart.render();\n }\n\n changeData(): void {\n const { _chart, percent, color, bgColor, title } = this;\n if (!_chart) return;\n\n const data = [{ name: title, value: percent }];\n const val = data[0].value;\n _chart.annotation().clear(true);\n _chart.geometries[0].color(color);\n // 绘制仪表盘背景\n _chart.annotation().arc({\n top: false,\n start: [0, 0.95],\n end: [100, 0.95],\n style: {\n stroke: bgColor,\n lineWidth: 12,\n lineDash: null\n }\n });\n _chart.annotation().arc({\n start: [0, 0.95],\n end: [data[0].value!, 0.95],\n style: {\n stroke: color,\n lineWidth: 12,\n lineDash: null\n }\n });\n\n _chart.annotation().text({\n position: ['50%', '85%'],\n content: title,\n style: {\n fontSize: 12,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.43)' : 'rgba(0, 0, 0, 0.43)',\n textAlign: 'center'\n }\n });\n _chart.annotation().text({\n position: ['50%', '90%'],\n content: `${val} %`,\n style: {\n fontSize: 20,\n fill: this.theme === 'dark' ? 'rgba(255, 255, 255, 0.85)' : 'rgba(0, 0, 0, 0.85)',\n textAlign: 'center'\n },\n offsetY: 15\n });\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { G2GaugeComponent } from './gauge.component';\n\nconst COMPONENTS = [G2GaugeComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2GaugeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,gBAAiB,SAAQ,eAAe;IAXrD;;QAmBW,UAAK,GAAG,SAAS,CAAC;QAIlB,YAAO,GAA+B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;KAkIjE;;IA9HC,OAAO;;QAEJ,MAAoB,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE;YACzD,IAAI,CAAC,GAAc,EAAE,SAAoB;gBACvC,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;;gBAErC,MAAM,MAAM,GAAI,IAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;gBAE9D,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;oBACrB,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,MAAM,CAAC,CAAC;wBACZ,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,EAAE,EAAE,GAAG,CAAC,CAAC;wBACT,MAAM,EAAE,GAAG,CAAC,KAAK;wBACjB,SAAS,EAAE,GAAG;wBACd,OAAO,EAAE,OAAO;qBACjB;iBACF,CAAC,CAAC;gBACH,KAAK,CAAC,QAAQ,CAAC,QAAQ,EA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I;iBACtC;8BAOU,KAAK;sBAAb,KAAK;gBACkB,MAAM;sBAA7B,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACG,OAAO;sBAAf,KAAK;gBACG,MAAM;sBAAd,KAAK;gBACkB,OAAO;sBAA9B,KAAK;gBACG,OAAO;sBAAf,KAAK;;;ACxBR,MAAM,UAAU,GAAG,CAAC,gBAAgB,CAAC,CAAC;MAOzB,aAAa;;0GAAb,aAAa;2GAAb,aAAa,iBAPN,gBAAgB,aAGxB,YAAY,EAAE,gBAAgB,aAHtB,gBAAgB;2GAOvB,aAAa,YAJf,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,aAAa;kBALzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
@@ -63,6 +63,7 @@ class G2MiniAreaComponent extends G2BaseComponent {
63
63
  const records = this._chart.getSnapRecords({ x: ev.x, y: ev.y });
64
64
  this.ngZone.run(() => this.clickItem.emit({ item: records[0]._origin, ev }));
65
65
  });
66
+ this.ready.next(chart);
66
67
  this.changeData();
67
68
  chart.render();
68
69
  }
@@ -73,8 +74,8 @@ class G2MiniAreaComponent extends G2BaseComponent {
73
74
  _chart.changeData(data);
74
75
  }
75
76
  }
76
- G2MiniAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
77
- G2MiniAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2MiniAreaComponent, selector: "g2-mini-area", inputs: { color: "color", borderColor: "borderColor", borderWidth: "borderWidth", height: "height", fit: "fit", line: "line", animate: "animate", xAxis: "xAxis", yAxis: "yAxis", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniArea"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
77
+ G2MiniAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
78
+ G2MiniAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2MiniAreaComponent, selector: "g2-mini-area", inputs: { color: "color", borderColor: "borderColor", borderWidth: "borderWidth", height: "height", fit: "fit", line: "line", animate: "animate", xAxis: "xAxis", yAxis: "yAxis", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniArea"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
79
  __decorate([
79
80
  InputNumber()
80
81
  ], G2MiniAreaComponent.prototype, "borderWidth", void 0);
@@ -90,7 +91,7 @@ __decorate([
90
91
  __decorate([
91
92
  InputBoolean()
92
93
  ], G2MiniAreaComponent.prototype, "animate", void 0);
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaComponent, decorators: [{
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaComponent, decorators: [{
94
95
  type: Component,
95
96
  args: [{
96
97
  selector: 'g2-mini-area',
@@ -136,10 +137,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
136
137
  const COMPONENTS = [G2MiniAreaComponent];
137
138
  class G2MiniAreaModule {
138
139
  }
139
- G2MiniAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
140
- G2MiniAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaModule, declarations: [G2MiniAreaComponent], imports: [CommonModule], exports: [G2MiniAreaComponent] });
141
- G2MiniAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaModule, imports: [[CommonModule]] });
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniAreaModule, decorators: [{
140
+ G2MiniAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141
+ G2MiniAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaModule, declarations: [G2MiniAreaComponent], imports: [CommonModule], exports: [G2MiniAreaComponent] });
142
+ G2MiniAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaModule, imports: [[CommonModule]] });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniAreaModule, decorators: [{
143
144
  type: NgModule,
144
145
  args: [{
145
146
  imports: [CommonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"mini-area.mjs","sources":["../../../../packages/chart/mini-area/mini-area.component.ts","../../../../packages/chart/mini-area/mini-area.module.ts","../../../../packages/chart/mini-area/mini-area.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface G2MiniAreaData {\n x: NzSafeAny;\n y: NzSafeAny;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2MiniAreaClickItem {\n item: G2MiniAreaData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-mini-area',\n exportAs: 'g2MiniArea',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2MiniAreaComponent extends G2BaseComponent {\n static ngAcceptInputType_borderWidth: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_fit: BooleanInput;\n static ngAcceptInputType_line: BooleanInput;\n static ngAcceptInputType_animate: BooleanInput;\n\n // #region fields\n\n @Input() color = 'rgba(24, 144, 255, 0.2)';\n @Input() borderColor = '#1890FF';\n @Input() @InputNumber() borderWidth = 2;\n @Input() @InputNumber() height = 56;\n @Input() @InputBoolean() fit = true;\n @Input() @InputBoolean() line = false;\n @Input() @InputBoolean() animate = true;\n @Input() xAxis: NzSafeAny;\n @Input() yAxis: NzSafeAny;\n @Input() padding: number | number[] | 'auto' = [8, 8, 8, 8];\n @Input() data: G2MiniAreaData[] = [];\n @Input() yTooltipSuffix = '';\n @Input() tooltipType: 'mini' | 'default' = 'default';\n @Output() readonly clickItem = new EventEmitter<G2MiniAreaClickItem>();\n\n // #endregion\n\n install(): void {\n const {\n el,\n fit,\n height,\n padding,\n xAxis,\n yAxis,\n yTooltipSuffix,\n tooltipType,\n line,\n theme,\n animate,\n color,\n borderColor,\n borderWidth\n } = this;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: fit,\n height,\n padding,\n theme\n }));\n chart.animate(animate);\n\n if (!xAxis && !yAxis) {\n chart.axis(false);\n }\n\n if (xAxis) {\n chart.axis('x', xAxis);\n } else {\n chart.axis('x', false);\n }\n\n if (yAxis) {\n chart.axis('y', yAxis);\n } else {\n chart.axis('y', false);\n }\n\n chart.legend(false);\n chart.tooltip(genMiniTooltipOptions(tooltipType));\n\n chart\n .area()\n .position('x*y')\n .color(color)\n .tooltip('x*y', (x, y) => ({ name: x, value: y + yTooltipSuffix }))\n .shape('smooth');\n\n if (line) {\n chart.line().position('x*y').shape('smooth').color(borderColor).size(borderWidth).tooltip(false);\n }\n\n chart.on(`plot:click`, (ev: Event) => {\n const records = this._chart.getSnapRecords({ x: ev.x, y: ev.y });\n this.ngZone.run(() => this.clickItem.emit({ item: records[0]._origin, ev }));\n });\n\n this.changeData();\n chart.render();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { G2MiniAreaComponent } from './mini-area.component';\n\nconst COMPONENTS = [G2MiniAreaComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2MiniAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MA8Ba,mBAAoB,SAAQ,eAAe;IAXxD;;;QAoBW,UAAK,GAAG,yBAAyB,CAAC;QAClC,gBAAW,GAAG,SAAS,CAAC;QACT,gBAAW,GAAG,CAAC,CAAC;QAChB,WAAM,GAAG,EAAE,CAAC;QACX,QAAG,GAAG,IAAI,CAAC;QACX,SAAI,GAAG,KAAK,CAAC;QACb,YAAO,GAAG,IAAI,CAAC;QAG/B,YAAO,GAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnD,SAAI,GAAqB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AE;gDAAY;AACX;IAAf,YAAY,EAAE;iDAAc;AACb;IAAf,YAAY,EAAE;oDAAgB;2FAf7B,mBAAmB;kBAX/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,QAAQ,EAAE,YAAY;oBACtB,QAAQ,EAAE,EAAE;oBACZ,IAAI,EAAE;wBACJ,mBAAmB,EAAE,QAAQ;qBAC9B;oBACD,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAUU,KAAK;sBAAb,KAAK;gBACG,WAAW;sBAAnB,KAAK;gBACkB,WAAW;sBAAlC,KAAK;gBACkB,MAAM;sBAA7B,KAAK;gBACmB,GAAG;sBAA3B,KAAK;gBACmB,IAAI;sBAA5B,KAAK;gBACmB,OAAO;sBAA/B,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACG,OAAO;sBAAf,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACG,cAAc;sBAAtB,KAAK;gBACG,WAAW;sBAAnB,KAAK;gBACa,SAAS;sBAA3B,MAAM;;;AC/CT,MAAM,UAAU,GAAG,CAAC,mBAAmB,CAAC,CAAC;MAO5B,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAPT,mBAAmB,aAG3B,YAAY,aAHJ,mBAAmB;8GAO1B,gBAAgB,YAJlB,CAAC,YAAY,CAAC;2FAIZ,gBAAgB;kBAL5B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACXD;;;;;;"}
1
+ {"version":3,"file":"mini-area.mjs","sources":["../../../../packages/chart/mini-area/mini-area.component.ts","../../../../packages/chart/mini-area/mini-area.module.ts","../../../../packages/chart/mini-area/mini-area.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface G2MiniAreaData {\n x: NzSafeAny;\n y: NzSafeAny;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2MiniAreaClickItem {\n item: G2MiniAreaData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-mini-area',\n exportAs: 'g2MiniArea',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2MiniAreaComponent extends G2BaseComponent {\n static ngAcceptInputType_borderWidth: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_fit: BooleanInput;\n static ngAcceptInputType_line: BooleanInput;\n static ngAcceptInputType_animate: BooleanInput;\n\n // #region fields\n\n @Input() color = 'rgba(24, 144, 255, 0.2)';\n @Input() borderColor = '#1890FF';\n @Input() @InputNumber() borderWidth = 2;\n @Input() @InputNumber() height = 56;\n @Input() @InputBoolean() fit = true;\n @Input() @InputBoolean() line = false;\n @Input() @InputBoolean() animate = true;\n @Input() xAxis: NzSafeAny;\n @Input() yAxis: NzSafeAny;\n @Input() padding: number | number[] | 'auto' = [8, 8, 8, 8];\n @Input() data: G2MiniAreaData[] = [];\n @Input() yTooltipSuffix = '';\n @Input() tooltipType: 'mini' | 'default' = 'default';\n @Output() readonly clickItem = new EventEmitter<G2MiniAreaClickItem>();\n\n // #endregion\n\n install(): void {\n const {\n el,\n fit,\n height,\n padding,\n xAxis,\n yAxis,\n yTooltipSuffix,\n tooltipType,\n line,\n theme,\n animate,\n color,\n borderColor,\n borderWidth\n } = this;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: fit,\n height,\n padding,\n theme\n }));\n chart.animate(animate);\n\n if (!xAxis && !yAxis) {\n chart.axis(false);\n }\n\n if (xAxis) {\n chart.axis('x', xAxis);\n } else {\n chart.axis('x', false);\n }\n\n if (yAxis) {\n chart.axis('y', yAxis);\n } else {\n chart.axis('y', false);\n }\n\n chart.legend(false);\n chart.tooltip(genMiniTooltipOptions(tooltipType));\n\n chart\n .area()\n .position('x*y')\n .color(color)\n .tooltip('x*y', (x, y) => ({ name: x, value: y + yTooltipSuffix }))\n .shape('smooth');\n\n if (line) {\n chart.line().position('x*y').shape('smooth').color(borderColor).size(borderWidth).tooltip(false);\n }\n\n chart.on(`plot:click`, (ev: Event) => {\n const records = this._chart.getSnapRecords({ x: ev.x, y: ev.y });\n this.ngZone.run(() => this.clickItem.emit({ item: records[0]._origin, ev }));\n });\n\n this.ready.next(chart);\n\n this.changeData();\n chart.render();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { G2MiniAreaComponent } from './mini-area.component';\n\nconst COMPONENTS = [G2MiniAreaComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2MiniAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MA8Ba,mBAAoB,SAAQ,eAAe;IAXxD;;;QAoBW,UAAK,GAAG,yBAAyB,CAAC;QAClC,gBAAW,GAAG,SAAS,CAAC;QACT,gBAAW,GAAG,CAAC,CAAC;QAChB,WAAM,GAAG,EAAE,CAAC;QACX,QAAG,GAAG,IAAI,CAAC;QACX,SAAI,GAAG,KAAK,CAAC;QACb,YAAO,GAAG,IAAI,CAAC;QAG/B,YAAO,GAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,CAA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51
  chart.on(`interval:click`, (ev) => {
52
52
  this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));
53
53
  });
54
+ this.ready.next(chart);
54
55
  this.changeData();
55
56
  chart.render();
56
57
  }
@@ -61,15 +62,15 @@ class G2MiniBarComponent extends G2BaseComponent {
61
62
  _chart.changeData(data);
62
63
  }
63
64
  }
64
- G2MiniBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
65
- G2MiniBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: G2MiniBarComponent, selector: "g2-mini-bar", inputs: { color: "color", height: "height", borderWidth: "borderWidth", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniBar"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
65
+ G2MiniBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
66
+ G2MiniBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: G2MiniBarComponent, selector: "g2-mini-bar", inputs: { color: "color", height: "height", borderWidth: "borderWidth", padding: "padding", data: "data", yTooltipSuffix: "yTooltipSuffix", tooltipType: "tooltipType" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2MiniBar"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
66
67
  __decorate([
67
68
  InputNumber()
68
69
  ], G2MiniBarComponent.prototype, "height", void 0);
69
70
  __decorate([
70
71
  InputNumber()
71
72
  ], G2MiniBarComponent.prototype, "borderWidth", void 0);
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarComponent, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarComponent, decorators: [{
73
74
  type: Component,
74
75
  args: [{
75
76
  selector: 'g2-mini-bar',
@@ -103,10 +104,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
103
104
  const COMPONENTS = [G2MiniBarComponent];
104
105
  class G2MiniBarModule {
105
106
  }
106
- G2MiniBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
107
- G2MiniBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarModule, declarations: [G2MiniBarComponent], imports: [CommonModule], exports: [G2MiniBarComponent] });
108
- G2MiniBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarModule, imports: [[CommonModule]] });
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: G2MiniBarModule, decorators: [{
107
+ G2MiniBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
108
+ G2MiniBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarModule, declarations: [G2MiniBarComponent], imports: [CommonModule], exports: [G2MiniBarComponent] });
109
+ G2MiniBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarModule, imports: [[CommonModule]] });
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: G2MiniBarModule, decorators: [{
110
111
  type: NgModule,
111
112
  args: [{
112
113
  imports: [CommonModule],