Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
($injector, sdPlanningStore, extensionPoints, functionPoints, assignments, deployConfig) => {
ng.register($injector);
const callback = (extension, scope) => (
sdPlanningStore.initWorkspace(WORKSPACE.AUTHORING, (store) => {
store.dispatch(actions.fetchAgendas());
extension.props.store = store;
scope.$watch('selected.preview', (newValue) => {
extension.props.store.dispatch(actions.main.onQueueItemChange(newValue));
});
})
);
ng.waitForServicesToBeAvailable()
.then(() => {
extensionPoints.register('publish_queue:preview',
PublishQueuePanel, {}, ['selected'],
callback);
});
deployConfig.promise.then(() => {
if (get(deployConfig, 'config.planning_check_for_assignment_on_publish', false)) {
functionPoints.register(
'authoring:publish',
assignments.onPublishFromAuthoring
);
}
});
},
]);