@databrainhq/plugin 0.9.20 → 0.9.21
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/README.md +26 -26
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/ChartModal/ChartConfig.d.ts +16 -6
- package/dist/components/ChartModal/ChartModalOptions.d.ts +5 -7
- package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +1 -1
- package/dist/components/ChartPopup/index.d.ts +1 -1
- package/dist/components/Charts/BarChart.d.ts +1 -1
- package/dist/components/Charts/LineChart.d.ts +1 -1
- package/dist/components/DataType/index.d.ts +1 -1
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/Error/index.d.ts +1 -1
- package/dist/components/ExternalMetricForm/index.d.ts +1 -1
- package/dist/components/FilterDropDown/index.d.ts +2 -2
- package/dist/components/FilterField/index.d.ts +2 -2
- package/dist/components/FloatingDropDown/index.d.ts +2 -2
- package/dist/components/FullScreenChart/index.d.ts +4 -3
- package/dist/components/GlobalFilters/AddFilter.d.ts +2 -2
- package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +1 -1
- package/dist/components/GlobalFilters/index.d.ts +2 -2
- package/dist/components/Icons/index.d.ts +1 -1
- package/dist/components/InfoTooltip/index.d.ts +1 -1
- package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +4 -4
- package/dist/components/MetricChart/CsvDownloadButton.d.ts +1 -1
- package/dist/components/MetricChart/MetricChart.d.ts +1 -1
- package/dist/components/MetricChart/index.d.ts +0 -1
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +26 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +38 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -6
- package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +1 -0
- package/dist/components/MetricFilterDropDown/index.d.ts +1 -1
- package/dist/components/MetricList/MetricList.d.ts +4 -3
- package/dist/components/MetricList/components/{DownloadRawCsvModal/index.d.ts → DownloadRawCsvModal.d.ts} +1 -1
- package/dist/components/MetricList/components/{LayoutAlert/index.d.ts → LayoutAlert.d.ts} +1 -1
- package/dist/components/MetricList/components/{MetricCards/MetricCard.d.ts → MetricCard.d.ts} +6 -5
- package/dist/components/MetricList/components/{MetricCards/SingleValueCard.d.ts → SingleValueCard.d.ts} +1 -1
- package/dist/components/MetricList/components/{TableViewModal/index.d.ts → TableViewModal.d.ts} +1 -1
- package/dist/components/MetricList/index.d.ts +6 -1
- package/dist/components/MetricTable/index.d.ts +1 -1
- package/dist/components/Modal/ModalFooter.d.ts +1 -1
- package/dist/components/PopoverMenu/index.d.ts +1 -1
- package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +5 -5
- package/dist/components/Tab/index.d.ts +1 -1
- package/dist/components/Table/DebouncedInput.d.ts +1 -1
- package/dist/components/Table/index.d.ts +2 -4
- package/dist/components/TagInputField/index.d.ts +1 -1
- package/dist/components/TimeGrainField/index.d.ts +1 -1
- package/dist/components/ToggleButton/SwitchInput.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleInput.d.ts +1 -1
- package/dist/components/ToggleButton/index.d.ts +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/consts/metricOptions.d.ts +0 -4
- package/dist/containers/Dashboard/Dashboard.d.ts +1 -1
- package/dist/containers/Dashboard/DashboardProvider.d.ts +1 -1
- package/dist/helpers/getTimeFilterValue.d.ts +1 -1
- package/dist/helpers/timeseries.d.ts +6 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useClientDashboardLayout.d.ts +1 -1
- package/dist/hooks/useExternalMetric.d.ts +20 -3
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +1 -1
- package/dist/hooks/useOutsideAlerter.d.ts +1 -1
- package/dist/hooks/useScheduleEmail.d.ts +1 -1
- package/dist/index.es.js +127470 -86236
- package/dist/index.umd.js +242 -298
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +61 -119
- package/dist/types/metricCreate.d.ts +87 -13
- package/dist/typings.d.ts +17 -0
- package/dist/utils/generated/graphql.d.ts +437 -437
- package/dist/utils/getChartAttributes.d.ts +8 -5
- package/dist/utils/handleSaveChartImage.d.ts +3 -0
- package/package.json +98 -110
- package/dist/components/Chart/SingleValueChart.d.ts +0 -16
- package/dist/components/Chart/index.d.ts +0 -21
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +0 -8
- package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +0 -9
- package/dist/components/ChartSettingsPopup/index.d.ts +0 -9
- package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +0 -9
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +0 -18
- package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +0 -7
- package/dist/components/MetricList/components/index.d.ts +0 -8
- package/dist/hooks/useMetricCard.d.ts +0 -37
- package/dist/utils/getChartImage.d.ts +0 -3
- package/dist/utils/getChartOptions.d.ts +0 -7
- /package/dist/components/MetricList/components/{ArchiveMetricModal/index.d.ts → ArchiveMetricModal.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# @databrainhq/plugin
|
|
2
|
-
|
|
3
|
-
> Databrain app ui plugin.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @databrainhq/plugin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { Dashboard } from '@databrainhq/plugin';
|
|
17
|
-
import '@databrainhq/plugin/dist/style.css';
|
|
18
|
-
|
|
19
|
-
const Example = () => {
|
|
20
|
-
return <Dashboard token={/* Your Guest Token */} />;
|
|
21
|
-
};
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## License
|
|
25
|
-
|
|
26
|
-
MIT © [databrainhq](https://github.com/databrainhq)
|
|
1
|
+
# @databrainhq/plugin
|
|
2
|
+
|
|
3
|
+
> Databrain app ui plugin.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @databrainhq/plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Dashboard } from '@databrainhq/plugin';
|
|
17
|
+
import '@databrainhq/plugin/dist/style.css';
|
|
18
|
+
|
|
19
|
+
const Example = () => {
|
|
20
|
+
return <Dashboard token={/* Your Guest Token */} />;
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT © [databrainhq](https://github.com/databrainhq)
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
yAxisList?: string[];
|
|
8
|
+
xAxis: string | undefined;
|
|
9
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
10
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
11
|
+
step: string | undefined;
|
|
12
|
+
measure: string | undefined;
|
|
13
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
14
|
+
singleValue: string | undefined;
|
|
15
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
16
|
+
setSettingsShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
17
|
};
|
|
8
|
-
export declare const ChartConfig: ({ data,
|
|
18
|
+
export declare const ChartConfig: ({ data, setXAxis, xAxis, yAxisList, setYAxisList, chartType, setStep, setMeasure, step, measure, setSankeyValues, setSettingsShow, singleValue, setSingleValue, }: Props) => JSX.Element;
|
|
9
19
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onChartChange: (chartType: ChartType) => void;
|
|
6
|
-
chartType: ChartType;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
setChartType: React.Dispatch<React.SetStateAction<string>>;
|
|
4
|
+
chartType: string;
|
|
7
5
|
isEnableTimeSeries: boolean;
|
|
8
6
|
};
|
|
9
|
-
export declare const ChartModalOptions: ({ chartType,
|
|
7
|
+
export declare const ChartModalOptions: ({ chartType, setChartType, isEnableTimeSeries, }: Props) => JSX.Element;
|
|
10
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ClickActionsConfig, GetUnderlyingData } from '@/types';
|
|
3
|
-
export type ChartPopupProps = React.PropsWithChildren & {
|
|
3
|
+
export declare type ChartPopupProps = React.PropsWithChildren & {
|
|
4
4
|
getUnderlyingData: GetUnderlyingData;
|
|
5
5
|
value: any;
|
|
6
6
|
columnName: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
import { DashboardType } from '@/types/app';
|
|
4
|
-
type ExternalMetricProps = {
|
|
4
|
+
declare type ExternalMetricProps = {
|
|
5
5
|
onSubmit: (values: FieldValues) => void;
|
|
6
6
|
defaultValues?: FieldValues;
|
|
7
7
|
onCancel: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RlsFilterObjectType } from '@/types/app';
|
|
3
3
|
import { FloatingDropDownProps, MultiFloatingDropDownProps } from '@/components/FloatingDropDown';
|
|
4
|
-
export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDisabled'> & {
|
|
4
|
+
export declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDisabled'> & {
|
|
5
5
|
companyId: string;
|
|
6
6
|
filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
|
|
7
7
|
autoSelected?: boolean;
|
|
@@ -9,5 +9,5 @@ export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDis
|
|
|
9
9
|
integrationName: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const FilterDropDown: ({ companyId, filter, onChange, selectedOption, autoSelected, integrationId, integrationName, ...rest }: FilterDropDownProps) => JSX.Element;
|
|
12
|
-
export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label' | 'integrationId' | 'integrationName'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
12
|
+
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label' | 'integrationId' | 'integrationName'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
13
13
|
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export type FilterFieldType = {
|
|
2
|
+
export declare type FilterFieldType = {
|
|
3
3
|
column: string;
|
|
4
4
|
operator: string;
|
|
5
5
|
value?: string | string[] | number | number[] | boolean | boolean[] | null;
|
|
6
6
|
as?: string;
|
|
7
7
|
defaultValues?: any;
|
|
8
8
|
};
|
|
9
|
-
export type FilterFieldProps = {
|
|
9
|
+
export declare type FilterFieldProps = {
|
|
10
10
|
tableName: string;
|
|
11
11
|
filter: {
|
|
12
12
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FloatingDropDownOption } from '@/types';
|
|
3
|
-
export type FloatingDropDownProps = {
|
|
3
|
+
export declare type FloatingDropDownProps = {
|
|
4
4
|
onChange: (option: FloatingDropDownOption) => void;
|
|
5
5
|
selectedOption: FloatingDropDownOption;
|
|
6
6
|
options: FloatingDropDownOption[];
|
|
@@ -18,7 +18,7 @@ export type FloatingDropDownProps = {
|
|
|
18
18
|
dropdownAbove?: boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, buttonClass, options, isDisabled, children, icon, isSearchEnabled, closeControl, dropdownAbove, }: FloatingDropDownProps) => JSX.Element;
|
|
21
|
-
export type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
|
|
21
|
+
export declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
|
|
22
22
|
selectedOptions: FloatingDropDownOption[];
|
|
23
23
|
onChange: (options: FloatingDropDownOption[]) => void;
|
|
24
24
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
type Props =
|
|
2
|
+
import { MetricChartProps } from '@/components/MetricChart';
|
|
3
|
+
declare type Props = {
|
|
4
4
|
isShow: boolean;
|
|
5
5
|
onCancel: () => void;
|
|
6
|
+
chart?: MetricChartProps;
|
|
6
7
|
};
|
|
7
|
-
export declare const FullScreenChart: ({ isShow, onCancel,
|
|
8
|
+
export declare const FullScreenChart: ({ isShow, onCancel, chart }: Props) => JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Filter = {
|
|
2
|
+
declare type Filter = {
|
|
3
3
|
as: any;
|
|
4
4
|
dataType: string;
|
|
5
5
|
name: string;
|
|
6
6
|
isDefault?: boolean | undefined;
|
|
7
7
|
label?: string;
|
|
8
8
|
};
|
|
9
|
-
type Props = {
|
|
9
|
+
declare type Props = {
|
|
10
10
|
columnList: Filter[];
|
|
11
11
|
setFilterList: React.Dispatch<React.SetStateAction<Filter[]>>;
|
|
12
12
|
filterList: Filter[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FilterFieldType } from '@/components/FilterField';
|
|
3
|
-
type AppliedFilterProps = {
|
|
3
|
+
declare type AppliedFilterProps = {
|
|
4
4
|
appliedFilter: FilterFieldType[];
|
|
5
5
|
setAppliedFilters: React.Dispatch<React.SetStateAction<FilterFieldType[]>>;
|
|
6
6
|
onChangeFilters: (updatedFilters: FilterFieldType[]) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from '@/components/MetricList/components';
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
3
|
import { FilterType } from '@/types/app';
|
|
4
|
-
type GlobalFiltersProps = {
|
|
4
|
+
declare type GlobalFiltersProps = {
|
|
5
5
|
filters: FilterType[];
|
|
6
6
|
companyId: string;
|
|
7
7
|
onApply: (filters: MetricCardProps['globalFilters']) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type IconsProps = {
|
|
2
|
+
declare type IconsProps = {
|
|
3
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';
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
type TooltipProps = PropsWithChildren & {
|
|
2
|
+
declare type TooltipProps = PropsWithChildren & {
|
|
3
3
|
content: JSX.Element;
|
|
4
4
|
className?: string;
|
|
5
5
|
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';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import EChartsReact from 'echarts-for-react';
|
|
3
|
-
type DownloadButtonProps = {
|
|
3
|
+
declare type DownloadButtonProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
iconClass?: string;
|
|
6
6
|
text?: string;
|
|
7
7
|
chartRef: React.RefObject<EChartsReact>;
|
|
8
|
-
|
|
8
|
+
id: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export
|
|
10
|
+
declare const ChartImageDownloadButton: ({ className, iconClass, text, chartRef, id, }: DownloadButtonProps) => JSX.Element;
|
|
11
|
+
export default ChartImageDownloadButton;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import EChartsReact from 'echarts-for-react';
|
|
3
3
|
import { AxisSettings, LabelSettings, LegendSettings, BackgroundSettings, CustomSettings, TableSettings } from '@/types/app';
|
|
4
4
|
import { ClickActionsConfig, TimeSeriesSettingsType } from '@/types';
|
|
5
|
-
export type MetricChartProps = {
|
|
5
|
+
export declare type MetricChartProps = {
|
|
6
6
|
data: {
|
|
7
7
|
labels: string[] | undefined;
|
|
8
8
|
datasets: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MetricOutputProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors,
|
|
3
|
+
export declare const MetricOutput: ({ data, error, isLoading, labels, funnelData, chartType, datasets, setChartType, setXAxis, setYAxisList, yAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, tableSettings, setTableSettings, backGroundColor, setBackGroundColor, moreTabs, chartColors, isUpdateMetric, setTimeSeriesSettings, timeSeriesSettings, }: MetricOutputProps) => JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings, TableSettings } from '@/types/app';
|
|
3
|
+
import { TimeSeriesSettingsType } from '@/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
6
|
+
margins: Record<string, number>;
|
|
7
|
+
legendSettings: LegendSettings;
|
|
8
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
9
|
+
labelSettings: LabelSettings;
|
|
10
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
11
|
+
axisSettings: AxisSettings;
|
|
12
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
13
|
+
customSettings: CustomSettings;
|
|
14
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
15
|
+
chartType: any;
|
|
16
|
+
setChartType: any;
|
|
17
|
+
backGroundColor: BackgroundSettings;
|
|
18
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
19
|
+
tableSettings: TableSettings;
|
|
20
|
+
setTableSettings: React.Dispatch<React.SetStateAction<TableSettings>>;
|
|
21
|
+
timeSeriesSettings: TimeSeriesSettingsType;
|
|
22
|
+
setTimeSeriesSettings: React.Dispatch<React.SetStateAction<TimeSeriesSettingsType>>;
|
|
23
|
+
yAxisList: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare const ChartConfigure: ({ setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, chartType, setChartType, customSettings, setCustomSettings, backGroundColor, setBackGroundColor, tableSettings, setTableSettings, setTimeSeriesSettings, timeSeriesSettings, yAxisList, }: Props) => JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxisSettings, BackgroundSettings, CustomSettings, LabelSettings, LegendSettings, TableSettings } from '@/types/app';
|
|
3
|
+
import { TimeSeriesSettingsType } from '@/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
data: any[] | undefined;
|
|
6
|
+
chartType: string;
|
|
7
|
+
setChartType: React.Dispatch<React.SetStateAction<string>>;
|
|
8
|
+
setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
9
|
+
setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
10
|
+
yAxisList?: string[];
|
|
11
|
+
xAxis: string | undefined;
|
|
12
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
13
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
14
|
+
step: string | undefined;
|
|
15
|
+
measure: string | undefined;
|
|
16
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
17
|
+
singleValue: string | undefined;
|
|
18
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
19
|
+
setSettingsShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
21
|
+
margins: Record<string, number>;
|
|
22
|
+
legendSettings: LegendSettings;
|
|
23
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
24
|
+
labelSettings: LabelSettings;
|
|
25
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
26
|
+
axisSettings: AxisSettings;
|
|
27
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
28
|
+
customSettings: CustomSettings;
|
|
29
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
30
|
+
backGroundColor: BackgroundSettings;
|
|
31
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
32
|
+
tableSettings: TableSettings;
|
|
33
|
+
setTableSettings: React.Dispatch<React.SetStateAction<TableSettings>>;
|
|
34
|
+
timeSeriesSettings: TimeSeriesSettingsType;
|
|
35
|
+
setTimeSeriesSettings: React.Dispatch<React.SetStateAction<TimeSeriesSettingsType>>;
|
|
36
|
+
};
|
|
37
|
+
export declare const ChartSettings: ({ chartType, setChartType, data, setXAxis, setYAxisList, yAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, singleValue, setSingleValue, setSettingsShow, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, backGroundColor, setBackGroundColor, tableSettings, setTableSettings, setTimeSeriesSettings, timeSeriesSettings, }: Props) => JSX.Element;
|
|
38
|
+
export {};
|
package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts
CHANGED
|
@@ -1,15 +1,59 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { AxisSettings, LabelSettings, LegendSettings, BackgroundSettings, CustomSettings, TableSettings } from '@/types/app';
|
|
3
|
+
import { ClickActionsConfig, TimeSeriesSettingsType } from '@/types';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
data: any[] | undefined;
|
|
6
|
+
labels: string[] | undefined;
|
|
7
|
+
funnelData: ('' | {
|
|
8
|
+
value: any;
|
|
9
|
+
name: any;
|
|
10
|
+
} | undefined)[] | undefined;
|
|
11
|
+
chartType: string;
|
|
12
|
+
datasets: {
|
|
13
|
+
label: string;
|
|
14
|
+
data: any[] | undefined;
|
|
15
|
+
borderColor: string;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
setChartType: React.Dispatch<React.SetStateAction<string>>;
|
|
18
|
+
setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
19
|
+
setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
20
|
+
yAxisList?: string[];
|
|
21
|
+
xAxis: string | undefined;
|
|
22
|
+
setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
23
|
+
setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
24
|
+
step: string | undefined;
|
|
25
|
+
measure: string | undefined;
|
|
26
|
+
setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
27
|
+
sankeyData: (any[] | undefined)[] | undefined;
|
|
28
|
+
singleValue: string | undefined;
|
|
29
|
+
setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
30
|
+
singleValueData: ('' | {
|
|
31
|
+
value: any;
|
|
32
|
+
label: string;
|
|
33
|
+
} | undefined)[] | undefined;
|
|
34
|
+
setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
|
|
35
|
+
margins: Record<string, number>;
|
|
36
|
+
legendSettings: LegendSettings;
|
|
37
|
+
setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
|
|
38
|
+
labelSettings: LabelSettings;
|
|
39
|
+
setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
|
|
40
|
+
axisSettings: AxisSettings;
|
|
41
|
+
setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
|
|
42
|
+
customSettings: CustomSettings;
|
|
43
|
+
setCustomSettings: React.Dispatch<React.SetStateAction<CustomSettings>>;
|
|
5
44
|
isLoading: boolean;
|
|
45
|
+
backGroundColor: BackgroundSettings;
|
|
46
|
+
setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
|
|
6
47
|
headerChild?: JSX.Element;
|
|
7
48
|
chartPopupChild?: JSX.Element;
|
|
49
|
+
tableSettings: TableSettings;
|
|
50
|
+
setTableSettings: React.Dispatch<React.SetStateAction<TableSettings>>;
|
|
51
|
+
tableName?: string;
|
|
8
52
|
chartColors?: string[];
|
|
9
|
-
chartSettings: ChartSettingsType;
|
|
10
|
-
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
11
53
|
handleChartRightClick?: (params: any) => void;
|
|
12
54
|
chartClickConfig?: ClickActionsConfig['chart'];
|
|
55
|
+
timeSeriesSettings: TimeSeriesSettingsType;
|
|
56
|
+
setTimeSeriesSettings: React.Dispatch<React.SetStateAction<TimeSeriesSettingsType>>;
|
|
13
57
|
};
|
|
14
|
-
export declare const ChartTab: ({ data, isLoading, headerChild,
|
|
58
|
+
export declare const ChartTab: ({ labels, datasets, funnelData, chartType, setChartType, data, setXAxis, setYAxisList, yAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, customSettings, setCustomSettings, axisSettings, setAxisSettings, isLoading, backGroundColor, setBackGroundColor, headerChild, tableSettings, setTableSettings, tableName, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, setTimeSeriesSettings, timeSeriesSettings, }: Props) => JSX.Element;
|
|
15
59
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FloatingDropDownOption, RlsCondition } from '@/types';
|
|
3
|
-
type Props = {
|
|
3
|
+
declare type Props = {
|
|
4
4
|
rlsConditions?: RlsCondition[] | undefined;
|
|
5
5
|
onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
|
|
6
6
|
companyId: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from './components';
|
|
2
|
+
import { MetricCardProps } from './components/MetricCard';
|
|
3
3
|
import { ClientType } from '@/types/app';
|
|
4
4
|
import { ThemeType } from '@/utils/theme';
|
|
5
5
|
import { EmbeddedDashboardMetricsQuery } from '@/utils/generated/graphql';
|
|
6
6
|
export declare const GridLayout: React.ComponentClass<import("react-grid-layout").ResponsiveProps & import("react-grid-layout").WidthProviderProps, any>;
|
|
7
|
-
export type ExternalMetricListProps = {
|
|
7
|
+
export declare type ExternalMetricListProps = {
|
|
8
8
|
chartColors?: string[];
|
|
9
9
|
globalFilters?: MetricCardProps['globalFilters'];
|
|
10
10
|
client: ClientType['value'];
|
|
11
11
|
companyId: string;
|
|
12
|
-
isAllowedToUpdateMetrics?: boolean;
|
|
13
12
|
isAllowedToDeleteMetrics?: boolean;
|
|
13
|
+
isAllowedToUpdateMetrics?: boolean;
|
|
14
14
|
isAllowedToChangeLayout?: boolean;
|
|
15
15
|
isLiveMode: boolean;
|
|
16
16
|
isMetricListLoading?: boolean;
|
|
@@ -21,5 +21,6 @@ export type ExternalMetricListProps = {
|
|
|
21
21
|
companyTenancyType: string;
|
|
22
22
|
externalDashboardId: string;
|
|
23
23
|
externalDashboardPk: string;
|
|
24
|
+
workspaceId: string;
|
|
24
25
|
};
|
|
25
26
|
export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
|
package/dist/components/MetricList/components/{MetricCards/MetricCard.d.ts → MetricCard.d.ts}
RENAMED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExternalMetrics } from '@/utils/generated/graphql';
|
|
3
3
|
import { ClientType } from '@/types/app';
|
|
4
|
+
import { MetricChartProps } from '@/components/MetricChart';
|
|
4
5
|
import { FilterFieldType } from '@/components/FilterField';
|
|
5
|
-
export type MetricCardProps = {
|
|
6
|
+
export declare type MetricCardProps = {
|
|
6
7
|
globalFilters?: {
|
|
7
8
|
tableName: string;
|
|
8
9
|
filters: FilterFieldType[];
|
|
9
10
|
};
|
|
10
11
|
metricItem: any;
|
|
11
12
|
client: ClientType['value'];
|
|
12
|
-
onMaximize: (
|
|
13
|
-
param: any;
|
|
14
|
-
filterValues: Record<string, string>;
|
|
15
|
-
}) => void;
|
|
13
|
+
onMaximize: (chart: MetricChartProps) => void;
|
|
16
14
|
colors?: string[];
|
|
17
15
|
param?: any;
|
|
18
16
|
companyTenancyType: string;
|
|
19
17
|
renderHeaderName?: (name: string) => JSX.Element;
|
|
20
18
|
onArchive?: (metricId: string) => void;
|
|
19
|
+
onEdit?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
20
|
+
onTableView?: (metric: ExternalMetrics, metricData?: Record<string, any>[]) => void;
|
|
21
|
+
onDownloadRawCsv?: (metric: ExternalMetrics, filterValues: Record<string, any>) => void;
|
|
21
22
|
};
|
|
22
23
|
export declare const MetricCard: React.FC<MetricCardProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from '@/components/MetricList/components/
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
3
|
export declare const SingleValueCard: React.FC<Omit<MetricCardProps, 'onMaximize'>>;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export * from './MetricList';
|
|
2
|
-
export * from './components';
|
|
2
|
+
export * from './components/MetricCard';
|
|
3
|
+
export * from './components/SingleValueCard';
|
|
4
|
+
export * from './components/ArchiveMetricModal';
|
|
5
|
+
export * from './components/LayoutAlert';
|
|
6
|
+
export * from './components/TableViewModal';
|
|
7
|
+
export * from './components/DownloadRawCsvModal';
|