@databrainhq/plugin 0.14.64 → 0.14.66

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,11 @@ export type ListProps = {
22
22
  id: string;
23
23
  }>>;
24
24
  isDisableMoreOption?: boolean;
25
- isEnableHovering?: boolean;
25
+ isEnableSelectAll?: boolean;
26
+ onSelectAll?: () => void;
27
+ onDeselectAll?: () => void;
28
+ isAllSelected?: boolean;
29
+ parent?: 'DASHBOARD' | 'METRIC';
30
+ extraValues?: any;
26
31
  };
27
- export declare const List: ({ headers, data, variant, noDataText, loadMoreText, className, initialLimit, isDataLoading, showLogo, isShowOptions, setValue, isDisableMoreOption, isEnableHovering, }: ListProps) => React.JSX.Element;
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;
@@ -7,6 +7,8 @@ type RawCsvDownloadButtonProps = {
7
7
  className?: string;
8
8
  children?: React.ReactNode;
9
9
  updateDownloadProgress: (isEnable: boolean) => void;
10
+ isPythonMode: boolean;
11
+ data: Record<string, any>[];
10
12
  };
11
- export declare const RawCsvDownloadButton: ({ fileName, companyIntegrationId, integrationName, query, className, children, updateDownloadProgress, }: RawCsvDownloadButtonProps) => React.JSX.Element;
13
+ export declare const RawCsvDownloadButton: ({ fileName, companyIntegrationId, integrationName, query, className, children, updateDownloadProgress, isPythonMode, data, }: RawCsvDownloadButtonProps) => React.JSX.Element;
12
14
  export {};
@@ -12,5 +12,6 @@ export type DownloadButtonProps = {
12
12
  integrationName: string;
13
13
  queryWithNoFilter: string;
14
14
  updateDownloadProgress: (isEnable: boolean) => void;
15
+ isPythonMode: boolean;
15
16
  };
16
- export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, chartOptions, integrationName, companyIntegrationId, query, queryWithNoFilter, updateDownloadProgress, }: DownloadButtonProps) => React.JSX.Element;
17
+ export declare const DownloadButton: ({ data, chartRef, metricName, onRawCsvData, chartOptions, integrationName, companyIntegrationId, query, queryWithNoFilter, updateDownloadProgress, isPythonMode, }: DownloadButtonProps) => 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>;
@@ -5,6 +5,8 @@ type TabProps = {
5
5
  setActiveTab: React.Dispatch<React.SetStateAction<string>>;
6
6
  className?: string;
7
7
  tabText?: string;
8
+ lockedTabs?: 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, lockedTabs, 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;
@@ -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';
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;
@@ -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", "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"];
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
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";
@@ -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,4 @@ export declare const CAST_COLUMN_AS: {
145
176
  icon: string;
146
177
  }[];
147
178
  export declare const arithmeticOperators: FloatingDropDownOption[];
179
+ export declare const keywordToIgnoreRegExp: RegExp;
@@ -0,0 +1,3 @@
1
+ export * from './Dashboard';
2
+ export * from './PluginProvider';
3
+ export * from './Metric';
@@ -0,0 +1,38 @@
1
+ import { FilteredOptionResult, FloatingDropDownOption, KeywordFilteredResult, 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[];
@@ -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;
@@ -9,5 +9,5 @@ interface ScheduleParams {
9
9
  time: string;
10
10
  timezone: string;
11
11
  }
12
- declare const getNextScheduledTime: (params: ScheduleParams) => Date;
12
+ declare const getNextScheduledTime: (params: ScheduleParams) => string;
13
13
  export default getNextScheduledTime;
@@ -11,3 +11,4 @@ export * from './getColumnType';
11
11
  export * from './createMetric';
12
12
  export * from './timeseriesOption';
13
13
  export * from './chartOptions';
14
+ export * from './autoCompleteHelpers';
@@ -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;
@@ -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';
@@ -90,6 +90,9 @@ export type CustomSettings = {
90
90
  hideXAxisLines?: boolean;
91
91
  hideYAxisLines?: boolean;
92
92
  isEnableLabelFormatting?: boolean;
93
+ isEnableCustomLimits?: boolean;
94
+ customUppperLimit?: number;
95
+ customLowerLimit?: number;
93
96
  YaxislabelFormatters?: {
94
97
  upperLimit: number;
95
98
  lowerLimit: number;
@@ -193,7 +196,7 @@ export type CustomSettings = {
193
196
  showStackLabels?: boolean;
194
197
  coloredBars?: boolean;
195
198
  };
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';
199
+ 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
200
  export type IconType = (typeof ICONS_LIST)[number];
198
201
  export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3';
199
202
  export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -414,6 +417,7 @@ export type FloatingDropDownOption = {
414
417
  value: string;
415
418
  badge?: string;
416
419
  subValue?: string;
420
+ subLabelOptions?: string[];
417
421
  icon?: string;
418
422
  columnList?: any;
419
423
  labelType?: string;
@@ -422,6 +426,7 @@ export type FloatingDropDownOption = {
422
426
  table?: TableObjectType;
423
427
  isImportEnabled?: boolean;
424
428
  column?: SelectedColumn;
429
+ subLabelIcon?: string;
425
430
  };
426
431
  export type FilterType = {
427
432
  tableName: string;
@@ -494,6 +499,10 @@ export type CustomOption = {
494
499
  value: string | number;
495
500
  label: string;
496
501
  range?: string;
502
+ fromDate?: Date;
503
+ toDate?: Date;
504
+ minDate?: Date;
505
+ maxDate?: Date;
497
506
  };
498
507
  export type RlsCondition = {
499
508
  name: string;
@@ -128,6 +128,10 @@ 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;
131
135
  };
132
136
  export type SelectedFilter = {
133
137
  method: string;
@@ -382,11 +386,14 @@ export type Filter = {
382
386
  alias: string;
383
387
  parentAlias: string;
384
388
  value: string | number | string[] | number[] | {
389
+ from: string;
390
+ to: string;
391
+ } | {
385
392
  startDate: string;
386
393
  endDate: string;
387
394
  timeFilter: string;
388
395
  };
389
- type: 'custom' | 'default' | 'agr' | 'dimension' | 'time' | 'client' | 'rls_filter';
396
+ type: 'custom' | 'default' | 'agr' | 'dimension' | 'time' | 'client' | 'rls_filter' | 'number_range';
390
397
  dataType: string;
391
398
  relationOperator?: 'AND' | 'OR';
392
399
  };
@@ -515,4 +522,16 @@ export type OnSaveArithmeticColumnParams = {
515
522
  type: MetricConfigType;
516
523
  alias: string;
517
524
  };
525
+ export type KeywordFilteredResult = {
526
+ keywords: string[];
527
+ questionKeys: string[];
528
+ groupKeywords: string[];
529
+ ascKeywords: string[];
530
+ descKeywords: string[];
531
+ numberKeywords: string[];
532
+ };
533
+ export type FilteredOptionResult = {
534
+ filteredOptions: SelectedColumn[];
535
+ remainingOptions: SelectedColumn[];
536
+ };
518
537
  export {};
@@ -8,5 +8,6 @@ type FetcherOptions = {
8
8
  isFrontend?: boolean;
9
9
  clientId?: string;
10
10
  };
11
+ export declare const getToken: () => string | null;
11
12
  declare const fetcher: <T>(url: string, options?: FetcherOptions) => Promise<ApiResponse<T>>;
12
13
  export default fetcher;