@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.
Files changed (89) hide show
  1. package/README.md +26 -26
  2. package/dist/components/Alert/index.d.ts +1 -1
  3. package/dist/components/ChartModal/ChartConfig.d.ts +16 -6
  4. package/dist/components/ChartModal/ChartModalOptions.d.ts +5 -7
  5. package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +1 -1
  6. package/dist/components/ChartPopup/index.d.ts +1 -1
  7. package/dist/components/Charts/BarChart.d.ts +1 -1
  8. package/dist/components/Charts/LineChart.d.ts +1 -1
  9. package/dist/components/DataType/index.d.ts +1 -1
  10. package/dist/components/DateRangePicker/index.d.ts +1 -1
  11. package/dist/components/Error/index.d.ts +1 -1
  12. package/dist/components/ExternalMetricForm/index.d.ts +1 -1
  13. package/dist/components/FilterDropDown/index.d.ts +2 -2
  14. package/dist/components/FilterField/index.d.ts +2 -2
  15. package/dist/components/FloatingDropDown/index.d.ts +2 -2
  16. package/dist/components/FullScreenChart/index.d.ts +4 -3
  17. package/dist/components/GlobalFilters/AddFilter.d.ts +2 -2
  18. package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
  19. package/dist/components/GlobalFilters/NumberFilterField.d.ts +1 -1
  20. package/dist/components/GlobalFilters/index.d.ts +2 -2
  21. package/dist/components/Icons/index.d.ts +1 -1
  22. package/dist/components/InfoTooltip/index.d.ts +1 -1
  23. package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +4 -4
  24. package/dist/components/MetricChart/CsvDownloadButton.d.ts +1 -1
  25. package/dist/components/MetricChart/MetricChart.d.ts +1 -1
  26. package/dist/components/MetricChart/index.d.ts +0 -1
  27. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
  28. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +26 -0
  29. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +38 -0
  30. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/index.d.ts +2 -0
  31. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -6
  32. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -1
  33. package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +1 -0
  34. package/dist/components/MetricFilterDropDown/index.d.ts +1 -1
  35. package/dist/components/MetricList/MetricList.d.ts +4 -3
  36. package/dist/components/MetricList/components/{DownloadRawCsvModal/index.d.ts → DownloadRawCsvModal.d.ts} +1 -1
  37. package/dist/components/MetricList/components/{LayoutAlert/index.d.ts → LayoutAlert.d.ts} +1 -1
  38. package/dist/components/MetricList/components/{MetricCards/MetricCard.d.ts → MetricCard.d.ts} +6 -5
  39. package/dist/components/MetricList/components/{MetricCards/SingleValueCard.d.ts → SingleValueCard.d.ts} +1 -1
  40. package/dist/components/MetricList/components/{TableViewModal/index.d.ts → TableViewModal.d.ts} +1 -1
  41. package/dist/components/MetricList/index.d.ts +6 -1
  42. package/dist/components/MetricTable/index.d.ts +1 -1
  43. package/dist/components/Modal/ModalFooter.d.ts +1 -1
  44. package/dist/components/PopoverMenu/index.d.ts +1 -1
  45. package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +1 -1
  46. package/dist/components/Select/index.d.ts +5 -5
  47. package/dist/components/Tab/index.d.ts +1 -1
  48. package/dist/components/Table/DebouncedInput.d.ts +1 -1
  49. package/dist/components/Table/index.d.ts +2 -4
  50. package/dist/components/TagInputField/index.d.ts +1 -1
  51. package/dist/components/TimeGrainField/index.d.ts +1 -1
  52. package/dist/components/ToggleButton/SwitchInput.d.ts +1 -1
  53. package/dist/components/ToggleButton/ToggleInput.d.ts +1 -1
  54. package/dist/components/ToggleButton/index.d.ts +1 -1
  55. package/dist/components/index.d.ts +0 -2
  56. package/dist/consts/metricOptions.d.ts +0 -4
  57. package/dist/containers/Dashboard/Dashboard.d.ts +1 -1
  58. package/dist/containers/Dashboard/DashboardProvider.d.ts +1 -1
  59. package/dist/helpers/getTimeFilterValue.d.ts +1 -1
  60. package/dist/helpers/timeseries.d.ts +6 -6
  61. package/dist/hooks/index.d.ts +0 -1
  62. package/dist/hooks/useClientDashboardLayout.d.ts +1 -1
  63. package/dist/hooks/useExternalMetric.d.ts +20 -3
  64. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +1 -1
  65. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  66. package/dist/hooks/useScheduleEmail.d.ts +1 -1
  67. package/dist/index.es.js +127470 -86236
  68. package/dist/index.umd.js +242 -298
  69. package/dist/style.css +1 -1
  70. package/dist/types/app.d.ts +61 -119
  71. package/dist/types/metricCreate.d.ts +87 -13
  72. package/dist/typings.d.ts +17 -0
  73. package/dist/utils/generated/graphql.d.ts +437 -437
  74. package/dist/utils/getChartAttributes.d.ts +8 -5
  75. package/dist/utils/handleSaveChartImage.d.ts +3 -0
  76. package/package.json +98 -110
  77. package/dist/components/Chart/SingleValueChart.d.ts +0 -16
  78. package/dist/components/Chart/index.d.ts +0 -21
  79. package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +0 -8
  80. package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +0 -9
  81. package/dist/components/ChartSettingsPopup/index.d.ts +0 -9
  82. package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +0 -9
  83. package/dist/components/MetricList/components/FullScreenView/index.d.ts +0 -18
  84. package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +0 -7
  85. package/dist/components/MetricList/components/index.d.ts +0 -8
  86. package/dist/hooks/useMetricCard.d.ts +0 -37
  87. package/dist/utils/getChartImage.d.ts +0 -3
  88. package/dist/utils/getChartOptions.d.ts +0 -7
  89. /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
- [![NPM](https://img.shields.io/npm/v/@databrainhq/plugin.svg)](https://www.npmjs.com/package/@databrainhq/plugin) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](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
+ [![NPM](https://img.shields.io/npm/v/@databrainhq/plugin.svg)](https://www.npmjs.com/package/@databrainhq/plugin) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](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,5 +1,5 @@
1
1
  import React from 'react';
2
- export type AlertProps = {
2
+ export declare type AlertProps = {
3
3
  text: string;
4
4
  children?: React.ReactNode;
5
5
  variant?: 'primary' | 'warning' | 'error' | 'success';
@@ -1,9 +1,19 @@
1
1
  import React from 'react';
2
- import { ChartSettingsType } from '@/types';
3
- type Props = {
4
- data?: Record<string, any>[];
5
- chartSettings: ChartSettingsType;
6
- setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
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, chartSettings, setChartSettings, }: Props) => JSX.Element;
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
- /// <reference types="react" />
2
- import { CHART_TYPES } from '@/consts';
3
- type ChartType = keyof typeof CHART_TYPES;
4
- type Props = {
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, onChartChange, isEnableTimeSeries, }: Props) => JSX.Element;
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 { GetUnderlyingData } from '@/types';
3
- type UnderlyingDataProps = {
3
+ declare type UnderlyingDataProps = {
4
4
  setShowUnderlyingData: React.Dispatch<React.SetStateAction<boolean>>;
5
5
  isShowUnderlyingData: boolean;
6
6
  value: any;
@@ -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,6 +1,6 @@
1
1
  import EChartsReact from 'echarts-for-react';
2
2
  import React from 'react';
3
- type Props = {
3
+ declare type Props = {
4
4
  data: {
5
5
  labels: string[] | undefined;
6
6
  datasets: {
@@ -1,7 +1,7 @@
1
1
  import EChartsReact from 'echarts-for-react';
2
2
  import React from 'react';
3
3
  import { AxisSettings, CustomSettings, LabelSettings, LegendSettings } from '@/types/app';
4
- type Props = {
4
+ declare type Props = {
5
5
  data: {
6
6
  labels: string[] | undefined;
7
7
  datasets: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ declare type Props = {
3
3
  datatype: string;
4
4
  className?: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type Props = {
2
+ declare type Props = {
3
3
  label: string;
4
4
  onChange?: (option: {
5
5
  startDate: Date | undefined;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type ErrorMessageProps = {
2
+ declare type ErrorMessageProps = {
3
3
  message?: string;
4
4
  };
5
5
  export declare const Error: ({ message }: ErrorMessageProps) => JSX.Element;
@@ -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 { ChartProps } from '@/components/Chart';
3
- type Props = ChartProps & {
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, ...rest }: Props) => JSX.Element;
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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type NumberFieldProps = {
2
+ declare type NumberFieldProps = {
3
3
  setAppliedFilters: any;
4
4
  column: {
5
5
  as: any;
@@ -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
- fileName?: string;
8
+ id: string;
9
9
  };
10
- export declare const ChartImageDownloadButton: ({ className, iconClass, fileName, text, chartRef, }: DownloadButtonProps) => JSX.Element;
11
- export {};
10
+ declare const ChartImageDownloadButton: ({ className, iconClass, text, chartRef, id, }: DownloadButtonProps) => JSX.Element;
11
+ export default ChartImageDownloadButton;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type CsvDownloadButtonProps = {
2
+ declare type CsvDownloadButtonProps = {
3
3
  className?: string;
4
4
  data: Record<string, string>[];
5
5
  fileName: string;
@@ -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,2 @@
1
1
  export * from './CsvDownloadButton';
2
2
  export * from './MetricChart';
3
- export * from './ChartImageDownloadButton';
@@ -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, chartSettings, setChartSettings, isUpdateMetric, }: MetricOutputProps) => JSX.Element;
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 {};
@@ -0,0 +1,2 @@
1
+ export * from './ChartConfigure';
2
+ export * from './ChartSettings';
@@ -1,15 +1,59 @@
1
1
  import React from 'react';
2
- import { ClickActionsConfig, ChartSettingsType } from '@/types';
3
- type Props = {
4
- data?: Record<string, any>[];
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, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, }: Props) => JSX.Element;
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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ declare type Props = {
3
3
  previewTableDataList: any[] | undefined;
4
4
  outpuTableData: any[] | undefined;
5
5
  isOutputLoading: boolean;
@@ -1,3 +1,4 @@
1
1
  export * from './TableTab/components';
2
+ export * from './ChartTab/components';
2
3
  export * from './ChartTab';
3
4
  export * from './TableTab';
@@ -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>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ExternalMetrics } from '@/utils/generated/graphql';
3
- type Props = {
3
+ declare type Props = {
4
4
  onCloseModal: (value: boolean) => void;
5
5
  isShowRawCsvModal: boolean;
6
6
  metricItem?: ExternalMetrics;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export type LayoutAlertProps = {
2
+ export declare type LayoutAlertProps = {
3
3
  onCancel: () => void;
4
4
  onSave: () => void;
5
5
  };
@@ -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: (metric: ExternalMetrics, rlsFilters?: {
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/MetricCards/MetricCard';
2
+ import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
3
3
  export declare const SingleValueCard: React.FC<Omit<MetricCardProps, 'onMaximize'>>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ declare type Props = {
3
3
  metricData?: Record<string, any>[];
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
@@ -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';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ declare type Props = {
3
3
  data: any;
4
4
  isError: boolean;
5
5
  };