@delon/chart 19.0.1 → 19.2.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.
- package/fesm2022/bar.mjs +7 -7
- package/fesm2022/card.mjs +7 -7
- package/fesm2022/chart-echarts.mjs +10 -10
- package/fesm2022/chart-echarts.mjs.map +1 -1
- package/fesm2022/core.mjs +7 -6
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/custom.mjs +7 -7
- package/fesm2022/gauge.mjs +7 -7
- package/fesm2022/mini-area.mjs +7 -7
- package/fesm2022/mini-bar.mjs +7 -7
- package/fesm2022/mini-progress.mjs +7 -7
- package/fesm2022/number-info.mjs +7 -7
- package/fesm2022/pie.mjs +7 -7
- package/fesm2022/radar.mjs +7 -7
- package/fesm2022/single-bar.mjs +7 -7
- package/fesm2022/single-bar.mjs.map +1 -1
- package/fesm2022/tag-cloud.mjs +7 -7
- package/fesm2022/timeline.mjs +7 -7
- package/fesm2022/trend.mjs +7 -7
- package/fesm2022/water-wave.mjs +7 -7
- package/mini-progress/style/index.less +1 -1
- package/package.json +4 -4
- package/single-bar/single-bar.component.d.ts +1 -3
package/fesm2022/bar.mjs
CHANGED
|
@@ -87,8 +87,8 @@ class G2BarComponent extends G2BaseComponent {
|
|
|
87
87
|
.pipe(takeUntil(this.destroy$), filter(() => !!this._chart), debounceTime(200))
|
|
88
88
|
.subscribe(() => this.ngZone.runOutsideAngular(() => this.updatelabel()));
|
|
89
89
|
}
|
|
90
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
91
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
90
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2BarComponent, isStandalone: true, selector: "g2-bar", inputs: { title: "title", color: "color", height: ["height", "height", numberAttribute], padding: "padding", data: "data", autoLabel: ["autoLabel", "autoLabel", booleanAttribute], interaction: "interaction" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Bar"], usesInheritance: true, ngImport: i0, template: `
|
|
92
92
|
<ng-container *nzStringTemplateOutlet="title">
|
|
93
93
|
<h4 style="margin-bottom: 20px;">{{ title }}</h4>
|
|
94
94
|
</ng-container>
|
|
@@ -98,7 +98,7 @@ class G2BarComponent extends G2BaseComponent {
|
|
|
98
98
|
<div #container></div>
|
|
99
99
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BarComponent, decorators: [{
|
|
102
102
|
type: Component,
|
|
103
103
|
args: [{
|
|
104
104
|
selector: 'g2-bar',
|
|
@@ -142,11 +142,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
142
142
|
|
|
143
143
|
const COMPONENTS = [G2BarComponent];
|
|
144
144
|
class G2BarModule {
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
146
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
147
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
146
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2BarModule, imports: [CommonModule, NzOutletModule, NzSkeletonModule, G2BarComponent], exports: [G2BarComponent] });
|
|
147
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BarModule, imports: [CommonModule, NzOutletModule, NzSkeletonModule, COMPONENTS] });
|
|
148
148
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BarModule, decorators: [{
|
|
150
150
|
type: NgModule,
|
|
151
151
|
args: [{
|
|
152
152
|
imports: [CommonModule, NzOutletModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/card.mjs
CHANGED
|
@@ -25,10 +25,10 @@ class G2CardComponent {
|
|
|
25
25
|
ngOnChanges() {
|
|
26
26
|
this.cdr.detectChanges();
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2CardComponent, isStandalone: true, selector: "g2-card", inputs: { bordered: ["bordered", "bordered", booleanAttribute], avatar: "avatar", title: "title", action: "action", total: "total", contentHeight: "contentHeight", footer: "footer", loading: ["loading", "loading", booleanAttribute] }, 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 @if (title) {\n <span class=\"g2-card__meta-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n }\n @if (action) {\n <span class=\"g2-card__meta-action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n }\n </div>\n @if (total) {\n <p class=\"g2-card__total\" [innerHTML]=\"total\"></p>\n }\n </div>\n </div>\n <div class=\"g2-card__desc\" [style.height]=\"_height\">\n <div [class.g2-card__fixed]=\"!!_orgHeight\">\n <ng-content />\n </div>\n </div>\n @if (footer) {\n <div class=\"g2-card__footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n }\n </nz-spin>\n</nz-card>\n", dependencies: [{ kind: "component", type: NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CardComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{ selector: 'g2-card', exportAs: 'g2Card', host: { '[class.g2-card]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NzCardComponent, NzSpinComponent, NzStringTemplateOutletDirective], 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 @if (title) {\n <span class=\"g2-card__meta-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n }\n @if (action) {\n <span class=\"g2-card__meta-action\">\n <ng-container *nzStringTemplateOutlet=\"action\">{{ action }}</ng-container>\n </span>\n }\n </div>\n @if (total) {\n <p class=\"g2-card__total\" [innerHTML]=\"total\"></p>\n }\n </div>\n </div>\n <div class=\"g2-card__desc\" [style.height]=\"_height\">\n <div [class.g2-card__fixed]=\"!!_orgHeight\">\n <ng-content />\n </div>\n </div>\n @if (footer) {\n <div class=\"g2-card__footer\">\n <ng-container *nzStringTemplateOutlet=\"footer\">{{ footer }}</ng-container>\n </div>\n }\n </nz-spin>\n</nz-card>\n" }]
|
|
34
34
|
}], propDecorators: { bordered: [{
|
|
@@ -53,11 +53,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
53
53
|
|
|
54
54
|
const COMPONENTS = [G2CardComponent];
|
|
55
55
|
class G2CardModule {
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
57
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
58
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
57
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2CardModule, imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule, G2CardComponent], exports: [G2CardComponent] });
|
|
58
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CardModule, imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule, COMPONENTS] });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CardModule, decorators: [{
|
|
61
61
|
type: NgModule,
|
|
62
62
|
args: [{
|
|
63
63
|
imports: [CommonModule, NzCardModule, NzSpinModule, NzOutletModule, ...COMPONENTS],
|
|
@@ -58,10 +58,10 @@ class ChartEChartsService {
|
|
|
58
58
|
ngOnDestroy() {
|
|
59
59
|
this.notify$.unsubscribe();
|
|
60
60
|
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
62
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
61
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
62
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsService, providedIn: 'root' });
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsService, decorators: [{
|
|
65
65
|
type: Injectable,
|
|
66
66
|
args: [{ providedIn: 'root' }]
|
|
67
67
|
}], ctorParameters: () => [] });
|
|
@@ -176,8 +176,8 @@ class ChartEChartsComponent {
|
|
|
176
176
|
this.on.forEach(item => this._chart?.off(item.eventName));
|
|
177
177
|
this.destroy();
|
|
178
178
|
}
|
|
179
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
180
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
179
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
180
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ChartEChartsComponent, isStandalone: true, 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: `
|
|
181
181
|
@if (!loaded) {
|
|
182
182
|
<nz-skeleton />
|
|
183
183
|
}
|
|
@@ -187,7 +187,7 @@ class ChartEChartsComponent {
|
|
|
187
187
|
__decorate([
|
|
188
188
|
ZoneOutside()
|
|
189
189
|
], ChartEChartsComponent.prototype, "load", null);
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsComponent, decorators: [{
|
|
191
191
|
type: Component,
|
|
192
192
|
args: [{
|
|
193
193
|
selector: 'chart-echarts, [chart-echarts]',
|
|
@@ -229,11 +229,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
229
229
|
|
|
230
230
|
const COMPONENTS = [ChartEChartsComponent];
|
|
231
231
|
class ChartEChartsModule {
|
|
232
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
233
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
234
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
232
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
233
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsModule, imports: [CommonModule, NzSkeletonModule, ChartEChartsComponent], exports: [ChartEChartsComponent] });
|
|
234
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsModule, imports: [CommonModule, NzSkeletonModule, COMPONENTS] });
|
|
235
235
|
}
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ChartEChartsModule, decorators: [{
|
|
237
237
|
type: NgModule,
|
|
238
238
|
args: [{
|
|
239
239
|
imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-echarts.mjs","sources":["../../../../packages/chart/chart-echarts/echarts.service.ts","../../../../packages/chart/chart-echarts/echarts.component.ts","../../../../packages/chart/chart-echarts/echarts.module.ts","../../../../packages/chart/chart-echarts/chart-echarts.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject } 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 ChartEChartsService implements OnDestroy {\n private readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\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 echartsLib: 'https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/echarts.min.js'\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor() {\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\n .load(this.cog.echartsLib!)\n .then(() => {\n const extensions = this.cog.echartsExtensions;\n if (Array.isArray(extensions) && extensions.length > 0) {\n return this.lazySrv.load(extensions).then(() => true);\n }\n return Promise.resolve(true);\n })\n .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 ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent, debounceTime, filter } from 'rxjs';\n\nimport { NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzSkeletonComponent } from 'ng-zorro-antd/skeleton';\n\nimport { ChartEChartsService } from './echarts.service';\nimport {\n ChartECharts,\n ChartEChartsEvent,\n ChartEChartsEventType,\n ChartEChartsOn,\n ChartEChartsOption\n} from './echarts.types';\n\n@Component({\n selector: 'chart-echarts, [chart-echarts]',\n exportAs: 'chartECharts',\n template: `\n @if (!loaded) {\n <nz-skeleton />\n }\n <div #container [style.width]=\"_width\" [style.height]=\"_height\"></div>\n `,\n host: {\n '[style.display]': `'inline-block'`,\n '[style.width]': `_width`,\n '[style.height]': `_height`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzSkeletonComponent]\n})\nexport class ChartEChartsComponent implements OnInit, OnDestroy {\n static ngAcceptInputType_width: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n\n private readonly srv = inject(ChartEChartsService);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly ngZone = inject(NgZone);\n private readonly platform = inject(Platform);\n\n @ViewChild('container', { static: true }) private node!: ElementRef;\n private destroy$ = inject(DestroyRef);\n private _chart: ChartECharts | null = null;\n private _theme?: string | Record<string, unknown> | null;\n private _initOpt?: {\n renderer?: NzSafeAny;\n devicePixelRatio?: number;\n width?: number;\n height?: number;\n locale?: NzSafeAny;\n };\n private _option!: ChartEChartsOption;\n _width = '100%';\n _height = '400px';\n\n @Input()\n set width(val: NumberInput) {\n this._width = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input() set height(val: NumberInput) {\n this._height = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input()\n set theme(value: string | Record<string, unknown> | null | undefined) {\n this._theme = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set initOpt(value: NzSafeAny) {\n this._initOpt = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set option(value: ChartEChartsOption) {\n this._option = value;\n if (this._chart) {\n this.setOption(value, true);\n }\n }\n @Input() on: ChartEChartsOn[] = [];\n @Output() readonly events = new EventEmitter<ChartEChartsEvent>();\n\n get chart(): ChartECharts | null {\n return this._chart;\n }\n loaded = false;\n\n constructor() {\n this.srv.notify\n .pipe(\n takeUntilDestroyed(),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n\n this.theme = this.srv.cog.echartsTheme;\n }\n\n private emit(type: ChartEChartsEventType, other?: ChartEChartsEvent): void {\n this.events.emit({ type, chart: this.chart!!, ...other });\n }\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n this.emit('ready');\n this.install();\n }\n\n install(): this {\n this.destroy();\n const chart = (this._chart = (window as NzSafeAny).echarts.init(\n this.node.nativeElement,\n this._theme,\n this._initOpt\n )) as ChartECharts;\n this.emit('init');\n this.setOption(this._option);\n // on\n this.on.forEach(item => {\n if (item.query != null) {\n chart.on(item.eventName, item.query, event => item.handler({ event, chart }));\n } else {\n chart.on(item.eventName, event => item.handler({ event, chart }));\n }\n });\n return this;\n }\n\n destroy(): this {\n if (this._chart) {\n this._chart.dispose();\n this.emit('destroy');\n }\n return this;\n }\n\n setOption(option: ChartEChartsOption, notMerge: boolean = false, lazyUpdate: boolean = false): this {\n if (this._chart) {\n this._chart.setOption(option, notMerge, lazyUpdate);\n this.emit('set-option', { option } as NzSafeAny);\n }\n return this;\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if ((window as NzSafeAny).echarts) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n\n fromEvent(window, 'resize')\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this._chart!!.resize());\n }\n\n ngOnDestroy(): void {\n this.on.forEach(item => this._chart?.off(item.eventName));\n this.destroy();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { ChartEChartsComponent } from './echarts.component';\n\nconst COMPONENTS = [ChartEChartsComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ChartEChartsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAOa,mBAAmB,CAAA;AACb,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACnC,IAAA,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC;AACtC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,KAAK;AACd,IAAA,OAAO,GAAG,IAAI,OAAO,EAAQ;AAErC,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;IAElB,IAAI,GAAG,CAAC,GAAqB,EAAA;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;AACE,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,UAAU,EAAE;SACO,EACrB,GAAG,CACH;;AAGJ,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;;IAG1B,OAAO,GAAA;AACL,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;;AAErB,YAAA,OAAO,IAAI;;AAEb,QAAA,IAA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CAAA;sBAAV;gBACkB,MAAM,EAAA,CAAA;sBAAxB;gBAuBO,IAAI,EAAA,EAAA,EAAA,EAAA,CAAA;;ACzHd,MAAM,UAAU,GAAG,CAAC,qBAAqB,CAAC;MAM7B,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHnB,YAAY,EAAE,gBAAgB,EAHtB,qBAAqB,aAArB,qBAAqB,CAAA,EAAA,CAAA;AAM5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAHnB,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAG5C,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC;AACxD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"chart-echarts.mjs","sources":["../../../../packages/chart/chart-echarts/echarts.service.ts","../../../../packages/chart/chart-echarts/echarts.component.ts","../../../../packages/chart/chart-echarts/echarts.module.ts","../../../../packages/chart/chart-echarts/chart-echarts.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject } 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 ChartEChartsService implements OnDestroy {\n private readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\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 echartsLib: 'https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/echarts.min.js'\n } as AlainChartConfig,\n val\n )!;\n }\n\n constructor() {\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\n .load(this.cog.echartsLib!)\n .then(() => {\n const extensions = this.cog.echartsExtensions;\n if (Array.isArray(extensions) && extensions.length > 0) {\n return this.lazySrv.load(extensions).then(() => true);\n }\n return Promise.resolve(true);\n })\n .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 ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent, debounceTime, filter } from 'rxjs';\n\nimport { NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzSkeletonComponent } from 'ng-zorro-antd/skeleton';\n\nimport { ChartEChartsService } from './echarts.service';\nimport {\n ChartECharts,\n ChartEChartsEvent,\n ChartEChartsEventType,\n ChartEChartsOn,\n ChartEChartsOption\n} from './echarts.types';\n\n@Component({\n selector: 'chart-echarts, [chart-echarts]',\n exportAs: 'chartECharts',\n template: `\n @if (!loaded) {\n <nz-skeleton />\n }\n <div #container [style.width]=\"_width\" [style.height]=\"_height\"></div>\n `,\n host: {\n '[style.display]': `'inline-block'`,\n '[style.width]': `_width`,\n '[style.height]': `_height`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzSkeletonComponent]\n})\nexport class ChartEChartsComponent implements OnInit, OnDestroy {\n static ngAcceptInputType_width: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n\n private readonly srv = inject(ChartEChartsService);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly ngZone = inject(NgZone);\n private readonly platform = inject(Platform);\n\n @ViewChild('container', { static: true }) private node!: ElementRef;\n private destroy$ = inject(DestroyRef);\n private _chart: ChartECharts | null = null;\n private _theme?: string | Record<string, unknown> | null;\n private _initOpt?: {\n renderer?: NzSafeAny;\n devicePixelRatio?: number;\n width?: number;\n height?: number;\n locale?: NzSafeAny;\n };\n private _option!: ChartEChartsOption;\n _width = '100%';\n _height = '400px';\n\n @Input()\n set width(val: NumberInput) {\n this._width = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input() set height(val: NumberInput) {\n this._height = typeof val === 'number' ? `${val}px` : `${val}`;\n }\n @Input()\n set theme(value: string | Record<string, unknown> | null | undefined) {\n this._theme = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set initOpt(value: NzSafeAny) {\n this._initOpt = value;\n if (this._chart) {\n this.install();\n }\n }\n @Input()\n set option(value: ChartEChartsOption) {\n this._option = value;\n if (this._chart) {\n this.setOption(value, true);\n }\n }\n @Input() on: ChartEChartsOn[] = [];\n @Output() readonly events = new EventEmitter<ChartEChartsEvent>();\n\n get chart(): ChartECharts | null {\n return this._chart;\n }\n loaded = false;\n\n constructor() {\n this.srv.notify\n .pipe(\n takeUntilDestroyed(),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n\n this.theme = this.srv.cog.echartsTheme;\n }\n\n private emit(type: ChartEChartsEventType, other?: ChartEChartsEvent): void {\n this.events.emit({ type, chart: this.chart!, ...other });\n }\n\n @ZoneOutside()\n private load(): void {\n this.ngZone.run(() => {\n this.loaded = true;\n this.cdr.detectChanges();\n });\n this.emit('ready');\n this.install();\n }\n\n install(): this {\n this.destroy();\n const chart = (this._chart = (window as NzSafeAny).echarts.init(\n this.node.nativeElement,\n this._theme,\n this._initOpt\n )) as ChartECharts;\n this.emit('init');\n this.setOption(this._option);\n // on\n this.on.forEach(item => {\n if (item.query != null) {\n chart.on(item.eventName, item.query, event => item.handler({ event, chart }));\n } else {\n chart.on(item.eventName, event => item.handler({ event, chart }));\n }\n });\n return this;\n }\n\n destroy(): this {\n if (this._chart) {\n this._chart.dispose();\n this.emit('destroy');\n }\n return this;\n }\n\n setOption(option: ChartEChartsOption, notMerge: boolean = false, lazyUpdate: boolean = false): this {\n if (this._chart) {\n this._chart.setOption(option, notMerge, lazyUpdate);\n this.emit('set-option', { option } as NzSafeAny);\n }\n return this;\n }\n\n ngOnInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if ((window as NzSafeAny).echarts) {\n this.load();\n } else {\n this.srv.libLoad();\n }\n\n fromEvent(window, 'resize')\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter(() => !!this._chart),\n debounceTime(200)\n )\n .subscribe(() => this._chart!.resize());\n }\n\n ngOnDestroy(): void {\n this.on.forEach(item => this._chart?.off(item.eventName));\n this.destroy();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { ChartEChartsComponent } from './echarts.component';\n\nconst COMPONENTS = [ChartEChartsComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ChartEChartsModule {}\n","/**\n * Generated bundle index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HnB,YAAY,EAAE,gBAAgB,EAHtB,qBAAqB,aAArB,qBAAqB,CAAA,EAAA,CAAA;AAM5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAHnB,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAG5C,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC;AACxD,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/fesm2022/core.mjs
CHANGED
|
@@ -49,10 +49,10 @@ class G2Service {
|
|
|
49
49
|
ngOnDestroy() {
|
|
50
50
|
this.notify$.unsubscribe();
|
|
51
51
|
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
53
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2Service, providedIn: 'root' });
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2Service, decorators: [{
|
|
56
56
|
type: Injectable,
|
|
57
57
|
args: [{ providedIn: 'root' }]
|
|
58
58
|
}], ctorParameters: () => [] });
|
|
@@ -91,6 +91,7 @@ class G2BaseComponent {
|
|
|
91
91
|
/** 等同 `ngOnInit` */
|
|
92
92
|
onInit() { }
|
|
93
93
|
/** 等同 `ngOnChanges` */
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
94
95
|
onChanges(_) { }
|
|
95
96
|
load() {
|
|
96
97
|
this.ngZone.run(() => {
|
|
@@ -140,8 +141,8 @@ class G2BaseComponent {
|
|
|
140
141
|
this.destroy$.complete();
|
|
141
142
|
this.destroyChart();
|
|
142
143
|
}
|
|
143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
144
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
145
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.6", type: G2BaseComponent, isStandalone: true, inputs: { repaint: ["repaint", "repaint", booleanAttribute], delay: ["delay", "delay", numberAttribute], theme: "theme" }, outputs: { ready: "ready" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
145
146
|
}
|
|
146
147
|
__decorate([
|
|
147
148
|
ZoneOutside()
|
|
@@ -149,7 +150,7 @@ __decorate([
|
|
|
149
150
|
__decorate([
|
|
150
151
|
ZoneOutside()
|
|
151
152
|
], G2BaseComponent.prototype, "destroyChart", null);
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2BaseComponent, decorators: [{
|
|
153
154
|
type: Directive
|
|
154
155
|
}], ctorParameters: () => [], propDecorators: { repaint: [{
|
|
155
156
|
type: Input,
|
package/fesm2022/core.mjs.map
CHANGED
|
@@ -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, inject } 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 readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\n\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.46/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() {\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 booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { Subject, Subscription, filter, takeUntil } from 'rxjs';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { 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 protected readonly srv = inject(G2Service);\n protected readonly el: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>);\n protected readonly ngZone = inject(NgZone);\n protected readonly platform = inject(Platform);\n protected readonly cdr = inject(ChangeDetectorRef);\n\n get chart(): Chart {\n return this._chart;\n }\n\n get winG2(): NzSafeAny {\n return (window as NzSafeAny).G2;\n }\n\n constructor() {\n this.theme = this.srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n @Input({ transform: booleanAttribute }) 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({ transform: numberAttribute }) 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 (this.winG2) {\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,CAAA;AACH,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACnC,IAAA,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC;AAEtC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,KAAK;AACd,IAAA,OAAO,GAAG,IAAI,OAAO,EAAQ;AAErC,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;IAElB,IAAI,GAAG,CAAC,GAAqB,EAAA;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;AACE,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,IAAI,EAAE;gBACJ,mEAAmE;gBACnE;AACD;SACkB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AI;AACjB,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE;AACT,YAAA,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;AAChC,YAAA,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AACvC,YAAA,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK;AACxC,SAAA;AACD,QAAA,GAAG;KACJ;AACD,IAAA,IAAI,IAAI,KAAK,MAAM,EAAE;AACnB,QAAA,GAAG,CAAC,QAAQ,GAAG,KAAK;AACpB,QAAA,GAAG,CAAC,SAAU,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE;AACpG,QAAA,GAAG,CAAC,OAAO,GAAG,CAAA,gBAAA,CAAkB;AAChC,QAAA,GAAG,CAAC,MAAM,GAAG,CAAC;;AAGhB,IAAA,OAAO,GAAG;AACZ;;ACtBA;;AAEG;;;;"}
|
|
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, inject } 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 readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\n\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.46/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() {\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 booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { Subject, Subscription, filter, takeUntil } from 'rxjs';\n\nimport type { Chart, Types } from '@antv/g2';\n\nimport { 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 protected readonly srv = inject(G2Service);\n protected readonly el: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>);\n protected readonly ngZone = inject(NgZone);\n protected readonly platform = inject(Platform);\n protected readonly cdr = inject(ChangeDetectorRef);\n\n get chart(): Chart {\n return this._chart;\n }\n\n get winG2(): NzSafeAny {\n return (window as NzSafeAny).G2;\n }\n\n constructor() {\n this.theme = this.srv.cog.theme!;\n this.srv.notify\n .pipe(\n takeUntil(this.destroy$),\n filter(() => !this.loaded)\n )\n .subscribe(() => this.load());\n }\n @Input({ transform: booleanAttribute }) 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({ transform: numberAttribute }) 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 // eslint-disable-next-line @typescript-eslint/no-unused-vars\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 (this.winG2) {\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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|
@@ -25,15 +25,15 @@ class G2CustomComponent extends G2BaseComponent {
|
|
|
25
25
|
.pipe(takeUntil(this.destroy$), debounceTime(Math.min(200, this.resizeTime)))
|
|
26
26
|
.subscribe(() => this.resize.emit(this.el));
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2CustomComponent, isStandalone: true, selector: "g2,g2-custom", inputs: { height: ["height", "height", numberAttribute], resizeTime: ["resizeTime", "resizeTime", numberAttribute] }, outputs: { render: "render", resize: "resize", destroy: "destroy" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2Custom"], usesInheritance: true, ngImport: i0, template: `
|
|
30
30
|
@if (!loaded) {
|
|
31
31
|
<nz-skeleton />
|
|
32
32
|
}
|
|
33
33
|
<ng-content />
|
|
34
34
|
`, isInline: true, dependencies: [{ kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CustomComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
38
|
args: [{
|
|
39
39
|
selector: 'g2,g2-custom',
|
|
@@ -68,11 +68,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
68
68
|
|
|
69
69
|
const COMPONENTS = [G2CustomComponent];
|
|
70
70
|
class G2CustomModule {
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
72
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
73
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CustomModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
72
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2CustomModule, imports: [CommonModule, NzSkeletonModule, G2CustomComponent], exports: [G2CustomComponent] });
|
|
73
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CustomModule, imports: [CommonModule, NzSkeletonModule, COMPONENTS] });
|
|
74
74
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2CustomModule, decorators: [{
|
|
76
76
|
type: NgModule,
|
|
77
77
|
args: [{
|
|
78
78
|
imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/gauge.mjs
CHANGED
|
@@ -132,12 +132,12 @@ class G2GaugeComponent extends G2BaseComponent {
|
|
|
132
132
|
});
|
|
133
133
|
_chart.changeData(data);
|
|
134
134
|
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
136
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2GaugeComponent, isStandalone: true, selector: "g2-gauge", inputs: { title: "title", height: ["height", "height", numberAttribute], color: "color", bgColor: "bgColor", format: "format", percent: ["percent", "percent", numberAttribute], padding: "padding" }, host: { properties: { "class.g2-gauge": "true" } }, exportAs: ["g2Gauge"], usesInheritance: true, ngImport: i0, template: `@if (!loaded) {
|
|
137
137
|
<nz-skeleton />
|
|
138
138
|
}`, isInline: true, dependencies: [{ kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeComponent, decorators: [{
|
|
141
141
|
type: Component,
|
|
142
142
|
args: [{
|
|
143
143
|
selector: 'g2-gauge',
|
|
@@ -173,11 +173,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
173
173
|
|
|
174
174
|
const COMPONENTS = [G2GaugeComponent];
|
|
175
175
|
class G2GaugeModule {
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
177
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
178
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
177
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeModule, imports: [CommonModule, NzSkeletonModule, G2GaugeComponent], exports: [G2GaugeComponent] });
|
|
178
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeModule, imports: [CommonModule, NzSkeletonModule, COMPONENTS] });
|
|
179
179
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2GaugeModule, decorators: [{
|
|
181
181
|
type: NgModule,
|
|
182
182
|
args: [{
|
|
183
183
|
imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/mini-area.mjs
CHANGED
|
@@ -70,10 +70,10 @@ class G2MiniAreaComponent extends G2BaseComponent {
|
|
|
70
70
|
return;
|
|
71
71
|
_chart.changeData(data);
|
|
72
72
|
}
|
|
73
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
74
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.
|
|
73
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: G2MiniAreaComponent, isStandalone: true, selector: "g2-mini-area", inputs: { color: "color", borderColor: "borderColor", borderWidth: ["borderWidth", "borderWidth", numberAttribute], height: ["height", "height", numberAttribute], fit: ["fit", "fit", booleanAttribute], line: ["line", "line", booleanAttribute], animate: ["animate", "animate", booleanAttribute], 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 });
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
78
|
args: [{
|
|
79
79
|
selector: 'g2-mini-area',
|
|
@@ -123,11 +123,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
123
123
|
|
|
124
124
|
const COMPONENTS = [G2MiniAreaComponent];
|
|
125
125
|
class G2MiniAreaModule {
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
127
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
128
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
127
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaModule, imports: [CommonModule, G2MiniAreaComponent], exports: [G2MiniAreaComponent] });
|
|
128
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaModule, imports: [CommonModule] });
|
|
129
129
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniAreaModule, decorators: [{
|
|
131
131
|
type: NgModule,
|
|
132
132
|
args: [{
|
|
133
133
|
imports: [CommonModule, ...COMPONENTS],
|
package/fesm2022/mini-bar.mjs
CHANGED
|
@@ -56,10 +56,10 @@ class G2MiniBarComponent extends G2BaseComponent {
|
|
|
56
56
|
return;
|
|
57
57
|
_chart.changeData(data);
|
|
58
58
|
}
|
|
59
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
60
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.
|
|
59
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: G2MiniBarComponent, isStandalone: true, selector: "g2-mini-bar", inputs: { color: "color", height: ["height", "height", numberAttribute], borderWidth: ["borderWidth", "borderWidth", numberAttribute], 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 });
|
|
61
61
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarComponent, decorators: [{
|
|
63
63
|
type: Component,
|
|
64
64
|
args: [{
|
|
65
65
|
selector: 'g2-mini-bar',
|
|
@@ -94,11 +94,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
94
94
|
|
|
95
95
|
const COMPONENTS = [G2MiniBarComponent];
|
|
96
96
|
class G2MiniBarModule {
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
98
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
99
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
97
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
98
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarModule, imports: [CommonModule, G2MiniBarComponent], exports: [G2MiniBarComponent] });
|
|
99
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarModule, imports: [CommonModule] });
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniBarModule, decorators: [{
|
|
102
102
|
type: NgModule,
|
|
103
103
|
args: [{
|
|
104
104
|
imports: [CommonModule, ...COMPONENTS],
|
|
@@ -19,8 +19,8 @@ class G2MiniProgressComponent {
|
|
|
19
19
|
this.percent = this.fixNum(this.percent);
|
|
20
20
|
this.cdr.detectChanges();
|
|
21
21
|
}
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
23
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: G2MiniProgressComponent, isStandalone: true, selector: "g2-mini-progress", inputs: { color: "color", target: ["target", "target", numberAttribute], percent: ["percent", "percent", numberAttribute], strokeWidth: ["strokeWidth", "strokeWidth", numberAttribute] }, host: { properties: { "class.g2-mini-progress": "true" } }, exportAs: ["g2MiniProgress"], usesOnChanges: true, ngImport: i0, template: `
|
|
24
24
|
<div
|
|
25
25
|
nz-tooltip
|
|
26
26
|
[nzTooltipTitle]="targetSuffix + target + '%'"
|
|
@@ -38,7 +38,7 @@ class G2MiniProgressComponent {
|
|
|
38
38
|
</div>
|
|
39
39
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressComponent, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
43
|
args: [{
|
|
44
44
|
selector: 'g2-mini-progress',
|
|
@@ -81,11 +81,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
81
81
|
|
|
82
82
|
const COMPONENTS = [G2MiniProgressComponent];
|
|
83
83
|
class G2MiniProgressModule {
|
|
84
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
85
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
86
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
85
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressModule, imports: [CommonModule, DelonLocaleModule, NzToolTipModule, G2MiniProgressComponent], exports: [G2MiniProgressComponent] });
|
|
86
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressModule, imports: [CommonModule, DelonLocaleModule, NzToolTipModule] });
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2MiniProgressModule, decorators: [{
|
|
89
89
|
type: NgModule,
|
|
90
90
|
args: [{
|
|
91
91
|
imports: [CommonModule, DelonLocaleModule, NzToolTipModule, ...COMPONENTS],
|
package/fesm2022/number-info.mjs
CHANGED
|
@@ -21,10 +21,10 @@ class NumberInfoComponent {
|
|
|
21
21
|
theme = 'light';
|
|
22
22
|
/** 设置数字和描述直接的间距(像素) */
|
|
23
23
|
gap = 8;
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: NumberInfoComponent, isStandalone: true, selector: "number-info", inputs: { title: "title", subTitle: "subTitle", total: "total", subTotal: "subTotal", suffix: "suffix", status: "status", theme: "theme", gap: ["gap", "gap", numberAttribute] }, host: { properties: { "class.number-info": "true", "class.number-info__light": "theme === 'light'", "class.number-info__default": "theme === 'default'" } }, exportAs: ["numberInfo"], ngImport: i0, template: "@if (title) {\n <div class=\"number-info__title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </div>\n}\n@if (subTitle) {\n <div class=\"number-info__title-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTitle\">{{ subTitle }}</ng-container>\n </div>\n}\n<div class=\"number-info__value\" [style.margin-top.px]=\"gap\">\n <span class=\"number-info__value-text\">\n <ng-container *nzStringTemplateOutlet=\"total\">{{ total }}</ng-container>\n @if (suffix) {\n <em class=\"number-info__value-suffix\">{{ suffix }}</em>\n }\n </span>\n @if (status || subTotal) {\n <span class=\"number-info__value-text number-info__value-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTotal\">{{ subTotal }}</ng-container>\n @if (status) {\n <nz-icon nzType=\"caret-{{ status }}\" />\n }\n </span>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{ selector: 'number-info', exportAs: 'numberInfo', host: {
|
|
30
30
|
'[class.number-info]': `true`,
|
|
@@ -52,11 +52,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
52
52
|
|
|
53
53
|
const COMPONENTS = [NumberInfoComponent];
|
|
54
54
|
class NumberInfoModule {
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
56
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
57
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
56
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoModule, imports: [CommonModule, NzIconModule, NzOutletModule, NumberInfoComponent], exports: [NumberInfoComponent] });
|
|
57
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoModule, imports: [CommonModule, NzIconModule, NzOutletModule] });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInfoModule, decorators: [{
|
|
60
60
|
type: NgModule,
|
|
61
61
|
args: [{
|
|
62
62
|
imports: [CommonModule, NzIconModule, NzOutletModule, ...COMPONENTS],
|
package/fesm2022/pie.mjs
CHANGED
|
@@ -147,10 +147,10 @@ class G2PieComponent extends G2BaseComponent {
|
|
|
147
147
|
onChanges() {
|
|
148
148
|
this.fixData();
|
|
149
149
|
}
|
|
150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
151
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2PieComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2PieComponent, isStandalone: true, selector: "g2-pie", inputs: { animate: ["animate", "animate", booleanAttribute], color: "color", subTitle: "subTitle", total: "total", height: ["height", "height", numberAttribute], hasLegend: ["hasLegend", "hasLegend", booleanAttribute], inner: "inner", padding: "padding", percent: ["percent", "percent", numberAttribute], tooltip: ["tooltip", "tooltip", booleanAttribute], lineWidth: ["lineWidth", "lineWidth", numberAttribute], blockMaxWidth: ["blockMaxWidth", "blockMaxWidth", numberAttribute], select: ["select", "select", booleanAttribute], valueFormat: "valueFormat", data: "data", colors: "colors", interaction: "interaction", ratio: "ratio" }, outputs: { clickItem: "clickItem" }, host: { properties: { "class.g2-pie": "true", "class.g2-pie__legend-has": "hasLegend", "class.g2-pie__legend-block": "block", "class.g2-pie__mini": "isPercent" } }, exportAs: ["g2Pie"], usesInheritance: true, ngImport: i0, template: "@if (!loaded) {\n <nz-skeleton />\n}\n<div class=\"g2-pie__chart\">\n <div #container></div>\n @if (subTitle || total) {\n <div class=\"g2-pie__total\">\n @if (subTitle) {\n <h4 class=\"g2-pie__total-title\">\n <ng-container *nzStringTemplateOutlet=\"subTitle\">\n <div [innerHTML]=\"subTitle\"></div>\n </ng-container>\n </h4>\n }\n @if (total) {\n <div class=\"g2-pie__total-stat\">\n <ng-container *nzStringTemplateOutlet=\"total\">\n <div [innerHTML]=\"total\"></div>\n </ng-container>\n </div>\n }\n </div>\n }\n</div>\n@if (hasLegend && legendData.length > 0) {\n <ul class=\"g2-pie__legend\">\n @for (item of legendData; track $index) {\n <li (click)=\"_click($index)\" class=\"g2-pie__legend-item\">\n <span class=\"g2-pie__legend-dot\" [style]=\"{ 'background-color': !item.checked ? '#aaa' : item.color }\"></span>\n <span class=\"g2-pie__legend-title\">{{ item.x }}</span>\n <nz-divider nzType=\"vertical\" />\n <span class=\"g2-pie__legend-percent\">{{ item.percent }}%</span>\n <span class=\"g2-pie__legend-value\" [innerHTML]=\"valueFormat ? valueFormat(item.y) : item.y\"></span>\n </li>\n }\n </ul>\n}\n", dependencies: [{ kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
152
152
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2PieComponent, decorators: [{
|
|
154
154
|
type: Component,
|
|
155
155
|
args: [{ selector: 'g2-pie', exportAs: 'g2Pie', host: {
|
|
156
156
|
'[class.g2-pie]': 'true',
|
|
@@ -208,11 +208,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
208
208
|
|
|
209
209
|
const COMPONENTS = [G2PieComponent];
|
|
210
210
|
class G2PieModule {
|
|
211
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
212
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
213
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2PieModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
212
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2PieModule, imports: [CommonModule, NzDividerModule, NzOutletModule, NzSkeletonModule, G2PieComponent], exports: [G2PieComponent] });
|
|
213
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2PieModule, imports: [CommonModule, NzDividerModule, NzOutletModule, NzSkeletonModule, COMPONENTS] });
|
|
214
214
|
}
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2PieModule, decorators: [{
|
|
216
216
|
type: NgModule,
|
|
217
217
|
args: [{
|
|
218
218
|
imports: [CommonModule, NzDividerModule, NzOutletModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/radar.mjs
CHANGED
|
@@ -109,10 +109,10 @@ class G2RadarComponent extends G2BaseComponent {
|
|
|
109
109
|
onChanges() {
|
|
110
110
|
this.legendData.forEach(i => (i.checked = true));
|
|
111
111
|
}
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
113
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2RadarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2RadarComponent, isStandalone: true, selector: "g2-radar", inputs: { title: "title", height: ["height", "height", numberAttribute], padding: "padding", hasLegend: ["hasLegend", "hasLegend", booleanAttribute], tickCount: ["tickCount", "tickCount", numberAttribute], data: "data", colors: "colors" }, outputs: { clickItem: "clickItem" }, host: { properties: { "style.height.px": "height", "class.g2-radar": "true" } }, exportAs: ["g2Radar"], usesInheritance: true, ngImport: i0, template: "@if (!loaded) {\n <nz-skeleton />\n}\n<ng-container *nzStringTemplateOutlet=\"title\">\n <h4>{{ title }}</h4>\n</ng-container>\n<div #container></div>\n@if (hasLegend) {\n <div nz-row class=\"g2-radar__legend\">\n @for (i of legendData; track $index) {\n <div nz-col [nzSpan]=\"24 / legendData.length\" (click)=\"_click($index)\" class=\"g2-radar__legend-item\">\n <i class=\"g2-radar__legend-dot\" [style]=\"{ 'background-color': !i.checked ? '#aaa' : i.color }\"></i>\n {{ i.name }}\n <h6 class=\"g2-radar__legend-title\">{{ i.value }}</h6>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "directive", type: NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2RadarComponent, decorators: [{
|
|
116
116
|
type: Component,
|
|
117
117
|
args: [{ selector: 'g2-radar', exportAs: 'g2Radar', host: {
|
|
118
118
|
'[style.height.px]': 'height',
|
|
@@ -141,11 +141,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
141
141
|
|
|
142
142
|
const COMPONENTS = [G2RadarComponent];
|
|
143
143
|
class G2RadarModule {
|
|
144
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
145
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
146
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2RadarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
145
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2RadarModule, imports: [CommonModule, NzGridModule, NzOutletModule, NzSkeletonModule, G2RadarComponent], exports: [G2RadarComponent] });
|
|
146
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2RadarModule, imports: [CommonModule, NzGridModule, NzOutletModule, NzSkeletonModule, COMPONENTS] });
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2RadarModule, decorators: [{
|
|
149
149
|
type: NgModule,
|
|
150
150
|
args: [{
|
|
151
151
|
imports: [CommonModule, NzGridModule, NzOutletModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/single-bar.mjs
CHANGED
|
@@ -65,10 +65,10 @@ class G2SingleBarComponent extends G2BaseComponent {
|
|
|
65
65
|
return;
|
|
66
66
|
_chart.changeData([{ value }]);
|
|
67
67
|
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: G2SingleBarComponent, isStandalone: true, selector: "g2-single-bar", inputs: { plusColor: "plusColor", minusColor: "minusColor", height: ["height", "height", numberAttribute], barSize: ["barSize", "barSize", numberAttribute], min: ["min", "min", numberAttribute], max: ["max", "max", numberAttribute], value: ["value", "value", numberAttribute], line: ["line", "line", booleanAttribute], format: "format", padding: "padding", textStyle: "textStyle" }, host: { properties: { "style.height.px": "height" } }, exportAs: ["g2SingleBar"], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarComponent, decorators: [{
|
|
72
72
|
type: Component,
|
|
73
73
|
args: [{
|
|
74
74
|
selector: 'g2-single-bar',
|
|
@@ -113,11 +113,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
113
113
|
|
|
114
114
|
const COMPONENTS = [G2SingleBarComponent];
|
|
115
115
|
class G2SingleBarModule {
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
117
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
118
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
117
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarModule, imports: [CommonModule, G2SingleBarComponent], exports: [G2SingleBarComponent] });
|
|
118
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarModule, imports: [CommonModule] });
|
|
119
119
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2SingleBarModule, decorators: [{
|
|
121
121
|
type: NgModule,
|
|
122
122
|
args: [{
|
|
123
123
|
imports: [CommonModule, ...COMPONENTS],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-bar.mjs","sources":["../../../../packages/chart/single-bar/single-bar.component.ts","../../../../packages/chart/single-bar/single-bar.module.ts","../../../../packages/chart/single-bar/single-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Input,\n SimpleChanges,\n ViewEncapsulation,\n booleanAttribute,\n numberAttribute\n} from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-single-bar',\n exportAs: 'g2SingleBar',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2SingleBarComponent extends G2BaseComponent {\n // #region fields\n\n @Input() plusColor = '#40a9ff';\n @Input() minusColor = '#ff4d4f';\n @Input({ transform: numberAttribute }) height = 60;\n @Input({ transform: numberAttribute }) barSize = 30;\n @Input({ transform: numberAttribute }) min = 0;\n @Input({ transform: numberAttribute }) max = 100;\n @Input({ transform: numberAttribute }) value = 0;\n @Input({ transform: booleanAttribute }) line = false;\n @Input() format?: (value: number, item: NzSafeAny, index: number) => string;\n @Input() padding: number | number[] | 'auto' = 0;\n @Input() textStyle:
|
|
1
|
+
{"version":3,"file":"single-bar.mjs","sources":["../../../../packages/chart/single-bar/single-bar.component.ts","../../../../packages/chart/single-bar/single-bar.module.ts","../../../../packages/chart/single-bar/single-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Input,\n SimpleChanges,\n ViewEncapsulation,\n booleanAttribute,\n numberAttribute\n} from '@angular/core';\n\nimport type { Chart } from '@antv/g2';\n\nimport { G2BaseComponent } from '@delon/chart/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'g2-single-bar',\n exportAs: 'g2SingleBar',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2SingleBarComponent extends G2BaseComponent {\n // #region fields\n\n @Input() plusColor = '#40a9ff';\n @Input() minusColor = '#ff4d4f';\n @Input({ transform: numberAttribute }) height = 60;\n @Input({ transform: numberAttribute }) barSize = 30;\n @Input({ transform: numberAttribute }) min = 0;\n @Input({ transform: numberAttribute }) max = 100;\n @Input({ transform: numberAttribute }) value = 0;\n @Input({ transform: booleanAttribute }) line = false;\n @Input() format?: (value: number, item: NzSafeAny, index: number) => string;\n @Input() padding: number | number[] | 'auto' = 0;\n @Input() textStyle: Record<string, NzSafeAny> = { fontSize: 12, color: '#595959' };\n\n // #endregion\n\n install(): void {\n const { el, height, padding, textStyle, line, format, theme, min, max, plusColor, minusColor, barSize } = this;\n const chart: Chart = (this._chart = new this.winG2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.legend(false);\n chart.axis(false);\n chart.scale({ value: { max, min } });\n chart.tooltip(false);\n chart.coordinate().transpose();\n chart\n .interval()\n .position('1*value')\n .color('value', (val: number) => (val > 0 ? plusColor : minusColor))\n .size(barSize)\n .label('value', () => ({\n formatter: format,\n style: {\n ...textStyle\n }\n }));\n\n if (line) {\n chart.annotation().line({\n start: ['50%', '0%'],\n end: ['50%', '100%'],\n style: {\n stroke: '#e8e8e8',\n lineDash: [0, 0]\n }\n });\n }\n\n this.ready.next(chart);\n\n this.changeData();\n\n chart.render();\n }\n\n onlyChangeData = (changes: SimpleChanges): boolean => {\n return Object.keys(changes).length === 1 && !!changes.value;\n };\n\n changeData(): void {\n const { _chart, value } = this;\n if (!_chart) return;\n _chart.changeData([{ value }]);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { G2SingleBarComponent } from './single-bar.component';\n\nconst COMPONENTS = [G2SingleBarComponent];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class G2SingleBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AA0BM,MAAO,oBAAqB,SAAQ,eAAe,CAAA;;IAG9C,SAAS,GAAG,SAAS;IACrB,UAAU,GAAG,SAAS;IACQ,MAAM,GAAG,EAAE;IACX,OAAO,GAAG,EAAE;IACZ,GAAG,GAAG,CAAC;IACP,GAAG,GAAG,GAAG;IACT,KAAK,GAAG,CAAC;IACR,IAAI,GAAG,KAAK;AAC3C,IAAA,MAAM;IACN,OAAO,GAA+B,CAAC;IACvC,SAAS,GAA8B,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;;IAIlF,OAAO,GAAA;QACL,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,IAAI;AAC9G,QAAA,MAAM,KAAK,IAAW,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;YACvD,SAAS,EAAE,EAAE,CAAC,aAAa;AAC3B,YAAA,OAAO,EAAE,IAAI;YACb,MAAM;YACN,OAAO;YACP;AACD,SAAA,CAAC,CAAC;AACH,QAAA,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AACnB,QAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACjB,QAAA,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;AACpC,QAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACpB,QAAA,KAAK,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE;QAC9B;AACG,aAAA,QAAQ;aACR,QAAQ,CAAC,SAAS;aAClB,KAAK,CAAC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/fesm2022/tag-cloud.mjs
CHANGED
|
@@ -125,12 +125,12 @@ class G2TagCloudComponent extends G2BaseComponent {
|
|
|
125
125
|
onInit() {
|
|
126
126
|
this.installResizeEvent();
|
|
127
127
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2TagCloudComponent, isStandalone: true, selector: "g2-tag-cloud", inputs: { width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], padding: "padding", data: "data" }, outputs: { clickItem: "clickItem" }, exportAs: ["g2TagCloud"], usesInheritance: true, ngImport: i0, template: `@if (!loaded) {
|
|
130
130
|
<nz-skeleton />
|
|
131
131
|
}`, isInline: true, dependencies: [{ kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
132
132
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudComponent, decorators: [{
|
|
134
134
|
type: Component,
|
|
135
135
|
args: [{
|
|
136
136
|
selector: 'g2-tag-cloud',
|
|
@@ -159,11 +159,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
159
159
|
|
|
160
160
|
const COMPONENTS = [G2TagCloudComponent];
|
|
161
161
|
class G2TagCloudModule {
|
|
162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
163
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
164
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
163
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudModule, imports: [CommonModule, NzSkeletonModule, G2TagCloudComponent], exports: [G2TagCloudComponent] });
|
|
164
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudModule, imports: [CommonModule, NzSkeletonModule, COMPONENTS] });
|
|
165
165
|
}
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TagCloudModule, decorators: [{
|
|
167
167
|
type: NgModule,
|
|
168
168
|
args: [{
|
|
169
169
|
imports: [CommonModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/timeline.mjs
CHANGED
|
@@ -137,8 +137,8 @@ class G2TimelineComponent extends G2BaseComponent {
|
|
|
137
137
|
const filterData = data.filter(val => val._time >= initialRange.start && val._time <= initialRange.end);
|
|
138
138
|
_chart.changeData(filterData);
|
|
139
139
|
}
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2TimelineComponent, isStandalone: true, selector: "g2-timeline", inputs: { title: "title", maxAxis: ["maxAxis", "maxAxis", numberAttribute], data: "data", titleMap: "titleMap", colorMap: "colorMap", mask: "mask", maskSlider: "maskSlider", position: "position", height: ["height", "height", numberAttribute], padding: "padding", borderWidth: ["borderWidth", "borderWidth", numberAttribute], slider: ["slider", "slider", booleanAttribute] }, outputs: { clickItem: "clickItem" }, exportAs: ["g2Timeline"], usesInheritance: true, ngImport: i0, template: `
|
|
142
142
|
<ng-container *nzStringTemplateOutlet="title">
|
|
143
143
|
<h4>{{ title }}</h4>
|
|
144
144
|
</ng-container>
|
|
@@ -148,7 +148,7 @@ class G2TimelineComponent extends G2BaseComponent {
|
|
|
148
148
|
<div #container></div>
|
|
149
149
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzSkeletonComponent, selector: "nz-skeleton", inputs: ["nzActive", "nzLoading", "nzRound", "nzTitle", "nzAvatar", "nzParagraph"], exportAs: ["nzSkeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
150
150
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineComponent, decorators: [{
|
|
152
152
|
type: Component,
|
|
153
153
|
args: [{
|
|
154
154
|
selector: 'g2-timeline',
|
|
@@ -201,11 +201,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
201
201
|
|
|
202
202
|
const COMPONENTS = [G2TimelineComponent];
|
|
203
203
|
class G2TimelineModule {
|
|
204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
205
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
206
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
205
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineModule, imports: [CommonModule, NzOutletModule, NzSkeletonModule, G2TimelineComponent], exports: [G2TimelineComponent] });
|
|
206
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineModule, imports: [CommonModule, NzOutletModule, NzSkeletonModule, COMPONENTS] });
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2TimelineModule, decorators: [{
|
|
209
209
|
type: NgModule,
|
|
210
210
|
args: [{
|
|
211
211
|
imports: [CommonModule, NzOutletModule, NzSkeletonModule, ...COMPONENTS],
|
package/fesm2022/trend.mjs
CHANGED
|
@@ -10,15 +10,15 @@ class TrendComponent {
|
|
|
10
10
|
colorful = true;
|
|
11
11
|
/** 颜色反转 */
|
|
12
12
|
reverseColor = false;
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
14
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TrendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TrendComponent, isStandalone: true, selector: "trend", inputs: { flag: "flag", colorful: ["colorful", "colorful", booleanAttribute], reverseColor: ["reverseColor", "reverseColor", booleanAttribute] }, host: { properties: { "class.trend": "true", "class.trend__grey": "!colorful", "class.trend__reverse": "colorful && reverseColor", "attr.data-flag": "flag" } }, exportAs: ["trend"], ngImport: i0, template: `
|
|
15
15
|
<ng-content />
|
|
16
16
|
@if (flag) {
|
|
17
17
|
<span class="trend__{{ flag }}"><nz-icon nzType="caret-{{ flag }}" /></span>
|
|
18
18
|
}
|
|
19
19
|
`, isInline: true, dependencies: [{ kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TrendComponent, decorators: [{
|
|
22
22
|
type: Component,
|
|
23
23
|
args: [{
|
|
24
24
|
selector: 'trend',
|
|
@@ -52,11 +52,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
52
52
|
|
|
53
53
|
const COMPONENTS = [TrendComponent];
|
|
54
54
|
class TrendModule {
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
56
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
57
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TrendModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
56
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: TrendModule, imports: [CommonModule, NzIconModule, TrendComponent], exports: [TrendComponent] });
|
|
57
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TrendModule, imports: [CommonModule, NzIconModule] });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TrendModule, decorators: [{
|
|
60
60
|
type: NgModule,
|
|
61
61
|
args: [{
|
|
62
62
|
imports: [CommonModule, NzIconModule, ...COMPONENTS],
|
package/fesm2022/water-wave.mjs
CHANGED
|
@@ -184,10 +184,10 @@ class G2WaterWaveComponent {
|
|
|
184
184
|
this.resize$.unsubscribe();
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
188
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
188
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: G2WaterWaveComponent, isStandalone: true, selector: "g2-water-wave", inputs: { animate: ["animate", "animate", booleanAttribute], delay: ["delay", "delay", numberAttribute], title: "title", color: "color", height: ["height", "height", numberAttribute], percent: ["percent", "percent", numberAttribute] }, host: { properties: { "class.g2-water-wave": "true" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["container"], descendants: true, static: true }], exportAs: ["g2WaterWave"], usesOnChanges: true, ngImport: i0, template: "<div [style]=\"{ height: height + 'px', width: height + 'px', overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" [attr.width]=\"height * 2\" [attr.height]=\"height * 2\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [style]=\"{ width: height + 'px' }\">\n @if (title) {\n <span class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n }\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n", dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveComponent, decorators: [{
|
|
191
191
|
type: Component,
|
|
192
192
|
args: [{ selector: 'g2-water-wave', exportAs: 'g2WaterWave', host: { '[class.g2-water-wave]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NzStringTemplateOutletDirective], template: "<div [style]=\"{ height: height + 'px', width: height + 'px', overflow: 'hidden' }\">\n <canvas #container class=\"g2-water-wave__canvas\" [attr.width]=\"height * 2\" [attr.height]=\"height * 2\"></canvas>\n</div>\n<div class=\"g2-water-wave__desc\" [style]=\"{ width: height + 'px' }\">\n @if (title) {\n <span class=\"g2-water-wave__desc-title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n </span>\n }\n <h4 class=\"g2-water-wave__desc-percent\">{{ percent }}%</h4>\n</div>\n" }]
|
|
193
193
|
}], propDecorators: { node: [{
|
|
@@ -213,11 +213,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
213
213
|
|
|
214
214
|
const COMPONENTS = [G2WaterWaveComponent];
|
|
215
215
|
class G2WaterWaveModule {
|
|
216
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
217
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
218
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
217
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveModule, imports: [CommonModule, NzOutletModule, G2WaterWaveComponent], exports: [G2WaterWaveComponent] });
|
|
218
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveModule, imports: [CommonModule, NzOutletModule] });
|
|
219
219
|
}
|
|
220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: G2WaterWaveModule, decorators: [{
|
|
221
221
|
type: NgModule,
|
|
222
222
|
args: [{
|
|
223
223
|
imports: [CommonModule, NzOutletModule, ...COMPONENTS],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delon/chart",
|
|
3
|
-
"version": "19.0
|
|
3
|
+
"version": "19.2.0",
|
|
4
4
|
"author": "cipchk<cipchk@qq.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@antv/data-set": "^0.11.8",
|
|
29
|
-
"@antv/g2": "^4.2.
|
|
29
|
+
"@antv/g2": "^4.2.11",
|
|
30
30
|
"echarts": "^5.6.0",
|
|
31
|
-
"@delon/util": "^19.0
|
|
32
|
-
"@delon/theme": "^19.0
|
|
31
|
+
"@delon/util": "^19.2.0",
|
|
32
|
+
"@delon/theme": "^19.2.0",
|
|
33
33
|
"tslib": "^2.3.0"
|
|
34
34
|
},
|
|
35
35
|
"module": "fesm2022/chart.mjs",
|
|
@@ -13,9 +13,7 @@ export declare class G2SingleBarComponent extends G2BaseComponent {
|
|
|
13
13
|
line: boolean;
|
|
14
14
|
format?: (value: number, item: NzSafeAny, index: number) => string;
|
|
15
15
|
padding: number | number[] | 'auto';
|
|
16
|
-
textStyle:
|
|
17
|
-
[key: string]: NzSafeAny;
|
|
18
|
-
};
|
|
16
|
+
textStyle: Record<string, NzSafeAny>;
|
|
19
17
|
install(): void;
|
|
20
18
|
onlyChangeData: (changes: SimpleChanges) => boolean;
|
|
21
19
|
changeData(): void;
|