@databrainhq/plugin 0.6.10 → 0.7.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/dist/components/ChartModal/ChartConfig.d.ts +2 -2
- package/dist/components/ChartModal/ChartModalOptions.d.ts +2 -2
- package/dist/components/ChartModal/SelectField.d.ts +1 -2
- package/dist/components/ChartModal/index.d.ts +3 -0
- package/dist/components/Charts/LineChart.d.ts +1 -1
- package/dist/components/ExternalMetricForm/index.d.ts +1 -1
- package/dist/components/FilterDropDown/index.d.ts +2 -3
- package/dist/components/FloatingDropDown/index.d.ts +1 -2
- package/dist/components/FullScreenChart/index.d.ts +2 -2
- package/dist/components/GlobalFilters/index.d.ts +3 -3
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +2 -2
- package/dist/components/MetricChart/MetricChart.d.ts +34 -0
- package/dist/components/MetricChart/index.d.ts +2 -35
- package/dist/components/MetricCreation/MetricCreation.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +2 -3
- package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +2 -4
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +2 -3
- package/dist/components/MetricCreation/components/Header/index.d.ts +1 -2
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +3 -3
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +3 -3
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +3 -3
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +1 -2
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +2 -2
- package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -4
- package/dist/components/MetricCreation/index.d.ts +5 -4
- package/dist/components/{RlsFilters/index.d.ts → MetricFilters/MetricFilters.d.ts} +3 -3
- package/dist/components/{RlsFilters → MetricFilters}/MultipleTimeGrain.d.ts +2 -2
- package/dist/components/MetricFilters/index.d.ts +2 -0
- package/dist/components/MetricList/MetricList.d.ts +45 -0
- package/dist/components/MetricList/components/MetricCard.d.ts +2 -3
- package/dist/components/MetricList/components/SingleValueCard.d.ts +1 -2
- package/dist/components/MetricList/index.d.ts +3 -45
- package/dist/components/MetricTable/index.d.ts +2 -2
- package/dist/components/Modal/Modal.d.ts +9 -0
- package/dist/components/Modal/ModalFooter.d.ts +4 -2
- package/dist/components/Modal/index.d.ts +2 -10
- package/dist/components/PopoverMenu/index.d.ts +1 -2
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/consts/app.d.ts +39 -0
- package/dist/consts/index.d.ts +2 -39
- package/dist/containers/Dashboard/{index.d.ts → EmbededDashboard.d.ts} +2 -2
- package/dist/containers/index.d.ts +1 -1
- package/dist/helpers/getModifiedQuery.d.ts +6 -0
- package/dist/helpers/getTimeFilterValue.d.ts +2 -2
- package/dist/helpers/groupArray.d.ts +1 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +1 -2
- package/dist/hooks/useExternalMetric.d.ts +3 -3
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +1 -2
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +15 -0
- package/dist/hooks/useOutsideAlerter.d.ts +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +7152 -8487
- package/dist/index.umd.js +121 -106
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +124 -0
- package/dist/types/index.d.ts +2 -124
- package/dist/types/metricCreate.d.ts +1 -8
- package/dist/utils/arrayToCsvString.d.ts +1 -2
- package/dist/utils/colors.d.ts +1 -2
- package/dist/utils/getChartAttributes.d.ts +2 -2
- package/dist/utils/getFormattedDataType.d.ts +1 -2
- package/dist/utils/index.d.ts +5 -0
- package/package.json +1 -1
- package/dist/components/ErrorFallback/index.d.ts +0 -3
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare type ChildrenProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare type LegendSettings = {
|
|
6
|
+
show: boolean;
|
|
7
|
+
top: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
left: number;
|
|
10
|
+
right: number;
|
|
11
|
+
position: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type CustomSettings = {
|
|
14
|
+
hideSplitLines: string;
|
|
15
|
+
hideAxisLines: string;
|
|
16
|
+
barWidth: number;
|
|
17
|
+
barRadius: number;
|
|
18
|
+
axisLabels: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type BackgroundSettings = {
|
|
21
|
+
show: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare type LabelSettings = {
|
|
24
|
+
axis: string;
|
|
25
|
+
show: boolean;
|
|
26
|
+
position: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type AxisSettings = {
|
|
29
|
+
axis: string;
|
|
30
|
+
};
|
|
31
|
+
export declare type SelectedColumns = {
|
|
32
|
+
column: string;
|
|
33
|
+
datatype: string;
|
|
34
|
+
schemaName: string;
|
|
35
|
+
tableName: string;
|
|
36
|
+
};
|
|
37
|
+
export declare type Schema = {
|
|
38
|
+
id: string;
|
|
39
|
+
schemaName: string;
|
|
40
|
+
tableName: string;
|
|
41
|
+
columns: string[];
|
|
42
|
+
columnsWithDataType: {
|
|
43
|
+
as: any;
|
|
44
|
+
dataType: string;
|
|
45
|
+
name: string;
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
export declare type RlsFilterObjectType = {
|
|
49
|
+
columnName: string;
|
|
50
|
+
condition: string;
|
|
51
|
+
createdAt: any;
|
|
52
|
+
defaultValue?: string | null | undefined;
|
|
53
|
+
value?: string;
|
|
54
|
+
id: any;
|
|
55
|
+
name: string;
|
|
56
|
+
tableName: string;
|
|
57
|
+
operator?: string | 'and' | 'or';
|
|
58
|
+
user: {
|
|
59
|
+
id: any;
|
|
60
|
+
firstName: string;
|
|
61
|
+
lastName: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare type SelectedTable = {
|
|
65
|
+
tableName: string;
|
|
66
|
+
columns: {
|
|
67
|
+
name: string;
|
|
68
|
+
datatype: string;
|
|
69
|
+
as: string;
|
|
70
|
+
}[] | [];
|
|
71
|
+
}[] | undefined;
|
|
72
|
+
export declare type GroupBy = {
|
|
73
|
+
column: string;
|
|
74
|
+
parentColumn?: {
|
|
75
|
+
column: string;
|
|
76
|
+
value: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare type ClientType = {
|
|
80
|
+
label: string;
|
|
81
|
+
value: string;
|
|
82
|
+
};
|
|
83
|
+
export declare type DashboardType = {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
87
|
+
export declare type FloatingDropDownOption = {
|
|
88
|
+
key?: string;
|
|
89
|
+
label: string;
|
|
90
|
+
value: string;
|
|
91
|
+
};
|
|
92
|
+
export declare type FilterType = {
|
|
93
|
+
tableName: string;
|
|
94
|
+
columns: Schema['columnsWithDataType'];
|
|
95
|
+
};
|
|
96
|
+
export declare type JoinField = {
|
|
97
|
+
a: string;
|
|
98
|
+
b: string;
|
|
99
|
+
};
|
|
100
|
+
export declare type SqlError = {
|
|
101
|
+
errorMessage: string;
|
|
102
|
+
explanation: string;
|
|
103
|
+
solution: string;
|
|
104
|
+
};
|
|
105
|
+
export declare type RlsCondition = {
|
|
106
|
+
name: string;
|
|
107
|
+
columnName: string;
|
|
108
|
+
tableName: string;
|
|
109
|
+
datatype: string;
|
|
110
|
+
isAddOnMetrics: boolean;
|
|
111
|
+
options: string[] | number[];
|
|
112
|
+
value?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare type MetricData = {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
dashboards: {
|
|
118
|
+
name: string;
|
|
119
|
+
id: string;
|
|
120
|
+
}[];
|
|
121
|
+
description: string;
|
|
122
|
+
createdBy: string;
|
|
123
|
+
dateCreated: string;
|
|
124
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,124 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
};
|
|
5
|
-
export declare type LegendSettings = {
|
|
6
|
-
show: boolean;
|
|
7
|
-
top: number;
|
|
8
|
-
bottom: number;
|
|
9
|
-
left: number;
|
|
10
|
-
right: number;
|
|
11
|
-
position: string;
|
|
12
|
-
};
|
|
13
|
-
export declare type CustomSettings = {
|
|
14
|
-
hideSplitLines: string;
|
|
15
|
-
hideAxisLines: string;
|
|
16
|
-
barWidth: number;
|
|
17
|
-
barRadius: number;
|
|
18
|
-
axisLabels: string;
|
|
19
|
-
};
|
|
20
|
-
export declare type BackgroundSettings = {
|
|
21
|
-
show: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare type LabelSettings = {
|
|
24
|
-
axis: string;
|
|
25
|
-
show: boolean;
|
|
26
|
-
position: string;
|
|
27
|
-
};
|
|
28
|
-
export declare type AxisSettings = {
|
|
29
|
-
axis: string;
|
|
30
|
-
};
|
|
31
|
-
export declare type SelectedColumns = {
|
|
32
|
-
column: string;
|
|
33
|
-
datatype: string;
|
|
34
|
-
schemaName: string;
|
|
35
|
-
tableName: string;
|
|
36
|
-
};
|
|
37
|
-
export declare type Schema = {
|
|
38
|
-
id: string;
|
|
39
|
-
schemaName: string;
|
|
40
|
-
tableName: string;
|
|
41
|
-
columns: string[];
|
|
42
|
-
columnsWithDataType: {
|
|
43
|
-
as: any;
|
|
44
|
-
dataType: string;
|
|
45
|
-
name: string;
|
|
46
|
-
}[];
|
|
47
|
-
};
|
|
48
|
-
export declare type RlsFilterObjectType = {
|
|
49
|
-
columnName: string;
|
|
50
|
-
condition: string;
|
|
51
|
-
createdAt: any;
|
|
52
|
-
defaultValue?: string | null | undefined;
|
|
53
|
-
value?: string;
|
|
54
|
-
id: any;
|
|
55
|
-
name: string;
|
|
56
|
-
tableName: string;
|
|
57
|
-
operator?: string | 'and' | 'or';
|
|
58
|
-
user: {
|
|
59
|
-
id: any;
|
|
60
|
-
firstName: string;
|
|
61
|
-
lastName: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
export declare type SelectedTable = {
|
|
65
|
-
tableName: string;
|
|
66
|
-
columns: {
|
|
67
|
-
name: string;
|
|
68
|
-
datatype: string;
|
|
69
|
-
as: string;
|
|
70
|
-
}[] | [];
|
|
71
|
-
}[] | undefined;
|
|
72
|
-
export declare type GroupBy = {
|
|
73
|
-
column: string;
|
|
74
|
-
parentColumn?: {
|
|
75
|
-
column: string;
|
|
76
|
-
value: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
export declare type ClientType = {
|
|
80
|
-
label: string;
|
|
81
|
-
value: string;
|
|
82
|
-
};
|
|
83
|
-
export declare type DashboardType = {
|
|
84
|
-
id: string;
|
|
85
|
-
name: string;
|
|
86
|
-
};
|
|
87
|
-
export declare type FloatingDropDownOption = {
|
|
88
|
-
key?: string;
|
|
89
|
-
label: string;
|
|
90
|
-
value: string;
|
|
91
|
-
};
|
|
92
|
-
export declare type FilterType = {
|
|
93
|
-
tableName: string;
|
|
94
|
-
columns: Schema['columnsWithDataType'];
|
|
95
|
-
};
|
|
96
|
-
export declare type JoinField = {
|
|
97
|
-
a: string;
|
|
98
|
-
b: string;
|
|
99
|
-
};
|
|
100
|
-
export declare type SqlError = {
|
|
101
|
-
errorMessage: string;
|
|
102
|
-
explanation: string;
|
|
103
|
-
solution: string;
|
|
104
|
-
};
|
|
105
|
-
export declare type RlsCondition = {
|
|
106
|
-
name: string;
|
|
107
|
-
columnName: string;
|
|
108
|
-
tableName: string;
|
|
109
|
-
datatype: string;
|
|
110
|
-
isAddOnMetrics: boolean;
|
|
111
|
-
options: string[] | number[];
|
|
112
|
-
value?: string;
|
|
113
|
-
};
|
|
114
|
-
export declare type MetricData = {
|
|
115
|
-
id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
dashboards: {
|
|
118
|
-
name: string;
|
|
119
|
-
id: string;
|
|
120
|
-
}[];
|
|
121
|
-
description: string;
|
|
122
|
-
createdBy: string;
|
|
123
|
-
dateCreated: string;
|
|
124
|
-
};
|
|
1
|
+
export * from './app';
|
|
2
|
+
export * from './metricCreate';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings, RlsCondition } from '
|
|
2
|
+
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings, RlsCondition } from './app';
|
|
3
3
|
import { FloatingDropDownOption } from '@/components/FloatingDropDown';
|
|
4
4
|
declare type ColumnData = {
|
|
5
5
|
name: string;
|
|
@@ -107,11 +107,4 @@ export declare type CompanyIntegration = {
|
|
|
107
107
|
id: string;
|
|
108
108
|
name: string;
|
|
109
109
|
} | undefined;
|
|
110
|
-
export declare type GroupBy = {
|
|
111
|
-
column: string;
|
|
112
|
-
parentColumn?: {
|
|
113
|
-
column: string;
|
|
114
|
-
value: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
110
|
export {};
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* @param array - array of objects with key value pairs
|
|
4
4
|
* @returns uri encoded csv data string
|
|
5
5
|
*/
|
|
6
|
-
declare const objectArrayToCsvString: (array: Record<string, string>[]) => string;
|
|
7
|
-
export default objectArrayToCsvString;
|
|
6
|
+
export declare const objectArrayToCsvString: (array: Record<string, string>[]) => string;
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const colors: string[];
|
|
2
|
-
export default colors;
|
|
1
|
+
export declare const colors: string[];
|
|
@@ -7,7 +7,7 @@ declare type Params = {
|
|
|
7
7
|
sankeyValues: string[] | undefined;
|
|
8
8
|
singleValue: string | undefined;
|
|
9
9
|
};
|
|
10
|
-
declare const getChartAttributes: ({ data, measure, sankeyValues, singleValue, step, xAxis, yAxisList, }: Params) => {
|
|
10
|
+
export declare const getChartAttributes: ({ data, measure, sankeyValues, singleValue, step, xAxis, yAxisList, }: Params) => {
|
|
11
11
|
labels: string[];
|
|
12
12
|
datasets: {
|
|
13
13
|
label: string;
|
|
@@ -24,4 +24,4 @@ declare const getChartAttributes: ({ data, measure, sankeyValues, singleValue, s
|
|
|
24
24
|
label: string;
|
|
25
25
|
} | undefined)[];
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const getFormattedDataType: (datatype: string) => 'text' | 'number' | 'boolean';
|
|
2
|
-
export default getFormattedDataType;
|
|
1
|
+
export declare const getFormattedDataType: (datatype: string) => 'text' | 'number' | 'boolean';
|
package/package.json
CHANGED