@databrainhq/plugin 0.8.0 → 0.8.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/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +11 -0
- package/dist/components/ChartPopup/index.d.ts +14 -0
- package/dist/components/Charts/AreaChart.d.ts +1 -1
- package/dist/components/Charts/BarChart.d.ts +2 -1
- package/dist/components/Charts/BoxPlot.d.ts +1 -1
- package/dist/components/Charts/BubbleChart.d.ts +1 -1
- package/dist/components/Charts/ComboChart.d.ts +1 -1
- package/dist/components/Charts/DoughnutChart.d.ts +1 -1
- package/dist/components/Charts/FunnelChart.d.ts +1 -1
- package/dist/components/Charts/GaugeChart.d.ts +1 -1
- package/dist/components/Charts/Histogram.d.ts +1 -1
- package/dist/components/Charts/LineChart.d.ts +2 -1
- package/dist/components/Charts/PieChart.d.ts +1 -1
- package/dist/components/Charts/RowChart.d.ts +1 -1
- package/dist/components/Charts/SankeyChart.d.ts +1 -1
- package/dist/components/Charts/ScatterChart.d.ts +1 -1
- package/dist/components/Charts/StackedBarChart.d.ts +1 -1
- package/dist/components/Charts/SteppedAreaChart.d.ts +1 -1
- package/dist/components/Charts/WaterfallChart.d.ts +1 -1
- package/dist/components/MetricChart/MetricChart.d.ts +2 -1
- package/dist/components/MetricCreation/MetricCreation.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +2 -1
- package/dist/components/MetricList/MetricList.d.ts +1 -0
- package/dist/components/MetricList/components/DeleteMetricModal.d.ts +1 -0
- package/dist/consts/app.d.ts +3 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useApplyAdminTheme.d.ts +2 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +1 -0
- package/dist/hooks/useUnderlyingData.d.ts +15 -0
- package/dist/index.es.js +1323 -884
- package/dist/index.umd.js +102 -61
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +6 -0
- package/dist/types/metricCreate.d.ts +2 -0
- package/dist/utils/generated/graphql.d.ts +58 -2
- package/package.json +1 -1
- package/dist/contexts/globalTheme.d.ts +0 -9
package/dist/types/app.d.ts
CHANGED
|
@@ -150,3 +150,9 @@ export declare type MetricData = {
|
|
|
150
150
|
createdBy: string;
|
|
151
151
|
dateCreated: string;
|
|
152
152
|
};
|
|
153
|
+
export declare type GetUnderlyingData = ({ columnName, value, setData, setLoading, }: {
|
|
154
|
+
columnName: string;
|
|
155
|
+
value: any;
|
|
156
|
+
setData: React.Dispatch<React.SetStateAction<any[]>>;
|
|
157
|
+
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
158
|
+
}) => void;
|
|
@@ -11,6 +11,7 @@ export declare type EmbeddedMetricCreationProps = {
|
|
|
11
11
|
mode: boolean;
|
|
12
12
|
externalDashboardId: string;
|
|
13
13
|
variant?: 'static' | 'floating';
|
|
14
|
+
chartColors?: string[];
|
|
14
15
|
};
|
|
15
16
|
export declare type HeaderProps = {
|
|
16
17
|
Heading: string;
|
|
@@ -111,6 +112,7 @@ export declare type MetricOutputProps = {
|
|
|
111
112
|
tab: JSX.Element;
|
|
112
113
|
tabContent: JSX.Element;
|
|
113
114
|
}[];
|
|
115
|
+
chartColors?: string[];
|
|
114
116
|
};
|
|
115
117
|
export declare type CompanyIntegration = {
|
|
116
118
|
id: string;
|
|
@@ -121,6 +121,26 @@ export declare type GenerateExternalMetricQueryOutput = {
|
|
|
121
121
|
__typename?: 'GenerateExternalMetricQueryOutput';
|
|
122
122
|
query: Scalars['String'];
|
|
123
123
|
};
|
|
124
|
+
export declare type GetUnderlyingDataInput = {
|
|
125
|
+
columnName: Scalars['String'];
|
|
126
|
+
companyId: Scalars['String'];
|
|
127
|
+
query: Scalars['String'];
|
|
128
|
+
value: Scalars['json'];
|
|
129
|
+
};
|
|
130
|
+
export declare type GetUnderlyingDataOutput = {
|
|
131
|
+
__typename?: 'GetUnderlyingDataOutput';
|
|
132
|
+
data: Array<Maybe<Scalars['json']>>;
|
|
133
|
+
timeTaken: Scalars['Int'];
|
|
134
|
+
};
|
|
135
|
+
export declare type GetUnderlyingSqlQueryInput = {
|
|
136
|
+
columnName: Scalars['String'];
|
|
137
|
+
sqlQuery: Scalars['String'];
|
|
138
|
+
value: Scalars['json'];
|
|
139
|
+
};
|
|
140
|
+
export declare type GetUnderlyingSqlQueryOutput = {
|
|
141
|
+
__typename?: 'GetUnderlyingSqlQueryOutput';
|
|
142
|
+
query: Scalars['String'];
|
|
143
|
+
};
|
|
124
144
|
export declare type PreviewTableData = {
|
|
125
145
|
__typename?: 'PreviewTableData';
|
|
126
146
|
data?: Maybe<Scalars['json']>;
|
|
@@ -1037,6 +1057,8 @@ export declare type Mutation_Root = {
|
|
|
1037
1057
|
generateDatasetMetrics?: Maybe<GenerateDatasetMetricsOutput>;
|
|
1038
1058
|
generateEmbeddedMetic?: Maybe<GenerateEmbeddedMeticOutput>;
|
|
1039
1059
|
generateExternalMetricQuery?: Maybe<GenerateExternalMetricQueryOutput>;
|
|
1060
|
+
getUnderlyingData?: Maybe<GetUnderlyingDataOutput>;
|
|
1061
|
+
getUnderlyingSqlQuery?: Maybe<GetUnderlyingSqlQueryOutput>;
|
|
1040
1062
|
/** insert data into the table: "externalDashboardMetrics" */
|
|
1041
1063
|
insert_externalDashboardMetrics?: Maybe<ExternalDashboardMetrics_Mutation_Response>;
|
|
1042
1064
|
/** insert a single row into the table: "externalDashboardMetrics" */
|
|
@@ -1084,6 +1106,14 @@ export declare type Mutation_RootGenerateExternalMetricQueryArgs = {
|
|
|
1084
1106
|
input: GenerateExternalMetricQueryInput;
|
|
1085
1107
|
};
|
|
1086
1108
|
/** mutation root */
|
|
1109
|
+
export declare type Mutation_RootGetUnderlyingDataArgs = {
|
|
1110
|
+
input: GetUnderlyingDataInput;
|
|
1111
|
+
};
|
|
1112
|
+
/** mutation root */
|
|
1113
|
+
export declare type Mutation_RootGetUnderlyingSqlQueryArgs = {
|
|
1114
|
+
input: GetUnderlyingSqlQueryInput;
|
|
1115
|
+
};
|
|
1116
|
+
/** mutation root */
|
|
1087
1117
|
export declare type Mutation_RootInsert_ExternalDashboardMetricsArgs = {
|
|
1088
1118
|
objects: Array<ExternalDashboardMetrics_Insert_Input>;
|
|
1089
1119
|
on_conflict?: InputMaybe<ExternalDashboardMetrics_On_Conflict>;
|
|
@@ -1631,7 +1661,7 @@ export declare type CompanySubsetTableDataMutation = {
|
|
|
1631
1661
|
} | null;
|
|
1632
1662
|
};
|
|
1633
1663
|
export declare type EmbeddedDashboardMetricsQueryVariables = Exact<{
|
|
1634
|
-
|
|
1664
|
+
externalDashboardId?: Scalars['String'];
|
|
1635
1665
|
}>;
|
|
1636
1666
|
export declare type EmbeddedDashboardMetricsQuery = {
|
|
1637
1667
|
__typename?: 'query_root';
|
|
@@ -1750,6 +1780,20 @@ export declare type GetThemesQuery = {
|
|
|
1750
1780
|
chart: any;
|
|
1751
1781
|
}>;
|
|
1752
1782
|
};
|
|
1783
|
+
export declare type UnderlyingDataMutationVariables = Exact<{
|
|
1784
|
+
columnName?: InputMaybe<Scalars['String']>;
|
|
1785
|
+
companyId?: InputMaybe<Scalars['String']>;
|
|
1786
|
+
query?: InputMaybe<Scalars['String']>;
|
|
1787
|
+
value?: InputMaybe<Scalars['json']>;
|
|
1788
|
+
}>;
|
|
1789
|
+
export declare type UnderlyingDataMutation = {
|
|
1790
|
+
__typename?: 'mutation_root';
|
|
1791
|
+
getUnderlyingData?: {
|
|
1792
|
+
__typename?: 'GetUnderlyingDataOutput';
|
|
1793
|
+
data: Array<any | null>;
|
|
1794
|
+
timeTaken: number;
|
|
1795
|
+
} | null;
|
|
1796
|
+
};
|
|
1753
1797
|
export declare type MarkDeleteMetricMutationVariables = Exact<{
|
|
1754
1798
|
id?: Scalars['uuid'];
|
|
1755
1799
|
}>;
|
|
@@ -1879,7 +1923,7 @@ export declare const useCompanySubsetTableDataMutation: <TError = unknown, TCont
|
|
|
1879
1923
|
clientId?: InputMaybe<string> | undefined;
|
|
1880
1924
|
companyId?: InputMaybe<string> | undefined;
|
|
1881
1925
|
}>, TContext>;
|
|
1882
|
-
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($
|
|
1926
|
+
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, externalMetric: {isMarkedDeleted: {_eq: false}}}\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 ";
|
|
1883
1927
|
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>;
|
|
1884
1928
|
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 ";
|
|
1885
1929
|
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>;
|
|
@@ -1893,6 +1937,18 @@ export declare const MetricAccessDocument = "\n query MetricAccess($companyId
|
|
|
1893
1937
|
export declare const useMetricAccessQuery: <TData = MetricAccessQuery, TError = unknown>(variables?: MetricAccessQueryVariables, options?: UseQueryOptions<MetricAccessQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
1894
1938
|
export declare const GetThemesDocument = "\n query GetThemes($companyId: uuid! = \"\") {\n themes(where: {companyId: {_eq: $companyId}}) {\n id\n companyId\n general\n dashboard\n cardTitle\n cardDescription\n chart\n }\n}\n ";
|
|
1895
1939
|
export declare const useGetThemesQuery: <TData = GetThemesQuery, TError = unknown>(variables?: GetThemesQueryVariables, options?: UseQueryOptions<GetThemesQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
1940
|
+
export declare const UnderlyingDataDocument = "\n mutation UnderlyingData($columnName: String = \"\", $companyId: String = \"\", $query: String = \"\", $value: json = \"\") {\n getUnderlyingData(\n input: {columnName: $columnName, companyId: $companyId, query: $query, value: $value}\n ) {\n data\n timeTaken\n }\n}\n ";
|
|
1941
|
+
export declare const useUnderlyingDataMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<UnderlyingDataMutation, TError, Exact<{
|
|
1942
|
+
columnName?: InputMaybe<string> | undefined;
|
|
1943
|
+
companyId?: InputMaybe<string> | undefined;
|
|
1944
|
+
query?: InputMaybe<string> | undefined;
|
|
1945
|
+
value?: InputMaybe<Scalars['json']>;
|
|
1946
|
+
}>, TContext> | undefined) => import("react-query").UseMutationResult<UnderlyingDataMutation, TError, Exact<{
|
|
1947
|
+
columnName?: InputMaybe<string> | undefined;
|
|
1948
|
+
companyId?: InputMaybe<string> | undefined;
|
|
1949
|
+
query?: InputMaybe<string> | undefined;
|
|
1950
|
+
value?: InputMaybe<Scalars['json']>;
|
|
1951
|
+
}>, TContext>;
|
|
1896
1952
|
export declare const MarkDeleteMetricDocument = "\n mutation MarkDeleteMetric($id: uuid! = \"\") {\n update_externalMetrics_by_pk(\n pk_columns: {id: $id}\n _set: {isMarkedDeleted: true}\n ) {\n id\n }\n}\n ";
|
|
1897
1953
|
export declare const useMarkDeleteMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<MarkDeleteMetricMutation, TError, Exact<{
|
|
1898
1954
|
id?: Scalars['uuid'];
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { Themes } from '@/utils/generated/graphql';
|
|
3
|
-
interface ThemeContextType {
|
|
4
|
-
globalTheme?: Themes;
|
|
5
|
-
setGlobalTheme: React.Dispatch<React.SetStateAction<ThemeContextType['globalTheme']>>;
|
|
6
|
-
}
|
|
7
|
-
export declare const useGlobalTheme: () => ThemeContextType;
|
|
8
|
-
export declare const GlobalThemeProvider: React.FC<PropsWithChildren>;
|
|
9
|
-
export {};
|