@databrainhq/plugin 0.14.44 → 0.14.46

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.
@@ -5,6 +5,8 @@ type PopoverMenuStateProp = {
5
5
  id: string;
6
6
  isOpen?: boolean;
7
7
  setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
8
+ isMenuOpen?: boolean;
9
+ setMenuOpen?: React.Dispatch<React.SetStateAction<boolean>>;
8
10
  popperElement?: Node | HTMLDivElement | null;
9
11
  referenceElement?: Node | HTMLDivElement | null;
10
12
  };
@@ -23,6 +25,9 @@ export type PopoverMenuProps = React.PropsWithChildren & {
23
25
  bgColor?: Colors;
24
26
  autoCloseParent?: boolean;
25
27
  getIsOpen?: (isOpen: boolean) => void;
28
+ isClearEnabled?: boolean;
29
+ isMenuOpen?: boolean;
30
+ setMenuOpen?: React.Dispatch<React.SetStateAction<boolean>>;
26
31
  };
27
32
  export declare const PopoverMenu: React.FC<PopoverMenuProps>;
28
33
  export {};
@@ -1,4 +1,4 @@
1
- export declare const API_BASE_URL: string;
1
+ export declare const API_BASE_URL: any;
2
2
  export declare const DASHBOARD_PATH = "/api/v2/dashboard";
3
3
  export declare const METRIC_PATH = "/api/v2/metric";
4
4
  export declare const DASHBOARD_DATA_QUERY = "dashboardData";
@@ -90,8 +90,10 @@ export declare const RAW_CSV_OPTIONS: string[];
90
90
  export declare const NONE = "NONE";
91
91
  export declare const REQUESTED = "REQUESTED";
92
92
  export declare const AVAILABLE = "AVAILABLE";
93
+ export declare const NA_VALUE = "N/A";
93
94
  export declare const NUMBER_FORMAT: {
94
95
  label: string;
95
96
  value: string;
96
97
  }[];
97
- export declare const ICONS_LIST: readonly ["circle", "group-by", "undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles"];
98
+ export declare const ICONS_LIST: readonly ["new-window", "circle", "group-by", "undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles"];
99
+ export declare const DATE = "date";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @name adaptiveFormatter - helps in formatting the data in adaptive format (eg. k, M, B etc)
3
+ * @params - takes the value that needs to be formatted and a flag that tells if the value is in decimals or not
4
+ * @returns - value in adaptive format
5
+ */
6
+ export declare const adaptiveFormatter: (val: any, isDecimal: boolean) => string;
@@ -0,0 +1 @@
1
+ export declare const numberFormatter: (val: any, formatter: any) => any;
@@ -0,0 +1 @@
1
+ export declare const tooltipFormatter: (params: any, chartOptions: any) => string;
@@ -377,6 +377,7 @@ export type FloatingDropDownOption = {
377
377
  aggregate?: string;
378
378
  alias?: string;
379
379
  table?: TableObjectType;
380
+ clickActions?: any;
380
381
  };
381
382
  export type FilterType = {
382
383
  tableName: string;
@@ -1,5 +1,28 @@
1
1
  import { ChartSettingsType } from '@/types';
2
- export declare const adaptiveFormatter: (val: any, decimal: boolean) => string;
2
+ export declare const truncateText: (label: string, maxLength: number) => string;
3
+ export declare const addPrefixAndSuffix: (val: any, prefix?: any, suffix?: any) => string;
4
+ export declare const findLegendPosition: (val: string | undefined) => {
5
+ top: string;
6
+ left: string;
7
+ right?: undefined;
8
+ bottom?: undefined;
9
+ } | {
10
+ top: string;
11
+ right: string;
12
+ left?: undefined;
13
+ bottom?: undefined;
14
+ } | {
15
+ bottom: string;
16
+ left: string;
17
+ top?: undefined;
18
+ right?: undefined;
19
+ } | {
20
+ bottom: string;
21
+ right: string;
22
+ top?: undefined;
23
+ left?: undefined;
24
+ };
25
+ export declare const validateColor: (color: any) => boolean;
3
26
  export type GetChartOptionsParams = {
4
27
  chartOptions: ChartSettingsType;
5
28
  data: Record<string, any>[];
@@ -0,0 +1,14 @@
1
+ import { ChartSettingsType } from '@/types';
2
+ export type GetNoAxisChartOptionsParams = {
3
+ chartOptions: ChartSettingsType;
4
+ data: Record<string, any>[];
5
+ colors?: string[];
6
+ datasets?: any;
7
+ labels?: any;
8
+ funnelData?: {
9
+ value: any;
10
+ name: any;
11
+ }[];
12
+ singleValueData?: any;
13
+ };
14
+ export declare const getNoAxisChartOptions: ({ chartOptions, data, colors, datasets, funnelData, labels, singleValueData, }: GetNoAxisChartOptionsParams) => Record<string, any>;