@databrainhq/plugin 0.9.20 → 0.9.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +26 -26
  2. package/dist/components/Alert/index.d.ts +1 -1
  3. package/dist/components/ChartModal/ChartConfig.d.ts +16 -6
  4. package/dist/components/ChartModal/ChartModalOptions.d.ts +5 -7
  5. package/dist/components/ChartPopup/components/UnderlyingData/index.d.ts +1 -1
  6. package/dist/components/ChartPopup/index.d.ts +1 -1
  7. package/dist/components/Charts/BarChart.d.ts +1 -1
  8. package/dist/components/Charts/LineChart.d.ts +1 -1
  9. package/dist/components/DataType/index.d.ts +1 -1
  10. package/dist/components/DateRangePicker/index.d.ts +1 -1
  11. package/dist/components/Error/index.d.ts +1 -1
  12. package/dist/components/ExternalMetricForm/index.d.ts +1 -1
  13. package/dist/components/FilterDropDown/index.d.ts +2 -2
  14. package/dist/components/FilterField/index.d.ts +2 -2
  15. package/dist/components/FloatingDropDown/index.d.ts +2 -2
  16. package/dist/components/FullScreenChart/index.d.ts +4 -3
  17. package/dist/components/GlobalFilters/AddFilter.d.ts +2 -2
  18. package/dist/components/GlobalFilters/AppliedFilter.d.ts +1 -1
  19. package/dist/components/GlobalFilters/NumberFilterField.d.ts +1 -1
  20. package/dist/components/GlobalFilters/index.d.ts +2 -2
  21. package/dist/components/Icons/index.d.ts +1 -1
  22. package/dist/components/InfoTooltip/index.d.ts +1 -1
  23. package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +4 -4
  24. package/dist/components/MetricChart/CsvDownloadButton.d.ts +1 -1
  25. package/dist/components/MetricChart/MetricChart.d.ts +1 -1
  26. package/dist/components/MetricChart/index.d.ts +0 -1
  27. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
  28. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +26 -0
  29. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +38 -0
  30. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/index.d.ts +2 -0
  31. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +50 -6
  32. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +1 -1
  33. package/dist/components/MetricCreation/components/MetricOutput/components/index.d.ts +1 -0
  34. package/dist/components/MetricFilterDropDown/index.d.ts +1 -1
  35. package/dist/components/MetricList/MetricList.d.ts +4 -3
  36. package/dist/components/MetricList/components/{DownloadRawCsvModal/index.d.ts → DownloadRawCsvModal.d.ts} +1 -1
  37. package/dist/components/MetricList/components/{LayoutAlert/index.d.ts → LayoutAlert.d.ts} +1 -1
  38. package/dist/components/MetricList/components/{MetricCards/MetricCard.d.ts → MetricCard.d.ts} +6 -5
  39. package/dist/components/MetricList/components/{MetricCards/SingleValueCard.d.ts → SingleValueCard.d.ts} +1 -1
  40. package/dist/components/MetricList/components/{TableViewModal/index.d.ts → TableViewModal.d.ts} +1 -1
  41. package/dist/components/MetricList/index.d.ts +6 -1
  42. package/dist/components/MetricTable/index.d.ts +1 -1
  43. package/dist/components/Modal/ModalFooter.d.ts +1 -1
  44. package/dist/components/PopoverMenu/index.d.ts +1 -1
  45. package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +1 -1
  46. package/dist/components/Select/index.d.ts +5 -5
  47. package/dist/components/Tab/index.d.ts +1 -1
  48. package/dist/components/Table/DebouncedInput.d.ts +1 -1
  49. package/dist/components/Table/index.d.ts +2 -4
  50. package/dist/components/TagInputField/index.d.ts +1 -1
  51. package/dist/components/TimeGrainField/index.d.ts +1 -1
  52. package/dist/components/ToggleButton/SwitchInput.d.ts +1 -1
  53. package/dist/components/ToggleButton/ToggleInput.d.ts +1 -1
  54. package/dist/components/ToggleButton/index.d.ts +1 -1
  55. package/dist/components/index.d.ts +0 -2
  56. package/dist/consts/metricOptions.d.ts +0 -4
  57. package/dist/containers/Dashboard/Dashboard.d.ts +1 -1
  58. package/dist/containers/Dashboard/DashboardProvider.d.ts +1 -1
  59. package/dist/helpers/getTimeFilterValue.d.ts +1 -1
  60. package/dist/helpers/timeseries.d.ts +6 -6
  61. package/dist/hooks/index.d.ts +0 -1
  62. package/dist/hooks/useClientDashboardLayout.d.ts +1 -1
  63. package/dist/hooks/useExternalMetric.d.ts +20 -3
  64. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +1 -1
  65. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  66. package/dist/hooks/useScheduleEmail.d.ts +1 -1
  67. package/dist/index.es.js +127470 -86236
  68. package/dist/index.umd.js +242 -298
  69. package/dist/style.css +1 -1
  70. package/dist/types/app.d.ts +61 -119
  71. package/dist/types/metricCreate.d.ts +87 -13
  72. package/dist/typings.d.ts +17 -0
  73. package/dist/utils/generated/graphql.d.ts +437 -437
  74. package/dist/utils/getChartAttributes.d.ts +8 -5
  75. package/dist/utils/handleSaveChartImage.d.ts +3 -0
  76. package/package.json +98 -110
  77. package/dist/components/Chart/SingleValueChart.d.ts +0 -16
  78. package/dist/components/Chart/index.d.ts +0 -21
  79. package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +0 -8
  80. package/dist/components/ChartSettingsPopup/components/ChartSettings/index.d.ts +0 -9
  81. package/dist/components/ChartSettingsPopup/index.d.ts +0 -9
  82. package/dist/components/MetricList/components/FullScreenView/DownloadButton.d.ts +0 -9
  83. package/dist/components/MetricList/components/FullScreenView/index.d.ts +0 -18
  84. package/dist/components/MetricList/components/MetricCards/NoDataLoading.d.ts +0 -7
  85. package/dist/components/MetricList/components/index.d.ts +0 -8
  86. package/dist/hooks/useMetricCard.d.ts +0 -37
  87. package/dist/utils/getChartImage.d.ts +0 -3
  88. package/dist/utils/getChartOptions.d.ts +0 -7
  89. /package/dist/components/MetricList/components/{ArchiveMetricModal/index.d.ts → ArchiveMetricModal.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export type ModalFooterProps = React.PropsWithChildren & {
2
+ export declare type ModalFooterProps = React.PropsWithChildren & {
3
3
  className?: string;
4
4
  };
5
5
  export declare const ModalFooter: React.FC<ModalFooterProps>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export type PopoverMenuProps = React.PropsWithChildren & {
2
+ export declare type PopoverMenuProps = React.PropsWithChildren & {
3
3
  className?: string;
4
4
  menuClass?: string;
5
5
  buttonClass?: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ declare type Props = {
3
3
  onCancel: () => void;
4
4
  };
5
5
  declare const ScheduleEmailForm: ({ onCancel }: Props) => JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { FieldValues } from 'react-hook-form';
3
3
  import type { Control } from 'react-hook-form';
4
- type Option = {
4
+ declare type Option = {
5
5
  value: string;
6
6
  label: string;
7
7
  };
8
- type SelectInput = {
8
+ declare type SelectInput = {
9
9
  name?: string;
10
10
  label?: string;
11
11
  value: any;
@@ -21,7 +21,7 @@ type SelectInput = {
21
21
  textSize?: string;
22
22
  labelVariant?: 'floating' | 'static';
23
23
  };
24
- type HookSelectInput = Omit<SelectInput, 'value'> & {
24
+ declare type HookSelectInput = Omit<SelectInput, 'value'> & {
25
25
  control: Control;
26
26
  name: string;
27
27
  };
@@ -29,7 +29,7 @@ export declare const Select: ({ name, label, options, onChange, value, defaultVa
29
29
  export declare const HookSelect: ({ control, name, ...rest }: HookSelectInput) => JSX.Element;
30
30
  export declare const SelectWithSubValue: ({ label, options, onChange, value, defaultValue, }: any) => JSX.Element;
31
31
  export declare const DropDown: ({ control, name, options, label, defaultValue, }: HookSelectInput) => JSX.Element;
32
- type MultiSelectProps = {
32
+ declare type MultiSelectProps = {
33
33
  options: Option[];
34
34
  defaultValue?: Option['value'][];
35
35
  value?: Option['value'][];
@@ -46,7 +46,7 @@ type MultiSelectProps = {
46
46
  icon?: JSX.Element;
47
47
  };
48
48
  export declare const MultiSelect: React.FC<MultiSelectProps>;
49
- type HookMultiSelectProps = MultiSelectProps & {
49
+ declare type HookMultiSelectProps = MultiSelectProps & {
50
50
  control: Control<FieldValues>;
51
51
  name: string;
52
52
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type TabProps = {
2
+ declare type TabProps = {
3
3
  options: string[];
4
4
  activeTab: string;
5
5
  setActiveTab: React.Dispatch<React.SetStateAction<string>>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const DebouncedInput: ({ value: initialValue, onChange, debounce, ...props }: {
2
+ export declare const DebouncedInput: ({ value, onChange, debounce, ...props }: {
3
3
  value: string | number;
4
4
  onChange: (value: string | number) => void;
5
5
  debounce?: number | undefined;
@@ -1,14 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
3
2
  import { TableSettings } from '@/types';
4
- type Props = {
3
+ declare type Props = {
5
4
  data?: any[];
6
5
  isLoading: boolean;
7
6
  error: string;
8
7
  tableSettings?: TableSettings;
9
8
  tableName?: string;
10
9
  className?: string;
11
- onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
12
10
  };
13
- export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, onColumnSizingChange, }: Props) => JSX.Element;
11
+ export declare const Table: ({ data, isLoading, error, tableSettings, tableName, className, }: Props) => JSX.Element;
14
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FieldValues, Control } from 'react-hook-form';
3
- type Props = {
3
+ declare type Props = {
4
4
  control: Control<FieldValues, object>;
5
5
  placeholder?: string;
6
6
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FieldValues, UseFormRegister } from 'react-hook-form';
3
- type Props = {
3
+ declare type Props = {
4
4
  isShowlabel?: boolean;
5
5
  timeGrainValue: string;
6
6
  setTimeGrainValue: React.Dispatch<React.SetStateAction<string>>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type SwitchProps = {
2
+ declare type SwitchProps = {
3
3
  name?: string;
4
4
  styles: Record<string, string>;
5
5
  placeholder?: string | [string, string];
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type ToggleProps = {
2
+ declare type ToggleProps = {
3
3
  name?: string;
4
4
  styles: Record<string, string>;
5
5
  placeholder?: string | [string, string];
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- type SwitchButtonProps = {
2
+ declare type SwitchButtonProps = {
3
3
  onChange?: (enabled: boolean) => void;
4
4
  enabled?: boolean;
5
5
  variant?: 'switch' | 'toggle';
@@ -31,5 +31,3 @@ export * from './DrillBreadCrumb';
31
31
  export * from './MetricFilterDropDown';
32
32
  export * from './Alert';
33
33
  export * from './GlobalFilters/AppliedFilter';
34
- export * from './Chart';
35
- export * from './ChartSettingsPopup';
@@ -10,10 +10,6 @@ export declare const AggregateList: {
10
10
  value: string;
11
11
  label: string;
12
12
  }[];
13
- export declare const TableRowsList: {
14
- label: string;
15
- value: string;
16
- }[];
17
13
  export declare const NUMBER_TYPES: string[];
18
14
  export declare const STRING_TYPES: string[];
19
15
  export declare const DATE_TYPES: string[];
@@ -12,7 +12,7 @@ export interface DashboardProps {
12
12
  };
13
13
  theme?: ThemeType;
14
14
  }
15
- type PluginProviderProps = PropsWithChildren & Omit<DashboardProps, 'token'>;
15
+ declare type PluginProviderProps = PropsWithChildren & Omit<DashboardProps, 'token'>;
16
16
  export declare const PluginProvider: ({ children, theme }: PluginProviderProps) => JSX.Element;
17
17
  export declare const Dashboard: React.MemoExoticComponent<({ token, options, theme }: DashboardProps) => JSX.Element>;
18
18
  export {};
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
- type DashboardProviderProps = PropsWithChildren & {
2
+ declare type DashboardProviderProps = PropsWithChildren & {
3
3
  token: string;
4
4
  };
5
5
  declare const DashboardProvider: ({ token, children }: DashboardProviderProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- type Params = {
1
+ declare type Params = {
2
2
  timeGrainValue: string;
3
3
  isTimeStamp: boolean;
4
4
  col: string;
@@ -20,7 +20,7 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
20
20
  color: string;
21
21
  } | undefined;
22
22
  itemStyle?: {
23
- borderRadius: number | undefined;
23
+ borderRadius: number;
24
24
  } | undefined;
25
25
  areaStyle: {
26
26
  opacity?: undefined;
@@ -29,8 +29,8 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
29
29
  type: "line" | "bar";
30
30
  name: string;
31
31
  label: {
32
- show: boolean | undefined;
33
- position: string | undefined;
32
+ show: boolean;
33
+ position: string;
34
34
  };
35
35
  emphasis: {
36
36
  focus: string;
@@ -42,7 +42,7 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
42
42
  color: string;
43
43
  } | undefined;
44
44
  itemStyle?: {
45
- borderRadius: number | undefined;
45
+ borderRadius: number;
46
46
  } | undefined;
47
47
  areaStyle: {
48
48
  opacity: number;
@@ -51,8 +51,8 @@ export declare const getTimeSeriesData: ({ dataArray, timeStampKey, type, valuek
51
51
  type: "line" | "bar";
52
52
  name: string;
53
53
  label: {
54
- show: boolean | undefined;
55
- position: string | undefined;
54
+ show: boolean;
55
+ position: string;
56
56
  };
57
57
  emphasis: {
58
58
  focus: string;
@@ -6,4 +6,3 @@ export * from './useOutsideAlerter';
6
6
  export * from './useApplyAdminTheme';
7
7
  export * from './useClientDashboardLayout';
8
8
  export * from './useUnderlyingData';
9
- export * from './useMetricCard';
@@ -1,5 +1,5 @@
1
1
  import { Layout } from 'react-grid-layout';
2
- export type UseClientDashboardLayoutProps = {
2
+ export declare type UseClientDashboardLayoutProps = {
3
3
  externalDashboardId: string;
4
4
  clientId: string;
5
5
  };
@@ -1,7 +1,8 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { ExternalMetrics } from '@/utils/generated/graphql';
3
- import { DashboardType, GroupBy, RlsFilterObjectType, SelectedColumns, ChartSettingsType } from '@/types/app';
4
- type Params = {
3
+ import { AxisSettings, CustomSettings, TableSettings, DashboardType, GroupBy, LabelSettings, LegendSettings, RlsFilterObjectType, SelectedColumns, BackgroundSettings } from '@/types/app';
4
+ import { TimeSeriesSettingsType } from '@/types';
5
+ declare type Params = {
5
6
  onSuccess: () => void;
6
7
  companyIntegrationId: string | undefined;
7
8
  selectedColumns: SelectedColumns[] | undefined;
@@ -9,7 +10,23 @@ type Params = {
9
10
  metricQuery: string | undefined;
10
11
  outputColumns: string | undefined;
11
12
  id?: string;
12
- chartSettings: ChartSettingsType;
13
+ chartSettings: {
14
+ xAxis: string | undefined;
15
+ yAxisList: string[] | undefined;
16
+ chartType: string;
17
+ step: string | undefined;
18
+ measure: string | undefined;
19
+ sankeyValues: string[] | undefined;
20
+ singleValue: string | undefined;
21
+ margins: Record<string, number>;
22
+ legendSettings: LegendSettings;
23
+ labelSettings: LabelSettings;
24
+ axisSettings: AxisSettings;
25
+ customSettings?: CustomSettings;
26
+ tableSettings?: TableSettings;
27
+ backGroundColor?: BackgroundSettings;
28
+ timeSeriesSettings?: TimeSeriesSettingsType;
29
+ };
13
30
  integrationName: string | undefined;
14
31
  clientId?: string | null;
15
32
  isEmbedded?: boolean;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FieldValues } from 'react-hook-form';
3
- type Params = {
3
+ declare type Params = {
4
4
  clientId: string | null;
5
5
  companyId: string | null;
6
6
  setError: React.Dispatch<React.SetStateAction<string>>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- type UseOutsideAlerterProps = {
2
+ declare type UseOutsideAlerterProps = {
3
3
  onOutsideClick: () => void;
4
4
  wrapRef: React.RefObject<any>;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FieldValues } from 'react-hook-form';
3
- type Params = {
3
+ declare type Params = {
4
4
  onCancel: () => void;
5
5
  };
6
6
  declare const useScheduleEmail: ({ onCancel }: Params) => {