UNPKG

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