contentful-migration
Version:
Migration tooling for contentful
44 lines • 1.54 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 editorinterface_reset_1 = require("../action/editorinterface-reset");
const chalk_1 = __importDefault(require("chalk"));
const editorinterface_save_1 = require("../action/editorinterface-save");
class EditorInterfaceResetIntent extends base_intent_1.default {
isEditorInterfaceIntent() {
return true;
}
isGroupable() {
return true;
}
groupsWith(other) {
return other.isGroupable() && other.isEditorInterfaceIntent() && this.isSameContentType(other);
}
endsGroup() {
return false;
}
shouldSave() {
return false;
}
shouldPublish() {
return false;
}
toActions() {
return [
new editorinterface_reset_1.ResetEditorInterfaceAction(this.payload.contentTypeId, this.payload.editorInterfaceReset.fieldId),
new editorinterface_save_1.SaveEditorInterfaceAction(this.payload.contentTypeId)
];
}
toPlanMessage() {
return {
heading: (0, chalk_1.default) `Reset field control for Content Type {bold.yellow ${this.getContentTypeId()}}`,
details: [],
sections: []
};
}
}
exports.default = EditorInterfaceResetIntent;
//# sourceMappingURL=editorinterface-reset.js.map