core-cde
Version:
102 lines • 3.61 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectTextAction = exports.RemoveTextAction = exports.InsertTextAction = exports.AddStyleTextAction = exports.RemoveStyleTextAction = exports.TextUnWrappingAction = exports.TextWrappingAction = exports.TextAlignmentAction = exports.ETextActions = void 0;
const Action_1 = require("./Action");
var ETextActions;
(function (ETextActions) {
ETextActions["insertText"] = "insertText";
ETextActions["removeText"] = "removeText";
ETextActions["selectText"] = "selectText";
ETextActions["addStyleText"] = "addStyleText";
ETextActions["removeStyleText"] = "removeStyleText";
ETextActions["textAlignment"] = "textAlignment";
ETextActions["textWrapping"] = "textWrapping";
ETextActions["textUnWrapping"] = "textUnWrapping";
})(ETextActions = exports.ETextActions || (exports.ETextActions = {}));
class TextAlignmentAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.textAlignment;
}
}
exports.TextAlignmentAction = TextAlignmentAction;
class TextWrappingAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.textWrapping;
}
/**
* Получить объект для сериализации
* @returns Объект для сериализации
*/
toJSON() {
return Object.assign({}, null, {
props: this.props,
documentId: this.documentId,
pageId: this.pageId,
widgetId: this.widgetId,
type: this.type,
newWidgetId: this.newWidgetId,
user: this.user,
});
}
}
exports.TextWrappingAction = TextWrappingAction;
class TextUnWrappingAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.textUnWrapping;
}
/**
* Получить объект для сериализации
* @returns Объект для сериализации
*/
toJSON() {
return Object.assign({}, null, {
props: this.props,
documentId: this.documentId,
pageId: this.pageId,
widgetId: this.widgetId,
type: this.type,
removeWidgetId: this.removeWidgetId,
user: this.user,
});
}
}
exports.TextUnWrappingAction = TextUnWrappingAction;
class RemoveStyleTextAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.removeStyleText;
}
}
exports.RemoveStyleTextAction = RemoveStyleTextAction;
class AddStyleTextAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.addStyleText;
}
}
exports.AddStyleTextAction = AddStyleTextAction;
class InsertTextAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.insertText;
}
}
exports.InsertTextAction = InsertTextAction;
class RemoveTextAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.removeText;
}
}
exports.RemoveTextAction = RemoveTextAction;
class SelectTextAction extends Action_1.Action {
constructor() {
super(...arguments);
this.type = ETextActions.insertText;
}
}
exports.SelectTextAction = SelectTextAction;
//# sourceMappingURL=Text.actions.js.map