@databrainhq/plugin 0.12.32 → 0.13.0-beta.0
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 +27 -0
- 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 +10 -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/DrillBreadCrumb/index.d.ts +3 -1
- package/dist/components/FilterDropDown/index.d.ts +8 -4
- 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 +1 -1
- package/dist/components/GlobalFilters/HorizontalFilters.d.ts +1 -1
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +3 -1
- package/dist/components/GlobalFilters/index.d.ts +1 -2
- package/dist/components/Icons/Logos/index.d.ts +12 -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 +5 -6
- package/dist/components/List/index.d.ts +19 -0
- package/dist/components/Menu/index.d.ts +30 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +2 -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 +4 -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/app.d.ts +4 -0
- package/dist/consts/metricOptions.d.ts +4 -0
- package/dist/helpers/checkIsElementInViewport.d.ts +1 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/timeseries.d.ts +2 -2
- package/dist/hooks/useMetricCard.d.ts +9 -7
- package/dist/hooks/useOutsideAlerter.d.ts +8 -1
- package/dist/queries/externalDashboard.mutation.d.ts +1 -1
- package/dist/queries/externalDashboard.query.d.ts +1 -1
- package/dist/queries/metric.mutation.d.ts +1 -1
- package/dist/queries/metric.query.d.ts +1 -1
- package/dist/types/app.d.ts +46 -6
- package/dist/types/metricCreate.d.ts +5 -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 +84984 -91456
- package/dist/webcomponents.umd.js +270 -344
- 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
- package/dist/containers/index.d.ts +0 -3
- package/dist/index.d.ts +0 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type AccordionProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
width?: string;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
badge?: React.ReactNode;
|
|
8
|
+
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
headerButton?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
12
|
+
type AccordionV2Props = {
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
editBtnOnClick?: () => void;
|
|
15
|
+
} & AccordionProps;
|
|
16
|
+
export declare const AccordionV2: React.FC<AccordionV2Props>;
|
|
17
|
+
type AccordionV3Props = {
|
|
18
|
+
header?: React.ReactNode;
|
|
19
|
+
footer?: React.ReactNode;
|
|
20
|
+
content: React.ReactNode;
|
|
21
|
+
headerButton?: React.ReactNode;
|
|
22
|
+
isOpen?: boolean;
|
|
23
|
+
width?: string;
|
|
24
|
+
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
25
|
+
};
|
|
26
|
+
export declare const AccordionV3: ({ content, footer, header, isOpen, width, setIsOpen, headerButton, }: AccordionV3Props) => React.JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
label: string | number;
|
|
4
|
+
varaint?: 'warning' | 'success' | 'danger' | 'primary' | 'secondary' | 'info';
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const Badge: React.FC<Props>;
|
|
9
|
+
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
|
-
variant: 'primary' | 'secondary' | '
|
|
5
|
-
|
|
4
|
+
variant: 'primary' | 'secondary' | 'tertiary' | 'tab' | 'popover';
|
|
5
|
+
leftIcon?: JSX.Element;
|
|
6
|
+
rightIcon?: JSX.Element;
|
|
7
|
+
fitContainer?: boolean;
|
|
6
8
|
}
|
|
7
|
-
|
|
9
|
+
/** A basic button. Any props that are not explicitly called out below will be passed through to the native Button component. */
|
|
10
|
+
export declare const Button: ({ isDisabled, type, children, variant, onClick, title, leftIcon, rightIcon, fitContainer, className, ...props }: Props) => React.JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -21,7 +21,7 @@ export type SingleValueChartProps = {
|
|
|
21
21
|
onChartReady?: () => void;
|
|
22
22
|
comparisonValue?: string;
|
|
23
23
|
trendLineOptions?: any;
|
|
24
|
-
events
|
|
24
|
+
events?: any;
|
|
25
25
|
};
|
|
26
26
|
declare const _default: React.MemoExoticComponent<({ value, settings, chartClickConfig, hideBorder, className, onChartReady, comparisonValue, trendLineOptions, events, }: SingleValueChartProps) => React.JSX.Element>;
|
|
27
27
|
export default _default;
|
|
@@ -7,7 +7,9 @@ export type ChartProps = {
|
|
|
7
7
|
config?: Record<string, any>;
|
|
8
8
|
className?: string;
|
|
9
9
|
colors?: string[];
|
|
10
|
-
|
|
10
|
+
isShowFullScreen?: boolean;
|
|
11
|
+
filterValues?: Record<string, any>;
|
|
12
|
+
onMaximize?: () => void;
|
|
11
13
|
};
|
|
12
14
|
/**
|
|
13
15
|
* @name Chart - The metric visualization component.
|
|
@@ -19,4 +21,4 @@ export type ChartProps = {
|
|
|
19
21
|
* @prop colors (optional) - the admin provided chart color palettes.
|
|
20
22
|
* @returns JSX - chart visaulization content.
|
|
21
23
|
*/
|
|
22
|
-
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className,
|
|
24
|
+
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, onMaximize, }: ChartProps) => React.JSX.Element>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChartSettingsType } from '@/types';
|
|
3
|
-
|
|
4
|
-
export type ChartSettingsPopupProps = Partial<Pick<PopoverMenuProps, 'buttonClass' | 'menuClass' | 'menuContainerClass' | 'position' | 'className'>> & {
|
|
3
|
+
export type ChartSettingsPopupProps = {
|
|
5
4
|
data?: Record<string, any>[];
|
|
6
5
|
settings: ChartSettingsType;
|
|
7
6
|
setSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
@@ -11,4 +10,4 @@ export type ChartSettingsPopupProps = Partial<Pick<PopoverMenuProps, 'buttonClas
|
|
|
11
10
|
isEnableGauge: boolean;
|
|
12
11
|
isShowChartConfigTab?: boolean;
|
|
13
12
|
};
|
|
14
|
-
export declare const ChartSettingsPopup: ({ data, settings, setSettings,
|
|
13
|
+
export declare const ChartSettingsPopup: ({ data, settings, setSettings, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, isShowChartConfigTab, }: ChartSettingsPopupProps) => React.JSX.Element;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types/app';
|
|
2
|
+
import { ChartSettingsType, FloatingDropDownOption } from '@/types/app';
|
|
3
|
+
import { ComparisonLagSettings } from '@/types';
|
|
4
|
+
export type ComparisonLagProps = {
|
|
5
|
+
setComparisonLagSettings: React.Dispatch<React.SetStateAction<ComparisonLagSettings>>;
|
|
6
|
+
comparisonLagSettings: ComparisonLagSettings;
|
|
7
|
+
dateTimeColumnList: FloatingDropDownOption[];
|
|
8
|
+
onSaveComparisonLag: () => void;
|
|
9
|
+
} | undefined;
|
|
3
10
|
type Props = {
|
|
4
11
|
chartSettings: ChartSettingsType;
|
|
5
12
|
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
@@ -7,7 +14,7 @@ type Props = {
|
|
|
7
14
|
topRadius: number;
|
|
8
15
|
bottomRadius: number;
|
|
9
16
|
}>>;
|
|
10
|
-
|
|
17
|
+
comparisonLagProps?: ComparisonLagProps;
|
|
11
18
|
};
|
|
12
|
-
export declare const ChartConfigure: ({ chartSettings, setChartSettings, setBarRadius,
|
|
19
|
+
export declare const ChartConfigure: ({ chartSettings, setChartSettings, setBarRadius, comparisonLagProps, }: Props) => React.JSX.Element;
|
|
13
20
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CHART_TYPES } from '@/consts';
|
|
3
|
+
type ChartType = keyof typeof CHART_TYPES;
|
|
4
|
+
type Props = {
|
|
5
|
+
onChartChange: (chartType: ChartType) => void;
|
|
6
|
+
selectedChart: ChartType;
|
|
7
|
+
enabledCharts: string[];
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const ChartTypePanel: ({ chartTypePanelProps: { onChartChange, enabledCharts, selectedChart, isOpen, onClose, zIndex, }, }: {
|
|
13
|
+
chartTypePanelProps: Props;
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
register?: UseFormRegisterReturn;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Checkbox: ({ register, label, isDisabled, id, checked, ...rest }: Props) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
declare const ColorField: React.
|
|
12
|
-
export
|
|
11
|
+
export declare const ColorField: ({ name, value, onChange, defaultValue, placeholder, label, className, }: Props) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type Props = {
|
|
3
3
|
label: string;
|
|
4
|
+
placeholder?: string;
|
|
4
5
|
onChange?: (option: {
|
|
5
6
|
startDate: Date | undefined;
|
|
6
7
|
endDate: Date | undefined;
|
|
@@ -13,9 +14,10 @@ type Props = {
|
|
|
13
14
|
timeGrainValue: string;
|
|
14
15
|
};
|
|
15
16
|
isDateReset?: boolean;
|
|
16
|
-
variant?: 'floatingLabel';
|
|
17
|
+
variant?: 'static' | 'floatingLabel';
|
|
17
18
|
minDate?: Date;
|
|
18
19
|
maxDate?: Date;
|
|
20
|
+
buttonWidth?: string;
|
|
19
21
|
};
|
|
20
22
|
export declare const DateRangePicker: React.FC<Props>;
|
|
21
23
|
export default DateRangePicker;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const DrillBreadCrumb: ({ dimensions, drilledLevel, onResetLevel, onDrillLevelClick, }: {
|
|
2
|
+
export declare const DrillBreadCrumb: ({ dimensions, drilledLevel, onResetLevel, onDrillLevelClick, onMetricCard, metricFilter, }: {
|
|
3
3
|
dimensions: string[];
|
|
4
4
|
drilledLevel: number;
|
|
5
5
|
onResetLevel: () => void;
|
|
6
6
|
onDrillLevelClick: (value: number) => void;
|
|
7
|
+
onMetricCard?: boolean | undefined;
|
|
8
|
+
metricFilter?: boolean | undefined;
|
|
7
9
|
}) => React.JSX.Element;
|
|
8
10
|
export default DrillBreadCrumb;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { MultiSelectDropdownProps } from '@/components/MultiSelectDropdown';
|
|
2
3
|
import { RlsFilterObjectType } from '@/types/app';
|
|
3
|
-
import { FloatingDropDownProps
|
|
4
|
-
export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'
|
|
4
|
+
import { FloatingDropDownProps } from '@/components/FloatingDropDown';
|
|
5
|
+
export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'> & {
|
|
5
6
|
filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
|
|
6
7
|
autoSelected?: boolean;
|
|
7
8
|
workspaceId: string;
|
|
@@ -10,7 +11,10 @@ export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDis
|
|
|
10
11
|
value?: string;
|
|
11
12
|
as?: string;
|
|
12
13
|
};
|
|
14
|
+
isDisableLabel?: boolean;
|
|
15
|
+
};
|
|
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'> & {
|
|
18
|
+
isDisablelabel?: boolean;
|
|
13
19
|
};
|
|
14
|
-
export declare const FilterDropDown: ({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, ...rest }: FilterDropDownProps) => React.JSX.Element;
|
|
15
|
-
export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'filter' | 'label' | 'workspaceId' | 'filterClause'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
16
20
|
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -4,22 +4,18 @@ export type FloatingDropDownProps = {
|
|
|
4
4
|
onChange: (option: FloatingDropDownOption) => void;
|
|
5
5
|
selectedOption: FloatingDropDownOption;
|
|
6
6
|
options: FloatingDropDownOption[];
|
|
7
|
-
|
|
8
|
-
buttonClass?: string;
|
|
7
|
+
button?: JSX.Element;
|
|
9
8
|
label?: string;
|
|
10
|
-
labelVariant?: 'floating' | '
|
|
9
|
+
labelVariant?: 'floating' | 'static';
|
|
11
10
|
isDisabled?: boolean;
|
|
12
11
|
isSearchEnabled?: boolean;
|
|
13
|
-
children?: React.ReactNode;
|
|
14
12
|
icon?: JSX.Element;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
selectedOptions: FloatingDropDownOption[];
|
|
23
|
-
onChange: (options: FloatingDropDownOption[]) => void;
|
|
13
|
+
buttonWidth?: string;
|
|
14
|
+
menuWidth?: string;
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
customButton?: JSX.Element;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
disableAutoClose?: boolean;
|
|
24
20
|
};
|
|
25
|
-
export declare const
|
|
21
|
+
export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, customButton, icon, buttonWidth, menuWidth, isSearchEnabled, searchPlaceholder, placeholder, children, disableAutoClose, }: FloatingDropDownProps) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FilterFieldType } from '@/components
|
|
2
|
+
import { FilterFieldType } from '@/components';
|
|
3
3
|
type AppliedFilterProps = {
|
|
4
4
|
appliedFilter: FilterFieldType[];
|
|
5
5
|
setAppliedFilters: React.Dispatch<React.SetStateAction<FilterFieldType[]>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FilterFieldType } from '@/components/FilterField';
|
|
3
2
|
import { FilterType } from '@/types/app';
|
|
3
|
+
import { FilterFieldType } from '@/components';
|
|
4
4
|
type HorizontalFiltersProps = {
|
|
5
5
|
appliedfilters: FilterFieldType[];
|
|
6
6
|
setAppliedFilters: (value: React.SetStateAction<FilterFieldType[]>) => void;
|
|
@@ -19,6 +19,8 @@ type NumberFieldProps = {
|
|
|
19
19
|
max: number | null;
|
|
20
20
|
}) => void;
|
|
21
21
|
label?: string;
|
|
22
|
+
variant?: 'static' | 'floating';
|
|
23
|
+
buttonWidth?: string;
|
|
22
24
|
};
|
|
23
|
-
export declare const NumberFilterField: ({ setAppliedFilters, column, defaultValues, className, onChange, label, }: NumberFieldProps) => React.JSX.Element;
|
|
25
|
+
export declare const NumberFilterField: ({ setAppliedFilters, column, defaultValues, className, onChange, label, variant, buttonWidth, }: NumberFieldProps) => React.JSX.Element;
|
|
24
26
|
export default NumberFilterField;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FilterColumn } from './Filters';
|
|
3
|
-
import { FilterFieldType } from '@/components
|
|
4
|
-
import { MetricCardProps } from '@/components/MetricList/components';
|
|
3
|
+
import { FilterFieldType, MetricCardProps } from '@/components';
|
|
5
4
|
import { FilterType } from '@/types/app';
|
|
6
5
|
type GlobalFiltersProps = {
|
|
7
6
|
filters: FilterType[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
name: 'data-exploration-icon' | 'dashboard-icon' | 'external-dashboard-icon' | 'sql-query-icon' | 'table-tab-icon' | 'visualization-icon' | 'arrow-back-icon' | 'logout-icon' | 'more-icon' | 'save-icon' | 'copy-icon' | 'dataset-icon' | 'filter-icon' | 'settings-icon' | 'info-icon' | 'schema-icon' | 'fullscreen-icon' | 'table-icon' | 'time-taken-icon' | 'setup-icon' | 'data-model-icon' | 'integration-icon' | 'external-dashboard-icon' | 'csv-icon' | 'iframe-icon' | 'dashboard-icon' | 'plus-icon' | 'checked-icon' | 'clone-icon' | 'close-icon' | 'double-arrow-left-icon' | 'double-arrow-right-icon' | 'metric-store-icon' | 'reset-icon' | 'play-icon' | 'tick-icon' | 'text-icon' | 'time-icon' | 'unknown-icon' | 'array-icon' | 'date-icon' | 'boolean-icon' | 'id-icon' | 'number-icon' | 'object-icon' | 'delete-icon' | 'plus-icon-2' | 'horizontal-more-icon' | 'arrow-up' | 'arrow-down';
|
|
4
|
-
className?: string;
|
|
5
|
-
};
|
|
2
|
+
import { IconsProps, LogoType } from '@/types';
|
|
6
3
|
export declare const Icons: React.FC<IconsProps>;
|
|
4
|
+
type LogoProps = {
|
|
5
|
+
name: LogoType;
|
|
6
|
+
width?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const Logo: React.FC<LogoProps>;
|
|
7
9
|
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { IconConfig } from '@/types';
|
|
2
3
|
type TooltipProps = PropsWithChildren & {
|
|
3
|
-
content
|
|
4
|
+
content?: JSX.Element;
|
|
4
5
|
className?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
tooltipClass?: string;
|
|
5
8
|
position?: 'left' | 'right' | 'top' | 'bottom' | 'left-bottom-end' | 'right-bottom-end' | 'left-top-end' | 'right-top-end' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top' | 'center';
|
|
6
9
|
};
|
|
7
10
|
export declare const Tooltip: React.FC<TooltipProps>;
|
|
11
|
+
export declare const NewTooltip: ({ children, text, className, position, tooltipClass, }: TooltipProps) => React.JSX.Element;
|
|
8
12
|
export declare const InfoTooltip: React.FC<Omit<TooltipProps, 'content'> & {
|
|
9
|
-
|
|
13
|
+
iconConfig?: IconConfig;
|
|
10
14
|
}>;
|
|
11
15
|
export {};
|
|
@@ -2,15 +2,14 @@ import { UseFormRegisterReturn } from 'react-hook-form';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
4
4
|
label?: string;
|
|
5
|
-
labelVariant?: 'floating' | 'static';
|
|
6
5
|
register?: UseFormRegisterReturn;
|
|
7
|
-
error?: any;
|
|
8
|
-
icon?: any;
|
|
9
6
|
isDisabled?: boolean;
|
|
10
|
-
labelClass?: string;
|
|
11
|
-
inputClass?: string;
|
|
12
7
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
8
|
elementRef?: React.Ref<HTMLInputElement>;
|
|
9
|
+
supportingText?: any;
|
|
10
|
+
error?: any;
|
|
11
|
+
leftIcon?: JSX.Element;
|
|
12
|
+
rightIcon?: JSX.Element;
|
|
14
13
|
}
|
|
15
|
-
export declare const InputField: ({ type, register,
|
|
14
|
+
export declare const InputField: ({ type, register, label, isDisabled, id, elementRef, error, supportingText, leftIcon, rightIcon, ...rest }: Props) => React.JSX.Element;
|
|
16
15
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ListHeaderType = {
|
|
3
|
+
name: string;
|
|
4
|
+
headerCell?: React.ReactNode;
|
|
5
|
+
columnKey: string;
|
|
6
|
+
columnCell?: (row: Record<string, any>) => React.ReactNode;
|
|
7
|
+
colSpan?: number;
|
|
8
|
+
};
|
|
9
|
+
export type ListProps = {
|
|
10
|
+
headers: ListHeaderType[];
|
|
11
|
+
data: Record<string, any>[];
|
|
12
|
+
variant?: 'primary' | 'secondary';
|
|
13
|
+
noDataText?: string;
|
|
14
|
+
loadMoreText?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
initialLimit?: number;
|
|
17
|
+
isDataLoading?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, }: ListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverMenuProps } from '@/components/PopoverMenu';
|
|
3
|
+
export type MenuItem = {
|
|
4
|
+
name: string;
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
leftIcon?: JSX.Element;
|
|
8
|
+
rightIcon?: JSX.Element;
|
|
9
|
+
onClick?: (name: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export type MenuProps = Pick<PopoverMenuProps, 'position' | 'menuWidth' | 'offset' | 'children'> & {
|
|
12
|
+
buttonVariant?: 'outlined-text' | 'icon' | 'text-with-icon' | 'outlined-icon' | 'outlined-text-with-icon';
|
|
13
|
+
buttonText?: string;
|
|
14
|
+
buttonIcon?: JSX.Element;
|
|
15
|
+
buttonWidth?: string;
|
|
16
|
+
buttonContent?: React.ReactNode;
|
|
17
|
+
items: MenuItem[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @name Menu - Showing custom actionable list in a popup.
|
|
21
|
+
* @prop buttonVariant - Showing the button variant which triggers the popup.
|
|
22
|
+
* @prop buttonIcon - Icon to show in the button trigger.
|
|
23
|
+
* @prop buttonText - Text to show in the button trigger.
|
|
24
|
+
* @prop items - List of item object to show in the menu popup.
|
|
25
|
+
* @prop menuWidth - Width of the popup menu.
|
|
26
|
+
* @prop offset - Array of x and y position from the button to popup menu.
|
|
27
|
+
* @prop position - Position of the popup menu.
|
|
28
|
+
* @returns JSX to render the menu.
|
|
29
|
+
*/
|
|
30
|
+
export declare const Menu: ({ buttonVariant, buttonIcon, buttonText, offset, position, menuWidth, buttonWidth, buttonContent, items, children, }: MenuProps) => React.JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IconConfig } from '@/types';
|
|
2
3
|
type CsvDownloadButtonProps = {
|
|
3
4
|
className?: string;
|
|
4
5
|
data: Record<string, string>[];
|
|
5
6
|
fileName: string;
|
|
6
|
-
|
|
7
|
+
iconConfig?: IconConfig;
|
|
7
8
|
text?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const CsvDownloadButton: React.FC<CsvDownloadButtonProps>;
|
|
@@ -15,7 +15,6 @@ export type ExternalMetricListProps = {
|
|
|
15
15
|
isMetricListLoading?: boolean;
|
|
16
16
|
breakpoint: ThemeType['breakpoint'];
|
|
17
17
|
layoutCols: ThemeType['metricLayoutCols'];
|
|
18
|
-
adminLayout: Layout[];
|
|
19
18
|
externalDashboardMetrics?: any;
|
|
20
19
|
params?: any;
|
|
21
20
|
appFilters?: any;
|
|
@@ -28,5 +27,11 @@ export type ExternalMetricListProps = {
|
|
|
28
27
|
enableDownloadCsv?: boolean;
|
|
29
28
|
enableEmailCsv?: boolean;
|
|
30
29
|
enableMultiMetricFilters?: boolean;
|
|
30
|
+
layout: {
|
|
31
|
+
clientLayout: Layout[];
|
|
32
|
+
adminLayout: Layout[];
|
|
33
|
+
isLocked: boolean;
|
|
34
|
+
onChange: (layout: Layout[]) => void;
|
|
35
|
+
};
|
|
31
36
|
};
|
|
32
37
|
export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
|
|
@@ -4,13 +4,11 @@ import { MetricFilterOptionsType } from '@/types';
|
|
|
4
4
|
export type FullScreenViewProps = {
|
|
5
5
|
metric: ExternalMetrics;
|
|
6
6
|
colors?: string[];
|
|
7
|
-
rlsFilters?:
|
|
8
|
-
param: any;
|
|
9
|
-
filterValues: Record<string, string>;
|
|
10
|
-
};
|
|
7
|
+
rlsFilters?: any;
|
|
11
8
|
appFilters?: any;
|
|
12
9
|
metricFilterOptions?: MetricFilterOptionsType;
|
|
13
10
|
onMinimize: () => void;
|
|
11
|
+
onArchive?: (metricId: string) => void;
|
|
14
12
|
clientId: string;
|
|
15
13
|
tenancyLevel: string;
|
|
16
14
|
externalDashboardId: string;
|
|
@@ -22,5 +20,6 @@ export type FullScreenViewProps = {
|
|
|
22
20
|
isShowChartConfigTab?: boolean;
|
|
23
21
|
isHideChartSettings?: boolean;
|
|
24
22
|
isHideTablePreview?: boolean;
|
|
23
|
+
isDisableChartTypes?: boolean;
|
|
25
24
|
};
|
|
26
|
-
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, }: FullScreenViewProps) => React.JSX.Element;
|
|
25
|
+
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isDisableChartTypes, }: FullScreenViewProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExternalMetrics } from '@/types/queryTypes';
|
|
3
3
|
import { ClientType } from '@/types/app';
|
|
4
|
-
import { FilterFieldType } from '@/components
|
|
4
|
+
import { FilterFieldType } from '@/components';
|
|
5
5
|
import { MetricFilterOptionsType, RlsCondition } from '@/types';
|
|
6
6
|
export type MetricCardProps = {
|
|
7
7
|
globalFilters?: {
|
|
@@ -10,7 +10,7 @@ export type MetricCardProps = {
|
|
|
10
10
|
};
|
|
11
11
|
metricItem: any;
|
|
12
12
|
client: ClientType['value'];
|
|
13
|
-
onMaximize
|
|
13
|
+
onMaximize?: (metric: ExternalMetrics, rlsFilters?: {
|
|
14
14
|
param: any;
|
|
15
15
|
filterValues: Record<string, string>;
|
|
16
16
|
}, appFilters?: any) => void;
|
|
@@ -30,5 +30,6 @@ export type MetricCardProps = {
|
|
|
30
30
|
onDownloadRawCsv?: (filterValues?: Record<string, any>) => void;
|
|
31
31
|
enableDownloadCsv?: boolean;
|
|
32
32
|
enableMultiMetricFilters?: boolean;
|
|
33
|
+
disableActions?: boolean;
|
|
33
34
|
};
|
|
34
|
-
export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, }: MetricCardProps) => React.JSX.Element;
|
|
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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FloatingDropDownOption } from '@/types';
|
|
3
|
+
export type MultiSelectAccordianDropdownProps = {
|
|
4
|
+
onChange: (options: FloatingDropDownOption) => void;
|
|
5
|
+
selectedOption: FloatingDropDownOption;
|
|
6
|
+
options: FloatingDropDownOption[];
|
|
7
|
+
button?: JSX.Element;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelVariant?: 'floating' | 'static';
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
isSearchEnabled?: boolean;
|
|
12
|
+
icon?: JSX.Element;
|
|
13
|
+
buttonWidth?: string;
|
|
14
|
+
menuWidth?: string;
|
|
15
|
+
searchIcon?: JSX.Element;
|
|
16
|
+
closeControl?: {
|
|
17
|
+
close: boolean;
|
|
18
|
+
};
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
};
|
|
21
|
+
export type MultiSelectDropdownProps = Omit<MultiSelectAccordianDropdownProps, 'selectedOption' | 'onChange'> & {
|
|
22
|
+
onChange: (options: FloatingDropDownOption[]) => void;
|
|
23
|
+
selectedOption: FloatingDropDownOption[];
|
|
24
|
+
options: FloatingDropDownOption[];
|
|
25
|
+
isShowSelectedOptions?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const MultiSelectAccordianDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, }: MultiSelectAccordianDropdownProps) => React.JSX.Element;
|
|
28
|
+
export declare const MultiSelectDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, }: MultiSelectDropdownProps) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
export interface PanelProps extends PropsWithChildren {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
headerTitle?: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
hideHeader?: boolean;
|
|
8
|
+
hideFooter?: boolean;
|
|
9
|
+
primaryActionText?: string;
|
|
10
|
+
onPrimaryAction?: () => void;
|
|
11
|
+
side?: 'left' | 'right';
|
|
12
|
+
size?: 'small' | 'medium' | 'large';
|
|
13
|
+
zIndex?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const Panel: ({ children, isOpen, onClose, headerTitle, icon, hideHeader, hideFooter, primaryActionText, onPrimaryAction, side, size, zIndex, }: PanelProps) => React.JSX.Element;
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Placement } from '@popperjs/core';
|
|
3
|
+
import { Colors } from '@/types';
|
|
4
|
+
type PopoverMenuStateProp = {
|
|
5
|
+
id: string;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
popperElement?: Node | HTMLDivElement | null;
|
|
9
|
+
referenceElement?: Node | HTMLDivElement | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const popoverMenuStateAtom: import("jotai").PrimitiveAtom<PopoverMenuStateProp[]> & {
|
|
12
|
+
init: PopoverMenuStateProp[];
|
|
13
|
+
};
|
|
2
14
|
export type PopoverMenuProps = React.PropsWithChildren & {
|
|
3
|
-
className?: string;
|
|
4
|
-
menuClass?: string;
|
|
5
|
-
buttonClass?: string;
|
|
6
|
-
menuContainerClass?: string;
|
|
7
15
|
buttonContent: React.ReactNode;
|
|
8
16
|
isDisabled?: boolean;
|
|
9
|
-
position?:
|
|
17
|
+
position?: Placement;
|
|
18
|
+
buttonWidth?: string;
|
|
19
|
+
menuWidth?: string;
|
|
20
|
+
offset?: [number, number];
|
|
21
|
+
overFlowDetection?: boolean;
|
|
22
|
+
tabMenu?: boolean;
|
|
23
|
+
bgColor?: Colors;
|
|
24
|
+
autoCloseParent?: boolean;
|
|
10
25
|
};
|
|
11
26
|
export declare const PopoverMenu: React.FC<PopoverMenuProps>;
|
|
27
|
+
export {};
|