@databrainhq/plugin 0.15.17 → 0.15.19
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/Chart/SingleValueChart.d.ts +1 -0
- package/dist/components/Chart/index.d.ts +2 -1
- 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 +2 -0
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +2 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +2 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/consts/app.d.ts +1 -1
- package/dist/consts/metricOptions.d.ts +1 -0
- package/dist/containers/Dashboard/Dashboard.d.ts +1 -0
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +1 -0
- package/dist/helpers/createMetric.d.ts +3 -1
- package/dist/types/app.d.ts +13 -0
- package/dist/types/queryTypes.d.ts +4 -0
- package/dist/utils/getChartOptions.d.ts +2 -1
- package/dist/utils/getNoAxisChartOptions.d.ts +2 -1
- package/dist/webcomponents.es.js +2206 -1631
- package/dist/webcomponents.umd.js +17 -17
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export type ChartProps = {
|
|
|
19
19
|
isSortReversed?: boolean;
|
|
20
20
|
chartHeight?: number;
|
|
21
21
|
chartAppearance?: ChartAppearanceType;
|
|
22
|
+
metricCardColor?: string;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* @name Chart - The metric visualization component.
|
|
@@ -30,4 +31,4 @@ export type ChartProps = {
|
|
|
30
31
|
* @prop colors (optional) - the admin provided chart color palettes.
|
|
31
32
|
* @returns JSX - chart visaulization content.
|
|
32
33
|
*/
|
|
33
|
-
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, sortOrder, onMaximize, onDrillPivotTable, pivotDrillState, isPythonMode, seriesName, isSortReversed, chartHeight, chartAppearance, }: ChartProps) => React.JSX.Element>;
|
|
34
|
+
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, sortOrder, onMaximize, onDrillPivotTable, pivotDrillState, isPythonMode, seriesName, isSortReversed, chartHeight, chartAppearance, metricCardColor, }: ChartProps) => React.JSX.Element>;
|
|
@@ -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;
|
|
@@ -75,5 +75,6 @@ export type MetricCardProps = {
|
|
|
75
75
|
isShadowDisableOnHover?: boolean;
|
|
76
76
|
isAllowedToSeeUnderlyingData?: boolean;
|
|
77
77
|
noDataImg?: string;
|
|
78
|
+
metricCardColor?: string;
|
|
78
79
|
};
|
|
79
|
-
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, }: MetricCardProps) => React.JSX.Element;
|
|
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;
|
|
@@ -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/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";
|
|
@@ -202,3 +202,4 @@ export declare const keywordToIgnoreRegExp: RegExp;
|
|
|
202
202
|
export declare const DEFAULT_SEARCH_STATE: SearchState;
|
|
203
203
|
export declare const DEFAULT_SEARCH_CHAT: SearchStateChatType;
|
|
204
204
|
export declare const decimalTypes: string[];
|
|
205
|
+
export declare const switchAxisCharts: string[];
|
|
@@ -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,3 +16,5 @@ 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: (chartType: ChartSettingsType['chartType'], dimensions: SelectedColumn[], metrics: SelectedColumn[]) => number;
|
|
20
|
+
export declare const deepEqual: (obj1: Record<string, any> | undefined, obj2: Record<string, any> | undefined) => boolean;
|
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;
|
|
@@ -444,6 +451,11 @@ export type ChartSettingsType = {
|
|
|
444
451
|
comboBarList: string[];
|
|
445
452
|
isGroupXAxis?: boolean;
|
|
446
453
|
isEnableComparisonFilter?: boolean;
|
|
454
|
+
enduserMeasureAndDimensions?: {
|
|
455
|
+
isEnabled?: boolean;
|
|
456
|
+
measures?: FloatingDropDownOption[];
|
|
457
|
+
dimensions?: FloatingDropDownOption[];
|
|
458
|
+
};
|
|
447
459
|
};
|
|
448
460
|
export type SelectedColumns = {
|
|
449
461
|
column: string;
|
|
@@ -750,6 +762,7 @@ export type AdminThemeOptionsType = {
|
|
|
750
762
|
selectBoxVariant?: 'floating' | 'static';
|
|
751
763
|
selectBoxBorderRadius?: string;
|
|
752
764
|
selectBoxTextColor?: string;
|
|
765
|
+
metricCardColor?: string;
|
|
753
766
|
};
|
|
754
767
|
cardDescription: {
|
|
755
768
|
fontSize?: string;
|
|
@@ -33,9 +33,10 @@ export type GetChartOptionsParams = {
|
|
|
33
33
|
chartHeight?: number;
|
|
34
34
|
chartAppearance?: ChartAppearanceType;
|
|
35
35
|
chartRef?: React.MutableRefObject<any>;
|
|
36
|
+
metricCardColor?: string;
|
|
36
37
|
};
|
|
37
38
|
export declare const getLegendData: ({ chartOptions, data, }: {
|
|
38
39
|
chartOptions: ChartSettingsType;
|
|
39
40
|
data: Record<string, any>[];
|
|
40
41
|
}) => any;
|
|
41
|
-
export declare const getChartOptions: ({ chartOptions, data, colors, isPythonMode, geoJsonData, chartHeight, chartAppearance, chartRef, }: GetChartOptionsParams) => Record<string, any>;
|
|
42
|
+
export declare const getChartOptions: ({ chartOptions, data, colors, isPythonMode, geoJsonData, chartHeight, chartAppearance, chartRef, metricCardColor, }: GetChartOptionsParams) => Record<string, any>;
|
|
@@ -20,5 +20,6 @@ export type GetNoAxisChartOptionsParams = {
|
|
|
20
20
|
chartHeight?: number;
|
|
21
21
|
chartAppearance?: ChartAppearanceType;
|
|
22
22
|
chartRef?: React.MutableRefObject<any>;
|
|
23
|
+
metricCardColor?: string;
|
|
23
24
|
};
|
|
24
|
-
export declare const getNoAxisChartOptions: ({ chartOptions, data, colors, datasets, funnelData, labels, singleValueData, geoJsonData, mapColors, progressData, barGradient, labelFormatSettings, bgColors, chartHeight, chartAppearance, chartRef, }: GetNoAxisChartOptionsParams) => Record<string, any>;
|
|
25
|
+
export declare const getNoAxisChartOptions: ({ chartOptions, data, colors, datasets, funnelData, labels, singleValueData, geoJsonData, mapColors, progressData, barGradient, labelFormatSettings, bgColors, chartHeight, chartAppearance, chartRef, metricCardColor, }: GetNoAxisChartOptionsParams) => Record<string, any>;
|