@vizzly/dashboard 0.14.4-dev-97acb8d43347ac757049612930b3f8e69e913e55 → 0.14.4-dev-452014891c726bda8e71210563e32bb225b30c86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/charts/src/v2/components/Axis/AxisLeft.d.ts +2 -1
  2. package/dist/charts/src/v2/components/BarChart/BarChart.d.ts +18 -2
  3. package/dist/charts/src/v2/components/BarChart/useBarXScale.d.ts +2 -0
  4. package/dist/charts/src/v2/components/ComboChart/ComboChart.d.ts +22 -0
  5. package/dist/charts/src/v2/components/Legend/Legend.d.ts +7 -5
  6. package/dist/charts/src/v2/components/LineChart/LineChart.d.ts +16 -1
  7. package/dist/charts/src/v2/components/Tooltip/Tooltip.d.ts +6 -4
  8. package/dist/charts/src/v2/components/WaterfallChart/Legend.d.ts +3 -1
  9. package/dist/charts/src/v2/components/WaterfallChart/WaterfallChart.d.ts +3 -1
  10. package/dist/charts/src/v2/components/hooks/useFlattenedData.d.ts +3 -8
  11. package/dist/charts/src/v2/components/hooks/useYScale.d.ts +2 -0
  12. package/dist/charts/src/v2/constants/PADDING.d.ts +4 -0
  13. package/dist/charts/src/v2/{components/BarChart → utils}/getBarFill.d.ts +2 -2
  14. package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +12 -12
  15. package/dist/dashboard.cjs.development.js +435 -344
  16. package/dist/dashboard.cjs.production.min.js +1 -1
  17. package/dist/dashboard.esm.js +440 -349
  18. package/dist/shared-logic/src/ChartsV2/types.d.ts +8 -7
  19. package/dist/shared-logic/src/ComboChartV2/types.d.ts +15 -0
  20. package/dist/shared-logic/src/Component/types.d.ts +2 -0
  21. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +1 -0
  22. package/dist/shared-logic/src/FeatureToggle/types.d.ts +0 -3
  23. package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +2 -1
  24. package/dist/shared-ui/src/library/StylePanel/WaterfallColorsSection.d.ts +7 -0
  25. package/package.json +1 -1
  26. package/dist/charts/src/v2/components/WaterfallChart/getBarFill.d.ts +0 -5
@@ -3,9 +3,10 @@ import { Margin } from '../../utils/buildMargin';
3
3
  import { BaseYAxis } from '../../../../../shared-logic/src/ChartsV2/types';
4
4
  import { ScaleLinear } from '@visx/vendor/d3-scale';
5
5
  import { ChartThemeCSS } from '../../utils/getChartThemeCSS';
6
+ import { ComboYAxis } from '../../../../../shared-logic/src/ComboChartV2/types';
6
7
  export declare const AxisLeft: FunctionComponent<{
7
8
  show: boolean;
8
- y: BaseYAxis;
9
+ y: BaseYAxis | ComboYAxis;
9
10
  margin: Margin;
10
11
  stroke?: string;
11
12
  yScale: ScaleLinear<number, number, never>;
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { BarChartRepresentation } from '../../../../../shared-logic/src/BarChartV2/types';
2
+ import { BarChartRepresentation, BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
3
3
  import { ChartTheme } from '../../../types';
4
- import { ChartOnViewClick } from '../../../../../shared-logic/src/ChartsV2/types';
4
+ import { DataType } from '../../../../../shared-logic/src/Field/types';
5
+ import { ChartDataDefinition, ChartOnViewClick, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
6
+ import { ScaleLinear, ScaleBand } from '@visx/vendor/d3-scale';
5
7
  export declare type BarChartProps = {
6
8
  width: number;
7
9
  height: number;
@@ -21,3 +23,17 @@ export declare type BarChartProps = {
21
23
  enableHover?: boolean;
22
24
  };
23
25
  export declare const BarChart: ({ chart, width, height, options, theme, onClick, enableHover }: BarChartProps) => JSX.Element;
26
+ export declare function BarGroup({ data, keys, height, xKey, xScaleDataType, xScale, innerXScale, yScale, onClick, conditionalFormattingRules, bars, enableHover, }: {
27
+ data: ChartDataDefinition[];
28
+ keys: string[];
29
+ height: number;
30
+ xKey: string;
31
+ xScaleDataType: DataType;
32
+ xScale: ScaleBand<string> | ScaleBand<Date> | ScaleBand<number> | null;
33
+ innerXScale: ScaleBand<string> | undefined;
34
+ yScale: ScaleLinear<number, number, never>;
35
+ onClick: (e: React.MouseEvent<SVGRectElement, MouseEvent>, barGroup: any, bar: any) => void;
36
+ conditionalFormattingRules: ConditionalFormattingRule[];
37
+ bars: ShapeDefinition<BarStyles>[];
38
+ enableHover?: boolean;
39
+ }): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { Datum } from '../../../../../shared-logic/src/DatumKey';
2
+ export declare function useBarXScale(xScaleDataType: string, innerWidth: number, xScaleKey: string | null, data: Datum[]): import("@visx/vendor/d3-scale").ScaleBand<number> | import("@visx/vendor/d3-scale").ScaleBand<string> | import("@visx/vendor/d3-scale").ScaleBand<Date> | null;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { ChartTheme } from '../../../types';
3
+ import { ChartOnViewClick } from '../../../../../shared-logic/src/ChartsV2/types';
4
+ import { ComboChartRepresentation } from '../../../../../shared-logic/src/ComboChartV2/types';
5
+ export declare type ComboChartProps = {
6
+ width: number;
7
+ height: number;
8
+ theme?: ChartTheme;
9
+ chart: ComboChartRepresentation;
10
+ options: {
11
+ showRoundedTotal: boolean;
12
+ showLegend: boolean;
13
+ removeStroke: boolean;
14
+ axis: {
15
+ showXAxisLabels: boolean;
16
+ showYAxisLabels: boolean;
17
+ };
18
+ };
19
+ onClick: (params: ChartOnViewClick) => void;
20
+ enableHover?: boolean;
21
+ };
22
+ export declare const ComboChart: ({ chart, width, height, options, theme, onClick }: ComboChartProps) => JSX.Element;
@@ -4,14 +4,16 @@ import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
4
4
  import { LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
5
5
  import { AreaStyles } from '../../../../../shared-logic/src/AreaChartV2/types';
6
6
  interface LegendProps<T> {
7
- setVisibleYKeys: React.Dispatch<React.SetStateAction<Array<string>>>;
8
- visibleYKeys: Array<string>;
7
+ setVisibleYKeys?: React.Dispatch<React.SetStateAction<Array<string>>>;
9
8
  keys: {
10
9
  [key: string]: Key;
11
10
  };
12
- legendItems: Array<ShapeDefinition<T>>;
13
- conditionalFormattingRules: Array<ConditionalFormattingRule>;
14
11
  marginLeft: number;
12
+ items?: {
13
+ legendItems: Array<ShapeDefinition<T>>;
14
+ visibleYKeys: Array<string>;
15
+ conditionalFormattingRules: Array<ConditionalFormattingRule>;
16
+ }[];
15
17
  }
16
- export declare const Legend: ({ keys, visibleYKeys, legendItems, setVisibleYKeys, conditionalFormattingRules, marginLeft, }: LegendProps<BarStyles | LineStyles | AreaStyles>) => JSX.Element;
18
+ export declare const Legend: ({ keys, setVisibleYKeys, marginLeft, items, }: LegendProps<BarStyles | LineStyles | AreaStyles>) => JSX.Element;
17
19
  export {};
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { ChartTheme } from '../../../types';
3
- import { LineChartRepresentation } from '../../../../../shared-logic/src/LineChartV2/types';
3
+ import { LineChartRepresentation, LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
4
+ import { DataType } from '../../../../../shared-logic/src/Field/types';
5
+ import { ChartDataDefinition, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
6
+ import { ScaleLinear, ScaleTime, ScalePoint } from '@visx/vendor/d3-scale';
4
7
  export declare type LineChartProps = {
5
8
  width: number;
6
9
  height: number;
@@ -18,3 +21,15 @@ export declare type LineChartProps = {
18
21
  };
19
22
  };
20
23
  export declare const LineChart: ({ chart, options, theme, width, height }: LineChartProps) => JSX.Element;
24
+ export declare function Lines({ yKeys, visibleYKeys, data, xScaleKey, xScaleDataType, xScale, yScale, lines, curve, conditionalFormattingRules, }: {
25
+ yKeys: string[];
26
+ lines: ShapeDefinition<LineStyles>[];
27
+ conditionalFormattingRules: ConditionalFormattingRule[];
28
+ curve: any;
29
+ data: ChartDataDefinition[];
30
+ visibleYKeys: string[];
31
+ xScaleKey: string;
32
+ xScaleDataType: DataType;
33
+ xScale: ScalePoint<string> | ScaleTime<number, number, never> | ScaleLinear<number, number, never>;
34
+ yScale: ScaleLinear<number, number, never>;
35
+ }): JSX.Element;
@@ -7,18 +7,20 @@ interface TooltipProps<T> {
7
7
  keys: {
8
8
  [key: string]: Key;
9
9
  };
10
- legendItems: Array<ShapeDefinition<T>>;
11
10
  showRoundedTotal: boolean;
12
11
  tooltipData: {
13
12
  [keyId: string]: DataItem;
14
13
  };
15
14
  tooltipLeft: number;
16
15
  tooltipTop: number;
17
- visibleYKeys: string[];
18
16
  xKey: string;
19
17
  yKeys: string[];
20
- conditionalFormattingRules: Array<ConditionalFormattingRule>;
18
+ items: {
19
+ legendItems: Array<ShapeDefinition<T>>;
20
+ conditionalFormattingRules: Array<ConditionalFormattingRule>;
21
+ visibleYKeys: string[];
22
+ }[];
21
23
  theme: CSSProperties;
22
24
  }
23
- export declare const Tooltip: ({ keys, legendItems, showRoundedTotal, tooltipData, tooltipLeft, tooltipTop, visibleYKeys, xKey, yKeys, conditionalFormattingRules, theme, }: TooltipProps<LineStyles | BarStyles | AreaStyles>) => React.ReactPortal;
25
+ export declare const Tooltip: ({ keys, showRoundedTotal, tooltipData, tooltipLeft, tooltipTop, xKey, yKeys, theme, items, }: TooltipProps<LineStyles | BarStyles | AreaStyles>) => React.ReactPortal;
24
26
  export {};
@@ -9,5 +9,7 @@ export declare type LegendProps = {
9
9
  leftTitleOffset: number;
10
10
  bottomTitleOffset: number;
11
11
  };
12
+ increaseColor: string;
13
+ decreaseColor: string;
12
14
  };
13
- export declare const Legend: ({ showLegend, margin }: LegendProps) => JSX.Element | null;
15
+ export declare const Legend: ({ showLegend, margin, increaseColor, decreaseColor }: LegendProps) => JSX.Element | null;
@@ -8,5 +8,7 @@ export declare type WaterfallChartProps = {
8
8
  steps: Step[];
9
9
  options: WaterfallChartOptions;
10
10
  theme?: ChartTheme;
11
+ increaseColor: string;
12
+ decreaseColor: string;
11
13
  };
12
- export declare const WaterfallChart: ({ height, width, options, chart, steps, theme }: WaterfallChartProps) => JSX.Element | null;
14
+ export declare const WaterfallChart: ({ height, width, options, chart, steps, theme, increaseColor, decreaseColor, }: WaterfallChartProps) => JSX.Element | null;
@@ -1,9 +1,4 @@
1
1
  import { DataType } from '../../../../../shared-logic/src/Field/types';
2
- export declare function useFlattenedData<T extends {
3
- data: {
4
- [keyId: string]: any;
5
- }[];
6
- y: {
7
- keys: string[];
8
- };
9
- }, Y>(xScaleKey: string | null, xScaleDataType: DataType, chart: T): Y[];
2
+ export declare function useFlattenedData<Y>(xScaleKey: string | null, xScaleDataType: DataType, data: {
3
+ [keyId: string]: any;
4
+ }[], yKeys: string[]): Y[];
@@ -0,0 +1,2 @@
1
+ import { Scale } from '../../../../../shared-logic/src/ChartsV2/types';
2
+ export declare function useYScale<T>(innerHeight: number, scale: Scale<T>): import("@visx/vendor/d3-scale").ScaleLinear<number, number, never>;
@@ -0,0 +1,4 @@
1
+ export declare const PADDING: {
2
+ paddingOuter: number;
3
+ paddingInner: number;
4
+ };
@@ -1,3 +1,3 @@
1
- import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
2
- import { ShapeDefinition, ConditionalFormattingRule, ChartDataDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
1
+ import { BarStyles } from '../../../../shared-logic/src/BarChartV2/types';
2
+ import { ShapeDefinition, ConditionalFormattingRule, ChartDataDefinition } from '../../../../shared-logic/src/ChartsV2/types';
3
3
  export declare function getBarFill(bars: ShapeDefinition<BarStyles>[], conditionalFormattingRules: ConditionalFormattingRule[], barKey: string, barValues?: ChartDataDefinition | number): string | undefined;