@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.
@@ -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;
@@ -39,7 +39,6 @@ export type ExternalMetricListProps = {
39
39
  variant: 'static' | 'floating';
40
40
  radius: string;
41
41
  };
42
- cardRadius: string;
43
42
  optionsIcon?: 'kebab-menu-vertical' | 'download';
44
43
  };
45
44
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -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>;
@@ -37,6 +37,7 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
37
37
  customMessages?: {
38
38
  tokenExpiry?: string;
39
39
  };
40
+ themeName?: string;
40
41
  }
41
42
  /**
42
43
  * @name Metric - A react component to display a single metric card.
@@ -4,6 +4,7 @@ interface DashboardContextType {
4
4
  token: string | undefined;
5
5
  error?: string;
6
6
  data: {
7
+ token: string;
7
8
  companyId: string;
8
9
  sharingSettingsId: string | undefined;
9
10
  clientId: string | undefined;
@@ -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
- dropdownTheme: {
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;
@@ -5,6 +5,7 @@ declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
5
5
  isLoading: boolean;
6
6
  error: string | undefined;
7
7
  data: {
8
+ token: string;
8
9
  externalDashboard: any;
9
10
  externalDashboardMetrics: any;
10
11
  isAllowedToChangeLayout: boolean;
@@ -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>;
@@ -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
  };