@sisense/sdk-ui-angular 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.
- package/dist/ai/lib/components/chatbot.component.d.ts +0 -5
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +0 -5
- package/dist/ai/lib/sdk-ai.module.d.ts +0 -1
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/ai/lib/services/ai.service.d.ts +12 -7
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +1 -6
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +1 -6
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +1 -2
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/ai/lib/services/ai.service.mjs +3 -7
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -2
- package/dist/esm2020/lib/components/charts/areamap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/bar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/boxplot-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/column-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/funnel-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/indicator-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/scattermap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/sunburst-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/table.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/treemap-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +4 -3
- package/dist/esm2020/lib/components/filters/filter-tile.component.mjs +147 -0
- package/dist/esm2020/lib/components/filters/index.mjs +2 -1
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +2 -5
- package/dist/esm2020/lib/components/widgets/index.mjs +2 -2
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/widget.component.mjs +168 -0
- package/dist/esm2020/lib/helpers/dashboard-props-preact-translator.mjs +14 -0
- package/dist/esm2020/lib/helpers/event-emitter-with-has-listeners.mjs +31 -0
- package/dist/esm2020/lib/helpers/index.mjs +2 -0
- package/dist/esm2020/lib/helpers/widget-props-preact-translator.mjs +37 -0
- package/dist/esm2020/lib/sdk-ui-core-exports.mjs +1 -1
- package/dist/esm2020/lib/sdk-ui.module.mjs +12 -8
- package/dist/esm2020/lib/services/dashboard.service.mjs +86 -2
- package/dist/esm2020/lib/services/query.service.mjs +5 -4
- package/dist/esm2020/lib/types/chart-event-props.mjs +1 -1
- package/dist/esm2020/lib/types/data-point.mjs +1 -1
- package/dist/esm2020/lib/types/filter-event-props.mjs +2 -0
- package/dist/esm2020/lib/types/index.mjs +2 -1
- package/dist/esm2020/lib/utilities/dashboard-helpers.mjs +2 -14
- package/dist/esm2020/public-api.mjs +1 -1
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +2 -17
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +456 -146
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +2 -17
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +482 -144
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/components/charts/area-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/area-range-chart.component.d.ts +0 -2
- package/dist/lib/components/charts/areamap-chart.component.d.ts +4 -6
- package/dist/lib/components/charts/bar-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +6 -7
- package/dist/lib/components/charts/chart.component.d.ts +3 -4
- package/dist/lib/components/charts/column-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/funnel-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/indicator-chart.component.d.ts +2 -3
- package/dist/lib/components/charts/line-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/pie-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/polar-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/scatter-chart.component.d.ts +6 -7
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +4 -6
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +0 -1
- package/dist/lib/components/charts/table.component.d.ts +0 -1
- package/dist/lib/components/charts/treemap-chart.component.d.ts +0 -1
- package/dist/lib/components/dashboard/dashboard.component.d.ts +6 -1
- package/dist/lib/components/filters/filter-tile.component.d.ts +125 -0
- package/dist/lib/components/filters/index.d.ts +1 -0
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +1 -1
- package/dist/lib/components/widgets/chart-widget.component.d.ts +4 -5
- package/dist/lib/components/widgets/drilldown-widget.component.d.ts +1 -8
- package/dist/lib/components/widgets/index.d.ts +1 -1
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +0 -1
- package/dist/lib/components/widgets/widget.component.d.ts +209 -0
- package/dist/lib/helpers/dashboard-props-preact-translator.d.ts +4 -0
- package/dist/lib/helpers/event-emitter-with-has-listeners.d.ts +24 -0
- package/dist/lib/helpers/index.d.ts +1 -0
- package/dist/lib/helpers/widget-props-preact-translator.d.ts +4 -0
- package/dist/lib/sdk-ui-core-exports.d.ts +1 -1
- package/dist/lib/sdk-ui.module.d.ts +20 -19
- package/dist/lib/services/dashboard.service.d.ts +79 -1
- package/dist/lib/services/query.service.d.ts +2 -8
- package/dist/lib/types/chart-event-props.d.ts +9 -10
- package/dist/lib/types/data-point.d.ts +18 -11
- package/dist/lib/types/filter-event-props.d.ts +35 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/utilities/dashboard-helpers.d.ts +0 -10
- package/dist/package.json +4 -4
- package/dist/public-api.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +0 -117
- package/dist/lib/components/widgets/dashboard-widget.component.d.ts +0 -120
|
@@ -71,18 +71,12 @@ const template = `
|
|
|
71
71
|
* })
|
|
72
72
|
* ```
|
|
73
73
|
* @group Generative AI
|
|
74
|
-
* @beta
|
|
75
74
|
*/
|
|
76
75
|
const AI_CONTEXT_CONFIG_TOKEN = new InjectionToken('AI Context Config');
|
|
77
76
|
/**
|
|
78
77
|
* Service for working with Sisense Fusion Generative AI.
|
|
79
78
|
*
|
|
80
|
-
* ::: warning Note
|
|
81
|
-
* This service 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.
|
|
82
|
-
* :::
|
|
83
|
-
*
|
|
84
79
|
* @group Generative AI
|
|
85
|
-
* @beta
|
|
86
80
|
*/
|
|
87
81
|
let AiService = class AiService {
|
|
88
82
|
constructor(sisenseContextService, aiContextConfig) {
|
|
@@ -114,6 +108,7 @@ let AiService = class AiService {
|
|
|
114
108
|
*
|
|
115
109
|
* @param params - Parameters for recommendations
|
|
116
110
|
* @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`
|
|
111
|
+
* @beta
|
|
117
112
|
*/
|
|
118
113
|
async getQueryRecommendations(params) {
|
|
119
114
|
const api = await this.getApi();
|
|
@@ -135,6 +130,7 @@ let AiService = class AiService {
|
|
|
135
130
|
*
|
|
136
131
|
* @param params - NLQ query parameters
|
|
137
132
|
* @returns The result as WidgetProps
|
|
133
|
+
* @beta
|
|
138
134
|
*/
|
|
139
135
|
async getNlqResult(params) {
|
|
140
136
|
const { contextTitle, request } = prepareGetNlqResultPayload(params);
|
|
@@ -167,10 +163,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
167
163
|
/**
|
|
168
164
|
* An Angular component that renders a chatbot with data topic selection.
|
|
169
165
|
*
|
|
170
|
-
* ::: warning Note
|
|
171
|
-
* 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.
|
|
172
|
-
* :::
|
|
173
|
-
*
|
|
174
166
|
* @example
|
|
175
167
|
* An example of using the `ChatbotComponent`:
|
|
176
168
|
*
|
|
@@ -205,7 +197,6 @@ export class ExampleComponent {
|
|
|
205
197
|
*
|
|
206
198
|
* <img src="media://angular-chatbot-example.png" width="500px" />
|
|
207
199
|
* @group Generative AI
|
|
208
|
-
* @beta
|
|
209
200
|
*/
|
|
210
201
|
class ChatbotComponent {
|
|
211
202
|
/**
|
|
@@ -294,10 +285,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
294
285
|
* An Angular component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG).
|
|
295
286
|
* Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.
|
|
296
287
|
*
|
|
297
|
-
* ::: warning Note
|
|
298
|
-
* 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.
|
|
299
|
-
* :::
|
|
300
|
-
*
|
|
301
288
|
* @example
|
|
302
289
|
* An example of using the `GetNlgInsightsComponent`:
|
|
303
290
|
*
|
|
@@ -332,7 +319,6 @@ export class ExampleComponent {
|
|
|
332
319
|
*
|
|
333
320
|
* <img src="media://angular-get-nlg-insights-example.png" width="700px" />
|
|
334
321
|
* @group Generative AI
|
|
335
|
-
* @beta
|
|
336
322
|
*/
|
|
337
323
|
class GetNlgInsightsComponent {
|
|
338
324
|
/**
|
|
@@ -459,7 +445,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
459
445
|
* })
|
|
460
446
|
* ```
|
|
461
447
|
* @group Generative AI
|
|
462
|
-
* @beta
|
|
463
448
|
*/
|
|
464
449
|
class SdkAiModule {
|
|
465
450
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sisense-sdk-ui-angular-ai.mjs","sources":["../../src/ai/lib/component-wrapper-helpers/context-connectors.ts","../../src/ai/lib/component-wrapper-helpers/template.ts","../../src/ai/lib/services/ai.service.ts","../../src/ai/lib/components/chatbot.component.ts","../../src/ai/lib/components/get-nlg-insights.component.ts","../../src/ai/lib/sdk-ai.module.ts","../../src/ai/lib/sdk-ui-core-exports.ts","../../src/ai/public-api.ts","../../src/ai/sisense-sdk-ui-angular-ai.ts"],"sourcesContent":["import { ContextConnector, DataObserver } from '@sisense/sdk-ui-preact';\nimport { CustomAiContextProvider, CustomAiContextProviderProps } from '@sisense/sdk-ui-preact/ai';\n\nimport { AiService } from '../services/ai.service';\n\n/**\n * Creates AI context connector\n *\n * @param aiService - The AI service\n * @internal\n */\nexport const createAiContextConnector = (\n aiService: AiService,\n): ContextConnector<CustomAiContextProviderProps> => {\n const propsObserver = new DataObserver<CustomAiContextProviderProps>();\n\n aiService\n .getApi()\n .then((api) =>\n propsObserver.setValue({\n context: {\n api,\n },\n }),\n )\n .catch((error) =>\n propsObserver.setValue({\n error,\n }),\n );\n\n return {\n propsObserver,\n providerComponent: CustomAiContextProvider,\n };\n};\n","export const rootId = 'preact';\nexport const template = `\n <div #${rootId} style=\"width: 100%; height: 100%\"></div>\n`;\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { SisenseContextService, TrackableService, WidgetProps } from '@sisense/sdk-ui-angular';\nimport {\n AiContextProviderProps,\n ChatRestApi,\n DEFAULT_RECOMMENDATIONS_COUNT,\n GetNlgInsightsResponse,\n GetNlqResultParams,\n GetQueryRecommendationsParams,\n prepareGetNlgInsightsPayload,\n prepareGetNlqResultPayload,\n QueryRecommendation,\n UseGetNlgInsightsParams,\n widgetComposer,\n} from '@sisense/sdk-ui-preact/ai';\n\nexport interface AiContextConfig extends Omit<AiContextProviderProps, 'children'> {}\nexport interface GetNlgInsightsParams extends Omit<UseGetNlgInsightsParams, 'enabled'> {}\n\n/**\n * Token used to inject {@link AiContextConfig} into your application.\n *\n * @example\n * Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,\n * along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:\n *\n * ```ts\n * import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';\n * import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';\n *\n * const AI_CONTEXT_CONFIG: AiContextConfig = {\n * volatile: true,\n * };\n * const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {\n * url: \"<instance url>\", // replace with the URL of your Sisense instance\n * token: \"<api token>\", // replace with the API token of your user account\n * defaultDataSource: DM.DataSource,\n * };\n *\n * @NgModule({\n * imports: [\n * BrowserModule,\n * SdkUiModule,\n * SdkAiModule,\n * ],\n * declarations: [AppComponent],\n * providers: [\n * { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },\n * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },\n * ],\n * bootstrap: [AppComponent],\n * })\n * ```\n * @group Generative AI\n * @beta\n */\nexport const AI_CONTEXT_CONFIG_TOKEN = new InjectionToken<AiContextConfig>('AI Context Config');\n\n/**\n * Service for working with Sisense Fusion Generative AI.\n *\n * ::: warning Note\n * This service 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.\n * :::\n *\n * @group Generative AI\n * @beta\n */\n@Injectable({\n providedIn: 'root',\n})\n@TrackableService<AiService>(['getNlgInsights', 'getQueryRecommendations'])\nexport class AiService {\n private apiPromise: Promise<ChatRestApi>;\n\n constructor(\n private sisenseContextService: SisenseContextService,\n @Optional() @Inject(AI_CONTEXT_CONFIG_TOKEN) aiContextConfig?: AiContextConfig,\n ) {\n this.apiPromise = this.sisenseContextService\n .getApp()\n .then((app) => new ChatRestApi(app.httpClient, aiContextConfig?.volatile));\n }\n\n /** @internal */\n getApi(): Promise<ChatRestApi> {\n return this.apiPromise;\n }\n\n /**\n * Fetches an analysis of the provided query using natural language generation (NLG).\n * Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.\n *\n * @param params - Parameters for getting NLG insights\n * @returns NLG insights text summary\n */\n async getNlgInsights(params: GetNlgInsightsParams): Promise<string | undefined> {\n const api = await this.getApi();\n const payload = prepareGetNlgInsightsPayload(params);\n return api.ai\n .getNlgInsights(payload)\n .then((response?: GetNlgInsightsResponse) => response?.data?.answer);\n }\n\n /**\n * Fetches recommended questions for a data model or perspective.\n *\n * @param params - Parameters for recommendations\n * @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`\n */\n async getQueryRecommendations(\n params: GetQueryRecommendationsParams,\n ): Promise<QueryRecommendation[]> {\n const api = await this.getApi();\n const { contextTitle, count, enableAxisTitlesInWidgetProps } = params;\n const recCount = count ?? DEFAULT_RECOMMENDATIONS_COUNT;\n\n const rawRecommendations =\n (await api.ai.getQueryRecommendations(contextTitle, { numOfRecommendations: recCount })) ||\n [];\n\n return rawRecommendations.map(\n (recommendation: QueryRecommendation) =>\n ({\n ...recommendation,\n widgetProps: recommendation.jaql\n ? widgetComposer.toWidgetProps(recommendation, {\n useCustomizedStyleOptions: enableAxisTitlesInWidgetProps,\n })\n : undefined,\n } as QueryRecommendation),\n );\n }\n\n /**\n * Executes a natural language query (NLQ) against a data model or perspective\n *\n * @param params - NLQ query parameters\n * @returns The result as WidgetProps\n */\n async getNlqResult(params: GetNlqResultParams): Promise<WidgetProps | undefined> {\n const { contextTitle, request } = prepareGetNlqResultPayload(params);\n const api = await this.getApi();\n\n const data = await api?.ai.getNlqResult(contextTitle, request);\n\n return data\n ? widgetComposer.toWidgetProps(data, {\n useCustomizedStyleOptions: params.enableAxisTitlesInWidgetProps || false,\n })\n : undefined;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createSisenseContextConnector,\n createThemeContextConnector,\n SisenseContextService,\n ThemeService,\n} from '@sisense/sdk-ui-angular';\nimport { ComponentAdapter } from '@sisense/sdk-ui-preact';\nimport {\n Chatbot as ChatbotPreact,\n type ChatbotProps as ChatbotPropsPreact,\n} from '@sisense/sdk-ui-preact/ai';\n\nimport { createAiContextConnector } from '../component-wrapper-helpers';\nimport { rootId, template } from '../component-wrapper-helpers/template';\nimport { AiService } from '../services/ai.service';\n\n/**\n * Props of the {@link ChatbotComponent}.\n */\nexport interface ChatbotProps extends ChatbotPropsPreact {}\n\n/**\n * An Angular component that renders a chatbot with data topic selection.\n *\n * ::: warning Note\n * 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.\n * :::\n *\n * @example\n * An example of using the `ChatbotComponent`:\n *\n * ```html\n<!--Component HTML template in example.component.html-->\n<csdk-chatbot\n [width]=\"chatbot.width\"\n [height]=\"chatbot.height\"\n [config]=\"chatbot.config\"\n/>\n * ```\n *\n * ```ts\n// Component behavior in example.component.ts\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'example',\n templateUrl: './example.component.html',\n styleUrls: ['./example.component.scss'],\n})\nexport class ExampleComponent {\n chatbot = {\n width: '500px',\n height: '700px',\n config: {\n numOfRecommendations: 5,\n },\n };\n}\n * ```\n *\n * <img src=\"media://angular-chatbot-example.png\" width=\"500px\" />\n * @group Generative AI\n * @beta\n */\n@Component({\n selector: 'csdk-chatbot',\n template,\n})\nexport class ChatbotComponent implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * @internal\n */\n @ViewChild(rootId)\n preactRef!: ElementRef<HTMLDivElement>;\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}\n */\n @Input()\n width: ChatbotProps['width'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.height}\n */\n @Input()\n height: ChatbotProps['height'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.config}\n */\n @Input()\n config: ChatbotProps['config'];\n\n private componentAdapter: ComponentAdapter<typeof ChatbotPreact>;\n\n /**\n * Constructor for the `ChatbotComponent`.\n *\n * @param sisenseContextService - Sisense context service\n * @param themeService - Theme service\n * @param aiService - AI service\n */\n constructor(\n /**\n * Sisense context service\n *\n * @category Constructor\n */\n public sisenseContextService: SisenseContextService,\n /**\n * Theme service\n *\n * @category Constructor\n */\n public themeService: ThemeService,\n /**\n * AI service\n *\n * @category Constructor\n */\n public aiService: AiService,\n ) {\n this.componentAdapter = new ComponentAdapter(ChatbotPreact, [\n createSisenseContextConnector(this.sisenseContextService),\n createThemeContextConnector(this.themeService),\n createAiContextConnector(this.aiService),\n ]);\n }\n\n /**\n * @internal\n */\n ngAfterViewInit() {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n\n /**\n * @internal\n */\n ngOnChanges() {\n if (this.preactRef) {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n }\n\n private getPreactComponentProps(): ChatbotPropsPreact {\n return {\n width: this.width,\n height: this.height,\n config: this.config,\n };\n }\n\n /**\n * @internal\n */\n ngOnDestroy() {\n this.componentAdapter.destroy();\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createSisenseContextConnector,\n createThemeContextConnector,\n SisenseContextService,\n ThemeService,\n} from '@sisense/sdk-ui-angular';\nimport { ComponentAdapter } from '@sisense/sdk-ui-preact';\nimport {\n GetNlgInsights as GetNlgInsightsPreact,\n type GetNlgInsightsProps as GetNlgInsightsPropsPreact,\n} from '@sisense/sdk-ui-preact/ai';\n\nimport { createAiContextConnector } from '../component-wrapper-helpers';\nimport { rootId, template } from '../component-wrapper-helpers/template';\nimport { AiService } from '../services/ai.service';\n\n/**\n * Props of the {@link GetNlgInsightsComponent}.\n */\nexport interface GetNlgInsightsProps extends GetNlgInsightsPropsPreact {}\n\n/**\n * An Angular component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG).\n * Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.\n *\n * ::: warning Note\n * 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.\n * :::\n *\n * @example\n * An example of using the `GetNlgInsightsComponent`:\n *\n * ```html\n<!--Component HTML template in example.component.html-->\n<csdk-get-nlg-insights\n [dataSource]=\"nlgParams.dataSource\"\n [dimensions]=\"nlgParams.dimensions\"\n [measures]=\"nlgParams.measures\"\n/>\n * ```\n *\n * ```ts\n// Component behavior in example.component.ts\nimport { Component } from '@angular/core';\nimport { measureFactory } from '@sisense/sdk-data';\nimport * as DM from '../../assets/sample-healthcare-model';\n\n@Component({\n selector: 'example',\n templateUrl: './example.component.html',\n styleUrls: ['./example.component.scss'],\n})\nexport class ExampleComponent {\n nlgParams = {\n dataSource: DM.DataSource.title,\n dimensions: [DM.Divisions.Divison_name],\n measures: [measureFactory.sum(DM.Admissions.Cost_of_admission)],\n };\n}\n * ```\n *\n * <img src=\"media://angular-get-nlg-insights-example.png\" width=\"700px\" />\n * @group Generative AI\n * @beta\n */\n@Component({\n selector: 'csdk-get-nlg-insights',\n template,\n})\nexport class GetNlgInsightsComponent implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * @internal\n */\n @ViewChild(rootId)\n preactRef!: ElementRef<HTMLDivElement>;\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}\n */\n @Input()\n dataSource!: GetNlgInsightsProps['dataSource'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dimensions}\n */\n @Input()\n dimensions: GetNlgInsightsProps['dimensions'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.measures}\n */\n @Input()\n measures: GetNlgInsightsProps['measures'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.filters}\n */\n @Input()\n filters: GetNlgInsightsProps['filters'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.verbosity}\n */\n @Input()\n verbosity: GetNlgInsightsProps['verbosity'];\n\n private componentAdapter: ComponentAdapter<typeof GetNlgInsightsPreact>;\n\n /**\n * Constructor for the `GetNlgInsightsProps`.\n *\n * @param sisenseContextService - Sisense context service\n * @param themeService - Theme service\n * @param aiService - AI service\n */\n constructor(\n /**\n * Sisense context service\n *\n * @category Constructor\n */\n public sisenseContextService: SisenseContextService,\n /**\n * Theme service\n *\n * @category Constructor\n */\n public themeService: ThemeService,\n /**\n * AI service\n *\n * @category Constructor\n */\n public aiService: AiService,\n ) {\n this.componentAdapter = new ComponentAdapter(GetNlgInsightsPreact, [\n createSisenseContextConnector(this.sisenseContextService),\n createThemeContextConnector(this.themeService),\n createAiContextConnector(this.aiService),\n ]);\n }\n\n /**\n * @internal\n */\n ngAfterViewInit() {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n\n /**\n * @internal\n */\n ngOnChanges() {\n if (this.preactRef) {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n }\n\n private getPreactComponentProps(): GetNlgInsightsPropsPreact {\n return {\n dataSource: this.dataSource,\n dimensions: this.dimensions,\n measures: this.measures,\n filters: this.filters,\n verbosity: this.verbosity,\n };\n }\n\n /**\n * @internal\n */\n ngOnDestroy() {\n this.componentAdapter.destroy();\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SdkUiModule } from '@sisense/sdk-ui-angular';\n\nimport { ChatbotComponent, GetNlgInsightsComponent } from './components';\n\n/**\n * SDK AI Module, which is a container for generative AI components and services.\n *\n * @example\n * Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,\n * along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:\n *\n * ```ts\n * import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';\n * import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';\n *\n * const AI_CONTEXT_CONFIG: AiContextConfig = {\n * volatile: true,\n * };\n * const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {\n * url: \"<instance url>\", // replace with the URL of your Sisense instance\n * token: \"<api token>\", // replace with the API token of your user account\n * defaultDataSource: DM.DataSource,\n * };\n *\n * @NgModule({\n * imports: [\n * BrowserModule,\n * SdkUiModule,\n * SdkAiModule,\n * ],\n * declarations: [AppComponent],\n * providers: [\n * { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },\n * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },\n * ],\n * bootstrap: [AppComponent],\n * })\n * ```\n * @group Generative AI\n * @beta\n */\n@NgModule({\n declarations: [ChatbotComponent, GetNlgInsightsComponent],\n imports: [CommonModule, SdkUiModule],\n exports: [ChatbotComponent, GetNlgInsightsComponent],\n providers: [],\n})\nexport class SdkAiModule {\n constructor() {\n console.log('SdkAiModule loaded');\n }\n}\n","// This file re-exports common types/utils from @sisense/sdk-ui-preact/ai\n\n// Re-exports types from @sisense/sdk-ui-preact/ai\nexport type {\n ChatConfig,\n GetNlqResultParams,\n GetQueryRecommendationsParams,\n QueryRecommendation,\n} from '@sisense/sdk-ui-preact/ai';\n","/**\n * Public API Surface of @sisense/sdk-ui-angular/ai\n */\n\nexport * from './lib/components';\nexport * from './lib/sdk-ai.module';\nexport * from './lib/sdk-ui-core-exports';\nexport * from './lib/services';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ChatbotPreact","i2.AiService","GetNlgInsightsPreact"],"mappings":";;;;;;;;;AAKA;;;;;AAKG;AACI,MAAM,wBAAwB,GAAG,CACtC,SAAoB,KAC8B;AAClD,IAAA,MAAM,aAAa,GAAG,IAAI,YAAY,EAAgC,CAAC;IAEvE,SAAS;AACN,SAAA,MAAM,EAAE;SACR,IAAI,CAAC,CAAC,GAAG,KACR,aAAa,CAAC,QAAQ,CAAC;AACrB,QAAA,OAAO,EAAE;YACP,GAAG;AACJ,SAAA;AACF,KAAA,CAAC,CACH;SACA,KAAK,CAAC,CAAC,KAAK,KACX,aAAa,CAAC,QAAQ,CAAC;QACrB,KAAK;AACN,KAAA,CAAC,CACH,CAAC;IAEJ,OAAO;QACL,aAAa;AACb,QAAA,iBAAiB,EAAE,uBAAuB;KAC3C,CAAC;AACJ,CAAC;;ACnCM,MAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,MAAM,QAAQ,GAAG,CAAA;YACZ,MAAM,CAAA;CACjB;;ACiBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;MACU,uBAAuB,GAAG,IAAI,cAAc,CAAkB,mBAAmB,EAAE;AAEhG;;;;;;;;;AASG;AAKU,IAAA,SAAS,GAAf,MAAM,SAAS,CAAA;IAGpB,WACU,CAAA,qBAA4C,EACP,eAAiC,EAAA;QADtE,IAAqB,CAAA,qBAAA,GAArB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GAAX,WAAW,EAAA,YAAA,EAAA,CALP,gBAAgB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC9C,YAAY,EAAE,WAAW,CAAA,EAAA,OAAA,EAAA,CACzB,gBAAgB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;0GAGxC,WAAW,EAAA,OAAA,EAAA,CAJZ,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;4FAIxB,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;AACzD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;AACpC,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;AACpD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjDD;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sisense-sdk-ui-angular-ai.mjs","sources":["../../src/ai/lib/component-wrapper-helpers/context-connectors.ts","../../src/ai/lib/component-wrapper-helpers/template.ts","../../src/ai/lib/services/ai.service.ts","../../src/ai/lib/components/chatbot.component.ts","../../src/ai/lib/components/get-nlg-insights.component.ts","../../src/ai/lib/sdk-ai.module.ts","../../src/ai/lib/sdk-ui-core-exports.ts","../../src/ai/public-api.ts","../../src/ai/sisense-sdk-ui-angular-ai.ts"],"sourcesContent":["import { ContextConnector, DataObserver } from '@sisense/sdk-ui-preact';\nimport { CustomAiContextProvider, CustomAiContextProviderProps } from '@sisense/sdk-ui-preact/ai';\n\nimport { AiService } from '../services/ai.service';\n\n/**\n * Creates AI context connector\n *\n * @param aiService - The AI service\n * @internal\n */\nexport const createAiContextConnector = (\n aiService: AiService,\n): ContextConnector<CustomAiContextProviderProps> => {\n const propsObserver = new DataObserver<CustomAiContextProviderProps>();\n\n aiService\n .getApi()\n .then((api) =>\n propsObserver.setValue({\n context: {\n api,\n },\n }),\n )\n .catch((error) =>\n propsObserver.setValue({\n error,\n }),\n );\n\n return {\n propsObserver,\n providerComponent: CustomAiContextProvider,\n };\n};\n","export const rootId = 'preact';\nexport const template = `\n <div #${rootId} style=\"width: 100%; height: 100%\"></div>\n`;\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { SisenseContextService, TrackableService, WidgetProps } from '@sisense/sdk-ui-angular';\nimport {\n AiContextProviderProps,\n ChatRestApi,\n DEFAULT_RECOMMENDATIONS_COUNT,\n GetNlgInsightsResponse,\n GetNlqResultParams,\n GetQueryRecommendationsParams,\n prepareGetNlgInsightsPayload,\n prepareGetNlqResultPayload,\n QueryRecommendation as QueryRecommendationPreact,\n UseGetNlgInsightsParams,\n widgetComposer,\n} from '@sisense/sdk-ui-preact/ai';\n\nexport interface AiContextConfig extends Omit<AiContextProviderProps, 'children'> {}\nexport interface GetNlgInsightsParams extends Omit<UseGetNlgInsightsParams, 'enabled'> {}\n\n/**\n * {@inheritDoc @sisense/sdk-ui!QueryRecommendation}\n */\nexport interface QueryRecommendation extends Omit<QueryRecommendationPreact, 'widgetProps'> {\n /**\n * {@inheritDoc @sisense/sdk-ui!QueryRecommendation.widgetProps}\n */\n widgetProps?: WidgetProps;\n}\n\n/**\n * Token used to inject {@link AiContextConfig} into your application.\n *\n * @example\n * Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,\n * along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:\n *\n * ```ts\n * import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';\n * import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';\n *\n * const AI_CONTEXT_CONFIG: AiContextConfig = {\n * volatile: true,\n * };\n * const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {\n * url: \"<instance url>\", // replace with the URL of your Sisense instance\n * token: \"<api token>\", // replace with the API token of your user account\n * defaultDataSource: DM.DataSource,\n * };\n *\n * @NgModule({\n * imports: [\n * BrowserModule,\n * SdkUiModule,\n * SdkAiModule,\n * ],\n * declarations: [AppComponent],\n * providers: [\n * { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },\n * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },\n * ],\n * bootstrap: [AppComponent],\n * })\n * ```\n * @group Generative AI\n */\nexport const AI_CONTEXT_CONFIG_TOKEN = new InjectionToken<AiContextConfig>('AI Context Config');\n\n/**\n * Service for working with Sisense Fusion Generative AI.\n *\n * @group Generative AI\n */\n@Injectable({\n providedIn: 'root',\n})\n@TrackableService<AiService>(['getNlgInsights', 'getQueryRecommendations'])\nexport class AiService {\n private apiPromise: Promise<ChatRestApi>;\n\n constructor(\n private sisenseContextService: SisenseContextService,\n @Optional() @Inject(AI_CONTEXT_CONFIG_TOKEN) aiContextConfig?: AiContextConfig,\n ) {\n this.apiPromise = this.sisenseContextService\n .getApp()\n .then((app) => new ChatRestApi(app.httpClient, aiContextConfig?.volatile));\n }\n\n /** @internal */\n getApi(): Promise<ChatRestApi> {\n return this.apiPromise;\n }\n\n /**\n * Fetches an analysis of the provided query using natural language generation (NLG).\n * Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.\n *\n * @param params - Parameters for getting NLG insights\n * @returns NLG insights text summary\n */\n async getNlgInsights(params: GetNlgInsightsParams): Promise<string | undefined> {\n const api = await this.getApi();\n const payload = prepareGetNlgInsightsPayload(params);\n return api.ai\n .getNlgInsights(payload)\n .then((response?: GetNlgInsightsResponse) => response?.data?.answer);\n }\n\n /**\n * Fetches recommended questions for a data model or perspective.\n *\n * @param params - Parameters for recommendations\n * @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`\n * @beta\n */\n async getQueryRecommendations(\n params: GetQueryRecommendationsParams,\n ): Promise<QueryRecommendation[]> {\n const api = await this.getApi();\n const { contextTitle, count, enableAxisTitlesInWidgetProps } = params;\n const recCount = count ?? DEFAULT_RECOMMENDATIONS_COUNT;\n\n const rawRecommendations =\n (await api.ai.getQueryRecommendations(contextTitle, { numOfRecommendations: recCount })) ||\n [];\n\n return rawRecommendations.map(\n (recommendation: QueryRecommendation) =>\n ({\n ...recommendation,\n widgetProps: recommendation.jaql\n ? widgetComposer.toWidgetProps(recommendation, {\n useCustomizedStyleOptions: enableAxisTitlesInWidgetProps,\n })\n : undefined,\n } as QueryRecommendation),\n );\n }\n\n /**\n * Executes a natural language query (NLQ) against a data model or perspective\n *\n * @param params - NLQ query parameters\n * @returns The result as WidgetProps\n * @beta\n */\n async getNlqResult(params: GetNlqResultParams): Promise<WidgetProps | undefined> {\n const { contextTitle, request } = prepareGetNlqResultPayload(params);\n const api = await this.getApi();\n\n const data = await api?.ai.getNlqResult(contextTitle, request);\n\n return data\n ? (widgetComposer.toWidgetProps(data, {\n useCustomizedStyleOptions: params.enableAxisTitlesInWidgetProps || false,\n }) as WidgetProps)\n : undefined;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createSisenseContextConnector,\n createThemeContextConnector,\n SisenseContextService,\n ThemeService,\n} from '@sisense/sdk-ui-angular';\nimport { ComponentAdapter } from '@sisense/sdk-ui-preact';\nimport {\n Chatbot as ChatbotPreact,\n type ChatbotProps as ChatbotPropsPreact,\n} from '@sisense/sdk-ui-preact/ai';\n\nimport { createAiContextConnector } from '../component-wrapper-helpers';\nimport { rootId, template } from '../component-wrapper-helpers/template';\nimport { AiService } from '../services/ai.service';\n\n/**\n * Props of the {@link ChatbotComponent}.\n */\nexport interface ChatbotProps extends ChatbotPropsPreact {}\n\n/**\n * An Angular component that renders a chatbot with data topic selection.\n *\n * @example\n * An example of using the `ChatbotComponent`:\n *\n * ```html\n<!--Component HTML template in example.component.html-->\n<csdk-chatbot\n [width]=\"chatbot.width\"\n [height]=\"chatbot.height\"\n [config]=\"chatbot.config\"\n/>\n * ```\n *\n * ```ts\n// Component behavior in example.component.ts\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'example',\n templateUrl: './example.component.html',\n styleUrls: ['./example.component.scss'],\n})\nexport class ExampleComponent {\n chatbot = {\n width: '500px',\n height: '700px',\n config: {\n numOfRecommendations: 5,\n },\n };\n}\n * ```\n *\n * <img src=\"media://angular-chatbot-example.png\" width=\"500px\" />\n * @group Generative AI\n */\n@Component({\n selector: 'csdk-chatbot',\n template,\n})\nexport class ChatbotComponent implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * @internal\n */\n @ViewChild(rootId)\n preactRef!: ElementRef<HTMLDivElement>;\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}\n */\n @Input()\n width: ChatbotProps['width'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.height}\n */\n @Input()\n height: ChatbotProps['height'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!ChatbotProps.config}\n */\n @Input()\n config: ChatbotProps['config'];\n\n private componentAdapter: ComponentAdapter<typeof ChatbotPreact>;\n\n /**\n * Constructor for the `ChatbotComponent`.\n *\n * @param sisenseContextService - Sisense context service\n * @param themeService - Theme service\n * @param aiService - AI service\n */\n constructor(\n /**\n * Sisense context service\n *\n * @category Constructor\n */\n public sisenseContextService: SisenseContextService,\n /**\n * Theme service\n *\n * @category Constructor\n */\n public themeService: ThemeService,\n /**\n * AI service\n *\n * @category Constructor\n */\n public aiService: AiService,\n ) {\n this.componentAdapter = new ComponentAdapter(ChatbotPreact, [\n createSisenseContextConnector(this.sisenseContextService),\n createThemeContextConnector(this.themeService),\n createAiContextConnector(this.aiService),\n ]);\n }\n\n /**\n * @internal\n */\n ngAfterViewInit() {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n\n /**\n * @internal\n */\n ngOnChanges() {\n if (this.preactRef) {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n }\n\n private getPreactComponentProps(): ChatbotPropsPreact {\n return {\n width: this.width,\n height: this.height,\n config: this.config,\n };\n }\n\n /**\n * @internal\n */\n ngOnDestroy() {\n this.componentAdapter.destroy();\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n} from '@angular/core';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createSisenseContextConnector,\n createThemeContextConnector,\n SisenseContextService,\n ThemeService,\n} from '@sisense/sdk-ui-angular';\nimport { ComponentAdapter } from '@sisense/sdk-ui-preact';\nimport {\n GetNlgInsights as GetNlgInsightsPreact,\n type GetNlgInsightsProps as GetNlgInsightsPropsPreact,\n} from '@sisense/sdk-ui-preact/ai';\n\nimport { createAiContextConnector } from '../component-wrapper-helpers';\nimport { rootId, template } from '../component-wrapper-helpers/template';\nimport { AiService } from '../services/ai.service';\n\n/**\n * Props of the {@link GetNlgInsightsComponent}.\n */\nexport interface GetNlgInsightsProps extends GetNlgInsightsPropsPreact {}\n\n/**\n * An Angular component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG).\n * Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.\n *\n * @example\n * An example of using the `GetNlgInsightsComponent`:\n *\n * ```html\n<!--Component HTML template in example.component.html-->\n<csdk-get-nlg-insights\n [dataSource]=\"nlgParams.dataSource\"\n [dimensions]=\"nlgParams.dimensions\"\n [measures]=\"nlgParams.measures\"\n/>\n * ```\n *\n * ```ts\n// Component behavior in example.component.ts\nimport { Component } from '@angular/core';\nimport { measureFactory } from '@sisense/sdk-data';\nimport * as DM from '../../assets/sample-healthcare-model';\n\n@Component({\n selector: 'example',\n templateUrl: './example.component.html',\n styleUrls: ['./example.component.scss'],\n})\nexport class ExampleComponent {\n nlgParams = {\n dataSource: DM.DataSource.title,\n dimensions: [DM.Divisions.Divison_name],\n measures: [measureFactory.sum(DM.Admissions.Cost_of_admission)],\n };\n}\n * ```\n *\n * <img src=\"media://angular-get-nlg-insights-example.png\" width=\"700px\" />\n * @group Generative AI\n */\n@Component({\n selector: 'csdk-get-nlg-insights',\n template,\n})\nexport class GetNlgInsightsComponent implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * @internal\n */\n @ViewChild(rootId)\n preactRef!: ElementRef<HTMLDivElement>;\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}\n */\n @Input()\n dataSource!: GetNlgInsightsProps['dataSource'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dimensions}\n */\n @Input()\n dimensions: GetNlgInsightsProps['dimensions'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.measures}\n */\n @Input()\n measures: GetNlgInsightsProps['measures'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.filters}\n */\n @Input()\n filters: GetNlgInsightsProps['filters'];\n\n /**\n * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.verbosity}\n */\n @Input()\n verbosity: GetNlgInsightsProps['verbosity'];\n\n private componentAdapter: ComponentAdapter<typeof GetNlgInsightsPreact>;\n\n /**\n * Constructor for the `GetNlgInsightsProps`.\n *\n * @param sisenseContextService - Sisense context service\n * @param themeService - Theme service\n * @param aiService - AI service\n */\n constructor(\n /**\n * Sisense context service\n *\n * @category Constructor\n */\n public sisenseContextService: SisenseContextService,\n /**\n * Theme service\n *\n * @category Constructor\n */\n public themeService: ThemeService,\n /**\n * AI service\n *\n * @category Constructor\n */\n public aiService: AiService,\n ) {\n this.componentAdapter = new ComponentAdapter(GetNlgInsightsPreact, [\n createSisenseContextConnector(this.sisenseContextService),\n createThemeContextConnector(this.themeService),\n createAiContextConnector(this.aiService),\n ]);\n }\n\n /**\n * @internal\n */\n ngAfterViewInit() {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n\n /**\n * @internal\n */\n ngOnChanges() {\n if (this.preactRef) {\n this.componentAdapter.render(this.preactRef.nativeElement, this.getPreactComponentProps());\n }\n }\n\n private getPreactComponentProps(): GetNlgInsightsPropsPreact {\n return {\n dataSource: this.dataSource,\n dimensions: this.dimensions,\n measures: this.measures,\n filters: this.filters,\n verbosity: this.verbosity,\n };\n }\n\n /**\n * @internal\n */\n ngOnDestroy() {\n this.componentAdapter.destroy();\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SdkUiModule } from '@sisense/sdk-ui-angular';\n\nimport { ChatbotComponent, GetNlgInsightsComponent } from './components';\n\n/**\n * SDK AI Module, which is a container for generative AI components and services.\n *\n * @example\n * Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,\n * along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:\n *\n * ```ts\n * import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';\n * import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';\n *\n * const AI_CONTEXT_CONFIG: AiContextConfig = {\n * volatile: true,\n * };\n * const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {\n * url: \"<instance url>\", // replace with the URL of your Sisense instance\n * token: \"<api token>\", // replace with the API token of your user account\n * defaultDataSource: DM.DataSource,\n * };\n *\n * @NgModule({\n * imports: [\n * BrowserModule,\n * SdkUiModule,\n * SdkAiModule,\n * ],\n * declarations: [AppComponent],\n * providers: [\n * { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },\n * { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },\n * ],\n * bootstrap: [AppComponent],\n * })\n * ```\n * @group Generative AI\n */\n@NgModule({\n declarations: [ChatbotComponent, GetNlgInsightsComponent],\n imports: [CommonModule, SdkUiModule],\n exports: [ChatbotComponent, GetNlgInsightsComponent],\n providers: [],\n})\nexport class SdkAiModule {\n constructor() {\n console.log('SdkAiModule loaded');\n }\n}\n","// This file re-exports common types/utils from @sisense/sdk-ui-preact/ai\n\n// Re-exports types from @sisense/sdk-ui-preact/ai\nexport type {\n ChatConfig,\n GetNlqResultParams,\n GetQueryRecommendationsParams,\n} from '@sisense/sdk-ui-preact/ai';\n","/**\n * Public API Surface of @sisense/sdk-ui-angular/ai\n */\n\nexport * from './lib/components';\nexport * from './lib/sdk-ai.module';\nexport * from './lib/sdk-ui-core-exports';\nexport * from './lib/services';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ChatbotPreact","i2.AiService","GetNlgInsightsPreact"],"mappings":";;;;;;;;;AAKA;;;;;AAKG;AACI,MAAM,wBAAwB,GAAG,CACtC,SAAoB,KAC8B;AAClD,IAAA,MAAM,aAAa,GAAG,IAAI,YAAY,EAAgC,CAAC;IAEvE,SAAS;AACN,SAAA,MAAM,EAAE;SACR,IAAI,CAAC,CAAC,GAAG,KACR,aAAa,CAAC,QAAQ,CAAC;AACrB,QAAA,OAAO,EAAE;YACP,GAAG;AACJ,SAAA;AACF,KAAA,CAAC,CACH;SACA,KAAK,CAAC,CAAC,KAAK,KACX,aAAa,CAAC,QAAQ,CAAC;QACrB,KAAK;AACN,KAAA,CAAC,CACH,CAAC;IAEJ,OAAO;QACL,aAAa;AACb,QAAA,iBAAiB,EAAE,uBAAuB;KAC3C,CAAC;AACJ,CAAC;;ACnCM,MAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,MAAM,QAAQ,GAAG,CAAA;YACZ,MAAM,CAAA;CACjB;;AC2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCG;MACU,uBAAuB,GAAG,IAAI,cAAc,CAAkB,mBA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