@databrainhq/plugin 0.8.5 → 0.8.7
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/FloatingDropDown/index.d.ts +2 -1
- package/dist/components/MetricList/components/{DeleteMetricModal.d.ts → ArchiveMetricModal.d.ts} +2 -2
- package/dist/components/MetricList/components/MetricCard.d.ts +1 -1
- package/dist/components/MetricList/index.d.ts +1 -1
- package/dist/index.es.js +314 -315
- package/dist/index.umd.js +47 -53
- package/dist/style.css +1 -1
- package/dist/typings.d.ts +17 -17
- package/dist/utils/generated/graphql.d.ts +22 -25
- package/package.json +98 -98
package/dist/typings.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default CSS definition for typescript,
|
|
3
|
-
* will be overridden with file-specific definitions by rollup
|
|
4
|
-
*/
|
|
5
|
-
declare module '*.css' {
|
|
6
|
-
const content: Record<string, string>;
|
|
7
|
-
export default content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface SvgrComponent extends React.FC<React.SVGAttributes<SVGElement>> {}
|
|
11
|
-
|
|
12
|
-
declare module '*.svg' {
|
|
13
|
-
const svgUrl: string;
|
|
14
|
-
const svgComponent: SvgrComponent;
|
|
15
|
-
export default svgUrl;
|
|
16
|
-
export { svgComponent as ReactComponent };
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Default CSS definition for typescript,
|
|
3
|
+
* will be overridden with file-specific definitions by rollup
|
|
4
|
+
*/
|
|
5
|
+
declare module '*.css' {
|
|
6
|
+
const content: Record<string, string>;
|
|
7
|
+
export default content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface SvgrComponent extends React.FC<React.SVGAttributes<SVGElement>> {}
|
|
11
|
+
|
|
12
|
+
declare module '*.svg' {
|
|
13
|
+
const svgUrl: string;
|
|
14
|
+
const svgComponent: SvgrComponent;
|
|
15
|
+
export default svgUrl;
|
|
16
|
+
export { svgComponent as ReactComponent };
|
|
17
|
+
}
|
|
@@ -1994,6 +1994,7 @@ export declare type CompanySubsetTableDataMutation = {
|
|
|
1994
1994
|
};
|
|
1995
1995
|
export declare type EmbeddedDashboardMetricsQueryVariables = Exact<{
|
|
1996
1996
|
externalDashboardId?: Scalars['String'];
|
|
1997
|
+
clientId?: Scalars['String'];
|
|
1997
1998
|
}>;
|
|
1998
1999
|
export declare type EmbeddedDashboardMetricsQuery = {
|
|
1999
2000
|
__typename?: 'query_root';
|
|
@@ -2126,6 +2127,18 @@ export declare type UnderlyingDataMutation = {
|
|
|
2126
2127
|
timeTaken: number;
|
|
2127
2128
|
} | null;
|
|
2128
2129
|
};
|
|
2130
|
+
export declare type MarkArchiveMetricMutationVariables = Exact<{
|
|
2131
|
+
id?: Scalars['uuid'];
|
|
2132
|
+
clientId?: Scalars['String'];
|
|
2133
|
+
}>;
|
|
2134
|
+
export declare type MarkArchiveMetricMutation = {
|
|
2135
|
+
__typename?: 'mutation_root';
|
|
2136
|
+
insert_clientDeletedMetrics_one?: {
|
|
2137
|
+
__typename?: 'clientDeletedMetrics';
|
|
2138
|
+
clientId: string;
|
|
2139
|
+
externalMetricId: any;
|
|
2140
|
+
} | null;
|
|
2141
|
+
};
|
|
2129
2142
|
export declare type MarkClientDashboardLayoutChangeMutationVariables = Exact<{
|
|
2130
2143
|
clientId: Scalars['String'];
|
|
2131
2144
|
externalDashboardId: Scalars['uuid'];
|
|
@@ -2138,22 +2151,6 @@ export declare type MarkClientDashboardLayoutChangeMutation = {
|
|
|
2138
2151
|
externalDashboardId: any;
|
|
2139
2152
|
} | null;
|
|
2140
2153
|
};
|
|
2141
|
-
export declare type MarkDeleteMetricMutationVariables = Exact<{
|
|
2142
|
-
id?: Scalars['uuid'];
|
|
2143
|
-
clientId?: Scalars['String'];
|
|
2144
|
-
}>;
|
|
2145
|
-
export declare type MarkDeleteMetricMutation = {
|
|
2146
|
-
__typename?: 'mutation_root';
|
|
2147
|
-
update_externalMetrics_by_pk?: {
|
|
2148
|
-
__typename?: 'externalMetrics';
|
|
2149
|
-
id: any;
|
|
2150
|
-
} | null;
|
|
2151
|
-
insert_clientDeletedMetrics_one?: {
|
|
2152
|
-
__typename?: 'clientDeletedMetrics';
|
|
2153
|
-
clientId: string;
|
|
2154
|
-
externalMetricId: any;
|
|
2155
|
-
} | null;
|
|
2156
|
-
};
|
|
2157
2154
|
export declare type PreviewTableMutationVariables = Exact<{
|
|
2158
2155
|
companyId?: InputMaybe<Scalars['String']>;
|
|
2159
2156
|
tableName?: InputMaybe<Scalars['String']>;
|
|
@@ -2302,7 +2299,7 @@ export declare const useCompanySubsetTableDataMutation: <TError = unknown, TCont
|
|
|
2302
2299
|
clientId?: InputMaybe<string> | undefined;
|
|
2303
2300
|
companyId?: InputMaybe<string> | undefined;
|
|
2304
2301
|
}>, TContext>;
|
|
2305
|
-
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, externalMetric: {
|
|
2302
|
+
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\", $clientId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, _not: {externalMetric: {clientDeletedMetrics: {clientId: {_eq: $clientId}}}}}\n ) {\n externalMetricId\n externalDashboardId\n externalMetric {\n chartOptions\n clientId\n companyId\n companyIntegrationId\n createdAt\n createdBy\n description\n id\n inputFields\n integrationName\n isCreatedByClient\n isLive\n metricId\n metricQuery\n name\n outputColumns\n query\n resizeAttributes\n timeGrain\n updatedAt\n selectedGroupBy\n isEnableGroupBy\n groupBy\n rlsConditions\n companyIntegration {\n name\n }\n clickActions\n }\n }\n}\n ";
|
|
2306
2303
|
export declare const useEmbeddedDashboardMetricsQuery: <TData = EmbeddedDashboardMetricsQuery, TError = unknown>(variables?: EmbeddedDashboardMetricsQueryVariables, options?: UseQueryOptions<EmbeddedDashboardMetricsQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
2307
2304
|
export declare const GetExternalDashboardClientThemeDocument = "\n query GetExternalDashboardClientTheme($companyId: uuid!, $clientId: String!) {\n externalDashboardThemes(\n where: {companyId: {_eq: $companyId}, externalDashboardThemeClients: {clientId: {_eq: $clientId}}}\n limit: 1\n ) {\n colors\n createdAt\n id\n name\n }\n}\n ";
|
|
2308
2305
|
export declare const useGetExternalDashboardClientThemeQuery: <TData = GetExternalDashboardClientThemeQuery, TError = unknown>(variables: GetExternalDashboardClientThemeQueryVariables, options?: UseQueryOptions<GetExternalDashboardClientThemeQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
@@ -2328,6 +2325,14 @@ export declare const useUnderlyingDataMutation: <TError = unknown, TContext = un
|
|
|
2328
2325
|
query?: InputMaybe<string> | undefined;
|
|
2329
2326
|
value?: InputMaybe<Scalars['json']>;
|
|
2330
2327
|
}>, TContext>;
|
|
2328
|
+
export declare const MarkArchiveMetricDocument = "\n mutation MarkArchiveMetric($id: uuid! = \"\", $clientId: String! = \"\") {\n insert_clientDeletedMetrics_one(\n object: {externalMetricId: $id, clientId: $clientId}\n ) {\n clientId\n externalMetricId\n }\n}\n ";
|
|
2329
|
+
export declare const useMarkArchiveMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<MarkArchiveMetricMutation, TError, Exact<{
|
|
2330
|
+
id?: Scalars['uuid'];
|
|
2331
|
+
clientId?: string | undefined;
|
|
2332
|
+
}>, TContext> | undefined) => import("react-query").UseMutationResult<MarkArchiveMetricMutation, TError, Exact<{
|
|
2333
|
+
id?: Scalars['uuid'];
|
|
2334
|
+
clientId?: string | undefined;
|
|
2335
|
+
}>, TContext>;
|
|
2331
2336
|
export declare const MarkClientDashboardLayoutChangeDocument = "\n mutation MarkClientDashboardLayoutChange($clientId: String!, $externalDashboardId: uuid!) {\n insert_clientDashboardMetrics_one(\n object: {clientId: $clientId, externalDashboardId: $externalDashboardId}\n ) {\n clientId\n externalDashboardId\n }\n}\n ";
|
|
2332
2337
|
export declare const useMarkClientDashboardLayoutChangeMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<MarkClientDashboardLayoutChangeMutation, TError, Exact<{
|
|
2333
2338
|
clientId: Scalars['String'];
|
|
@@ -2336,14 +2341,6 @@ export declare const useMarkClientDashboardLayoutChangeMutation: <TError = unkno
|
|
|
2336
2341
|
clientId: Scalars['String'];
|
|
2337
2342
|
externalDashboardId: Scalars['uuid'];
|
|
2338
2343
|
}>, TContext>;
|
|
2339
|
-
export declare const MarkDeleteMetricDocument = "\n mutation MarkDeleteMetric($id: uuid! = \"\", $clientId: String! = \"\") {\n update_externalMetrics_by_pk(\n pk_columns: {id: $id}\n _set: {isMarkedDeleted: true}\n ) {\n id\n }\n insert_clientDeletedMetrics_one(\n object: {externalMetricId: $id, clientId: $clientId}\n ) {\n clientId\n externalMetricId\n }\n}\n ";
|
|
2340
|
-
export declare const useMarkDeleteMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<MarkDeleteMetricMutation, TError, Exact<{
|
|
2341
|
-
id?: Scalars['uuid'];
|
|
2342
|
-
clientId?: string | undefined;
|
|
2343
|
-
}>, TContext> | undefined) => import("react-query").UseMutationResult<MarkDeleteMetricMutation, TError, Exact<{
|
|
2344
|
-
id?: Scalars['uuid'];
|
|
2345
|
-
clientId?: string | undefined;
|
|
2346
|
-
}>, TContext>;
|
|
2347
2344
|
export declare const PreviewTableDocument = "\n mutation PreviewTable($companyId: String = \"\", $tableName: String = \"\", $limit: Int = 10) {\n previewTable(\n input: {companyId: $companyId, tableName: $tableName, limit: $limit}\n ) {\n data {\n data\n isError\n name\n }\n error {\n message\n }\n }\n}\n ";
|
|
2348
2345
|
export declare const usePreviewTableMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<PreviewTableMutation, TError, Exact<{
|
|
2349
2346
|
companyId?: InputMaybe<string> | undefined;
|
package/package.json
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@databrainhq/plugin",
|
|
3
|
-
"version": "0.8.
|
|
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/node": "^12.12.38",
|
|
45
|
-
"@types/react": "^18.0.26",
|
|
46
|
-
"@types/react-dom": "^18.0.10",
|
|
47
|
-
"@types/react-grid-layout": "^1.3.2",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
49
|
-
"@typescript-eslint/parser": "^4.31.1",
|
|
50
|
-
"@vitejs/plugin-react": "^1.3.0",
|
|
51
|
-
"autoprefixer": "^10.4.7",
|
|
52
|
-
"babel-eslint": "^10.0.3",
|
|
53
|
-
"cross-env": "^7.0.2",
|
|
54
|
-
"eslint": "^7.32.0",
|
|
55
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
56
|
-
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
57
|
-
"eslint-config-prettier": "^8.3.0",
|
|
58
|
-
"eslint-plugin-import": "^2.24.2",
|
|
59
|
-
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
60
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
61
|
-
"eslint-plugin-react": "^7.30.1",
|
|
62
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
63
|
-
"eslint-plugin-unicorn": "^36.0.0",
|
|
64
|
-
"graphql": "^16.6.0",
|
|
65
|
-
"husky": "^8.0.1",
|
|
66
|
-
"lint-staged": "^13.0.3",
|
|
67
|
-
"postcss": "^8.4.21",
|
|
68
|
-
"prettier": "^2.0.4",
|
|
69
|
-
"react": "^18.2.0",
|
|
70
|
-
"react-dom": "^18.2.0",
|
|
71
|
-
"tailwindcss": "^3.2.4",
|
|
72
|
-
"ts-node": "^10.9.1",
|
|
73
|
-
"typescript": "^4.6.3",
|
|
74
|
-
"unplugin-icons": "^0.14.7",
|
|
75
|
-
"vite": "^2.9.9",
|
|
76
|
-
"vite-plugin-dts": "^1.7.1",
|
|
77
|
-
"vite-tsconfig-paths": "^4.0.3"
|
|
78
|
-
},
|
|
79
|
-
"files": [
|
|
80
|
-
"dist"
|
|
81
|
-
],
|
|
82
|
-
"dependencies": {
|
|
83
|
-
"@headlessui/react": "^1.7.2",
|
|
84
|
-
"@tanstack/match-sorter-utils": "^8.8.4",
|
|
85
|
-
"@tanstack/react-table": "^8.7.9",
|
|
86
|
-
"classnames": "^2.3.2",
|
|
87
|
-
"echarts": "^5.4.1",
|
|
88
|
-
"echarts-for-react": "^3.0.2",
|
|
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
|
+
{
|
|
2
|
+
"name": "@databrainhq/plugin",
|
|
3
|
+
"version": "0.8.7",
|
|
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/node": "^12.12.38",
|
|
45
|
+
"@types/react": "^18.0.26",
|
|
46
|
+
"@types/react-dom": "^18.0.10",
|
|
47
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
49
|
+
"@typescript-eslint/parser": "^4.31.1",
|
|
50
|
+
"@vitejs/plugin-react": "^1.3.0",
|
|
51
|
+
"autoprefixer": "^10.4.7",
|
|
52
|
+
"babel-eslint": "^10.0.3",
|
|
53
|
+
"cross-env": "^7.0.2",
|
|
54
|
+
"eslint": "^7.32.0",
|
|
55
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
56
|
+
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
57
|
+
"eslint-config-prettier": "^8.3.0",
|
|
58
|
+
"eslint-plugin-import": "^2.24.2",
|
|
59
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
60
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
61
|
+
"eslint-plugin-react": "^7.30.1",
|
|
62
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
63
|
+
"eslint-plugin-unicorn": "^36.0.0",
|
|
64
|
+
"graphql": "^16.6.0",
|
|
65
|
+
"husky": "^8.0.1",
|
|
66
|
+
"lint-staged": "^13.0.3",
|
|
67
|
+
"postcss": "^8.4.21",
|
|
68
|
+
"prettier": "^2.0.4",
|
|
69
|
+
"react": "^18.2.0",
|
|
70
|
+
"react-dom": "^18.2.0",
|
|
71
|
+
"tailwindcss": "^3.2.4",
|
|
72
|
+
"ts-node": "^10.9.1",
|
|
73
|
+
"typescript": "^4.6.3",
|
|
74
|
+
"unplugin-icons": "^0.14.7",
|
|
75
|
+
"vite": "^2.9.9",
|
|
76
|
+
"vite-plugin-dts": "^1.7.1",
|
|
77
|
+
"vite-tsconfig-paths": "^4.0.3"
|
|
78
|
+
},
|
|
79
|
+
"files": [
|
|
80
|
+
"dist"
|
|
81
|
+
],
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@headlessui/react": "^1.7.2",
|
|
84
|
+
"@tanstack/match-sorter-utils": "^8.8.4",
|
|
85
|
+
"@tanstack/react-table": "^8.7.9",
|
|
86
|
+
"classnames": "^2.3.2",
|
|
87
|
+
"echarts": "^5.4.1",
|
|
88
|
+
"echarts-for-react": "^3.0.2",
|
|
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
|
+
}
|