@databrainhq/plugin 0.14.28 → 0.14.30
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/AutoCompleteDropdown/index.d.ts +3 -1
- package/dist/components/MetricList/MetricList.d.ts +0 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/containers/Dashboard/Dashboard.d.ts +2 -1
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +3 -1
- package/dist/containers/Metric/EmbeddedMetric.d.ts +4 -2
- package/dist/containers/Metric/index.d.ts +1 -0
- package/dist/hooks/useDashboardContext.d.ts +1 -0
- package/dist/hooks/useEmbeddedMetric.d.ts +1 -6
- package/dist/hooks/useGenerateMetric.d.ts +6 -0
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +1 -0
- package/dist/queries/externalDashboard.query.d.ts +7 -0
- package/dist/types/app.d.ts +9 -0
- package/dist/webcomponents.es.js +26533 -26328
- package/dist/webcomponents.umd.js +177 -164
- package/package.json +1 -1
|
@@ -10,5 +10,7 @@ export type AutoCompleteDropdownProps = {
|
|
|
10
10
|
functionOptions?: (col?: SelectedColumn | undefined, colDatatype?: string | undefined) => FloatingDropDownOption[];
|
|
11
11
|
onChangeHelperFunction?: ({ column, helperFunction, functionConfiguration, }: OnChangeHelperFunctionParams) => void;
|
|
12
12
|
onChangeAlias: ({ alias, column }: OnChangeAliasParams) => void;
|
|
13
|
+
isRef: boolean;
|
|
14
|
+
setRef: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
15
|
};
|
|
14
|
-
export declare const AutoCompleteDropdown: ({ label, selectedOption, setSelectedOptions, options, isDisabled, placeholder, functionOptions, onChangeHelperFunction, onChangeAlias, }: AutoCompleteDropdownProps) => React.JSX.Element;
|
|
16
|
+
export declare const AutoCompleteDropdown: ({ label, selectedOption, setSelectedOptions, options, isDisabled, placeholder, functionOptions, onChangeHelperFunction, onChangeAlias, isRef, setRef, }: AutoCompleteDropdownProps) => React.JSX.Element;
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare const DASHBOARD_GEN_METRIC_DATA_PATH: string;
|
|
|
30
30
|
export declare const DASHBOARD_GEN_METRIC_DATA_MUTATION = "/generatetMetricData";
|
|
31
31
|
export declare const DASHBOARD_CHAT_RESPONSE_PATH: string;
|
|
32
32
|
export declare const DASHBOARD_CHAT_RESPONSE_MUTATION = "getOpenaiChatResponse";
|
|
33
|
+
export declare const DASHBOARD_THEME_PATH: string;
|
|
34
|
+
export declare const DASHBOARD_THEME_QUERY = "getTheme";
|
|
33
35
|
export declare const METRIC_QUERY_PATH: string;
|
|
34
36
|
export declare const METRIC_QUERY_QUERY = "query";
|
|
35
37
|
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_PATH: string;
|
|
@@ -40,6 +40,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
|
|
|
40
40
|
customMessages?: {
|
|
41
41
|
tokenExpiry?: string;
|
|
42
42
|
};
|
|
43
|
+
themeName?: string;
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* @name Dashboard - A react component to display the dashboard.
|
|
@@ -53,4 +54,4 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
|
|
|
53
54
|
* @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
|
|
54
55
|
* @prop {object} theme (optional) - A theme object to customize the theme.
|
|
55
56
|
*/
|
|
56
|
-
export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, adminThemeOptions, customMessages, }: DashboardProps) => React.JSX.Element;
|
|
57
|
+
export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, adminThemeOptions, customMessages, themeName, }: DashboardProps) => React.JSX.Element;
|
|
@@ -23,5 +23,7 @@ export interface EmbeddedDashboardProps {
|
|
|
23
23
|
customMessages?: {
|
|
24
24
|
tokenExpiry?: string;
|
|
25
25
|
};
|
|
26
|
+
themeName?: string;
|
|
27
|
+
setAdminTheme: (theme?: AdminThemeOptionsType) => void;
|
|
26
28
|
}
|
|
27
|
-
export declare const EmbeddedDashboard: React.MemoExoticComponent<({ options, theme, adminThemeOption, customMessages, }: EmbeddedDashboardProps) => React.JSX.Element>;
|
|
29
|
+
export declare const EmbeddedDashboard: React.MemoExoticComponent<({ options, theme, adminThemeOption, customMessages, themeName, setAdminTheme, }: EmbeddedDashboardProps) => React.JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricFilterOptionsType } from '@/types';
|
|
2
|
+
import { AdminThemeOptionsType, MetricFilterOptionsType } from '@/types';
|
|
3
3
|
export interface EmbeddedMetricProps {
|
|
4
4
|
token: string;
|
|
5
5
|
chartColors?: string[];
|
|
@@ -19,5 +19,7 @@ export interface EmbeddedMetricProps {
|
|
|
19
19
|
customMessages?: {
|
|
20
20
|
tokenExpiry?: string;
|
|
21
21
|
};
|
|
22
|
+
themeName?: string;
|
|
23
|
+
setAdminTheme: (theme?: AdminThemeOptionsType) => void;
|
|
22
24
|
}
|
|
23
|
-
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, customMessages, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
25
|
+
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, customMessages, themeName, setAdminTheme, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
@@ -5,7 +5,6 @@ export interface UseEmbeddedMetricProps {
|
|
|
5
5
|
export declare const useEmbeddedMetric: ({ token, metricId, }: UseEmbeddedMetricProps) => {
|
|
6
6
|
externalMetric: any;
|
|
7
7
|
sharingSettingsId: string;
|
|
8
|
-
adminColors: string[] | null;
|
|
9
8
|
companyId: string;
|
|
10
9
|
clientId: string;
|
|
11
10
|
rlsSettings: {
|
|
@@ -15,9 +14,5 @@ export declare const useEmbeddedMetric: ({ token, metricId, }: UseEmbeddedMetric
|
|
|
15
14
|
tenancyLevel: any;
|
|
16
15
|
isLoading: boolean;
|
|
17
16
|
errorMsg: any;
|
|
18
|
-
|
|
19
|
-
width: string;
|
|
20
|
-
variant: 'static' | 'floating';
|
|
21
|
-
radius: string;
|
|
22
|
-
};
|
|
17
|
+
adminTheme: any;
|
|
23
18
|
};
|
|
@@ -53,5 +53,11 @@ declare const useGenerateMetric: (config: ConfigType) => {
|
|
|
53
53
|
isShowChartType: boolean;
|
|
54
54
|
setShowChartType: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
55
55
|
enabledCharts: string[];
|
|
56
|
+
stringColumnValues: {
|
|
57
|
+
column: string;
|
|
58
|
+
values: string[];
|
|
59
|
+
}[];
|
|
60
|
+
isRef: boolean;
|
|
61
|
+
setRef: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
56
62
|
};
|
|
57
63
|
export default useGenerateMetric;
|
|
@@ -11,3 +11,10 @@ export declare const useDashboardScheduledReportQuery: (token: string) => import
|
|
|
11
11
|
export declare const useEmbeddedMetricQuery: (token: string, id: string) => import("react-query").UseQueryResult<{
|
|
12
12
|
data: unknown;
|
|
13
13
|
}, unknown>;
|
|
14
|
+
export declare const useGetTheme: ({ token, name, companyId, }: {
|
|
15
|
+
token: string;
|
|
16
|
+
name: string;
|
|
17
|
+
companyId: string;
|
|
18
|
+
}) => import("react-query").UseQueryResult<{
|
|
19
|
+
data: unknown;
|
|
20
|
+
}, unknown>;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -449,6 +449,14 @@ export type RlsCondition = {
|
|
|
449
449
|
columnName: string;
|
|
450
450
|
};
|
|
451
451
|
};
|
|
452
|
+
export type PythonMetricFilter = {
|
|
453
|
+
name: string;
|
|
454
|
+
type: 'STRING' | 'DATE' | 'NUMBER';
|
|
455
|
+
value: {
|
|
456
|
+
startDate: Date;
|
|
457
|
+
endDate: Date;
|
|
458
|
+
} | string | number;
|
|
459
|
+
};
|
|
452
460
|
export type MetricData = {
|
|
453
461
|
id: string;
|
|
454
462
|
name: string;
|
|
@@ -527,5 +535,6 @@ export type AdminThemeOptionsType = {
|
|
|
527
535
|
cardCustomization: {
|
|
528
536
|
padding?: string;
|
|
529
537
|
borderRadius?: string;
|
|
538
|
+
shadow?: string;
|
|
530
539
|
};
|
|
531
540
|
};
|