UNPKG

devexpress-reporting

Version:

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

73 lines (72 loc) 2.82 kB
/** * DevExpress HTML/JS Reporting (designer\widgets\undoEditors.js) * Version: 20.2.13 * Build date: Apr 10, 2023 * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var ko = require("knockout"); var analytics_widgets_1 = require("@devexpress/analytics-core/analytics-widgets"); var UndoEditor = (function (_super) { __extends(UndoEditor, _super); function UndoEditor(info, level, parentDisabled, textToSearch) { return _super.call(this, info, level, parentDisabled, textToSearch) || this; } UndoEditor.prototype.generateValue = function (undoEngine) { var _this = this; if (!this.generatedValue) { this._disposables.push(this.generatedValue = ko.computed({ read: function () { return _this.value(); }, write: function (val) { undoEngine().start(); _this.value(val); undoEngine().end(); } })); } return this.generatedValue; }; return UndoEditor; }(analytics_widgets_1.Editor)); exports.UndoEditor = UndoEditor; var ComboboxUndoEditor = (function (_super) { __extends(ComboboxUndoEditor, _super); function ComboboxUndoEditor(info, level, parentDisabled, textToSearch) { return _super.call(this, info, level, parentDisabled, textToSearch) || this; } ComboboxUndoEditor.prototype.generateValue = function (undoEngine) { var _this = this; if (!this.undoValue) { this._disposables.push(this.undoValue = ko.computed({ read: function () { return _this.value(); }, write: function (val) { undoEngine().start(); _this.value(val); undoEngine().end(); } })); } return this.undoValue; }; return ComboboxUndoEditor; }(analytics_widgets_1.Editor)); exports.ComboboxUndoEditor = ComboboxUndoEditor;