@progress/kendo-angular-conversational-ui 21.1.1-develop.2 → 21.2.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat/message-list.component.d.ts +2 -2
- package/esm2022/ai-prompt/aiprompt.component.mjs +155 -139
- package/esm2022/ai-prompt/common/output-card.component.mjs +81 -83
- package/esm2022/ai-prompt/views/output-view.component.mjs +27 -29
- package/esm2022/ai-prompt/views/prompt-view.component.mjs +150 -135
- package/esm2022/chat/attachment.component.mjs +53 -37
- package/esm2022/chat/cards/hero-card.component.mjs +48 -35
- package/esm2022/chat/chat-file.component.mjs +32 -29
- package/esm2022/chat/chat.component.mjs +251 -241
- package/esm2022/chat/message-attachments.component.mjs +58 -53
- package/esm2022/chat/message-box.component.mjs +203 -183
- package/esm2022/chat/message-list.component.mjs +247 -207
- package/esm2022/chat/message-reference-content.component.mjs +30 -19
- package/esm2022/chat/message.component.mjs +307 -279
- package/esm2022/chat/suggested-actions.component.mjs +139 -131
- package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +205 -179
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +1979 -1767
- package/package.json +14 -14
|
@@ -9,7 +9,7 @@ import * as i1$2 from '@progress/kendo-angular-popup';
|
|
|
9
9
|
import { PopupComponent, KENDO_POPUP, PopupService } from '@progress/kendo-angular-popup';
|
|
10
10
|
import { isPresent, normalizeNumpadKeys, Keys, focusableSelector, guid, getter, isDocumentAvailable, closest as closest$1, ResizeSensorComponent, isChanged, processCssValue, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
11
11
|
import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
|
|
12
|
-
import {
|
|
12
|
+
import { NgTemplateOutlet, NgClass } from '@angular/common';
|
|
13
13
|
import { Subject, Subscription, fromEvent } from 'rxjs';
|
|
14
14
|
import { sparklesIcon, commentIcon, moreHorizontalIcon, stopSmIcon, thumbUpIcon, thumbDownOutlineIcon, thumbDownIcon, thumbUpOutlineIcon, copyIcon, arrowRotateCwIcon, chevronUpIcon, chevronDownIcon, paperPlaneIcon, undoIcon, downloadIcon, chevronLeftIcon, chevronRightIcon, xIcon, moreVerticalIcon, paperclipIcon, fileIcon, pinIcon, cancelOutlineIcon, menuIcon } from '@progress/kendo-svg-icons';
|
|
15
15
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
@@ -216,8 +216,8 @@ const packageMetadata = {
|
|
|
216
216
|
productName: 'Kendo UI for Angular',
|
|
217
217
|
productCode: 'KENDOUIANGULAR',
|
|
218
218
|
productCodes: ['KENDOUIANGULAR'],
|
|
219
|
-
publishDate:
|
|
220
|
-
version: '21.
|
|
219
|
+
publishDate: 1763998286,
|
|
220
|
+
version: '21.2.0-develop.1',
|
|
221
221
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
222
222
|
};
|
|
223
223
|
|
|
@@ -872,7 +872,7 @@ class AIPromptComponent {
|
|
|
872
872
|
this.promptRequest.emit(eventArgs);
|
|
873
873
|
}
|
|
874
874
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
875
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
875
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating", streaming: "streaming", speechToTextButton: "speechToTextButton", textAreaSettings: "textAreaSettings", generateButtonSVGIcon: "generateButtonSVGIcon", generateButtonIcon: "generateButtonIcon", disabledGenerateButton: "disabledGenerateButton" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange", promptRequestCancel: "promptRequestCancel" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
|
|
876
876
|
LocalizationService,
|
|
877
877
|
AIPromptService,
|
|
878
878
|
ToolbarNavigationService,
|
|
@@ -882,82 +882,90 @@ class AIPromptComponent {
|
|
|
882
882
|
}
|
|
883
883
|
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "outputTemplate", first: true, predicate: AIPromptOutputTemplateDirective, descendants: true }, { propertyName: "outputBodyTemplate", first: true, predicate: AIPromptOutputBodyTemplateDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], viewQueries: [{ propertyName: "fabButton", first: true, predicate: ["fabButton"], descendants: true }], exportAs: ["kendoAIPrompt"], usesOnChanges: true, ngImport: i0, template: `
|
|
884
884
|
<ng-container kendoAIPromptLocalizedMessages
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
885
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
|
886
|
+
promptView="Ask AI"
|
|
887
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
|
888
|
+
outputView="Output"
|
|
889
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
|
890
|
+
generateOutput="Generate"
|
|
891
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
|
892
|
+
promptPlaceholder="Ask or generate content with AI"
|
|
893
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
|
894
|
+
copyOutput="Copy"
|
|
895
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
|
896
|
+
retryGeneration="Retry"
|
|
897
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
|
898
|
+
outputTitle="Generated with AI"
|
|
899
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
|
900
|
+
outputRetryTitle="Generated with AI"
|
|
901
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
|
902
|
+
promptSuggestions="Prompt suggestions"
|
|
903
|
+
i18n-speechToTextButton="kendo.aiprompt.speechToTextButton|The aria-label for the Speech to Text button."
|
|
904
|
+
speechToTextButton="Voice input">
|
|
905
905
|
</ng-container>
|
|
906
906
|
<div class="k-prompt-header">
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
907
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
|
908
|
+
role="toolbar">
|
|
909
|
+
@for (view of viewsArray; track view; let idx = $index) {
|
|
910
|
+
<button
|
|
911
|
+
kendoButton
|
|
912
|
+
kendoAIPromptToolbarFocusable
|
|
913
|
+
type="button"
|
|
914
|
+
fillMode="flat"
|
|
915
|
+
rounded="full"
|
|
916
|
+
themeColor="primary"
|
|
917
|
+
[svgIcon]="view.svgIcon"
|
|
918
|
+
[icon]="view.icon"
|
|
919
|
+
[selected]="idx === activeView"
|
|
920
|
+
(click)="viewChange(idx)">
|
|
921
|
+
{{view.buttonText}}
|
|
922
|
+
</button>
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
@if (toolbarActionsTemplate) {
|
|
926
|
+
<ng-template
|
|
927
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
|
928
|
+
</ng-template>
|
|
929
|
+
}
|
|
930
|
+
</div>
|
|
927
931
|
</div>
|
|
928
932
|
<div class="k-prompt-content">
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
933
|
+
@if (streaming && selectedView?.viewType === 'output') {
|
|
934
|
+
<kendo-floatingactionbutton #fabButton
|
|
935
|
+
class="k-prompt-stop-fab"
|
|
936
|
+
buttonClass="k-generating k-active"
|
|
937
|
+
[positionMode]="fabPositionMode"
|
|
938
|
+
[align]="fabAlignment"
|
|
939
|
+
[svgIcon]="fabStopGenerationSVGIcon"
|
|
940
|
+
icon="stop"
|
|
941
|
+
(click)="promptRequestCancel.emit()"
|
|
942
|
+
>
|
|
938
943
|
</kendo-floatingactionbutton>
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
</
|
|
944
|
+
}
|
|
945
|
+
<div class="k-prompt-view">
|
|
946
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
|
947
|
+
</ng-container>
|
|
948
|
+
</div>
|
|
943
949
|
</div>
|
|
944
|
-
|
|
950
|
+
@if (selectedView?.viewType === 'prompt') {
|
|
951
|
+
<div class="k-prompt-footer">
|
|
945
952
|
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
953
|
+
<button
|
|
954
|
+
kendoButton
|
|
955
|
+
type="button"
|
|
956
|
+
themeColor="primary"
|
|
957
|
+
rounded="full"
|
|
958
|
+
[attr.title]="messageFor('generateOutput')"
|
|
959
|
+
[attr.aria-label]="messageFor('generateOutput')"
|
|
960
|
+
[attr.aria-disabled]="disabledGenerateButton"
|
|
961
|
+
[svgIcon]="generateButtonSVGIcon"
|
|
962
|
+
[icon]="generateButtonIcon"
|
|
963
|
+
[disabled]="disabledGenerateButton"
|
|
964
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
|
958
965
|
</div>
|
|
959
|
-
|
|
960
|
-
|
|
966
|
+
</div>
|
|
967
|
+
}
|
|
968
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$2, selector: "[kendoAIPromptLocalizedMessages]" }, { 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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }] });
|
|
961
969
|
}
|
|
962
970
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, decorators: [{
|
|
963
971
|
type: Component,
|
|
@@ -975,84 +983,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
975
983
|
],
|
|
976
984
|
template: `
|
|
977
985
|
<ng-container kendoAIPromptLocalizedMessages
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
986
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
|
987
|
+
promptView="Ask AI"
|
|
988
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
|
989
|
+
outputView="Output"
|
|
990
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
|
991
|
+
generateOutput="Generate"
|
|
992
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
|
993
|
+
promptPlaceholder="Ask or generate content with AI"
|
|
994
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
|
995
|
+
copyOutput="Copy"
|
|
996
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
|
997
|
+
retryGeneration="Retry"
|
|
998
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
|
999
|
+
outputTitle="Generated with AI"
|
|
1000
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
|
1001
|
+
outputRetryTitle="Generated with AI"
|
|
1002
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
|
1003
|
+
promptSuggestions="Prompt suggestions"
|
|
1004
|
+
i18n-speechToTextButton="kendo.aiprompt.speechToTextButton|The aria-label for the Speech to Text button."
|
|
1005
|
+
speechToTextButton="Voice input">
|
|
998
1006
|
</ng-container>
|
|
999
1007
|
<div class="k-prompt-header">
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1008
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
|
1009
|
+
role="toolbar">
|
|
1010
|
+
@for (view of viewsArray; track view; let idx = $index) {
|
|
1011
|
+
<button
|
|
1012
|
+
kendoButton
|
|
1013
|
+
kendoAIPromptToolbarFocusable
|
|
1014
|
+
type="button"
|
|
1015
|
+
fillMode="flat"
|
|
1016
|
+
rounded="full"
|
|
1017
|
+
themeColor="primary"
|
|
1018
|
+
[svgIcon]="view.svgIcon"
|
|
1019
|
+
[icon]="view.icon"
|
|
1020
|
+
[selected]="idx === activeView"
|
|
1021
|
+
(click)="viewChange(idx)">
|
|
1022
|
+
{{view.buttonText}}
|
|
1023
|
+
</button>
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
@if (toolbarActionsTemplate) {
|
|
1027
|
+
<ng-template
|
|
1028
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
|
1029
|
+
</ng-template>
|
|
1030
|
+
}
|
|
1031
|
+
</div>
|
|
1020
1032
|
</div>
|
|
1021
1033
|
<div class="k-prompt-content">
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1034
|
+
@if (streaming && selectedView?.viewType === 'output') {
|
|
1035
|
+
<kendo-floatingactionbutton #fabButton
|
|
1036
|
+
class="k-prompt-stop-fab"
|
|
1037
|
+
buttonClass="k-generating k-active"
|
|
1038
|
+
[positionMode]="fabPositionMode"
|
|
1039
|
+
[align]="fabAlignment"
|
|
1040
|
+
[svgIcon]="fabStopGenerationSVGIcon"
|
|
1041
|
+
icon="stop"
|
|
1042
|
+
(click)="promptRequestCancel.emit()"
|
|
1043
|
+
>
|
|
1031
1044
|
</kendo-floatingactionbutton>
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
</
|
|
1045
|
+
}
|
|
1046
|
+
<div class="k-prompt-view">
|
|
1047
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
|
1048
|
+
</ng-container>
|
|
1049
|
+
</div>
|
|
1036
1050
|
</div>
|
|
1037
|
-
|
|
1051
|
+
@if (selectedView?.viewType === 'prompt') {
|
|
1052
|
+
<div class="k-prompt-footer">
|
|
1038
1053
|
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1054
|
+
<button
|
|
1055
|
+
kendoButton
|
|
1056
|
+
type="button"
|
|
1057
|
+
themeColor="primary"
|
|
1058
|
+
rounded="full"
|
|
1059
|
+
[attr.title]="messageFor('generateOutput')"
|
|
1060
|
+
[attr.aria-label]="messageFor('generateOutput')"
|
|
1061
|
+
[attr.aria-disabled]="disabledGenerateButton"
|
|
1062
|
+
[svgIcon]="generateButtonSVGIcon"
|
|
1063
|
+
[icon]="generateButtonIcon"
|
|
1064
|
+
[disabled]="disabledGenerateButton"
|
|
1065
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
|
1051
1066
|
</div>
|
|
1052
|
-
|
|
1053
|
-
|
|
1067
|
+
</div>
|
|
1068
|
+
}
|
|
1069
|
+
`,
|
|
1054
1070
|
standalone: true,
|
|
1055
|
-
imports: [LocalizedMessagesDirective$2,
|
|
1071
|
+
imports: [LocalizedMessagesDirective$2, ButtonComponent, AIPromptToolbarFocusableDirective, NgTemplateOutlet, FloatingActionButtonComponent]
|
|
1056
1072
|
}]
|
|
1057
1073
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hostClasses: [{
|
|
1058
1074
|
type: HostBinding,
|
|
@@ -1380,56 +1396,55 @@ class AIPromptOutputCardComponent {
|
|
|
1380
1396
|
return this.service.outputBodyTemplate?.templateRef;
|
|
1381
1397
|
}
|
|
1382
1398
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AIPromptOutputCardComponent, isStandalone: true, selector: "[kendoAIPromptOutputCard]", inputs: { promptOutput: "promptOutput" }, host: { properties: { "class.k-card": "this.hostClass", "attr.role": "this.listItemRole", "attr.tabindex": "this.tabIndex", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-keyshortcuts": "this.ariaKeyShortcuts" } }, ngImport: i0, template: `
|
|
1384
1400
|
<div class="k-card-header">
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1401
|
+
<div
|
|
1402
|
+
class="k-card-title"
|
|
1403
|
+
[attr.id]="titleId">{{outputTitle}}
|
|
1404
|
+
</div>
|
|
1405
|
+
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
|
1390
1406
|
</div>
|
|
1391
1407
|
<div class="k-card-body">
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
</ng-container>
|
|
1408
|
+
@if (customBodyTemplate) {
|
|
1409
|
+
<ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
|
|
1395
1410
|
</ng-container>
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1411
|
+
} @else {
|
|
1412
|
+
<p>{{promptOutput.output}}</p>
|
|
1413
|
+
}
|
|
1399
1414
|
</div>
|
|
1400
1415
|
<div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
|
|
1416
|
+
<button kendoButton
|
|
1417
|
+
fillMode="flat"
|
|
1418
|
+
themeColor="primary"
|
|
1419
|
+
rounded="full"
|
|
1420
|
+
icon="copy"
|
|
1421
|
+
[svgIcon]="copyIcon"
|
|
1422
|
+
(click)="handleCopy()"
|
|
1423
|
+
>{{messageFor('copyOutput')}}</button>
|
|
1424
|
+
<button kendoButton
|
|
1425
|
+
fillMode="flat"
|
|
1426
|
+
rounded="full"
|
|
1427
|
+
icon="arrow-rotate-cw"
|
|
1428
|
+
[svgIcon]="retryIcon"
|
|
1429
|
+
(click)="handleRetry()"
|
|
1430
|
+
>{{messageFor('retryGeneration')}}</button>
|
|
1431
|
+
@if (showRating) {
|
|
1432
|
+
<span class="k-spacer"></span>
|
|
1401
1433
|
<button kendoButton
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
(click)="handleCopy()"
|
|
1408
|
-
>{{messageFor('copyOutput')}}</button>
|
|
1434
|
+
fillMode="flat"
|
|
1435
|
+
icon="thumb-up-outline"
|
|
1436
|
+
[svgIcon]="positiveRatingIcon"
|
|
1437
|
+
(click)="handleRating('positive')">
|
|
1438
|
+
</button>
|
|
1409
1439
|
<button kendoButton
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
<ng-container *ngIf="showRating">
|
|
1417
|
-
<span class="k-spacer"></span>
|
|
1418
|
-
<button kendoButton
|
|
1419
|
-
fillMode="flat"
|
|
1420
|
-
icon="thumb-up-outline"
|
|
1421
|
-
[svgIcon]="positiveRatingIcon"
|
|
1422
|
-
(click)="handleRating('positive')">
|
|
1423
|
-
</button>
|
|
1424
|
-
<button kendoButton
|
|
1425
|
-
fillMode="flat"
|
|
1426
|
-
icon="thumb-down-outline"
|
|
1427
|
-
[svgIcon]="negativeRatingIcon"
|
|
1428
|
-
(click)="handleRating('negative')">
|
|
1429
|
-
</button>
|
|
1430
|
-
</ng-container>
|
|
1440
|
+
fillMode="flat"
|
|
1441
|
+
icon="thumb-down-outline"
|
|
1442
|
+
[svgIcon]="negativeRatingIcon"
|
|
1443
|
+
(click)="handleRating('negative')">
|
|
1444
|
+
</button>
|
|
1445
|
+
}
|
|
1431
1446
|
</div>
|
|
1432
|
-
|
|
1447
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1433
1448
|
}
|
|
1434
1449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
|
|
1435
1450
|
type: Component,
|
|
@@ -1437,56 +1452,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1437
1452
|
selector: '[kendoAIPromptOutputCard]',
|
|
1438
1453
|
template: `
|
|
1439
1454
|
<div class="k-card-header">
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1455
|
+
<div
|
|
1456
|
+
class="k-card-title"
|
|
1457
|
+
[attr.id]="titleId">{{outputTitle}}
|
|
1458
|
+
</div>
|
|
1459
|
+
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
|
1445
1460
|
</div>
|
|
1446
1461
|
<div class="k-card-body">
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
</ng-container>
|
|
1462
|
+
@if (customBodyTemplate) {
|
|
1463
|
+
<ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
|
|
1450
1464
|
</ng-container>
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1465
|
+
} @else {
|
|
1466
|
+
<p>{{promptOutput.output}}</p>
|
|
1467
|
+
}
|
|
1454
1468
|
</div>
|
|
1455
1469
|
<div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
|
|
1470
|
+
<button kendoButton
|
|
1471
|
+
fillMode="flat"
|
|
1472
|
+
themeColor="primary"
|
|
1473
|
+
rounded="full"
|
|
1474
|
+
icon="copy"
|
|
1475
|
+
[svgIcon]="copyIcon"
|
|
1476
|
+
(click)="handleCopy()"
|
|
1477
|
+
>{{messageFor('copyOutput')}}</button>
|
|
1478
|
+
<button kendoButton
|
|
1479
|
+
fillMode="flat"
|
|
1480
|
+
rounded="full"
|
|
1481
|
+
icon="arrow-rotate-cw"
|
|
1482
|
+
[svgIcon]="retryIcon"
|
|
1483
|
+
(click)="handleRetry()"
|
|
1484
|
+
>{{messageFor('retryGeneration')}}</button>
|
|
1485
|
+
@if (showRating) {
|
|
1486
|
+
<span class="k-spacer"></span>
|
|
1456
1487
|
<button kendoButton
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
(click)="handleCopy()"
|
|
1463
|
-
>{{messageFor('copyOutput')}}</button>
|
|
1488
|
+
fillMode="flat"
|
|
1489
|
+
icon="thumb-up-outline"
|
|
1490
|
+
[svgIcon]="positiveRatingIcon"
|
|
1491
|
+
(click)="handleRating('positive')">
|
|
1492
|
+
</button>
|
|
1464
1493
|
<button kendoButton
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
<ng-container *ngIf="showRating">
|
|
1472
|
-
<span class="k-spacer"></span>
|
|
1473
|
-
<button kendoButton
|
|
1474
|
-
fillMode="flat"
|
|
1475
|
-
icon="thumb-up-outline"
|
|
1476
|
-
[svgIcon]="positiveRatingIcon"
|
|
1477
|
-
(click)="handleRating('positive')">
|
|
1478
|
-
</button>
|
|
1479
|
-
<button kendoButton
|
|
1480
|
-
fillMode="flat"
|
|
1481
|
-
icon="thumb-down-outline"
|
|
1482
|
-
[svgIcon]="negativeRatingIcon"
|
|
1483
|
-
(click)="handleRating('negative')">
|
|
1484
|
-
</button>
|
|
1485
|
-
</ng-container>
|
|
1494
|
+
fillMode="flat"
|
|
1495
|
+
icon="thumb-down-outline"
|
|
1496
|
+
[svgIcon]="negativeRatingIcon"
|
|
1497
|
+
(click)="handleRating('negative')">
|
|
1498
|
+
</button>
|
|
1499
|
+
}
|
|
1486
1500
|
</div>
|
|
1487
|
-
|
|
1501
|
+
`,
|
|
1488
1502
|
standalone: true,
|
|
1489
|
-
imports: [ButtonComponent,
|
|
1503
|
+
imports: [ButtonComponent, NgTemplateOutlet]
|
|
1490
1504
|
}]
|
|
1491
1505
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }], propDecorators: { hostClass: [{
|
|
1492
1506
|
type: HostBinding,
|
|
@@ -1536,26 +1550,25 @@ class OutputViewComponent extends BaseView {
|
|
|
1536
1550
|
return this.service.outputTemplate?.templateRef;
|
|
1537
1551
|
}
|
|
1538
1552
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1539
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1553
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
|
|
1540
1554
|
provide: BaseView,
|
|
1541
1555
|
useExisting: forwardRef(() => OutputViewComponent)
|
|
1542
1556
|
}], usesInheritance: true, ngImport: i0, template: `
|
|
1543
1557
|
<ng-template #content>
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
</ng-container>
|
|
1551
|
-
</ng-container>
|
|
1552
|
-
<ng-template #defaultTemplate>
|
|
1553
|
-
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
1554
|
-
</ng-template>
|
|
1558
|
+
<div
|
|
1559
|
+
class="k-card-list"
|
|
1560
|
+
role="list">
|
|
1561
|
+
@for (output of promptOutputs; track output) {
|
|
1562
|
+
@if (customTemplate) {
|
|
1563
|
+
<ng-container *ngTemplateOutlet="customTemplate; context: { $implicit: output }">
|
|
1555
1564
|
</ng-container>
|
|
1556
|
-
|
|
1565
|
+
} @else {
|
|
1566
|
+
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
</div>
|
|
1557
1570
|
</ng-template>
|
|
1558
|
-
|
|
1571
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1559
1572
|
}
|
|
1560
1573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, decorators: [{
|
|
1561
1574
|
type: Component,
|
|
@@ -1567,23 +1580,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1567
1580
|
}],
|
|
1568
1581
|
template: `
|
|
1569
1582
|
<ng-template #content>
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
</ng-container>
|
|
1577
|
-
</ng-container>
|
|
1578
|
-
<ng-template #defaultTemplate>
|
|
1579
|
-
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
1580
|
-
</ng-template>
|
|
1583
|
+
<div
|
|
1584
|
+
class="k-card-list"
|
|
1585
|
+
role="list">
|
|
1586
|
+
@for (output of promptOutputs; track output) {
|
|
1587
|
+
@if (customTemplate) {
|
|
1588
|
+
<ng-container *ngTemplateOutlet="customTemplate; context: { $implicit: output }">
|
|
1581
1589
|
</ng-container>
|
|
1582
|
-
|
|
1590
|
+
} @else {
|
|
1591
|
+
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
</div>
|
|
1583
1595
|
</ng-template>
|
|
1584
|
-
|
|
1596
|
+
`,
|
|
1585
1597
|
standalone: true,
|
|
1586
|
-
imports: [
|
|
1598
|
+
imports: [AIPromptOutputCardComponent, NgTemplateOutlet]
|
|
1587
1599
|
}]
|
|
1588
1600
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
|
|
1589
1601
|
|
|
@@ -1678,84 +1690,92 @@ class PromptViewComponent extends BaseView {
|
|
|
1678
1690
|
}
|
|
1679
1691
|
}
|
|
1680
1692
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1681
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1693
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
|
|
1682
1694
|
{
|
|
1683
1695
|
provide: BaseView,
|
|
1684
1696
|
useExisting: forwardRef(() => PromptViewComponent)
|
|
1685
1697
|
}
|
|
1686
1698
|
], usesInheritance: true, ngImport: i0, template: `
|
|
1687
1699
|
<ng-template #content>
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1700
|
+
<kendo-textarea
|
|
1701
|
+
[cols]="textareaSettings?.cols"
|
|
1702
|
+
[disabled]="textareaSettings?.disabled"
|
|
1703
|
+
[fillMode]="textareaSettings?.fillMode"
|
|
1704
|
+
[flow]="textareaSettings?.flow ?? 'vertical'"
|
|
1705
|
+
[inputAttributes]="textareaSettings?.inputAttributes"
|
|
1706
|
+
[maxlength]="textareaSettings?.maxlength"
|
|
1707
|
+
[placeholder]="textareaSettings?.placeholder ?? messageFor('promptPlaceholder')"
|
|
1708
|
+
[readonly]="textareaSettings?.readonly"
|
|
1709
|
+
[resizable]="textareaSettings?.resizable ?? 'vertical'"
|
|
1710
|
+
[rounded]="textareaSettings?.rounded"
|
|
1711
|
+
[rows]="textareaSettings?.rows ?? 1"
|
|
1712
|
+
[selectOnFocus]="textareaSettings?.selectOnFocus"
|
|
1713
|
+
[showSuffixSeparator]="textareaSettings?.showSuffixSeparator ?? true"
|
|
1714
|
+
[size]="textareaSettings?.size"
|
|
1715
|
+
[tabIndex]="textareaSettings?.tabindex"
|
|
1716
|
+
[title]="textareaSettings?.title"
|
|
1717
|
+
[(value)]="textAreaValue"
|
|
1706
1718
|
>
|
|
1707
|
-
|
|
1708
|
-
|
|
1719
|
+
@if (speechToTextButtonSettings) {
|
|
1720
|
+
<kendo-textarea-suffix>
|
|
1721
|
+
<button kendoSpeechToTextButton
|
|
1722
|
+
role="button"
|
|
1723
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
1724
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
1725
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'flat'"
|
|
1726
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
1727
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
1728
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
1729
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
1730
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
1731
|
+
[size]="speechToTextButtonSettings?.size"
|
|
1732
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
1733
|
+
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
1734
|
+
[attr.title]="messageFor('speechToTextButton')"
|
|
1735
|
+
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
1736
|
+
(error)="onSpeechToTextError($event)"
|
|
1737
|
+
(result)="onSpeechToTextResult($event)"
|
|
1738
|
+
></button>
|
|
1739
|
+
</kendo-textarea-suffix>
|
|
1740
|
+
}
|
|
1741
|
+
</kendo-textarea>
|
|
1742
|
+
@if (promptSuggestions) {
|
|
1743
|
+
<div
|
|
1744
|
+
class="k-prompt-expander">
|
|
1745
|
+
<button kendoButton
|
|
1746
|
+
[attr.aria-controls]="contentId"
|
|
1747
|
+
[attr.aria-expanded]="showSuggestions"
|
|
1748
|
+
fillMode="flat"
|
|
1749
|
+
[icon]="suggestionsIcons.font"
|
|
1750
|
+
[svgIcon]="suggestionsIcons.svg"
|
|
1751
|
+
type="button"
|
|
1752
|
+
(click)="showSuggestions = !showSuggestions">
|
|
1753
|
+
{{messageFor('promptSuggestions')}}
|
|
1754
|
+
</button>
|
|
1755
|
+
@if (showSuggestions) {
|
|
1756
|
+
<div
|
|
1757
|
+
class="k-prompt-expander-content"
|
|
1758
|
+
[attr.id]="contentId">
|
|
1759
|
+
<div class="k-suggestion-group" role="group">
|
|
1760
|
+
@for (suggestion of promptSuggestions; track suggestion) {
|
|
1761
|
+
<div
|
|
1762
|
+
class="k-suggestion"
|
|
1709
1763
|
role="button"
|
|
1710
|
-
[
|
|
1711
|
-
[
|
|
1712
|
-
[
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
1720
|
-
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
1721
|
-
[attr.title]="messageFor('speechToTextButton')"
|
|
1722
|
-
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
1723
|
-
(error)="onSpeechToTextError($event)"
|
|
1724
|
-
(result)="onSpeechToTextResult($event)"
|
|
1725
|
-
></button>
|
|
1726
|
-
</kendo-textarea-suffix>
|
|
1727
|
-
</kendo-textarea>
|
|
1728
|
-
<div *ngIf="promptSuggestions"
|
|
1729
|
-
class="k-prompt-expander">
|
|
1730
|
-
<button kendoButton
|
|
1731
|
-
[attr.aria-controls]="contentId"
|
|
1732
|
-
[attr.aria-expanded]="showSuggestions"
|
|
1733
|
-
fillMode="flat"
|
|
1734
|
-
[icon]="suggestionsIcons.font"
|
|
1735
|
-
[svgIcon]="suggestionsIcons.svg"
|
|
1736
|
-
type="button"
|
|
1737
|
-
(click)="showSuggestions = !showSuggestions">
|
|
1738
|
-
{{messageFor('promptSuggestions')}}
|
|
1739
|
-
</button>
|
|
1740
|
-
<div *ngIf="showSuggestions"
|
|
1741
|
-
class="k-prompt-expander-content"
|
|
1742
|
-
[attr.id]="contentId">
|
|
1743
|
-
<div class="k-suggestion-group" role="group">
|
|
1744
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
|
1745
|
-
class="k-suggestion"
|
|
1746
|
-
role="button"
|
|
1747
|
-
[attr.tabindex]="0"
|
|
1748
|
-
[attr.aria-label]="suggestion"
|
|
1749
|
-
[attr.title]="suggestion"
|
|
1750
|
-
(click)="suggestionClick(suggestion)"
|
|
1751
|
-
(keydown)="suggestionKeydown($event, suggestion)">
|
|
1752
|
-
{{suggestion}}
|
|
1753
|
-
</div>
|
|
1754
|
-
</div>
|
|
1764
|
+
[attr.tabindex]="0"
|
|
1765
|
+
[attr.aria-label]="suggestion"
|
|
1766
|
+
[attr.title]="suggestion"
|
|
1767
|
+
(click)="suggestionClick(suggestion)"
|
|
1768
|
+
(keydown)="suggestionKeydown($event, suggestion)">
|
|
1769
|
+
{{suggestion}}
|
|
1770
|
+
</div>
|
|
1771
|
+
}
|
|
1772
|
+
</div>
|
|
1755
1773
|
</div>
|
|
1774
|
+
}
|
|
1756
1775
|
</div>
|
|
1776
|
+
}
|
|
1757
1777
|
</ng-template>
|
|
1758
|
-
|
|
1778
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { 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: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }] });
|
|
1759
1779
|
}
|
|
1760
1780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, decorators: [{
|
|
1761
1781
|
type: Component,
|
|
@@ -1769,79 +1789,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1769
1789
|
],
|
|
1770
1790
|
template: `
|
|
1771
1791
|
<ng-template #content>
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1792
|
+
<kendo-textarea
|
|
1793
|
+
[cols]="textareaSettings?.cols"
|
|
1794
|
+
[disabled]="textareaSettings?.disabled"
|
|
1795
|
+
[fillMode]="textareaSettings?.fillMode"
|
|
1796
|
+
[flow]="textareaSettings?.flow ?? 'vertical'"
|
|
1797
|
+
[inputAttributes]="textareaSettings?.inputAttributes"
|
|
1798
|
+
[maxlength]="textareaSettings?.maxlength"
|
|
1799
|
+
[placeholder]="textareaSettings?.placeholder ?? messageFor('promptPlaceholder')"
|
|
1800
|
+
[readonly]="textareaSettings?.readonly"
|
|
1801
|
+
[resizable]="textareaSettings?.resizable ?? 'vertical'"
|
|
1802
|
+
[rounded]="textareaSettings?.rounded"
|
|
1803
|
+
[rows]="textareaSettings?.rows ?? 1"
|
|
1804
|
+
[selectOnFocus]="textareaSettings?.selectOnFocus"
|
|
1805
|
+
[showSuffixSeparator]="textareaSettings?.showSuffixSeparator ?? true"
|
|
1806
|
+
[size]="textareaSettings?.size"
|
|
1807
|
+
[tabIndex]="textareaSettings?.tabindex"
|
|
1808
|
+
[title]="textareaSettings?.title"
|
|
1809
|
+
[(value)]="textAreaValue"
|
|
1790
1810
|
>
|
|
1791
|
-
|
|
1792
|
-
|
|
1811
|
+
@if (speechToTextButtonSettings) {
|
|
1812
|
+
<kendo-textarea-suffix>
|
|
1813
|
+
<button kendoSpeechToTextButton
|
|
1814
|
+
role="button"
|
|
1815
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
1816
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
1817
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'flat'"
|
|
1818
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
1819
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
1820
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
1821
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
1822
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
1823
|
+
[size]="speechToTextButtonSettings?.size"
|
|
1824
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
1825
|
+
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
1826
|
+
[attr.title]="messageFor('speechToTextButton')"
|
|
1827
|
+
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
1828
|
+
(error)="onSpeechToTextError($event)"
|
|
1829
|
+
(result)="onSpeechToTextResult($event)"
|
|
1830
|
+
></button>
|
|
1831
|
+
</kendo-textarea-suffix>
|
|
1832
|
+
}
|
|
1833
|
+
</kendo-textarea>
|
|
1834
|
+
@if (promptSuggestions) {
|
|
1835
|
+
<div
|
|
1836
|
+
class="k-prompt-expander">
|
|
1837
|
+
<button kendoButton
|
|
1838
|
+
[attr.aria-controls]="contentId"
|
|
1839
|
+
[attr.aria-expanded]="showSuggestions"
|
|
1840
|
+
fillMode="flat"
|
|
1841
|
+
[icon]="suggestionsIcons.font"
|
|
1842
|
+
[svgIcon]="suggestionsIcons.svg"
|
|
1843
|
+
type="button"
|
|
1844
|
+
(click)="showSuggestions = !showSuggestions">
|
|
1845
|
+
{{messageFor('promptSuggestions')}}
|
|
1846
|
+
</button>
|
|
1847
|
+
@if (showSuggestions) {
|
|
1848
|
+
<div
|
|
1849
|
+
class="k-prompt-expander-content"
|
|
1850
|
+
[attr.id]="contentId">
|
|
1851
|
+
<div class="k-suggestion-group" role="group">
|
|
1852
|
+
@for (suggestion of promptSuggestions; track suggestion) {
|
|
1853
|
+
<div
|
|
1854
|
+
class="k-suggestion"
|
|
1793
1855
|
role="button"
|
|
1794
|
-
[
|
|
1795
|
-
[
|
|
1796
|
-
[
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
1804
|
-
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
1805
|
-
[attr.title]="messageFor('speechToTextButton')"
|
|
1806
|
-
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
1807
|
-
(error)="onSpeechToTextError($event)"
|
|
1808
|
-
(result)="onSpeechToTextResult($event)"
|
|
1809
|
-
></button>
|
|
1810
|
-
</kendo-textarea-suffix>
|
|
1811
|
-
</kendo-textarea>
|
|
1812
|
-
<div *ngIf="promptSuggestions"
|
|
1813
|
-
class="k-prompt-expander">
|
|
1814
|
-
<button kendoButton
|
|
1815
|
-
[attr.aria-controls]="contentId"
|
|
1816
|
-
[attr.aria-expanded]="showSuggestions"
|
|
1817
|
-
fillMode="flat"
|
|
1818
|
-
[icon]="suggestionsIcons.font"
|
|
1819
|
-
[svgIcon]="suggestionsIcons.svg"
|
|
1820
|
-
type="button"
|
|
1821
|
-
(click)="showSuggestions = !showSuggestions">
|
|
1822
|
-
{{messageFor('promptSuggestions')}}
|
|
1823
|
-
</button>
|
|
1824
|
-
<div *ngIf="showSuggestions"
|
|
1825
|
-
class="k-prompt-expander-content"
|
|
1826
|
-
[attr.id]="contentId">
|
|
1827
|
-
<div class="k-suggestion-group" role="group">
|
|
1828
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
|
1829
|
-
class="k-suggestion"
|
|
1830
|
-
role="button"
|
|
1831
|
-
[attr.tabindex]="0"
|
|
1832
|
-
[attr.aria-label]="suggestion"
|
|
1833
|
-
[attr.title]="suggestion"
|
|
1834
|
-
(click)="suggestionClick(suggestion)"
|
|
1835
|
-
(keydown)="suggestionKeydown($event, suggestion)">
|
|
1836
|
-
{{suggestion}}
|
|
1837
|
-
</div>
|
|
1838
|
-
</div>
|
|
1856
|
+
[attr.tabindex]="0"
|
|
1857
|
+
[attr.aria-label]="suggestion"
|
|
1858
|
+
[attr.title]="suggestion"
|
|
1859
|
+
(click)="suggestionClick(suggestion)"
|
|
1860
|
+
(keydown)="suggestionKeydown($event, suggestion)">
|
|
1861
|
+
{{suggestion}}
|
|
1862
|
+
</div>
|
|
1863
|
+
}
|
|
1864
|
+
</div>
|
|
1839
1865
|
</div>
|
|
1866
|
+
}
|
|
1840
1867
|
</div>
|
|
1868
|
+
}
|
|
1841
1869
|
</ng-template>
|
|
1842
|
-
|
|
1870
|
+
`,
|
|
1843
1871
|
standalone: true,
|
|
1844
|
-
imports: [TextAreaComponent,
|
|
1872
|
+
imports: [TextAreaComponent, ButtonComponent, TextAreaSuffixComponent, SpeechToTextButtonComponent]
|
|
1845
1873
|
}]
|
|
1846
1874
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
|
|
1847
1875
|
|
|
@@ -2681,96 +2709,100 @@ class SuggestedActionsComponent extends ChatItem {
|
|
|
2681
2709
|
this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
|
|
2682
2710
|
}
|
|
2683
2711
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, deps: [{ token: ChatService }, { token: i1.LocalizationService }, { token: SuggestionsScrollService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2684
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2712
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", suggestions: "suggestions", tabbable: "tabbable", type: "type", suggestionTemplate: "suggestionTemplate" }, outputs: { dispatchAction: "dispatchAction", dispatchSuggestion: "dispatchSuggestion" }, host: { properties: { "class.k-suggestion-group": "this.defaultClass", "class.k-suggestion-group-scrollable": "this.scrollableClass", "class.k-suggestion-scrollwrap": "this.scrollButtonsClass", "attr.role": "this.role" } }, providers: [{
|
|
2685
2713
|
provide: ChatItem,
|
|
2686
2714
|
useExisting: forwardRef(() => SuggestedActionsComponent)
|
|
2687
2715
|
},
|
|
2688
2716
|
SuggestionsScrollService
|
|
2689
2717
|
], viewQueries: [{ propertyName: "suggestionsContainer", first: true, predicate: ["suggestionsContainer"], descendants: true, read: ElementRef }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true, read: ElementRef }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true, read: ElementRef }, { propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2690
|
-
|
|
2691
|
-
|
|
2718
|
+
@if (hasScrollButtons) {
|
|
2719
|
+
<span
|
|
2692
2720
|
#prevScrollButton
|
|
2693
2721
|
kendoChatScrollableButton
|
|
2694
2722
|
[prev]="true"
|
|
2695
2723
|
[title]="getScrollButtonTitle('prev')"
|
|
2696
2724
|
class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
|
|
2697
2725
|
(onClick)="scrollSuggestions($event)"
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2726
|
+
>
|
|
2727
|
+
</span>
|
|
2728
|
+
}
|
|
2729
|
+
@if (hasScrollButtons) {
|
|
2730
|
+
<div class="k-suggestion-group"
|
|
2701
2731
|
#suggestionsContainer
|
|
2702
2732
|
role="group"
|
|
2703
2733
|
(scroll)="onScroll($event)">
|
|
2704
2734
|
<ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2735
|
+
</div>
|
|
2736
|
+
} @else {
|
|
2737
|
+
<ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
|
|
2711
2741
|
<ng-template #suggestionsContent>
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2742
|
+
@if (actions) {
|
|
2743
|
+
@for (action of actions; track action; let index = $index; let first = $first; let last = $last) {
|
|
2744
|
+
<span
|
|
2745
|
+
#item
|
|
2746
|
+
class="k-suggestion k-suggestion-primary"
|
|
2747
|
+
role="button"
|
|
2748
|
+
[class.k-selected]="isSelected(index)"
|
|
2749
|
+
[class.k-focus]="isSelected(index)"
|
|
2750
|
+
[class.k-active]="isActive(index)"
|
|
2751
|
+
[attr.tabindex]="0"
|
|
2752
|
+
(click)="actionClick(action, index)"
|
|
2753
|
+
(keydown)="actionKeydown($event, action)"
|
|
2754
|
+
(mousedown)="toggleActiveState(true, index)"
|
|
2755
|
+
(mouseup)="toggleActiveState(false, index)"
|
|
2726
2756
|
>
|
|
2727
|
-
|
|
2757
|
+
{{ action.title || action.value }}
|
|
2758
|
+
</span>
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
@if (suggestions) {
|
|
2763
|
+
@if (!suggestionTemplate?.templateRef) {
|
|
2764
|
+
@for (suggestion of suggestions; track suggestion; let index = $index; let first = $first; let last = $last) {
|
|
2765
|
+
<span
|
|
2766
|
+
#item
|
|
2767
|
+
class="k-suggestion"
|
|
2768
|
+
role="button"
|
|
2769
|
+
[class.k-selected]="isSelected(index)"
|
|
2770
|
+
[class.k-focus]="isSelected(index)"
|
|
2771
|
+
[class.k-active]="isActive(index)"
|
|
2772
|
+
[attr.tabindex]="0"
|
|
2773
|
+
(click)="suggestionClick(suggestion, index)"
|
|
2774
|
+
(keydown)="suggestionKeydown($event, suggestion)"
|
|
2775
|
+
(mousedown)="toggleActiveState(true, index)"
|
|
2776
|
+
(mouseup)="toggleActiveState(false, index)"
|
|
2777
|
+
>
|
|
2778
|
+
{{ suggestion.text }}
|
|
2728
2779
|
</span>
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
[attr.tabindex]="0"
|
|
2742
|
-
(click)="suggestionClick(suggestion, index)"
|
|
2743
|
-
(keydown)="suggestionKeydown($event, suggestion)"
|
|
2744
|
-
(mousedown)="toggleActiveState(true, index)"
|
|
2745
|
-
(mouseup)="toggleActiveState(false, index)"
|
|
2746
|
-
>
|
|
2747
|
-
{{ suggestion.text }}
|
|
2748
|
-
</span>
|
|
2749
|
-
</ng-container>
|
|
2750
|
-
|
|
2751
|
-
<ng-container *ngIf="suggestionTemplate?.templateRef">
|
|
2752
|
-
<ng-container *ngFor="let suggestion of suggestions">
|
|
2753
|
-
<ng-template
|
|
2754
|
-
[ngTemplateOutlet]="suggestionTemplate.templateRef"
|
|
2755
|
-
[ngTemplateOutletContext]="{ $implicit: suggestion }"
|
|
2756
|
-
>
|
|
2757
|
-
</ng-template>
|
|
2758
|
-
</ng-container>
|
|
2759
|
-
</ng-container>
|
|
2760
|
-
</ng-container>
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
@if (suggestionTemplate?.templateRef) {
|
|
2783
|
+
@for (suggestion of suggestions; track suggestion) {
|
|
2784
|
+
<ng-template
|
|
2785
|
+
[ngTemplateOutlet]="suggestionTemplate.templateRef"
|
|
2786
|
+
[ngTemplateOutletContext]="{ $implicit: suggestion }"
|
|
2787
|
+
>
|
|
2788
|
+
</ng-template>
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2761
2792
|
</ng-template>
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2793
|
+
|
|
2794
|
+
@if (hasScrollButtons) {
|
|
2795
|
+
<span
|
|
2765
2796
|
#nextScrollButton
|
|
2766
2797
|
kendoChatScrollableButton
|
|
2767
2798
|
[prev]="false"
|
|
2768
2799
|
[title]="getScrollButtonTitle('next')"
|
|
2769
2800
|
class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
|
|
2770
2801
|
(onClick)="scrollSuggestions($event)"
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2802
|
+
>
|
|
2803
|
+
</span>
|
|
2804
|
+
}
|
|
2805
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChatScrollableButtonComponent, selector: "[kendoChatScrollableButton]", inputs: ["prev"], outputs: ["onClick"] }] });
|
|
2774
2806
|
}
|
|
2775
2807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
|
|
2776
2808
|
type: Component,
|
|
@@ -2782,92 +2814,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2782
2814
|
},
|
|
2783
2815
|
SuggestionsScrollService],
|
|
2784
2816
|
template: `
|
|
2785
|
-
|
|
2786
|
-
|
|
2817
|
+
@if (hasScrollButtons) {
|
|
2818
|
+
<span
|
|
2787
2819
|
#prevScrollButton
|
|
2788
2820
|
kendoChatScrollableButton
|
|
2789
2821
|
[prev]="true"
|
|
2790
2822
|
[title]="getScrollButtonTitle('prev')"
|
|
2791
2823
|
class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
|
|
2792
2824
|
(onClick)="scrollSuggestions($event)"
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2825
|
+
>
|
|
2826
|
+
</span>
|
|
2827
|
+
}
|
|
2828
|
+
@if (hasScrollButtons) {
|
|
2829
|
+
<div class="k-suggestion-group"
|
|
2796
2830
|
#suggestionsContainer
|
|
2797
2831
|
role="group"
|
|
2798
2832
|
(scroll)="onScroll($event)">
|
|
2799
2833
|
<ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2834
|
+
</div>
|
|
2835
|
+
} @else {
|
|
2836
|
+
<ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
|
|
2806
2840
|
<ng-template #suggestionsContent>
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2841
|
+
@if (actions) {
|
|
2842
|
+
@for (action of actions; track action; let index = $index; let first = $first; let last = $last) {
|
|
2843
|
+
<span
|
|
2844
|
+
#item
|
|
2845
|
+
class="k-suggestion k-suggestion-primary"
|
|
2846
|
+
role="button"
|
|
2847
|
+
[class.k-selected]="isSelected(index)"
|
|
2848
|
+
[class.k-focus]="isSelected(index)"
|
|
2849
|
+
[class.k-active]="isActive(index)"
|
|
2850
|
+
[attr.tabindex]="0"
|
|
2851
|
+
(click)="actionClick(action, index)"
|
|
2852
|
+
(keydown)="actionKeydown($event, action)"
|
|
2853
|
+
(mousedown)="toggleActiveState(true, index)"
|
|
2854
|
+
(mouseup)="toggleActiveState(false, index)"
|
|
2821
2855
|
>
|
|
2822
|
-
|
|
2856
|
+
{{ action.title || action.value }}
|
|
2857
|
+
</span>
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
@if (suggestions) {
|
|
2862
|
+
@if (!suggestionTemplate?.templateRef) {
|
|
2863
|
+
@for (suggestion of suggestions; track suggestion; let index = $index; let first = $first; let last = $last) {
|
|
2864
|
+
<span
|
|
2865
|
+
#item
|
|
2866
|
+
class="k-suggestion"
|
|
2867
|
+
role="button"
|
|
2868
|
+
[class.k-selected]="isSelected(index)"
|
|
2869
|
+
[class.k-focus]="isSelected(index)"
|
|
2870
|
+
[class.k-active]="isActive(index)"
|
|
2871
|
+
[attr.tabindex]="0"
|
|
2872
|
+
(click)="suggestionClick(suggestion, index)"
|
|
2873
|
+
(keydown)="suggestionKeydown($event, suggestion)"
|
|
2874
|
+
(mousedown)="toggleActiveState(true, index)"
|
|
2875
|
+
(mouseup)="toggleActiveState(false, index)"
|
|
2876
|
+
>
|
|
2877
|
+
{{ suggestion.text }}
|
|
2823
2878
|
</span>
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
[attr.tabindex]="0"
|
|
2837
|
-
(click)="suggestionClick(suggestion, index)"
|
|
2838
|
-
(keydown)="suggestionKeydown($event, suggestion)"
|
|
2839
|
-
(mousedown)="toggleActiveState(true, index)"
|
|
2840
|
-
(mouseup)="toggleActiveState(false, index)"
|
|
2841
|
-
>
|
|
2842
|
-
{{ suggestion.text }}
|
|
2843
|
-
</span>
|
|
2844
|
-
</ng-container>
|
|
2845
|
-
|
|
2846
|
-
<ng-container *ngIf="suggestionTemplate?.templateRef">
|
|
2847
|
-
<ng-container *ngFor="let suggestion of suggestions">
|
|
2848
|
-
<ng-template
|
|
2849
|
-
[ngTemplateOutlet]="suggestionTemplate.templateRef"
|
|
2850
|
-
[ngTemplateOutletContext]="{ $implicit: suggestion }"
|
|
2851
|
-
>
|
|
2852
|
-
</ng-template>
|
|
2853
|
-
</ng-container>
|
|
2854
|
-
</ng-container>
|
|
2855
|
-
</ng-container>
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
@if (suggestionTemplate?.templateRef) {
|
|
2882
|
+
@for (suggestion of suggestions; track suggestion) {
|
|
2883
|
+
<ng-template
|
|
2884
|
+
[ngTemplateOutlet]="suggestionTemplate.templateRef"
|
|
2885
|
+
[ngTemplateOutletContext]="{ $implicit: suggestion }"
|
|
2886
|
+
>
|
|
2887
|
+
</ng-template>
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2856
2891
|
</ng-template>
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2892
|
+
|
|
2893
|
+
@if (hasScrollButtons) {
|
|
2894
|
+
<span
|
|
2860
2895
|
#nextScrollButton
|
|
2861
2896
|
kendoChatScrollableButton
|
|
2862
2897
|
[prev]="false"
|
|
2863
2898
|
[title]="getScrollButtonTitle('next')"
|
|
2864
2899
|
class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
|
|
2865
2900
|
(onClick)="scrollSuggestions($event)"
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2901
|
+
>
|
|
2902
|
+
</span>
|
|
2903
|
+
}
|
|
2904
|
+
`,
|
|
2869
2905
|
standalone: true,
|
|
2870
|
-
imports: [
|
|
2906
|
+
imports: [NgTemplateOutlet, ChatScrollableButtonComponent]
|
|
2871
2907
|
}]
|
|
2872
2908
|
}], ctorParameters: () => [{ type: ChatService }, { type: i1.LocalizationService }, { type: SuggestionsScrollService }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { defaultClass: [{
|
|
2873
2909
|
type: HostBinding,
|
|
@@ -2942,30 +2978,31 @@ class ChatFileComponent extends ChatItem {
|
|
|
2942
2978
|
}
|
|
2943
2979
|
focus() { }
|
|
2944
2980
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2945
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2981
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChatFileComponent, isStandalone: true, selector: "li[chatFile]", inputs: { chatFile: "chatFile", removable: "removable", fileActions: "fileActions" }, outputs: { remove: "remove", actionClick: "actionClick", actionsToggle: "actionsToggle", actionButtonClick: "actionButtonClick" }, providers: [{
|
|
2946
2982
|
provide: ChatItem,
|
|
2947
2983
|
useExisting: forwardRef(() => ChatFileComponent)
|
|
2948
2984
|
}], usesInheritance: true, ngImport: i0, template: `
|
|
2949
2985
|
<kendo-icon-wrapper
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2986
|
+
size="xlarge"
|
|
2987
|
+
[name]="fileGroupClass(chatFile.extension)"
|
|
2988
|
+
[svgIcon]="fileThumbnail(chatFile.extension)"
|
|
2989
|
+
>
|
|
2954
2990
|
</kendo-icon-wrapper>
|
|
2955
2991
|
<div class="k-chat-file-info">
|
|
2956
|
-
|
|
2957
|
-
|
|
2992
|
+
<span class="k-chat-file-name">{{chatFile.name}}</span>
|
|
2993
|
+
<span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
|
|
2958
2994
|
</div>
|
|
2959
|
-
|
|
2995
|
+
@if (removable) {
|
|
2996
|
+
<button
|
|
2960
2997
|
kendoButton
|
|
2961
|
-
*ngIf="removable"
|
|
2962
2998
|
[attr.title]="textFor('removeFileTitle')"
|
|
2963
2999
|
[svgIcon]="deleteIcon"
|
|
2964
3000
|
(click)="remove.emit(chatFile)"
|
|
2965
3001
|
fillMode="flat"
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
3002
|
+
></button>
|
|
3003
|
+
}
|
|
3004
|
+
@if (fileActions && fileActions.length > 0) {
|
|
3005
|
+
<kendo-dropdownbutton
|
|
2969
3006
|
[data]="fileActions"
|
|
2970
3007
|
[attr.title]="textFor('fileActionsTitle')"
|
|
2971
3008
|
fillMode="flat"
|
|
@@ -2975,8 +3012,9 @@ class ChatFileComponent extends ChatItem {
|
|
|
2975
3012
|
(click)="$event.preventDefault()"
|
|
2976
3013
|
(open)="actionsToggle.emit(true)"
|
|
2977
3014
|
(close)="actionsToggle.emit(false)"
|
|
2978
|
-
|
|
2979
|
-
|
|
3015
|
+
></kendo-dropdownbutton>
|
|
3016
|
+
}
|
|
3017
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { 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: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }] });
|
|
2980
3018
|
}
|
|
2981
3019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, decorators: [{
|
|
2982
3020
|
type: Component,
|
|
@@ -2988,25 +3026,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2988
3026
|
}],
|
|
2989
3027
|
template: `
|
|
2990
3028
|
<kendo-icon-wrapper
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3029
|
+
size="xlarge"
|
|
3030
|
+
[name]="fileGroupClass(chatFile.extension)"
|
|
3031
|
+
[svgIcon]="fileThumbnail(chatFile.extension)"
|
|
3032
|
+
>
|
|
2995
3033
|
</kendo-icon-wrapper>
|
|
2996
3034
|
<div class="k-chat-file-info">
|
|
2997
|
-
|
|
2998
|
-
|
|
3035
|
+
<span class="k-chat-file-name">{{chatFile.name}}</span>
|
|
3036
|
+
<span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
|
|
2999
3037
|
</div>
|
|
3000
|
-
|
|
3038
|
+
@if (removable) {
|
|
3039
|
+
<button
|
|
3001
3040
|
kendoButton
|
|
3002
|
-
*ngIf="removable"
|
|
3003
3041
|
[attr.title]="textFor('removeFileTitle')"
|
|
3004
3042
|
[svgIcon]="deleteIcon"
|
|
3005
3043
|
(click)="remove.emit(chatFile)"
|
|
3006
3044
|
fillMode="flat"
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3045
|
+
></button>
|
|
3046
|
+
}
|
|
3047
|
+
@if (fileActions && fileActions.length > 0) {
|
|
3048
|
+
<kendo-dropdownbutton
|
|
3010
3049
|
[data]="fileActions"
|
|
3011
3050
|
[attr.title]="textFor('fileActionsTitle')"
|
|
3012
3051
|
fillMode="flat"
|
|
@@ -3016,10 +3055,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3016
3055
|
(click)="$event.preventDefault()"
|
|
3017
3056
|
(open)="actionsToggle.emit(true)"
|
|
3018
3057
|
(close)="actionsToggle.emit(false)"
|
|
3019
|
-
|
|
3020
|
-
|
|
3058
|
+
></kendo-dropdownbutton>
|
|
3059
|
+
}
|
|
3060
|
+
`,
|
|
3021
3061
|
standalone: true,
|
|
3022
|
-
imports: [
|
|
3062
|
+
imports: [IconWrapperComponent, ButtonComponent, DropDownButtonComponent]
|
|
3023
3063
|
}]
|
|
3024
3064
|
}], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { chatFile: [{
|
|
3025
3065
|
type: Input
|
|
@@ -3135,18 +3175,24 @@ class MessageReferenceComponent extends ChatItem {
|
|
|
3135
3175
|
}
|
|
3136
3176
|
focus() { }
|
|
3137
3177
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageReferenceComponent, deps: [{ token: i1.LocalizationService }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3178
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageReferenceComponent, isStandalone: true, selector: "chat-message-reference-content", inputs: { message: "message" }, host: { properties: { "class.k-message-reference-content": "this.hostClass" } }, providers: [{
|
|
3139
3179
|
provide: ChatItem,
|
|
3140
3180
|
useExisting: forwardRef(() => MessageReferenceComponent)
|
|
3141
3181
|
}], usesInheritance: true, ngImport: i0, template: `
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3182
|
+
@if (message.text && !message.isDeleted) {
|
|
3183
|
+
{{message.text}}
|
|
3184
|
+
}
|
|
3185
|
+
@if (!message.text && !message.isDeleted && message.files && message.files.length > 0) {
|
|
3186
|
+
<li class="k-chat-file" [chatFile]="message.files[0]">
|
|
3187
|
+
</li>
|
|
3188
|
+
}
|
|
3189
|
+
@if (message.isDeleted && isOwnMessage(message)) {
|
|
3190
|
+
{{ textFor('deletedMessageSenderText') }}
|
|
3191
|
+
}
|
|
3192
|
+
@if (message.isDeleted && !isOwnMessage(message)) {
|
|
3193
|
+
{{ textFor('deletedMessageReceiverText') }}
|
|
3194
|
+
}
|
|
3195
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
|
|
3150
3196
|
}
|
|
3151
3197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageReferenceComponent, decorators: [{
|
|
3152
3198
|
type: Component,
|
|
@@ -3157,16 +3203,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3157
3203
|
useExisting: forwardRef(() => MessageReferenceComponent)
|
|
3158
3204
|
}],
|
|
3159
3205
|
template: `
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3206
|
+
@if (message.text && !message.isDeleted) {
|
|
3207
|
+
{{message.text}}
|
|
3208
|
+
}
|
|
3209
|
+
@if (!message.text && !message.isDeleted && message.files && message.files.length > 0) {
|
|
3210
|
+
<li class="k-chat-file" [chatFile]="message.files[0]">
|
|
3211
|
+
</li>
|
|
3212
|
+
}
|
|
3213
|
+
@if (message.isDeleted && isOwnMessage(message)) {
|
|
3214
|
+
{{ textFor('deletedMessageSenderText') }}
|
|
3215
|
+
}
|
|
3216
|
+
@if (message.isDeleted && !isOwnMessage(message)) {
|
|
3217
|
+
{{ textFor('deletedMessageReceiverText') }}
|
|
3218
|
+
}
|
|
3219
|
+
`,
|
|
3168
3220
|
standalone: true,
|
|
3169
|
-
imports: [
|
|
3221
|
+
imports: [ChatFileComponent]
|
|
3170
3222
|
}]
|
|
3171
3223
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: ChatService }], propDecorators: { hostClass: [{
|
|
3172
3224
|
type: HostBinding,
|
|
@@ -3371,9 +3423,9 @@ class MessageBoxComponent {
|
|
|
3371
3423
|
this.executeSuggestion.emit(suggestion);
|
|
3372
3424
|
}
|
|
3373
3425
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageBoxComponent, deps: [{ token: ChatService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3374
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3375
|
-
|
|
3376
|
-
|
|
3426
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageBoxComponent, isStandalone: true, selector: "kendo-message-box", inputs: { authorId: "authorId", autoScroll: "autoScroll", suggestions: "suggestions", placeholder: "placeholder", inputValue: "inputValue", localization: "localization", messageBoxTemplate: "messageBoxTemplate", suggestionTemplate: "suggestionTemplate" }, outputs: { sendMessage: "sendMessage", executeSuggestion: "executeSuggestion", fileSelect: "fileSelect", fileRemove: "fileRemove" }, host: { properties: { "style.border-color": "this.borderColor", "class.k-message-box-wrapper": "this.messageBoxWrapperClass" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }, { propertyName: "fileSelectComponent", first: true, predicate: ["fileSelect"], descendants: true }, { propertyName: "suggestedActionsComponent", first: true, predicate: SuggestedActionsComponent, descendants: true }], ngImport: i0, template: `
|
|
3427
|
+
@if (suggestions?.length > 0) {
|
|
3428
|
+
<kendo-chat-suggested-actions
|
|
3377
3429
|
#suggestedActions
|
|
3378
3430
|
[suggestions]="suggestions"
|
|
3379
3431
|
type="suggestion"
|
|
@@ -3382,110 +3434,120 @@ class MessageBoxComponent {
|
|
|
3382
3434
|
(dispatchSuggestion)="dispatchSuggestion($event)"
|
|
3383
3435
|
(click)="select(suggestedActions, $event)"
|
|
3384
3436
|
(focus)="select(suggestedActions, $event)"
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3437
|
+
></kendo-chat-suggested-actions>
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
@if (!messageBoxTemplate?.templateRef) {
|
|
3441
|
+
<kendo-textarea
|
|
3442
|
+
#messageBoxInput
|
|
3443
|
+
class="k-message-box"
|
|
3444
|
+
resizable="none"
|
|
3445
|
+
[rows]="3"
|
|
3393
3446
|
[inputAttributes]="{
|
|
3394
3447
|
'aria-label': textFor('messageBoxInputLabel')
|
|
3395
3448
|
}"
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3449
|
+
[placeholder]="placeholder || textFor('messagePlaceholder')"
|
|
3450
|
+
[showSuffixSeparator]="false"
|
|
3451
|
+
(keydown)="textAreaKeydown($event)"
|
|
3452
|
+
[value]="inputValue"
|
|
3453
|
+
(valueChange)="onInputValueChange($event)"
|
|
3401
3454
|
>
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
[attr.title]="textFor('removeReplyTitle')"
|
|
3409
|
-
[svgIcon]="deleteIcon"
|
|
3410
|
-
(click)="removeReply()"
|
|
3411
|
-
fillMode="flat"
|
|
3412
|
-
></button>
|
|
3413
|
-
</div>
|
|
3414
|
-
<ul class="k-chat-file-wrapper">
|
|
3415
|
-
<li class="k-chat-file"
|
|
3416
|
-
*ngFor="let file of files; let i = index"
|
|
3417
|
-
[chatFile]="file"
|
|
3418
|
-
[removable]="true"
|
|
3419
|
-
(remove)="removeFile(i)"
|
|
3420
|
-
></li>
|
|
3421
|
-
</ul>
|
|
3422
|
-
</kendo-textarea-prefix>
|
|
3423
|
-
|
|
3424
|
-
<kendo-textarea-suffix>
|
|
3425
|
-
<button *ngIf="speechToTextButtonSettings"
|
|
3426
|
-
kendoSpeechToTextButton
|
|
3427
|
-
[attr.title]="textFor('speechToTextButtonTitle')"
|
|
3428
|
-
[continuous]="speechToTextButtonSettings?.continuous"
|
|
3429
|
-
[disabled]="speechToTextButtonSettings?.disabled"
|
|
3430
|
-
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'clear'"
|
|
3431
|
-
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
3432
|
-
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
3433
|
-
[lang]="speechToTextButtonSettings?.lang"
|
|
3434
|
-
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
3435
|
-
[rounded]="speechToTextButtonSettings?.rounded"
|
|
3436
|
-
[size]="speechToTextButtonSettings?.size"
|
|
3437
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
3438
|
-
(result)="handleSpeechResult($event)"
|
|
3439
|
-
(start)="isListening = true"
|
|
3440
|
-
(end)="isListening = false"
|
|
3441
|
-
></button>
|
|
3455
|
+
@if (reply || (files && files.length > 0)) {
|
|
3456
|
+
<kendo-textarea-prefix>
|
|
3457
|
+
@if (reply) {
|
|
3458
|
+
<div class="k-message-reference k-message-reference-sender" (click)="onReplyReferenceClick($event)">
|
|
3459
|
+
<chat-message-reference-content [message]="reply"></chat-message-reference-content>
|
|
3460
|
+
<span class="k-spacer"></span>
|
|
3442
3461
|
<button
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
fillMode="clear"
|
|
3449
|
-
(click)="selectFiles()"
|
|
3462
|
+
kendoButton
|
|
3463
|
+
[attr.title]="textFor('removeReplyTitle')"
|
|
3464
|
+
[svgIcon]="deleteIcon"
|
|
3465
|
+
(click)="removeReply()"
|
|
3466
|
+
fillMode="flat"
|
|
3450
3467
|
></button>
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3468
|
+
</div>
|
|
3469
|
+
}
|
|
3470
|
+
<ul class="k-chat-file-wrapper">
|
|
3471
|
+
@for (file of files; track file; let i = $index) {
|
|
3472
|
+
<li class="k-chat-file"
|
|
3473
|
+
[chatFile]="file"
|
|
3474
|
+
[removable]="true"
|
|
3475
|
+
(remove)="removeFile(i)"
|
|
3476
|
+
></li>
|
|
3477
|
+
}
|
|
3478
|
+
</ul>
|
|
3479
|
+
</kendo-textarea-prefix>
|
|
3480
|
+
}
|
|
3481
|
+
<kendo-textarea-suffix>
|
|
3482
|
+
@if (speechToTextButtonSettings) {
|
|
3483
|
+
<button
|
|
3484
|
+
kendoSpeechToTextButton
|
|
3485
|
+
[attr.title]="textFor('speechToTextButtonTitle')"
|
|
3486
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
3487
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
3488
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'clear'"
|
|
3489
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
3490
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
3491
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
3492
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
3493
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
3494
|
+
[size]="speechToTextButtonSettings?.size"
|
|
3495
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
3496
|
+
(result)="handleSpeechResult($event)"
|
|
3497
|
+
(start)="isListening = true"
|
|
3498
|
+
(end)="isListening = false"
|
|
3499
|
+
></button>
|
|
3500
|
+
}
|
|
3501
|
+
@if (enableFileSelect) {
|
|
3502
|
+
<button
|
|
3503
|
+
kendoButton
|
|
3504
|
+
[attr.title]="textFor('fileSelectButtonTitle')"
|
|
3505
|
+
[svgIcon]="attachmentIcon"
|
|
3506
|
+
icon="attachment"
|
|
3507
|
+
fillMode="clear"
|
|
3508
|
+
(click)="selectFiles()"
|
|
3509
|
+
></button>
|
|
3510
|
+
}
|
|
3511
|
+
<kendo-input-spacer></kendo-input-spacer>
|
|
3512
|
+
<button
|
|
3513
|
+
kendoButton
|
|
3514
|
+
[fillMode]="sendButtonSettings?.fillMode"
|
|
3515
|
+
[themeColor]="sendButtonSettings?.themeColor"
|
|
3516
|
+
[rounded]="sendButtonSettings?.rounded"
|
|
3517
|
+
[class]="sendButtonSettings?.buttonClass || 'k-chat-send'"
|
|
3518
|
+
[icon]="sendButtonSettings?.icon"
|
|
3519
|
+
[svgIcon]="sendButtonSettings?.svgIcon"
|
|
3520
|
+
[tabindex]="0"
|
|
3521
|
+
[attr.title]="textFor('send')"
|
|
3522
|
+
[class.k-disabled]="isDisabledSendButton"
|
|
3523
|
+
[attr.aria-disabled]="isDisabledSendButton"
|
|
3524
|
+
(click)="sendClick()"
|
|
3525
|
+
>
|
|
3526
|
+
</button>
|
|
3527
|
+
</kendo-textarea-suffix>
|
|
3528
|
+
</kendo-textarea>
|
|
3529
|
+
}
|
|
3530
|
+
|
|
3531
|
+
@if (messageBoxTemplate?.templateRef) {
|
|
3532
|
+
<ng-template [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3473
3535
|
<kendo-fileselect
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3536
|
+
#fileSelect
|
|
3537
|
+
class="k-hidden"
|
|
3538
|
+
[multiple]="true"
|
|
3539
|
+
[showFileList]="false"
|
|
3540
|
+
(select)="handleFileSelect($event)"
|
|
3479
3541
|
></kendo-fileselect>
|
|
3480
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
3542
|
+
`, 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: "ngmodule", type: FormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: InputSpacerComponent, selector: "kendo-input-spacer, kendo-textbox-spacer", inputs: ["width"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
|
|
3481
3543
|
}
|
|
3482
3544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageBoxComponent, decorators: [{
|
|
3483
3545
|
type: Component,
|
|
3484
3546
|
args: [{
|
|
3485
3547
|
selector: 'kendo-message-box',
|
|
3486
3548
|
template: `
|
|
3487
|
-
|
|
3488
|
-
|
|
3549
|
+
@if (suggestions?.length > 0) {
|
|
3550
|
+
<kendo-chat-suggested-actions
|
|
3489
3551
|
#suggestedActions
|
|
3490
3552
|
[suggestions]="suggestions"
|
|
3491
3553
|
type="suggestion"
|
|
@@ -3494,104 +3556,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3494
3556
|
(dispatchSuggestion)="dispatchSuggestion($event)"
|
|
3495
3557
|
(click)="select(suggestedActions, $event)"
|
|
3496
3558
|
(focus)="select(suggestedActions, $event)"
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3559
|
+
></kendo-chat-suggested-actions>
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
@if (!messageBoxTemplate?.templateRef) {
|
|
3563
|
+
<kendo-textarea
|
|
3564
|
+
#messageBoxInput
|
|
3565
|
+
class="k-message-box"
|
|
3566
|
+
resizable="none"
|
|
3567
|
+
[rows]="3"
|
|
3505
3568
|
[inputAttributes]="{
|
|
3506
3569
|
'aria-label': textFor('messageBoxInputLabel')
|
|
3507
3570
|
}"
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3571
|
+
[placeholder]="placeholder || textFor('messagePlaceholder')"
|
|
3572
|
+
[showSuffixSeparator]="false"
|
|
3573
|
+
(keydown)="textAreaKeydown($event)"
|
|
3574
|
+
[value]="inputValue"
|
|
3575
|
+
(valueChange)="onInputValueChange($event)"
|
|
3513
3576
|
>
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
[attr.title]="textFor('removeReplyTitle')"
|
|
3521
|
-
[svgIcon]="deleteIcon"
|
|
3522
|
-
(click)="removeReply()"
|
|
3523
|
-
fillMode="flat"
|
|
3524
|
-
></button>
|
|
3525
|
-
</div>
|
|
3526
|
-
<ul class="k-chat-file-wrapper">
|
|
3527
|
-
<li class="k-chat-file"
|
|
3528
|
-
*ngFor="let file of files; let i = index"
|
|
3529
|
-
[chatFile]="file"
|
|
3530
|
-
[removable]="true"
|
|
3531
|
-
(remove)="removeFile(i)"
|
|
3532
|
-
></li>
|
|
3533
|
-
</ul>
|
|
3534
|
-
</kendo-textarea-prefix>
|
|
3535
|
-
|
|
3536
|
-
<kendo-textarea-suffix>
|
|
3537
|
-
<button *ngIf="speechToTextButtonSettings"
|
|
3538
|
-
kendoSpeechToTextButton
|
|
3539
|
-
[attr.title]="textFor('speechToTextButtonTitle')"
|
|
3540
|
-
[continuous]="speechToTextButtonSettings?.continuous"
|
|
3541
|
-
[disabled]="speechToTextButtonSettings?.disabled"
|
|
3542
|
-
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'clear'"
|
|
3543
|
-
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
3544
|
-
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
3545
|
-
[lang]="speechToTextButtonSettings?.lang"
|
|
3546
|
-
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
3547
|
-
[rounded]="speechToTextButtonSettings?.rounded"
|
|
3548
|
-
[size]="speechToTextButtonSettings?.size"
|
|
3549
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
3550
|
-
(result)="handleSpeechResult($event)"
|
|
3551
|
-
(start)="isListening = true"
|
|
3552
|
-
(end)="isListening = false"
|
|
3553
|
-
></button>
|
|
3577
|
+
@if (reply || (files && files.length > 0)) {
|
|
3578
|
+
<kendo-textarea-prefix>
|
|
3579
|
+
@if (reply) {
|
|
3580
|
+
<div class="k-message-reference k-message-reference-sender" (click)="onReplyReferenceClick($event)">
|
|
3581
|
+
<chat-message-reference-content [message]="reply"></chat-message-reference-content>
|
|
3582
|
+
<span class="k-spacer"></span>
|
|
3554
3583
|
<button
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
fillMode="clear"
|
|
3561
|
-
(click)="selectFiles()"
|
|
3584
|
+
kendoButton
|
|
3585
|
+
[attr.title]="textFor('removeReplyTitle')"
|
|
3586
|
+
[svgIcon]="deleteIcon"
|
|
3587
|
+
(click)="removeReply()"
|
|
3588
|
+
fillMode="flat"
|
|
3562
3589
|
></button>
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3590
|
+
</div>
|
|
3591
|
+
}
|
|
3592
|
+
<ul class="k-chat-file-wrapper">
|
|
3593
|
+
@for (file of files; track file; let i = $index) {
|
|
3594
|
+
<li class="k-chat-file"
|
|
3595
|
+
[chatFile]="file"
|
|
3596
|
+
[removable]="true"
|
|
3597
|
+
(remove)="removeFile(i)"
|
|
3598
|
+
></li>
|
|
3599
|
+
}
|
|
3600
|
+
</ul>
|
|
3601
|
+
</kendo-textarea-prefix>
|
|
3602
|
+
}
|
|
3603
|
+
<kendo-textarea-suffix>
|
|
3604
|
+
@if (speechToTextButtonSettings) {
|
|
3605
|
+
<button
|
|
3606
|
+
kendoSpeechToTextButton
|
|
3607
|
+
[attr.title]="textFor('speechToTextButtonTitle')"
|
|
3608
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
3609
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
3610
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'clear'"
|
|
3611
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
3612
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
3613
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
3614
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
3615
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
3616
|
+
[size]="speechToTextButtonSettings?.size"
|
|
3617
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
3618
|
+
(result)="handleSpeechResult($event)"
|
|
3619
|
+
(start)="isListening = true"
|
|
3620
|
+
(end)="isListening = false"
|
|
3621
|
+
></button>
|
|
3622
|
+
}
|
|
3623
|
+
@if (enableFileSelect) {
|
|
3624
|
+
<button
|
|
3625
|
+
kendoButton
|
|
3626
|
+
[attr.title]="textFor('fileSelectButtonTitle')"
|
|
3627
|
+
[svgIcon]="attachmentIcon"
|
|
3628
|
+
icon="attachment"
|
|
3629
|
+
fillMode="clear"
|
|
3630
|
+
(click)="selectFiles()"
|
|
3631
|
+
></button>
|
|
3632
|
+
}
|
|
3633
|
+
<kendo-input-spacer></kendo-input-spacer>
|
|
3634
|
+
<button
|
|
3635
|
+
kendoButton
|
|
3636
|
+
[fillMode]="sendButtonSettings?.fillMode"
|
|
3637
|
+
[themeColor]="sendButtonSettings?.themeColor"
|
|
3638
|
+
[rounded]="sendButtonSettings?.rounded"
|
|
3639
|
+
[class]="sendButtonSettings?.buttonClass || 'k-chat-send'"
|
|
3640
|
+
[icon]="sendButtonSettings?.icon"
|
|
3641
|
+
[svgIcon]="sendButtonSettings?.svgIcon"
|
|
3642
|
+
[tabindex]="0"
|
|
3643
|
+
[attr.title]="textFor('send')"
|
|
3644
|
+
[class.k-disabled]="isDisabledSendButton"
|
|
3645
|
+
[attr.aria-disabled]="isDisabledSendButton"
|
|
3646
|
+
(click)="sendClick()"
|
|
3647
|
+
>
|
|
3648
|
+
</button>
|
|
3649
|
+
</kendo-textarea-suffix>
|
|
3650
|
+
</kendo-textarea>
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
@if (messageBoxTemplate?.templateRef) {
|
|
3654
|
+
<ng-template [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3585
3657
|
<kendo-fileselect
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3658
|
+
#fileSelect
|
|
3659
|
+
class="k-hidden"
|
|
3660
|
+
[multiple]="true"
|
|
3661
|
+
[showFileList]="false"
|
|
3662
|
+
(select)="handleFileSelect($event)"
|
|
3591
3663
|
></kendo-fileselect>
|
|
3592
|
-
`,
|
|
3664
|
+
`,
|
|
3593
3665
|
standalone: true,
|
|
3594
|
-
imports: [
|
|
3666
|
+
imports: [ButtonComponent, FormsModule, NgTemplateOutlet, TextAreaComponent, MessageReferenceComponent, TextAreaSuffixComponent, TextAreaPrefixComponent, SpeechToTextButtonComponent, InputSpacerComponent, FileSelectComponent, SuggestedActionsComponent, ChatFileComponent]
|
|
3595
3667
|
}]
|
|
3596
3668
|
}], ctorParameters: () => [{ type: ChatService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { borderColor: [{
|
|
3597
3669
|
type: HostBinding,
|
|
@@ -4203,178 +4275,192 @@ class MessageComponent extends ChatItem {
|
|
|
4203
4275
|
return transformActions(actions);
|
|
4204
4276
|
}
|
|
4205
4277
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: ChatService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4278
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageComponent, isStandalone: true, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", authorMessageContentTemplate: "authorMessageContentTemplate", receiverMessageContentTemplate: "receiverMessageContentTemplate", messageContentTemplate: "messageContentTemplate", authorMessageTemplate: "authorMessageTemplate", receiverMessageTemplate: "receiverMessageTemplate", messageTemplate: "messageTemplate", statusTemplate: "statusTemplate", showMessageTime: "showMessageTime", authorId: "authorId" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class.k-message": "this.cssClass", "class.k-message-removed": "this.removedClass", "attr.tabIndex": "this.tabIndex" } }, providers: [
|
|
4207
4279
|
{
|
|
4208
4280
|
provide: ChatItem,
|
|
4209
4281
|
useExisting: forwardRef(() => MessageComponent)
|
|
4210
4282
|
}
|
|
4211
4283
|
], usesInheritance: true, ngImport: i0, template: `
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4284
|
+
@if (useCustomBubbleTemplate) {
|
|
4285
|
+
<ng-container *ngTemplateOutlet="getActiveBubbleTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
|
|
4286
|
+
}
|
|
4215
4287
|
|
|
4216
|
-
|
|
4288
|
+
@if (!useCustomBubbleTemplate) {
|
|
4289
|
+
@if (chatService.timestampVisibility === 'focus' && message.timestamp) {
|
|
4217
4290
|
<time
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
{{ formatTimeStamp(message.timestamp) }}
|
|
4291
|
+
[attr.aria-hidden]="!selected"
|
|
4292
|
+
class="k-message-time"
|
|
4293
|
+
>
|
|
4294
|
+
{{ formatTimeStamp(message.timestamp) }}
|
|
4223
4295
|
</time>
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
[attr.tabindex]="0"
|
|
4296
|
+
}
|
|
4297
|
+
@if (message.typing) {
|
|
4298
|
+
<div class="k-chat-bubble k-bubble">
|
|
4299
|
+
<div class="k-typing-indicator" [attr.tabindex]="'-1'">
|
|
4300
|
+
<span></span>
|
|
4301
|
+
<span></span>
|
|
4302
|
+
<span></span>
|
|
4303
|
+
</div>
|
|
4304
|
+
</div>
|
|
4305
|
+
}
|
|
4306
|
+
@if (!message.typing) {
|
|
4307
|
+
@if (useCustomContentTemplate) {
|
|
4308
|
+
<div
|
|
4309
|
+
class="k-chat-bubble k-bubble"
|
|
4310
|
+
[attr.tabindex]="0"
|
|
4240
4311
|
[ngClass]="{
|
|
4241
|
-
'k-bubble-expandable': isMessageExpandable,
|
|
4312
|
+
'k-bubble-expandable': isMessageExpandable,
|
|
4242
4313
|
'k-expanded': isMessageExpanded,
|
|
4243
|
-
'k-selected': selected,
|
|
4314
|
+
'k-selected': selected,
|
|
4244
4315
|
'k-focus': selected,
|
|
4245
4316
|
'k-active': isActiveMessage
|
|
4246
4317
|
}"
|
|
4247
4318
|
>
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
</div>
|
|
4251
|
-
<span
|
|
4252
|
-
class="k-bubble-expandable-indicator"
|
|
4253
|
-
*ngIf="isMessageExpandable && showExpandCollapseIcon"
|
|
4254
|
-
[attr.tabindex]="'0'"
|
|
4255
|
-
[attr.role]="'button'"
|
|
4256
|
-
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4257
|
-
(mousedown)="chatService.toggleMessageState = true"
|
|
4258
|
-
(click)="toggleMessageState($event)"
|
|
4259
|
-
>
|
|
4260
|
-
<kendo-icon-wrapper
|
|
4261
|
-
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4262
|
-
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4263
|
-
>
|
|
4264
|
-
</kendo-icon-wrapper>
|
|
4265
|
-
</span>
|
|
4319
|
+
<div class="k-bubble-content">
|
|
4320
|
+
<ng-container *ngTemplateOutlet="getActiveContentTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
|
|
4266
4321
|
</div>
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
class="k-
|
|
4270
|
-
|
|
4271
|
-
[attr.
|
|
4322
|
+
@if (isMessageExpandable && showExpandCollapseIcon) {
|
|
4323
|
+
<span
|
|
4324
|
+
class="k-bubble-expandable-indicator"
|
|
4325
|
+
[attr.tabindex]="'0'"
|
|
4326
|
+
[attr.role]="'button'"
|
|
4327
|
+
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4328
|
+
(mousedown)="chatService.toggleMessageState = true"
|
|
4329
|
+
(click)="toggleMessageState($event)"
|
|
4330
|
+
>
|
|
4331
|
+
<kendo-icon-wrapper
|
|
4332
|
+
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4333
|
+
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4334
|
+
>
|
|
4335
|
+
</kendo-icon-wrapper>
|
|
4336
|
+
</span>
|
|
4337
|
+
}
|
|
4338
|
+
</div>
|
|
4339
|
+
}
|
|
4340
|
+
@if (!useCustomContentTemplate && hasMessageContent) {
|
|
4341
|
+
<div
|
|
4342
|
+
class="k-chat-bubble k-bubble"
|
|
4343
|
+
[attr.tabindex]="0"
|
|
4272
4344
|
[ngClass]="{
|
|
4273
|
-
'k-bubble-expandable': isMessageExpandable,
|
|
4274
|
-
'k-expanded': isMessageExpanded,
|
|
4275
|
-
'k-selected': selected,
|
|
4345
|
+
'k-bubble-expandable': isMessageExpandable,
|
|
4346
|
+
'k-expanded': isMessageExpanded,
|
|
4347
|
+
'k-selected': selected,
|
|
4276
4348
|
'k-focus': selected,
|
|
4277
4349
|
'k-active': isActiveMessage
|
|
4278
4350
|
}"
|
|
4279
4351
|
>
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4352
|
+
<div class="k-bubble-content">
|
|
4353
|
+
@if (message.text || message.isDeleted) {
|
|
4354
|
+
@if (message.replyToId && !message.isDeleted) {
|
|
4355
|
+
<div
|
|
4356
|
+
class="k-message-reference k-message-reference-receiver"
|
|
4357
|
+
(click)="onReplyReferenceClick($event, message.replyToId)"
|
|
4358
|
+
>
|
|
4359
|
+
<chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
|
|
4360
|
+
</div>
|
|
4361
|
+
}
|
|
4362
|
+
@if (message.isDeleted) {
|
|
4363
|
+
<span class="k-chat-bubble-text">
|
|
4364
|
+
{{ getDeletedMessageText() }}
|
|
4365
|
+
</span>
|
|
4366
|
+
}
|
|
4367
|
+
@if (!message.isDeleted && parts.length > 0) {
|
|
4368
|
+
<span class="k-chat-bubble-text">
|
|
4369
|
+
@for (part of parts; track part) {
|
|
4370
|
+
@if (part.type === 'text') {
|
|
4371
|
+
{{part.content}}
|
|
4372
|
+
}
|
|
4373
|
+
@if (part.type === 'link') {
|
|
4374
|
+
<a [href]="part.href" target="_blank">{{part.content}}</a>
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
</span>
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4380
|
+
@if (hasFiles && !message.isDeleted) {
|
|
4381
|
+
<ul
|
|
4382
|
+
class="k-chat-file-wrapper"
|
|
4305
4383
|
[ngClass]="{
|
|
4306
|
-
'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
|
|
4384
|
+
'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
|
|
4307
4385
|
'k-chat-files-horizontal': chatService.messageFilesLayout === 'horizontal'
|
|
4308
4386
|
}"
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4387
|
+
>
|
|
4388
|
+
@for (file of message.files; track file) {
|
|
4389
|
+
<li
|
|
4390
|
+
class="k-chat-file"
|
|
4391
|
+
[chatFile]="file"
|
|
4392
|
+
[fileActions]="fileActions"
|
|
4393
|
+
(actionClick)="onFileAction($event, file)"
|
|
4394
|
+
(actionsToggle)="onActionPopupChange($event)"
|
|
4395
|
+
(actionButtonClick)="onActionButtonClick($event)"
|
|
4396
|
+
></li>
|
|
4397
|
+
}
|
|
4398
|
+
</ul>
|
|
4399
|
+
}
|
|
4400
|
+
@if (hasMultipleFiles && !message.isDeleted) {
|
|
4401
|
+
<div class="k-chat-download-button-wrapper">
|
|
4402
|
+
<button
|
|
4403
|
+
kendoButton
|
|
4404
|
+
class="k-chat-download-button"
|
|
4405
|
+
fillMode="flat"
|
|
4406
|
+
icon="download"
|
|
4407
|
+
[svgIcon]="downloadIcon"
|
|
4408
|
+
[attr.title]="textFor('downloadAllFilesText')"
|
|
4409
|
+
(click)="onDownloadAll()"
|
|
4410
|
+
>{{ textFor('downloadAllFilesText') }}</button>
|
|
4332
4411
|
</div>
|
|
4333
|
-
|
|
4334
|
-
<span
|
|
4335
|
-
class="k-bubble-expandable-indicator"
|
|
4336
|
-
*ngIf="isMessageExpandable && showExpandCollapseIcon"
|
|
4337
|
-
[attr.tabindex]="'0'"
|
|
4338
|
-
[attr.role]="'button'"
|
|
4339
|
-
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4340
|
-
(mousedown)="chatService.toggleMessageState = true"
|
|
4341
|
-
(click)="toggleMessageState($event)"
|
|
4342
|
-
>
|
|
4343
|
-
<kendo-icon-wrapper
|
|
4344
|
-
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4345
|
-
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4346
|
-
>
|
|
4347
|
-
</kendo-icon-wrapper>
|
|
4348
|
-
</span>
|
|
4412
|
+
}
|
|
4349
4413
|
</div>
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4414
|
+
@if (isMessageExpandable && showExpandCollapseIcon) {
|
|
4415
|
+
<span
|
|
4416
|
+
class="k-bubble-expandable-indicator"
|
|
4417
|
+
[attr.tabindex]="'0'"
|
|
4418
|
+
[attr.role]="'button'"
|
|
4419
|
+
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4420
|
+
(mousedown)="chatService.toggleMessageState = true"
|
|
4421
|
+
(click)="toggleMessageState($event)"
|
|
4357
4422
|
>
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4423
|
+
<kendo-icon-wrapper
|
|
4424
|
+
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4425
|
+
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4426
|
+
>
|
|
4427
|
+
</kendo-icon-wrapper>
|
|
4428
|
+
</span>
|
|
4429
|
+
}
|
|
4430
|
+
</div>
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
@if (message.status) {
|
|
4434
|
+
<span class="k-message-status">
|
|
4435
|
+
@if (statusTemplate?.templateRef) {
|
|
4436
|
+
<ng-template
|
|
4437
|
+
[ngTemplateOutlet]="statusTemplate.templateRef"
|
|
4438
|
+
[ngTemplateOutletContext]="{ $implicit: message.status, message }"
|
|
4439
|
+
>
|
|
4440
|
+
</ng-template>
|
|
4441
|
+
}
|
|
4442
|
+
@if (!statusTemplate?.templateRef) {
|
|
4443
|
+
{{ message.status }}
|
|
4444
|
+
}
|
|
4363
4445
|
</span>
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4446
|
+
}
|
|
4447
|
+
}
|
|
4448
|
+
@if (showToolbar) {
|
|
4449
|
+
<kendo-toolbar class="k-chat-message-toolbar" fillMode="flat">
|
|
4450
|
+
@for (action of toolbarActions; track action) {
|
|
4451
|
+
<kendo-toolbar-button
|
|
4368
4452
|
fillMode="flat"
|
|
4369
4453
|
[icon]="action.icon"
|
|
4370
4454
|
[svgIcon]="action.svgIcon"
|
|
4371
4455
|
[disabled]="action.disabled"
|
|
4372
4456
|
[title]="action.label"
|
|
4373
4457
|
(click)="onToolbarAction($event, action, message)"
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4458
|
+
>
|
|
4459
|
+
</kendo-toolbar-button>
|
|
4460
|
+
}
|
|
4461
|
+
</kendo-toolbar>
|
|
4462
|
+
}
|
|
4463
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.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: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "rounded", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }] });
|
|
4378
4464
|
}
|
|
4379
4465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageComponent, decorators: [{
|
|
4380
4466
|
type: Component,
|
|
@@ -4387,174 +4473,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4387
4473
|
}
|
|
4388
4474
|
],
|
|
4389
4475
|
template: `
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4476
|
+
@if (useCustomBubbleTemplate) {
|
|
4477
|
+
<ng-container *ngTemplateOutlet="getActiveBubbleTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
|
|
4478
|
+
}
|
|
4393
4479
|
|
|
4394
|
-
|
|
4480
|
+
@if (!useCustomBubbleTemplate) {
|
|
4481
|
+
@if (chatService.timestampVisibility === 'focus' && message.timestamp) {
|
|
4395
4482
|
<time
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
{{ formatTimeStamp(message.timestamp) }}
|
|
4483
|
+
[attr.aria-hidden]="!selected"
|
|
4484
|
+
class="k-message-time"
|
|
4485
|
+
>
|
|
4486
|
+
{{ formatTimeStamp(message.timestamp) }}
|
|
4401
4487
|
</time>
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
[attr.tabindex]="0"
|
|
4488
|
+
}
|
|
4489
|
+
@if (message.typing) {
|
|
4490
|
+
<div class="k-chat-bubble k-bubble">
|
|
4491
|
+
<div class="k-typing-indicator" [attr.tabindex]="'-1'">
|
|
4492
|
+
<span></span>
|
|
4493
|
+
<span></span>
|
|
4494
|
+
<span></span>
|
|
4495
|
+
</div>
|
|
4496
|
+
</div>
|
|
4497
|
+
}
|
|
4498
|
+
@if (!message.typing) {
|
|
4499
|
+
@if (useCustomContentTemplate) {
|
|
4500
|
+
<div
|
|
4501
|
+
class="k-chat-bubble k-bubble"
|
|
4502
|
+
[attr.tabindex]="0"
|
|
4418
4503
|
[ngClass]="{
|
|
4419
|
-
'k-bubble-expandable': isMessageExpandable,
|
|
4504
|
+
'k-bubble-expandable': isMessageExpandable,
|
|
4420
4505
|
'k-expanded': isMessageExpanded,
|
|
4421
|
-
'k-selected': selected,
|
|
4506
|
+
'k-selected': selected,
|
|
4422
4507
|
'k-focus': selected,
|
|
4423
4508
|
'k-active': isActiveMessage
|
|
4424
4509
|
}"
|
|
4425
4510
|
>
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
</div>
|
|
4429
|
-
<span
|
|
4430
|
-
class="k-bubble-expandable-indicator"
|
|
4431
|
-
*ngIf="isMessageExpandable && showExpandCollapseIcon"
|
|
4432
|
-
[attr.tabindex]="'0'"
|
|
4433
|
-
[attr.role]="'button'"
|
|
4434
|
-
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4435
|
-
(mousedown)="chatService.toggleMessageState = true"
|
|
4436
|
-
(click)="toggleMessageState($event)"
|
|
4437
|
-
>
|
|
4438
|
-
<kendo-icon-wrapper
|
|
4439
|
-
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4440
|
-
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4441
|
-
>
|
|
4442
|
-
</kendo-icon-wrapper>
|
|
4443
|
-
</span>
|
|
4511
|
+
<div class="k-bubble-content">
|
|
4512
|
+
<ng-container *ngTemplateOutlet="getActiveContentTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
|
|
4444
4513
|
</div>
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
class="k-
|
|
4448
|
-
|
|
4449
|
-
[attr.
|
|
4514
|
+
@if (isMessageExpandable && showExpandCollapseIcon) {
|
|
4515
|
+
<span
|
|
4516
|
+
class="k-bubble-expandable-indicator"
|
|
4517
|
+
[attr.tabindex]="'0'"
|
|
4518
|
+
[attr.role]="'button'"
|
|
4519
|
+
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4520
|
+
(mousedown)="chatService.toggleMessageState = true"
|
|
4521
|
+
(click)="toggleMessageState($event)"
|
|
4522
|
+
>
|
|
4523
|
+
<kendo-icon-wrapper
|
|
4524
|
+
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4525
|
+
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4526
|
+
>
|
|
4527
|
+
</kendo-icon-wrapper>
|
|
4528
|
+
</span>
|
|
4529
|
+
}
|
|
4530
|
+
</div>
|
|
4531
|
+
}
|
|
4532
|
+
@if (!useCustomContentTemplate && hasMessageContent) {
|
|
4533
|
+
<div
|
|
4534
|
+
class="k-chat-bubble k-bubble"
|
|
4535
|
+
[attr.tabindex]="0"
|
|
4450
4536
|
[ngClass]="{
|
|
4451
|
-
'k-bubble-expandable': isMessageExpandable,
|
|
4452
|
-
'k-expanded': isMessageExpanded,
|
|
4453
|
-
'k-selected': selected,
|
|
4537
|
+
'k-bubble-expandable': isMessageExpandable,
|
|
4538
|
+
'k-expanded': isMessageExpanded,
|
|
4539
|
+
'k-selected': selected,
|
|
4454
4540
|
'k-focus': selected,
|
|
4455
4541
|
'k-active': isActiveMessage
|
|
4456
4542
|
}"
|
|
4457
4543
|
>
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4544
|
+
<div class="k-bubble-content">
|
|
4545
|
+
@if (message.text || message.isDeleted) {
|
|
4546
|
+
@if (message.replyToId && !message.isDeleted) {
|
|
4547
|
+
<div
|
|
4548
|
+
class="k-message-reference k-message-reference-receiver"
|
|
4549
|
+
(click)="onReplyReferenceClick($event, message.replyToId)"
|
|
4550
|
+
>
|
|
4551
|
+
<chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
|
|
4552
|
+
</div>
|
|
4553
|
+
}
|
|
4554
|
+
@if (message.isDeleted) {
|
|
4555
|
+
<span class="k-chat-bubble-text">
|
|
4556
|
+
{{ getDeletedMessageText() }}
|
|
4557
|
+
</span>
|
|
4558
|
+
}
|
|
4559
|
+
@if (!message.isDeleted && parts.length > 0) {
|
|
4560
|
+
<span class="k-chat-bubble-text">
|
|
4561
|
+
@for (part of parts; track part) {
|
|
4562
|
+
@if (part.type === 'text') {
|
|
4563
|
+
{{part.content}}
|
|
4564
|
+
}
|
|
4565
|
+
@if (part.type === 'link') {
|
|
4566
|
+
<a [href]="part.href" target="_blank">{{part.content}}</a>
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
</span>
|
|
4570
|
+
}
|
|
4571
|
+
}
|
|
4572
|
+
@if (hasFiles && !message.isDeleted) {
|
|
4573
|
+
<ul
|
|
4574
|
+
class="k-chat-file-wrapper"
|
|
4483
4575
|
[ngClass]="{
|
|
4484
|
-
'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
|
|
4576
|
+
'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
|
|
4485
4577
|
'k-chat-files-horizontal': chatService.messageFilesLayout === 'horizontal'
|
|
4486
4578
|
}"
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4579
|
+
>
|
|
4580
|
+
@for (file of message.files; track file) {
|
|
4581
|
+
<li
|
|
4582
|
+
class="k-chat-file"
|
|
4583
|
+
[chatFile]="file"
|
|
4584
|
+
[fileActions]="fileActions"
|
|
4585
|
+
(actionClick)="onFileAction($event, file)"
|
|
4586
|
+
(actionsToggle)="onActionPopupChange($event)"
|
|
4587
|
+
(actionButtonClick)="onActionButtonClick($event)"
|
|
4588
|
+
></li>
|
|
4589
|
+
}
|
|
4590
|
+
</ul>
|
|
4591
|
+
}
|
|
4592
|
+
@if (hasMultipleFiles && !message.isDeleted) {
|
|
4593
|
+
<div class="k-chat-download-button-wrapper">
|
|
4594
|
+
<button
|
|
4595
|
+
kendoButton
|
|
4596
|
+
class="k-chat-download-button"
|
|
4597
|
+
fillMode="flat"
|
|
4598
|
+
icon="download"
|
|
4599
|
+
[svgIcon]="downloadIcon"
|
|
4600
|
+
[attr.title]="textFor('downloadAllFilesText')"
|
|
4601
|
+
(click)="onDownloadAll()"
|
|
4602
|
+
>{{ textFor('downloadAllFilesText') }}</button>
|
|
4510
4603
|
</div>
|
|
4511
|
-
|
|
4512
|
-
<span
|
|
4513
|
-
class="k-bubble-expandable-indicator"
|
|
4514
|
-
*ngIf="isMessageExpandable && showExpandCollapseIcon"
|
|
4515
|
-
[attr.tabindex]="'0'"
|
|
4516
|
-
[attr.role]="'button'"
|
|
4517
|
-
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4518
|
-
(mousedown)="chatService.toggleMessageState = true"
|
|
4519
|
-
(click)="toggleMessageState($event)"
|
|
4520
|
-
>
|
|
4521
|
-
<kendo-icon-wrapper
|
|
4522
|
-
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4523
|
-
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4524
|
-
>
|
|
4525
|
-
</kendo-icon-wrapper>
|
|
4526
|
-
</span>
|
|
4604
|
+
}
|
|
4527
4605
|
</div>
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4606
|
+
@if (isMessageExpandable && showExpandCollapseIcon) {
|
|
4607
|
+
<span
|
|
4608
|
+
class="k-bubble-expandable-indicator"
|
|
4609
|
+
[attr.tabindex]="'0'"
|
|
4610
|
+
[attr.role]="'button'"
|
|
4611
|
+
[attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
|
|
4612
|
+
(mousedown)="chatService.toggleMessageState = true"
|
|
4613
|
+
(click)="toggleMessageState($event)"
|
|
4535
4614
|
>
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4615
|
+
<kendo-icon-wrapper
|
|
4616
|
+
[name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
|
|
4617
|
+
[svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
|
|
4618
|
+
>
|
|
4619
|
+
</kendo-icon-wrapper>
|
|
4620
|
+
</span>
|
|
4621
|
+
}
|
|
4622
|
+
</div>
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
@if (message.status) {
|
|
4626
|
+
<span class="k-message-status">
|
|
4627
|
+
@if (statusTemplate?.templateRef) {
|
|
4628
|
+
<ng-template
|
|
4629
|
+
[ngTemplateOutlet]="statusTemplate.templateRef"
|
|
4630
|
+
[ngTemplateOutletContext]="{ $implicit: message.status, message }"
|
|
4631
|
+
>
|
|
4632
|
+
</ng-template>
|
|
4633
|
+
}
|
|
4634
|
+
@if (!statusTemplate?.templateRef) {
|
|
4635
|
+
{{ message.status }}
|
|
4636
|
+
}
|
|
4541
4637
|
</span>
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4640
|
+
@if (showToolbar) {
|
|
4641
|
+
<kendo-toolbar class="k-chat-message-toolbar" fillMode="flat">
|
|
4642
|
+
@for (action of toolbarActions; track action) {
|
|
4643
|
+
<kendo-toolbar-button
|
|
4546
4644
|
fillMode="flat"
|
|
4547
4645
|
[icon]="action.icon"
|
|
4548
4646
|
[svgIcon]="action.svgIcon"
|
|
4549
4647
|
[disabled]="action.disabled"
|
|
4550
4648
|
[title]="action.label"
|
|
4551
4649
|
(click)="onToolbarAction($event, action, message)"
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4650
|
+
>
|
|
4651
|
+
</kendo-toolbar-button>
|
|
4652
|
+
}
|
|
4653
|
+
</kendo-toolbar>
|
|
4654
|
+
}
|
|
4655
|
+
`,
|
|
4556
4656
|
standalone: true,
|
|
4557
|
-
imports: [
|
|
4657
|
+
imports: [NgClass, NgTemplateOutlet, IconWrapperComponent, KENDO_BUTTONS, ChatFileComponent, ToolBarComponent, ToolBarButtonComponent, MessageReferenceComponent],
|
|
4558
4658
|
}]
|
|
4559
4659
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: ChatService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { message: [{
|
|
4560
4660
|
type: Input
|
|
@@ -4618,55 +4718,71 @@ class AttachmentComponent {
|
|
|
4618
4718
|
}
|
|
4619
4719
|
_attachment;
|
|
4620
4720
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4621
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4721
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
|
|
4722
|
+
@if (template) {
|
|
4723
|
+
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
|
4724
|
+
</ng-container>
|
|
4725
|
+
}
|
|
4726
|
+
|
|
4727
|
+
@if (!template) {
|
|
4728
|
+
<div class="k-card">
|
|
4628
4729
|
<div class="k-card-body">
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4730
|
+
@if (attachment.title) {
|
|
4731
|
+
<h5 class="k-card-title">
|
|
4732
|
+
{{ attachment.title }}
|
|
4733
|
+
</h5>
|
|
4734
|
+
}
|
|
4735
|
+
@if (attachment.subtitle) {
|
|
4736
|
+
<h6 class="k-card-subtitle">
|
|
4737
|
+
{{ attachment.subtitle }}
|
|
4738
|
+
</h6>
|
|
4739
|
+
}
|
|
4740
|
+
@if (image) {
|
|
4741
|
+
<img [attr.src]="attachment.content" />
|
|
4742
|
+
}
|
|
4743
|
+
@if (unknown) {
|
|
4637
4744
|
{{ attachment.content }}
|
|
4638
|
-
|
|
4745
|
+
}
|
|
4639
4746
|
</div>
|
|
4640
|
-
|
|
4641
|
-
|
|
4747
|
+
</div>
|
|
4748
|
+
}
|
|
4749
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
4642
4750
|
}
|
|
4643
4751
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, decorators: [{
|
|
4644
4752
|
type: Component,
|
|
4645
4753
|
args: [{
|
|
4646
4754
|
selector: 'kendo-chat-attachment',
|
|
4647
4755
|
template: `
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4756
|
+
@if (template) {
|
|
4757
|
+
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
|
4758
|
+
</ng-container>
|
|
4759
|
+
}
|
|
4760
|
+
|
|
4761
|
+
@if (!template) {
|
|
4762
|
+
<div class="k-card">
|
|
4654
4763
|
<div class="k-card-body">
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4764
|
+
@if (attachment.title) {
|
|
4765
|
+
<h5 class="k-card-title">
|
|
4766
|
+
{{ attachment.title }}
|
|
4767
|
+
</h5>
|
|
4768
|
+
}
|
|
4769
|
+
@if (attachment.subtitle) {
|
|
4770
|
+
<h6 class="k-card-subtitle">
|
|
4771
|
+
{{ attachment.subtitle }}
|
|
4772
|
+
</h6>
|
|
4773
|
+
}
|
|
4774
|
+
@if (image) {
|
|
4775
|
+
<img [attr.src]="attachment.content" />
|
|
4776
|
+
}
|
|
4777
|
+
@if (unknown) {
|
|
4663
4778
|
{{ attachment.content }}
|
|
4664
|
-
|
|
4779
|
+
}
|
|
4665
4780
|
</div>
|
|
4666
|
-
|
|
4667
|
-
|
|
4781
|
+
</div>
|
|
4782
|
+
}
|
|
4783
|
+
`,
|
|
4668
4784
|
standalone: true,
|
|
4669
|
-
imports: [
|
|
4785
|
+
imports: [NgTemplateOutlet]
|
|
4670
4786
|
}]
|
|
4671
4787
|
}], propDecorators: { attachment: [{
|
|
4672
4788
|
type: Input
|
|
@@ -4791,51 +4907,54 @@ class MessageAttachmentsComponent extends ChatItem {
|
|
|
4791
4907
|
return this.localization.get(key);
|
|
4792
4908
|
}
|
|
4793
4909
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4794
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4910
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageAttachmentsComponent, isStandalone: true, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
|
|
4795
4911
|
provide: ChatItem,
|
|
4796
4912
|
useExisting: forwardRef(() => MessageAttachmentsComponent)
|
|
4797
4913
|
}], viewQueries: [{ propertyName: "deck", first: true, predicate: ["deck"], descendants: true, read: ElementRef, static: true }, { propertyName: "items", predicate: ["item"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
|
|
4798
|
-
|
|
4799
|
-
|
|
4914
|
+
@if (showLeftArrow) {
|
|
4915
|
+
<button
|
|
4800
4916
|
(click)="scrollTo(-1)"
|
|
4801
4917
|
kendoButton
|
|
4802
4918
|
tabindex="-1"
|
|
4803
4919
|
[attr.title]="textFor('messageAttachmentLeftArrow')"
|
|
4804
4920
|
[svgIcon]="chevronLeftIcon"
|
|
4805
4921
|
icon="chevron-left"
|
|
4806
|
-
|
|
4807
|
-
|
|
4922
|
+
>
|
|
4923
|
+
</button>
|
|
4924
|
+
}
|
|
4808
4925
|
<div
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4926
|
+
#deck
|
|
4927
|
+
[class.k-card-deck]="carousel"
|
|
4928
|
+
[class.k-card-list]="!carousel"
|
|
4929
|
+
>
|
|
4930
|
+
@for (att of attachments; track att; let index = $index; let first = $first; let last = $last) {
|
|
4813
4931
|
<kendo-chat-attachment #item
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
>
|
|
4932
|
+
[attachment]="att"
|
|
4933
|
+
[template]="template"
|
|
4934
|
+
[class.k-selected]="isSelected(index)"
|
|
4935
|
+
[class.k-focus]="isSelected(index)"
|
|
4936
|
+
[class.k-card-wrap]="true"
|
|
4937
|
+
[class.k-first]="first"
|
|
4938
|
+
[class.k-last]="last"
|
|
4939
|
+
[attr.tabindex]="tabbable && isSelected(index) ? '0' : '-1'"
|
|
4940
|
+
(click)="itemClick(index)"
|
|
4941
|
+
(keydown)="itemKeydown($event, att)"
|
|
4942
|
+
>
|
|
4826
4943
|
</kendo-chat-attachment>
|
|
4944
|
+
}
|
|
4827
4945
|
</div>
|
|
4828
|
-
|
|
4829
|
-
|
|
4946
|
+
@if (showRightArrow) {
|
|
4947
|
+
<button
|
|
4830
4948
|
(click)="scrollTo(1)"
|
|
4831
4949
|
kendoButton
|
|
4832
4950
|
tabindex="-1"
|
|
4833
4951
|
[attr.title]="textFor('messageAttachmentRightArrow')"
|
|
4834
4952
|
[svgIcon]="chevronRightIcon"
|
|
4835
4953
|
icon="chevron-right"
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4954
|
+
>
|
|
4955
|
+
</button>
|
|
4956
|
+
}
|
|
4957
|
+
`, 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: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }] });
|
|
4839
4958
|
}
|
|
4840
4959
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
|
|
4841
4960
|
type: Component,
|
|
@@ -4846,49 +4965,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4846
4965
|
}],
|
|
4847
4966
|
selector: 'kendo-chat-message-attachments',
|
|
4848
4967
|
template: `
|
|
4849
|
-
|
|
4850
|
-
|
|
4968
|
+
@if (showLeftArrow) {
|
|
4969
|
+
<button
|
|
4851
4970
|
(click)="scrollTo(-1)"
|
|
4852
4971
|
kendoButton
|
|
4853
4972
|
tabindex="-1"
|
|
4854
4973
|
[attr.title]="textFor('messageAttachmentLeftArrow')"
|
|
4855
4974
|
[svgIcon]="chevronLeftIcon"
|
|
4856
4975
|
icon="chevron-left"
|
|
4857
|
-
|
|
4858
|
-
|
|
4976
|
+
>
|
|
4977
|
+
</button>
|
|
4978
|
+
}
|
|
4859
4979
|
<div
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4980
|
+
#deck
|
|
4981
|
+
[class.k-card-deck]="carousel"
|
|
4982
|
+
[class.k-card-list]="!carousel"
|
|
4983
|
+
>
|
|
4984
|
+
@for (att of attachments; track att; let index = $index; let first = $first; let last = $last) {
|
|
4864
4985
|
<kendo-chat-attachment #item
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
>
|
|
4986
|
+
[attachment]="att"
|
|
4987
|
+
[template]="template"
|
|
4988
|
+
[class.k-selected]="isSelected(index)"
|
|
4989
|
+
[class.k-focus]="isSelected(index)"
|
|
4990
|
+
[class.k-card-wrap]="true"
|
|
4991
|
+
[class.k-first]="first"
|
|
4992
|
+
[class.k-last]="last"
|
|
4993
|
+
[attr.tabindex]="tabbable && isSelected(index) ? '0' : '-1'"
|
|
4994
|
+
(click)="itemClick(index)"
|
|
4995
|
+
(keydown)="itemKeydown($event, att)"
|
|
4996
|
+
>
|
|
4877
4997
|
</kendo-chat-attachment>
|
|
4998
|
+
}
|
|
4878
4999
|
</div>
|
|
4879
|
-
|
|
4880
|
-
|
|
5000
|
+
@if (showRightArrow) {
|
|
5001
|
+
<button
|
|
4881
5002
|
(click)="scrollTo(1)"
|
|
4882
5003
|
kendoButton
|
|
4883
5004
|
tabindex="-1"
|
|
4884
5005
|
[attr.title]="textFor('messageAttachmentRightArrow')"
|
|
4885
5006
|
[svgIcon]="chevronRightIcon"
|
|
4886
5007
|
icon="chevron-right"
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
5008
|
+
>
|
|
5009
|
+
</button>
|
|
5010
|
+
}
|
|
5011
|
+
`,
|
|
4890
5012
|
standalone: true,
|
|
4891
|
-
imports: [
|
|
5013
|
+
imports: [ButtonComponent, AttachmentComponent]
|
|
4892
5014
|
}]
|
|
4893
5015
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }], propDecorators: { attachments: [{
|
|
4894
5016
|
type: Input
|
|
@@ -5035,20 +5157,6 @@ class MessageListComponent {
|
|
|
5035
5157
|
onClick(message, event) {
|
|
5036
5158
|
this.select(message, event);
|
|
5037
5159
|
}
|
|
5038
|
-
showGroupAuthor(group) {
|
|
5039
|
-
const messageSettings = this.isOwnMessage(group.messages[0]) ? this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
|
|
5040
|
-
if (isPresent(messageSettings?.showUsername)) {
|
|
5041
|
-
return messageSettings.showUsername && group.author.name;
|
|
5042
|
-
}
|
|
5043
|
-
return this.chatService.showUsername && group.author.name;
|
|
5044
|
-
}
|
|
5045
|
-
showGroupAvatar(group) {
|
|
5046
|
-
const messageSettings = this.isOwnMessage(group.messages[0]) ? this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
|
|
5047
|
-
if (isPresent(messageSettings?.showAvatar)) {
|
|
5048
|
-
return messageSettings.showAvatar && group.author.avatarUrl;
|
|
5049
|
-
}
|
|
5050
|
-
return this.chatService.showAvatar && group.author.avatarUrl;
|
|
5051
|
-
}
|
|
5052
5160
|
onContextMenuClick(message, event, messageElement) {
|
|
5053
5161
|
this.chatService.calculateContextMenuActions(this.isOwnMessage(message));
|
|
5054
5162
|
if (this.chatService.calculatedContextMenuActions.length > 0) {
|
|
@@ -5093,6 +5201,22 @@ class MessageListComponent {
|
|
|
5093
5201
|
isOwnMessage(msg) {
|
|
5094
5202
|
return isAuthor(this.authorId, msg);
|
|
5095
5203
|
}
|
|
5204
|
+
showGroupAuthor(group) {
|
|
5205
|
+
const messageSettings = this.isOwnMessage(group.messages[0]) ?
|
|
5206
|
+
this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
|
|
5207
|
+
if (isPresent(messageSettings?.showUsername)) {
|
|
5208
|
+
return messageSettings.showUsername && group.author.name;
|
|
5209
|
+
}
|
|
5210
|
+
return this.chatService.showUsername && group.author.name;
|
|
5211
|
+
}
|
|
5212
|
+
showGroupAvatar(group) {
|
|
5213
|
+
const messageSettings = this.isOwnMessage(group.messages[0]) ?
|
|
5214
|
+
this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
|
|
5215
|
+
if (isPresent(messageSettings?.showAvatar)) {
|
|
5216
|
+
return messageSettings.showAvatar && group.author.avatarUrl;
|
|
5217
|
+
}
|
|
5218
|
+
return this.chatService.showAvatar && group.author.avatarUrl;
|
|
5219
|
+
}
|
|
5096
5220
|
dispatchAction(action, message) {
|
|
5097
5221
|
const args = new ExecuteActionEvent(action, message);
|
|
5098
5222
|
this.executeAction.emit(args);
|
|
@@ -5224,231 +5348,269 @@ class MessageListComponent {
|
|
|
5224
5348
|
});
|
|
5225
5349
|
}
|
|
5226
5350
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: i0.Renderer2 }, { token: ChatService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5227
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5351
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageListComponent, isStandalone: true, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", authorMessageContentTemplate: "authorMessageContentTemplate", receiverMessageContentTemplate: "receiverMessageContentTemplate", messageContentTemplate: "messageContentTemplate", authorMessageTemplate: "authorMessageTemplate", receiverMessageTemplate: "receiverMessageTemplate", messageTemplate: "messageTemplate", timestampTemplate: "timestampTemplate", statusTemplate: "statusTemplate", userStatusTemplate: "userStatusTemplate", localization: "localization", authorId: "authorId" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
|
|
5352
|
+
@for (group of view; track trackGroup($index, group); let lastGroup = $last) {
|
|
5353
|
+
@switch (group.type) {
|
|
5354
|
+
@case ('date-marker') {
|
|
5355
|
+
<div
|
|
5356
|
+
class="k-timestamp"
|
|
5233
5357
|
>
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5358
|
+
@if (timestampTemplate?.templateRef) {
|
|
5359
|
+
<ng-container
|
|
5360
|
+
[ngTemplateOutlet]="timestampTemplate.templateRef"
|
|
5361
|
+
[ngTemplateOutletContext]="{ $implicit: group.timestamp }"
|
|
5238
5362
|
>
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5363
|
+
</ng-container>
|
|
5364
|
+
}
|
|
5365
|
+
@if (!timestampTemplate?.templateRef) {
|
|
5366
|
+
{{ formatTimeStamp(group.timestamp) }}
|
|
5367
|
+
}
|
|
5368
|
+
</div>
|
|
5369
|
+
}
|
|
5370
|
+
@case ('message-group') {
|
|
5371
|
+
<div
|
|
5372
|
+
class="k-message-group"
|
|
5373
|
+
[class.k-message-group-sender]="isOwnMessage(group.messages[0])"
|
|
5374
|
+
[class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
|
|
5375
|
+
[class.k-no-avatar]="!showGroupAvatar(group)"
|
|
5376
|
+
[class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
|
|
5249
5377
|
>
|
|
5378
|
+
@if (!userStatusTemplate?.templateRef && showGroupAvatar(group)) {
|
|
5379
|
+
<div
|
|
5380
|
+
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5381
|
+
>
|
|
5382
|
+
<span class="k-avatar-image">
|
|
5383
|
+
<img
|
|
5384
|
+
[attr.src]="group.author.avatarUrl"
|
|
5385
|
+
[alt]="group.author.avatarAltText"
|
|
5386
|
+
/>
|
|
5387
|
+
</span>
|
|
5388
|
+
</div>
|
|
5389
|
+
}
|
|
5390
|
+
@if (showGroupAvatar(group) && userStatusTemplate?.templateRef) {
|
|
5391
|
+
<div class="k-chat-user-status-wrapper">
|
|
5250
5392
|
<div
|
|
5251
|
-
|
|
5393
|
+
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5394
|
+
>
|
|
5395
|
+
<span class="k-avatar-image">
|
|
5396
|
+
<img
|
|
5397
|
+
[attr.src]="group.author.avatarUrl"
|
|
5398
|
+
[alt]="group.author.avatarAltText"
|
|
5399
|
+
/>
|
|
5400
|
+
</span>
|
|
5401
|
+
</div>
|
|
5402
|
+
@if (userStatusTemplate?.templateRef) {
|
|
5403
|
+
<div class="k-chat-user-status">
|
|
5404
|
+
<ng-template
|
|
5405
|
+
[ngTemplateOutlet]="userStatusTemplate.templateRef"
|
|
5406
|
+
[ngTemplateOutletContext]="{ $implicit: group.messages.at(-1) }"
|
|
5407
|
+
>
|
|
5408
|
+
</ng-template>
|
|
5409
|
+
</div>
|
|
5410
|
+
}
|
|
5411
|
+
</div>
|
|
5412
|
+
}
|
|
5413
|
+
<div class="k-message-group-content">
|
|
5414
|
+
@if (showGroupAuthor(group)) {
|
|
5415
|
+
<p class="k-message-author">{{ group.author.name }}</p>
|
|
5416
|
+
}
|
|
5417
|
+
@for (msg of group.messages; track msg; let firstMessage = $first; let lastMessage = $last) {
|
|
5418
|
+
@if (msg.user?.avatarUrl) {
|
|
5419
|
+
<div
|
|
5252
5420
|
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5253
|
-
|
|
5421
|
+
>
|
|
5254
5422
|
<span class="k-avatar-image">
|
|
5255
|
-
|
|
5256
|
-
[attr.src]="group.author.avatarUrl"
|
|
5257
|
-
[alt]="group.author.avatarAltText"
|
|
5258
|
-
/>
|
|
5423
|
+
<img [src]="msg.user?.avatarUrl">
|
|
5259
5424
|
</span>
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
</div>
|
|
5280
|
-
<div class="k-message-group-content">
|
|
5281
|
-
<p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
|
|
5282
|
-
<ng-container
|
|
5283
|
-
*ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
|
|
5425
|
+
</div>
|
|
5426
|
+
}
|
|
5427
|
+
<kendo-chat-message #message
|
|
5428
|
+
[message]="msg"
|
|
5429
|
+
[tabbable]="lastGroup && lastMessage"
|
|
5430
|
+
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
5431
|
+
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
5432
|
+
[messageContentTemplate]="messageContentTemplate"
|
|
5433
|
+
[authorMessageTemplate]="authorMessageTemplate"
|
|
5434
|
+
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
5435
|
+
[messageTemplate]="messageTemplate"
|
|
5436
|
+
[statusTemplate]="statusTemplate"
|
|
5437
|
+
[authorId]="authorId"
|
|
5438
|
+
>
|
|
5439
|
+
</kendo-chat-message>
|
|
5440
|
+
@if (msg.attachments && msg.attachments.length === 1) {
|
|
5441
|
+
<kendo-chat-attachment
|
|
5442
|
+
[attachment]="msg.attachments[0]"
|
|
5443
|
+
[template]="attachmentTemplate"
|
|
5284
5444
|
>
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
5289
|
-
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
5290
|
-
[messageContentTemplate]="messageContentTemplate"
|
|
5291
|
-
[authorMessageTemplate]="authorMessageTemplate"
|
|
5292
|
-
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
5293
|
-
[messageTemplate]="messageTemplate"
|
|
5294
|
-
[statusTemplate]="statusTemplate"
|
|
5295
|
-
[authorId]="authorId"
|
|
5296
|
-
>
|
|
5297
|
-
</kendo-chat-message>
|
|
5298
|
-
|
|
5299
|
-
<kendo-chat-attachment
|
|
5300
|
-
*ngIf="msg.attachments && msg.attachments.length === 1"
|
|
5301
|
-
[attachment]="msg.attachments[0]"
|
|
5302
|
-
[template]="attachmentTemplate"
|
|
5303
|
-
>
|
|
5304
|
-
</kendo-chat-attachment>
|
|
5305
|
-
</ng-container>
|
|
5306
|
-
</div>
|
|
5445
|
+
</kendo-chat-attachment>
|
|
5446
|
+
}
|
|
5447
|
+
}
|
|
5307
5448
|
</div>
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5449
|
+
</div>
|
|
5450
|
+
}
|
|
5451
|
+
@case ('attachment-group') {
|
|
5452
|
+
<kendo-chat-message-attachments #attachments
|
|
5453
|
+
[attachments]="group.attachments"
|
|
5454
|
+
[layout]="group.attachmentLayout"
|
|
5455
|
+
[localization]="localization"
|
|
5456
|
+
[tabbable]="lastGroup"
|
|
5457
|
+
[template]="attachmentTemplate"
|
|
5458
|
+
(click)="select(attachments)"
|
|
5459
|
+
(focus)="select(attachments)"
|
|
5318
5460
|
>
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5461
|
+
</kendo-chat-message-attachments>
|
|
5462
|
+
}
|
|
5463
|
+
@case ('action-group') {
|
|
5464
|
+
<kendo-chat-suggested-actions #actions
|
|
5465
|
+
[actions]="group.actions"
|
|
5466
|
+
type="action"
|
|
5467
|
+
[tabbable]="lastGroup"
|
|
5468
|
+
(dispatchAction)="dispatchAction($event, last(view))"
|
|
5469
|
+
(click)="select(actions, $event)"
|
|
5470
|
+
(focus)="select(actions, $event)"
|
|
5329
5471
|
>
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5472
|
+
</kendo-chat-suggested-actions>
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5475
|
+
}
|
|
5333
5476
|
<kendo-resize-sensor (resize)="onResize()">
|
|
5334
5477
|
</kendo-resize-sensor>
|
|
5335
|
-
|
|
5478
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "statusTemplate", "showMessageTime", "authorId"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
|
|
5336
5479
|
}
|
|
5337
5480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageListComponent, decorators: [{
|
|
5338
5481
|
type: Component,
|
|
5339
5482
|
args: [{
|
|
5340
5483
|
selector: 'kendo-chat-message-list',
|
|
5341
5484
|
template: `
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5485
|
+
@for (group of view; track trackGroup($index, group); let lastGroup = $last) {
|
|
5486
|
+
@switch (group.type) {
|
|
5487
|
+
@case ('date-marker') {
|
|
5488
|
+
<div
|
|
5489
|
+
class="k-timestamp"
|
|
5347
5490
|
>
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5491
|
+
@if (timestampTemplate?.templateRef) {
|
|
5492
|
+
<ng-container
|
|
5493
|
+
[ngTemplateOutlet]="timestampTemplate.templateRef"
|
|
5494
|
+
[ngTemplateOutletContext]="{ $implicit: group.timestamp }"
|
|
5352
5495
|
>
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5496
|
+
</ng-container>
|
|
5497
|
+
}
|
|
5498
|
+
@if (!timestampTemplate?.templateRef) {
|
|
5499
|
+
{{ formatTimeStamp(group.timestamp) }}
|
|
5500
|
+
}
|
|
5501
|
+
</div>
|
|
5502
|
+
}
|
|
5503
|
+
@case ('message-group') {
|
|
5504
|
+
<div
|
|
5505
|
+
class="k-message-group"
|
|
5506
|
+
[class.k-message-group-sender]="isOwnMessage(group.messages[0])"
|
|
5507
|
+
[class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
|
|
5508
|
+
[class.k-no-avatar]="!showGroupAvatar(group)"
|
|
5509
|
+
[class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
|
|
5363
5510
|
>
|
|
5511
|
+
@if (!userStatusTemplate?.templateRef && showGroupAvatar(group)) {
|
|
5512
|
+
<div
|
|
5513
|
+
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5514
|
+
>
|
|
5515
|
+
<span class="k-avatar-image">
|
|
5516
|
+
<img
|
|
5517
|
+
[attr.src]="group.author.avatarUrl"
|
|
5518
|
+
[alt]="group.author.avatarAltText"
|
|
5519
|
+
/>
|
|
5520
|
+
</span>
|
|
5521
|
+
</div>
|
|
5522
|
+
}
|
|
5523
|
+
@if (showGroupAvatar(group) && userStatusTemplate?.templateRef) {
|
|
5524
|
+
<div class="k-chat-user-status-wrapper">
|
|
5364
5525
|
<div
|
|
5365
|
-
|
|
5526
|
+
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5527
|
+
>
|
|
5528
|
+
<span class="k-avatar-image">
|
|
5529
|
+
<img
|
|
5530
|
+
[attr.src]="group.author.avatarUrl"
|
|
5531
|
+
[alt]="group.author.avatarAltText"
|
|
5532
|
+
/>
|
|
5533
|
+
</span>
|
|
5534
|
+
</div>
|
|
5535
|
+
@if (userStatusTemplate?.templateRef) {
|
|
5536
|
+
<div class="k-chat-user-status">
|
|
5537
|
+
<ng-template
|
|
5538
|
+
[ngTemplateOutlet]="userStatusTemplate.templateRef"
|
|
5539
|
+
[ngTemplateOutletContext]="{ $implicit: group.messages.at(-1) }"
|
|
5540
|
+
>
|
|
5541
|
+
</ng-template>
|
|
5542
|
+
</div>
|
|
5543
|
+
}
|
|
5544
|
+
</div>
|
|
5545
|
+
}
|
|
5546
|
+
<div class="k-message-group-content">
|
|
5547
|
+
@if (showGroupAuthor(group)) {
|
|
5548
|
+
<p class="k-message-author">{{ group.author.name }}</p>
|
|
5549
|
+
}
|
|
5550
|
+
@for (msg of group.messages; track msg; let firstMessage = $first; let lastMessage = $last) {
|
|
5551
|
+
@if (msg.user?.avatarUrl) {
|
|
5552
|
+
<div
|
|
5366
5553
|
class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
5367
|
-
|
|
5554
|
+
>
|
|
5368
5555
|
<span class="k-avatar-image">
|
|
5369
|
-
|
|
5370
|
-
[attr.src]="group.author.avatarUrl"
|
|
5371
|
-
[alt]="group.author.avatarAltText"
|
|
5372
|
-
/>
|
|
5556
|
+
<img [src]="msg.user?.avatarUrl">
|
|
5373
5557
|
</span>
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
</div>
|
|
5394
|
-
<div class="k-message-group-content">
|
|
5395
|
-
<p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
|
|
5396
|
-
<ng-container
|
|
5397
|
-
*ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
|
|
5558
|
+
</div>
|
|
5559
|
+
}
|
|
5560
|
+
<kendo-chat-message #message
|
|
5561
|
+
[message]="msg"
|
|
5562
|
+
[tabbable]="lastGroup && lastMessage"
|
|
5563
|
+
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
5564
|
+
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
5565
|
+
[messageContentTemplate]="messageContentTemplate"
|
|
5566
|
+
[authorMessageTemplate]="authorMessageTemplate"
|
|
5567
|
+
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
5568
|
+
[messageTemplate]="messageTemplate"
|
|
5569
|
+
[statusTemplate]="statusTemplate"
|
|
5570
|
+
[authorId]="authorId"
|
|
5571
|
+
>
|
|
5572
|
+
</kendo-chat-message>
|
|
5573
|
+
@if (msg.attachments && msg.attachments.length === 1) {
|
|
5574
|
+
<kendo-chat-attachment
|
|
5575
|
+
[attachment]="msg.attachments[0]"
|
|
5576
|
+
[template]="attachmentTemplate"
|
|
5398
5577
|
>
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
5403
|
-
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
5404
|
-
[messageContentTemplate]="messageContentTemplate"
|
|
5405
|
-
[authorMessageTemplate]="authorMessageTemplate"
|
|
5406
|
-
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
5407
|
-
[messageTemplate]="messageTemplate"
|
|
5408
|
-
[statusTemplate]="statusTemplate"
|
|
5409
|
-
[authorId]="authorId"
|
|
5410
|
-
>
|
|
5411
|
-
</kendo-chat-message>
|
|
5412
|
-
|
|
5413
|
-
<kendo-chat-attachment
|
|
5414
|
-
*ngIf="msg.attachments && msg.attachments.length === 1"
|
|
5415
|
-
[attachment]="msg.attachments[0]"
|
|
5416
|
-
[template]="attachmentTemplate"
|
|
5417
|
-
>
|
|
5418
|
-
</kendo-chat-attachment>
|
|
5419
|
-
</ng-container>
|
|
5420
|
-
</div>
|
|
5578
|
+
</kendo-chat-attachment>
|
|
5579
|
+
}
|
|
5580
|
+
}
|
|
5421
5581
|
</div>
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5582
|
+
</div>
|
|
5583
|
+
}
|
|
5584
|
+
@case ('attachment-group') {
|
|
5585
|
+
<kendo-chat-message-attachments #attachments
|
|
5586
|
+
[attachments]="group.attachments"
|
|
5587
|
+
[layout]="group.attachmentLayout"
|
|
5588
|
+
[localization]="localization"
|
|
5589
|
+
[tabbable]="lastGroup"
|
|
5590
|
+
[template]="attachmentTemplate"
|
|
5591
|
+
(click)="select(attachments)"
|
|
5592
|
+
(focus)="select(attachments)"
|
|
5432
5593
|
>
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5594
|
+
</kendo-chat-message-attachments>
|
|
5595
|
+
}
|
|
5596
|
+
@case ('action-group') {
|
|
5597
|
+
<kendo-chat-suggested-actions #actions
|
|
5598
|
+
[actions]="group.actions"
|
|
5599
|
+
type="action"
|
|
5600
|
+
[tabbable]="lastGroup"
|
|
5601
|
+
(dispatchAction)="dispatchAction($event, last(view))"
|
|
5602
|
+
(click)="select(actions, $event)"
|
|
5603
|
+
(focus)="select(actions, $event)"
|
|
5443
5604
|
>
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5605
|
+
</kendo-chat-suggested-actions>
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5447
5609
|
<kendo-resize-sensor (resize)="onResize()">
|
|
5448
5610
|
</kendo-resize-sensor>
|
|
5449
|
-
|
|
5611
|
+
`,
|
|
5450
5612
|
standalone: true,
|
|
5451
|
-
imports: [
|
|
5613
|
+
imports: [NgTemplateOutlet, MessageComponent, AttachmentComponent, MessageAttachmentsComponent, SuggestedActionsComponent, ResizeSensorComponent]
|
|
5452
5614
|
}]
|
|
5453
5615
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: i0.Renderer2 }, { type: ChatService }, { type: i0.ChangeDetectorRef }], propDecorators: { messages: [{
|
|
5454
5616
|
type: Input
|
|
@@ -6317,7 +6479,7 @@ class ChatComponent {
|
|
|
6317
6479
|
});
|
|
6318
6480
|
}
|
|
6319
6481
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6320
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
6482
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChatComponent, isStandalone: true, selector: "kendo-chat", inputs: { messages: "messages", authorId: "authorId", messageBoxType: "messageBoxType", height: "height", width: "width", placeholder: "placeholder", messageWidthMode: "messageWidthMode", timestampVisibility: "timestampVisibility", showUsername: "showUsername", showAvatar: "showAvatar", allowMessageCollapse: "allowMessageCollapse", enableSpeechToText: "enableSpeechToText", enableFileSelect: "enableFileSelect", messageToolbarActions: "messageToolbarActions", inputValue: "inputValue", authorMessageSettings: "authorMessageSettings", receiverMessageSettings: "receiverMessageSettings", messageContextMenuActions: "messageContextMenuActions", fileActions: "fileActions", messageFilesLayout: "messageFilesLayout", suggestionsLayout: "suggestionsLayout", quickActionsLayout: "quickActionsLayout", suggestions: "suggestions", sendButtonSettings: "sendButtonSettings", modelFields: "modelFields" }, outputs: { sendMessage: "sendMessage", toolbarActionClick: "toolbarActionClick", contextMenuActionClick: "contextMenuActionClick", fileActionClick: "fileActionClick", download: "download", executeAction: "executeAction", suggestionExecute: "suggestionExecute", fileSelect: "fileSelect", fileRemove: "fileRemove", unpin: "unpin", inputValueChange: "inputValueChange" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
|
|
6321
6483
|
LocalizationService,
|
|
6322
6484
|
ChatService,
|
|
6323
6485
|
SuggestionsScrollService,
|
|
@@ -6327,139 +6489,144 @@ class ChatComponent {
|
|
|
6327
6489
|
}
|
|
6328
6490
|
], queries: [{ propertyName: "attachmentTemplate", first: true, predicate: AttachmentTemplateDirective, descendants: true }, { propertyName: "chatHeaderTemplate", first: true, predicate: ChatHeaderTemplateDirective, descendants: true }, { propertyName: "chatNoDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "authorMessageContentTemplate", first: true, predicate: AuthorMessageContentTemplateDirective, descendants: true }, { propertyName: "receiverMessageContentTemplate", first: true, predicate: ReceiverMessageContentTemplateDirective, descendants: true }, { propertyName: "messageContentTemplate", first: true, predicate: MessageContentTemplateDirective, descendants: true }, { propertyName: "authorMessageTemplate", first: true, predicate: AuthorMessageTemplateDirective, descendants: true }, { propertyName: "receiverMessageTemplate", first: true, predicate: ReceiverMessageTemplateDirective, descendants: true }, { propertyName: "messageTemplate", first: true, predicate: MessageTemplateDirective, descendants: true }, { propertyName: "timestampTemplate", first: true, predicate: ChatTimestampTemplateDirective, descendants: true }, { propertyName: "suggestionTemplate", first: true, predicate: ChatSuggestionTemplateDirective, descendants: true }, { propertyName: "statusTemplate", first: true, predicate: ChatStatusTemplateDirective, descendants: true }, { propertyName: "messageBoxTemplate", first: true, predicate: ChatMessageBoxTemplateDirective, descendants: true }, { propertyName: "userStatusTemplate", first: true, predicate: ChatUserStatusTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "messagesContextMenu", first: true, predicate: ["messagesContextMenu"], descendants: true }, { propertyName: "messageBox", first: true, predicate: ["messageBox"], descendants: true }, { propertyName: "messageList", first: true, predicate: ["messageList"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
6329
6491
|
<ng-container kendoChatLocalizedMessages
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6492
|
+
i18n-deletedMessageSenderText="kendo.chat.deletedMessageSenderText|The text that is displayed when the sender deletes a message"
|
|
6493
|
+
deletedMessageSenderText="You removed this message."
|
|
6494
|
+
|
|
6495
|
+
i18n-deletedMessageReceiverText="kendo.chat.deletedMessageReceiverText|The text that is displayed when the receiver deletes a message"
|
|
6496
|
+
deletedMessageReceiverText="This message was removed by its sender."
|
|
6497
|
+
|
|
6498
|
+
i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"
|
|
6499
|
+
messagePlaceholder="Type a message..."
|
|
6500
|
+
|
|
6501
|
+
i18n-send="kendo.chat.send|The text for the Send button"
|
|
6502
|
+
send="Send..."
|
|
6503
|
+
|
|
6504
|
+
i18n-messageListLabel="kendo.chat.messageListLabel|The label text for the Message list"
|
|
6505
|
+
messageListLabel="Message list"
|
|
6506
|
+
|
|
6507
|
+
i18n-messageBoxInputLabel="kendo.chat.messageBoxInputLabel|The label text for the Message input box"
|
|
6508
|
+
messageBoxInputLabel="Message"
|
|
6509
|
+
|
|
6510
|
+
i18n-messageAttachmentLeftArrow="kendo.chat.messageAttachmentLeftArrow|The text for the left arrow of the message attachments"
|
|
6511
|
+
messageAttachmentLeftArrow="Previous item"
|
|
6512
|
+
|
|
6513
|
+
i18n-messageAttachmentRightArrow="kendo.chat.messageAttachmentRightArrow|The text for the right arrow of the message attachments"
|
|
6514
|
+
messageAttachmentRightArrow="Next item"
|
|
6515
|
+
|
|
6516
|
+
i18n-speechToTextButtonTitle="kendo.chat.speechToTextButtonTitle|Sets the Speech to Text button title."
|
|
6517
|
+
speechToTextButtonTitle="Speech to Text"
|
|
6518
|
+
|
|
6519
|
+
i18n-fileSelectButtonTitle="kendo.chat.fileSelectButtonTitle|Sets the File Select button title."
|
|
6520
|
+
fileSelectButtonTitle="Select files"
|
|
6521
|
+
|
|
6522
|
+
i18n-removeReplyTitle="kendo.chat.removeReplyTitle|Sets the title of the icon which removes the reply reference in the Message Box."
|
|
6523
|
+
removeReplyTitle="Remove reply"
|
|
6524
|
+
|
|
6525
|
+
i18n-removeFileTitle="kendo.chat.removeFileTitle|Sets the title of the icon which removes a selected file in the Message Box."
|
|
6526
|
+
removeFileTitle="Remove file"
|
|
6527
|
+
|
|
6528
|
+
i18n-expandTitle="kendo.chat.expandTitle|Sets the title of the icon which demonstrates that the message can be expanded."
|
|
6529
|
+
expandTitle="Expand message"
|
|
6530
|
+
|
|
6531
|
+
i18n-collapseTitle="kendo.chat.collapseTitle|Sets the title of the icon which demonstrates that the message can be collapsed."
|
|
6532
|
+
collapseTitle="Collapse message"
|
|
6533
|
+
|
|
6534
|
+
i18n-fileActionsTitle="kendo.chat.fileActionsTitle|Sets the title of the DropDownButton which opens the File actions."
|
|
6535
|
+
fileActionsTitle="File actions"
|
|
6536
|
+
|
|
6537
|
+
i18n-downloadAllFilesText="kendo.chat.downloadAllFilesText|Sets the text that is displayed in the download section of the message."
|
|
6538
|
+
downloadAllFilesText="Download all"
|
|
6539
|
+
|
|
6540
|
+
i18n-previousSuggestionsButtonTitle="kendo.chat.previousSuggestionsButtonTitle|The title of the button that scrolls to the previous suggestions"
|
|
6541
|
+
previousSuggestionsButtonTitle="Scroll left"
|
|
6542
|
+
|
|
6543
|
+
i18n-nextSuggestionsButtonTitle="kendo.chat.nextSuggestionsButtonTitle|The title of the button that scrolls to the next suggestions"
|
|
6544
|
+
nextSuggestionsButtonTitle="Scroll right"
|
|
6545
|
+
>
|
|
6384
6546
|
</ng-container>
|
|
6385
|
-
|
|
6386
|
-
|
|
6547
|
+
|
|
6548
|
+
@if (chatHeaderTemplate) {
|
|
6549
|
+
<kendo-appbar class="k-chat-header" positionMode="sticky" themeColor="inherit">
|
|
6387
6550
|
<ng-container *ngTemplateOutlet="chatHeaderTemplate.templateRef"></ng-container>
|
|
6388
|
-
|
|
6389
|
-
|
|
6551
|
+
</kendo-appbar>
|
|
6552
|
+
}
|
|
6553
|
+
@if (pinnedMessage) {
|
|
6554
|
+
<div class="k-message-reference k-message-reference-receiver k-message-pinned" (click)="scrollToPinnedMessage()">
|
|
6390
6555
|
<kendo-icon-wrapper
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6556
|
+
size="xlarge"
|
|
6557
|
+
name="pin"
|
|
6558
|
+
[svgIcon]="pinIcon"
|
|
6559
|
+
>
|
|
6395
6560
|
</kendo-icon-wrapper>
|
|
6396
6561
|
<chat-message-reference-content [message]="pinnedMessage"></chat-message-reference-content>
|
|
6397
6562
|
<span class="k-spacer"></span>
|
|
6398
6563
|
<button kendoButton [svgIcon]="deleteIcon" (click)="unpin.emit(pinnedMessage)" fillMode="flat"></button>
|
|
6399
|
-
|
|
6564
|
+
</div>
|
|
6565
|
+
}
|
|
6400
6566
|
<div
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6567
|
+
#messageList
|
|
6568
|
+
class="k-message-list"
|
|
6569
|
+
aria-live="polite"
|
|
6570
|
+
role="log"
|
|
6571
|
+
kendoChatScrollAnchor
|
|
6572
|
+
[attr.aria-label]="textFor('messageListLabel')"
|
|
6573
|
+
#anchor="scrollAnchor"
|
|
6574
|
+
[(autoScroll)]="autoScroll"
|
|
6575
|
+
>
|
|
6576
|
+
@if (processedMessages && processedMessages.length === 0) {
|
|
6577
|
+
<div class="k-message-list-content k-message-list-content-empty">
|
|
6578
|
+
<ng-template
|
|
6579
|
+
[ngTemplateOutlet]="chatNoDataTemplate?.templateRef">
|
|
6580
|
+
</ng-template>
|
|
6414
6581
|
</div>
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6582
|
+
} @else {
|
|
6583
|
+
<kendo-chat-message-list
|
|
6584
|
+
[messages]="processedMessages"
|
|
6585
|
+
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
6586
|
+
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
6587
|
+
[messageContentTemplate]="messageContentTemplate"
|
|
6588
|
+
[authorMessageTemplate]="authorMessageTemplate"
|
|
6589
|
+
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
6590
|
+
[messageTemplate]="messageTemplate"
|
|
6591
|
+
[timestampTemplate]="timestampTemplate"
|
|
6592
|
+
[statusTemplate]="statusTemplate"
|
|
6593
|
+
[userStatusTemplate]="userStatusTemplate"
|
|
6594
|
+
[localization]="localizationText"
|
|
6595
|
+
[attachmentTemplate]="attachmentTemplate"
|
|
6596
|
+
[authorId]="authorId"
|
|
6597
|
+
(executeAction)="dispatchAction($event)"
|
|
6598
|
+
(resize)="anchor.scrollToBottom()"
|
|
6599
|
+
(navigate)="this.autoScroll = false"
|
|
6600
|
+
>
|
|
6601
|
+
</kendo-chat-message-list>
|
|
6602
|
+
}
|
|
6436
6603
|
</div>
|
|
6437
6604
|
<kendo-message-box
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6605
|
+
#messageBox
|
|
6606
|
+
[messageBoxTemplate]="messageBoxTemplate"
|
|
6607
|
+
[suggestionTemplate]="suggestionTemplate"
|
|
6608
|
+
[suggestions]="suggestions"
|
|
6609
|
+
[placeholder]="placeholder"
|
|
6610
|
+
[authorId]="authorId"
|
|
6611
|
+
[autoScroll]="autoScroll"
|
|
6612
|
+
[inputValue]="inputValue"
|
|
6613
|
+
[localization]="localizationText"
|
|
6614
|
+
(sendMessage)="sendMessage.emit($event)"
|
|
6615
|
+
(executeSuggestion)="suggestionExecute.emit($event)"
|
|
6616
|
+
(fileSelect)="fileSelect.emit($event)"
|
|
6617
|
+
(fileRemove)="fileRemove.emit($event)"
|
|
6618
|
+
>
|
|
6452
6619
|
</kendo-message-box>
|
|
6453
|
-
|
|
6620
|
+
|
|
6454
6621
|
<kendo-contextmenu
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6622
|
+
#messagesContextMenu
|
|
6623
|
+
[items]="contextMenuActions"
|
|
6624
|
+
[popupAlign]="{ horizontal: 'right', vertical: 'top' }"
|
|
6625
|
+
[collision]="{ horizontal: 'flip', vertical: 'flip'}"
|
|
6626
|
+
(popupClose)="handleMenuClose($event)"
|
|
6627
|
+
(select)="onContextMenuAction($event.item.originalAction)"
|
|
6461
6628
|
></kendo-contextmenu>
|
|
6462
|
-
|
|
6629
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll"], outputs: ["autoScrollChange"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "statusTemplate", "userStatusTemplate", "localization", "authorId"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["authorId", "autoScroll", "suggestions", "placeholder", "inputValue", "localization", "messageBoxTemplate", "suggestionTemplate"], outputs: ["sendMessage", "executeSuggestion", "fileSelect", "fileRemove"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: AppBarComponent, selector: "kendo-appbar", inputs: ["position", "positionMode", "themeColor"], exportAs: ["kendoAppBar"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.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: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }] });
|
|
6463
6630
|
}
|
|
6464
6631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatComponent, decorators: [{
|
|
6465
6632
|
type: Component,
|
|
@@ -6476,141 +6643,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6476
6643
|
selector: 'kendo-chat',
|
|
6477
6644
|
template: `
|
|
6478
6645
|
<ng-container kendoChatLocalizedMessages
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6646
|
+
i18n-deletedMessageSenderText="kendo.chat.deletedMessageSenderText|The text that is displayed when the sender deletes a message"
|
|
6647
|
+
deletedMessageSenderText="You removed this message."
|
|
6648
|
+
|
|
6649
|
+
i18n-deletedMessageReceiverText="kendo.chat.deletedMessageReceiverText|The text that is displayed when the receiver deletes a message"
|
|
6650
|
+
deletedMessageReceiverText="This message was removed by its sender."
|
|
6651
|
+
|
|
6652
|
+
i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"
|
|
6653
|
+
messagePlaceholder="Type a message..."
|
|
6654
|
+
|
|
6655
|
+
i18n-send="kendo.chat.send|The text for the Send button"
|
|
6656
|
+
send="Send..."
|
|
6657
|
+
|
|
6658
|
+
i18n-messageListLabel="kendo.chat.messageListLabel|The label text for the Message list"
|
|
6659
|
+
messageListLabel="Message list"
|
|
6660
|
+
|
|
6661
|
+
i18n-messageBoxInputLabel="kendo.chat.messageBoxInputLabel|The label text for the Message input box"
|
|
6662
|
+
messageBoxInputLabel="Message"
|
|
6663
|
+
|
|
6664
|
+
i18n-messageAttachmentLeftArrow="kendo.chat.messageAttachmentLeftArrow|The text for the left arrow of the message attachments"
|
|
6665
|
+
messageAttachmentLeftArrow="Previous item"
|
|
6666
|
+
|
|
6667
|
+
i18n-messageAttachmentRightArrow="kendo.chat.messageAttachmentRightArrow|The text for the right arrow of the message attachments"
|
|
6668
|
+
messageAttachmentRightArrow="Next item"
|
|
6669
|
+
|
|
6670
|
+
i18n-speechToTextButtonTitle="kendo.chat.speechToTextButtonTitle|Sets the Speech to Text button title."
|
|
6671
|
+
speechToTextButtonTitle="Speech to Text"
|
|
6672
|
+
|
|
6673
|
+
i18n-fileSelectButtonTitle="kendo.chat.fileSelectButtonTitle|Sets the File Select button title."
|
|
6674
|
+
fileSelectButtonTitle="Select files"
|
|
6675
|
+
|
|
6676
|
+
i18n-removeReplyTitle="kendo.chat.removeReplyTitle|Sets the title of the icon which removes the reply reference in the Message Box."
|
|
6677
|
+
removeReplyTitle="Remove reply"
|
|
6678
|
+
|
|
6679
|
+
i18n-removeFileTitle="kendo.chat.removeFileTitle|Sets the title of the icon which removes a selected file in the Message Box."
|
|
6680
|
+
removeFileTitle="Remove file"
|
|
6681
|
+
|
|
6682
|
+
i18n-expandTitle="kendo.chat.expandTitle|Sets the title of the icon which demonstrates that the message can be expanded."
|
|
6683
|
+
expandTitle="Expand message"
|
|
6684
|
+
|
|
6685
|
+
i18n-collapseTitle="kendo.chat.collapseTitle|Sets the title of the icon which demonstrates that the message can be collapsed."
|
|
6686
|
+
collapseTitle="Collapse message"
|
|
6687
|
+
|
|
6688
|
+
i18n-fileActionsTitle="kendo.chat.fileActionsTitle|Sets the title of the DropDownButton which opens the File actions."
|
|
6689
|
+
fileActionsTitle="File actions"
|
|
6690
|
+
|
|
6691
|
+
i18n-downloadAllFilesText="kendo.chat.downloadAllFilesText|Sets the text that is displayed in the download section of the message."
|
|
6692
|
+
downloadAllFilesText="Download all"
|
|
6693
|
+
|
|
6694
|
+
i18n-previousSuggestionsButtonTitle="kendo.chat.previousSuggestionsButtonTitle|The title of the button that scrolls to the previous suggestions"
|
|
6695
|
+
previousSuggestionsButtonTitle="Scroll left"
|
|
6696
|
+
|
|
6697
|
+
i18n-nextSuggestionsButtonTitle="kendo.chat.nextSuggestionsButtonTitle|The title of the button that scrolls to the next suggestions"
|
|
6698
|
+
nextSuggestionsButtonTitle="Scroll right"
|
|
6699
|
+
>
|
|
6533
6700
|
</ng-container>
|
|
6534
|
-
|
|
6535
|
-
|
|
6701
|
+
|
|
6702
|
+
@if (chatHeaderTemplate) {
|
|
6703
|
+
<kendo-appbar class="k-chat-header" positionMode="sticky" themeColor="inherit">
|
|
6536
6704
|
<ng-container *ngTemplateOutlet="chatHeaderTemplate.templateRef"></ng-container>
|
|
6537
|
-
|
|
6538
|
-
|
|
6705
|
+
</kendo-appbar>
|
|
6706
|
+
}
|
|
6707
|
+
@if (pinnedMessage) {
|
|
6708
|
+
<div class="k-message-reference k-message-reference-receiver k-message-pinned" (click)="scrollToPinnedMessage()">
|
|
6539
6709
|
<kendo-icon-wrapper
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6710
|
+
size="xlarge"
|
|
6711
|
+
name="pin"
|
|
6712
|
+
[svgIcon]="pinIcon"
|
|
6713
|
+
>
|
|
6544
6714
|
</kendo-icon-wrapper>
|
|
6545
6715
|
<chat-message-reference-content [message]="pinnedMessage"></chat-message-reference-content>
|
|
6546
6716
|
<span class="k-spacer"></span>
|
|
6547
6717
|
<button kendoButton [svgIcon]="deleteIcon" (click)="unpin.emit(pinnedMessage)" fillMode="flat"></button>
|
|
6548
|
-
|
|
6718
|
+
</div>
|
|
6719
|
+
}
|
|
6549
6720
|
<div
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6721
|
+
#messageList
|
|
6722
|
+
class="k-message-list"
|
|
6723
|
+
aria-live="polite"
|
|
6724
|
+
role="log"
|
|
6725
|
+
kendoChatScrollAnchor
|
|
6726
|
+
[attr.aria-label]="textFor('messageListLabel')"
|
|
6727
|
+
#anchor="scrollAnchor"
|
|
6728
|
+
[(autoScroll)]="autoScroll"
|
|
6729
|
+
>
|
|
6730
|
+
@if (processedMessages && processedMessages.length === 0) {
|
|
6731
|
+
<div class="k-message-list-content k-message-list-content-empty">
|
|
6732
|
+
<ng-template
|
|
6733
|
+
[ngTemplateOutlet]="chatNoDataTemplate?.templateRef">
|
|
6734
|
+
</ng-template>
|
|
6563
6735
|
</div>
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6736
|
+
} @else {
|
|
6737
|
+
<kendo-chat-message-list
|
|
6738
|
+
[messages]="processedMessages"
|
|
6739
|
+
[authorMessageContentTemplate]="authorMessageContentTemplate"
|
|
6740
|
+
[receiverMessageContentTemplate]="receiverMessageContentTemplate"
|
|
6741
|
+
[messageContentTemplate]="messageContentTemplate"
|
|
6742
|
+
[authorMessageTemplate]="authorMessageTemplate"
|
|
6743
|
+
[receiverMessageTemplate]="receiverMessageTemplate"
|
|
6744
|
+
[messageTemplate]="messageTemplate"
|
|
6745
|
+
[timestampTemplate]="timestampTemplate"
|
|
6746
|
+
[statusTemplate]="statusTemplate"
|
|
6747
|
+
[userStatusTemplate]="userStatusTemplate"
|
|
6748
|
+
[localization]="localizationText"
|
|
6749
|
+
[attachmentTemplate]="attachmentTemplate"
|
|
6750
|
+
[authorId]="authorId"
|
|
6751
|
+
(executeAction)="dispatchAction($event)"
|
|
6752
|
+
(resize)="anchor.scrollToBottom()"
|
|
6753
|
+
(navigate)="this.autoScroll = false"
|
|
6754
|
+
>
|
|
6755
|
+
</kendo-chat-message-list>
|
|
6756
|
+
}
|
|
6585
6757
|
</div>
|
|
6586
6758
|
<kendo-message-box
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6759
|
+
#messageBox
|
|
6760
|
+
[messageBoxTemplate]="messageBoxTemplate"
|
|
6761
|
+
[suggestionTemplate]="suggestionTemplate"
|
|
6762
|
+
[suggestions]="suggestions"
|
|
6763
|
+
[placeholder]="placeholder"
|
|
6764
|
+
[authorId]="authorId"
|
|
6765
|
+
[autoScroll]="autoScroll"
|
|
6766
|
+
[inputValue]="inputValue"
|
|
6767
|
+
[localization]="localizationText"
|
|
6768
|
+
(sendMessage)="sendMessage.emit($event)"
|
|
6769
|
+
(executeSuggestion)="suggestionExecute.emit($event)"
|
|
6770
|
+
(fileSelect)="fileSelect.emit($event)"
|
|
6771
|
+
(fileRemove)="fileRemove.emit($event)"
|
|
6772
|
+
>
|
|
6601
6773
|
</kendo-message-box>
|
|
6602
|
-
|
|
6774
|
+
|
|
6603
6775
|
<kendo-contextmenu
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6776
|
+
#messagesContextMenu
|
|
6777
|
+
[items]="contextMenuActions"
|
|
6778
|
+
[popupAlign]="{ horizontal: 'right', vertical: 'top' }"
|
|
6779
|
+
[collision]="{ horizontal: 'flip', vertical: 'flip'}"
|
|
6780
|
+
(popupClose)="handleMenuClose($event)"
|
|
6781
|
+
(select)="onContextMenuAction($event.item.originalAction)"
|
|
6610
6782
|
></kendo-contextmenu>
|
|
6611
|
-
|
|
6783
|
+
`,
|
|
6612
6784
|
standalone: true,
|
|
6613
|
-
imports: [LocalizedMessagesDirective$1, ScrollAnchorDirective, MessageListComponent, MessageBoxComponent, MessageReferenceComponent, AppBarComponent, NgTemplateOutlet,
|
|
6785
|
+
imports: [LocalizedMessagesDirective$1, ScrollAnchorDirective, MessageListComponent, MessageBoxComponent, MessageReferenceComponent, AppBarComponent, NgTemplateOutlet, IconWrapperComponent, KENDO_BUTTON, ContextMenuComponent]
|
|
6614
6786
|
}]
|
|
6615
6787
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ChatService }], propDecorators: { messages: [{
|
|
6616
6788
|
type: Input
|
|
@@ -6832,59 +7004,73 @@ class HeroCardComponent {
|
|
|
6832
7004
|
this.executeAction.next(action);
|
|
6833
7005
|
}
|
|
6834
7006
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6835
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
6836
|
-
|
|
7007
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: HeroCardComponent, isStandalone: true, selector: "kendo-chat-hero-card", inputs: { imageUrl: "imageUrl", title: "title", subtitle: "subtitle", actions: "actions" }, outputs: { executeAction: "executeAction" }, host: { properties: { "class.k-card": "this.cssClass" } }, ngImport: i0, template: `
|
|
7008
|
+
@if (imageUrl) {
|
|
7009
|
+
<img class="k-card-image" [src]="imageUrl" />
|
|
7010
|
+
}
|
|
6837
7011
|
<div class="k-card-body">
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
7012
|
+
@if (title) {
|
|
7013
|
+
<h5 class="k-card-title">
|
|
7014
|
+
{{ title }}
|
|
7015
|
+
</h5>
|
|
7016
|
+
}
|
|
7017
|
+
@if (subtitle) {
|
|
7018
|
+
<h6 class="k-card-subtitle">
|
|
7019
|
+
{{ subtitle }}
|
|
7020
|
+
</h6>
|
|
7021
|
+
}
|
|
6844
7022
|
</div>
|
|
6845
7023
|
<div class="k-card-actions k-card-actions-vertical">
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
7024
|
+
@for (act of actions; track act) {
|
|
7025
|
+
<span class="k-card-action"
|
|
7026
|
+
>
|
|
7027
|
+
<button
|
|
6850
7028
|
kendoButton fillMode="flat"
|
|
6851
7029
|
(click)="onClick(act)"
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
7030
|
+
>
|
|
7031
|
+
{{ act.title }}
|
|
7032
|
+
</button>
|
|
7033
|
+
</span>
|
|
7034
|
+
}
|
|
6856
7035
|
</div>
|
|
6857
|
-
|
|
7036
|
+
`, 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"] }] });
|
|
6858
7037
|
}
|
|
6859
7038
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeroCardComponent, decorators: [{
|
|
6860
7039
|
type: Component,
|
|
6861
7040
|
args: [{
|
|
6862
7041
|
selector: 'kendo-chat-hero-card',
|
|
6863
7042
|
template: `
|
|
6864
|
-
|
|
7043
|
+
@if (imageUrl) {
|
|
7044
|
+
<img class="k-card-image" [src]="imageUrl" />
|
|
7045
|
+
}
|
|
6865
7046
|
<div class="k-card-body">
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
7047
|
+
@if (title) {
|
|
7048
|
+
<h5 class="k-card-title">
|
|
7049
|
+
{{ title }}
|
|
7050
|
+
</h5>
|
|
7051
|
+
}
|
|
7052
|
+
@if (subtitle) {
|
|
7053
|
+
<h6 class="k-card-subtitle">
|
|
7054
|
+
{{ subtitle }}
|
|
7055
|
+
</h6>
|
|
7056
|
+
}
|
|
6872
7057
|
</div>
|
|
6873
7058
|
<div class="k-card-actions k-card-actions-vertical">
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
7059
|
+
@for (act of actions; track act) {
|
|
7060
|
+
<span class="k-card-action"
|
|
7061
|
+
>
|
|
7062
|
+
<button
|
|
6878
7063
|
kendoButton fillMode="flat"
|
|
6879
7064
|
(click)="onClick(act)"
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
7065
|
+
>
|
|
7066
|
+
{{ act.title }}
|
|
7067
|
+
</button>
|
|
7068
|
+
</span>
|
|
7069
|
+
}
|
|
6884
7070
|
</div>
|
|
6885
|
-
|
|
7071
|
+
`,
|
|
6886
7072
|
standalone: true,
|
|
6887
|
-
imports: [
|
|
7073
|
+
imports: [ButtonComponent]
|
|
6888
7074
|
}]
|
|
6889
7075
|
}], propDecorators: { imageUrl: [{
|
|
6890
7076
|
type: Input
|
|
@@ -7238,7 +7424,7 @@ class InlineAIPromptContentComponent {
|
|
|
7238
7424
|
}
|
|
7239
7425
|
}
|
|
7240
7426
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptContentComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.LocalizationService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
7241
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
7427
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: InlineAIPromptContentComponent, isStandalone: true, selector: "kendo-inlineaiprompt-content", inputs: { popupElement: "popupElement", promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", appendTo: "appendTo", outputActions: "outputActions", promptCommands: "promptCommands", outputTemplate: "outputTemplate" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, host: { listeners: { "keydown": "onEscapeKey($event)" }, properties: { "class.k-prompt": "this.className", "attr.dir": "this.dirAttr", "style.max-height": "this.maxHeightStyle", "style.width": "this.widthStyle" } }, providers: [
|
|
7242
7428
|
LocalizationService,
|
|
7243
7429
|
{
|
|
7244
7430
|
provide: L10N_PREFIX,
|
|
@@ -7246,99 +7432,112 @@ class InlineAIPromptContentComponent {
|
|
|
7246
7432
|
},
|
|
7247
7433
|
], viewQueries: [{ propertyName: "textArea", first: true, predicate: TextAreaComponent, descendants: true }, { propertyName: "contextMenu", first: true, predicate: ["kendoContextMenu"], descendants: true }], exportAs: ["kendoInlineAIPromptContent"], ngImport: i0, template: `
|
|
7248
7434
|
<ng-container kendoInlineAIPromptLocalizedMessages
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7435
|
+
i18n-commandsButtonTitle="kendo.inlineaiprompt.commandsButtonTitle|Sets the Commands button title."
|
|
7436
|
+
commandsButtonTitle="Command Menu"
|
|
7437
|
+
i18n-generateButtonTitle="kendo.inlineaiprompt.generateButtonTitle|Sets the Generate button title."
|
|
7438
|
+
generateButtonTitle="Generate"
|
|
7439
|
+
i18n-speechToTextButtonTitle="kendo.inlineaiprompt.speechToTextButtonTitle|Sets the Speech to Text button title."
|
|
7440
|
+
speechToTextButtonTitle="Speech to Text"
|
|
7441
|
+
>
|
|
7256
7442
|
</ng-container>
|
|
7257
7443
|
<div class="k-prompt-content">
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7444
|
+
<div class="k-prompt-view">
|
|
7445
|
+
@if (promptOutput) {
|
|
7446
|
+
<kendo-card width="100%">
|
|
7447
|
+
<kendo-card-body>
|
|
7448
|
+
@if (outputTemplate) {
|
|
7449
|
+
<ng-container
|
|
7450
|
+
[ngTemplateOutlet]="outputTemplate"
|
|
7451
|
+
[ngTemplateOutletContext]="{ $implicit: promptOutput }"
|
|
7452
|
+
>
|
|
7453
|
+
</ng-container>
|
|
7454
|
+
}
|
|
7455
|
+
@if (!outputTemplate) {
|
|
7456
|
+
{{promptOutput.output}}
|
|
7457
|
+
}
|
|
7458
|
+
</kendo-card-body>
|
|
7459
|
+
@if (outputActions && outputActions.length > 0) {
|
|
7460
|
+
<kendo-card-actions>
|
|
7461
|
+
@for (action of outputActions; track action) {
|
|
7462
|
+
@if (action.type === 'button') {
|
|
7463
|
+
<button kendoButton
|
|
7464
|
+
[attr.title]="action?.title"
|
|
7465
|
+
[fillMode]="action?.fillMode"
|
|
7466
|
+
[themeColor]="action?.themeColor"
|
|
7467
|
+
[rounded]="action?.rounded"
|
|
7468
|
+
[icon]="action?.icon"
|
|
7469
|
+
[svgIcon]="action?.svgIcon"
|
|
7470
|
+
(click)="onActionClick(action)"
|
|
7471
|
+
>{{action?.text}}</button>
|
|
7472
|
+
}
|
|
7473
|
+
@if (action.type === 'spacer') {
|
|
7474
|
+
<div class="k-spacer"></div>
|
|
7475
|
+
}
|
|
7476
|
+
}
|
|
7477
|
+
</kendo-card-actions>
|
|
7478
|
+
}
|
|
7479
|
+
</kendo-card>
|
|
7480
|
+
}
|
|
7481
|
+
<kendo-textarea
|
|
7482
|
+
[value]="promptValue ? promptValue : null"
|
|
7483
|
+
(valueChange)="handlePromptValueChange($event)"
|
|
7484
|
+
[rows]="initialRows"
|
|
7485
|
+
resizable="auto"
|
|
7486
|
+
flow="horizontal"
|
|
7487
|
+
[placeholder]="placeholder"
|
|
7488
|
+
[showPrefixSeparator]="true"
|
|
7489
|
+
[selectOnFocus]="true"
|
|
7490
|
+
[maxResizableRows]="maxRows"
|
|
7491
|
+
(keydown)="handleTextAreaKeydown($event)"
|
|
7492
|
+
>
|
|
7493
|
+
<kendo-textarea-prefix>
|
|
7494
|
+
@if (promptCommands && promptCommands.length > 0) {
|
|
7495
|
+
<button
|
|
7496
|
+
kendoButton
|
|
7497
|
+
#commandMenuButton
|
|
7498
|
+
[attr.title]="messageFor('commandsButtonTitle')"
|
|
7499
|
+
fillMode="flat"
|
|
7500
|
+
icon="menu"
|
|
7501
|
+
[svgIcon]="commandMenuIcon"
|
|
7502
|
+
(click)="onCommandButtonClick($event)"
|
|
7503
|
+
></button>
|
|
7504
|
+
}
|
|
7505
|
+
@if (enableSpeechToText) {
|
|
7506
|
+
<button
|
|
7507
|
+
kendoSpeechToTextButton
|
|
7508
|
+
[attr.title]="messageFor('speechToTextButtonTitle')"
|
|
7509
|
+
fillMode="flat"
|
|
7510
|
+
(result)="handleSpeechResult($event)"
|
|
7511
|
+
(start)="isListening = true"
|
|
7512
|
+
(end)="isListening = false"
|
|
7513
|
+
></button>
|
|
7514
|
+
}
|
|
7515
|
+
</kendo-textarea-prefix>
|
|
7516
|
+
<kendo-textarea-suffix>
|
|
7517
|
+
<button
|
|
7518
|
+
kendoButton
|
|
7519
|
+
[attr.title]="messageFor('generateButtonTitle')"
|
|
7520
|
+
fillMode="flat"
|
|
7521
|
+
class="k-prompt-send"
|
|
7522
|
+
[ngClass]="{ 'k-generating': streaming, 'k-active': streaming }"
|
|
7523
|
+
(click)="handlePromptRequest()"
|
|
7524
|
+
[disabled]="!streaming && (!promptValue?.trim() || isListening)"
|
|
7525
|
+
[svgIcon]="streaming ? stopGenerationIcon : sendIcon"
|
|
7526
|
+
[icon]="streaming ? 'stop-sm' : 'paper-plane'"
|
|
7527
|
+
></button>
|
|
7528
|
+
</kendo-textarea-suffix>
|
|
7529
|
+
</kendo-textarea>
|
|
7530
|
+
</div>
|
|
7332
7531
|
</div>
|
|
7333
7532
|
<kendo-contextmenu
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7533
|
+
#kendoContextMenu
|
|
7534
|
+
[alignToAnchor]="true"
|
|
7535
|
+
[items]="commandMenuItems"
|
|
7536
|
+
[appendTo]="appendTo"
|
|
7537
|
+
class="k-hidden"
|
|
7538
|
+
(select)="onCommandClick($event)">
|
|
7340
7539
|
</kendo-contextmenu>
|
|
7341
|
-
|
|
7540
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoInlineAIPromptLocalizedMessages]" }, { kind: "component", type: i2.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: "component", type: i2.SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: i3.TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: i3.TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: i4.ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: i5.CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "component", type: i5.CardActionsComponent, selector: "kendo-card-actions", inputs: ["orientation", "layout", "actions"], outputs: ["action"] }, { kind: "component", type: i5.CardBodyComponent, selector: "kendo-card-body" }] });
|
|
7342
7541
|
}
|
|
7343
7542
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptContentComponent, decorators: [{
|
|
7344
7543
|
type: Component,
|
|
@@ -7354,101 +7553,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
7354
7553
|
],
|
|
7355
7554
|
template: `
|
|
7356
7555
|
<ng-container kendoInlineAIPromptLocalizedMessages
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7556
|
+
i18n-commandsButtonTitle="kendo.inlineaiprompt.commandsButtonTitle|Sets the Commands button title."
|
|
7557
|
+
commandsButtonTitle="Command Menu"
|
|
7558
|
+
i18n-generateButtonTitle="kendo.inlineaiprompt.generateButtonTitle|Sets the Generate button title."
|
|
7559
|
+
generateButtonTitle="Generate"
|
|
7560
|
+
i18n-speechToTextButtonTitle="kendo.inlineaiprompt.speechToTextButtonTitle|Sets the Speech to Text button title."
|
|
7561
|
+
speechToTextButtonTitle="Speech to Text"
|
|
7562
|
+
>
|
|
7364
7563
|
</ng-container>
|
|
7365
7564
|
<div class="k-prompt-content">
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7565
|
+
<div class="k-prompt-view">
|
|
7566
|
+
@if (promptOutput) {
|
|
7567
|
+
<kendo-card width="100%">
|
|
7568
|
+
<kendo-card-body>
|
|
7569
|
+
@if (outputTemplate) {
|
|
7570
|
+
<ng-container
|
|
7571
|
+
[ngTemplateOutlet]="outputTemplate"
|
|
7572
|
+
[ngTemplateOutletContext]="{ $implicit: promptOutput }"
|
|
7573
|
+
>
|
|
7574
|
+
</ng-container>
|
|
7575
|
+
}
|
|
7576
|
+
@if (!outputTemplate) {
|
|
7577
|
+
{{promptOutput.output}}
|
|
7578
|
+
}
|
|
7579
|
+
</kendo-card-body>
|
|
7580
|
+
@if (outputActions && outputActions.length > 0) {
|
|
7581
|
+
<kendo-card-actions>
|
|
7582
|
+
@for (action of outputActions; track action) {
|
|
7583
|
+
@if (action.type === 'button') {
|
|
7584
|
+
<button kendoButton
|
|
7585
|
+
[attr.title]="action?.title"
|
|
7586
|
+
[fillMode]="action?.fillMode"
|
|
7587
|
+
[themeColor]="action?.themeColor"
|
|
7588
|
+
[rounded]="action?.rounded"
|
|
7589
|
+
[icon]="action?.icon"
|
|
7590
|
+
[svgIcon]="action?.svgIcon"
|
|
7591
|
+
(click)="onActionClick(action)"
|
|
7592
|
+
>{{action?.text}}</button>
|
|
7593
|
+
}
|
|
7594
|
+
@if (action.type === 'spacer') {
|
|
7595
|
+
<div class="k-spacer"></div>
|
|
7596
|
+
}
|
|
7597
|
+
}
|
|
7598
|
+
</kendo-card-actions>
|
|
7599
|
+
}
|
|
7600
|
+
</kendo-card>
|
|
7601
|
+
}
|
|
7602
|
+
<kendo-textarea
|
|
7603
|
+
[value]="promptValue ? promptValue : null"
|
|
7604
|
+
(valueChange)="handlePromptValueChange($event)"
|
|
7605
|
+
[rows]="initialRows"
|
|
7606
|
+
resizable="auto"
|
|
7607
|
+
flow="horizontal"
|
|
7608
|
+
[placeholder]="placeholder"
|
|
7609
|
+
[showPrefixSeparator]="true"
|
|
7610
|
+
[selectOnFocus]="true"
|
|
7611
|
+
[maxResizableRows]="maxRows"
|
|
7612
|
+
(keydown)="handleTextAreaKeydown($event)"
|
|
7613
|
+
>
|
|
7614
|
+
<kendo-textarea-prefix>
|
|
7615
|
+
@if (promptCommands && promptCommands.length > 0) {
|
|
7616
|
+
<button
|
|
7617
|
+
kendoButton
|
|
7618
|
+
#commandMenuButton
|
|
7619
|
+
[attr.title]="messageFor('commandsButtonTitle')"
|
|
7620
|
+
fillMode="flat"
|
|
7621
|
+
icon="menu"
|
|
7622
|
+
[svgIcon]="commandMenuIcon"
|
|
7623
|
+
(click)="onCommandButtonClick($event)"
|
|
7624
|
+
></button>
|
|
7625
|
+
}
|
|
7626
|
+
@if (enableSpeechToText) {
|
|
7627
|
+
<button
|
|
7628
|
+
kendoSpeechToTextButton
|
|
7629
|
+
[attr.title]="messageFor('speechToTextButtonTitle')"
|
|
7630
|
+
fillMode="flat"
|
|
7631
|
+
(result)="handleSpeechResult($event)"
|
|
7632
|
+
(start)="isListening = true"
|
|
7633
|
+
(end)="isListening = false"
|
|
7634
|
+
></button>
|
|
7635
|
+
}
|
|
7636
|
+
</kendo-textarea-prefix>
|
|
7637
|
+
<kendo-textarea-suffix>
|
|
7638
|
+
<button
|
|
7639
|
+
kendoButton
|
|
7640
|
+
[attr.title]="messageFor('generateButtonTitle')"
|
|
7641
|
+
fillMode="flat"
|
|
7642
|
+
class="k-prompt-send"
|
|
7643
|
+
[ngClass]="{ 'k-generating': streaming, 'k-active': streaming }"
|
|
7644
|
+
(click)="handlePromptRequest()"
|
|
7645
|
+
[disabled]="!streaming && (!promptValue?.trim() || isListening)"
|
|
7646
|
+
[svgIcon]="streaming ? stopGenerationIcon : sendIcon"
|
|
7647
|
+
[icon]="streaming ? 'stop-sm' : 'paper-plane'"
|
|
7648
|
+
></button>
|
|
7649
|
+
</kendo-textarea-suffix>
|
|
7650
|
+
</kendo-textarea>
|
|
7651
|
+
</div>
|
|
7440
7652
|
</div>
|
|
7441
7653
|
<kendo-contextmenu
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7654
|
+
#kendoContextMenu
|
|
7655
|
+
[alignToAnchor]="true"
|
|
7656
|
+
[items]="commandMenuItems"
|
|
7657
|
+
[appendTo]="appendTo"
|
|
7658
|
+
class="k-hidden"
|
|
7659
|
+
(select)="onCommandClick($event)">
|
|
7448
7660
|
</kendo-contextmenu>
|
|
7449
|
-
|
|
7661
|
+
`,
|
|
7450
7662
|
standalone: true,
|
|
7451
|
-
imports: [NgClass,
|
|
7663
|
+
imports: [NgClass, NgTemplateOutlet, LocalizedMessagesDirective, KENDO_BUTTONS, KENDO_TEXTAREA, KENDO_CONTEXTMENU, KENDO_CARD],
|
|
7452
7664
|
}]
|
|
7453
7665
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.LocalizationService, decorators: [{
|
|
7454
7666
|
type: Optional
|