@databrainhq/plugin 0.10.17 → 0.10.19
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 -1
- package/dist/components/ChartModal/ChartModalOptions.d.ts +2 -1
- package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +3 -1
- package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +3 -1
- package/dist/components/ColorField/Index.d.ts +12 -0
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +3 -1
- package/dist/components/PivotTable/index.d.ts +8 -0
- package/dist/components/PivotTable/transformData.d.ts +7 -0
- package/dist/consts/metricOptions.d.ts +4 -0
- package/dist/helpers/conditionalFormatting.d.ts +3 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useSqlMetadata.d.ts +10 -0
- package/dist/index.es.js +31868 -30828
- package/dist/index.umd.js +175 -169
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +20 -1
- package/dist/types/metricCreate.d.ts +2 -0
- package/dist/utils/generated/graphql.d.ts +32 -0
- package/dist/utils/getChartOptions.d.ts +1 -0
- package/package.json +3 -2
- package/dist/components/Chart/PivotTable.d.ts +0 -3
package/dist/types/app.d.ts
CHANGED
|
@@ -91,6 +91,17 @@ export type TableSettings = {
|
|
|
91
91
|
defaultRowSize?: string;
|
|
92
92
|
columnSizing?: ColumnSizingState;
|
|
93
93
|
isServerSidePagination?: boolean;
|
|
94
|
+
conditionalFormatting?: {
|
|
95
|
+
columnName: string;
|
|
96
|
+
rules: {
|
|
97
|
+
operator: string;
|
|
98
|
+
value: string;
|
|
99
|
+
styles: {
|
|
100
|
+
backgroundColor?: string;
|
|
101
|
+
color?: string;
|
|
102
|
+
};
|
|
103
|
+
}[];
|
|
104
|
+
}[];
|
|
94
105
|
};
|
|
95
106
|
export type BackgroundSettings = {
|
|
96
107
|
show?: boolean;
|
|
@@ -107,7 +118,7 @@ export type AxisSettings = {
|
|
|
107
118
|
};
|
|
108
119
|
export type PivotSettingsType = {
|
|
109
120
|
rows?: string[];
|
|
110
|
-
|
|
121
|
+
columns?: string[];
|
|
111
122
|
};
|
|
112
123
|
export type ChartSettingsType = {
|
|
113
124
|
chartType: keyof typeof CHART_TYPES;
|
|
@@ -245,3 +256,11 @@ export type GetUnderlyingData = ({ columnName, value, setData, setLoading, }: {
|
|
|
245
256
|
setData: React.Dispatch<React.SetStateAction<any[]>>;
|
|
246
257
|
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
247
258
|
}) => void;
|
|
259
|
+
export type ConditionalFormattingParam = {
|
|
260
|
+
value: any;
|
|
261
|
+
rules: {
|
|
262
|
+
operator: string;
|
|
263
|
+
value: string;
|
|
264
|
+
styles: any;
|
|
265
|
+
}[];
|
|
266
|
+
};
|
|
@@ -73,6 +73,8 @@ export type MetricOutputProps = {
|
|
|
73
73
|
error: string;
|
|
74
74
|
clientName?: string;
|
|
75
75
|
isLoading: boolean;
|
|
76
|
+
isEnablePivotTable: boolean;
|
|
77
|
+
groupbyList: any[];
|
|
76
78
|
setQuery?: React.Dispatch<React.SetStateAction<string>>;
|
|
77
79
|
setData?: React.Dispatch<React.SetStateAction<any[] | undefined>>;
|
|
78
80
|
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -168,6 +168,14 @@ export type GetUnderlyingSqlQueryOutput = {
|
|
|
168
168
|
__typename?: 'GetUnderlyingSqlQueryOutput';
|
|
169
169
|
query: Scalars['String'];
|
|
170
170
|
};
|
|
171
|
+
export type GroupbyColumnListInput = {
|
|
172
|
+
databaseName: Scalars['String'];
|
|
173
|
+
query: Scalars['String'];
|
|
174
|
+
};
|
|
175
|
+
export type GroupbyColumnListOutput = {
|
|
176
|
+
__typename?: 'GroupbyColumnListOutput';
|
|
177
|
+
groupbyColumnList?: Maybe<Array<Maybe<Scalars['String']>>>;
|
|
178
|
+
};
|
|
171
179
|
/** Boolean expression to compare columns of type "Int". All fields are combined with logical 'AND'. */
|
|
172
180
|
export type Int_Comparison_Exp = {
|
|
173
181
|
_eq?: InputMaybe<Scalars['Int']>;
|
|
@@ -2080,6 +2088,7 @@ export type Mutation_Root = {
|
|
|
2080
2088
|
generateExternalMetricQuery?: Maybe<GenerateExternalMetricQueryOutput>;
|
|
2081
2089
|
getUnderlyingData?: Maybe<GetUnderlyingDataOutput>;
|
|
2082
2090
|
getUnderlyingSqlQuery?: Maybe<GetUnderlyingSqlQueryOutput>;
|
|
2091
|
+
groupbyColumnList?: Maybe<GroupbyColumnListOutput>;
|
|
2083
2092
|
/** insert data into the table: "clientDashboardLayout" */
|
|
2084
2093
|
insert_clientDashboardLayout?: Maybe<ClientDashboardLayout_Mutation_Response>;
|
|
2085
2094
|
/** insert a single row into the table: "clientDashboardLayout" */
|
|
@@ -2207,6 +2216,10 @@ export type Mutation_RootGetUnderlyingSqlQueryArgs = {
|
|
|
2207
2216
|
input: GetUnderlyingSqlQueryInput;
|
|
2208
2217
|
};
|
|
2209
2218
|
/** mutation root */
|
|
2219
|
+
export type Mutation_RootGroupbyColumnListArgs = {
|
|
2220
|
+
input: GroupbyColumnListInput;
|
|
2221
|
+
};
|
|
2222
|
+
/** mutation root */
|
|
2210
2223
|
export type Mutation_RootInsert_ClientDashboardLayoutArgs = {
|
|
2211
2224
|
objects: Array<ClientDashboardLayout_Insert_Input>;
|
|
2212
2225
|
on_conflict?: InputMaybe<ClientDashboardLayout_On_Conflict>;
|
|
@@ -3750,6 +3763,17 @@ export type ExternalMetricRawCsvUrlsQuery = {
|
|
|
3750
3763
|
requestStatus: string;
|
|
3751
3764
|
}>;
|
|
3752
3765
|
};
|
|
3766
|
+
export type GroupByColumnListMutationVariables = Exact<{
|
|
3767
|
+
databaseName?: InputMaybe<Scalars['String']>;
|
|
3768
|
+
query?: InputMaybe<Scalars['String']>;
|
|
3769
|
+
}>;
|
|
3770
|
+
export type GroupByColumnListMutation = {
|
|
3771
|
+
__typename?: 'mutation_root';
|
|
3772
|
+
groupbyColumnList?: {
|
|
3773
|
+
__typename?: 'GroupbyColumnListOutput';
|
|
3774
|
+
groupbyColumnList?: Array<string | null> | null;
|
|
3775
|
+
} | null;
|
|
3776
|
+
};
|
|
3753
3777
|
export type GuestTokenParamsQueryVariables = Exact<{
|
|
3754
3778
|
id?: InputMaybe<Scalars['uuid']>;
|
|
3755
3779
|
}>;
|
|
@@ -4212,6 +4236,14 @@ export declare const ExternalDashboardListDocument = "\n query ExternalDashbo
|
|
|
4212
4236
|
export declare const useExternalDashboardListQuery: <TData = ExternalDashboardListQuery, TError = unknown>(variables?: ExternalDashboardListQueryVariables, options?: UseQueryOptions<ExternalDashboardListQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4213
4237
|
export declare const ExternalMetricRawCsvUrlsDocument = "\n query ExternalMetricRawCsvUrls($externalMetricId: uuid = \"\") {\n externalMetricRawCsvUrls(where: {externalMetricId: {_eq: $externalMetricId}}) {\n configurations\n error\n expireUrlIn\n externalMetricId\n id\n lastUpdatedAt\n urls\n requestStatus\n }\n}\n ";
|
|
4214
4238
|
export declare const useExternalMetricRawCsvUrlsQuery: <TData = ExternalMetricRawCsvUrlsQuery, TError = unknown>(variables?: ExternalMetricRawCsvUrlsQueryVariables, options?: UseQueryOptions<ExternalMetricRawCsvUrlsQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4239
|
+
export declare const GroupByColumnListDocument = "\n mutation GroupByColumnList($databaseName: String = \"\", $query: String = \"\") {\n groupbyColumnList(input: {databaseName: $databaseName, query: $query}) {\n groupbyColumnList\n }\n}\n ";
|
|
4240
|
+
export declare const useGroupByColumnListMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<GroupByColumnListMutation, TError, Exact<{
|
|
4241
|
+
databaseName?: InputMaybe<string> | undefined;
|
|
4242
|
+
query?: InputMaybe<string> | undefined;
|
|
4243
|
+
}>, TContext> | undefined) => import("react-query").UseMutationResult<GroupByColumnListMutation, TError, Exact<{
|
|
4244
|
+
databaseName?: InputMaybe<string> | undefined;
|
|
4245
|
+
query?: InputMaybe<string> | undefined;
|
|
4246
|
+
}>, TContext>;
|
|
4215
4247
|
export declare const GuestTokenParamsDocument = "\n query GuestTokenParams($id: uuid = \"\") {\n guestTokens_by_pk(id: $id) {\n clientId\n companyId\n id\n params\n }\n}\n ";
|
|
4216
4248
|
export declare const useGuestTokenParamsQuery: <TData = GuestTokenParamsQuery, TError = unknown>(variables?: GuestTokenParamsQueryVariables, options?: UseQueryOptions<GuestTokenParamsQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4217
4249
|
export declare const MetricAccessDocument = "\n query MetricAccess($workspaceId: uuid = \"\") {\n companySubsetTables(where: {workspaceId: {_eq: $workspaceId}}) {\n isAllowMetricCreation\n isAllowMetricDeletion\n isAllowMetricUpdation\n isAllowChangeLayout\n }\n}\n ";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databrainhq/plugin",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.19",
|
|
4
4
|
"description": "Databrain app dashboard ui plugin.",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
"react-error-boundary": "^3.1.4",
|
|
102
102
|
"react-grid-layout": "^1.3.4",
|
|
103
103
|
"react-hook-form": "^7.33.1",
|
|
104
|
-
"react-query": "^3.39.2"
|
|
104
|
+
"react-query": "^3.39.2",
|
|
105
|
+
"simplebar-react": "^3.2.4"
|
|
105
106
|
},
|
|
106
107
|
"peerDependencies": {
|
|
107
108
|
"react": "^18.2.0",
|