@progress/kendo-angular-conversational-ui 24.0.0-develop.37 → 24.0.0-develop.39

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.
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
7
+ exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeConditionalRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
8
8
  exports.hasKendoInTemplate = hasKendoInTemplate;
9
9
  exports.isImportedFromPackage = isImportedFromPackage;
10
10
  exports.tsPropertyRemoval = tsPropertyRemoval;
@@ -345,6 +345,34 @@ const attributeRemoval = (templateContent, tagName, attributeName, propertyToRem
345
345
  });
346
346
  };
347
347
  exports.attributeRemoval = attributeRemoval;
348
+ /**
349
+ * Removes an attribute from a tag only when its value matches one of the specified values.
350
+ * Handles both static (`attr="value"`) and bound (`[attr]="'value'"`) forms.
351
+ *
352
+ * @param templateContent - The template string content to transform
353
+ * @param tagName - The HTML tag name to target (e.g., 'kendo-button')
354
+ * @param attributeName - The attribute name to conditionally remove
355
+ * @param values - The attribute values that trigger removal
356
+ * @returns The transformed template content
357
+ */
358
+ const attributeConditionalRemoval = (templateContent, tagName, attributeName, values) => {
359
+ const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
360
+ const escapedTag = escapeRegex(tagName);
361
+ const escapedAttr = escapeRegex(attributeName);
362
+ // Remove bound attributes [attribute]="value"
363
+ const boundAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+\\[${escapedAttr}\\]\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
364
+ // Remove static attributes attribute="value"
365
+ const staticAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+${escapedAttr}\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
366
+ // Strip outer and inner quotes to extract the raw value for comparison
367
+ const matchesValue = (raw) => {
368
+ const inner = raw.replace(/^["']|["']$/g, '').replace(/^['"]|['"]$/g, '');
369
+ return values.includes(inner);
370
+ };
371
+ let result = templateContent.replace(boundAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
372
+ result = result.replace(staticAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
373
+ return result;
374
+ };
375
+ exports.attributeConditionalRemoval = attributeConditionalRemoval;
348
376
  function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propertyName) {
349
377
  if (source.includes(typeName)) {
350
378
  if (!isImportedFromPackage(rootSource, j, packageName, typeName)) {
@@ -441,8 +469,31 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
441
469
  }
442
470
  }
443
471
  });
444
- // Handle return statements with object literals
472
+ // Handle return statements with object literals, but only when the enclosing
473
+ // function's declared return type matches typeName. This prevents removing
474
+ // unrelated propertyName keys from object literals returned in other functions.
475
+ const enclosingFunctionReturnsType = (nodePath) => {
476
+ let current = nodePath.parent;
477
+ while (current) {
478
+ const node = current.node;
479
+ if (node.type === 'FunctionDeclaration' ||
480
+ node.type === 'FunctionExpression' ||
481
+ node.type === 'ArrowFunctionExpression' ||
482
+ node.type === 'ClassMethod' ||
483
+ node.type === 'ObjectMethod') {
484
+ return !!(node.returnType &&
485
+ node.returnType.typeAnnotation?.type === 'TSTypeReference' &&
486
+ node.returnType.typeAnnotation.typeName?.type === 'Identifier' &&
487
+ node.returnType.typeAnnotation.typeName.name === typeName);
488
+ }
489
+ current = current.parent;
490
+ }
491
+ return false;
492
+ };
445
493
  rootSource.find(j.ReturnStatement).forEach((path) => {
494
+ if (!enclosingFunctionReturnsType(path)) {
495
+ return;
496
+ }
446
497
  if (path.node.argument && path.node.argument.type === 'ObjectExpression') {
447
498
  const properties = path.node.argument.properties;
448
499
  const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
@@ -491,22 +542,6 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
491
542
  statement.remove();
492
543
  }
493
544
  });
494
- // Handle nested member expressions like chatConfig.chat.modelFields.pinnedByField
495
- rootSource
496
- .find(j.AssignmentExpression, {
497
- left: {
498
- type: 'MemberExpression',
499
- object: {
500
- type: 'MemberExpression',
501
- },
502
- property: {
503
- name: propertyName,
504
- },
505
- },
506
- })
507
- .forEach((path) => {
508
- j(path).closest(j.ExpressionStatement).remove();
509
- });
510
545
  return rootSource;
511
546
  }
512
547
  }
@@ -0,0 +1,30 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2026 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.default = default_1;
8
+ const tslib_1 = require("tslib");
9
+ const fs = tslib_1.__importStar(require("fs"));
10
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
11
+ function default_1(fileInfo, api) {
12
+ const filePath = fileInfo.path;
13
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
14
+ return fileInfo.source;
15
+ }
16
+ // Handle HTML files and inline templates
17
+ const htmlResult = (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, codemods_1.attributeNameUpdate)(templateContent, 'kendo-chat', 'sendButtonSettings', 'sendButton'));
18
+ if (filePath.endsWith('.html')) {
19
+ if (htmlResult && htmlResult !== fileInfo.source) {
20
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
21
+ return htmlResult;
22
+ }
23
+ return fileInfo.source;
24
+ }
25
+ // Handle TypeScript property transformations
26
+ const j = api.jscodeshift;
27
+ const rootSource = j(htmlResult || fileInfo.source);
28
+ (0, codemods_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ChatComponent', 'sendButtonSettings', 'sendButton');
29
+ return rootSource.toSource();
30
+ }
@@ -7,7 +7,7 @@ import { InjectionToken, Input, ViewChild, HostBinding, Inject, Directive, 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, normalizeKeys, Keys, focusableSelector, guid, getter, isDocumentAvailable, hasObservers, EventsOutsideAngularDirective, closest as closest$1, ResizeSensorComponent, getLicenseMessage, shouldShowValidationUI, isChanged, processCssValue, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
10
+ import { isPresent, normalizeKeys, Keys, focusableSelector, KENDO_WEBMCP_HOST, guid, getter, isDocumentAvailable, hasObservers, EventsOutsideAngularDirective, closest as closest$1, ResizeSensorComponent, getLicenseMessage, shouldShowValidationUI, isChanged, processCssValue, WatermarkOverlayComponent, 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';
@@ -215,8 +215,8 @@ const packageMetadata = {
215
215
  productName: 'Kendo UI for Angular',
216
216
  productCode: 'KENDOUIANGULAR',
217
217
  productCodes: ['KENDOUIANGULAR'],
218
- publishDate: 1779188570,
219
- version: '24.0.0-develop.37',
218
+ publishDate: 1779209752,
219
+ version: '24.0.0-develop.39',
220
220
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
221
221
  };
222
222
 
@@ -878,7 +878,8 @@ class AIPromptComponent {
878
878
  {
879
879
  provide: L10N_PREFIX,
880
880
  useValue: 'kendo.aiprompt'
881
- }
881
+ },
882
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => AIPromptComponent) }
882
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: `
883
884
  <ng-container kendoAIPromptLocalizedMessages
884
885
  i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
@@ -978,7 +979,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
978
979
  {
979
980
  provide: L10N_PREFIX,
980
981
  useValue: 'kendo.aiprompt'
981
- }
982
+ },
983
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => AIPromptComponent) }
982
984
  ],
983
985
  template: `
984
986
  <ng-container kendoAIPromptLocalizedMessages
@@ -10095,6 +10097,7 @@ class ChatComponent {
10095
10097
  provide: L10N_PREFIX,
10096
10098
  useValue: 'kendo.chat',
10097
10099
  },
10100
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => ChatComponent) }
10098
10101
  ], 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: "messageBoxStartAffixTemplate", first: true, predicate: ChatMessageBoxStartAffixTemplateDirective, descendants: true }, { propertyName: "messageBoxEndAffixTemplate", first: true, predicate: ChatMessageBoxEndAffixTemplateDirective, descendants: true }, { propertyName: "messageBoxTopAffixTemplate", first: true, predicate: ChatMessageBoxTopAffixTemplateDirective, 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 }, { propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
10099
10102
  <ng-container
10100
10103
  kendoChatLocalizedMessages
@@ -10297,6 +10300,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
10297
10300
  provide: L10N_PREFIX,
10298
10301
  useValue: 'kendo.chat',
10299
10302
  },
10303
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => ChatComponent) }
10300
10304
  ],
10301
10305
  selector: 'kendo-chat',
10302
10306
  template: `
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1779188570,
11
- "version": "24.0.0-develop.37",
10
+ "publishDate": 1779209752,
11
+ "version": "24.0.0-develop.39",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-conversational-ui",
3
- "version": "24.0.0-develop.37",
3
+ "version": "24.0.0-develop.39",
4
4
  "description": "Kendo UI for Angular Conversational UI components",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -85,13 +85,19 @@
85
85
  "file": "codemods/v23/chat-rendering-changes.js",
86
86
  "instructionsOnly": true
87
87
  }
88
+ ],
89
+ "24": [
90
+ {
91
+ "description": "The Chat's sendButtonSettings input property is renamed to sendButton.",
92
+ "file": "codemods/v24/chat-sendButtonSettings.js"
93
+ }
88
94
  ]
89
95
  }
90
96
  },
91
97
  "package": {
92
98
  "productName": "Kendo UI for Angular",
93
99
  "productCode": "KENDOUIANGULAR",
94
- "publishDate": 1779188570,
100
+ "publishDate": 1779209752,
95
101
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
96
102
  }
97
103
  },
@@ -101,22 +107,22 @@
101
107
  "@angular/core": "19 - 21",
102
108
  "@angular/platform-browser": "19 - 21",
103
109
  "@progress/kendo-licensing": "^1.11.0",
104
- "@progress/kendo-angular-buttons": "24.0.0-develop.37",
105
- "@progress/kendo-angular-inputs": "24.0.0-develop.37",
106
- "@progress/kendo-angular-layout": "24.0.0-develop.37",
107
- "@progress/kendo-angular-icons": "24.0.0-develop.37",
108
- "@progress/kendo-angular-common": "24.0.0-develop.37",
109
- "@progress/kendo-angular-intl": "24.0.0-develop.37",
110
- "@progress/kendo-angular-l10n": "24.0.0-develop.37",
111
- "@progress/kendo-angular-menu": "24.0.0-develop.37",
112
- "@progress/kendo-angular-popup": "24.0.0-develop.37",
113
- "@progress/kendo-angular-toolbar": "24.0.0-develop.37",
114
- "@progress/kendo-angular-upload": "24.0.0-develop.37",
110
+ "@progress/kendo-angular-buttons": "24.0.0-develop.39",
111
+ "@progress/kendo-angular-inputs": "24.0.0-develop.39",
112
+ "@progress/kendo-angular-layout": "24.0.0-develop.39",
113
+ "@progress/kendo-angular-icons": "24.0.0-develop.39",
114
+ "@progress/kendo-angular-common": "24.0.0-develop.39",
115
+ "@progress/kendo-angular-intl": "24.0.0-develop.39",
116
+ "@progress/kendo-angular-l10n": "24.0.0-develop.39",
117
+ "@progress/kendo-angular-menu": "24.0.0-develop.39",
118
+ "@progress/kendo-angular-popup": "24.0.0-develop.39",
119
+ "@progress/kendo-angular-toolbar": "24.0.0-develop.39",
120
+ "@progress/kendo-angular-upload": "24.0.0-develop.39",
115
121
  "rxjs": "^6.5.3 || ^7.0.0"
116
122
  },
117
123
  "dependencies": {
118
124
  "tslib": "^2.3.1",
119
- "@progress/kendo-angular-schematics": "24.0.0-develop.37"
125
+ "@progress/kendo-angular-schematics": "24.0.0-develop.39"
120
126
  },
121
127
  "schematics": "./schematics/collection.json",
122
128
  "module": "fesm2022/progress-kendo-angular-conversational-ui.mjs",