@databrainhq/plugin 0.12.34 → 0.13.0-beta.1
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/Accordion/index.d.ts +28 -0
- package/dist/components/Alert/index.d.ts +3 -2
- package/dist/components/Badge/index.d.ts +9 -0
- package/dist/components/Button/index.d.ts +6 -3
- package/dist/components/Chart/SingleValueChart.d.ts +1 -1
- package/dist/components/Chart/index.d.ts +4 -2
- package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +2 -3
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/PositionContainer.d.ts +7 -0
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +11 -3
- package/dist/components/ChartTypePanel/index.d.ts +15 -0
- package/dist/components/Checkbox/index.d.ts +10 -0
- package/dist/components/ColorField/{Index.d.ts → ColorField.d.ts} +2 -2
- package/dist/components/DateRangePicker/index.d.ts +3 -1
- package/dist/components/DraggableItem/index.d.ts +7 -0
- package/dist/components/DrillBreadCrumb/index.d.ts +3 -1
- package/dist/components/ExternalMetricForm/index.d.ts +1 -0
- package/dist/components/FilterDropDown/index.d.ts +13 -5
- package/dist/components/FloatingDropDown/index.d.ts +10 -14
- package/dist/components/FullScreenChart/index.d.ts +1 -1
- package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
- package/dist/components/GlobalFilters/Filters.d.ts +3 -2
- package/dist/components/GlobalFilters/HorizontalFilters.d.ts +3 -2
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +3 -1
- package/dist/components/GlobalFilters/index.d.ts +4 -3
- package/dist/components/Icons/Logos/index.d.ts +14 -0
- package/dist/components/Icons/index.d.ts +6 -4
- package/dist/components/InfoTooltip/index.d.ts +6 -2
- package/dist/components/InputField/index.d.ts +6 -7
- package/dist/components/List/index.d.ts +20 -0
- package/dist/components/Menu/index.d.ts +30 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +2 -1
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +1 -1
- package/dist/components/MetricCreation/components/Header/index.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +2 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -2
- package/dist/components/MetricCreation/components/Panels/ChartAppearancePanel.d.ts +18 -0
- package/dist/components/MetricCreation/components/Panels/FiltersPanel.d.ts +20 -0
- package/dist/components/MetricCreation/components/Panels/SortPanel.d.ts +15 -0
- package/dist/components/MetricFilterDropDown/index.d.ts +3 -1
- package/dist/components/MetricList/MetricList.d.ts +6 -1
- package/dist/components/MetricList/components/ArchiveMetricModal/index.d.ts +1 -1
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +4 -5
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +4 -3
- package/dist/components/Modal/Modal.d.ts +1 -0
- package/dist/components/MultiSelectDropdown/index.d.ts +28 -0
- package/dist/components/Panel/index.d.ts +15 -0
- package/dist/components/PopoverMenu/index.d.ts +21 -5
- package/dist/components/RadioButton/index.d.ts +16 -0
- package/dist/components/SearchTab/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +2 -12
- package/dist/components/{ToggleButton → Switch}/SwitchInput.d.ts +1 -1
- package/dist/components/Switch/index.d.ts +10 -0
- package/dist/components/Table/index.d.ts +5 -1
- package/dist/components/Tabs/index.d.ts +37 -0
- package/dist/components/Text/index.d.ts +7 -6
- package/dist/components/TimeGrainField/index.d.ts +1 -1
- package/dist/components/index.d.ts +12 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +5 -0
- package/dist/consts/metricOptions.d.ts +71 -5
- package/dist/helpers/areArraysEqual.d.ts +1 -0
- package/dist/helpers/checkIsElementInViewport.d.ts +1 -0
- package/dist/helpers/generateTimeRangeWhereClause.d.ts +3 -1
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/timeseries.d.ts +2 -2
- package/dist/hooks/useDatasetMetric.d.ts +50 -0
- package/dist/hooks/useDrag.d.ts +9 -0
- package/dist/hooks/useDragAndDropState.d.ts +8 -0
- package/dist/hooks/useDrop.d.ts +14 -0
- package/dist/hooks/useMetricCard.d.ts +9 -7
- package/dist/hooks/useMetricConfig.d.ts +57 -0
- package/dist/hooks/useOutsideAlerter.d.ts +8 -1
- package/dist/queries/externalDashboard.mutation.d.ts +7 -1
- package/dist/queries/externalDashboard.query.d.ts +1 -1
- package/dist/queries/metric.query.d.ts +1 -1
- package/dist/types/app.d.ts +63 -6
- package/dist/types/dragAndDropProps.d.ts +42 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/metricCreate.d.ts +218 -2
- package/dist/types/queryTypes.d.ts +10 -0
- package/dist/utils/colors.d.ts +1 -0
- package/dist/utils/getChartOptions.d.ts +1 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/webcomponents.es.js +90045 -88969
- package/dist/webcomponents.umd.js +266 -345
- package/package.json +108 -107
- package/dist/components/ChartModal/SelectField.d.ts +0 -2
- package/dist/components/Charts/AreaChart.d.ts +0 -3
- package/dist/components/Charts/BarChart.d.ts +0 -25
- package/dist/components/Charts/BoxPlot.d.ts +0 -3
- package/dist/components/Charts/BubbleChart.d.ts +0 -3
- package/dist/components/Charts/ComboChart.d.ts +0 -3
- package/dist/components/Charts/DoughnutChart.d.ts +0 -3
- package/dist/components/Charts/FunnelChart.d.ts +0 -3
- package/dist/components/Charts/GaugeChart.d.ts +0 -3
- package/dist/components/Charts/Histogram.d.ts +0 -3
- package/dist/components/Charts/LineChart.d.ts +0 -25
- package/dist/components/Charts/PieChart.d.ts +0 -3
- package/dist/components/Charts/RowChart.d.ts +0 -3
- package/dist/components/Charts/SankeyChart.d.ts +0 -3
- package/dist/components/Charts/ScatterChart.d.ts +0 -3
- package/dist/components/Charts/SingleValueChart/index.d.ts +0 -3
- package/dist/components/Charts/StackedBarChart.d.ts +0 -3
- package/dist/components/Charts/SteppedAreaChart.d.ts +0 -3
- package/dist/components/Charts/Table/TableChart.d.ts +0 -3
- package/dist/components/Charts/TimeSeriesChart.d.ts +0 -4
- package/dist/components/Charts/WaterfallChart.d.ts +0 -3
- package/dist/components/MetricChart/MetricChart.d.ts +0 -45
- package/dist/components/ToggleButton/ToggleInput.d.ts +0 -9
- package/dist/components/ToggleButton/index.d.ts +0 -14
|
@@ -3,15 +3,10 @@ import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSetting
|
|
|
3
3
|
import { MetricCardProps } from '@/components';
|
|
4
4
|
type UseMetricCardProps = {
|
|
5
5
|
metric: Record<string, any>;
|
|
6
|
-
chartSettings: ChartSettingsType;
|
|
7
|
-
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
8
6
|
clientId: string;
|
|
9
7
|
tenancyLevel: string;
|
|
10
8
|
globalFilters?: MetricCardProps['globalFilters'];
|
|
11
|
-
rlsFilters?:
|
|
12
|
-
param: any;
|
|
13
|
-
filterValues: Record<string, any>;
|
|
14
|
-
};
|
|
9
|
+
rlsFilters?: any;
|
|
15
10
|
appFilters?: any;
|
|
16
11
|
datasetSettings?: DatasetSettings;
|
|
17
12
|
setDatasetSettings?: React.Dispatch<React.SetStateAction<DatasetSettings>>;
|
|
@@ -20,7 +15,7 @@ type UseMetricCardProps = {
|
|
|
20
15
|
crossDashboardFilters?: RlsCondition[];
|
|
21
16
|
metricFilterOptions?: MetricFilterOptionsType;
|
|
22
17
|
};
|
|
23
|
-
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId,
|
|
18
|
+
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, }: UseMetricCardProps) => {
|
|
24
19
|
onDrillLevelClick: (index: number) => void;
|
|
25
20
|
onDrillDown: (params: any) => void;
|
|
26
21
|
handleChartClick: (params: any) => void;
|
|
@@ -39,6 +34,13 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
|
|
|
39
34
|
chartParams: any;
|
|
40
35
|
isQueryLoading: boolean;
|
|
41
36
|
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
37
|
+
isSingleValueNull: boolean;
|
|
38
|
+
dynamicOptions: any;
|
|
39
|
+
chartSettings: ChartSettingsType;
|
|
40
|
+
setChartSettings: import("react").Dispatch<import("react").SetStateAction<ChartSettingsType>>;
|
|
41
|
+
isEnableZoom: boolean;
|
|
42
|
+
filterValues: Record<string, any>;
|
|
43
|
+
containerRef: import("react").RefObject<HTMLDivElement>;
|
|
42
44
|
drilledLevel: number;
|
|
43
45
|
dimensions: any;
|
|
44
46
|
rlsConditions: RlsCondition[];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartSettingsType, ConfigType, FloatingDropDownOption } from '@/types';
|
|
3
|
+
export type CompanyIntegration = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
declare const useMetricConfig: ({ ...config }: ConfigType) => {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
chartSettings: ChartSettingsType;
|
|
10
|
+
setShowSaveMetricModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
+
setSelectTable: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption>>;
|
|
12
|
+
selectTable: FloatingDropDownOption;
|
|
13
|
+
data: any[] | undefined;
|
|
14
|
+
error: string;
|
|
15
|
+
previewTableData: any[] | undefined;
|
|
16
|
+
query: string;
|
|
17
|
+
isShowSqlModal: boolean;
|
|
18
|
+
setShowSqlModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
19
|
+
isEnablePivotTable: boolean;
|
|
20
|
+
isEnableGauge: boolean;
|
|
21
|
+
groupByList: string[];
|
|
22
|
+
hasNumberKeys: boolean;
|
|
23
|
+
setShowChartCustomProperties: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
24
|
+
isShowFullScreen: boolean;
|
|
25
|
+
setShowFullScreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
26
|
+
isShowChartType: boolean;
|
|
27
|
+
setShowChartType: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
28
|
+
isShowSaveMetricModal: boolean;
|
|
29
|
+
updateExternalMetric: (data: import("react-hook-form").FieldValues) => void;
|
|
30
|
+
createExternalMetric: (data: import("react-hook-form").FieldValues) => void;
|
|
31
|
+
dashboardOptions: {
|
|
32
|
+
value: any;
|
|
33
|
+
label: any;
|
|
34
|
+
}[];
|
|
35
|
+
saveError: string;
|
|
36
|
+
setChartSettings: import("react").Dispatch<import("react").SetStateAction<ChartSettingsType>>;
|
|
37
|
+
isShowChartCustomProperties: boolean;
|
|
38
|
+
setBarRadius: import("react").Dispatch<import("react").SetStateAction<{
|
|
39
|
+
topRadius: number;
|
|
40
|
+
bottomRadius: number;
|
|
41
|
+
}>>;
|
|
42
|
+
setError: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
43
|
+
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
44
|
+
setData: import("react").Dispatch<import("react").SetStateAction<any[] | undefined>>;
|
|
45
|
+
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
46
|
+
setGroupByList: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
47
|
+
clientSubsetData: any;
|
|
48
|
+
isShowSortPanel: boolean;
|
|
49
|
+
setShowSortPanel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
50
|
+
isShowFilters: boolean;
|
|
51
|
+
setShowFilters: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
52
|
+
isCreatingMetric: boolean;
|
|
53
|
+
isEnableSingleDimension: boolean;
|
|
54
|
+
isEnableSingleMetrics: boolean;
|
|
55
|
+
enabledCharts: string[];
|
|
56
|
+
};
|
|
57
|
+
export default useMetricConfig;
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
type UseOutsideAlerterProps = {
|
|
3
3
|
onOutsideClick: () => void;
|
|
4
4
|
wrapRef: React.RefObject<any>;
|
|
5
|
+
portalRef?: any;
|
|
5
6
|
};
|
|
6
|
-
export declare const useOutsideAlerter: ({ onOutsideClick, wrapRef, }: UseOutsideAlerterProps) => void;
|
|
7
|
+
export declare const useOutsideAlerter: ({ onOutsideClick, wrapRef, portalRef, }: UseOutsideAlerterProps) => void;
|
|
8
|
+
type UsePopoverOutsideAlerterProps = {
|
|
9
|
+
wrapRef: React.RefObject<any>;
|
|
10
|
+
portalRef?: any;
|
|
11
|
+
autoCloseParent?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const usePopoverOutsideAlerter: ({ wrapRef, portalRef, autoCloseParent, }: UsePopoverOutsideAlerterProps) => void;
|
|
7
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseCreateMetricMutationInputType, UseDeleteDashboardScheduleReportMutationInputType, UseGenerateMetricMutationInputType, UsePreviewTableMutationInputType, UseSaveDashboardLayoutMutationInputType, UseSaveDashboardScheduleReportMutationInputType, UseUpdateAdminMetricMutationInputType, UseUpdateMetricMutationInputType } from '@/types/queryTypes';
|
|
1
|
+
import { UseCreateMetricMutationInputType, UseDatatsetMetricMutationInputType, UseDeleteDashboardScheduleReportMutationInputType, UseGenerateMetricMutationInputType, UsePreviewTableMutationInputType, UseSaveDashboardLayoutMutationInputType, UseSaveDashboardScheduleReportMutationInputType, UseUpdateAdminMetricMutationInputType, UseUpdateMetricMutationInputType } from '@/types/queryTypes';
|
|
2
2
|
export declare const useSaveDashboardLayoutMutation: () => import("react-query").UseMutationResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown, UseSaveDashboardLayoutMutationInputType, unknown>;
|
|
@@ -35,6 +35,12 @@ export declare const useGenerateMetricMutation: () => import("react-query").UseM
|
|
|
35
35
|
data: UseGenerateMetricMutationInputType;
|
|
36
36
|
token: string;
|
|
37
37
|
}, unknown>;
|
|
38
|
+
export declare const useDatasetMetricMutation: () => import("react-query").UseMutationResult<{
|
|
39
|
+
data: unknown;
|
|
40
|
+
}, unknown, {
|
|
41
|
+
data: UseDatatsetMetricMutationInputType;
|
|
42
|
+
token: string;
|
|
43
|
+
}, unknown>;
|
|
38
44
|
export declare const usePreviewTableMutation: () => import("react-query").UseMutationResult<{
|
|
39
45
|
data: unknown;
|
|
40
46
|
}, unknown, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseDashboardDataQueryInputType } from '
|
|
1
|
+
import { UseDashboardDataQueryInputType } from '../types/queryTypes';
|
|
2
2
|
export declare const useDashboardDataQuery: ({ token, dashboardId, }: UseDashboardDataQueryInputType) => import("react-query").UseQueryResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseMetricQueryQueryInputType } from '
|
|
1
|
+
import { UseMetricQueryQueryInputType } from '../types/queryTypes';
|
|
2
2
|
export declare const useMetricDataQuery: (data: UseMetricQueryQueryInputType) => import("react-query").UseQueryResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown>;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -44,9 +44,10 @@ export type LegendSettings = {
|
|
|
44
44
|
left?: number;
|
|
45
45
|
right?: number;
|
|
46
46
|
position?: string;
|
|
47
|
-
truncateLegend?: boolean;
|
|
48
47
|
truncateLegendValue?: number;
|
|
49
48
|
legendShape?: string;
|
|
49
|
+
customise?: boolean;
|
|
50
|
+
fixedPosition?: string;
|
|
50
51
|
};
|
|
51
52
|
export type MarginSettings = {
|
|
52
53
|
marginTop?: number;
|
|
@@ -55,12 +56,16 @@ export type MarginSettings = {
|
|
|
55
56
|
marginRight?: number;
|
|
56
57
|
};
|
|
57
58
|
export type CustomSettings = {
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
hideXSplitLines?: boolean;
|
|
60
|
+
hideYSplitLines?: boolean;
|
|
61
|
+
hideXAxisLines?: boolean;
|
|
62
|
+
hideYAxisLines?: boolean;
|
|
60
63
|
barWidth?: number;
|
|
61
64
|
barRadius?: number[];
|
|
62
65
|
xRotation?: number;
|
|
63
|
-
|
|
66
|
+
customRotation?: number;
|
|
67
|
+
hideXAxisLabels?: boolean;
|
|
68
|
+
hideYAxisLabels?: boolean;
|
|
64
69
|
fontSize?: number;
|
|
65
70
|
subHeaderShow?: boolean;
|
|
66
71
|
comparisonValueShow?: boolean;
|
|
@@ -85,7 +90,7 @@ export type CustomSettings = {
|
|
|
85
90
|
hideNullValues?: boolean;
|
|
86
91
|
chartZoom?: {
|
|
87
92
|
isZoomEnabled?: boolean;
|
|
88
|
-
zoomAxis?:
|
|
93
|
+
zoomAxis?: string;
|
|
89
94
|
zoomOnMouseWheel?: boolean;
|
|
90
95
|
};
|
|
91
96
|
showDynamicBehaviour?: boolean;
|
|
@@ -123,6 +128,33 @@ export type CustomSettings = {
|
|
|
123
128
|
};
|
|
124
129
|
labelPrefix?: string;
|
|
125
130
|
labelSuffix?: string;
|
|
131
|
+
enableTitleDesc?: boolean;
|
|
132
|
+
chartTitle?: string;
|
|
133
|
+
chartDesc?: string;
|
|
134
|
+
titlePosition?: string;
|
|
135
|
+
cumulativeBar?: boolean;
|
|
136
|
+
stepPadding?: number;
|
|
137
|
+
showFunnelShadow?: boolean;
|
|
138
|
+
hideSplitLines?: boolean;
|
|
139
|
+
hideAxisLines?: boolean;
|
|
140
|
+
axisLabels?: boolean;
|
|
141
|
+
isStackBar?: boolean;
|
|
142
|
+
showSelectLegend?: boolean;
|
|
143
|
+
showStackLabels?: boolean;
|
|
144
|
+
coloredBars?: boolean;
|
|
145
|
+
};
|
|
146
|
+
export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert';
|
|
147
|
+
export type IconType = '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';
|
|
148
|
+
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databrick' | 'clickhouse';
|
|
149
|
+
export type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
150
|
+
export type IconConfig = {
|
|
151
|
+
size: IconSizes;
|
|
152
|
+
color: Colors;
|
|
153
|
+
};
|
|
154
|
+
export type IconsProps = {
|
|
155
|
+
name: IconType;
|
|
156
|
+
size?: IconSizes;
|
|
157
|
+
color?: Colors;
|
|
126
158
|
cumulativeBar?: boolean;
|
|
127
159
|
showFunnelShadow?: boolean;
|
|
128
160
|
stepPadding?: number;
|
|
@@ -135,6 +167,7 @@ export type TableSettings = {
|
|
|
135
167
|
contentAlignment?: string;
|
|
136
168
|
lineGap?: string;
|
|
137
169
|
hideVerticalDivider?: boolean;
|
|
170
|
+
hideHorizontalDivider?: boolean;
|
|
138
171
|
badgeColumns?: string[];
|
|
139
172
|
enableStripedRows?: boolean;
|
|
140
173
|
showRowHover?: boolean;
|
|
@@ -148,6 +181,7 @@ export type TableSettings = {
|
|
|
148
181
|
defaultRowSize?: string;
|
|
149
182
|
columnSizing?: ColumnSizingState;
|
|
150
183
|
isServerSidePagination?: boolean;
|
|
184
|
+
isSortAlphabetically?: boolean;
|
|
151
185
|
conditionalFormatting?: {
|
|
152
186
|
columnName: string;
|
|
153
187
|
rules: {
|
|
@@ -164,6 +198,7 @@ export type TableSettings = {
|
|
|
164
198
|
badgeSeparator?: string;
|
|
165
199
|
listColumns?: string[];
|
|
166
200
|
listSeparator?: string;
|
|
201
|
+
stackColAlias?: string;
|
|
167
202
|
};
|
|
168
203
|
export type BackgroundSettings = {
|
|
169
204
|
show?: boolean;
|
|
@@ -204,6 +239,7 @@ export type ChartSettingsType = {
|
|
|
204
239
|
margins?: MarginSettings;
|
|
205
240
|
xAxis?: string;
|
|
206
241
|
yAxisList?: string[];
|
|
242
|
+
chartColors?: string[];
|
|
207
243
|
stackTableCols?: string[];
|
|
208
244
|
step?: string;
|
|
209
245
|
measure?: string;
|
|
@@ -301,8 +337,14 @@ export type DashboardType = {
|
|
|
301
337
|
export type FloatingDropDownOption = {
|
|
302
338
|
key?: string;
|
|
303
339
|
label: string;
|
|
304
|
-
labelType?: string;
|
|
305
340
|
value: string;
|
|
341
|
+
badge?: string;
|
|
342
|
+
subValue?: string;
|
|
343
|
+
icon?: string;
|
|
344
|
+
columnList?: any;
|
|
345
|
+
labelType?: string;
|
|
346
|
+
aggregate?: string;
|
|
347
|
+
alias?: string;
|
|
306
348
|
};
|
|
307
349
|
export type FilterType = {
|
|
308
350
|
tableName: string;
|
|
@@ -327,6 +369,7 @@ export type DateOptionType = {
|
|
|
327
369
|
endDate?: Date;
|
|
328
370
|
startDate?: Date;
|
|
329
371
|
fromDate?: Date;
|
|
372
|
+
timeGrain?: string;
|
|
330
373
|
toDate?: Date;
|
|
331
374
|
minDate?: Date;
|
|
332
375
|
maxDate?: Date;
|
|
@@ -358,6 +401,15 @@ export type RlsCondition = {
|
|
|
358
401
|
variableOptions?: CustomOption[];
|
|
359
402
|
variableStrings?: string[];
|
|
360
403
|
selectedVariableValue?: CustomOption;
|
|
404
|
+
optionColumnName?: string;
|
|
405
|
+
optionTableName?: string;
|
|
406
|
+
filterType?: string;
|
|
407
|
+
applyOnColumns?: {
|
|
408
|
+
columnName: FloatingDropDownOption;
|
|
409
|
+
logicalOperator: FloatingDropDownOption;
|
|
410
|
+
comparisonOperator: FloatingDropDownOption;
|
|
411
|
+
}[];
|
|
412
|
+
comparisonOperator?: FloatingDropDownOption;
|
|
361
413
|
};
|
|
362
414
|
export type MetricData = {
|
|
363
415
|
id: string;
|
|
@@ -399,3 +451,8 @@ export type MetricFilterOptionsType = Record<string, {
|
|
|
399
451
|
options: string[] | number[] | DateTypeOptionType[];
|
|
400
452
|
defaultOption?: string | number;
|
|
401
453
|
}>;
|
|
454
|
+
export type FilterClausesType = (column: string) => {
|
|
455
|
+
as: string;
|
|
456
|
+
columnName: string;
|
|
457
|
+
value: string | string[];
|
|
458
|
+
}[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type UseDragProps = {
|
|
2
|
+
identifier: {
|
|
3
|
+
id: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
};
|
|
6
|
+
data?: any;
|
|
7
|
+
modifiers?: Record<string, any>;
|
|
8
|
+
events?: {
|
|
9
|
+
onDragStart?: (event: DragEvent, data: DndStateProp) => void;
|
|
10
|
+
onDragEnd?: (event: DragEvent, data: DndStateProp) => void;
|
|
11
|
+
};
|
|
12
|
+
CustomDragPreview?: any;
|
|
13
|
+
};
|
|
14
|
+
export type UseDropProps = {
|
|
15
|
+
identifier: {
|
|
16
|
+
id: string;
|
|
17
|
+
accepts?: string[];
|
|
18
|
+
};
|
|
19
|
+
events?: {
|
|
20
|
+
onDragOver?: (event: DragEvent, data: DndStateProp) => void;
|
|
21
|
+
onDragEnter?: (event: DragEvent, data: DndStateProp) => void;
|
|
22
|
+
onDragLeave?: (event: DragEvent, data: DndStateProp) => void;
|
|
23
|
+
onDrop?: (event: DragEvent, data: DndStateProp) => void;
|
|
24
|
+
};
|
|
25
|
+
modifiers?: {
|
|
26
|
+
sorting?: {
|
|
27
|
+
isEnabled: boolean;
|
|
28
|
+
sortingType: 'vertical' | 'horizontal';
|
|
29
|
+
list?: any[];
|
|
30
|
+
setList?: any;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type DndStateProp = {
|
|
35
|
+
active: (UseDragProps & {
|
|
36
|
+
DragNodeRef: any;
|
|
37
|
+
}) | null;
|
|
38
|
+
over: (UseDropProps & {
|
|
39
|
+
setDropNodeRef: any;
|
|
40
|
+
}) | null;
|
|
41
|
+
DragPreviewCreateRoot?: any;
|
|
42
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type EmbeddedMetricCreationProps = {
|
|
|
21
21
|
workspaceId: string;
|
|
22
22
|
};
|
|
23
23
|
export type HeaderProps = {
|
|
24
|
-
|
|
24
|
+
heading: string;
|
|
25
25
|
setShowMetricCreateModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
26
26
|
isDisableSaveBtn: boolean;
|
|
27
27
|
setShowSaveMetricModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -30,7 +30,18 @@ export type DatasetProps = {
|
|
|
30
30
|
setselectTable: React.Dispatch<React.SetStateAction<FloatingDropDownOption>>;
|
|
31
31
|
selectTable: FloatingDropDownOption;
|
|
32
32
|
tableList: FloatingDropDownOption[];
|
|
33
|
-
columnList:
|
|
33
|
+
columnList: FloatingDropDownOption[];
|
|
34
|
+
column: FloatingDropDownOption;
|
|
35
|
+
setColumn: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
36
|
+
onChangeTableSelection: (table: string) => void;
|
|
37
|
+
metrics: {
|
|
38
|
+
value: string;
|
|
39
|
+
label: string;
|
|
40
|
+
}[];
|
|
41
|
+
setMetrics: React.Dispatch<React.SetStateAction<{
|
|
42
|
+
value: string;
|
|
43
|
+
label: string;
|
|
44
|
+
}[]>>;
|
|
34
45
|
};
|
|
35
46
|
export type MetricsValue = {
|
|
36
47
|
value: string;
|
|
@@ -78,11 +89,37 @@ export type MetricOutputProps = {
|
|
|
78
89
|
isEnableGauge: boolean;
|
|
79
90
|
groupbyList: any[];
|
|
80
91
|
hasNumberKeys: boolean;
|
|
92
|
+
metrics: FloatingDropDownOption[];
|
|
93
|
+
dimensions: FloatingDropDownOption[];
|
|
94
|
+
createdCols: FloatingDropDownOption[];
|
|
95
|
+
configuration: DatasetMetricCreationConfiguration;
|
|
96
|
+
setCreatedCols: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
97
|
+
createdMetrics: FloatingDropDownOption[];
|
|
98
|
+
setCreatedMetrics: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
99
|
+
functionOptions: (col: any) => {
|
|
100
|
+
value: string;
|
|
101
|
+
label: string;
|
|
102
|
+
}[];
|
|
103
|
+
onGenerateChart: ({ param, metricParams, dimensionParams, createdDimensionParams, createdMetricParams, }: {
|
|
104
|
+
param?: DatasetMetricCreationConfiguration | undefined;
|
|
105
|
+
metricParams?: FloatingDropDownOption[] | undefined;
|
|
106
|
+
dimensionParams?: FloatingDropDownOption[] | undefined;
|
|
107
|
+
createdMetricParams?: FloatingDropDownOption[] | undefined;
|
|
108
|
+
createdDimensionParams?: FloatingDropDownOption[] | undefined;
|
|
109
|
+
}) => void;
|
|
81
110
|
setQuery?: React.Dispatch<React.SetStateAction<string>>;
|
|
82
111
|
setData?: React.Dispatch<React.SetStateAction<any[] | undefined>>;
|
|
83
112
|
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
84
113
|
setError?: React.Dispatch<React.SetStateAction<string>>;
|
|
114
|
+
isEnableSingleDimension?: boolean;
|
|
115
|
+
isEnableSingleMetrics?: boolean;
|
|
85
116
|
destinationId?: string;
|
|
117
|
+
outputHeaderProps: {
|
|
118
|
+
setShowChartCustomProperties: React.Dispatch<React.SetStateAction<boolean>>;
|
|
119
|
+
setShowChartType: React.Dispatch<React.SetStateAction<boolean>>;
|
|
120
|
+
setShowSortPanel: React.Dispatch<React.SetStateAction<boolean>>;
|
|
121
|
+
setShowFilters: React.Dispatch<React.SetStateAction<boolean>>;
|
|
122
|
+
};
|
|
86
123
|
dbName?: string;
|
|
87
124
|
previewTableDataList: any[] | undefined;
|
|
88
125
|
enableQueryTab?: boolean;
|
|
@@ -98,6 +135,11 @@ export type MetricOutputProps = {
|
|
|
98
135
|
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
99
136
|
isDisableSqlBtn: boolean;
|
|
100
137
|
setShowSqlModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
138
|
+
setMetrics: React.Dispatch<React.SetStateAction<{
|
|
139
|
+
value: string;
|
|
140
|
+
label: string;
|
|
141
|
+
}[]>>;
|
|
142
|
+
setColumn: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
101
143
|
};
|
|
102
144
|
export type CompanyIntegration = {
|
|
103
145
|
id: string;
|
|
@@ -124,4 +166,178 @@ export type DrillDownSetting = {
|
|
|
124
166
|
selectedDimensions: string[];
|
|
125
167
|
isEnableGroupBy: boolean;
|
|
126
168
|
};
|
|
169
|
+
export type ComparisonLagSettings = {
|
|
170
|
+
column: FloatingDropDownOption;
|
|
171
|
+
timeGrain: FloatingDropDownOption;
|
|
172
|
+
periodLag: number;
|
|
173
|
+
};
|
|
174
|
+
export type CreatedNewColumn = {
|
|
175
|
+
columnName: FloatingDropDownOption;
|
|
176
|
+
function: FloatingDropDownOption;
|
|
177
|
+
alias: string;
|
|
178
|
+
};
|
|
179
|
+
export type SelectedJoin = {
|
|
180
|
+
tableName: FloatingDropDownOption;
|
|
181
|
+
conditions: {
|
|
182
|
+
firstOperand: FloatingDropDownOption;
|
|
183
|
+
secondOperand: FloatingDropDownOption;
|
|
184
|
+
operator: FloatingDropDownOption;
|
|
185
|
+
}[];
|
|
186
|
+
joinType: FloatingDropDownOption;
|
|
187
|
+
};
|
|
188
|
+
export type CreateNewFilter = {
|
|
189
|
+
tableName: FloatingDropDownOption;
|
|
190
|
+
columnName: FloatingDropDownOption;
|
|
191
|
+
operator: FloatingDropDownOption;
|
|
192
|
+
value: {
|
|
193
|
+
stringValue?: string;
|
|
194
|
+
numberValue?: number;
|
|
195
|
+
stringArray?: string[];
|
|
196
|
+
numberArray?: number[];
|
|
197
|
+
timeValue?: {
|
|
198
|
+
startDate: string;
|
|
199
|
+
endDate: string;
|
|
200
|
+
timeFilter: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
relationOperator?: FloatingDropDownOption;
|
|
204
|
+
type: 'custom' | 'default' | 'client';
|
|
205
|
+
sql: string;
|
|
206
|
+
name: string;
|
|
207
|
+
isSaved?: boolean;
|
|
208
|
+
};
|
|
209
|
+
export type CreateNewSort = {
|
|
210
|
+
columnName: FloatingDropDownOption;
|
|
211
|
+
method: FloatingDropDownOption;
|
|
212
|
+
tableName: FloatingDropDownOption;
|
|
213
|
+
};
|
|
214
|
+
export type GetFilterDropDownType = ({ datatype, operator, }: {
|
|
215
|
+
datatype: string;
|
|
216
|
+
operator: string;
|
|
217
|
+
}) => 'TIME_FILTER' | 'MULTI_FILTER_DROPDOWN' | 'INPUT_NUMBER_FIELD' | 'FILTER_DROPDOWN';
|
|
218
|
+
export type JoinCondition = {
|
|
219
|
+
firstOperand: {
|
|
220
|
+
parentAlias: string;
|
|
221
|
+
columnName: string;
|
|
222
|
+
};
|
|
223
|
+
secondOperand: {
|
|
224
|
+
parentAlias: string;
|
|
225
|
+
columnName: string;
|
|
226
|
+
};
|
|
227
|
+
operator?: string;
|
|
228
|
+
};
|
|
229
|
+
export type Join = {
|
|
230
|
+
conditions: JoinCondition[];
|
|
231
|
+
name: string;
|
|
232
|
+
alias: string;
|
|
233
|
+
schema: string;
|
|
234
|
+
joinType?: string;
|
|
235
|
+
};
|
|
236
|
+
export type Table = {
|
|
237
|
+
name: string;
|
|
238
|
+
alias: string;
|
|
239
|
+
schema: string;
|
|
240
|
+
id: string;
|
|
241
|
+
joins: Join[];
|
|
242
|
+
};
|
|
243
|
+
export type Aggregate = {
|
|
244
|
+
method: string;
|
|
245
|
+
columnName: string;
|
|
246
|
+
alias: string;
|
|
247
|
+
parentAlias: string;
|
|
248
|
+
type: 'custom' | 'default';
|
|
249
|
+
dataType: string;
|
|
250
|
+
};
|
|
251
|
+
export type Dimension = {
|
|
252
|
+
columnName: string;
|
|
253
|
+
alias: string;
|
|
254
|
+
parentAlias: string;
|
|
255
|
+
timeGrain?: string;
|
|
256
|
+
type: 'custom' | 'default';
|
|
257
|
+
dataType: string;
|
|
258
|
+
helperFunction?: string;
|
|
259
|
+
};
|
|
260
|
+
export type Filter = {
|
|
261
|
+
method: string;
|
|
262
|
+
columnName: string;
|
|
263
|
+
alias: string;
|
|
264
|
+
parentAlias: string;
|
|
265
|
+
value: string | number | string[] | number[] | {
|
|
266
|
+
startDate: string;
|
|
267
|
+
endDate: string;
|
|
268
|
+
timeFilter: string;
|
|
269
|
+
};
|
|
270
|
+
type: 'custom' | 'default' | 'agr' | 'dimension' | 'time' | 'client' | 'rls_filter';
|
|
271
|
+
dataType: string;
|
|
272
|
+
relationOperator?: 'AND' | 'OR';
|
|
273
|
+
};
|
|
274
|
+
export type Order = {
|
|
275
|
+
method: string;
|
|
276
|
+
name: string;
|
|
277
|
+
};
|
|
278
|
+
export type Forcast = {
|
|
279
|
+
isEnable: boolean;
|
|
280
|
+
forecastPeriods: number;
|
|
281
|
+
modelName: string;
|
|
282
|
+
confidenceInterval: number;
|
|
283
|
+
timeColumnName: string;
|
|
284
|
+
measureColumnName: string;
|
|
285
|
+
timeGrain: string;
|
|
286
|
+
yearlySeasonality: boolean;
|
|
287
|
+
weeklySeasonality: boolean;
|
|
288
|
+
dailySeasonality: boolean;
|
|
289
|
+
orderP: number;
|
|
290
|
+
orderD: number;
|
|
291
|
+
orderQ: number;
|
|
292
|
+
trend: {
|
|
293
|
+
value: string;
|
|
294
|
+
label: string;
|
|
295
|
+
};
|
|
296
|
+
growth: string;
|
|
297
|
+
};
|
|
298
|
+
export type GroupByColumn = {
|
|
299
|
+
columnName: string;
|
|
300
|
+
alias: string;
|
|
301
|
+
parentAlias: string;
|
|
302
|
+
timeGrain?: string;
|
|
303
|
+
helperFunction?: string;
|
|
304
|
+
type: 'custom' | 'default';
|
|
305
|
+
dataType: string;
|
|
306
|
+
};
|
|
307
|
+
export type TableType = string;
|
|
308
|
+
export type DatasetMetricCreationConfiguration = {
|
|
309
|
+
table: Table;
|
|
310
|
+
aggregates: Aggregate[];
|
|
311
|
+
dimensions: Dimension[];
|
|
312
|
+
filters: Filter[];
|
|
313
|
+
orders: Order[];
|
|
314
|
+
limit: string;
|
|
315
|
+
isEnableDrill: boolean;
|
|
316
|
+
forecast?: Forcast;
|
|
317
|
+
rlsValues?: Record<string, string | number>;
|
|
318
|
+
groupByColumnList?: GroupByColumn[];
|
|
319
|
+
};
|
|
320
|
+
export type ConfigType = {
|
|
321
|
+
clientId: string;
|
|
322
|
+
companyId: string;
|
|
323
|
+
isLiveMode: boolean;
|
|
324
|
+
externalDashboardId: string;
|
|
325
|
+
userProvidedDashboardId: string;
|
|
326
|
+
chartColors: string[] | undefined;
|
|
327
|
+
isShowMetricCreateModal: boolean;
|
|
328
|
+
setShowMetricCreateModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
329
|
+
metric: ExternalMetrics | undefined;
|
|
330
|
+
metricData: Record<string, any>[] | undefined;
|
|
331
|
+
};
|
|
332
|
+
export type DatasetConfig = {
|
|
333
|
+
clientSubsetData: any;
|
|
334
|
+
clientId: string;
|
|
335
|
+
setError: React.Dispatch<React.SetStateAction<string>>;
|
|
336
|
+
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
337
|
+
setData: React.Dispatch<React.SetStateAction<any[] | undefined>>;
|
|
338
|
+
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
339
|
+
setGroupByList: React.Dispatch<React.SetStateAction<string[]>>;
|
|
340
|
+
chart: string;
|
|
341
|
+
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
342
|
+
};
|
|
127
343
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DatasetMetricCreationConfiguration } from './metricCreate';
|
|
1
2
|
export type UseDashboardDataQueryInputType = {
|
|
2
3
|
token: string;
|
|
3
4
|
dashboardId?: string;
|
|
@@ -60,6 +61,10 @@ export type UseMetricColumnMutationInputType = {
|
|
|
60
61
|
columnName?: string;
|
|
61
62
|
wId?: string;
|
|
62
63
|
filter?: Record<string, any>;
|
|
64
|
+
customTable?: {
|
|
65
|
+
query: string;
|
|
66
|
+
alias: string;
|
|
67
|
+
};
|
|
63
68
|
};
|
|
64
69
|
export type UseMetricUnderlyingDataMutationInputType = {
|
|
65
70
|
columnName?: string;
|
|
@@ -164,6 +169,11 @@ export type UseGenerateMetricMutationInputType = {
|
|
|
164
169
|
integrationName?: string;
|
|
165
170
|
integrationId?: string;
|
|
166
171
|
};
|
|
172
|
+
export type UseDatatsetMetricMutationInputType = {
|
|
173
|
+
cId: string;
|
|
174
|
+
configuration: DatasetMetricCreationConfiguration;
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
167
177
|
export type UseCreateMetricMutationInputType = {
|
|
168
178
|
chartOptions?: any;
|
|
169
179
|
companyId?: string;
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -4,6 +4,5 @@ export type GetChartOptionsParams = {
|
|
|
4
4
|
chartOptions: ChartSettingsType;
|
|
5
5
|
data: Record<string, any>[];
|
|
6
6
|
colors?: string[];
|
|
7
|
-
selectedSeries?: string[];
|
|
8
7
|
};
|
|
9
|
-
export declare const getChartOptions: ({ chartOptions, data, colors,
|
|
8
|
+
export declare const getChartOptions: ({ chartOptions, data, colors, }: GetChartOptionsParams) => Record<string, any>;
|
package/dist/utils/index.d.ts
CHANGED