@databrainhq/plugin 0.4.2

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 (85) hide show
  1. package/README.md +26 -0
  2. package/dist/components/Button/index.d.ts +13 -0
  3. package/dist/components/ChartModal/ChartConfig.d.ts +18 -0
  4. package/dist/components/ChartModal/ChartModalOptions.d.ts +6 -0
  5. package/dist/components/ChartModal/SelectField.d.ts +2 -0
  6. package/dist/components/Charts/AreaChart.d.ts +2 -0
  7. package/dist/components/Charts/BarChart.d.ts +15 -0
  8. package/dist/components/Charts/BoxPlot.d.ts +2 -0
  9. package/dist/components/Charts/BubbleChart.d.ts +2 -0
  10. package/dist/components/Charts/ComboChart.d.ts +2 -0
  11. package/dist/components/Charts/DoughnutChart.d.ts +2 -0
  12. package/dist/components/Charts/FunnelChart.d.ts +2 -0
  13. package/dist/components/Charts/GaugeChart.d.ts +2 -0
  14. package/dist/components/Charts/Histogram.d.ts +2 -0
  15. package/dist/components/Charts/LineChart.d.ts +21 -0
  16. package/dist/components/Charts/PieChart.d.ts +2 -0
  17. package/dist/components/Charts/RowChart.d.ts +2 -0
  18. package/dist/components/Charts/SankeyChart.d.ts +2 -0
  19. package/dist/components/Charts/ScatterChart.d.ts +2 -0
  20. package/dist/components/Charts/SingleValueChart.d.ts +2 -0
  21. package/dist/components/Charts/StackedBarChart.d.ts +2 -0
  22. package/dist/components/Charts/SteppedAreaChart.d.ts +2 -0
  23. package/dist/components/Charts/TableChart.d.ts +2 -0
  24. package/dist/components/Charts/WaterfallChart.d.ts +2 -0
  25. package/dist/components/DataType/index.d.ts +3 -0
  26. package/dist/components/Error/index.d.ts +5 -0
  27. package/dist/components/ExternalMetricForm/index.d.ts +14 -0
  28. package/dist/components/FilterDropDown/index.d.ts +12 -0
  29. package/dist/components/FilterField/index.d.ts +20 -0
  30. package/dist/components/FloatingDropDown/index.d.ts +25 -0
  31. package/dist/components/FullScreenChart/index.d.ts +8 -0
  32. package/dist/components/InputField/index.d.ts +25 -0
  33. package/dist/components/MetricCard/index.d.ts +17 -0
  34. package/dist/components/MetricChart/CsvDownloadButton.d.ts +8 -0
  35. package/dist/components/MetricChart/index.d.ts +32 -0
  36. package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +4 -0
  37. package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +4 -0
  38. package/dist/components/MetricCreation/components/Dataset/index.d.ts +4 -0
  39. package/dist/components/MetricCreation/components/Header/index.d.ts +3 -0
  40. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +17 -0
  41. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +19 -0
  42. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +45 -0
  43. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +2 -0
  44. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +8 -0
  45. package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +3 -0
  46. package/dist/components/MetricCreation/index.d.ts +3 -0
  47. package/dist/components/MetricFilters/index.d.ts +10 -0
  48. package/dist/components/MetricList/index.d.ts +41 -0
  49. package/dist/components/MetricTable/index.d.ts +6 -0
  50. package/dist/components/Modal/ModalFooter.d.ts +3 -0
  51. package/dist/components/Modal/index.d.ts +10 -0
  52. package/dist/components/PopoverMenu/index.d.ts +12 -0
  53. package/dist/components/SearchTab/index.d.ts +2 -0
  54. package/dist/components/Select/index.d.ts +45 -0
  55. package/dist/components/SingleValueCard/index.d.ts +4 -0
  56. package/dist/components/Tab/index.d.ts +8 -0
  57. package/dist/components/Table/index.d.ts +7 -0
  58. package/dist/components/Text/index.d.ts +10 -0
  59. package/dist/components/TextAreaField/index.d.ts +18 -0
  60. package/dist/components/TimeGrainField/index.d.ts +12 -0
  61. package/dist/components/ToggleButton/index.d.ts +12 -0
  62. package/dist/consts/index.d.ts +37 -0
  63. package/dist/consts/metricOptions.d.ts +17 -0
  64. package/dist/containers/Dashboard/index.d.ts +5 -0
  65. package/dist/containers/index.d.ts +1 -0
  66. package/dist/helpers/getTimeFilterValue.d.ts +8 -0
  67. package/dist/helpers/groupBy.d.ts +2 -0
  68. package/dist/hooks/useEmbeddedDashboard.d.ts +46 -0
  69. package/dist/hooks/useExternalMetric.d.ts +38 -0
  70. package/dist/hooks/useGenerateDatasetMetrics.d.ts +14 -0
  71. package/dist/hooks/useOutsideAlerter.d.ts +7 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.es.js +101669 -0
  74. package/dist/index.umd.js +322 -0
  75. package/dist/style.css +1 -0
  76. package/dist/types/index.d.ts +83 -0
  77. package/dist/types/metricCreate.d.ts +108 -0
  78. package/dist/typings.d.ts +17 -0
  79. package/dist/utils/arrayToCsvString.d.ts +7 -0
  80. package/dist/utils/colors.d.ts +2 -0
  81. package/dist/utils/fetcher.d.ts +1 -0
  82. package/dist/utils/generated/graphql.d.ts +1616 -0
  83. package/dist/utils/getChartAttributes.d.ts +27 -0
  84. package/dist/utils/getFormattedDataType.d.ts +2 -0
  85. package/package.json +99 -0
package/README.md ADDED
@@ -0,0 +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
+ VITE_END_POINT="GET YOUR END POINT FROM DATABRAIN MANAGER" npm install github: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)
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ isDisabled?: boolean;
4
+ type: 'button' | 'submit' | 'reset';
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ variant: 'primary' | 'secondary' | 'reject' | 'custom' | 'outlined' | 'tertiary';
8
+ size?: 'xs' | 'small' | 'default' | 'medium' | 'large' | '11rem' | 'none';
9
+ onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
10
+ title?: string;
11
+ }
12
+ declare const Button: ({ isDisabled, type, className, children, variant, size, onClick, title }: Props) => any;
13
+ export default Button;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ data: any[] | undefined;
4
+ chartType: string;
5
+ setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
6
+ setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
7
+ xAxis: string | undefined;
8
+ setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
9
+ setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
10
+ step: string | undefined;
11
+ measure: string | undefined;
12
+ setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
13
+ singleValue: string | undefined;
14
+ setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
15
+ setSettingsShow: React.Dispatch<React.SetStateAction<boolean>>;
16
+ };
17
+ declare const _default: React.MemoExoticComponent<({ data, setXAxis, xAxis, setYAxisList, chartType, setStep, setMeasure, step, measure, setSankeyValues, setSettingsShow, singleValue, setSingleValue }: Props) => any>;
18
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ setChartType: React.Dispatch<React.SetStateAction<string>>;
4
+ };
5
+ declare const ChartModalOptions: ({ setChartType }: Props) => any;
6
+ export default ChartModalOptions;
@@ -0,0 +1,2 @@
1
+ declare const SelectField: ({ value, options, control }: any) => any;
2
+ export default SelectField;
@@ -0,0 +1,2 @@
1
+ declare const AreaChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default AreaChart;
@@ -0,0 +1,15 @@
1
+ declare type Props = {
2
+ data: {
3
+ labels: string[] | undefined;
4
+ datasets: {
5
+ label: string;
6
+ data: any[] | undefined;
7
+ borderColor: string;
8
+ }[] | undefined;
9
+ };
10
+ colors?: string[];
11
+ updateGroup?: (value: string) => void;
12
+ isEnableGroupBy?: boolean;
13
+ };
14
+ declare const BarChart: ({ data, colors, updateGroup, isEnableGroupBy }: Props) => any;
15
+ export default BarChart;
@@ -0,0 +1,2 @@
1
+ declare const BoxPlot: ({ data, margins, legendSettings, axisSettings, enableSaveAs, colors }: any) => any;
2
+ export default BoxPlot;
@@ -0,0 +1,2 @@
1
+ declare const BubbleChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default BubbleChart;
@@ -0,0 +1,2 @@
1
+ declare const ComboChart: ({ data, margins, legendSettings, labelSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default ComboChart;
@@ -0,0 +1,2 @@
1
+ declare const DoughnutChart: ({ data, margins, legendSettings, labelSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default DoughnutChart;
@@ -0,0 +1,2 @@
1
+ declare const FunnelChart: ({ funnelData, margins, legendSettings, labelSettings, colors }: any) => any;
2
+ export default FunnelChart;
@@ -0,0 +1,2 @@
1
+ declare const GaugeChart: ({ gaugeData, margins, legendSettings, enableSaveAs, colors }: any) => any;
2
+ export default GaugeChart;
@@ -0,0 +1,2 @@
1
+ declare const Histogram: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default Histogram;
@@ -0,0 +1,21 @@
1
+ import { AxisSettings, LabelSettings, LegendSettings } from '@/types';
2
+ declare type Props = {
3
+ data: {
4
+ labels: string[] | undefined;
5
+ datasets: {
6
+ label: string;
7
+ data: any[] | undefined;
8
+ borderColor: string;
9
+ }[] | undefined;
10
+ };
11
+ margins: Record<string, number>;
12
+ legendSettings: LegendSettings;
13
+ labelSettings: LabelSettings;
14
+ axisSettings: AxisSettings;
15
+ enableSaveAs: boolean;
16
+ colors?: string[];
17
+ updateGroup?: (value: string) => void;
18
+ isEnableGroupBy?: boolean;
19
+ };
20
+ declare const LineChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: Props) => any;
21
+ export default LineChart;
@@ -0,0 +1,2 @@
1
+ declare const PieChart: ({ data, margins, legendSettings, labelSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default PieChart;
@@ -0,0 +1,2 @@
1
+ declare const RowChart: ({ data, margins, legendSettings, labelSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default RowChart;
@@ -0,0 +1,2 @@
1
+ declare const SankeyChart: ({ data, margins, enableSaveAs, colors }: any) => any;
2
+ export default SankeyChart;
@@ -0,0 +1,2 @@
1
+ declare const ScatterChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default ScatterChart;
@@ -0,0 +1,2 @@
1
+ declare const SingleValueChart: ({ data }: any) => any;
2
+ export default SingleValueChart;
@@ -0,0 +1,2 @@
1
+ declare const StackedBarChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default StackedBarChart;
@@ -0,0 +1,2 @@
1
+ declare const SteppedAreaChart: ({ data, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default SteppedAreaChart;
@@ -0,0 +1,2 @@
1
+ declare const TableChart: ({ data }: any) => any;
2
+ export default TableChart;
@@ -0,0 +1,2 @@
1
+ declare const WaterFallChart: ({ data, margins, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: any) => any;
2
+ export default WaterFallChart;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ datatype }: Record<string, string>) => any>;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ declare type ErrorMessageProps = {
2
+ message?: string;
3
+ };
4
+ declare const Error: ({ message }: ErrorMessageProps) => any;
5
+ export default Error;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { DashboardType } from '@/types';
4
+ declare type ExternalMetricProps = {
5
+ onSubmit: (values: FieldValues) => void;
6
+ defaultValues?: FieldValues;
7
+ onCancel: () => void;
8
+ isEmbedded?: boolean;
9
+ dashboardIds: DashboardType['id'][];
10
+ onDashboardChange: (selected: DashboardType['id'][]) => void;
11
+ companyId: string;
12
+ };
13
+ declare const _default: React.NamedExoticComponent<ExternalMetricProps>;
14
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { RlsFilterObjectType } from '@/types';
3
+ import { FloatingDropDownProps, MultiFloatingDropDownProps } from '@/components/FloatingDropDown';
4
+ export declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options' | 'isDisabled'> & {
5
+ companyId: string;
6
+ filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
7
+ autoSelected?: boolean;
8
+ };
9
+ export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
10
+ export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
11
+ declare const _default: React.MemoExoticComponent<({ companyId, filter, onChange, selectedOption, autoSelected, ...rest }: FilterDropDownProps) => any>;
12
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export declare type FilterFieldType = {
3
+ column: string;
4
+ operator: string;
5
+ value?: string | string[] | number | number[] | boolean | boolean[] | null;
6
+ };
7
+ declare type FilterFieldProps = {
8
+ tableName: string;
9
+ filter: {
10
+ name: string;
11
+ dataType: string;
12
+ };
13
+ isResetted: boolean;
14
+ onChange: (field: FilterFieldType) => void;
15
+ companyId: string;
16
+ };
17
+ export declare const isInFilterOperator: (input: string) => boolean;
18
+ export declare const isNullFilterOperator: (input: string) => boolean;
19
+ declare const _default: React.NamedExoticComponent<FilterFieldProps>;
20
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ export declare type FloatingDropDownOption = {
3
+ key?: string;
4
+ label: string;
5
+ value: string;
6
+ };
7
+ export declare type FloatingDropDownProps = {
8
+ onChange: (option: FloatingDropDownOption) => void;
9
+ selectedOption: FloatingDropDownOption;
10
+ options: FloatingDropDownOption[];
11
+ className?: string;
12
+ label?: string;
13
+ labelVariant?: 'floating' | 'static';
14
+ isDisabled?: boolean;
15
+ isSearchEnabled?: boolean;
16
+ children?: React.ReactNode;
17
+ Icon?: any;
18
+ };
19
+ export declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
20
+ selectedOptions: FloatingDropDownOption[];
21
+ onChange: (options: FloatingDropDownOption[]) => void;
22
+ };
23
+ export declare const MultiFloatingDropDown: React.FC<MultiFloatingDropDownProps>;
24
+ declare const _default: React.MemoExoticComponent<({ label, labelVariant, selectedOption, onChange, className, options, isDisabled, children, Icon, isSearchEnabled }: FloatingDropDownProps) => any>;
25
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { MetricChartProps } from '@/components/MetricChart';
2
+ declare type Props = {
3
+ isShow: boolean;
4
+ onCancel: () => void;
5
+ chart?: MetricChartProps;
6
+ };
7
+ declare const FullScreenChart: ({ isShow, onCancel, chart }: Props) => any;
8
+ export default FullScreenChart;
@@ -0,0 +1,25 @@
1
+ import { UseFormRegisterReturn } from 'react-hook-form';
2
+ import React from 'react';
3
+ interface Props {
4
+ id?: string;
5
+ value?: string;
6
+ name?: string;
7
+ placeholder?: string;
8
+ label?: string;
9
+ type: string;
10
+ onBlur?: () => void;
11
+ onFocus?: () => void;
12
+ onKeyDown?: () => void;
13
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ register?: UseFormRegisterReturn;
15
+ defaultValue?: string | number | readonly string[] | undefined;
16
+ error?: any;
17
+ icon?: any;
18
+ checked?: boolean;
19
+ isDisabled?: boolean;
20
+ labelClass?: string;
21
+ inputClass?: string;
22
+ className?: string;
23
+ }
24
+ declare const InputField: ({ id, name, value, placeholder, label, type, onBlur, onFocus, onChange, onKeyDown, defaultValue, register, error, icon, checked, isDisabled, labelClass, inputClass, className }: Props) => any;
25
+ export default InputField;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ClientType } from '@/types';
3
+ import { MetricChartProps } from '@/components/MetricChart';
4
+ import { FilterFieldType } from '@/components/FilterField';
5
+ export declare type MetricCardProps = {
6
+ globalFilters?: {
7
+ tableName: string;
8
+ filters: FilterFieldType[];
9
+ };
10
+ metricItem: any;
11
+ client: ClientType['value'];
12
+ onMaximize: (chart: MetricChartProps) => void;
13
+ param?: any;
14
+ colors?: string[];
15
+ };
16
+ declare const MetricCard: React.FC<MetricCardProps>;
17
+ export default MetricCard;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare type CsvDownloadButtonProps = {
3
+ className?: string;
4
+ data: Record<string, string>[];
5
+ fileName: string;
6
+ };
7
+ declare const _default: React.NamedExoticComponent<CsvDownloadButtonProps>;
8
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { AxisSettings, LabelSettings, LegendSettings } from '@/types';
2
+ export declare type MetricChartProps = {
3
+ data: {
4
+ labels: string[] | undefined;
5
+ datasets: {
6
+ label: string;
7
+ data: any[] | undefined;
8
+ borderColor: string;
9
+ }[] | undefined;
10
+ };
11
+ labels: string[] | undefined;
12
+ funnelData: ('' | {
13
+ value: any;
14
+ name: any;
15
+ } | undefined)[] | undefined;
16
+ chartType: string;
17
+ sankeyData: (any[] | undefined)[] | undefined;
18
+ singleValueData: ('' | {
19
+ value: any;
20
+ label: string;
21
+ } | undefined)[] | undefined;
22
+ margins: Record<string, number>;
23
+ legendSettings: LegendSettings;
24
+ labelSettings: LabelSettings;
25
+ axisSettings: AxisSettings;
26
+ enableSaveAs: boolean;
27
+ colors?: string[];
28
+ updateGroup?: (value: string) => void;
29
+ isEnableGroupBy?: boolean;
30
+ };
31
+ declare const MetricChart: ({ labels, data, chartType, funnelData, sankeyData, singleValueData, margins, legendSettings, labelSettings, axisSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy }: MetricChartProps) => any;
32
+ export default MetricChart;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConstructMetricProps } from '@/types/metricCreate';
3
+ declare const _default: React.MemoExoticComponent<({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, isEnableGroupBy, setSelectedGroupBy }: ConstructMetricProps) => any>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ConstructMetricProps } from '@/types/metricCreate';
3
+ declare const _default: React.MemoExoticComponent<({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, isEnableGroupBy, setEnableGroupBy, setSelectedGroupBy }: ConstructMetricProps) => any>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DatasetProps } from '@/types/metricCreate';
3
+ declare const _default: React.MemoExoticComponent<({ setselectTable, selectTable, tableList, columnList }: DatasetProps) => any>;
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { HeaderProps } from '@/types/metricCreate';
2
+ declare const Header: ({ setShowMetricCreateModal, isDisableSaveBtn, Heading, isDisableSqlBtn, setShowSaveMetricModal, setShowSqlModal }: HeaderProps) => any;
3
+ export default Header;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { AxisSettings, LabelSettings, LegendSettings } from '@/types';
3
+ declare type Props = {
4
+ setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
5
+ margins: Record<string, number>;
6
+ legendSettings: LegendSettings;
7
+ setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
8
+ labelSettings: LabelSettings;
9
+ setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
10
+ setConfigureShow: any;
11
+ axisSettings: AxisSettings;
12
+ setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
13
+ chartType: any;
14
+ setChartType: any;
15
+ };
16
+ declare const ChartConfigure: ({ setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, setConfigureShow, axisSettings, setAxisSettings, chartType, setChartType }: Props) => any;
17
+ export default ChartConfigure;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ data: any[] | undefined;
4
+ chartType: string;
5
+ setChartType: React.Dispatch<React.SetStateAction<string>>;
6
+ setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
7
+ setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
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>>;
17
+ };
18
+ declare const ChartSettings: ({ chartType, setChartType, data, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, singleValue, setSingleValue, setSettingsShow }: Props) => any;
19
+ export default ChartSettings;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { AxisSettings, LabelSettings, LegendSettings } from '@/types';
3
+ declare type Props = {
4
+ data: any[] | undefined;
5
+ labels: string[] | undefined;
6
+ funnelData: ('' | {
7
+ value: any;
8
+ name: any;
9
+ } | undefined)[] | undefined;
10
+ chartType: string;
11
+ datasets: {
12
+ label: string;
13
+ data: any[] | undefined;
14
+ borderColor: string;
15
+ }[] | undefined;
16
+ setChartType: React.Dispatch<React.SetStateAction<string>>;
17
+ setXAxis: React.Dispatch<React.SetStateAction<string | undefined>>;
18
+ setYAxisList: React.Dispatch<React.SetStateAction<string[] | undefined>>;
19
+ xAxis: string | undefined;
20
+ setMeasure: React.Dispatch<React.SetStateAction<string | undefined>>;
21
+ setStep: React.Dispatch<React.SetStateAction<string | undefined>>;
22
+ step: string | undefined;
23
+ measure: string | undefined;
24
+ setSankeyValues: React.Dispatch<React.SetStateAction<string[] | undefined>>;
25
+ sankeyData: (any[] | undefined)[] | undefined;
26
+ singleValue: string | undefined;
27
+ setSingleValue: React.Dispatch<React.SetStateAction<string | undefined>>;
28
+ singleValueData: ('' | {
29
+ value: any;
30
+ label: string;
31
+ } | undefined)[] | undefined;
32
+ setMargins: React.Dispatch<React.SetStateAction<Record<string, number>>>;
33
+ margins: Record<string, number>;
34
+ legendSettings: LegendSettings;
35
+ setLegendSettings: React.Dispatch<React.SetStateAction<LegendSettings>>;
36
+ labelSettings: LabelSettings;
37
+ setLabelSettings: React.Dispatch<React.SetStateAction<LabelSettings>>;
38
+ axisSettings: AxisSettings;
39
+ setAxisSettings: React.Dispatch<React.SetStateAction<AxisSettings>>;
40
+ updateGroup?: (value: string) => void;
41
+ isEnableGroupBy?: boolean;
42
+ isLoading: boolean;
43
+ };
44
+ declare const ChartTab: ({ labels, datasets, funnelData, chartType, setChartType, data, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, updateGroup, isLoading, isEnableGroupBy }: Props) => any;
45
+ export default ChartTab;
@@ -0,0 +1,2 @@
1
+ declare const InputTables: ({ previewTableDataList }: any) => any;
2
+ export default InputTables;
@@ -0,0 +1,8 @@
1
+ declare type Props = {
2
+ previewTableDataList: any[] | undefined;
3
+ outpuTableData: any[] | undefined;
4
+ isOutputLoading: boolean;
5
+ outputError: string;
6
+ };
7
+ declare const TableTab: ({ outpuTableData, outputError, isOutputLoading, previewTableDataList }: Props) => any;
8
+ export default TableTab;
@@ -0,0 +1,3 @@
1
+ import { MetricOutputProps } from '@/types/metricCreate';
2
+ declare const MetricOutput: ({ setAxisSettings, axisSettings, chartType, data, datasets, error, funnelData, isLoading, labelSettings, labels, legendSettings, margins, measure, previewTableDataList, sankeyData, setChartType, setLabelSettings, setLegendSettings, setMargins, setMeasure, setSankeyValues, setSingleValue, setStep, setXAxis, setYAxisList, singleValue, singleValueData, step, xAxis, isEnableGroupBy, updateGroup }: MetricOutputProps) => any;
3
+ export default MetricOutput;
@@ -0,0 +1,3 @@
1
+ import { EmbeddedMetricCreationProps } from '@/types/metricCreate';
2
+ declare const EmbeddedMetricCreation: ({ clientId, companyId, mode, externalDashboardId }: EmbeddedMetricCreationProps) => any;
3
+ export default EmbeddedMetricCreation;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { MetricCardProps } from '@/components/MetricCard';
3
+ import { FilterType } from '@/types';
4
+ declare type MetricFiltersProps = {
5
+ filters: FilterType[];
6
+ companyId: string;
7
+ onApply: (filters: MetricCardProps['globalFilters']) => void;
8
+ };
9
+ declare const _default: React.NamedExoticComponent<MetricFiltersProps>;
10
+ export default _default;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { MetricCardProps } from '@/components/MetricCard';
3
+ import { ClientType } from '@/types';
4
+ export declare type ExternalMetricListProps = {
5
+ globalFilters?: MetricCardProps['globalFilters'];
6
+ client: ClientType['value'];
7
+ company: string;
8
+ isLiveMode?: boolean;
9
+ params?: any;
10
+ isMetricListLoading?: boolean;
11
+ externalDashboardMetrics?: {
12
+ __typename?: 'externalDashboardMetrics';
13
+ externalMetricId: any;
14
+ externalDashboardId: any;
15
+ externalMetric: {
16
+ __typename?: 'externalMetrics';
17
+ chartOptions: any;
18
+ clientId?: string | null;
19
+ companyId: any;
20
+ companyIntegrationId: any;
21
+ createdAt: any;
22
+ createdBy?: string | null;
23
+ description: string;
24
+ id: any;
25
+ inputFields?: any | null;
26
+ integrationName: string;
27
+ isCreatedByClient: boolean;
28
+ isLive: boolean;
29
+ metricId: string;
30
+ metricQuery?: string | null;
31
+ name: string;
32
+ outputColumns?: string | null;
33
+ query: string;
34
+ resizeAttributes: any;
35
+ timeGrain?: string | null;
36
+ updatedAt: any;
37
+ };
38
+ }[] | undefined;
39
+ };
40
+ declare const _default: React.NamedExoticComponent<ExternalMetricListProps>;
41
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare type Props = {
2
+ data: any;
3
+ isError: boolean;
4
+ };
5
+ declare const MetricTable: ({ data, isError }: Props) => any;
6
+ export default MetricTable;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.NamedExoticComponent<any>;
3
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export interface ModalProps extends PropsWithChildren<any> {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ headerTitle?: string;
6
+ customHeader?: JSX.Element;
7
+ icon?: any;
8
+ }
9
+ declare const _default: React.NamedExoticComponent<ModalProps>;
10
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ declare type PopoverMenuProps = React.PropsWithChildren & {
3
+ className?: string;
4
+ menuClass?: string;
5
+ buttonClass?: string;
6
+ menuContainerClass?: string;
7
+ button: React.ReactNode;
8
+ isDisabled?: boolean;
9
+ 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';
10
+ };
11
+ declare const _default: React.NamedExoticComponent<PopoverMenuProps>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const SearchTab: ({ setSearchKeyword, className }: any) => any;
2
+ export default SearchTab;