@databrainhq/plugin 0.15.19 → 0.15.21
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/MetricList/MetricList.d.ts +1 -0
- package/dist/components/MetricList/components/ManageMetricMenu/index.d.ts +3 -3
- package/dist/components/MetricList/components/MetricCards/ElementCard.d.ts +2 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +18 -1
- package/dist/consts/api.d.ts +2 -0
- package/dist/consts/app.d.ts +2 -1
- package/dist/helpers/createMetric.d.ts +6 -1
- package/dist/hooks/useMetricCard.d.ts +14 -1
- package/dist/queries/metric.mutation.d.ts +9 -1
- package/dist/types/app.d.ts +5 -0
- package/dist/types/queryTypes.d.ts +8 -0
- package/dist/webcomponents.es.js +1498 -882
- package/dist/webcomponents.umd.js +15 -15
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ type ManageMetricMenuProps = {
|
|
|
8
8
|
companyTenancyType: string;
|
|
9
9
|
workspaceId: string;
|
|
10
10
|
chartAppearance?: ChartAppearanceType;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
isOpenModal: boolean;
|
|
12
|
+
setOpenModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
13
|
};
|
|
14
|
-
declare const ManageMetricMenu: ({ props: { metricList, token, client, companyTenancyType, workspaceId, chartAppearance, colors,
|
|
14
|
+
declare const ManageMetricMenu: ({ props: { metricList, token, client, companyTenancyType, workspaceId, chartAppearance, colors, isOpenModal, setOpenModal, }, }: {
|
|
15
15
|
props: ManageMetricMenuProps;
|
|
16
16
|
}) => React.JSX.Element;
|
|
17
17
|
export default ManageMetricMenu;
|
|
@@ -10,6 +10,7 @@ type ElementCardProps = {
|
|
|
10
10
|
isOpenInNewTab?: boolean;
|
|
11
11
|
targetWord?: string;
|
|
12
12
|
};
|
|
13
|
+
elementSummary?: string;
|
|
13
14
|
};
|
|
14
|
-
declare const ElementCard: ({ elementSettings }: ElementCardProps) => React.JSX.Element;
|
|
15
|
+
declare const ElementCard: ({ elementSettings, elementSummary, }: ElementCardProps) => React.JSX.Element;
|
|
15
16
|
export default ElementCard;
|
|
@@ -76,5 +76,22 @@ export type MetricCardProps = {
|
|
|
76
76
|
isAllowedToSeeUnderlyingData?: boolean;
|
|
77
77
|
noDataImg?: string;
|
|
78
78
|
metricCardColor?: string;
|
|
79
|
+
isMergedMetric?: boolean;
|
|
80
|
+
metricStore?: Map<string, {
|
|
81
|
+
data: any;
|
|
82
|
+
isLoading: boolean;
|
|
83
|
+
key: string;
|
|
84
|
+
}>;
|
|
85
|
+
setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
|
|
86
|
+
data: any;
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
key: string;
|
|
89
|
+
}>>>;
|
|
90
|
+
summarizeMetricMutation?: any;
|
|
91
|
+
setOpenMergeModal?: React.Dispatch<React.SetStateAction<{
|
|
92
|
+
isOpen: boolean;
|
|
93
|
+
id?: string;
|
|
94
|
+
chartOptions?: any;
|
|
95
|
+
}>>;
|
|
79
96
|
};
|
|
80
|
-
export declare const MetricCard: ({ globalFilters: globalFilterList, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isDisableCardTitle, chartHeight, isEditLayoutEnabled, isTourActive, hideDatePickerOptions, chartAppearance, isDisableMetricLoader, isShadowDisableOnHover, isAllowedToSeeUnderlyingData, noDataImg, metricCardColor, }: MetricCardProps) => React.JSX.Element;
|
|
97
|
+
export declare const MetricCard: ({ globalFilters: globalFilterList, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, workspaceId, clientColumnType, isDisableCardTitle, chartHeight, isEditLayoutEnabled, isTourActive, hideDatePickerOptions, chartAppearance, isDisableMetricLoader, isShadowDisableOnHover, isAllowedToSeeUnderlyingData, noDataImg, metricCardColor, metricStore, setMetricStore, summarizeMetricMutation, isMergedMetric, setOpenMergeModal, }: MetricCardProps) => React.JSX.Element;
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -60,3 +60,5 @@ export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
|
|
|
60
60
|
export declare const METRIC_DOWNLOAD_RAW_CSV_PATH_V2: string;
|
|
61
61
|
export declare const IS_LOADING = "IS_LOADING";
|
|
62
62
|
export declare const DATA_LOADED = "DATA_LOADED";
|
|
63
|
+
export declare const SUMMARIZE_METRIC_PATH: string;
|
|
64
|
+
export declare const SUMMARIZE_METRIC_MUTATION = "summarizeMetric";
|
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 ["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", "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"];
|
|
120
120
|
export declare const NUMBER = "number";
|
|
121
121
|
export declare const STRING = "string";
|
|
122
122
|
export declare const BOOLEAN = "boolean";
|
|
@@ -151,3 +151,4 @@ export declare const selfHostedUrl: () => string;
|
|
|
151
151
|
export declare const SERVER_ERROR = "Internal Server Error";
|
|
152
152
|
export declare const CHAT_ERROR = "Oops! Couldn't find the data needed to generate the result for your query.";
|
|
153
153
|
export declare const CHAT_ERROR2 = "Try a different question or give more details for better assistance!";
|
|
154
|
+
export declare const convertArrayToObject: (items: any[]) => any;
|
|
@@ -16,5 +16,10 @@ export declare const setChartFields: ({ chartType, chartDimensions, chartMetrics
|
|
|
16
16
|
export declare const getDatabaseName: (name: string) => "bigquery" | "mysql" | "postgresql";
|
|
17
17
|
export declare const getWordCount: (text: string) => number;
|
|
18
18
|
export declare const generateRandomId: (length?: number) => string;
|
|
19
|
-
export declare const enableSaveToDashboardButton: (
|
|
19
|
+
export declare const enableSaveToDashboardButton: ({ chartSettings, dimensions, isCustomTable, metrics, }: {
|
|
20
|
+
chartSettings: ChartSettingsType;
|
|
21
|
+
dimensions: SelectedColumn[];
|
|
22
|
+
metrics: SelectedColumn[];
|
|
23
|
+
isCustomTable: boolean;
|
|
24
|
+
}) => number | undefined;
|
|
20
25
|
export declare const deepEqual: (obj1: Record<string, any> | undefined, obj2: Record<string, any> | undefined) => boolean;
|
|
@@ -19,8 +19,21 @@ type UseMetricCardProps = {
|
|
|
19
19
|
isFrontendApp: boolean;
|
|
20
20
|
guestToken?: string;
|
|
21
21
|
workspaceId: string;
|
|
22
|
+
metricStore?: Map<string, {
|
|
23
|
+
data: any;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
key: string;
|
|
26
|
+
}>;
|
|
27
|
+
setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
|
|
28
|
+
data: any;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
key: string;
|
|
31
|
+
}>>>;
|
|
22
32
|
};
|
|
23
|
-
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, }: UseMetricCardProps) => {
|
|
33
|
+
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, metricStore, setMetricStore, }: UseMetricCardProps) => {
|
|
34
|
+
elementSummary: string;
|
|
35
|
+
isLoadingSummary: boolean;
|
|
36
|
+
isMetricListLoading: () => boolean;
|
|
24
37
|
onDrillLevelClick: (index: number) => void;
|
|
25
38
|
onDrillDown: (params: any, rowFilters?: {
|
|
26
39
|
columnName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType, UseNewDatatsetMetricMutationInputType, UseGenerateMetricSummaryMutationInputType, UsePublishArchivedMetricsMutationInputType, DbChatMetricCreationType } from '@/types/queryTypes';
|
|
1
|
+
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType, UseNewDatatsetMetricMutationInputType, UseGenerateMetricSummaryMutationInputType, UsePublishArchivedMetricsMutationInputType, DbChatMetricCreationType, SummarizeMetricMutationType } from '@/types/queryTypes';
|
|
2
2
|
export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown, UseMetricColumnMutationInputType, unknown>;
|
|
@@ -47,3 +47,11 @@ export declare const useDbChatMetricCreationMutation: () => import("react-query"
|
|
|
47
47
|
clientId: string;
|
|
48
48
|
isFrontendApp: boolean;
|
|
49
49
|
}, unknown>;
|
|
50
|
+
export declare const useSummarizeMetricMutation: () => import("react-query").UseMutationResult<{
|
|
51
|
+
data: unknown;
|
|
52
|
+
}, unknown, {
|
|
53
|
+
data: SummarizeMetricMutationType;
|
|
54
|
+
token: string;
|
|
55
|
+
clientId: string;
|
|
56
|
+
isFrontendApp: boolean;
|
|
57
|
+
}, unknown>;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ export type CustomSettings = {
|
|
|
107
107
|
hideXAxisLines?: boolean;
|
|
108
108
|
hideYAxisLines?: boolean;
|
|
109
109
|
isEnableSort?: boolean;
|
|
110
|
+
isEnableCurrentLine?: boolean;
|
|
110
111
|
isEnableFullScale?: boolean;
|
|
111
112
|
isEnableLabelFormatting?: boolean;
|
|
112
113
|
isEnableCustomLimits?: boolean;
|
|
@@ -405,6 +406,10 @@ export type TooltipSettings = {
|
|
|
405
406
|
};
|
|
406
407
|
export type ChartSettingsType = {
|
|
407
408
|
chartType: keyof typeof CHART_TYPES;
|
|
409
|
+
mergedMetrics?: {
|
|
410
|
+
firstMetric?: string;
|
|
411
|
+
secondMetric?: string;
|
|
412
|
+
};
|
|
408
413
|
margins?: MarginSettings;
|
|
409
414
|
xAxis?: string;
|
|
410
415
|
yAxisList?: string[];
|
|
@@ -330,3 +330,11 @@ export type ChatCompletionRequestMessage = {
|
|
|
330
330
|
export type UseChatApiResponseType = {
|
|
331
331
|
messages: ChatCompletionRequestMessage[];
|
|
332
332
|
};
|
|
333
|
+
export type SummarizeMetricMutationType = {
|
|
334
|
+
metricData: any;
|
|
335
|
+
summaryPrompt: string;
|
|
336
|
+
key: string;
|
|
337
|
+
name: string;
|
|
338
|
+
description: string;
|
|
339
|
+
workspaceId: string;
|
|
340
|
+
};
|