@databrainhq/plugin 0.15.20 → 0.15.22

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.
@@ -60,5 +60,6 @@ export type ExternalMetricListProps = {
60
60
  noDataImg?: string;
61
61
  metricCardColor?: string;
62
62
  shouldFitFullScreen?: boolean;
63
+ mergedMetrics?: string[];
63
64
  };
64
65
  export declare const ExternalMetricList: React.FC<ExternalMetricListProps>;
@@ -76,14 +76,23 @@ export type MetricCardProps = {
76
76
  isAllowedToSeeUnderlyingData?: boolean;
77
77
  noDataImg?: string;
78
78
  metricCardColor?: string;
79
+ isMergedMetric?: boolean;
79
80
  metricStore?: Map<string, {
80
81
  data: any;
81
82
  isLoading: boolean;
83
+ key: string;
82
84
  }>;
83
85
  setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
84
86
  data: any;
85
87
  isLoading: boolean;
88
+ key: string;
86
89
  }>>>;
87
90
  summarizeMetricMutation?: any;
91
+ setOpenMergeModal?: React.Dispatch<React.SetStateAction<{
92
+ isOpen: boolean;
93
+ id?: string;
94
+ chartOptions?: any;
95
+ }>>;
96
+ setDataLoaded?: React.Dispatch<React.SetStateAction<boolean>>;
88
97
  };
89
- 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, }: MetricCardProps) => React.JSX.Element;
98
+ 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, setDataLoaded, }: MetricCardProps) => React.JSX.Element;
@@ -7,6 +7,7 @@ type Props = {
7
7
  value?: string;
8
8
  isResetValue?: boolean;
9
9
  onSearch?: (value: string) => void;
10
+ autoComplete?: 'on' | 'off';
10
11
  };
11
- export declare const SearchTab: ({ id, setSearchKeyword, className, placeholder, value, isResetValue, onSearch, }: Props) => React.JSX.Element;
12
+ export declare const SearchTab: ({ id, setSearchKeyword, className, placeholder, value, isResetValue, onSearch, autoComplete, }: Props) => React.JSX.Element;
12
13
  export {};
@@ -60,5 +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 = "/hasuraActions/summarizeMetric";
64
- export declare const SUMMARIZE_METRIC_KEY = "summarizeMetric";
63
+ export declare const SUMMARIZE_METRIC_PATH: string;
64
+ export declare const SUMMARIZE_METRIC_MUTATION = "summarizeMetric";
@@ -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,4 +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: <T extends Record<string, any>>(input: T[]) => Record<keyof T, any[]>;
154
+ export declare const convertArrayToObject: (items: any[]) => any;
@@ -22,14 +22,15 @@ type UseMetricCardProps = {
22
22
  metricStore?: Map<string, {
23
23
  data: any;
24
24
  isLoading: boolean;
25
+ key: string;
25
26
  }>;
26
27
  setMetricStore?: React.Dispatch<React.SetStateAction<Map<string, {
27
28
  data: any;
28
29
  isLoading: boolean;
30
+ key: string;
29
31
  }>>>;
30
- summarizeMetricMutation?: any;
31
32
  };
32
- export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, metricStore, setMetricStore, summarizeMetricMutation, }: UseMetricCardProps) => {
33
+ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, workspaceId, metricStore, setMetricStore, }: UseMetricCardProps) => {
33
34
  elementSummary: string;
34
35
  isLoadingSummary: boolean;
35
36
  isMetricListLoading: () => boolean;
@@ -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>;
@@ -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
+ };