UNPKG

contentful-migration

Version:
53 lines 1.73 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const base_intent_1 = __importDefault(require("../base-intent")); const chalk_1 = __importDefault(require("chalk")); const editor_layout_delete_field_group_1 = require("../../action/editor-layout/editor-layout-delete-field-group"); class EditorLayoutDeleteFieldGroupIntent extends base_intent_1.default { isEditorInterfaceIntent() { return true; } isEditorLayoutUpdate() { return true; } isFieldGroupDelete() { return true; } isGroupable() { return true; } groupsWith(other) { return other.isGroupable() && other.isEditorLayoutUpdate() && this.isSameContentType(other); } endsGroup() { return false; } shouldSave() { return true; } shouldPublish() { return false; } toActions() { return [ new editor_layout_delete_field_group_1.EditorLayoutDeleteFieldGroupAction(this.payload.contentTypeId, this.payload.fieldGroupId) ]; } toPlanMessage() { return { heading: (0, chalk_1.default) `Update editor layout for content type {bold.yellow ${this.getContentTypeId()}}`, sections: [{ heading: (0, chalk_1.default) `Delete field group {yellow ${this.getFieldGroupId()}}`, details: [] }], details: [] }; } } exports.default = EditorLayoutDeleteFieldGroupIntent; //# sourceMappingURL=editor-layout-delete-field-group.js.map