@progress/kendo-angular-dateinputs 25.0.0-develop.3 → 25.0.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.
|
@@ -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,38 @@
|
|
|
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 TimePicker/TimeSelector classes:
|
|
11
|
+
|
|
12
|
+
k-flex — removed from the Virtualization component host.
|
|
13
|
+
Remove any CSS rules targeting .k-flex on TimePicker/TimeSelector virtualization elements.
|
|
14
|
+
|
|
15
|
+
k-time-cancel / k-time-accept — removed from the adaptive (ActionSheet) Cancel/Accept buttons in TimePicker.
|
|
16
|
+
Remove any CSS rules or test assertions targeting .k-time-cancel or .k-time-accept.
|
|
17
|
+
|
|
18
|
+
k-timeselector-title — removed from both the main title <span> and the per-column title <span> in TimeSelector (only k-title remains).
|
|
19
|
+
Replace .k-timeselector-title selectors with .k-title.
|
|
20
|
+
|
|
21
|
+
k-button-primary — removed from the "Now" button in TimeSelector.
|
|
22
|
+
Remove selectors targeting .k-button-primary on the "Now" button.
|
|
23
|
+
|
|
24
|
+
Button text wrapping — The "Now", "Accept", and "Cancel" button text in TimeSelector is now wrapped in <span class="k-button-text"> instead of being a bare text node.
|
|
25
|
+
Update selectors that target button text directly.
|
|
26
|
+
|
|
27
|
+
k-time-separator — The <div class="k-time-separator"> for a literal date-format part is no longer rendered when the literal pattern is empty/whitespace-only.
|
|
28
|
+
Update tests that assert presence of .k-time-separator elements.`;
|
|
29
|
+
const classes = ['k-flex', 'k-time-cancel', 'k-time-accept', 'k-timeselector-title', 'k-time-separator'];
|
|
30
|
+
const pattern = (0, codemods_1.makePattern)(classes);
|
|
31
|
+
function default_1(fileInfo) {
|
|
32
|
+
if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
|
|
33
|
+
if (pattern.test(fileInfo.source)) {
|
|
34
|
+
(0, codemods_1.writeInstructionMarker)(exports.aiInstructions, __filename, fileInfo.path);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return fileInfo.source;
|
|
38
|
+
}
|