@databrainhq/plugin 0.14.2 → 0.14.4

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.
@@ -17,7 +17,7 @@ export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'> & {
17
17
  alias: string;
18
18
  };
19
19
  };
20
- export declare const FilterDropDown: ({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, customTable, ...rest }: FilterDropDownProps) => React.JSX.Element;
20
+ export declare const FilterDropDown: React.MemoExoticComponent<({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, customTable, ...rest }: FilterDropDownProps) => React.JSX.Element>;
21
21
  export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'filter' | 'label' | 'workspaceId' | 'filterClause' | 'customTable'> & Omit<MultiSelectDropdownProps, 'options'> & {
22
22
  isDisablelabel?: boolean;
23
23
  radius?: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FilterFieldType } from '@/components';
3
- import { FilterClausesType, FilterType, FloatingDropDownOption } from '@/types/app';
3
+ import { FilterType, FloatingDropDownOption } from '@/types/app';
4
4
  export type FilterColumn = {
5
5
  as: string;
6
6
  dataType: string;
@@ -27,7 +27,6 @@ type FiltersProps = {
27
27
  workspaceId: string;
28
28
  };
29
29
  clientId?: string;
30
- filterClauses: FilterClausesType;
31
30
  isAllClient?: boolean;
32
31
  theme: {
33
32
  width: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FilterClausesType, FilterType } from '@/types/app';
2
+ import { FilterType } from '@/types/app';
3
3
  import { FilterFieldType } from '@/components';
4
4
  type HorizontalFiltersProps = {
5
5
  appliedfilters: FilterFieldType[];
@@ -10,7 +10,6 @@ type HorizontalFiltersProps = {
10
10
  workspaceId: string;
11
11
  };
12
12
  clientId?: string;
13
- filterClauses: FilterClausesType;
14
13
  isAllClient?: boolean;
15
14
  theme: {
16
15
  width: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FilterColumn } from './Filters';
3
3
  import { FilterFieldType, MetricCardProps } from '@/components';
4
- import { FilterClausesType, FilterType } from '@/types/app';
4
+ import { FilterType } from '@/types/app';
5
5
  type GlobalFiltersProps = {
6
6
  filters: FilterType[];
7
7
  onApply: (filters: MetricCardProps['globalFilters']) => void;
@@ -11,7 +11,6 @@ type GlobalFiltersProps = {
11
11
  workspaceId: string;
12
12
  };
13
13
  clientId?: string;
14
- globalFilters?: MetricCardProps['globalFilters'];
15
14
  isAllClient?: boolean;
16
15
  theme: {
17
16
  width: string;
@@ -39,7 +38,6 @@ type FilterPopupProps = {
39
38
  workspaceId: string;
40
39
  };
41
40
  clientId?: string;
42
- filterClauses: FilterClausesType;
43
41
  isAllClient?: boolean;
44
42
  theme: {
45
43
  width: string;
@@ -39,5 +39,7 @@ export type ExternalMetricListProps = {
39
39
  variant: 'static' | 'floating';
40
40
  radius: string;
41
41
  };
42
+ cardRadius: string;
43
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
42
44
  };
43
45
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -4,11 +4,9 @@ type Props = {
4
4
  onCloseModal: (value: boolean) => void;
5
5
  isShowRawCsvModal: boolean;
6
6
  metricItem?: ExternalMetrics;
7
- client: string;
8
- companyTenancyType: string;
9
- filterValues?: Record<string, string>;
10
7
  sharingSettingsId?: string;
8
+ query: string;
11
9
  };
12
- export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, }: Props) => React.JSX.Element;
13
- declare const _default: React.MemoExoticComponent<({ onCloseModal, isShowRawCsvModal, metricItem, client, companyTenancyType, filterValues, sharingSettingsId, }: Props) => React.JSX.Element>;
10
+ export declare const DownloadRawCsvModal: ({ onCloseModal, isShowRawCsvModal, metricItem, query, sharingSettingsId, }: Props) => React.JSX.Element;
11
+ declare const _default: React.MemoExoticComponent<({ onCloseModal, isShowRawCsvModal, metricItem, query, sharingSettingsId, }: Props) => React.JSX.Element>;
14
12
  export default _default;
@@ -1,7 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ExternalMetrics } from '@/types/queryTypes';
3
3
  import { MetricFilterOptionsType } from '@/types';
4
+ import { FilterFieldType } from '@/components/FilterField';
4
5
  export type FullScreenViewProps = {
6
+ globalFilters?: {
7
+ tableName: string;
8
+ filters: FilterFieldType[];
9
+ };
5
10
  metric: ExternalMetrics;
6
11
  colors?: string[];
7
12
  rlsFilters?: any;
@@ -22,4 +27,4 @@ export type FullScreenViewProps = {
22
27
  isHideTablePreview?: boolean;
23
28
  isAllClient?: boolean;
24
29
  };
25
- export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, }: FullScreenViewProps) => React.JSX.Element;
30
+ export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters, }: FullScreenViewProps) => React.JSX.Element;
@@ -38,5 +38,6 @@ export type MetricCardProps = {
38
38
  variant: 'static' | 'floating';
39
39
  radius: string;
40
40
  };
41
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
41
42
  };
42
- export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, }: MetricCardProps) => React.JSX.Element;
43
+ export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, }: MetricCardProps) => React.JSX.Element;
@@ -12,6 +12,7 @@ type TabsProps = {
12
12
  defaultActiveTab?: string | number;
13
13
  setTab?: React.Dispatch<React.SetStateAction<string | number>>;
14
14
  width?: string;
15
+ className?: string;
15
16
  };
16
17
  type TabProps = {
17
18
  children: React.ReactNode;
@@ -32,6 +32,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
32
32
  enableEmailCsv?: boolean;
33
33
  enableMultiMetricFilters?: boolean;
34
34
  disableFullscreen?: boolean;
35
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
35
36
  }
36
37
  /**
37
38
  * @name Dashboard - A react component to display the dashboard.
@@ -45,4 +46,4 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
45
46
  * @prop {boolean} enableMultiMetricFilters (optional) - Whether to allow multiple metric filters in metric card.
46
47
  * @prop {object} theme (optional) - A theme object to customize the theme.
47
48
  */
48
- export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, }: DashboardProps) => React.JSX.Element;
49
+ export declare const Dashboard: ({ token, options, theme, dashboardId, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, enableMultiMetricFilters, disableFullscreen, optionsIcon, }: DashboardProps) => React.JSX.Element;
@@ -14,6 +14,7 @@ export interface EmbeddedDashboardProps {
14
14
  enableDownloadCsv?: boolean;
15
15
  enableEmailCsv?: boolean;
16
16
  enableMultiMetricFilters?: boolean;
17
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
17
18
  };
18
19
  theme?: ThemeType;
19
20
  }
@@ -15,5 +15,6 @@ export interface EmbeddedMetricProps {
15
15
  metricFilterOptions?: MetricFilterOptionsType;
16
16
  metricFilterPosition?: 'outside' | 'inside';
17
17
  disableFullscreen?: boolean;
18
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
18
19
  }
19
- export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, }: EmbeddedMetricProps) => React.JSX.Element>;
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>;
@@ -33,6 +33,7 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
33
33
  enableMultiMetricFilters?: boolean;
34
34
  metricFilterPosition?: 'outside' | 'inside';
35
35
  disableFullscreen?: boolean;
36
+ optionsIcon?: 'kebab-menu-vertical' | 'download';
36
37
  }
37
38
  /**
38
39
  * @name Metric - A react component to display a single metric card.
@@ -1,5 +1,16 @@
1
+ import { MetricCardProps } from '@/components';
1
2
  import { RlsCondition } from '@/types/app';
2
- type ReplaceVariable = {
3
+ type GetSqlStatement = {
4
+ query: string;
5
+ clientId?: string;
6
+ rlsConditions: RlsCondition[];
7
+ globalFilters?: MetricCardProps['globalFilters'];
8
+ dbName: string;
9
+ tenancyLevel: string;
10
+ values?: Record<string, string>;
11
+ isAllClient?: boolean;
12
+ };
13
+ export type ReplaceVariable = {
3
14
  query: string;
4
15
  clientId?: string;
5
16
  rlsConditions: RlsCondition[];
@@ -21,4 +32,5 @@ export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
21
32
  dbName: string;
22
33
  query: string;
23
34
  }) => string;
35
+ export declare const getSqlStatement: ({ query, clientId, rlsConditions, globalFilters, dbName, tenancyLevel, values, isAllClient, }: GetSqlStatement) => string;
24
36
  export {};
@@ -1,14 +1,12 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
- declare const useDownloadRawCsv: ({ onCloseModal, sharingSettingsId, filterValues, metricItem, }: {
2
+ declare const useDownloadRawCsv: ({ onCloseModal, sharingSettingsId, metricItem, }: {
3
3
  onCloseModal: (value: boolean) => void;
4
4
  metricItem?: Record<string, any> | undefined;
5
- filterValues?: Record<string, string> | undefined;
6
5
  sharingSettingsId?: string | undefined;
7
6
  }) => {
8
- onSumbitSendCsvUrl: ({ values, clientName, tenancyType, }: {
7
+ onSumbitSendCsvUrl: ({ values, query, }: {
9
8
  values: FieldValues;
10
- clientName?: string | undefined;
11
- tenancyType?: string | undefined;
9
+ query: string;
12
10
  }) => void;
13
11
  isDisableDownloadSettings: boolean;
14
12
  downloadCsvError: string;
@@ -75,5 +75,6 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
75
75
  }[];
76
76
  drillType: any;
77
77
  tableResultsDownloadData: Record<string, any>[];
78
+ appliedMetricFilters: RlsCondition[];
78
79
  };
79
80
  export {};