@databrainhq/plugin 0.13.0-beta.13 → 0.13.0-beta.15

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.
@@ -15,6 +15,7 @@ export type MenuProps = Pick<PopoverMenuProps, 'position' | 'menuWidth' | 'offse
15
15
  buttonWidth?: string;
16
16
  buttonContent?: React.ReactNode;
17
17
  items: MenuItem[];
18
+ disableAutoClose?: boolean;
18
19
  };
19
20
  /**
20
21
  * @name Menu - Showing custom actionable list in a popup.
@@ -27,4 +28,4 @@ export type MenuProps = Pick<PopoverMenuProps, 'position' | 'menuWidth' | 'offse
27
28
  * @prop position - Position of the popup menu.
28
29
  * @returns JSX to render the menu.
29
30
  */
30
- export declare const Menu: ({ buttonVariant, buttonIcon, buttonText, offset, position, menuWidth, buttonWidth, buttonContent, items, children, }: MenuProps) => React.JSX.Element;
31
+ export declare const Menu: ({ buttonVariant, buttonIcon, buttonText, offset, position, menuWidth, buttonWidth, buttonContent, items, children, disableAutoClose, }: MenuProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ type RawCsvDownloadButtonProps = {
3
+ fileName: string;
4
+ companyIntegrationId: string;
5
+ integrationName: string;
6
+ query: string;
7
+ className?: string;
8
+ children?: React.ReactNode;
9
+ };
10
+ export declare const RawCsvDownloadButton: ({ fileName, companyIntegrationId, integrationName, query, className, children, }: RawCsvDownloadButtonProps) => React.JSX.Element;
11
+ export {};
@@ -1,3 +1,5 @@
1
1
  export * from './CsvDownloadButton';
2
2
  export * from './MetricChart';
3
3
  export * from './ChartImageDownloadButton';
4
+ export * from './PivotCsvDownloadButton';
5
+ export * from './RawCsvDownloadButton';
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { MetricOutputProps } from '@/types/metricCreate';
3
- export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, createdCols, setCreatedCols, createdMetrics, setCreatedMetrics, configuration, }: MetricOutputProps) => React.JSX.Element;
3
+ export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, configuration, }: MetricOutputProps) => React.JSX.Element;
@@ -7,5 +7,8 @@ export type DownloadButtonProps = {
7
7
  metricName: string;
8
8
  onRawCsvData: () => void;
9
9
  chartOptions?: ChartSettingsType;
10
+ query: string;
11
+ companyIntegrationId: string;
12
+ integrationName: string;
10
13
  };
11
- export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, chartOptions, }: DownloadButtonProps) => React.JSX.Element;
14
+ export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, chartOptions, integrationName, companyIntegrationId, query, }: DownloadButtonProps) => React.JSX.Element;
@@ -5,6 +5,7 @@ type SwitchButtonProps = {
5
5
  placeholder?: string;
6
6
  defaultEnabled?: boolean;
7
7
  name?: string;
8
+ isDisabled?: boolean;
8
9
  };
9
10
  export declare const Switch: React.FC<SwitchButtonProps>;
10
11
  export {};
@@ -1,3 +1,4 @@
1
+ export declare const API_BASE_URL: string;
1
2
  export declare const DASHBOARD_PATH = "/dashboard";
2
3
  export declare const METRIC_PATH = "/metric";
3
4
  export declare const DASHBOARD_DATA_QUERY = "dashboardData";
@@ -37,3 +38,4 @@ export declare const METRIC_SHARE_CSV_PATH: string;
37
38
  export declare const METRIC_SHARE_CSV_MUTATION = "invokeShareCsv";
38
39
  export declare const METRIC_MARK_ARCHIVED_PATH: string;
39
40
  export declare const METRIC_MARK_ARCHIVED_MUTATION = "markArchived";
41
+ export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
@@ -86,4 +86,4 @@ export declare const NUMBER_FORMAT: {
86
86
  label: string;
87
87
  value: string;
88
88
  }[];
89
- export declare const ICONS_LIST: readonly ["undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join"];
89
+ export declare const ICONS_LIST: readonly ["undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history"];
@@ -7,6 +7,7 @@ import { ThemeType } from '@/utils/theme';
7
7
  * disableMetricCreation - boolean value to enable or disable metric creation
8
8
  * disableMetricUpdation - boolean value to enable or disable metric updation
9
9
  * disableMetricDeletion - boolean value to enable or disable metric deletion
10
+ * disableScheduleEmailReports - boolean value to enable or disable schedule email reports
10
11
  * disableLayoutCustomization - boolean value to enable or disable dashboard layout customization
11
12
  * chartColors - array of colors where each color should be a valid color string e.g. color name, rgb value, hex value, etc.
12
13
  * theme - Theme customization.
@@ -21,6 +22,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
21
22
  disableMetricUpdation?: boolean;
22
23
  disableMetricDeletion?: boolean;
23
24
  disableLayoutCustomization?: boolean;
25
+ disableScheduleEmailReports?: boolean;
24
26
  chartColors?: string[];
25
27
  };
26
28
  theme?: ThemeType;
@@ -6,6 +6,7 @@ export interface EmbeddedDashboardProps {
6
6
  disableMetricUpdation?: boolean;
7
7
  disableMetricDeletion?: boolean;
8
8
  disableLayoutCustomization?: boolean;
9
+ disableScheduleEmailReports?: boolean;
9
10
  chartColors?: string[];
10
11
  isHideChartSettings?: boolean;
11
12
  isHideTablePreview?: boolean;
@@ -1,7 +1,16 @@
1
1
  import { RlsCondition } from '@/types/app';
2
+ type ReplaceVariable = {
3
+ query: string;
4
+ clientId?: string;
5
+ rlsConditions: RlsCondition[];
6
+ tenancyLevel: string;
7
+ values?: Record<string, string>;
8
+ };
9
+ export declare const replaceVariable: ({ query, rlsConditions, tenancyLevel, clientId, values, }: ReplaceVariable) => string;
2
10
  export declare const nameSpaceSpecification: (parentAlias: string, columnName: string, dbName: string) => string;
3
11
  export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
4
12
  rlsConditions: RlsCondition[];
5
13
  dbName: string;
6
14
  query: string;
7
15
  }) => string;
16
+ export {};
@@ -16,6 +16,7 @@ interface DashboardContextType {
16
16
  isAllowedToDeleteMetrics: boolean | undefined;
17
17
  isAllowedToUpdateMetrics: boolean | undefined;
18
18
  isAllowedToChangeLayout: boolean | undefined;
19
+ isAllowedToEmailReports: boolean | undefined;
19
20
  workspace: any;
20
21
  adminTheme: any;
21
22
  clientSubsetData?: any | undefined;
@@ -14,12 +14,10 @@ declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
14
14
  value: string;
15
15
  label: string;
16
16
  }[];
17
- onGenerateChart: ({ param, metricParams, dimensionParams, createdDimensionParams, createdMetricParams, }: {
17
+ onGenerateChart: ({ param, metricParams, dimensionParams, }: {
18
18
  param?: DatasetMetricCreationConfiguration | undefined;
19
19
  metricParams?: FloatingDropDownOption[] | undefined;
20
20
  dimensionParams?: FloatingDropDownOption[] | undefined;
21
- createdMetricParams?: FloatingDropDownOption[] | undefined;
22
- createdDimensionParams?: FloatingDropDownOption[] | undefined;
23
21
  }) => void;
24
22
  createdSorts: CreateNewSort[];
25
23
  setCreatedSorts: import("react").Dispatch<import("react").SetStateAction<CreateNewSort[]>>;
@@ -42,9 +40,5 @@ declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
42
40
  value: string;
43
41
  label: string;
44
42
  }[];
45
- createdCols: FloatingDropDownOption[];
46
- setCreatedCols: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
47
- createdMetrics: FloatingDropDownOption[];
48
- setCreatedMetrics: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
49
43
  };
50
44
  export default useDatasetMetric;
@@ -11,6 +11,7 @@ declare const useNewEmbeddedDashboard: ({ token, dashboardId, }: {
11
11
  isAllowedToCreateMetrics: boolean;
12
12
  isAllowedToDeleteMetrics: boolean;
13
13
  isAllowedToUpdateMetrics: boolean;
14
+ isAllowedToEmailReports: boolean;
14
15
  companyId: string;
15
16
  clientId: string;
16
17
  workspace: any;
@@ -31,6 +31,7 @@ export type UseDropProps = {
31
31
  modifiers?: {
32
32
  sorting?: {
33
33
  isEnabled: boolean;
34
+ isEnabledAutoSort?: boolean;
34
35
  sortingType: 'vertical' | 'horizontal';
35
36
  list?: any[];
36
37
  setList?: any;
@@ -91,21 +91,15 @@ export type MetricOutputProps = {
91
91
  hasNumberKeys: boolean;
92
92
  metrics: FloatingDropDownOption[];
93
93
  dimensions: FloatingDropDownOption[];
94
- createdCols: FloatingDropDownOption[];
95
94
  configuration: DatasetMetricCreationConfiguration;
96
- setCreatedCols: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
97
- createdMetrics: FloatingDropDownOption[];
98
- setCreatedMetrics: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
99
95
  functionOptions: (col: any) => {
100
96
  value: string;
101
97
  label: string;
102
98
  }[];
103
- onGenerateChart: ({ param, metricParams, dimensionParams, createdDimensionParams, createdMetricParams, }: {
99
+ onGenerateChart: ({ param, metricParams, dimensionParams, }: {
104
100
  param?: DatasetMetricCreationConfiguration | undefined;
105
101
  metricParams?: FloatingDropDownOption[] | undefined;
106
102
  dimensionParams?: FloatingDropDownOption[] | undefined;
107
- createdMetricParams?: FloatingDropDownOption[] | undefined;
108
- createdDimensionParams?: FloatingDropDownOption[] | undefined;
109
103
  }) => void;
110
104
  setQuery?: React.Dispatch<React.SetStateAction<string>>;
111
105
  setData?: React.Dispatch<React.SetStateAction<any[] | undefined>>;
@@ -256,6 +250,7 @@ export type Dimension = {
256
250
  type: 'custom' | 'default';
257
251
  dataType: string;
258
252
  helperFunction?: string;
253
+ labelType?: string;
259
254
  };
260
255
  export type Filter = {
261
256
  method: string;
@@ -25,6 +25,7 @@ export type UseDashboardDataQueryOutputType = {
25
25
  isAllowedToCreateMetrics?: boolean | null;
26
26
  isAllowedToDeleteMetrics?: boolean | null;
27
27
  isAllowedToUpdateMetrics?: boolean | null;
28
+ isAllowedToEmailReports?: boolean | null;
28
29
  adminTheme?: any | null;
29
30
  clientId?: string | null;
30
31
  companyId?: string | null;