@databrainhq/plugin 0.14.56 → 0.14.58
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/Chart/index.d.ts +5 -2
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +2 -1
- package/dist/components/Icons/icons.d.ts +1 -1
- package/dist/components/List/index.d.ts +3 -1
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +3 -2
- package/dist/components/PivotTable/PivotTableV2.d.ts +6 -2
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/TimeSeriesSettings/index.d.ts +1 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +1 -1
- package/dist/helpers/createMetric.d.ts +3 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/timeseriesOption.d.ts +198 -0
- package/dist/hooks/useDatasetMetric.d.ts +2 -1
- package/dist/hooks/useGenerateMetric.d.ts +2 -1
- package/dist/hooks/useMetricCard.d.ts +6 -1
- package/dist/queries/index.d.ts +1 -0
- package/dist/queries/metric.mutation.d.ts +9 -1
- package/dist/types/app.d.ts +21 -1
- package/dist/types/metricCreate.d.ts +6 -1
- package/dist/types/queryTypes.d.ts +9 -0
- package/dist/utils/getChartOptions.d.ts +2 -1
- package/dist/webcomponents.es.js +41798 -40838
- package/dist/webcomponents.umd.js +194 -189
- package/package.json +1 -1
|
@@ -21,5 +21,7 @@ export type ListProps = {
|
|
|
21
21
|
action: string;
|
|
22
22
|
id: string;
|
|
23
23
|
}>>;
|
|
24
|
+
isDisableMoreOption?: boolean;
|
|
25
|
+
isEnableHovering?: boolean;
|
|
24
26
|
};
|
|
25
|
-
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, }: ListProps) => React.JSX.Element;
|
|
27
|
+
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableHovering, }: ListProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MetricOutputProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, configuration, dbName, }: MetricOutputProps) => React.JSX.Element;
|
|
3
|
+
export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, configuration, dbName, pivotDrillState, }: MetricOutputProps) => React.JSX.Element;
|
package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ClickActionsConfig, ChartSettingsType } from '@/types';
|
|
2
|
+
import { ClickActionsConfig, ChartSettingsType, PivotDrillState } from '@/types';
|
|
3
3
|
type Props = {
|
|
4
4
|
data?: Record<string, any>[];
|
|
5
5
|
isLoading: boolean;
|
|
@@ -15,6 +15,7 @@ type Props = {
|
|
|
15
15
|
hasNumberKeys: boolean;
|
|
16
16
|
isEnableGauge: boolean;
|
|
17
17
|
error: string;
|
|
18
|
+
pivotDrillState: PivotDrillState;
|
|
18
19
|
};
|
|
19
|
-
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, error, }: Props) => React.JSX.Element;
|
|
20
|
+
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, pivotDrillState, error, }: Props) => React.JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Aggregate } from '@/types';
|
|
2
|
+
import { Aggregate, OnDrillPivotTableParams, PivotDrillState } from '@/types';
|
|
3
3
|
type DataRow = Record<string, any>;
|
|
4
4
|
type PivotTableProps = {
|
|
5
5
|
data: DataRow[];
|
|
@@ -12,8 +12,12 @@ type PivotTableProps = {
|
|
|
12
12
|
isEnabled?: boolean;
|
|
13
13
|
};
|
|
14
14
|
measures: Aggregate[];
|
|
15
|
+
isEnableStripedRows: boolean;
|
|
16
|
+
dimensions: string[];
|
|
17
|
+
onDrillPivotTable?: (value: OnDrillPivotTableParams) => void;
|
|
18
|
+
pivotDrillState: PivotDrillState;
|
|
15
19
|
};
|
|
16
|
-
export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings, measures }, }: {
|
|
20
|
+
export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings, measures, isEnableStripedRows, dimensions, onDrillPivotTable, pivotDrillState, }, }: {
|
|
17
21
|
props: PivotTableProps;
|
|
18
22
|
}) => React.JSX.Element;
|
|
19
23
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Colors } from '@/types';
|
|
3
3
|
interface Props {
|
|
4
|
-
variant?: 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'display' | 'body-text-xs';
|
|
4
|
+
variant?: 'heading-xl' | 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'sub-label' | 'display' | 'body-text-xs';
|
|
5
5
|
color?: Colors;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onClick?: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TimeSeriesSettingsProps } from '@/types';
|
|
3
|
-
declare const TimeSeriesSettings: ({ onChange, settings: { groupBySettings, seriesType }, yAxisList, }: TimeSeriesSettingsProps) => React.JSX.Element;
|
|
3
|
+
declare const TimeSeriesSettings: ({ onChange, settings: { groupBySettings, seriesType }, yAxisList, onChangeTimeseriesFormat, }: TimeSeriesSettingsProps) => React.JSX.Element;
|
|
4
4
|
export default TimeSeriesSettings;
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export declare const DASHBOARD_THEME_QUERY = "getTheme";
|
|
|
36
36
|
export declare const METRIC_QUERY_PATH: string;
|
|
37
37
|
export declare const NEW_METRIC_QUERY_PATH: string;
|
|
38
38
|
export declare const METRIC_QUERY_QUERY = "query";
|
|
39
|
+
export declare const NEW_METRIC_DATASET_METRIC_PATH: string;
|
|
40
|
+
export declare const NEW_METRIC_DATASET_METRIC_MUTATION = "newDatasetMetricCreation";
|
|
39
41
|
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_PATH: string;
|
|
40
42
|
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_QUERY = "rawDownloadSettings";
|
|
41
43
|
export declare const METRIC_COLUMN_PATH: string;
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export declare const NUMBER_FORMAT: {
|
|
|
98
98
|
label: string;
|
|
99
99
|
value: string;
|
|
100
100
|
}[];
|
|
101
|
-
export declare const ICONS_LIST: readonly ["new-window", "circle", "group-by", "undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles"];
|
|
101
|
+
export declare const ICONS_LIST: readonly ["people", "new-window", "circle", "group-by", "undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles"];
|
|
102
102
|
export declare const NUMBER = "number";
|
|
103
103
|
export declare const STRING = "string";
|
|
104
104
|
export declare const BOOLEAN = "boolean";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Aggregate, Dimension, FloatingDropDownOption, SelectedColumn } from '@/types';
|
|
1
|
+
import { Aggregate, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn } from '@/types';
|
|
2
2
|
export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
|
|
3
3
|
export declare const getColumnType: (column: SelectedColumn) => "default" | "custom" | "arithmetic_column";
|
|
4
4
|
export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
|
|
5
5
|
dimensions: Dimension[];
|
|
6
6
|
aggregates: Aggregate[];
|
|
7
7
|
};
|
|
8
|
+
export declare const getChartFields: (colList: SelectedColumn[], dbName: string) => string[];
|
|
9
|
+
export declare const getAppliedFilters: (filterList: RlsCondition[], companyTenancyType: string, clientId: string) => RlsCondition[];
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { BackgroundSettings, ChartSettingsType, CustomSettings, FloatingDropDownOption, LabelSettings, LegendSettings } from '@/types';
|
|
2
|
+
type DataRow = Record<string, any>;
|
|
3
|
+
type AxisSettings = {
|
|
4
|
+
axis?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
type GetSeriesOptionParams = {
|
|
7
|
+
chartOptions: ChartSettingsType;
|
|
8
|
+
data: DataRow[];
|
|
9
|
+
labelSettings: LabelSettings;
|
|
10
|
+
backGroundColor: BackgroundSettings;
|
|
11
|
+
customSettings: CustomSettings;
|
|
12
|
+
colorOptions: Record<string, any>;
|
|
13
|
+
defaultOptions: Record<string, any>;
|
|
14
|
+
legendSettings: LegendSettings;
|
|
15
|
+
axisSettings: AxisSettings;
|
|
16
|
+
legendPosition: Record<string, any>;
|
|
17
|
+
};
|
|
18
|
+
export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, customSettings, labelSettings, colorOptions, defaultOptions, legendSettings, axisSettings, legendPosition, }: GetSeriesOptionParams) => {
|
|
19
|
+
axisLine: {
|
|
20
|
+
show: boolean | undefined;
|
|
21
|
+
};
|
|
22
|
+
axisLabel: {
|
|
23
|
+
show: boolean | undefined;
|
|
24
|
+
};
|
|
25
|
+
tooltip: {
|
|
26
|
+
trigger: string;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
padding: number;
|
|
30
|
+
axisPointer: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
className: string;
|
|
34
|
+
enterable: boolean;
|
|
35
|
+
valueFormatter: (value: any) => string;
|
|
36
|
+
formatter: (params: any) => string;
|
|
37
|
+
};
|
|
38
|
+
xAxis: {
|
|
39
|
+
name: string | undefined;
|
|
40
|
+
nameLocation: string;
|
|
41
|
+
nameGap: number;
|
|
42
|
+
nameTextStyle: {
|
|
43
|
+
fontSize: number;
|
|
44
|
+
color: string;
|
|
45
|
+
fontWeight: number;
|
|
46
|
+
};
|
|
47
|
+
type: string;
|
|
48
|
+
axisTick: {
|
|
49
|
+
alignWithLabel: boolean;
|
|
50
|
+
};
|
|
51
|
+
axisLabel: {
|
|
52
|
+
formatter?: ((value: any) => string) | undefined;
|
|
53
|
+
show: boolean;
|
|
54
|
+
color: string;
|
|
55
|
+
fontSize: number;
|
|
56
|
+
fontWeight: number;
|
|
57
|
+
fontFamily: string | undefined;
|
|
58
|
+
interval: number;
|
|
59
|
+
rotate: number | undefined;
|
|
60
|
+
hideOverlap: boolean;
|
|
61
|
+
};
|
|
62
|
+
splitLine: {
|
|
63
|
+
show: boolean;
|
|
64
|
+
};
|
|
65
|
+
axisLine: {
|
|
66
|
+
show: boolean;
|
|
67
|
+
};
|
|
68
|
+
data: string[];
|
|
69
|
+
};
|
|
70
|
+
yAxis: {
|
|
71
|
+
name: string | undefined;
|
|
72
|
+
nameLocation: string;
|
|
73
|
+
nameGap: number;
|
|
74
|
+
nameTextStyle: {
|
|
75
|
+
fontSize: number;
|
|
76
|
+
color: string;
|
|
77
|
+
fontWeight: number;
|
|
78
|
+
};
|
|
79
|
+
type: string;
|
|
80
|
+
position: string | undefined;
|
|
81
|
+
splitLine: {
|
|
82
|
+
show: boolean;
|
|
83
|
+
};
|
|
84
|
+
axisLine: {
|
|
85
|
+
show: boolean;
|
|
86
|
+
};
|
|
87
|
+
axisLabel: {
|
|
88
|
+
show: boolean;
|
|
89
|
+
color: string;
|
|
90
|
+
fontSize: number;
|
|
91
|
+
fontWeight: number;
|
|
92
|
+
fontFamily: string | undefined;
|
|
93
|
+
formatter: (value: any) => string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
legend: {
|
|
97
|
+
orient: string | undefined;
|
|
98
|
+
icon: string | undefined;
|
|
99
|
+
type: string;
|
|
100
|
+
data: string[];
|
|
101
|
+
formatter(value: any): string;
|
|
102
|
+
tooltip: {
|
|
103
|
+
show: boolean;
|
|
104
|
+
formatter(params: {
|
|
105
|
+
name: any;
|
|
106
|
+
}): any;
|
|
107
|
+
};
|
|
108
|
+
textStyle: {
|
|
109
|
+
rich: {
|
|
110
|
+
a: {
|
|
111
|
+
fontSize: number;
|
|
112
|
+
lineHeight: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
top: number | undefined;
|
|
117
|
+
left: number | undefined;
|
|
118
|
+
right: number | undefined;
|
|
119
|
+
bottom: number | undefined;
|
|
120
|
+
show: boolean | undefined;
|
|
121
|
+
} | {
|
|
122
|
+
orient: string | undefined;
|
|
123
|
+
icon: string | undefined;
|
|
124
|
+
type: string;
|
|
125
|
+
data: string[];
|
|
126
|
+
formatter(value: any): string;
|
|
127
|
+
tooltip: {
|
|
128
|
+
show: boolean;
|
|
129
|
+
formatter(params: {
|
|
130
|
+
name: any;
|
|
131
|
+
}): any;
|
|
132
|
+
};
|
|
133
|
+
textStyle: {
|
|
134
|
+
rich: {
|
|
135
|
+
a: {
|
|
136
|
+
fontSize: number;
|
|
137
|
+
lineHeight: number;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
show: boolean | undefined;
|
|
142
|
+
};
|
|
143
|
+
series: ({
|
|
144
|
+
stack?: string | undefined;
|
|
145
|
+
barWidth?: string | undefined;
|
|
146
|
+
showBackground?: boolean | undefined;
|
|
147
|
+
backgroundStyle?: {
|
|
148
|
+
color: string;
|
|
149
|
+
} | undefined;
|
|
150
|
+
itemStyle?: {
|
|
151
|
+
borderRadius: number[] | undefined;
|
|
152
|
+
} | undefined;
|
|
153
|
+
areaStyle: {
|
|
154
|
+
opacity?: undefined;
|
|
155
|
+
};
|
|
156
|
+
data: string[] | number[];
|
|
157
|
+
type: "line" | "bar";
|
|
158
|
+
name: string;
|
|
159
|
+
label: {
|
|
160
|
+
show: boolean | undefined;
|
|
161
|
+
position: string | undefined;
|
|
162
|
+
formatter(d: {
|
|
163
|
+
data: any;
|
|
164
|
+
}): string;
|
|
165
|
+
};
|
|
166
|
+
emphasis: {
|
|
167
|
+
focus: string;
|
|
168
|
+
};
|
|
169
|
+
} | {
|
|
170
|
+
stack?: string | undefined;
|
|
171
|
+
barWidth?: string | undefined;
|
|
172
|
+
showBackground?: boolean | undefined;
|
|
173
|
+
backgroundStyle?: {
|
|
174
|
+
color: string;
|
|
175
|
+
} | undefined;
|
|
176
|
+
itemStyle?: {
|
|
177
|
+
borderRadius: number[] | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
areaStyle: {
|
|
180
|
+
opacity: number;
|
|
181
|
+
};
|
|
182
|
+
data: string[] | number[];
|
|
183
|
+
type: "line" | "bar";
|
|
184
|
+
name: string;
|
|
185
|
+
label: {
|
|
186
|
+
show: boolean | undefined;
|
|
187
|
+
position: string | undefined;
|
|
188
|
+
formatter(d: {
|
|
189
|
+
data: any;
|
|
190
|
+
}): string;
|
|
191
|
+
};
|
|
192
|
+
emphasis: {
|
|
193
|
+
focus: string;
|
|
194
|
+
};
|
|
195
|
+
})[];
|
|
196
|
+
};
|
|
197
|
+
export declare const getFormat: (value: FloatingDropDownOption, dbName: string) => "%b - %Y" | "Mon - yyyy" | "%Y" | "yyyy" | "%Q %Y" | "Q yyyy" | "%Y-%m-%d" | "yyyy-mm-dd" | "%Y-%m-%W" | "yyyy-mm-WW";
|
|
198
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import ReactAce from 'react-ace/lib/ace';
|
|
3
|
-
import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, SelectedColumn, TableType } from '@/types';
|
|
3
|
+
import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, PivotDrillState, SelectedColumn, TableType } from '@/types';
|
|
4
4
|
declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
|
|
5
5
|
configuration: DatasetMetricCreationConfiguration;
|
|
6
6
|
setConfiguration: import("react").Dispatch<import("react").SetStateAction<DatasetMetricCreationConfiguration>>;
|
|
@@ -41,5 +41,6 @@ declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
|
|
|
41
41
|
label: string;
|
|
42
42
|
}[];
|
|
43
43
|
getChartFields: (colList: SelectedColumn[]) => string[];
|
|
44
|
+
pivotDrillState: PivotDrillState;
|
|
44
45
|
};
|
|
45
46
|
export default useDatasetMetric;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
import EChartsReact from 'echarts-for-react';
|
|
4
4
|
import { ColumnSizingState } from '@tanstack/react-table';
|
|
5
|
-
import { ChartSettingsType, ConfigType, FloatingDropDownOption, GenerateMetricState, OnChangeAliasParams, OnChangeHelperFunctionParams, SelectedColumn, SetChartFieldParams, TableObjectType } from '@/types';
|
|
5
|
+
import { ChartSettingsType, ConfigType, FloatingDropDownOption, GenerateMetricState, OnChangeAliasParams, OnChangeHelperFunctionParams, PivotDrillState, SelectedColumn, SetChartFieldParams, TableObjectType } from '@/types';
|
|
6
6
|
declare const useGenerateMetric: (config: ConfigType) => {
|
|
7
7
|
isDisableSaveBtn: boolean;
|
|
8
8
|
setChartSettings: import("react").Dispatch<import("react").SetStateAction<ChartSettingsType>>;
|
|
@@ -59,5 +59,6 @@ declare const useGenerateMetric: (config: ConfigType) => {
|
|
|
59
59
|
}[];
|
|
60
60
|
isRef: boolean;
|
|
61
61
|
setRef: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
62
|
+
pivotDrillState: PivotDrillState;
|
|
62
63
|
};
|
|
63
64
|
export default useGenerateMetric;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings, MetricFilterOptionsType } from '@/types';
|
|
2
|
+
import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings, MetricFilterOptionsType, PivotDrillState, OnDrillPivotTableParams } from '@/types';
|
|
3
3
|
import { MetricCardProps } from '@/components';
|
|
4
4
|
type UseMetricCardProps = {
|
|
5
5
|
metric: Record<string, any>;
|
|
@@ -80,5 +80,10 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
|
|
|
80
80
|
tableResultsDownloadData: Record<string, any>[];
|
|
81
81
|
appliedMetricFilters: RlsCondition[];
|
|
82
82
|
pivotHeaderOptions: FloatingDropDownOption[];
|
|
83
|
+
pivotDrillState: PivotDrillState;
|
|
84
|
+
onDrillPivotTable: ({ filters, nextLevel, currentValue, }: OnDrillPivotTableParams) => void;
|
|
85
|
+
legendData: any;
|
|
86
|
+
timeseriesDimension: any;
|
|
87
|
+
isPythonMode: boolean;
|
|
83
88
|
};
|
|
84
89
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './metric.mutation';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType } from '@/types/queryTypes';
|
|
1
|
+
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType, UseNewDatatsetMetricMutationInputType } from '@/types/queryTypes';
|
|
2
2
|
export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown, UseMetricColumnMutationInputType, unknown>;
|
|
@@ -14,3 +14,11 @@ export declare const useMarkArchivedMutation: () => import("react-query").UseMut
|
|
|
14
14
|
export declare const useExecutePythonMutation: () => import("react-query").UseMutationResult<{
|
|
15
15
|
data: unknown;
|
|
16
16
|
}, unknown, UseExecutePythonMutationInputType, unknown>;
|
|
17
|
+
export declare const useGenerateMetricDataMutation: () => import("react-query").UseMutationResult<{
|
|
18
|
+
data: unknown;
|
|
19
|
+
}, unknown, {
|
|
20
|
+
data: UseNewDatatsetMetricMutationInputType;
|
|
21
|
+
token: string;
|
|
22
|
+
clientId: string;
|
|
23
|
+
isFrontendApp: boolean;
|
|
24
|
+
}, unknown>;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export type TimeSeriesSettingsProps = {
|
|
|
49
49
|
settings: TimeSeriesSettingsType;
|
|
50
50
|
onChange: (timeSeriesSettings: TimeSeriesSettingsType | ((ts: TimeSeriesSettingsType) => TimeSeriesSettingsType)) => void;
|
|
51
51
|
yAxisList: string[];
|
|
52
|
+
onChangeTimeseriesFormat: (value: FloatingDropDownOption) => void;
|
|
52
53
|
};
|
|
53
54
|
export type TimeSeriesChartProps = {
|
|
54
55
|
dataArray: Record<string, any>[];
|
|
@@ -192,7 +193,7 @@ export type CustomSettings = {
|
|
|
192
193
|
showStackLabels?: boolean;
|
|
193
194
|
coloredBars?: boolean;
|
|
194
195
|
};
|
|
195
|
-
export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert';
|
|
196
|
+
export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert' | 'cta';
|
|
196
197
|
export type IconType = (typeof ICONS_LIST)[number];
|
|
197
198
|
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3';
|
|
198
199
|
export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -297,6 +298,7 @@ export type PivotSettingsType2 = {
|
|
|
297
298
|
headers?: string[];
|
|
298
299
|
isDynamicHeaders?: boolean;
|
|
299
300
|
aggregates?: Aggregate[];
|
|
301
|
+
dims?: string[];
|
|
300
302
|
};
|
|
301
303
|
export type GaugeSettingsType = {
|
|
302
304
|
metric?: string;
|
|
@@ -623,3 +625,21 @@ export type AdminThemeOptionsType = {
|
|
|
623
625
|
};
|
|
624
626
|
};
|
|
625
627
|
export type FilterValueType = string | string[] | number | number[] | boolean | boolean[] | null | Record<string, any>;
|
|
628
|
+
export type PivotFilterType = {
|
|
629
|
+
columnName: string;
|
|
630
|
+
value: any;
|
|
631
|
+
};
|
|
632
|
+
export type OnDrillPivotTableParams = {
|
|
633
|
+
filters: PivotFilterType[];
|
|
634
|
+
nextLevel: number;
|
|
635
|
+
currentValue: string;
|
|
636
|
+
};
|
|
637
|
+
export type PivotDrillState = {
|
|
638
|
+
isLoading: boolean;
|
|
639
|
+
error: string;
|
|
640
|
+
data: {
|
|
641
|
+
key: string;
|
|
642
|
+
data: Record<string, any>[];
|
|
643
|
+
}[];
|
|
644
|
+
currentValue: string;
|
|
645
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { RlsCondition, FloatingDropDownOption, ChartSettingsType, TableColumn } from '@/types';
|
|
3
|
+
import { RlsCondition, FloatingDropDownOption, ChartSettingsType, TableColumn, PivotDrillState } from '@/types';
|
|
4
4
|
import { ExternalMetrics } from '@/types/queryTypes';
|
|
5
|
+
import { MetricCardProps } from '@/components';
|
|
5
6
|
type ColumnData = {
|
|
6
7
|
name: string;
|
|
7
8
|
datatype: string;
|
|
@@ -240,6 +241,7 @@ export type MetricOutputProps = {
|
|
|
240
241
|
label: string;
|
|
241
242
|
}[]>>;
|
|
242
243
|
setColumn: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
244
|
+
pivotDrillState: PivotDrillState;
|
|
243
245
|
};
|
|
244
246
|
export type CompanyIntegration = {
|
|
245
247
|
id: string;
|
|
@@ -440,6 +442,9 @@ export type DatasetMetricCreationConfiguration = {
|
|
|
440
442
|
groupByColumnList?: GroupByColumn[];
|
|
441
443
|
rlsConditions?: RlsCondition[];
|
|
442
444
|
isAllClient?: boolean;
|
|
445
|
+
globalFilters?: MetricCardProps['globalFilters'];
|
|
446
|
+
isApplyMetricFilter?: boolean;
|
|
447
|
+
isApplyGlobalFilter?: boolean;
|
|
443
448
|
};
|
|
444
449
|
export type OnChangeHelperFunctionParams = {
|
|
445
450
|
column: SelectedColumn;
|
|
@@ -53,6 +53,11 @@ export type UseMetricQueryQueryInputType = {
|
|
|
53
53
|
offset?: number;
|
|
54
54
|
isAllClient?: boolean;
|
|
55
55
|
disableStringify?: boolean;
|
|
56
|
+
pivotHeaders?: string[];
|
|
57
|
+
timeseriesSettings?: {
|
|
58
|
+
format: string;
|
|
59
|
+
seriesField: string;
|
|
60
|
+
};
|
|
56
61
|
};
|
|
57
62
|
export type UseMetricQueryQueryOutputType = {
|
|
58
63
|
data?: any | null;
|
|
@@ -188,6 +193,10 @@ export type UseDatatsetMetricMutationInputType = {
|
|
|
188
193
|
configuration: DatasetMetricCreationConfiguration;
|
|
189
194
|
id: string;
|
|
190
195
|
};
|
|
196
|
+
export type UseNewDatatsetMetricMutationInputType = {
|
|
197
|
+
configuration: DatasetMetricCreationConfiguration;
|
|
198
|
+
id: string;
|
|
199
|
+
};
|
|
191
200
|
export type UseCreateMetricMutationInputType = {
|
|
192
201
|
chartOptions?: any;
|
|
193
202
|
companyId?: string;
|
|
@@ -28,9 +28,10 @@ export type GetChartOptionsParams = {
|
|
|
28
28
|
data: Record<string, any>[];
|
|
29
29
|
colors?: string[];
|
|
30
30
|
geoJsonData?: any;
|
|
31
|
+
isPythonMode?: boolean;
|
|
31
32
|
};
|
|
32
33
|
export declare const getLegendData: ({ chartOptions, data, }: {
|
|
33
34
|
chartOptions: ChartSettingsType;
|
|
34
35
|
data: Record<string, any>[];
|
|
35
36
|
}) => any;
|
|
36
|
-
export declare const getChartOptions: ({ chartOptions, data, colors, geoJsonData, }: GetChartOptionsParams) => Record<string, any>;
|
|
37
|
+
export declare const getChartOptions: ({ chartOptions, data, colors, isPythonMode, geoJsonData, }: GetChartOptionsParams) => Record<string, any>;
|