@progress/kendo-angular-scheduler 25.4.0-develop.3 → 25.4.0-develop.30

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.attributeConditionalRemoval = 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.valuelessAttributeRemoval = 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;
@@ -374,6 +374,21 @@ const attributeConditionalRemoval = (templateContent, tagName, attributeName, va
374
374
  return result;
375
375
  };
376
376
  exports.attributeConditionalRemoval = attributeConditionalRemoval;
377
+ /**
378
+ * Removes an attribute from a tag regardless of whether it has a value.
379
+ * Handles valueless directive selectors (`<ng-template kendoDirective>`) and static values (`attr="value"`).
380
+ *
381
+ * @param templateContent - The template string content to transform
382
+ * @param tagName - The HTML tag name to target (e.g., 'ng-template')
383
+ * @param attributeName - The attribute name to remove
384
+ * @returns The transformed template content
385
+ */
386
+ const valuelessAttributeRemoval = (templateContent, tagName, attributeName) => {
387
+ const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
388
+ const pattern = new RegExp(`(<${escapeRegex(tagName)}\\b(?:[^>"']|"[^"]*"|'[^']*')*?)\\s+${escapeRegex(attributeName)}(?:\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]+))?(?=\\s|\\/?>)`, 'gi');
389
+ return templateContent.replace(pattern, '$1');
390
+ };
391
+ exports.valuelessAttributeRemoval = valuelessAttributeRemoval;
377
392
  function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propertyName) {
378
393
  if (source.includes(typeName)) {
379
394
  if (!isImportedFromPackage(rootSource, j, packageName, typeName)) {