@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
39 lines (29 loc) • 1.21 kB
JavaScript
;
const { applyClassReplacementsCss, applySchedulerWindowToDialogCss } = require('../_shared.cjs');
const STYLE_RE = /(<style[^>]*>)([\s\S]*?)(<\/style>)/gi;
function applyAllCssTransforms(str) {
let result = applyClassReplacementsCss(str);
result = applySchedulerWindowToDialogCss(result);
return result;
}
module.exports = function transformer(fileInfo) {
if (!/\.html?$/i.test(fileInfo.path)) {
return undefined;
}
let source = fileInfo.source;
let changed = false;
source = source.replace(STYLE_RE, (match, open, content, close) => {
const transformed = applyAllCssTransforms(content);
if (transformed !== content) {
changed = true;
return open + transformed + close;
}
return match;
});
return changed ? source : undefined;
};
module.exports.aiInstructions = `Applies all Scheduler CSS class renames inside inline <style> blocks within HTML files for Kendo UI 2026 Q3. This includes:
1. k-event-actions → k-event-recurrence-icon
2. Scheduler tooltip → popover class renames (compound and child classes)
3. .k-scheduler .k-window* → .k-scheduler .k-dialog* (edit dialog)
See the individual CSS codemods for full details.`;