@progress/kendo-angular-conversational-ui 21.0.0-develop.17 → 21.0.0-develop.19

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.
@@ -18,3 +18,4 @@ export * from './file-download-event.interface';
18
18
  export * from './send-button-settings';
19
19
  export * from './files-layout';
20
20
  export * from './suggestions-layout';
21
+ export * from './timestamp-visibility';
@@ -30,4 +30,12 @@ export interface MessageSettings {
30
30
  * Sets the mode that will be used to determine the message width.
31
31
  */
32
32
  messageWidthMode?: MessageWidthMode;
33
+ /**
34
+ * Sets the visibility of the author's avatar for the message group.
35
+ */
36
+ showAvatar?: boolean;
37
+ /**
38
+ * Sets the visibility of the author's username for the message group.
39
+ */
40
+ showUsername?: boolean;
33
41
  }
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Defines the possible modes for message width in the chat component.
6
+ * Defines the possible modes for message width in the Chat component.
7
7
  * - `full`: The message takes the full width of the chat container.
8
8
  * - `standard`: (Default) The message width is standard, allowing for a more compact layout.
9
9
  */
@@ -0,0 +1,10 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Defines the possible modes for timestamp visibility in the Chat component.
7
+ * - `focus`: Timestamps are only visible for selected/focused messages (default Chat behavior).
8
+ * - `hidden`: Timestamps are hidden for all messages.
9
+ */
10
+ export type TimestampVisibilityMode = 'focus' | 'hidden';
@@ -25,6 +25,7 @@ import { ContextMenuComponent, ContextMenuPopupEvent } from '@progress/kendo-ang
25
25
  import { NoDataTemplateDirective, MessageTemplateDirective, AuthorMessageContentTemplateDirective, ReceiverMessageContentTemplateDirective, ReceiverMessageTemplateDirective, AuthorMessageTemplateDirective, MessageContentTemplateDirective } from './chat.directives';
26
26
  import { ChatUserStatusTemplateDirective } from './templates/user-status-template.directive';
27
27
  import { QuickActionsLayoutMode, SuggestionsLayoutMode } from './api/suggestions-layout';
28
+ import { TimestampVisibilityMode } from './api/timestamp-visibility';
28
29
  import * as i0 from "@angular/core";
29
30
  /**
30
31
  * Represents the [Kendo UI Chat component for Angular](slug:overview_convui).
@@ -91,6 +92,24 @@ export declare class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
91
92
  * @default 'standard'
92
93
  */
93
94
  messageWidthMode: MessageWidthMode;
95
+ /**
96
+ * Controls the visibility of timestamps in messages.
97
+ *
98
+ * @default 'focus'
99
+ */
100
+ timestampVisibility: TimestampVisibilityMode;
101
+ /**
102
+ * Controls the visibility of the author's avatar for the message group.
103
+ *
104
+ * @default true
105
+ */
106
+ showUsername: boolean;
107
+ /**
108
+ * Controls the visibility of the author's username for the message group.
109
+ *
110
+ * @default true
111
+ */
112
+ showAvatar: boolean;
94
113
  /**
95
114
  * Enables the expand or collapse functionality for messages.
96
115
  *
@@ -352,5 +371,5 @@ export declare class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
352
371
  private updateChatServiceProperties;
353
372
  private mergeWithDefaultActions;
354
373
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
355
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": { "alias": "messages"; "required": false; }; "authorId": { "alias": "authorId"; "required": false; }; "messageBoxType": { "alias": "messageBoxType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageWidthMode": { "alias": "messageWidthMode"; "required": false; }; "allowMessageCollapse": { "alias": "allowMessageCollapse"; "required": false; }; "enableSpeechToText": { "alias": "enableSpeechToText"; "required": false; }; "enableFileSelect": { "alias": "enableFileSelect"; "required": false; }; "messageToolbarActions": { "alias": "messageToolbarActions"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "authorMessageSettings": { "alias": "authorMessageSettings"; "required": false; }; "receiverMessageSettings": { "alias": "receiverMessageSettings"; "required": false; }; "messageContextMenuActions": { "alias": "messageContextMenuActions"; "required": false; }; "fileActions": { "alias": "fileActions"; "required": false; }; "messageFilesLayout": { "alias": "messageFilesLayout"; "required": false; }; "suggestionsLayout": { "alias": "suggestionsLayout"; "required": false; }; "quickActionsLayout": { "alias": "quickActionsLayout"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "sendButtonSettings": { "alias": "sendButtonSettings"; "required": false; }; "modelFields": { "alias": "modelFields"; "required": false; }; }, { "sendMessage": "sendMessage"; "toolbarActionClick": "toolbarActionClick"; "contextMenuActionClick": "contextMenuActionClick"; "fileActionClick": "fileActionClick"; "download": "download"; "executeAction": "executeAction"; "suggestionExecute": "suggestionExecute"; "fileSelect": "fileSelect"; "fileRemove": "fileRemove"; "unpin": "unpin"; "inputValueChange": "inputValueChange"; }, ["attachmentTemplate", "chatHeaderTemplate", "chatNoDataTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "suggestionTemplate", "statusTemplate", "messageBoxTemplate", "userStatusTemplate"], never, true, never>;
374
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": { "alias": "messages"; "required": false; }; "authorId": { "alias": "authorId"; "required": false; }; "messageBoxType": { "alias": "messageBoxType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageWidthMode": { "alias": "messageWidthMode"; "required": false; }; "timestampVisibility": { "alias": "timestampVisibility"; "required": false; }; "showUsername": { "alias": "showUsername"; "required": false; }; "showAvatar": { "alias": "showAvatar"; "required": false; }; "allowMessageCollapse": { "alias": "allowMessageCollapse"; "required": false; }; "enableSpeechToText": { "alias": "enableSpeechToText"; "required": false; }; "enableFileSelect": { "alias": "enableFileSelect"; "required": false; }; "messageToolbarActions": { "alias": "messageToolbarActions"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "authorMessageSettings": { "alias": "authorMessageSettings"; "required": false; }; "receiverMessageSettings": { "alias": "receiverMessageSettings"; "required": false; }; "messageContextMenuActions": { "alias": "messageContextMenuActions"; "required": false; }; "fileActions": { "alias": "fileActions"; "required": false; }; "messageFilesLayout": { "alias": "messageFilesLayout"; "required": false; }; "suggestionsLayout": { "alias": "suggestionsLayout"; "required": false; }; "quickActionsLayout": { "alias": "quickActionsLayout"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "sendButtonSettings": { "alias": "sendButtonSettings"; "required": false; }; "modelFields": { "alias": "modelFields"; "required": false; }; }, { "sendMessage": "sendMessage"; "toolbarActionClick": "toolbarActionClick"; "contextMenuActionClick": "contextMenuActionClick"; "fileActionClick": "fileActionClick"; "download": "download"; "executeAction": "executeAction"; "suggestionExecute": "suggestionExecute"; "fileSelect": "fileSelect"; "fileRemove": "fileRemove"; "unpin": "unpin"; "inputValueChange": "inputValueChange"; }, ["attachmentTemplate", "chatHeaderTemplate", "chatNoDataTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "suggestionTemplate", "statusTemplate", "messageBoxTemplate", "userStatusTemplate"], never, true, never>;
356
375
  }
@@ -8,6 +8,7 @@ import { MessageWidthMode } from '../api/message-width-mode';
8
8
  import { FileAction, FileActionEvent, FileDownloadEvent, FilesLayoutMode, Message, MessageAction, MessageActionEvent, MessageSettings, QuickActionsLayoutMode, SendButtonSettings, SuggestionsLayoutMode } from '../api';
9
9
  import { FileSelectSettings } from '@progress/kendo-angular-upload';
10
10
  import { ContextMenuComponent } from '@progress/kendo-angular-menu';
11
+ import { TimestampVisibilityMode } from '../api/timestamp-visibility';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * @hidden
@@ -30,6 +31,9 @@ export declare class ChatService {
30
31
  selectOnMenuClose: boolean;
31
32
  active: boolean;
32
33
  messageFilesLayout: FilesLayoutMode;
34
+ timestampVisibility: TimestampVisibilityMode;
35
+ showUsername: boolean;
36
+ showAvatar: boolean;
33
37
  private _enableSpeechToText;
34
38
  private _enableFileSelect;
35
39
  private _sendButtonSettings;
@@ -59,6 +59,8 @@ export declare class MessageListComponent implements OnInit, AfterViewInit, OnDe
59
59
  ngOnDestroy(): void;
60
60
  onResize(): void;
61
61
  onClick(message: any, event: any): void;
62
+ showGroupAuthor(group: any): boolean;
63
+ showGroupAvatar(group: any): boolean;
62
64
  onContextMenuClick(message: Message, event: MouseEvent, messageElement?: any): void;
63
65
  formatTimeStamp(date: any): string;
64
66
  calculateMessageWidthMode(message: any): boolean;
@@ -18,3 +18,4 @@ export * from './file-download-event.interface';
18
18
  export * from './send-button-settings';
19
19
  export * from './files-layout';
20
20
  export * from './suggestions-layout';
21
+ export * from './timestamp-visibility';
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -101,6 +101,24 @@ export class ChatComponent {
101
101
  * @default 'standard'
102
102
  */
103
103
  messageWidthMode = 'standard';
104
+ /**
105
+ * Controls the visibility of timestamps in messages.
106
+ *
107
+ * @default 'focus'
108
+ */
109
+ timestampVisibility = 'focus';
110
+ /**
111
+ * Controls the visibility of the author's avatar for the message group.
112
+ *
113
+ * @default true
114
+ */
115
+ showUsername = true;
116
+ /**
117
+ * Controls the visibility of the author's username for the message group.
118
+ *
119
+ * @default true
120
+ */
121
+ showAvatar = true;
104
122
  /**
105
123
  * Enables the expand or collapse functionality for messages.
106
124
  *
@@ -379,6 +397,9 @@ export class ChatComponent {
379
397
  */
380
398
  ngOnInit() {
381
399
  this.chatService.messageWidthMode = this.messageWidthMode;
400
+ this.chatService.timestampVisibility = this.timestampVisibility;
401
+ this.chatService.showUsername = this.showUsername;
402
+ this.chatService.showAvatar = this.showAvatar;
382
403
  this.chatService.allowMessageCollapse = this.allowMessageCollapse;
383
404
  this.chatService.enableSpeechToText = this.enableSpeechToText;
384
405
  this.chatService.sendButtonSettings = this.sendButtonSettings;
@@ -428,6 +449,9 @@ export class ChatComponent {
428
449
  this.updateChatServiceProperties([
429
450
  'authorId',
430
451
  'messageWidthMode',
452
+ 'timestampVisibility',
453
+ 'showUsername',
454
+ 'showAvatar',
431
455
  'allowMessageCollapse',
432
456
  'enableSpeechToText',
433
457
  'sendButtonSettings',
@@ -545,7 +569,7 @@ export class ChatComponent {
545
569
  });
546
570
  }
547
571
  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: i2.ChatService }], target: i0.ɵɵFactoryTarget.Component });
548
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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", 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: [
572
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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: [
549
573
  LocalizationService,
550
574
  ChatService,
551
575
  SuggestionsScrollService,
@@ -854,6 +878,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
854
878
  type: Input
855
879
  }], messageWidthMode: [{
856
880
  type: Input
881
+ }], timestampVisibility: [{
882
+ type: Input
883
+ }], showUsername: [{
884
+ type: Input
885
+ }], showAvatar: [{
886
+ type: Input
857
887
  }], allowMessageCollapse: [{
858
888
  type: Input
859
889
  }], enableSpeechToText: [{
@@ -27,6 +27,9 @@ export class ChatService {
27
27
  selectOnMenuClose = false;
28
28
  active = false;
29
29
  messageFilesLayout = 'vertical';
30
+ timestampVisibility = 'focus';
31
+ showUsername = true;
32
+ showAvatar = true;
30
33
  _enableSpeechToText = STB_DEFAULT_SETTINGS;
31
34
  _enableFileSelect = FILESELECT_DEFAULT_SETTINGS;
32
35
  _sendButtonSettings = SEND_BTN_DEFAULT_SETTINGS;
@@ -7,7 +7,7 @@
7
7
  import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Input, Output, QueryList, Renderer2, ViewChildren } from '@angular/core';
8
8
  import { NgFor, NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet } from '@angular/common';
9
9
  import { ExecuteActionEvent } from './api';
10
- import { Keys, normalizeNumpadKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
10
+ import { isPresent, Keys, normalizeNumpadKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
11
11
  import { IntlService } from '@progress/kendo-angular-intl';
12
12
  import { LocalizationService } from '@progress/kendo-angular-l10n';
13
13
  import { closest, DOWNLOAD_ALL_SELECTOR, FILE_ACTION_BTN_SELECTOR } from './common/utils';
@@ -121,6 +121,20 @@ export class MessageListComponent {
121
121
  onClick(message, event) {
122
122
  this.select(message, event);
123
123
  }
124
+ showGroupAuthor(group) {
125
+ const messageSettings = this.isOwnMessage(group.messages[0]) ? this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
126
+ if (isPresent(messageSettings?.showUsername)) {
127
+ return messageSettings.showUsername && group.author.name;
128
+ }
129
+ return this.chatService.showUsername && group.author.name;
130
+ }
131
+ showGroupAvatar(group) {
132
+ const messageSettings = this.isOwnMessage(group.messages[0]) ? this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
133
+ if (isPresent(messageSettings?.showAvatar)) {
134
+ return messageSettings.showAvatar && group.author.avatarUrl;
135
+ }
136
+ return this.chatService.showAvatar && group.author.avatarUrl;
137
+ }
124
138
  onContextMenuClick(message, event, messageElement) {
125
139
  this.chatService.calculateContextMenuActions(this.isOwnMessage(message));
126
140
  if (this.chatService.calculatedContextMenuActions.length > 0) {
@@ -316,11 +330,11 @@ export class MessageListComponent {
316
330
  class="k-message-group"
317
331
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
318
332
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
319
- [class.k-no-avatar]="!group.author.avatarUrl"
333
+ [class.k-no-avatar]="!showGroupAvatar(group)"
320
334
  [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
321
335
  >
322
336
  <div
323
- *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
337
+ *ngIf="!userStatusTemplate?.templateRef && showGroupAvatar(group)"
324
338
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
325
339
  >
326
340
  <span class="k-avatar-image">
@@ -330,7 +344,7 @@ export class MessageListComponent {
330
344
  />
331
345
  </span>
332
346
  </div>
333
- <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
347
+ <div class="k-chat-user-status-wrapper" *ngIf="userStatusTemplate?.templateRef && showGroupAvatar(group)">
334
348
  <div
335
349
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
336
350
  >
@@ -350,18 +364,10 @@ export class MessageListComponent {
350
364
  </div>
351
365
  </div>
352
366
  <div class="k-message-group-content">
353
- <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
367
+ <p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
354
368
  <ng-container
355
369
  *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
356
370
  >
357
- <div
358
- *ngIf="msg.user?.avatarUrl"
359
- class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
360
- >
361
- <span class="k-avatar-image">
362
- <img [src]="msg.user?.avatarUrl">
363
- </span>
364
- </div>
365
371
  <kendo-chat-message #message
366
372
  [message]="msg"
367
373
  [tabbable]="lastGroup && lastMessage"
@@ -438,11 +444,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
438
444
  class="k-message-group"
439
445
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
440
446
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
441
- [class.k-no-avatar]="!group.author.avatarUrl"
447
+ [class.k-no-avatar]="!showGroupAvatar(group)"
442
448
  [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
443
449
  >
444
450
  <div
445
- *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
451
+ *ngIf="!userStatusTemplate?.templateRef && showGroupAvatar(group)"
446
452
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
447
453
  >
448
454
  <span class="k-avatar-image">
@@ -452,7 +458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
452
458
  />
453
459
  </span>
454
460
  </div>
455
- <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
461
+ <div class="k-chat-user-status-wrapper" *ngIf="userStatusTemplate?.templateRef && showGroupAvatar(group)">
456
462
  <div
457
463
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
458
464
  >
@@ -472,18 +478,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
472
478
  </div>
473
479
  </div>
474
480
  <div class="k-message-group-content">
475
- <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
481
+ <p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
476
482
  <ng-container
477
483
  *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
478
484
  >
479
- <div
480
- *ngIf="msg.user?.avatarUrl"
481
- class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
482
- >
483
- <span class="k-avatar-image">
484
- <img [src]="msg.user?.avatarUrl">
485
- </span>
486
- </div>
487
485
  <kendo-chat-message #message
488
486
  [message]="msg"
489
487
  [tabbable]="lastGroup && lastMessage"
@@ -344,7 +344,7 @@ export class MessageComponent extends ChatItem {
344
344
  <time
345
345
  [attr.aria-hidden]="!selected"
346
346
  class="k-message-time"
347
- *ngIf="message.timestamp"
347
+ *ngIf="chatService.timestampVisibility === 'focus' && message.timestamp"
348
348
  >
349
349
  {{ formatTimeStamp(message.timestamp) }}
350
350
  </time>
@@ -522,7 +522,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
522
522
  <time
523
523
  [attr.aria-hidden]="!selected"
524
524
  class="k-message-time"
525
- *ngIf="message.timestamp"
525
+ *ngIf="chatService.timestampVisibility === 'focus' && message.timestamp"
526
526
  >
527
527
  {{ formatTimeStamp(message.timestamp) }}
528
528
  </time>
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1762256450,
14
- version: '21.0.0-develop.17',
13
+ publishDate: 1762329257,
14
+ version: '21.0.0-develop.19',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -216,8 +216,8 @@ const packageMetadata = {
216
216
  productName: 'Kendo UI for Angular',
217
217
  productCode: 'KENDOUIANGULAR',
218
218
  productCodes: ['KENDOUIANGULAR'],
219
- publishDate: 1762256450,
220
- version: '21.0.0-develop.17',
219
+ publishDate: 1762329257,
220
+ version: '21.0.0-develop.19',
221
221
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
222
222
  };
223
223
 
@@ -2131,6 +2131,9 @@ class ChatService {
2131
2131
  selectOnMenuClose = false;
2132
2132
  active = false;
2133
2133
  messageFilesLayout = 'vertical';
2134
+ timestampVisibility = 'focus';
2135
+ showUsername = true;
2136
+ showAvatar = true;
2134
2137
  _enableSpeechToText = STB_DEFAULT_SETTINGS;
2135
2138
  _enableFileSelect = FILESELECT_DEFAULT_SETTINGS;
2136
2139
  _sendButtonSettings = SEND_BTN_DEFAULT_SETTINGS;
@@ -4214,7 +4217,7 @@ class MessageComponent extends ChatItem {
4214
4217
  <time
4215
4218
  [attr.aria-hidden]="!selected"
4216
4219
  class="k-message-time"
4217
- *ngIf="message.timestamp"
4220
+ *ngIf="chatService.timestampVisibility === 'focus' && message.timestamp"
4218
4221
  >
4219
4222
  {{ formatTimeStamp(message.timestamp) }}
4220
4223
  </time>
@@ -4392,7 +4395,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
4392
4395
  <time
4393
4396
  [attr.aria-hidden]="!selected"
4394
4397
  class="k-message-time"
4395
- *ngIf="message.timestamp"
4398
+ *ngIf="chatService.timestampVisibility === 'focus' && message.timestamp"
4396
4399
  >
4397
4400
  {{ formatTimeStamp(message.timestamp) }}
4398
4401
  </time>
@@ -5032,6 +5035,20 @@ class MessageListComponent {
5032
5035
  onClick(message, event) {
5033
5036
  this.select(message, event);
5034
5037
  }
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
+ }
5035
5052
  onContextMenuClick(message, event, messageElement) {
5036
5053
  this.chatService.calculateContextMenuActions(this.isOwnMessage(message));
5037
5054
  if (this.chatService.calculatedContextMenuActions.length > 0) {
@@ -5227,11 +5244,11 @@ class MessageListComponent {
5227
5244
  class="k-message-group"
5228
5245
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
5229
5246
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
5230
- [class.k-no-avatar]="!group.author.avatarUrl"
5247
+ [class.k-no-avatar]="!showGroupAvatar(group)"
5231
5248
  [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
5232
5249
  >
5233
5250
  <div
5234
- *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
5251
+ *ngIf="!userStatusTemplate?.templateRef && showGroupAvatar(group)"
5235
5252
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5236
5253
  >
5237
5254
  <span class="k-avatar-image">
@@ -5241,7 +5258,7 @@ class MessageListComponent {
5241
5258
  />
5242
5259
  </span>
5243
5260
  </div>
5244
- <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
5261
+ <div class="k-chat-user-status-wrapper" *ngIf="userStatusTemplate?.templateRef && showGroupAvatar(group)">
5245
5262
  <div
5246
5263
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5247
5264
  >
@@ -5261,18 +5278,10 @@ class MessageListComponent {
5261
5278
  </div>
5262
5279
  </div>
5263
5280
  <div class="k-message-group-content">
5264
- <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
5281
+ <p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
5265
5282
  <ng-container
5266
5283
  *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
5267
5284
  >
5268
- <div
5269
- *ngIf="msg.user?.avatarUrl"
5270
- class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5271
- >
5272
- <span class="k-avatar-image">
5273
- <img [src]="msg.user?.avatarUrl">
5274
- </span>
5275
- </div>
5276
5285
  <kendo-chat-message #message
5277
5286
  [message]="msg"
5278
5287
  [tabbable]="lastGroup && lastMessage"
@@ -5349,11 +5358,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5349
5358
  class="k-message-group"
5350
5359
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
5351
5360
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
5352
- [class.k-no-avatar]="!group.author.avatarUrl"
5361
+ [class.k-no-avatar]="!showGroupAvatar(group)"
5353
5362
  [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
5354
5363
  >
5355
5364
  <div
5356
- *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
5365
+ *ngIf="!userStatusTemplate?.templateRef && showGroupAvatar(group)"
5357
5366
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5358
5367
  >
5359
5368
  <span class="k-avatar-image">
@@ -5363,7 +5372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5363
5372
  />
5364
5373
  </span>
5365
5374
  </div>
5366
- <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
5375
+ <div class="k-chat-user-status-wrapper" *ngIf="userStatusTemplate?.templateRef && showGroupAvatar(group)">
5367
5376
  <div
5368
5377
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5369
5378
  >
@@ -5383,18 +5392,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
5383
5392
  </div>
5384
5393
  </div>
5385
5394
  <div class="k-message-group-content">
5386
- <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
5395
+ <p *ngIf="showGroupAuthor(group)" class="k-message-author">{{ group.author.name }}</p>
5387
5396
  <ng-container
5388
5397
  *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"
5389
5398
  >
5390
- <div
5391
- *ngIf="msg.user?.avatarUrl"
5392
- class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5393
- >
5394
- <span class="k-avatar-image">
5395
- <img [src]="msg.user?.avatarUrl">
5396
- </span>
5397
- </div>
5398
5399
  <kendo-chat-message #message
5399
5400
  [message]="msg"
5400
5401
  [tabbable]="lastGroup && lastMessage"
@@ -5846,6 +5847,24 @@ class ChatComponent {
5846
5847
  * @default 'standard'
5847
5848
  */
5848
5849
  messageWidthMode = 'standard';
5850
+ /**
5851
+ * Controls the visibility of timestamps in messages.
5852
+ *
5853
+ * @default 'focus'
5854
+ */
5855
+ timestampVisibility = 'focus';
5856
+ /**
5857
+ * Controls the visibility of the author's avatar for the message group.
5858
+ *
5859
+ * @default true
5860
+ */
5861
+ showUsername = true;
5862
+ /**
5863
+ * Controls the visibility of the author's username for the message group.
5864
+ *
5865
+ * @default true
5866
+ */
5867
+ showAvatar = true;
5849
5868
  /**
5850
5869
  * Enables the expand or collapse functionality for messages.
5851
5870
  *
@@ -6124,6 +6143,9 @@ class ChatComponent {
6124
6143
  */
6125
6144
  ngOnInit() {
6126
6145
  this.chatService.messageWidthMode = this.messageWidthMode;
6146
+ this.chatService.timestampVisibility = this.timestampVisibility;
6147
+ this.chatService.showUsername = this.showUsername;
6148
+ this.chatService.showAvatar = this.showAvatar;
6127
6149
  this.chatService.allowMessageCollapse = this.allowMessageCollapse;
6128
6150
  this.chatService.enableSpeechToText = this.enableSpeechToText;
6129
6151
  this.chatService.sendButtonSettings = this.sendButtonSettings;
@@ -6173,6 +6195,9 @@ class ChatComponent {
6173
6195
  this.updateChatServiceProperties([
6174
6196
  'authorId',
6175
6197
  'messageWidthMode',
6198
+ 'timestampVisibility',
6199
+ 'showUsername',
6200
+ 'showAvatar',
6176
6201
  'allowMessageCollapse',
6177
6202
  'enableSpeechToText',
6178
6203
  'sendButtonSettings',
@@ -6290,7 +6315,7 @@ class ChatComponent {
6290
6315
  });
6291
6316
  }
6292
6317
  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 });
6293
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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", 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: [
6318
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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: [
6294
6319
  LocalizationService,
6295
6320
  ChatService,
6296
6321
  SuggestionsScrollService,
@@ -6599,6 +6624,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
6599
6624
  type: Input
6600
6625
  }], messageWidthMode: [{
6601
6626
  type: Input
6627
+ }], timestampVisibility: [{
6628
+ type: Input
6629
+ }], showUsername: [{
6630
+ type: Input
6631
+ }], showAvatar: [{
6632
+ type: Input
6602
6633
  }], allowMessageCollapse: [{
6603
6634
  type: Input
6604
6635
  }], enableSpeechToText: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-conversational-ui",
3
- "version": "21.0.0-develop.17",
3
+ "version": "21.0.0-develop.19",
4
4
  "description": "Kendo UI for Angular Conversational UI components",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -47,7 +47,7 @@
47
47
  "package": {
48
48
  "productName": "Kendo UI for Angular",
49
49
  "productCode": "KENDOUIANGULAR",
50
- "publishDate": 1762256450,
50
+ "publishDate": 1762329257,
51
51
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
52
52
  }
53
53
  },
@@ -57,22 +57,22 @@
57
57
  "@angular/core": "18 - 20",
58
58
  "@angular/platform-browser": "18 - 20",
59
59
  "@progress/kendo-licensing": "^1.7.0",
60
- "@progress/kendo-angular-buttons": "21.0.0-develop.17",
61
- "@progress/kendo-angular-inputs": "21.0.0-develop.17",
62
- "@progress/kendo-angular-layout": "21.0.0-develop.17",
63
- "@progress/kendo-angular-icons": "21.0.0-develop.17",
64
- "@progress/kendo-angular-common": "21.0.0-develop.17",
65
- "@progress/kendo-angular-intl": "21.0.0-develop.17",
66
- "@progress/kendo-angular-l10n": "21.0.0-develop.17",
67
- "@progress/kendo-angular-menu": "21.0.0-develop.17",
68
- "@progress/kendo-angular-popup": "21.0.0-develop.17",
69
- "@progress/kendo-angular-toolbar": "21.0.0-develop.17",
70
- "@progress/kendo-angular-upload": "21.0.0-develop.17",
60
+ "@progress/kendo-angular-buttons": "21.0.0-develop.19",
61
+ "@progress/kendo-angular-inputs": "21.0.0-develop.19",
62
+ "@progress/kendo-angular-layout": "21.0.0-develop.19",
63
+ "@progress/kendo-angular-icons": "21.0.0-develop.19",
64
+ "@progress/kendo-angular-common": "21.0.0-develop.19",
65
+ "@progress/kendo-angular-intl": "21.0.0-develop.19",
66
+ "@progress/kendo-angular-l10n": "21.0.0-develop.19",
67
+ "@progress/kendo-angular-menu": "21.0.0-develop.19",
68
+ "@progress/kendo-angular-popup": "21.0.0-develop.19",
69
+ "@progress/kendo-angular-toolbar": "21.0.0-develop.19",
70
+ "@progress/kendo-angular-upload": "21.0.0-develop.19",
71
71
  "rxjs": "^6.5.3 || ^7.0.0"
72
72
  },
73
73
  "dependencies": {
74
74
  "tslib": "^2.3.1",
75
- "@progress/kendo-angular-schematics": "21.0.0-develop.17"
75
+ "@progress/kendo-angular-schematics": "21.0.0-develop.19"
76
76
  },
77
77
  "schematics": "./schematics/collection.json",
78
78
  "module": "fesm2022/progress-kendo-angular-conversational-ui.mjs",