@databrainhq/plugin 0.11.37 → 0.11.39
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 +233 -233
- package/dist/components/ExternalMetricForm/index.d.ts +2 -2
- package/dist/components/MetricCreation/MetricCreation.d.ts +1 -1
- package/dist/components/MetricList/MetricList.d.ts +1 -2
- package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +1 -1
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +1 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +1 -1
- package/dist/components/MetricList/components/index.d.ts +0 -1
- package/dist/consts/api.d.ts +37 -0
- package/dist/helpers/groupBy.d.ts +4 -8
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useApplyAdminTheme.d.ts +1 -2
- package/dist/hooks/useDashboardContext.d.ts +4 -4
- package/dist/hooks/useDownloadRawCsv.d.ts +6 -44
- package/dist/hooks/useEmbeddedMetric.d.ts +2 -3
- package/dist/hooks/useExternalMetric.d.ts +14 -3
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +9 -11
- package/dist/hooks/useMetricCard.d.ts +1 -2
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +4 -4
- package/dist/hooks/useScheduleEmail.d.ts +2 -11
- package/dist/queries/externalDashboard.mutation.d.ts +43 -0
- package/dist/queries/externalDashboard.query.d.ts +13 -0
- package/dist/queries/metric.mutation.d.ts +13 -0
- package/dist/queries/metric.query.d.ts +7 -0
- package/dist/types/metricCreate.d.ts +1 -1
- package/dist/types/queryTypes.d.ts +239 -0
- package/dist/utils/fetcher.d.ts +10 -1
- package/dist/webcomponents.es.js +27968 -28495
- package/dist/webcomponents.umd.js +235 -569
- package/package.json +107 -108
- package/src/index.ts +7 -7
- package/dist/components/MetricList/components/MetricCards/SingleValueCard.d.ts +0 -3
- package/dist/helpers/timesAgo.d.ts +0 -2
- package/dist/hooks/useEmbeddedDashboard.d.ts +0 -67
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +0 -15
- package/dist/utils/generated/graphql.d.ts +0 -4514
package/package.json
CHANGED
|
@@ -1,108 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@databrainhq/plugin",
|
|
3
|
-
"version": "0.11.
|
|
4
|
-
"description": "Databrain app ui plugin.",
|
|
5
|
-
"author": "",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": "databrainhq/plugin",
|
|
8
|
-
"main": "src/index.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./src/index.ts",
|
|
12
|
-
"require": "./src/index.ts"
|
|
13
|
-
},
|
|
14
|
-
"./web": {
|
|
15
|
-
"import": "./dist/webcomponents.es.js",
|
|
16
|
-
"require": "./dist/webcomponents.umd.js",
|
|
17
|
-
"types": "./dist/webcomponents.d.ts"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"start:repl": "vite --host 0.0.0.0",
|
|
22
|
-
"start": "vite --port 3005",
|
|
23
|
-
"build:css": "tailwindcss build -i src/index.css -o dist/index.css",
|
|
24
|
-
"build": "tsc && vite build",
|
|
25
|
-
"husky": "husky install",
|
|
26
|
-
"predeploy": "cd example && npm install && npm run build",
|
|
27
|
-
"lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"storybook
|
|
31
|
-
"storybook": "storybook
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@commitlint/
|
|
36
|
-
"@
|
|
37
|
-
"@graphql-codegen/
|
|
38
|
-
"@graphql-codegen/
|
|
39
|
-
"@graphql-codegen/typescript": "^2.
|
|
40
|
-
"@graphql-codegen/typescript-
|
|
41
|
-
"@graphql-codegen/typescript-react-
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@storybook/addon-
|
|
47
|
-
"@storybook/addon-
|
|
48
|
-
"@storybook/
|
|
49
|
-
"@storybook/
|
|
50
|
-
"@storybook/react": "^7.0.9",
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@tanstack/
|
|
55
|
-
"@
|
|
56
|
-
"@types/react": "^
|
|
57
|
-
"@types/react-
|
|
58
|
-
"@types/react-
|
|
59
|
-
"@
|
|
60
|
-
"@typescript-eslint/
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"babel-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"echarts": "^
|
|
70
|
-
"
|
|
71
|
-
"eslint": "^
|
|
72
|
-
"eslint-config-airbnb": "^
|
|
73
|
-
"eslint-config-
|
|
74
|
-
"eslint-
|
|
75
|
-
"eslint-plugin-
|
|
76
|
-
"eslint-plugin-
|
|
77
|
-
"eslint-plugin-
|
|
78
|
-
"eslint-plugin-react": "^
|
|
79
|
-
"eslint-plugin-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"react": "^
|
|
87
|
-
"react-
|
|
88
|
-
"react-
|
|
89
|
-
"react-
|
|
90
|
-
"react-
|
|
91
|
-
"react-
|
|
92
|
-
"react-
|
|
93
|
-
"react
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"vite": "^
|
|
101
|
-
"vite-plugin-
|
|
102
|
-
"vite-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@databrainhq/plugin",
|
|
3
|
+
"version": "0.11.39",
|
|
4
|
+
"description": "Databrain app ui plugin.",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "databrainhq/plugin",
|
|
8
|
+
"main": "src/index.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./src/index.ts",
|
|
12
|
+
"require": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"./web": {
|
|
15
|
+
"import": "./dist/webcomponents.es.js",
|
|
16
|
+
"require": "./dist/webcomponents.umd.js",
|
|
17
|
+
"types": "./dist/webcomponents.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"start:repl": "vite --host 0.0.0.0",
|
|
22
|
+
"start": "vite --port 3005",
|
|
23
|
+
"build:css": "tailwindcss build -i src/index.css -o dist/index.css",
|
|
24
|
+
"build": "tsc && vite build",
|
|
25
|
+
"husky": "husky install",
|
|
26
|
+
"predeploy": "cd example && npm install && npm run build",
|
|
27
|
+
"lint": "eslint --ext .tsx,.ts --ignore-path .gitignore --fix src",
|
|
28
|
+
"prepare": "npm run build",
|
|
29
|
+
"storybook:repl": "storybook dev -p 6006 --host 0.0.0.0",
|
|
30
|
+
"storybook": "storybook dev -p 6006",
|
|
31
|
+
"build-storybook": "storybook 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
|
+
"@headlessui/react": "^1.7.2",
|
|
43
|
+
"@iconify/json": "^2.2.6",
|
|
44
|
+
"@r2wc/react-to-web-component": "^2.0.2",
|
|
45
|
+
"@storybook/addon-essentials": "^7.0.9",
|
|
46
|
+
"@storybook/addon-interactions": "^7.0.9",
|
|
47
|
+
"@storybook/addon-links": "^7.0.9",
|
|
48
|
+
"@storybook/blocks": "^7.0.9",
|
|
49
|
+
"@storybook/react": "^7.0.9",
|
|
50
|
+
"@storybook/react-vite": "^7.0.9",
|
|
51
|
+
"@storybook/testing-library": "^0.0.14-next.2",
|
|
52
|
+
"@svgr/core": "^6.5.1",
|
|
53
|
+
"@tanstack/match-sorter-utils": "^8.8.4",
|
|
54
|
+
"@tanstack/react-table": "^8.7.9",
|
|
55
|
+
"@types/react": "^18.0.26",
|
|
56
|
+
"@types/react-datepicker": "^4.11.2",
|
|
57
|
+
"@types/react-dom": "^18.0.10",
|
|
58
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
60
|
+
"@typescript-eslint/parser": "^4.31.1",
|
|
61
|
+
"@vitejs/plugin-react": "^4.0",
|
|
62
|
+
"ace-builds": "^1.17.0",
|
|
63
|
+
"autoprefixer": "^10.4.7",
|
|
64
|
+
"babel-eslint": "^10.0.3",
|
|
65
|
+
"babel-loader": "^9.1.2",
|
|
66
|
+
"classnames": "^2.3.2",
|
|
67
|
+
"cross-env": "^7.0.2",
|
|
68
|
+
"echarts": "^5.4.1",
|
|
69
|
+
"echarts-for-react": "^3.0.2",
|
|
70
|
+
"eslint": "^7.32.0",
|
|
71
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
72
|
+
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
73
|
+
"eslint-config-prettier": "^8.3.0",
|
|
74
|
+
"eslint-plugin-import": "^2.24.2",
|
|
75
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
76
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
77
|
+
"eslint-plugin-react": "^7.30.1",
|
|
78
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
79
|
+
"eslint-plugin-unicorn": "^36.0.0",
|
|
80
|
+
"graphql": "^16.6.0",
|
|
81
|
+
"husky": "^8.0.1",
|
|
82
|
+
"lint-staged": "^13.0.3",
|
|
83
|
+
"postcss": "^8.4.21",
|
|
84
|
+
"prettier": "^2.0.4",
|
|
85
|
+
"react": "^18.2.0",
|
|
86
|
+
"react-ace": "^10.1.0",
|
|
87
|
+
"react-datepicker": "^4.11.0",
|
|
88
|
+
"react-dom": "^18.2.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
|
+
"simplebar-react": "^3.2.4",
|
|
94
|
+
"storybook": "^7.0.9",
|
|
95
|
+
"tailwindcss": "^3.2.4",
|
|
96
|
+
"ts-node": "^10.9.1",
|
|
97
|
+
"typescript": "^4.6.3",
|
|
98
|
+
"unplugin-icons": "^0.14.7",
|
|
99
|
+
"vite": "^4.3",
|
|
100
|
+
"vite-plugin-css-injected-by-js": "^3.1.1",
|
|
101
|
+
"vite-plugin-dts": "^2.3",
|
|
102
|
+
"vite-tsconfig-paths": "^4.0.3"
|
|
103
|
+
},
|
|
104
|
+
"files": [
|
|
105
|
+
"dist"
|
|
106
|
+
]
|
|
107
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './containers';
|
|
2
|
-
export * as utils from './utils';
|
|
3
|
-
export * as consts from './consts';
|
|
4
|
-
export * as helpers from './helpers';
|
|
5
|
-
export * as hooks from './hooks';
|
|
6
|
-
export * as types from './types';
|
|
7
|
-
export * as Ui from './components';
|
|
1
|
+
export * from './containers';
|
|
2
|
+
export * as utils from './utils';
|
|
3
|
+
export * as consts from './consts';
|
|
4
|
+
export * as helpers from './helpers';
|
|
5
|
+
export * as hooks from './hooks';
|
|
6
|
+
export * as types from './types';
|
|
7
|
+
export * as Ui from './components';
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export declare const useEmbeddedDashboard: ({ token, dashboardId, }: {
|
|
2
|
-
token: string;
|
|
3
|
-
dashboardId?: string | undefined;
|
|
4
|
-
}) => {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
data: {
|
|
7
|
-
clientId: string | undefined;
|
|
8
|
-
companyId: any;
|
|
9
|
-
isLiveMode: any;
|
|
10
|
-
externalDashboardMetrics: {
|
|
11
|
-
__typename?: "externalDashboardMetrics" | undefined;
|
|
12
|
-
externalMetricId: any;
|
|
13
|
-
externalDashboardId: any;
|
|
14
|
-
externalMetric: {
|
|
15
|
-
__typename?: "externalMetrics" | undefined;
|
|
16
|
-
chartOptions: any;
|
|
17
|
-
clientId?: string | null | undefined;
|
|
18
|
-
companyId: any;
|
|
19
|
-
companyIntegrationId: any;
|
|
20
|
-
createdAt: any;
|
|
21
|
-
createdBy?: string | null | undefined;
|
|
22
|
-
description: string;
|
|
23
|
-
id: any;
|
|
24
|
-
inputFields?: any;
|
|
25
|
-
integrationName: string;
|
|
26
|
-
isCreatedByClient: boolean;
|
|
27
|
-
isLive: boolean;
|
|
28
|
-
metricId: string;
|
|
29
|
-
metricQuery?: string | null | undefined;
|
|
30
|
-
name: string;
|
|
31
|
-
outputColumns?: string | null | undefined;
|
|
32
|
-
query: string;
|
|
33
|
-
timeGrain?: string | null | undefined;
|
|
34
|
-
updatedAt: any;
|
|
35
|
-
selectedGroupBy: any;
|
|
36
|
-
isEnableGroupBy: boolean;
|
|
37
|
-
groupBy: any;
|
|
38
|
-
resizeAttributes: any;
|
|
39
|
-
rlsConditions: any;
|
|
40
|
-
clickActions: any;
|
|
41
|
-
drillDownSettings?: any;
|
|
42
|
-
datasetMetricSettings?: any;
|
|
43
|
-
companyIntegration: {
|
|
44
|
-
__typename?: "companyIntegrations" | undefined;
|
|
45
|
-
name: string;
|
|
46
|
-
workspaceId: any;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
}[] | undefined;
|
|
50
|
-
externalDashboard: {
|
|
51
|
-
__typename?: "externalDashboards" | undefined;
|
|
52
|
-
id: any;
|
|
53
|
-
name: string;
|
|
54
|
-
filters: any;
|
|
55
|
-
layout: any;
|
|
56
|
-
} | undefined;
|
|
57
|
-
externalDashboardId: any;
|
|
58
|
-
rlsSettings: any;
|
|
59
|
-
companyTenancyType: any;
|
|
60
|
-
isAllowedToCreateMetrics: boolean;
|
|
61
|
-
isAllowedToDeleteMetrics: boolean;
|
|
62
|
-
isAllowedToUpdateMetrics: boolean;
|
|
63
|
-
isAllowedToChangeLayout: boolean;
|
|
64
|
-
workspace: any;
|
|
65
|
-
sharingSettingsId: any;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
type Params = {
|
|
4
|
-
clientId: string | null;
|
|
5
|
-
companyId: string | null;
|
|
6
|
-
setError: React.Dispatch<React.SetStateAction<string>>;
|
|
7
|
-
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
-
setData: React.Dispatch<React.SetStateAction<any[] | undefined>>;
|
|
9
|
-
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
10
|
-
setMetricQuery: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
11
|
-
};
|
|
12
|
-
export declare const useGenerateEmbeddedMetric: ({ clientId, companyId, setData, setError, setLoading, setQuery, setMetricQuery, }: Params) => {
|
|
13
|
-
generateEmbeddedMetric: (data: FieldValues) => void;
|
|
14
|
-
};
|
|
15
|
-
export {};
|