@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
60 lines (44 loc) • 2.82 kB
JavaScript
;
const { applySchedulerWindowToDialogCss } = require('../_shared.cjs');
module.exports = function transformer(fileInfo) {
if (!/\.(css|scss|sass|less)$/i.test(fileInfo.path)) {
return undefined;
}
if (!fileInfo.source.includes('k-scheduler') || !fileInfo.source.includes('k-window')) {
return undefined;
}
const updated = applySchedulerWindowToDialogCss(fileInfo.source);
return updated !== fileInfo.source ? updated : undefined;
};
module.exports.aiInstructions = `The Scheduler edit dialog switched from a Window component to a Dialog component in Kendo UI 2026 Q3. CSS selectors that target Window classes within a \`.k-scheduler\` context should be updated to target Dialog classes.
## What This Codemod Does
Renames Window-related CSS classes to Dialog equivalents ONLY when they appear in a selector that includes \`.k-scheduler\`:
| Before | After |
|---------------------------------------------|---------------------------------------------|
| .k-scheduler .k-window | .k-scheduler .k-dialog |
| .k-scheduler .k-window-titlebar | .k-scheduler .k-dialog-titlebar |
| .k-scheduler .k-window-content | .k-scheduler .k-dialog-content |
| .k-scheduler .k-window-actions | .k-scheduler .k-dialog-actions |
| .k-scheduler .k-window .k-form | .k-scheduler .k-dialog .k-form |
| #my-scheduler.k-scheduler .k-window-content | #my-scheduler.k-scheduler .k-dialog-content |
## What Is NOT Changed
- Standalone \`.k-window\` selectors (not inside a scheduler context) — these belong to the Window component
- \`.k-window\` in other component contexts like \`.k-spreadsheet .k-window\`
- JavaScript references to window classes — see js/scheduler-class-strings codemod
## CSS Examples
Before:
.k-scheduler .k-window { border-radius: 8px; }
.k-scheduler .k-window-titlebar { background: #f5f5f5; }
.k-scheduler .k-window-content { padding: 16px; }
.k-scheduler .k-window-actions .k-button { min-width: 80px; }
After:
.k-scheduler .k-dialog { border-radius: 8px; }
.k-scheduler .k-dialog-titlebar { background: #f5f5f5; }
.k-scheduler .k-dialog-content { padding: 16px; }
.k-scheduler .k-dialog-actions .k-button { min-width: 80px; }
## Additional Context
The Dialog component is always centered, not draggable, and not resizable. If your styles depended on a positioned/dragged window, they may need redesign. The Dialog uses:
- \`.k-dialog\` as the container
- \`.k-dialog-titlebar\` for the header
- \`.k-dialog-content\` for the body/form area
- \`.k-dialog-actions\` for the footer button row (replaces window title bar buttons)`;