@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
@@ -12,7 +12,18 @@ import { AIPromptToolbarActionsDirective } from "./templates/toolbar-actions.tem
|
|
12
12
|
import { ToolbarNavigationService } from "./common/toolbar-navigation.service";
|
13
13
|
import * as i0 from "@angular/core";
|
14
14
|
/**
|
15
|
-
* Represents the Kendo UI AIPrompt component for Angular.
|
15
|
+
* Represents the [Kendo UI AIPrompt component for Angular](slug:overview_aiprompt).
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* ```html
|
19
|
+
* <kendo-aiprompt
|
20
|
+
* [promptCommands]="commands"
|
21
|
+
* [promptSuggestions]="suggestions"
|
22
|
+
* [promptOutputs]="outputs"
|
23
|
+
* [showOutputRating]="true"
|
24
|
+
* (promptRequest)="onPromptRequest($event)">
|
25
|
+
* </kendo-aiprompt>
|
26
|
+
* ```
|
16
27
|
*/
|
17
28
|
export declare class AIPromptComponent implements AfterViewInit, OnDestroy {
|
18
29
|
private localization;
|
@@ -36,50 +47,50 @@ export declare class AIPromptComponent implements AfterViewInit, OnDestroy {
|
|
36
47
|
set activeView(idx: number);
|
37
48
|
get activeView(): number;
|
38
49
|
/**
|
39
|
-
*
|
50
|
+
* Sets the collection of commands to render in the **Command** view.
|
40
51
|
*/
|
41
52
|
set promptCommands(value: Array<PromptCommand>);
|
42
53
|
/**
|
43
|
-
*
|
54
|
+
* Sets the collection of suggestions to render in the **Prompt** view.
|
44
55
|
*/
|
45
56
|
set promptSuggestions(value: Array<string>);
|
46
57
|
/**
|
47
|
-
*
|
58
|
+
* Sets the collection of generated prompt outputs to render in the **Output** view.
|
48
59
|
*/
|
49
60
|
set promptOutputs(value: Array<PromptOutput>);
|
50
61
|
/**
|
51
|
-
* Specifies if the rating buttons in each Output view card
|
52
|
-
* By default, rating buttons
|
53
|
-
*
|
62
|
+
* Specifies if the rating buttons appear in each **Output** view card.
|
63
|
+
* By default, the rating buttons do not appear.
|
54
64
|
* @default false
|
55
65
|
*/
|
56
66
|
set showOutputRating(value: boolean);
|
57
67
|
/**
|
58
|
-
* Fires when the `activeView` property
|
59
|
-
*
|
68
|
+
* Fires when the `activeView` property is updated.
|
69
|
+
* Use this event for two-way binding of the `activeView` property.
|
60
70
|
*/
|
61
71
|
activeViewChange: EventEmitter<number>;
|
62
72
|
/**
|
63
|
-
* Fires
|
64
|
-
*
|
73
|
+
* Fires when the user clicks the **Generate** button in the **Prompt** view or the **Retry** button in the **Output** view.
|
74
|
+
* Use the event's `isRetry` field to determine the source element.
|
65
75
|
*/
|
66
76
|
promptRequest: EventEmitter<PromptRequestEvent>;
|
67
77
|
/**
|
68
|
-
* Fires
|
78
|
+
* Fires when the user clicks a **Command** view command.
|
79
|
+
* The event data contains the selected command.
|
69
80
|
*/
|
70
81
|
commandExecute: EventEmitter<CommandExecuteEvent>;
|
71
82
|
/**
|
72
|
-
* Fires
|
83
|
+
* Fires when the user clicks a **Copy** button in any **Output** view card.
|
73
84
|
*/
|
74
85
|
outputCopy: EventEmitter<PromptOutput>;
|
75
86
|
/**
|
76
|
-
* Fires
|
87
|
+
* Fires when the user clicks a rating button in any **Output** view card.
|
77
88
|
*/
|
78
89
|
outputRatingChange: EventEmitter<OutputRatingChangeEvent>;
|
79
90
|
ngAfterViewInit(): void;
|
80
91
|
ngOnDestroy(): void;
|
81
92
|
/**
|
82
|
-
* Focuses the first focusable element in the AIPrompt.
|
93
|
+
* Focuses the first focusable element in the AIPrompt component.
|
83
94
|
*/
|
84
95
|
focus(): void;
|
85
96
|
private subs;
|
@@ -12,24 +12,21 @@ import * as i6 from "./localization/custom-messages.component";
|
|
12
12
|
import * as i7 from "./templates/toolbar-actions.template";
|
13
13
|
import * as i8 from "./common/toolbar-focusable.directive";
|
14
14
|
/**
|
15
|
-
*
|
15
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
|
16
16
|
*
|
17
17
|
* @example
|
18
|
-
* ```ts
|
18
|
+
* ```ts
|
19
19
|
* import { NgModule } from '@angular/core';
|
20
|
-
* import { Component } from '@angular/core';
|
21
20
|
* import { BrowserModule } from '@angular/platform-browser';
|
22
|
-
*
|
23
21
|
* import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
24
|
-
* import { AppComponent }
|
22
|
+
* import { AppComponent } from './app.component';
|
25
23
|
*
|
26
|
-
*
|
27
|
-
* imports:
|
28
|
-
* declarations: [
|
29
|
-
* bootstrap:
|
24
|
+
* @NgModule({
|
25
|
+
* imports: [BrowserModule, AIPromptModule],
|
26
|
+
* declarations: [AppComponent],
|
27
|
+
* bootstrap: [AppComponent]
|
30
28
|
* })
|
31
|
-
*
|
32
|
-
* export class AppModule { }
|
29
|
+
* export class AppModule {}
|
33
30
|
* ```
|
34
31
|
*/
|
35
32
|
export declare class AIPromptModule {
|
@@ -6,8 +6,18 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
6
|
import { Messages } from './messages';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
/**
|
9
|
-
*
|
10
|
-
*
|
9
|
+
* Represents the custom messages component of the AIPrompt.
|
10
|
+
*
|
11
|
+
* Use this component to override default messages for the AIPrompt
|
12
|
+
* ([see example](slug:globalization_chat#custom-messages)).
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* ```html
|
16
|
+
* <kendo-aiprompt-messages
|
17
|
+
* promptView="My prompt view"
|
18
|
+
* outputView="My output view">
|
19
|
+
* </kendo-aiprompt-messages>
|
20
|
+
* ```
|
11
21
|
*/
|
12
22
|
export declare class AIPromptCustomMessagesComponent extends Messages {
|
13
23
|
protected service: LocalizationService;
|
@@ -9,39 +9,39 @@ import * as i0 from "@angular/core";
|
|
9
9
|
*/
|
10
10
|
export declare class Messages extends ComponentMessages {
|
11
11
|
/**
|
12
|
-
*
|
12
|
+
* Sets the Toolbar button text for the **Prompt** view.
|
13
13
|
*/
|
14
14
|
promptView: string;
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* Sets the Toolbar button text for the **Output** view.
|
17
17
|
*/
|
18
18
|
outputView: string;
|
19
19
|
/**
|
20
|
-
*
|
20
|
+
* Sets the text for the **Generate** button in the **Prompt** view.
|
21
21
|
*/
|
22
22
|
generateOutput: string;
|
23
23
|
/**
|
24
|
-
*
|
24
|
+
* Sets the placeholder text for the **Prompt** view text area.
|
25
25
|
*/
|
26
26
|
promptPlaceholder: string;
|
27
27
|
/**
|
28
|
-
*
|
28
|
+
* Sets the text for the **Copy** button text in each **Output** view card.
|
29
29
|
*/
|
30
30
|
copyOutput: string;
|
31
31
|
/**
|
32
|
-
*
|
32
|
+
* Sets the **Retry** button text in each **Output** view card.
|
33
33
|
*/
|
34
34
|
retryGeneration: string;
|
35
35
|
/**
|
36
|
-
*
|
36
|
+
* Sets the title of each card in the **Output** view.
|
37
37
|
*/
|
38
38
|
outputTitle: string;
|
39
39
|
/**
|
40
|
-
*
|
40
|
+
* Sets the title of each retry card in the **Output** view.
|
41
41
|
*/
|
42
42
|
outputRetryTitle: string;
|
43
43
|
/**
|
44
|
-
*
|
44
|
+
* Sets the title of the **Prompt suggestions** button.
|
45
45
|
*/
|
46
46
|
promptSuggestions: string;
|
47
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
@@ -5,16 +5,16 @@
|
|
5
5
|
import { AIPromptComponent } from "../aiprompt.component";
|
6
6
|
import { PromptCommand } from "./command.interface";
|
7
7
|
/**
|
8
|
-
*
|
9
|
-
* ([see example](
|
8
|
+
* Represents the arguments for the `commandExecute` event of the AIPrompt
|
9
|
+
* ([see example](slug:events_aiprompt)).
|
10
10
|
*/
|
11
11
|
export interface CommandExecuteEvent {
|
12
12
|
/**
|
13
|
-
*
|
13
|
+
* Contains information about the selected command.
|
14
14
|
*/
|
15
15
|
command: PromptCommand;
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* Represents the instance of the AIPrompt component.
|
18
18
|
*/
|
19
19
|
sender: AIPromptComponent;
|
20
20
|
/**
|
@@ -4,11 +4,11 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import { SVGIcon } from "@progress/kendo-svg-icons";
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* Defines the interface for the AIPrompt commands rendered in the Command view.
|
8
8
|
*/
|
9
9
|
export interface PromptCommand {
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* Represents the unique identifier of the command.
|
12
12
|
*/
|
13
13
|
id: string | number;
|
14
14
|
/**
|
@@ -16,11 +16,11 @@ export interface PromptCommand {
|
|
16
16
|
*/
|
17
17
|
text?: string;
|
18
18
|
/**
|
19
|
-
* Specifies the name of the [font icon](slug:icons#icons-list)
|
19
|
+
* Specifies the name of the [font icon](slug:icons#icons-list) to render for the command.
|
20
20
|
*/
|
21
21
|
icon?: string;
|
22
22
|
/**
|
23
|
-
* Specifies the name of the [SVG icon](
|
23
|
+
* Specifies the name of the [SVG icon](slug:svgicon_list) to render for the command.
|
24
24
|
*/
|
25
25
|
svgIcon?: SVGIcon;
|
26
26
|
/**
|
@@ -4,16 +4,16 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import { PromptOutput, PromptOutputRating } from "./prompt-output.interface";
|
6
6
|
/**
|
7
|
-
*
|
8
|
-
* ([see example](
|
7
|
+
* Represents the arguments for the `outputRatingChange` event of the AIPrompt
|
8
|
+
* ([see example](slug:events_aiprompt)).
|
9
9
|
*/
|
10
10
|
export interface OutputRatingChangeEvent {
|
11
11
|
/**
|
12
|
-
*
|
12
|
+
* Specifies the prompt output for which the rating changes.
|
13
13
|
*/
|
14
14
|
promptOutput: PromptOutput;
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* Specifies the prompt output rating.
|
17
17
|
*/
|
18
18
|
rating: PromptOutputRating;
|
19
19
|
}
|
@@ -3,35 +3,35 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* Defines the interface for the AIPrompt outputs rendered in the **Output** view.
|
7
7
|
*/
|
8
8
|
export interface PromptOutput {
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* Represents the unique identifier of the prompt output.
|
11
11
|
*/
|
12
12
|
id: number | string;
|
13
13
|
/**
|
14
|
-
*
|
14
|
+
* Represents the text content of the prompt output.
|
15
15
|
*/
|
16
16
|
output: string;
|
17
17
|
/**
|
18
|
-
*
|
18
|
+
* Represents the prompt that initiates the output generation.
|
19
19
|
*/
|
20
20
|
prompt: string;
|
21
21
|
/**
|
22
|
-
*
|
22
|
+
* Specifies an optional custom title for the prompt section.
|
23
23
|
*/
|
24
24
|
title?: string;
|
25
25
|
/**
|
26
|
-
* Specifies if the prompt generation
|
26
|
+
* Specifies if the prompt generation is initiated with the **Retry** button.
|
27
27
|
*/
|
28
28
|
isRetry?: boolean;
|
29
29
|
/**
|
30
|
-
*
|
30
|
+
* (Optional) Specifies a command id, if the prompt generation is triggered via a command.
|
31
31
|
*/
|
32
32
|
commandId?: string | number;
|
33
33
|
/**
|
34
|
-
*
|
34
|
+
* (Optional) Specifies the rating for the prompt output.
|
35
35
|
*/
|
36
36
|
rating?: PromptOutputRating;
|
37
37
|
}
|
@@ -4,20 +4,20 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import { AIPromptComponent } from "../aiprompt.component";
|
6
6
|
/**
|
7
|
-
*
|
8
|
-
* ([see example](
|
7
|
+
* Represents the arguments for the `promptRequest` event of the AIPrompt
|
8
|
+
* ([see example](slug:events_aiprompt)).
|
9
9
|
*/
|
10
10
|
export interface PromptRequestEvent {
|
11
11
|
/**
|
12
|
-
*
|
12
|
+
* Represents the user prompt input.
|
13
13
|
*/
|
14
14
|
prompt: string;
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* Represents the instance of the AIPrompt component.
|
17
17
|
*/
|
18
18
|
sender: AIPromptComponent;
|
19
19
|
/**
|
20
|
-
* Specifies if the event is triggered by the
|
20
|
+
* Specifies if the event is triggered by the **Retry** button.
|
21
21
|
*/
|
22
22
|
isRetry: boolean;
|
23
23
|
}
|
@@ -5,10 +5,20 @@
|
|
5
5
|
import { TemplateRef } from '@angular/core';
|
6
6
|
import * as i0 from "@angular/core";
|
7
7
|
/**
|
8
|
-
* Represents a template
|
9
|
-
* The actions
|
8
|
+
* Represents a template for additional Toolbar actions.
|
9
|
+
* The actions appear after the Toolbar buttons for all views.
|
10
|
+
*
|
10
11
|
* To define the template, nest an `<ng-template>` tag
|
11
12
|
* with the `kendoAIPromptToolbarActionsTemplate` directive inside the `<kendo-aiprompt>` tag.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* ```html
|
16
|
+
* <kendo-aiprompt>
|
17
|
+
* <ng-template kendoAIPromptToolbarActionsTemplate>
|
18
|
+
* <button kendoButton>Custom Action</button>
|
19
|
+
* </ng-template>
|
20
|
+
* </kendo-aiprompt>
|
21
|
+
* ```
|
12
22
|
*/
|
13
23
|
export declare class AIPromptToolbarActionsDirective {
|
14
24
|
templateRef: TemplateRef<any>;
|
@@ -20,18 +20,18 @@ export declare abstract class BaseView {
|
|
20
20
|
template: TemplateRef<any>;
|
21
21
|
constructor(viewType: ViewType, localization: LocalizationService);
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* Sets the text for the Toolbar button of the current view.
|
24
24
|
*/
|
25
25
|
set buttonText(value: string);
|
26
26
|
get buttonText(): string;
|
27
27
|
/**
|
28
|
-
|
29
|
-
|
28
|
+
* Sets the font icon for the Toolbar button of the current view.
|
29
|
+
*/
|
30
30
|
set icon(value: string);
|
31
31
|
get icon(): string;
|
32
32
|
/**
|
33
|
-
|
34
|
-
|
33
|
+
* Sets the SVG icon for the Toolbar button of the current view.
|
34
|
+
*/
|
35
35
|
set svgIcon(value: SVGIcon);
|
36
36
|
get svgIcon(): SVGIcon;
|
37
37
|
/**
|
@@ -9,7 +9,14 @@ import { BaseView } from './base-view';
|
|
9
9
|
import { AIPromptService } from '../common/aiprompt.service';
|
10
10
|
import * as i0 from "@angular/core";
|
11
11
|
/**
|
12
|
-
*
|
12
|
+
* Represents the component that renders the **Command** view of the AIPrompt.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* ```html
|
16
|
+
* <kendo-aiprompt-command-view
|
17
|
+
* buttonText="My command view">
|
18
|
+
* </kendo-aiprompt-command-view>
|
19
|
+
* ```
|
13
20
|
*/
|
14
21
|
export declare class CommandViewComponent extends BaseView implements OnInit {
|
15
22
|
private service;
|
@@ -7,7 +7,17 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { BaseView } from './base-view';
|
8
8
|
import * as i0 from "@angular/core";
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* Represents the component that renders a **Custom** view in the AIPrompt.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```html
|
14
|
+
* <kendo-aiprompt-custom-view [viewTemplate]="customTemplate">
|
15
|
+
* </kendo-aiprompt-custom-view>
|
16
|
+
*
|
17
|
+
* <ng-template #customTemplate>
|
18
|
+
* <div>Custom content here</div>
|
19
|
+
* </ng-template>
|
20
|
+
* ```
|
11
21
|
*/
|
12
22
|
export declare class CustomViewComponent extends BaseView {
|
13
23
|
constructor(localization: LocalizationService);
|
@@ -8,7 +8,14 @@ import { PromptOutput } from '../models/prompt-output.interface';
|
|
8
8
|
import { AIPromptService } from '../common/aiprompt.service';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* Represents the component that renders the **Output** view of the AIPrompt.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* ```html
|
15
|
+
* <kendo-aiprompt-output-view
|
16
|
+
* buttonText="My output view">
|
17
|
+
* </kendo-aiprompt-output-view>
|
18
|
+
* ```
|
12
19
|
*/
|
13
20
|
export declare class OutputViewComponent extends BaseView {
|
14
21
|
private service;
|
@@ -8,7 +8,14 @@ import { BaseView } from './base-view';
|
|
8
8
|
import { AIPromptService } from '../common/aiprompt.service';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* Represents the component that renders the **Prompt** view of the AIPrompt.
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* ```html
|
15
|
+
* <kendo-aiprompt-prompt-view
|
16
|
+
* buttonText="My prompt view">
|
17
|
+
* </kendo-aiprompt-prompt-view>
|
18
|
+
* ```
|
12
19
|
*/
|
13
20
|
export declare class PromptViewComponent extends BaseView {
|
14
21
|
private service;
|
@@ -3,29 +3,28 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* Specifies the button type of a quick action ([see example](slug:suggested_actions_chat)).
|
7
7
|
* * `openUrl`—Opens a new browser window with the specified URL.
|
8
8
|
* * `reply`—Sends the action value as a reply in the Chat.
|
9
|
-
* * `call`—Treats
|
10
|
-
* * other—Handled by user code in the [`
|
9
|
+
* * `call`—Treats the value as a phone number. Similar to clicking a [telephone link](https://css-tricks.com/the-current-state-of-telephone-links/).
|
10
|
+
* * other—Handled by user code in the [`executeAction`](slug:api_conversational-ui_chatcomponent#executeaction) event.
|
11
11
|
*/
|
12
12
|
export type ActionType = 'openUrl' | 'reply' | 'call' | string;
|
13
13
|
/**
|
14
14
|
* Defines a quick action for a message.
|
15
|
-
* The value is interpreted according to the specified
|
15
|
+
* The value is interpreted according to the specified `ActionType`.
|
16
16
|
*/
|
17
17
|
export interface Action {
|
18
18
|
/**
|
19
|
-
*
|
19
|
+
* Sets a predefined or custom type for the action.
|
20
20
|
*/
|
21
21
|
type: ActionType;
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* Sets the value associated with the action.
|
24
24
|
*/
|
25
25
|
value: any;
|
26
26
|
/**
|
27
|
-
*
|
28
|
-
* If omitted, the Chat displays the value instead.
|
27
|
+
* Sets the title for the quick action. If not set, the Chat displays the value.
|
29
28
|
*/
|
30
29
|
title?: string;
|
31
30
|
}
|
@@ -3,33 +3,31 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
* Represents a message attachment ([see example](
|
7
|
-
*
|
6
|
+
* Represents a message attachment ([see example](slug:attachments_chat)).
|
8
7
|
*/
|
9
8
|
export interface Attachment {
|
10
9
|
/**
|
11
|
-
*
|
12
|
-
* Typically a MIME type. Can also be any string.
|
10
|
+
* Sets the content type identifier for the attachment. Typically a MIME type or any string.
|
13
11
|
*/
|
14
12
|
contentType: string;
|
15
13
|
/**
|
16
|
-
*
|
14
|
+
* Sets the content of the attachment.
|
17
15
|
*/
|
18
16
|
content: any;
|
19
17
|
/**
|
20
|
-
*
|
18
|
+
* Sets the title of the attachment.
|
21
19
|
*/
|
22
20
|
title?: string;
|
23
21
|
/**
|
24
|
-
*
|
22
|
+
* Sets the subtitle of the attachment.
|
25
23
|
*/
|
26
24
|
subtitle?: string;
|
27
25
|
}
|
28
26
|
/**
|
29
|
-
* Specifies the layout for the message attachments ([see examples](
|
27
|
+
* Specifies the layout for the message attachments ([see examples](slug:attachments_chat#display-modes)).
|
30
28
|
*
|
31
29
|
* The supported values are:
|
32
|
-
* * `
|
33
|
-
* * `
|
30
|
+
* * `list`—A vertical list.
|
31
|
+
* * `carousel`—A horizontal, scrollable list. Also called a card deck.
|
34
32
|
*/
|
35
33
|
export type AttachmentLayout = 'list' | 'carousel';
|
@@ -6,16 +6,18 @@ import { PreventableEvent } from "./preventable-event";
|
|
6
6
|
import { Message } from "./message.interface";
|
7
7
|
import { Action } from "./action.interface";
|
8
8
|
/**
|
9
|
-
*
|
10
|
-
*
|
9
|
+
* Represents the arguments for the `executeAction` event.
|
10
|
+
*
|
11
|
+
* The `executeAction` event fires when the user clicks a quick action button.
|
12
|
+
* Call `preventDefault()` to suppress the built-in action handler.
|
11
13
|
*/
|
12
14
|
export declare class ExecuteActionEvent extends PreventableEvent {
|
13
15
|
/**
|
14
|
-
*
|
16
|
+
* Represents the action to execute.
|
15
17
|
*/
|
16
18
|
action: Action;
|
17
19
|
/**
|
18
|
-
*
|
20
|
+
* Represents the message that contains the action.
|
19
21
|
*/
|
20
22
|
message: Message;
|
21
23
|
/**
|
@@ -8,49 +8,43 @@ import { User } from './user.interface';
|
|
8
8
|
/**
|
9
9
|
* Represents a Chat message ([see example](slug:overview_convui)).
|
10
10
|
*
|
11
|
-
* > * You
|
12
|
-
* > * [Local users](
|
13
|
-
*
|
14
|
-
* > * If `typing` is set to `true`, the Chat displays a typing indicator instead of text.
|
11
|
+
* > * You must provide the `author` field.
|
12
|
+
* > * [Local users](slug:api_conversational-ui_chatcomponent#user) appear on the right in left-to-right languages and on the left in right-to-left languages.
|
13
|
+
* > * If `typing` is `true`, the Chat shows a typing indicator instead of text.
|
15
14
|
*/
|
16
15
|
export interface Message {
|
17
16
|
/**
|
18
|
-
*
|
17
|
+
* Sets the author of the message.
|
19
18
|
*/
|
20
19
|
author: User;
|
21
20
|
/**
|
22
|
-
*
|
21
|
+
* Sets the layout for displaying message attachments.
|
23
22
|
*/
|
24
23
|
attachmentLayout?: AttachmentLayout;
|
25
24
|
/**
|
26
|
-
*
|
25
|
+
* Sets the message attachments.
|
27
26
|
*/
|
28
27
|
attachments?: Attachment[];
|
29
28
|
/**
|
30
|
-
*
|
29
|
+
* Sets the suggested quick actions to display below this message.
|
31
30
|
*
|
32
|
-
* > Suggested actions
|
31
|
+
* > Suggested actions appear only for the last message in the conversation.
|
33
32
|
*/
|
34
33
|
suggestedActions?: Action[];
|
35
34
|
/**
|
36
|
-
*
|
37
|
-
* The status is displayed when the message is selected—either
|
38
|
-
* by clicking on it or by using the keyboard navigation shortcuts.
|
35
|
+
* Sets the status string for the message. The status appears when the message is selected by clicking or through keyboard navigation.
|
39
36
|
*/
|
40
37
|
status?: string;
|
41
38
|
/**
|
42
|
-
*
|
43
|
-
* For example, certain messages can contain
|
44
|
-
* only attachments or quick actions.
|
39
|
+
* Sets the text for the message. Some messages may contain only attachments or quick actions.
|
45
40
|
*/
|
46
41
|
text?: string;
|
47
42
|
/**
|
48
|
-
*
|
43
|
+
* Sets the time when the message was composed.
|
49
44
|
*/
|
50
45
|
timestamp?: Date;
|
51
46
|
/**
|
52
|
-
*
|
53
|
-
* If set to `true`, the Chat displays a typing indicator instead of the actual message.
|
47
|
+
* Indicates if the message is still being typed by the user. If `true`, the Chat shows a typing indicator.
|
54
48
|
*/
|
55
49
|
typing?: boolean;
|
56
50
|
}
|
@@ -4,15 +4,14 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import { Message } from './message.interface';
|
6
6
|
/**
|
7
|
-
*
|
8
|
-
*
|
7
|
+
* Describes the arguments for the `sendMessage` event.
|
9
8
|
*/
|
10
9
|
export declare class SendMessageEvent {
|
11
10
|
/**
|
12
|
-
*
|
11
|
+
* Represents the message that contains the metadata and user input.
|
13
12
|
*
|
14
|
-
* > The Chat does not automatically
|
15
|
-
* > For more information,
|
13
|
+
* > The Chat does not automatically add the message to its data.
|
14
|
+
* > For more information, see [Data Binding](slug:databinding_chat).
|
16
15
|
*/
|
17
16
|
message: Message;
|
18
17
|
/**
|