@databrainhq/plugin 0.14.66 → 0.14.68
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/Alert/index.d.ts +3 -1
- package/dist/components/AutoCompleteDropdown/index.d.ts +7 -3
- 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 +3 -2
- 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 +3 -2
- package/dist/components/SearchDropdown/index.d.ts +15 -0
- package/dist/components/Tab/index.d.ts +3 -1
- package/dist/components/Table/Filter.d.ts +7 -0
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/TextAreaField/index.d.ts +2 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/consts/app.d.ts +1 -1
- package/dist/consts/metricOptions.d.ts +4 -1
- package/dist/helpers/autoCompleteHelpers.d.ts +9 -1
- package/dist/helpers/timeseriesOption.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAutoCompleteOptions.d.ts +4 -0
- package/dist/types/app.d.ts +5 -1
- package/dist/types/metricCreate.d.ts +56 -0
- package/dist/webcomponents.es.js +39730 -38924
- package/dist/webcomponents.umd.js +235 -201
- 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 {};
|
|
@@ -26,7 +26,8 @@ export type ListProps = {
|
|
|
26
26
|
onSelectAll?: () => void;
|
|
27
27
|
onDeselectAll?: () => void;
|
|
28
28
|
isAllSelected?: boolean;
|
|
29
|
-
parent?: 'DASHBOARD' | 'METRIC';
|
|
29
|
+
parent?: 'DASHBOARD' | 'METRIC' | 'DATAMART';
|
|
30
30
|
extraValues?: any;
|
|
31
|
+
extraHeaderText?: string;
|
|
31
32
|
};
|
|
32
|
-
export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableSelectAll, onSelectAll, onDeselectAll, isAllSelected, parent, extraValues, }: ListProps) => React.JSX.Element;
|
|
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;
|
|
@@ -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;
|
|
@@ -7,6 +7,8 @@ type TabProps = {
|
|
|
7
7
|
tabText?: string;
|
|
8
8
|
lockedTabs?: string[];
|
|
9
9
|
tabClassname?: string;
|
|
10
|
+
onChange?: (option: string) => void;
|
|
11
|
+
isDisabled?: boolean;
|
|
10
12
|
};
|
|
11
|
-
export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, lockedTabs, tabClassname, }: TabProps) => React.JSX.Element;
|
|
13
|
+
export declare const Tab: ({ options, activeTab, setActiveTab, className, tabText, lockedTabs, tabClassname, onChange, isDisabled, }: TabProps) => React.JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Colors } from '@/types';
|
|
3
3
|
interface Props {
|
|
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';
|
|
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;
|
|
@@ -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
|
@@ -99,7 +99,7 @@ export declare const NUMBER_FORMAT: {
|
|
|
99
99
|
label: string;
|
|
100
100
|
value: string;
|
|
101
101
|
}[];
|
|
102
|
-
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
|
+
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"];
|
|
103
103
|
export declare const NUMBER = "number";
|
|
104
104
|
export declare const STRING = "string";
|
|
105
105
|
export declare const BOOLEAN = "boolean";
|
|
@@ -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;
|
|
@@ -176,4 +176,7 @@ export declare const CAST_COLUMN_AS: {
|
|
|
176
176
|
icon: string;
|
|
177
177
|
}[];
|
|
178
178
|
export declare const arithmeticOperators: FloatingDropDownOption[];
|
|
179
|
+
export declare const keywordToIgnore: string[];
|
|
179
180
|
export declare const keywordToIgnoreRegExp: RegExp;
|
|
181
|
+
export declare const DEFAULT_SEARCH_STATE: SearchState;
|
|
182
|
+
export declare const DEFAULT_SEARCH_CHAT: SearchStateChatType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilteredOptionResult, FloatingDropDownOption, KeywordFilteredResult, SelectedColumn } from '@/types';
|
|
1
|
+
import { FilteredOptionResult, FloatingDropDownOption, KeywordFilteredResult, SearchColumn, SelectedColumn } from '@/types';
|
|
2
2
|
export declare const getSearchKeywordList: (searchString: string) => string[];
|
|
3
3
|
export declare const getFilteredKeywords: (keywordList: string[], isNumberFilter: boolean) => KeywordFilteredResult;
|
|
4
4
|
export declare const parseNumberName: (keywords: string[]) => number;
|
|
@@ -36,3 +36,11 @@ export declare const getFinalFilteredList: ({ keywordList, limit, options, isLik
|
|
|
36
36
|
}) => SelectedColumn[];
|
|
37
37
|
export declare const getColumnDataType: (datatype: string) => "NUMBER" | "STRING" | "DATE" | "ARRAY" | "BOOLEAN" | undefined;
|
|
38
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
|
+
};
|
|
@@ -197,5 +197,5 @@ export declare const getSeriesOption: ({ chartOptions, data, backGroundColor, cu
|
|
|
197
197
|
};
|
|
198
198
|
})[];
|
|
199
199
|
};
|
|
200
|
-
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";
|
|
201
201
|
export {};
|
package/dist/hooks/index.d.ts
CHANGED
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>[];
|
|
@@ -230,6 +233,7 @@ export type TableSettings = {
|
|
|
230
233
|
tableTitle?: string;
|
|
231
234
|
showTableDesc?: boolean;
|
|
232
235
|
enableTableSearch?: boolean;
|
|
236
|
+
isEnableColumnFilter?: boolean;
|
|
233
237
|
enableFilter?: boolean;
|
|
234
238
|
enableSorting?: boolean;
|
|
235
239
|
disablePagination?: boolean;
|
|
@@ -133,6 +133,24 @@ export type SelectedColumn = {
|
|
|
133
133
|
patterns?: RegExp;
|
|
134
134
|
dataMartColumnAlias?: string;
|
|
135
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';
|
|
153
|
+
};
|
|
136
154
|
export type SelectedFilter = {
|
|
137
155
|
method: string;
|
|
138
156
|
alias: string;
|
|
@@ -265,6 +283,7 @@ export type ClickActionsConfig = {
|
|
|
265
283
|
dynamic: string;
|
|
266
284
|
route: string;
|
|
267
285
|
routeType: string;
|
|
286
|
+
valueColumn?: string;
|
|
268
287
|
};
|
|
269
288
|
};
|
|
270
289
|
export type DrillDownSetting = {
|
|
@@ -534,4 +553,41 @@ export type FilteredOptionResult = {
|
|
|
534
553
|
filteredOptions: SelectedColumn[];
|
|
535
554
|
remainingOptions: SelectedColumn[];
|
|
536
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
|
+
};
|
|
537
593
|
export {};
|