@databrainhq/plugin 0.13.0-beta.0 → 0.13.0-beta.10
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 +1 -0
- package/dist/components/Alert/index.d.ts +3 -2
- package/dist/components/Chart/index.d.ts +2 -1
- package/dist/components/DraggableItem/index.d.ts +7 -0
- package/dist/components/DrillBreadCrumb/index.d.ts +9 -3
- package/dist/components/ExternalMetricForm/index.d.ts +1 -5
- package/dist/components/FilterDropDown/index.d.ts +8 -4
- package/dist/components/GlobalFilters/Filters.d.ts +3 -1
- package/dist/components/GlobalFilters/HorizontalFilters.d.ts +2 -1
- package/dist/components/GlobalFilters/index.d.ts +3 -1
- package/dist/components/Icons/Logos/index.d.ts +2 -0
- package/dist/components/InputField/index.d.ts +5 -4
- package/dist/components/List/index.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 +4 -2
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +2 -1
- package/dist/components/PopoverMenu/index.d.ts +1 -0
- package/dist/components/Table/index.d.ts +4 -1
- package/dist/components/Tabs/index.d.ts +4 -1
- package/dist/components/TextAreaField/index.d.ts +5 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +2 -0
- package/dist/consts/metricOptions.d.ts +67 -5
- package/dist/containers/Metric/EmbeddedMetric.d.ts +2 -1
- package/dist/containers/Metric/index.d.ts +1 -0
- package/dist/containers/index.d.ts +3 -0
- package/dist/helpers/areArraysEqual.d.ts +1 -0
- package/dist/helpers/generateTimeRangeWhereClause.d.ts +3 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useDatasetMetric.d.ts +50 -0
- package/dist/hooks/useDrag.d.ts +10 -0
- package/dist/hooks/useDragAndDropState.d.ts +10 -0
- package/dist/hooks/useDrop.d.ts +13 -0
- package/dist/hooks/useMetricCard.d.ts +10 -1
- package/dist/hooks/useMetricConfig.d.ts +57 -0
- package/dist/index.d.ts +7 -0
- package/dist/queries/externalDashboard.mutation.d.ts +7 -1
- package/dist/queries/metric.mutation.d.ts +1 -1
- package/dist/types/app.d.ts +31 -6
- package/dist/types/dragAndDropProps.d.ts +59 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/metricCreate.d.ts +213 -2
- package/dist/types/queryTypes.d.ts +10 -0
- package/dist/utils/getChartAttributes.d.ts +2 -1
- package/dist/webcomponents.es.js +61811 -53334
- package/dist/webcomponents.umd.js +211 -211
- package/package.json +1 -1
- package/dist/components/InternetFailure/index.d.ts +0 -2
- package/dist/utils/checkIsOnline.d.ts +0 -2
|
@@ -11,6 +11,7 @@ type AccordionProps = {
|
|
|
11
11
|
export declare const Accordion: React.FC<AccordionProps>;
|
|
12
12
|
type AccordionV2Props = {
|
|
13
13
|
footer?: React.ReactNode;
|
|
14
|
+
isEnableEditBtn?: boolean;
|
|
14
15
|
editBtnOnClick?: () => void;
|
|
15
16
|
} & AccordionProps;
|
|
16
17
|
export declare const AccordionV2: React.FC<AccordionV2Props>;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export type AlertProps = {
|
|
3
3
|
text: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
variant?: 'primary' | 'warning' | 'error' | 'success';
|
|
5
|
+
variant?: 'primary' | 'warning' | 'error' | 'success' | 'info';
|
|
6
|
+
hideInfoIcon?: boolean;
|
|
6
7
|
};
|
|
7
|
-
export declare const Alert: ({ variant, text, children }: AlertProps) => React.JSX.Element;
|
|
8
|
+
export declare const Alert: ({ variant, text, children, hideInfoIcon, }: AlertProps) => React.JSX.Element;
|
|
@@ -8,6 +8,7 @@ export type ChartProps = {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
colors?: string[];
|
|
10
10
|
isShowFullScreen?: boolean;
|
|
11
|
+
isShowFullScreenEnabled?: boolean;
|
|
11
12
|
filterValues?: Record<string, any>;
|
|
12
13
|
onMaximize?: () => void;
|
|
13
14
|
};
|
|
@@ -21,4 +22,4 @@ export type ChartProps = {
|
|
|
21
22
|
* @prop colors (optional) - the admin provided chart color palettes.
|
|
22
23
|
* @returns JSX - chart visaulization content.
|
|
23
24
|
*/
|
|
24
|
-
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, onMaximize, }: ChartProps) => React.JSX.Element>;
|
|
25
|
+
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, onMaximize, }: ChartProps) => React.JSX.Element>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UseDragProps } from '@/types';
|
|
3
|
+
type DraggableItemProps = UseDragProps & {
|
|
4
|
+
renderItem: (DragNodeRef: React.MutableRefObject<any>, isDragging?: boolean) => JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export declare const DraggableItem: React.FC<DraggableItemProps>;
|
|
7
|
+
export {};
|
|
@@ -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,15 +1,11 @@
|
|
|
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;
|
|
8
|
+
isCreatingMetric?: boolean;
|
|
13
9
|
};
|
|
14
10
|
export declare const ExternalMetricForm: React.FC<ExternalMetricProps>;
|
|
15
11
|
export {};
|
|
@@ -8,13 +8,17 @@ export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'> & {
|
|
|
8
8
|
workspaceId: string;
|
|
9
9
|
filterClause?: {
|
|
10
10
|
columnName?: string;
|
|
11
|
-
value?: string;
|
|
11
|
+
value?: string | string[];
|
|
12
12
|
as?: string;
|
|
13
|
-
};
|
|
13
|
+
}[];
|
|
14
14
|
isDisableLabel?: boolean;
|
|
15
|
+
customTable?: {
|
|
16
|
+
query: string;
|
|
17
|
+
alias: string;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
16
|
-
export declare const FilterDropDown: ({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, ...rest }: FilterDropDownProps) => React.JSX.Element;
|
|
17
|
-
export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'filter' | 'label' | 'workspaceId' | 'filterClause'> & Omit<MultiSelectDropdownProps, 'options'> & {
|
|
20
|
+
export declare const FilterDropDown: ({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, customTable, ...rest }: FilterDropDownProps) => React.JSX.Element;
|
|
21
|
+
export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'filter' | 'label' | 'workspaceId' | 'filterClause' | 'customTable'> & Omit<MultiSelectDropdownProps, 'options'> & {
|
|
18
22
|
isDisablelabel?: boolean;
|
|
19
23
|
};
|
|
20
24
|
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FilterFieldType } from '@/components';
|
|
3
|
-
import { FilterType, FloatingDropDownOption } from '@/types/app';
|
|
3
|
+
import { FilterClausesType, FilterType, FloatingDropDownOption } from '@/types/app';
|
|
4
4
|
export type FilterColumn = {
|
|
5
5
|
as: string;
|
|
6
6
|
dataType: string;
|
|
@@ -14,6 +14,7 @@ export type FilterColumn = {
|
|
|
14
14
|
clientColumnType?: string;
|
|
15
15
|
isManualOptions?: boolean;
|
|
16
16
|
manualOptions?: string[];
|
|
17
|
+
dependOn?: FloatingDropDownOption[];
|
|
17
18
|
};
|
|
18
19
|
type FiltersProps = {
|
|
19
20
|
filterList: FilterColumn[];
|
|
@@ -26,6 +27,7 @@ type FiltersProps = {
|
|
|
26
27
|
workspaceId: string;
|
|
27
28
|
};
|
|
28
29
|
clientId?: string;
|
|
30
|
+
filterClauses: FilterClausesType;
|
|
29
31
|
};
|
|
30
32
|
export declare const Filters: React.FC<FiltersProps>;
|
|
31
33
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FilterType } from '@/types/app';
|
|
2
|
+
import { FilterClausesType, FilterType } from '@/types/app';
|
|
3
3
|
import { FilterFieldType } from '@/components';
|
|
4
4
|
type HorizontalFiltersProps = {
|
|
5
5
|
appliedfilters: FilterFieldType[];
|
|
@@ -10,6 +10,7 @@ type HorizontalFiltersProps = {
|
|
|
10
10
|
workspaceId: string;
|
|
11
11
|
};
|
|
12
12
|
clientId?: string;
|
|
13
|
+
filterClauses: FilterClausesType;
|
|
13
14
|
};
|
|
14
15
|
export declare const HorizontalFilters: React.FC<HorizontalFiltersProps>;
|
|
15
16
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FilterColumn } from './Filters';
|
|
3
3
|
import { FilterFieldType, MetricCardProps } from '@/components';
|
|
4
|
-
import { FilterType } from '@/types/app';
|
|
4
|
+
import { FilterClausesType, FilterType } from '@/types/app';
|
|
5
5
|
type GlobalFiltersProps = {
|
|
6
6
|
filters: FilterType[];
|
|
7
7
|
onApply: (filters: MetricCardProps['globalFilters']) => void;
|
|
@@ -11,6 +11,7 @@ type GlobalFiltersProps = {
|
|
|
11
11
|
workspaceId: string;
|
|
12
12
|
};
|
|
13
13
|
clientId?: string;
|
|
14
|
+
globalFilters?: MetricCardProps['globalFilters'];
|
|
14
15
|
};
|
|
15
16
|
export declare const getFormattedFilterValue: (obj: {
|
|
16
17
|
operator: string;
|
|
@@ -32,6 +33,7 @@ type FilterPopupProps = {
|
|
|
32
33
|
workspaceId: string;
|
|
33
34
|
};
|
|
34
35
|
clientId?: string;
|
|
36
|
+
filterClauses: FilterClausesType;
|
|
35
37
|
};
|
|
36
38
|
export declare const FilterPopup: React.FC<FilterPopupProps>;
|
|
37
39
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
1
|
+
import { FieldError, FieldErrorsImpl, Merge, UseFormRegisterReturn } from 'react-hook-form';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
4
4
|
label?: string;
|
|
@@ -6,10 +6,11 @@ interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
8
|
elementRef?: React.Ref<HTMLInputElement>;
|
|
9
|
-
supportingText?:
|
|
10
|
-
error?: any;
|
|
9
|
+
supportingText?: string | undefined;
|
|
10
|
+
error?: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
|
|
11
11
|
leftIcon?: JSX.Element;
|
|
12
12
|
rightIcon?: JSX.Element;
|
|
13
|
+
labelVariant?: 'floating' | 'static';
|
|
13
14
|
}
|
|
14
|
-
export declare const InputField: ({ type, register, label, isDisabled, id, elementRef, error, supportingText, leftIcon, rightIcon, ...rest }: Props) => React.JSX.Element;
|
|
15
|
+
export declare const InputField: ({ type, register, label, isDisabled, id, elementRef, error, supportingText, leftIcon, rightIcon, labelVariant, ...rest }: Props) => React.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -15,5 +15,6 @@ export type ListProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
initialLimit?: number;
|
|
17
17
|
isDataLoading?: boolean;
|
|
18
|
+
showLogo?: boolean;
|
|
18
19
|
};
|
|
19
|
-
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, }: ListProps) => React.JSX.Element;
|
|
20
|
+
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, }: ListProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DatasetProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const Dataset: ({ setselectTable, selectTable, tableList, columnList, }: DatasetProps) => React.JSX.Element;
|
|
3
|
+
export declare const Dataset: ({ setselectTable, selectTable, tableList, columnList, onChangeTableSelection, }: DatasetProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HeaderProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const Header: ({ setShowMetricCreateModal, isDisableSaveBtn,
|
|
3
|
+
export declare const Header: ({ setShowMetricCreateModal, isDisableSaveBtn, heading, setShowSaveMetricModal, }: HeaderProps) => React.JSX.Element;
|
|
@@ -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, }: 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, createdCols, setCreatedCols, createdMetrics, setCreatedMetrics, configuration, }: MetricOutputProps) => React.JSX.Element;
|
package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ type Props = {
|
|
|
14
14
|
groupbyList: any[];
|
|
15
15
|
hasNumberKeys: boolean;
|
|
16
16
|
isEnableGauge: boolean;
|
|
17
|
+
error: string;
|
|
17
18
|
};
|
|
18
|
-
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, }: Props) => React.JSX.Element;
|
|
19
|
+
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, error, }: Props) => React.JSX.Element;
|
|
19
20
|
export {};
|
package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type Props = {
|
|
3
|
-
previewTableDataList: any[] | undefined;
|
|
4
3
|
outpuTableData: any[] | undefined;
|
|
5
4
|
isOutputLoading: boolean;
|
|
6
5
|
outputError: string;
|
|
@@ -8,5 +7,5 @@ type Props = {
|
|
|
8
7
|
isDisableSqlBtn: boolean;
|
|
9
8
|
setShowSqlModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
9
|
};
|
|
11
|
-
export declare const TableTab: ({ outpuTableData, outputError, isOutputLoading,
|
|
10
|
+
export declare const TableTab: ({ outpuTableData, outputError, isOutputLoading, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, }: Props) => React.JSX.Element;
|
|
12
11
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChartSettingsType } from '@/types';
|
|
3
|
+
import { ComparisonLagProps } from '@/components/ChartSettingsPopup';
|
|
4
|
+
type Props = {
|
|
5
|
+
chartSettings: ChartSettingsType;
|
|
6
|
+
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
setBarRadius: React.Dispatch<React.SetStateAction<{
|
|
10
|
+
topRadius: number;
|
|
11
|
+
bottomRadius: number;
|
|
12
|
+
}>>;
|
|
13
|
+
comparisonLagProps?: ComparisonLagProps | undefined;
|
|
14
|
+
};
|
|
15
|
+
declare const ChartAppearancePanel: ({ ChartAppearancePanelProps: { chartSettings, isOpen, onClose, setChartSettings, setBarRadius, comparisonLagProps, }, }: {
|
|
16
|
+
ChartAppearancePanelProps: Props;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default ChartAppearancePanel;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import ReactAce from 'react-ace/lib/ace';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CreateNewFilter, FloatingDropDownOption, GetFilterDropDownType } from '@/types';
|
|
4
|
+
type Props = {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
filters: CreateNewFilter[];
|
|
8
|
+
setCreatedFilters: React.Dispatch<React.SetStateAction<CreateNewFilter[]>>;
|
|
9
|
+
columnOptions: FloatingDropDownOption[];
|
|
10
|
+
getFilterDropDownType: GetFilterDropDownType;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
editorRef: React.RefObject<ReactAce>;
|
|
13
|
+
onApplyFilter: (onComplete: () => void, isClear?: boolean, index?: number) => void;
|
|
14
|
+
savedFilterListOptions: FloatingDropDownOption[];
|
|
15
|
+
currentSelectedTable: FloatingDropDownOption;
|
|
16
|
+
};
|
|
17
|
+
declare const FiltersPanel: ({ filtersPanelProps: { isOpen, onClose, filters, setCreatedFilters, columnOptions, getFilterDropDownType, editorRef, workspaceId, onApplyFilter, savedFilterListOptions, currentSelectedTable, }, }: {
|
|
18
|
+
filtersPanelProps: Props;
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
export default FiltersPanel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CreateNewSort, FloatingDropDownOption } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
createdSorts: CreateNewSort[];
|
|
7
|
+
setCreatedSorts: React.Dispatch<React.SetStateAction<CreateNewSort[]>>;
|
|
8
|
+
columnOptions: FloatingDropDownOption[];
|
|
9
|
+
onApplySort: (onComplete: () => void, isClear?: boolean, index?: number) => void;
|
|
10
|
+
selectedTable: FloatingDropDownOption;
|
|
11
|
+
};
|
|
12
|
+
declare const SortPanel: ({ SortPanelProps: { isOpen, onClose, createdSorts, setCreatedSorts, columnOptions, onApplySort, selectedTable, }, }: {
|
|
13
|
+
SortPanelProps: Props;
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
|
+
export default SortPanel;
|
|
@@ -6,6 +6,8 @@ type Props = {
|
|
|
6
6
|
workspaceId: string;
|
|
7
7
|
clientId?: string;
|
|
8
8
|
className?: string;
|
|
9
|
+
rlsConditionList: RlsCondition[];
|
|
9
10
|
};
|
|
10
|
-
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, }: Props) => React.JSX.Element;
|
|
11
|
-
|
|
11
|
+
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, }: Props) => React.JSX.Element;
|
|
12
|
+
declare const _default: React.MemoExoticComponent<({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, }: Props) => React.JSX.Element>;
|
|
13
|
+
export default _default;
|
|
@@ -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;
|
|
@@ -24,8 +24,11 @@ type Props = {
|
|
|
24
24
|
onLoadMore?: () => void;
|
|
25
25
|
hasMoreData?: boolean;
|
|
26
26
|
isShowFullScreen?: boolean;
|
|
27
|
+
isShowFullScreenEnabled?: boolean;
|
|
27
28
|
filterValues?: Record<string, any>;
|
|
28
29
|
onMaximize?: () => void;
|
|
30
|
+
headerAlignment?: 'left' | 'center' | 'right';
|
|
31
|
+
events?: Record<string, Function>;
|
|
29
32
|
};
|
|
30
|
-
export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, onMaximize, }: 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;
|
|
31
34
|
export {};
|
|
@@ -2,13 +2,15 @@ import React from 'react';
|
|
|
2
2
|
type TabsContextType = [
|
|
3
3
|
activeTab: string | number,
|
|
4
4
|
setActiveTab: React.Dispatch<React.SetStateAction<string | number>>,
|
|
5
|
-
variant: 'primary' | 'popoverTabs'
|
|
5
|
+
variant: 'primary' | 'popoverTabs',
|
|
6
|
+
setTab?: React.Dispatch<React.SetStateAction<string | number>>
|
|
6
7
|
];
|
|
7
8
|
export declare const TabsContext: React.Context<[] | TabsContextType>;
|
|
8
9
|
type TabsProps = {
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
variant?: 'primary' | 'popoverTabs';
|
|
11
12
|
defaultActiveTab?: string | number;
|
|
13
|
+
setTab?: React.Dispatch<React.SetStateAction<string | number>>;
|
|
12
14
|
width?: string;
|
|
13
15
|
};
|
|
14
16
|
type TabProps = {
|
|
@@ -25,6 +27,7 @@ export declare const Tabs: {
|
|
|
25
27
|
width?: string | undefined;
|
|
26
28
|
background?: string | undefined;
|
|
27
29
|
className?: string | undefined;
|
|
30
|
+
headerButton?: React.ReactNode;
|
|
28
31
|
}>;
|
|
29
32
|
Tab: React.FC<TabProps>;
|
|
30
33
|
Panel: React.FC<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
3
|
-
interface Props {
|
|
3
|
+
interface Props extends React.HTMLProps<HTMLTextAreaElement> {
|
|
4
4
|
id: string;
|
|
5
5
|
label: string;
|
|
6
6
|
placeholder?: string;
|
|
@@ -14,6 +14,9 @@ interface Props {
|
|
|
14
14
|
onFocus?: any;
|
|
15
15
|
onBlur?: any;
|
|
16
16
|
className?: string;
|
|
17
|
+
leftIcon?: JSX.Element;
|
|
18
|
+
rightIcon?: JSX.Element;
|
|
19
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
17
20
|
}
|
|
18
|
-
export declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, }: Props) => React.JSX.Element;
|
|
21
|
+
export declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, leftIcon, rightIcon, ...rest }: Props) => React.JSX.Element;
|
|
19
22
|
export {};
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare const DASHBOARD_UPDATE_ADMIN_METRIC_PATH: string;
|
|
|
21
21
|
export declare const DASHBOARD_UPDATE_ADMIN_METRIC_MUTATION = "updateAdminMetric";
|
|
22
22
|
export declare const DASHBOARD_GENERATE_METRIC_PATH: string;
|
|
23
23
|
export declare const DASHBOARD_GENERATE_METRIC_MUTATION = "generateMetric";
|
|
24
|
+
export declare const DASHBOARD_DATASET_METRIC_PATH: string;
|
|
25
|
+
export declare const DASHBOARD_DATASET_METRIC_MUTATION = "datasetMetricCreation";
|
|
24
26
|
export declare const DASHBOARD_PREVIEW_TABLE_PATH: string;
|
|
25
27
|
export declare const DASHBOARD_PREVIEW_TABLE_MUTATION = "previewTable";
|
|
26
28
|
export declare const METRIC_QUERY_PATH: string;
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const CHART_TYPES: {
|
|
|
9
9
|
scatter: string;
|
|
10
10
|
row: string;
|
|
11
11
|
area: string;
|
|
12
|
+
stackedArea: string;
|
|
12
13
|
combo: string;
|
|
13
14
|
pie: string;
|
|
14
15
|
doughnut: string;
|
|
@@ -85,3 +86,4 @@ export declare const NUMBER_FORMAT: {
|
|
|
85
86
|
label: string;
|
|
86
87
|
value: string;
|
|
87
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"];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { ChartSettingsType } from '@/types';
|
|
2
|
-
export declare const operatorList: {
|
|
3
|
-
value: string;
|
|
4
|
-
label: string;
|
|
5
|
-
}[];
|
|
1
|
+
import { ChartSettingsType, DatasetMetricCreationConfiguration } from '@/types';
|
|
6
2
|
export declare const RowLimitList: {
|
|
7
3
|
value: string;
|
|
8
4
|
label: string;
|
|
@@ -30,3 +26,69 @@ export declare const TIME_GRAIN_OPTIONS: {
|
|
|
30
26
|
value: string;
|
|
31
27
|
label: string;
|
|
32
28
|
}[];
|
|
29
|
+
export declare const DEFAULT_FORECAST_VALUES: {
|
|
30
|
+
isEnable: boolean;
|
|
31
|
+
forecastPeriods: number;
|
|
32
|
+
modelName: string;
|
|
33
|
+
confidenceInterval: number;
|
|
34
|
+
timeColumnName: string;
|
|
35
|
+
measureColumnName: string;
|
|
36
|
+
timeGrain: string;
|
|
37
|
+
yearlySeasonality: boolean;
|
|
38
|
+
weeklySeasonality: boolean;
|
|
39
|
+
dailySeasonality: boolean;
|
|
40
|
+
orderP: number;
|
|
41
|
+
orderD: number;
|
|
42
|
+
orderQ: number;
|
|
43
|
+
trend: {
|
|
44
|
+
value: string;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
growth: string;
|
|
48
|
+
};
|
|
49
|
+
export declare const DEFAULT_CREATE_DATSET_METRIC_CONFIG: DatasetMetricCreationConfiguration;
|
|
50
|
+
export declare const SORT_TYPE: {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
export declare const operatorList: {
|
|
55
|
+
value: string;
|
|
56
|
+
label: string;
|
|
57
|
+
}[];
|
|
58
|
+
export declare const RELATION_OPERATOR_LIST: {
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
}[];
|
|
62
|
+
export declare const STRING_OPERATOR_LIST: {
|
|
63
|
+
value: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
export declare const NUMBER_OPERATOR_LIST: {
|
|
67
|
+
value: string;
|
|
68
|
+
label: string;
|
|
69
|
+
}[];
|
|
70
|
+
export declare const TIME_OPERATOR_LIST: {
|
|
71
|
+
value: string;
|
|
72
|
+
label: string;
|
|
73
|
+
}[];
|
|
74
|
+
export declare const DATASET_TIME_HELPER_FUNCTIONS: {
|
|
75
|
+
value: string;
|
|
76
|
+
label: string;
|
|
77
|
+
}[];
|
|
78
|
+
export declare const DATASET_STRING_HELPER_FUNCTIONS: {
|
|
79
|
+
value: string;
|
|
80
|
+
label: string;
|
|
81
|
+
}[];
|
|
82
|
+
export declare const DATASET_NUMBER_HELPER_FUNCTIONS: {
|
|
83
|
+
value: string;
|
|
84
|
+
label: string;
|
|
85
|
+
}[];
|
|
86
|
+
export declare const aggregateStrings: string[];
|
|
87
|
+
export declare const DATASET_OTHER_HELPER_FUNCTIONS: {
|
|
88
|
+
value: string;
|
|
89
|
+
label: string;
|
|
90
|
+
}[];
|
|
91
|
+
export declare const DATASET_NUM_HELPER_FUNCTIONS: {
|
|
92
|
+
value: string;
|
|
93
|
+
label: string;
|
|
94
|
+
}[];
|
|
@@ -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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const areArraysEqual: (arr1: any, arr2: any) => any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
export declare const isValidDate: (date: any) => boolean;
|
|
2
|
+
declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, timeCount, timeGrain, timeRangeIndicator, databaseType, endDate, startDate, comparsionOperator, }: {
|
|
2
3
|
timeColumnName: string;
|
|
3
4
|
timeRangeIndicator: string;
|
|
4
5
|
timeCount: number;
|
|
@@ -7,5 +8,6 @@ declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, tim
|
|
|
7
8
|
startDate?: Date | undefined;
|
|
8
9
|
endDate?: Date | undefined;
|
|
9
10
|
databaseType?: string | undefined;
|
|
11
|
+
comparsionOperator?: string | undefined;
|
|
10
12
|
}) => string;
|
|
11
13
|
export default generateTimeRangeWhereClause;
|
package/dist/helpers/index.d.ts
CHANGED
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import ReactAce from 'react-ace/lib/ace';
|
|
3
|
+
import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, TableType } from '@/types';
|
|
4
|
+
declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
|
|
5
|
+
configuration: DatasetMetricCreationConfiguration;
|
|
6
|
+
setConfiguration: import("react").Dispatch<import("react").SetStateAction<DatasetMetricCreationConfiguration>>;
|
|
7
|
+
selectedDimensions: FloatingDropDownOption[];
|
|
8
|
+
setSelectedDimensions: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
|
|
9
|
+
metrics: FloatingDropDownOption[];
|
|
10
|
+
setMetrics: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
|
|
11
|
+
columnList: FloatingDropDownOption[];
|
|
12
|
+
onChangeTableSelection: (table: TableType) => void;
|
|
13
|
+
tableList: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
onGenerateChart: ({ param, metricParams, dimensionParams, createdDimensionParams, createdMetricParams, }: {
|
|
18
|
+
param?: DatasetMetricCreationConfiguration | undefined;
|
|
19
|
+
metricParams?: FloatingDropDownOption[] | undefined;
|
|
20
|
+
dimensionParams?: FloatingDropDownOption[] | undefined;
|
|
21
|
+
createdMetricParams?: FloatingDropDownOption[] | undefined;
|
|
22
|
+
createdDimensionParams?: FloatingDropDownOption[] | undefined;
|
|
23
|
+
}) => void;
|
|
24
|
+
createdSorts: CreateNewSort[];
|
|
25
|
+
setCreatedSorts: import("react").Dispatch<import("react").SetStateAction<CreateNewSort[]>>;
|
|
26
|
+
onApplySort: (onComplete: () => void, isClear?: boolean, index?: number) => void;
|
|
27
|
+
createdFilters: CreateNewFilter[];
|
|
28
|
+
setCreatedFilters: import("react").Dispatch<import("react").SetStateAction<CreateNewFilter[]>>;
|
|
29
|
+
getFilterDropDownType: ({ datatype, operator, }: {
|
|
30
|
+
datatype: string;
|
|
31
|
+
operator: string;
|
|
32
|
+
}) => "TIME_FILTER" | "MULTI_FILTER_DROPDOWN" | "INPUT_NUMBER_FIELD" | "FILTER_DROPDOWN";
|
|
33
|
+
workspaceId: any;
|
|
34
|
+
editorRef: import("react").RefObject<ReactAce>;
|
|
35
|
+
savedFilterListOptions: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
key: string;
|
|
39
|
+
}[];
|
|
40
|
+
onApplyFilter: (onComplete: () => void, isClear?: boolean, index?: number) => void;
|
|
41
|
+
functionOptions: (col: any) => {
|
|
42
|
+
value: string;
|
|
43
|
+
label: string;
|
|
44
|
+
}[];
|
|
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
|
+
};
|
|
50
|
+
export default useDatasetMetric;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UseDragProps } from '@/types';
|
|
3
|
+
declare const useDrag: ({ identifier, data, modifiers, events, CustomDragPreview, }: UseDragProps) => {
|
|
4
|
+
isDragging: boolean;
|
|
5
|
+
isEnableDrag: boolean;
|
|
6
|
+
setIsEnableDrag: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
7
|
+
DragNodeRef: import("react").MutableRefObject<any>;
|
|
8
|
+
};
|
|
9
|
+
export default useDrag;
|
|
10
|
+
export { useDrag };
|