2016-06-10 00:16:01 -03:00
|
|
|
import auth from './auth';
|
|
|
|
import config from './config';
|
2016-08-11 18:21:32 -03:00
|
|
|
import editor from './editor';
|
2016-06-10 00:16:01 -03:00
|
|
|
import entries, * as fromEntries from './entries';
|
2016-09-06 13:04:17 -03:00
|
|
|
import editorialWorkflow, * as fromEditorialWorkflow from './editorialWorkflow';
|
2016-06-10 00:16:01 -03:00
|
|
|
import entryDraft from './entryDraft';
|
|
|
|
import collections from './collections';
|
|
|
|
import medias, * as fromMedias from './medias';
|
|
|
|
|
|
|
|
const reducers = {
|
|
|
|
auth,
|
|
|
|
config,
|
|
|
|
collections,
|
2016-08-11 18:21:32 -03:00
|
|
|
editor,
|
2016-06-10 00:16:01 -03:00
|
|
|
entries,
|
2016-09-06 13:04:17 -03:00
|
|
|
editorialWorkflow,
|
2016-06-10 00:16:01 -03:00
|
|
|
entryDraft,
|
|
|
|
medias
|
|
|
|
};
|
|
|
|
|
|
|
|
export default reducers;
|
|
|
|
|
2016-09-06 13:04:17 -03:00
|
|
|
/*
|
|
|
|
* Selectors
|
|
|
|
*/
|
2016-06-10 00:16:01 -03:00
|
|
|
export const selectEntry = (state, collection, slug) =>
|
|
|
|
fromEntries.selectEntry(state.entries, collection, slug);
|
|
|
|
|
|
|
|
export const selectEntries = (state, collection) =>
|
|
|
|
fromEntries.selectEntries(state.entries, collection);
|
|
|
|
|
2016-09-06 13:04:17 -03:00
|
|
|
export const selectUnpublishedEntry = (state, status, slug) =>
|
|
|
|
fromEditorialWorkflow.selectUnpublishedEntry(state.editorialWorkflow, status, slug);
|
|
|
|
|
|
|
|
export const selectUnpublishedEntries = (state, status) =>
|
|
|
|
fromEditorialWorkflow.selectUnpublishedEntries(state.editorialWorkflow, status);
|
|
|
|
|
2016-07-19 17:11:22 -03:00
|
|
|
export const getMedia = (state, path) =>
|
|
|
|
fromMedias.getMedia(state.medias, path);
|