@sisense/sdk-ui 1.34.0 → 2.0.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 (75) hide show
  1. package/dist/ai.cjs +9 -9
  2. package/dist/ai.js +553 -578
  3. package/dist/analytics-composer.cjs +120 -119
  4. package/dist/analytics-composer.js +3235 -2506
  5. package/dist/{derive-chart-family-5CbFzbpu.js → derive-chart-family-BLaI9-3r.js} +23488 -23351
  6. package/dist/{derive-chart-family-C3FH49ux.cjs → derive-chart-family-CxqjTyNt.cjs} +196 -196
  7. package/dist/dimensions-C-VKss5V.cjs +1 -0
  8. package/dist/dimensions-Cfq9FexH.js +200 -0
  9. package/dist/index.cjs +24 -20
  10. package/dist/index.js +5909 -6105
  11. package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +13 -6
  12. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +4 -2
  13. package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +17 -7
  14. package/dist/packages/sdk-ui/src/ai/get-nlg-insights.d.ts +0 -21
  15. package/dist/packages/sdk-ui/src/ai/index.d.ts +4 -3
  16. package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +0 -12
  17. package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +0 -4
  18. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +0 -4
  19. package/dist/packages/sdk-ui/src/analytics-composer/{common → code}/stringify-props.d.ts +10 -2
  20. package/dist/packages/sdk-ui/src/analytics-composer/common/custom-superjson.d.ts +16 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/dashboard-composer.d.ts +8 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/stringify-widgets.d.ts +3 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/dashboard/to-dashboard-code.d.ts +3 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/query/query-translator.d.ts +1 -0
  27. package/dist/packages/sdk-ui/src/analytics-composer/query/simplify-metadata-item.d.ts +9 -0
  28. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +78 -4
  29. package/dist/packages/sdk-ui/src/analytics-composer/widget/chart-options/get-widget-options.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -1
  31. package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -55
  32. package/dist/packages/sdk-ui/src/area-range-chart.d.ts +0 -1
  33. package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
  34. package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +0 -11
  35. package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
  36. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +7 -3
  37. package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -4
  38. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/index.d.ts +0 -1
  39. package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +0 -1
  40. package/dist/packages/sdk-ui/src/index-typedoc.d.ts +4 -1
  41. package/dist/packages/sdk-ui/src/index.d.ts +4 -3
  42. package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +15 -1
  43. package/dist/packages/sdk-ui/src/models/widget/types.d.ts +1 -1
  44. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +2 -12
  45. package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -125
  46. package/dist/packages/sdk-ui/src/props.d.ts +25 -45
  47. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -3
  48. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +2 -1
  49. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +4 -2
  50. package/dist/packages/sdk-ui/src/types.d.ts +48 -41
  51. package/dist/packages/sdk-ui/src/utils/{utility-types.d.ts → utility-types/basic-utility-types.d.ts} +0 -34
  52. package/dist/packages/sdk-ui/src/utils/utility-types/distributive-omit.d.ts +24 -0
  53. package/dist/packages/sdk-ui/src/utils/utility-types/index.d.ts +4 -0
  54. package/dist/packages/sdk-ui/src/utils/utility-types/rest-api-hook-state.d.ts +35 -0
  55. package/dist/packages/sdk-ui/src/utils/utility-types/soft-union.d.ts +35 -0
  56. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +0 -7
  57. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +2 -2
  58. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-drilldown-options.d.ts +2 -2
  59. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +2 -2
  60. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +2 -2
  61. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +23 -16
  62. package/dist/packages/sdk-ui/src/widgets/widget.d.ts +0 -1
  63. package/dist/{use-common-filters-CqGo6jp3.cjs → use-common-filters-BGGGgJJ5.cjs} +13 -13
  64. package/dist/{use-common-filters-Bw15BNGn.js → use-common-filters-Cmyb86sc.js} +4618 -4637
  65. package/dist/widget-composer-BJURHrVD.cjs +428 -0
  66. package/dist/widget-composer-C4rwNt4P.js +959 -0
  67. package/package.json +12 -9
  68. package/dist/packages/sdk-ui/src/ai/common/beta-label.d.ts +0 -1
  69. package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-props.d.ts +0 -8
  70. package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/types.d.ts +0 -8
  71. package/dist/packages/sdk-ui/src/utils/check-and-notify-about-deprecated-prop.d.ts +0 -1
  72. package/dist/packages/sdk-ui/src/widget-by-id/dashboard-widget.d.ts +0 -27
  73. package/dist/widget-composer-C5_iIuZN.js +0 -742
  74. package/dist/widget-composer-D5_iKTui.cjs +0 -316
  75. /package/dist/packages/sdk-ui/src/analytics-composer/{widget → code}/stringify-filters.d.ts +0 -0
@@ -1,16 +1,22 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface AiContextProviderProps {
3
3
  children: ReactNode;
4
- /** AI context volatile mode */
4
+ /**
5
+ * Boolean flag to indicate whether the chat session should be volatile.
6
+ *
7
+ * When `false` the chat session history will be stored per user per datamodel. The retention period is configurable in Sisense Fusion.
8
+ *
9
+ * When the `Chatbot` component renders, if a previous chat history exists for the current user and datamodel, it will be restored. The user may continue the conversation or clear the history.
10
+ *
11
+ * When `true` a new chat session (with no history) will be created each time the `Chatbot` comoponent initializes.
12
+ *
13
+ * @default false
14
+ */
5
15
  volatile?: boolean;
6
16
  }
7
17
  /**
8
18
  * React component that wraps all generative AI components and hooks.
9
19
  *
10
- * ::: warning Note
11
- * This component is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
12
- * :::
13
- *
14
20
  * @example
15
21
  * ```tsx
16
22
  * import { SisenseContextProvider } from '@sisense/sdk-ui';
@@ -26,7 +32,8 @@ export interface AiContextProviderProps {
26
32
  * );
27
33
  * }
28
34
  * ```
35
+ * @param props - AI Context Provider Props
36
+ * @returns An AI Context Provider Component
29
37
  * @group Generative AI
30
- * @beta
31
38
  */
32
39
  export default function AiContextProvider({ children, volatile }: AiContextProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -67,11 +67,13 @@ export interface ChatConfig {
67
67
  */
68
68
  enableInsights?: boolean;
69
69
  /**
70
- * Boolean flag to start a clean chat on every load.
70
+ * Boolean flag to hide chat history on every load.
71
71
  *
72
- * Note: When the flag is `true`, chat history will be preserved and stored for the session but will not be fetched or displayed. Changing this setting back to `false` will make the entire history visible again, even if it was previously hidden. Use the "Clear History" button to completely erase the history.
72
+ * Note: When the flag is `true`, chat history will be preserved and stored for the session but will not be displayed. Changing this setting back to `false` will make the entire history visible again, even if it was previously hidden. Use the "Clear History" button to completely erase the history.
73
73
  *
74
74
  * @default false
75
+ * @deprecated
76
+ * This flag is deprecated and will be removed in a future version. Use {@link @sisense/sdk-ui!AiContextProviderProps.volatile} instead.
75
77
  */
76
78
  hideHistory?: boolean;
77
79
  /**
@@ -22,11 +22,8 @@ export interface ChatbotProps {
22
22
  config?: Partial<ChatConfig>;
23
23
  }
24
24
  /**
25
- * React component that renders a chatbot with data topic selection. You can optionally provide `width` and/or `height`.
26
- *
27
- * ::: warning Note
28
- * This component is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
29
- * :::
25
+ * React component that displays a chatbot with data topic selection.
26
+ * You can optionally configure size, config e.g. data topics, recommendations, UI text.
30
27
  *
31
28
  * @example
32
29
  * ```tsx
@@ -37,7 +34,21 @@ export interface ChatbotProps {
37
34
  * return (
38
35
  * <SisenseContextProvider {...sisenseContextProps}>
39
36
  * <AiContextProvider>
40
- * <Chatbot width={1000} height={800} />
37
+ * <Chatbot
38
+ * width={1000}
39
+ * height={800}
40
+ * config={{
41
+ * enableFollowupQuestions: true,
42
+ * numOfRecommendations: 2,
43
+ * dataTopicsList: [
44
+ * 'Sample ECommerce',
45
+ * 'Sample Healthcare'
46
+ * ],
47
+ * inputPromptText: 'What do you want to explore?',
48
+ * welcomeText: 'Welcome to Acme AI, powered by Sisense',
49
+ * suggestionsWelcomeText: 'Would you like to know:',
50
+ * }}
51
+ * />
41
52
  * </AiContextProvider>
42
53
  * </SisenseContextProvider>
43
54
  * );
@@ -45,6 +56,5 @@ export interface ChatbotProps {
45
56
  * ```
46
57
  * @param props - {@link ChatbotProps}
47
58
  * @group Generative AI
48
- * @beta
49
59
  */
50
60
  export declare const Chatbot: import("react").FunctionComponent<ChatbotProps>;
@@ -9,10 +9,6 @@ export interface GetNlgInsightsProps extends Omit<UseGetNlgInsightsParams, 'enab
9
9
  * React component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG).
10
10
  * Specifying a query is similar to providing parameters to a {@link useExecuteQuery} hook, using dimensions, measures, and filters.
11
11
  *
12
- * ::: warning Note
13
- * This component is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
14
- * :::
15
- *
16
12
  * @example
17
13
  * ```tsx
18
14
  * <GetNlgInsights
@@ -24,23 +20,6 @@ export interface GetNlgInsightsProps extends Omit<UseGetNlgInsightsParams, 'enab
24
20
  * @param props - {@link GetNlgInsightsProps}
25
21
  * @returns Collapsible container wrapping a text summary
26
22
  * @group Generative AI
27
- * @beta
28
23
  */
29
24
  declare const _default: import("react").FunctionComponent<GetNlgInsightsProps>;
30
25
  export default _default;
31
- /**
32
- * Props for {@link GetNlgQueryResult} component.
33
- *
34
- * @deprecated Use {@link GetNlgInsightsProps} instead
35
- * @internal
36
- */
37
- export interface GetNlgQueryResultProps extends GetNlgInsightsProps {
38
- }
39
- /**
40
- * @param props - {@link GetNlgQueryResultProps}
41
- * @returns Collapsible container wrapping a text summary
42
- * @group Generative AI
43
- * @deprecated Use {@link GetNlgInsights} instead
44
- * @internal
45
- */
46
- export declare const GetNlgQueryResult: import("react").FunctionComponent<GetNlgQueryResultProps>;
@@ -1,14 +1,15 @@
1
1
  export { default as AiContextProvider, type AiContextProviderProps } from './ai-context-provider';
2
2
  export { type ChatConfig } from './chat-config';
3
- export { useGetNlgInsights, type UseGetNlgInsightsParams, type UseGetNlgInsightsState, useGetNlgQueryResult, } from './use-get-nlg-insights';
3
+ export { useGetNlgInsights, type UseGetNlgInsightsParams, type UseGetNlgInsightsState, } from './use-get-nlg-insights';
4
4
  export { useGetNlqResult, prepareGetNlqResultPayload, type UseGetNlqResultParams, type UseGetNlqResultState, type GetNlqResultParams, } from './use-get-nlq-result';
5
5
  export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type GetQueryRecommendationsParams, type UseGetQueryRecommendationsState, DEFAULT_RECOMMENDATIONS_COUNT, } from './use-get-query-recommendations';
6
6
  export { useChatSession, type UseChatSessionResult } from './use-chat-session';
7
7
  export { useLastNlqResponse } from './use-last-nlq-response';
8
8
  export { useFinalNlqResponse } from './use-final-nlq-response';
9
- export type { GetNlgInsightsRequest, GetNlgInsightsResponse, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, NlqResult, NLQ_RESULT_CHART_TYPES, NlqResultChartType, } from './api/types';
9
+ export type { GetNlgInsightsRequest, GetNlgInsightsResponse, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, NlqResult, NlqResultChartType, } from './api/types';
10
+ export { NLQ_RESULT_CHART_TYPES } from './api/types';
10
11
  export { Chatbot, type ChatbotProps } from './chatbot';
11
- export { default as GetNlgInsights, type GetNlgInsightsProps, GetNlgQueryResult, type GetNlgQueryResultProps, } from './get-nlg-insights';
12
+ export { default as GetNlgInsights, type GetNlgInsightsProps } from './get-nlg-insights';
12
13
  export { NlqChartWidget, type NlqChartWidgetProps } from './chart/nlq-chart-widget';
13
14
  export { ChatRestApi } from './api/chat-rest-api';
14
15
  export { CustomAiContextProvider, type CustomAiContext, type CustomAiContextProviderProps, } from './custom-ai-context-provider';
@@ -52,10 +52,6 @@ export declare const useGetNlgInsightsInternal: (params: GetNlgInsightsProps | G
52
52
  * React hook that fetches an analysis of the provided query using natural language generation (NLG).
53
53
  * Specifying a query is similar to providing parameters to a {@link useExecuteQuery} hook, using dimensions, measures, and filters.
54
54
  *
55
- * ::: warning Note
56
- * This hook is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
57
- * :::
58
- *
59
55
  * @example
60
56
  * ```tsx
61
57
  * const { data, isLoading } = useGetNlgInsights({
@@ -72,13 +68,5 @@ export declare const useGetNlgInsightsInternal: (params: GetNlgInsightsProps | G
72
68
  * ```
73
69
  * @returns Response object containing a text summary
74
70
  * @group Generative AI
75
- * @beta
76
71
  */
77
72
  export declare const useGetNlgInsights: (params: UseGetNlgInsightsParams) => UseGetNlgInsightsState;
78
- /**
79
- * @returns Response object containing a text summary
80
- * @group Generative AI
81
- * @deprecated Use {@link useGetNlgInsights} instead
82
- * @internal
83
- */
84
- export declare const useGetNlgQueryResult: (params: UseGetNlgInsightsParams) => UseGetNlgInsightsState;
@@ -53,10 +53,6 @@ export declare const useGetNlqResultInternal: (params: UseGetNlqResultParams) =>
53
53
  /**
54
54
  * React hook that enables natural language query (NLQ) against a data model or perspective.
55
55
  *
56
- * ::: warning Note
57
- * This hook is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
58
- * :::
59
- *
60
56
  * @example
61
57
  * ```tsx
62
58
  * const { data, isLoading } = useGetNlqResult({
@@ -52,10 +52,6 @@ export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRec
52
52
  *
53
53
  * This hook includes the same code that fetches the initial suggested questions in the chatbot.
54
54
  *
55
- * ::: warning Note
56
- * This hook is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.
57
- * :::
58
- *
59
55
  * @example
60
56
  * ```tsx
61
57
  * const { data, isLoading } = useGetQueryRecommendations({
@@ -1,5 +1,13 @@
1
- import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
2
1
  import { ChartDataOptions } from '../../types';
2
+ import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
3
+ export type MembersFilterJaql = {
4
+ members: string[];
5
+ };
6
+ export type FromNotEqualFilterJaql = {
7
+ fromNotEqual: number;
8
+ };
9
+ export type FilterJaql = MembersFilterJaql | FromNotEqualFilterJaql;
10
+ export declare const stringifyProps: (props: object | string, indent?: number, wrapInQuotes?: boolean) => string;
3
11
  export declare function stringifyDataOptions(dataOptions: ChartDataOptions): string;
4
- export declare function stringifyDataSource(dataSource: DataSource | undefined): string;
12
+ export declare function stringifyDataSource(dataSource: DataSource | undefined, defaultDataSourceString?: string): string;
5
13
  export declare function stringifyExtraImports(filters: Filter[] | FilterRelations, importMeasureFactory?: boolean): string;
@@ -0,0 +1,16 @@
1
+ import SuperJSON, { SuperJSONResult } from 'superjson';
2
+ /**
3
+ * Utility to stringify and parse CSDK JS objects to JSON and vice versa.
4
+ * JS objects can contain class instances of dimensional elements (e.g., attributes/dimensions, measures, filters).
5
+ *
6
+ * The utility uses `superjson` under the hood.
7
+ *
8
+ * @internal
9
+ */
10
+ export declare const CustomSuperJSON: typeof SuperJSON;
11
+ /**
12
+ * Type alias for the result of the `CustomSuperJSON` utility.
13
+ *
14
+ * @internal
15
+ */
16
+ export type CustomSuperJSONResult = SuperJSONResult;
@@ -0,0 +1,8 @@
1
+ import { DashboardCodeParams } from '../types.js';
2
+ /**
3
+ * Converts dashboard props to CSDK code.
4
+ *
5
+ * @param dashboardProps - Dashboard props
6
+ * @returns CSDK code string
7
+ */
8
+ export declare const toDashboardCode: (dashboardCodeParams: DashboardCodeParams) => string;
@@ -0,0 +1,3 @@
1
+ import { WidgetProps } from '../../props.js';
2
+ import { UiFramework } from '../types.js';
3
+ export declare const stringifyWidgets: (widgets: WidgetProps[], uiFramework: UiFramework) => string;
@@ -0,0 +1,3 @@
1
+ import { ByIdDashboardCodeParams, ClientSideDashboardCodeParams } from '../types.js';
2
+ export declare const toDashboardCodeById: ({ dashboardOid, uiFramework, }: ByIdDashboardCodeParams) => string;
3
+ export declare const toDashboardCodeClientSide: ({ dashboardProps, uiFramework, }: ClientSideDashboardCodeParams) => string;
@@ -18,3 +18,4 @@ export * as dashboardComposer from './dashboard/dashboard-composer';
18
18
  * @internal
19
19
  */
20
20
  export * as executeQueryComposer from './execute-query/execute-query-composer';
21
+ export * from './common/custom-superjson';
@@ -1 +1,2 @@
1
1
  export { QueryTranslator } from './query-translator.js';
2
+ export { simplifyMetadataItem } from './simplify-metadata-item.js';
@@ -7,6 +7,7 @@ import { MetadataItem, MetadataItemJaql, DataSourceField } from '@sisense/sdk-da
7
7
  * It also provides methods to stringify query models to YAML strings
8
8
  * and parse YAML strings to query models.
9
9
  *
10
+ * @deprecated QueryTranslator was designed for Forge, which is now discontinued. To simplify the JQL query from NLQ, use simplifyMetadataItem() instead.
10
11
  * @internal
11
12
  */
12
13
  export declare class QueryTranslator {
@@ -0,0 +1,9 @@
1
+ import { MetadataItem } from '@sisense/sdk-data';
2
+ /**
3
+ * Simplifies MetadataItem.
4
+ *
5
+ * @param item - The MetadataItem to simplify
6
+ * @returns The simplified MetadataItem
7
+ * @internal
8
+ */
9
+ export declare const simplifyMetadataItem: (item: MetadataItem) => MetadataItem;
@@ -4,12 +4,15 @@ import { ExecuteQueryParams, ExecutePivotQueryParams } from '../query-execution'
4
4
  import { MetadataItem } from '@sisense/sdk-data';
5
5
  import { DynamicChartType } from '../chart-options-processor/translations/types.js';
6
6
  import { AnyColumn } from '../chart-data-options/types.js';
7
+ import { DashboardProps } from '../dashboard/types.js';
7
8
  type Stringify<T> = {
8
9
  [K in keyof T as `${K & string}String`]: string;
9
10
  };
10
- type ExtraCodeProps = {
11
+ type ExtraWidgetCodeProps = {
11
12
  componentString: string;
12
13
  extraImportsString: string;
14
+ idString?: string;
15
+ widgetTypeString?: 'chart' | 'pivot' | 'text' | 'plugin';
13
16
  };
14
17
  /** @internal */
15
18
  export type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -108,7 +111,7 @@ export type UiFramework = 'react' | 'vue' | 'angular';
108
111
  *
109
112
  * @internal
110
113
  */
111
- export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'widgetByIdTmpl' | 'executeQueryByWidgetIdTmpl' | 'executeQueryTmpl' | 'executePivotQueryTmpl' | 'pivotTableWidgetTmpl';
114
+ export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'chartWidgetPropsTmpl' | 'widgetByIdTmpl' | 'executeQueryByWidgetIdTmpl' | 'executeQueryTmpl' | 'executePivotQueryTmpl' | 'pivotTableWidgetTmpl' | 'pivotTableWidgetPropsTmpl' | 'dashboardByIdTmpl' | 'dashboardTmpl';
112
115
  /**
113
116
  * Code Templates
114
117
  *
@@ -133,6 +136,7 @@ export type CodePlaceholderMap = Record<string, string>;
133
136
  export type BaseCodeConfig = {
134
137
  uiFramework?: UiFramework;
135
138
  };
139
+ /** TYPES FOR WIDGET CODE */
136
140
  /**
137
141
  * Widget Code Config
138
142
  *
@@ -178,24 +182,32 @@ export declare const isClientSideWidgetCodeParams: (params: WidgetCodeParams) =>
178
182
  */
179
183
  export declare const isByIdWidgetCodeParams: (params: WidgetCodeParams) => params is ByIdWidgetCodeParams;
180
184
  /**
185
+ * Widget Props Config
186
+ *
181
187
  * @internal
182
188
  */
183
189
  export type WidgetPropsConfig = {
184
190
  useCustomizedStyleOptions?: boolean;
185
191
  };
186
192
  /**
193
+ * Execute Query Code Params
194
+ *
187
195
  * @internal
188
196
  */
189
197
  export type ExecuteQueryCodeParams = BaseCodeConfig & {
190
198
  queryParams: ExecuteQueryParams;
191
199
  };
192
200
  /**
201
+ * Execute Pivot Query Code Params
202
+ *
193
203
  * @internal
194
204
  */
195
205
  export type ExecutePivotQueryCodeParams = BaseCodeConfig & {
196
206
  pivotQueryParams: ExecutePivotQueryParams;
197
207
  };
198
208
  /**
209
+ * Execute Query Code Props
210
+ *
199
211
  * @internal
200
212
  */
201
213
  export type ExecuteQueryCodeProps = Stringify<ExecuteQueryParams> & {
@@ -208,11 +220,73 @@ export type ExecutePivotQueryCodeProps = Stringify<ExecutePivotQueryParams> & {
208
220
  extraImportsString: string;
209
221
  };
210
222
  /**
223
+ * Chart Widget Code Props
224
+ *
225
+ * @internal
226
+ */
227
+ export type ChartWidgetCodeProps = Stringify<ChartWidgetProps> & ExtraWidgetCodeProps;
228
+ /**
229
+ * Pivot Table Widget Code Props
230
+ *
231
+ * @internal
232
+ */
233
+ export type PivotTableWidgetCodeProps = Stringify<PivotTableWidgetProps> & ExtraWidgetCodeProps;
234
+ /**
235
+ * Template Key by Widget Type
236
+ *
237
+ * @internal
238
+ */
239
+ export type TemplateKeyMapByWidgetType = {
240
+ chart: CodeTemplateKey;
241
+ pivot: CodeTemplateKey;
242
+ text?: CodeTemplateKey;
243
+ plugin?: CodeTemplateKey;
244
+ };
245
+ /** TYPE FOR DASHBOARD CODE */
246
+ /**
247
+ * Dashboard Code Config
248
+ *
249
+ * @internal
250
+ */
251
+ export type DashboardCodeConfig = BaseCodeConfig;
252
+ /**
253
+ * Client-side Dashboard Code Params
254
+ *
255
+ * @internal
256
+ */
257
+ export type ClientSideDashboardCodeParams = BaseCodeConfig & {
258
+ dashboardProps: DashboardProps;
259
+ };
260
+ /**
261
+ * By ID Dashboard Code Params
262
+ *
211
263
  * @internal
212
264
  */
213
- export type ChartWidgetCodeProps = Stringify<ChartWidgetProps> & ExtraCodeProps;
265
+ export type ByIdDashboardCodeParams = DashboardCodeConfig & {
266
+ dashboardOid: string;
267
+ };
214
268
  /**
269
+ * Dashboard Code Params
270
+ *
271
+ * @internal
272
+ */
273
+ export type DashboardCodeParams = ClientSideDashboardCodeParams | ByIdDashboardCodeParams;
274
+ /**
275
+ * Check if dashboard code params is for client-side code
276
+ *
277
+ * @internal
278
+ */
279
+ export declare const isClientSideDashboardCodeParams: (params: DashboardCodeParams) => params is ClientSideDashboardCodeParams;
280
+ /**
281
+ * Check if dashboard code params is for by ID code
282
+ *
283
+ * @internal
284
+ */
285
+ export declare const isByIdDashboardCodeParams: (params: DashboardCodeParams) => params is ByIdDashboardCodeParams;
286
+ /**
287
+ * Dashboard Code Props
288
+ *
215
289
  * @internal
216
290
  */
217
- export type PivotTableWidgetCodeProps = Stringify<PivotTableWidgetProps> & ExtraCodeProps;
291
+ export type DashboardCodeProps = Stringify<DashboardProps> & ExtraWidgetCodeProps;
218
292
  export {};
@@ -7,7 +7,7 @@ export declare const getChartRecommendationsOrDefault: (response: ExpandedQueryM
7
7
  */
8
8
  export declare const getTableOptions: (jaql: MetadataItem[]) => {
9
9
  dataOptions: {
10
- columns: import("@sisense/sdk-data").JaqlElement[];
10
+ columns: (import("@sisense/sdk-data").Attribute | import("@sisense/sdk-data").JaqlElement | import("@sisense/sdk-data").CalculatedMeasure | import("@sisense/sdk-data").BaseMeasure)[];
11
11
  };
12
12
  };
13
13
  /**
@@ -1,3 +1,5 @@
1
- import { ByIdWidgetCodeParams, ClientSideWidgetCodeParams } from '../types.js';
1
+ import { WidgetProps } from '../../props';
2
+ import { ByIdWidgetCodeParams, ClientSideWidgetCodeParams, UiFramework, TemplateKeyMapByWidgetType } from '../types.js';
2
3
  export declare const toWidgetCodeById: ({ dashboardOid, widgetOid, uiFramework, chartType, includeChart, }: ByIdWidgetCodeParams) => string;
4
+ export declare const getWidgetCode: (widgetProps: WidgetProps, uiFramework: UiFramework, templateKeyMap: TemplateKeyMapByWidgetType) => string;
3
5
  export declare const toWidgetCodeClientSide: ({ widgetProps, uiFramework, }: ClientSideWidgetCodeParams) => string;
@@ -5,7 +5,7 @@ import { PivotClient } from '@sisense/sdk-pivot-client';
5
5
  import { TrackingEventDetails } from '@sisense/sdk-tracking';
6
6
  import { DateConfig } from '../query/date-formats';
7
7
  import { AppSettings } from './settings/settings';
8
- import { CustomTranslationObject, LoadingIndicatorConfig } from '../types';
8
+ import { TranslationConfig, LoadingIndicatorConfig } from '../types';
9
9
  import { SisenseContextProviderProps } from '../props';
10
10
  /**
11
11
  * Application configuration
@@ -16,61 +16,9 @@ export type AppConfig = {
16
16
  */
17
17
  locale?: Locale;
18
18
  /**
19
- * Translation Configurations
20
- *
21
- * @internal
22
- */
23
- translationConfig?: {
24
- /**
25
- * Language code to be used for translations.
26
- *
27
- * @internal
28
- */
29
- language?: string;
30
- /**
31
- * Additional translation resources to be loaded.
32
- *
33
- * You can find the list of available translation keys in the translation folder of every package.
34
- *
35
- * Translation keys that are not provided will default to the English translation.
36
- * If translation is provided for a package other than sdk-ui, please specify the namespace property.
37
- *
38
- * Important: Do not translate parts in {{}} - these are placeholders for dynamic values and will be matched using provided variable names.
39
- *
40
- * @example
41
- * ```typescript
42
- * customTranslations: [
43
- * {
44
- * language: 'fr',
45
- * resources: {
46
- * errors: {
47
- * invalidFilterType: 'Type de filtre invalide',
48
- * },
49
- * },
50
- * },
51
- * {
52
- * language: 'es',
53
- * namespace: 'sdkData'
54
- * resources: {
55
- * errors: {
56
- * measure: {
57
- * unsupportedType: 'Tipo de medida no compatible',
58
- * },
59
- * },
60
- * },
61
- * },
62
- * ]
63
- * ```
64
- */
65
- customTranslations?: CustomTranslationObject[];
66
- };
67
- /**
68
- * Language code to be used for translations
69
- *
70
- * @internal
71
- * @deprecated Use `translationConfig.language` instead
19
+ * Translation Configuration
72
20
  */
73
- language?: string;
21
+ translationConfig?: TranslationConfig;
74
22
  /**
75
23
  * Date Configurations
76
24
  */
@@ -62,6 +62,5 @@ import { AreaRangeChartProps } from './props';
62
62
  * @param props - Area Range chart properties
63
63
  * @returns Area Range Chart component
64
64
  * @group Charts
65
- * @beta
66
65
  */
67
66
  export declare const AreaRangeChart: import("react").FunctionComponent<AreaRangeChartProps>;
@@ -4,5 +4,6 @@ export type MenuOptions = {
4
4
  itemSections: MenuItemSection[];
5
5
  onClose?: () => void;
6
6
  };
7
+ /** @internal */
7
8
  export type BeforeMenuOpenHandler = (options: MenuOptions) => MenuOptions | null;
8
9
  export type OpenMenuFn = (options: MenuOptions) => void;
@@ -71,17 +71,6 @@ export declare const addFilters: (dashboard: DashboardProps, newFilters: Filter[
71
71
  * @returns A new dashboard instance with the specified filter replaced.
72
72
  */
73
73
  export declare const replaceFilter: (dashboard: DashboardProps, filterToReplace: Filter, newFilter: Filter) => DashboardProps;
74
- /**
75
- * Creates a new dashboard instance with a specific filter modified.
76
- * Alias for `replaceFilter`.
77
- *
78
- * @deprecated Use {@link replaceFilter} instead
79
- * @param dashboard - The original dashboard (`DashboardProps`) containing the filter to modify.
80
- * @param filterToModify - The existing filter to be modified.
81
- * @param newFilter - The new filter to replace the existing one.
82
- * @returns A new dashboard instance with the specified filter modified.
83
- */
84
- export declare const modifyFilter: (dashboard: DashboardProps, filterToModify: Filter, newFilter: Filter) => DashboardProps;
85
74
  /**
86
75
  * Creates a new dashboard instance with a specific filter removed.
87
76
  *
@@ -1,5 +1,5 @@
1
1
  export { DashboardById } from './dashboard-by-id';
2
2
  export { Dashboard } from './dashboard';
3
- export { useComposedDashboard, type ComposableDashboardProps, type UseComposedDashboardOptions, } from './use-composed-dashboard';
3
+ export { useComposedDashboard, useComposedDashboardInternal, type ComposableDashboardProps, type UseComposedDashboardOptions, } from './use-composed-dashboard';
4
4
  export { useDashboardTheme, type DashboardThemeParams } from './use-dashboard-theme';
5
5
  export type { DashboardByIdProps, DashboardProps, DashboardLayoutOptions, DashboardStyleOptions, DashboardConfig, DashboardByIdConfig, DashboardFiltersPanelConfig, } from './types';
@@ -100,9 +100,7 @@ export interface DashboardByIdConfig extends DashboardConfig {
100
100
  *
101
101
  * Limitations:
102
102
  * - WAT authentication does not support persistence.
103
- * - As an alpha feature, currently only changes to dashboard filters are persisted.
104
- *
105
- * @alpha
103
+ * - Currently only changes to dashboard filters are persisted.
106
104
  */
107
105
  persist?: boolean;
108
106
  }
@@ -120,6 +118,12 @@ export interface DashboardLayoutOptions {
120
118
  * Props for the Dashboard component
121
119
  */
122
120
  export interface DashboardProps {
121
+ /**
122
+ * Optional identifer of the dashboard
123
+ *
124
+ * @internal
125
+ */
126
+ id?: string;
123
127
  /** The title of the dashboard */
124
128
  title?: string;
125
129
  /**
@@ -1,4 +1,4 @@
1
- import { DashboardLayoutOptions, DashboardProps } from './types.js';
1
+ import { DashboardProps } from './types.js';
2
2
  import { Filter, FilterRelations } from '@sisense/sdk-data';
3
3
  import { WidgetsPanelLayout } from '../models';
4
4
  export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | 'tabbersOptions'>;
@@ -18,18 +18,15 @@ export declare function useComposedDashboardInternal<D extends ComposableDashboa
18
18
  dashboard: D;
19
19
  setFilters: (filters: Filter[] | FilterRelations) => void;
20
20
  setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
21
- layoutOptions: DashboardLayoutOptions;
22
21
  };
23
22
  /**
24
23
  * React hook that takes in separate dashboard elements and
25
24
  * composes them into a coordinated dashboard with change detection, cross filtering, and drill down.
26
25
  *
27
26
  * @group Dashboards
28
- * @alpha
29
27
  */
30
28
  export declare const useComposedDashboard: <D extends DashboardProps | ComposableDashboardProps>(args_0: D, args_1?: UseComposedDashboardOptions | undefined) => {
31
29
  dashboard: D;
32
30
  setFilters: (filters: Filter[] | FilterRelations) => void;
33
31
  setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
34
- layoutOptions: DashboardLayoutOptions;
35
32
  };
@@ -1,2 +1 @@
1
1
  export { CriteriaFilterTile, type CriteriaFilterTileProps } from './criteria-filter-tile';
2
- export type { CriteriaFilterType } from './types';
@@ -23,6 +23,5 @@ export interface FilterTileProps {
23
23
  *
24
24
  * @group Filter Tiles
25
25
  * @shortDescription Facade component rendering a filter tile based on filter type
26
- * @beta
27
26
  */
28
27
  export declare const FilterTile: React.FC<FilterTileProps>;
@@ -17,7 +17,10 @@
17
17
  * @groupDescription Fusion Assets
18
18
  * React components, hooks, and utilities for working with Fusion dashboards, widgets, queries, and formulas
19
19
  * @groupDescription Generative AI
20
- * React components and hooks for creating experiences using generative AI
20
+ * React components and hooks for working with Generative AI features provided by Sisense Fusion
21
+ * ::: tip Note
22
+ * For more information on requirements for enabling Generative AI features, please refer to the [Generative AI documentation](https://docs.sisense.com/main/SisenseLinux/genai.htm)
23
+ * :::
21
24
  * @groupDescription Interfaces
22
25
  * TypeScript interfaces for components and hooks listed above
23
26
  * @groupDescription Type Aliases