@sisense/sdk-ui-angular 1.30.0 → 1.32.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/component-wrapper-helpers/context-connectors.d.ts +10 -0
- package/dist/ai/lib/component-wrapper-helpers/index.d.ts +2 -0
- package/dist/ai/lib/component-wrapper-helpers/template.d.ts +2 -0
- package/dist/ai/lib/components/chatbot.component.d.ts +133 -0
- package/dist/ai/lib/components/get-nlg-insights.component.d.ts +142 -0
- package/dist/ai/lib/components/index.d.ts +2 -0
- package/dist/ai/lib/sdk-ai.module.d.ts +40 -5
- package/dist/ai/lib/sdk-ui-core-exports.d.ts +1 -0
- package/dist/ai/lib/services/ai.service.d.ts +88 -0
- package/dist/ai/lib/services/index.d.ts +1 -0
- package/dist/ai/public-api.d.ts +6 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/context-connectors.mjs +20 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/index.mjs +3 -0
- package/dist/esm2020/ai/lib/component-wrapper-helpers/template.mjs +5 -0
- package/dist/esm2020/ai/lib/components/chatbot.component.mjs +139 -0
- package/dist/esm2020/ai/lib/components/get-nlg-insights.component.mjs +146 -0
- package/dist/esm2020/ai/lib/components/index.mjs +3 -0
- package/dist/esm2020/ai/lib/sdk-ai.module.mjs +40 -6
- package/dist/esm2020/ai/lib/sdk-ui-core-exports.mjs +3 -0
- package/dist/esm2020/ai/lib/services/ai.service.mjs +137 -0
- package/dist/esm2020/ai/lib/services/index.mjs +2 -0
- package/dist/esm2020/ai/public-api.mjs +7 -1
- package/dist/esm2020/lib/component-wrapper-helpers/index.mjs +2 -1
- package/dist/esm2020/lib/components/charts/area-chart.component.mjs +1 -1
- package/dist/esm2020/lib/components/charts/area-range-chart.component.mjs +1 -1
- 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/pivot-table.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-by-id.component.mjs +1 -1
- package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +1 -1
- package/dist/esm2020/lib/components/drilldown-breadcrumbs.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/criteria-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/date-range-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/member-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/filters/relative-date-filter-tile.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/chart-widget.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/table-widget.component.mjs +1 -1
- package/dist/esm2020/lib/components/widgets/widget-by-id.component.mjs +1 -1
- package/dist/esm2020/lib/decorators/index.mjs +3 -0
- package/dist/esm2020/lib/decorators/trackable.decorator.mjs +2 -1
- package/dist/esm2020/lib/sdk-ui.module.mjs +3 -3
- package/dist/esm2020/lib/services/sisense-context.service.mjs +3 -3
- package/dist/esm2020/lib/services/theme.service.mjs +3 -3
- package/dist/esm2020/public-api.mjs +5 -25
- package/dist/esm2020/version.mjs +2 -2
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs +473 -8
- package/dist/fesm2015/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs +10 -32
- package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs +468 -8
- package/dist/fesm2020/sisense-sdk-ui-angular-ai.mjs.map +1 -1
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs +10 -32
- package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
- package/dist/lib/component-wrapper-helpers/index.d.ts +1 -0
- package/dist/lib/components/charts/area-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/area-range-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/areamap-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/bar-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/boxplot-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/chart.component.d.ts +3 -0
- package/dist/lib/components/charts/column-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/funnel-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/indicator-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/line-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/pie-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/pivot-table.component.d.ts +3 -0
- package/dist/lib/components/charts/polar-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/scatter-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/scattermap-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/sunburst-chart.component.d.ts +3 -0
- package/dist/lib/components/charts/table.component.d.ts +3 -2
- package/dist/lib/components/charts/treemap-chart.component.d.ts +3 -0
- package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +3 -0
- package/dist/lib/components/dashboard/dashboard.component.d.ts +3 -0
- package/dist/lib/components/drilldown-breadcrumbs.component.d.ts +3 -0
- package/dist/lib/components/filters/criteria-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/date-range-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/member-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/filters/relative-date-filter-tile.component.d.ts +3 -0
- package/dist/lib/components/widgets/chart-widget.component.d.ts +3 -0
- package/dist/lib/components/widgets/table-widget.component.d.ts +5 -0
- package/dist/lib/components/widgets/widget-by-id.component.d.ts +3 -2
- package/dist/lib/decorators/index.d.ts +2 -0
- package/dist/lib/decorators/trackable.decorator.d.ts +1 -0
- package/dist/lib/sdk-ui.module.d.ts +2 -2
- package/dist/lib/services/plugins.service.d.ts +1 -1
- package/dist/lib/services/sisense-context.service.d.ts +2 -2
- package/dist/lib/services/theme.service.d.ts +2 -2
- package/dist/package.json +1 -1
- package/dist/public-api.d.ts +3 -21
- package/dist/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContextConnector } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { CustomAiContext } from '@sisense/sdk-ui-preact/ai';
|
|
3
|
+
import { AiService } from '../services/ai.service';
|
|
4
|
+
/**
|
|
5
|
+
* Creates AI context connector
|
|
6
|
+
*
|
|
7
|
+
* @param aiService - The AI service
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const createAiContextConnector: (aiService: AiService) => ContextConnector<CustomAiContext>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { type ChatbotProps as ChatbotPropsPreact } from '@sisense/sdk-ui-preact/ai';
|
|
3
|
+
import { SisenseContextService, ThemeService } from '@sisense/sdk-ui-angular';
|
|
4
|
+
import { AiService } from '../services/ai.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Props of the {@link ChatbotComponent}.
|
|
8
|
+
*/
|
|
9
|
+
export interface ChatbotProps extends ChatbotPropsPreact {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An Angular component that renders a chatbot with data topic selection.
|
|
13
|
+
*
|
|
14
|
+
* ::: warning Note
|
|
15
|
+
* 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.
|
|
16
|
+
* :::
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* An example of using the `ChatbotComponent`:
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
<!--Component HTML template in example.component.html-->
|
|
23
|
+
<csdk-chatbot
|
|
24
|
+
[width]="chatbot.width"
|
|
25
|
+
[height]="chatbot.height"
|
|
26
|
+
[config]="chatbot.config"
|
|
27
|
+
/>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
// Component behavior in example.component.ts
|
|
32
|
+
import { Component } from '@angular/core';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
selector: 'example',
|
|
36
|
+
templateUrl: './example.component.html',
|
|
37
|
+
styleUrls: ['./example.component.scss'],
|
|
38
|
+
})
|
|
39
|
+
export class ExampleComponent {
|
|
40
|
+
chatbot = {
|
|
41
|
+
width: '500px',
|
|
42
|
+
height: '700px',
|
|
43
|
+
config: {
|
|
44
|
+
numOfRecommendations: 5,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* <img src="media://angular-chatbot-example.png" width="800px" />
|
|
51
|
+
* @shortDescription Angular component that renders a chatbot with data topic selection.
|
|
52
|
+
*
|
|
53
|
+
* @group Generative AI
|
|
54
|
+
* @beta
|
|
55
|
+
*/
|
|
56
|
+
export declare class ChatbotComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
57
|
+
/**
|
|
58
|
+
* Sisense context service
|
|
59
|
+
*
|
|
60
|
+
* @category Constructor
|
|
61
|
+
*/
|
|
62
|
+
sisenseContextService: SisenseContextService;
|
|
63
|
+
/**
|
|
64
|
+
* Theme service
|
|
65
|
+
*
|
|
66
|
+
* @category Constructor
|
|
67
|
+
*/
|
|
68
|
+
themeService: ThemeService;
|
|
69
|
+
/**
|
|
70
|
+
* AI service
|
|
71
|
+
*
|
|
72
|
+
* @category Constructor
|
|
73
|
+
*/
|
|
74
|
+
aiService: AiService;
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
preactRef: ElementRef<HTMLDivElement>;
|
|
79
|
+
/**
|
|
80
|
+
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
|
|
81
|
+
*/
|
|
82
|
+
width: ChatbotProps['width'];
|
|
83
|
+
/**
|
|
84
|
+
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.height}
|
|
85
|
+
*/
|
|
86
|
+
height: ChatbotProps['height'];
|
|
87
|
+
/**
|
|
88
|
+
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.config}
|
|
89
|
+
*/
|
|
90
|
+
config: ChatbotProps['config'];
|
|
91
|
+
private componentAdapter;
|
|
92
|
+
/**
|
|
93
|
+
* Constructor for the `ChatbotComponent`.
|
|
94
|
+
*
|
|
95
|
+
* @param sisenseContextService - Sisense context service
|
|
96
|
+
* @param themeService - Theme service
|
|
97
|
+
* @param aiService - AI service
|
|
98
|
+
*/
|
|
99
|
+
constructor(
|
|
100
|
+
/**
|
|
101
|
+
* Sisense context service
|
|
102
|
+
*
|
|
103
|
+
* @category Constructor
|
|
104
|
+
*/
|
|
105
|
+
sisenseContextService: SisenseContextService,
|
|
106
|
+
/**
|
|
107
|
+
* Theme service
|
|
108
|
+
*
|
|
109
|
+
* @category Constructor
|
|
110
|
+
*/
|
|
111
|
+
themeService: ThemeService,
|
|
112
|
+
/**
|
|
113
|
+
* AI service
|
|
114
|
+
*
|
|
115
|
+
* @category Constructor
|
|
116
|
+
*/
|
|
117
|
+
aiService: AiService);
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
ngAfterViewInit(): void;
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
ngOnChanges(): void;
|
|
126
|
+
private createPreactComponent;
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
ngOnDestroy(): void;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatbotComponent, never>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatbotComponent, "csdk-chatbot", never, { "width": "width"; "height": "height"; "config": "config"; }, {}, never, never, false, never>;
|
|
133
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { type GetNlgInsightsProps as GetNlgInsightsPropsPreact } from '@sisense/sdk-ui-preact/ai';
|
|
3
|
+
import { SisenseContextService, ThemeService } from '@sisense/sdk-ui-angular';
|
|
4
|
+
import { AiService } from '../services/ai.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Props of the {@link GetNlgInsightsComponent}.
|
|
8
|
+
*/
|
|
9
|
+
export interface GetNlgInsightsProps extends GetNlgInsightsPropsPreact {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An Angular component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG).
|
|
13
|
+
* Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.
|
|
14
|
+
*
|
|
15
|
+
* ::: warning Note
|
|
16
|
+
* 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.
|
|
17
|
+
* :::
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* An example of using the `GetNlgInsightsComponent`:
|
|
21
|
+
*
|
|
22
|
+
* ```html
|
|
23
|
+
<!--Component HTML template in example.component.html-->
|
|
24
|
+
<csdk-get-nlg-insights
|
|
25
|
+
[dataSource]="nlgParams.dataSource"
|
|
26
|
+
[dimensions]="nlgParams.dimensions"
|
|
27
|
+
[measures]="nlgParams.measures"
|
|
28
|
+
/>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
// Component behavior in example.component.ts
|
|
33
|
+
import { Component } from '@angular/core';
|
|
34
|
+
import { measureFactory } from '@sisense/sdk-data';
|
|
35
|
+
import * as DM from '../../assets/sample-healthcare-model';
|
|
36
|
+
|
|
37
|
+
@Component({
|
|
38
|
+
selector: 'example',
|
|
39
|
+
templateUrl: './example.component.html',
|
|
40
|
+
styleUrls: ['./example.component.scss'],
|
|
41
|
+
})
|
|
42
|
+
export class ExampleComponent {
|
|
43
|
+
nlgParams = {
|
|
44
|
+
dataSource: DM.DataSource.title,
|
|
45
|
+
dimensions: [DM.Divisions.Divison_name],
|
|
46
|
+
measures: [measureFactory.sum(DM.Admissions.Cost_of_admission)],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* <img src="media://angular-get-nlg-insights-example.png" width="800px" />
|
|
52
|
+
* @shortDescription Angular component that displays NLG insights.
|
|
53
|
+
*
|
|
54
|
+
* @group Generative AI
|
|
55
|
+
* @beta
|
|
56
|
+
*/
|
|
57
|
+
export declare class GetNlgInsightsComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
58
|
+
/**
|
|
59
|
+
* Sisense context service
|
|
60
|
+
*
|
|
61
|
+
* @category Constructor
|
|
62
|
+
*/
|
|
63
|
+
sisenseContextService: SisenseContextService;
|
|
64
|
+
/**
|
|
65
|
+
* Theme service
|
|
66
|
+
*
|
|
67
|
+
* @category Constructor
|
|
68
|
+
*/
|
|
69
|
+
themeService: ThemeService;
|
|
70
|
+
/**
|
|
71
|
+
* AI service
|
|
72
|
+
*
|
|
73
|
+
* @category Constructor
|
|
74
|
+
*/
|
|
75
|
+
aiService: AiService;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
preactRef: ElementRef<HTMLDivElement>;
|
|
80
|
+
/**
|
|
81
|
+
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
|
|
82
|
+
*/
|
|
83
|
+
dataSource: GetNlgInsightsProps['dataSource'];
|
|
84
|
+
/**
|
|
85
|
+
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dimensions}
|
|
86
|
+
*/
|
|
87
|
+
dimensions: GetNlgInsightsProps['dimensions'];
|
|
88
|
+
/**
|
|
89
|
+
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.measures}
|
|
90
|
+
*/
|
|
91
|
+
measures: GetNlgInsightsProps['measures'];
|
|
92
|
+
/**
|
|
93
|
+
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.filters}
|
|
94
|
+
*/
|
|
95
|
+
filters: GetNlgInsightsProps['filters'];
|
|
96
|
+
/**
|
|
97
|
+
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.verbosity}
|
|
98
|
+
*/
|
|
99
|
+
verbosity: GetNlgInsightsProps['verbosity'];
|
|
100
|
+
private componentAdapter;
|
|
101
|
+
/**
|
|
102
|
+
* Constructor for the `GetNlgInsightsProps`.
|
|
103
|
+
*
|
|
104
|
+
* @param sisenseContextService - Sisense context service
|
|
105
|
+
* @param themeService - Theme service
|
|
106
|
+
* @param aiService - AI service
|
|
107
|
+
*/
|
|
108
|
+
constructor(
|
|
109
|
+
/**
|
|
110
|
+
* Sisense context service
|
|
111
|
+
*
|
|
112
|
+
* @category Constructor
|
|
113
|
+
*/
|
|
114
|
+
sisenseContextService: SisenseContextService,
|
|
115
|
+
/**
|
|
116
|
+
* Theme service
|
|
117
|
+
*
|
|
118
|
+
* @category Constructor
|
|
119
|
+
*/
|
|
120
|
+
themeService: ThemeService,
|
|
121
|
+
/**
|
|
122
|
+
* AI service
|
|
123
|
+
*
|
|
124
|
+
* @category Constructor
|
|
125
|
+
*/
|
|
126
|
+
aiService: AiService);
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
ngAfterViewInit(): void;
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
ngOnChanges(): void;
|
|
135
|
+
private createPreactComponent;
|
|
136
|
+
/**
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
ngOnDestroy(): void;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GetNlgInsightsComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GetNlgInsightsComponent, "csdk-get-nlg-insights", never, { "dataSource": "dataSource"; "dimensions": "dimensions"; "measures": "measures"; "filters": "filters"; "verbosity": "verbosity"; }, {}, never, never, false, never>;
|
|
142
|
+
}
|
|
@@ -1,14 +1,49 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
import * as i2 from "
|
|
2
|
+
import * as i1 from "./components/chatbot.component";
|
|
3
|
+
import * as i2 from "./components/get-nlg-insights.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@sisense/sdk-ui-angular";
|
|
4
6
|
/**
|
|
5
|
-
* SDK AI Module
|
|
7
|
+
* SDK AI Module, which is a container for generative AI components and services.
|
|
6
8
|
*
|
|
7
|
-
* @
|
|
9
|
+
* @example
|
|
10
|
+
* Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,
|
|
11
|
+
* along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';
|
|
15
|
+
* import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';
|
|
16
|
+
*
|
|
17
|
+
* const AI_CONTEXT_CONFIG: AiContextConfig = {
|
|
18
|
+
* volatile: true,
|
|
19
|
+
* };
|
|
20
|
+
* const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
|
|
21
|
+
* url: "<instance url>", // replace with the URL of your Sisense instance
|
|
22
|
+
* token: "<api token>", // replace with the API token of your user account
|
|
23
|
+
* defaultDataSource: DM.DataSource,
|
|
24
|
+
* };
|
|
25
|
+
*
|
|
26
|
+
* @NgModule({
|
|
27
|
+
* imports: [
|
|
28
|
+
* BrowserModule,
|
|
29
|
+
* SdkUiModule,
|
|
30
|
+
* SdkAiModule,
|
|
31
|
+
* ],
|
|
32
|
+
* declarations: [AppComponent],
|
|
33
|
+
* providers: [
|
|
34
|
+
* { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },
|
|
35
|
+
* { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },
|
|
36
|
+
* ],
|
|
37
|
+
* bootstrap: [AppComponent],
|
|
38
|
+
* })
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @group Generative AI
|
|
42
|
+
* @beta
|
|
8
43
|
*/
|
|
9
44
|
export declare class SdkAiModule {
|
|
10
45
|
constructor();
|
|
11
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdkAiModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkAiModule,
|
|
47
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkAiModule, [typeof i1.ChatbotComponent, typeof i2.GetNlgInsightsComponent], [typeof i3.CommonModule, typeof i4.SdkUiModule], [typeof i1.ChatbotComponent, typeof i2.GetNlgInsightsComponent]>;
|
|
13
48
|
static ɵinj: i0.ɵɵInjectorDeclaration<SdkAiModule>;
|
|
14
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ChatConfig, GetQueryRecommendationsParams, QueryRecommendation, GetNlqResultParams, } from '@sisense/sdk-ui-preact/ai';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ChatRestApi, UseGetNlgInsightsParams, GetQueryRecommendationsParams, AiContextProviderProps, QueryRecommendation, GetNlqResultParams } from '@sisense/sdk-ui-preact/ai';
|
|
3
|
+
import { SisenseContextService, WidgetProps } from '@sisense/sdk-ui-angular';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface AiContextConfig extends Omit<AiContextProviderProps, 'children'> {
|
|
6
|
+
}
|
|
7
|
+
export interface GetNlgInsightsParams extends Omit<UseGetNlgInsightsParams, 'enabled'> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Token used to inject {@link AiContextConfig} into your application.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* Example of importing {@link SdkAiModule} and injecting {@link AiContextConfig} into your application,
|
|
14
|
+
* along with importing dependency {@link SdkUiModule} and injecting {@link SisenseContextConfig} to connect to a Sisense instance:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { SdkUiModule, SisenseContextConfig } from '@sisense/sdk-ui-angular';
|
|
18
|
+
* import { SdkAiModule, AI_CONTEXT_CONFIG_TOKEN, AiContextConfig } from '@sisense/sdk-ui-angular/ai';
|
|
19
|
+
*
|
|
20
|
+
* const AI_CONTEXT_CONFIG: AiContextConfig = {
|
|
21
|
+
* volatile: true,
|
|
22
|
+
* };
|
|
23
|
+
* const SISENSE_CONTEXT_CONFIG: SisenseContextConfig = {
|
|
24
|
+
* url: "<instance url>", // replace with the URL of your Sisense instance
|
|
25
|
+
* token: "<api token>", // replace with the API token of your user account
|
|
26
|
+
* defaultDataSource: DM.DataSource,
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
* @NgModule({
|
|
30
|
+
* imports: [
|
|
31
|
+
* BrowserModule,
|
|
32
|
+
* SdkUiModule,
|
|
33
|
+
* SdkAiModule,
|
|
34
|
+
* ],
|
|
35
|
+
* declarations: [AppComponent],
|
|
36
|
+
* providers: [
|
|
37
|
+
* { provide: AI_CONTEXT_CONFIG_TOKEN, useValue: AI_CONTEXT_CONFIG },
|
|
38
|
+
* { provide: SISENSE_CONTEXT_CONFIG_TOKEN, useValue: SISENSE_CONTEXT_CONFIG },
|
|
39
|
+
* ],
|
|
40
|
+
* bootstrap: [AppComponent],
|
|
41
|
+
* })
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @group Generative AI
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
export declare const AI_CONTEXT_CONFIG_TOKEN: InjectionToken<AiContextConfig>;
|
|
48
|
+
/**
|
|
49
|
+
* Service for working with Sisense Fusion Generative AI.
|
|
50
|
+
*
|
|
51
|
+
* ::: warning Note
|
|
52
|
+
* 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.
|
|
53
|
+
* :::
|
|
54
|
+
*
|
|
55
|
+
* @group Generative AI
|
|
56
|
+
* @beta
|
|
57
|
+
*/
|
|
58
|
+
export declare class AiService {
|
|
59
|
+
private sisenseContextService;
|
|
60
|
+
private apiPromise;
|
|
61
|
+
constructor(sisenseContextService: SisenseContextService, aiContextConfig?: AiContextConfig);
|
|
62
|
+
/** @internal */
|
|
63
|
+
getApi(): Promise<ChatRestApi>;
|
|
64
|
+
/**
|
|
65
|
+
* Fetches an analysis of the provided query using natural language generation (NLG).
|
|
66
|
+
* Specifying NLG parameters is similar to providing parameters to the {@link QueryService.executeQuery} service method, using dimensions, measures, and filters.
|
|
67
|
+
*
|
|
68
|
+
* @param params - Parameters for getting NLG insights
|
|
69
|
+
* @returns NLG insights text summary
|
|
70
|
+
*/
|
|
71
|
+
getNlgInsights(params: GetNlgInsightsParams): Promise<string | undefined>;
|
|
72
|
+
/**
|
|
73
|
+
* Fetches recommended questions for a data model or perspective.
|
|
74
|
+
*
|
|
75
|
+
* @param params - Parameters for recommendations
|
|
76
|
+
* @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`
|
|
77
|
+
*/
|
|
78
|
+
getQueryRecommendations(params: GetQueryRecommendationsParams): Promise<QueryRecommendation[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Executes a natural language query (NLQ) against a data model or perspective
|
|
81
|
+
*
|
|
82
|
+
* @param params - NLQ query parameters
|
|
83
|
+
* @returns The result as WidgetProps
|
|
84
|
+
*/
|
|
85
|
+
getNlqResult(params: GetNlqResultParams): Promise<WidgetProps | undefined>;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiService, [null, { optional: true; }]>;
|
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AiService>;
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ai.service';
|
package/dist/ai/public-api.d.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContextProviderRenderer } from '@sisense/sdk-ui-preact';
|
|
2
|
+
import { CustomAiContextProvider } from '@sisense/sdk-ui-preact/ai';
|
|
3
|
+
/**
|
|
4
|
+
* Creates AI context connector
|
|
5
|
+
*
|
|
6
|
+
* @param aiService - The AI service
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export const createAiContextConnector = (aiService) => {
|
|
10
|
+
return {
|
|
11
|
+
async prepareContext() {
|
|
12
|
+
const api = await aiService.getApi();
|
|
13
|
+
return {
|
|
14
|
+
api,
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
renderContextProvider: createContextProviderRenderer(CustomAiContextProvider),
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC1jb25uZWN0b3JzLmpzIiwic291cmNlUm9v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VxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBjcmVhdGVBaUNvbnRleHRDb25uZWN0b3IgPSAoXG4gIGFpU2VydmljZTogQWlTZXJ2aWNlLFxuKTogQ29udGV4dENvbm5lY3RvcjxDdXN0b21BaUNvbnRleHQ+ID0+IHtcbiAgcmV0dXJuIHtcbiAgICBhc3luYyBwcmVwYXJlQ29udGV4dCgpIHtcbiAgICAgIGNvbnN0IGFwaSA9IGF3YWl0IGFpU2VydmljZS5nZXRBcGkoKTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGFwaSxcbiAgICAgIH07XG4gICAgfSxcbiAgICByZW5kZXJDb250ZXh0UHJvdmlkZXI6IGNyZWF0ZUNvbnRleHRQcm92aWRlclJlbmRlcmVyKEN1c3RvbUFpQ29udGV4dFByb3ZpZGVyKSxcbiAgfTtcbn07XG4iXX0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './context-connectors';
|
|
2
|
+
export * from './template';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYWkvbGliL2NvbXBvbmVudC13cmFwcGVyLWhlbHBlcnMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLFlBQVksQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGV4dC1jb25uZWN0b3JzJztcbmV4cG9ydCAqIGZyb20gJy4vdGVtcGxhdGUnO1xuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const rootId = 'preact';
|
|
2
|
+
export const template = `
|
|
3
|
+
<div #${rootId} style="width: 100%; height: 100%"></div>
|
|
4
|
+
`;
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYWkvbGliL2NvbXBvbmVudC13cmFwcGVyLWhlbHBlcnMvdGVtcGxhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sTUFBTSxHQUFHLFFBQVEsQ0FBQztBQUMvQixNQUFNLENBQUMsTUFBTSxRQUFRLEdBQUc7WUFDWixNQUFNO0NBQ2pCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3Qgcm9vdElkID0gJ3ByZWFjdCc7XG5leHBvcnQgY29uc3QgdGVtcGxhdGUgPSBgXG4gICAgPGRpdiAjJHtyb290SWR9IHN0eWxlPVwid2lkdGg6IDEwMCU7IGhlaWdodDogMTAwJVwiPjwvZGl2PlxuYDtcbiJdfQ==
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Component, Input, ViewChild, } from '@angular/core';
|
|
2
|
+
import { ComponentAdapter, createElement } from '@sisense/sdk-ui-preact';
|
|
3
|
+
import { Chatbot } from '@sisense/sdk-ui-preact/ai';
|
|
4
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
|
+
import { createSisenseContextConnector, createThemeContextConnector, } from '@sisense/sdk-ui-angular';
|
|
6
|
+
import { template, rootId } from '../component-wrapper-helpers/template';
|
|
7
|
+
import { createAiContextConnector } from '../component-wrapper-helpers';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@sisense/sdk-ui-angular";
|
|
10
|
+
import * as i2 from "../services/ai.service";
|
|
11
|
+
/**
|
|
12
|
+
* An Angular component that renders a chatbot with data topic selection.
|
|
13
|
+
*
|
|
14
|
+
* ::: warning Note
|
|
15
|
+
* 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.
|
|
16
|
+
* :::
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* An example of using the `ChatbotComponent`:
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
<!--Component HTML template in example.component.html-->
|
|
23
|
+
<csdk-chatbot
|
|
24
|
+
[width]="chatbot.width"
|
|
25
|
+
[height]="chatbot.height"
|
|
26
|
+
[config]="chatbot.config"
|
|
27
|
+
/>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
// Component behavior in example.component.ts
|
|
32
|
+
import { Component } from '@angular/core';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
selector: 'example',
|
|
36
|
+
templateUrl: './example.component.html',
|
|
37
|
+
styleUrls: ['./example.component.scss'],
|
|
38
|
+
})
|
|
39
|
+
export class ExampleComponent {
|
|
40
|
+
chatbot = {
|
|
41
|
+
width: '500px',
|
|
42
|
+
height: '700px',
|
|
43
|
+
config: {
|
|
44
|
+
numOfRecommendations: 5,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* <img src="media://angular-chatbot-example.png" width="800px" />
|
|
51
|
+
* @shortDescription Angular component that renders a chatbot with data topic selection.
|
|
52
|
+
*
|
|
53
|
+
* @group Generative AI
|
|
54
|
+
* @beta
|
|
55
|
+
*/
|
|
56
|
+
export class ChatbotComponent {
|
|
57
|
+
/**
|
|
58
|
+
* Constructor for the `ChatbotComponent`.
|
|
59
|
+
*
|
|
60
|
+
* @param sisenseContextService - Sisense context service
|
|
61
|
+
* @param themeService - Theme service
|
|
62
|
+
* @param aiService - AI service
|
|
63
|
+
*/
|
|
64
|
+
constructor(
|
|
65
|
+
/**
|
|
66
|
+
* Sisense context service
|
|
67
|
+
*
|
|
68
|
+
* @category Constructor
|
|
69
|
+
*/
|
|
70
|
+
sisenseContextService,
|
|
71
|
+
/**
|
|
72
|
+
* Theme service
|
|
73
|
+
*
|
|
74
|
+
* @category Constructor
|
|
75
|
+
*/
|
|
76
|
+
themeService,
|
|
77
|
+
/**
|
|
78
|
+
* AI service
|
|
79
|
+
*
|
|
80
|
+
* @category Constructor
|
|
81
|
+
*/
|
|
82
|
+
aiService) {
|
|
83
|
+
this.sisenseContextService = sisenseContextService;
|
|
84
|
+
this.themeService = themeService;
|
|
85
|
+
this.aiService = aiService;
|
|
86
|
+
this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
|
|
87
|
+
createSisenseContextConnector(this.sisenseContextService),
|
|
88
|
+
createThemeContextConnector(this.themeService),
|
|
89
|
+
createAiContextConnector(this.aiService),
|
|
90
|
+
]);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
ngAfterViewInit() {
|
|
96
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
ngOnChanges() {
|
|
102
|
+
if (this.preactRef) {
|
|
103
|
+
this.componentAdapter.render(this.preactRef.nativeElement);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
createPreactComponent() {
|
|
107
|
+
const props = {
|
|
108
|
+
width: this.width,
|
|
109
|
+
height: this.height,
|
|
110
|
+
config: this.config,
|
|
111
|
+
};
|
|
112
|
+
return createElement(Chatbot, props);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
ngOnDestroy() {
|
|
118
|
+
this.componentAdapter.destroy();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
ChatbotComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatbotComponent, deps: [{ token: i1.SisenseContextService }, { token: i1.ThemeService }, { token: i2.AiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
122
|
+
ChatbotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChatbotComponent, selector: "csdk-chatbot", inputs: { width: "width", height: "height", config: "config" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatbotComponent, decorators: [{
|
|
124
|
+
type: Component,
|
|
125
|
+
args: [{
|
|
126
|
+
selector: 'csdk-chatbot',
|
|
127
|
+
template,
|
|
128
|
+
}]
|
|
129
|
+
}], ctorParameters: function () { return [{ type: i1.SisenseContextService }, { type: i1.ThemeService }, { type: i2.AiService }]; }, propDecorators: { preactRef: [{
|
|
130
|
+
type: ViewChild,
|
|
131
|
+
args: [rootId]
|
|
132
|
+
}], width: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], height: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], config: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}] } });
|
|
139
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGJvdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYWkvbGliL2NvbXBvbmVudHMvY2hhdGJvdC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLFNBQVMsRUFFVCxLQUFLLEVBR0wsU0FBUyxHQUNWLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN6RSxPQUFPLEVBQUUsT0FBTyxFQUEyQyxNQUFNLDJCQUEyQixDQUFDO0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