contentful-migration
Version:
Migration tooling for contentful
26 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SidebarWidgetAddAction = void 0;
const action_1 = require("./action");
class SidebarWidgetAddAction extends action_1.EntityAction {
constructor(contentTypeId, widgetId, widgetNamespace, insertBeforeWidgetId, settings, disabled = false) {
super();
this.contentTypeId = contentTypeId;
this.widgetId = widgetId;
this.widgetNamespace = widgetNamespace;
this.insertBeforeWidgetId = insertBeforeWidgetId;
this.settings = settings;
this.disabled = disabled;
}
getEntityType() {
return action_1.EntityType.EditorInterface;
}
getEntityId() {
return this.contentTypeId;
}
async applyTo(editorInterfaces) {
editorInterfaces.addSidebarWidget(this.widgetId, this.widgetNamespace, this.settings, this.insertBeforeWidgetId, this.disabled);
}
}
exports.SidebarWidgetAddAction = SidebarWidgetAddAction;
//# sourceMappingURL=sidebarwidget-add.js.map