@agorapulse/ui-charts 20.1.16 → 20.1.17
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/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { Options,
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import Highcharts, { Options, Chart, SeriesBarOptions, SeriesColumnOptions, SeriesHeatmapOptions, SeriesOptionsType, Series, SeriesPieOptions, SeriesSplineOptions } from 'highcharts';
|
|
4
4
|
|
|
5
5
|
declare enum ChartColor {
|
|
6
6
|
Grey = 0,
|
|
@@ -85,79 +85,65 @@ declare class ChartColors {
|
|
|
85
85
|
static getColors(seriesCount: number, color: ChartColor | undefined): string[];
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
declare abstract class AbstractChartComponent
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
declare abstract class AbstractChartComponent {
|
|
89
|
+
private readonly destroyRef;
|
|
90
|
+
/** Highcharts renders into the component's host element directly — no inner template ref needed. */
|
|
91
|
+
protected readonly hostElement: HTMLElement;
|
|
92
|
+
readonly chartOptions: _angular_core.InputSignal<Options>;
|
|
93
|
+
readonly color: _angular_core.InputSignal<ChartColor>;
|
|
94
|
+
readonly labelDateFormat: _angular_core.InputSignal<string>;
|
|
95
|
+
readonly locale: _angular_core.InputSignal<string>;
|
|
96
|
+
protected chart?: Chart;
|
|
97
|
+
private readonly viewReady;
|
|
96
98
|
private resizeObserver?;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
abstract initChart(): void;
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
/** Each subclass exposes its typed series input here so the base can react to it. */
|
|
100
|
+
protected abstract readonly series: Signal<readonly unknown[]>;
|
|
101
|
+
constructor();
|
|
102
|
+
protected abstract initChart(): void;
|
|
103
|
+
private onResize;
|
|
104
|
+
private rebuild;
|
|
105
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AbstractChartComponent, never>;
|
|
106
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AbstractChartComponent, never, never, { "chartOptions": { "alias": "chartOptions"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "labelDateFormat": { "alias": "labelDateFormat"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
declare class ChartBarComponent extends AbstractChartComponent {
|
|
106
|
-
categories: string[]
|
|
107
|
-
opposite: boolean
|
|
108
|
-
stacked: boolean
|
|
109
|
-
series: SeriesBarOptions[]
|
|
110
|
+
readonly categories: _angular_core.InputSignal<string[]>;
|
|
111
|
+
readonly opposite: _angular_core.InputSignal<boolean>;
|
|
112
|
+
readonly stacked: _angular_core.InputSignal<boolean>;
|
|
113
|
+
readonly series: _angular_core.InputSignal<SeriesBarOptions[]>;
|
|
110
114
|
initChart(): void;
|
|
111
|
-
static ɵfac:
|
|
112
|
-
static ɵcmp:
|
|
115
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartBarComponent, never>;
|
|
116
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartBarComponent, "ap-chart-bar", never, { "categories": { "alias": "categories"; "required": false; "isSignal": true; }; "opposite": { "alias": "opposite"; "required": false; "isSignal": true; }; "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
declare class ChartColumnComponent extends AbstractChartComponent {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
chartInitialized:
|
|
120
|
+
readonly stacked: _angular_core.InputSignal<boolean>;
|
|
121
|
+
readonly series: _angular_core.InputSignal<SeriesColumnOptions[]>;
|
|
122
|
+
readonly chartInitialized: _angular_core.OutputEmitterRef<Chart>;
|
|
119
123
|
initChart(): void;
|
|
120
|
-
static ɵfac:
|
|
121
|
-
static ɵcmp:
|
|
124
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartColumnComponent, never>;
|
|
125
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartColumnComponent, "ap-chart-column", never, { "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": false; "isSignal": true; }; }, { "chartInitialized": "chartInitialized"; }, never, never, true, never>;
|
|
122
126
|
}
|
|
123
127
|
|
|
124
|
-
type
|
|
128
|
+
type LegendLabels = {
|
|
129
|
+
least: string;
|
|
130
|
+
most: string;
|
|
131
|
+
};
|
|
125
132
|
declare class ChartHeatmapComponent extends AbstractChartComponent {
|
|
126
|
-
categoriesX: string[]
|
|
127
|
-
categoriesY: string[]
|
|
128
|
-
series: SeriesHeatmapOptions[]
|
|
129
|
-
legendLabels:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
static
|
|
133
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartHeatmapComponent, "ap-chart-heatmap", never, { "categoriesX": { "alias": "categoriesX"; "required": false; }; "categoriesY": { "alias": "categoriesY"; "required": false; }; "series": { "alias": "series"; "required": false; }; "legendLabels": { "alias": "legendLabels"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
declare enum ChartMetricType {
|
|
137
|
-
default = 0,
|
|
138
|
-
total = 1
|
|
139
|
-
}
|
|
140
|
-
declare class ChartMetric {
|
|
141
|
-
children?: ChartMetric[];
|
|
142
|
-
name: string;
|
|
143
|
-
type?: ChartMetricType;
|
|
144
|
-
value: number;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
declare class ChartMetricsListComponent {
|
|
148
|
-
metrics: ChartMetric[];
|
|
149
|
-
locale: string;
|
|
150
|
-
ChartMetricType: typeof ChartMetricType;
|
|
151
|
-
digitsInfo: string;
|
|
152
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChartMetricsListComponent, never>;
|
|
153
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartMetricsListComponent, "ap-chart-metrics-list", never, { "metrics": { "alias": "metrics"; "required": true; }; "locale": { "alias": "locale"; "required": false; }; }, {}, never, never, true, never>;
|
|
133
|
+
readonly categoriesX: _angular_core.InputSignal<string[]>;
|
|
134
|
+
readonly categoriesY: _angular_core.InputSignal<string[]>;
|
|
135
|
+
readonly series: _angular_core.InputSignal<SeriesHeatmapOptions[]>;
|
|
136
|
+
readonly legendLabels: _angular_core.InputSignal<LegendLabels | undefined>;
|
|
137
|
+
protected initChart(): void;
|
|
138
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartHeatmapComponent, never>;
|
|
139
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartHeatmapComponent, "ap-chart-heatmap", never, { "categoriesX": { "alias": "categoriesX"; "required": false; "isSignal": true; }; "categoriesY": { "alias": "categoriesY"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": false; "isSignal": true; }; "legendLabels": { "alias": "legendLabels"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
154
140
|
}
|
|
155
141
|
|
|
156
142
|
declare class ChartMixedComponent extends AbstractChartComponent {
|
|
157
|
-
series: SeriesOptionsType[]
|
|
158
|
-
initChart(): void;
|
|
159
|
-
static ɵfac:
|
|
160
|
-
static ɵcmp:
|
|
143
|
+
readonly series: _angular_core.InputSignal<SeriesOptionsType[]>;
|
|
144
|
+
protected initChart(): void;
|
|
145
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartMixedComponent, never>;
|
|
146
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartMixedComponent, "ap-chart-mixed", never, { "series": { "alias": "series"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
161
147
|
}
|
|
162
148
|
|
|
163
149
|
interface SeriesRoundedColumnOptions extends SeriesColumnOptions {
|
|
@@ -169,39 +155,39 @@ interface SeriesRoundedColumnOptions extends SeriesColumnOptions {
|
|
|
169
155
|
}
|
|
170
156
|
|
|
171
157
|
declare class ChartOptions {
|
|
172
|
-
static readonly DEFAULT_DATE_FORMAT
|
|
158
|
+
static readonly DEFAULT_DATE_FORMAT = "%A, %b %e, %Y";
|
|
173
159
|
static readonly DEFAULT_OPTIONS: Options;
|
|
174
160
|
static build(options: Options, locale: string): Options;
|
|
175
161
|
static configure(series: SeriesOptionsType[], options: Options, color: ChartColor | undefined, labelDateFormat?: string): void;
|
|
176
162
|
static redrawWithHighestEdgesRounded(chart: Chart): void;
|
|
177
163
|
static roundHighestSerie(series: Series[], serie: SeriesRoundedColumnOptions, serieIndex: number): void;
|
|
178
|
-
private static getPointX;
|
|
179
|
-
private static findPointAtAbscissa;
|
|
180
|
-
private static getPointValue;
|
|
181
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Deep-merges `source` onto a clone of `target` without mutating either, with one deliberate
|
|
167
|
+
* deviation from `es-toolkit`'s `toMerged`: arrays are treated as opaque values (replaced wholesale)
|
|
168
|
+
* rather than element-merged, which matches how Highcharts options are intended to be overridden.
|
|
169
|
+
*/
|
|
182
170
|
declare function mergeDeep(target: any, source: any): any;
|
|
183
171
|
|
|
184
172
|
declare class ChartPieComponent extends AbstractChartComponent {
|
|
185
|
-
innerLabels: boolean
|
|
186
|
-
mouseEventEnabled: boolean
|
|
187
|
-
series: SeriesPieOptions[]
|
|
188
|
-
colors:
|
|
189
|
-
metricFormat:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChartPieComponent, never>;
|
|
194
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartPieComponent, "ap-chart-pie", never, { "innerLabels": { "alias": "innerLabels"; "required": false; }; "mouseEventEnabled": { "alias": "mouseEventEnabled"; "required": false; }; "series": { "alias": "series"; "required": false; }; "colors": { "alias": "colors"; "required": false; "isSignal": true; }; "metricFormat": { "alias": "metricFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
173
|
+
readonly innerLabels: _angular_core.InputSignal<boolean>;
|
|
174
|
+
readonly mouseEventEnabled: _angular_core.InputSignal<boolean>;
|
|
175
|
+
readonly series: _angular_core.InputSignal<SeriesPieOptions[]>;
|
|
176
|
+
readonly colors: _angular_core.InputSignal<string[] | undefined>;
|
|
177
|
+
readonly metricFormat: _angular_core.InputSignal<"value" | "percentage">;
|
|
178
|
+
protected initChart(): void;
|
|
179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartPieComponent, never>;
|
|
180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartPieComponent, "ap-chart-pie", never, { "innerLabels": { "alias": "innerLabels"; "required": false; "isSignal": true; }; "mouseEventEnabled": { "alias": "mouseEventEnabled"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": false; "isSignal": true; }; "colors": { "alias": "colors"; "required": false; "isSignal": true; }; "metricFormat": { "alias": "metricFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
195
181
|
}
|
|
196
182
|
|
|
197
183
|
declare class ChartSplineComponent extends AbstractChartComponent {
|
|
198
|
-
series: SeriesSplineOptions[]
|
|
199
|
-
chartInitialized:
|
|
200
|
-
initChart(): void;
|
|
201
|
-
static ɵfac:
|
|
202
|
-
static ɵcmp:
|
|
184
|
+
readonly series: _angular_core.InputSignal<SeriesSplineOptions[]>;
|
|
185
|
+
readonly chartInitialized: _angular_core.OutputEmitterRef<Chart>;
|
|
186
|
+
protected initChart(): void;
|
|
187
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartSplineComponent, never>;
|
|
188
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartSplineComponent, "ap-chart-spline", never, { "series": { "alias": "series"; "required": false; "isSignal": true; }; }, { "chartInitialized": "chartInitialized"; }, never, never, true, never>;
|
|
203
189
|
}
|
|
204
190
|
|
|
205
|
-
declare
|
|
191
|
+
declare function borderRadiusPlugin(H: typeof Highcharts): void;
|
|
206
192
|
|
|
207
|
-
export { AbstractChartComponent, ChartBarComponent, ChartColor, ChartColors, ChartColumnComponent, ChartHeatmapComponent,
|
|
193
|
+
export { AbstractChartComponent, ChartBarComponent, ChartColor, ChartColors, ChartColumnComponent, ChartHeatmapComponent, ChartMixedComponent, ChartOptions, ChartPieComponent, ChartSplineComponent, borderRadiusPlugin, mergeDeep };
|
package/package.json
CHANGED
|
Binary file
|