@databrainhq/plugin 0.15.28 → 0.15.30
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/Checkbox/index.d.ts +2 -1
- package/dist/components/Flex/index.d.ts +1 -1
- package/dist/components/GaugeLegend/index.d.ts +2 -1
- package/dist/components/Icons/Logos/index.d.ts +2 -0
- package/dist/components/InfoTooltip/index.d.ts +12 -0
- package/dist/components/MultiSelectDropdown/index.d.ts +2 -1
- package/dist/components/ScheduleEmail/ScheduleEmailForm/index.d.ts +11 -1
- package/dist/components/ScheduleEmail/index.d.ts +12 -1
- package/dist/components/Text/index.d.ts +2 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/consts/app.d.ts +1 -1
- package/dist/helpers/createMetric.d.ts +1 -0
- package/dist/hooks/useScheduleEmail.d.ts +14 -5
- package/dist/types/app.d.ts +4 -2
- package/dist/types/queryTypes.d.ts +3 -1
- package/dist/webcomponents.es.js +2506 -1980
- package/dist/webcomponents.umd.js +17 -17
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
|
5
5
|
register?: UseFormRegisterReturn;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
isUseInputLabel?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare const Checkbox: ({ register, label, isDisabled, id, checked, onChange, ...rest }: Props) => React.JSX.Element;
|
|
10
|
+
export declare const Checkbox: ({ register, label, isDisabled, id, checked, onChange, isUseInputLabel, ...rest }: Props) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -8,6 +8,6 @@ export declare const Flex: React.MemoExoticComponent<({ direction, justify, widt
|
|
|
8
8
|
height?: string | undefined;
|
|
9
9
|
className?: string | undefined;
|
|
10
10
|
alignItems?: "center" | "start" | "end" | "baseline" | "stretch" | null | undefined;
|
|
11
|
-
flexWrap?: "reverse" | "
|
|
11
|
+
flexWrap?: "reverse" | "wrap" | "nowrap" | null | undefined;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
}) => React.JSX.Element>;
|
|
@@ -6,6 +6,7 @@ type Props = {
|
|
|
6
6
|
color: string;
|
|
7
7
|
}[];
|
|
8
8
|
legendPosition?: string;
|
|
9
|
+
legendTruncate: number;
|
|
9
10
|
};
|
|
10
|
-
declare const GaugeLegend: ({ data, legendPosition }: Props) => React.JSX.Element;
|
|
11
|
+
declare const GaugeLegend: ({ data, legendPosition, legendTruncate }: Props) => React.JSX.Element;
|
|
11
12
|
export default GaugeLegend;
|
|
@@ -12,4 +12,16 @@ export declare const NewTooltip: ({ children, text, className, position, tooltip
|
|
|
12
12
|
export declare const InfoTooltip: React.FC<Omit<TooltipProps, 'content'> & {
|
|
13
13
|
iconConfig?: IconConfig;
|
|
14
14
|
}>;
|
|
15
|
+
export declare const MetricToolTip: ({ title, html, className, position, }: {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
} & {
|
|
18
|
+
content?: JSX.Element | undefined;
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
text?: string | undefined;
|
|
21
|
+
tooltipClass?: string | undefined;
|
|
22
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right" | "center" | "left-bottom-end" | "right-bottom-end" | "left-top-end" | "right-top-end" | "left-bottom" | "left-top" | "right-bottom" | "right-top" | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
html?: string | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
}) => React.JSX.Element;
|
|
15
27
|
export {};
|
|
@@ -34,6 +34,7 @@ export type MultiSelectDropdownProps = Omit<MultiSelectAccordianDropdownProps, '
|
|
|
34
34
|
menuZIndex?: number;
|
|
35
35
|
isSelectAllEnabled?: boolean;
|
|
36
36
|
isSelectAllOn?: boolean;
|
|
37
|
+
onSearch?: (searchKeyword: string) => void;
|
|
37
38
|
};
|
|
38
39
|
export declare const MultiSelectAccordianDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, radius, }: MultiSelectAccordianDropdownProps) => React.JSX.Element;
|
|
39
|
-
export declare const MultiSelectDropdown: ({ id, label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, radius, isFilter, dataTestTitle, isAutoSelectOption, isLoadingData, error, menuZIndex, isSelectAllEnabled, isSelectAllOn, }: MultiSelectDropdownProps) => React.JSX.Element;
|
|
40
|
+
export declare const MultiSelectDropdown: ({ id, label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, radius, isFilter, dataTestTitle, isAutoSelectOption, isLoadingData, error, menuZIndex, isSelectAllEnabled, isSelectAllOn, onSearch, }: MultiSelectDropdownProps) => React.JSX.Element;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ClientStateParams } from '@/hooks/useScheduleEmail';
|
|
3
|
+
import { FloatingDropDownOption } from '@/types';
|
|
2
4
|
type Props = {
|
|
3
5
|
onCancel: () => void;
|
|
6
|
+
getInternalToken?: (guestToken?: string) => Promise<string>;
|
|
7
|
+
scheduleReportConfig?: any;
|
|
8
|
+
chartOptions: FloatingDropDownOption[];
|
|
9
|
+
sharingSettingsId?: string;
|
|
10
|
+
externalDashboardId?: string;
|
|
11
|
+
onComplete?: () => void;
|
|
12
|
+
clientDropDown?: React.ReactNode;
|
|
13
|
+
clientState?: ClientStateParams;
|
|
4
14
|
};
|
|
5
|
-
declare const ScheduleEmailForm: ({ onCancel }: Props) => React.JSX.Element;
|
|
15
|
+
export declare const ScheduleEmailForm: ({ onCancel, getInternalToken, scheduleReportConfig: internalScheduleReportConfig, chartOptions, externalDashboardId, sharingSettingsId, onComplete, clientDropDown, clientState, }: Props) => React.JSX.Element;
|
|
6
16
|
export default ScheduleEmailForm;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { FloatingDropDownOption } from '@/types';
|
|
3
|
+
type ScheduleEmailProps = {
|
|
4
|
+
getInternalToken?: () => Promise<string>;
|
|
5
|
+
scheduleReportConfig?: any;
|
|
6
|
+
chartOptions: FloatingDropDownOption[];
|
|
7
|
+
sharingSettingsId?: string;
|
|
8
|
+
externalDashboardId?: string;
|
|
9
|
+
onComplete?: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const ScheduleEmail: ({ props: { chartOptions, getInternalToken, scheduleReportConfig, externalDashboardId, sharingSettingsId, onComplete, }, }: {
|
|
12
|
+
props: ScheduleEmailProps;
|
|
13
|
+
}) => React.JSX.Element;
|
|
3
14
|
export default ScheduleEmail;
|
|
@@ -8,6 +8,7 @@ interface Props {
|
|
|
8
8
|
display?: 'block' | 'inline' | 'inline-truncate' | '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
|
italic?: boolean;
|
|
11
|
+
alignment?: 'center' | 'left' | 'right';
|
|
11
12
|
}
|
|
12
|
-
export declare const Text: ({ children, variant, color, display, onClick, opacity, italic, }: Props) => React.JSX.Element;
|
|
13
|
+
export declare const Text: ({ children, variant, color, display, onClick, opacity, italic, alignment, }: Props) => React.JSX.Element;
|
|
13
14
|
export {};
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const LINEAR_POINTER_SIZE: {
|
|
|
116
116
|
label: string;
|
|
117
117
|
value: string;
|
|
118
118
|
}[];
|
|
119
|
-
export declare const ICONS_LIST: readonly ["ruler", "merge", "custom", "invite", "guide", "headphone", "disable", "sync", "sparkle", "export", "spinner", "split-vertical", "split-horizontal", "placeholder", "warning", "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", "wand"];
|
|
119
|
+
export declare const ICONS_LIST: readonly ["ruler", "help", "merge", "custom", "invite", "guide", "headphone", "disable", "sync", "sparkle", "export", "spinner", "split-vertical", "split-horizontal", "placeholder", "warning", "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", "align-center", "arrows-horizontal", "arrows-vertical", "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", "wand", "schedule", "saved-schedule"];
|
|
120
120
|
export declare const NUMBER = "number";
|
|
121
121
|
export declare const STRING = "string";
|
|
122
122
|
export declare const BOOLEAN = "boolean";
|
|
@@ -23,3 +23,4 @@ export declare const enableSaveToDashboardButton: ({ chartSettings, dimensions,
|
|
|
23
23
|
isCustomTable: boolean;
|
|
24
24
|
}) => number | undefined;
|
|
25
25
|
export declare const deepEqual: (obj1: Record<string, any> | undefined, obj2: Record<string, any> | undefined) => boolean;
|
|
26
|
+
export declare const sqlGuideLines: (dbName: string, isDatabaseTenancy: boolean) => string[];
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { ClientType } from '@/types';
|
|
4
|
+
export type ClientStateParams = {
|
|
5
|
+
setClients: React.Dispatch<React.SetStateAction<ClientType[]>>;
|
|
6
|
+
clients: ClientType[];
|
|
7
|
+
isDisableClient: boolean;
|
|
8
|
+
isRequiredClient: boolean;
|
|
9
|
+
};
|
|
3
10
|
type Params = {
|
|
4
11
|
onCancel: () => void;
|
|
12
|
+
getInternalToken?: (guestToken?: string) => Promise<string>;
|
|
13
|
+
scheduleReportConfig?: any;
|
|
14
|
+
sharingSettingsId?: string;
|
|
15
|
+
externalDashboardId?: string;
|
|
16
|
+
onComplete?: () => void;
|
|
17
|
+
clientState?: ClientStateParams;
|
|
5
18
|
};
|
|
6
|
-
declare const useScheduleEmail: ({ onCancel }: Params) => {
|
|
19
|
+
declare const useScheduleEmail: ({ onCancel, getInternalToken, scheduleReportConfig: internalScheduleReportConfig, externalDashboardId, sharingSettingsId, onComplete, clientState, }: Params) => {
|
|
7
20
|
register: import("react-hook-form").UseFormRegister<FieldValues>;
|
|
8
21
|
handleSubmit: import("react-hook-form").UseFormHandleSubmit<FieldValues>;
|
|
9
22
|
watch: import("react-hook-form").UseFormWatch<FieldValues>;
|
|
@@ -12,10 +25,6 @@ declare const useScheduleEmail: ({ onCancel }: Params) => {
|
|
|
12
25
|
getValues: import("react-hook-form").UseFormGetValues<FieldValues>;
|
|
13
26
|
reset: import("react-hook-form").UseFormReset<FieldValues>;
|
|
14
27
|
dashboardName: string;
|
|
15
|
-
chartOptions: {
|
|
16
|
-
value: any;
|
|
17
|
-
label: any;
|
|
18
|
-
}[];
|
|
19
28
|
onSave: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
|
|
20
29
|
isLoading: boolean;
|
|
21
30
|
isSuccess: boolean;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -270,8 +270,8 @@ export type CustomSettings = {
|
|
|
270
270
|
};
|
|
271
271
|
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' | 'gradient-pink' | 'pink';
|
|
272
272
|
export type IconType = (typeof ICONS_LIST)[number];
|
|
273
|
-
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3' | 'csv' | 'openai' | 'claude' | 'gemini' | 'mixtral' | 'llama' | 'palm' | 'azure' | 'aws';
|
|
274
|
-
export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'small';
|
|
273
|
+
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3' | 'csv' | 'openai' | 'claude' | 'gemini' | 'mixtral' | 'llama' | 'palm' | 'azure' | 'aws' | 'noDataDB' | 'help';
|
|
274
|
+
export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'small';
|
|
275
275
|
export type IconConfig = {
|
|
276
276
|
size: IconSizes;
|
|
277
277
|
color: Colors;
|
|
@@ -533,6 +533,7 @@ export type GroupBy = {
|
|
|
533
533
|
export type ClientType = {
|
|
534
534
|
label: string;
|
|
535
535
|
value: string;
|
|
536
|
+
type: ClientColumnType;
|
|
536
537
|
};
|
|
537
538
|
export type DashboardType = {
|
|
538
539
|
id: string;
|
|
@@ -560,6 +561,7 @@ export type FloatingDropDownOption = {
|
|
|
560
561
|
customColumnName?: string;
|
|
561
562
|
dbName?: string;
|
|
562
563
|
id?: string;
|
|
564
|
+
type?: ClientColumnType;
|
|
563
565
|
};
|
|
564
566
|
export type FilterType = {
|
|
565
567
|
tableName: string;
|
|
@@ -135,6 +135,7 @@ export type UseSaveDashboardScheduleReportMutationInputType = {
|
|
|
135
135
|
subject?: string;
|
|
136
136
|
timeConfigurations?: any;
|
|
137
137
|
data?: any;
|
|
138
|
+
isInternal?: boolean;
|
|
138
139
|
};
|
|
139
140
|
export type UseMarkArchivedMutationInputType = {
|
|
140
141
|
id?: string;
|
|
@@ -334,7 +335,8 @@ export type UseChatApiResponseType = {
|
|
|
334
335
|
export type SummarizeMetricMutationType = {
|
|
335
336
|
metricData: any;
|
|
336
337
|
summaryPrompt: string;
|
|
337
|
-
|
|
338
|
+
id: string;
|
|
339
|
+
filters: string;
|
|
338
340
|
name: string;
|
|
339
341
|
description: string;
|
|
340
342
|
workspaceId: string;
|