devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
39 lines (38 loc) • 1.27 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\internal\_wizardRunner.js)
* Version: 25.2.3
* Build date: Dec 15, 2025
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
import { Disposable } from '@devexpress/analytics-core/analytics-utils';
export class WizardRunner extends Disposable {
dispose() {
super.dispose();
this._currentWizard = null;
this._wizards = {};
}
constructor(_menuOptions) {
super();
this._menuOptions = _menuOptions;
this._currentWizard = null;
this._wizards = {};
this._disposables.push(this._menuOptions.collapsed.subscribe((newVal) => {
if (!newVal) {
this._currentWizard.close();
this._currentWizard = null;
}
}));
}
registerCommand(wizardType, start, close) {
this._wizards[wizardType] = { start, close };
}
run(command) {
this._currentWizard && this._currentWizard.close();
this._currentWizard = this._wizards[command];
this._currentWizard && this._currentWizard.start();
}
closeWizard() {
this._currentWizard && this._currentWizard.close();
}
}