@progress/kendo-angular-conversational-ui 14.4.0-develop.9 → 15.0.0-develop.1

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 (99) hide show
  1. package/NOTICE.txt +146 -593
  2. package/ai-prompt/aiprompt.component.d.ts +120 -0
  3. package/ai-prompt/aiprompt.module.d.ts +25 -0
  4. package/ai-prompt/common/aiprompt.service.d.ts +26 -0
  5. package/ai-prompt/common/output-card.component.d.ts +36 -0
  6. package/ai-prompt/common/toolbar-focusable.directive.d.ts +24 -0
  7. package/ai-prompt/common/toolbar-navigation.service.d.ts +24 -0
  8. package/ai-prompt/localization/custom-messages.component.d.ts +17 -0
  9. package/ai-prompt/localization/localized-messages.directive.d.ts +16 -0
  10. package/ai-prompt/localization/messages.d.ts +49 -0
  11. package/ai-prompt/models/command-execute-event.d.ts +23 -0
  12. package/ai-prompt/models/command.interface.d.ts +30 -0
  13. package/ai-prompt/models/index.d.ts +10 -0
  14. package/ai-prompt/models/output-rating-change-event.d.ts +18 -0
  15. package/ai-prompt/models/prompt-output.interface.d.ts +41 -0
  16. package/ai-prompt/models/prompt-request-event.d.ts +22 -0
  17. package/ai-prompt/models/view-type.d.ts +8 -0
  18. package/ai-prompt/templates/toolbar-actions.template.d.ts +18 -0
  19. package/ai-prompt/utils.d.ts +19 -0
  20. package/ai-prompt/views/base-view.d.ts +46 -0
  21. package/ai-prompt/views/command-view.component.d.ts +23 -0
  22. package/ai-prompt/views/custom-view.component.d.ts +20 -0
  23. package/ai-prompt/views/index.d.ts +8 -0
  24. package/ai-prompt/views/output-view.component.d.ts +22 -0
  25. package/ai-prompt/views/prompt-view.component.d.ts +47 -0
  26. package/{api → chat/api}/execute-action-event.d.ts +1 -1
  27. package/chat/attachment.component.d.ts +1 -1
  28. package/chat/builtin-actions.d.ts +1 -1
  29. package/chat/chat-view.d.ts +1 -1
  30. package/chat/chat.component.d.ts +2 -2
  31. package/chat/chat.module.d.ts +3 -3
  32. package/chat/message-attachments.component.d.ts +1 -1
  33. package/chat/message-box.component.d.ts +2 -2
  34. package/chat/message-list.component.d.ts +1 -1
  35. package/chat/message.component.d.ts +1 -1
  36. package/chat/suggested-actions.component.d.ts +1 -1
  37. package/conversational-ui.module.d.ts +43 -0
  38. package/esm2020/ai-prompt/aiprompt.component.mjs +348 -0
  39. package/esm2020/ai-prompt/aiprompt.module.mjs +79 -0
  40. package/esm2020/ai-prompt/common/aiprompt.service.mjs +38 -0
  41. package/esm2020/ai-prompt/common/output-card.component.mjs +199 -0
  42. package/esm2020/ai-prompt/common/toolbar-focusable.directive.mjs +67 -0
  43. package/esm2020/ai-prompt/common/toolbar-navigation.service.mjs +55 -0
  44. package/esm2020/ai-prompt/localization/custom-messages.component.mjs +41 -0
  45. package/esm2020/ai-prompt/localization/localized-messages.directive.mjs +37 -0
  46. package/esm2020/ai-prompt/localization/messages.mjs +35 -0
  47. package/esm2020/ai-prompt/models/prompt-output.interface.mjs +5 -0
  48. package/esm2020/ai-prompt/models/prompt-request-event.mjs +5 -0
  49. package/esm2020/ai-prompt/models/view-type.mjs +5 -0
  50. package/esm2020/ai-prompt/templates/toolbar-actions.template.mjs +27 -0
  51. package/esm2020/ai-prompt/utils.mjs +26 -0
  52. package/esm2020/ai-prompt/views/base-view.mjs +89 -0
  53. package/esm2020/ai-prompt/views/command-view.component.mjs +82 -0
  54. package/esm2020/ai-prompt/views/custom-view.component.mjs +35 -0
  55. package/esm2020/ai-prompt/views/index.mjs +8 -0
  56. package/esm2020/ai-prompt/views/output-view.component.mjs +66 -0
  57. package/esm2020/ai-prompt/views/prompt-view.component.mjs +146 -0
  58. package/esm2020/chat/api/attachment.interface.mjs +5 -0
  59. package/esm2020/chat/api/message.interface.mjs +5 -0
  60. package/esm2020/chat/api/user.interface.mjs +5 -0
  61. package/esm2020/chat/builtin-actions.mjs +1 -1
  62. package/esm2020/chat/chat.component.mjs +1 -1
  63. package/esm2020/chat/chat.module.mjs +3 -3
  64. package/esm2020/chat/common/models/message-box-options.mjs +5 -0
  65. package/esm2020/chat/message-box.component.mjs +2 -2
  66. package/esm2020/chat/message-list.component.mjs +2 -2
  67. package/esm2020/conversational-ui.module.mjs +50 -0
  68. package/esm2020/index.mjs +10 -2
  69. package/esm2020/package-metadata.mjs +2 -2
  70. package/fesm2015/progress-kendo-angular-conversational-ui.mjs +1411 -149
  71. package/fesm2020/progress-kendo-angular-conversational-ui.mjs +1299 -43
  72. package/index.d.ts +11 -3
  73. package/package.json +10 -7
  74. package/schematics/ngAdd/index.js +4 -2
  75. /package/{api → chat/api}/action.interface.d.ts +0 -0
  76. /package/{api → chat/api}/attachment.interface.d.ts +0 -0
  77. /package/{api → chat/api}/index.d.ts +0 -0
  78. /package/{api → chat/api}/message.interface.d.ts +0 -0
  79. /package/{api → chat/api}/post-message-event.d.ts +0 -0
  80. /package/{api → chat/api}/preventable-event.d.ts +0 -0
  81. /package/{api → chat/api}/user.interface.d.ts +0 -0
  82. /package/{cards → chat/cards}/hero-card.component.d.ts +0 -0
  83. /package/{common → chat/common}/focused-state.directive.d.ts +0 -0
  84. /package/{common → chat/common}/models/message-box-options.d.ts +0 -0
  85. /package/{common → chat/common}/scroll-anchor.directive.d.ts +0 -0
  86. /package/{common → chat/common}/utils.d.ts +0 -0
  87. /package/esm2020/{api/attachment.interface.mjs → ai-prompt/models/command-execute-event.mjs} +0 -0
  88. /package/esm2020/{api/message.interface.mjs → ai-prompt/models/command.interface.mjs} +0 -0
  89. /package/esm2020/{api/user.interface.mjs → ai-prompt/models/index.mjs} +0 -0
  90. /package/esm2020/{common/models/message-box-options.mjs → ai-prompt/models/output-rating-change-event.mjs} +0 -0
  91. /package/esm2020/{api → chat/api}/action.interface.mjs +0 -0
  92. /package/esm2020/{api → chat/api}/execute-action-event.mjs +0 -0
  93. /package/esm2020/{api → chat/api}/index.mjs +0 -0
  94. /package/esm2020/{api → chat/api}/post-message-event.mjs +0 -0
  95. /package/esm2020/{api → chat/api}/preventable-event.mjs +0 -0
  96. /package/esm2020/{cards → chat/cards}/hero-card.component.mjs +0 -0
  97. /package/esm2020/{common → chat/common}/focused-state.directive.mjs +0 -0
  98. /package/esm2020/{common → chat/common}/scroll-anchor.directive.mjs +0 -0
  99. /package/esm2020/{common → chat/common}/utils.mjs +0 -0
@@ -0,0 +1,89 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Input, TemplateRef, Directive, HostBinding, Inject, ViewChild } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { isPresent } from '@progress/kendo-angular-common';
8
+ import { DEFAULT_ICONS, DEFAULT_SVG_ICONS, MY_TOKEN } from '../utils';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@progress/kendo-angular-l10n";
11
+ /**
12
+ * @hidden
13
+ */
14
+ export class BaseView {
15
+ constructor(viewType, localization) {
16
+ this.viewType = viewType;
17
+ this.localization = localization;
18
+ this.hostClasses = true;
19
+ if (this.viewType !== 'custom') {
20
+ this.icon = DEFAULT_ICONS[this.viewType];
21
+ this.svgIcon = DEFAULT_SVG_ICONS[this.viewType];
22
+ }
23
+ }
24
+ /**
25
+ * The text of the ToolBar button corresponding to the view.
26
+ */
27
+ set buttonText(value) {
28
+ this._buttonText = value;
29
+ }
30
+ get buttonText() {
31
+ return isPresent(this._buttonText) ?
32
+ this._buttonText :
33
+ this.messageFor(`${this.viewType}View`);
34
+ }
35
+ /**
36
+ * The font icon of the ToolBar button corresponding to the view.
37
+ */
38
+ set icon(value) {
39
+ if (isPresent(value)) {
40
+ this._icon = value;
41
+ }
42
+ else {
43
+ this.icon = DEFAULT_ICONS[this.viewType];
44
+ }
45
+ }
46
+ get icon() {
47
+ return this._icon;
48
+ }
49
+ /**
50
+ * The SVG icon of the ToolBar button corresponding to the view.
51
+ */
52
+ set svgIcon(value) {
53
+ if (isPresent(value)) {
54
+ this._svgIcon = value;
55
+ }
56
+ else {
57
+ this.svgIcon = DEFAULT_SVG_ICONS[this.viewType];
58
+ }
59
+ }
60
+ get svgIcon() {
61
+ return this._svgIcon;
62
+ }
63
+ /**
64
+ * @hidden
65
+ */
66
+ messageFor(text) {
67
+ return this.localization.get(text);
68
+ }
69
+ }
70
+ BaseView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
71
+ BaseView.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: BaseView, inputs: { buttonText: "buttonText", icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-prompt-view": "this.hostClasses" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0 });
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BaseView, decorators: [{
73
+ type: Directive
74
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
75
+ type: Inject,
76
+ args: [MY_TOKEN]
77
+ }] }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
78
+ type: HostBinding,
79
+ args: ['class.k-prompt-view']
80
+ }], template: [{
81
+ type: ViewChild,
82
+ args: ['content', { static: true }]
83
+ }], buttonText: [{
84
+ type: Input
85
+ }], icon: [{
86
+ type: Input
87
+ }], svgIcon: [{
88
+ type: Input
89
+ }] } });
@@ -0,0 +1,82 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component, forwardRef } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { BaseView } from './base-view';
8
+ import { AIPromptService } from '../common/aiprompt.service';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@progress/kendo-angular-l10n";
11
+ import * as i2 from "../common/aiprompt.service";
12
+ import * as i3 from "@progress/kendo-angular-layout";
13
+ /**
14
+ * The component for rendering the **Command** view.
15
+ */
16
+ export class CommandViewComponent extends BaseView {
17
+ constructor(localization, service) {
18
+ super('command', localization);
19
+ this.service = service;
20
+ this.panelBarItems = [];
21
+ }
22
+ ngOnInit() {
23
+ this.panelBarItems = this.getPanelBarItems(this.service.promptCommands);
24
+ }
25
+ itemClickHandler(ev) {
26
+ if (ev.item.children) {
27
+ return;
28
+ }
29
+ const selectedCommand = this.service.getFlattenPromptCommands().find(c => c.id == ev.item.id);
30
+ if (selectedCommand) {
31
+ const eventArgs = {
32
+ command: selectedCommand,
33
+ sender: this.service.aiPrompt,
34
+ isRetry: false
35
+ };
36
+ this.service.executeEvent.next(eventArgs);
37
+ }
38
+ }
39
+ getPanelBarItems(commands) {
40
+ return commands.map(c => ({
41
+ title: c.text,
42
+ id: c.id,
43
+ icon: c.icon,
44
+ svgIcon: c.svgIcon,
45
+ children: c.children ? this.getPanelBarItems(c.children) : null
46
+ }));
47
+ }
48
+ }
49
+ CommandViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CommandViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
50
+ CommandViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CommandViewComponent, selector: "kendo-aiprompt-command-view", providers: [{
51
+ provide: BaseView,
52
+ useExisting: forwardRef(() => CommandViewComponent)
53
+ }], usesInheritance: true, ngImport: i0, template: `
54
+ <ng-template #content>
55
+ <kendo-panelbar
56
+ [items]="panelBarItems"
57
+ [animate]="false"
58
+ [selectable]="false"
59
+ (itemClick)="itemClickHandler($event)"
60
+ ></kendo-panelbar>
61
+ </ng-template>
62
+ `, isInline: true, components: [{ type: i3.PanelBarComponent, selector: "kendo-panelbar", inputs: ["expandMode", "selectable", "animate", "height", "keepItemContent", "items"], outputs: ["stateChange", "select", "expand", "collapse", "itemClick"], exportAs: ["kendoPanelbar"] }] });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CommandViewComponent, decorators: [{
64
+ type: Component,
65
+ args: [{
66
+ selector: 'kendo-aiprompt-command-view',
67
+ providers: [{
68
+ provide: BaseView,
69
+ useExisting: forwardRef(() => CommandViewComponent)
70
+ }],
71
+ template: `
72
+ <ng-template #content>
73
+ <kendo-panelbar
74
+ [items]="panelBarItems"
75
+ [animate]="false"
76
+ [selectable]="false"
77
+ (itemClick)="itemClickHandler($event)"
78
+ ></kendo-panelbar>
79
+ </ng-template>
80
+ `
81
+ }]
82
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.AIPromptService }]; } });
@@ -0,0 +1,35 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component, forwardRef, Input, TemplateRef } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { BaseView } from './base-view';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "@progress/kendo-angular-l10n";
10
+ /**
11
+ * The component for rendering a **Custom** view.
12
+ */
13
+ export class CustomViewComponent extends BaseView {
14
+ constructor(localization) {
15
+ super('custom', localization);
16
+ }
17
+ }
18
+ CustomViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomViewComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
19
+ CustomViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomViewComponent, selector: "kendo-aiprompt-custom-view", inputs: { viewTemplate: "viewTemplate" }, providers: [{
20
+ provide: BaseView,
21
+ useExisting: forwardRef(() => CustomViewComponent)
22
+ }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomViewComponent, decorators: [{
24
+ type: Component,
25
+ args: [{
26
+ selector: 'kendo-aiprompt-custom-view',
27
+ providers: [{
28
+ provide: BaseView,
29
+ useExisting: forwardRef(() => CustomViewComponent)
30
+ }],
31
+ template: ``
32
+ }]
33
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { viewTemplate: [{
34
+ type: Input
35
+ }] } });
@@ -0,0 +1,8 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export { CommandViewComponent } from './command-view.component';
6
+ export { CustomViewComponent } from './custom-view.component';
7
+ export { OutputViewComponent } from './output-view.component';
8
+ export { PromptViewComponent } from './prompt-view.component';
@@ -0,0 +1,66 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component, forwardRef } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { BaseView } from './base-view';
8
+ import { AIPromptService } from '../common/aiprompt.service';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@progress/kendo-angular-l10n";
11
+ import * as i2 from "../common/aiprompt.service";
12
+ import * as i3 from "../common/output-card.component";
13
+ import * as i4 from "@angular/common";
14
+ /**
15
+ * The component for rendering the **Output** view.
16
+ */
17
+ export class OutputViewComponent extends BaseView {
18
+ constructor(localization, service) {
19
+ super('output', localization);
20
+ this.service = service;
21
+ }
22
+ /**
23
+ * @hidden
24
+ */
25
+ get promptOutputs() {
26
+ return this.service.promptOutputs;
27
+ }
28
+ }
29
+ OutputViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
30
+ OutputViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: OutputViewComponent, selector: "kendo-aiprompt-output-view", providers: [{
31
+ provide: BaseView,
32
+ useExisting: forwardRef(() => OutputViewComponent)
33
+ }], usesInheritance: true, ngImport: i0, template: `
34
+ <ng-template #content>
35
+ <div
36
+ class="k-card-list"
37
+ role="list">
38
+ <div *ngFor="let output of promptOutputs"
39
+ kendoAIPromptOutputCard
40
+ [promptOutput]="output">
41
+ </div>
42
+ </div>
43
+ </ng-template>
44
+ `, isInline: true, components: [{ type: i3.AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OutputViewComponent, decorators: [{
46
+ type: Component,
47
+ args: [{
48
+ selector: 'kendo-aiprompt-output-view',
49
+ providers: [{
50
+ provide: BaseView,
51
+ useExisting: forwardRef(() => OutputViewComponent)
52
+ }],
53
+ template: `
54
+ <ng-template #content>
55
+ <div
56
+ class="k-card-list"
57
+ role="list">
58
+ <div *ngFor="let output of promptOutputs"
59
+ kendoAIPromptOutputCard
60
+ [promptOutput]="output">
61
+ </div>
62
+ </div>
63
+ </ng-template>
64
+ `
65
+ }]
66
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.AIPromptService }]; } });
@@ -0,0 +1,146 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component, forwardRef } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { guid } from '@progress/kendo-angular-common';
8
+ import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
9
+ import { BaseView } from './base-view';
10
+ import { AIPromptService } from '../common/aiprompt.service';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@progress/kendo-angular-l10n";
13
+ import * as i2 from "../common/aiprompt.service";
14
+ import * as i3 from "@progress/kendo-angular-inputs";
15
+ import * as i4 from "@progress/kendo-angular-buttons";
16
+ import * as i5 from "@angular/common";
17
+ /**
18
+ * The component for rendering the **Prompt** view.
19
+ */
20
+ export class PromptViewComponent extends BaseView {
21
+ constructor(localization, service) {
22
+ super('prompt', localization);
23
+ this.service = service;
24
+ /**
25
+ * @hidden
26
+ */
27
+ this.showSuggestions = true;
28
+ /**
29
+ * @hidden
30
+ */
31
+ this.contentId = `k-prompt-suggestions-${guid()}`;
32
+ }
33
+ /**
34
+ * @hidden
35
+ */
36
+ get suggestionsIcons() {
37
+ return this.showSuggestions ?
38
+ { font: 'chevron-up', svg: chevronUpIcon } :
39
+ { font: 'chevron-down', svg: chevronDownIcon };
40
+ }
41
+ /**
42
+ * @hidden
43
+ */
44
+ get promptSuggestions() {
45
+ return this.service.promptSuggestions;
46
+ }
47
+ /**
48
+ *
49
+ * @hidden
50
+ */
51
+ set textAreaValue(value) {
52
+ this.service.promptValue = value;
53
+ }
54
+ ;
55
+ get textAreaValue() {
56
+ return this.service.promptValue;
57
+ }
58
+ /**
59
+ * @hidden
60
+ */
61
+ suggestionClick(suggestion) {
62
+ this.textAreaValue = this.service.promptValue = suggestion;
63
+ }
64
+ }
65
+ PromptViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
66
+ PromptViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: PromptViewComponent, selector: "kendo-aiprompt-prompt-view", providers: [
67
+ {
68
+ provide: BaseView,
69
+ useExisting: forwardRef(() => PromptViewComponent)
70
+ }
71
+ ], usesInheritance: true, ngImport: i0, template: `
72
+ <ng-template #content>
73
+ <kendo-textarea
74
+ [placeholder]="messageFor('promptPlaceholder')"
75
+ [rows]="1"
76
+ [(value)]="textAreaValue">
77
+ </kendo-textarea>
78
+ <div class="k-prompt-expander">
79
+ <button kendoButton
80
+ [attr.aria-controls]="contentId"
81
+ [attr.aria-expanded]="showSuggestions"
82
+ fillMode="flat"
83
+ [icon]="suggestionsIcons.font"
84
+ [svgIcon]="suggestionsIcons.svg"
85
+ type="button"
86
+ (click)="showSuggestions = !showSuggestions">
87
+ {{messageFor('promptSuggestions')}}
88
+ </button>
89
+ <div *ngIf="showSuggestions"
90
+ class="k-prompt-expander-content"
91
+ role="list"
92
+ [attr.id]="contentId">
93
+ <div *ngFor="let suggestion of promptSuggestions"
94
+ class="k-prompt-suggestion"
95
+ role="listitem"
96
+ (click)="suggestionClick(suggestion)">
97
+ {{suggestion}}
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </ng-template>
102
+ `, isInline: true, components: [{ type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "adornmentsOrientation", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { type: i4.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PromptViewComponent, decorators: [{
104
+ type: Component,
105
+ args: [{
106
+ selector: 'kendo-aiprompt-prompt-view',
107
+ providers: [
108
+ {
109
+ provide: BaseView,
110
+ useExisting: forwardRef(() => PromptViewComponent)
111
+ }
112
+ ],
113
+ template: `
114
+ <ng-template #content>
115
+ <kendo-textarea
116
+ [placeholder]="messageFor('promptPlaceholder')"
117
+ [rows]="1"
118
+ [(value)]="textAreaValue">
119
+ </kendo-textarea>
120
+ <div class="k-prompt-expander">
121
+ <button kendoButton
122
+ [attr.aria-controls]="contentId"
123
+ [attr.aria-expanded]="showSuggestions"
124
+ fillMode="flat"
125
+ [icon]="suggestionsIcons.font"
126
+ [svgIcon]="suggestionsIcons.svg"
127
+ type="button"
128
+ (click)="showSuggestions = !showSuggestions">
129
+ {{messageFor('promptSuggestions')}}
130
+ </button>
131
+ <div *ngIf="showSuggestions"
132
+ class="k-prompt-expander-content"
133
+ role="list"
134
+ [attr.id]="contentId">
135
+ <div *ngFor="let suggestion of promptSuggestions"
136
+ class="k-prompt-suggestion"
137
+ role="listitem"
138
+ (click)="suggestionClick(suggestion)">
139
+ {{suggestion}}
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </ng-template>
144
+ `
145
+ }]
146
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.AIPromptService }]; } });
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { SendMessageEvent } from '../api/post-message-event';
5
+ import { SendMessageEvent } from './api/post-message-event';
6
6
  const noop = () => { };
7
7
  const handlers = {
8
8
  'reply': (action, sender) => {
@@ -16,7 +16,7 @@ import * as i1 from "@progress/kendo-angular-l10n";
16
16
  import * as i2 from "./message-list.component";
17
17
  import * as i3 from "./message-box.component";
18
18
  import * as i4 from "./l10n/localized-messages.directive";
19
- import * as i5 from "../common/scroll-anchor.directive";
19
+ import * as i5 from "./common/scroll-anchor.directive";
20
20
  /**
21
21
  * Represents the Kendo UI Chat component for Angular.
22
22
  *
@@ -8,14 +8,14 @@ import { ButtonModule } from '@progress/kendo-angular-buttons';
8
8
  import { CommonModule } from '@angular/common';
9
9
  import { ResizeSensorModule } from '@progress/kendo-angular-common';
10
10
  import { CustomMessagesComponent } from './l10n/custom-messages.component';
11
- import { FocusedStateDirective } from '../common/focused-state.directive';
12
- import { HeroCardComponent } from '../cards/hero-card.component';
11
+ import { FocusedStateDirective } from './common/focused-state.directive';
12
+ import { HeroCardComponent } from './cards/hero-card.component';
13
13
  import { LocalizedMessagesDirective } from './l10n/localized-messages.directive';
14
14
  import { MessageAttachmentsComponent } from './message-attachments.component';
15
15
  import { MessageComponent } from './message.component';
16
16
  import { MessageListComponent } from './message-list.component';
17
17
  import { NgModule } from '@angular/core';
18
- import { ScrollAnchorDirective } from '../common/scroll-anchor.directive';
18
+ import { ScrollAnchorDirective } from './common/scroll-anchor.directive';
19
19
  import { SuggestedActionsComponent } from './suggested-actions.component';
20
20
  import { MessageBoxComponent } from './message-box.component';
21
21
  import { ChatMessageBoxTemplateDirective } from './message-box.directive';
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild } from '@angular/core';
6
- import { SendMessageEvent } from '../api/post-message-event';
6
+ import { SendMessageEvent } from './api/post-message-event';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { Keys } from '@progress/kendo-angular-common';
9
9
  import { ChatMessageBoxTemplateDirective } from './message-box.directive';
@@ -11,7 +11,7 @@ import { paperPlaneIcon } from '@progress/kendo-svg-icons';
11
11
  import * as i0 from "@angular/core";
12
12
  import * as i1 from "@progress/kendo-angular-buttons";
13
13
  import * as i2 from "@angular/common";
14
- import * as i3 from "../common/focused-state.directive";
14
+ import * as i3 from "./common/focused-state.directive";
15
15
  /**
16
16
  * @hidden
17
17
  */
@@ -5,9 +5,9 @@
5
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
7
  import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, QueryList, Renderer2, ViewChildren } from '@angular/core';
8
- import { ExecuteActionEvent } from '../api';
8
+ import { ExecuteActionEvent } from './api';
9
9
  import { Keys } from '@progress/kendo-angular-common';
10
- import { closest } from '../common/utils';
10
+ import { closest } from './common/utils';
11
11
  import { ChatItem } from './chat-item';
12
12
  import { chatView, isAuthor } from './chat-view';
13
13
  import { AttachmentTemplateDirective } from './attachment-template.directive';
@@ -0,0 +1,50 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { NgModule } from '@angular/core';
6
+ import { AIPromptModule } from './ai-prompt/aiprompt.module';
7
+ import { ChatModule } from './chat/chat.module';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
11
+ * definition for the Conversational UI components.
12
+ *
13
+ * @example
14
+ *
15
+ * ```ts-no-run
16
+ * // Import the Conversational UI module
17
+ * import { ConversationalUIModule } from '@progress/kendo-angular-conversational-ui';
18
+ *
19
+ * // The browser platform with a compiler
20
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
21
+ *
22
+ * import { NgModule } from '@angular/core';
23
+ *
24
+ * // Import the app component
25
+ * import { AppComponent } from './app.component';
26
+ *
27
+ * // Define the app module
28
+ * _@NgModule({
29
+ * declarations: [AppComponent], // declare app component
30
+ * imports: [BrowserModule, ConversationalUIModule], // import Conversational UI module
31
+ * bootstrap: [AppComponent]
32
+ * })
33
+ * export class AppModule {}
34
+ *
35
+ * // Compile and launch the module
36
+ * platformBrowserDynamic().bootstrapModule(AppModule);
37
+ *
38
+ * ```
39
+ */
40
+ export class ConversationalUIModule {
41
+ }
42
+ ConversationalUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ConversationalUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
43
+ ConversationalUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ConversationalUIModule, exports: [AIPromptModule, ChatModule] });
44
+ ConversationalUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ConversationalUIModule, imports: [AIPromptModule, ChatModule] });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ConversationalUIModule, decorators: [{
46
+ type: NgModule,
47
+ args: [{
48
+ exports: [AIPromptModule, ChatModule]
49
+ }]
50
+ }] });
package/esm2020/index.mjs CHANGED
@@ -3,8 +3,16 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { ChatComponent, AttachmentTemplateDirective, MessageTemplateDirective } from './chat/chat.directives';
6
- export { ExecuteActionEvent, SendMessageEvent } from './api';
6
+ export { ExecuteActionEvent, SendMessageEvent } from './chat/api';
7
+ export { AIPromptModule } from './ai-prompt/aiprompt.module';
7
8
  export { ChatModule } from './chat/chat.module';
8
- export { HeroCardComponent } from './cards/hero-card.component';
9
+ export { ConversationalUIModule } from './conversational-ui.module';
10
+ export { HeroCardComponent } from './chat/cards/hero-card.component';
9
11
  export { CustomMessagesComponent } from './chat/l10n/custom-messages.component';
10
12
  export { ChatMessageBoxTemplateDirective } from './chat/message-box.directive';
13
+ export { AIPromptComponent } from './ai-prompt/aiprompt.component';
14
+ export { AIPromptCustomMessagesComponent } from './ai-prompt/localization/custom-messages.component';
15
+ export { AIPromptToolbarActionsDirective } from './ai-prompt/templates/toolbar-actions.template';
16
+ export { AIPromptToolbarFocusableDirective } from './ai-prompt/common/toolbar-focusable.directive';
17
+ export * from './ai-prompt/views';
18
+ export * from './ai-prompt/models';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-conversational-ui',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1705406641,
13
- version: '14.4.0-develop.9',
12
+ publishDate: 1706543943,
13
+ version: '15.0.0-develop.1',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };