UNPKG

contentful-migration

Version:
41 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditorLayoutChangeFieldGroupIdAction = exports.EditorLayoutUpdateFieldGroupAction = void 0; const action_1 = require("../action"); class EditorLayoutUpdateFieldGroupAction extends action_1.EntityAction { constructor(contentTypeId, fieldGroupId, props) { super(); this.contentTypeId = contentTypeId; this.fieldGroupId = fieldGroupId; this.props = props; } getEntityType() { return action_1.EntityType.EditorInterface; } getEntityId() { return this.contentTypeId; } async applyTo(editorInterfaces) { await editorInterfaces.updateEditorLayoutFieldGroup(this.fieldGroupId, this.props); } } exports.EditorLayoutUpdateFieldGroupAction = EditorLayoutUpdateFieldGroupAction; class EditorLayoutChangeFieldGroupIdAction extends action_1.EntityAction { constructor(contentTypeId, fieldGroupId, newFieldGroupId) { super(); this.contentTypeId = contentTypeId; this.fieldGroupId = fieldGroupId; this.newFieldGroupId = newFieldGroupId; } getEntityType() { return action_1.EntityType.EditorInterface; } getEntityId() { return this.contentTypeId; } async applyTo(editorInterfaces) { await editorInterfaces.changeFieldGroupId(this.fieldGroupId, this.newFieldGroupId); } } exports.EditorLayoutChangeFieldGroupIdAction = EditorLayoutChangeFieldGroupIdAction; //# sourceMappingURL=editor-layout-update-field-group.js.map