@progress/kendo-angular-conversational-ui 19.1.1-develop.2 → 19.1.2-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.
- package/ai-prompt/aiprompt.component.d.ts +26 -15
- package/ai-prompt/aiprompt.module.d.ts +8 -11
- package/ai-prompt/localization/custom-messages.component.d.ts +12 -2
- package/ai-prompt/localization/messages.d.ts +9 -9
- package/ai-prompt/models/command-execute-event.d.ts +4 -4
- package/ai-prompt/models/command.interface.d.ts +4 -4
- package/ai-prompt/models/output-rating-change-event.d.ts +4 -4
- package/ai-prompt/models/prompt-output.interface.d.ts +8 -8
- package/ai-prompt/models/prompt-request-event.d.ts +5 -5
- package/ai-prompt/templates/toolbar-actions.template.d.ts +12 -2
- package/ai-prompt/views/base-view.d.ts +5 -5
- package/ai-prompt/views/command-view.component.d.ts +8 -1
- package/ai-prompt/views/custom-view.component.d.ts +11 -1
- package/ai-prompt/views/output-view.component.d.ts +8 -1
- package/ai-prompt/views/prompt-view.component.d.ts +8 -1
- package/chat/api/action.interface.d.ts +7 -8
- package/chat/api/attachment.interface.d.ts +8 -10
- package/chat/api/execute-action-event.d.ts +6 -4
- package/chat/api/message.interface.d.ts +12 -18
- package/chat/api/post-message-event.d.ts +4 -5
- package/chat/api/user.interface.d.ts +4 -10
- package/chat/attachment-template.directive.d.ts +13 -5
- package/chat/cards/hero-card.component.d.ts +17 -5
- package/chat/chat.component.d.ts +25 -16
- package/chat/chat.module.d.ts +5 -5
- package/chat/common/models/message-box-options.d.ts +1 -1
- package/chat/l10n/custom-messages.component.d.ts +12 -2
- package/chat/l10n/messages.d.ts +6 -7
- package/chat/message-box.directive.d.ts +13 -3
- package/chat/message-template.directive.d.ts +13 -5
- package/conversational-ui.module.d.ts +8 -21
- package/directives.d.ts +48 -3
- package/esm2022/ai-prompt/aiprompt.component.mjs +26 -15
- package/esm2022/ai-prompt/aiprompt.module.mjs +8 -11
- package/esm2022/ai-prompt/localization/custom-messages.component.mjs +12 -2
- package/esm2022/ai-prompt/localization/messages.mjs +9 -9
- package/esm2022/ai-prompt/templates/toolbar-actions.template.mjs +12 -2
- package/esm2022/ai-prompt/views/base-view.mjs +5 -5
- package/esm2022/ai-prompt/views/command-view.component.mjs +8 -1
- package/esm2022/ai-prompt/views/custom-view.component.mjs +11 -1
- package/esm2022/ai-prompt/views/output-view.component.mjs +8 -1
- package/esm2022/ai-prompt/views/prompt-view.component.mjs +8 -1
- package/esm2022/chat/api/action.interface.mjs +0 -1
- package/esm2022/chat/api/execute-action-event.mjs +6 -4
- package/esm2022/chat/api/post-message-event.mjs +4 -5
- package/esm2022/chat/attachment-template.directive.mjs +13 -5
- package/esm2022/chat/cards/hero-card.component.mjs +17 -5
- package/esm2022/chat/chat.component.mjs +25 -16
- package/esm2022/chat/chat.module.mjs +5 -5
- package/esm2022/chat/l10n/custom-messages.component.mjs +12 -2
- package/esm2022/chat/l10n/messages.mjs +6 -7
- package/esm2022/chat/message-box.directive.mjs +13 -3
- package/esm2022/chat/message-template.directive.mjs +13 -5
- package/esm2022/conversational-ui.module.mjs +8 -21
- package/esm2022/directives.mjs +48 -3
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +279 -133
- package/package.json +11 -11
@@ -21,12 +21,20 @@ import { DialogContainerService, DialogService, WindowService, WindowContainerSe
|
|
21
21
|
import { PanelBarComponent } from '@progress/kendo-angular-layout';
|
22
22
|
|
23
23
|
/**
|
24
|
-
* Defines a template
|
25
|
-
* template, nest an `<ng-template>` tag with the `kendoChatAttachmentTemplate` attribute inside the
|
26
|
-
* `<kendo-chat>` component. The template context is set to the attachment instance. For more information,
|
27
|
-
* refer to the article on [message attachments]({% slug attachments_chat %}).
|
24
|
+
* Defines a template for displaying message attachments.
|
28
25
|
*
|
29
|
-
*
|
26
|
+
* To define an attachment template, nest an `<ng-template>` tag with the `kendoChatAttachmentTemplate` attribute inside the `<kendo-chat>` component.
|
27
|
+
* The template context is set to the attachment instance.
|
28
|
+
* For more information, refer to the article on [message attachments](slug:attachments_chat).
|
29
|
+
*
|
30
|
+
* @example
|
31
|
+
* ```html
|
32
|
+
* <kendo-chat>
|
33
|
+
* <ng-template kendoChatAttachmentTemplate let-attachment>
|
34
|
+
* <div>Attachment: {{ attachment.content }}</div>
|
35
|
+
* </ng-template>
|
36
|
+
* </kendo-chat>
|
37
|
+
* ```
|
30
38
|
*/
|
31
39
|
class AttachmentTemplateDirective {
|
32
40
|
templateRef;
|
@@ -47,15 +55,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
47
55
|
}] }]; } });
|
48
56
|
|
49
57
|
/**
|
50
|
-
*
|
51
|
-
*
|
58
|
+
* Describes the arguments for the `sendMessage` event.
|
52
59
|
*/
|
53
60
|
class SendMessageEvent {
|
54
61
|
/**
|
55
|
-
*
|
62
|
+
* Represents the message that contains the metadata and user input.
|
56
63
|
*
|
57
|
-
* > The Chat does not automatically
|
58
|
-
* > For more information,
|
64
|
+
* > The Chat does not automatically add the message to its data.
|
65
|
+
* > For more information, see [Data Binding](slug:databinding_chat).
|
59
66
|
*/
|
60
67
|
message;
|
61
68
|
/**
|
@@ -88,12 +95,20 @@ const handlers = {
|
|
88
95
|
const makeHandler = (action) => handlers[action.type] || noop;
|
89
96
|
|
90
97
|
/**
|
91
|
-
* Defines a template
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
98
|
+
* Defines a template for displaying Chat messages.
|
99
|
+
*
|
100
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageTemplate` directive inside the `<kendo-chat>` component.
|
101
|
+
* The template context is set to the `message` instance.
|
102
|
+
* For more information, refer to the article on [message templates](slug:message_templates_chat).
|
95
103
|
*
|
96
|
-
*
|
104
|
+
* @example
|
105
|
+
* ```html
|
106
|
+
* <kendo-chat>
|
107
|
+
* <ng-template kendoChatMessageTemplate let-message>
|
108
|
+
* <div>Message: {{ message.text }}</div>
|
109
|
+
* </ng-template>
|
110
|
+
* </kendo-chat>
|
111
|
+
* ```
|
97
112
|
*/
|
98
113
|
class MessageTemplateDirective {
|
99
114
|
templateRef;
|
@@ -121,15 +136,25 @@ const packageMetadata = {
|
|
121
136
|
productName: 'Kendo UI for Angular',
|
122
137
|
productCode: 'KENDOUIANGULAR',
|
123
138
|
productCodes: ['KENDOUIANGULAR'],
|
124
|
-
publishDate:
|
125
|
-
version: '19.1.
|
139
|
+
publishDate: 1749804503,
|
140
|
+
version: '19.1.2-develop.1',
|
126
141
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
127
142
|
};
|
128
143
|
|
129
144
|
/**
|
130
|
-
* Creates a message box area that overrides the default message box of the
|
131
|
-
*
|
132
|
-
*
|
145
|
+
* Creates a message box area that overrides the default message box of the Chat component.
|
146
|
+
*
|
147
|
+
* To define a message box template, nest an `<ng-template>` tag with the `kendoChatMessageBoxTemplate` directive inside the `<kendo-chat>` tag.
|
148
|
+
* For more information, see [Message Box Template](slug:message_box#toc-message-box-template).
|
149
|
+
*
|
150
|
+
* @example
|
151
|
+
* ```html
|
152
|
+
* <kendo-chat>
|
153
|
+
* <ng-template kendoChatMessageBoxTemplate>
|
154
|
+
* <input type="text" placeholder="Custom message box..." />
|
155
|
+
* </ng-template>
|
156
|
+
* </kendo-chat>
|
157
|
+
* ```
|
133
158
|
*/
|
134
159
|
class ChatMessageBoxTemplateDirective {
|
135
160
|
templateRef;
|
@@ -361,8 +386,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
361
386
|
type: Output
|
362
387
|
}] } });
|
363
388
|
|
364
|
-
// eslint-disable max-line-length
|
365
|
-
|
366
389
|
/**
|
367
390
|
* @hidden
|
368
391
|
*/
|
@@ -389,16 +412,18 @@ class PreventableEvent {
|
|
389
412
|
}
|
390
413
|
|
391
414
|
/**
|
392
|
-
*
|
393
|
-
*
|
415
|
+
* Represents the arguments for the `executeAction` event.
|
416
|
+
*
|
417
|
+
* The `executeAction` event fires when the user clicks a quick action button.
|
418
|
+
* Call `preventDefault()` to suppress the built-in action handler.
|
394
419
|
*/
|
395
420
|
class ExecuteActionEvent extends PreventableEvent {
|
396
421
|
/**
|
397
|
-
*
|
422
|
+
* Represents the action to execute.
|
398
423
|
*/
|
399
424
|
action;
|
400
425
|
/**
|
401
|
-
*
|
426
|
+
* Represents the message that contains the action.
|
402
427
|
*/
|
403
428
|
message;
|
404
429
|
/**
|
@@ -1488,7 +1513,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
1488
1513
|
*/
|
1489
1514
|
let Messages$1 = class Messages extends ComponentMessages {
|
1490
1515
|
/**
|
1491
|
-
* Sets the placeholder text
|
1516
|
+
* Sets the placeholder text for the message text input.
|
1492
1517
|
*/
|
1493
1518
|
messagePlaceholder;
|
1494
1519
|
/**
|
@@ -1496,24 +1521,23 @@ let Messages$1 = class Messages extends ComponentMessages {
|
|
1496
1521
|
*/
|
1497
1522
|
send;
|
1498
1523
|
/**
|
1499
|
-
*
|
1524
|
+
* Sets the label for the message list.
|
1500
1525
|
*/
|
1501
1526
|
messageListLabel;
|
1502
1527
|
/**
|
1503
|
-
*
|
1504
|
-
*
|
1528
|
+
* Sets the label for the message input box.
|
1505
1529
|
*/
|
1506
1530
|
messageBoxInputLabel;
|
1507
1531
|
/**
|
1508
|
-
*
|
1532
|
+
* Sets the text for the left arrow of the message attachments.
|
1509
1533
|
*/
|
1510
1534
|
messageAttachmentLeftArrow;
|
1511
1535
|
/**
|
1512
|
-
*
|
1536
|
+
* Sets the text for the right arrow of the message attachments.
|
1513
1537
|
*/
|
1514
1538
|
messageAttachmentRightArrow;
|
1515
1539
|
/**
|
1516
|
-
*
|
1540
|
+
* Sets the `alt` attribute text for the avatar image.
|
1517
1541
|
*/
|
1518
1542
|
messageAvatarAlt;
|
1519
1543
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
@@ -1574,44 +1598,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
1574
1598
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
1575
1599
|
|
1576
1600
|
/**
|
1577
|
-
* Represents the Kendo UI Chat component for Angular.
|
1601
|
+
* Represents the [Kendo UI Chat component for Angular](slug:overview_convui).
|
1578
1602
|
*
|
1579
|
-
*
|
1603
|
+
* Provides a conversational UI for chat-based applications.
|
1604
|
+
* Supports message templates, attachments, localization, and user actions.
|
1580
1605
|
*
|
1606
|
+
* @example
|
1607
|
+
* ```html
|
1608
|
+
* <kendo-chat
|
1609
|
+
* [messages]="messages"
|
1610
|
+
* [user]="user"
|
1611
|
+
* (sendMessage)="onSendMessage($event)"
|
1612
|
+
* (executeAction)="onExecuteAction($event)">
|
1613
|
+
* </kendo-chat>
|
1614
|
+
* ```
|
1581
1615
|
*/
|
1582
1616
|
class ChatComponent {
|
1583
1617
|
localization;
|
1584
1618
|
zone;
|
1585
1619
|
/**
|
1586
|
-
*
|
1587
|
-
*
|
1620
|
+
* Defines the array of messages displayed in the Chat.
|
1621
|
+
* Each message can include a timestamp for unique identification.
|
1588
1622
|
* For more information, refer to [ngFor - Change Tracking](link:site.data.urls.angular['ngforof']#change-propagation).
|
1589
1623
|
*/
|
1590
1624
|
messages;
|
1591
1625
|
/**
|
1592
|
-
*
|
1593
|
-
* The User ID
|
1626
|
+
* Specifies the [`User`](slug:api_conversational-ui_user) instance representing the local user.
|
1627
|
+
* The User ID is used to distinguish messages authored by the local user.
|
1594
1628
|
*/
|
1595
1629
|
user;
|
1596
1630
|
/**
|
1597
|
-
*
|
1598
|
-
*
|
1599
|
-
*
|
1631
|
+
* Determines the type of input used in the message box.
|
1632
|
+
* Can be set to `textbox` for a single-line input or `textarea` for multi-line input
|
1633
|
+
* ([see example](slug:message_box#message-box-types)).
|
1634
|
+
* @default 'textbox'
|
1600
1635
|
*/
|
1601
1636
|
messageBoxType = 'textbox';
|
1602
1637
|
/**
|
1603
|
-
*
|
1604
|
-
* Emits the [`SendMessageEvent`]({% slug api_conversational-ui_sendmessageevent %}).
|
1638
|
+
* Emits when the user sends a message by clicking the **Send** button or pressing **Enter**.
|
1605
1639
|
*
|
1606
|
-
* > The message is not automatically
|
1640
|
+
* > The message is not automatically added to the `messages` array.
|
1607
1641
|
*/
|
1608
1642
|
sendMessage = new EventEmitter();
|
1609
1643
|
/**
|
1610
|
-
*
|
1611
|
-
* The Chat internally handles
|
1644
|
+
* Emits when the user clicks a quick action button.
|
1645
|
+
* The Chat internally handles [known actions](slug:api_conversational-ui_actiontype) such as `reply`, `openUrl`, and `call`.
|
1612
1646
|
*
|
1613
|
-
*
|
1614
|
-
* The event is preventable. If `preventDefault` is called, the built-in action will be suppressed.
|
1647
|
+
* The event is preventable—calling `preventDefault` suppresses the built-in action.
|
1615
1648
|
*/
|
1616
1649
|
executeAction = new EventEmitter();
|
1617
1650
|
get className() {
|
@@ -1898,7 +1931,7 @@ class BaseView {
|
|
1898
1931
|
}
|
1899
1932
|
}
|
1900
1933
|
/**
|
1901
|
-
*
|
1934
|
+
* Sets the text for the Toolbar button of the current view.
|
1902
1935
|
*/
|
1903
1936
|
set buttonText(value) {
|
1904
1937
|
this._buttonText = value;
|
@@ -1909,8 +1942,8 @@ class BaseView {
|
|
1909
1942
|
this.messageFor(`${this.viewType}View`);
|
1910
1943
|
}
|
1911
1944
|
/**
|
1912
|
-
|
1913
|
-
|
1945
|
+
* Sets the font icon for the Toolbar button of the current view.
|
1946
|
+
*/
|
1914
1947
|
set icon(value) {
|
1915
1948
|
if (isPresent(value)) {
|
1916
1949
|
this._icon = value;
|
@@ -1923,8 +1956,8 @@ class BaseView {
|
|
1923
1956
|
return this._icon;
|
1924
1957
|
}
|
1925
1958
|
/**
|
1926
|
-
|
1927
|
-
|
1959
|
+
* Sets the SVG icon for the Toolbar button of the current view.
|
1960
|
+
*/
|
1928
1961
|
set svgIcon(value) {
|
1929
1962
|
if (isPresent(value)) {
|
1930
1963
|
this._svgIcon = value;
|
@@ -2002,10 +2035,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2002
2035
|
}] });
|
2003
2036
|
|
2004
2037
|
/**
|
2005
|
-
* Represents a template
|
2006
|
-
* The actions
|
2038
|
+
* Represents a template for additional Toolbar actions.
|
2039
|
+
* The actions appear after the Toolbar buttons for all views.
|
2040
|
+
*
|
2007
2041
|
* To define the template, nest an `<ng-template>` tag
|
2008
2042
|
* with the `kendoAIPromptToolbarActionsTemplate` directive inside the `<kendo-aiprompt>` tag.
|
2043
|
+
*
|
2044
|
+
* @example
|
2045
|
+
* ```html
|
2046
|
+
* <kendo-aiprompt>
|
2047
|
+
* <ng-template kendoAIPromptToolbarActionsTemplate>
|
2048
|
+
* <button kendoButton>Custom Action</button>
|
2049
|
+
* </ng-template>
|
2050
|
+
* </kendo-aiprompt>
|
2051
|
+
* ```
|
2009
2052
|
*/
|
2010
2053
|
class AIPromptToolbarActionsDirective {
|
2011
2054
|
templateRef;
|
@@ -2142,39 +2185,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2142
2185
|
*/
|
2143
2186
|
class Messages extends ComponentMessages {
|
2144
2187
|
/**
|
2145
|
-
*
|
2188
|
+
* Sets the Toolbar button text for the **Prompt** view.
|
2146
2189
|
*/
|
2147
2190
|
promptView;
|
2148
2191
|
/**
|
2149
|
-
*
|
2192
|
+
* Sets the Toolbar button text for the **Output** view.
|
2150
2193
|
*/
|
2151
2194
|
outputView;
|
2152
2195
|
/**
|
2153
|
-
*
|
2196
|
+
* Sets the text for the **Generate** button in the **Prompt** view.
|
2154
2197
|
*/
|
2155
2198
|
generateOutput;
|
2156
2199
|
/**
|
2157
|
-
*
|
2200
|
+
* Sets the placeholder text for the **Prompt** view text area.
|
2158
2201
|
*/
|
2159
2202
|
promptPlaceholder;
|
2160
2203
|
/**
|
2161
|
-
*
|
2204
|
+
* Sets the text for the **Copy** button text in each **Output** view card.
|
2162
2205
|
*/
|
2163
2206
|
copyOutput;
|
2164
2207
|
/**
|
2165
|
-
*
|
2208
|
+
* Sets the **Retry** button text in each **Output** view card.
|
2166
2209
|
*/
|
2167
2210
|
retryGeneration;
|
2168
2211
|
/**
|
2169
|
-
*
|
2212
|
+
* Sets the title of each card in the **Output** view.
|
2170
2213
|
*/
|
2171
2214
|
outputTitle;
|
2172
2215
|
/**
|
2173
|
-
*
|
2216
|
+
* Sets the title of each retry card in the **Output** view.
|
2174
2217
|
*/
|
2175
2218
|
outputRetryTitle;
|
2176
2219
|
/**
|
2177
|
-
*
|
2220
|
+
* Sets the title of the **Prompt suggestions** button.
|
2178
2221
|
*/
|
2179
2222
|
promptSuggestions;
|
2180
2223
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
@@ -2234,7 +2277,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2234
2277
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
2235
2278
|
|
2236
2279
|
/**
|
2237
|
-
* Represents the Kendo UI AIPrompt component for Angular.
|
2280
|
+
* Represents the [Kendo UI AIPrompt component for Angular](slug:overview_aiprompt).
|
2281
|
+
*
|
2282
|
+
* @example
|
2283
|
+
* ```html
|
2284
|
+
* <kendo-aiprompt
|
2285
|
+
* [promptCommands]="commands"
|
2286
|
+
* [promptSuggestions]="suggestions"
|
2287
|
+
* [promptOutputs]="outputs"
|
2288
|
+
* [showOutputRating]="true"
|
2289
|
+
* (promptRequest)="onPromptRequest($event)">
|
2290
|
+
* </kendo-aiprompt>
|
2291
|
+
* ```
|
2238
2292
|
*/
|
2239
2293
|
class AIPromptComponent {
|
2240
2294
|
localization;
|
@@ -2277,52 +2331,52 @@ class AIPromptComponent {
|
|
2277
2331
|
return this._activeView;
|
2278
2332
|
}
|
2279
2333
|
/**
|
2280
|
-
*
|
2334
|
+
* Sets the collection of commands to render in the **Command** view.
|
2281
2335
|
*/
|
2282
2336
|
set promptCommands(value) {
|
2283
2337
|
this.service.promptCommands = value;
|
2284
2338
|
}
|
2285
2339
|
/**
|
2286
|
-
*
|
2340
|
+
* Sets the collection of suggestions to render in the **Prompt** view.
|
2287
2341
|
*/
|
2288
2342
|
set promptSuggestions(value) {
|
2289
2343
|
this.service.promptSuggestions = value;
|
2290
2344
|
}
|
2291
2345
|
/**
|
2292
|
-
*
|
2346
|
+
* Sets the collection of generated prompt outputs to render in the **Output** view.
|
2293
2347
|
*/
|
2294
2348
|
set promptOutputs(value) {
|
2295
2349
|
this.service.promptOutputs = value;
|
2296
2350
|
}
|
2297
2351
|
/**
|
2298
|
-
* Specifies if the rating buttons in each Output view card
|
2299
|
-
* By default, rating buttons
|
2300
|
-
*
|
2352
|
+
* Specifies if the rating buttons appear in each **Output** view card.
|
2353
|
+
* By default, the rating buttons do not appear.
|
2301
2354
|
* @default false
|
2302
2355
|
*/
|
2303
2356
|
set showOutputRating(value) {
|
2304
2357
|
this.service.showOutputRating = value;
|
2305
2358
|
}
|
2306
2359
|
/**
|
2307
|
-
* Fires when the `activeView` property
|
2308
|
-
*
|
2360
|
+
* Fires when the `activeView` property is updated.
|
2361
|
+
* Use this event for two-way binding of the `activeView` property.
|
2309
2362
|
*/
|
2310
2363
|
activeViewChange = new EventEmitter();
|
2311
2364
|
/**
|
2312
|
-
* Fires
|
2313
|
-
*
|
2365
|
+
* Fires when the user clicks the **Generate** button in the **Prompt** view or the **Retry** button in the **Output** view.
|
2366
|
+
* Use the event's `isRetry` field to determine the source element.
|
2314
2367
|
*/
|
2315
2368
|
promptRequest = new EventEmitter();
|
2316
2369
|
/**
|
2317
|
-
* Fires
|
2370
|
+
* Fires when the user clicks a **Command** view command.
|
2371
|
+
* The event data contains the selected command.
|
2318
2372
|
*/
|
2319
2373
|
commandExecute = new EventEmitter();
|
2320
2374
|
/**
|
2321
|
-
* Fires
|
2375
|
+
* Fires when the user clicks a **Copy** button in any **Output** view card.
|
2322
2376
|
*/
|
2323
2377
|
outputCopy = new EventEmitter();
|
2324
2378
|
/**
|
2325
|
-
* Fires
|
2379
|
+
* Fires when the user clicks a rating button in any **Output** view card.
|
2326
2380
|
*/
|
2327
2381
|
outputRatingChange = new EventEmitter();
|
2328
2382
|
ngAfterViewInit() {
|
@@ -2338,7 +2392,7 @@ class AIPromptComponent {
|
|
2338
2392
|
this.subs.unsubscribe();
|
2339
2393
|
}
|
2340
2394
|
/**
|
2341
|
-
* Focuses the first focusable element in the AIPrompt.
|
2395
|
+
* Focuses the first focusable element in the AIPrompt component.
|
2342
2396
|
*/
|
2343
2397
|
focus() {
|
2344
2398
|
this.navigationService.focusFirst();
|
@@ -2585,7 +2639,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2585
2639
|
}] } });
|
2586
2640
|
|
2587
2641
|
/**
|
2588
|
-
*
|
2642
|
+
* Represents the component that renders the **Command** view of the AIPrompt.
|
2643
|
+
*
|
2644
|
+
* @example
|
2645
|
+
* ```html
|
2646
|
+
* <kendo-aiprompt-command-view
|
2647
|
+
* buttonText="My command view">
|
2648
|
+
* </kendo-aiprompt-command-view>
|
2649
|
+
* ```
|
2589
2650
|
*/
|
2590
2651
|
class CommandViewComponent extends BaseView {
|
2591
2652
|
service;
|
@@ -2667,8 +2728,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2667
2728
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; } });
|
2668
2729
|
|
2669
2730
|
/**
|
2670
|
-
*
|
2671
|
-
*
|
2731
|
+
* Represents the custom messages component of the AIPrompt.
|
2732
|
+
*
|
2733
|
+
* Use this component to override default messages for the AIPrompt
|
2734
|
+
* ([see example](slug:globalization_chat#custom-messages)).
|
2735
|
+
*
|
2736
|
+
* @example
|
2737
|
+
* ```html
|
2738
|
+
* <kendo-aiprompt-messages
|
2739
|
+
* promptView="My prompt view"
|
2740
|
+
* outputView="My output view">
|
2741
|
+
* </kendo-aiprompt-messages>
|
2742
|
+
* ```
|
2672
2743
|
*/
|
2673
2744
|
class AIPromptCustomMessagesComponent extends Messages {
|
2674
2745
|
service;
|
@@ -2703,7 +2774,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2703
2774
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
2704
2775
|
|
2705
2776
|
/**
|
2706
|
-
*
|
2777
|
+
* Represents the component that renders a **Custom** view in the AIPrompt.
|
2778
|
+
*
|
2779
|
+
* @example
|
2780
|
+
* ```html
|
2781
|
+
* <kendo-aiprompt-custom-view [viewTemplate]="customTemplate">
|
2782
|
+
* </kendo-aiprompt-custom-view>
|
2783
|
+
*
|
2784
|
+
* <ng-template #customTemplate>
|
2785
|
+
* <div>Custom content here</div>
|
2786
|
+
* </ng-template>
|
2787
|
+
* ```
|
2707
2788
|
*/
|
2708
2789
|
class CustomViewComponent extends BaseView {
|
2709
2790
|
constructor(localization) {
|
@@ -2936,7 +3017,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2936
3017
|
}] } });
|
2937
3018
|
|
2938
3019
|
/**
|
2939
|
-
*
|
3020
|
+
* Represents the component that renders the **Output** view of the AIPrompt.
|
3021
|
+
*
|
3022
|
+
* @example
|
3023
|
+
* ```html
|
3024
|
+
* <kendo-aiprompt-output-view
|
3025
|
+
* buttonText="My output view">
|
3026
|
+
* </kendo-aiprompt-output-view>
|
3027
|
+
* ```
|
2940
3028
|
*/
|
2941
3029
|
class OutputViewComponent extends BaseView {
|
2942
3030
|
service;
|
@@ -2993,7 +3081,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
2993
3081
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; } });
|
2994
3082
|
|
2995
3083
|
/**
|
2996
|
-
*
|
3084
|
+
* Represents the component that renders the **Prompt** view of the AIPrompt.
|
3085
|
+
*
|
3086
|
+
* @example
|
3087
|
+
* ```html
|
3088
|
+
* <kendo-aiprompt-prompt-view
|
3089
|
+
* buttonText="My prompt view">
|
3090
|
+
* </kendo-aiprompt-prompt-view>
|
3091
|
+
* ```
|
2997
3092
|
*/
|
2998
3093
|
class PromptViewComponent extends BaseView {
|
2999
3094
|
service;
|
@@ -3129,8 +3224,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3129
3224
|
|
3130
3225
|
// eslint-disable no-forward-ref
|
3131
3226
|
/**
|
3132
|
-
*
|
3133
|
-
*
|
3227
|
+
* Represents the custom messages component of the Chat.
|
3228
|
+
*
|
3229
|
+
* Use this component to override default messages for the Chat
|
3230
|
+
* ([see example](slug:globalization_chat#custom-messages)).
|
3231
|
+
*
|
3232
|
+
* @example
|
3233
|
+
* ```html
|
3234
|
+
* <kendo-chat-messages
|
3235
|
+
* send="Send Message"
|
3236
|
+
* messagePlaceholder="Type here...">
|
3237
|
+
* </kendo-chat-messages>
|
3238
|
+
* ```
|
3134
3239
|
*/
|
3135
3240
|
class CustomMessagesComponent extends Messages$1 {
|
3136
3241
|
service;
|
@@ -3165,24 +3270,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3165
3270
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
3166
3271
|
|
3167
3272
|
/**
|
3168
|
-
* Represents a Hero Card component ([see example](
|
3273
|
+
* Represents a Hero Card component ([see example](slug:dialogflow_chat)).
|
3169
3274
|
* Hero cards host a single large image and action buttons with text content.
|
3275
|
+
*
|
3276
|
+
* @example
|
3277
|
+
* ```html
|
3278
|
+
* <kendo-chat-hero-card
|
3279
|
+
* title="Card Title"
|
3280
|
+
* subtitle="Card Subtitle"
|
3281
|
+
* [actions]="actions">
|
3282
|
+
* </kendo-chat-hero-card>
|
3283
|
+
* ```
|
3170
3284
|
*/
|
3171
3285
|
class HeroCardComponent {
|
3172
3286
|
/**
|
3173
|
-
*
|
3287
|
+
* Sets the URL of the hero card image.
|
3174
3288
|
*/
|
3175
3289
|
imageUrl;
|
3176
3290
|
/**
|
3177
|
-
*
|
3291
|
+
* Sets the title of the hero card.
|
3178
3292
|
*/
|
3179
3293
|
title;
|
3180
3294
|
/**
|
3181
|
-
*
|
3295
|
+
* Sets the subtitle of the hero card.
|
3182
3296
|
*/
|
3183
3297
|
subtitle;
|
3184
3298
|
/**
|
3185
|
-
*
|
3299
|
+
* Sets the array of quick actions for this hero card.
|
3186
3300
|
*/
|
3187
3301
|
actions;
|
3188
3302
|
cssClass = true;
|
@@ -3190,6 +3304,9 @@ class HeroCardComponent {
|
|
3190
3304
|
* Fires when the user clicks a button.
|
3191
3305
|
*/
|
3192
3306
|
executeAction = new EventEmitter();
|
3307
|
+
/**
|
3308
|
+
* Emits the `executeAction` event when the user clicks an action button.
|
3309
|
+
*/
|
3193
3310
|
onClick(action) {
|
3194
3311
|
this.executeAction.next(action);
|
3195
3312
|
}
|
@@ -3264,7 +3381,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3264
3381
|
}] } });
|
3265
3382
|
|
3266
3383
|
/**
|
3267
|
-
* Utility array that contains all
|
3384
|
+
* Utility array that contains all AIPrompt related components and directives.
|
3385
|
+
*
|
3386
|
+
* @example
|
3387
|
+
* ```ts
|
3388
|
+
* import { Component } from '@angular/core';
|
3389
|
+
* import { KENDO_AIPROMPT } from '@progress/kendo-angular-conversational-ui';
|
3390
|
+
*
|
3391
|
+
* @Component({
|
3392
|
+
* standalone: true,
|
3393
|
+
* imports: [KENDO_AIPROMPT],
|
3394
|
+
* selector: 'my-app',
|
3395
|
+
* template: `<kendo-aiprompt></kendo-aiprompt>`
|
3396
|
+
* })
|
3397
|
+
* export class AppComponent {}
|
3398
|
+
* ```
|
3268
3399
|
*/
|
3269
3400
|
const KENDO_AIPROMPT = [
|
3270
3401
|
AIPromptComponent,
|
@@ -3277,7 +3408,21 @@ const KENDO_AIPROMPT = [
|
|
3277
3408
|
AIPromptToolbarFocusableDirective
|
3278
3409
|
];
|
3279
3410
|
/**
|
3280
|
-
* Utility array that contains all
|
3411
|
+
* Utility array that contains all Chat related components and directives.
|
3412
|
+
*
|
3413
|
+
* @example
|
3414
|
+
* ```ts
|
3415
|
+
* import { Component } from '@angular/core';
|
3416
|
+
* import { KENDO_CHAT } from '@progress/kendo-angular-conversational-ui';
|
3417
|
+
*
|
3418
|
+
* @Component({
|
3419
|
+
* standalone: true,
|
3420
|
+
* imports: [KENDO_CHAT],
|
3421
|
+
* selector: 'my-app',
|
3422
|
+
* template: `<kendo-chat></kendo-chat>`
|
3423
|
+
* })
|
3424
|
+
* export class AppComponent {}
|
3425
|
+
* ```
|
3281
3426
|
*/
|
3282
3427
|
const KENDO_CHAT = [
|
3283
3428
|
ChatComponent,
|
@@ -3288,7 +3433,24 @@ const KENDO_CHAT = [
|
|
3288
3433
|
ChatMessageBoxTemplateDirective
|
3289
3434
|
];
|
3290
3435
|
/**
|
3291
|
-
* Utility array that contains all `@progress/kendo-angular-conversational-ui` related components and directives
|
3436
|
+
* Utility array that contains all `@progress/kendo-angular-conversational-ui` related components and directives.
|
3437
|
+
*
|
3438
|
+
* @example
|
3439
|
+
* ```ts
|
3440
|
+
* import { Component } from '@angular/core';
|
3441
|
+
* import { KENDO_CONVERSATIONALUI } from '@progress/kendo-angular-conversational-ui';
|
3442
|
+
*
|
3443
|
+
* @Component({
|
3444
|
+
* standalone: true,
|
3445
|
+
* imports: [KENDO_CONVERSATIONALUI],
|
3446
|
+
* selector: 'my-app',
|
3447
|
+
* template: `
|
3448
|
+
* <kendo-aiprompt></kendo-aiprompt>
|
3449
|
+
* <kendo-chat></kendo-chat>
|
3450
|
+
* `
|
3451
|
+
* })
|
3452
|
+
* export class AppComponent {}
|
3453
|
+
* ```
|
3292
3454
|
*/
|
3293
3455
|
const KENDO_CONVERSATIONALUI = [
|
3294
3456
|
...KENDO_AIPROMPT,
|
@@ -3297,24 +3459,21 @@ const KENDO_CONVERSATIONALUI = [
|
|
3297
3459
|
|
3298
3460
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
3299
3461
|
/**
|
3300
|
-
*
|
3462
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
|
3301
3463
|
*
|
3302
3464
|
* @example
|
3303
|
-
* ```ts
|
3465
|
+
* ```ts
|
3304
3466
|
* import { NgModule } from '@angular/core';
|
3305
|
-
* import { Component } from '@angular/core';
|
3306
3467
|
* import { BrowserModule } from '@angular/platform-browser';
|
3307
|
-
*
|
3308
3468
|
* import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
3309
|
-
* import { AppComponent }
|
3469
|
+
* import { AppComponent } from './app.component';
|
3310
3470
|
*
|
3311
|
-
*
|
3312
|
-
* imports:
|
3313
|
-
* declarations: [
|
3314
|
-
* bootstrap:
|
3471
|
+
* @NgModule({
|
3472
|
+
* imports: [BrowserModule, AIPromptModule],
|
3473
|
+
* declarations: [AppComponent],
|
3474
|
+
* bootstrap: [AppComponent]
|
3315
3475
|
* })
|
3316
|
-
*
|
3317
|
-
* export class AppModule { }
|
3476
|
+
* export class AppModule {}
|
3318
3477
|
* ```
|
3319
3478
|
*/
|
3320
3479
|
class AIPromptModule {
|
@@ -3333,7 +3492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3333
3492
|
|
3334
3493
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
3335
3494
|
/**
|
3336
|
-
*
|
3495
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the Chat component.
|
3337
3496
|
*
|
3338
3497
|
* @example
|
3339
3498
|
* ```ts-no-run
|
@@ -3342,12 +3501,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3342
3501
|
* import { BrowserModule } from '@angular/platform-browser';
|
3343
3502
|
*
|
3344
3503
|
* import { ChatModule } from '@progress/kendo-angular-conversational-ui';
|
3345
|
-
* import { AppComponent }
|
3504
|
+
* import { AppComponent } from './app.component';
|
3346
3505
|
*
|
3347
3506
|
* _@NgModule({
|
3348
|
-
* imports:
|
3349
|
-
* declarations: [
|
3350
|
-
* bootstrap:
|
3507
|
+
* imports: [BrowserModule, ChatModule],
|
3508
|
+
* declarations: [AppComponent],
|
3509
|
+
* bootstrap: [AppComponent]
|
3351
3510
|
* })
|
3352
3511
|
*
|
3353
3512
|
* export class AppModule { }
|
@@ -3369,34 +3528,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3369
3528
|
|
3370
3529
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
3371
3530
|
/**
|
3372
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
|
3373
|
-
* definition for the Conversational UI components.
|
3531
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the Conversational UI components.
|
3374
3532
|
*
|
3375
3533
|
* @example
|
3376
|
-
*
|
3377
|
-
* ```ts-no-run
|
3378
|
-
* // Import the Conversational UI module
|
3379
|
-
* import { ConversationalUIModule } from '@progress/kendo-angular-conversational-ui';
|
3380
|
-
*
|
3381
|
-
* // The browser platform with a compiler
|
3382
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
3383
|
-
*
|
3534
|
+
* ```ts
|
3384
3535
|
* import { NgModule } from '@angular/core';
|
3385
|
-
*
|
3386
|
-
*
|
3536
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
3537
|
+
* import { ConversationalUIModule } from '@progress/kendo-angular-conversational-ui';
|
3387
3538
|
* import { AppComponent } from './app.component';
|
3388
3539
|
*
|
3389
|
-
*
|
3390
|
-
*
|
3391
|
-
*
|
3392
|
-
*
|
3393
|
-
* bootstrap: [AppComponent]
|
3540
|
+
* @NgModule({
|
3541
|
+
* declarations: [AppComponent],
|
3542
|
+
* imports: [BrowserModule, ConversationalUIModule],
|
3543
|
+
* bootstrap: [AppComponent]
|
3394
3544
|
* })
|
3395
3545
|
* export class AppModule {}
|
3396
|
-
*
|
3397
|
-
* // Compile and launch the module
|
3398
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
3399
|
-
*
|
3400
3546
|
* ```
|
3401
3547
|
*/
|
3402
3548
|
class ConversationalUIModule {
|