@progress/kendo-angular-conversational-ui 21.2.0-develop.1 → 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.
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
32
  const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameValueUpdate)(templateContent, 'kendo-chat', 'user', 'authorId', 'id'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlBoundAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-chat', 'user', 'authorId', 'id');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateBoundAttributeTransformer)(root, 'kendo-chat', 'user', 'authorId', 'id');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'ChatComponent', 'user', 'authorId', 'id');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ChatComponent', 'user', 'authorId', 'id');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,25 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
32
  const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeRemoval)(templateContent, 'kendo-chat', 'messageToolbarVisibility'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeRemoval)({ ...fileInfo, source: updatedContent }, 'kendo-chat', 'messageToolbarVisibility');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeRemoval)(root, 'kendo-chat', 'messageToolbarVisibility');
49
- });
50
- (0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, 'ChatComponent', 'messageToolbarVisibility');
51
- (0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, 'ChatComponent', 'messageToolbarVisibility');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ChatComponent', 'messageToolbarVisibility');
52
48
  return rootSource.toSource();
53
49
  }
@@ -13,7 +13,6 @@ function default_1(fileInfo, api) {
13
13
  }
14
14
  const j = api.jscodeshift;
15
15
  const rootSource = j(fileInfo.source);
16
- (0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, 'ConversationalUIModelFields', 'pinnedByField');
17
- (0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, 'ConversationalUIModelFields', 'pinnedByField');
16
+ (0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ConversationalUIModelFields', 'pinnedByField');
18
17
  return rootSource.toSource();
19
18
  }
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Directive, ElementRef, Renderer2 } from '@angular/core';
6
6
  import { ToolbarNavigationService } from './toolbar-navigation.service';
7
- import { Keys, focusableSelector, normalizeNumpadKeys } from '@progress/kendo-angular-common';
7
+ import { Keys, focusableSelector, normalizeKeys } from '@progress/kendo-angular-common';
8
8
  import * as i0 from "@angular/core";
9
9
  import * as i1 from "./toolbar-navigation.service";
10
10
  /**
@@ -38,7 +38,7 @@ export class AIPromptToolbarFocusableDirective {
38
38
  this.element.focus();
39
39
  }
40
40
  keyDownHandler = (e) => {
41
- const code = normalizeNumpadKeys(e);
41
+ const code = normalizeKeys(e);
42
42
  const targetsSelf = e.target === this.element;
43
43
  const isLeftArrow = code === Keys.ArrowLeft;
44
44
  const isRightArrow = code === Keys.ArrowRight;
@@ -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;
@@ -350,7 +350,12 @@ export class ChatComponent {
350
350
  * @hidden
351
351
  */
352
352
  get contextMenuActions() {
353
- return transformActions(this.chatService.calculatedContextMenuActions);
353
+ const currentActions = this.chatService.calculatedContextMenuActions;
354
+ if (currentActions !== this._lastContextMenuActionsReference) {
355
+ this._cachedContextMenuActions = transformActions(currentActions);
356
+ this._lastContextMenuActionsReference = currentActions;
357
+ }
358
+ return this._cachedContextMenuActions;
354
359
  }
355
360
  /**
356
361
  * @hidden
@@ -382,6 +387,8 @@ export class ChatComponent {
382
387
  _cachedProcessedMessages = [];
383
388
  _lastMessagesReference = null;
384
389
  _lastModelFields = null;
390
+ _cachedContextMenuActions = [];
391
+ _lastContextMenuActionsReference = null;
385
392
  constructor(localization, zone, renderer, element, chatService) {
386
393
  this.localization = localization;
387
394
  this.zone = zone;
@@ -6,7 +6,7 @@
6
6
  import { Component, ElementRef, forwardRef, HostBinding, Input, NgZone, QueryList, ViewChild, ViewChildren } from '@angular/core';
7
7
  import { fromEvent } from 'rxjs';
8
8
  import { debounceTime } from 'rxjs/operators';
9
- import { Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
9
+ import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
10
10
  import { chevronLeftIcon, chevronRightIcon } from '@progress/kendo-svg-icons';
11
11
  import { LocalizationService } from '@progress/kendo-angular-l10n';
12
12
  import { ButtonComponent } from '@progress/kendo-angular-buttons';
@@ -81,7 +81,7 @@ export class MessageAttachmentsComponent extends ChatItem {
81
81
  itemKeydown(e, attachment) {
82
82
  const keyHandlers = this.layout === 'list' ?
83
83
  this.listKeyHandlers : this.carouselKeyHandlers;
84
- const code = normalizeNumpadKeys(e);
84
+ const code = normalizeKeys(e);
85
85
  const handler = keyHandlers[code];
86
86
  if (handler) {
87
87
  handler(e, attachment);
@@ -7,7 +7,7 @@
7
7
  import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Input, Output, QueryList, Renderer2, ViewChildren } from '@angular/core';
8
8
  import { NgTemplateOutlet } from '@angular/common';
9
9
  import { ExecuteActionEvent } from './api';
10
- import { isPresent, Keys, normalizeNumpadKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
10
+ import { isPresent, Keys, normalizeKeys, 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';
@@ -148,7 +148,7 @@ export class MessageListComponent {
148
148
  }
149
149
  onKeydown(e) {
150
150
  // On some keyboards Numpad keys are used for Home/End/PageUp/PageDown.
151
- const code = normalizeNumpadKeys(e);
151
+ const code = normalizeKeys(e);
152
152
  const action = this.keyActions[code];
153
153
  if (action) {
154
154
  action(e);
@@ -18,7 +18,7 @@ import { isAuthor } from './chat-view';
18
18
  import { ChatFileComponent } from './chat-file.component';
19
19
  import { MessageReferenceComponent } from './message-reference-content.component';
20
20
  import { ChatStatusTemplateDirective } from './templates/status-template.directive';
21
- import { isPresent, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
21
+ import { isPresent, Keys, normalizeKeys } from '@progress/kendo-angular-common';
22
22
  import { MessageTemplateDirective } from './templates/message-template.directive';
23
23
  import { AuthorMessageContentTemplateDirective } from './templates/author-message-content-template.directive';
24
24
  import { ReceiverMessageContentTemplateDirective } from './templates/receiver-message-content-template.directive';
@@ -225,7 +225,7 @@ export class MessageComponent extends ChatItem {
225
225
  this.chatService.toggleMessageState = false;
226
226
  }
227
227
  onExpandableKeydown(event) {
228
- const key = normalizeNumpadKeys(event);
228
+ const key = normalizeKeys(event);
229
229
  const isFileActionButton = event.target.closest(FILE_ACTION_BTN_SELECTOR) || event.target.closest(DOWNLOAD_ALL_SELECTOR);
230
230
  if (!isFileActionButton && (key === Keys.Enter || key === Keys.Space)) {
231
231
  event.preventDefault();
@@ -422,12 +422,8 @@ export class MessageComponent extends ChatItem {
422
422
  @if (!message.isDeleted && parts.length > 0) {
423
423
  <span class="k-chat-bubble-text">
424
424
  @for (part of parts; track part) {
425
- @if (part.type === 'text') {
426
- {{part.content}}
427
- }
428
- @if (part.type === 'link') {
429
- <a [href]="part.href" target="_blank">{{part.content}}</a>
430
- }
425
+ @if (part.type === 'text') {{{part.content}}}
426
+ @if (part.type === 'link') {<a [href]="part.href" target="_blank">{{part.content}}</a>}
431
427
  }
432
428
  </span>
433
429
  }
@@ -614,12 +610,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
614
610
  @if (!message.isDeleted && parts.length > 0) {
615
611
  <span class="k-chat-bubble-text">
616
612
  @for (part of parts; track part) {
617
- @if (part.type === 'text') {
618
- {{part.content}}
619
- }
620
- @if (part.type === 'link') {
621
- <a [href]="part.href" target="_blank">{{part.content}}</a>
622
- }
613
+ @if (part.type === 'text') {{{part.content}}}
614
+ @if (part.type === 'link') {<a [href]="part.href" target="_blank">{{part.content}}</a>}
623
615
  }
624
616
  </span>
625
617
  }
@@ -8,7 +8,7 @@ import { Component, ElementRef, EventEmitter, forwardRef, HostBinding, Input, Ou
8
8
  import { NgTemplateOutlet } from '@angular/common';
9
9
  import { Subscription } from 'rxjs';
10
10
  import { take } from 'rxjs/operators';
11
- import { Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
11
+ import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
12
12
  import { ChatItem } from './chat-item';
13
13
  import { ChatSuggestionTemplateDirective } from './templates/suggestion-template.directive';
14
14
  import { ChatService } from './common/chat.service';
@@ -161,13 +161,13 @@ export class SuggestedActionsComponent extends ChatItem {
161
161
  this.activeIndex = apply ? index : -1;
162
162
  }
163
163
  actionKeydown(e, action) {
164
- const handler = this.actionKeyHandlers[normalizeNumpadKeys(e)];
164
+ const handler = this.actionKeyHandlers[normalizeKeys(e)];
165
165
  if (handler) {
166
166
  handler(e, action);
167
167
  }
168
168
  }
169
169
  suggestionKeydown(e, suggestion) {
170
- const handler = this.suggestionKeyHandlers[normalizeNumpadKeys(e)];
170
+ const handler = this.suggestionKeyHandlers[normalizeKeys(e)];
171
171
  if (handler) {
172
172
  handler(e, suggestion);
173
173
  }
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1763998286,
14
- version: '21.2.0-develop.1',
13
+ publishDate: 1764593013,
14
+ version: '21.2.0-develop.10',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -7,7 +7,7 @@ import { InjectionToken, Directive, Inject, HostBinding, ViewChild, Input, Injec
7
7
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
8
8
  import * as i1$2 from '@progress/kendo-angular-popup';
9
9
  import { PopupComponent, KENDO_POPUP, PopupService } from '@progress/kendo-angular-popup';
10
- import { isPresent, normalizeNumpadKeys, Keys, focusableSelector, guid, getter, isDocumentAvailable, closest as closest$1, ResizeSensorComponent, isChanged, processCssValue, ResizeBatchService } from '@progress/kendo-angular-common';
10
+ import { isPresent, normalizeKeys, 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
12
  import { NgTemplateOutlet, NgClass } from '@angular/common';
13
13
  import { Subject, Subscription, fromEvent } from 'rxjs';
@@ -216,8 +216,8 @@ const packageMetadata = {
216
216
  productName: 'Kendo UI for Angular',
217
217
  productCode: 'KENDOUIANGULAR',
218
218
  productCodes: ['KENDOUIANGULAR'],
219
- publishDate: 1763998286,
220
- version: '21.2.0-develop.1',
219
+ publishDate: 1764593013,
220
+ version: '21.2.0-develop.10',
221
221
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
222
222
  };
223
223
 
@@ -404,7 +404,7 @@ class AIPromptToolbarFocusableDirective {
404
404
  this.element.focus();
405
405
  }
406
406
  keyDownHandler = (e) => {
407
- const code = normalizeNumpadKeys(e);
407
+ const code = normalizeKeys(e);
408
408
  const targetsSelf = e.target === this.element;
409
409
  const isLeftArrow = code === Keys.ArrowLeft;
410
410
  const isRightArrow = code === Keys.ArrowRight;
@@ -2664,13 +2664,13 @@ class SuggestedActionsComponent extends ChatItem {
2664
2664
  this.activeIndex = apply ? index : -1;
2665
2665
  }
2666
2666
  actionKeydown(e, action) {
2667
- const handler = this.actionKeyHandlers[normalizeNumpadKeys(e)];
2667
+ const handler = this.actionKeyHandlers[normalizeKeys(e)];
2668
2668
  if (handler) {
2669
2669
  handler(e, action);
2670
2670
  }
2671
2671
  }
2672
2672
  suggestionKeydown(e, suggestion) {
2673
- const handler = this.suggestionKeyHandlers[normalizeNumpadKeys(e)];
2673
+ const handler = this.suggestionKeyHandlers[normalizeKeys(e)];
2674
2674
  if (handler) {
2675
2675
  handler(e, suggestion);
2676
2676
  }
@@ -3135,7 +3135,7 @@ const groupItems = (total) => (acc, msg, index) => {
3135
3135
  attachments: msg.attachments,
3136
3136
  attachmentLayout: msg.attachmentLayout,
3137
3137
  timestamp: msg.timestamp,
3138
- trackBy: msg
3138
+ trackBy: 'attachment-group' + msg.id
3139
3139
  });
3140
3140
  }
3141
3141
  if (msg.suggestedActions && isLastMessage) {
@@ -3143,7 +3143,7 @@ const groupItems = (total) => (acc, msg, index) => {
3143
3143
  type: 'action-group',
3144
3144
  actions: msg.suggestedActions,
3145
3145
  timestamp: msg.timestamp,
3146
- trackBy: msg
3146
+ trackBy: 'action-group' + msg.id
3147
3147
  });
3148
3148
  }
3149
3149
  return acc;
@@ -4170,7 +4170,7 @@ class MessageComponent extends ChatItem {
4170
4170
  this.chatService.toggleMessageState = false;
4171
4171
  }
4172
4172
  onExpandableKeydown(event) {
4173
- const key = normalizeNumpadKeys(event);
4173
+ const key = normalizeKeys(event);
4174
4174
  const isFileActionButton = event.target.closest(FILE_ACTION_BTN_SELECTOR) || event.target.closest(DOWNLOAD_ALL_SELECTOR);
4175
4175
  if (!isFileActionButton && (key === Keys.Enter || key === Keys.Space)) {
4176
4176
  event.preventDefault();
@@ -4367,12 +4367,8 @@ class MessageComponent extends ChatItem {
4367
4367
  @if (!message.isDeleted && parts.length > 0) {
4368
4368
  <span class="k-chat-bubble-text">
4369
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
- }
4370
+ @if (part.type === 'text') {{{part.content}}}
4371
+ @if (part.type === 'link') {<a [href]="part.href" target="_blank">{{part.content}}</a>}
4376
4372
  }
4377
4373
  </span>
4378
4374
  }
@@ -4559,12 +4555,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
4559
4555
  @if (!message.isDeleted && parts.length > 0) {
4560
4556
  <span class="k-chat-bubble-text">
4561
4557
  @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
- }
4558
+ @if (part.type === 'text') {{{part.content}}}
4559
+ @if (part.type === 'link') {<a [href]="part.href" target="_blank">{{part.content}}</a>}
4568
4560
  }
4569
4561
  </span>
4570
4562
  }
@@ -4857,7 +4849,7 @@ class MessageAttachmentsComponent extends ChatItem {
4857
4849
  itemKeydown(e, attachment) {
4858
4850
  const keyHandlers = this.layout === 'list' ?
4859
4851
  this.listKeyHandlers : this.carouselKeyHandlers;
4860
- const code = normalizeNumpadKeys(e);
4852
+ const code = normalizeKeys(e);
4861
4853
  const handler = keyHandlers[code];
4862
4854
  if (handler) {
4863
4855
  handler(e, attachment);
@@ -5184,7 +5176,7 @@ class MessageListComponent {
5184
5176
  }
5185
5177
  onKeydown(e) {
5186
5178
  // On some keyboards Numpad keys are used for Home/End/PageUp/PageDown.
5187
- const code = normalizeNumpadKeys(e);
5179
+ const code = normalizeKeys(e);
5188
5180
  const action = this.keyActions[code];
5189
5181
  if (action) {
5190
5182
  action(e);
@@ -6258,7 +6250,12 @@ class ChatComponent {
6258
6250
  * @hidden
6259
6251
  */
6260
6252
  get contextMenuActions() {
6261
- return transformActions(this.chatService.calculatedContextMenuActions);
6253
+ const currentActions = this.chatService.calculatedContextMenuActions;
6254
+ if (currentActions !== this._lastContextMenuActionsReference) {
6255
+ this._cachedContextMenuActions = transformActions(currentActions);
6256
+ this._lastContextMenuActionsReference = currentActions;
6257
+ }
6258
+ return this._cachedContextMenuActions;
6262
6259
  }
6263
6260
  /**
6264
6261
  * @hidden
@@ -6290,6 +6287,8 @@ class ChatComponent {
6290
6287
  _cachedProcessedMessages = [];
6291
6288
  _lastMessagesReference = null;
6292
6289
  _lastModelFields = null;
6290
+ _cachedContextMenuActions = [];
6291
+ _lastContextMenuActionsReference = null;
6293
6292
  constructor(localization, zone, renderer, element, chatService) {
6294
6293
  this.localization = localization;
6295
6294
  this.zone = zone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-conversational-ui",
3
- "version": "21.2.0-develop.1",
3
+ "version": "21.2.0-develop.10",
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": 1763998286,
50
+ "publishDate": 1764593013,
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 - 21",
58
58
  "@angular/platform-browser": "18 - 21",
59
59
  "@progress/kendo-licensing": "^1.7.0",
60
- "@progress/kendo-angular-buttons": "21.2.0-develop.1",
61
- "@progress/kendo-angular-inputs": "21.2.0-develop.1",
62
- "@progress/kendo-angular-layout": "21.2.0-develop.1",
63
- "@progress/kendo-angular-icons": "21.2.0-develop.1",
64
- "@progress/kendo-angular-common": "21.2.0-develop.1",
65
- "@progress/kendo-angular-intl": "21.2.0-develop.1",
66
- "@progress/kendo-angular-l10n": "21.2.0-develop.1",
67
- "@progress/kendo-angular-menu": "21.2.0-develop.1",
68
- "@progress/kendo-angular-popup": "21.2.0-develop.1",
69
- "@progress/kendo-angular-toolbar": "21.2.0-develop.1",
70
- "@progress/kendo-angular-upload": "21.2.0-develop.1",
60
+ "@progress/kendo-angular-buttons": "21.2.0-develop.10",
61
+ "@progress/kendo-angular-inputs": "21.2.0-develop.10",
62
+ "@progress/kendo-angular-layout": "21.2.0-develop.10",
63
+ "@progress/kendo-angular-icons": "21.2.0-develop.10",
64
+ "@progress/kendo-angular-common": "21.2.0-develop.10",
65
+ "@progress/kendo-angular-intl": "21.2.0-develop.10",
66
+ "@progress/kendo-angular-l10n": "21.2.0-develop.10",
67
+ "@progress/kendo-angular-menu": "21.2.0-develop.10",
68
+ "@progress/kendo-angular-popup": "21.2.0-develop.10",
69
+ "@progress/kendo-angular-toolbar": "21.2.0-develop.10",
70
+ "@progress/kendo-angular-upload": "21.2.0-develop.10",
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.2.0-develop.1"
75
+ "@progress/kendo-angular-schematics": "21.2.0-develop.10"
76
76
  },
77
77
  "schematics": "./schematics/collection.json",
78
78
  "module": "fesm2022/progress-kendo-angular-conversational-ui.mjs",
@@ -1,93 +0,0 @@
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
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.templateTransformer = templateTransformer;
8
- const node_html_parser_1 = require("node-html-parser");
9
- function templateTransformer(root, j, ...processFns) {
10
- root
11
- .find(j.ClassDeclaration)
12
- .forEach(classPath => {
13
- // Skip if no decorators
14
- const classNode = classPath.node;
15
- if (!classNode.decorators || !classNode.decorators.length)
16
- return;
17
- // Find Component decorator
18
- const componentDecorator = classNode.decorators.find((decorator) => {
19
- if (decorator.expression && decorator.expression.type === 'CallExpression') {
20
- const callee = decorator.expression.callee;
21
- // Handle direct Component identifier
22
- if (callee.type === 'Identifier' && callee.name === 'Component') {
23
- return true;
24
- }
25
- // Handle angular.core.Component or similar
26
- if (callee.type === 'MemberExpression' &&
27
- callee.property &&
28
- callee.property.type === 'Identifier' &&
29
- callee.property.name === 'Component') {
30
- return true;
31
- }
32
- }
33
- return false;
34
- });
35
- if (!componentDecorator || !componentDecorator.expression)
36
- return;
37
- const expression = componentDecorator.expression;
38
- if (expression.type !== 'CallExpression' || !expression.arguments.length)
39
- return;
40
- const componentOptions = expression.arguments[0];
41
- if (componentOptions.type !== 'ObjectExpression')
42
- return;
43
- // Find template and templateUrl properties
44
- const props = componentOptions.properties || [];
45
- const templateProp = props.find((prop) => (prop.key.type === 'Identifier' && prop.key.name === 'template') ||
46
- (prop.key.type === 'StringLiteral' && prop.key.value === 'template'));
47
- // const templateUrlProp = props.find((prop: any) =>
48
- // (prop.key.type === 'Identifier' && prop.key.name === 'templateUrl') ||
49
- // (prop.key.type === 'StringLiteral' && prop.key.value === 'templateUrl')
50
- // );
51
- // Process inline template
52
- if (templateProp) {
53
- // Extract template based on node type
54
- let originalTemplate;
55
- if (templateProp.value.type === 'StringLiteral' || templateProp.value.type === 'Literal') {
56
- originalTemplate = templateProp.value.value;
57
- }
58
- else if (templateProp.value.type === 'TemplateLiteral') {
59
- // For template literals, join quasis
60
- if (templateProp.value.quasis && templateProp.value.quasis.length) {
61
- originalTemplate = templateProp.value.quasis
62
- .map((q) => q.value.cooked || q.value.raw)
63
- .join('');
64
- }
65
- else {
66
- console.warn('Could not process TemplateLiteral properly');
67
- return;
68
- }
69
- }
70
- else {
71
- console.warn(`Unsupported template type: ${templateProp.value.type}`);
72
- return;
73
- }
74
- const root = (0, node_html_parser_1.parse)(originalTemplate);
75
- processFns.forEach(fn => {
76
- fn(root);
77
- });
78
- // Transform template using Angular compiler
79
- const transformedTemplate = root.toString();
80
- if (transformedTemplate !== originalTemplate) {
81
- // Update template property
82
- if (templateProp.value.type === 'TemplateLiteral') {
83
- // For template literals, create a new template literal
84
- templateProp.value = j.templateLiteral([j.templateElement({ cooked: transformedTemplate, raw: transformedTemplate }, true)], []);
85
- }
86
- else {
87
- // For string literals, update the value
88
- templateProp.value.value = transformedTemplate;
89
- }
90
- }
91
- }
92
- });
93
- }