@databrainhq/plugin 0.7.0 → 0.7.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.
@@ -9,5 +9,5 @@ interface Props {
9
9
  onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
10
10
  title?: string;
11
11
  }
12
- declare const Button: ({ isDisabled, type, className, children, variant, size, onClick, title, }: Props) => JSX.Element;
13
- export default Button;
12
+ export declare const Button: ({ isDisabled, type, className, children, variant, size, onClick, title, }: Props) => JSX.Element;
13
+ export {};
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- declare const _default: React.MemoExoticComponent<({ datatype }: Record<string, string>) => JSX.Element>;
3
- export default _default;
1
+ /// <reference types="react" />
2
+ export declare const DataType: ({ datatype }: Record<string, string>) => JSX.Element;
@@ -2,5 +2,5 @@
2
2
  declare type ErrorMessageProps = {
3
3
  message?: string;
4
4
  };
5
- declare const Error: ({ message }: ErrorMessageProps) => JSX.Element;
6
- export default Error;
5
+ export declare const Error: ({ message }: ErrorMessageProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ErrorFallback: () => JSX.Element;
@@ -11,5 +11,5 @@ declare type ExternalMetricProps = {
11
11
  companyId: string;
12
12
  error?: string;
13
13
  };
14
- declare const _default: React.NamedExoticComponent<ExternalMetricProps>;
15
- export default _default;
14
+ export declare const ExternalMetricForm: React.FC<ExternalMetricProps>;
15
+ export {};
@@ -3,12 +3,14 @@ export declare type FilterFieldType = {
3
3
  column: string;
4
4
  operator: string;
5
5
  value?: string | string[] | number | number[] | boolean | boolean[] | null;
6
+ as?: string;
6
7
  };
7
- declare type FilterFieldProps = {
8
+ export declare type FilterFieldProps = {
8
9
  tableName: string;
9
10
  filter: {
10
11
  name: string;
11
12
  dataType: string;
13
+ as: string;
12
14
  };
13
15
  isResetted: boolean;
14
16
  onChange: (field: FilterFieldType) => void;
@@ -16,5 +18,4 @@ declare type FilterFieldProps = {
16
18
  };
17
19
  export declare const isInFilterOperator: (input: string) => boolean;
18
20
  export declare const isNullFilterOperator: (input: string) => boolean;
19
- declare const _default: React.NamedExoticComponent<FilterFieldProps>;
20
- export default _default;
21
+ export declare const FilterField: React.FC<FilterFieldProps>;
@@ -1,9 +1,5 @@
1
1
  import React from 'react';
2
- export declare type FloatingDropDownOption = {
3
- key?: string;
4
- label: string;
5
- value: string;
6
- };
2
+ import { FloatingDropDownOption } from '@/types';
7
3
  export declare type FloatingDropDownProps = {
8
4
  onChange: (option: FloatingDropDownOption) => void;
9
5
  selectedOption: FloatingDropDownOption;
@@ -15,8 +11,11 @@ export declare type FloatingDropDownProps = {
15
11
  isSearchEnabled?: boolean;
16
12
  children?: React.ReactNode;
17
13
  Icon?: any;
14
+ closeControl?: {
15
+ close: boolean;
16
+ };
18
17
  };
19
- export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, options, isDisabled, children, Icon, isSearchEnabled, }: FloatingDropDownProps) => JSX.Element;
18
+ export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, className, options, isDisabled, children, Icon, isSearchEnabled, closeControl, }: FloatingDropDownProps) => JSX.Element;
20
19
  export declare type MultiFloatingDropDownProps = Omit<FloatingDropDownProps, 'selectedOption' | 'onChange'> & {
21
20
  selectedOptions: FloatingDropDownOption[];
22
21
  onChange: (options: FloatingDropDownOption[]) => void;
@@ -5,6 +5,7 @@ declare type GlobalFiltersProps = {
5
5
  filters: FilterType[];
6
6
  companyId: string;
7
7
  onApply: (filters: MetricCardProps['globalFilters']) => void;
8
+ renderAdditionalHeaderContent?: () => JSX.Element;
8
9
  };
9
- declare const _default: React.NamedExoticComponent<GlobalFiltersProps>;
10
- export default _default;
10
+ export declare const GlobalFilters: React.FC<GlobalFiltersProps>;
11
+ export {};
@@ -1,5 +1,8 @@
1
- import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{
3
- children?: React.ReactNode;
4
- }>;
5
- export default _default;
1
+ import React, { PropsWithChildren } from 'react';
2
+ declare type TooltipProps = PropsWithChildren & {
3
+ content: JSX.Element;
4
+ className?: string;
5
+ };
6
+ export declare const Tooltip: React.FC<TooltipProps>;
7
+ export declare const InfoTooltip: React.FC<Omit<TooltipProps, 'content'>>;
8
+ export {};
@@ -1,25 +1,15 @@
1
1
  import { UseFormRegisterReturn } from 'react-hook-form';
2
2
  import React from 'react';
3
- interface Props {
4
- id?: string;
5
- value?: string;
6
- name?: string;
7
- placeholder?: string;
3
+ interface Props extends React.HTMLProps<HTMLInputElement> {
8
4
  label?: string;
9
- type: string;
10
- onBlur?: () => void;
11
- onFocus?: () => void;
12
- onKeyDown?: () => void;
13
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
5
+ labelVariant?: 'floating' | 'static';
14
6
  register?: UseFormRegisterReturn;
15
- defaultValue?: string | number | readonly string[] | undefined;
16
7
  error?: any;
17
8
  icon?: any;
18
- checked?: boolean;
19
9
  isDisabled?: boolean;
20
10
  labelClass?: string;
21
11
  inputClass?: string;
22
- className?: string;
12
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
23
13
  }
24
- declare const InputField: ({ id, name, value, placeholder, label, type, onBlur, onFocus, onChange, onKeyDown, defaultValue, register, error, icon, checked, isDisabled, labelClass, inputClass, className, }: Props) => JSX.Element;
25
- export default InputField;
14
+ export declare const InputField: ({ type, register, error, icon, label, isDisabled, labelClass, inputClass, className, labelVariant, ...rest }: Props) => JSX.Element;
15
+ export {};
@@ -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, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, updateGroup, isEnableGroupBy, backGroundColor, setBackGroundColor, }: MetricOutputProps) => JSX.Element;
3
+ export declare const MetricOutput: ({ data, error, isLoading, labels, funnelData, chartType, datasets, setChartType, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, updateGroup, isEnableGroupBy, backGroundColor, setBackGroundColor, moreTabs, }: MetricOutputProps) => JSX.Element;
@@ -13,5 +13,6 @@ export declare type MetricCardProps = {
13
13
  colors?: string[];
14
14
  param?: any;
15
15
  companyTenancyType: string;
16
+ renderHeaderName?: (name: string) => JSX.Element;
16
17
  };
17
18
  export declare const MetricCard: React.FC<MetricCardProps>;
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- declare const SearchTab: ({ setSearchKeyword, className }: any) => JSX.Element;
3
- export default SearchTab;
2
+ export declare const SearchTab: ({ setSearchKeyword, className }: any) => JSX.Element;
@@ -6,5 +6,5 @@ declare type TabProps = {
6
6
  className?: string;
7
7
  tabText?: string;
8
8
  };
9
- declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, }: TabProps) => JSX.Element;
10
- export default Tab;
9
+ export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, }: TabProps) => JSX.Element;
10
+ export {};
@@ -4,5 +4,5 @@ declare type Props = {
4
4
  isLoading: boolean;
5
5
  error: string;
6
6
  };
7
- declare const Table: ({ data, isLoading, error }: Props) => JSX.Element;
8
- export default Table;
7
+ export declare const Table: ({ data, isLoading, error }: Props) => JSX.Element;
8
+ export {};
@@ -4,7 +4,7 @@ interface Props {
4
4
  variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
5
5
  children?: React.ReactNode;
6
6
  onClick?: () => void;
7
- styleClass: 'primary' | 'secondary' | 'tertiary' | 'font-14' | 'font-14a' | 'font-14b' | 'font-14c' | 'font-15' | 'font-18' | 'font-20' | 'font-34' | 'custom';
7
+ styleClass: 'primary' | 'secondary' | 'tertiary' | 'font-14' | 'font-14a' | 'font-14b' | 'font-14c' | 'font-14d' | 'font-15' | 'font-18' | 'font-20' | 'font-34' | 'custom';
8
8
  }
9
- declare const Text: ({ className, variant, styleClass, children, onClick, }: Props) => JSX.Element;
10
- export default Text;
9
+ export declare const Text: ({ className, variant, styleClass, children, onClick, }: Props) => JSX.Element;
10
+ export {};
@@ -15,5 +15,5 @@ interface Props {
15
15
  onBlur?: any;
16
16
  className?: string;
17
17
  }
18
- declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, }: Props) => JSX.Element;
19
- export default TextAreaField;
18
+ export declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, }: Props) => JSX.Element;
19
+ export {};
@@ -9,5 +9,5 @@ declare type Props = {
9
9
  isDisabled?: boolean;
10
10
  onChange?: (value: string) => void;
11
11
  };
12
- declare const TimeGrainField: ({ isShowlabel, timeGrainValue, setTimeGrainValue, register, className, isDisabled, onChange, }: Props) => JSX.Element;
13
- export default TimeGrainField;
12
+ export declare const TimeGrainField: ({ isShowlabel, timeGrainValue, setTimeGrainValue, register, className, isDisabled, onChange, }: Props) => JSX.Element;
13
+ export {};
@@ -8,5 +8,5 @@ declare type SwitchButtonProps = {
8
8
  labelClassName?: string;
9
9
  defaultEnabled?: boolean;
10
10
  };
11
- declare const _default: React.NamedExoticComponent<SwitchButtonProps>;
12
- export default _default;
11
+ export declare const ToggleButton: React.FC<SwitchButtonProps>;
12
+ export {};
@@ -0,0 +1,28 @@
1
+ export * from './Button';
2
+ export * from './ChartModal';
3
+ export * from './DataType';
4
+ export * from './Error';
5
+ export * from './ErrorFallback';
6
+ export * from './ExternalMetricForm';
7
+ export * from './FilterDropDown';
8
+ export * from './FloatingDropDown';
9
+ export * from './FullScreenChart';
10
+ export * from './FilterField';
11
+ export * from './GlobalFilters';
12
+ export * from './InfoTooltip';
13
+ export * from './InputField';
14
+ export * from './MetricChart';
15
+ export * from './MetricCreation';
16
+ export * from './MetricFilters';
17
+ export * from './MetricList';
18
+ export * from './MetricTable';
19
+ export * from './Modal';
20
+ export * from './PopoverMenu';
21
+ export * from './SearchTab';
22
+ export * from './Select';
23
+ export * from './Tab';
24
+ export * from './Table';
25
+ export * from './Text';
26
+ export * from './TextAreaField';
27
+ export * from './TimeGrainField';
28
+ export * from './ToggleButton';
@@ -0,0 +1,4 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { DashboardProps } from './EmbededDashboard';
3
+ export declare const PluginProvider: React.FC<PropsWithChildren>;
4
+ export declare const Dashboard: React.FC<DashboardProps>;
@@ -0,0 +1,2 @@
1
+ export * from './Dashboard';
2
+ export * from './EmbededDashboard';
@@ -1 +1 @@
1
- export * from './Dashboard/EmbededDashboard';
1
+ export * from './Dashboard';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './containers';
2
- export * from './utils';
3
- export * from './consts';
4
- export * from './helpers';
5
- export * from './hooks';
6
- export * from './types';
2
+ export * as utils from './utils';
3
+ export * as consts from './consts';
4
+ export * as helpers from './helpers';
5
+ export * as hooks from './hooks';
6
+ export * as types from './types';
7
+ export * as Ui from './components';