@databrainhq/plugin 0.12.34 → 0.13.0-beta.1

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 (111) hide show
  1. package/dist/components/Accordion/index.d.ts +28 -0
  2. package/dist/components/Alert/index.d.ts +3 -2
  3. package/dist/components/Badge/index.d.ts +9 -0
  4. package/dist/components/Button/index.d.ts +6 -3
  5. package/dist/components/Chart/SingleValueChart.d.ts +1 -1
  6. package/dist/components/Chart/index.d.ts +4 -2
  7. package/dist/components/ChartSettingsPopup/ChartSettingsPopup.d.ts +2 -3
  8. package/dist/components/ChartSettingsPopup/components/ChartConfigure/PositionContainer.d.ts +7 -0
  9. package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +11 -3
  10. package/dist/components/ChartTypePanel/index.d.ts +15 -0
  11. package/dist/components/Checkbox/index.d.ts +10 -0
  12. package/dist/components/ColorField/{Index.d.ts → ColorField.d.ts} +2 -2
  13. package/dist/components/DateRangePicker/index.d.ts +3 -1
  14. package/dist/components/DraggableItem/index.d.ts +7 -0
  15. package/dist/components/DrillBreadCrumb/index.d.ts +3 -1
  16. package/dist/components/ExternalMetricForm/index.d.ts +1 -0
  17. package/dist/components/FilterDropDown/index.d.ts +13 -5
  18. package/dist/components/FloatingDropDown/index.d.ts +10 -14
  19. package/dist/components/FullScreenChart/index.d.ts +1 -1
  20. package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
  21. package/dist/components/GlobalFilters/Filters.d.ts +3 -2
  22. package/dist/components/GlobalFilters/HorizontalFilters.d.ts +3 -2
  23. package/dist/components/GlobalFilters/NumberFilterField.d.ts +3 -1
  24. package/dist/components/GlobalFilters/index.d.ts +4 -3
  25. package/dist/components/Icons/Logos/index.d.ts +14 -0
  26. package/dist/components/Icons/index.d.ts +6 -4
  27. package/dist/components/InfoTooltip/index.d.ts +6 -2
  28. package/dist/components/InputField/index.d.ts +6 -7
  29. package/dist/components/List/index.d.ts +20 -0
  30. package/dist/components/Menu/index.d.ts +30 -0
  31. package/dist/components/MetricChart/CsvDownloadButton.d.ts +2 -1
  32. package/dist/components/MetricCreation/components/Dataset/index.d.ts +1 -1
  33. package/dist/components/MetricCreation/components/Header/index.d.ts +1 -1
  34. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
  35. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +2 -1
  36. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -2
  37. package/dist/components/MetricCreation/components/Panels/ChartAppearancePanel.d.ts +18 -0
  38. package/dist/components/MetricCreation/components/Panels/FiltersPanel.d.ts +20 -0
  39. package/dist/components/MetricCreation/components/Panels/SortPanel.d.ts +15 -0
  40. package/dist/components/MetricFilterDropDown/index.d.ts +3 -1
  41. package/dist/components/MetricList/MetricList.d.ts +6 -1
  42. package/dist/components/MetricList/components/ArchiveMetricModal/index.d.ts +1 -1
  43. package/dist/components/MetricList/components/FullScreenView/index.d.ts +4 -5
  44. package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +4 -3
  45. package/dist/components/Modal/Modal.d.ts +1 -0
  46. package/dist/components/MultiSelectDropdown/index.d.ts +28 -0
  47. package/dist/components/Panel/index.d.ts +15 -0
  48. package/dist/components/PopoverMenu/index.d.ts +21 -5
  49. package/dist/components/RadioButton/index.d.ts +16 -0
  50. package/dist/components/SearchTab/index.d.ts +1 -1
  51. package/dist/components/Select/index.d.ts +2 -12
  52. package/dist/components/{ToggleButton → Switch}/SwitchInput.d.ts +1 -1
  53. package/dist/components/Switch/index.d.ts +10 -0
  54. package/dist/components/Table/index.d.ts +5 -1
  55. package/dist/components/Tabs/index.d.ts +37 -0
  56. package/dist/components/Text/index.d.ts +7 -6
  57. package/dist/components/TimeGrainField/index.d.ts +1 -1
  58. package/dist/components/index.d.ts +12 -1
  59. package/dist/consts/api.d.ts +2 -0
  60. package/dist/consts/app.d.ts +5 -0
  61. package/dist/consts/metricOptions.d.ts +71 -5
  62. package/dist/helpers/areArraysEqual.d.ts +1 -0
  63. package/dist/helpers/checkIsElementInViewport.d.ts +1 -0
  64. package/dist/helpers/generateTimeRangeWhereClause.d.ts +3 -1
  65. package/dist/helpers/index.d.ts +4 -0
  66. package/dist/helpers/timeseries.d.ts +2 -2
  67. package/dist/hooks/useDatasetMetric.d.ts +50 -0
  68. package/dist/hooks/useDrag.d.ts +9 -0
  69. package/dist/hooks/useDragAndDropState.d.ts +8 -0
  70. package/dist/hooks/useDrop.d.ts +14 -0
  71. package/dist/hooks/useMetricCard.d.ts +9 -7
  72. package/dist/hooks/useMetricConfig.d.ts +57 -0
  73. package/dist/hooks/useOutsideAlerter.d.ts +8 -1
  74. package/dist/queries/externalDashboard.mutation.d.ts +7 -1
  75. package/dist/queries/externalDashboard.query.d.ts +1 -1
  76. package/dist/queries/metric.query.d.ts +1 -1
  77. package/dist/types/app.d.ts +63 -6
  78. package/dist/types/dragAndDropProps.d.ts +42 -0
  79. package/dist/types/index.d.ts +1 -0
  80. package/dist/types/metricCreate.d.ts +218 -2
  81. package/dist/types/queryTypes.d.ts +10 -0
  82. package/dist/utils/colors.d.ts +1 -0
  83. package/dist/utils/getChartOptions.d.ts +1 -2
  84. package/dist/utils/index.d.ts +1 -0
  85. package/dist/webcomponents.es.js +90045 -88969
  86. package/dist/webcomponents.umd.js +266 -345
  87. package/package.json +108 -107
  88. package/dist/components/ChartModal/SelectField.d.ts +0 -2
  89. package/dist/components/Charts/AreaChart.d.ts +0 -3
  90. package/dist/components/Charts/BarChart.d.ts +0 -25
  91. package/dist/components/Charts/BoxPlot.d.ts +0 -3
  92. package/dist/components/Charts/BubbleChart.d.ts +0 -3
  93. package/dist/components/Charts/ComboChart.d.ts +0 -3
  94. package/dist/components/Charts/DoughnutChart.d.ts +0 -3
  95. package/dist/components/Charts/FunnelChart.d.ts +0 -3
  96. package/dist/components/Charts/GaugeChart.d.ts +0 -3
  97. package/dist/components/Charts/Histogram.d.ts +0 -3
  98. package/dist/components/Charts/LineChart.d.ts +0 -25
  99. package/dist/components/Charts/PieChart.d.ts +0 -3
  100. package/dist/components/Charts/RowChart.d.ts +0 -3
  101. package/dist/components/Charts/SankeyChart.d.ts +0 -3
  102. package/dist/components/Charts/ScatterChart.d.ts +0 -3
  103. package/dist/components/Charts/SingleValueChart/index.d.ts +0 -3
  104. package/dist/components/Charts/StackedBarChart.d.ts +0 -3
  105. package/dist/components/Charts/SteppedAreaChart.d.ts +0 -3
  106. package/dist/components/Charts/Table/TableChart.d.ts +0 -3
  107. package/dist/components/Charts/TimeSeriesChart.d.ts +0 -4
  108. package/dist/components/Charts/WaterfallChart.d.ts +0 -3
  109. package/dist/components/MetricChart/MetricChart.d.ts +0 -45
  110. package/dist/components/ToggleButton/ToggleInput.d.ts +0 -9
  111. package/dist/components/ToggleButton/index.d.ts +0 -14
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { CreateNewSort, FloatingDropDownOption } from '@/types';
3
+ type Props = {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ createdSorts: CreateNewSort[];
7
+ setCreatedSorts: React.Dispatch<React.SetStateAction<CreateNewSort[]>>;
8
+ columnOptions: FloatingDropDownOption[];
9
+ onApplySort: (onComplete: () => void, isClear?: boolean, index?: number) => void;
10
+ selectedTable: FloatingDropDownOption;
11
+ };
12
+ declare const SortPanel: ({ SortPanelProps: { isOpen, onClose, createdSorts, setCreatedSorts, columnOptions, onApplySort, selectedTable, }, }: {
13
+ SortPanelProps: Props;
14
+ }) => React.JSX.Element;
15
+ export default SortPanel;
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { FloatingDropDownOption, RlsCondition } from '@/types';
3
+ import { MetricCardProps } from '@/components/MetricList';
3
4
  type Props = {
4
5
  rlsConditions?: RlsCondition;
5
6
  onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
6
7
  workspaceId: string;
7
8
  clientId?: string;
8
9
  className?: string;
10
+ globalFilters?: MetricCardProps['globalFilters'];
9
11
  };
10
- export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, }: Props) => React.JSX.Element;
12
+ export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, globalFilters, }: Props) => React.JSX.Element;
11
13
  export default MetricFilterDropDown;
@@ -15,7 +15,6 @@ export type ExternalMetricListProps = {
15
15
  isMetricListLoading?: boolean;
16
16
  breakpoint: ThemeType['breakpoint'];
17
17
  layoutCols: ThemeType['metricLayoutCols'];
18
- adminLayout: Layout[];
19
18
  externalDashboardMetrics?: any;
20
19
  params?: any;
21
20
  appFilters?: any;
@@ -28,5 +27,11 @@ export type ExternalMetricListProps = {
28
27
  enableDownloadCsv?: boolean;
29
28
  enableEmailCsv?: boolean;
30
29
  enableMultiMetricFilters?: boolean;
30
+ layout: {
31
+ clientLayout: Layout[];
32
+ adminLayout: Layout[];
33
+ isLocked: boolean;
34
+ onChange: (layout: Layout[]) => void;
35
+ };
31
36
  };
32
37
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ModalProps } from '@/components/Modal';
2
+ import { ModalProps } from '@/components';
3
3
  export interface ArchiveMetricModalProps extends Omit<ModalProps, 'headerTitle'> {
4
4
  onArchive: () => void;
5
5
  isLoading: boolean;
@@ -4,13 +4,11 @@ import { MetricFilterOptionsType } from '@/types';
4
4
  export type FullScreenViewProps = {
5
5
  metric: ExternalMetrics;
6
6
  colors?: string[];
7
- rlsFilters?: {
8
- param: any;
9
- filterValues: Record<string, string>;
10
- };
7
+ rlsFilters?: any;
11
8
  appFilters?: any;
12
9
  metricFilterOptions?: MetricFilterOptionsType;
13
10
  onMinimize: () => void;
11
+ onArchive?: (metricId: string) => void;
14
12
  clientId: string;
15
13
  tenancyLevel: string;
16
14
  externalDashboardId: string;
@@ -22,5 +20,6 @@ export type FullScreenViewProps = {
22
20
  isShowChartConfigTab?: boolean;
23
21
  isHideChartSettings?: boolean;
24
22
  isHideTablePreview?: boolean;
23
+ isDisableChartTypes?: boolean;
25
24
  };
26
- export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, }: FullScreenViewProps) => React.JSX.Element;
25
+ export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isDisableChartTypes, }: FullScreenViewProps) => React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ExternalMetrics } from '@/types/queryTypes';
3
3
  import { ClientType } from '@/types/app';
4
- import { FilterFieldType } from '@/components/FilterField';
4
+ import { FilterFieldType } from '@/components';
5
5
  import { MetricFilterOptionsType, RlsCondition } from '@/types';
6
6
  export type MetricCardProps = {
7
7
  globalFilters?: {
@@ -10,7 +10,7 @@ export type MetricCardProps = {
10
10
  };
11
11
  metricItem: any;
12
12
  client: ClientType['value'];
13
- onMaximize: (metric: ExternalMetrics, rlsFilters?: {
13
+ onMaximize?: (metric: ExternalMetrics, rlsFilters?: {
14
14
  param: any;
15
15
  filterValues: Record<string, string>;
16
16
  }, appFilters?: any) => void;
@@ -30,5 +30,6 @@ export type MetricCardProps = {
30
30
  onDownloadRawCsv?: (filterValues?: Record<string, any>) => void;
31
31
  enableDownloadCsv?: boolean;
32
32
  enableMultiMetricFilters?: boolean;
33
+ disableActions?: boolean;
33
34
  };
34
- export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, }: MetricCardProps) => React.JSX.Element;
35
+ export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, }: MetricCardProps) => React.JSX.Element;
@@ -5,6 +5,7 @@ export interface ModalProps extends PropsWithChildren {
5
5
  headerTitle?: string;
6
6
  customHeader?: JSX.Element;
7
7
  enableFullScreenButton?: boolean;
8
+ zIndex?: number;
8
9
  icon?: any;
9
10
  }
10
11
  export declare const Modal: React.FC<ModalProps>;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { FloatingDropDownOption } from '@/types';
3
+ export type MultiSelectAccordianDropdownProps = {
4
+ onChange: (options: FloatingDropDownOption) => void;
5
+ selectedOption: FloatingDropDownOption;
6
+ options: FloatingDropDownOption[];
7
+ button?: JSX.Element;
8
+ label?: string;
9
+ labelVariant?: 'floating' | 'static';
10
+ isDisabled?: boolean;
11
+ isSearchEnabled?: boolean;
12
+ icon?: JSX.Element;
13
+ buttonWidth?: string;
14
+ menuWidth?: string;
15
+ searchIcon?: JSX.Element;
16
+ closeControl?: {
17
+ close: boolean;
18
+ };
19
+ searchPlaceholder?: string;
20
+ };
21
+ export type MultiSelectDropdownProps = Omit<MultiSelectAccordianDropdownProps, 'selectedOption' | 'onChange'> & {
22
+ onChange: (options: FloatingDropDownOption[]) => void;
23
+ selectedOption: FloatingDropDownOption[];
24
+ options: FloatingDropDownOption[];
25
+ isShowSelectedOptions?: boolean;
26
+ };
27
+ export declare const MultiSelectAccordianDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, }: MultiSelectAccordianDropdownProps) => React.JSX.Element;
28
+ export declare const MultiSelectDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, }: MultiSelectDropdownProps) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export interface PanelProps extends PropsWithChildren {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ headerTitle?: string;
6
+ icon?: any;
7
+ hideHeader?: boolean;
8
+ hideFooter?: boolean;
9
+ primaryActionText?: string;
10
+ onPrimaryAction?: () => void;
11
+ side?: 'left' | 'right';
12
+ size?: 'small' | 'medium' | 'large';
13
+ zIndex?: number;
14
+ }
15
+ export declare const Panel: ({ children, isOpen, onClose, headerTitle, icon, hideHeader, hideFooter, primaryActionText, onPrimaryAction, side, size, zIndex, }: PanelProps) => React.JSX.Element;
@@ -1,11 +1,27 @@
1
1
  import React from 'react';
2
+ import type { Placement } from '@popperjs/core';
3
+ import { Colors } from '@/types';
4
+ type PopoverMenuStateProp = {
5
+ id: string;
6
+ isOpen?: boolean;
7
+ setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
8
+ popperElement?: Node | HTMLDivElement | null;
9
+ referenceElement?: Node | HTMLDivElement | null;
10
+ };
11
+ export declare const popoverMenuStateAtom: import("jotai").PrimitiveAtom<PopoverMenuStateProp[]> & {
12
+ init: PopoverMenuStateProp[];
13
+ };
2
14
  export type PopoverMenuProps = React.PropsWithChildren & {
3
- className?: string;
4
- menuClass?: string;
5
- buttonClass?: string;
6
- menuContainerClass?: string;
7
15
  buttonContent: React.ReactNode;
8
16
  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';
17
+ position?: Placement;
18
+ buttonWidth?: string;
19
+ menuWidth?: string;
20
+ offset?: [number, number];
21
+ overFlowDetection?: boolean;
22
+ tabMenu?: boolean;
23
+ bgColor?: Colors;
24
+ autoCloseParent?: boolean;
10
25
  };
11
26
  export declare const PopoverMenu: React.FC<PopoverMenuProps>;
27
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { UseFormRegisterReturn } from 'react-hook-form';
3
+ interface Props extends React.HTMLProps<HTMLInputElement> {
4
+ label?: string;
5
+ register?: UseFormRegisterReturn;
6
+ error?: any;
7
+ leftIcon?: JSX.Element;
8
+ rightIcon?: JSX.Element;
9
+ isDisabled?: boolean;
10
+ labelClass?: string;
11
+ inputClass?: string;
12
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ elementRef?: React.Ref<HTMLInputElement>;
14
+ }
15
+ export declare const RadioButton: ({ type, register, error, leftIcon, rightIcon, label, isDisabled, labelClass, inputClass, className, id, elementRef, ...rest }: Props) => React.JSX.Element;
16
+ export default RadioButton;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const SearchTab: ({ setSearchKeyword, className }: any) => React.JSX.Element;
2
+ export declare const SearchTab: ({ setSearchKeyword, className, placeholder, }: any) => React.JSX.Element;
@@ -6,30 +6,21 @@ type Option = {
6
6
  label: string;
7
7
  };
8
8
  type SelectInput = {
9
- name?: string;
10
9
  label?: string;
11
10
  value: any;
12
11
  placeHolder?: string;
13
12
  options: Option[] | undefined;
14
13
  onChange?: (val: string | any) => void;
15
- defaultValue?: string | number | boolean;
16
- children?: React.ReactNode;
17
- className?: string;
18
- containerClass?: string;
19
14
  isSearchEnabled?: boolean;
20
- icon?: JSX.Element;
21
- textSize?: string;
15
+ searchIcon?: JSX.Element;
22
16
  labelVariant?: 'floating' | 'static';
23
17
  };
24
18
  type HookSelectInput = Omit<SelectInput, 'value'> & {
25
19
  control: Control;
26
20
  name: string;
27
21
  };
28
- export declare const OldSelect: ({ name, label, options, onChange, value, defaultValue, children, placeHolder, className, containerClass, isSearchEnabled, textSize, icon, labelVariant, }: SelectInput) => React.JSX.Element;
29
- export declare const Select: ({ name, label, options, onChange, value, defaultValue, children, placeHolder, className, containerClass, isSearchEnabled, textSize, icon, labelVariant, }: SelectInput) => React.JSX.Element;
22
+ export declare const Select: ({ label, options, onChange, value, placeHolder, isSearchEnabled, searchIcon, labelVariant, }: SelectInput) => React.JSX.Element;
30
23
  export declare const HookSelect: ({ control, name, ...rest }: HookSelectInput) => React.JSX.Element;
31
- export declare const SelectWithSubValue: ({ label, options, onChange, value, defaultValue, }: any) => React.JSX.Element;
32
- export declare const DropDown: ({ control, name, options, label, defaultValue, }: HookSelectInput) => React.JSX.Element;
33
24
  type MultiSelectProps = {
34
25
  options: Option[];
35
26
  defaultValue?: Option['value'][];
@@ -47,7 +38,6 @@ type MultiSelectProps = {
47
38
  icon?: JSX.Element;
48
39
  isDisableShowSelectedTag?: boolean;
49
40
  };
50
- export declare const OldMultiSelect: React.FC<MultiSelectProps>;
51
41
  export declare const MultiSelect: React.FC<MultiSelectProps>;
52
42
  type HookMultiSelectProps = MultiSelectProps & {
53
43
  control: Control<FieldValues>;
@@ -5,5 +5,5 @@ type SwitchProps = {
5
5
  placeholder?: string | [string, string];
6
6
  enabled?: boolean;
7
7
  };
8
- export declare const Switch: React.FC<SwitchProps>;
8
+ export declare const SwitchButton: React.FC<SwitchProps>;
9
9
  export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type SwitchButtonProps = {
3
+ onChange?: (enabled: boolean) => void;
4
+ enabled?: boolean;
5
+ placeholder?: string;
6
+ defaultEnabled?: boolean;
7
+ name?: string;
8
+ };
9
+ export declare const Switch: React.FC<SwitchButtonProps>;
10
+ export {};
@@ -23,6 +23,10 @@ type Props = {
23
23
  isInfiniteScroll?: boolean;
24
24
  onLoadMore?: () => void;
25
25
  hasMoreData?: boolean;
26
+ isShowFullScreen?: boolean;
27
+ filterValues?: Record<string, any>;
28
+ onMaximize?: () => void;
29
+ headerAlignment?: 'left' | 'center' | 'right';
26
30
  };
27
- export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, }: Props) => React.JSX.Element;
31
+ export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, onChartReady, onChangePage, isExternalChart, isEnableNextBtn, isEnablePrevBtn, paginationInfo, setChartSettings, isInfiniteScroll, onLoadMore, hasMoreData, isShowFullScreen, onMaximize, headerAlignment, }: Props) => React.JSX.Element;
28
32
  export {};
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ type TabsContextType = [
3
+ activeTab: string | number,
4
+ setActiveTab: React.Dispatch<React.SetStateAction<string | number>>,
5
+ variant: 'primary' | 'popoverTabs'
6
+ ];
7
+ export declare const TabsContext: React.Context<[] | TabsContextType>;
8
+ type TabsProps = {
9
+ children: React.ReactNode;
10
+ variant?: 'primary' | 'popoverTabs';
11
+ defaultActiveTab?: string | number;
12
+ width?: string;
13
+ };
14
+ type TabProps = {
15
+ children: React.ReactNode;
16
+ tabId: string;
17
+ width?: string;
18
+ grow?: boolean;
19
+ className?: string;
20
+ };
21
+ export declare const Tabs: {
22
+ Context: React.FC<TabsProps>;
23
+ List: React.FC<{
24
+ children: React.ReactNode;
25
+ width?: string | undefined;
26
+ background?: string | undefined;
27
+ className?: string | undefined;
28
+ }>;
29
+ Tab: React.FC<TabProps>;
30
+ Panel: React.FC<{
31
+ children: React.ReactNode;
32
+ tabId: string;
33
+ width?: string | undefined;
34
+ className?: string | undefined;
35
+ }>;
36
+ };
37
+ export {};
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
+ import { Colors } from '@/types';
2
3
  interface Props {
3
- className?: string;
4
- variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
5
- children?: React.ReactNode;
4
+ variant?: 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'display' | 'body-text-xs';
5
+ color?: Colors;
6
+ children: React.ReactNode;
6
7
  onClick?: () => void;
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
- style?: React.CSSProperties;
8
+ display?: 'block' | 'inline';
9
+ opacity?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
9
10
  }
10
- export declare const Text: ({ className, variant, styleClass, children, onClick, style, }: Props) => React.JSX.Element;
11
+ export declare const Text: ({ children, variant, color, display, onClick, opacity, }: Props) => React.JSX.Element;
11
12
  export {};
@@ -3,7 +3,7 @@ import { FieldValues, UseFormRegister } from 'react-hook-form';
3
3
  type Props = {
4
4
  isShowlabel?: boolean;
5
5
  timeGrainValue: string;
6
- setTimeGrainValue: React.Dispatch<React.SetStateAction<string>>;
6
+ setTimeGrainValue: React.Dispatch<React.SetStateAction<string>> | ((value: string) => void);
7
7
  register?: UseFormRegister<FieldValues>;
8
8
  className?: string;
9
9
  isDisabled?: boolean;
@@ -24,7 +24,7 @@ export * from './Table';
24
24
  export * from './Text';
25
25
  export * from './TextAreaField';
26
26
  export * from './TimeGrainField';
27
- export * from './ToggleButton';
27
+ export * from './Switch';
28
28
  export * from './Icons';
29
29
  export * from './ChartPopup';
30
30
  export * from './DrillBreadCrumb';
@@ -38,3 +38,14 @@ export * from './GlobalFilters/NumberFilterField';
38
38
  export * from './DateRangePicker';
39
39
  export * from './Loader';
40
40
  export * from './TagInputField';
41
+ export * from './Checkbox';
42
+ export * from './MultiSelectDropdown';
43
+ export * from './Accordion';
44
+ export * from './Panel';
45
+ export * from './Tabs';
46
+ export * from './List';
47
+ export * from './ColorField/ColorField';
48
+ export * from './RadioButton';
49
+ export * from './Menu';
50
+ export * from './ChartTypePanel';
51
+ export * from './Badge';
@@ -21,6 +21,8 @@ export declare const DASHBOARD_UPDATE_ADMIN_METRIC_PATH: string;
21
21
  export declare const DASHBOARD_UPDATE_ADMIN_METRIC_MUTATION = "updateAdminMetric";
22
22
  export declare const DASHBOARD_GENERATE_METRIC_PATH: string;
23
23
  export declare const DASHBOARD_GENERATE_METRIC_MUTATION = "generateMetric";
24
+ export declare const DASHBOARD_DATASET_METRIC_PATH: string;
25
+ export declare const DASHBOARD_DATASET_METRIC_MUTATION = "datasetMetricCreation";
24
26
  export declare const DASHBOARD_PREVIEW_TABLE_PATH: string;
25
27
  export declare const DASHBOARD_PREVIEW_TABLE_MUTATION = "previewTable";
26
28
  export declare const METRIC_QUERY_PATH: string;
@@ -9,6 +9,7 @@ export declare const CHART_TYPES: {
9
9
  scatter: string;
10
10
  row: string;
11
11
  area: string;
12
+ stackedArea: string;
12
13
  combo: string;
13
14
  pie: string;
14
15
  doughnut: string;
@@ -26,6 +27,10 @@ export declare const CHART_TYPES: {
26
27
  treeMap: string;
27
28
  horizontalStackTable: string;
28
29
  };
30
+ export declare const chartOptions: {
31
+ name: string;
32
+ icon: string;
33
+ }[];
29
34
  export declare const timeStamp: {
30
35
  month: string;
31
36
  quarter: string;
@@ -1,8 +1,4 @@
1
- import { ChartSettingsType } from '@/types';
2
- export declare const operatorList: {
3
- value: string;
4
- label: string;
5
- }[];
1
+ import { ChartSettingsType, DatasetMetricCreationConfiguration } from '@/types';
6
2
  export declare const RowLimitList: {
7
3
  value: string;
8
4
  label: string;
@@ -26,3 +22,73 @@ export declare const FORMATTING_CONDITIONS_OPTIONS: {
26
22
  value: string;
27
23
  label: string;
28
24
  }[];
25
+ export declare const TIME_GRAIN_OPTIONS: {
26
+ value: string;
27
+ label: string;
28
+ }[];
29
+ export declare const DEFAULT_FORECAST_VALUES: {
30
+ isEnable: boolean;
31
+ forecastPeriods: number;
32
+ modelName: string;
33
+ confidenceInterval: number;
34
+ timeColumnName: string;
35
+ measureColumnName: string;
36
+ timeGrain: string;
37
+ yearlySeasonality: boolean;
38
+ weeklySeasonality: boolean;
39
+ dailySeasonality: boolean;
40
+ orderP: number;
41
+ orderD: number;
42
+ orderQ: number;
43
+ trend: {
44
+ value: string;
45
+ label: string;
46
+ };
47
+ growth: string;
48
+ };
49
+ export declare const DEFAULT_CREATE_DATSET_METRIC_CONFIG: DatasetMetricCreationConfiguration;
50
+ export declare const SORT_TYPE: {
51
+ value: string;
52
+ label: string;
53
+ }[];
54
+ export declare const operatorList: {
55
+ value: string;
56
+ label: string;
57
+ }[];
58
+ export declare const RELATION_OPERATOR_LIST: {
59
+ value: string;
60
+ label: string;
61
+ }[];
62
+ export declare const STRING_OPERATOR_LIST: {
63
+ value: string;
64
+ label: string;
65
+ }[];
66
+ export declare const NUMBER_OPERATOR_LIST: {
67
+ value: string;
68
+ label: string;
69
+ }[];
70
+ export declare const TIME_OPERATOR_LIST: {
71
+ value: string;
72
+ label: string;
73
+ }[];
74
+ export declare const DATASET_TIME_HELPER_FUNCTIONS: {
75
+ value: string;
76
+ label: string;
77
+ }[];
78
+ export declare const DATASET_STRING_HELPER_FUNCTIONS: {
79
+ value: string;
80
+ label: string;
81
+ }[];
82
+ export declare const DATASET_NUMBER_HELPER_FUNCTIONS: {
83
+ value: string;
84
+ label: string;
85
+ }[];
86
+ export declare const aggregateStrings: string[];
87
+ export declare const DATASET_OTHER_HELPER_FUNCTIONS: {
88
+ value: string;
89
+ label: string;
90
+ }[];
91
+ export declare const DATASET_NUM_HELPER_FUNCTIONS: {
92
+ value: string;
93
+ label: string;
94
+ }[];
@@ -0,0 +1 @@
1
+ export declare const areArraysEqual: (arr1: any, arr2: any) => any;
@@ -0,0 +1 @@
1
+ export declare const isInViewport: (element: any) => boolean;
@@ -1,4 +1,5 @@
1
- declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, timeCount, timeGrain, timeRangeIndicator, databaseType, endDate, startDate, }: {
1
+ export declare const isValidDate: (date: any) => boolean;
2
+ declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, timeCount, timeGrain, timeRangeIndicator, databaseType, endDate, startDate, comparsionOperator, }: {
2
3
  timeColumnName: string;
3
4
  timeRangeIndicator: string;
4
5
  timeCount: number;
@@ -7,5 +8,6 @@ declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, tim
7
8
  startDate?: Date | undefined;
8
9
  endDate?: Date | undefined;
9
10
  databaseType?: string | undefined;
11
+ comparsionOperator?: string | undefined;
10
12
  }) => string;
11
13
  export default generateTimeRangeWhereClause;
@@ -3,3 +3,7 @@ export * from './getTimeFilterValue';
3
3
  export * from './groupArray';
4
4
  export * from './groupBy';
5
5
  export * from './getValidRlsConditionOptions';
6
+ export * from './timeseries';
7
+ export * from './checkIsElementInViewport';
8
+ export * from './areArraysEqual';
9
+ export * from './generateTimeRangeWhereClause';
@@ -1,8 +1,8 @@
1
1
  import { BackgroundSettings, CustomSettings, LabelSettings, TimeSeriesGroupType, TimeSeriesType } from '@/types';
2
2
  interface TimeSeriesData {
3
3
  timeStampKey: string;
4
- valuekeys: string[];
5
4
  data: Record<string, any>[];
5
+ values?: string[];
6
6
  }
7
7
  export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuekeys, groupBy, labelSettings, customSettings, backGroundColor, fillXAxis, isCumulativeBar, }: {
8
8
  dataArray: Record<string, any>[];
@@ -62,5 +62,5 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
62
62
  focus: string;
63
63
  };
64
64
  })[];
65
- export declare const isTimeSeriesDataValid: ({ data, timeStampKey, valuekeys, }: TimeSeriesData) => boolean;
65
+ export declare const isTimeSeriesDataValid: ({ data, timeStampKey, }: TimeSeriesData) => boolean;
66
66
  export {};
@@ -0,0 +1,50 @@
1
+ /// <reference types="react" />
2
+ import ReactAce from 'react-ace/lib/ace';
3
+ import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, TableType } from '@/types';
4
+ declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
5
+ configuration: DatasetMetricCreationConfiguration;
6
+ setConfiguration: import("react").Dispatch<import("react").SetStateAction<DatasetMetricCreationConfiguration>>;
7
+ selectedDimensions: FloatingDropDownOption[];
8
+ setSelectedDimensions: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
9
+ metrics: FloatingDropDownOption[];
10
+ setMetrics: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
11
+ columnList: FloatingDropDownOption[];
12
+ onChangeTableSelection: (table: TableType) => void;
13
+ tableList: {
14
+ value: string;
15
+ label: string;
16
+ }[];
17
+ onGenerateChart: ({ param, metricParams, dimensionParams, createdDimensionParams, createdMetricParams, }: {
18
+ param?: DatasetMetricCreationConfiguration | undefined;
19
+ metricParams?: FloatingDropDownOption[] | undefined;
20
+ dimensionParams?: FloatingDropDownOption[] | undefined;
21
+ createdMetricParams?: FloatingDropDownOption[] | undefined;
22
+ createdDimensionParams?: FloatingDropDownOption[] | undefined;
23
+ }) => void;
24
+ createdSorts: CreateNewSort[];
25
+ setCreatedSorts: import("react").Dispatch<import("react").SetStateAction<CreateNewSort[]>>;
26
+ onApplySort: (onComplete: () => void, isClear?: boolean, index?: number) => void;
27
+ createdFilters: CreateNewFilter[];
28
+ setCreatedFilters: import("react").Dispatch<import("react").SetStateAction<CreateNewFilter[]>>;
29
+ getFilterDropDownType: ({ datatype, operator, }: {
30
+ datatype: string;
31
+ operator: string;
32
+ }) => "TIME_FILTER" | "MULTI_FILTER_DROPDOWN" | "INPUT_NUMBER_FIELD" | "FILTER_DROPDOWN";
33
+ workspaceId: any;
34
+ editorRef: import("react").RefObject<ReactAce>;
35
+ savedFilterListOptions: {
36
+ label: string;
37
+ value: string;
38
+ key: string;
39
+ }[];
40
+ onApplyFilter: (onComplete: () => void, isClear?: boolean, index?: number) => void;
41
+ functionOptions: (col: any) => {
42
+ value: string;
43
+ label: string;
44
+ }[];
45
+ createdCols: FloatingDropDownOption[];
46
+ setCreatedCols: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
47
+ createdMetrics: FloatingDropDownOption[];
48
+ setCreatedMetrics: import("react").Dispatch<import("react").SetStateAction<FloatingDropDownOption[]>>;
49
+ };
50
+ export default useDatasetMetric;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { UseDragProps } from '@/types';
3
+ declare const useDrag: ({ identifier, data, modifiers, events, CustomDragPreview, }: UseDragProps) => {
4
+ isDragging: boolean;
5
+ isEnableDrag: boolean;
6
+ setIsEnableDrag: import("react").Dispatch<import("react").SetStateAction<boolean>>;
7
+ DragNodeRef: import("react").MutableRefObject<any>;
8
+ };
9
+ export default useDrag;
@@ -0,0 +1,8 @@
1
+ import { DndStateProp } from '@/types';
2
+ declare const useDragAndDropState: () => {
3
+ dndState: DndStateProp;
4
+ setActive: (active: DndStateProp['active']) => void;
5
+ setOver: (over: DndStateProp['over']) => void;
6
+ setDndState: (update: DndStateProp | ((prev: DndStateProp) => DndStateProp)) => void;
7
+ };
8
+ export default useDragAndDropState;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { UseDropProps } from '@/types';
3
+ declare const useDrop: ({ identifier, events, modifiers }: UseDropProps) => {
4
+ dragStatus: {
5
+ isDragOver: boolean;
6
+ isDragEnter: boolean;
7
+ isDragLeave: boolean;
8
+ isDrop: boolean;
9
+ };
10
+ isEnableDrop: boolean;
11
+ setIsEnableDrop: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
+ setDropNodeRef: import("react").MutableRefObject<any>;
13
+ };
14
+ export default useDrop;