@databrainhq/plugin 0.12.27 → 0.12.28

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.
@@ -7,6 +7,7 @@ export type ChartProps = {
7
7
  config?: Record<string, any>;
8
8
  className?: string;
9
9
  colors?: string[];
10
+ selectedSeries?: string[];
10
11
  };
11
12
  /**
12
13
  * @name Chart - The metric visualization component.
@@ -18,4 +19,4 @@ export type ChartProps = {
18
19
  * @prop colors (optional) - the admin provided chart color palettes.
19
20
  * @returns JSX - chart visaulization content.
20
21
  */
21
- export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className }: ChartProps) => React.JSX.Element>;
22
+ export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, selectedSeries, }: ChartProps) => React.JSX.Element>;
@@ -27,5 +27,6 @@ export type ExternalMetricListProps = {
27
27
  isHideTablePreview?: boolean;
28
28
  enableDownloadCsv?: boolean;
29
29
  enableEmailCsv?: boolean;
30
+ enableMultiMetricFilters?: boolean;
30
31
  };
31
32
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -29,5 +29,6 @@ export type MetricCardProps = {
29
29
  metricFilterOptions?: MetricFilterOptionsType;
30
30
  onDownloadRawCsv?: (filterValues?: Record<string, any>) => void;
31
31
  enableDownloadCsv?: boolean;
32
+ enableMultiMetricFilters?: boolean;
32
33
  };
33
- export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, }: MetricCardProps) => React.JSX.Element;
34
+ export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, }: MetricCardProps) => React.JSX.Element;
@@ -45,6 +45,7 @@ type MultiSelectProps = {
45
45
  labelVariant?: 'floating' | 'static';
46
46
  isSearchEnabled?: boolean;
47
47
  icon?: JSX.Element;
48
+ isDisableShowSelectedTag?: boolean;
48
49
  };
49
50
  export declare const OldMultiSelect: React.FC<MultiSelectProps>;
50
51
  export declare const MultiSelect: React.FC<MultiSelectProps>;
@@ -28,6 +28,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
28
28
  isHideTablePreview?: boolean;
29
29
  enableDownloadCsv?: boolean;
30
30
  enableEmailCsv?: boolean;
31
+ enableMultiMetricFilters?: boolean;
31
32
  }
32
33
  /**
33
34
  * @name Dashboard - A react component to display the dashboard.
@@ -38,6 +39,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
38
39
  * @prop {boolean} isHideChartSettings (optional) - Whether to hide chart settings in full screen view.
39
40
  * @prop {boolean} enableDownloadCsv (optional) - Whether to show download csv option in metric card.
40
41
  * @prop {boolean} enableEmailCsv (optional) - Whether to show email csv option in metric card.
42
+ * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
41
43
  * @prop {object} theme (optional) - A theme object to customize the theme.
42
44
  */
43
- export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, }: DashboardProps) => React.JSX.Element;
45
+ export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, }: DashboardProps) => React.JSX.Element;
@@ -11,6 +11,7 @@ export interface EmbeddedDashboardProps {
11
11
  isHideTablePreview?: boolean;
12
12
  enableDownloadCsv?: boolean;
13
13
  enableEmailCsv?: boolean;
14
+ enableMultiMetricFilters?: boolean;
14
15
  };
15
16
  theme?: ThemeType;
16
17
  }
@@ -11,6 +11,7 @@ export interface EmbeddedMetricProps {
11
11
  isHideTablePreview?: boolean;
12
12
  enableDownloadCsv?: boolean;
13
13
  enableEmailCsv?: boolean;
14
+ enableMultiMetricFilters?: boolean;
14
15
  metricFilterOptions?: MetricFilterOptionsType;
15
16
  }
16
- export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, }: EmbeddedMetricProps) => React.JSX.Element>;
17
+ export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, }: EmbeddedMetricProps) => React.JSX.Element>;
@@ -30,6 +30,7 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
30
30
  className?: string;
31
31
  style?: React.CSSProperties;
32
32
  metricFilterOptions?: MetricFilterOptionsType;
33
+ enableMultiMetricFilters?: boolean;
33
34
  }
34
35
  /**
35
36
  * @name Metric - A react component to display a single metric card.
@@ -39,6 +40,7 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
39
40
  * @prop {boolean} isHideTablePreview - Whether to hide the table preview in full screen view.
40
41
  * @prop {boolean} enableDownloadCsv (optional) - Whether to show download csv option in metric card.
41
42
  * @prop {boolean} enableEmailCsv (optional) - Whether to show email csv option in metric card.
43
+ * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
42
44
  * @prop {string} variant (optional) - The variant to render the metric it can be card (fullscreen included) or fullscreen.
43
45
  * @prop {object} metricFilterOptions (optional) - An optional metric filter options to be displayed in the metric filters.
44
46
  * @prop {function} onMinimize (optional) - An optional callback when minimize button is clicked.
@@ -1,4 +1,5 @@
1
1
  import { RlsCondition } from '@/types/app';
2
+ export declare const nameSpaceSpecification: (parentAlias: string, columnName: string, dbName: string) => string;
2
3
  export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
3
4
  rlsConditions: RlsCondition[];
4
5
  dbName: string;
@@ -60,5 +60,8 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
60
60
  hasNumberKeys: boolean;
61
61
  isEnableGauge: boolean;
62
62
  updateFilter: (filter: RlsCondition) => void;
63
+ metricFilters: RlsCondition[];
64
+ leftPositionedMetricFilters: RlsCondition[];
65
+ rightPositionedMetricFilters: RlsCondition[];
63
66
  };
64
67
  export {};
@@ -119,6 +119,7 @@ export type CustomSettings = {
119
119
  cumulativeBar?: boolean;
120
120
  showFunnelShadow?: boolean;
121
121
  stepPadding?: number;
122
+ showSelectLegend?: boolean;
122
123
  };
123
124
  export type TableSettings = {
124
125
  contentAlignment?: string;
@@ -197,6 +198,7 @@ export type ChartSettingsType = {
197
198
  singleValue?: string;
198
199
  sankeyValues?: string[];
199
200
  percentageSize?: number;
201
+ selectedSeries?: string[];
200
202
  legendSettings?: LegendSettings;
201
203
  labelSettings?: LabelSettings;
202
204
  customSettings?: CustomSettings;
@@ -4,5 +4,6 @@ export type GetChartOptionsParams = {
4
4
  chartOptions: ChartSettingsType;
5
5
  data: Record<string, any>[];
6
6
  colors?: string[];
7
+ selectedSeries?: string[];
7
8
  };
8
- export declare const getChartOptions: ({ chartOptions, data, colors, }: GetChartOptionsParams) => Record<string, any>;
9
+ export declare const getChartOptions: ({ chartOptions, data, colors, selectedSeries, }: GetChartOptionsParams) => Record<string, any>;
@@ -5,3 +5,4 @@ export * from './getFormattedDataType';
5
5
  export * from './arrayToCsvString';
6
6
  export * from './popoverPosition';
7
7
  export * from './getValidJson';
8
+ export * from './getChartOptions';