contentful-migration
Version:
Migration tooling for contentful
49 lines • 1.43 kB
JavaScript
;
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_create_1 = require("../../action/editor-layout/editor-layout-create");
class EditorLayoutCreateIntent extends base_intent_1.default {
isEditorInterfaceIntent() {
return true;
}
requiresContentType() {
// We need the fields to build the initial editor layout
return true;
}
isEditorLayoutCreate() {
return true;
}
isGroupable() {
return false;
}
groupsWith() {
return false;
}
endsGroup() {
return false;
}
shouldSave() {
return false;
}
shouldPublish() {
return false;
}
toActions() {
return [
new editor_layout_create_1.EditorLayoutCreateAction(this.payload.contentTypeId)
];
}
toPlanMessage() {
return {
heading: (0, chalk_1.default) `Create editor layout for content type {bold.yellow ${this.getContentTypeId()}}`,
details: [],
sections: []
};
}
}
exports.default = EditorLayoutCreateIntent;
//# sourceMappingURL=editor-layout-create.js.map