@sisense/sdk-ui 2.16.0 → 2.17.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 (60) hide show
  1. package/dist/ai.cjs +54 -54
  2. package/dist/ai.js +779 -741
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +421 -384
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{derive-chart-family-d7eaC45K.cjs → derive-chart-family-B_cR1yhw.cjs} +3 -3
  8. package/dist/{derive-chart-family-DLwnWblo.js → derive-chart-family-DkuTQGOE.js} +333 -333
  9. package/dist/{dimensions-BUWtZxix.cjs → dimensions-DI9h9IJH.cjs} +1 -1
  10. package/dist/{dimensions-DvDgZ8RW.js → dimensions-Gma5tFmd.js} +1 -1
  11. package/dist/execute-query-CdhSHTTA.cjs +1 -0
  12. package/dist/{execute-query-CFK2R_1S.js → execute-query-l7jejslh.js} +867 -865
  13. package/dist/index.cjs +970 -246
  14. package/dist/index.js +70584 -18085
  15. package/dist/index.umd.js +1269 -1267
  16. package/dist/packages/sdk-ui/src/ai/get-nlg-insights-from-widget.d.ts +46 -0
  17. package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -0
  18. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/common.d.ts +2 -1
  19. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/filter-processors.d.ts +0 -9
  20. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/types.d.ts +1 -1
  21. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +2 -2
  22. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/app/client-application.d.ts +5 -5
  24. package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +3 -4
  25. package/dist/packages/sdk-ui/src/dashboard/hooks/use-jtd.d.ts +1 -2
  26. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +78 -0
  27. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +23 -0
  28. package/dist/packages/sdk-ui/src/data-source-dimensional-model/index.d.ts +2 -0
  29. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/widget-model-translator.d.ts +4 -1
  31. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +2 -1
  32. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +2 -1
  33. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-totals-formatter.d.ts +1 -1
  34. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +2 -1
  35. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +1 -1
  36. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-get-pivot-table-query.d.ts +1 -1
  37. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-builder.d.ts +1 -1
  38. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-client.d.ts +8 -0
  39. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-loading.d.ts +2 -1
  40. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-service.d.ts +2 -1
  41. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +1 -1
  42. package/dist/packages/sdk-ui/src/pivot-table/pivot-table.d.ts +32 -2
  43. package/dist/packages/sdk-ui/src/pivot-table/sorting-utils.d.ts +1 -1
  44. package/dist/packages/sdk-ui/src/props.d.ts +11 -0
  45. package/dist/packages/sdk-ui/src/query-execution/use-execute-pivot-query.d.ts +0 -1
  46. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +2 -2
  48. package/dist/packages/sdk-ui/src/types.d.ts +40 -25
  49. package/dist/packages/sdk-ui/src/widgets/pivot-table-widget.d.ts +19 -1
  50. package/dist/{types-Clbnx4mQ.cjs → types-Hki4GrUY.cjs} +1 -1
  51. package/dist/{types-D1mqt0Mg.js → types-ofTjqFFK.js} +1 -1
  52. package/dist/use-common-filters-Bh4KYWy_.cjs +604 -0
  53. package/dist/use-common-filters-D5yiZCTg.js +56547 -0
  54. package/dist/{widget-composer-Dhl_nmhq.js → widget-composer-By61s921.js} +3 -3
  55. package/dist/{widget-composer-BaOTPn5w.cjs → widget-composer-BzzTf8UH.cjs} +1 -1
  56. package/package.json +8 -7
  57. package/dist/execute-query-CB4XfUng.cjs +0 -1
  58. package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +0 -17
  59. package/dist/use-common-filters-CkQznSEt.cjs +0 -1325
  60. package/dist/use-common-filters-CxoO7TzT.js +0 -103390
@@ -0,0 +1,46 @@
1
+ import { DataSource } from '@sisense/sdk-data';
2
+ import { HttpClient } from '@sisense/sdk-rest-client';
3
+ import { WidgetProps } from '../props';
4
+ /**
5
+ * Options for {@link getNlgInsightsFromWidget} function.
6
+ * @internal
7
+ */
8
+ export interface GetNlgInsightsFromWidgetOptions {
9
+ /** Optional default data source to use if WidgetProps.dataSource is undefined */
10
+ defaultDataSource?: DataSource;
11
+ /** The verbosity of the NLG summarization */
12
+ verbosity?: 'Low' | 'High';
13
+ }
14
+ /**
15
+ * Pure function that fetches NLG insights from WidgetProps.
16
+ *
17
+ * This function converts WidgetProps to the required API format and makes an HTTP request
18
+ * to get natural language insights about the chart data.
19
+ *
20
+ * @param props - WidgetProps containing chart configuration
21
+ * @param httpClient - HttpClient instance for making API requests
22
+ * @param options - Optional configuration including defaultDataSource and verbosity
23
+ * @returns Promise that resolves to the NLG insights answer string
24
+ * @throws Error if dataSource cannot be resolved or if API response is invalid
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * import { getNlgInsightsFromWidget } from '@sisense/sdk-ui/ai';
29
+ * import { HttpClient } from '@sisense/sdk-rest-client';
30
+ *
31
+ * const widgetProps: WidgetProps = {
32
+ * chartType: 'bar',
33
+ * dataOptions: { category: [...], value: [...] },
34
+ * dataSource: 'Sample ECommerce',
35
+ * filters: [...],
36
+ * };
37
+ *
38
+ * const httpClient = new HttpClient(url, auth, env);
39
+ *
40
+ * const insights = await getNlgInsightsFromWidget(widgetProps, httpClient, {
41
+ * verbosity: 'High',
42
+ * });
43
+ * ```
44
+ * @internal
45
+ */
46
+ export declare function getNlgInsightsFromWidget(props: WidgetProps, httpClient: HttpClient, options?: GetNlgInsightsFromWidgetOptions): Promise<string>;
@@ -14,4 +14,5 @@ export { NlqChartWidget, type NlqChartWidgetProps } from './chart/nlq-chart-widg
14
14
  export { ChatRestApi } from './api/chat-rest-api';
15
15
  export { CustomAiContextProvider, type CustomAiContext, type CustomAiContextProviderProps, } from './custom-ai-context-provider';
16
16
  export { prepareGetNlgInsightsPayload } from './use-get-nlg-insights';
17
+ export { getNlgInsightsFromWidget, type GetNlgInsightsFromWidgetOptions, } from './get-nlg-insights-from-widget';
17
18
  export { widgetComposer } from '../analytics-composer';
@@ -1,4 +1,4 @@
1
- import { Attribute, JaqlDataSourceForDto } from '@sisense/sdk-data';
1
+ import { Attribute, DateDimension, JaqlDataSourceForDto } from '@sisense/sdk-data';
2
2
  import { NlqTranslationResult, NormalizedTable } from '../types.js';
3
3
  /**
4
4
  * Validates that an attribute is compatible with text values
@@ -45,5 +45,6 @@ export declare function isNonDateLevelAttribute(attribute: Attribute): boolean;
45
45
  */
46
46
  export declare function getAttributeTypeDisplayString(attribute: Attribute): string;
47
47
  export declare function createAttributeFromName(attributeName: string, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]): Attribute | import("@sisense/sdk-data").LevelAttribute;
48
+ export declare function createDateDimensionFromName(dateDimensionName: string, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]): DateDimension;
48
49
  export declare function getSuccessData<T>(result: NlqTranslationResult<T>): T;
49
50
  export declare function getErrors<T>(result: NlqTranslationResult<T>): string[];
@@ -26,15 +26,6 @@ export declare function processNumericFilter(processedArgs: ProcessedArg[], cont
26
26
  * @throws Error with descriptive message if validation fails
27
27
  */
28
28
  export declare function processStringFilter(processedArgs: ProcessedArg[], context: FunctionContext): void;
29
- /**
30
- * Processes filters that only accept datetime values
31
- * Used by: dateFrom, dateTo, dateRange, etc.
32
- *
33
- * @param processedArgs - [attribute, value, config?]
34
- * @param context - Processing context with error prefix and other metadata
35
- * @throws Error with descriptive message if validation fails
36
- */
37
- export declare function processDateFilter(processedArgs: ProcessedArg[], context: FunctionContext): void;
38
29
  /**
39
30
  * Processes exclude filter to validate that it only accepts members filters
40
31
  * Used by: exclude
@@ -1,6 +1,6 @@
1
1
  import { Filter, FilterRelations, JSONArray, JSONValue, Measure } from '@sisense/sdk-data';
2
2
  import { DataSchemaContext, NlqTranslationInput } from '../types';
3
- export declare const ATTRIBUTE_PREFIX = "DM.";
3
+ export declare const DIMENSIONAL_NAME_PREFIX = "DM.";
4
4
  export type ArgType = 'string' | 'string[]' | 'number' | 'number[]' | 'boolean' | 'Attribute' | 'Attribute[]' | 'Measure' | 'BaseMeasure' | 'Measure[]' | 'Filter' | 'Filter[]' | 'FilterRelationsNode' | 'DateDimension' | 'LevelAttribute' | 'Measure | number' | 'Date | string' | 'string | number' | 'BaseFilterConfig' | 'MembersFilterConfig' | 'CustomFormulaContext' | 'any';
5
5
  export interface ArgSchema {
6
6
  type: ArgType;
@@ -293,7 +293,7 @@ export type DashboardCodeProps = Stringify<DashboardProps> & ExtraWidgetCodeProp
293
293
  /**
294
294
  * @internal
295
295
  */
296
- export type NormalizedField = {
296
+ export type NormalizedColumn = {
297
297
  name: string;
298
298
  dataType: string;
299
299
  expression: string;
@@ -304,7 +304,7 @@ export type NormalizedField = {
304
304
  */
305
305
  export type NormalizedTable = {
306
306
  name: string;
307
- columns: NormalizedField[];
307
+ columns: NormalizedColumn[];
308
308
  };
309
309
  /**
310
310
  * NLQ generic input with context for translation
@@ -96,7 +96,7 @@ export declare class RestApi {
96
96
  */
97
97
  getSharedFormula: (sharedFormulaId: string) => Promise<SharedFormulaDto | undefined>;
98
98
  /**
99
- * Get datasource fields
99
+ * Get legacy Fusion datasource fields
100
100
  *
101
101
  * @param dataSource - A datasource name
102
102
  * @param options - An object with offset and count
@@ -1,5 +1,5 @@
1
1
  import { DataSource } from '@sisense/sdk-data';
2
- import { PivotClient } from '@sisense/sdk-pivot-client';
2
+ import { PivotQueryClient } from '@sisense/sdk-pivot-query-client';
3
3
  import { QueryClient } from '@sisense/sdk-query-client';
4
4
  import { HttpClient } from '@sisense/sdk-rest-client';
5
5
  import { TrackingEventDetails } from '@sisense/sdk-tracking';
@@ -189,9 +189,9 @@ export interface ClientApplication {
189
189
  */
190
190
  readonly httpClient: HttpClient;
191
191
  /**
192
- * Gets the underlying Pivot Client
192
+ * Gets the underlying Pivot Query Client
193
193
  */
194
- readonly pivotClient: PivotClient;
194
+ readonly pivotQueryClient: PivotQueryClient;
195
195
  /**
196
196
  * Gets the underlying Query Client
197
197
  */
@@ -214,7 +214,7 @@ export interface ClientApplication {
214
214
  clear: () => void;
215
215
  };
216
216
  }
217
- type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth' | 'alternativeSsoHost'>;
217
+ type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth' | 'alternativeSsoHost' | 'disableFusionPalette'>;
218
218
  /** @internal */
219
- export declare const createClientApplication: ({ defaultDataSource, url: rawUrl, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, alternativeSsoHost, }: ClientApplicationParams) => Promise<ClientApplication>;
219
+ export declare const createClientApplication: ({ defaultDataSource, url: rawUrl, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, alternativeSsoHost, disableFusionPalette, }: ClientApplicationParams) => Promise<ClientApplication>;
220
220
  export {};
@@ -1,12 +1,11 @@
1
1
  import { Measure } from '@sisense/sdk-data';
2
- import { ChartDataOptionsInternal, StyledColumn, StyledMeasureColumn } from '..';
2
+ import { ChartDataOptionsInternal } from '../chart-data-options/types';
3
3
  import { SisenseChartDataPoint } from '../sisense-chart/types';
4
- import { HighchartsPoint } from '../types';
4
+ import { HighchartsPoint, StyledColumn, StyledMeasureColumn } from '../types';
5
5
  export declare function createFormatter(dataOption: StyledColumn | StyledMeasureColumn): (value?: number | string | Date) => string;
6
- export declare function getDataPointMetadata(dataOptionPath: string, dataOption: StyledColumn | StyledMeasureColumn): {
6
+ export declare function getDataPointMetadata(dataOption: StyledColumn | StyledMeasureColumn): {
7
7
  measure?: Measure | undefined;
8
8
  attribute?: import("@sisense/sdk-data").Attribute | undefined;
9
- id: string;
10
9
  dataOption: StyledColumn | StyledMeasureColumn;
11
10
  };
12
11
  export declare function getDataPoint(point: HighchartsPoint, dataOptions: ChartDataOptionsInternal): SisenseChartDataPoint;
@@ -4,7 +4,6 @@ import { type JtdActions } from '../../dashboard/hooks/jtd/jtd-types';
4
4
  import { JtdConfig } from '../../dashboard/hooks/jtd/jtd-types';
5
5
  import { WidgetsOptions } from '../../models/dashboard/types';
6
6
  import { WidgetProps } from '../../props.js';
7
- import { CompleteThemeSettings } from '../../types';
8
7
  /**
9
8
  * Shared function to apply JTD functionality to a widget.
10
9
  * Extracted to avoid code duplication between use-jtd.ts and use-jtd-widget.ts
@@ -20,7 +19,7 @@ export declare const applyJtdToWidget: (widgetProps: WidgetProps, config: {
20
19
  originalWidgetFilters: Filter[];
21
20
  extraFilters?: Filter[];
22
21
  actions: JtdActions;
23
- themeSettings: CompleteThemeSettings;
22
+ hyperlinkColor?: string;
24
23
  }) => WidgetProps;
25
24
  /**
26
25
  * Internal Jump To Dashboard (JTD) hook.
@@ -0,0 +1,78 @@
1
+ import { DataSource, Dimension } from '@sisense/sdk-data';
2
+ /**
3
+ * States of a data source dimensions load.
4
+ */
5
+ export type DataSourceDimensionsState = DataSourceDimensionsLoadingState | DataSourceDimensionsErrorState | DataSourceDimensionsSuccessState;
6
+ /**
7
+ * State of data source dimensions that is loading.
8
+ */
9
+ export type DataSourceDimensionsLoadingState = {
10
+ /** Whether the dimensions are loading */
11
+ isLoading: true;
12
+ /** Whether the dimensions load has failed */
13
+ isError: false;
14
+ /** Whether the dimensions load has succeeded */
15
+ isSuccess: false;
16
+ /** Error, if one occurred */
17
+ error: undefined;
18
+ /** Dimensions, if the load succeeded */
19
+ dimensions: undefined;
20
+ /** Loading status */
21
+ status: 'loading';
22
+ };
23
+ /**
24
+ * State of a data source dimensions load that has failed.
25
+ */
26
+ export type DataSourceDimensionsErrorState = {
27
+ /** Whether the dimensions are loading */
28
+ isLoading: false;
29
+ /** Whether the dimensions load has failed */
30
+ isError: true;
31
+ /** Whether the dimensions load has succeeded */
32
+ isSuccess: false;
33
+ /** Error, if one occurred */
34
+ error: Error;
35
+ /** Dimensions, if the load succeeded */
36
+ dimensions: undefined;
37
+ /** Loading status */
38
+ status: 'error';
39
+ };
40
+ /**
41
+ * State of a data source dimensions load that has succeeded.
42
+ */
43
+ export type DataSourceDimensionsSuccessState = {
44
+ /** Whether the dimensions are loading */
45
+ isLoading: false;
46
+ /** Whether the dimensions load has failed */
47
+ isError: false;
48
+ /** Whether the dimensions load has succeeded */
49
+ isSuccess: true;
50
+ /** Error, if one occurred */
51
+ error: undefined;
52
+ /** Dimensions, if the load succeeded */
53
+ dimensions: Dimension[];
54
+ /** Loading status */
55
+ status: 'success';
56
+ };
57
+ /**
58
+ * Parameters for {@link useGetDataSourceDimensions} hook.
59
+ */
60
+ export interface GetDataSourceDimensionsParams {
61
+ /** The data source to get the dimensions for. If no data source is provided, the default data source will be used. */
62
+ dataSource: DataSource | undefined;
63
+ /** Whether the query should be enabled. */
64
+ enabled?: boolean;
65
+ /** The number of items to return */
66
+ count?: number;
67
+ /** The offset for pagination */
68
+ offset?: number;
69
+ /** The search value to filter by */
70
+ searchValue?: string;
71
+ }
72
+ /**
73
+ * Gets the dimensions of a data source.
74
+ *
75
+ * @param params - The parameters for getting the dimensions
76
+ * @returns The dimensions state
77
+ */
78
+ export declare const useGetDataSourceDimensions: (params: GetDataSourceDimensionsParams) => DataSourceDimensionsState;
@@ -0,0 +1,23 @@
1
+ import { DataSource, DataSourceField } from '@sisense/sdk-data';
2
+ import { RestApiHookState } from '../../utils/utility-types';
3
+ /**
4
+ * Gets the legacy Fusion data structure to describe a column (attribute) in a data source.
5
+ * Prefer using {@link useGetDataSourceDimensions} instead if possible.
6
+ *
7
+ * @param dataSource - The data source to get the fields for
8
+ * @param params.enabled - Whether the query should be enabled.
9
+ * @param params.count - The number of items to return
10
+ * @param params.offset - The offset for pagination
11
+ * @param params.searchValue - The search value to filter by
12
+ * @returns The data source fields state
13
+ * @internal
14
+ */
15
+ export declare const useGetDataSourceFields: (params: {
16
+ dataSource: DataSource | undefined;
17
+ enabled?: boolean;
18
+ count?: number;
19
+ offset?: number;
20
+ searchValue?: string;
21
+ }) => DataSourceFieldsState;
22
+ type DataSourceFieldsState = RestApiHookState<'dataSourceFields', DataSourceField[]>;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './hooks/use-get-data-source-dimensions';
2
+ export * from './hooks/use-get-data-source-fields';
@@ -98,7 +98,7 @@ export { useThemeContext } from './theme-provider';
98
98
  export { LoadingIndicator } from './common/components/loading-indicator';
99
99
  export { LoadingOverlay } from './common/components/loading-overlay';
100
100
  export { useFetch, type RequestConfig, type UseQueryResult } from './common/hooks/use-fetch';
101
- export { useGetDataSourceFields } from './common/hooks/fusion-endpoints/use-get-data-source-fields';
101
+ export { useGetDataSourceDimensions, useGetDataSourceFields, type GetDataSourceDimensionsParams, type DataSourceDimensionsState, type DataSourceDimensionsLoadingState, type DataSourceDimensionsErrorState, type DataSourceDimensionsSuccessState, } from './data-source-dimensional-model';
102
102
  export { useJtdWidget } from './dashboard/hooks/use-jtd-widget';
103
103
  export type { EmptyObject } from './utils/utility-types';
104
104
  export { translateColumnToAttribute } from './chart-data-options/utils';
@@ -131,7 +131,10 @@ export declare function toCommonWidgetProps(widgetModel: WidgetModel): CommonWid
131
131
  /**
132
132
  * Translates {@link WidgetModel} to {@link WidgetProps}.
133
133
  *
134
- * @internal
134
+ * @example
135
+ * ```tsx
136
+ * <Widget {...widgetModelTranslator.toWidgetProps(widgetModel)} />
137
+ * ```
135
138
  */
136
139
  export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
137
140
  /**
@@ -1,4 +1,5 @@
1
- import { JaqlPanel, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
1
+ import { type JaqlPanel } from '@sisense/sdk-pivot-query-client';
2
+ import { PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-ui';
2
3
  import type { PivotTableDataOptions } from '../../../chart-data-options/types';
3
4
  import { CompleteThemeSettings } from '../../../types';
4
5
  export declare function createDataCellColorFormatter(dataOptions: PivotTableDataOptions, themeSettings: CompleteThemeSettings): (cell: PivotDataNode, rowItem: PivotTreeNode, columnItem: PivotTreeNode, jaqlPanelItem: JaqlPanel | undefined) => void;
@@ -1,4 +1,5 @@
1
- import type { JaqlPanel, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
1
+ import { type JaqlPanel } from '@sisense/sdk-pivot-query-client';
2
+ import type { PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-ui';
2
3
  import type { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
3
4
  import type { CellFormattingResult, CustomDataCellFormatter, CustomHeaderCellFormatter } from './types.js';
4
5
  /**
@@ -1,4 +1,4 @@
1
1
  import { TFunction } from '@sisense/sdk-common/src/i18n/i18next';
2
- import { PivotTreeNode } from '@sisense/sdk-pivot-client';
2
+ import type { PivotTreeNode } from '@sisense/sdk-pivot-ui';
3
3
  import type { PivotTableDataOptions } from '../../../chart-data-options/types';
4
4
  export declare function createHeaderCellTotalsFormatter(dataOptions: PivotTableDataOptions, translate: TFunction): (cell: PivotTreeNode) => void;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { JaqlPanel, JaqlRequest, PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-client';
2
+ import type { JaqlPanel, JaqlRequest } from '@sisense/sdk-pivot-query-client';
3
+ import type { PivotDataNode, PivotTreeNode } from '@sisense/sdk-pivot-ui';
3
4
  import { AnyColumn } from '../../chart-data-options/types';
4
5
  /**
5
6
  * Formatting result that can be applied to a header cell
@@ -1,4 +1,4 @@
1
- import { type DataService } from '@sisense/sdk-pivot-client';
1
+ import { type DataService } from '@sisense/sdk-pivot-query-client';
2
2
  import { type PivotTableDataOptionsInternal } from '../../chart-data-options/types';
3
3
  import { type CustomDataCellFormatter, type CustomHeaderCellFormatter } from '../../pivot-table/formatters/types';
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
2
- import { type JaqlRequest } from '@sisense/sdk-pivot-client';
2
+ import { type JaqlRequest } from '@sisense/sdk-pivot-query-client';
3
3
  import { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
4
4
  import { ExecutePivotQueryParams } from '../../query-execution';
5
5
  export declare const getPivotQueryOptions: (dataOptions: PivotTableDataOptionsInternal) => Pick<ExecutePivotQueryParams, 'rows' | 'columns' | 'values' | 'grandTotals'>;
@@ -1,4 +1,4 @@
1
- import { PivotBuilder, PivotClient } from '@sisense/sdk-pivot-client';
1
+ import { PivotBuilder, PivotClient } from '@sisense/sdk-pivot-ui';
2
2
  /**
3
3
  * Hook that creates a new pivot builder
4
4
  */
@@ -0,0 +1,8 @@
1
+ import { PivotQueryClient } from '@sisense/sdk-pivot-query-client';
2
+ import { PivotClient } from '@sisense/sdk-pivot-ui';
3
+ /**
4
+ * Hook that creates a new pivot client
5
+ */
6
+ export declare function usePivotClient(options: {
7
+ pivotQueryClient: PivotQueryClient;
8
+ }): PivotClient;
@@ -1,4 +1,5 @@
1
- import { JaqlRequest, PivotBuilder } from '@sisense/sdk-pivot-client';
1
+ import type { JaqlRequest } from '@sisense/sdk-pivot-query-client';
2
+ import { PivotBuilder } from '@sisense/sdk-pivot-ui';
2
3
  interface LoadingState {
3
4
  isLoading: boolean;
4
5
  isNoResults: boolean;
@@ -1,4 +1,5 @@
1
- import { DataService, PivotBuilder, PivotClient } from '@sisense/sdk-pivot-client';
1
+ import type { DataService } from '@sisense/sdk-pivot-query-client';
2
+ import { PivotBuilder, PivotClient } from '@sisense/sdk-pivot-ui';
2
3
  /**
3
4
  * Hook that recreates a new data service when new jaql request is needed to sent
4
5
  * and updates the pivot builder with the new data service.
@@ -1,4 +1,4 @@
1
- import { type PivotBuilder } from '@sisense/sdk-pivot-client';
1
+ import { type PivotBuilder } from '@sisense/sdk-pivot-ui';
2
2
  import type { PivotTableDataOptionsInternal } from '../../chart-data-options/types';
3
3
  import type { ContainerSize } from '../../dynamic-size-container/dynamic-size-container';
4
4
  import { PivotTableDataPointEventHandler } from '../../props';
@@ -28,12 +28,13 @@ export declare const PIVOT_WIDGET_PADDING = 8;
28
28
  * totalsCalculation: 'sum',
29
29
  * },
30
30
  * ],
31
- * grandTotals: { title: 'Grand Total', rows: true, columns: true },
31
+ * grandTotals: { rows: true, columns: true },
32
32
  * }}
33
33
  * filters={[filterFactory.members(DM.Commerce.Gender, ['Female', 'Male'])]}
34
34
  * styleOptions={{ width: 1000, height: 600, rowsPerPage: 50 }}
35
35
  * />
36
36
  * ```
37
+ * <img src="media://pivot-example-1.png" width="800px" />
37
38
  *
38
39
  * (2) Example of PivotTable with the predefined sorting configuration:
39
40
  * - Sort "Condition" row by its values in Ascending order. This is equivalent to users clicking on the "Condition" row heading and hit Sort Ascending (A-Z)
@@ -76,9 +77,38 @@ export declare const PIVOT_WIDGET_PADDING = 8;
76
77
  * ```
77
78
  *
78
79
  * <img src="media://pivot-sorting-example-1.png" width="800px" />
80
+ *
81
+ * (3) Example of PivotTable with auto content width enabled:
82
+ * When {@link PivotTableStyleOptions.isAutoContentWidth | `isAutoContentWidth: true`} is set, all vertical columns will be resized to fit within the component width without requiring horizontal scroll.
83
+ *
84
+ * ```tsx
85
+ * <PivotTable
86
+ * dataSet={DM.DataSource}
87
+ * dataOptions={{
88
+ * rows: [DM.Category.Category],
89
+ * columns: [DM.Commerce.Gender],
90
+ * values: [
91
+ * measureFactory.sum(DM.Commerce.Cost, 'Total Cost'),
92
+ * measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'),
93
+ * ],
94
+ * }}
95
+ * styleOptions={{
96
+ * width: 800,
97
+ * height: 600,
98
+ * isAutoContentWidth: true,
99
+ * rowsPerPage: 50,
100
+ * }}
101
+ * />
102
+ * ```
103
+ * <img src="media://pivot-auto-content-width-true.png" width="800px" />
104
+ *
105
+ * @remarks
106
+ * Configuration options can also be applied within the scope of a `<SisenseContextProvider>` to control the default behavior of PivotTable, by changing available settings within `appConfig.chartConfig.tabular.*`
107
+ *
108
+ * Follow the link to {@link AppConfig} for more details on the available settings.
109
+ *
79
110
  * @param props - Pivot Table properties
80
111
  * @returns Pivot Table component
81
112
  * @group Data Grids
82
- * @beta
83
113
  */
84
114
  export declare const PivotTable: import("react").FunctionComponent<PivotTableProps>;
@@ -1,4 +1,4 @@
1
- import { type SortingSettingsChangePayload } from '@sisense/sdk-pivot-client';
1
+ import { type SortingSettingsChangePayload } from '@sisense/sdk-pivot-ui';
2
2
  import { PivotTableDataOptionsInternal } from '..';
3
3
  import type { PivotRowsSort, SortDirection } from '../types';
4
4
  export type PivotRowsSortCriteria = {
@@ -126,6 +126,17 @@ export interface SisenseContextProviderProps {
126
126
  * @internal
127
127
  */
128
128
  alternativeSsoHost?: string;
129
+ /**
130
+ * Boolean flag to use the default palette from Compose SDK.
131
+ * Set to true in case of WAT authentication causing errors for the `/api/palettes` endpoint on older versions of Fusion (pre 2024.3)
132
+ *
133
+ * If not specified, the default value is `false`.
134
+ *
135
+ * @category Sisense App
136
+ *
137
+ * @internal
138
+ */
139
+ disableFusionPalette?: boolean;
129
140
  }
130
141
  /**
131
142
  * Props for {@link ExecuteQuery} component.
@@ -16,7 +16,6 @@ import { ExecutePivotQueryParams, PivotQueryState } from './types';
16
16
  *
17
17
  * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
18
18
  * @group Queries
19
- * @beta
20
19
  */
21
20
  export declare const useExecutePivotQuery: (params: ExecutePivotQueryParams) => PivotQueryState;
22
21
  /**
@@ -78,7 +78,7 @@ export declare const translation: {
78
78
  dateFilterIncorrectOperator: string;
79
79
  synchronizedFilterInvalidProps: string;
80
80
  methodNotImplemented: string;
81
- noPivotClient: string;
81
+ noPivotQueryClient: string;
82
82
  unexpectedCacheValue: string;
83
83
  notAMembersFilter: string;
84
84
  drilldownNoInitialDimension: string;
@@ -88,7 +88,7 @@ export declare const resources: {
88
88
  dateFilterIncorrectOperator: string;
89
89
  synchronizedFilterInvalidProps: string;
90
90
  methodNotImplemented: string;
91
- noPivotClient: string;
91
+ noPivotQueryClient: string;
92
92
  unexpectedCacheValue: string;
93
93
  notAMembersFilter: string;
94
94
  drilldownNoInitialDimension: string;
@@ -486,7 +486,7 @@ export declare const resources: {
486
486
  dateFilterIncorrectOperator: string;
487
487
  synchronizedFilterInvalidProps: string;
488
488
  methodNotImplemented: string;
489
- noPivotClient: string;
489
+ noPivotQueryClient: string;
490
490
  unexpectedCacheValue: string;
491
491
  notAMembersFilter: string;
492
492
  drilldownNoInitialDimension: string;