@sisense/sdk-ui 1.5.0 → 1.6.0

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 (87) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -0
  2. package/dist/ai/api/chat-rest-api.d.ts +3 -0
  3. package/dist/ai/api/errors.d.ts +2 -1
  4. package/dist/ai/api/types.d.ts +10 -10
  5. package/dist/ai/chat-config.d.ts +10 -3
  6. package/dist/ai/chat-intro-blurb.d.ts +4 -0
  7. package/dist/ai/chatbot.d.ts +1 -0
  8. package/dist/ai/get-nlg-query-result.d.ts +3 -3
  9. package/dist/ai/index.d.ts +2 -0
  10. package/dist/ai/messages/feedback-wrapper.d.ts +2 -1
  11. package/dist/ai/messages/insights-message.d.ts +6 -1
  12. package/dist/ai/messages/message-list-resolver.d.ts +1 -2
  13. package/dist/ai/messages/message-resolver.d.ts +1 -3
  14. package/dist/ai/messages/nlq-message-group.d.ts +10 -0
  15. package/dist/ai/suggestions/index.d.ts +1 -1
  16. package/dist/ai/suggestions/suggestion-list.d.ts +1 -1
  17. package/dist/ai/suggestions/suggestions-with-intro.d.ts +2 -2
  18. package/dist/ai/translators/code-templates.d.ts +11 -0
  19. package/dist/ai/translators/generate-code.d.ts +9 -0
  20. package/dist/ai/translators/index.d.ts +4 -0
  21. package/dist/ai/translators/model-translator.d.ts +50 -0
  22. package/dist/ai/translators/query-translator.d.ts +122 -0
  23. package/dist/ai/translators/translate-props-to-code.d.ts +8 -0
  24. package/dist/ai/translators/types.d.ts +105 -0
  25. package/dist/ai/translators/use-get-data-source.d.ts +12 -0
  26. package/dist/ai/translators/utils.d.ts +2 -0
  27. package/dist/ai/use-chat-session.d.ts +9 -3
  28. package/dist/ai/use-get-nlg-query-result.d.ts +6 -6
  29. package/dist/ai/use-get-query-recommendations.d.ts +1 -0
  30. package/dist/ai.js +7077 -1734
  31. package/dist/area-chart.d.ts +1 -0
  32. package/dist/areamap-chart.d.ts +1 -0
  33. package/dist/bar-chart.d.ts +3 -0
  34. package/dist/boxplot-chart.d.ts +1 -0
  35. package/dist/boxplot-utils.d.ts +1 -0
  36. package/dist/chart/chart.d.ts +1 -0
  37. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +1 -0
  38. package/dist/column-chart.d.ts +4 -0
  39. package/dist/common/components/loading-indicator.d.ts +2 -0
  40. package/dist/dashboard-widget/dashboard-widget.d.ts +1 -0
  41. package/dist/dashboard-widget/translate-widget-data-options.d.ts +5 -0
  42. package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -0
  43. package/dist/dashboard-widget/types.d.ts +3 -2
  44. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -0
  45. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -0
  46. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -0
  47. package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -0
  48. package/dist/formulas/use-get-shared-formula.d.ts +1 -0
  49. package/dist/funnel-chart.d.ts +1 -0
  50. package/dist/index.d.ts +4 -0
  51. package/dist/index.js +6719 -37723
  52. package/dist/indicator-chart.d.ts +1 -0
  53. package/dist/line-chart.d.ts +1 -0
  54. package/dist/models/dashboard/get-dashboard-models.d.ts +1 -3
  55. package/dist/models/dashboard/translate-dashboard.d.ts +1 -1
  56. package/dist/models/dashboard/types.d.ts +17 -0
  57. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  58. package/dist/models/dashboard/use-get-dashboard-models.d.ts +1 -0
  59. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  60. package/dist/models/widget/widget-model.d.ts +10 -1
  61. package/dist/pie-chart.d.ts +1 -0
  62. package/dist/pivot-table/pivot-table.d.ts +1 -0
  63. package/dist/polar-chart.d.ts +1 -0
  64. package/dist/props.d.ts +2 -2
  65. package/dist/query-execution/execute-query-by-widget-id.d.ts +1 -0
  66. package/dist/query-execution/execute-query.d.ts +1 -0
  67. package/dist/query-execution/use-execute-csv-query.d.ts +1 -0
  68. package/dist/query-execution/use-execute-pivot-query.d.ts +1 -0
  69. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +1 -0
  70. package/dist/query-execution/use-execute-query.d.ts +1 -0
  71. package/dist/scatter-chart.d.ts +1 -0
  72. package/dist/scattermap-chart.d.ts +1 -0
  73. package/dist/sisense-context/sisense-context-provider.d.ts +1 -0
  74. package/dist/sunburst-chart.d.ts +1 -0
  75. package/dist/table/table.d.ts +1 -0
  76. package/dist/theme-provider/theme-provider.d.ts +7 -0
  77. package/dist/treemap-chart.d.ts +1 -0
  78. package/dist/types.d.ts +2 -2
  79. package/dist/widgets/chart-widget.d.ts +1 -0
  80. package/dist/widgets/common/context-menu.d.ts +5 -0
  81. package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +5 -0
  82. package/dist/widgets/drilldown-widget.d.ts +1 -0
  83. package/dist/with-tracking-e2a077f9.js +109112 -0
  84. package/package.json +13 -8
  85. package/dist/chart-data-processor/utils.d.ts +0 -10
  86. package/dist/utils/not-available-value.d.ts +0 -3
  87. package/dist/with-tracking-0799ec25.js +0 -78081
@@ -56,5 +56,6 @@ import { IndicatorChartProps } from './props';
56
56
  * <img src="media://indicator-chart-example-1.png" width="400px" />
57
57
  * @param props - Indicator chart properties
58
58
  * @returns Indicator Chart component
59
+ * @group Charts
59
60
  */
60
61
  export declare const IndicatorChart: import("react").FunctionComponent<IndicatorChartProps>;
@@ -24,5 +24,6 @@ import { LineChartProps } from './props';
24
24
  * <img src="media://line-chart-example-1.png" width="800px" />
25
25
  * @param props - Line chart properties
26
26
  * @returns Line Chart component
27
+ * @group Charts
27
28
  */
28
29
  export declare const LineChart: import("react").FunctionComponent<LineChartProps>;
@@ -7,9 +7,7 @@ export interface GetDashboardModelsOptions {
7
7
  */
8
8
  searchByTitle?: string;
9
9
  /**
10
- * Boolean flag whether to include widgets in the dashboard model
11
- *
12
- * If not specified, the default value is `false`
10
+ * {@inheritDoc GetDashboardModelOptions.includeWidgets}
13
11
  */
14
12
  includeWidgets?: boolean;
15
13
  }
@@ -1,3 +1,3 @@
1
1
  import { type DashboardDto } from '../../api/types/dashboard-dto';
2
2
  import { type DashboardModel } from './types';
3
- export declare function translateDashboard({ oid, title, datasource, widgets, }: DashboardDto): DashboardModel;
3
+ export declare function translateDashboard({ oid, title, datasource, widgets, layout, }: DashboardDto): DashboardModel;
@@ -1,8 +1,25 @@
1
1
  import { type DataSource } from '@sisense/sdk-data';
2
2
  import { WidgetModel } from '../widget/widget-model';
3
+ /** @internal */
4
+ export type Layout = {
5
+ columns: {
6
+ width: number;
7
+ cells: {
8
+ subcells: {
9
+ width: number;
10
+ elements: {
11
+ height: number | string;
12
+ widgetId: string;
13
+ }[];
14
+ }[];
15
+ }[];
16
+ }[];
17
+ };
3
18
  export type DashboardModel = {
4
19
  oid: string;
5
20
  title: string;
6
21
  dataSource: DataSource;
7
22
  widgets?: WidgetModel[];
23
+ /** @internal */
24
+ layout?: Layout;
8
25
  };
@@ -96,6 +96,7 @@ export type DashboardModelSuccessState = {
96
96
  ```
97
97
  * @param params - Parameters of the dashboard to be retrieved
98
98
  * @returns Dashboard load state that contains the status of the execution, the result dashboard model, or the error if any
99
+ * @group Fusion Assets
99
100
  */
100
101
  export declare const useGetDashboardModel: (params: GetDashboardModelParams) => DashboardModelState;
101
102
  /**
@@ -81,6 +81,7 @@ export type DashboardModelsSuccessState = {
81
81
  ```
82
82
  * @param params - Parameters of the dashboards to be retrieved
83
83
  * @returns Load state that contains the status of the execution, the result dashboards, or the error if any
84
+ * @group Fusion Assets
84
85
  */
85
86
  export declare const useGetDashboardModels: (params?: GetDashboardModelsParams | undefined) => DashboardModelsState;
86
87
  /**
@@ -93,6 +93,7 @@ export type WidgetModelSuccessState = {
93
93
  ```
94
94
  * @param params - Parameters of the widget to be retrieved
95
95
  * @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
96
+ * @group Fusion Assets
96
97
  */
97
98
  export declare const useGetWidgetModel: (params: GetWidgetModelParams) => WidgetModelState;
98
99
  /**
@@ -1,6 +1,6 @@
1
1
  import { Filter } from '@sisense/sdk-data';
2
2
  import { ChartDataOptions, TableDataOptions } from '../../chart-data-options/types';
3
- import { WidgetDto, WidgetType } from '../../dashboard-widget/types';
3
+ import { Panel, WidgetDto, WidgetType } from '../../dashboard-widget/types';
4
4
  import { ChartProps, ChartWidgetProps, TableProps, TableWidgetProps } from '../../props';
5
5
  import { ExecuteQueryParams } from '../../query-execution';
6
6
  import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings } from '../../types';
@@ -10,6 +10,8 @@ import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, Comp
10
10
  export type WidgetDataOptions = ChartDataOptions | TableDataOptions;
11
11
  /**
12
12
  * Model of Sisense widget defined in the abstractions of Compose SDK.
13
+ *
14
+ * @group Fusion Assets
13
15
  */
14
16
  export declare class WidgetModel {
15
17
  /**
@@ -32,6 +34,12 @@ export declare class WidgetModel {
32
34
  * Widget type.
33
35
  */
34
36
  widgetType: WidgetType;
37
+ /** @internal */
38
+ pluginType: string;
39
+ /** @internal */
40
+ pluginPanels: Panel[];
41
+ /** @internal */
42
+ pluginStyles: any;
35
43
  /**
36
44
  * Widget data options.
37
45
  */
@@ -60,6 +68,7 @@ export declare class WidgetModel {
60
68
  * Creates a new widget model.
61
69
  *
62
70
  * @param widgetDto - The widget DTO to be converted to a widget model
71
+ * @param themeSettings - The theme settings to be used for the widget model
63
72
  * @internal
64
73
  */
65
74
  constructor(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings);
@@ -24,5 +24,6 @@ import { PieChartProps } from './props';
24
24
  * <img src="media://pie-chart-example-1.png" width="600px" />
25
25
  * @param props - Pie chart properties
26
26
  * @returns Pie Chart component
27
+ * @group Charts
27
28
  */
28
29
  export declare const PieChart: import("react").FunctionComponent<PieChartProps>;
@@ -37,6 +37,7 @@ import { PivotTableProps } from '../props';
37
37
  * ```
38
38
  * @param props - Pivot Table properties
39
39
  * @returns Pivot Table component
40
+ * @group Data Grids
40
41
  * @alpha
41
42
  */
42
43
  export declare const PivotTable: React.FunctionComponent<PivotTableProps>;
@@ -24,5 +24,6 @@ import { PolarChartProps } from './props';
24
24
  * <img src="media://polar-chart-example-1.png" width="600px" />
25
25
  * @param props - Polar chart properties
26
26
  * @returns Polar Chart component
27
+ * @group Charts
27
28
  */
28
29
  export declare const PolarChart: import("react").FunctionComponent<PolarChartProps>;
package/dist/props.d.ts CHANGED
@@ -759,13 +759,13 @@ export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource
759
759
  */
760
760
  highlights?: Filter[];
761
761
  /**
762
- * {@inheritDoc ExecuteQueryByWidgetIdProps.filtersMergeStrategy}
762
+ * {@inheritDoc ExecuteQueryByWidgetIdParams.filtersMergeStrategy}
763
763
  *
764
764
  * @category Data
765
765
  */
766
766
  filtersMergeStrategy?: FiltersMergeStrategy;
767
767
  /**
768
- * {@inheritDoc ExecuteQueryByWidgetIdProps.includeDashboardFilters}
768
+ * {@inheritDoc ExecuteQueryByWidgetIdParams.includeDashboardFilters}
769
769
  *
770
770
  * @category Data
771
771
  */
@@ -33,5 +33,6 @@ import { ExecuteQueryByWidgetIdProps } from '../props';
33
33
  * ```
34
34
  * @param props - ExecuteQueryByWidgetId properties
35
35
  * @returns ExecuteQueryByWidgetId component
36
+ * @group Fusion Assets
36
37
  */
37
38
  export declare const ExecuteQueryByWidgetId: FunctionComponent<ExecuteQueryByWidgetIdProps>;
@@ -35,5 +35,6 @@ import { ExecuteQueryProps } from '../props';
35
35
  * ```
36
36
  * @param props - ExecuteQuery properties
37
37
  * @returns ExecuteQuery component
38
+ * @group Queries
38
39
  */
39
40
  export declare const ExecuteQuery: FunctionComponent<ExecuteQueryProps>;
@@ -70,6 +70,7 @@ import { CsvQueryState, ExecuteCsvQueryParams } from './types.js';
70
70
  ```
71
71
  * @param params - Parameters of the query
72
72
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
73
+ * @group Queries
73
74
  */
74
75
  export declare const useExecuteCsvQuery: (params: ExecuteCsvQueryParams) => CsvQueryState;
75
76
  /**
@@ -34,6 +34,7 @@ import { ExecutePivotQueryParams, PivotQueryState } from './types';
34
34
  * See also hook {@link useExecuteQuery}, which execute a generic data query.
35
35
  * @param params - Parameters of the query
36
36
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
37
+ * @group Queries
37
38
  * @alpha
38
39
  */
39
40
  export declare const useExecutePivotQuery: (params: ExecutePivotQueryParams) => PivotQueryState;
@@ -28,6 +28,7 @@ import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdState } from './types';
28
28
  * See also hook {@link useExecuteQuery}, which execute a query specified in code.
29
29
  * @param params - Parameters to identify the target widget
30
30
  * @returns Query state that contains the status of the query execution, the result data, the constructed query parameters, or the error if any occurred
31
+ * @group Fusion Assets
31
32
  */
32
33
  export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
33
34
  /**
@@ -29,6 +29,7 @@ import { ExecuteQueryParams, QueryState } from './types';
29
29
  * of using the hook to fetch data from Sisense for third-party charts.
30
30
  * @param params - Parameters of the query
31
31
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
32
+ * @group Queries
32
33
  */
33
34
  export declare const useExecuteQuery: (params: ExecuteQueryParams) => QueryState;
34
35
  /**
@@ -64,5 +64,6 @@ import { ScatterChartProps } from './props';
64
64
  * <img src="media://scatter-chart-example-1.png" width="800px" />
65
65
  * @param props - Scatter chart properties
66
66
  * @returns Scatter Chart component
67
+ * @group Charts
67
68
  */
68
69
  export declare const ScatterChart: import("react").FunctionComponent<ScatterChartProps>;
@@ -29,6 +29,7 @@ import { ScattermapChartProps } from './props';
29
29
  * <img src="media://scattermap-chart-example-1.png" width="600px" />
30
30
  * @param props - Scattermap chart properties
31
31
  * @returns Scattermap Chart component
32
+ * @group Charts
32
33
  * @beta
33
34
  */
34
35
  export declare const ScattermapChart: import("react").FunctionComponent<ScattermapChartProps>;
@@ -32,5 +32,6 @@ import { SisenseContextProviderProps } from '../props';
32
32
  * ```
33
33
  * @param props - Sisense context provider props
34
34
  * @returns A Sisense Context Provider Component
35
+ * @group Contexts
35
36
  */
36
37
  export declare const SisenseContextProvider: FunctionComponent<PropsWithChildren<SisenseContextProviderProps>>;
@@ -23,5 +23,6 @@ import { SunburstChartProps } from './props';
23
23
  * <img src="media://sunburst-chart-example-1.png" width="600px" />
24
24
  * @param props - Sunburst chart properties
25
25
  * @returns Sunburst Chart component
26
+ * @group Charts
26
27
  */
27
28
  export declare const SunburstChart: import("react").FunctionComponent<SunburstChartProps>;
@@ -46,6 +46,7 @@ import { TableProps } from '../props';
46
46
  * <img src="media://table-example-2.png" width="800px" />
47
47
  * @param props - Table properties
48
48
  * @returns Table component
49
+ * @group Data Grids
49
50
  */
50
51
  export declare const Table: React.FunctionComponent<TableProps>;
51
52
  export declare const DEFAULT_TABLE_ROWS_PER_PAGE: 25;
@@ -4,6 +4,12 @@ import { CompleteThemeSettings } from '../types';
4
4
  export declare const ThemeContext: import("react").Context<{
5
5
  themeSettings: CompleteThemeSettings;
6
6
  }>;
7
+ /**
8
+ * Hook to get the current theme settings.
9
+ *
10
+ * @returns The current theme settings
11
+ * @internal
12
+ */
7
13
  export declare const useThemeContext: () => {
8
14
  themeSettings: CompleteThemeSettings;
9
15
  };
@@ -41,5 +47,6 @@ export declare const useThemeContext: () => {
41
47
  * @see {@link ThemeSettings} and IndicatorChart
42
48
  * @param props - Theme provider props
43
49
  * @returns A Theme Provider component
50
+ * @group Contexts
44
51
  */
45
52
  export declare const ThemeProvider: import("react").FunctionComponent<ThemeProviderProps>;
@@ -29,5 +29,6 @@ import { TreemapChartProps } from './props';
29
29
  * <img src="media://treemap-chart-example-1.png" width="600px" />
30
30
  * @param props - Treemap chart properties
31
31
  * @returns Treemap Chart component
32
+ * @group Charts
32
33
  */
33
34
  export declare const TreemapChart: import("react").FunctionComponent<TreemapChartProps>;
package/dist/types.d.ts CHANGED
@@ -847,7 +847,7 @@ export type SeriesWithAlerts<T> = {
847
847
  };
848
848
  /**
849
849
  * Context menu position coordinates
850
- * Used in {@link ContextMenuProps} component
850
+ * Used in {@link ContextMenuProps}
851
851
  */
852
852
  export type MenuPosition = {
853
853
  /** Horizontal position */
@@ -857,7 +857,7 @@ export type MenuPosition = {
857
857
  };
858
858
  /**
859
859
  * Context menu section
860
- * Used in {@link ContextMenuProps} component
860
+ * Used in {@link ContextMenuProps}
861
861
  */
862
862
  export type MenuItemSection = {
863
863
  /** Optional section title */
@@ -22,5 +22,6 @@ import { ChartWidgetProps } from '../props';
22
22
  * <img src="media://chart-widget-with-drilldown-example-1.png" width="800px" />
23
23
  * @param props - ChartWidget properties
24
24
  * @returns ChartWidget component representing a chart type as specified in `ChartWidgetProps.`{@link ChartWidgetProps.chartType | chartType}
25
+ * @group Chart Utilities
25
26
  */
26
27
  export declare const ChartWidget: FunctionComponent<ChartWidgetProps>;
@@ -1,3 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ContextMenuProps } from '../../props';
3
+ /**
4
+ * Context menu of a Drilldown Widget
5
+ *
6
+ * @group Drilldown
7
+ */
3
8
  export declare const ContextMenu: ({ position, closeContextMenu, itemSections, children, }: ContextMenuProps) => JSX.Element;
@@ -1,4 +1,9 @@
1
1
  import React from 'react';
2
2
  import { DrilldownBreadcrumbsProps } from '../../../props';
3
3
  export declare const BREADCRUMBS_BORDER_COLOR = "#F2F2F2";
4
+ /**
5
+ * Drilldown breadcrumbs component
6
+ *
7
+ * @group Drilldown
8
+ */
4
9
  export declare const DrilldownBreadcrumbs: React.FC<DrilldownBreadcrumbsProps>;
@@ -45,5 +45,6 @@ import { DrilldownWidgetProps } from '../props';
45
45
  * ```
46
46
  * @param props - DrilldownWidget properties
47
47
  * @returns DrilldownWidget wrapper component
48
+ * @group Drilldown
48
49
  */
49
50
  export declare const DrilldownWidget: ({ drilldownDimensions, initialDimension, config, children, }: DrilldownWidgetProps) => JSX.Element;