@databrainhq/plugin 0.11.21 → 0.11.23
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/hooks/useDashboardContext.d.ts +5 -12
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +24 -0
- package/dist/utils/generated/graphql.d.ts +96 -12
- package/dist/webcomponents.es.js +15156 -15275
- package/dist/webcomponents.umd.js +216 -282
- package/package.json +1 -1
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ExternalDashboardMetrics, ExternalDashboards, Themes } from '@/utils/generated/graphql';
|
|
3
3
|
interface DashboardContextType {
|
|
4
4
|
isLoading: boolean | undefined;
|
|
5
5
|
token: string | undefined;
|
|
6
|
-
|
|
6
|
+
error?: string;
|
|
7
7
|
data: {
|
|
8
|
-
externalDashboardId: string;
|
|
9
8
|
companyId: string;
|
|
10
9
|
sharingSettingsId: string | undefined;
|
|
11
10
|
clientId: string | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
externalDashboard: {
|
|
15
|
-
__typename?: 'externalDashboards' | undefined;
|
|
16
|
-
id: any;
|
|
17
|
-
name: string;
|
|
18
|
-
filters: any;
|
|
19
|
-
layout: any[];
|
|
20
|
-
} | undefined;
|
|
11
|
+
externalDashboardMetrics: ExternalDashboardMetrics[];
|
|
12
|
+
externalDashboard: ExternalDashboards;
|
|
21
13
|
rlsSettings: any | undefined;
|
|
22
14
|
companyTenancyType: any;
|
|
23
15
|
isAllowedToCreateMetrics: boolean | undefined;
|
|
@@ -25,6 +17,7 @@ interface DashboardContextType {
|
|
|
25
17
|
isAllowedToUpdateMetrics: boolean | undefined;
|
|
26
18
|
isAllowedToChangeLayout: boolean | undefined;
|
|
27
19
|
workspace: any;
|
|
20
|
+
adminTheme: Themes;
|
|
28
21
|
} | undefined;
|
|
29
22
|
}
|
|
30
23
|
export declare const DashboardContext: import("react").Context<DashboardContextType>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ExternalDashboardMetrics, ExternalDashboards, Themes } from '@/utils/generated/graphql';
|
|
2
|
+
declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
|
|
3
|
+
token: string;
|
|
4
|
+
dashboardId?: string | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
error: string | undefined;
|
|
8
|
+
data: {
|
|
9
|
+
externalDashboard: ExternalDashboards;
|
|
10
|
+
externalDashboardMetrics: ExternalDashboardMetrics[];
|
|
11
|
+
isAllowedToChangeLayout: boolean;
|
|
12
|
+
isAllowedToCreateMetrics: boolean;
|
|
13
|
+
isAllowedToDeleteMetrics: boolean;
|
|
14
|
+
isAllowedToUpdateMetrics: boolean;
|
|
15
|
+
companyId: string;
|
|
16
|
+
clientId: string;
|
|
17
|
+
workspace: any;
|
|
18
|
+
rlsSettings: any;
|
|
19
|
+
sharingSettingsId: string;
|
|
20
|
+
adminTheme: Themes;
|
|
21
|
+
companyTenancyType: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default useNewEmbeddedDashboard;
|
|
@@ -46,25 +46,25 @@ export type ColumnDataError = {
|
|
|
46
46
|
message: Scalars['String'];
|
|
47
47
|
};
|
|
48
48
|
export type EmbeddedDashboardDataInput = {
|
|
49
|
+
dashboardId?: InputMaybe<Scalars['String']>;
|
|
49
50
|
token: Scalars['String'];
|
|
50
51
|
};
|
|
51
52
|
export type EmbeddedDashboardDataOutput = {
|
|
52
53
|
__typename?: 'EmbeddedDashboardDataOutput';
|
|
54
|
+
adminTheme?: Maybe<Scalars['json']>;
|
|
53
55
|
clientId?: Maybe<Scalars['String']>;
|
|
54
56
|
companyId?: Maybe<Scalars['String']>;
|
|
55
57
|
companyTenancyType?: Maybe<Scalars['String']>;
|
|
56
|
-
dashboardFilters?: Maybe<Scalars['json']>;
|
|
57
58
|
error?: Maybe<Error>;
|
|
58
|
-
|
|
59
|
+
externalDashboard?: Maybe<Scalars['json']>;
|
|
59
60
|
externalMetrics?: Maybe<Array<Maybe<Scalars['json']>>>;
|
|
60
61
|
guestToken?: Maybe<Scalars['String']>;
|
|
61
62
|
isAllowedToChangeLayout?: Maybe<Scalars['Boolean']>;
|
|
62
63
|
isAllowedToCreateMetrics?: Maybe<Scalars['Boolean']>;
|
|
63
64
|
isAllowedToDeleteMetrics?: Maybe<Scalars['Boolean']>;
|
|
64
65
|
isAllowedToUpdateMetrics?: Maybe<Scalars['Boolean']>;
|
|
65
|
-
isLive?: Maybe<Scalars['Boolean']>;
|
|
66
|
-
isTestKey?: Maybe<Scalars['Boolean']>;
|
|
67
66
|
rlsSettings?: Maybe<Scalars['json']>;
|
|
67
|
+
sharingSettingsId?: Maybe<Scalars['String']>;
|
|
68
68
|
workspace?: Maybe<Scalars['json']>;
|
|
69
69
|
};
|
|
70
70
|
export type EmbeddedMetricDataInput = {
|
|
@@ -2079,7 +2079,6 @@ export type Mutation_Root = {
|
|
|
2079
2079
|
delete_scheduleEmailReports?: Maybe<ScheduleEmailReports_Mutation_Response>;
|
|
2080
2080
|
/** delete single row from the table: "scheduleEmailReports" */
|
|
2081
2081
|
delete_scheduleEmailReports_by_pk?: Maybe<ScheduleEmailReports>;
|
|
2082
|
-
embeddedDashboardData?: Maybe<EmbeddedDashboardDataOutput>;
|
|
2083
2082
|
embeddedMetricQuery?: Maybe<ExternalMetricQueryOutput>;
|
|
2084
2083
|
fetchColumnData?: Maybe<FetchColumnDataOutput>;
|
|
2085
2084
|
generateDatasetMetrics?: Maybe<GenerateDatasetMetricsOutput>;
|
|
@@ -2180,10 +2179,6 @@ export type Mutation_RootDelete_ScheduleEmailReports_By_PkArgs = {
|
|
|
2180
2179
|
id: Scalars['uuid'];
|
|
2181
2180
|
};
|
|
2182
2181
|
/** mutation root */
|
|
2183
|
-
export type Mutation_RootEmbeddedDashboardDataArgs = {
|
|
2184
|
-
input: EmbeddedDashboardDataInput;
|
|
2185
|
-
};
|
|
2186
|
-
/** mutation root */
|
|
2187
2182
|
export type Mutation_RootEmbeddedMetricQueryArgs = {
|
|
2188
2183
|
input: ExternalMetricQueryInput;
|
|
2189
2184
|
};
|
|
@@ -2488,6 +2483,7 @@ export type Query_Root = {
|
|
|
2488
2483
|
demoTheme: Array<DemoTheme>;
|
|
2489
2484
|
/** fetch data from the table: "demoTheme" using primary key columns */
|
|
2490
2485
|
demoTheme_by_pk?: Maybe<DemoTheme>;
|
|
2486
|
+
embeddedDashboardData?: Maybe<EmbeddedDashboardDataOutput>;
|
|
2491
2487
|
/** Gets the required data to embed individual metrics. */
|
|
2492
2488
|
embeddedMetricData?: Maybe<EmbeddedMetricDataOutput>;
|
|
2493
2489
|
/** An array relationship */
|
|
@@ -2540,6 +2536,10 @@ export type Query_Root = {
|
|
|
2540
2536
|
themes: Array<Themes>;
|
|
2541
2537
|
/** fetch data from the table: "themes" using primary key columns */
|
|
2542
2538
|
themes_by_pk?: Maybe<Themes>;
|
|
2539
|
+
/** fetch data from the table: "whitelistedDomains" */
|
|
2540
|
+
whitelistedDomains: Array<WhitelistedDomains>;
|
|
2541
|
+
/** fetch data from the table: "whitelistedDomains" using primary key columns */
|
|
2542
|
+
whitelistedDomains_by_pk?: Maybe<WhitelistedDomains>;
|
|
2543
2543
|
};
|
|
2544
2544
|
export type Query_RootClientDashboardLayoutArgs = {
|
|
2545
2545
|
distinct_on?: InputMaybe<Array<ClientDashboardLayout_Select_Column>>;
|
|
@@ -2621,6 +2621,9 @@ export type Query_RootDemoThemeArgs = {
|
|
|
2621
2621
|
export type Query_RootDemoTheme_By_PkArgs = {
|
|
2622
2622
|
id: Scalars['uuid'];
|
|
2623
2623
|
};
|
|
2624
|
+
export type Query_RootEmbeddedDashboardDataArgs = {
|
|
2625
|
+
input: EmbeddedDashboardDataInput;
|
|
2626
|
+
};
|
|
2624
2627
|
export type Query_RootEmbeddedMetricDataArgs = {
|
|
2625
2628
|
input: EmbeddedMetricDataInput;
|
|
2626
2629
|
};
|
|
@@ -2751,6 +2754,16 @@ export type Query_RootThemesArgs = {
|
|
|
2751
2754
|
export type Query_RootThemes_By_PkArgs = {
|
|
2752
2755
|
id: Scalars['uuid'];
|
|
2753
2756
|
};
|
|
2757
|
+
export type Query_RootWhitelistedDomainsArgs = {
|
|
2758
|
+
distinct_on?: InputMaybe<Array<WhitelistedDomains_Select_Column>>;
|
|
2759
|
+
limit?: InputMaybe<Scalars['Int']>;
|
|
2760
|
+
offset?: InputMaybe<Scalars['Int']>;
|
|
2761
|
+
order_by?: InputMaybe<Array<WhitelistedDomains_Order_By>>;
|
|
2762
|
+
where?: InputMaybe<WhitelistedDomains_Bool_Exp>;
|
|
2763
|
+
};
|
|
2764
|
+
export type Query_RootWhitelistedDomains_By_PkArgs = {
|
|
2765
|
+
companyId: Scalars['uuid'];
|
|
2766
|
+
};
|
|
2754
2767
|
/** columns and relationships of "scheduleEmailReportCharts" */
|
|
2755
2768
|
export type ScheduleEmailReportCharts = {
|
|
2756
2769
|
__typename?: 'scheduleEmailReportCharts';
|
|
@@ -2788,9 +2801,7 @@ export type ScheduleEmailReportCharts_Bool_Exp = {
|
|
|
2788
2801
|
/** unique or primary key constraints on table "scheduleEmailReportCharts" */
|
|
2789
2802
|
export declare enum ScheduleEmailReportCharts_Constraint {
|
|
2790
2803
|
/** unique or primary key constraint on columns "id" */
|
|
2791
|
-
ScheduleEmailReportChartsPkey = "scheduleEmailReportCharts_pkey"
|
|
2792
|
-
/** unique or primary key constraint on columns "externalMetricId", "scheduleEmailReportId" */
|
|
2793
|
-
ScheduleEmailReportChartsUniqueKey = "scheduleEmailReportCharts_unique_key"
|
|
2804
|
+
ScheduleEmailReportChartsPkey = "scheduleEmailReportCharts_pkey"
|
|
2794
2805
|
}
|
|
2795
2806
|
/** input type for inserting data into table "scheduleEmailReportCharts" */
|
|
2796
2807
|
export type ScheduleEmailReportCharts_Insert_Input = {
|
|
@@ -3178,6 +3189,10 @@ export type Subscription_Root = {
|
|
|
3178
3189
|
themes: Array<Themes>;
|
|
3179
3190
|
/** fetch data from the table: "themes" using primary key columns */
|
|
3180
3191
|
themes_by_pk?: Maybe<Themes>;
|
|
3192
|
+
/** fetch data from the table: "whitelistedDomains" */
|
|
3193
|
+
whitelistedDomains: Array<WhitelistedDomains>;
|
|
3194
|
+
/** fetch data from the table: "whitelistedDomains" using primary key columns */
|
|
3195
|
+
whitelistedDomains_by_pk?: Maybe<WhitelistedDomains>;
|
|
3181
3196
|
};
|
|
3182
3197
|
export type Subscription_RootClientDashboardLayoutArgs = {
|
|
3183
3198
|
distinct_on?: InputMaybe<Array<ClientDashboardLayout_Select_Column>>;
|
|
@@ -3383,6 +3398,16 @@ export type Subscription_RootThemesArgs = {
|
|
|
3383
3398
|
export type Subscription_RootThemes_By_PkArgs = {
|
|
3384
3399
|
id: Scalars['uuid'];
|
|
3385
3400
|
};
|
|
3401
|
+
export type Subscription_RootWhitelistedDomainsArgs = {
|
|
3402
|
+
distinct_on?: InputMaybe<Array<WhitelistedDomains_Select_Column>>;
|
|
3403
|
+
limit?: InputMaybe<Scalars['Int']>;
|
|
3404
|
+
offset?: InputMaybe<Scalars['Int']>;
|
|
3405
|
+
order_by?: InputMaybe<Array<WhitelistedDomains_Order_By>>;
|
|
3406
|
+
where?: InputMaybe<WhitelistedDomains_Bool_Exp>;
|
|
3407
|
+
};
|
|
3408
|
+
export type Subscription_RootWhitelistedDomains_By_PkArgs = {
|
|
3409
|
+
companyId: Scalars['uuid'];
|
|
3410
|
+
};
|
|
3386
3411
|
/** The global theme per company. */
|
|
3387
3412
|
export type Themes = {
|
|
3388
3413
|
__typename?: 'themes';
|
|
@@ -3478,6 +3503,36 @@ export type Uuid_Comparison_Exp = {
|
|
|
3478
3503
|
_neq?: InputMaybe<Scalars['uuid']>;
|
|
3479
3504
|
_nin?: InputMaybe<Array<Scalars['uuid']>>;
|
|
3480
3505
|
};
|
|
3506
|
+
/** Company whitelisted domains. */
|
|
3507
|
+
export type WhitelistedDomains = {
|
|
3508
|
+
__typename?: 'whitelistedDomains';
|
|
3509
|
+
companyId: Scalars['uuid'];
|
|
3510
|
+
domains: Scalars['jsonb'];
|
|
3511
|
+
};
|
|
3512
|
+
/** Company whitelisted domains. */
|
|
3513
|
+
export type WhitelistedDomainsDomainsArgs = {
|
|
3514
|
+
path?: InputMaybe<Scalars['String']>;
|
|
3515
|
+
};
|
|
3516
|
+
/** Boolean expression to filter rows from the table "whitelistedDomains". All fields are combined with a logical 'AND'. */
|
|
3517
|
+
export type WhitelistedDomains_Bool_Exp = {
|
|
3518
|
+
_and?: InputMaybe<Array<WhitelistedDomains_Bool_Exp>>;
|
|
3519
|
+
_not?: InputMaybe<WhitelistedDomains_Bool_Exp>;
|
|
3520
|
+
_or?: InputMaybe<Array<WhitelistedDomains_Bool_Exp>>;
|
|
3521
|
+
companyId?: InputMaybe<Uuid_Comparison_Exp>;
|
|
3522
|
+
domains?: InputMaybe<Jsonb_Comparison_Exp>;
|
|
3523
|
+
};
|
|
3524
|
+
/** Ordering options when selecting data from "whitelistedDomains". */
|
|
3525
|
+
export type WhitelistedDomains_Order_By = {
|
|
3526
|
+
companyId?: InputMaybe<Order_By>;
|
|
3527
|
+
domains?: InputMaybe<Order_By>;
|
|
3528
|
+
};
|
|
3529
|
+
/** select columns of table "whitelistedDomains" */
|
|
3530
|
+
export declare enum WhitelistedDomains_Select_Column {
|
|
3531
|
+
/** column name */
|
|
3532
|
+
CompanyId = "companyId",
|
|
3533
|
+
/** column name */
|
|
3534
|
+
Domains = "domains"
|
|
3535
|
+
}
|
|
3481
3536
|
export type GetEmbeddedMetricQueryVariables = Exact<{
|
|
3482
3537
|
guestToken: Scalars['String'];
|
|
3483
3538
|
metricId: Scalars['String'];
|
|
@@ -3648,6 +3703,33 @@ export type CompanySubsetTableDataMutation = {
|
|
|
3648
3703
|
} | null> | null;
|
|
3649
3704
|
} | null;
|
|
3650
3705
|
};
|
|
3706
|
+
export type GetEmbeddedDashboardQueryVariables = Exact<{
|
|
3707
|
+
token: Scalars['String'];
|
|
3708
|
+
dashboardId?: InputMaybe<Scalars['String']>;
|
|
3709
|
+
}>;
|
|
3710
|
+
export type GetEmbeddedDashboardQuery = {
|
|
3711
|
+
__typename?: 'query_root';
|
|
3712
|
+
embeddedDashboardData?: {
|
|
3713
|
+
__typename?: 'EmbeddedDashboardDataOutput';
|
|
3714
|
+
externalDashboard?: any | null;
|
|
3715
|
+
isAllowedToChangeLayout?: boolean | null;
|
|
3716
|
+
isAllowedToCreateMetrics?: boolean | null;
|
|
3717
|
+
isAllowedToDeleteMetrics?: boolean | null;
|
|
3718
|
+
isAllowedToUpdateMetrics?: boolean | null;
|
|
3719
|
+
adminTheme?: any | null;
|
|
3720
|
+
clientId?: string | null;
|
|
3721
|
+
companyId?: string | null;
|
|
3722
|
+
companyTenancyType?: string | null;
|
|
3723
|
+
externalMetrics?: Array<any | null> | null;
|
|
3724
|
+
rlsSettings?: any | null;
|
|
3725
|
+
workspace?: any | null;
|
|
3726
|
+
sharingSettingsId?: string | null;
|
|
3727
|
+
error?: {
|
|
3728
|
+
__typename?: 'Error';
|
|
3729
|
+
message: string;
|
|
3730
|
+
} | null;
|
|
3731
|
+
} | null;
|
|
3732
|
+
};
|
|
3651
3733
|
export type EmbeddedDashboardMetricsQueryVariables = Exact<{
|
|
3652
3734
|
externalDashboardId?: Scalars['String'];
|
|
3653
3735
|
clientId?: Scalars['String'];
|
|
@@ -4225,6 +4307,8 @@ export declare const useCompanySubsetTableDataMutation: <TError = unknown, TCont
|
|
|
4225
4307
|
companyId?: InputMaybe<string> | undefined;
|
|
4226
4308
|
workspaceId?: InputMaybe<string> | undefined;
|
|
4227
4309
|
}>, TContext>;
|
|
4310
|
+
export declare const GetEmbeddedDashboardDocument = "\n query GetEmbeddedDashboard($token: String!, $dashboardId: String) {\n embeddedDashboardData(input: {token: $token, dashboardId: $dashboardId}) {\n externalDashboard\n isAllowedToChangeLayout\n isAllowedToCreateMetrics\n isAllowedToDeleteMetrics\n isAllowedToUpdateMetrics\n adminTheme\n clientId\n companyId\n companyTenancyType\n externalMetrics\n rlsSettings\n workspace\n error {\n message\n }\n sharingSettingsId\n }\n}\n ";
|
|
4311
|
+
export declare const useGetEmbeddedDashboardQuery: <TData = GetEmbeddedDashboardQuery, TError = unknown>(variables: GetEmbeddedDashboardQueryVariables, options?: UseQueryOptions<GetEmbeddedDashboardQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4228
4312
|
export declare const EmbeddedDashboardMetricsDocument = "\n query EmbeddedDashboardMetrics($externalDashboardId: String! = \"\", $clientId: String! = \"\") {\n externalDashboardMetrics(\n where: {externalDashboard: {externalDashboardId: {_eq: $externalDashboardId}}, externalMetric: {isArchived: {_eq: false}, isMarkedDeleted: {_eq: false}}, _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 timeGrain\n updatedAt\n selectedGroupBy\n isEnableGroupBy\n groupBy\n resizeAttributes\n rlsConditions\n clickActions\n drillDownSettings\n companyIntegration {\n name\n workspaceId\n }\n datasetMetricSettings\n }\n }\n}\n ";
|
|
4229
4313
|
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>;
|
|
4230
4314
|
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 ";
|