@progress/kendo-angular-inputs 25.0.0-develop.3 → 25.0.0-develop.31

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.
@@ -13,6 +13,7 @@ exports.writeInstructionMarker = writeInstructionMarker;
13
13
  exports.isApiChangeTarget = isApiChangeTarget;
14
14
  exports.isRenderingChangeTarget = isRenderingChangeTarget;
15
15
  exports.executeCodemodTest = executeCodemodTest;
16
+ exports.removeAttributeFromDirectiveHost = removeAttributeFromDirectiveHost;
16
17
  const tslib_1 = require("tslib");
17
18
  /// <reference types="node" />
18
19
  const fs = tslib_1.__importStar(require("fs"));
@@ -1486,3 +1487,17 @@ function executeCodemodTest(codemod, testDir, exampleFileName = 'example.ts', ex
1486
1487
  catch { }
1487
1488
  }
1488
1489
  }
1490
+ function removeAttributeFromDirectiveHost(templateContent, directiveAttr, attrToRemove) {
1491
+ const escapedDirective = directiveAttr.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1492
+ const escapedAttr = attrToRemove.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1493
+ const boundPattern = new RegExp(`(<[a-zA-Z][a-zA-Z0-9-]*[^>]*${escapedDirective}[^>]*?)\\s+\\[${escapedAttr}\\]\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
1494
+ const staticPattern = new RegExp(`(<[a-zA-Z][a-zA-Z0-9-]*[^>]*${escapedDirective}[^>]*?)\\s+${escapedAttr}\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
1495
+ // Also match when the attribute appears before the directive
1496
+ const boundPatternBefore = new RegExp(`(<[a-zA-Z][a-zA-Z0-9-]*[^>]*?)\\s+\\[${escapedAttr}\\]\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*${escapedDirective}[^>]*?>)`, 'gi');
1497
+ const staticPatternBefore = new RegExp(`(<[a-zA-Z][a-zA-Z0-9-]*[^>]*?)\\s+${escapedAttr}\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*${escapedDirective}[^>]*?>)`, 'gi');
1498
+ let result = templateContent.replace(boundPattern, '$1$3');
1499
+ result = result.replace(staticPattern, '$1$3');
1500
+ result = result.replace(boundPatternBefore, '$1$3');
1501
+ result = result.replace(staticPatternBefore, '$1$3');
1502
+ return result;
1503
+ }
@@ -0,0 +1,35 @@
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.aiInstructions = void 0;
8
+ exports.default = default_1;
9
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
10
+ exports.aiInstructions = `Review your stylesheets, test files, and any code that references these Form/ColorPicker classes:
11
+
12
+ k-form-md — no longer applied to Form elements.
13
+ Remove any CSS rules or test assertions targeting .k-form-md.
14
+
15
+ k-text-success / k-text-error — replaced with !k-text-success / !k-text-error in ColorPicker/FlatColorPicker.
16
+ Update selectors from .k-text-success/.k-text-error to .\\!k-text-success/.\\!k-text-error (escaped ! for CSS).
17
+
18
+ k-coloreditor-reset — removed from the FlatColorPicker header's clear/reset button.
19
+ Remove any CSS rules or test assertions targeting .k-coloreditor-reset.
20
+
21
+ k-justify-content-{layout} — renamed to k-actions-{layout} in the FlatColorPicker action-buttons wrapper.
22
+ Replace .k-justify-content-start/end/center selectors with .k-actions-start/end/center.
23
+
24
+ k-color-preview-mask — A new nested <span class="k-color-preview-mask"> element added inside both color-preview <span>s in the FlatColorPicker header.
25
+ Update selectors that target color-preview spans directly.`;
26
+ const classes = ['k-form-md', 'k-text-success', 'k-text-error', 'k-coloreditor-reset', 'k-justify-content-start', 'k-justify-content-end', 'k-justify-content-center'];
27
+ const pattern = (0, codemods_1.makePattern)(classes);
28
+ function default_1(fileInfo) {
29
+ if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
30
+ if (pattern.test(fileInfo.source)) {
31
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructions, __filename, fileInfo.path);
32
+ }
33
+ }
34
+ return fileInfo.source;
35
+ }