@databrainhq/plugin 0.7.14 → 0.7.16
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/Button/index.d.ts +8 -0
- package/dist/components/ChartModal/ChartConfig.d.ts +18 -0
- package/dist/components/ChartModal/ChartModalOptions.d.ts +6 -0
- package/dist/components/ChartModal/SelectField.d.ts +2 -0
- package/dist/components/ChartModal/index.d.ts +3 -0
- package/dist/components/Charts/AreaChart.d.ts +3 -0
- package/dist/components/Charts/BarChart.d.ts +24 -0
- package/dist/components/Charts/BoxPlot.d.ts +3 -0
- package/dist/components/Charts/BubbleChart.d.ts +3 -0
- package/dist/components/Charts/ComboChart.d.ts +3 -0
- package/dist/components/Charts/DoughnutChart.d.ts +3 -0
- package/dist/components/Charts/FunnelChart.d.ts +3 -0
- package/dist/components/Charts/GaugeChart.d.ts +3 -0
- package/dist/components/Charts/Histogram.d.ts +3 -0
- package/dist/components/Charts/LineChart.d.ts +25 -0
- package/dist/components/Charts/PieChart.d.ts +3 -0
- package/dist/components/Charts/RowChart.d.ts +3 -0
- package/dist/components/Charts/SankeyChart.d.ts +3 -0
- package/dist/components/Charts/ScatterChart.d.ts +3 -0
- package/dist/components/Charts/SingleValueChart/index.d.ts +3 -0
- package/dist/components/Charts/StackedBarChart.d.ts +3 -0
- package/dist/components/Charts/SteppedAreaChart.d.ts +3 -0
- package/dist/components/Charts/Table/TableChart.d.ts +3 -0
- package/dist/components/Charts/WaterfallChart.d.ts +3 -0
- package/dist/components/DataType/index.d.ts +2 -0
- package/dist/components/Error/index.d.ts +6 -0
- package/dist/components/ErrorFallback/index.d.ts +2 -0
- package/dist/components/ExternalMetricForm/index.d.ts +15 -0
- package/dist/components/FilterDropDown/index.d.ts +11 -0
- package/dist/components/FilterField/index.d.ts +21 -0
- package/dist/components/FloatingDropDown/index.d.ts +23 -0
- package/dist/components/FullScreenChart/index.d.ts +9 -0
- package/dist/components/GlobalFilters/index.d.ts +11 -0
- package/dist/components/InfoTooltip/index.d.ts +8 -0
- package/dist/components/InputField/index.d.ts +15 -0
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +10 -0
- package/dist/components/MetricChart/MetricChart.d.ts +36 -0
- package/dist/components/MetricChart/index.d.ts +2 -0
- package/dist/components/MetricCreation/MetricCreation.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/Dataset/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +3 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +20 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +32 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +9 -0
- package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -0
- package/dist/components/MetricCreation/index.d.ts +5 -0
- package/dist/components/MetricList/MetricList.d.ts +45 -0
- package/dist/components/MetricList/components/MetricCard.d.ts +18 -0
- package/dist/components/MetricList/components/SingleValueCard.d.ts +3 -0
- package/dist/components/MetricList/index.d.ts +3 -0
- package/dist/components/MetricTable/index.d.ts +7 -0
- package/dist/components/Modal/Modal.d.ts +9 -0
- package/dist/components/Modal/ModalFooter.d.ts +5 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/PopoverMenu/index.d.ts +11 -0
- package/dist/components/SearchTab/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts +48 -0
- package/dist/components/Tab/index.d.ts +10 -0
- package/dist/components/Table/index.d.ts +8 -0
- package/dist/components/Text/index.d.ts +11 -0
- package/dist/components/TextAreaField/index.d.ts +19 -0
- package/dist/components/TimeGrainField/index.d.ts +13 -0
- package/dist/components/ToggleButton/index.d.ts +12 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/consts/app.d.ts +39 -0
- package/dist/consts/index.d.ts +2 -0
- package/dist/consts/metricOptions.d.ts +17 -0
- package/dist/containers/Dashboard/Dashboard.d.ts +6 -0
- package/dist/containers/Dashboard/EmbededDashboard.d.ts +12 -0
- package/dist/containers/Dashboard/index.d.ts +2 -0
- package/dist/containers/index.d.ts +1 -0
- package/dist/contexts/globalTheme.d.ts +9 -0
- package/dist/helpers/cardActions.d.ts +4 -0
- package/dist/helpers/getModifiedQuery.d.ts +6 -0
- package/dist/helpers/getTimeFilterValue.d.ts +8 -0
- package/dist/helpers/groupArray.d.ts +1 -0
- package/dist/helpers/groupBy.d.ts +6 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useEmbeddedDashboard.d.ts +53 -0
- package/dist/hooks/useExternalMetric.d.ts +39 -0
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +13 -0
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +15 -0
- package/dist/hooks/useOutsideAlerter.d.ts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +92114 -0
- package/dist/index.umd.js +340 -0
- package/dist/style.css +1 -0
- package/dist/types/app.d.ts +132 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/metricCreate.d.ts +132 -0
- package/dist/typings.d.ts +17 -0
- package/dist/utils/arrayToCsvString.d.ts +6 -0
- package/dist/utils/colors.d.ts +1 -0
- package/dist/utils/fetcher.d.ts +1 -0
- package/dist/utils/generated/graphql.d.ts +1863 -0
- package/dist/utils/getChartAttributes.d.ts +27 -0
- package/dist/utils/getFormattedDataType.d.ts +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/theme.d.ts +87 -0
- package/package.json +3 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
variant: 'primary' | 'secondary' | 'reject' | 'custom' | 'outlined' | 'tertiary';
|
|
5
|
+
size?: 'xs' | 'small' | 'default' | 'medium' | 'large' | '11rem' | 'none';
|
|
6
|
+
}
|
|
7
|
+
export declare const Button: ({ isDisabled, type, className, children, variant, size, onClick, title, ...props }: Props) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
data: any[] | undefined;
|
|
4
|
+
chartType: string;
|
|
5
|
+
setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
6
|
+
setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
7
|
+
xAxis: string | undefined;
|
|
8
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
9
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
10
|
+
step: string | undefined;
|
|
11
|
+
measure: string | undefined;
|
|
12
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
13
|
+
singleValue: string | undefined;
|
|
14
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
15
|
+
setSettingsShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
|
+
};
|
|
17
|
+
export declare const ChartConfig: ({ data, setXAxis, xAxis, setYAxisList, chartType, setStep, setMeasure, step, measure, setSankeyValues, setSettingsShow, singleValue, setSingleValue, }: Props) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const AreaChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, customSettings, chartClickConfig, }: any) => JSX.Element;
|
|
3
|
+
export default AreaChart;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClickActionsConfig } from '@/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
data: {
|
|
5
|
+
labels: string[] | undefined;
|
|
6
|
+
datasets: {
|
|
7
|
+
label: string;
|
|
8
|
+
data: any[] | undefined;
|
|
9
|
+
borderColor: string;
|
|
10
|
+
}[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
colors?: string[];
|
|
13
|
+
updateGroup?: (value: string) => void;
|
|
14
|
+
isEnableGroupBy?: boolean;
|
|
15
|
+
backGroundColor: any;
|
|
16
|
+
legendSettings: any;
|
|
17
|
+
labelSettings: any;
|
|
18
|
+
axisSettings: any;
|
|
19
|
+
margins: any;
|
|
20
|
+
customSettings: any;
|
|
21
|
+
chartClickConfig: ClickActionsConfig['chart'];
|
|
22
|
+
};
|
|
23
|
+
declare const BarChart: ({ data, colors, updateGroup, isEnableGroupBy, backGroundColor, legendSettings, labelSettings, axisSettings, margins, customSettings, chartClickConfig, }: Props) => JSX.Element;
|
|
24
|
+
export default BarChart;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Histogram: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, customSettings, chartClickConfig, }: any) => JSX.Element;
|
|
3
|
+
export default Histogram;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AxisSettings, CustomSettings, LabelSettings, LegendSettings } from '@/types/app';
|
|
3
|
+
import { ClickActionsConfig } from '@/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
data: {
|
|
6
|
+
labels: string[] | undefined;
|
|
7
|
+
datasets: {
|
|
8
|
+
label: string;
|
|
9
|
+
data: any[] | undefined;
|
|
10
|
+
borderColor: string;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
margins: Record<string, number>;
|
|
14
|
+
legendSettings: LegendSettings;
|
|
15
|
+
labelSettings: LabelSettings;
|
|
16
|
+
axisSettings: AxisSettings;
|
|
17
|
+
enableSaveAs: boolean;
|
|
18
|
+
colors?: string[];
|
|
19
|
+
updateGroup?: (value: string) => void;
|
|
20
|
+
isEnableGroupBy?: boolean;
|
|
21
|
+
customSettings: CustomSettings;
|
|
22
|
+
chartClickConfig: ClickActionsConfig['chart'];
|
|
23
|
+
};
|
|
24
|
+
declare const LineChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, customSettings, chartClickConfig, }: Props) => JSX.Element;
|
|
25
|
+
export default LineChart;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ScatterChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, customSettings, chartClickConfig, }: any) => JSX.Element;
|
|
3
|
+
export default ScatterChart;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const StackedBarChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, customSettings, chartClickConfig, }: any) => JSX.Element;
|
|
3
|
+
export default StackedBarChart;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const SteppedAreaChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, customSettings, chartClickConfig, }: any) => JSX.Element;
|
|
3
|
+
export default SteppedAreaChart;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { DashboardType } from '@/types/app';
|
|
4
|
+
declare type ExternalMetricProps = {
|
|
5
|
+
onSubmit: (values: FieldValues) => void;
|
|
6
|
+
defaultValues?: FieldValues;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
isEmbedded?: boolean;
|
|
9
|
+
dashboardIds: DashboardType['id'][];
|
|
10
|
+
onDashboardChange: (selected: DashboardType['id'][]) => void;
|
|
11
|
+
companyId: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const ExternalMetricForm: React.FC<ExternalMetricProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RlsFilterObjectType } from '@/types/app';
|
|
3
|
+
import { FloatingDropDownProps, MultiFloatingDropDownProps } from '@/components/FloatingDropDown';
|
|
4
|
+
export declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDisabled'> & {
|
|
5
|
+
companyId: string;
|
|
6
|
+
filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
|
|
7
|
+
autoSelected?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const FilterDropDown: ({ companyId, filter, onChange, selectedOption, autoSelected, ...rest }: FilterDropDownProps) => JSX.Element;
|
|
10
|
+
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
11
|
+
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type FilterFieldType = {
|
|
3
|
+
column: string;
|
|
4
|
+
operator: string;
|
|
5
|
+
value?: string | string[] | number | number[] | boolean | boolean[] | null;
|
|
6
|
+
as?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type FilterFieldProps = {
|
|
9
|
+
tableName: string;
|
|
10
|
+
filter: {
|
|
11
|
+
name: string;
|
|
12
|
+
dataType: string;
|
|
13
|
+
as: string;
|
|
14
|
+
};
|
|
15
|
+
isResetted: boolean;
|
|
16
|
+
onChange: (field: FilterFieldType) => void;
|
|
17
|
+
companyId: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const isInFilterOperator: (input: string) => boolean;
|
|
20
|
+
export declare const isNullFilterOperator: (input: string) => boolean;
|
|
21
|
+
export declare const FilterField: React.FC<FilterFieldProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FloatingDropDownOption } from '@/types';
|
|
3
|
+
export declare type FloatingDropDownProps = {
|
|
4
|
+
onChange: (option: FloatingDropDownOption) => void;
|
|
5
|
+
selectedOption: FloatingDropDownOption;
|
|
6
|
+
options: FloatingDropDownOption[];
|
|
7
|
+
className?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelVariant?: 'floating' | 'static';
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
isSearchEnabled?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
Icon?: any;
|
|
14
|
+
closeControl?: {
|
|
15
|
+
close: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, options, isDisabled, children, Icon, isSearchEnabled, closeControl, }: FloatingDropDownProps) => JSX.Element;
|
|
19
|
+
export declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
|
|
20
|
+
selectedOptions: FloatingDropDownOption[];
|
|
21
|
+
onChange: (options: FloatingDropDownOption[]) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const MultiFloatingDropDown: React.FC<MultiFloatingDropDownProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MetricChartProps } from '@/components/MetricChart';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
isShow: boolean;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
chart?: MetricChartProps;
|
|
7
|
+
};
|
|
8
|
+
export declare const FullScreenChart: ({ isShow, onCancel, chart }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
|
+
import { FilterType } from '@/types/app';
|
|
4
|
+
declare type GlobalFiltersProps = {
|
|
5
|
+
filters: FilterType[];
|
|
6
|
+
companyId: string;
|
|
7
|
+
onApply: (filters: MetricCardProps['globalFilters']) => void;
|
|
8
|
+
renderAdditionalHeaderContent?: () => JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export declare const GlobalFilters: React.FC<GlobalFiltersProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
declare type TooltipProps = PropsWithChildren & {
|
|
3
|
+
content: JSX.Element;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
7
|
+
export declare const InfoTooltip: React.FC<Omit<TooltipProps, 'content'>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
labelVariant?: 'floating' | 'static';
|
|
6
|
+
register?: UseFormRegisterReturn;
|
|
7
|
+
error?: any;
|
|
8
|
+
icon?: any;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
labelClass?: string;
|
|
11
|
+
inputClass?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const InputField: ({ type, register, error, icon, label, isDisabled, labelClass, inputClass, className, labelVariant, id, ...rest }: Props) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type CsvDownloadButtonProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
data: Record<string, string>[];
|
|
5
|
+
fileName: string;
|
|
6
|
+
iconClass?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const CsvDownloadButton: React.FC<CsvDownloadButtonProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AxisSettings, LabelSettings, LegendSettings, BackgroundSettings, CustomSettings } from '@/types/app';
|
|
3
|
+
import { ClickActionsConfig } from '@/types';
|
|
4
|
+
export declare type MetricChartProps = {
|
|
5
|
+
data: {
|
|
6
|
+
labels: string[] | undefined;
|
|
7
|
+
datasets: {
|
|
8
|
+
label: string;
|
|
9
|
+
data: any[] | undefined;
|
|
10
|
+
borderColor: string;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
labels: string[] | undefined;
|
|
14
|
+
funnelData: ('' | {
|
|
15
|
+
value: any;
|
|
16
|
+
name: any;
|
|
17
|
+
} | undefined)[] | undefined;
|
|
18
|
+
chartType: string;
|
|
19
|
+
sankeyData: (any[] | undefined)[] | undefined;
|
|
20
|
+
singleValueData: ('' | {
|
|
21
|
+
value: any;
|
|
22
|
+
label: string;
|
|
23
|
+
} | undefined)[] | undefined;
|
|
24
|
+
margins: Record<string, number>;
|
|
25
|
+
legendSettings: LegendSettings;
|
|
26
|
+
labelSettings: LabelSettings;
|
|
27
|
+
axisSettings: AxisSettings;
|
|
28
|
+
customSettings: CustomSettings;
|
|
29
|
+
enableSaveAs: boolean;
|
|
30
|
+
colors?: string[];
|
|
31
|
+
updateGroup?: (value: string) => void;
|
|
32
|
+
isEnableGroupBy?: boolean;
|
|
33
|
+
backGroundColor: BackgroundSettings;
|
|
34
|
+
chartClickConfig: ClickActionsConfig['chart'];
|
|
35
|
+
};
|
|
36
|
+
export declare const MetricChart: ({ labels, data, chartType, funnelData, sankeyData, singleValueData, margins, legendSettings, labelSettings, axisSettings, customSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, chartClickConfig, }: MetricChartProps) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ConstructMetricProps } from '@/types/metricCreate';
|
|
3
|
+
export declare const ConstructMetric: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, isEnableGroupBy, setEnableGroupBy, setSelectedGroupBy, clientId, clientColumn, }: ConstructMetricProps) => JSX.Element;
|
package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ConstructMetricProps } from '@/types/metricCreate';
|
|
3
|
+
export declare const MetricForm: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, isEnableGroupBy, setSelectedGroupBy, clientId, clientColumn, }: ConstructMetricProps) => JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MetricOutputProps } from '@/types/metricCreate';
|
|
3
|
+
export declare const MetricOutput: ({ data, error, isLoading, labels, funnelData, chartType, datasets, setChartType, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, updateGroup, isEnableGroupBy, backGroundColor, setBackGroundColor, moreTabs, }: MetricOutputProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings } from '@/types/app';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
5
|
+
margins: Record<string, number>;
|
|
6
|
+
legendSettings: LegendSettings;
|
|
7
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
8
|
+
labelSettings: LabelSettings;
|
|
9
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
10
|
+
axisSettings: AxisSettings;
|
|
11
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
12
|
+
customSettings: CustomSettings;
|
|
13
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
14
|
+
chartType: any;
|
|
15
|
+
setChartType: any;
|
|
16
|
+
backGroundColor: BackgroundSettings;
|
|
17
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const ChartConfigure: ({ setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, chartType, setChartType, customSettings, setCustomSettings, backGroundColor, setBackGroundColor, }: Props) => JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings } from '@/types/app';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
data: any[] | undefined;
|
|
5
|
+
chartType: string;
|
|
6
|
+
setChartType: React.Dispatch<React.SetStateAction<string>>;
|
|
7
|
+
setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
8
|
+
setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
9
|
+
xAxis: string | undefined;
|
|
10
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
11
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
12
|
+
step: string | undefined;
|
|
13
|
+
measure: string | undefined;
|
|
14
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
15
|
+
singleValue: string | undefined;
|
|
16
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
17
|
+
setSettingsShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
19
|
+
margins: Record<string, number>;
|
|
20
|
+
legendSettings: LegendSettings;
|
|
21
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
22
|
+
labelSettings: LabelSettings;
|
|
23
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
24
|
+
axisSettings: AxisSettings;
|
|
25
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
26
|
+
customSettings: CustomSettings;
|
|
27
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
28
|
+
backGroundColor: BackgroundSettings;
|
|
29
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
30
|
+
};
|
|
31
|
+
export declare const ChartSettings: ({ chartType, setChartType, data, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, singleValue, setSingleValue, setSettingsShow, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, backGroundColor, setBackGroundColor, }: Props) => JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxisSettings, LabelSettings, LegendSettings, BackgroundSettings, CustomSettings } from '@/types/app';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
data: any[] | undefined;
|
|
5
|
+
labels: string[] | undefined;
|
|
6
|
+
funnelData: ('' | {
|
|
7
|
+
value: any;
|
|
8
|
+
name: any;
|
|
9
|
+
} | undefined)[] | undefined;
|
|
10
|
+
chartType: string;
|
|
11
|
+
datasets: {
|
|
12
|
+
label: string;
|
|
13
|
+
data: any[] | undefined;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
setChartType: React.Dispatch<React.SetStateAction<string>>;
|
|
17
|
+
setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
18
|
+
setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
19
|
+
xAxis: string | undefined;
|
|
20
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
21
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
22
|
+
step: string | undefined;
|
|
23
|
+
measure: string | undefined;
|
|
24
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
25
|
+
sankeyData: (any[] | undefined)[] | undefined;
|
|
26
|
+
singleValue: string | undefined;
|
|
27
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
28
|
+
singleValueData: ('' | {
|
|
29
|
+
value: any;
|
|
30
|
+
label: string;
|
|
31
|
+
} | undefined)[] | undefined;
|
|
32
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
33
|
+
margins: Record<string, number>;
|
|
34
|
+
legendSettings: LegendSettings;
|
|
35
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
36
|
+
labelSettings: LabelSettings;
|
|
37
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
38
|
+
axisSettings: AxisSettings;
|
|
39
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
40
|
+
customSettings: CustomSettings;
|
|
41
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
42
|
+
updateGroup?: (value: string) => void;
|
|
43
|
+
isEnableGroupBy?: boolean;
|
|
44
|
+
isLoading: boolean;
|
|
45
|
+
backGroundColor: BackgroundSettings;
|
|
46
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
47
|
+
headerChild?: JSX.Element;
|
|
48
|
+
};
|
|
49
|
+
export declare const ChartTab: ({ labels, datasets, funnelData, chartType, setChartType, data, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, customSettings, setCustomSettings, axisSettings, setAxisSettings, updateGroup, isLoading, isEnableGroupBy, backGroundColor, setBackGroundColor, headerChild, }: Props) => JSX.Element;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
previewTableDataList: any[] | undefined;
|
|
4
|
+
outpuTableData: any[] | undefined;
|
|
5
|
+
isOutputLoading: boolean;
|
|
6
|
+
outputError: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const TableTab: ({ outpuTableData, outputError, isOutputLoading, previewTableDataList, }: Props) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MetricCardProps } from './components/MetricCard';
|
|
3
|
+
import { ClientType } from '@/types/app';
|
|
4
|
+
import { ThemeType } from '@/utils/theme';
|
|
5
|
+
export declare const GridLayout: React.ComponentClass<import("react-grid-layout").ResponsiveProps & import("react-grid-layout").WidthProviderProps, any>;
|
|
6
|
+
export declare type ExternalMetricListProps = {
|
|
7
|
+
chartColors?: string[];
|
|
8
|
+
globalFilters?: MetricCardProps['globalFilters'];
|
|
9
|
+
client: ClientType['value'];
|
|
10
|
+
isLiveMode: boolean;
|
|
11
|
+
isMetricListLoading?: boolean;
|
|
12
|
+
breakpoint: ThemeType['breakpoint'];
|
|
13
|
+
layoutCols: ThemeType['metricLayoutCols'];
|
|
14
|
+
externalDashboardMetrics?: {
|
|
15
|
+
__typename?: 'externalDashboardMetrics';
|
|
16
|
+
externalMetricId: any;
|
|
17
|
+
externalDashboardId: any;
|
|
18
|
+
externalMetric: {
|
|
19
|
+
__typename?: 'externalMetrics';
|
|
20
|
+
chartOptions: any;
|
|
21
|
+
clientId?: string | null;
|
|
22
|
+
companyId: any;
|
|
23
|
+
companyIntegrationId: any;
|
|
24
|
+
createdAt: any;
|
|
25
|
+
createdBy?: string | null;
|
|
26
|
+
description: string;
|
|
27
|
+
id: any;
|
|
28
|
+
inputFields?: any | null;
|
|
29
|
+
integrationName: string;
|
|
30
|
+
isCreatedByClient: boolean;
|
|
31
|
+
isLive: boolean;
|
|
32
|
+
metricId: string;
|
|
33
|
+
metricQuery?: string | null;
|
|
34
|
+
name: string;
|
|
35
|
+
outputColumns?: string | null;
|
|
36
|
+
query: string;
|
|
37
|
+
resizeAttributes: any;
|
|
38
|
+
timeGrain?: string | null;
|
|
39
|
+
updatedAt: any;
|
|
40
|
+
};
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
params?: any;
|
|
43
|
+
companyTenancyType: string;
|
|
44
|
+
};
|
|
45
|
+
export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClientType } from '@/types/app';
|
|
3
|
+
import { MetricChartProps } from '@/components/MetricChart';
|
|
4
|
+
import { FilterFieldType } from '@/components/FilterField';
|
|
5
|
+
export declare type MetricCardProps = {
|
|
6
|
+
globalFilters?: {
|
|
7
|
+
tableName: string;
|
|
8
|
+
filters: FilterFieldType[];
|
|
9
|
+
};
|
|
10
|
+
metricItem: any;
|
|
11
|
+
client: ClientType['value'];
|
|
12
|
+
onMaximize: (chart: MetricChartProps) => void;
|
|
13
|
+
colors?: string[];
|
|
14
|
+
param?: any;
|
|
15
|
+
companyTenancyType: string;
|
|
16
|
+
renderHeaderName?: (name: string) => JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export declare const MetricCard: React.FC<MetricCardProps>;
|