@databrainhq/plugin 0.15.18 → 0.15.20
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.
- package/dist/components/Menu/index.d.ts +2 -1
- package/dist/components/MetricFilterDropDown/index.d.ts +3 -2
- package/dist/components/MetricList/MetricList.d.ts +1 -0
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +2 -1
- package/dist/components/MetricList/components/ManageMetricMenu/index.d.ts +3 -3
- package/dist/components/MetricList/components/MetricCards/ElementCard.d.ts +2 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +10 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +2 -1
- package/dist/containers/Dashboard/Dashboard.d.ts +1 -0
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +1 -0
- package/dist/helpers/createMetric.d.ts +8 -2
- package/dist/hooks/useMetricCard.d.ts +13 -1
- package/dist/types/app.d.ts +7 -0
- package/dist/webcomponents.es.js +2023 -1388
- package/dist/webcomponents.umd.js +17 -17
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ export type MenuProps = Pick<PopoverMenuProps, 'position' | 'menuWidth' | 'offse
|
|
|
16
16
|
buttonContent?: React.ReactNode;
|
|
17
17
|
items: MenuItem[];
|
|
18
18
|
disableAutoClose?: boolean;
|
|
19
|
+
zIndex?: number;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* @name Menu - Showing custom actionable list in a popup.
|
|
@@ -28,4 +29,4 @@ export type MenuProps = Pick<PopoverMenuProps, 'position' | 'menuWidth' | 'offse
|
|
|
28
29
|
* @prop position - Position of the popup menu.
|
|
29
30
|
* @returns JSX to render the menu.
|
|
30
31
|
*/
|
|
31
|
-
export declare const Menu: ({ buttonVariant, buttonIcon, buttonText, offset, position, menuWidth, buttonWidth, buttonContent, items, children, disableAutoClose, }: MenuProps) => React.JSX.Element;
|
|
32
|
+
export declare const Menu: ({ buttonVariant, buttonIcon, buttonText, offset, position, menuWidth, buttonWidth, buttonContent, items, children, disableAutoClose, zIndex, }: MenuProps) => React.JSX.Element;
|
|
@@ -12,12 +12,13 @@ type Props = {
|
|
|
12
12
|
tenancyLevel?: string;
|
|
13
13
|
clientColumnType: ClientColumnType;
|
|
14
14
|
hideDatePickerOptions?: string[];
|
|
15
|
+
zIndex?: number;
|
|
15
16
|
};
|
|
16
17
|
export type DateSelectedOption = {
|
|
17
18
|
value: string;
|
|
18
19
|
label: string;
|
|
19
20
|
labelType?: string;
|
|
20
21
|
};
|
|
21
|
-
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, clientColumnType, hideDatePickerOptions, }: Props) => React.JSX.Element;
|
|
22
|
-
declare const _default: React.MemoExoticComponent<({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, clientColumnType, hideDatePickerOptions, }: Props) => React.JSX.Element>;
|
|
22
|
+
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, clientColumnType, hideDatePickerOptions, zIndex, }: Props) => React.JSX.Element;
|
|
23
|
+
declare const _default: React.MemoExoticComponent<({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, clientColumnType, hideDatePickerOptions, zIndex, }: Props) => React.JSX.Element>;
|
|
23
24
|
export default _default;
|
|
@@ -40,5 +40,6 @@ export type FullScreenViewProps = {
|
|
|
40
40
|
hideDatePickerOptions?: string[];
|
|
41
41
|
chartAppearance?: ChartAppearanceType;
|
|
42
42
|
enableEmailCsv?: boolean;
|
|
43
|
+
fullScreenWidth?: number;
|
|
43
44
|
};
|
|
44
|
-
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters: globalFilterList, onDownload, downloadMetrics, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isEnableMetricSummary, hideDatePickerOptions, chartAppearance, enableEmailCsv, }: FullScreenViewProps) => React.JSX.Element;
|
|
45
|
+
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters: globalFilterList, onDownload, downloadMetrics, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isEnableMetricSummary, hideDatePickerOptions, chartAppearance, enableEmailCsv, fullScreenWidth, }: FullScreenViewProps) => React.JSX.Element;
|
|
@@ -8,10 +8,10 @@ type ManageMetricMenuProps = {
|
|
|
8
8
|
companyTenancyType: string;
|
|
9
9
|
workspaceId: string;
|
|
10
10
|
chartAppearance?: ChartAppearanceType;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
isOpenModal: boolean;
|
|
12
|
+
setOpenModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
13
|
};
|
|
14
|
-
declare const ManageMetricMenu: ({ props: { metricList, token, client, companyTenancyType, workspaceId, chartAppearance, colors,
|
|
14
|
+
declare const ManageMetricMenu: ({ props: { metricList, token, client, companyTenancyType, workspaceId, chartAppearance, colors, isOpenModal, setOpenModal, }, }: {
|
|
15
15
|
props: ManageMetricMenuProps;
|
|
16
16
|
}) => React.JSX.Element;
|
|
17
17
|
export default ManageMetricMenu;
|
|
@@ -10,6 +10,7 @@ type ElementCardProps = {
|
|
|
10
10
|
isOpenInNewTab?: boolean;
|
|
11
11
|
targetWord?: string;
|
|
12
12
|
};
|
|
13
|
+
elementSummary?: string;
|
|
13
14
|
};
|
|
14
|
-
declare const ElementCard: ({ elementSettings }: ElementCardProps) => React.JSX.Element;
|
|
15
|
+
declare const ElementCard: ({ elementSettings, elementSummary, }: ElementCardProps) => React.JSX.Element;
|
|
15
16
|
export default ElementCard;
|
|
@@ -76,5 +76,14 @@ export type MetricCardProps = {
|
|
|
76
76
|
isAllowedToSeeUnderlyingData?: boolean;
|
|
77
77
|
noDataImg?: string;
|
|
78
78
|
metricCardColor?: string;
|
|
79
|
+
metricStore?: Map<string, {
|
|
80
|
+
data: any;
|
|
81
|
+
isLoading: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
|
|
84
|
+
data: any;
|
|
85
|
+
isLoading: boolean;
|
|
86
|
+
}>>>;
|
|
87
|
+
summarizeMetricMutation?: any;
|
|
79
88
|
};
|
|
80
|
-
export declare const MetricCard: ({ globalFilters: globalFilterList, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isDisableCardTitle, chartHeight, isEditLayoutEnabled, isTourActive, hideDatePickerOptions, chartAppearance, isDisableMetricLoader, isShadowDisableOnHover, isAllowedToSeeUnderlyingData, noDataImg, metricCardColor, }: MetricCardProps) => React.JSX.Element;
|
|
89
|
+
export declare const MetricCard: ({ globalFilters: globalFilterList, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isDisableCardTitle, chartHeight, isEditLayoutEnabled, isTourActive, hideDatePickerOptions, chartAppearance, isDisableMetricLoader, isShadowDisableOnHover, isAllowedToSeeUnderlyingData, noDataImg, metricCardColor, metricStore, setMetricStore, summarizeMetricMutation, }: MetricCardProps) => React.JSX.Element;
|
|
@@ -30,6 +30,7 @@ type Props = {
|
|
|
30
30
|
headerAlignment?: 'left' | 'center' | 'right';
|
|
31
31
|
events?: Record<string, Function>;
|
|
32
32
|
dateColumns?: string[];
|
|
33
|
+
dropdownZindex?: number;
|
|
33
34
|
};
|
|
34
|
-
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, dateColumns, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, isShowFullScreenEnabled, onMaximize, headerAlignment, events, }: Props) => React.JSX.Element;
|
|
35
|
+
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, dateColumns, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, isShowFullScreenEnabled, onMaximize, headerAlignment, events, dropdownZindex, }: Props) => React.JSX.Element;
|
|
35
36
|
export {};
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -60,3 +60,5 @@ export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
|
|
|
60
60
|
export declare const METRIC_DOWNLOAD_RAW_CSV_PATH_V2: string;
|
|
61
61
|
export declare const IS_LOADING = "IS_LOADING";
|
|
62
62
|
export declare const DATA_LOADED = "DATA_LOADED";
|
|
63
|
+
export declare const SUMMARIZE_METRIC_PATH = "/hasuraActions/summarizeMetric";
|
|
64
|
+
export declare const SUMMARIZE_METRIC_KEY = "summarizeMetric";
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const LINEAR_POINTER_SIZE: {
|
|
|
116
116
|
label: string;
|
|
117
117
|
value: string;
|
|
118
118
|
}[];
|
|
119
|
-
export declare const ICONS_LIST: readonly ["invite", "guide", "headphone", "disable", "sync", "sparkle", "export", "spinner", "split-vertical", "split-horizontal", "placeholder", "warning", "drag-icon", "check", "people", "new-window", "circle", "group-by", "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", "combo", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie", "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", "row", "line", "time series", "globe", "map", "histogram", "radar", "scale", "scatter", "tree", "doughnut", "scatter", "waterfall", "area", "bubble", "boxplot", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles", "gauge", "step", "treeMap", "stack", "horizontal stack", "wand"];
|
|
119
|
+
export declare const ICONS_LIST: readonly ["custom", "invite", "guide", "headphone", "disable", "sync", "sparkle", "export", "spinner", "split-vertical", "split-horizontal", "placeholder", "warning", "drag-icon", "check", "people", "new-window", "circle", "group-by", "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", "combo", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie", "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", "row", "line", "time series", "globe", "map", "histogram", "radar", "scale", "scatter", "tree", "doughnut", "scatter", "waterfall", "area", "bubble", "boxplot", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles", "gauge", "step", "treeMap", "stack", "horizontal stack", "wand"];
|
|
120
120
|
export declare const NUMBER = "number";
|
|
121
121
|
export declare const STRING = "string";
|
|
122
122
|
export declare const BOOLEAN = "boolean";
|
|
@@ -151,3 +151,4 @@ export declare const selfHostedUrl: () => string;
|
|
|
151
151
|
export declare const SERVER_ERROR = "Internal Server Error";
|
|
152
152
|
export declare const CHAT_ERROR = "Oops! Couldn't find the data needed to generate the result for your query.";
|
|
153
153
|
export declare const CHAT_ERROR2 = "Try a different question or give more details for better assistance!";
|
|
154
|
+
export declare const convertArrayToObject: <T extends Record<string, any>>(input: T[]) => Record<keyof T, any[]>;
|
|
@@ -36,6 +36,7 @@ export interface DashboardProps extends HTMLAttributes<HTMLElement> {
|
|
|
36
36
|
disableMainLoader?: boolean;
|
|
37
37
|
disableMetricLoader?: boolean;
|
|
38
38
|
hideMetricCardShadow?: boolean;
|
|
39
|
+
shouldFitFullScreen?: boolean;
|
|
39
40
|
};
|
|
40
41
|
theme?: ThemeType;
|
|
41
42
|
isHideChartSettings?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Aggregate, ChartSettingsType, DatasetMetricCreationConfiguration, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn, SetChartFieldParams } from '@/types';
|
|
2
2
|
export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
|
|
3
|
-
export declare const getColumnType: (column: SelectedColumn) => "
|
|
3
|
+
export declare const getColumnType: (column: SelectedColumn) => "custom" | "default" | "arithmetic_column";
|
|
4
4
|
export declare const getGroupedColumnList: (data: any[]) => string[];
|
|
5
5
|
export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
|
|
6
6
|
dimensions: Dimension[];
|
|
@@ -16,4 +16,10 @@ export declare const setChartFields: ({ chartType, chartDimensions, chartMetrics
|
|
|
16
16
|
export declare const getDatabaseName: (name: string) => "bigquery" | "mysql" | "postgresql";
|
|
17
17
|
export declare const getWordCount: (text: string) => number;
|
|
18
18
|
export declare const generateRandomId: (length?: number) => string;
|
|
19
|
-
export declare const enableSaveToDashboardButton: (
|
|
19
|
+
export declare const enableSaveToDashboardButton: ({ chartSettings, dimensions, isCustomTable, metrics, }: {
|
|
20
|
+
chartSettings: ChartSettingsType;
|
|
21
|
+
dimensions: SelectedColumn[];
|
|
22
|
+
metrics: SelectedColumn[];
|
|
23
|
+
isCustomTable: boolean;
|
|
24
|
+
}) => number | undefined;
|
|
25
|
+
export declare const deepEqual: (obj1: Record<string, any> | undefined, obj2: Record<string, any> | undefined) => boolean;
|
|
@@ -19,8 +19,20 @@ type UseMetricCardProps = {
|
|
|
19
19
|
isFrontendApp: boolean;
|
|
20
20
|
guestToken?: string;
|
|
21
21
|
workspaceId: string;
|
|
22
|
+
metricStore?: Map<string, {
|
|
23
|
+
data: any;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
|
|
27
|
+
data: any;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
}>>>;
|
|
30
|
+
summarizeMetricMutation?: any;
|
|
22
31
|
};
|
|
23
|
-
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, }: UseMetricCardProps) => {
|
|
32
|
+
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, metricStore, setMetricStore, summarizeMetricMutation, }: UseMetricCardProps) => {
|
|
33
|
+
elementSummary: string;
|
|
34
|
+
isLoadingSummary: boolean;
|
|
35
|
+
isMetricListLoading: () => boolean;
|
|
24
36
|
onDrillLevelClick: (index: number) => void;
|
|
25
37
|
onDrillDown: (params: any, rowFilters?: {
|
|
26
38
|
columnName: string;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -89,6 +89,12 @@ export type LegendSettings = {
|
|
|
89
89
|
fontWeight?: number;
|
|
90
90
|
color?: string;
|
|
91
91
|
};
|
|
92
|
+
export type MetricCardSettings = {
|
|
93
|
+
isDisableTitle?: boolean;
|
|
94
|
+
isDisableDesc?: boolean;
|
|
95
|
+
isEnableTitleWrap?: boolean;
|
|
96
|
+
isEnableDescWrap?: boolean;
|
|
97
|
+
};
|
|
92
98
|
export type MarginSettings = {
|
|
93
99
|
marginTop?: number;
|
|
94
100
|
marginBottom?: number;
|
|
@@ -415,6 +421,7 @@ export type ChartSettingsType = {
|
|
|
415
421
|
sankeyValues?: string[];
|
|
416
422
|
percentageSize?: number;
|
|
417
423
|
selectedSeries?: string[];
|
|
424
|
+
metricCardSettings?: MetricCardSettings;
|
|
418
425
|
legendSettings?: LegendSettings;
|
|
419
426
|
labelSettings?: LabelSettings;
|
|
420
427
|
customSettings?: CustomSettings;
|