@databrainhq/plugin 0.14.61 → 0.14.62

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.
@@ -22,6 +22,10 @@ export type ListProps = {
22
22
  id: string;
23
23
  }>>;
24
24
  isDisableMoreOption?: boolean;
25
+ isEnableSelectAll?: boolean;
26
+ onSelectAll?: () => void;
27
+ onDeselectAll?: () => void;
25
28
  isEnableHovering?: boolean;
29
+ isAllSelected?: boolean;
26
30
  };
27
- export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableHovering, }: ListProps) => React.JSX.Element;
31
+ export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableSelectAll, onSelectAll, onDeselectAll, isEnableHovering, isAllSelected, }: ListProps) => React.JSX.Element;
@@ -5,6 +5,8 @@ type TabProps = {
5
5
  setActiveTab: React.Dispatch<React.SetStateAction<string>>;
6
6
  className?: string;
7
7
  tabText?: string;
8
+ lockedTab?: string;
9
+ tabClassname?: string;
8
10
  };
9
- export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, }: TabProps) => React.JSX.Element;
11
+ export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, lockedTab, tabClassname, }: TabProps) => React.JSX.Element;
10
12
  export {};
@@ -20,12 +20,13 @@ type Props = {
20
20
  labelClass?: string;
21
21
  inputClass?: string;
22
22
  className?: string;
23
+ width?: string;
23
24
  innerPlaceholder?: boolean;
24
25
  innerPlaceholderText?: string;
25
26
  min?: number;
26
- onChangeTags?: (tags: string[]) => void;
27
+ onChangeTags?: (tags?: string[]) => void;
27
28
  defaultTagValue?: string[];
28
29
  };
29
- export declare const TagInputField: ({ control, placeholder, name, label, onChangeTags, defaultTagValue, }: Props) => React.JSX.Element;
30
- declare const _default: React.MemoExoticComponent<({ control, placeholder, name, label, onChangeTags, defaultTagValue, }: Props) => React.JSX.Element>;
30
+ export declare const TagInputField: ({ control, placeholder, name, label, onChangeTags, defaultTagValue, width, }: Props) => React.JSX.Element;
31
+ declare const _default: React.MemoExoticComponent<({ control, placeholder, name, label, onChangeTags, defaultTagValue, width, }: Props) => React.JSX.Element>;
31
32
  export default _default;
@@ -98,7 +98,7 @@ export declare const NUMBER_FORMAT: {
98
98
  label: string;
99
99
  value: string;
100
100
  }[];
101
- export declare const ICONS_LIST: readonly ["people", "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"];
101
+ export declare const ICONS_LIST: readonly ["people", "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", "combo", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie", "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", "row", "line", "time series", "globe", "map", "histogram", "radar", "scale", "scatter", "tree", "doughnut", "scatter", "waterfall", "area", "bubble", "boxplot", "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", "gauge", "step", "treeMap", "stack", "horizontal stack"];
102
102
  export declare const NUMBER = "number";
103
103
  export declare const STRING = "string";
104
104
  export declare const BOOLEAN = "boolean";
@@ -94,6 +94,7 @@ export declare const FUNCTIONS_SYNONYMNS: Record<string, string[]>;
94
94
  export declare const SORT_SYNONYMNS: Record<string, string[]>;
95
95
  export declare const NUMBER_SYNONYMNS: Record<string, number>;
96
96
  export declare const questionKeywords: string[];
97
+ export declare const groupbySynonyms: string[];
97
98
  export declare const TIME_FILTER_SYNONYMNS: {
98
99
  label: string;
99
100
  value: string;
@@ -129,6 +130,7 @@ export declare const MONGODB = "mongodb";
129
130
  export declare const DATABRICKS = "databricks";
130
131
  export declare const CLICKHOUSE = "clickhouse";
131
132
  export declare const AWSS3 = "awss3";
133
+ export declare const ELASTICSEARCH = "elasticsearch";
132
134
  export declare const DOWNLOAD_DATA_OPTIONS: {
133
135
  RAW_DATA: string;
134
136
  DOWNLOAD_WITHOUT_FILTERS: string;
@@ -0,0 +1,3 @@
1
+ export * from './Dashboard';
2
+ export * from './PluginProvider';
3
+ export * from './Metric';
@@ -0,0 +1,66 @@
1
+ import { CustomSettings, LabelSettings } from '@/types';
2
+ type DataRow = Record<string, any>;
3
+ type GetXaxisDataParams = {
4
+ data: DataRow[];
5
+ xAxis: string;
6
+ isGroupBy: boolean;
7
+ };
8
+ type GetDatasetParams = {
9
+ data: DataRow[];
10
+ yAxisList: string[];
11
+ seriesField: string;
12
+ xAxisData: string[];
13
+ isGroupBy: boolean;
14
+ xAxis: string;
15
+ groupByColumnUniqueValue: string[];
16
+ isShowPercentageFullStack: boolean;
17
+ };
18
+ export type Dataset = {
19
+ label: string;
20
+ data: (number | null)[];
21
+ };
22
+ type GetSeriesDataParams = {
23
+ labelSettings: LabelSettings;
24
+ customSettings: CustomSettings;
25
+ datasets: Dataset[];
26
+ isShowPercentageFullStack: boolean;
27
+ type: string;
28
+ isShowSymbol: boolean;
29
+ barChartSettings?: Record<string, any>;
30
+ lineChartSettings?: Record<string, any>;
31
+ isShowCumulativeBar: boolean;
32
+ stackChartSettings?: Record<string, any>;
33
+ isEnableValueSummation?: boolean;
34
+ };
35
+ type GetChartLengendDataParams = {
36
+ isGroupBy: boolean;
37
+ yAxisList: string[];
38
+ groupByColumnUniqueValue: string[];
39
+ isShowPercentageFullStack: boolean;
40
+ };
41
+ export declare const getXaxisData: ({ data, isGroupBy, xAxis, }: GetXaxisDataParams) => string[];
42
+ export declare const getChartDataset: ({ data, isGroupBy, seriesField, xAxis, xAxisData, yAxisList, groupByColumnUniqueValue, isShowPercentageFullStack, }: GetDatasetParams) => Dataset[];
43
+ export declare const getPercentageData: (datasets: Dataset[]) => Record<string, (string | null)[]>;
44
+ export declare const getCumulativeBarData: (datasets: Dataset[], isShowCumulativeBar: boolean) => Dataset[];
45
+ export declare const getSummationLabelValue: (datasets: Dataset[], isShowPercentageFullStack: boolean) => any[];
46
+ export declare const getChartSeriesData: ({ labelSettings, customSettings, datasets, isShowPercentageFullStack, type, isShowSymbol, barChartSettings, isShowCumulativeBar, stackChartSettings, isEnableValueSummation, lineChartSettings, }: GetSeriesDataParams) => {
47
+ data: (number | null)[] | (string | null)[];
48
+ name: string;
49
+ label: {
50
+ show: boolean | undefined;
51
+ position: string | undefined;
52
+ formatter(d: {
53
+ data: any;
54
+ name: string;
55
+ seriesIndex: number;
56
+ dataIndex: number;
57
+ }): string;
58
+ };
59
+ emphasis: {
60
+ focus: string;
61
+ };
62
+ type: string;
63
+ showSymbol: boolean;
64
+ }[];
65
+ export declare const getChartLengendData: ({ groupByColumnUniqueValue, isGroupBy, isShowPercentageFullStack, yAxisList, }: GetChartLengendDataParams) => string[];
66
+ export {};
@@ -10,3 +10,4 @@ export * from './generateTimeRangeWhereClause';
10
10
  export * from './getColumnType';
11
11
  export * from './createMetric';
12
12
  export * from './timeseriesOption';
13
+ export * from './chartOptions';
@@ -153,7 +153,7 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
153
153
  areaStyle: {
154
154
  opacity?: undefined;
155
155
  };
156
- data: string[] | number[];
156
+ data: (number | null)[] | (string | null)[];
157
157
  type: "line" | "bar";
158
158
  name: string;
159
159
  label: {
@@ -179,7 +179,7 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
179
179
  areaStyle: {
180
180
  opacity: number;
181
181
  };
182
- data: string[] | number[];
182
+ data: (number | null)[] | (string | null)[];
183
183
  type: "line" | "bar";
184
184
  name: string;
185
185
  label: {
@@ -0,0 +1,8 @@
1
+ export * from './containers';
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';
8
+ export * as queries from './queries';
@@ -414,6 +414,7 @@ export type FloatingDropDownOption = {
414
414
  value: string;
415
415
  badge?: string;
416
416
  subValue?: string;
417
+ subLabelOptions?: string[];
417
418
  icon?: string;
418
419
  columnList?: any;
419
420
  labelType?: string;
@@ -422,6 +423,7 @@ export type FloatingDropDownOption = {
422
423
  table?: TableObjectType;
423
424
  isImportEnabled?: boolean;
424
425
  column?: SelectedColumn;
426
+ subLabelIcon?: string;
425
427
  };
426
428
  export type FilterType = {
427
429
  tableName: string;
@@ -58,6 +58,7 @@ export type UseMetricQueryQueryInputType = {
58
58
  format: string;
59
59
  seriesField: string;
60
60
  };
61
+ chartSeriesField?: string;
61
62
  };
62
63
  export type UseMetricQueryQueryOutputType = {
63
64
  data?: any | null;