@databrainhq/plugin 0.9.5 → 0.9.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/dist/components/FloatingDropDown/index.d.ts +3 -1
- package/dist/components/MetricList/MetricList.d.ts +2 -28
- package/dist/components/MetricList/components/DownloadRawCsvModal.d.ts +2 -1
- package/dist/components/MetricList/components/MetricCard.d.ts +1 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/consts/app.d.ts +3 -0
- package/dist/hooks/useDownloadRawCsv.d.ts +11 -3
- package/dist/index.es.js +826 -345
- package/dist/index.umd.js +149 -125
- package/dist/style.css +1 -1
- package/dist/utils/generated/graphql.d.ts +208 -2
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export declare type FloatingDropDownProps = {
|
|
|
5
5
|
selectedOption: FloatingDropDownOption;
|
|
6
6
|
options: FloatingDropDownOption[];
|
|
7
7
|
className?: string;
|
|
8
|
+
buttonClass?: string;
|
|
8
9
|
label?: string;
|
|
9
10
|
labelVariant?: 'floating' | 'static';
|
|
10
11
|
isDisabled?: boolean;
|
|
@@ -14,8 +15,9 @@ export declare type FloatingDropDownProps = {
|
|
|
14
15
|
closeControl?: {
|
|
15
16
|
close: boolean;
|
|
16
17
|
};
|
|
18
|
+
dropdownAbove?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, options, isDisabled, children, icon, isSearchEnabled, closeControl, }: FloatingDropDownProps) => JSX.Element;
|
|
20
|
+
export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, buttonClass, options, isDisabled, children, icon, isSearchEnabled, closeControl, dropdownAbove, }: FloatingDropDownProps) => JSX.Element;
|
|
19
21
|
export declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
|
|
20
22
|
selectedOptions: FloatingDropDownOption[];
|
|
21
23
|
onChange: (options: FloatingDropDownOption[]) => void;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { MetricCardProps } from './components/MetricCard';
|
|
3
3
|
import { ClientType } from '@/types/app';
|
|
4
4
|
import { ThemeType } from '@/utils/theme';
|
|
5
|
+
import { EmbeddedDashboardMetricsQuery } from '@/utils/generated/graphql';
|
|
5
6
|
export declare const GridLayout: React.ComponentClass<import("react-grid-layout").ResponsiveProps & import("react-grid-layout").WidthProviderProps, any>;
|
|
6
7
|
export declare type ExternalMetricListProps = {
|
|
7
8
|
chartColors?: string[];
|
|
@@ -15,34 +16,7 @@ export declare type ExternalMetricListProps = {
|
|
|
15
16
|
isMetricListLoading?: boolean;
|
|
16
17
|
breakpoint: ThemeType['breakpoint'];
|
|
17
18
|
layoutCols: ThemeType['metricLayoutCols'];
|
|
18
|
-
externalDashboardMetrics?:
|
|
19
|
-
__typename?: 'externalDashboardMetrics';
|
|
20
|
-
externalMetricId: any;
|
|
21
|
-
externalDashboardId: any;
|
|
22
|
-
externalMetric: {
|
|
23
|
-
__typename?: 'externalMetrics';
|
|
24
|
-
chartOptions: any;
|
|
25
|
-
clientId?: string | null;
|
|
26
|
-
companyId: any;
|
|
27
|
-
companyIntegrationId: any;
|
|
28
|
-
createdAt: any;
|
|
29
|
-
createdBy?: string | null;
|
|
30
|
-
description: string;
|
|
31
|
-
id: any;
|
|
32
|
-
inputFields?: any | null;
|
|
33
|
-
integrationName: string;
|
|
34
|
-
isCreatedByClient: boolean;
|
|
35
|
-
isLive: boolean;
|
|
36
|
-
metricId: string;
|
|
37
|
-
metricQuery?: string | null;
|
|
38
|
-
name: string;
|
|
39
|
-
outputColumns?: string | null;
|
|
40
|
-
query: string;
|
|
41
|
-
timeGrain?: string | null;
|
|
42
|
-
updatedAt: any;
|
|
43
|
-
resizeAttributes: any;
|
|
44
|
-
};
|
|
45
|
-
}[] | undefined;
|
|
19
|
+
externalDashboardMetrics?: EmbeddedDashboardMetricsQuery['externalDashboardMetrics'];
|
|
46
20
|
params?: any;
|
|
47
21
|
companyTenancyType: string;
|
|
48
22
|
externalDashboardId: string;
|
|
@@ -6,6 +6,7 @@ declare type Props = {
|
|
|
6
6
|
metricItem?: ExternalMetrics;
|
|
7
7
|
client: string;
|
|
8
8
|
companyTenancyType: string;
|
|
9
|
+
filterValues?: Record<string, string>;
|
|
9
10
|
};
|
|
10
|
-
export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, }: Props) => JSX.Element;
|
|
11
|
+
export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, }: Props) => JSX.Element;
|
|
11
12
|
export default DownloadRawCsvModal;
|
|
@@ -18,6 +18,6 @@ export declare type MetricCardProps = {
|
|
|
18
18
|
onArchive?: (metricId: string) => void;
|
|
19
19
|
onEdit?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
20
20
|
onTableView?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
21
|
-
onDownloadRawCsv?: (metric: ExternalMetrics) => void;
|
|
21
|
+
onDownloadRawCsv?: (metric: ExternalMetrics, filterValues: Record<string, any>) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare const MetricCard: React.FC<MetricCardProps>;
|
|
@@ -6,6 +6,7 @@ declare type Props = {
|
|
|
6
6
|
error: string;
|
|
7
7
|
tableSettings?: TableSettings;
|
|
8
8
|
tableName?: string;
|
|
9
|
+
className?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, }: Props) => JSX.Element;
|
|
11
|
+
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, }: Props) => JSX.Element;
|
|
11
12
|
export {};
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
2
|
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
3
|
-
declare const useDownloadRawCsv: (onCloseModal: (value: boolean) => void, metricItem?: ExternalMetrics) => {
|
|
3
|
+
declare const useDownloadRawCsv: (onCloseModal: (value: boolean) => void, metricItem?: ExternalMetrics, filterValues?: Record<string, string>) => {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
downloadCsvError: string;
|
|
6
6
|
onSubmitDownloadCsv: ({ companyId, sqlQuery, values, clientName, tenancyType, metricName, workspaceId, }: {
|
|
@@ -20,17 +20,25 @@ declare const useDownloadRawCsv: (onCloseModal: (value: boolean) => void, metric
|
|
|
20
20
|
isExpired: boolean;
|
|
21
21
|
error: string | null | undefined;
|
|
22
22
|
expireUrlIn: number;
|
|
23
|
+
status: string;
|
|
23
24
|
} | {
|
|
24
25
|
urls: never[];
|
|
25
26
|
lastUpdatedAt: number;
|
|
26
27
|
isExpired: boolean;
|
|
27
28
|
error: null;
|
|
28
29
|
expireUrlIn: number;
|
|
30
|
+
status: string;
|
|
29
31
|
};
|
|
30
32
|
handleDownload: (url: string) => void;
|
|
31
33
|
csvDownloadUrlError: string;
|
|
32
|
-
saveRawCsvDetails: ({
|
|
33
|
-
|
|
34
|
+
saveRawCsvDetails: ({ clientName, tenancyType, expirationMinutes, onSuccess, }: {
|
|
35
|
+
onSuccess: () => void;
|
|
36
|
+
expirationMinutes: number;
|
|
37
|
+
clientName?: string | undefined;
|
|
38
|
+
tenancyType?: string | undefined;
|
|
39
|
+
}) => void;
|
|
40
|
+
onRequestToDownload: ({ clientName, tenancyType, requestStatus, }: {
|
|
41
|
+
requestStatus: string;
|
|
34
42
|
clientName?: string | undefined;
|
|
35
43
|
tenancyType?: string | undefined;
|
|
36
44
|
}) => void;
|