@databrainhq/plugin 0.14.19 → 0.14.21

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.
@@ -35,6 +35,9 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
35
35
  disableFullscreen?: boolean;
36
36
  optionsIcon?: 'kebab-menu-vertical' | 'download';
37
37
  adminThemeOptions?: AdminThemeOptionsType;
38
+ customMessages?: {
39
+ tokenExpiry?: string;
40
+ };
38
41
  }
39
42
  /**
40
43
  * @name Dashboard - A react component to display the dashboard.
@@ -48,4 +51,4 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
48
51
  * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
49
52
  * @prop {object} theme (optional) - A theme object to customize the theme.
50
53
  */
51
- export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, adminThemeOptions, }: DashboardProps) => React.JSX.Element;
54
+ export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, adminThemeOptions, customMessages, }: DashboardProps) => React.JSX.Element;
@@ -19,5 +19,8 @@ export interface EmbeddedDashboardProps {
19
19
  };
20
20
  theme?: ThemeType;
21
21
  adminThemeOption?: AdminThemeOptionsType;
22
+ customMessages?: {
23
+ tokenExpiry?: string;
24
+ };
22
25
  }
23
- export declare const EmbeddedDashboard: React.MemoExoticComponent<({ options, theme, adminThemeOption }: EmbeddedDashboardProps) => React.JSX.Element>;
26
+ export declare const EmbeddedDashboard: React.MemoExoticComponent<({ options, theme, adminThemeOption, customMessages, }: EmbeddedDashboardProps) => React.JSX.Element>;
@@ -16,5 +16,8 @@ export interface EmbeddedMetricProps {
16
16
  metricFilterPosition?: 'outside' | 'inside';
17
17
  disableFullscreen?: boolean;
18
18
  optionsIcon?: 'kebab-menu-vertical' | 'download';
19
+ customMessages?: {
20
+ tokenExpiry?: string;
21
+ };
19
22
  }
20
- export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, }: EmbeddedMetricProps) => React.JSX.Element>;
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>;
@@ -34,6 +34,9 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
34
34
  metricFilterPosition?: 'outside' | 'inside';
35
35
  disableFullscreen?: boolean;
36
36
  optionsIcon?: 'kebab-menu-vertical' | 'download';
37
+ customMessages?: {
38
+ tokenExpiry?: string;
39
+ };
37
40
  }
38
41
  /**
39
42
  * @name Metric - A react component to display a single metric card.
@@ -0,0 +1,2 @@
1
+ declare const getColumnTypes: (data: Record<string, any>[]) => Record<string, string>;
2
+ export default getColumnTypes;
@@ -7,3 +7,4 @@ export * from './timeseries';
7
7
  export * from './checkIsElementInViewport';
8
8
  export * from './areArraysEqual';
9
9
  export * from './generateTimeRangeWhereClause';
10
+ export * from './getColumnType';
@@ -4,6 +4,32 @@ import { CHART_TYPES, ICONS_LIST } from '@/consts';
4
4
  export type ChildrenProps = {
5
5
  children: ReactNode;
6
6
  };
7
+ export type GlobalFiltersDefaultValue = string[] | string | number | number[] | {
8
+ startDate: Date | undefined;
9
+ endDate: Date | undefined;
10
+ timeGrainValue: string;
11
+ value: string;
12
+ } | undefined | {
13
+ min: number | null;
14
+ max: number | null;
15
+ } | FloatingDropDownOption[];
16
+ export type TableColumn = {
17
+ name: string;
18
+ dataType: string;
19
+ isDefault?: boolean;
20
+ label?: string;
21
+ isShowHorizontal?: boolean;
22
+ defaultValue?: GlobalFiltersDefaultValue;
23
+ isClientScoped?: boolean;
24
+ clientColumn?: string;
25
+ clientColumnType?: string;
26
+ isManualOptions?: boolean;
27
+ manualOptions?: string[];
28
+ as: string;
29
+ sql?: string;
30
+ type?: 'custom' | 'default' | 'python';
31
+ isAggregate?: boolean;
32
+ };
7
33
  export type TimeSeriesGroupType = 'yearly' | 'monthly' | 'weekly' | 'daily' | 'quarterly';
8
34
  export type TimeSeriesType = 'bar' | 'line' | 'area' | 'stack';
9
35
  export type TimeSeriesSettingsType = {