@databrainhq/plugin 0.14.65 → 0.14.67
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.
- package/dist/components/Accordion/index.d.ts +5 -0
- package/dist/components/Alert/index.d.ts +3 -1
- package/dist/components/AutoCompleteDropdown/index.d.ts +8 -3
- package/dist/components/Badge/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/ChartPopup/index.d.ts +4 -2
- package/dist/components/ChartSettingsPopup/components/ChartConfigure/index.d.ts +4 -2
- package/dist/components/DataType/index.d.ts +3 -1
- package/dist/components/FloatingDropDown/index.d.ts +4 -1
- package/dist/components/Icons/icons.d.ts +1 -1
- package/dist/components/InputField/index.d.ts +1 -1
- package/dist/components/List/index.d.ts +8 -2
- package/dist/components/Modal/Modal.d.ts +2 -0
- package/dist/components/SearchDropdown/index.d.ts +15 -0
- package/dist/components/Tab/index.d.ts +5 -1
- package/dist/components/Table/Filter.d.ts +7 -0
- package/dist/components/TagInputField/index.d.ts +4 -3
- package/dist/components/Text/index.d.ts +2 -2
- package/dist/components/TextAreaField/index.d.ts +2 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/consts/app.d.ts +3 -1
- package/dist/consts/metricOptions.d.ts +36 -1
- package/dist/containers/index.d.ts +3 -0
- package/dist/helpers/autoCompleteHelpers.d.ts +46 -0
- package/dist/helpers/createMetric.d.ts +3 -1
- package/dist/helpers/getNextScheduledTime.d.ts +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/timeseriesOption.d.ts +13 -10
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAutoCompleteOptions.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/types/app.d.ts +15 -2
- package/dist/types/metricCreate.d.ts +76 -1
- package/dist/utils/fetcher.d.ts +1 -0
- package/dist/webcomponents.es.js +50166 -47771
- package/dist/webcomponents.umd.js +289 -217
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@ interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
|
12
12
|
rightIcon?: JSX.Element;
|
|
13
13
|
labelVariant?: 'floating' | 'static';
|
|
14
14
|
}
|
|
15
|
-
export declare const InputField: ({ type, register, label, isDisabled, id, elementRef, error, supportingText, leftIcon, rightIcon, labelVariant, ...rest }: Props) => React.JSX.Element;
|
|
15
|
+
export declare const InputField: ({ type, register, label, isDisabled, id, elementRef, error, supportingText, leftIcon, rightIcon, labelVariant, value, ...rest }: Props) => React.JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -22,6 +22,12 @@ export type ListProps = {
|
|
|
22
22
|
id: string;
|
|
23
23
|
}>>;
|
|
24
24
|
isDisableMoreOption?: boolean;
|
|
25
|
-
|
|
25
|
+
isEnableSelectAll?: boolean;
|
|
26
|
+
onSelectAll?: () => void;
|
|
27
|
+
onDeselectAll?: () => void;
|
|
28
|
+
isAllSelected?: boolean;
|
|
29
|
+
parent?: 'DASHBOARD' | 'METRIC' | 'DATAMART';
|
|
30
|
+
extraValues?: any;
|
|
31
|
+
extraHeaderText?: string;
|
|
26
32
|
};
|
|
27
|
-
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption,
|
|
33
|
+
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableSelectAll, onSelectAll, onDeselectAll, isAllSelected, parent, extraValues, extraHeaderText, }: ListProps) => React.JSX.Element;
|
|
@@ -3,9 +3,11 @@ export interface ModalProps extends PropsWithChildren {
|
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
headerTitle?: string;
|
|
6
|
+
subHeadingTitle?: string;
|
|
6
7
|
customHeader?: JSX.Element;
|
|
7
8
|
enableFullScreenButton?: boolean;
|
|
8
9
|
zIndex?: number;
|
|
9
10
|
icon?: any;
|
|
11
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
10
12
|
}
|
|
11
13
|
export declare const Modal: React.FC<ModalProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchColumn, SearchKeyType } from '@/types';
|
|
3
|
+
export type SearchDropdownProps = {
|
|
4
|
+
onSubmitSearch: () => void;
|
|
5
|
+
options: SearchColumn[];
|
|
6
|
+
label?: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
position?: 'top' | 'bottom';
|
|
10
|
+
setSearchKeys: React.Dispatch<React.SetStateAction<SearchKeyType[]>>;
|
|
11
|
+
searchKeys: SearchKeyType[];
|
|
12
|
+
setSearchKeyword: React.Dispatch<React.SetStateAction<string>>;
|
|
13
|
+
searchKeyword: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const SearchDropdown: ({ label, options, isDisabled, placeholder, position, onSubmitSearch, searchKeys, setSearchKeys, searchKeyword, setSearchKeyword, }: SearchDropdownProps) => React.JSX.Element;
|
|
@@ -5,6 +5,10 @@ type TabProps = {
|
|
|
5
5
|
setActiveTab: React.Dispatch<React.SetStateAction<string>>;
|
|
6
6
|
className?: string;
|
|
7
7
|
tabText?: string;
|
|
8
|
+
lockedTabs?: string[];
|
|
9
|
+
tabClassname?: string;
|
|
10
|
+
onChange?: (option: string) => void;
|
|
11
|
+
isDisabled?: boolean;
|
|
8
12
|
};
|
|
9
|
-
export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, }: TabProps) => React.JSX.Element;
|
|
13
|
+
export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, lockedTabs, tabClassname, onChange, isDisabled, }: TabProps) => React.JSX.Element;
|
|
10
14
|
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
|
|
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;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Colors } from '@/types';
|
|
3
3
|
interface Props {
|
|
4
|
-
variant?: 'heading-xl' | 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'sub-label' | 'display' | 'body-text-xs';
|
|
4
|
+
variant?: 'heading-xl' | 'heading-lg' | 'heading' | 'heading-sm' | 'heading-xs' | 'heading-2' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'input-label' | 'subtext' | 'tag-or-flag' | 'subtext-forms' | 'code' | 'sub-label' | 'display' | 'body-text-xs' | 'small-text';
|
|
5
5
|
color?: Colors;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onClick?: () => void;
|
|
8
|
-
display?: 'block' | 'inline';
|
|
8
|
+
display?: 'block' | 'inline' | 'inline-truncate';
|
|
9
9
|
opacity?: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
|
|
10
10
|
}
|
|
11
11
|
export declare const Text: ({ children, variant, color, display, onClick, opacity, }: Props) => React.JSX.Element;
|
|
@@ -16,7 +16,8 @@ interface Props extends React.HTMLProps<HTMLTextAreaElement> {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
leftIcon?: JSX.Element;
|
|
18
18
|
rightIcon?: JSX.Element;
|
|
19
|
+
isDisabled?: boolean;
|
|
19
20
|
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
20
21
|
}
|
|
21
|
-
export declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, leftIcon, rightIcon, ...rest }: Props) => React.JSX.Element;
|
|
22
|
+
export declare const TextAreaField: ({ id, label, placeholder, rows, cols, resizable, register, error, defaultValue, value, onFocus, onBlur, className, leftIcon, rightIcon, isDisabled, ...rest }: Props) => React.JSX.Element;
|
|
22
23
|
export {};
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export declare const WEEK_DAYS: {
|
|
|
76
76
|
export declare const TIME_ZONES: {
|
|
77
77
|
value: string;
|
|
78
78
|
label: string;
|
|
79
|
+
timezoneOffset: number;
|
|
79
80
|
}[];
|
|
80
81
|
export declare const TIME: {
|
|
81
82
|
value: string;
|
|
@@ -98,7 +99,7 @@ export declare const NUMBER_FORMAT: {
|
|
|
98
99
|
label: string;
|
|
99
100
|
value: string;
|
|
100
101
|
}[];
|
|
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", "
|
|
102
|
+
export declare const ICONS_LIST: readonly ["drag-icon", "check", "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
103
|
export declare const NUMBER = "number";
|
|
103
104
|
export declare const STRING = "string";
|
|
104
105
|
export declare const BOOLEAN = "boolean";
|
|
@@ -126,3 +127,4 @@ export declare const NUMBER_FIELD = "NUMBER_FIELD";
|
|
|
126
127
|
export declare const BETWEEN = "BETWEEN";
|
|
127
128
|
export declare const CUSTOM = "custom";
|
|
128
129
|
export declare const IS_SELF_HOSTED: any;
|
|
130
|
+
export declare const DBN_APP_TOKEN = "@app:token";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartSettingsType, DatasetMetricCreationConfiguration, FloatingDropDownOption } from '@/types';
|
|
1
|
+
import { ChartSettingsType, DatasetMetricCreationConfiguration, FloatingDropDownOption, SearchState, SearchStateChatType } from '@/types';
|
|
2
2
|
export declare const RowLimitList: {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
@@ -112,6 +112,37 @@ export declare const NUMBER_FILTER_SYNONYMNS: {
|
|
|
112
112
|
label: string;
|
|
113
113
|
synonymns: string[];
|
|
114
114
|
}[];
|
|
115
|
+
export declare const STRING_FILTER_SYNONYMS: {
|
|
116
|
+
'=': string[];
|
|
117
|
+
'<>': string[];
|
|
118
|
+
LIKE: string[];
|
|
119
|
+
'NOT LIKE': string[];
|
|
120
|
+
IN: string[];
|
|
121
|
+
'NOT IN': string[];
|
|
122
|
+
};
|
|
123
|
+
export declare const STRING_FILTER_OPTIONS: ({
|
|
124
|
+
value: string;
|
|
125
|
+
synonyms: string[];
|
|
126
|
+
alias: (name: string, value: string) => string;
|
|
127
|
+
filterValue: (value: string) => {
|
|
128
|
+
stringArray: string[];
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
value: string;
|
|
132
|
+
synonyms: string[];
|
|
133
|
+
alias: (name: string, value: string) => string;
|
|
134
|
+
filterValue: (value: string) => {
|
|
135
|
+
stringValue: string;
|
|
136
|
+
};
|
|
137
|
+
})[];
|
|
138
|
+
export declare const STRING_LIKE_OPERATORS: {
|
|
139
|
+
value: string;
|
|
140
|
+
synonyms: string[];
|
|
141
|
+
alias: (name: string) => string;
|
|
142
|
+
filterValue: () => {
|
|
143
|
+
stringValue: string;
|
|
144
|
+
};
|
|
145
|
+
}[];
|
|
115
146
|
export declare const DATASET_OTHER_HELPER_FUNCTIONS: {
|
|
116
147
|
value: string;
|
|
117
148
|
label: string;
|
|
@@ -145,3 +176,7 @@ export declare const CAST_COLUMN_AS: {
|
|
|
145
176
|
icon: string;
|
|
146
177
|
}[];
|
|
147
178
|
export declare const arithmeticOperators: FloatingDropDownOption[];
|
|
179
|
+
export declare const keywordToIgnore: string[];
|
|
180
|
+
export declare const keywordToIgnoreRegExp: RegExp;
|
|
181
|
+
export declare const DEFAULT_SEARCH_STATE: SearchState;
|
|
182
|
+
export declare const DEFAULT_SEARCH_CHAT: SearchStateChatType;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilteredOptionResult, FloatingDropDownOption, KeywordFilteredResult, SearchColumn, SelectedColumn } from '@/types';
|
|
2
|
+
export declare const getSearchKeywordList: (searchString: string) => string[];
|
|
3
|
+
export declare const getFilteredKeywords: (keywordList: string[], isNumberFilter: boolean) => KeywordFilteredResult;
|
|
4
|
+
export declare const parseNumberName: (keywords: string[]) => number;
|
|
5
|
+
export declare const isLikeFilterColumn: (column: SelectedColumn) => boolean;
|
|
6
|
+
export declare const getOptionLabel: ({ column, keywords, likeOperationMatch, }: {
|
|
7
|
+
column: SelectedColumn;
|
|
8
|
+
keywords: string[];
|
|
9
|
+
likeOperationMatch: RegExpMatchArray | null;
|
|
10
|
+
}) => string;
|
|
11
|
+
export declare const getSortLimitAppliedColumnOptions: ({ columnOptions, limit, sortType, }: {
|
|
12
|
+
columnOptions: SelectedColumn[];
|
|
13
|
+
sortType: string | undefined;
|
|
14
|
+
limit: number;
|
|
15
|
+
}) => SelectedColumn[];
|
|
16
|
+
export declare const isSynonymPatternMatching: (opt: SelectedColumn, searchString: string, isLike: boolean) => boolean;
|
|
17
|
+
export declare const getPrimaryFilteredOptions: (options: SelectedColumn[], searchString: string, isLike: boolean) => FilteredOptionResult;
|
|
18
|
+
export declare const getRemainingFilterOption: ({ isLike, isQuestion, keywordList, options, isGroupBy, }: {
|
|
19
|
+
options: SelectedColumn[];
|
|
20
|
+
keywordList: string[];
|
|
21
|
+
isLike: boolean;
|
|
22
|
+
isQuestion: boolean;
|
|
23
|
+
isGroupBy: boolean;
|
|
24
|
+
}) => SelectedColumn[];
|
|
25
|
+
export declare const getFinalFilteredList: ({ keywordList, limit, options, isLikeFilter, isLikeOperation, isNumberFilter, isEnforceLikeFilter, isEndWith, isStartWith, sortType, }: {
|
|
26
|
+
options: SelectedColumn[];
|
|
27
|
+
limit: number;
|
|
28
|
+
keywordList: string[];
|
|
29
|
+
isLikeOperation: RegExpMatchArray | null;
|
|
30
|
+
isLikeFilter: RegExpMatchArray | null;
|
|
31
|
+
isNumberFilter: RegExpMatchArray | null;
|
|
32
|
+
isEnforceLikeFilter: boolean;
|
|
33
|
+
isStartWith: boolean;
|
|
34
|
+
isEndWith: boolean;
|
|
35
|
+
sortType: string | undefined;
|
|
36
|
+
}) => SelectedColumn[];
|
|
37
|
+
export declare const getColumnDataType: (datatype: string) => "NUMBER" | "STRING" | "DATE" | "ARRAY" | "BOOLEAN" | undefined;
|
|
38
|
+
export declare const getHelperFunctions: (datatype: 'NUMBER' | 'STRING' | 'DATE' | 'ARRAY' | 'BOOLEAN' | undefined, isElasticSearch: boolean) => FloatingDropDownOption[];
|
|
39
|
+
export declare const isSearchKeywordIncluded: (field: keyof SearchColumn, opt: SearchColumn, keyword: string) => boolean;
|
|
40
|
+
export declare const isValidOption: (options: SearchColumn[], keyword: string) => boolean;
|
|
41
|
+
export declare const getEnableCharts: (data: Record<string, any>[], groupByList: string[]) => string[];
|
|
42
|
+
export declare const chartDimensions: (data: Record<string, any>[], groupByColumnList: string[], chartType: string) => {
|
|
43
|
+
yAxisList: string[];
|
|
44
|
+
xAxis: string;
|
|
45
|
+
singleValue: string;
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Aggregate, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn } from '@/types';
|
|
1
|
+
import { Aggregate, ChartSettingsType, DatasetMetricCreationConfiguration, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn } from '@/types';
|
|
2
2
|
export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
|
|
3
3
|
export declare const getColumnType: (column: SelectedColumn) => "default" | "custom" | "arithmetic_column";
|
|
4
4
|
export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
|
|
@@ -7,3 +7,5 @@ export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) =>
|
|
|
7
7
|
};
|
|
8
8
|
export declare const getChartFields: (colList: SelectedColumn[], dbName: string) => string[];
|
|
9
9
|
export declare const getAppliedFilters: (filterList: RlsCondition[], companyTenancyType: string, clientId: string) => RlsCondition[];
|
|
10
|
+
export declare const getChartType: ({ aggregates, dimensions, }: DatasetMetricCreationConfiguration) => ChartSettingsType['chartType'];
|
|
11
|
+
export declare const getSchemaNameAlias: (schemaName: string, dbName: string) => string;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -68,15 +68,6 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
|
|
|
68
68
|
data: string[];
|
|
69
69
|
};
|
|
70
70
|
yAxis: {
|
|
71
|
-
name: string | undefined;
|
|
72
|
-
nameLocation: string;
|
|
73
|
-
nameGap: number;
|
|
74
|
-
nameTextStyle: {
|
|
75
|
-
fontSize: number;
|
|
76
|
-
color: string;
|
|
77
|
-
fontWeight: number;
|
|
78
|
-
};
|
|
79
|
-
type: string;
|
|
80
71
|
position: string | undefined;
|
|
81
72
|
splitLine: {
|
|
82
73
|
show: boolean;
|
|
@@ -92,6 +83,18 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
|
|
|
92
83
|
fontFamily: string | undefined;
|
|
93
84
|
formatter: (value: any) => string;
|
|
94
85
|
};
|
|
86
|
+
max?: number | undefined;
|
|
87
|
+
min?: number | undefined;
|
|
88
|
+
interval?: number | undefined;
|
|
89
|
+
name: string | undefined;
|
|
90
|
+
nameLocation: string;
|
|
91
|
+
nameGap: number;
|
|
92
|
+
nameTextStyle: {
|
|
93
|
+
fontSize: number;
|
|
94
|
+
color: string;
|
|
95
|
+
fontWeight: number;
|
|
96
|
+
};
|
|
97
|
+
type: string;
|
|
95
98
|
};
|
|
96
99
|
legend: {
|
|
97
100
|
orient: string | undefined;
|
|
@@ -194,5 +197,5 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
|
|
|
194
197
|
};
|
|
195
198
|
})[];
|
|
196
199
|
};
|
|
197
|
-
export declare const getFormat: (value: FloatingDropDownOption, dbName: string) => "%b - %Y" | "Mon - yyyy" | "%Y" | "yyyy" | "%Q %Y" | "Q yyyy" | "%Y-%m-%d" | "yyyy-mm-dd" | "%Y-%m-%W" | "yyyy-mm-WW";
|
|
200
|
+
export declare const getFormat: (value: FloatingDropDownOption, dbName: string) => "%b - %Y" | "MMM - yyyy" | "Mon - yyyy" | "%Y" | "yyyy" | "%Q %Y" | "Q yyyy" | "%Y-%m-%d" | "yyyy-MM-dd" | "yyyy-mm-dd" | "%Y-%m-%W" | "yyyy-MM-WEEKOFYEAR" | "yyyy-mm-WW";
|
|
198
201
|
export {};
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/index.d.ts
ADDED
|
@@ -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';
|
package/dist/types/app.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export type TableColumn = {
|
|
|
30
30
|
sql?: string;
|
|
31
31
|
type?: 'custom' | 'default' | 'python';
|
|
32
32
|
isAggregate?: boolean;
|
|
33
|
+
alias?: string;
|
|
34
|
+
synonyms?: string[];
|
|
35
|
+
columnTypeConfig?: string | Record<string, any>;
|
|
33
36
|
};
|
|
34
37
|
export type TimeSeriesGroupType = 'yearly' | 'monthly' | 'weekly' | 'daily' | 'quarterly';
|
|
35
38
|
export type TimeSeriesType = 'bar' | 'line' | 'area' | 'stack';
|
|
@@ -49,7 +52,7 @@ export type TimeSeriesSettingsProps = {
|
|
|
49
52
|
settings: TimeSeriesSettingsType;
|
|
50
53
|
onChange: (timeSeriesSettings: TimeSeriesSettingsType | ((ts: TimeSeriesSettingsType) => TimeSeriesSettingsType)) => void;
|
|
51
54
|
yAxisList: string[];
|
|
52
|
-
onChangeTimeseriesFormat
|
|
55
|
+
onChangeTimeseriesFormat?: (value: FloatingDropDownOption) => void;
|
|
53
56
|
};
|
|
54
57
|
export type TimeSeriesChartProps = {
|
|
55
58
|
dataArray: Record<string, any>[];
|
|
@@ -90,6 +93,9 @@ export type CustomSettings = {
|
|
|
90
93
|
hideXAxisLines?: boolean;
|
|
91
94
|
hideYAxisLines?: boolean;
|
|
92
95
|
isEnableLabelFormatting?: boolean;
|
|
96
|
+
isEnableCustomLimits?: boolean;
|
|
97
|
+
customUppperLimit?: number;
|
|
98
|
+
customLowerLimit?: number;
|
|
93
99
|
YaxislabelFormatters?: {
|
|
94
100
|
upperLimit: number;
|
|
95
101
|
lowerLimit: number;
|
|
@@ -193,7 +199,7 @@ export type CustomSettings = {
|
|
|
193
199
|
showStackLabels?: boolean;
|
|
194
200
|
coloredBars?: boolean;
|
|
195
201
|
};
|
|
196
|
-
export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert' | 'cta';
|
|
202
|
+
export type Colors = 'primary' | 'primary-title' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert' | 'cta';
|
|
197
203
|
export type IconType = (typeof ICONS_LIST)[number];
|
|
198
204
|
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3';
|
|
199
205
|
export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -227,6 +233,7 @@ export type TableSettings = {
|
|
|
227
233
|
tableTitle?: string;
|
|
228
234
|
showTableDesc?: boolean;
|
|
229
235
|
enableTableSearch?: boolean;
|
|
236
|
+
isEnableColumnFilter?: boolean;
|
|
230
237
|
enableFilter?: boolean;
|
|
231
238
|
enableSorting?: boolean;
|
|
232
239
|
disablePagination?: boolean;
|
|
@@ -414,6 +421,7 @@ export type FloatingDropDownOption = {
|
|
|
414
421
|
value: string;
|
|
415
422
|
badge?: string;
|
|
416
423
|
subValue?: string;
|
|
424
|
+
subLabelOptions?: string[];
|
|
417
425
|
icon?: string;
|
|
418
426
|
columnList?: any;
|
|
419
427
|
labelType?: string;
|
|
@@ -422,6 +430,7 @@ export type FloatingDropDownOption = {
|
|
|
422
430
|
table?: TableObjectType;
|
|
423
431
|
isImportEnabled?: boolean;
|
|
424
432
|
column?: SelectedColumn;
|
|
433
|
+
subLabelIcon?: string;
|
|
425
434
|
};
|
|
426
435
|
export type FilterType = {
|
|
427
436
|
tableName: string;
|
|
@@ -494,6 +503,10 @@ export type CustomOption = {
|
|
|
494
503
|
value: string | number;
|
|
495
504
|
label: string;
|
|
496
505
|
range?: string;
|
|
506
|
+
fromDate?: Date;
|
|
507
|
+
toDate?: Date;
|
|
508
|
+
minDate?: Date;
|
|
509
|
+
maxDate?: Date;
|
|
497
510
|
};
|
|
498
511
|
export type RlsCondition = {
|
|
499
512
|
name: string;
|
|
@@ -128,6 +128,28 @@ export type SelectedColumn = {
|
|
|
128
128
|
secondOperand: SelectedColumn;
|
|
129
129
|
operator: FloatingDropDownOption;
|
|
130
130
|
};
|
|
131
|
+
columnSynonyms?: string[];
|
|
132
|
+
isDisable?: boolean;
|
|
133
|
+
patterns?: RegExp;
|
|
134
|
+
dataMartColumnAlias?: string;
|
|
135
|
+
};
|
|
136
|
+
export type SearchColumn = {
|
|
137
|
+
name: string;
|
|
138
|
+
datatype: string;
|
|
139
|
+
tableName: string;
|
|
140
|
+
schemaName: string;
|
|
141
|
+
alias: string;
|
|
142
|
+
patterns?: RegExp;
|
|
143
|
+
functionsSynonyms?: string[];
|
|
144
|
+
columnSynonyms?: string[];
|
|
145
|
+
distinctValues?: string[];
|
|
146
|
+
filtersSynonyms?: string[];
|
|
147
|
+
distinctValueSynonyms?: string[];
|
|
148
|
+
type: 'COLUMN' | 'VALUE';
|
|
149
|
+
};
|
|
150
|
+
export type SearchKeyType = {
|
|
151
|
+
key: string;
|
|
152
|
+
type: 'VALID' | 'INVALID';
|
|
131
153
|
};
|
|
132
154
|
export type SelectedFilter = {
|
|
133
155
|
method: string;
|
|
@@ -261,6 +283,7 @@ export type ClickActionsConfig = {
|
|
|
261
283
|
dynamic: string;
|
|
262
284
|
route: string;
|
|
263
285
|
routeType: string;
|
|
286
|
+
valueColumn?: string;
|
|
264
287
|
};
|
|
265
288
|
};
|
|
266
289
|
export type DrillDownSetting = {
|
|
@@ -382,11 +405,14 @@ export type Filter = {
|
|
|
382
405
|
alias: string;
|
|
383
406
|
parentAlias: string;
|
|
384
407
|
value: string | number | string[] | number[] | {
|
|
408
|
+
from: string;
|
|
409
|
+
to: string;
|
|
410
|
+
} | {
|
|
385
411
|
startDate: string;
|
|
386
412
|
endDate: string;
|
|
387
413
|
timeFilter: string;
|
|
388
414
|
};
|
|
389
|
-
type: 'custom' | 'default' | 'agr' | 'dimension' | 'time' | 'client' | 'rls_filter';
|
|
415
|
+
type: 'custom' | 'default' | 'agr' | 'dimension' | 'time' | 'client' | 'rls_filter' | 'number_range';
|
|
390
416
|
dataType: string;
|
|
391
417
|
relationOperator?: 'AND' | 'OR';
|
|
392
418
|
};
|
|
@@ -515,4 +541,53 @@ export type OnSaveArithmeticColumnParams = {
|
|
|
515
541
|
type: MetricConfigType;
|
|
516
542
|
alias: string;
|
|
517
543
|
};
|
|
544
|
+
export type KeywordFilteredResult = {
|
|
545
|
+
keywords: string[];
|
|
546
|
+
questionKeys: string[];
|
|
547
|
+
groupKeywords: string[];
|
|
548
|
+
ascKeywords: string[];
|
|
549
|
+
descKeywords: string[];
|
|
550
|
+
numberKeywords: string[];
|
|
551
|
+
};
|
|
552
|
+
export type FilteredOptionResult = {
|
|
553
|
+
filteredOptions: SelectedColumn[];
|
|
554
|
+
remainingOptions: SelectedColumn[];
|
|
555
|
+
};
|
|
556
|
+
export type SearchStateChatType = {
|
|
557
|
+
question: string;
|
|
558
|
+
responseQuery: string;
|
|
559
|
+
chartSettings: ChartSettingsType;
|
|
560
|
+
data: Record<string, any>[];
|
|
561
|
+
groupbyColumnList: string[];
|
|
562
|
+
timestamp: number;
|
|
563
|
+
isResetPallete: boolean;
|
|
564
|
+
barRadius?: {
|
|
565
|
+
topRadius: number;
|
|
566
|
+
bottomRadius: number;
|
|
567
|
+
};
|
|
568
|
+
error: string;
|
|
569
|
+
};
|
|
570
|
+
export type SearchState = {
|
|
571
|
+
isDisableButton: boolean;
|
|
572
|
+
error: string;
|
|
573
|
+
isLoading: boolean;
|
|
574
|
+
currentQuestion: string;
|
|
575
|
+
chats: SearchStateChatType[];
|
|
576
|
+
followUp?: SearchStateChatType;
|
|
577
|
+
};
|
|
578
|
+
export type SearchFollowUpConfig = {
|
|
579
|
+
isEnable: true;
|
|
580
|
+
previousQuestion: string;
|
|
581
|
+
previousSql: string;
|
|
582
|
+
};
|
|
583
|
+
export type SearchConfigType = {
|
|
584
|
+
followUp?: SearchFollowUpConfig;
|
|
585
|
+
tables?: {
|
|
586
|
+
name: string;
|
|
587
|
+
columns: {
|
|
588
|
+
name: string;
|
|
589
|
+
method?: string;
|
|
590
|
+
}[];
|
|
591
|
+
}[];
|
|
592
|
+
};
|
|
518
593
|
export {};
|
package/dist/utils/fetcher.d.ts
CHANGED