@progress/kendo-angular-conversational-ui 21.4.1-develop.1 → 22.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 (116) hide show
  1. package/ai-prompt/localization/messages.d.ts +1 -1
  2. package/ai-prompt/views/base-view.d.ts +1 -1
  3. package/chat/l10n/messages.d.ts +1 -1
  4. package/fesm2022/progress-kendo-angular-conversational-ui.mjs +182 -182
  5. package/inline-ai-prompt/localization/messages.d.ts +1 -1
  6. package/package.json +17 -25
  7. package/esm2022/ai-prompt/aiprompt.component.mjs +0 -556
  8. package/esm2022/ai-prompt/aiprompt.module.mjs +0 -53
  9. package/esm2022/ai-prompt/common/aiprompt.service.mjs +0 -75
  10. package/esm2022/ai-prompt/common/output-card.component.mjs +0 -230
  11. package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +0 -72
  12. package/esm2022/ai-prompt/common/toolbar-navigation.service.mjs +0 -56
  13. package/esm2022/ai-prompt/localization/custom-messages.component.mjs +0 -54
  14. package/esm2022/ai-prompt/localization/localized-messages.directive.mjs +0 -39
  15. package/esm2022/ai-prompt/localization/messages.mjs +0 -77
  16. package/esm2022/ai-prompt/models/ai-prompt-settings.mjs +0 -5
  17. package/esm2022/ai-prompt/models/command-execute-event.mjs +0 -5
  18. package/esm2022/ai-prompt/models/command.interface.mjs +0 -5
  19. package/esm2022/ai-prompt/models/index.mjs +0 -5
  20. package/esm2022/ai-prompt/models/output-rating-change-event.mjs +0 -5
  21. package/esm2022/ai-prompt/models/prompt-output.interface.mjs +0 -5
  22. package/esm2022/ai-prompt/models/prompt-request-event.mjs +0 -5
  23. package/esm2022/ai-prompt/models/view-type.mjs +0 -5
  24. package/esm2022/ai-prompt/templates/aiprompt-output-body-template.directive.mjs +0 -33
  25. package/esm2022/ai-prompt/templates/aiprompt-output-template.directive.mjs +0 -33
  26. package/esm2022/ai-prompt/templates/toolbar-actions.template.mjs +0 -39
  27. package/esm2022/ai-prompt/utils.mjs +0 -26
  28. package/esm2022/ai-prompt/views/base-view.mjs +0 -98
  29. package/esm2022/ai-prompt/views/command-view.component.mjs +0 -100
  30. package/esm2022/ai-prompt/views/custom-view.component.mjs +0 -50
  31. package/esm2022/ai-prompt/views/index.mjs +0 -8
  32. package/esm2022/ai-prompt/views/output-view.component.mjs +0 -90
  33. package/esm2022/ai-prompt/views/prompt-view.component.mjs +0 -288
  34. package/esm2022/chat/api/action.interface.mjs +0 -5
  35. package/esm2022/chat/api/attachment.interface.mjs +0 -5
  36. package/esm2022/chat/api/chat-file-interface.mjs +0 -5
  37. package/esm2022/chat/api/chat-suggestion.interface.mjs +0 -5
  38. package/esm2022/chat/api/execute-action-event.mjs +0 -29
  39. package/esm2022/chat/api/file-action.mjs +0 -5
  40. package/esm2022/chat/api/file-download-event.interface.mjs +0 -5
  41. package/esm2022/chat/api/files-layout.mjs +0 -5
  42. package/esm2022/chat/api/index.mjs +0 -21
  43. package/esm2022/chat/api/message-action.mjs +0 -5
  44. package/esm2022/chat/api/message-settings.interface.mjs +0 -5
  45. package/esm2022/chat/api/message-width-mode.mjs +0 -5
  46. package/esm2022/chat/api/message.interface.mjs +0 -5
  47. package/esm2022/chat/api/post-message-event.mjs +0 -21
  48. package/esm2022/chat/api/preventable-event.mjs +0 -28
  49. package/esm2022/chat/api/send-button-settings.mjs +0 -5
  50. package/esm2022/chat/api/suggestions-layout.mjs +0 -5
  51. package/esm2022/chat/api/timestamp-visibility.mjs +0 -5
  52. package/esm2022/chat/api/user.interface.mjs +0 -5
  53. package/esm2022/chat/attachment.component.mjs +0 -105
  54. package/esm2022/chat/builtin-actions.mjs +0 -27
  55. package/esm2022/chat/cards/hero-card.component.mjs +0 -131
  56. package/esm2022/chat/chat-file.component.mjs +0 -144
  57. package/esm2022/chat/chat-item.mjs +0 -10
  58. package/esm2022/chat/chat-view.mjs +0 -80
  59. package/esm2022/chat/chat.component.mjs +0 -1015
  60. package/esm2022/chat/chat.directives.mjs +0 -18
  61. package/esm2022/chat/chat.module.mjs +0 -61
  62. package/esm2022/chat/common/chat.service.mjs +0 -179
  63. package/esm2022/chat/common/models/default-model-fields.mjs +0 -25
  64. package/esm2022/chat/common/models/formatted-text-parts.mjs +0 -5
  65. package/esm2022/chat/common/models/message-box-options.mjs +0 -5
  66. package/esm2022/chat/common/models/model-fields.mjs +0 -5
  67. package/esm2022/chat/common/scroll-anchor.directive.mjs +0 -80
  68. package/esm2022/chat/common/scroll-button.component.mjs +0 -81
  69. package/esm2022/chat/common/scroll.service.mjs +0 -110
  70. package/esm2022/chat/common/utils.mjs +0 -159
  71. package/esm2022/chat/l10n/custom-messages.component.mjs +0 -55
  72. package/esm2022/chat/l10n/localized-messages.directive.mjs +0 -40
  73. package/esm2022/chat/l10n/messages.mjs +0 -130
  74. package/esm2022/chat/message-attachments.component.mjs +0 -258
  75. package/esm2022/chat/message-box.component.mjs +0 -501
  76. package/esm2022/chat/message-list.component.mjs +0 -617
  77. package/esm2022/chat/message-reference-content.component.mjs +0 -86
  78. package/esm2022/chat/message.component.mjs +0 -740
  79. package/esm2022/chat/suggested-actions.component.mjs +0 -443
  80. package/esm2022/chat/templates/attachment-template.directive.mjs +0 -43
  81. package/esm2022/chat/templates/author-message-content-template.directive.mjs +0 -39
  82. package/esm2022/chat/templates/author-message-template.directive.mjs +0 -39
  83. package/esm2022/chat/templates/header-template.directive.mjs +0 -33
  84. package/esm2022/chat/templates/message-box.directive.mjs +0 -36
  85. package/esm2022/chat/templates/message-content-template.directive.mjs +0 -39
  86. package/esm2022/chat/templates/message-template.directive.mjs +0 -39
  87. package/esm2022/chat/templates/no-data-template.directive.mjs +0 -38
  88. package/esm2022/chat/templates/receiver-message-content-template.directive.mjs +0 -39
  89. package/esm2022/chat/templates/receiver-message-template.directive.mjs +0 -39
  90. package/esm2022/chat/templates/status-template.directive.mjs +0 -33
  91. package/esm2022/chat/templates/suggestion-template.directive.mjs +0 -36
  92. package/esm2022/chat/templates/timestamp-template.directive.mjs +0 -42
  93. package/esm2022/chat/templates/user-status-template.directive.mjs +0 -38
  94. package/esm2022/conversational-ui.module.mjs +0 -73
  95. package/esm2022/directives.mjs +0 -145
  96. package/esm2022/index.mjs +0 -40
  97. package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +0 -548
  98. package/esm2022/inline-ai-prompt/inlineaiprompt.component.mjs +0 -351
  99. package/esm2022/inline-ai-prompt/inlineaiprompt.module.mjs +0 -46
  100. package/esm2022/inline-ai-prompt/inlineaiprompt.service.mjs +0 -92
  101. package/esm2022/inline-ai-prompt/localization/custom-messages.component.mjs +0 -51
  102. package/esm2022/inline-ai-prompt/localization/localized-messages.directive.mjs +0 -39
  103. package/esm2022/inline-ai-prompt/localization/messages.mjs +0 -35
  104. package/esm2022/inline-ai-prompt/models/command.interface.mjs +0 -5
  105. package/esm2022/inline-ai-prompt/models/index.mjs +0 -5
  106. package/esm2022/inline-ai-prompt/models/inlineaiprompt-popupsettings.mjs +0 -5
  107. package/esm2022/inline-ai-prompt/models/inlineaiprompt-settings.mjs +0 -59
  108. package/esm2022/inline-ai-prompt/models/messages.mjs +0 -8
  109. package/esm2022/inline-ai-prompt/models/output-action-click-event.mjs +0 -5
  110. package/esm2022/inline-ai-prompt/models/output-action.interface.mjs +0 -5
  111. package/esm2022/inline-ai-prompt/models/prompt-output.interface.mjs +0 -5
  112. package/esm2022/inline-ai-prompt/models/prompt-request-event.mjs +0 -5
  113. package/esm2022/inline-ai-prompt/output-template.directive.mjs +0 -38
  114. package/esm2022/inline-ai-prompt/utils.mjs +0 -57
  115. package/esm2022/package-metadata.mjs +0 -16
  116. package/esm2022/progress-kendo-angular-conversational-ui.mjs +0 -8
@@ -1,53 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 { IconsService } from '@progress/kendo-angular-icons';
7
- import { PopupService } from "@progress/kendo-angular-popup";
8
- import { ResizeBatchService } from "@progress/kendo-angular-common";
9
- import { DialogContainerService, DialogService, WindowContainerService, WindowService } from "@progress/kendo-angular-dialog";
10
- import { KENDO_AIPROMPT } from "../directives";
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "./aiprompt.component";
13
- import * as i2 from "./views/prompt-view.component";
14
- import * as i3 from "./views/output-view.component";
15
- import * as i4 from "./views/command-view.component";
16
- import * as i5 from "./views/custom-view.component";
17
- import * as i6 from "./localization/custom-messages.component";
18
- import * as i7 from "./templates/toolbar-actions.template";
19
- import * as i8 from "./common/toolbar-focusable.directive";
20
- import * as i9 from "./templates/aiprompt-output-template.directive";
21
- import * as i10 from "./templates/aiprompt-output-body-template.directive";
22
- // IMPORTANT: NgModule export kept for backwards compatibility
23
- /**
24
- * Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
25
- *
26
- * @example
27
- * ```ts
28
- * import { NgModule } from '@angular/core';
29
- * import { BrowserModule } from '@angular/platform-browser';
30
- * import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
31
- * import { AppComponent } from './app.component';
32
- *
33
- * @NgModule({
34
- * imports: [BrowserModule, AIPromptModule],
35
- * declarations: [AppComponent],
36
- * bootstrap: [AppComponent]
37
- * })
38
- * export class AppModule {}
39
- * ```
40
- */
41
- export class AIPromptModule {
42
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
43
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective], exports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective] });
44
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent] });
45
- }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, decorators: [{
47
- type: NgModule,
48
- args: [{
49
- exports: [...KENDO_AIPROMPT],
50
- imports: [...KENDO_AIPROMPT],
51
- providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService]
52
- }]
53
- }] });
@@ -1,75 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import { Subject } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- * Default settings for the Speech to Text button.
11
- * These settings can be overridden by the user.
12
- */
13
- const STB_DEFAULT_SETTINGS = {
14
- continuous: false,
15
- disabled: false,
16
- fillMode: 'flat',
17
- integrationMode: 'webSpeech',
18
- interimResults: false,
19
- lang: 'en-US',
20
- maxAlternatives: 1,
21
- rounded: 'medium',
22
- size: 'medium',
23
- themeColor: 'base'
24
- };
25
- /**
26
- * @hidden
27
- */
28
- export class AIPromptService {
29
- aiPrompt;
30
- promptValue = '';
31
- showOutputRating = false;
32
- requestEvent = new Subject();
33
- executeEvent = new Subject();
34
- outputCopyEvent = new Subject();
35
- outputRatingChangeEvent = new Subject();
36
- promptCommands;
37
- promptOutputs;
38
- promptSuggestions;
39
- textAreaSettings;
40
- outputTemplate;
41
- outputBodyTemplate;
42
- _speechToTextButton;
43
- get speechToTextButton() {
44
- return this._speechToTextButton;
45
- }
46
- set speechToTextButton(settings) {
47
- if (settings === true) {
48
- this._speechToTextButton = STB_DEFAULT_SETTINGS;
49
- }
50
- else if (settings === false) {
51
- this._speechToTextButton = null;
52
- }
53
- else {
54
- this._speechToTextButton = { ...settings };
55
- }
56
- }
57
- getFlattenPromptCommands(commands = this.promptCommands) {
58
- let newArr = [];
59
- commands.forEach(c => {
60
- if (c.hasOwnProperty('children')) {
61
- const childrenArr = c.children;
62
- newArr = newArr.concat(childrenArr);
63
- if (childrenArr.length > 0) {
64
- this.getFlattenPromptCommands(childrenArr);
65
- }
66
- }
67
- });
68
- return newArr.concat(this.promptCommands);
69
- }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
71
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService });
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService, decorators: [{
74
- type: Injectable
75
- }] });
@@ -1,230 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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, HostBinding, Input } from '@angular/core';
6
- import { NgTemplateOutlet } from '@angular/common';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { guid, isPresent } from '@progress/kendo-angular-common';
9
- import { ButtonComponent } from "@progress/kendo-angular-buttons";
10
- import { arrowRotateCwIcon, copyIcon, thumbDownIcon, thumbDownOutlineIcon, thumbUpIcon, thumbUpOutlineIcon } from '@progress/kendo-svg-icons';
11
- import { AIPromptService } from './aiprompt.service';
12
- import * as i0 from "@angular/core";
13
- import * as i1 from "@progress/kendo-angular-l10n";
14
- import * as i2 from "./aiprompt.service";
15
- /**
16
- * @hidden
17
- */
18
- export class AIPromptOutputCardComponent {
19
- localization;
20
- service;
21
- hostClass = true;
22
- listItemRole = 'listitem';
23
- tabIndex = 0;
24
- get ariaDescribedBy() {
25
- return this.titleId;
26
- }
27
- ariaKeyShortcuts = 'Enter';
28
- promptOutput;
29
- constructor(localization, service) {
30
- this.localization = localization;
31
- this.service = service;
32
- }
33
- ngOnInit() {
34
- if (this.promptOutput?.rating === 'positive') {
35
- this.positiveRatingIcon = thumbUpIcon;
36
- this.negativeRatingIcon = thumbDownOutlineIcon;
37
- }
38
- else if (this.promptOutput?.rating === 'negative') {
39
- this.negativeRatingIcon = thumbDownIcon;
40
- this.positiveRatingIcon = thumbUpOutlineIcon;
41
- }
42
- }
43
- copyIcon = copyIcon;
44
- retryIcon = arrowRotateCwIcon;
45
- positiveRatingIcon = thumbUpOutlineIcon;
46
- negativeRatingIcon = thumbDownOutlineIcon;
47
- titleId = `k-output-card-${guid()}`;
48
- messageFor(text) {
49
- return this.localization.get(text);
50
- }
51
- get showRating() {
52
- return this.service.showOutputRating;
53
- }
54
- get outputTitle() {
55
- if (isPresent(this.promptOutput.title)) {
56
- return this.promptOutput.title;
57
- }
58
- else {
59
- const titleMessage = this.promptOutput.isRetry ? 'outputRetryTitle' : 'outputTitle';
60
- return this.messageFor(titleMessage);
61
- }
62
- }
63
- handleRetry() {
64
- if (this.promptOutput.commandId) {
65
- const eventArgs = {
66
- command: this.service.getFlattenPromptCommands().find(c => c.id === this.promptOutput.commandId),
67
- sender: this.service.aiPrompt,
68
- isRetry: true
69
- };
70
- this.service.executeEvent.next(eventArgs);
71
- }
72
- else {
73
- const eventArgs = {
74
- prompt: this.promptOutput.prompt,
75
- sender: this.service.aiPrompt,
76
- isRetry: true
77
- };
78
- this.service.requestEvent.next(eventArgs);
79
- }
80
- }
81
- handleCopy() {
82
- navigator.clipboard.writeText(this.promptOutput.output);
83
- this.service.outputCopyEvent.next(this.promptOutput);
84
- }
85
- handleRating(ratingType) {
86
- const eventArgs = {
87
- promptOutput: this.promptOutput,
88
- rating: ratingType
89
- };
90
- this.service.outputRatingChangeEvent.next(eventArgs);
91
- if (ratingType === 'positive') {
92
- this.positiveRatingIcon = thumbUpIcon;
93
- this.negativeRatingIcon = thumbDownOutlineIcon;
94
- }
95
- else {
96
- this.negativeRatingIcon = thumbDownIcon;
97
- this.positiveRatingIcon = thumbUpOutlineIcon;
98
- }
99
- }
100
- /**
101
- * @hidden
102
- */
103
- get customBodyTemplate() {
104
- return this.service.outputBodyTemplate?.templateRef;
105
- }
106
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
107
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AIPromptOutputCardComponent, isStandalone: true, selector: "[kendoAIPromptOutputCard]", inputs: { promptOutput: "promptOutput" }, host: { properties: { "class.k-card": "this.hostClass", "attr.role": "this.listItemRole", "attr.tabindex": "this.tabIndex", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-keyshortcuts": "this.ariaKeyShortcuts" } }, ngImport: i0, template: `
108
- <div class="k-card-header">
109
- <div
110
- class="k-card-title"
111
- [attr.id]="titleId">{{outputTitle}}
112
- </div>
113
- <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
114
- </div>
115
- <div class="k-card-body">
116
- @if (customBodyTemplate) {
117
- <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
118
- </ng-container>
119
- } @else {
120
- <p>{{promptOutput.output}}</p>
121
- }
122
- </div>
123
- <div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
124
- <button kendoButton
125
- fillMode="flat"
126
- themeColor="primary"
127
- rounded="full"
128
- icon="copy"
129
- [svgIcon]="copyIcon"
130
- (click)="handleCopy()"
131
- >{{messageFor('copyOutput')}}</button>
132
- <button kendoButton
133
- fillMode="flat"
134
- rounded="full"
135
- icon="arrow-rotate-cw"
136
- [svgIcon]="retryIcon"
137
- (click)="handleRetry()"
138
- >{{messageFor('retryGeneration')}}</button>
139
- @if (showRating) {
140
- <span class="k-spacer"></span>
141
- <button kendoButton
142
- fillMode="flat"
143
- icon="thumb-up-outline"
144
- [svgIcon]="positiveRatingIcon"
145
- (click)="handleRating('positive')">
146
- </button>
147
- <button kendoButton
148
- fillMode="flat"
149
- icon="thumb-down-outline"
150
- [svgIcon]="negativeRatingIcon"
151
- (click)="handleRating('negative')">
152
- </button>
153
- }
154
- </div>
155
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
156
- }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
158
- type: Component,
159
- args: [{
160
- selector: '[kendoAIPromptOutputCard]',
161
- template: `
162
- <div class="k-card-header">
163
- <div
164
- class="k-card-title"
165
- [attr.id]="titleId">{{outputTitle}}
166
- </div>
167
- <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
168
- </div>
169
- <div class="k-card-body">
170
- @if (customBodyTemplate) {
171
- <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
172
- </ng-container>
173
- } @else {
174
- <p>{{promptOutput.output}}</p>
175
- }
176
- </div>
177
- <div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
178
- <button kendoButton
179
- fillMode="flat"
180
- themeColor="primary"
181
- rounded="full"
182
- icon="copy"
183
- [svgIcon]="copyIcon"
184
- (click)="handleCopy()"
185
- >{{messageFor('copyOutput')}}</button>
186
- <button kendoButton
187
- fillMode="flat"
188
- rounded="full"
189
- icon="arrow-rotate-cw"
190
- [svgIcon]="retryIcon"
191
- (click)="handleRetry()"
192
- >{{messageFor('retryGeneration')}}</button>
193
- @if (showRating) {
194
- <span class="k-spacer"></span>
195
- <button kendoButton
196
- fillMode="flat"
197
- icon="thumb-up-outline"
198
- [svgIcon]="positiveRatingIcon"
199
- (click)="handleRating('positive')">
200
- </button>
201
- <button kendoButton
202
- fillMode="flat"
203
- icon="thumb-down-outline"
204
- [svgIcon]="negativeRatingIcon"
205
- (click)="handleRating('negative')">
206
- </button>
207
- }
208
- </div>
209
- `,
210
- standalone: true,
211
- imports: [ButtonComponent, NgTemplateOutlet]
212
- }]
213
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }], propDecorators: { hostClass: [{
214
- type: HostBinding,
215
- args: ['class.k-card']
216
- }], listItemRole: [{
217
- type: HostBinding,
218
- args: ['attr.role']
219
- }], tabIndex: [{
220
- type: HostBinding,
221
- args: ['attr.tabindex']
222
- }], ariaDescribedBy: [{
223
- type: HostBinding,
224
- args: ['attr.aria-describedby']
225
- }], ariaKeyShortcuts: [{
226
- type: HostBinding,
227
- args: ['attr.aria-keyshortcuts']
228
- }], promptOutput: [{
229
- type: Input
230
- }] } });
@@ -1,72 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, ElementRef, Renderer2 } from '@angular/core';
6
- import { ToolbarNavigationService } from './toolbar-navigation.service';
7
- import { Keys, focusableSelector, normalizeKeys } from '@progress/kendo-angular-common';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "./toolbar-navigation.service";
10
- /**
11
- * @hidden
12
- */
13
- export class AIPromptToolbarFocusableDirective {
14
- host;
15
- navigationService;
16
- renderer;
17
- constructor(host, navigationService, renderer) {
18
- this.host = host;
19
- this.navigationService = navigationService;
20
- this.renderer = renderer;
21
- navigationService.register(this);
22
- }
23
- get element() {
24
- return this.host.nativeElement;
25
- }
26
- ngAfterViewInit() {
27
- this.renderer.setAttribute(this.element, 'tabindex', this.navigationService.isActive(this) ? '0' : '-1');
28
- this.element.addEventListener('keydown', this.keyDownHandler, { capture: true });
29
- this.element.addEventListener('click', this.clickHandler, { capture: true });
30
- }
31
- ngOnDestroy() {
32
- this.navigationService.unregister(this);
33
- this.element.removeEventListener('keydown', this.keyDownHandler, { capture: true });
34
- this.element.removeEventListener('click', this.clickHandler, { capture: true });
35
- }
36
- activate() {
37
- this.renderer.setAttribute(this.element, 'tabindex', '0');
38
- this.element.focus();
39
- }
40
- keyDownHandler = (e) => {
41
- const code = normalizeKeys(e);
42
- const targetsSelf = e.target === this.element;
43
- const isLeftArrow = code === Keys.ArrowLeft;
44
- const isRightArrow = code === Keys.ArrowRight;
45
- const isArrow = isLeftArrow || isRightArrow;
46
- if (!targetsSelf || !isArrow) {
47
- return;
48
- }
49
- this.renderer.setAttribute(this.element, 'tabindex', '-1');
50
- this.element.querySelectorAll(focusableSelector).forEach(el => {
51
- this.renderer.setAttribute(el, 'tabindex', '-1');
52
- });
53
- if (isRightArrow) {
54
- this.navigationService.move('right');
55
- }
56
- else if (isLeftArrow) {
57
- this.navigationService.move('left');
58
- }
59
- };
60
- clickHandler = () => {
61
- this.navigationService.setActiveIndex(this);
62
- };
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
64
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
65
- }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
67
- type: Directive,
68
- args: [{
69
- selector: '[kendoAIPromptToolbarFocusable]',
70
- standalone: true
71
- }]
72
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ToolbarNavigationService }, { type: i0.Renderer2 }] });
@@ -1,56 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@progress/kendo-angular-l10n";
9
- /**
10
- * @hidden
11
- */
12
- export class ToolbarNavigationService {
13
- localizationService;
14
- focusableElements = [];
15
- currentFocusedIndex = 0;
16
- constructor(localizationService) {
17
- this.localizationService = localizationService;
18
- }
19
- register(tool) {
20
- if (!this.focusableElements.some(el => el === tool)) {
21
- this.focusableElements.push(tool);
22
- }
23
- }
24
- unregister(tool) {
25
- this.currentFocusedIndex = 0;
26
- this.focusableElements = this.focusableElements.filter(el => el !== tool);
27
- }
28
- isActive(focusable) {
29
- return this.focusableElements[this.currentFocusedIndex] === focusable;
30
- }
31
- setActiveIndex(tool) {
32
- this.currentFocusedIndex = Math.max(this.focusableElements.indexOf(tool), 0);
33
- }
34
- move(direction) {
35
- let delta = direction === 'right' ? 1 : -1;
36
- if (this.localizationService.rtl) {
37
- delta = -delta;
38
- }
39
- this.currentFocusedIndex += delta;
40
- if (this.currentFocusedIndex < 0) {
41
- this.currentFocusedIndex = this.focusableElements.length - 1;
42
- }
43
- else if (this.currentFocusedIndex >= this.focusableElements.length) {
44
- this.currentFocusedIndex = 0;
45
- }
46
- this.focusableElements[this.currentFocusedIndex].activate();
47
- }
48
- focusFirst() {
49
- this.focusableElements[this.currentFocusedIndex].activate();
50
- }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
52
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService });
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, decorators: [{
55
- type: Injectable
56
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,54 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 { Messages } from './messages';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@progress/kendo-angular-l10n";
10
- /**
11
- * Represents the custom messages component of the AIPrompt.
12
- *
13
- * Use this component to override default messages for the AIPrompt
14
- * ([see example](slug:globalization_chat#custom-messages)).
15
- *
16
- * @example
17
- * ```html
18
- * <kendo-aiprompt-messages
19
- * promptView="My prompt view"
20
- * outputView="My output view">
21
- * </kendo-aiprompt-messages>
22
- * ```
23
- */
24
- export class AIPromptCustomMessagesComponent extends Messages {
25
- service;
26
- constructor(service) {
27
- super();
28
- this.service = service;
29
- }
30
- get override() {
31
- return true;
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
34
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-aiprompt-messages", providers: [
35
- {
36
- provide: Messages,
37
- useExisting: forwardRef(() => AIPromptCustomMessagesComponent)
38
- }
39
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptCustomMessagesComponent, decorators: [{
42
- type: Component,
43
- args: [{
44
- providers: [
45
- {
46
- provide: Messages,
47
- useExisting: forwardRef(() => AIPromptCustomMessagesComponent)
48
- }
49
- ],
50
- selector: 'kendo-aiprompt-messages',
51
- template: ``,
52
- standalone: true
53
- }]
54
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, forwardRef } from '@angular/core';
6
- import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { Messages } from './messages';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@progress/kendo-angular-l10n";
10
- /**
11
- * @hidden
12
- */
13
- export class LocalizedMessagesDirective extends Messages {
14
- service;
15
- constructor(service) {
16
- super();
17
- this.service = service;
18
- }
19
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoAIPromptLocalizedMessages]", providers: [
21
- {
22
- provide: Messages,
23
- useExisting: forwardRef(() => LocalizedMessagesDirective)
24
- }
25
- ], usesInheritance: true, ngImport: i0 });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- providers: [
31
- {
32
- provide: Messages,
33
- useExisting: forwardRef(() => LocalizedMessagesDirective)
34
- }
35
- ],
36
- selector: '[kendoAIPromptLocalizedMessages]',
37
- standalone: true
38
- }]
39
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,77 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Input } from '@angular/core';
6
- import { ComponentMessages } from '@progress/kendo-angular-l10n';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class Messages extends ComponentMessages {
12
- /**
13
- * Sets the Toolbar button text for the **Prompt** view.
14
- */
15
- promptView;
16
- /**
17
- * Sets the Toolbar button text for the **Output** view.
18
- */
19
- outputView;
20
- /**
21
- * Sets the text for the **Generate** button in the **Prompt** view.
22
- */
23
- generateOutput;
24
- /**
25
- * Sets the placeholder text for the **Prompt** view text area.
26
- */
27
- promptPlaceholder;
28
- /**
29
- * Sets the text for the **Copy** button text in each **Output** view card.
30
- */
31
- copyOutput;
32
- /**
33
- * Sets the **Retry** button text in each **Output** view card.
34
- */
35
- retryGeneration;
36
- /**
37
- * Sets the title of each card in the **Output** view.
38
- */
39
- outputTitle;
40
- /**
41
- * Sets the title of each retry card in the **Output** view.
42
- */
43
- outputRetryTitle;
44
- /**
45
- * Sets the title of the **Prompt suggestions** button.
46
- */
47
- promptSuggestions;
48
- /**
49
- * Sets the aria-label for the **Speech to Text** button.
50
- */
51
- speechToTextButton;
52
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
53
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions", speechToTextButton: "speechToTextButton" }, usesInheritance: true, ngImport: i0 });
54
- }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
56
- type: Directive
57
- }], propDecorators: { promptView: [{
58
- type: Input
59
- }], outputView: [{
60
- type: Input
61
- }], generateOutput: [{
62
- type: Input
63
- }], promptPlaceholder: [{
64
- type: Input
65
- }], copyOutput: [{
66
- type: Input
67
- }], retryGeneration: [{
68
- type: Input
69
- }], outputTitle: [{
70
- type: Input
71
- }], outputRetryTitle: [{
72
- type: Input
73
- }], promptSuggestions: [{
74
- type: Input
75
- }], speechToTextButton: [{
76
- type: Input
77
- }] } });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};