@databrainhq/plugin 0.4.2
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 -0
- package/dist/components/Button/index.d.ts +13 -0
- package/dist/components/ChartModal/ChartConfig.d.ts +18 -0
- package/dist/components/ChartModal/ChartModalOptions.d.ts +6 -0
- package/dist/components/ChartModal/SelectField.d.ts +2 -0
- package/dist/components/Charts/AreaChart.d.ts +2 -0
- package/dist/components/Charts/BarChart.d.ts +15 -0
- package/dist/components/Charts/BoxPlot.d.ts +2 -0
- package/dist/components/Charts/BubbleChart.d.ts +2 -0
- package/dist/components/Charts/ComboChart.d.ts +2 -0
- package/dist/components/Charts/DoughnutChart.d.ts +2 -0
- package/dist/components/Charts/FunnelChart.d.ts +2 -0
- package/dist/components/Charts/GaugeChart.d.ts +2 -0
- package/dist/components/Charts/Histogram.d.ts +2 -0
- package/dist/components/Charts/LineChart.d.ts +21 -0
- package/dist/components/Charts/PieChart.d.ts +2 -0
- package/dist/components/Charts/RowChart.d.ts +2 -0
- package/dist/components/Charts/SankeyChart.d.ts +2 -0
- package/dist/components/Charts/ScatterChart.d.ts +2 -0
- package/dist/components/Charts/SingleValueChart.d.ts +2 -0
- package/dist/components/Charts/StackedBarChart.d.ts +2 -0
- package/dist/components/Charts/SteppedAreaChart.d.ts +2 -0
- package/dist/components/Charts/TableChart.d.ts +2 -0
- package/dist/components/Charts/WaterfallChart.d.ts +2 -0
- package/dist/components/DataType/index.d.ts +3 -0
- package/dist/components/Error/index.d.ts +5 -0
- package/dist/components/ExternalMetricForm/index.d.ts +14 -0
- package/dist/components/FilterDropDown/index.d.ts +12 -0
- package/dist/components/FilterField/index.d.ts +20 -0
- package/dist/components/FloatingDropDown/index.d.ts +25 -0
- package/dist/components/FullScreenChart/index.d.ts +8 -0
- package/dist/components/InputField/index.d.ts +25 -0
- package/dist/components/MetricCard/index.d.ts +17 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +8 -0
- package/dist/components/MetricChart/index.d.ts +32 -0
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +4 -0
- package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +17 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +19 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +45 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +8 -0
- package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -0
- package/dist/components/MetricCreation/index.d.ts +3 -0
- package/dist/components/MetricFilters/index.d.ts +10 -0
- package/dist/components/MetricList/index.d.ts +41 -0
- package/dist/components/MetricTable/index.d.ts +6 -0
- package/dist/components/Modal/ModalFooter.d.ts +3 -0
- package/dist/components/Modal/index.d.ts +10 -0
- package/dist/components/PopoverMenu/index.d.ts +12 -0
- package/dist/components/SearchTab/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts +45 -0
- package/dist/components/SingleValueCard/index.d.ts +4 -0
- package/dist/components/Tab/index.d.ts +8 -0
- package/dist/components/Table/index.d.ts +7 -0
- package/dist/components/Text/index.d.ts +10 -0
- package/dist/components/TextAreaField/index.d.ts +18 -0
- package/dist/components/TimeGrainField/index.d.ts +12 -0
- package/dist/components/ToggleButton/index.d.ts +12 -0
- package/dist/consts/index.d.ts +37 -0
- package/dist/consts/metricOptions.d.ts +17 -0
- package/dist/containers/Dashboard/index.d.ts +5 -0
- package/dist/containers/index.d.ts +1 -0
- package/dist/helpers/getTimeFilterValue.d.ts +8 -0
- package/dist/helpers/groupBy.d.ts +2 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +46 -0
- package/dist/hooks/useExternalMetric.d.ts +38 -0
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +14 -0
- package/dist/hooks/useOutsideAlerter.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +101669 -0
- package/dist/index.umd.js +322 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +83 -0
- package/dist/types/metricCreate.d.ts +108 -0
- package/dist/typings.d.ts +17 -0
- package/dist/utils/arrayToCsvString.d.ts +7 -0
- package/dist/utils/colors.d.ts +2 -0
- package/dist/utils/fetcher.d.ts +1 -0
- package/dist/utils/generated/graphql.d.ts +1616 -0
- package/dist/utils/getChartAttributes.d.ts +27 -0
- package/dist/utils/getFormattedDataType.d.ts +2 -0
- package/package.json +99 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare type Params = {
|
|
2
|
+
data: any[] | undefined;
|
|
3
|
+
yAxisList: string[] | undefined;
|
|
4
|
+
xAxis: string | undefined;
|
|
5
|
+
measure: string | undefined;
|
|
6
|
+
step: string | undefined;
|
|
7
|
+
sankeyValues: string[] | undefined;
|
|
8
|
+
singleValue: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
declare const getChartAttributes: ({ data, measure, sankeyValues, singleValue, step, xAxis, yAxisList, }: Params) => {
|
|
11
|
+
labels: string[];
|
|
12
|
+
datasets: {
|
|
13
|
+
label: string;
|
|
14
|
+
data: any[];
|
|
15
|
+
borderColor: string;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
funnelData: ("" | {
|
|
18
|
+
value: any;
|
|
19
|
+
name: any;
|
|
20
|
+
} | undefined)[];
|
|
21
|
+
sankeyData: any[][] | undefined;
|
|
22
|
+
singleValueData: ("" | {
|
|
23
|
+
value: any;
|
|
24
|
+
label: string;
|
|
25
|
+
} | undefined)[];
|
|
26
|
+
};
|
|
27
|
+
export default getChartAttributes;
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@databrainhq/plugin",
|
|
3
|
+
"version": "0.4.2",
|
|
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
|
+
"engines": {
|
|
20
|
+
"node": "^14.13.1 || >=16.15.1",
|
|
21
|
+
"yarn": "please-use-npm"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"serve": "vite --port 3005",
|
|
25
|
+
"build:css": "tailwindcss build -i src/index.css -o dist/index.css",
|
|
26
|
+
"build": "tsc && vite build",
|
|
27
|
+
"husky": "husky install",
|
|
28
|
+
"predeploy": "cd example && npm install && npm run build",
|
|
29
|
+
"lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
|
|
30
|
+
"codegen": "graphql-codegen --config codegen.yml -r dotenv/config",
|
|
31
|
+
"prepare": "npm run build"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@commitlint/cli": "^17.0.3",
|
|
35
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
36
|
+
"@graphql-codegen/cli": "^2.16.4",
|
|
37
|
+
"@graphql-codegen/introspection": "^2.2.3",
|
|
38
|
+
"@graphql-codegen/typescript": "^2.8.7",
|
|
39
|
+
"@graphql-codegen/typescript-operations": "^2.5.12",
|
|
40
|
+
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
|
|
41
|
+
"@graphql-codegen/typescript-react-query": "^3.6.2",
|
|
42
|
+
"@iconify/json": "^2.2.6",
|
|
43
|
+
"@svgr/core": "^6.5.1",
|
|
44
|
+
"@types/chart.js": "^2.9.37",
|
|
45
|
+
"@types/node": "^12.12.38",
|
|
46
|
+
"@types/react": "^18.0.26",
|
|
47
|
+
"@types/react-dom": "^18.0.10",
|
|
48
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
50
|
+
"@typescript-eslint/parser": "^4.31.1",
|
|
51
|
+
"@vitejs/plugin-react": "^1.3.0",
|
|
52
|
+
"autoprefixer": "^10.4.7",
|
|
53
|
+
"babel-eslint": "^10.0.3",
|
|
54
|
+
"cross-env": "^7.0.2",
|
|
55
|
+
"eslint": "^7.32.0",
|
|
56
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
57
|
+
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
58
|
+
"eslint-config-prettier": "^8.3.0",
|
|
59
|
+
"eslint-plugin-import": "^2.24.2",
|
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
61
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
62
|
+
"eslint-plugin-react": "^7.30.1",
|
|
63
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
64
|
+
"eslint-plugin-unicorn": "^36.0.0",
|
|
65
|
+
"graphql": "^16.6.0",
|
|
66
|
+
"husky": "^8.0.1",
|
|
67
|
+
"lint-staged": "^13.0.3",
|
|
68
|
+
"postcss": "^8.4.21",
|
|
69
|
+
"prettier": "^2.0.4",
|
|
70
|
+
"react": "^18.2.0",
|
|
71
|
+
"react-dom": "^18.2.0",
|
|
72
|
+
"tailwindcss": "^3.2.4",
|
|
73
|
+
"ts-node": "^10.9.1",
|
|
74
|
+
"typescript": "^4.6.3",
|
|
75
|
+
"unplugin-icons": "^0.14.7",
|
|
76
|
+
"vite": "^2.9.9",
|
|
77
|
+
"vite-plugin-dts": "^1.7.1",
|
|
78
|
+
"vite-tsconfig-paths": "^4.0.3"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"dist"
|
|
82
|
+
],
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"@headlessui/react": "^1.7.7",
|
|
85
|
+
"chart.js": "^3.9.1",
|
|
86
|
+
"chartjs-plugin-zoom": "^1.2.1",
|
|
87
|
+
"classnames": "^2.3.2",
|
|
88
|
+
"echarts": "^5.4.1",
|
|
89
|
+
"echarts-for-react": "^3.0.2",
|
|
90
|
+
"react-chartjs-2": "^4.3.1",
|
|
91
|
+
"react-grid-layout": "^1.3.4",
|
|
92
|
+
"react-hook-form": "^7.42.1",
|
|
93
|
+
"react-query": "^3.39.2"
|
|
94
|
+
},
|
|
95
|
+
"peerDependencies": {
|
|
96
|
+
"react": "^18.2.0",
|
|
97
|
+
"react-dom": "^18.2.0"
|
|
98
|
+
}
|
|
99
|
+
}
|