@git-temporal/git-temporal-react
Version:
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43 lines (42 loc) • 1.46 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ActionTypes_1 = require("./ActionTypes");
const commits_1 = require("app/actions/commits");
exports.selectPath = path => (dispatch, _getState) => {
const actualPath = path.replace(/\{(.*)\s=>\s(.*)\}/g, '$2');
dispatch(commits_1.fetchCommitsIfNeeded(actualPath));
return { selectedPath: actualPath, type: ActionTypes_1.ActionTypes.SELECT_PATH };
};
exports.setAuthorsContainerSort = (sort) => ({
sort,
type: ActionTypes_1.ActionTypes.SET_AUTHORS_CONTAINER_SORT,
});
exports.setSearch = (search) => ({
search,
type: ActionTypes_1.ActionTypes.SET_SEARCH,
});
exports.setStartDate = (startDate) => ({
startDate,
type: ActionTypes_1.ActionTypes.SET_START_DATE,
});
exports.setEndDate = (endDate) => ({
endDate,
type: ActionTypes_1.ActionTypes.SET_END_DATE,
});
exports.setCommitsContainerSort = (sort) => ({
sort,
type: ActionTypes_1.ActionTypes.SET_COMMITS_CONTAINER_SORT,
});
exports.setFilesContainerSort = (sort) => ({
sort,
type: ActionTypes_1.ActionTypes.SET_FILES_CONTAINER_SORT,
});
exports.setOpenSidePanelGroup = (group) => ({
group,
type: ActionTypes_1.ActionTypes.SET_OPEN_SIDEPANEL_GROUP,
});
exports.highlightCommits = commitIds => ({
commitIds,
type: ActionTypes_1.ActionTypes.HIGHLIGHT_COMMITS,
});
exports.requestRerender = () => ({ type: ActionTypes_1.ActionTypes.REQUEST_RERENDER });