@databrainhq/plugin 0.9.19 → 0.9.20

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/Chart/SingleValueChart.d.ts +16 -0
  4. package/dist/components/Chart/index.d.ts +21 -0
  5. package/dist/components/ChartModal/ChartConfig.d.ts +6 -16
  6. package/dist/components/ChartModal/ChartModalOptions.d.ts +7 -5
  7. package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +1 -1
  8. package/dist/components/ChartPopup/index.d.ts +1 -1
  9. package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +8 -0
  10. package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +9 -0
  11. package/dist/components/ChartSettingsPopup/index.d.ts +9 -0
  12. package/dist/components/Charts/BarChart.d.ts +1 -1
  13. package/dist/components/Charts/LineChart.d.ts +1 -1
  14. package/dist/components/DataType/index.d.ts +1 -1
  15. package/dist/components/DateRangePicker/index.d.ts +1 -1
  16. package/dist/components/Error/index.d.ts +1 -1
  17. package/dist/components/ExternalMetricForm/index.d.ts +1 -1
  18. package/dist/components/FilterDropDown/index.d.ts +2 -2
  19. package/dist/components/FilterField/index.d.ts +2 -2
  20. package/dist/components/FloatingDropDown/index.d.ts +2 -2
  21. package/dist/components/FullScreenChart/index.d.ts +3 -4
  22. package/dist/components/GlobalFilters/AddFilter.d.ts +2 -2
  23. package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
  24. package/dist/components/GlobalFilters/NumberFilterField.d.ts +1 -1
  25. package/dist/components/GlobalFilters/index.d.ts +2 -2
  26. package/dist/components/Icons/index.d.ts +1 -1
  27. package/dist/components/InfoTooltip/index.d.ts +1 -1
  28. package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +4 -4
  29. package/dist/components/MetricChart/CsvDownloadButton.d.ts +1 -1
  30. package/dist/components/MetricChart/MetricChart.d.ts +1 -1
  31. package/dist/components/MetricChart/index.d.ts +1 -0
  32. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
  33. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +6 -50
  34. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -1
  35. package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +0 -1
  36. package/dist/components/MetricFilterDropDown/index.d.ts +1 -1
  37. package/dist/components/MetricList/MetricList.d.ts +3 -4
  38. package/dist/components/MetricList/components/{DownloadRawCsvModal.d.ts → DownloadRawCsvModal/index.d.ts} +1 -1
  39. package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +9 -0
  40. package/dist/components/MetricList/components/FullScreenView/index.d.ts +18 -0
  41. package/dist/components/MetricList/components/{LayoutAlert.d.ts → LayoutAlert/index.d.ts} +1 -1
  42. package/dist/components/MetricList/components/{MetricCard.d.ts → MetricCards/MetricCard.d.ts} +5 -6
  43. package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +7 -0
  44. package/dist/components/MetricList/components/{SingleValueCard.d.ts → MetricCards/SingleValueCard.d.ts} +1 -1
  45. package/dist/components/MetricList/components/{TableViewModal.d.ts → TableViewModal/index.d.ts} +1 -1
  46. package/dist/components/MetricList/components/index.d.ts +8 -0
  47. package/dist/components/MetricList/index.d.ts +1 -6
  48. package/dist/components/MetricTable/index.d.ts +1 -1
  49. package/dist/components/Modal/ModalFooter.d.ts +1 -1
  50. package/dist/components/PopoverMenu/index.d.ts +1 -1
  51. package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +1 -1
  52. package/dist/components/Select/index.d.ts +5 -5
  53. package/dist/components/Tab/index.d.ts +1 -1
  54. package/dist/components/Table/DebouncedInput.d.ts +1 -1
  55. package/dist/components/Table/index.d.ts +4 -2
  56. package/dist/components/TagInputField/index.d.ts +1 -1
  57. package/dist/components/TimeGrainField/index.d.ts +1 -1
  58. package/dist/components/ToggleButton/SwitchInput.d.ts +1 -1
  59. package/dist/components/ToggleButton/ToggleInput.d.ts +1 -1
  60. package/dist/components/ToggleButton/index.d.ts +1 -1
  61. package/dist/components/index.d.ts +2 -0
  62. package/dist/consts/metricOptions.d.ts +4 -0
  63. package/dist/containers/Dashboard/Dashboard.d.ts +1 -1
  64. package/dist/containers/Dashboard/DashboardProvider.d.ts +1 -1
  65. package/dist/helpers/getTimeFilterValue.d.ts +1 -1
  66. package/dist/helpers/timeseries.d.ts +6 -6
  67. package/dist/hooks/index.d.ts +1 -0
  68. package/dist/hooks/useClientDashboardLayout.d.ts +1 -1
  69. package/dist/hooks/useExternalMetric.d.ts +3 -20
  70. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +1 -1
  71. package/dist/hooks/useMetricCard.d.ts +37 -0
  72. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  73. package/dist/hooks/useScheduleEmail.d.ts +1 -1
  74. package/dist/index.es.js +86942 -128170
  75. package/dist/index.umd.js +298 -242
  76. package/dist/style.css +1 -1
  77. package/dist/types/app.d.ts +119 -61
  78. package/dist/types/metricCreate.d.ts +13 -87
  79. package/dist/utils/generated/graphql.d.ts +437 -437
  80. package/dist/utils/getChartAttributes.d.ts +5 -8
  81. package/dist/utils/getChartImage.d.ts +3 -0
  82. package/dist/utils/getChartOptions.d.ts +7 -0
  83. package/package.json +110 -98
  84. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +0 -26
  85. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +0 -38
  86. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/index.d.ts +0 -2
  87. package/dist/typings.d.ts +0 -17
  88. package/dist/utils/handleSaveChartImage.d.ts +0 -3
  89. /package/dist/components/MetricList/components/{ArchiveMetricModal.d.ts → ArchiveMetricModal/index.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 declare type AlertProps = {
2
+ export type AlertProps = {
3
3
  text: string;
4
4
  children?: React.ReactNode;
5
5
  variant?: 'primary' | 'warning' | 'error' | 'success';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { ClickActionsConfig } from '@/types';
3
+ export type SingleValueChartProps = {
4
+ settings?: {
5
+ fontSize?: number;
6
+ subHeaderFontSize?: number;
7
+ subHeaderShow?: boolean;
8
+ displayText?: string;
9
+ };
10
+ value: string | number;
11
+ hideBorder?: boolean;
12
+ chartClickConfig?: ClickActionsConfig['chart'];
13
+ className?: string;
14
+ };
15
+ declare const _default: React.MemoExoticComponent<({ value, settings, chartClickConfig, hideBorder, className, }: SingleValueChartProps) => JSX.Element>;
16
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ChartSettingsType } from '@/types';
3
+ export type ChartProps = {
4
+ chartOptions: ChartSettingsType;
5
+ data: Record<string, any>[];
6
+ events?: Record<string, Function>;
7
+ config?: Record<string, any>;
8
+ className?: string;
9
+ colors?: string[];
10
+ };
11
+ /**
12
+ * @name Chart - The metric visualization component.
13
+ * @prop chartOptions - the chart properties saved in the database.
14
+ * @prop data - the array of objects/records returned by the querying.
15
+ * @prop events (optional) - the click, change, etc. events to be added to the chart.
16
+ * @prop config (optional) - any additional chart specific props to be passed to the respective charts e.g. table, single value.
17
+ * @prop className (optional) - the usual className prop to provide styles.
18
+ * @prop colors (optional) - the admin provided chart color palettes.
19
+ * @returns JSX - chart visaulization content.
20
+ */
21
+ export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className }: ChartProps) => JSX.Element>;
@@ -1,19 +1,9 @@
1
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
- 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>>;
2
+ import { ChartSettingsType } from '@/types';
3
+ type Props = {
4
+ data?: Record<string, any>[];
5
+ chartSettings: ChartSettingsType;
6
+ setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
17
7
  };
18
- export declare const ChartConfig: ({ data, setXAxis, xAxis, yAxisList, setYAxisList, chartType, setStep, setMeasure, step, measure, setSankeyValues, setSettingsShow, singleValue, setSingleValue, }: Props) => JSX.Element;
8
+ export declare const ChartConfig: ({ data, chartSettings, setChartSettings, }: Props) => JSX.Element;
19
9
  export {};
@@ -1,8 +1,10 @@
1
- import React from 'react';
2
- declare type Props = {
3
- setChartType: React.Dispatch<React.SetStateAction<string>>;
4
- chartType: string;
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;
5
7
  isEnableTimeSeries: boolean;
6
8
  };
7
- export declare const ChartModalOptions: ({ chartType, setChartType, isEnableTimeSeries, }: Props) => JSX.Element;
9
+ export declare const ChartModalOptions: ({ chartType, onChartChange, isEnableTimeSeries, }: Props) => JSX.Element;
8
10
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { GetUnderlyingData } from '@/types';
3
- declare type UnderlyingDataProps = {
3
+ 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 declare type ChartPopupProps = React.PropsWithChildren & {
3
+ export type ChartPopupProps = React.PropsWithChildren & {
4
4
  getUnderlyingData: GetUnderlyingData;
5
5
  value: any;
6
6
  columnName: string;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ChartSettingsType } from '@/types/app';
3
+ type Props = {
4
+ chartSettings: ChartSettingsType;
5
+ setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
6
+ };
7
+ export declare const ChartConfigure: ({ chartSettings, setChartSettings }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ChartSettingsType } from '@/types/app';
3
+ type Props = {
4
+ data: any[] | undefined;
5
+ chartSettings: ChartSettingsType;
6
+ setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
7
+ };
8
+ export declare const ChartSettings: ({ data, chartSettings, setChartSettings, }: Props) => JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ChartSettingsType } from '@/types';
3
+ import { PopoverMenuProps } from '@/components/PopoverMenu';
4
+ export type ChartSettingsPopupProps = Pick<PopoverMenuProps, 'buttonClass' | 'menuClass' | 'menuContainerClass' | 'position'> & {
5
+ data?: Record<string, any>[];
6
+ settings: ChartSettingsType;
7
+ setSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
8
+ };
9
+ export declare const ChartSettingsPopup: ({ data, settings, setSettings, buttonClass, menuClass, menuContainerClass, position, }: ChartSettingsPopupProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import EChartsReact from 'echarts-for-react';
2
2
  import React from 'react';
3
- declare type Props = {
3
+ 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
- declare type Props = {
4
+ type Props = {
5
5
  data: {
6
6
  labels: string[] | undefined;
7
7
  datasets: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare type Props = {
2
+ type Props = {
3
3
  datatype: string;
4
4
  className?: string;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type Props = {
2
+ 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
- declare type ErrorMessageProps = {
2
+ 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
- declare type ExternalMetricProps = {
4
+ 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 declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDisabled'> & {
4
+ export 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 declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'
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 declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label' | 'integrationId' | 'integrationName'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
12
+ export 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 declare type FilterFieldType = {
2
+ export 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 declare type FilterFieldProps = {
9
+ export 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 declare type FloatingDropDownProps = {
3
+ export type FloatingDropDownProps = {
4
4
  onChange: (option: FloatingDropDownOption) => void;
5
5
  selectedOption: FloatingDropDownOption;
6
6
  options: FloatingDropDownOption[];
@@ -18,7 +18,7 @@ export declare 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 declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
21
+ export type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
22
22
  selectedOptions: FloatingDropDownOption[];
23
23
  onChange: (options: FloatingDropDownOption[]) => void;
24
24
  };
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { MetricChartProps } from '@/components/MetricChart';
3
- declare type Props = {
2
+ import { ChartProps } from '@/components/Chart';
3
+ type Props = ChartProps & {
4
4
  isShow: boolean;
5
5
  onCancel: () => void;
6
- chart?: MetricChartProps;
7
6
  };
8
- export declare const FullScreenChart: ({ isShow, onCancel, chart }: Props) => JSX.Element;
7
+ export declare const FullScreenChart: ({ isShow, onCancel, ...rest }: Props) => JSX.Element;
9
8
  export {};
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- declare type Filter = {
2
+ 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
- declare type Props = {
9
+ 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
- declare type AppliedFilterProps = {
3
+ 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
- declare type NumberFieldProps = {
2
+ 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/MetricCard';
2
+ import { MetricCardProps } from '@/components/MetricList/components';
3
3
  import { FilterType } from '@/types/app';
4
- declare type GlobalFiltersProps = {
4
+ 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
- declare type IconsProps = {
2
+ 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
- declare type TooltipProps = PropsWithChildren & {
2
+ 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
- declare type DownloadButtonProps = {
3
+ type DownloadButtonProps = {
4
4
  className?: string;
5
5
  iconClass?: string;
6
6
  text?: string;
7
7
  chartRef: React.RefObject<EChartsReact>;
8
- id: string;
8
+ fileName?: string;
9
9
  };
10
- declare const ChartImageDownloadButton: ({ className, iconClass, text, chartRef, id, }: DownloadButtonProps) => JSX.Element;
11
- export default ChartImageDownloadButton;
10
+ export declare const ChartImageDownloadButton: ({ className, iconClass, fileName, text, chartRef, }: DownloadButtonProps) => JSX.Element;
11
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type CsvDownloadButtonProps = {
2
+ 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 declare type MetricChartProps = {
5
+ export type MetricChartProps = {
6
6
  data: {
7
7
  labels: string[] | undefined;
8
8
  datasets: {
@@ -1,2 +1,3 @@
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, 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;
3
+ export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, }: MetricOutputProps) => JSX.Element;
@@ -1,59 +1,15 @@
1
1
  import React from 'react';
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>>;
2
+ import { ClickActionsConfig, ChartSettingsType } from '@/types';
3
+ type Props = {
4
+ data?: Record<string, any>[];
44
5
  isLoading: boolean;
45
- backGroundColor: BackgroundSettings;
46
- setBackGroundColor: React.Dispatch<React.SetStateAction<BackgroundSettings>>;
47
6
  headerChild?: JSX.Element;
48
7
  chartPopupChild?: JSX.Element;
49
- tableSettings: TableSettings;
50
- setTableSettings: React.Dispatch<React.SetStateAction<TableSettings>>;
51
- tableName?: string;
52
8
  chartColors?: string[];
9
+ chartSettings: ChartSettingsType;
10
+ setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
53
11
  handleChartRightClick?: (params: any) => void;
54
12
  chartClickConfig?: ClickActionsConfig['chart'];
55
- timeSeriesSettings: TimeSeriesSettingsType;
56
- setTimeSeriesSettings: React.Dispatch<React.SetStateAction<TimeSeriesSettingsType>>;
57
13
  };
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;
14
+ export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, }: Props) => JSX.Element;
59
15
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare type Props = {
2
+ type Props = {
3
3
  previewTableDataList: any[] | undefined;
4
4
  outpuTableData: any[] | undefined;
5
5
  isOutputLoading: boolean;
@@ -1,4 +1,3 @@
1
1
  export * from './TableTab/components';
2
- export * from './ChartTab/components';
3
2
  export * from './ChartTab';
4
3
  export * from './TableTab';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FloatingDropDownOption, RlsCondition } from '@/types';
3
- declare type Props = {
3
+ 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/MetricCard';
2
+ import { MetricCardProps } from './components';
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 declare type ExternalMetricListProps = {
7
+ export type ExternalMetricListProps = {
8
8
  chartColors?: string[];
9
9
  globalFilters?: MetricCardProps['globalFilters'];
10
10
  client: ClientType['value'];
11
11
  companyId: string;
12
- isAllowedToDeleteMetrics?: boolean;
13
12
  isAllowedToUpdateMetrics?: boolean;
13
+ isAllowedToDeleteMetrics?: boolean;
14
14
  isAllowedToChangeLayout?: boolean;
15
15
  isLiveMode: boolean;
16
16
  isMetricListLoading?: boolean;
@@ -21,6 +21,5 @@ export declare type ExternalMetricListProps = {
21
21
  companyTenancyType: string;
22
22
  externalDashboardId: string;
23
23
  externalDashboardPk: string;
24
- workspaceId: string;
25
24
  };
26
25
  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
- declare type Props = {
3
+ type Props = {
4
4
  onCloseModal: (value: boolean) => void;
5
5
  isShowRawCsvModal: boolean;
6
6
  metricItem?: ExternalMetrics;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import EChartsReact from 'echarts-for-react';
3
+ export type DownloadButtonProps = {
4
+ data: Record<string, any>[];
5
+ chartRef?: React.RefObject<EChartsReact>;
6
+ metricName: string;
7
+ onRawCsvData: () => void;
8
+ };
9
+ export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, }: DownloadButtonProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { ExternalMetrics } from '@/utils/generated/graphql';
3
+ export type FullScreenViewProps = {
4
+ metric: ExternalMetrics;
5
+ colors?: string[];
6
+ rlsFilters?: {
7
+ param: any;
8
+ filterValues: Record<string, string>;
9
+ };
10
+ onMinimize: () => void;
11
+ clientId: string;
12
+ tenancyLevel: string;
13
+ externalDashboardId: string;
14
+ userProvidedDashboardId: string;
15
+ companyId: string;
16
+ isAllowedToUpdateMetrics?: boolean;
17
+ };
18
+ export declare const FullScreenView: ({ metric, colors, rlsFilters, onMinimize, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, }: FullScreenViewProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type LayoutAlertProps = {
2
+ export type LayoutAlertProps = {
3
3
  onCancel: () => void;
4
4
  onSave: () => void;
5
5
  };
@@ -1,23 +1,22 @@
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';
5
4
  import { FilterFieldType } from '@/components/FilterField';
6
- export declare type MetricCardProps = {
5
+ export type MetricCardProps = {
7
6
  globalFilters?: {
8
7
  tableName: string;
9
8
  filters: FilterFieldType[];
10
9
  };
11
10
  metricItem: any;
12
11
  client: ClientType['value'];
13
- onMaximize: (chart: MetricChartProps) => void;
12
+ onMaximize: (metric: ExternalMetrics, rlsFilters?: {
13
+ param: any;
14
+ filterValues: Record<string, string>;
15
+ }) => void;
14
16
  colors?: string[];
15
17
  param?: any;
16
18
  companyTenancyType: string;
17
19
  renderHeaderName?: (name: string) => JSX.Element;
18
20
  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;
22
21
  };
23
22
  export declare const MetricCard: React.FC<MetricCardProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type NoDataLoadingProps = {
3
+ isDataLength: boolean;
4
+ isLoading: boolean;
5
+ };
6
+ export declare const NoDataLoading: React.MemoExoticComponent<({ isDataLength, isLoading }: NoDataLoadingProps) => JSX.Element>;
7
+ export {};