@porscheinformatik/clr-addons 21.3.3 → 21.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porscheinformatik/clr-addons",
3
- "version": "21.3.3",
3
+ "version": "21.5.0",
4
4
  "description": "Addon components for Clarity Angular",
5
5
  "homepage": "https://porscheinformatik.github.io/clarity-addons/",
6
6
  "keywords": [
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { AfterViewInit, ElementRef, OnChanges, SimpleChanges, OnInit } from '@angular/core';
3
- import * as i7 from '@angular/common';
4
- import * as i8 from '@clr/angular';
3
+ import * as i8 from '@angular/common';
4
+ import * as i9 from '@clr/angular';
5
5
 
6
6
  /**
7
7
  * A single data point on an XY chart (line, area).
@@ -190,6 +190,86 @@ declare class BarChartComponent extends ChartBase<BarChartDataPoint> implements
190
190
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "clr-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "stacks": { "alias": "stacks"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": true; "isSignal": true; }; "tooltipOrientation": { "alias": "tooltipOrientation"; "required": false; "isSignal": true; }; "barSizePx": { "alias": "barSizePx"; "required": false; "isSignal": true; }; "barAreaSizePx": { "alias": "barAreaSizePx"; "required": false; "isSignal": true; }; "tooltipPercentOfTotal": { "alias": "tooltipPercentOfTotal"; "required": false; "isSignal": true; }; "tooltipPercentOf": { "alias": "tooltipPercentOf"; "required": false; "isSignal": true; }; "noItemsMessage": { "alias": "noItemsMessage"; "required": false; "isSignal": true; }; "tooManyItemsMessage": { "alias": "tooManyItemsMessage"; "required": false; "isSignal": true; }; "tooManyItemsGroupedMessage": { "alias": "tooManyItemsGroupedMessage"; "required": false; "isSignal": true; }; "allValuesZeroMessage": { "alias": "allValuesZeroMessage"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "exportButtonTitle": { "alias": "exportButtonTitle"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "xAxisLabel": { "alias": "xAxisLabel"; "required": false; "isSignal": true; }; "yAxisLabel": { "alias": "yAxisLabel"; "required": false; "isSignal": true; }; }, { "valueClicked": "valueClicked"; }, never, never, false, never>;
191
191
  }
192
192
 
193
+ interface GroupedBarChartData {
194
+ key: string;
195
+ label: string;
196
+ fullLabel?: string;
197
+ groupKey: string;
198
+ groupLabel?: string;
199
+ value: number;
200
+ color?: string;
201
+ }
202
+ interface GroupedBarChartGroup {
203
+ key: string;
204
+ label: string;
205
+ }
206
+ interface GroupedBarChartValue {
207
+ key: string;
208
+ label: string;
209
+ groupKey: string;
210
+ groupLabel: string;
211
+ value: number;
212
+ }
213
+ type GroupedBarChartDataPoint = GroupedBarChartData & {
214
+ groupLabel: string;
215
+ };
216
+ declare class GroupedBarChartComponent extends ChartBase<GroupedBarChartDataPoint> implements OnChanges {
217
+ readonly data: _angular_core.InputSignal<GroupedBarChartData[]>;
218
+ readonly groups: _angular_core.InputSignal<GroupedBarChartGroup[]>;
219
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
220
+ readonly tooltipOrientation: _angular_core.InputSignal<"top" | "bottom">;
221
+ readonly barSizePx: _angular_core.InputSignal<number>;
222
+ readonly groupAreaSizePx: _angular_core.InputSignal<number>;
223
+ readonly noItemsMessage: _angular_core.InputSignal<string>;
224
+ readonly tooManyItemsGroupedMessage: _angular_core.InputSignal<string>;
225
+ readonly allValuesZeroMessage: _angular_core.InputSignal<string>;
226
+ readonly showLegend: _angular_core.InputSignal<boolean>;
227
+ readonly showExportButton: _angular_core.InputSignal<boolean>;
228
+ readonly exportButtonTitle: _angular_core.InputSignal<string>;
229
+ readonly exportFilename: _angular_core.InputSignal<string>;
230
+ /** Optional label rendered below the X axis. */
231
+ readonly xAxisLabel: _angular_core.InputSignal<string>;
232
+ /** Optional label rendered rotated to the left of the Y axis. */
233
+ readonly yAxisLabel: _angular_core.InputSignal<string>;
234
+ readonly valueClicked: _angular_core.OutputEmitterRef<GroupedBarChartValue>;
235
+ protected readonly allValuesZero: _angular_core.Signal<boolean>;
236
+ protected readonly toChartColor: typeof toChartColor;
237
+ protected readonly tooltipLabel: _angular_core.Signal<string>;
238
+ readonly legendItems: _angular_core.Signal<ChartLegendItem[]>;
239
+ readonly alertMessageAndType: _angular_core.Signal<[string, string]>;
240
+ private readonly textRenderer;
241
+ private readonly MARGIN;
242
+ private readonly totalGroupCount;
243
+ private readonly showingGroupCount;
244
+ private readonly slicedDataPoints;
245
+ private svg;
246
+ private barSelection;
247
+ private labelSelection;
248
+ ngOnChanges(_changes: SimpleChanges): void;
249
+ ngAfterViewInit(): void;
250
+ private createChart;
251
+ protected updateChart(): void;
252
+ private createVerticalChart;
253
+ private createHorizontalChart;
254
+ private createBarSelectionGroups;
255
+ private addHorizontalBarRectangle;
256
+ private addVerticalBarRectangle;
257
+ protected emitSelectedValue(): void;
258
+ private addBarClickHandler;
259
+ private openTooltip;
260
+ private setHoverStyles;
261
+ private addTextCommonInfo;
262
+ private addTextAndTitle;
263
+ private appendAxisLabel;
264
+ private styleGridLines;
265
+ private getNormalizedGroups;
266
+ private seriesLabels;
267
+ private getMaxAmountOfGroups;
268
+ private resetVisibleState;
269
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GroupedBarChartComponent, never>;
270
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupedBarChartComponent, "clr-grouped-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "tooltipOrientation": { "alias": "tooltipOrientation"; "required": false; "isSignal": true; }; "barSizePx": { "alias": "barSizePx"; "required": false; "isSignal": true; }; "groupAreaSizePx": { "alias": "groupAreaSizePx"; "required": false; "isSignal": true; }; "noItemsMessage": { "alias": "noItemsMessage"; "required": false; "isSignal": true; }; "tooManyItemsGroupedMessage": { "alias": "tooManyItemsGroupedMessage"; "required": false; "isSignal": true; }; "allValuesZeroMessage": { "alias": "allValuesZeroMessage"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "exportButtonTitle": { "alias": "exportButtonTitle"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "xAxisLabel": { "alias": "xAxisLabel"; "required": false; "isSignal": true; }; "yAxisLabel": { "alias": "yAxisLabel"; "required": false; "isSignal": true; }; }, { "valueClicked": "valueClicked"; }, never, never, false, never>;
271
+ }
272
+
193
273
  type LineChartSelectedPoint = XYChartPoint & {
194
274
  seriesKey: string;
195
275
  seriesLabel: string;
@@ -595,9 +675,9 @@ declare class WindowResizeDirective implements OnInit {
595
675
 
596
676
  declare class ClrChartsModule {
597
677
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClrChartsModule, never>;
598
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ClrChartsModule, [typeof AreaChartComponent, typeof BarChartComponent, typeof ComboChartComponent, typeof FunnelChartComponent, typeof LineChartComponent, typeof PieChartComponent], [typeof i7.CommonModule, typeof i7.DecimalPipe, typeof i8.ClrAlertModule, typeof i8.ClrIcon, typeof i8.ClrSignpostModule, typeof ChartAlertOverlayComponent, typeof ChartExportButtonComponent, typeof ChartLegendComponent, typeof ChartSkeletonComponent, typeof ChartTooltipComponent, typeof OutsideClickDirective, typeof WindowResizeDirective], [typeof AreaChartComponent, typeof BarChartComponent, typeof ComboChartComponent, typeof FunnelChartComponent, typeof LineChartComponent, typeof PieChartComponent]>;
678
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ClrChartsModule, [typeof AreaChartComponent, typeof BarChartComponent, typeof ComboChartComponent, typeof FunnelChartComponent, typeof GroupedBarChartComponent, typeof LineChartComponent, typeof PieChartComponent], [typeof i8.CommonModule, typeof i8.DecimalPipe, typeof i9.ClrAlertModule, typeof i9.ClrIcon, typeof i9.ClrSignpostModule, typeof ChartAlertOverlayComponent, typeof ChartExportButtonComponent, typeof ChartLegendComponent, typeof ChartSkeletonComponent, typeof ChartTooltipComponent, typeof OutsideClickDirective, typeof WindowResizeDirective], [typeof AreaChartComponent, typeof BarChartComponent, typeof ComboChartComponent, typeof FunnelChartComponent, typeof GroupedBarChartComponent, typeof LineChartComponent, typeof PieChartComponent]>;
599
679
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<ClrChartsModule>;
600
680
  }
601
681
 
602
- export { AreaChartComponent, BarChartComponent, ClrChartsModule, ComboChartComponent, FunnelChartComponent, LineChartComponent, PieChartComponent };
603
- export type { XYChartPoint as AreaChartPoint, XYChartSeries as AreaChartSeries, XYChartValue as AreaChartValue, BarChartData, BarChartLabel, BarChartValue, ComboBarPoint, ComboBarSeries, ComboChartValue, ComboLinePoint, ComboLineSeries, FunnelChartData, FunnelChartLabels, FunnelChartSection, FunnelValue, XYChartPoint as LineChartPoint, XYChartSeries as LineChartSeries, XYChartValue as LineChartValue, PieChartData, PieChartValue, XYChartPoint, XYChartSeries, XYChartValue };
682
+ export { AreaChartComponent, BarChartComponent, ClrChartsModule, ComboChartComponent, FunnelChartComponent, GroupedBarChartComponent, LineChartComponent, PieChartComponent };
683
+ export type { XYChartPoint as AreaChartPoint, XYChartSeries as AreaChartSeries, XYChartValue as AreaChartValue, BarChartData, BarChartLabel, BarChartValue, ComboBarPoint, ComboBarSeries, ComboChartValue, ComboLinePoint, ComboLineSeries, FunnelChartData, FunnelChartLabels, FunnelChartSection, FunnelValue, GroupedBarChartData, GroupedBarChartGroup, GroupedBarChartValue, XYChartPoint as LineChartPoint, XYChartSeries as LineChartSeries, XYChartValue as LineChartValue, PieChartData, PieChartValue, XYChartPoint, XYChartSeries, XYChartValue };