@progress/kendo-angular-spreadsheet 25.0.0-develop.26 → 25.0.0-develop.28
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.
- package/codemods/libs/common/src/codemods/utils.js +15 -0
- package/codemods/libs/spreadsheet/codemods/v25/spreadsheet-rendering-changes.js +32 -0
- package/fesm2022/progress-kendo-angular-spreadsheet.mjs +186 -186
- package/package-metadata.mjs +2 -2
- package/package.json +25 -18
- package/schematics/ngAdd/index.js +2 -2
|
@@ -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,32 @@
|
|
|
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 Spreadsheet rendering changes:
|
|
11
|
+
|
|
12
|
+
Sheets Bar button — now a Button that opens a Popup. Previously, it was a DropDownButton.
|
|
13
|
+
Update selectors targeting the DropDownButton in the Sheets Bar.
|
|
14
|
+
|
|
15
|
+
Toolbar order — The Format tool is moved from the Home tab to the Format tab toolbar.
|
|
16
|
+
Update tests or selectors that rely on Home tab toolbar tool order.
|
|
17
|
+
|
|
18
|
+
Formula action bar — Previously rendered a formula-fx icon. It is now a Button.
|
|
19
|
+
Update selectors targeting the formula-fx icon.
|
|
20
|
+
|
|
21
|
+
Toolbar resizing — The Toolbar is now resizable. Overflow tools render behind an overflow button.
|
|
22
|
+
Update tests that assert specific toolbar tool visibility.`;
|
|
23
|
+
const classes = ['k-spreadsheet-sheets-bar', 'k-spreadsheet-formula-bar'];
|
|
24
|
+
const pattern = (0, codemods_1.makePattern)(classes);
|
|
25
|
+
function default_1(fileInfo) {
|
|
26
|
+
if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
|
|
27
|
+
if (pattern.test(fileInfo.source)) {
|
|
28
|
+
(0, codemods_1.writeInstructionMarker)(exports.aiInstructions, __filename, fileInfo.path);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return fileInfo.source;
|
|
32
|
+
}
|