core-cde
Version:
38 lines • 1.11 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Action = void 0;
/**
* Действие
*/
class Action {
constructor(props, documentId, pageId, widgetId) {
this.props = props;
this.documentId = documentId;
this.pageId = pageId;
this.widgetId = widgetId;
/**
* true - выполнить команду иначе проигнорировать
*/
this.execute = true;
/**
* true - сохранить в стек undo/redo
*/
this.useUndoRedo = true;
}
/**
* Получить объект для сериализации
* @returns Объект для сериализации
*/
toJSON() {
return Object.assign({}, null, {
props: this.props,
documentId: this.documentId,
pageId: this.pageId,
widgetId: this.widgetId,
type: this.type,
user: this.user,
});
}
}
exports.Action = Action;
//# sourceMappingURL=Action.js.map