UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

54 lines (53 loc) 1.99 kB
/** * DevExpress HTML/JS Reporting (designer\internal\_baseConverter.js) * Version: 25.1.3 * Build date: Jun 26, 2025 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import { getParentContainer } from '@devexpress/analytics-core/analytics-internal'; import { getLocalization } from '@devexpress/analytics-core/analytics-utils'; import * as ko from 'knockout'; export class BaseConverter { constructor() { this._model = null; this.popupOptions = { height: 250, visible: ko.observable(false), title: getLocalization('Convert', 'ReportStringId.UD_Msg_ConvertBindingsCaption'), confirmMessage: '', infoMessage: '', linkText: '', linkUrl: '', container: (element) => getParentContainer(element), buttons: [ { toolbar: 'bottom', location: 'after', widget: 'dxButton', options: { text: getLocalization('Yes', 'AnalyticsCoreStringId.ParametersPanel_True'), type: 'default', stylingMode: 'contained', onClick: () => { this._applyChanges(); } } }, { toolbar: 'bottom', location: 'after', widget: 'dxButton', options: { text: getLocalization('No', 'ASPxReportsStringId.ParametersPanel_No'), type: 'normal', stylingMode: 'contained', onClick: () => { this._cancel(); } } } ] }; } convert(model) { if (!model) return; this._model = model; this.popupOptions.visible(true); } _applyChanges() { this.popupOptions.visible(false); } _cancel() { this.popupOptions.visible(false); } }