@databrainhq/plugin 0.10.12 → 0.10.13
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/Chart/PivotTable.d.ts +3 -0
- package/dist/components/ChartModal/ChartConfig.d.ts +3 -2
- package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +3 -2
- package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +3 -1
- package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +1 -1
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.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 +3 -2
- package/dist/consts/app.d.ts +1 -0
- package/dist/hooks/useExternalMetric.d.ts +3 -1
- package/dist/hooks/useMetricCard.d.ts +3 -1
- package/dist/index.es.js +19682 -19507
- package/dist/index.umd.js +160 -159
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +5 -0
- package/dist/types/metricCreate.d.ts +21 -4
- package/dist/utils/generated/graphql.d.ts +6 -2
- package/package.json +1 -1
package/dist/types/app.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ export type LabelSettings = {
|
|
|
105
105
|
export type AxisSettings = {
|
|
106
106
|
axis?: string;
|
|
107
107
|
};
|
|
108
|
+
export type PivotSettingsType = {
|
|
109
|
+
rows?: string[];
|
|
110
|
+
column?: string;
|
|
111
|
+
};
|
|
108
112
|
export type ChartSettingsType = {
|
|
109
113
|
chartType: keyof typeof CHART_TYPES;
|
|
110
114
|
margins?: MarginSettings;
|
|
@@ -118,6 +122,7 @@ export type ChartSettingsType = {
|
|
|
118
122
|
labelSettings?: LabelSettings;
|
|
119
123
|
customSettings?: CustomSettings;
|
|
120
124
|
tableSettings?: TableSettings;
|
|
125
|
+
pivotTableSettings?: PivotSettingsType;
|
|
121
126
|
axisSettings?: AxisSettings;
|
|
122
127
|
backGroundColor?: BackgroundSettings;
|
|
123
128
|
timeSeriesSettings?: TimeSeriesSettingsType;
|
|
@@ -34,6 +34,24 @@ export type DatasetProps = {
|
|
|
34
34
|
tableList: FloatingDropDownOption[];
|
|
35
35
|
columnList: ColumnData[];
|
|
36
36
|
};
|
|
37
|
+
export type MetricsValue = {
|
|
38
|
+
value: string;
|
|
39
|
+
as: string;
|
|
40
|
+
};
|
|
41
|
+
export type DatasetSettings = {
|
|
42
|
+
timeColumn: FloatingDropDownOption;
|
|
43
|
+
timeGrainValue: string;
|
|
44
|
+
columns: MetricsValue[];
|
|
45
|
+
metrics: MetricsValue[];
|
|
46
|
+
selectedDimensions: string[];
|
|
47
|
+
filters: string[];
|
|
48
|
+
sort: string;
|
|
49
|
+
isIncludeTime: boolean;
|
|
50
|
+
isSortDescending: boolean;
|
|
51
|
+
selectTable: FloatingDropDownOption;
|
|
52
|
+
clientColumn: FloatingDropDownOption;
|
|
53
|
+
customColumnList: MetricsValue[];
|
|
54
|
+
};
|
|
37
55
|
export type ConstructMetricProps = {
|
|
38
56
|
columnList: FloatingDropDownOption[];
|
|
39
57
|
dateTimeColumnList: ColumnData[];
|
|
@@ -47,10 +65,8 @@ export type ConstructMetricProps = {
|
|
|
47
65
|
clientId: string;
|
|
48
66
|
clientColumn?: string;
|
|
49
67
|
databaseId: string;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
value: string;
|
|
53
|
-
as: string;
|
|
68
|
+
datasetSettings?: DatasetSettings;
|
|
69
|
+
setDatasetSettings?: React.Dispatch<React.SetStateAction<DatasetSettings | undefined>>;
|
|
54
70
|
};
|
|
55
71
|
export type MetricOutputProps = {
|
|
56
72
|
data: any[] | undefined;
|
|
@@ -77,6 +93,7 @@ export type MetricOutputProps = {
|
|
|
77
93
|
chartColors?: string[];
|
|
78
94
|
chartSettings: ChartSettingsType;
|
|
79
95
|
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
96
|
+
datasetSettings: DatasetSettings | undefined;
|
|
80
97
|
};
|
|
81
98
|
export type CompanyIntegration = {
|
|
82
99
|
id: string;
|
|
@@ -3503,6 +3503,7 @@ export type CreateExternalMetricMutationVariables = Exact<{
|
|
|
3503
3503
|
externalDashboardIds?: InputMaybe<Array<ExternalDashboardMetrics_Insert_Input> | ExternalDashboardMetrics_Insert_Input>;
|
|
3504
3504
|
selectedGroupBy?: InputMaybe<Scalars['jsonb']>;
|
|
3505
3505
|
isEnableGroupBy?: InputMaybe<Scalars['Boolean']>;
|
|
3506
|
+
datasetMetricSettings?: InputMaybe<Scalars['jsonb']>;
|
|
3506
3507
|
groupBy?: InputMaybe<Scalars['jsonb']>;
|
|
3507
3508
|
}>;
|
|
3508
3509
|
export type CreateExternalMetricMutation = {
|
|
@@ -4041,6 +4042,7 @@ export type UpdateAdminMetricMutation = {
|
|
|
4041
4042
|
metricId: string;
|
|
4042
4043
|
metricQuery?: string | null;
|
|
4043
4044
|
name: string;
|
|
4045
|
+
datasetMetricSettings?: any | null;
|
|
4044
4046
|
outputColumns?: string | null;
|
|
4045
4047
|
query: string;
|
|
4046
4048
|
timeGrain?: string | null;
|
|
@@ -4090,7 +4092,7 @@ export type UpdateExternalMetricMutation = {
|
|
|
4090
4092
|
};
|
|
4091
4093
|
export declare const GetEmbeddedMetricDocument = "\n query GetEmbeddedMetric($guestToken: String!, $metricId: String!) {\n embeddedMetricData(input: {guestToken: $guestToken, metricId: $metricId}) {\n token\n params\n clientId\n companyId\n externalMetric\n adminTheme\n sharingSettingsId\n error {\n message\n }\n }\n}\n ";
|
|
4092
4094
|
export declare const useGetEmbeddedMetricQuery: <TData = GetEmbeddedMetricQuery, TError = unknown>(variables: GetEmbeddedMetricQueryVariables, options?: UseQueryOptions<GetEmbeddedMetricQuery, TError, TData, import("react-query").QueryKey> | undefined) => import("react-query").UseQueryResult<TData, TError>;
|
|
4093
|
-
export declare const CreateExternalMetricDocument = "\n mutation CreateExternalMetric($chartOptions: jsonb = \"\", $companyId: uuid = \"\", $companyIntegrationId: uuid = \"\", $description: String = \"\", $inputFields: jsonb = \"\", $integrationName: String = \"\", $metricId: String = \"\", $metricQuery: String = \"\", $name: String = \"\", $outputColumns: String = \"\", $query: String = \"\", $isLive: Boolean, $clientId: String = \"\", $isCreatedByClient: Boolean = false, $createdBy: String = \"\", $timeGrain: String = \"\", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {\n insert_externalMetrics_one(\n object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}\n ) {\n id\n externalDashboardMetrics {\n externalDashboardId\n }\n }\n}\n ";
|
|
4095
|
+
export declare const CreateExternalMetricDocument = "\n mutation CreateExternalMetric($chartOptions: jsonb = \"\", $companyId: uuid = \"\", $companyIntegrationId: uuid = \"\", $description: String = \"\", $inputFields: jsonb = \"\", $integrationName: String = \"\", $metricId: String = \"\", $metricQuery: String = \"\", $name: String = \"\", $outputColumns: String = \"\", $query: String = \"\", $isLive: Boolean, $clientId: String = \"\", $isCreatedByClient: Boolean = false, $createdBy: String = \"\", $timeGrain: String = \"\", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $datasetMetricSettings: jsonb = \"\", $groupBy: jsonb = {}) {\n insert_externalMetrics_one(\n object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy, datasetMetricSettings: $datasetMetricSettings}\n ) {\n id\n externalDashboardMetrics {\n externalDashboardId\n }\n }\n}\n ";
|
|
4094
4096
|
export declare const useCreateExternalMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<CreateExternalMetricMutation, TError, Exact<{
|
|
4095
4097
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|
|
4096
4098
|
companyId?: InputMaybe<Scalars['uuid']>;
|
|
@@ -4111,6 +4113,7 @@ export declare const useCreateExternalMetricMutation: <TError = unknown, TContex
|
|
|
4111
4113
|
externalDashboardIds?: InputMaybe<ExternalDashboardMetrics_Insert_Input | ExternalDashboardMetrics_Insert_Input[]> | undefined;
|
|
4112
4114
|
selectedGroupBy?: InputMaybe<Scalars['jsonb']>;
|
|
4113
4115
|
isEnableGroupBy?: InputMaybe<boolean> | undefined;
|
|
4116
|
+
datasetMetricSettings?: InputMaybe<Scalars['jsonb']>;
|
|
4114
4117
|
groupBy?: InputMaybe<Scalars['jsonb']>;
|
|
4115
4118
|
}>, TContext> | undefined) => import("react-query").UseMutationResult<CreateExternalMetricMutation, TError, Exact<{
|
|
4116
4119
|
chartOptions?: InputMaybe<Scalars['jsonb']>;
|
|
@@ -4132,6 +4135,7 @@ export declare const useCreateExternalMetricMutation: <TError = unknown, TContex
|
|
|
4132
4135
|
externalDashboardIds?: InputMaybe<ExternalDashboardMetrics_Insert_Input | ExternalDashboardMetrics_Insert_Input[]> | undefined;
|
|
4133
4136
|
selectedGroupBy?: InputMaybe<Scalars['jsonb']>;
|
|
4134
4137
|
isEnableGroupBy?: InputMaybe<boolean> | undefined;
|
|
4138
|
+
datasetMetricSettings?: InputMaybe<Scalars['jsonb']>;
|
|
4135
4139
|
groupBy?: InputMaybe<Scalars['jsonb']>;
|
|
4136
4140
|
}>, TContext>;
|
|
4137
4141
|
export declare const DeleteScheduleEmailReportChartsDocument = "\n mutation DeleteScheduleEmailReportCharts($scheduleEmailReportId: uuid = \"\") {\n delete_scheduleEmailReportCharts(\n where: {scheduleEmailReportId: {_eq: $scheduleEmailReportId}}\n ) {\n affected_rows\n }\n}\n ";
|
|
@@ -4364,7 +4368,7 @@ export declare const useSaveScheduleEmailMutation: <TError = unknown, TContext =
|
|
|
4364
4368
|
timeConfigurations?: InputMaybe<Scalars['json']>;
|
|
4365
4369
|
data?: InputMaybe<ScheduleEmailReportCharts_Insert_Input | ScheduleEmailReportCharts_Insert_Input[]> | undefined;
|
|
4366
4370
|
}>, TContext>;
|
|
4367
|
-
export declare const UpdateAdminMetricDocument = "\n mutation UpdateAdminMetric($externalMetricId: uuid!, $object: externalMetrics_insert_input!, $clientId: String!) {\n insert_clientDeletedMetrics_one(\n object: {externalMetricId: $externalMetricId, clientId: $clientId}\n ) {\n clientId\n externalMetricId\n }\n insert_externalMetrics_one(object: $object) {\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 rlsConditions\n companyIntegration {\n name\n }\n clickActions\n }\n}\n ";
|
|
4371
|
+
export declare const UpdateAdminMetricDocument = "\n mutation UpdateAdminMetric($externalMetricId: uuid!, $object: externalMetrics_insert_input!, $clientId: String!) {\n insert_clientDeletedMetrics_one(\n object: {externalMetricId: $externalMetricId, clientId: $clientId}\n ) {\n clientId\n externalMetricId\n }\n insert_externalMetrics_one(object: $object) {\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 datasetMetricSettings\n outputColumns\n query\n timeGrain\n updatedAt\n selectedGroupBy\n isEnableGroupBy\n groupBy\n rlsConditions\n companyIntegration {\n name\n }\n clickActions\n }\n}\n ";
|
|
4368
4372
|
export declare const useUpdateAdminMetricMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<UpdateAdminMetricMutation, TError, Exact<{
|
|
4369
4373
|
externalMetricId: Scalars['uuid'];
|
|
4370
4374
|
object: ExternalMetrics_Insert_Input;
|