@progress/kendo-angular-conversational-ui 17.0.0-develop.21 → 17.0.0-develop.22
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 +1 -1
- package/ai-prompt/common/output-card.component.d.ts +1 -1
- package/ai-prompt/localization/messages.d.ts +1 -1
- package/ai-prompt/models/prompt-output.interface.d.ts +1 -1
- package/ai-prompt/models/view-type.d.ts +1 -1
- package/ai-prompt/views/base-view.d.ts +1 -1
- package/ai-prompt/views/custom-view.component.d.ts +1 -1
- package/chat/api/action.interface.d.ts +1 -1
- package/chat/api/attachment.interface.d.ts +1 -1
- package/chat/attachment.component.d.ts +1 -1
- package/chat/builtin-actions.d.ts +1 -1
- package/chat/cards/hero-card.component.d.ts +1 -1
- package/chat/chat-view.d.ts +1 -1
- package/chat/chat.component.d.ts +1 -1
- package/chat/common/models/message-box-options.d.ts +1 -1
- package/chat/common/scroll-anchor.directive.d.ts +1 -1
- package/chat/l10n/messages.d.ts +1 -1
- package/chat/message-attachments.component.d.ts +1 -1
- package/chat/message-box.component.d.ts +1 -1
- package/chat/message-list.component.d.ts +1 -1
- package/chat/message.component.d.ts +1 -1
- package/chat/suggested-actions.component.d.ts +1 -2
- package/{esm2020 → esm2022}/ai-prompt/aiprompt.component.mjs +61 -48
- package/{esm2020 → esm2022}/ai-prompt/aiprompt.module.mjs +4 -4
- package/{esm2020 → esm2022}/ai-prompt/common/aiprompt.service.mjs +13 -11
- package/{esm2020 → esm2022}/ai-prompt/common/output-card.component.mjs +19 -16
- package/{esm2020 → esm2022}/ai-prompt/common/toolbar-focusable.directive.mjs +28 -25
- package/{esm2020 → esm2022}/ai-prompt/common/toolbar-navigation.service.mjs +6 -5
- package/{esm2020 → esm2022}/ai-prompt/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/ai-prompt/localization/localized-messages.directive.mjs +9 -8
- package/esm2022/ai-prompt/localization/messages.mjs +71 -0
- package/{esm2020 → esm2022}/ai-prompt/templates/toolbar-actions.template.mjs +4 -3
- package/{esm2020 → esm2022}/ai-prompt/views/base-view.mjs +13 -4
- package/{esm2020 → esm2022}/ai-prompt/views/command-view.component.mjs +12 -11
- package/{esm2020 → esm2022}/ai-prompt/views/custom-view.component.mjs +10 -6
- package/{esm2020 → esm2022}/ai-prompt/views/output-view.component.mjs +8 -7
- package/{esm2020 → esm2022}/ai-prompt/views/prompt-view.component.mjs +18 -17
- package/{esm2020 → esm2022}/chat/api/execute-action-event.mjs +8 -0
- package/{esm2020 → esm2022}/chat/api/post-message-event.mjs +7 -0
- package/{esm2020 → esm2022}/chat/api/preventable-event.mjs +1 -3
- package/{esm2020 → esm2022}/chat/attachment-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/chat/attachment.component.mjs +7 -4
- package/{esm2020 → esm2022}/chat/cards/hero-card.component.mjs +25 -11
- package/{esm2020 → esm2022}/chat/chat-item.mjs +1 -0
- package/{esm2020 → esm2022}/chat/chat.component.mjs +67 -44
- package/{esm2020 → esm2022}/chat/chat.module.mjs +4 -4
- package/{esm2020 → esm2022}/chat/common/scroll-anchor.directive.mjs +11 -7
- package/{esm2020 → esm2022}/chat/l10n/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/chat/l10n/localized-messages.directive.mjs +9 -8
- package/esm2022/chat/l10n/messages.mjs +64 -0
- package/{esm2020 → esm2022}/chat/message-attachments.component.mjs +42 -31
- package/{esm2020 → esm2022}/chat/message-box.component.mjs +16 -12
- package/{esm2020 → esm2022}/chat/message-box.directive.mjs +4 -3
- package/{esm2020 → esm2022}/chat/message-list.component.mjs +32 -22
- package/{esm2020 → esm2022}/chat/message-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/chat/message.component.mjs +17 -11
- package/{esm2020 → esm2022}/chat/suggested-actions.component.mjs +18 -18
- package/{esm2020 → esm2022}/conversational-ui.module.mjs +4 -4
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{fesm2020 → fesm2022}/progress-kendo-angular-conversational-ui.mjs +578 -378
- package/package.json +18 -24
- package/esm2020/ai-prompt/localization/messages.mjs +0 -35
- package/esm2020/chat/l10n/messages.mjs +0 -35
- package/fesm2015/progress-kendo-angular-conversational-ui.mjs +0 -3242
- /package/{esm2020 → esm2022}/ai-prompt/models/command-execute-event.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/command.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/output-rating-change-event.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/prompt-output.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/prompt-request-event.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/models/view-type.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/ai-prompt/views/index.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/api/action.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/api/attachment.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/api/index.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/api/message.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/api/user.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/builtin-actions.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/chat-view.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/chat.directives.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/common/models/message-box-options.mjs +0 -0
- /package/{esm2020 → esm2022}/chat/common/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-conversational-ui.mjs +0 -0
@@ -118,5 +118,5 @@ export declare class AIPromptComponent implements AfterViewInit, OnDestroy {
|
|
118
118
|
*/
|
119
119
|
handleGenerateOutput(): void;
|
120
120
|
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptComponent, never>;
|
121
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptComponent, "kendo-aiprompt", ["kendoAIPrompt"], { "activeView": "activeView"; "promptCommands": "promptCommands"; "promptSuggestions": "promptSuggestions"; "promptOutputs": "promptOutputs"; "showOutputRating": "showOutputRating"; }, { "activeViewChange": "activeViewChange"; "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputCopy": "outputCopy"; "outputRatingChange": "outputRatingChange"; }, ["toolbarActionsTemplate", "views"], never, true, never>;
|
121
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptComponent, "kendo-aiprompt", ["kendoAIPrompt"], { "activeView": { "alias": "activeView"; "required": false; }; "promptCommands": { "alias": "promptCommands"; "required": false; }; "promptSuggestions": { "alias": "promptSuggestions"; "required": false; }; "promptOutputs": { "alias": "promptOutputs"; "required": false; }; "showOutputRating": { "alias": "showOutputRating"; "required": false; }; }, { "activeViewChange": "activeViewChange"; "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputCopy": "outputCopy"; "outputRatingChange": "outputRatingChange"; }, ["toolbarActionsTemplate", "views"], never, true, never>;
|
122
122
|
}
|
@@ -34,5 +34,5 @@ export declare class AIPromptOutputCardComponent implements OnInit {
|
|
34
34
|
handleCopy(): void;
|
35
35
|
handleRating(ratingType: PromptOutputRating): void;
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptOutputCardComponent, never>;
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptOutputCardComponent, "[kendoAIPromptOutputCard]", never, { "promptOutput": "promptOutput"; }, {}, never, never, true, never>;
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptOutputCardComponent, "[kendoAIPromptOutputCard]", never, { "promptOutput": { "alias": "promptOutput"; "required": false; }; }, {}, never, never, true, never>;
|
38
38
|
}
|
@@ -45,5 +45,5 @@ export declare class Messages extends ComponentMessages {
|
|
45
45
|
*/
|
46
46
|
promptSuggestions: string;
|
47
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
48
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, never, never, { "promptView": "promptView"; "outputView": "outputView"; "generateOutput": "generateOutput"; "promptPlaceholder": "promptPlaceholder"; "copyOutput": "copyOutput"; "retryGeneration": "retryGeneration"; "outputTitle": "outputTitle"; "outputRetryTitle": "outputRetryTitle"; "promptSuggestions": "promptSuggestions"; }, {}, never, never, false, never>;
|
48
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, never, never, { "promptView": { "alias": "promptView"; "required": false; }; "outputView": { "alias": "outputView"; "required": false; }; "generateOutput": { "alias": "generateOutput"; "required": false; }; "promptPlaceholder": { "alias": "promptPlaceholder"; "required": false; }; "copyOutput": { "alias": "copyOutput"; "required": false; }; "retryGeneration": { "alias": "retryGeneration"; "required": false; }; "outputTitle": { "alias": "outputTitle"; "required": false; }; "outputRetryTitle": { "alias": "outputRetryTitle"; "required": false; }; "promptSuggestions": { "alias": "promptSuggestions"; "required": false; }; }, {}, never, never, false, never>;
|
49
49
|
}
|
@@ -42,5 +42,5 @@ export declare abstract class BaseView {
|
|
42
42
|
private _icon;
|
43
43
|
private _svgIcon;
|
44
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseView, never>;
|
45
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseView, never, never, { "buttonText": "buttonText"; "icon": "icon"; "svgIcon": "svgIcon"; }, {}, never, never, false, never>;
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseView, never, never, { "buttonText": { "alias": "buttonText"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; }, {}, never, never, false, never>;
|
46
46
|
}
|
@@ -16,5 +16,5 @@ export declare class CustomViewComponent extends BaseView {
|
|
16
16
|
*/
|
17
17
|
viewTemplate: TemplateRef<any>;
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomViewComponent, never>;
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomViewComponent, "kendo-aiprompt-custom-view", never, { "viewTemplate": "viewTemplate"; }, {}, never, never, true, never>;
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomViewComponent, "kendo-aiprompt-custom-view", never, { "viewTemplate": { "alias": "viewTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
20
20
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* * `call`—Treats a value as a phone number. Similar to clicking a [telephone link](https://css-tricks.com/the-current-state-of-telephone-links/).
|
10
10
|
* * other—Handled by user code in the [`ExecuteActionEvent`]({% slug api_conversational-ui_executeactionevent %}).
|
11
11
|
*/
|
12
|
-
export
|
12
|
+
export type ActionType = 'openUrl' | 'reply' | 'call' | string;
|
13
13
|
/**
|
14
14
|
* Defines a quick action for a message.
|
15
15
|
* The value is interpreted according to the specified action type.
|
@@ -32,4 +32,4 @@ export interface Attachment {
|
|
32
32
|
* * `"list"`—A vertical list.
|
33
33
|
* * `"carousel"`—A horizontal, scrollable list. Also called a card deck.
|
34
34
|
*/
|
35
|
-
export
|
35
|
+
export type AttachmentLayout = 'list' | 'carousel';
|
@@ -18,5 +18,5 @@ export declare class AttachmentComponent {
|
|
18
18
|
private get contentType();
|
19
19
|
private _attachment;
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentComponent, never>;
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentComponent, "kendo-chat-attachment", never, { "attachment": "attachment"; "template": "template"; }, {}, never, never, true, never>;
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentComponent, "kendo-chat-attachment", never, { "attachment": { "alias": "attachment"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, never, true, never>;
|
22
22
|
}
|
@@ -7,7 +7,7 @@ import { ChatComponent } from './chat.component';
|
|
7
7
|
/**
|
8
8
|
* @hidden
|
9
9
|
*/
|
10
|
-
export
|
10
|
+
export type ActionHandler = (action: Action, sender: ChatComponent) => void;
|
11
11
|
/**
|
12
12
|
* @hidden
|
13
13
|
*/
|
@@ -33,5 +33,5 @@ export declare class HeroCardComponent {
|
|
33
33
|
executeAction: EventEmitter<Action>;
|
34
34
|
onClick(action: any): void;
|
35
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<HeroCardComponent, never>;
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HeroCardComponent, "kendo-chat-hero-card", never, { "imageUrl": "imageUrl"; "title": "title"; "subtitle": "subtitle"; "actions": "actions"; }, { "executeAction": "executeAction"; }, never, never, true, never>;
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeroCardComponent, "kendo-chat-hero-card", never, { "imageUrl": { "alias": "imageUrl"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "executeAction": "executeAction"; }, never, never, true, never>;
|
37
37
|
}
|
package/chat/chat-view.d.ts
CHANGED
package/chat/chat.component.d.ts
CHANGED
@@ -89,5 +89,5 @@ export declare class ChatComponent implements AfterViewInit, OnDestroy {
|
|
89
89
|
*/
|
90
90
|
textFor(key: string): string;
|
91
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
|
92
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": "messages"; "user": "user"; "messageBoxType": "messageBoxType"; }, { "sendMessage": "sendMessage"; "executeAction": "executeAction"; }, ["attachmentTemplate", "messageTemplate", "messageBoxTemplate"], never, true, never>;
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": { "alias": "messages"; "required": false; }; "user": { "alias": "user"; "required": false; }; "messageBoxType": { "alias": "messageBoxType"; "required": false; }; }, { "sendMessage": "sendMessage"; "executeAction": "executeAction"; }, ["attachmentTemplate", "messageTemplate", "messageBoxTemplate"], never, true, never>;
|
93
93
|
}
|
@@ -23,5 +23,5 @@ export declare class ScrollAnchorDirective implements AfterViewInit, OnInit, OnD
|
|
23
23
|
onScroll(): void;
|
24
24
|
scrollToBottom(): void;
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollAnchorDirective, never>;
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollAnchorDirective, "[kendoChatScrollAnchor]", ["scrollAnchor"], { "autoScroll": "autoScroll"; }, { "autoScrollChange": "autoScrollChange"; }, never, never, true, never>;
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollAnchorDirective, "[kendoChatScrollAnchor]", ["scrollAnchor"], { "autoScroll": { "alias": "autoScroll"; "required": false; }; }, { "autoScrollChange": "autoScrollChange"; }, never, never, true, never>;
|
27
27
|
}
|
package/chat/l10n/messages.d.ts
CHANGED
@@ -38,5 +38,5 @@ export declare class Messages extends ComponentMessages {
|
|
38
38
|
*/
|
39
39
|
messageAvatarAlt: string;
|
40
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
41
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendoConversationalUIMessages", never, { "messagePlaceholder": "messagePlaceholder"; "send": "send"; "messageListLabel": "messageListLabel"; "messageBoxInputLabel": "messageBoxInputLabel"; "messageAttachmentLeftArrow": "messageAttachmentLeftArrow"; "messageAttachmentRightArrow": "messageAttachmentRightArrow"; "messageAvatarAlt": "messageAvatarAlt"; }, {}, never, never, false, never>;
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendoConversationalUIMessages", never, { "messagePlaceholder": { "alias": "messagePlaceholder"; "required": false; }; "send": { "alias": "send"; "required": false; }; "messageListLabel": { "alias": "messageListLabel"; "required": false; }; "messageBoxInputLabel": { "alias": "messageBoxInputLabel"; "required": false; }; "messageAttachmentLeftArrow": { "alias": "messageAttachmentLeftArrow"; "required": false; }; "messageAttachmentRightArrow": { "alias": "messageAttachmentRightArrow"; "required": false; }; "messageAvatarAlt": { "alias": "messageAvatarAlt"; "required": false; }; }, {}, never, never, false, never>;
|
42
42
|
}
|
@@ -55,5 +55,5 @@ export declare class MessageAttachmentsComponent extends ChatItem implements Aft
|
|
55
55
|
*/
|
56
56
|
textFor(key: string): string;
|
57
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageAttachmentsComponent, never>;
|
58
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageAttachmentsComponent, "kendo-chat-message-attachments", never, { "attachments": "attachments"; "layout": "layout"; "tabbable": "tabbable"; "template": "template"; "localization": "localization"; }, {}, never, never, true, never>;
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageAttachmentsComponent, "kendo-chat-message-attachments", never, { "attachments": { "alias": "attachments"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "tabbable": { "alias": "tabbable"; "required": false; }; "template": { "alias": "template"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; }, {}, never, never, true, never>;
|
59
59
|
}
|
@@ -43,5 +43,5 @@ export declare class MessageBoxComponent {
|
|
43
43
|
*/
|
44
44
|
textFor(key: string): string;
|
45
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxComponent, never>;
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxComponent, "kendo-message-box", never, { "user": "user"; "autoScroll": "autoScroll"; "type": "type"; "localization": "localization"; "messageBoxTemplate": "messageBoxTemplate"; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxComponent, "kendo-message-box", never, { "user": { "alias": "user"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "type": { "alias": "type"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "messageBoxTemplate": { "alias": "messageBoxTemplate"; "required": false; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
47
47
|
}
|
@@ -55,5 +55,5 @@ export declare class MessageListComponent implements OnInit, AfterViewInit, OnDe
|
|
55
55
|
*/
|
56
56
|
textFor(key: string): string;
|
57
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageListComponent, never>;
|
58
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "kendo-chat-message-list", never, { "messages": "messages"; "attachmentTemplate": "attachmentTemplate"; "messageTemplate": "messageTemplate"; "localization": "localization"; "user": "user"; }, { "executeAction": "executeAction"; "navigate": "navigate"; "resize": "resize"; }, never, never, true, never>;
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "kendo-chat-message-list", never, { "messages": { "alias": "messages"; "required": false; }; "attachmentTemplate": { "alias": "attachmentTemplate"; "required": false; }; "messageTemplate": { "alias": "messageTemplate"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "user": { "alias": "user"; "required": false; }; }, { "executeAction": "executeAction"; "navigate": "navigate"; "resize": "resize"; }, never, never, true, never>;
|
59
59
|
}
|
@@ -24,5 +24,5 @@ export declare class MessageComponent extends ChatItem {
|
|
24
24
|
formatTimeStamp(date: any): string;
|
25
25
|
focus(): void;
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "kendo-chat-message", never, { "message": "message"; "tabbable": "tabbable"; "template": "template"; }, {}, never, never, true, never>;
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "kendo-chat-message", never, { "message": { "alias": "message"; "required": false; }; "tabbable": { "alias": "tabbable"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, never, true, never>;
|
28
28
|
}
|
@@ -14,7 +14,6 @@ export declare class SuggestedActionsComponent extends ChatItem {
|
|
14
14
|
tabbable: boolean;
|
15
15
|
dispatch: EventEmitter<Action>;
|
16
16
|
defaultClass: boolean;
|
17
|
-
selected: boolean;
|
18
17
|
items: QueryList<ElementRef>;
|
19
18
|
selectedIndex: number;
|
20
19
|
private keyHandlers;
|
@@ -24,5 +23,5 @@ export declare class SuggestedActionsComponent extends ChatItem {
|
|
24
23
|
focus(): void;
|
25
24
|
private changeSelectedIndex;
|
26
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestedActionsComponent, never>;
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestedActionsComponent, "kendo-chat-suggested-actions", never, { "actions": "actions"; "tabbable": "tabbable"; }, { "dispatch": "dispatch"; }, never, never, true, never>;
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestedActionsComponent, "kendo-chat-suggested-actions", never, { "actions": { "alias": "actions"; "required": false; }; "tabbable": { "alias": "tabbable"; "required": false; }; }, { "dispatch": "dispatch"; }, never, never, true, never>;
|
28
27
|
}
|
@@ -24,53 +24,33 @@ import * as i3 from "./common/toolbar-navigation.service";
|
|
24
24
|
* Represents the Kendo UI AIPrompt component for Angular.
|
25
25
|
*/
|
26
26
|
export class AIPromptComponent {
|
27
|
+
localization;
|
28
|
+
service;
|
29
|
+
navigationService;
|
30
|
+
ngZone;
|
31
|
+
hostClasses = true;
|
32
|
+
get dirAttr() {
|
33
|
+
return this.direction;
|
34
|
+
}
|
27
35
|
constructor(localization, service, navigationService, ngZone) {
|
28
36
|
this.localization = localization;
|
29
37
|
this.service = service;
|
30
38
|
this.navigationService = navigationService;
|
31
39
|
this.ngZone = ngZone;
|
32
|
-
this.hostClasses = true;
|
33
|
-
/**
|
34
|
-
* Fires when the `activeView` property of the component is updated.
|
35
|
-
* Used to provide a two-way binding for the `activeView` property.
|
36
|
-
*/
|
37
|
-
this.activeViewChange = new EventEmitter();
|
38
|
-
/**
|
39
|
-
* Fires each time the user clicks the Prompt view Generate button or the Output view Retry button.
|
40
|
-
* To distinguish the source element, use the event's `isRetry` field.
|
41
|
-
*/
|
42
|
-
this.promptRequest = new EventEmitter();
|
43
|
-
/**
|
44
|
-
* Fires each time the user clicks a Command view command. Exposes the selected command as event data.
|
45
|
-
*/
|
46
|
-
this.commandExecute = new EventEmitter();
|
47
|
-
/**
|
48
|
-
* Fires each time the user clicks any Output view Copy button.
|
49
|
-
*/
|
50
|
-
this.outputCopy = new EventEmitter();
|
51
|
-
/**
|
52
|
-
* Fires each time the user clicks a rating button in any Output view card.
|
53
|
-
*/
|
54
|
-
this.outputRatingChange = new EventEmitter();
|
55
|
-
this.subs = new Subscription();
|
56
|
-
/**
|
57
|
-
* @hidden
|
58
|
-
*/
|
59
|
-
this.sparklesIcon = sparklesIcon;
|
60
|
-
/**
|
61
|
-
* @hidden
|
62
|
-
*/
|
63
|
-
this.outputIcon = commentIcon;
|
64
|
-
this._activeView = 0;
|
65
40
|
validatePackage(packageMetadata);
|
66
41
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
67
42
|
this.subs.add(localization.changes.subscribe(({ rtl }) => {
|
68
43
|
this.direction = rtl ? 'rtl' : 'ltr';
|
69
44
|
}));
|
70
45
|
}
|
71
|
-
|
72
|
-
|
73
|
-
|
46
|
+
/**
|
47
|
+
* @hidden
|
48
|
+
*/
|
49
|
+
views;
|
50
|
+
/**
|
51
|
+
* @hidden
|
52
|
+
*/
|
53
|
+
toolbarActionsTemplate;
|
74
54
|
/**
|
75
55
|
* The active view index of the AIPrompt component.
|
76
56
|
*/
|
@@ -110,6 +90,28 @@ export class AIPromptComponent {
|
|
110
90
|
set showOutputRating(value) {
|
111
91
|
this.service.showOutputRating = value;
|
112
92
|
}
|
93
|
+
/**
|
94
|
+
* Fires when the `activeView` property of the component is updated.
|
95
|
+
* Used to provide a two-way binding for the `activeView` property.
|
96
|
+
*/
|
97
|
+
activeViewChange = new EventEmitter();
|
98
|
+
/**
|
99
|
+
* Fires each time the user clicks the Prompt view Generate button or the Output view Retry button.
|
100
|
+
* To distinguish the source element, use the event's `isRetry` field.
|
101
|
+
*/
|
102
|
+
promptRequest = new EventEmitter();
|
103
|
+
/**
|
104
|
+
* Fires each time the user clicks a Command view command. Exposes the selected command as event data.
|
105
|
+
*/
|
106
|
+
commandExecute = new EventEmitter();
|
107
|
+
/**
|
108
|
+
* Fires each time the user clicks any Output view Copy button.
|
109
|
+
*/
|
110
|
+
outputCopy = new EventEmitter();
|
111
|
+
/**
|
112
|
+
* Fires each time the user clicks a rating button in any Output view card.
|
113
|
+
*/
|
114
|
+
outputRatingChange = new EventEmitter();
|
113
115
|
ngAfterViewInit() {
|
114
116
|
this.ngZone.runOutsideAngular(() => {
|
115
117
|
this.service.aiPrompt = this;
|
@@ -128,18 +130,29 @@ export class AIPromptComponent {
|
|
128
130
|
focus() {
|
129
131
|
this.navigationService.focusFirst();
|
130
132
|
}
|
133
|
+
subs = new Subscription();
|
131
134
|
/**
|
132
135
|
* @hidden
|
133
136
|
*/
|
134
137
|
get selectedView() {
|
135
138
|
return this.viewsArray[this.activeView];
|
136
139
|
}
|
140
|
+
/**
|
141
|
+
* @hidden
|
142
|
+
*/
|
143
|
+
sparklesIcon = sparklesIcon;
|
144
|
+
/**
|
145
|
+
* @hidden
|
146
|
+
*/
|
147
|
+
outputIcon = commentIcon;
|
137
148
|
/**
|
138
149
|
* @hidden
|
139
150
|
*/
|
140
151
|
get viewsArray() {
|
141
152
|
return this.views?.toArray();
|
142
153
|
}
|
154
|
+
direction;
|
155
|
+
_activeView = 0;
|
143
156
|
/**
|
144
157
|
* @hidden
|
145
158
|
*/
|
@@ -173,17 +186,16 @@ export class AIPromptComponent {
|
|
173
186
|
};
|
174
187
|
this.promptRequest.emit(eventArgs);
|
175
188
|
}
|
176
|
-
}
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
186
|
-
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], exportAs: ["kendoAIPrompt"], ngImport: i0, template: `
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }, { token: i3.ToolbarNavigationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
|
191
|
+
LocalizationService,
|
192
|
+
AIPromptService,
|
193
|
+
ToolbarNavigationService,
|
194
|
+
{
|
195
|
+
provide: L10N_PREFIX,
|
196
|
+
useValue: 'kendo.aiprompt'
|
197
|
+
}
|
198
|
+
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], exportAs: ["kendoAIPrompt"], ngImport: i0, template: `
|
187
199
|
<ng-container kendoAIPromptLocalizedMessages
|
188
200
|
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
189
201
|
promptView="Ask AI"
|
@@ -245,7 +257,8 @@ AIPromptComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
245
257
|
</div>
|
246
258
|
</div>
|
247
259
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
248
|
-
|
260
|
+
}
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptComponent, decorators: [{
|
249
262
|
type: Component,
|
250
263
|
args: [{
|
251
264
|
exportAs: 'kendoAIPrompt',
|
@@ -40,11 +40,11 @@ import * as i8 from "./common/toolbar-focusable.directive";
|
|
40
40
|
* ```
|
41
41
|
*/
|
42
42
|
export class AIPromptModule {
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
44
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective], exports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective] });
|
45
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent] });
|
43
46
|
}
|
44
|
-
|
45
|
-
AIPromptModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective], exports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective] });
|
46
|
-
AIPromptModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent] });
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, decorators: [{
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, decorators: [{
|
48
48
|
type: NgModule,
|
49
49
|
args: [{
|
50
50
|
exports: [...KENDO_AIPROMPT],
|
@@ -9,14 +9,16 @@ import * as i0 from "@angular/core";
|
|
9
9
|
* @hidden
|
10
10
|
*/
|
11
11
|
export class AIPromptService {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
aiPrompt;
|
13
|
+
promptValue = '';
|
14
|
+
showOutputRating = false;
|
15
|
+
requestEvent = new Subject();
|
16
|
+
executeEvent = new Subject();
|
17
|
+
outputCopyEvent = new Subject();
|
18
|
+
outputRatingChangeEvent = new Subject();
|
19
|
+
promptCommands;
|
20
|
+
promptOutputs;
|
21
|
+
promptSuggestions;
|
20
22
|
getFlattenPromptCommands(commands = this.promptCommands) {
|
21
23
|
let newArr = [];
|
22
24
|
commands.forEach(c => {
|
@@ -30,9 +32,9 @@ export class AIPromptService {
|
|
30
32
|
});
|
31
33
|
return newArr.concat(this.promptCommands);
|
32
34
|
}
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
36
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService });
|
33
37
|
}
|
34
|
-
|
35
|
-
AIPromptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptService });
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptService, decorators: [{
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService, decorators: [{
|
37
39
|
type: Injectable
|
38
40
|
}] });
|
@@ -16,21 +16,19 @@ import * as i2 from "./aiprompt.service";
|
|
16
16
|
* @hidden
|
17
17
|
*/
|
18
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;
|
19
29
|
constructor(localization, service) {
|
20
30
|
this.localization = localization;
|
21
31
|
this.service = service;
|
22
|
-
this.hostClass = true;
|
23
|
-
this.listItemRole = 'listitem';
|
24
|
-
this.tabIndex = 0;
|
25
|
-
this.ariaKeyShortcuts = 'Enter';
|
26
|
-
this.copyIcon = copyIcon;
|
27
|
-
this.retryIcon = arrowRotateCwIcon;
|
28
|
-
this.positiveRatingIcon = thumbUpOutlineIcon;
|
29
|
-
this.negativeRatingIcon = thumbDownOutlineIcon;
|
30
|
-
this.titleId = `k-output-card-${guid()}`;
|
31
|
-
}
|
32
|
-
get ariaDescribedBy() {
|
33
|
-
return this.titleId;
|
34
32
|
}
|
35
33
|
ngOnInit() {
|
36
34
|
if (this.promptOutput?.rating === 'positive') {
|
@@ -42,6 +40,11 @@ export class AIPromptOutputCardComponent {
|
|
42
40
|
this.positiveRatingIcon = thumbUpOutlineIcon;
|
43
41
|
}
|
44
42
|
}
|
43
|
+
copyIcon = copyIcon;
|
44
|
+
retryIcon = arrowRotateCwIcon;
|
45
|
+
positiveRatingIcon = thumbUpOutlineIcon;
|
46
|
+
negativeRatingIcon = thumbDownOutlineIcon;
|
47
|
+
titleId = `k-output-card-${guid()}`;
|
45
48
|
messageFor(text) {
|
46
49
|
return this.localization.get(text);
|
47
50
|
}
|
@@ -94,9 +97,8 @@ export class AIPromptOutputCardComponent {
|
|
94
97
|
this.positiveRatingIcon = thumbUpOutlineIcon;
|
95
98
|
}
|
96
99
|
}
|
97
|
-
}
|
98
|
-
|
99
|
-
AIPromptOutputCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: `
|
100
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
101
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: `
|
100
102
|
<div class="k-card-header">
|
101
103
|
<div
|
102
104
|
class="k-card-title"
|
@@ -140,7 +142,8 @@ AIPromptOutputCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
140
142
|
</ng-container>
|
141
143
|
</div>
|
142
144
|
`, 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
143
|
-
|
145
|
+
}
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
|
144
147
|
type: Component,
|
145
148
|
args: [{
|
146
149
|
selector: '[kendoAIPromptOutputCard]',
|
@@ -11,32 +11,13 @@ import * as i1 from "./toolbar-navigation.service";
|
|
11
11
|
* @hidden
|
12
12
|
*/
|
13
13
|
export class AIPromptToolbarFocusableDirective {
|
14
|
+
host;
|
15
|
+
navigationService;
|
16
|
+
renderer;
|
14
17
|
constructor(host, navigationService, renderer) {
|
15
18
|
this.host = host;
|
16
19
|
this.navigationService = navigationService;
|
17
20
|
this.renderer = renderer;
|
18
|
-
this.keyDownHandler = (e) => {
|
19
|
-
const targetsSelf = e.target === this.element;
|
20
|
-
const isLeftArrow = e.keyCode === Keys.ArrowLeft;
|
21
|
-
const isRightArrow = e.keyCode === Keys.ArrowRight;
|
22
|
-
const isArrow = isLeftArrow || isRightArrow;
|
23
|
-
if (!targetsSelf || !isArrow) {
|
24
|
-
return;
|
25
|
-
}
|
26
|
-
this.renderer.setAttribute(this.element, 'tabindex', '-1');
|
27
|
-
this.element.querySelectorAll(focusableSelector).forEach(el => {
|
28
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
29
|
-
});
|
30
|
-
if (isRightArrow) {
|
31
|
-
this.navigationService.move('right');
|
32
|
-
}
|
33
|
-
else if (isLeftArrow) {
|
34
|
-
this.navigationService.move('left');
|
35
|
-
}
|
36
|
-
};
|
37
|
-
this.clickHandler = () => {
|
38
|
-
this.navigationService.setActiveIndex(this);
|
39
|
-
};
|
40
21
|
navigationService.register(this);
|
41
22
|
}
|
42
23
|
get element() {
|
@@ -56,10 +37,32 @@ export class AIPromptToolbarFocusableDirective {
|
|
56
37
|
this.renderer.setAttribute(this.element, 'tabindex', '0');
|
57
38
|
this.element.focus();
|
58
39
|
}
|
40
|
+
keyDownHandler = (e) => {
|
41
|
+
const targetsSelf = e.target === this.element;
|
42
|
+
const isLeftArrow = e.keyCode === Keys.ArrowLeft;
|
43
|
+
const isRightArrow = e.keyCode === Keys.ArrowRight;
|
44
|
+
const isArrow = isLeftArrow || isRightArrow;
|
45
|
+
if (!targetsSelf || !isArrow) {
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
this.renderer.setAttribute(this.element, 'tabindex', '-1');
|
49
|
+
this.element.querySelectorAll(focusableSelector).forEach(el => {
|
50
|
+
this.renderer.setAttribute(el, 'tabindex', '-1');
|
51
|
+
});
|
52
|
+
if (isRightArrow) {
|
53
|
+
this.navigationService.move('right');
|
54
|
+
}
|
55
|
+
else if (isLeftArrow) {
|
56
|
+
this.navigationService.move('left');
|
57
|
+
}
|
58
|
+
};
|
59
|
+
clickHandler = () => {
|
60
|
+
this.navigationService.setActiveIndex(this);
|
61
|
+
};
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
63
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
|
59
64
|
}
|
60
|
-
|
61
|
-
AIPromptToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
|
63
66
|
type: Directive,
|
64
67
|
args: [{
|
65
68
|
selector: '[kendoAIPromptToolbarFocusable]',
|
@@ -10,10 +10,11 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
* @hidden
|
11
11
|
*/
|
12
12
|
export class ToolbarNavigationService {
|
13
|
+
localizationService;
|
14
|
+
focusableElements = [];
|
15
|
+
currentFocusedIndex = 0;
|
13
16
|
constructor(localizationService) {
|
14
17
|
this.localizationService = localizationService;
|
15
|
-
this.focusableElements = [];
|
16
|
-
this.currentFocusedIndex = 0;
|
17
18
|
}
|
18
19
|
register(tool) {
|
19
20
|
if (!this.focusableElements.some(el => el === tool)) {
|
@@ -47,9 +48,9 @@ export class ToolbarNavigationService {
|
|
47
48
|
focusFirst() {
|
48
49
|
this.focusableElements[this.currentFocusedIndex].activate();
|
49
50
|
}
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
52
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService });
|
50
53
|
}
|
51
|
-
|
52
|
-
ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService });
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
54
55
|
type: Injectable
|
55
56
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|