@databrainhq/plugin 0.14.54 → 0.14.55
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/dist/components/ChartSettingsPopup/components/ChartConfigure/ComboChartFormatter.d.ts +8 -0
- package/dist/components/GaugeLegend/index.d.ts +10 -0
- package/dist/components/PivotTable/PivotTableV2.d.ts +6 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +2 -0
- package/dist/helpers/darkColorIdentifier.d.ts +1 -0
- package/dist/helpers/generateColorPalette.d.ts +1 -0
- package/dist/helpers/getComboRangeLabel.d.ts +5 -0
- package/dist/helpers/getModifiedQuery.d.ts +1 -0
- package/dist/helpers/timeseries.d.ts +17 -2
- package/dist/helpers/tooltipFormatter.d.ts +1 -1
- package/dist/types/app.d.ts +15 -0
- package/dist/utils/getChartAttributes.d.ts +59 -2
- package/dist/utils/getChartOptions.d.ts +6 -1
- package/dist/utils/getNoAxisChartOptions.d.ts +3 -1
- package/dist/webcomponents.es.js +66106 -79880
- package/dist/webcomponents.umd.js +229 -227
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChartSettingsType } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
chartSettings: ChartSettingsType;
|
|
5
|
+
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
6
|
+
};
|
|
7
|
+
declare const ComboChartFormatter: ({ chartSettings, setChartSettings }: Props) => React.JSX.Element;
|
|
8
|
+
export default ComboChartFormatter;
|
|
@@ -5,8 +5,13 @@ type PivotTableProps = {
|
|
|
5
5
|
columns: string[];
|
|
6
6
|
rows: string[];
|
|
7
7
|
values: string[];
|
|
8
|
+
headerSettings?: {
|
|
9
|
+
textColor?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
isEnabled?: boolean;
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
|
-
export declare const PivotTableV2: ({ props: { data, rows, columns, values }, }: {
|
|
14
|
+
export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings }, }: {
|
|
10
15
|
props: PivotTableProps;
|
|
11
16
|
}) => React.JSX.Element;
|
|
12
17
|
export {};
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -47,3 +47,5 @@ export declare const METRIC_MARK_ARCHIVED_MUTATION = "markArchived";
|
|
|
47
47
|
export declare const METRIC_EXECUTE_PYTHON_CODE_PATH: string;
|
|
48
48
|
export declare const METRIC_EXECUTE_PYTHON_CODE_MUTATION = "executePython";
|
|
49
49
|
export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
|
|
50
|
+
export declare const WORLD_MAP_PATH = "../../utils/world.json";
|
|
51
|
+
export declare const USA_MAP_PATH = "../../utils/usa.json";
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const CHART_TYPES: {
|
|
|
30
30
|
geoMap: string;
|
|
31
31
|
geoBarMap: string;
|
|
32
32
|
geoScatterMap: string;
|
|
33
|
+
worldMap: string;
|
|
33
34
|
};
|
|
34
35
|
export declare const chartOptions: {
|
|
35
36
|
name: string;
|
|
@@ -46,6 +47,7 @@ export declare const timeStamp: {
|
|
|
46
47
|
export declare const STATUS_TAB = "STATUS_TAB";
|
|
47
48
|
export declare const STREAM_TAB = "STREAM_TAB";
|
|
48
49
|
export declare const CLIENT_NAME_VAR = "client_id_variable";
|
|
50
|
+
export declare const STACK_AXIS = "stack";
|
|
49
51
|
export declare const RLS_CONDITIONS: Record<string, string>;
|
|
50
52
|
export declare const CHART_TAB = "CHART_TAB";
|
|
51
53
|
export declare const TABLE_TAB = "TABLE_TAB";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const darkColorIdentifier: (color: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateColorPalette: (originalColors: string[], numberOfRecords: number) => string[];
|
|
@@ -54,4 +54,5 @@ export declare const getSqlStatement: ({ query, clientId, rlsConditions, globalF
|
|
|
54
54
|
export declare const isAppliedFilter: (filter: RlsCondition) => number | boolean | Date | undefined;
|
|
55
55
|
export declare const onChangeGlobalFilter: ({ column, setAppliedFilters, value, operator, type, }: OnChangeGlobalFilterParams) => void;
|
|
56
56
|
export declare const getColumnNameKeyString: (columnName: string, dbName: string) => string;
|
|
57
|
+
export declare const getExecuteSqlResponseData: (data: any) => any;
|
|
57
58
|
export {};
|
|
@@ -4,7 +4,7 @@ interface TimeSeriesData {
|
|
|
4
4
|
data: Record<string, any>[];
|
|
5
5
|
values?: string[];
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type GetTimeSeriesData = {
|
|
8
8
|
dataArray: Record<string, any>[];
|
|
9
9
|
timeStampKey: string;
|
|
10
10
|
valuekeys: string[];
|
|
@@ -17,7 +17,16 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
|
|
|
17
17
|
isCumulativeBar: boolean;
|
|
18
18
|
customData: any;
|
|
19
19
|
yAxisList: string[];
|
|
20
|
-
|
|
20
|
+
hasPercentSymbol: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const groupByMap: {
|
|
23
|
+
yearly: (date: Date) => string;
|
|
24
|
+
monthly: (date: Date) => string;
|
|
25
|
+
weekly: (date: Date) => string;
|
|
26
|
+
daily: (date: Date) => string;
|
|
27
|
+
quarterly: (date: Date) => string;
|
|
28
|
+
};
|
|
29
|
+
export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuekeys, groupBy, labelSettings, customSettings, backGroundColor, fillXAxis, isCumulativeBar, customData, yAxisList, hasPercentSymbol, }: GetTimeSeriesData) => ({
|
|
21
30
|
stack?: string | undefined;
|
|
22
31
|
barWidth?: string | undefined;
|
|
23
32
|
showBackground?: boolean | undefined;
|
|
@@ -36,6 +45,9 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
|
|
|
36
45
|
label: {
|
|
37
46
|
show: boolean | undefined;
|
|
38
47
|
position: string | undefined;
|
|
48
|
+
formatter(d: {
|
|
49
|
+
data: any;
|
|
50
|
+
}): string;
|
|
39
51
|
};
|
|
40
52
|
emphasis: {
|
|
41
53
|
focus: string;
|
|
@@ -59,6 +71,9 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
|
|
|
59
71
|
label: {
|
|
60
72
|
show: boolean | undefined;
|
|
61
73
|
position: string | undefined;
|
|
74
|
+
formatter(d: {
|
|
75
|
+
data: any;
|
|
76
|
+
}): string;
|
|
62
77
|
};
|
|
63
78
|
emphasis: {
|
|
64
79
|
focus: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const tooltipFormatter: (params: any, chartOptions: any) => string;
|
|
1
|
+
export declare const tooltipFormatter: (params: any, chartOptions: any, hasPercentSymbol?: boolean) => string;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export type LegendSettings = {
|
|
|
75
75
|
legendShape?: string;
|
|
76
76
|
customise?: boolean;
|
|
77
77
|
fixedPosition?: string;
|
|
78
|
+
disableScroll?: boolean;
|
|
78
79
|
};
|
|
79
80
|
export type MarginSettings = {
|
|
80
81
|
marginTop?: number;
|
|
@@ -92,6 +93,15 @@ export type CustomSettings = {
|
|
|
92
93
|
upperLimit: number;
|
|
93
94
|
lowerLimit: number;
|
|
94
95
|
label: string;
|
|
96
|
+
color?: string;
|
|
97
|
+
}[];
|
|
98
|
+
comboLabelFormatter?: {
|
|
99
|
+
axis: string;
|
|
100
|
+
formatter: {
|
|
101
|
+
upperLimit: number;
|
|
102
|
+
lowerLimit: number;
|
|
103
|
+
label: string;
|
|
104
|
+
}[];
|
|
95
105
|
}[];
|
|
96
106
|
barWidth?: number;
|
|
97
107
|
barRadius?: number[];
|
|
@@ -240,6 +250,11 @@ export type TableSettings = {
|
|
|
240
250
|
listColumns?: string[];
|
|
241
251
|
listSeparator?: string;
|
|
242
252
|
stackColAlias?: string;
|
|
253
|
+
customHeaderColor?: {
|
|
254
|
+
isEnabled?: boolean;
|
|
255
|
+
color?: string;
|
|
256
|
+
textColor?: string;
|
|
257
|
+
};
|
|
243
258
|
};
|
|
244
259
|
export type BackgroundSettings = {
|
|
245
260
|
show?: boolean;
|
|
@@ -1,4 +1,61 @@
|
|
|
1
|
-
type
|
|
1
|
+
type GetLabelsParams = {
|
|
2
|
+
data: Record<string, any>[] | undefined;
|
|
3
|
+
xAxis: string | undefined;
|
|
4
|
+
isDynamicXaxis: boolean;
|
|
5
|
+
isGroupXAxis: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const getLabels: ({ data, xAxis, isDynamicXaxis, isGroupXAxis, }: GetLabelsParams) => string[] | undefined;
|
|
8
|
+
export type GetDatasetsParams = {
|
|
9
|
+
data: Record<string, any>[] | undefined;
|
|
10
|
+
yAxisList: string[] | undefined;
|
|
11
|
+
xAxis: string | undefined;
|
|
12
|
+
isDynamicXaxis: boolean;
|
|
13
|
+
isCumulativeBar: boolean;
|
|
14
|
+
chartType: string;
|
|
15
|
+
seriesType: string;
|
|
16
|
+
isGroupXAxis: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const getDatasets: ({ data, yAxisList, xAxis, isDynamicXaxis, isCumulativeBar, chartType, seriesType, isGroupXAxis, }: GetDatasetsParams) => {
|
|
19
|
+
label: string;
|
|
20
|
+
data: any[] | undefined;
|
|
21
|
+
borderColor: string;
|
|
22
|
+
}[] | undefined;
|
|
23
|
+
type GetFunnelDataParams = {
|
|
24
|
+
data: Record<string, any>[] | undefined;
|
|
25
|
+
measure: string | undefined;
|
|
26
|
+
step: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
export declare const getFunnelData: ({ data, measure, step }: GetFunnelDataParams) => {
|
|
29
|
+
value: any;
|
|
30
|
+
name: any;
|
|
31
|
+
}[];
|
|
32
|
+
type GetSingleValueDataParams = {
|
|
33
|
+
data: Record<string, any>[] | undefined;
|
|
34
|
+
singleValue: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
export declare const getSingleValueData: ({ data, singleValue, }: GetSingleValueDataParams) => any[];
|
|
37
|
+
type GetXaxisDataParams = {
|
|
38
|
+
isTimeSeries: boolean;
|
|
39
|
+
xAxis: string | undefined;
|
|
40
|
+
data: Record<string, any>[] | undefined;
|
|
41
|
+
selectedFormat: string | undefined;
|
|
42
|
+
fillXAxis: boolean;
|
|
43
|
+
};
|
|
44
|
+
export declare const getXAxisData: ({ isTimeSeries, xAxis, data, selectedFormat, fillXAxis, }: GetXaxisDataParams) => any[];
|
|
45
|
+
export type GetSeriesDataParams = {
|
|
46
|
+
data: Record<string, any>[] | undefined;
|
|
47
|
+
xAxis: string | undefined;
|
|
48
|
+
yAxisList: string[] | undefined;
|
|
49
|
+
seriesField: string | undefined;
|
|
50
|
+
isTimeSeries: boolean;
|
|
51
|
+
selectedFormat: string | undefined;
|
|
52
|
+
fillXAxis: boolean;
|
|
53
|
+
isCumulativeBar: boolean;
|
|
54
|
+
chartType: string;
|
|
55
|
+
seriesType: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const getSeriesData: ({ data, seriesField, isTimeSeries, xAxis, selectedFormat, fillXAxis, yAxisList, isCumulativeBar, chartType, seriesType, }: GetSeriesDataParams) => any;
|
|
58
|
+
export type GetChartAttributesParams = {
|
|
2
59
|
data: Record<string, any>[] | undefined;
|
|
3
60
|
yAxisList: string[] | undefined;
|
|
4
61
|
xAxis: string | undefined;
|
|
@@ -15,7 +72,7 @@ type Params = {
|
|
|
15
72
|
seriesType: string;
|
|
16
73
|
isGroupXAxis: boolean;
|
|
17
74
|
};
|
|
18
|
-
export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, isDynamicXaxis, isCumulativeBar, chartType, seriesType, isGroupXAxis, }:
|
|
75
|
+
export declare const getChartAttributes: ({ data, measure, singleValue, step, xAxis, yAxisList, seriesField, isTimeSeries, selectedFormat, fillXAxis, isDynamicXaxis, isCumulativeBar, chartType, seriesType, isGroupXAxis, }: GetChartAttributesParams) => {
|
|
19
76
|
labels: string[];
|
|
20
77
|
datasets: any;
|
|
21
78
|
funnelData: {
|
|
@@ -27,5 +27,10 @@ export type GetChartOptionsParams = {
|
|
|
27
27
|
chartOptions: ChartSettingsType;
|
|
28
28
|
data: Record<string, any>[];
|
|
29
29
|
colors?: string[];
|
|
30
|
+
geoJsonData?: any;
|
|
30
31
|
};
|
|
31
|
-
export declare const
|
|
32
|
+
export declare const getLegendData: ({ chartOptions, data, }: {
|
|
33
|
+
chartOptions: ChartSettingsType;
|
|
34
|
+
data: Record<string, any>[];
|
|
35
|
+
}) => any;
|
|
36
|
+
export declare const getChartOptions: ({ chartOptions, data, colors, geoJsonData, }: GetChartOptionsParams) => Record<string, any>;
|
|
@@ -10,5 +10,7 @@ export type GetNoAxisChartOptionsParams = {
|
|
|
10
10
|
name: any;
|
|
11
11
|
}[];
|
|
12
12
|
singleValueData?: any;
|
|
13
|
+
geoJsonData?: any;
|
|
14
|
+
mapColors?: string[];
|
|
13
15
|
};
|
|
14
|
-
export declare const getNoAxisChartOptions: ({ chartOptions, data, colors, datasets, funnelData, labels, singleValueData, }: GetNoAxisChartOptionsParams) => Record<string, any>;
|
|
16
|
+
export declare const getNoAxisChartOptions: ({ chartOptions, data, colors, datasets, funnelData, labels, singleValueData, geoJsonData, mapColors, }: GetNoAxisChartOptionsParams) => Record<string, any>;
|