@progress/kendo-angular-conversational-ui 21.1.1-develop.2 → 21.2.0-develop.10

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.
Files changed (27) hide show
  1. package/chat/chat.component.d.ts +2 -0
  2. package/chat/message-list.component.d.ts +2 -2
  3. package/codemods/utils.js +805 -394
  4. package/codemods/v20/chat-user.js +9 -12
  5. package/codemods/v21/chat-messagetoolbarvisibility.js +9 -13
  6. package/codemods/v21/chat-pinnedbyfield.js +1 -2
  7. package/esm2022/ai-prompt/aiprompt.component.mjs +155 -139
  8. package/esm2022/ai-prompt/common/output-card.component.mjs +81 -83
  9. package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +2 -2
  10. package/esm2022/ai-prompt/views/output-view.component.mjs +27 -29
  11. package/esm2022/ai-prompt/views/prompt-view.component.mjs +150 -135
  12. package/esm2022/chat/attachment.component.mjs +53 -37
  13. package/esm2022/chat/cards/hero-card.component.mjs +48 -35
  14. package/esm2022/chat/chat-file.component.mjs +32 -29
  15. package/esm2022/chat/chat-view.mjs +2 -2
  16. package/esm2022/chat/chat.component.mjs +259 -242
  17. package/esm2022/chat/message-attachments.component.mjs +60 -55
  18. package/esm2022/chat/message-box.component.mjs +203 -183
  19. package/esm2022/chat/message-list.component.mjs +249 -209
  20. package/esm2022/chat/message-reference-content.component.mjs +30 -19
  21. package/esm2022/chat/message.component.mjs +301 -281
  22. package/esm2022/chat/suggested-actions.component.mjs +142 -134
  23. package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +205 -179
  24. package/esm2022/package-metadata.mjs +2 -2
  25. package/fesm2022/progress-kendo-angular-conversational-ui.mjs +1988 -1777
  26. package/package.json +14 -14
  27. package/codemods/template-transformer/index.js +0 -93
@@ -10,7 +10,6 @@ import { IconWrapperComponent } from '@progress/kendo-angular-icons';
10
10
  import { moreVerticalIcon, xIcon } from '@progress/kendo-svg-icons';
11
11
  import { ButtonComponent, DropDownButtonComponent } from '@progress/kendo-angular-buttons';
12
12
  import { LocalizationService } from '@progress/kendo-angular-l10n';
13
- import { NgIf } from '@angular/common';
14
13
  import * as i0 from "@angular/core";
15
14
  import * as i1 from "@progress/kendo-angular-l10n";
16
15
  /**
@@ -45,30 +44,31 @@ export class ChatFileComponent extends ChatItem {
45
44
  }
46
45
  focus() { }
47
46
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
48
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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: [{
47
+ 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: [{
49
48
  provide: ChatItem,
50
49
  useExisting: forwardRef(() => ChatFileComponent)
51
50
  }], usesInheritance: true, ngImport: i0, template: `
52
51
  <kendo-icon-wrapper
53
- size="xlarge"
54
- [name]="fileGroupClass(chatFile.extension)"
55
- [svgIcon]="fileThumbnail(chatFile.extension)"
56
- >
52
+ size="xlarge"
53
+ [name]="fileGroupClass(chatFile.extension)"
54
+ [svgIcon]="fileThumbnail(chatFile.extension)"
55
+ >
57
56
  </kendo-icon-wrapper>
58
57
  <div class="k-chat-file-info">
59
- <span class="k-chat-file-name">{{chatFile.name}}</span>
60
- <span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
58
+ <span class="k-chat-file-name">{{chatFile.name}}</span>
59
+ <span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
61
60
  </div>
62
- <button
61
+ @if (removable) {
62
+ <button
63
63
  kendoButton
64
- *ngIf="removable"
65
64
  [attr.title]="textFor('removeFileTitle')"
66
65
  [svgIcon]="deleteIcon"
67
66
  (click)="remove.emit(chatFile)"
68
67
  fillMode="flat"
69
- ></button>
70
- <kendo-dropdownbutton
71
- *ngIf="fileActions && fileActions.length > 0"
68
+ ></button>
69
+ }
70
+ @if (fileActions && fileActions.length > 0) {
71
+ <kendo-dropdownbutton
72
72
  [data]="fileActions"
73
73
  [attr.title]="textFor('fileActionsTitle')"
74
74
  fillMode="flat"
@@ -78,8 +78,9 @@ export class ChatFileComponent extends ChatItem {
78
78
  (click)="$event.preventDefault()"
79
79
  (open)="actionsToggle.emit(true)"
80
80
  (close)="actionsToggle.emit(false)"
81
- ></kendo-dropdownbutton>
82
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
81
+ ></kendo-dropdownbutton>
82
+ }
83
+ `, 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"] }] });
83
84
  }
84
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, decorators: [{
85
86
  type: Component,
@@ -91,25 +92,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
91
92
  }],
92
93
  template: `
93
94
  <kendo-icon-wrapper
94
- size="xlarge"
95
- [name]="fileGroupClass(chatFile.extension)"
96
- [svgIcon]="fileThumbnail(chatFile.extension)"
97
- >
95
+ size="xlarge"
96
+ [name]="fileGroupClass(chatFile.extension)"
97
+ [svgIcon]="fileThumbnail(chatFile.extension)"
98
+ >
98
99
  </kendo-icon-wrapper>
99
100
  <div class="k-chat-file-info">
100
- <span class="k-chat-file-name">{{chatFile.name}}</span>
101
- <span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
101
+ <span class="k-chat-file-name">{{chatFile.name}}</span>
102
+ <span class="k-chat-file-size">{{getTotalFilesSizeMessage(chatFile)}}</span>
102
103
  </div>
103
- <button
104
+ @if (removable) {
105
+ <button
104
106
  kendoButton
105
- *ngIf="removable"
106
107
  [attr.title]="textFor('removeFileTitle')"
107
108
  [svgIcon]="deleteIcon"
108
109
  (click)="remove.emit(chatFile)"
109
110
  fillMode="flat"
110
- ></button>
111
- <kendo-dropdownbutton
112
- *ngIf="fileActions && fileActions.length > 0"
111
+ ></button>
112
+ }
113
+ @if (fileActions && fileActions.length > 0) {
114
+ <kendo-dropdownbutton
113
115
  [data]="fileActions"
114
116
  [attr.title]="textFor('fileActionsTitle')"
115
117
  fillMode="flat"
@@ -119,10 +121,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
119
121
  (click)="$event.preventDefault()"
120
122
  (open)="actionsToggle.emit(true)"
121
123
  (close)="actionsToggle.emit(false)"
122
- ></kendo-dropdownbutton>
123
- `,
124
+ ></kendo-dropdownbutton>
125
+ }
126
+ `,
124
127
  standalone: true,
125
- imports: [NgIf, IconWrapperComponent, ButtonComponent, DropDownButtonComponent]
128
+ imports: [IconWrapperComponent, ButtonComponent, DropDownButtonComponent]
126
129
  }]
127
130
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { chatFile: [{
128
131
  type: Input
@@ -61,7 +61,7 @@ const groupItems = (total) => (acc, msg, index) => {
61
61
  attachments: msg.attachments,
62
62
  attachmentLayout: msg.attachmentLayout,
63
63
  timestamp: msg.timestamp,
64
- trackBy: msg
64
+ trackBy: 'attachment-group' + msg.id
65
65
  });
66
66
  }
67
67
  if (msg.suggestedActions && isLastMessage) {
@@ -69,7 +69,7 @@ const groupItems = (total) => (acc, msg, index) => {
69
69
  type: 'action-group',
70
70
  actions: msg.suggestedActions,
71
71
  timestamp: msg.timestamp,
72
- trackBy: msg
72
+ trackBy: 'action-group' + msg.id
73
73
  });
74
74
  }
75
75
  return acc;