@databrainhq/plugin 0.9.4 → 0.9.6
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 +11 -0
- package/dist/components/MetricList/components/MetricCard.d.ts +2 -0
- package/dist/components/MetricList/components/TableViewModal.d.ts +9 -0
- package/dist/components/MetricList/index.d.ts +2 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/consts/app.d.ts +1 -0
- package/dist/helpers/timesAgo.d.ts +2 -0
- package/dist/hooks/useDownloadRawCsv.d.ts +22 -4
- package/dist/index.es.js +896 -519
- package/dist/index.umd.js +145 -124
- package/dist/style.css +1 -1
- package/dist/utils/generated/graphql.d.ts +383 -1
- 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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
onCloseModal: (value: boolean) => void;
|
|
5
|
+
isShowRawCsvModal: boolean;
|
|
6
|
+
metricItem?: ExternalMetrics;
|
|
7
|
+
client: string;
|
|
8
|
+
companyTenancyType: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, }: Props) => JSX.Element;
|
|
11
|
+
export default DownloadRawCsvModal;
|
|
@@ -17,5 +17,7 @@ export declare type MetricCardProps = {
|
|
|
17
17
|
renderHeaderName?: (name: string) => JSX.Element;
|
|
18
18
|
onArchive?: (metricId: string) => void;
|
|
19
19
|
onEdit?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
20
|
+
onTableView?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
21
|
+
onDownloadRawCsv?: (metric: ExternalMetrics) => void;
|
|
20
22
|
};
|
|
21
23
|
export declare const MetricCard: React.FC<MetricCardProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
metricData?: Record<string, any>[];
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const TableViewModal: ({ metricData, isOpen, onClose, title, }: Props) => JSX.Element;
|
|
9
|
+
export default TableViewModal;
|
|
@@ -3,3 +3,5 @@ export * from './components/MetricCard';
|
|
|
3
3
|
export * from './components/SingleValueCard';
|
|
4
4
|
export * from './components/ArchiveMetricModal';
|
|
5
5
|
export * from './components/LayoutAlert';
|
|
6
|
+
export * from './components/TableViewModal';
|
|
7
|
+
export * from './components/DownloadRawCsvModal';
|
|
@@ -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,8 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
setRawCsvModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
2
|
+
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
3
|
+
declare const useDownloadRawCsv: (onCloseModal: (value: boolean) => void, metricItem?: ExternalMetrics) => {
|
|
6
4
|
isLoading: boolean;
|
|
7
5
|
downloadCsvError: string;
|
|
8
6
|
onSubmitDownloadCsv: ({ companyId, sqlQuery, values, clientName, tenancyType, metricName, workspaceId, }: {
|
|
@@ -16,5 +14,25 @@ declare const useDownloadRawCsv: () => {
|
|
|
16
14
|
}) => void;
|
|
17
15
|
handleSubmit: import("react-hook-form").UseFormHandleSubmit<FieldValues>;
|
|
18
16
|
register: import("react-hook-form").UseFormRegister<FieldValues>;
|
|
17
|
+
csvDownloadUrls: {
|
|
18
|
+
urls: string[];
|
|
19
|
+
lastUpdatedAt: string;
|
|
20
|
+
isExpired: boolean;
|
|
21
|
+
error: string | null | undefined;
|
|
22
|
+
expireUrlIn: number;
|
|
23
|
+
} | {
|
|
24
|
+
urls: never[];
|
|
25
|
+
lastUpdatedAt: number;
|
|
26
|
+
isExpired: boolean;
|
|
27
|
+
error: null;
|
|
28
|
+
expireUrlIn: number;
|
|
29
|
+
};
|
|
30
|
+
handleDownload: (url: string) => void;
|
|
31
|
+
csvDownloadUrlError: string;
|
|
32
|
+
saveRawCsvDetails: ({ values, clientName, tenancyType, }: {
|
|
33
|
+
values: FieldValues;
|
|
34
|
+
clientName?: string | undefined;
|
|
35
|
+
tenancyType?: string | undefined;
|
|
36
|
+
}) => void;
|
|
19
37
|
};
|
|
20
38
|
export default useDownloadRawCsv;
|