@databrainhq/plugin 0.12.31 → 0.12.33

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.
@@ -11,6 +11,8 @@ export type SingleValueChartProps = {
11
11
  comparisonTimeGrain?: string;
12
12
  comparisonSuffix?: string;
13
13
  fontColor?: string;
14
+ suffix?: string;
15
+ prefix?: string;
14
16
  };
15
17
  value: string | number;
16
18
  hideBorder?: boolean;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const DebouncedInput: ({ value: initialValue, onChange, debounce, ...props }: {
3
+ value: string | number;
4
+ onChange: (value: string | number) => void;
5
+ debounce?: number | undefined;
6
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange">) => React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
3
+ import { TableSettings } from '@/types';
4
+ type Props = {
5
+ data?: any[];
6
+ isLoading: boolean;
7
+ error: string;
8
+ tableSettings?: TableSettings;
9
+ className?: string;
10
+ onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
11
+ onChartReady?: () => void;
12
+ stackCols?: string[];
13
+ rawData?: any;
14
+ colors?: string[];
15
+ showLabels?: boolean;
16
+ };
17
+ export declare const HorizontalStackTable: ({ data, isLoading, error, tableSettings, className, onColumnSizingChange, onChartReady, stackCols, rawData, colors, showLabels, }: Props) => React.JSX.Element;
18
+ export {};
@@ -23,6 +23,8 @@ export declare const CHART_TYPES: {
23
23
  pivot: string;
24
24
  rose: string;
25
25
  horizontalStack: string;
26
+ treeMap: string;
27
+ horizontalStackTable: string;
26
28
  };
27
29
  export declare const timeStamp: {
28
30
  month: string;
@@ -0,0 +1,6 @@
1
+ declare const createNestedArray: (data: Record<string, any>[], selectedRoots: string[], selectedColumns: string[]) => {
2
+ name: string;
3
+ value: number;
4
+ children: never[];
5
+ }[];
6
+ export default createNestedArray;
@@ -71,6 +71,8 @@ export type CustomSettings = {
71
71
  comparisonTimeGrain?: string;
72
72
  comparisonTableName?: string;
73
73
  comparisonValueFontSize?: number;
74
+ singleValueSuffix?: string;
75
+ singleValuePrefix?: string;
74
76
  comparisonSuffix?: string;
75
77
  subHeaderFontSize?: number;
76
78
  dateFormatter?: string;
@@ -126,8 +128,8 @@ export type CustomSettings = {
126
128
  stepPadding?: number;
127
129
  isStackBar?: boolean;
128
130
  showSelectLegend?: boolean;
129
- stackTableCols?: string[];
130
- truncateColValues?: boolean;
131
+ showStackLabels?: boolean;
132
+ coloredBars?: boolean;
131
133
  };
132
134
  export type TableSettings = {
133
135
  contentAlignment?: string;
@@ -137,6 +139,7 @@ export type TableSettings = {
137
139
  enableStripedRows?: boolean;
138
140
  showRowHover?: boolean;
139
141
  showTableTitle?: boolean;
142
+ tableTitle?: string;
140
143
  showTableDesc?: boolean;
141
144
  enableTableSearch?: boolean;
142
145
  enableFilter?: boolean;
@@ -201,6 +204,7 @@ export type ChartSettingsType = {
201
204
  margins?: MarginSettings;
202
205
  xAxis?: string;
203
206
  yAxisList?: string[];
207
+ stackTableCols?: string[];
204
208
  step?: string;
205
209
  measure?: string;
206
210
  singleValue?: string;
@@ -13,10 +13,8 @@ type Params = {
13
13
  isCumulativeBar: boolean;
14
14
  chartType: string;
15
15
  seriesType: string;
16
- stackColList: string[];
17
- truncateCols: boolean;
18
16
  };
19
- export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, isDynamicXaxis, isCumulativeBar, chartType, seriesType, stackColList, truncateCols, }: Params) => {
17
+ export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, isDynamicXaxis, isCumulativeBar, chartType, seriesType, }: Params) => {
20
18
  labels: string[];
21
19
  datasets: any;
22
20
  funnelData: {
@@ -26,7 +24,6 @@ export declare const getChartAttributes: ({ data, measure, singleValue, step, xA
26
24
  singleValueData: any[];
27
25
  xAxisData: any[];
28
26
  seriesData: any;
29
- stackLabels: string[] | undefined;
30
27
  };
31
28
  export declare const transformDataToSankey: ({ data, source, target, value, }: {
32
29
  data: Record<string, any>[];