@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.
Files changed (86) hide show
  1. package/dist/ai/ai-context-provider.d.ts +32 -0
  2. package/dist/ai/api/chat-api-provider.d.ts +17 -0
  3. package/dist/ai/api/chat-rest-api.d.ts +3 -1
  4. package/dist/ai/api/errors.d.ts +1 -0
  5. package/dist/ai/api/hooks.d.ts +10 -49
  6. package/dist/ai/api/types.d.ts +16 -27
  7. package/dist/ai/buttons/thumbs-down-button.d.ts +6 -0
  8. package/dist/ai/buttons/thumbs-up-button.d.ts +6 -0
  9. package/dist/ai/chat-box.d.ts +3 -3
  10. package/dist/ai/chat-config.d.ts +28 -0
  11. package/dist/ai/chat-home.d.ts +5 -1
  12. package/dist/ai/chat-router.d.ts +2 -0
  13. package/dist/ai/chatbot.d.ts +26 -4
  14. package/dist/ai/common/tooltip.d.ts +5 -0
  15. package/dist/ai/error-page.d.ts +10 -0
  16. package/dist/ai/get-nlg-query-result.d.ts +70 -0
  17. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -0
  18. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -0
  19. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -0
  20. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -0
  21. package/dist/ai/index.d.ts +6 -3
  22. package/dist/ai/loading-page.d.ts +2 -0
  23. package/dist/ai/messages/clear-history-success-message.d.ts +2 -0
  24. package/dist/ai/messages/feedback-wrapper.d.ts +9 -0
  25. package/dist/ai/messages/get-widget-options.d.ts +2 -1
  26. package/dist/ai/messages/message-resolver.d.ts +1 -2
  27. package/dist/ai/messages/text-message.d.ts +1 -1
  28. package/dist/ai/toolbar.d.ts +2 -2
  29. package/dist/ai/use-chat-session.d.ts +1 -1
  30. package/dist/ai/use-get-nlg-query-result.d.ts +95 -0
  31. package/dist/ai/use-get-query-recommendations.d.ts +67 -0
  32. package/dist/ai.js +1866 -1518
  33. package/dist/{chart.d.ts → chart/chart.d.ts} +1 -1
  34. package/dist/chart/helpers/use-synced-data.d.ts +8 -0
  35. package/dist/chart/helpers/use-translated-data-options.d.ts +7 -0
  36. package/dist/chart/index.d.ts +1 -0
  37. package/dist/chart-data/types.d.ts +1 -0
  38. package/dist/chart-data-options/translate-data-options.d.ts +5 -1
  39. package/dist/chart-data-options/types.d.ts +107 -12
  40. package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
  41. package/dist/chart-options-processor/category-chart-options.d.ts +1 -1
  42. package/dist/chart-options-processor/chart-options-service.d.ts +7 -0
  43. package/dist/chart-options-processor/plot-bands.d.ts +2 -2
  44. package/dist/chart-options-processor/scatter-chart-options.d.ts +2 -2
  45. package/dist/chart-options-processor/style-to-design-options-translator/index.d.ts +1 -0
  46. package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -0
  47. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  48. package/dist/chart-options-processor/translations/base-design-options.d.ts +3 -3
  49. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +2 -2
  50. package/dist/chart-options-processor/translations/design-options.d.ts +2 -2
  51. package/dist/chart-options-processor/translations/number-format-config.d.ts +10 -16
  52. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +4 -4
  53. package/dist/chart-options-processor/translations/types.d.ts +18 -6
  54. package/dist/chart-options-processor/translations/value-label-section.d.ts +9 -4
  55. package/dist/charts/indicator/indicator-legacy-chart-options/prepare-ticker-options.d.ts +2 -0
  56. package/dist/charts/map-charts/areamap/areamap.d.ts +2 -2
  57. package/dist/charts/map-charts/scattermap/scattermap.d.ts +9 -3
  58. package/dist/charts/map-charts/scattermap/utils/location.d.ts +3 -0
  59. package/dist/charts/table/helpers/calc-column-widths.d.ts +3 -1
  60. package/dist/common/hooks/data-load-state-reducer.d.ts +10 -0
  61. package/dist/common/hooks/use-hover.d.ts +8 -0
  62. package/dist/common/icons/yellow-exclamation-mark-icon.d.ts +2 -0
  63. package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
  64. package/dist/decorators/hook-decorators/with-tracking.d.ts +11 -0
  65. package/dist/formulas/fetch-formula.d.ts +2 -0
  66. package/dist/formulas/index.d.ts +1 -0
  67. package/dist/formulas/use-get-shared-formula.d.ts +5 -0
  68. package/dist/index.d.ts +4 -4
  69. package/dist/index.js +34073 -10282
  70. package/dist/indicator-canvas.d.ts +2 -2
  71. package/dist/models/dashboard/use-get-dashboard-model.d.ts +8 -0
  72. package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -0
  73. package/dist/pivot-table/index.d.ts +1 -0
  74. package/dist/pivot-table/pivot-table.d.ts +42 -0
  75. package/dist/pivot-table/use-get-pivot-table-query.d.ts +14 -0
  76. package/dist/props.d.ts +62 -4
  77. package/dist/sisense-chart/sisense-chart.d.ts +2 -2
  78. package/dist/types.d.ts +74 -9
  79. package/dist/utils/utility-types.d.ts +12 -0
  80. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  81. package/dist/widgets/common/drilldown.d.ts +1 -1
  82. package/dist/{table-widget-b467cc86.js → with-tracking-d12a4632.js} +38409 -38268
  83. package/package.json +13 -13
  84. package/dist/ai/api/chat-api-context.d.ts +0 -12
  85. package/dist/ai/chatbot-context.d.ts +0 -11
  86. 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
+ };