@eagami/ui 5.99.0 → 5.100.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": "@eagami/ui",
3
- "version": "5.99.0",
3
+ "version": "5.100.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -90,6 +90,7 @@ export interface EagamiMessages {
90
90
  barChart: string;
91
91
  pieChart: string;
92
92
  candlestickChart: string;
93
+ waterfallChart: string;
93
94
  /** Header of the data table's label column. */
94
95
  category: string;
95
96
  value: string;
@@ -103,12 +104,19 @@ export interface EagamiMessages {
103
104
  high: string;
104
105
  low: string;
105
106
  close: string;
107
+ /** Headers of a waterfall chart's change and running total columns. */
108
+ change: string;
109
+ runningTotal: string;
106
110
  /** Announces the highlighted point of a line or bar chart. */
107
111
  point: (series: string, label: string, value: string) => string;
108
112
  /** Announces the highlighted slice of a pie chart. */
109
113
  slice: (label: string, value: string, percent: string) => string;
110
114
  /** Announces the highlighted candle of a candlestick chart. */
111
115
  candle: (label: string, open: string, high: string, low: string, close: string) => string;
116
+ /** Announces the highlighted change of a waterfall chart. */
117
+ step: (label: string, change: string, runningTotal: string) => string;
118
+ /** Announces the highlighted total of a waterfall chart. */
119
+ stepTotal: (label: string, total: string) => string;
112
120
  /** Caption beneath the total in a donut's hole. */
113
121
  total: string;
114
122
  /** Default accessible name of a sparkline. */
@@ -1558,7 +1566,7 @@ export type BarChartOrientation = 'vertical' | 'horizontal';
1558
1566
  * another, and `fade` fades the bars in.
1559
1567
  */
1560
1568
  export type BarChartAnimation = 'grow' | 'cascade' | 'fade' | 'none';
1561
- interface PlotBar$1 {
1569
+ interface PlotBar$2 {
1562
1570
  series: number;
1563
1571
  index: number;
1564
1572
  value: number;
@@ -1662,7 +1670,7 @@ export declare class BarChartComponent {
1662
1670
  index: number;
1663
1671
  pos: number;
1664
1672
  }[];
1665
- bars: PlotBar$1[];
1673
+ bars: PlotBar$2[];
1666
1674
  valueLabels: PlotValueLabel[];
1667
1675
  referenceLines: {
1668
1676
  labelX: number;
@@ -1708,7 +1716,7 @@ export declare class BarChartComponent {
1708
1716
  protected readonly announcement: import("@angular/core").Signal<string>;
1709
1717
  protected readonly showsLegend: import("@angular/core").Signal<boolean>;
1710
1718
  protected seriesColor(index: number): string;
1711
- protected isDimmed(bar: PlotBar$1): boolean;
1719
+ protected isDimmed(bar: PlotBar$2): boolean;
1712
1720
  protected referenceText(line: ChartReferenceLine): string;
1713
1721
  protected tableValue(value: number | null | undefined): string;
1714
1722
  protected onPointerMove(event: PointerEvent): void;
@@ -7694,7 +7702,7 @@ export type SparklineMarkers = 'none' | 'last' | 'extremes' | 'all';
7694
7702
  * line or grows the bars, and `fade` fades the sparkline in.
7695
7703
  */
7696
7704
  export type SparklineAnimation = 'draw' | 'fade' | 'none';
7697
- interface PlotBar {
7705
+ interface PlotBar$1 {
7698
7706
  index: number;
7699
7707
  x: number;
7700
7708
  y: number;
@@ -7761,7 +7769,7 @@ export declare class SparklineComponent {
7761
7769
  width: number;
7762
7770
  height: number;
7763
7771
  baseline: number;
7764
- bars: PlotBar[];
7772
+ bars: PlotBar$1[];
7765
7773
  paths: never[];
7766
7774
  areas: never[];
7767
7775
  markers: never[];
@@ -7789,7 +7797,7 @@ export declare class SparklineComponent {
7789
7797
  x: number;
7790
7798
  y: number;
7791
7799
  }[]>;
7792
- protected isDimmed(bar: PlotBar): boolean;
7800
+ protected isDimmed(bar: PlotBar$1): boolean;
7793
7801
  protected onPointer(event: PointerEvent): void;
7794
7802
  protected onPointerUp(event: PointerEvent): void;
7795
7803
  protected clear(): void;
@@ -9598,6 +9606,280 @@ export declare class VirtualListComponent {
9598
9606
  "scrollIndexChange": "scrollIndexChange";
9599
9607
  }, ["itemTemplate"], never, true, never>;
9600
9608
  }
9609
+ /** One step of an `<ea-waterfall-chart>`: a change to the running total, or a total. */
9610
+ export interface WaterfallChartStep {
9611
+ /** Name of the step, shown on the axis, tooltip, and data table. */
9612
+ label: string;
9613
+ /**
9614
+ * How much the step raises (positive) or lowers (negative) the running total;
9615
+ * a change missing a finite value leaves a gap. On a total step, a value resets
9616
+ * the running total to it, such as an opening balance, and no value shows the
9617
+ * running total so far.
9618
+ */
9619
+ value?: number | null;
9620
+ /** Draws the step from the baseline in the total tone, as a subtotal or total. */
9621
+ total?: boolean;
9622
+ }
9623
+ /** Payload describing a single step of a waterfall chart. */
9624
+ export interface WaterfallChartStepEvent {
9625
+ index: number;
9626
+ label: string;
9627
+ /** How much the step changed the running total, or `null` for a total step. */
9628
+ change: number | null;
9629
+ /** The running total after the step. */
9630
+ runningTotal: number;
9631
+ /** Whether the step is a total drawn from the baseline. */
9632
+ total: boolean;
9633
+ }
9634
+ /**
9635
+ * Entrance animation, replayed whenever the data changes. `grow` draws every
9636
+ * bar out of the level it starts from together, `cascade` does so one step
9637
+ * after another, and `fade` fades the bars in.
9638
+ */
9639
+ export type WaterfallChartAnimation = 'grow' | 'cascade' | 'fade' | 'none';
9640
+ type StepTone = 'rise' | 'fall' | 'total';
9641
+ interface ResolvedStep {
9642
+ tone: StepTone;
9643
+ change: number | null;
9644
+ /** Level the bar starts from: the running total before a change, or zero for a total. */
9645
+ start: number;
9646
+ /** The running total after the step, where the bar ends. */
9647
+ end: number;
9648
+ }
9649
+ interface PlotBar {
9650
+ index: number;
9651
+ tone: StepTone;
9652
+ x: number;
9653
+ y: number;
9654
+ width: number;
9655
+ height: number;
9656
+ /** Height of the level the bar starts from, which the entrance grows it out of. */
9657
+ origin: number;
9658
+ delay: number;
9659
+ }
9660
+ /**
9661
+ * Shows how a run of rises and falls builds a total, such as cash flow over a
9662
+ * period: each change floats from the running total before it, rises and
9663
+ * falls take the positive and negative tones, and total steps stand on the
9664
+ * baseline. Thin connectors carry the running total from each bar to the next.
9665
+ * Hovering or arrowing through the chart reveals each step in a tooltip, and a
9666
+ * visually hidden table carries the full data for screen readers.
9667
+ */
9668
+ export declare class WaterfallChartComponent {
9669
+ protected readonly i18n: EagamiI18nService;
9670
+ /** The steps to draw, in order. */
9671
+ readonly data: import("@angular/core").InputSignal<WaterfallChartStep[]>;
9672
+ /** Any CSS color for rises; defaults to the success color. */
9673
+ readonly risingColor: import("@angular/core").InputSignal<string | undefined>;
9674
+ /** Any CSS color for falls; defaults to the error color. */
9675
+ readonly fallingColor: import("@angular/core").InputSignal<string | undefined>;
9676
+ /** Any CSS color for totals; defaults to the first chart palette color. */
9677
+ readonly totalColor: import("@angular/core").InputSignal<string | undefined>;
9678
+ /** Draws gridlines at each value-axis tick. */
9679
+ readonly showGrid: import("@angular/core").InputSignal<boolean>;
9680
+ /** Prints each change, signed, and each total beyond the end of its bar. */
9681
+ readonly showValues: import("@angular/core").InputSignal<boolean>;
9682
+ /** Joins each bar to the next at the running total between them. */
9683
+ readonly showConnectors: import("@angular/core").InputSignal<boolean>;
9684
+ /** How the step labels are set; `auto` turns them as they run out of room. */
9685
+ readonly xLabelOrientation: import("@angular/core").InputSignal<ChartLabelOrientation>;
9686
+ /**
9687
+ * Dashed rules across the plot at set values, such as a budget or a target.
9688
+ * The value axis widens to take them in.
9689
+ */
9690
+ readonly referenceLines: import("@angular/core").InputSignal<readonly ChartReferenceLine[]>;
9691
+ /** Height of the plot in pixels; the width fills the container. */
9692
+ readonly height: import("@angular/core").InputSignal<number>;
9693
+ /** Visual size; scales the axis, value, and tooltip text and the bar width cap. */
9694
+ readonly size: import("@angular/core").InputSignal<import("@eagami/ui").EaSize>;
9695
+ /** Entrance animation, replayed whenever the data changes. */
9696
+ readonly animation: import("@angular/core").InputSignal<WaterfallChartAnimation>;
9697
+ /** Length of the entrance animation in milliseconds. */
9698
+ readonly animationDuration: import("@angular/core").InputSignal<number>;
9699
+ /** Formats values on the axis, tooltip, and data table; locale-grouped by default. */
9700
+ readonly formatValue: import("@angular/core").InputSignal<((value: number) => string) | null>;
9701
+ /** Accessible name for the chart; defaults to a localized "Waterfall chart". */
9702
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
9703
+ /** Fires when a bar is clicked, or chosen with Enter or Space. */
9704
+ readonly stepClick: import("@angular/core").OutputEmitterRef<WaterfallChartStepEvent>;
9705
+ /** Fires when the highlighted bar changes by pointer or keyboard, with `null` once cleared. */
9706
+ readonly activeStepChange: import("@angular/core").OutputEmitterRef<WaterfallChartStepEvent | null>;
9707
+ private readonly viewport;
9708
+ private readonly format;
9709
+ protected readonly active: import("@angular/core").WritableSignal<number | null>;
9710
+ protected readonly label: import("@angular/core").Signal<string>;
9711
+ protected readonly steps: import("@angular/core").Signal<(ResolvedStep | null)[]>;
9712
+ protected readonly hasData: import("@angular/core").Signal<boolean>;
9713
+ protected readonly references: import("@angular/core").Signal<ChartReferenceLine[]>;
9714
+ protected readonly renderPass: import("@angular/core").Signal<{}[]>;
9715
+ protected readonly hostClasses: import("@angular/core").Signal<{
9716
+ [x: string]: boolean;
9717
+ }>;
9718
+ protected readonly layout: import("@angular/core").Signal<{
9719
+ width: number;
9720
+ height: number;
9721
+ top: number;
9722
+ left: number;
9723
+ plotWidth: number;
9724
+ plotHeight: number;
9725
+ band: number;
9726
+ axisPx: number;
9727
+ axisY: number;
9728
+ baseline: number;
9729
+ ticks: {
9730
+ value: number;
9731
+ text: string;
9732
+ pos: number;
9733
+ }[];
9734
+ categories: {
9735
+ text: string;
9736
+ index: number;
9737
+ pos: number;
9738
+ }[];
9739
+ bars: PlotBar[];
9740
+ valueLabels: {
9741
+ index: number;
9742
+ x: number;
9743
+ y: number;
9744
+ text: string;
9745
+ }[];
9746
+ connectors: {
9747
+ index: number;
9748
+ x1: number;
9749
+ x2: number;
9750
+ y: number;
9751
+ }[];
9752
+ referenceLines: {
9753
+ labelX: number;
9754
+ labelY: number;
9755
+ key: number;
9756
+ pos: number;
9757
+ value: number;
9758
+ label?: string;
9759
+ color?: string;
9760
+ }[];
9761
+ valuePos: (value: number) => number;
9762
+ tickEndY: number;
9763
+ labelAngle: number;
9764
+ labelY: number;
9765
+ }>;
9766
+ protected readonly tooltip: import("@angular/core").Signal<{
9767
+ x: number;
9768
+ y: number;
9769
+ title: string;
9770
+ rows: {
9771
+ name: string;
9772
+ value: string;
9773
+ }[];
9774
+ key: number;
9775
+ } | null>;
9776
+ protected readonly tooltips: import("@angular/core").Signal<{
9777
+ x: number;
9778
+ y: number;
9779
+ title: string;
9780
+ rows: {
9781
+ name: string;
9782
+ value: string;
9783
+ }[];
9784
+ key: number;
9785
+ }[]>;
9786
+ protected readonly announcement: import("@angular/core").Signal<string>;
9787
+ protected isDimmed(bar: PlotBar): boolean;
9788
+ protected referenceText(line: ChartReferenceLine): string;
9789
+ protected tableCells(index: number): [string, string];
9790
+ protected tableValue(value: number | null | undefined): string;
9791
+ protected onPointerMove(event: PointerEvent): void;
9792
+ protected onPointerLeave(): void;
9793
+ protected onClick(): void;
9794
+ protected onFocus(): void;
9795
+ protected onBlur(): void;
9796
+ protected onKeydown(event: KeyboardEvent): void;
9797
+ private signed;
9798
+ private firstFrom;
9799
+ private eventFor;
9800
+ private setActive;
9801
+ static ɵfac: i0.ɵɵFactoryDeclaration<WaterfallChartComponent, never>;
9802
+ static ɵcmp: i0.ɵɵComponentDeclaration<WaterfallChartComponent, "ea-waterfall-chart", never, {
9803
+ "data": {
9804
+ "alias": "data";
9805
+ "required": false;
9806
+ "isSignal": true;
9807
+ };
9808
+ "risingColor": {
9809
+ "alias": "risingColor";
9810
+ "required": false;
9811
+ "isSignal": true;
9812
+ };
9813
+ "fallingColor": {
9814
+ "alias": "fallingColor";
9815
+ "required": false;
9816
+ "isSignal": true;
9817
+ };
9818
+ "totalColor": {
9819
+ "alias": "totalColor";
9820
+ "required": false;
9821
+ "isSignal": true;
9822
+ };
9823
+ "showGrid": {
9824
+ "alias": "showGrid";
9825
+ "required": false;
9826
+ "isSignal": true;
9827
+ };
9828
+ "showValues": {
9829
+ "alias": "showValues";
9830
+ "required": false;
9831
+ "isSignal": true;
9832
+ };
9833
+ "showConnectors": {
9834
+ "alias": "showConnectors";
9835
+ "required": false;
9836
+ "isSignal": true;
9837
+ };
9838
+ "xLabelOrientation": {
9839
+ "alias": "xLabelOrientation";
9840
+ "required": false;
9841
+ "isSignal": true;
9842
+ };
9843
+ "referenceLines": {
9844
+ "alias": "referenceLines";
9845
+ "required": false;
9846
+ "isSignal": true;
9847
+ };
9848
+ "height": {
9849
+ "alias": "height";
9850
+ "required": false;
9851
+ "isSignal": true;
9852
+ };
9853
+ "size": {
9854
+ "alias": "size";
9855
+ "required": false;
9856
+ "isSignal": true;
9857
+ };
9858
+ "animation": {
9859
+ "alias": "animation";
9860
+ "required": false;
9861
+ "isSignal": true;
9862
+ };
9863
+ "animationDuration": {
9864
+ "alias": "animationDuration";
9865
+ "required": false;
9866
+ "isSignal": true;
9867
+ };
9868
+ "formatValue": {
9869
+ "alias": "formatValue";
9870
+ "required": false;
9871
+ "isSignal": true;
9872
+ };
9873
+ "ariaLabel": {
9874
+ "alias": "aria-label";
9875
+ "required": false;
9876
+ "isSignal": true;
9877
+ };
9878
+ }, {
9879
+ "stepClick": "stepClick";
9880
+ "activeStepChange": "activeStepChange";
9881
+ }, never, never, true, never>;
9882
+ }
9601
9883
  /**
9602
9884
  * Resolves an icon's human-readable display name. Pass the component class
9603
9885
  * (`iconDisplayName(GithubIconComponent)` returns `'GitHub'`) or its slug