@databrainhq/plugin 0.13.0-beta.6 → 0.13.0-beta.8
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/DrillBreadCrumb/index.d.ts +9 -3
- package/dist/components/ExternalMetricForm/index.d.ts +0 -5
- package/dist/components/GlobalFilters/Filters.d.ts +1 -0
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +2 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/containers/Metric/EmbeddedMetric.d.ts +2 -1
- package/dist/containers/Metric/index.d.ts +1 -0
- package/dist/hooks/useDragAndDropState.d.ts +2 -0
- package/dist/hooks/useMetricCard.d.ts +10 -1
- package/dist/types/app.d.ts +2 -1
- package/dist/types/dragAndDropProps.d.ts +11 -1
- package/dist/webcomponents.es.js +21239 -21019
- package/dist/webcomponents.umd.js +160 -160
- package/package.json +1 -1
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const DrillBreadCrumb: ({ dimensions, drilledLevel, onResetLevel, onDrillLevelClick,
|
|
2
|
+
export declare const DrillBreadCrumb: ({ dimensions, drilledLevel, onResetLevel, onDrillLevelClick, isMetricCard, isMetricFilter, drillType, drillFilters, isShowBreadCrumb, }: {
|
|
3
3
|
dimensions: string[];
|
|
4
4
|
drilledLevel: number;
|
|
5
5
|
onResetLevel: () => void;
|
|
6
6
|
onDrillLevelClick: (value: number) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
isMetricCard?: boolean | undefined;
|
|
8
|
+
isMetricFilter?: boolean | undefined;
|
|
9
|
+
drillType?: string | undefined;
|
|
10
|
+
drillFilters?: {
|
|
11
|
+
columnName: string;
|
|
12
|
+
value: any;
|
|
13
|
+
}[] | undefined;
|
|
14
|
+
isShowBreadCrumb?: boolean | undefined;
|
|
9
15
|
}) => React.JSX.Element;
|
|
10
16
|
export default DrillBreadCrumb;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { DashboardType, FloatingDropDownOption } from '@/types/app';
|
|
4
3
|
type ExternalMetricProps = {
|
|
5
4
|
onSubmit: (values: FieldValues) => void;
|
|
6
5
|
defaultValues?: FieldValues;
|
|
7
6
|
onCancel: () => void;
|
|
8
|
-
isEmbedded?: boolean;
|
|
9
|
-
dashboardIds: DashboardType['id'][];
|
|
10
|
-
onDashboardChange: (selected: DashboardType['id'][]) => void;
|
|
11
|
-
options: FloatingDropDownOption[];
|
|
12
7
|
error?: string;
|
|
13
8
|
isCreatingMetric?: boolean;
|
|
14
9
|
};
|
|
@@ -31,5 +31,6 @@ export type MetricCardProps = {
|
|
|
31
31
|
enableDownloadCsv?: boolean;
|
|
32
32
|
enableMultiMetricFilters?: boolean;
|
|
33
33
|
disableActions?: boolean;
|
|
34
|
+
metricFilterPosition?: 'outside' | 'inside';
|
|
34
35
|
};
|
|
35
|
-
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, }: MetricCardProps) => React.JSX.Element;
|
|
36
|
+
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, }: MetricCardProps) => React.JSX.Element;
|
|
@@ -28,6 +28,7 @@ type Props = {
|
|
|
28
28
|
filterValues?: Record<string, any>;
|
|
29
29
|
onMaximize?: () => void;
|
|
30
30
|
headerAlignment?: 'left' | 'center' | 'right';
|
|
31
|
+
events?: Record<string, Function>;
|
|
31
32
|
};
|
|
32
|
-
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, isShowFullScreenEnabled, onMaximize, headerAlignment, }: Props) => React.JSX.Element;
|
|
33
|
+
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, isShowFullScreenEnabled, onMaximize, headerAlignment, events, }: Props) => React.JSX.Element;
|
|
33
34
|
export {};
|
|
@@ -13,5 +13,6 @@ export interface EmbeddedMetricProps {
|
|
|
13
13
|
enableEmailCsv?: boolean;
|
|
14
14
|
enableMultiMetricFilters?: boolean;
|
|
15
15
|
metricFilterOptions?: MetricFilterOptionsType;
|
|
16
|
+
metricFilterPosition?: 'outside' | 'inside';
|
|
16
17
|
}
|
|
17
|
-
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
18
|
+
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
@@ -31,6 +31,7 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
|
|
|
31
31
|
style?: React.CSSProperties;
|
|
32
32
|
metricFilterOptions?: MetricFilterOptionsType;
|
|
33
33
|
enableMultiMetricFilters?: boolean;
|
|
34
|
+
metricFilterPosition?: 'outside' | 'inside';
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* @name Metric - A react component to display a single metric card.
|
|
@@ -3,6 +3,8 @@ declare const useDragAndDropState: () => {
|
|
|
3
3
|
dndState: DndStateProp;
|
|
4
4
|
setActive: (active: DndStateProp['active']) => void;
|
|
5
5
|
setOver: (over: DndStateProp['over']) => void;
|
|
6
|
+
setDraggables: (draggable: DndStateProp['active']) => void;
|
|
7
|
+
setDropables: (droppable: DndStateProp['over']) => void;
|
|
6
8
|
setDndState: (update: DndStateProp | ((prev: DndStateProp) => DndStateProp)) => void;
|
|
7
9
|
};
|
|
8
10
|
export default useDragAndDropState;
|
|
@@ -17,7 +17,10 @@ type UseMetricCardProps = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, }: UseMetricCardProps) => {
|
|
19
19
|
onDrillLevelClick: (index: number) => void;
|
|
20
|
-
onDrillDown: (params: any
|
|
20
|
+
onDrillDown: (params: any, rowFilters?: {
|
|
21
|
+
columnName: string;
|
|
22
|
+
value: any;
|
|
23
|
+
}[] | undefined) => void;
|
|
21
24
|
handleChartClick: (params: any) => void;
|
|
22
25
|
dataDb: Record<string, any>[];
|
|
23
26
|
getUnderlyingData: ({ columnName, value, setData, setLoading, isSingleValueChart, }: {
|
|
@@ -65,5 +68,11 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
|
|
|
65
68
|
metricFilters: RlsCondition[];
|
|
66
69
|
leftPositionedMetricFilters: RlsCondition[];
|
|
67
70
|
rightPositionedMetricFilters: RlsCondition[];
|
|
71
|
+
drillFilters: {
|
|
72
|
+
columnName: string;
|
|
73
|
+
value: string | number;
|
|
74
|
+
}[];
|
|
75
|
+
drillType: any;
|
|
76
|
+
tableResultsDownloadData: Record<string, any>[];
|
|
68
77
|
};
|
|
69
78
|
export {};
|
package/dist/types/app.d.ts
CHANGED
|
@@ -293,6 +293,7 @@ export type Schema = {
|
|
|
293
293
|
clientColumnType?: string;
|
|
294
294
|
isManualOptions?: boolean;
|
|
295
295
|
manualOptions?: string[];
|
|
296
|
+
dependOn?: FloatingDropDownOption[];
|
|
296
297
|
}[];
|
|
297
298
|
};
|
|
298
299
|
export type RlsFilterObjectType = {
|
|
@@ -451,7 +452,7 @@ export type MetricFilterOptionsType = Record<string, {
|
|
|
451
452
|
options: string[] | number[] | DateTypeOptionType[];
|
|
452
453
|
defaultOption?: string | number;
|
|
453
454
|
}>;
|
|
454
|
-
export type FilterClausesType = (
|
|
455
|
+
export type FilterClausesType = (dependOn: FloatingDropDownOption[]) => {
|
|
455
456
|
as: string;
|
|
456
457
|
columnName: string;
|
|
457
458
|
value: string | string[];
|
|
@@ -40,10 +40,20 @@ export type UseDropProps = {
|
|
|
40
40
|
export type DndStateProp = {
|
|
41
41
|
active: (UseDragProps & {
|
|
42
42
|
DragNodeRef: any;
|
|
43
|
+
isEnableDrag: boolean;
|
|
44
|
+
isDragging: boolean;
|
|
45
|
+
rect: DOMRect | null;
|
|
43
46
|
}) | null;
|
|
44
47
|
over: (UseDropProps & {
|
|
45
48
|
setDropNodeRef: any;
|
|
46
|
-
|
|
49
|
+
isEnableDrop: boolean;
|
|
50
|
+
dragStatus: {
|
|
51
|
+
isDragOver: boolean;
|
|
52
|
+
isDrop: boolean;
|
|
53
|
+
};
|
|
54
|
+
rect: DOMRect | null;
|
|
47
55
|
}) | null;
|
|
48
56
|
DragPreviewCreateRoot?: any;
|
|
57
|
+
draggables?: DndStateProp['active'][];
|
|
58
|
+
droppables?: DndStateProp['over'][];
|
|
49
59
|
};
|