@databrainhq/plugin 0.9.20 → 0.9.21
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/README.md +26 -26
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/ChartModal/ChartConfig.d.ts +16 -6
- package/dist/components/ChartModal/ChartModalOptions.d.ts +5 -7
- package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +1 -1
- package/dist/components/ChartPopup/index.d.ts +1 -1
- package/dist/components/Charts/BarChart.d.ts +1 -1
- package/dist/components/Charts/LineChart.d.ts +1 -1
- package/dist/components/DataType/index.d.ts +1 -1
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/Error/index.d.ts +1 -1
- package/dist/components/ExternalMetricForm/index.d.ts +1 -1
- package/dist/components/FilterDropDown/index.d.ts +2 -2
- package/dist/components/FilterField/index.d.ts +2 -2
- package/dist/components/FloatingDropDown/index.d.ts +2 -2
- package/dist/components/FullScreenChart/index.d.ts +4 -3
- package/dist/components/GlobalFilters/AddFilter.d.ts +2 -2
- package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +1 -1
- package/dist/components/GlobalFilters/index.d.ts +2 -2
- package/dist/components/Icons/index.d.ts +1 -1
- package/dist/components/InfoTooltip/index.d.ts +1 -1
- package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +4 -4
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +1 -1
- package/dist/components/MetricChart/MetricChart.d.ts +1 -1
- package/dist/components/MetricChart/index.d.ts +0 -1
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +26 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +38 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -6
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +1 -0
- package/dist/components/MetricFilterDropDown/index.d.ts +1 -1
- package/dist/components/MetricList/MetricList.d.ts +4 -3
- package/dist/components/MetricList/components/{DownloadRawCsvModal/index.d.ts → DownloadRawCsvModal.d.ts} +1 -1
- package/dist/components/MetricList/components/{LayoutAlert/index.d.ts → LayoutAlert.d.ts} +1 -1
- package/dist/components/MetricList/components/{MetricCards/MetricCard.d.ts → MetricCard.d.ts} +6 -5
- package/dist/components/MetricList/components/{MetricCards/SingleValueCard.d.ts → SingleValueCard.d.ts} +1 -1
- package/dist/components/MetricList/components/{TableViewModal/index.d.ts → TableViewModal.d.ts} +1 -1
- package/dist/components/MetricList/index.d.ts +6 -1
- package/dist/components/MetricTable/index.d.ts +1 -1
- package/dist/components/Modal/ModalFooter.d.ts +1 -1
- package/dist/components/PopoverMenu/index.d.ts +1 -1
- package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +5 -5
- package/dist/components/Tab/index.d.ts +1 -1
- package/dist/components/Table/DebouncedInput.d.ts +1 -1
- package/dist/components/Table/index.d.ts +2 -4
- package/dist/components/TagInputField/index.d.ts +1 -1
- package/dist/components/TimeGrainField/index.d.ts +1 -1
- package/dist/components/ToggleButton/SwitchInput.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleInput.d.ts +1 -1
- package/dist/components/ToggleButton/index.d.ts +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/consts/metricOptions.d.ts +0 -4
- package/dist/containers/Dashboard/Dashboard.d.ts +1 -1
- package/dist/containers/Dashboard/DashboardProvider.d.ts +1 -1
- package/dist/helpers/getTimeFilterValue.d.ts +1 -1
- package/dist/helpers/timeseries.d.ts +6 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useClientDashboardLayout.d.ts +1 -1
- package/dist/hooks/useExternalMetric.d.ts +20 -3
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +1 -1
- package/dist/hooks/useOutsideAlerter.d.ts +1 -1
- package/dist/hooks/useScheduleEmail.d.ts +1 -1
- package/dist/index.es.js +127470 -86236
- package/dist/index.umd.js +242 -298
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +61 -119
- package/dist/types/metricCreate.d.ts +87 -13
- package/dist/typings.d.ts +17 -0
- package/dist/utils/generated/graphql.d.ts +437 -437
- package/dist/utils/getChartAttributes.d.ts +8 -5
- package/dist/utils/handleSaveChartImage.d.ts +3 -0
- package/package.json +98 -110
- package/dist/components/Chart/SingleValueChart.d.ts +0 -16
- package/dist/components/Chart/index.d.ts +0 -21
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +0 -8
- package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +0 -9
- package/dist/components/ChartSettingsPopup/index.d.ts +0 -9
- package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +0 -9
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +0 -18
- package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +0 -7
- package/dist/components/MetricList/components/index.d.ts +0 -8
- package/dist/hooks/useMetricCard.d.ts +0 -37
- package/dist/utils/getChartImage.d.ts +0 -3
- package/dist/utils/getChartOptions.d.ts +0 -7
- /package/dist/components/MetricList/components/{ArchiveMetricModal/index.d.ts → ArchiveMetricModal.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type Params = {
|
|
2
|
-
data:
|
|
1
|
+
declare type Params = {
|
|
2
|
+
data: any[] | undefined;
|
|
3
3
|
yAxisList: string[] | undefined;
|
|
4
4
|
xAxis: string | undefined;
|
|
5
5
|
measure: string | undefined;
|
|
@@ -14,11 +14,14 @@ export declare const getChartAttributes: ({ data, measure, sankeyValues, singleV
|
|
|
14
14
|
data: any[];
|
|
15
15
|
borderColor: string;
|
|
16
16
|
}[] | undefined;
|
|
17
|
-
funnelData: {
|
|
17
|
+
funnelData: ("" | {
|
|
18
18
|
value: any;
|
|
19
19
|
name: any;
|
|
20
|
-
}[];
|
|
20
|
+
} | undefined)[];
|
|
21
21
|
sankeyData: any[][] | undefined;
|
|
22
|
-
singleValueData:
|
|
22
|
+
singleValueData: ("" | {
|
|
23
|
+
value: any;
|
|
24
|
+
label: string;
|
|
25
|
+
} | undefined)[];
|
|
23
26
|
};
|
|
24
27
|
export {};
|
package/package.json
CHANGED
|
@@ -1,110 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@databrainhq/plugin",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "Databrain app dashboard ui plugin.",
|
|
5
|
-
"author": "",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": "databrainhq/plugin",
|
|
8
|
-
"source": "src/index.ts",
|
|
9
|
-
"main": "./dist/index.umd.js",
|
|
10
|
-
"module": "./dist/index.es.js",
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"import": "./dist/index.es.js",
|
|
15
|
-
"require": "./dist/index.umd.js"
|
|
16
|
-
},
|
|
17
|
-
"./dist/style.css": "./dist/style.css"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"build
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@graphql-codegen/
|
|
37
|
-
"@graphql-codegen/
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"react-ace": "^10.1.0",
|
|
100
|
-
"react-datepicker": "^4.11.0",
|
|
101
|
-
"react-error-boundary": "^3.1.4",
|
|
102
|
-
"react-grid-layout": "^1.3.4",
|
|
103
|
-
"react-hook-form": "^7.33.1",
|
|
104
|
-
"react-query": "^3.39.2"
|
|
105
|
-
},
|
|
106
|
-
"peerDependencies": {
|
|
107
|
-
"react": "^18.2.0",
|
|
108
|
-
"react-dom": "^18.2.0"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@databrainhq/plugin",
|
|
3
|
+
"version": "0.9.21",
|
|
4
|
+
"description": "Databrain app dashboard ui plugin.",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "databrainhq/plugin",
|
|
8
|
+
"source": "src/index.ts",
|
|
9
|
+
"main": "./dist/index.umd.js",
|
|
10
|
+
"module": "./dist/index.es.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.es.js",
|
|
15
|
+
"require": "./dist/index.umd.js"
|
|
16
|
+
},
|
|
17
|
+
"./dist/style.css": "./dist/style.css"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"serve": "vite --port 3005",
|
|
21
|
+
"build:css": "tailwindcss build -i src/index.css -o dist/index.css",
|
|
22
|
+
"build": "tsc && vite build",
|
|
23
|
+
"husky": "husky install",
|
|
24
|
+
"predeploy": "cd example && npm install && npm run build",
|
|
25
|
+
"lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
|
|
26
|
+
"codegen": "graphql-codegen --config codegen.yml -r dotenv/config",
|
|
27
|
+
"prepare": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@commitlint/cli": "^17.0.3",
|
|
31
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
32
|
+
"@graphql-codegen/cli": "^2.16.4",
|
|
33
|
+
"@graphql-codegen/introspection": "^2.2.3",
|
|
34
|
+
"@graphql-codegen/typescript": "^2.8.7",
|
|
35
|
+
"@graphql-codegen/typescript-operations": "^2.5.12",
|
|
36
|
+
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
|
|
37
|
+
"@graphql-codegen/typescript-react-query": "^3.6.2",
|
|
38
|
+
"@iconify/json": "^2.2.6",
|
|
39
|
+
"@svgr/core": "^6.5.1",
|
|
40
|
+
"@types/node": "^12.12.38",
|
|
41
|
+
"@types/react": "^18.0.26",
|
|
42
|
+
"@types/react-datepicker": "^4.11.2",
|
|
43
|
+
"@types/react-dom": "^18.0.10",
|
|
44
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
46
|
+
"@typescript-eslint/parser": "^4.31.1",
|
|
47
|
+
"@vitejs/plugin-react": "^1.3.0",
|
|
48
|
+
"autoprefixer": "^10.4.7",
|
|
49
|
+
"babel-eslint": "^10.0.3",
|
|
50
|
+
"cross-env": "^7.0.2",
|
|
51
|
+
"eslint": "^7.32.0",
|
|
52
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
53
|
+
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
54
|
+
"eslint-config-prettier": "^8.3.0",
|
|
55
|
+
"eslint-plugin-import": "^2.24.2",
|
|
56
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
57
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
58
|
+
"eslint-plugin-react": "^7.30.1",
|
|
59
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
60
|
+
"eslint-plugin-unicorn": "^36.0.0",
|
|
61
|
+
"graphql": "^16.6.0",
|
|
62
|
+
"husky": "^8.0.1",
|
|
63
|
+
"lint-staged": "^13.0.3",
|
|
64
|
+
"postcss": "^8.4.21",
|
|
65
|
+
"prettier": "^2.0.4",
|
|
66
|
+
"react": "^18.2.0",
|
|
67
|
+
"react-dom": "^18.2.0",
|
|
68
|
+
"tailwindcss": "^3.2.4",
|
|
69
|
+
"ts-node": "^10.9.1",
|
|
70
|
+
"typescript": "^4.6.3",
|
|
71
|
+
"unplugin-icons": "^0.14.7",
|
|
72
|
+
"vite": "^2.9.9",
|
|
73
|
+
"vite-plugin-dts": "^1.7.1",
|
|
74
|
+
"vite-tsconfig-paths": "^4.0.3"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"dist"
|
|
78
|
+
],
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@headlessui/react": "^1.7.2",
|
|
81
|
+
"@tanstack/match-sorter-utils": "^8.8.4",
|
|
82
|
+
"@tanstack/react-table": "^8.7.9",
|
|
83
|
+
"ace-builds": "^1.17.0",
|
|
84
|
+
"classnames": "^2.3.2",
|
|
85
|
+
"echarts": "^5.4.1",
|
|
86
|
+
"echarts-for-react": "^3.0.2",
|
|
87
|
+
"react-ace": "^10.1.0",
|
|
88
|
+
"react-datepicker": "^4.11.0",
|
|
89
|
+
"react-error-boundary": "^3.1.4",
|
|
90
|
+
"react-grid-layout": "^1.3.4",
|
|
91
|
+
"react-hook-form": "^7.33.1",
|
|
92
|
+
"react-query": "^3.39.2"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"react": "^18.2.0",
|
|
96
|
+
"react-dom": "^18.2.0"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClickActionsConfig } from '@/types';
|
|
3
|
-
export type SingleValueChartProps = {
|
|
4
|
-
settings?: {
|
|
5
|
-
fontSize?: number;
|
|
6
|
-
subHeaderFontSize?: number;
|
|
7
|
-
subHeaderShow?: boolean;
|
|
8
|
-
displayText?: string;
|
|
9
|
-
};
|
|
10
|
-
value: string | number;
|
|
11
|
-
hideBorder?: boolean;
|
|
12
|
-
chartClickConfig?: ClickActionsConfig['chart'];
|
|
13
|
-
className?: string;
|
|
14
|
-
};
|
|
15
|
-
declare const _default: React.MemoExoticComponent<({ value, settings, chartClickConfig, hideBorder, className, }: SingleValueChartProps) => JSX.Element>;
|
|
16
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types';
|
|
3
|
-
export type ChartProps = {
|
|
4
|
-
chartOptions: ChartSettingsType;
|
|
5
|
-
data: Record<string, any>[];
|
|
6
|
-
events?: Record<string, Function>;
|
|
7
|
-
config?: Record<string, any>;
|
|
8
|
-
className?: string;
|
|
9
|
-
colors?: string[];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @name Chart - The metric visualization component.
|
|
13
|
-
* @prop chartOptions - the chart properties saved in the database.
|
|
14
|
-
* @prop data - the array of objects/records returned by the querying.
|
|
15
|
-
* @prop events (optional) - the click, change, etc. events to be added to the chart.
|
|
16
|
-
* @prop config (optional) - any additional chart specific props to be passed to the respective charts e.g. table, single value.
|
|
17
|
-
* @prop className (optional) - the usual className prop to provide styles.
|
|
18
|
-
* @prop colors (optional) - the admin provided chart color palettes.
|
|
19
|
-
* @returns JSX - chart visaulization content.
|
|
20
|
-
*/
|
|
21
|
-
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className }: ChartProps) => JSX.Element>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types/app';
|
|
3
|
-
type Props = {
|
|
4
|
-
chartSettings: ChartSettingsType;
|
|
5
|
-
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
6
|
-
};
|
|
7
|
-
export declare const ChartConfigure: ({ chartSettings, setChartSettings }: Props) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types/app';
|
|
3
|
-
type Props = {
|
|
4
|
-
data: any[] | undefined;
|
|
5
|
-
chartSettings: ChartSettingsType;
|
|
6
|
-
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
7
|
-
};
|
|
8
|
-
export declare const ChartSettings: ({ data, chartSettings, setChartSettings, }: Props) => JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types';
|
|
3
|
-
import { PopoverMenuProps } from '@/components/PopoverMenu';
|
|
4
|
-
export type ChartSettingsPopupProps = Pick<PopoverMenuProps, 'buttonClass' | 'menuClass' | 'menuContainerClass' | 'position'> & {
|
|
5
|
-
data?: Record<string, any>[];
|
|
6
|
-
settings: ChartSettingsType;
|
|
7
|
-
setSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
8
|
-
};
|
|
9
|
-
export declare const ChartSettingsPopup: ({ data, settings, setSettings, buttonClass, menuClass, menuContainerClass, position, }: ChartSettingsPopupProps) => JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import EChartsReact from 'echarts-for-react';
|
|
3
|
-
export type DownloadButtonProps = {
|
|
4
|
-
data: Record<string, any>[];
|
|
5
|
-
chartRef?: React.RefObject<EChartsReact>;
|
|
6
|
-
metricName: string;
|
|
7
|
-
onRawCsvData: () => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, }: DownloadButtonProps) => JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
3
|
-
export type FullScreenViewProps = {
|
|
4
|
-
metric: ExternalMetrics;
|
|
5
|
-
colors?: string[];
|
|
6
|
-
rlsFilters?: {
|
|
7
|
-
param: any;
|
|
8
|
-
filterValues: Record<string, string>;
|
|
9
|
-
};
|
|
10
|
-
onMinimize: () => void;
|
|
11
|
-
clientId: string;
|
|
12
|
-
tenancyLevel: string;
|
|
13
|
-
externalDashboardId: string;
|
|
14
|
-
userProvidedDashboardId: string;
|
|
15
|
-
companyId: string;
|
|
16
|
-
isAllowedToUpdateMetrics?: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare const FullScreenView: ({ metric, colors, rlsFilters, onMinimize, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, }: FullScreenViewProps) => JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './ArchiveMetricModal';
|
|
2
|
-
export * from './DownloadRawCsvModal';
|
|
3
|
-
export * from './LayoutAlert';
|
|
4
|
-
export * from './TableViewModal';
|
|
5
|
-
export * from './MetricCards/MetricCard';
|
|
6
|
-
export * from './MetricCards/SingleValueCard';
|
|
7
|
-
export * from './MetricCards/NoDataLoading';
|
|
8
|
-
export * from './FullScreenView';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ChartSettingsType, FloatingDropDownOption, RlsCondition } from '@/types';
|
|
3
|
-
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
4
|
-
import { MetricCardProps } from '@/components';
|
|
5
|
-
type UseMetricCardProps = {
|
|
6
|
-
metric: ExternalMetrics;
|
|
7
|
-
chartSettings: ChartSettingsType;
|
|
8
|
-
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
9
|
-
clientId: string;
|
|
10
|
-
tenancyLevel: string;
|
|
11
|
-
globalFilters?: MetricCardProps['globalFilters'];
|
|
12
|
-
rlsFilters?: {
|
|
13
|
-
param: any;
|
|
14
|
-
filterValues: Record<string, any>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, chartSettings, setChartSettings, tenancyLevel, }: UseMetricCardProps) => {
|
|
18
|
-
onDrillDown: () => void;
|
|
19
|
-
handleChartClick: (params: any) => void;
|
|
20
|
-
dataDb: Record<string, any>[];
|
|
21
|
-
getUnderlyingData: ({ columnName, value, setData, setLoading, }: {
|
|
22
|
-
columnName: string;
|
|
23
|
-
value: any;
|
|
24
|
-
setData: import("react").Dispatch<import("react").SetStateAction<any[]>>;
|
|
25
|
-
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
26
|
-
}) => void;
|
|
27
|
-
onChangeFilterValue: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
|
|
28
|
-
isShowChartPopup: boolean;
|
|
29
|
-
setShowChartPopup: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
30
|
-
columnName: string | undefined;
|
|
31
|
-
chartParams: any;
|
|
32
|
-
isQueryLoading: boolean;
|
|
33
|
-
groupedData: Record<string, any>[];
|
|
34
|
-
drilledLevel: number;
|
|
35
|
-
rlsConditions: RlsCondition[];
|
|
36
|
-
};
|
|
37
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ChartSettingsType } from '@/types';
|
|
2
|
-
export type GetChartOptionsParams = {
|
|
3
|
-
chartOptions: ChartSettingsType;
|
|
4
|
-
data: Record<string, any>[];
|
|
5
|
-
colors?: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare const getChartOptions: ({ chartOptions, data, colors, }: GetChartOptionsParams) => Record<string, any>;
|
|
File without changes
|