UNPKG

5.02 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.asyncMapClearExceptPageReduction = exports.asyncMapDeleteReductionFromAsyncKeyProp = exports.asyncMapDeletePageReduction = exports.asyncMapDeleteReduction = exports.asyncMapSetCustomReductionFromProps = exports.asyncMapSetFailureReductionFromAsyncKeyProp = exports.asyncMapSetFailureReduction = exports.asyncMapSetSuccessReductionFromAsyncKeyProp = exports.asyncMapSetSuccessReduction = exports.asyncMapSetRequestReductionFromAsyncKeyProp = exports.asyncMapSetRequestReduction = exports.asyncMapSetTrueReductionFromAsyncKeyProp = exports.asyncMapSetPageTrueReduction = exports.asyncMapSetTrueReduction = exports.FAILURE = exports.SUCCESS = exports.REQUEST = void 0;
7
8var _asyncMapOperations = require("./async-map-operations");
9
10var REQUEST = 'REQUEST';
11exports.REQUEST = REQUEST;
12var SUCCESS = 'SUCCESS';
13exports.SUCCESS = SUCCESS;
14var FAILURE = 'FAILURE';
15exports.FAILURE = FAILURE;
16
17var asyncMapSetTrueReduction = function asyncMapSetTrueReduction(key) {
18 return function (state) {
19 return (0, _asyncMapOperations.asyncMapSetOperation)(state, key);
20 };
21};
22
23exports.asyncMapSetTrueReduction = asyncMapSetTrueReduction;
24
25var asyncMapSetPageTrueReduction = function asyncMapSetPageTrueReduction() {
26 return function (state) {
27 return (0, _asyncMapOperations.asyncMapSetOperation)(state, 'page');
28 };
29};
30
31exports.asyncMapSetPageTrueReduction = asyncMapSetPageTrueReduction;
32
33var asyncMapSetTrueReductionFromAsyncKeyProp = function asyncMapSetTrueReductionFromAsyncKeyProp(payload) {
34 return function (state) {
35 return (0, _asyncMapOperations.asyncMapSetOperation)(state, payload.asyncKey);
36 };
37};
38
39exports.asyncMapSetTrueReductionFromAsyncKeyProp = asyncMapSetTrueReductionFromAsyncKeyProp;
40
41var asyncMapSetRequestReduction = function asyncMapSetRequestReduction(key) {
42 return function (state) {
43 return (0, _asyncMapOperations.asyncMapSetOperation)(state, key, REQUEST);
44 };
45};
46
47exports.asyncMapSetRequestReduction = asyncMapSetRequestReduction;
48
49var asyncMapSetRequestReductionFromAsyncKeyProp = function asyncMapSetRequestReductionFromAsyncKeyProp(payload) {
50 return function (state) {
51 return (0, _asyncMapOperations.asyncMapSetOperation)(state, payload.asyncKey, REQUEST);
52 };
53};
54
55exports.asyncMapSetRequestReductionFromAsyncKeyProp = asyncMapSetRequestReductionFromAsyncKeyProp;
56
57var asyncMapSetSuccessReduction = function asyncMapSetSuccessReduction(key) {
58 return function (state) {
59 return (0, _asyncMapOperations.asyncMapSetOperation)(state, key, SUCCESS);
60 };
61};
62
63exports.asyncMapSetSuccessReduction = asyncMapSetSuccessReduction;
64
65var asyncMapSetSuccessReductionFromAsyncKeyProp = function asyncMapSetSuccessReductionFromAsyncKeyProp(payload) {
66 return function (state) {
67 return (0, _asyncMapOperations.asyncMapSetOperation)(state, payload.asyncKey, SUCCESS);
68 };
69};
70
71exports.asyncMapSetSuccessReductionFromAsyncKeyProp = asyncMapSetSuccessReductionFromAsyncKeyProp;
72
73var asyncMapSetFailureReduction = function asyncMapSetFailureReduction(key) {
74 return function (state) {
75 return (0, _asyncMapOperations.asyncMapSetOperation)(state, key, FAILURE);
76 };
77};
78
79exports.asyncMapSetFailureReduction = asyncMapSetFailureReduction;
80
81var asyncMapSetFailureReductionFromAsyncKeyProp = function asyncMapSetFailureReductionFromAsyncKeyProp(payload) {
82 return function (state) {
83 return (0, _asyncMapOperations.asyncMapSetOperation)(state, payload.asyncKey, FAILURE);
84 };
85};
86
87exports.asyncMapSetFailureReductionFromAsyncKeyProp = asyncMapSetFailureReductionFromAsyncKeyProp;
88
89var asyncMapSetCustomReductionFromProps = function asyncMapSetCustomReductionFromProps(payload) {
90 return function (state) {
91 return (0, _asyncMapOperations.asyncMapSetOperation)(state, payload.asyncKey, payload.asyncValue);
92 };
93};
94
95exports.asyncMapSetCustomReductionFromProps = asyncMapSetCustomReductionFromProps;
96
97var asyncMapDeleteReduction = function asyncMapDeleteReduction(key) {
98 return function (state) {
99 return (0, _asyncMapOperations.asyncMapDeleteOperation)(state, key);
100 };
101};
102
103exports.asyncMapDeleteReduction = asyncMapDeleteReduction;
104
105var asyncMapDeletePageReduction = function asyncMapDeletePageReduction() {
106 return function (state) {
107 return (0, _asyncMapOperations.asyncMapDeleteOperation)(state, 'page');
108 };
109};
110
111exports.asyncMapDeletePageReduction = asyncMapDeletePageReduction;
112
113var asyncMapDeleteReductionFromAsyncKeyProp = function asyncMapDeleteReductionFromAsyncKeyProp(payload) {
114 return function (state) {
115 return (0, _asyncMapOperations.asyncMapDeleteOperation)(state, payload.asyncKey);
116 };
117};
118
119exports.asyncMapDeleteReductionFromAsyncKeyProp = asyncMapDeleteReductionFromAsyncKeyProp;
120
121var asyncMapClearExceptPageReduction = function asyncMapClearExceptPageReduction() {
122 return function (state) {
123 return (0, _asyncMapOperations.asyncMapClearOperation)(state, 'page');
124 };
125};
126
127exports.asyncMapClearExceptPageReduction = asyncMapClearExceptPageReduction;
\No newline at end of file