@sisense/sdk-ui 1.8.0 → 1.10.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 (158) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -4
  2. package/dist/ai/ai-disclaimer.d.ts +4 -2
  3. package/dist/ai/api/chat-api-provider.d.ts +1 -1
  4. package/dist/ai/buttons/insights-button.d.ts +3 -0
  5. package/dist/ai/buttons/thumbs-down-button.d.ts +1 -2
  6. package/dist/ai/buttons/thumbs-up-button.d.ts +1 -2
  7. package/dist/ai/chat-box.d.ts +1 -2
  8. package/dist/ai/chat-config.d.ts +21 -1
  9. package/dist/ai/chat-dropup.d.ts +11 -0
  10. package/dist/ai/chat-frame.d.ts +7 -4
  11. package/dist/ai/chat-home.d.ts +1 -2
  12. package/dist/ai/chat-input.d.ts +4 -2
  13. package/dist/ai/chat-router.d.ts +1 -2
  14. package/dist/ai/chatbot.d.ts +0 -7
  15. package/dist/ai/common/collapsible.d.ts +1 -2
  16. package/dist/ai/common/dropup-section.d.ts +7 -0
  17. package/dist/ai/common/error-container.d.ts +1 -2
  18. package/dist/ai/common/icon-button.d.ts +12 -0
  19. package/dist/ai/{toolbar.d.ts → common/toolbar.d.ts} +5 -0
  20. package/dist/ai/common/tooltip.d.ts +2 -3
  21. package/dist/ai/data-topics/data-topic-item.d.ts +1 -2
  22. package/dist/ai/data-topics/data-topic-list.d.ts +1 -2
  23. package/dist/ai/icons/arrow-left-icon.d.ts +5 -2
  24. package/dist/ai/icons/clear-chat-icon.d.ts +2 -2
  25. package/dist/ai/icons/close-dialog-icon.d.ts +1 -2
  26. package/dist/ai/icons/expand-icon.d.ts +3 -2
  27. package/dist/ai/icons/info-icon.d.ts +3 -2
  28. package/dist/ai/icons/light-bulb-icon.d.ts +3 -2
  29. package/dist/ai/icons/loading-dots-icon.d.ts +1 -2
  30. package/dist/ai/icons/message-icon.d.ts +2 -2
  31. package/dist/ai/icons/refresh-icon.d.ts +1 -2
  32. package/dist/ai/icons/sisense-logo.d.ts +5 -2
  33. package/dist/ai/icons/three-dots-icon.d.ts +3 -2
  34. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -2
  35. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -2
  36. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -2
  37. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -2
  38. package/dist/ai/index.d.ts +3 -1
  39. package/dist/ai/messages/chart-message-toolbar.d.ts +1 -2
  40. package/dist/ai/messages/chart-message.d.ts +1 -2
  41. package/dist/ai/messages/chat-welcome-message.d.ts +1 -2
  42. package/dist/ai/messages/clear-history-message.d.ts +1 -2
  43. package/dist/ai/messages/clear-history-success-message.d.ts +1 -2
  44. package/dist/ai/messages/clickable-message.d.ts +4 -2
  45. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  46. package/dist/ai/messages/get-widget-options.d.ts +14 -0
  47. package/dist/ai/messages/insights-message.d.ts +1 -7
  48. package/dist/ai/messages/jaql-element.d.ts +5 -2
  49. package/dist/ai/messages/message-list-resolver.d.ts +1 -2
  50. package/dist/ai/messages/message-resolver.d.ts +2 -1
  51. package/dist/ai/messages/nlq-message-group.d.ts +6 -4
  52. package/dist/ai/messages/text-message.d.ts +4 -5
  53. package/dist/ai/nav-back-button.d.ts +6 -4
  54. package/dist/ai/suggestions/suggestion-item.d.ts +1 -2
  55. package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +1 -2
  56. package/dist/ai/suggestions/suggestion-list.d.ts +1 -2
  57. package/dist/ai/suggestions/suggestions-with-intro.d.ts +1 -2
  58. package/dist/ai/{translators/use-get-data-source.d.ts → use-get-data-source-fields.d.ts} +2 -2
  59. package/dist/ai.js +2130 -7264
  60. package/dist/alert-box/alert-box.d.ts +1 -2
  61. package/dist/api/types/dashboard-dto.d.ts +16 -0
  62. package/dist/app/client-application.d.ts +6 -2
  63. package/dist/area-chart.d.ts +3 -3
  64. package/dist/bar-chart.d.ts +2 -2
  65. package/dist/chart/helpers/use-translated-data-options.d.ts +2 -2
  66. package/dist/chart-data-options/get-translated-data-options.d.ts +2 -2
  67. package/dist/chart-data-options/utils.d.ts +10 -0
  68. package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -2
  69. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +7 -4
  70. package/dist/chart-options-processor/theme-option-service.d.ts +0 -8
  71. package/dist/chart-options-processor/translations/design-options.d.ts +9 -7
  72. package/dist/chart-options-processor/translations/types.d.ts +7 -6
  73. package/dist/charts/map-charts/areamap/areamap.d.ts +3 -6
  74. package/dist/charts/map-charts/scattermap/scattermap.d.ts +5 -9
  75. package/dist/charts/table/data-table-wrapper.d.ts +1 -2
  76. package/dist/charts/table/header/field-type-icon.d.ts +1 -2
  77. package/dist/charts/table/pure-table.d.ts +1 -2
  78. package/dist/column-chart.d.ts +2 -2
  79. package/dist/common/components/loading-dots.d.ts +1 -2
  80. package/dist/common/components/loading-indicator.d.ts +83 -2
  81. package/dist/common/components/loading-overlay.d.ts +1 -1
  82. package/dist/common/components/loading-spinner.d.ts +1 -2
  83. package/dist/common/icons/exclamation-mark-icon.d.ts +1 -2
  84. package/dist/common/icons/loading-icon.d.ts +1 -2
  85. package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
  86. package/dist/dashboard-widget/types.d.ts +22 -2
  87. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
  88. package/dist/dashboard-widget/utils.d.ts +9 -0
  89. package/dist/debounce-2yQ2123W.js +76298 -0
  90. package/dist/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +1 -1
  91. package/dist/dynamic-size-container/default-size.d.ts +5 -1
  92. package/dist/dynamic-size-container/dynamic-size-container.d.ts +12 -3
  93. package/dist/error-boundary/error-boundary-box.d.ts +1 -2
  94. package/dist/error-boundary/error-boundary.d.ts +1 -1
  95. package/dist/filters/components/common/dropdown.d.ts +1 -1
  96. package/dist/filters/components/common/switch.d.ts +4 -1
  97. package/dist/filters/components/common/triangle-indicator.d.ts +1 -2
  98. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +1 -2
  99. package/dist/filters/components/date-filter/date-filter/calendar-header.d.ts +1 -2
  100. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +1 -2
  101. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +1 -2
  102. package/dist/filters/components/icons/arrow-down-icon.d.ts +1 -1
  103. package/dist/filters/components/icons/arrow-right-icon.d.ts +1 -1
  104. package/dist/filters/components/icons/date-icon.d.ts +1 -1
  105. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +1 -1
  106. package/dist/filters/components/icons/menu-icon.d.ts +1 -1
  107. package/dist/filters/components/icons/pencil-icon.d.ts +1 -1
  108. package/dist/filters/components/icons/plus-icon.d.ts +1 -1
  109. package/dist/filters/components/icons/search-icon.d.ts +1 -1
  110. package/dist/filters/components/icons/trash-icon.d.ts +1 -1
  111. package/dist/highcharts-memorized.d.ts +1 -1
  112. package/dist/index.d.ts +2 -1
  113. package/dist/index.js +35808 -7229
  114. package/dist/indicator-canvas.d.ts +4 -9
  115. package/dist/line-chart.d.ts +2 -2
  116. package/dist/models/dashboard/translate-dashboard.d.ts +3 -2
  117. package/dist/models/dashboard/types.d.ts +6 -8
  118. package/dist/models/widget/use-get-widget-model.d.ts +1 -1
  119. package/dist/models/widget/widget-model.d.ts +50 -6
  120. package/dist/no-results-overlay/no-results-overlay.d.ts +1 -2
  121. package/dist/pie-chart.d.ts +2 -2
  122. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
  123. package/dist/pivot-table/sorting-utils.d.ts +11 -55
  124. package/dist/pivot-table/use-get-pivot-table-query.d.ts +10 -2
  125. package/dist/pivot-table/use-pivot-table-data-options-internal.d.ts +15 -0
  126. package/dist/polar-chart.d.ts +2 -2
  127. package/dist/props.d.ts +61 -2
  128. package/dist/query-execution/use-execute-query.d.ts +1 -1
  129. package/dist/scatter-chart.d.ts +1 -1
  130. package/dist/sisense-chart/sisense-chart.d.ts +4 -6
  131. package/dist/theme-provider/default-theme-settings.d.ts +9 -0
  132. package/dist/theme-provider/types.d.ts +7 -0
  133. package/dist/translation/i18n-provider.d.ts +1 -1
  134. package/dist/translation/resources/en.d.ts +3 -1
  135. package/dist/translation/resources/index.d.ts +6 -2
  136. package/dist/types.d.ts +170 -1
  137. package/dist/widgets/common/context-menu.d.ts +1 -2
  138. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  139. package/dist/widgets/common/widget-container.d.ts +15 -0
  140. package/dist/widgets/common/widget-header-info-button.d.ts +1 -2
  141. package/dist/widgets/drilldown-widget.d.ts +2 -3
  142. package/dist/widgets/pivot-table-widget.d.ts +22 -0
  143. package/package.json +18 -19
  144. package/dist/ai/chat-style-provider.d.ts +0 -22
  145. package/dist/ai/icons/magic-wand-icon.d.ts +0 -2
  146. package/dist/ai/magic-wand-dropdown.d.ts +0 -7
  147. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +0 -7
  148. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +0 -7
  149. package/dist/ai/translators/code-templates.d.ts +0 -11
  150. package/dist/ai/translators/generate-code.d.ts +0 -9
  151. package/dist/ai/translators/index.d.ts +0 -4
  152. package/dist/ai/translators/model-translator.d.ts +0 -51
  153. package/dist/ai/translators/query-translator.d.ts +0 -137
  154. package/dist/ai/translators/translate-filters-to-code.d.ts +0 -2
  155. package/dist/ai/translators/translate-props-to-code.d.ts +0 -8
  156. package/dist/ai/translators/types.d.ts +0 -105
  157. package/dist/ai/translators/utils.d.ts +0 -12
  158. package/dist/useQuery-cb11e76c.js +0 -121619
@@ -1,11 +1,9 @@
1
- import { ChartDataOptionsInternal, IndicatorChartDataOptionsInternal } from './chart-data-options/types';
1
+ import { IndicatorChartDataOptionsInternal } from './chart-data-options/types';
2
2
  import { type FunctionComponent } from 'react';
3
3
  import { IndicatorChartData } from './chart-data/types';
4
4
  import { IndicatorChartDesignOptions } from './chart-options-processor/translations/design-options';
5
- import { ChartData } from './chart-data/types';
6
- import { DesignOptions } from './chart-options-processor/translations/types';
7
5
  import { ThemeSettings } from './types';
8
- interface Props {
6
+ export interface IndicatorCanvasProps {
9
7
  chartData: IndicatorChartData;
10
8
  dataOptions: IndicatorChartDataOptionsInternal;
11
9
  designOptions: IndicatorChartDesignOptions;
@@ -14,8 +12,5 @@ interface Props {
14
12
  /**
15
13
  * @internal
16
14
  */
17
- export declare const IndicatorCanvas: FunctionComponent<Props>;
18
- export declare const isIndicatorChartData: (chartData: ChartData) => chartData is IndicatorChartData;
19
- export declare const isIndicatorChartDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is IndicatorChartDataOptionsInternal;
20
- export declare const isIndicatorDesignOptions: (designOptions: DesignOptions) => designOptions is IndicatorChartDesignOptions;
21
- export {};
15
+ export declare const IndicatorCanvas: FunctionComponent<IndicatorCanvasProps>;
16
+ export declare const isIndicatorCanvasProps: (chartData: IndicatorCanvasProps) => boolean;
@@ -16,8 +16,8 @@ import { LineChartProps } from './props';
16
16
  *
17
17
  * Additional Line Chart examples:
18
18
  *
19
- * - [Curved Line Chart](https://csdk-playground.sisense.com/?example=charts%2Fline-chart-spline)
20
- * - [Styled Line Chart](https://csdk-playground.sisense.com/?example=charts%2Fline-chart-styled)
19
+ * - [Curved Line Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fline-chart-spline)
20
+ * - [Styled Line Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fline-chart-styled)
21
21
  *
22
22
  * @param props - Line chart properties
23
23
  * @returns Line Chart component
@@ -1,3 +1,4 @@
1
- import { type DashboardDto } from '../../api/types/dashboard-dto';
2
- import { type DashboardModel } from './types';
1
+ import type { DashboardDto, Layout as SisenseLayout } from '../../api/types/dashboard-dto';
2
+ import type { Layout, DashboardModel } from './types';
3
+ export declare const translateLayout: (layout: SisenseLayout) => Layout;
3
4
  export declare function translateDashboard({ oid, title, datasource, widgets, layout, }: DashboardDto): DashboardModel;
@@ -1,20 +1,18 @@
1
1
  import { type DataSource } from '@sisense/sdk-data';
2
2
  import { WidgetModel } from '../widget/widget-model';
3
3
  /** @internal */
4
- export type Layout = {
4
+ export interface Layout {
5
5
  columns: {
6
- width: number;
6
+ widthPercentage: number;
7
7
  cells: {
8
8
  subcells: {
9
- width: number;
10
- elements: {
11
- height: number | string;
12
- widgetId: string;
13
- }[];
9
+ widthPercentage: number;
10
+ height: number | string;
11
+ widgetId: string;
14
12
  }[];
15
13
  }[];
16
14
  }[];
17
- };
15
+ }
18
16
  export type DashboardModel = {
19
17
  oid: string;
20
18
  title: string;
@@ -84,7 +84,7 @@ export type WidgetModelSuccessState = {
84
84
  *
85
85
  * Additional `useGetWidgetModel` examples:
86
86
  *
87
- * - [Modify Chart Type](https://csdk-playground.sisense.com/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
87
+ * - [Modify Chart Type](https://www.sisense.com/platform/compose-sdk/playground/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
88
88
  *
89
89
  * @param params - Parameters of the widget to be retrieved
90
90
  * @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
@@ -1,13 +1,13 @@
1
1
  import { Filter } from '@sisense/sdk-data';
2
- import { ChartDataOptions, TableDataOptions } from '../../chart-data-options/types';
2
+ import { ChartDataOptions, PivotTableDataOptions, TableDataOptions } from '../../chart-data-options/types';
3
3
  import { Panel, WidgetDto, WidgetType } from '../../dashboard-widget/types';
4
- import { ChartProps, ChartWidgetProps, TableProps, TableWidgetProps } from '../../props';
5
- import { ExecuteQueryParams } from '../../query-execution';
4
+ import { ChartProps, ChartWidgetProps, PivotTableProps, TableProps, TableWidgetProps, PivotTableWidgetProps } from '../../props';
5
+ import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
6
6
  import { ChartType, DrilldownOptions, ChartStyleOptions, TableStyleOptions, CompleteThemeSettings } from '../../types';
7
7
  /**
8
8
  * Widget data options.
9
9
  */
10
- export type WidgetDataOptions = ChartDataOptions | TableDataOptions;
10
+ export type WidgetDataOptions = ChartDataOptions | TableDataOptions | PivotTableDataOptions;
11
11
  /**
12
12
  * Model of Sisense widget defined in the abstractions of Compose SDK.
13
13
  *
@@ -80,11 +80,26 @@ export declare class WidgetModel {
80
80
  * ```tsx
81
81
  * const {data, isLoading, isError} = useExecuteQuery(widget.getExecuteQueryParams());
82
82
  * ```
83
+ *
84
+ * Note: this method is not supported for getting pivot query.
85
+ * Use {@link getExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
83
86
  */
84
87
  getExecuteQueryParams(): ExecuteQueryParams;
88
+ /**
89
+ * Returns the parameters to be used for executing a query for the pivot widget.
90
+ *
91
+ * @example
92
+ * ```tsx
93
+ * const {data, isLoading, isError} = useExecutePivotQuery(widget.getExecutePivotQueryParams());
94
+ * ```
95
+ *
96
+ * Note: this method is supported only for getting pivot query.
97
+ * Use {@link getExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
98
+ */
99
+ getExecutePivotQueryParams(): ExecutePivotQueryParams;
85
100
  /**
86
101
  * Returns the props to be used for rendering a chart.
87
-
102
+ *
88
103
  * @example
89
104
  * ```tsx
90
105
  * <Chart {...widget.getChartProps()} />
@@ -92,6 +107,7 @@ export declare class WidgetModel {
92
107
  *
93
108
  * Note: this method is not supported for tabular widgets.
94
109
  * Use {@link getTableProps} instead for getting props for the <Table> component.
110
+ * Use {@link getPivotTableProps} instead for getting props for the <PivotTable> component.
95
111
  */
96
112
  getChartProps(): ChartProps;
97
113
  /**
@@ -102,10 +118,24 @@ export declare class WidgetModel {
102
118
  * <Table {...widget.getTableProps()} />
103
119
  * ```
104
120
  *
105
- * Note: this method is not supported for chart widgets.
121
+ * Note: this method is not supported for chart and pivot widgets.
106
122
  * Use {@link getChartProps} instead for getting props for the <Chart> component.
123
+ * Use {@link getPivotTableProps} instead for getting props for the <PivotTable> component.
107
124
  */
108
125
  getTableProps(): TableProps;
126
+ /**
127
+ * Returns the props to be used for rendering a pivot table.
128
+ *
129
+ * @example
130
+ * ```tsx
131
+ * <PivotTable {...widget.getPivotTableProps()} />
132
+ * ```
133
+ *
134
+ * Note: this method is not supported for chart or table widgets.
135
+ * Use {@link getChartProps} instead for getting props for the <Chart> component.
136
+ * Use {@link getTableProps} instead for getting props for the <Table> component.
137
+ */
138
+ getPivotTableProps(): PivotTableProps;
109
139
  /**
110
140
  * Returns the props to be used for rendering a chart widget.
111
141
  *
@@ -130,4 +160,18 @@ export declare class WidgetModel {
130
160
  * @internal
131
161
  */
132
162
  getTableWidgetProps(): TableWidgetProps;
163
+ /**
164
+ * Returns the props to be used for rendering a pivot table widget.
165
+ *
166
+ * @example
167
+ * ```tsx
168
+ * <PivotTableWidget {...widget.getPivotTableWidgetProps()} />
169
+ * ```
170
+
171
+ * Note: this method is not supported for chart or table widgets.
172
+ * Use {@link getChartWidgetProps} instead for getting props for the <ChartWidget> component.
173
+ * Use {@link getTableWidgetProps} instead for getting props for the <TableWidget> component.
174
+ * @internal
175
+ */
176
+ getPivotTableWidgetProps(): PivotTableWidgetProps;
133
177
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ChartType, TableType } from '../types';
3
2
  /**
4
3
  * This component displays `No Results` overlay for visualization (e.g., Chart, Table) with no data
@@ -10,4 +9,4 @@ import { ChartType, TableType } from '../types';
10
9
  */
11
10
  export declare const NoResultsOverlay: ({ iconType }: {
12
11
  iconType: ChartType | TableType;
13
- }) => JSX.Element;
12
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -17,8 +17,8 @@ import { PieChartProps } from './props';
17
17
  *
18
18
  * Additional Pie Chart examples:
19
19
  *
20
- * - [Donut Pie Chart](https://csdk-playground.sisense.com/?example=charts%2Fpie-chart-donut)
21
- * - [Ring Pie Chart](https://csdk-playground.sisense.com/?example=charts%2Fpie-chart-ring)
20
+ * - [Donut Pie Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpie-chart-donut)
21
+ * - [Ring Pie Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpie-chart-ring)
22
22
  *
23
23
  * @param props - Pie chart properties
24
24
  * @returns Pie Chart component
@@ -0,0 +1,20 @@
1
+ import { CompleteThemeSettings, PivotTableStyleOptions } from '../../types';
2
+ export declare function preparePivotStylingProps(styleOptions?: PivotTableStyleOptions, themeSettings?: CompleteThemeSettings): {
3
+ fontFamily: string | undefined;
4
+ textColor: string | undefined;
5
+ backgroundColor: string | undefined;
6
+ borderColor: string;
7
+ fillColor: string | undefined;
8
+ additionalFillColor: string | undefined;
9
+ fillOptions: {
10
+ alternatingRows: boolean | undefined;
11
+ alternatingColumns: boolean | undefined;
12
+ columnsHeaders: boolean | undefined;
13
+ rowMembers: boolean | undefined;
14
+ totals: boolean | undefined;
15
+ };
16
+ rowHeight: number | undefined;
17
+ isAutoHeight: boolean;
18
+ navigationPrimaryColor: string | undefined;
19
+ navigationSecondaryColor: string | undefined;
20
+ };
@@ -1,56 +1,12 @@
1
- /**
2
- * This file contain sorting functionality ported from the existing Analytics.
3
- * It directly works with pivot JAQL to apply sorting.
4
- *
5
- * It will be fully refactored soon by using a different approach of applying sorting on Pivot internal data options.
6
- */
7
- import { JaqlRequest, type SortingSettingsChangePayload } from '@sisense/sdk-pivot-client';
8
- export declare function normalizeJaqlSorting(jaql: JaqlRequest): {
9
- metadata: (import("@sisense/sdk-pivot-client").JaqlPanel | {
10
- jaql: {
11
- sortDetails: {
12
- initialized: boolean;
13
- field: any;
14
- dir: any;
15
- measurePath: null;
16
- sortingLastDimension: any;
17
- };
18
- title: string;
19
- dim: string;
20
- datatype: string;
21
- sort?: string | null | undefined;
22
- type?: string | undefined;
23
- table?: string | undefined;
24
- column?: string | undefined;
25
- };
26
- panel: string;
27
- field?: {
28
- id?: string | undefined;
29
- index?: number | undefined;
30
- } | undefined;
31
- disabled?: boolean | undefined;
32
- hierarchies?: string[] | undefined;
33
- format?: {
34
- subtotal?: boolean | undefined;
35
- width?: number | undefined;
36
- databars?: boolean | undefined;
37
- color?: {
38
- type: string;
39
- color?: string | undefined;
40
- conditions?: {
41
- color: string;
42
- operator: string;
43
- expression: string | Record<string, any>;
44
- }[] | undefined;
45
- } | undefined;
46
- } | undefined;
47
- })[];
48
- datasource?: import("@sisense/sdk-pivot-client/dist/data-load/types").JaqlDatasource | undefined;
49
- queryGuid?: string | undefined;
50
- grandTotals?: {
51
- title: string;
52
- columns?: boolean | undefined;
53
- rows?: boolean | undefined;
54
- } | null | undefined;
1
+ import { type SortingSettingsChangePayload } from '@sisense/sdk-pivot-client';
2
+ import { PivotTableDataOptionsInternal } from '..';
3
+ import type { SortDirection, PivotRowsSort } from '../types';
4
+ export type PivotRowsSortCriteria = {
5
+ rowIndex: number;
6
+ sort: PivotRowsSort | null;
55
7
  };
56
- export declare function prepareSortedJaql(jaql: JaqlRequest, { type, settings, sortDetails, isSingleRowTree }: SortingSettingsChangePayload): JaqlRequest;
8
+ export type PivotSortCriteria = {
9
+ rows: PivotRowsSortCriteria[];
10
+ };
11
+ export declare function normalizePivotSort(sortType: SortDirection | PivotRowsSort): PivotRowsSort;
12
+ export declare function preparePivotRowsSortCriteriaList({ type, settings, sortDetails }: SortingSettingsChangePayload, dataOptionsInternal: PivotTableDataOptionsInternal): PivotRowsSortCriteria[];
@@ -1,11 +1,19 @@
1
- import { PivotTableProps } from '../props';
2
1
  import { type JaqlRequest } from '@sisense/sdk-pivot-client';
2
+ import type { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
3
+ import { ExecutePivotQueryParams } from '../query-execution';
4
+ import { PivotTableDataOptionsInternal } from '../chart-data-options/types';
5
+ export declare const getPivotQueryOptions: (dataOptions: PivotTableDataOptionsInternal) => Pick<ExecutePivotQueryParams, 'rows' | 'columns' | 'values' | 'grandTotals'>;
3
6
  /**
4
7
  * A hook that returns the JAQL request object from pivot table props.
5
8
  *
6
9
  * @internal
7
10
  */
8
- export declare const useGetPivotTableQuery: ({ dataSet, dataOptions, filters }: PivotTableProps) => {
11
+ export declare const useGetPivotTableQuery: ({ dataSet, dataOptionsInternal, filters, refreshCounter, }: {
12
+ dataSet?: DataSource | undefined;
13
+ dataOptionsInternal: PivotTableDataOptionsInternal;
14
+ filters?: Filter[] | FilterRelations | undefined;
15
+ refreshCounter?: number | undefined;
16
+ }) => {
9
17
  isLoading: boolean;
10
18
  isSuccess: boolean;
11
19
  isError: boolean;
@@ -0,0 +1,15 @@
1
+ import { PivotTableDataOptions, PivotTableDataOptionsInternal } from '../chart-data-options/types.js';
2
+ import { PivotSortCriteria } from './sorting-utils.js';
3
+ type UsePivotTableDataOptionsInternalResult = {
4
+ dataOptionsInternal: PivotTableDataOptionsInternal;
5
+ updateSort: (sortCriteria: PivotSortCriteria) => void;
6
+ };
7
+ /**
8
+ * A hook that returns the JAQL request object from pivot table props.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare const usePivotTableDataOptionsInternal: ({ dataOptions, }: {
13
+ dataOptions: PivotTableDataOptions;
14
+ }) => UsePivotTableDataOptionsInternalResult;
15
+ export {};
@@ -16,8 +16,8 @@ import { PolarChartProps } from './props';
16
16
  *
17
17
  * Additional Polar Chart examples:
18
18
  *
19
- * - [Area Polar Chart](https://csdk-playground.sisense.com/?example=charts%2Fpolar-chart-area)
20
- * - [Line Polar Chart](https://csdk-playground.sisense.com/?example=charts%2Fpolar-chart-line)
19
+ * - [Area Polar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpolar-chart-area)
20
+ * - [Line Polar Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts%2Fpolar-chart-line)
21
21
  *
22
22
  * @param props - Polar chart properties
23
23
  * @returns Polar Chart component
package/dist/props.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Attribute, Filter, Measure, DataSource, Data, QueryResultData, FilterRelations } from '@sisense/sdk-data';
2
- import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions } from './types';
2
+ import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, ChartStyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection, SunburstStyleOptions, ChartWidgetStyleOptions, TableWidgetStyleOptions, DashboardWidgetStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, AreamapStyleOptions, DataPoint, ScatterDataPoint, AreamapDataPoint, BoxplotDataPoint, ChartDataPoints, ScattermapDataPoint, PivotTableStyleOptions, PivotTableWidgetStyleOptions } from './types';
3
3
  import { HighchartsOptions } from './chart-options-processor/chart-options-service';
4
4
  import { ComponentType, PropsWithChildren, ReactNode } from 'react';
5
5
  import { IndicatorChartDataOptions, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, ScatterChartDataOptions, TableDataOptions, ScattermapChartDataOptions, AreamapChartDataOptions, PivotTableDataOptions } from './chart-data-options/types';
@@ -343,7 +343,7 @@ export interface BaseChartProps {
343
343
  *
344
344
  * (1) Sisense data source name as a string. For example, `'Sample ECommerce'`. Typically, you
345
345
  * retrieve the data source name from a data model you create using the `get-data-model`
346
- * {@link @sisense/sdk-cli!Command | command} of the Compose SDK CLI. Under the hood, the chart
346
+ * {@link https://sisense.dev/guides/sdk/guides/cli.html | command} of the Compose SDK CLI. Under the hood, the chart
347
347
  * connects to the data source, executes a query, and loads the data as specified in
348
348
  * {@link dataOptions}, {@link filters}, and {@link highlights}.
349
349
  *
@@ -958,6 +958,65 @@ export interface TableWidgetProps {
958
958
  */
959
959
  description?: string;
960
960
  }
961
+ /**
962
+ * Props for the {@link PivotTableWidget} component
963
+ *
964
+ * @internal
965
+ */
966
+ export interface PivotTableWidgetProps {
967
+ /**
968
+ * Data source the query is run against - e.g. `Sample ECommerce`
969
+ *
970
+ * If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
971
+ *
972
+ * @category Data
973
+ */
974
+ dataSource?: DataSource;
975
+ /**
976
+ * Filters that will slice query results
977
+ *
978
+ * @category Data
979
+ */
980
+ filters?: Filter[] | FilterRelations;
981
+ /**
982
+ * Configurations for how to interpret and present the data passed to the table
983
+ *
984
+ * @category Chart
985
+ */
986
+ dataOptions: PivotTableDataOptions;
987
+ /**
988
+ * Style options for both the table and widget including the widget header
989
+ *
990
+ * @category Widget
991
+ */
992
+ styleOptions?: PivotTableWidgetStyleOptions;
993
+ /**
994
+ * React nodes to be rendered at the top of component, before the table
995
+ *
996
+ * @category Widget
997
+ * @internal
998
+ */
999
+ topSlot?: ReactNode;
1000
+ /**
1001
+ * React nodes to be rendered at the bottom of component, after the table
1002
+ *
1003
+ * @category Widget
1004
+ * @internal
1005
+ */
1006
+ bottomSlot?: ReactNode;
1007
+ /**
1008
+ * Title of the widget
1009
+ *
1010
+ * @category Widget
1011
+ */
1012
+ title?: string;
1013
+ /**
1014
+ * Description of the widget
1015
+ *
1016
+ * @category Widget
1017
+ */
1018
+ description?: string;
1019
+ }
961
1020
  /**
962
1021
  * Props for {@link ExecuteQueryByWidgetId} component.
963
1022
  *
@@ -17,7 +17,7 @@ import { ExecuteQueryParams, ExecuteQueryResult } from './types';
17
17
  *
18
18
  * Additional `useExecuteQuery()` examples:
19
19
  *
20
- * - [Query with Sorting](https://csdk-playground.sisense.com/?example=queries%2Fuse-execute-query-sorting)
20
+ * - [Query with Sorting](https://www.sisense.com/platform/compose-sdk/playground/?example=queries%2Fuse-execute-query-sorting)
21
21
  * - [Take Control of Your Data Visualizations]( https://www.sisense.com/blog/take-control-of-your-data-visualizations/) blog post with examples of using the hook to fetch data to display in third-party charts.
22
22
  *
23
23
  * @param params - Parameters of the query
@@ -22,7 +22,7 @@ import { ScatterChartProps } from './props';
22
22
  *
23
23
  * Additional Scatter Chart examples:
24
24
  *
25
- * - [Bubble Scatter Chart](https://csdk-playground.sisense.com/?example=charts/scatter-chart-bubble)
25
+ * - [Bubble Scatter Chart](https://www.sisense.com/platform/compose-sdk/playground/?example=charts/scatter-chart-bubble)
26
26
  *
27
27
  * @param props - Scatter chart properties
28
28
  * @returns Scatter Chart component
@@ -1,15 +1,14 @@
1
- /// <reference types="react" />
2
1
  import { ChartDataOptionsInternal } from '../chart-data-options/types';
3
2
  import { ChartData } from '../chart-data/types';
4
3
  import { BeforeRenderHandler } from '../props';
5
4
  import { ChartDesignOptions } from '../chart-options-processor/translations/types';
6
5
  import { ChartType, CompleteThemeSettings } from '../types';
7
6
  import { SisenseChartDataPointEventHandler, SisenseChartDataPointsEventHandler } from './types';
8
- interface Props {
7
+ export interface SisenseChartProps {
9
8
  chartType: ChartType;
10
9
  chartData: ChartData;
11
- chartDataOptions: ChartDataOptionsInternal;
12
- chartDesignOptions: ChartDesignOptions;
10
+ dataOptions: ChartDataOptionsInternal;
11
+ designOptions: ChartDesignOptions;
13
12
  themeSettings?: CompleteThemeSettings;
14
13
  onDataPointClick?: SisenseChartDataPointEventHandler;
15
14
  onDataPointContextMenu?: SisenseChartDataPointEventHandler;
@@ -19,5 +18,4 @@ interface Props {
19
18
  /**
20
19
  * @internal
21
20
  */
22
- export declare const SisenseChart: ({ chartType, chartData, chartDataOptions, chartDesignOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: Props) => JSX.Element | null;
23
- export {};
21
+ export declare const SisenseChart: ({ chartType, chartData, dataOptions, designOptions, themeSettings, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, }: SisenseChartProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import { CompleteThemeSettings } from '../types';
2
+ /**
3
+ * Returns default theme settings, which can be used as base for custom theme options.
4
+ *
5
+ * @param isDarkMode - Boolean value whether to get theme settings for dark mode
6
+ * @returns Theme settings object
7
+ * @internal
8
+ */
9
+ export declare const getDefaultThemeSettings: (isDarkMode?: boolean) => CompleteThemeSettings;
@@ -0,0 +1,7 @@
1
+ import { CompleteThemeSettings } from '../types';
2
+ /**
3
+ * Themable interface for styled components that require theme settings.
4
+ */
5
+ export type Themable = {
6
+ theme: CompleteThemeSettings;
7
+ };
@@ -3,5 +3,5 @@ type I18nProviderProps = {
3
3
  children: React.ReactNode;
4
4
  userLanguage?: string;
5
5
  };
6
- export declare const I18nProvider: ({ children, userLanguage }: I18nProviderProps) => JSX.Element | null;
6
+ export declare const I18nProvider: ({ children, userLanguage }: I18nProviderProps) => import("react/jsx-runtime").JSX.Element | null;
7
7
  export {};
@@ -29,7 +29,9 @@ export declare const translation: {
29
29
  };
30
30
  widgetModel: {
31
31
  tabularWidgetNotSupported: string;
32
- onlyTabularWidgetsSupported: string;
32
+ pivotWidgetNotSupported: string;
33
+ onlyTableWidgetSupported: string;
34
+ onlyPivotWidgetSupported: string;
33
35
  };
34
36
  unknownFilterInFilterRelations: string;
35
37
  filterRelationsNotSupported: string;
@@ -33,7 +33,9 @@ export declare const resources: {
33
33
  };
34
34
  widgetModel: {
35
35
  tabularWidgetNotSupported: string;
36
- onlyTabularWidgetsSupported: string;
36
+ pivotWidgetNotSupported: string;
37
+ onlyTableWidgetSupported: string;
38
+ onlyPivotWidgetSupported: string;
37
39
  };
38
40
  unknownFilterInFilterRelations: string;
39
41
  filterRelationsNotSupported: string;
@@ -119,7 +121,9 @@ export declare const resources: {
119
121
  };
120
122
  widgetModel: {
121
123
  tabularWidgetNotSupported: string;
122
- onlyTabularWidgetsSupported: string;
124
+ pivotWidgetNotSupported: string;
125
+ onlyTableWidgetSupported: string;
126
+ onlyPivotWidgetSupported: string;
123
127
  };
124
128
  unknownFilterInFilterRelations: string;
125
129
  filterRelationsNotSupported: string;