@sisense/sdk-ui 1.22.0 → 1.23.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 (80) hide show
  1. package/dist/ai.cjs +54 -46
  2. package/dist/ai.js +756 -685
  3. package/dist/analytics-composer.cjs +89 -148
  4. package/dist/analytics-composer.js +1196 -1479
  5. package/dist/{get-widget-options-DTIulxC2.js → derive-chart-family-CTpRObm1.js} +8710 -8846
  6. package/dist/{get-widget-options-DixoCEhn.cjs → derive-chart-family-DcALKnKU.cjs} +83 -83
  7. package/dist/index.cjs +114 -114
  8. package/dist/index.js +6658 -6501
  9. package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +1 -1
  10. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +3 -23
  11. package/dist/packages/sdk-ui/src/ai/chart/chart-insights.d.ts +5 -0
  12. package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +41 -0
  13. package/dist/packages/sdk-ui/src/ai/icons/ai-icon.d.ts +2 -0
  14. package/dist/packages/sdk-ui/src/ai/index.d.ts +2 -3
  15. package/dist/packages/sdk-ui/src/ai/messages/chart-message.d.ts +1 -2
  16. package/dist/packages/sdk-ui/src/ai/use-get-data-source-fields.d.ts +1 -1
  17. package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/code-templates.d.ts +1 -1
  18. package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/generate-code.d.ts +3 -3
  19. package/dist/packages/sdk-ui/src/analytics-composer/{translators → common}/utils.d.ts +1 -1
  20. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +12 -1
  21. package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-translator.d.ts +2 -3
  23. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +149 -0
  24. package/dist/packages/sdk-ui/src/{ai/messages → analytics-composer/widget/chart-options}/get-widget-options.d.ts +5 -14
  25. package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-filters.d.ts +2 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -0
  27. package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-props.d.ts +3 -0
  28. package/dist/packages/sdk-ui/src/analytics-composer/widget/widget-composer.d.ts +15 -0
  29. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +1 -1
  31. package/dist/packages/sdk-ui/src/app/client-application.d.ts +7 -7
  32. package/dist/packages/sdk-ui/src/app/settings/types/user.d.ts +0 -1
  33. package/dist/packages/sdk-ui/src/chart/helpers/derive-chart-family.d.ts +8 -0
  34. package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +1 -0
  35. package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
  36. package/dist/packages/sdk-ui/src/filters/components/common/member-radio.d.ts +8 -0
  37. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-list.d.ts +1 -0
  38. package/dist/packages/sdk-ui/src/index.d.ts +12 -7
  39. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +2 -2
  40. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -1
  41. package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-model.d.ts +2 -2
  42. package/dist/packages/sdk-ui/src/models/hierarchy/hierarchy-model-translator.d.ts +1 -1
  43. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +1 -1
  44. package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -1
  45. package/dist/packages/sdk-ui/src/props.d.ts +18 -14
  46. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +1 -3
  48. package/dist/packages/sdk-ui/src/sisense-context/sisense-context.d.ts +3 -0
  49. package/dist/packages/sdk-ui/src/translation/i18n-provider.d.ts +3 -1
  50. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +17 -2
  51. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +12 -4
  52. package/dist/packages/sdk-ui/src/types.d.ts +12 -5
  53. package/dist/packages/sdk-ui/src/utils/filters.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/dashboard-widget.d.ts +2 -1
  55. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +4800 -0
  56. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-panel-color-format.d.ts +3 -3
  57. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-data-options.d.ts +3 -3
  58. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-drilldown-options.d.ts +2 -2
  59. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-filters.d.ts +85 -83
  60. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/types.d.ts +1 -1
  61. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/use-fetch-widget-dto-model.d.ts +3 -3
  62. package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/utils.d.ts +5 -13
  63. package/dist/packages/sdk-ui/src/widget-by-id/widget-by-id.d.ts +26 -0
  64. package/dist/packages/sdk-ui/src/widgets/common/use-drilldown-core.d.ts +7 -0
  65. package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +2 -0
  66. package/dist/{table-widget-CLL1iN3H.js → useQuery-1xZMqnAI.js} +34186 -34195
  67. package/dist/{table-widget-CYCcYqzZ.cjs → useQuery-D9rZ58KS.cjs} +140 -140
  68. package/dist/widget-composer-B17DVa2A.cjs +101 -0
  69. package/dist/widget-composer-DqjH_6dw.js +448 -0
  70. package/package.json +7 -7
  71. package/dist/packages/sdk-ui/src/ai/messages/jaql-element.d.ts +0 -28
  72. package/dist/packages/sdk-ui/src/analytics-composer/translators/index.d.ts +0 -3
  73. package/dist/packages/sdk-ui/src/analytics-composer/translators/model-translator.d.ts +0 -48
  74. package/dist/packages/sdk-ui/src/analytics-composer/translators/translate-filters-to-code.d.ts +0 -2
  75. package/dist/packages/sdk-ui/src/analytics-composer/translators/types.d.ts +0 -95
  76. package/dist/packages/sdk-ui/src/dashboard-widget/translate-dashboard-filters.d.ts +0 -4798
  77. package/dist/packages/sdk-ui/src/translation/custom-translations-loader.d.ts +0 -10
  78. /package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-templates.d.ts +0 -0
  79. /package/dist/packages/sdk-ui/src/analytics-composer/{translators/translate-props-to-code.d.ts → widget/stringify-props.d.ts} +0 -0
  80. /package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-style-options.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import type { Chat, ChatRequest, ChatResponse, ChatWithoutHistory, ChatContext, GetNlgQueryResultRequest, GetNlgQueryResultResponse, LlmConfig, QueryRecommendationConfig, QueryRecommendationResponse, SendFeedbackRequest } from './types';
3
- import { DataSourceField } from '@sisense/sdk-query-client';
3
+ import { DataSourceField } from '@sisense/sdk-data';
4
4
  export declare class ChatRestApi {
5
5
  private httpClient;
6
6
  constructor(httpClient: HttpClient);
@@ -1,5 +1,5 @@
1
- import { JaqlQueryPayload, MetadataItem } from '@sisense/sdk-query-client';
2
- import { ChartDataOptions } from '../../types';
1
+ import { JaqlQueryPayload } from '@sisense/sdk-query-client';
2
+ import { ExpandedQueryModel } from '../../analytics-composer';
3
3
  export interface ChatContext {
4
4
  title: string;
5
5
  live: boolean;
@@ -54,30 +54,10 @@ interface ErrorResponse {
54
54
  };
55
55
  responseType: 'error';
56
56
  }
57
- export type KeysOfUnion<T> = T extends T ? keyof T : never;
58
- export type AllPossibleChartOptionKeys = KeysOfUnion<ChartDataOptions>;
59
- export type AxesMappingKey = Exclude<AllPossibleChartOptionKeys, 'seriesToColorMap'>;
60
- export type AxesMapping = Partial<Record<AxesMappingKey, Array<{
61
- name: string;
62
- type?: string;
63
- }>>>;
64
- export interface ChartRecommendations {
65
- chartFamily: string;
66
- chartType: string;
67
- axesMapping: AxesMapping;
68
- }
69
- export interface NlqResponseData {
57
+ export interface NlqResponseData extends ExpandedQueryModel {
70
58
  detailedDescription: string;
71
59
  followupQuestions: string[];
72
60
  nlqPrompt: string;
73
- chartRecommendations: ChartRecommendations | {};
74
- jaql: {
75
- datasource: {
76
- title: string;
77
- };
78
- metadata: MetadataItem[];
79
- };
80
- queryTitle: string;
81
61
  }
82
62
  export interface NlqResponse {
83
63
  data: NlqResponseData;
@@ -0,0 +1,5 @@
1
+ import { GetNlgQueryResultRequest } from '../../ai';
2
+ export interface ChartInsightsProps {
3
+ nlgRequest: GetNlgQueryResultRequest;
4
+ }
5
+ export declare const ChartInsights: ({ nlgRequest }: ChartInsightsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { Filter } from '@sisense/sdk-data';
2
+ import type { NlqResponseData } from '../../ai';
3
+ /**
4
+ * Props for {@link NlqChartWidget} component.
5
+ *
6
+ * @group Generative AI
7
+ * @internal
8
+ */
9
+ export interface NlqChartWidgetProps {
10
+ /**
11
+ * Chatbot NLQ Response
12
+ */
13
+ nlqResponse: NlqResponseData;
14
+ /**
15
+ * The dashboard filters to be applied to the chart
16
+ */
17
+ filters?: Filter[];
18
+ }
19
+ /**
20
+ * React component that renders a chart widget based on NLQ response data.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * import { NlqChartWidget, NlqResponseData } from '@sisense/sdk-ui/ai';
25
+ * import { Filter } from '@sisense/sdk-data';
26
+ *
27
+ * function ExampleComponent(nlqResponse: NlqResponseData, filters?: Filter[]) {
28
+ *
29
+ * return (
30
+ * <ChartWidgetWithInsights
31
+ * nlqResponse={nlqResponse}
32
+ * filters={filters}
33
+ * />
34
+ * );
35
+ * }
36
+ * ```
37
+ * @param props - {@link NlqChartWidgetProps}
38
+ * @group Generative AI
39
+ * @internal
40
+ */
41
+ export declare const NlqChartWidget: ({ nlqResponse, filters }: NlqChartWidgetProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { Themable } from '../../theme-provider/types';
2
+ export default function AiIcon({ theme }: Themable): import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,7 @@ export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type
5
5
  export { useChatSession, type UseChatSessionResult } from './use-chat-session';
6
6
  export { useLastNlqResponse } from './use-last-nlq-response';
7
7
  export { useGetDataSourceFields } from './use-get-data-source-fields';
8
- export type { GetNlgQueryResultRequest, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, ChartRecommendations, AxesMapping, AxesMappingKey, AllPossibleChartOptionKeys, KeysOfUnion, } from './api/types';
8
+ export type { GetNlgQueryResultRequest, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, } from './api/types';
9
9
  export { Chatbot, type ChatbotProps } from './chatbot';
10
10
  export { default as GetNlgQueryResult, type GetNlgQueryResultProps } from './get-nlg-query-result';
11
- export { getChartOptions, getTableOptions, deriveChartFamily } from './messages/get-widget-options';
12
- export { JaqlElement } from './messages/jaql-element';
11
+ export { NlqChartWidget, type NlqChartWidgetProps } from './chart/nlq-chart-widget';
@@ -1,7 +1,6 @@
1
1
  import { NlqResponseData } from '../api/types';
2
2
  type ChartMessageProps = {
3
3
  content: NlqResponseData;
4
- dataSource: string;
5
4
  };
6
- export default function ChartMessage({ content, dataSource }: ChartMessageProps): import("react/jsx-runtime").JSX.Element;
5
+ export default function ChartMessage({ content }: ChartMessageProps): import("react/jsx-runtime").JSX.Element;
7
6
  export {};
@@ -7,6 +7,6 @@
7
7
  * @internal
8
8
  */
9
9
  export declare const useGetDataSourceFields: (dataSource: string | undefined) => {
10
- data: import("@sisense/sdk-query-client").DataSourceField[] | undefined;
10
+ data: import("@sisense/sdk-data").DataSourceField[] | undefined;
11
11
  isLoading: boolean;
12
12
  };
@@ -1,4 +1,4 @@
1
- import { CodeTemplates } from './types';
1
+ import { CodeTemplates } from '../types.js';
2
2
  /**
3
3
  * Code templates for different UI frameworks.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { CodeTemplateKey, UiFramework } from './types';
1
+ import { CodePlaceholderMap, CodeTemplateKey, UiFramework } from '../types.js';
2
2
  /**
3
3
  * Populates placeholders in the given template with the given data.
4
4
  * If a placeholder is not found in the data, a warning is logged.
@@ -12,7 +12,7 @@ export declare const populatePlaceholders: (template: string, data: Record<strin
12
12
  * Generates code from a template with the given data and UI framework.
13
13
  *
14
14
  * @param templateKey - the key of the template to use
15
- * @param data - the data to populate the template with
15
+ * @param placeholderMap - the data to populate the template with
16
16
  * @param uiFramework - the UI framework for the generated code
17
17
  */
18
- export declare const generateCode: (templateKey: CodeTemplateKey, data: Record<string, string>, uiFramework?: UiFramework) => string;
18
+ export declare const generateCode: (templateKey: CodeTemplateKey, placeholderMap: CodePlaceholderMap, uiFramework?: UiFramework) => string;
@@ -1,4 +1,4 @@
1
- import { ExpandedQueryModel, SimpleQueryModel } from './types';
1
+ import { ExpandedQueryModel, SimpleQueryModel } from '../types.js';
2
2
  export declare function toKebabCase(str: string): string;
3
3
  export declare function capitalizeFirstLetter(str: string): string;
4
4
  /**
@@ -1 +1,12 @@
1
- export * from './translators';
1
+ export * from './types';
2
+ export * from './query';
3
+ /**
4
+ * Utility functions to compose props and code for widgets.
5
+ * @internal
6
+ */
7
+ export * as widgetComposer from './widget/widget-composer';
8
+ /**
9
+ * Utility functions to compose props and code for dashboards.
10
+ * @internal
11
+ */
12
+ export * as dashboardComposer from './dashboard/dashboard-composer';
@@ -0,0 +1 @@
1
+ export { QueryTranslator } from './query-translator.js';
@@ -1,6 +1,5 @@
1
- import { ExpandedQueryModel, SimpleQueryModel, SimpleChartRecommendations } from './types.js';
2
- import { DataSourceField, MetadataItem, MetadataItemJaql } from '@sisense/sdk-query-client';
3
- import { ChartRecommendations } from '../../ai';
1
+ import { ExpandedQueryModel, SimpleQueryModel, SimpleChartRecommendations, ChartRecommendations } from '../types.js';
2
+ import { MetadataItem, MetadataItemJaql, DataSourceField } from '@sisense/sdk-data';
4
3
  /**
5
4
  * A class that translates ExpandedQueryModel (Raw JAQL+Chart Recommendations)
6
5
  * to SimpleQueryModel (Simple JAQL+Simple Chart Options) and vice versa.
@@ -0,0 +1,149 @@
1
+ import { WidgetProps } from '../props';
2
+ import { ChartDataOptions } from '../types';
3
+ import { MetadataItem } from '@sisense/sdk-data';
4
+ export type KeysOfUnion<T> = T extends T ? keyof T : never;
5
+ export type AllPossibleChartOptionKeys = KeysOfUnion<ChartDataOptions>;
6
+ export type AxesMappingKey = Exclude<AllPossibleChartOptionKeys, 'seriesToColorMap'>;
7
+ export type AxesMapping = Partial<Record<AxesMappingKey, Array<{
8
+ name: string;
9
+ type?: string;
10
+ }>>>;
11
+ export interface ChartRecommendations {
12
+ chartFamily: string;
13
+ chartType: string;
14
+ axesMapping: AxesMapping;
15
+ }
16
+ /**
17
+ * Expanded Query Model that is based on NlqResponseData.
18
+ * It contains expanded JAQL and chart recommendations returned from the chat response.
19
+ * @internal
20
+ */
21
+ export interface ExpandedQueryModel {
22
+ chartRecommendations: ChartRecommendations | {};
23
+ jaql: {
24
+ datasource: {
25
+ title: string;
26
+ };
27
+ metadata: MetadataItem[];
28
+ };
29
+ queryTitle: string;
30
+ }
31
+ /**
32
+ * Empty Expanded Query Model
33
+ *
34
+ * Used as a default value for ExpandedQueryModel
35
+ * @internal
36
+ */
37
+ export declare const EMPTY_EXPANDED_QUERY_MODEL: ExpandedQueryModel;
38
+ /**
39
+ * Simple Chart Recommendations
40
+ * @internal
41
+ */
42
+ export interface SimpleChartRecommendations {
43
+ chartType: string;
44
+ dataOptions: AxesMapping;
45
+ }
46
+ /**
47
+ * Simple Query Model that is a simplified version of ExpandedQueryModel.
48
+ *
49
+ * It removes any JAQL syntax or information that already exists in the schema.
50
+ * Also, any parameters that have a default do not need to be specified.
51
+ *
52
+ * Users manipulates this model via the query in YAML format.
53
+ *
54
+ * QueryTranslator is responsible for translating this query model to ExpandedWidgetModel.
55
+ * @internal
56
+ */
57
+ export interface SimpleQueryModel {
58
+ /**
59
+ * The data model or perspective title.
60
+ */
61
+ model: string;
62
+ metadata: MetadataItem[];
63
+ chart: SimpleChartRecommendations | {};
64
+ /**
65
+ * Title of the query
66
+ */
67
+ queryTitle: string;
68
+ }
69
+ /**
70
+ * Empty Simple Query Model
71
+ *
72
+ * Used as a default value for SimpleQueryModel
73
+ * @internal
74
+ */
75
+ export declare const EMPTY_SIMPLE_QUERY_MODEL: SimpleQueryModel;
76
+ /**
77
+ * UI Framework
78
+ * @internal
79
+ */
80
+ export type UiFramework = 'react' | 'vue' | 'angular';
81
+ /**
82
+ * Code Template Key
83
+ * @internal
84
+ */
85
+ export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'widgetByIdTmpl';
86
+ /**
87
+ * Code Templates
88
+ * @internal
89
+ */
90
+ export type CodeTemplates = {
91
+ [key in UiFramework]: {
92
+ [key in CodeTemplateKey]: string;
93
+ };
94
+ };
95
+ /**
96
+ * Code Placeholder Map
97
+ * @internal
98
+ */
99
+ export type CodePlaceholderMap = Record<string, string>;
100
+ /**
101
+ * Base Code Config
102
+ * @internal
103
+ */
104
+ export type BaseCodeConfig = {
105
+ uiFramework?: UiFramework;
106
+ };
107
+ /**
108
+ * Widget Code Config
109
+ * @internal
110
+ */
111
+ export type WidgetCodeConfig = BaseCodeConfig & {
112
+ includeChart?: boolean;
113
+ };
114
+ /**
115
+ * Client-side Widget Code Params
116
+ * @internal
117
+ */
118
+ export type ClientSideWidgetCodeParams = WidgetCodeConfig & {
119
+ widgetProps: WidgetProps;
120
+ };
121
+ /**
122
+ * By ID Widget Code Params
123
+ * @internal
124
+ */
125
+ export type ByIdWidgetCodeParams = WidgetCodeConfig & {
126
+ dashboardOid: string;
127
+ widgetOid: string;
128
+ };
129
+ /**
130
+ * Widget Code Params
131
+ * @internal
132
+ */
133
+ export type WidgetCodeParams = ClientSideWidgetCodeParams | ByIdWidgetCodeParams;
134
+ /**
135
+ * Check if widget code params is for client-side code
136
+ * @internal
137
+ */
138
+ export declare const isClientSideWidgetCodeParams: (params: WidgetCodeParams) => params is ClientSideWidgetCodeParams;
139
+ /**
140
+ * Check if widget code params is for by ID code
141
+ * @internal
142
+ */
143
+ export declare const isByIdWidgetCodeParams: (params: WidgetCodeParams) => params is ByIdWidgetCodeParams;
144
+ /**
145
+ * @internal
146
+ **/
147
+ export type WidgetPropsConfig = {
148
+ useCustomizedStyleOptions?: boolean;
149
+ };
@@ -1,13 +1,13 @@
1
- import { MetadataItem } from '@sisense/sdk-query-client';
2
- import { ChartDataOptions, ChartStyleOptions } from '../../types';
3
- import { ChartRecommendations, NlqResponseData } from '../api/types';
4
- export declare const getChartRecommendationsOrDefault: (response: NlqResponseData) => ChartRecommendations;
1
+ import { ChartDataOptions, ChartStyleOptions } from '../../../types';
2
+ import { MetadataItem } from '@sisense/sdk-data';
3
+ import { ChartRecommendations, ExpandedQueryModel } from '../../../analytics-composer/types';
4
+ export declare const getChartRecommendationsOrDefault: (response: ExpandedQueryModel) => ChartRecommendations;
5
5
  /**
6
6
  * @internal
7
7
  */
8
8
  export declare const getTableOptions: (jaql: MetadataItem[]) => {
9
9
  dataOptions: {
10
- columns: import("./jaql-element").JaqlElement[];
10
+ columns: import("@sisense/sdk-data").JaqlElement[];
11
11
  };
12
12
  };
13
13
  /**
@@ -21,13 +21,4 @@ export declare const getTableOptions: (jaql: MetadataItem[]) => {
21
21
  export declare const getChartOptions: (jaql: MetadataItem[], chartRecommendations: ChartRecommendations, useCustomizedStyleOptions?: boolean) => {
22
22
  dataOptions: ChartDataOptions;
23
23
  chartStyleOptions: ChartStyleOptions;
24
- expandedChartStyleOptions: ChartStyleOptions;
25
24
  };
26
- /**
27
- * Derives chart family from chart type.
28
- *
29
- * @param chartType - chart type
30
- * @returns chart family
31
- * @internal
32
- */
33
- export declare const deriveChartFamily: (chartType: string) => string;
@@ -0,0 +1,2 @@
1
+ import { Filter, FilterRelations } from '@sisense/sdk-data';
2
+ export declare const stringifyFilters: (filters: Filter[] | FilterRelations | undefined) => string;
@@ -0,0 +1,3 @@
1
+ import { ByIdWidgetCodeParams, ClientSideWidgetCodeParams } from '../types.js';
2
+ export declare const toWidgetCodeById: ({ dashboardOid, widgetOid, uiFramework, }: ByIdWidgetCodeParams) => string;
3
+ export declare const toWidgetCodeClientSide: ({ widgetProps, uiFramework, }: ClientSideWidgetCodeParams) => string;
@@ -0,0 +1,3 @@
1
+ import { WidgetProps } from '../../index.js';
2
+ import { ExpandedQueryModel, WidgetPropsConfig } from '../types.js';
3
+ export declare const toWidgetPropsFromQuery: (queryModel: ExpandedQueryModel, config?: WidgetPropsConfig) => WidgetProps | undefined;
@@ -0,0 +1,15 @@
1
+ import { WidgetProps } from '../../props.js';
2
+ import { ExpandedQueryModel, WidgetCodeParams, WidgetPropsConfig } from '../types.js';
3
+ /**
4
+ * Converts query model to widget props.
5
+ * @param queryModel - Expanded query model
6
+ * @returns Widget props
7
+ */
8
+ export declare const toWidgetProps: (queryModel: ExpandedQueryModel, config?: WidgetPropsConfig) => WidgetProps | undefined;
9
+ /**
10
+ * Converts widget props to CSDK code.
11
+ *
12
+ * @param widgetCodeParams - Widget code params
13
+ * @returns CSDK code string
14
+ */
15
+ export declare const toWidgetCode: (widgetCodeParams: WidgetCodeParams) => string;
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
3
3
  import { type DataSource } from '@sisense/sdk-data';
4
- import { HierarchyDto, WidgetDto } from '../dashboard-widget/types';
4
+ import { HierarchyDto, WidgetDto } from '../widget-by-id/types';
5
5
  import type { DashboardDto } from './types/dashboard-dto';
6
6
  import { PaletteDto } from '../api/types/palette-dto';
7
7
  import { GetHierarchiesOptions } from '../models/hierarchy/types';
@@ -1,4 +1,4 @@
1
- import { WidgetDto } from '../../dashboard-widget/types';
1
+ import { WidgetDto } from '../../widget-by-id/types';
2
2
  import { FilterJaql, FilterRelationsModel, JaqlDataSource } from '@sisense/sdk-data';
3
3
  import { AnyObject } from '../../utils/utility-types';
4
4
  /** @internal */
@@ -1,11 +1,11 @@
1
1
  import { HttpClient } from '@sisense/sdk-rest-client';
2
2
  import { QueryClient } from '@sisense/sdk-query-client';
3
3
  import { DataSource } from '@sisense/sdk-data';
4
+ import { PivotClient } from '@sisense/sdk-pivot-client';
5
+ import { TrackingEventDetails } from '@sisense/sdk-tracking';
4
6
  import { DateConfig } from '../query/date-formats';
5
7
  import { AppSettings } from './settings/settings';
6
- import { PivotClient } from '@sisense/sdk-pivot-client';
7
8
  import { CustomTranslationObject, LoadingIndicatorConfig } from '../types';
8
- import { TrackingEventDetails } from '@sisense/sdk-tracking';
9
9
  import { SisenseContextProviderProps } from '../props';
10
10
  /**
11
11
  * Application configuration
@@ -22,18 +22,18 @@ export type AppConfig = {
22
22
  */
23
23
  translationConfig?: {
24
24
  /**
25
- * Language code to be used for translations
25
+ * Language code to be used for translations.
26
26
  *
27
27
  * @internal
28
28
  */
29
29
  language?: string;
30
30
  /**
31
- * Additional translation resources to be loaded
31
+ * Additional translation resources to be loaded.
32
32
  *
33
33
  * You can find the list of available translation keys in the translation folder of every package.
34
34
  *
35
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 packageName property using camelCase.
36
+ * If translation is provided for a package other than sdk-ui, please specify the namespace property.
37
37
  *
38
38
  * Important: Do not translate parts in {{}} - these are placeholders for dynamic values and will be matched using provided variable names.
39
39
  *
@@ -50,7 +50,7 @@ export type AppConfig = {
50
50
  * },
51
51
  * {
52
52
  * language: 'es',
53
- * packageName: 'sdkData'
53
+ * namespace: 'sdkData'
54
54
  * resources: {
55
55
  * errors: {
56
56
  * measure: {
@@ -184,5 +184,5 @@ export interface ClientApplication {
184
184
  }
185
185
  type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth'>;
186
186
  /** @internal */
187
- export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
187
+ export declare const createClientApplication: ({ defaultDataSource, url: rawUrl, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
188
188
  export {};
@@ -15,7 +15,6 @@ export type User = {
15
15
  manifest: Record<string, unknown>;
16
16
  tenantId: string;
17
17
  groups: string[];
18
- internalGroups: string[];
19
18
  default: boolean;
20
19
  email: string;
21
20
  firstName: string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Derives chart family from chart type.
3
+ *
4
+ * @param chartType - chart type
5
+ * @returns chart family
6
+ * @internal
7
+ */
8
+ export declare const deriveChartFamily: (chartType: string) => string;
@@ -36,6 +36,7 @@ export declare const splitColumn: <C extends AnyColumn>(targetColumn: C) => {
36
36
  export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn;
37
37
  export declare const getDataOptionTitle: ({ column }: StyledColumn | StyledMeasureColumn) => string;
38
38
  export declare const getDataOptionGranularity: ({ column, granularity }: StyledColumn) => string;
39
+ /** @internal */
39
40
  export declare const translateColumnToAttribute: (c: Column | StyledColumn) => Attribute;
40
41
  export declare const translateColumnToMeasure: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Measure;
41
42
  /**
@@ -2,6 +2,7 @@ import { MenuPosition, MenuItemSection } from '../../../types';
2
2
  export type MenuOptions = {
3
3
  position: MenuPosition;
4
4
  itemSections: MenuItemSection[];
5
+ onClose?: () => void;
5
6
  };
6
7
  export type BeforeMenuOpenHandler = (options: MenuOptions) => MenuOptions | null;
7
8
  export type OpenMenuFn = (options: MenuOptions) => void;
@@ -0,0 +1,8 @@
1
+ import { type FunctionComponent, type InputHTMLAttributes } from 'react';
2
+ type MemberRadioProps = {
3
+ label?: string;
4
+ isLabelInactive?: boolean;
5
+ wrapperClassName?: string;
6
+ } & InputHTMLAttributes<HTMLInputElement>;
7
+ export declare const MemberRadio: FunctionComponent<MemberRadioProps>;
8
+ export {};
@@ -7,6 +7,7 @@ export interface MemberListProps {
7
7
  checkAllMembers: () => void;
8
8
  uncheckAllMembers: () => void;
9
9
  excludeMembers: boolean;
10
+ multiSelection: boolean;
10
11
  disabled: boolean;
11
12
  }
12
13
  export declare const MemberList: FunctionComponent<MemberListProps>;
@@ -3,9 +3,9 @@ export * from './chart-data-options/types';
3
3
  export { Chart } from './chart';
4
4
  export { ThemeProvider } from './theme-provider';
5
5
  export * from './dashboard';
6
- export { DashboardWidget } from './dashboard-widget/dashboard-widget';
7
- export { getSortType } from './dashboard-widget/utils';
8
- export { type WidgetType, type CartesianWidgetType, type CategoricalWidgetType, type TabularWidgetType, type TextWidgetType, } from './dashboard-widget/types';
6
+ export { DashboardWidget } from './widget-by-id/dashboard-widget';
7
+ export { WidgetById } from './widget-by-id/widget-by-id';
8
+ export { type WidgetType, type CartesianWidgetType, type CategoricalWidgetType, type TabularWidgetType, type TextWidgetType, } from './widget-by-id/types';
9
9
  export * from './query-execution';
10
10
  export { executeQuery } from './query/execute-query';
11
11
  export { SisenseContextProvider } from './sisense-context/sisense-context-provider';
@@ -67,7 +67,7 @@ export * as dashboardModelTranslator from './models/dashboard/dashboard-model-tr
67
67
  * @shortDescription Utility functions to manipulate dashboard elements
68
68
  */
69
69
  export * as dashboardHelpers from './dashboard/dashboard-helpers';
70
- export type { AutoZoomNavigatorScrollerLocation } from './dashboard-widget/types';
70
+ export type { AutoZoomNavigatorScrollerLocation } from './widget-by-id/types';
71
71
  export { boxWhiskerProcessResult } from './boxplot-utils';
72
72
  export { queryStateReducer } from './query-execution/query-state-reducer';
73
73
  export * from './props';
@@ -76,12 +76,17 @@ export * from './filters';
76
76
  export * from './formulas';
77
77
  export { trackHook } from './decorators/hook-decorators';
78
78
  export * from './common/hooks/data-load-state-reducer';
79
- export { createDataOptionsFromPanels } from './dashboard-widget/translate-widget-data-options';
79
+ export { createDataOptionsFromPanels } from './widget-by-id/translate-widget-data-options';
80
80
  export { type DashboardDto } from './api/types/dashboard-dto';
81
- export { type WidgetDto } from './dashboard-widget/types';
82
- export { extractCombinedFilters } from './dashboard-widget/translate-dashboard-filters';
81
+ export { type WidgetDto } from './widget-by-id/types';
82
+ export { extractCombinedFilters } from './widget-by-id/translate-dashboard-filters';
83
83
  export { useThemeContext } from './theme-provider';
84
84
  export { LoadingIndicator } from './common/components/loading-indicator';
85
85
  export { LoadingOverlay } from './common/components/loading-overlay';
86
86
  export { useFetch, type RequestConfig, type UseQueryResult } from './common/hooks/use-fetch';
87
87
  export type { EmptyObject } from './utils/utility-types';
88
+ export { translateColumnToAttribute } from './chart-data-options/utils';
89
+ export { isSameAttribute } from './utils/filters';
90
+ export { updateDrilldownSelections } from './widgets/common/use-drilldown-core';
91
+ export { getSelectionTitleMenuItem, getDrilldownMenuItems } from './widgets/hooks/use-drilldown';
92
+ export { type TranslationDictionary, PACKAGE_NAMESPACE as translationNamespace, } from './translation/resources';
@@ -1,5 +1,5 @@
1
1
  import { Filter } from '@sisense/sdk-data';
2
- import { FilterDto } from '../../api/types/dashboard-dto';
2
+ import { CascadingFilterDto, FilterDto } from '../../api/types/dashboard-dto';
3
3
  /**
4
4
  * Translates a {@link Filter} to a {@link FilterDto}.
5
5
  * @param filter
@@ -8,4 +8,4 @@ import { FilterDto } from '../../api/types/dashboard-dto';
8
8
  *
9
9
  * @internal
10
10
  */
11
- export declare function filterToFilterDto(filter: Filter): FilterDto;
11
+ export declare function filterToFilterDto(filter: Filter): FilterDto | CascadingFilterDto;
@@ -1,7 +1,7 @@
1
1
  import { type LayoutDto, type FilterDto, type CascadingFilterDto } from '../../api/types/dashboard-dto';
2
2
  import type { WidgetsPanelColumnLayout, WidgetsOptions } from './types';
3
3
  import { Filter } from '@sisense/sdk-data';
4
- import { WidgetDto } from '../../dashboard-widget/types';
4
+ import { WidgetDto } from '../../widget-by-id/types';
5
5
  export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
6
6
  export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>): Filter[];
7
7
  export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
@@ -72,7 +72,7 @@ export type DashboardModelSuccessState = {
72
72
  * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
73
73
  *
74
74
  * @example
75
- * An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `DashboardWidget`:
75
+ * An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `WidgetById`:
76
76
  ```tsx
77
77
  const { dashboard, isLoading, isError } = useGetDashboardModel({
78
78
  dashboardOid: '6448665edac1920034bce7a8',
@@ -89,7 +89,7 @@ export type DashboardModelSuccessState = {
89
89
  <div>
90
90
  {`Dashboard Title - ${dashboard.title}`}
91
91
  {dashboard.widgets?.map((widget) => (
92
- <DashboardWidget key={widget.oid} widgetOid={widget.oid} dashboardOid={dashboard.oid} />
92
+ <WidgetById key={widget.oid} widgetOid={widget.oid} dashboardOid={dashboard.oid} />
93
93
  ))}
94
94
  </div>
95
95
  );
@@ -1,4 +1,4 @@
1
- import { type HierarchyDto } from '../../dashboard-widget/types';
1
+ import { type HierarchyDto } from '../../widget-by-id/types';
2
2
  import { type HierarchyModel } from './hierarchy-model';
3
3
  /**
4
4
  * Creates a new hierarchy model from a hierarchy DTO.
@@ -3,7 +3,7 @@ import { WidgetModel } from './widget-model.js';
3
3
  import { ChartProps, ChartWidgetProps, WidgetProps, PivotTableProps, PivotTableWidgetProps, PluginWidgetProps, TableProps, TableWidgetProps, TextWidgetProps, CommonWidgetProps } from '../../props';
4
4
  import { JaqlDataSource } from '@sisense/sdk-data';
5
5
  import { CompleteThemeSettings } from '../../types.js';
6
- import { WidgetDto } from '../../dashboard-widget/types.js';
6
+ import { WidgetDto } from '../../widget-by-id/types.js';
7
7
  import { AppSettings } from '../../app/settings/settings.js';
8
8
  /**
9
9
  * Translates a {@link WidgetModel} to the parameters for executing a query for the widget.