@sisense/sdk-ui 1.3.0 → 1.4.1
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/ai/ai-context-provider.d.ts +32 -0
- package/dist/ai/api/chat-api-provider.d.ts +17 -0
- package/dist/ai/api/chat-rest-api.d.ts +3 -1
- package/dist/ai/api/errors.d.ts +1 -0
- package/dist/ai/api/hooks.d.ts +10 -49
- package/dist/ai/api/types.d.ts +16 -27
- package/dist/ai/buttons/thumbs-down-button.d.ts +6 -0
- package/dist/ai/buttons/thumbs-up-button.d.ts +6 -0
- package/dist/ai/chat-box.d.ts +3 -3
- package/dist/ai/chat-config.d.ts +28 -0
- package/dist/ai/chat-home.d.ts +5 -1
- package/dist/ai/chat-router.d.ts +2 -0
- package/dist/ai/chatbot.d.ts +26 -4
- package/dist/ai/common/tooltip.d.ts +5 -0
- package/dist/ai/error-page.d.ts +10 -0
- package/dist/ai/get-nlg-query-result.d.ts +70 -0
- package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-down-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -0
- package/dist/ai/icons/thumbs-up-icon.d.ts +2 -0
- package/dist/ai/index.d.ts +6 -3
- package/dist/ai/loading-page.d.ts +2 -0
- package/dist/ai/messages/clear-history-success-message.d.ts +2 -0
- package/dist/ai/messages/feedback-wrapper.d.ts +9 -0
- package/dist/ai/messages/get-widget-options.d.ts +2 -1
- package/dist/ai/messages/message-resolver.d.ts +1 -2
- package/dist/ai/messages/text-message.d.ts +1 -1
- package/dist/ai/toolbar.d.ts +2 -2
- package/dist/ai/use-chat-session.d.ts +1 -1
- package/dist/ai/use-get-nlg-query-result.d.ts +95 -0
- package/dist/ai/use-get-query-recommendations.d.ts +67 -0
- package/dist/ai.js +1866 -1518
- package/dist/{chart.d.ts → chart/chart.d.ts} +1 -1
- package/dist/chart/helpers/use-synced-data.d.ts +8 -0
- package/dist/chart/helpers/use-translated-data-options.d.ts +7 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart-data/types.d.ts +1 -0
- package/dist/chart-data-options/translate-data-options.d.ts +5 -1
- package/dist/chart-data-options/types.d.ts +107 -12
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/category-chart-options.d.ts +1 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +7 -0
- package/dist/chart-options-processor/plot-bands.d.ts +2 -2
- package/dist/chart-options-processor/scatter-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/style-to-design-options-translator/index.d.ts +1 -0
- package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/base-design-options.d.ts +3 -3
- package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/design-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/number-format-config.d.ts +10 -16
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +4 -4
- package/dist/chart-options-processor/translations/types.d.ts +18 -6
- package/dist/chart-options-processor/translations/value-label-section.d.ts +9 -4
- package/dist/charts/indicator/indicator-legacy-chart-options/prepare-ticker-options.d.ts +2 -0
- package/dist/charts/map-charts/areamap/areamap.d.ts +2 -2
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +9 -3
- package/dist/charts/map-charts/scattermap/utils/location.d.ts +3 -0
- package/dist/charts/table/helpers/calc-column-widths.d.ts +3 -1
- package/dist/common/hooks/data-load-state-reducer.d.ts +10 -0
- package/dist/common/hooks/use-hover.d.ts +8 -0
- package/dist/common/icons/yellow-exclamation-mark-icon.d.ts +2 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
- package/dist/decorators/hook-decorators/with-tracking.d.ts +11 -0
- package/dist/formulas/fetch-formula.d.ts +2 -0
- package/dist/formulas/index.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +5 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +34073 -10282
- package/dist/indicator-canvas.d.ts +2 -2
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +8 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -0
- package/dist/pivot-table/index.d.ts +1 -0
- package/dist/pivot-table/pivot-table.d.ts +42 -0
- package/dist/pivot-table/use-get-pivot-table-query.d.ts +14 -0
- package/dist/props.d.ts +62 -4
- package/dist/sisense-chart/sisense-chart.d.ts +2 -2
- package/dist/types.d.ts +74 -9
- package/dist/utils/utility-types.d.ts +12 -0
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +1 -1
- package/dist/{table-widget-b467cc86.js → with-tracking-d12a4632.js} +38409 -38268
- package/package.json +13 -13
- package/dist/ai/api/chat-api-context.d.ts +0 -12
- package/dist/ai/chatbot-context.d.ts +0 -11
- package/dist/ai/nlg-query-result.d.ts +0 -20
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for {@link useGetQueryRecommendations} hook.
|
|
3
|
+
*/
|
|
4
|
+
export interface UseGetQueryRecommendationsParams {
|
|
5
|
+
/** Data model title or perspective title */
|
|
6
|
+
contextTitle: string;
|
|
7
|
+
/**
|
|
8
|
+
* Number of recommendations that should be returned
|
|
9
|
+
*
|
|
10
|
+
* If not specified, the default value is `4`
|
|
11
|
+
*/
|
|
12
|
+
count?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRecommendationsParams) => {
|
|
15
|
+
data: import(".").QueryRecommendationResponse;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* React hook that fetches recommended questions for a data model or perspective.
|
|
20
|
+
*
|
|
21
|
+
* This hook includes the same code that fetches the initial suggested questions in the chatbot.
|
|
22
|
+
*
|
|
23
|
+
* ::: warning Note
|
|
24
|
+
* This hook is currently under private beta for selected customers and is subject to change as we make fixes and improvements.
|
|
25
|
+
* :::
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { SisenseContextProvider } from '@sisense/sdk-ui';
|
|
30
|
+
* import { AiContextProvider, useGetQueryRecommendations } from '@sisense/sdk-ui/ai';
|
|
31
|
+
*
|
|
32
|
+
* function Page() {
|
|
33
|
+
* const { data } = useGetQueryRecommendations({
|
|
34
|
+
* contextTitle: 'Sample ECommerce',
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* if (!data) {
|
|
38
|
+
* return <div>Loading recommendations</div>;
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* return (
|
|
42
|
+
* <ul>
|
|
43
|
+
* {data.map((item, index) => (
|
|
44
|
+
* <li key={index}>{item.nlqPrompt}</li>
|
|
45
|
+
* ))}
|
|
46
|
+
* </ul>
|
|
47
|
+
* );
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* function App() {
|
|
51
|
+
* return (
|
|
52
|
+
* <SisenseContextProvider {...sisenseContextProps}>
|
|
53
|
+
* <AiContextProvider>
|
|
54
|
+
* <Page />
|
|
55
|
+
* </AiContextProvider>
|
|
56
|
+
* </SisenseContextProvider>
|
|
57
|
+
* );
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
* @param params - {@link UseGetQueryRecommendationsParams}
|
|
61
|
+
* @returns An array of objects, each containing recommended question text and its corresponding JAQL
|
|
62
|
+
* @beta
|
|
63
|
+
*/
|
|
64
|
+
export declare const useGetQueryRecommendations: (params: UseGetQueryRecommendationsParams) => {
|
|
65
|
+
data: import(".").QueryRecommendationResponse;
|
|
66
|
+
isLoading: boolean;
|
|
67
|
+
};
|