@evlop/commons 1.0.237 → 1.0.238
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/actions/restApi.js +8 -1
- package/dist/src/actions/restApi.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.js +7 -18
- package/dist/src/adapters/getUserToken/index.js.map +1 -1
- package/dist/src/adapters/getUserToken/index.native.js +9 -20
- package/dist/src/adapters/getUserToken/index.native.js.map +1 -1
- package/dist/src/classes/Model.js +5 -14
- package/dist/src/classes/Model.js.map +1 -1
- package/dist/src/components/hoc/withSettings.js +1 -12
- package/dist/src/components/hoc/withSettings.js.map +1 -1
- package/dist/src/components/hoc/withSettings.native.js +2 -13
- package/dist/src/components/hoc/withSettings.native.js.map +1 -1
- package/dist/src/constants/iconInfo/index.js +4 -5
- package/dist/src/constants/iconInfo/index.js.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/contexts/EDLContext.d.ts +7 -0
- package/dist/src/contexts/EDLContext.d.ts.map +1 -0
- package/dist/src/contexts/EDLContext.js +10 -0
- package/dist/src/contexts/EDLContext.js.map +1 -0
- package/dist/src/data-sources/collection.js +3 -12
- package/dist/src/data-sources/collection.js.map +1 -1
- package/dist/src/data-sources/collectionRecord.js +3 -12
- package/dist/src/data-sources/collectionRecord.js.map +1 -1
- package/dist/src/data-sources/listUrl.js +3 -12
- package/dist/src/data-sources/listUrl.js.map +1 -1
- package/dist/src/data-sources/url.js +3 -12
- package/dist/src/data-sources/url.js.map +1 -1
- package/dist/src/edl/BlockRenderer.d.ts +9 -0
- package/dist/src/edl/BlockRenderer.d.ts.map +1 -0
- package/dist/src/edl/BlockRenderer.js +102 -0
- package/dist/src/edl/BlockRenderer.js.map +1 -0
- package/dist/src/edl/DataSourceLoader.d.ts +7 -0
- package/dist/src/edl/DataSourceLoader.d.ts.map +1 -0
- package/dist/src/edl/DataSourceLoader.js +13 -0
- package/dist/src/edl/DataSourceLoader.js.map +1 -0
- package/dist/src/edl/elements/DataSource.d.ts +8 -0
- package/dist/src/edl/elements/DataSource.d.ts.map +1 -0
- package/dist/src/edl/elements/DataSource.js +19 -0
- package/dist/src/edl/elements/DataSource.js.map +1 -0
- package/dist/src/edl/elements/Fragment.d.ts +9 -0
- package/dist/src/edl/elements/Fragment.d.ts.map +1 -0
- package/dist/src/edl/elements/Fragment.js +14 -0
- package/dist/src/edl/elements/Fragment.js.map +1 -0
- package/dist/src/edl/elements/UseEffect.d.ts +10 -0
- package/dist/src/edl/elements/UseEffect.d.ts.map +1 -0
- package/dist/src/edl/elements/UseEffect.js +28 -0
- package/dist/src/edl/elements/UseEffect.js.map +1 -0
- package/dist/src/edl/elements/index.d.ts +17 -0
- package/dist/src/edl/elements/index.d.ts.map +1 -0
- package/dist/src/edl/elements/index.js +16 -0
- package/dist/src/edl/elements/index.js.map +1 -0
- package/dist/src/edl/index.d.ts +28 -0
- package/dist/src/edl/index.d.ts.map +1 -0
- package/dist/src/edl/index.js +107 -0
- package/dist/src/edl/index.js.map +1 -0
- package/dist/src/edl/localStorage.app.d.ts +6 -0
- package/dist/src/edl/localStorage.app.d.ts.map +1 -0
- package/dist/src/edl/localStorage.app.js +14 -0
- package/dist/src/edl/localStorage.app.js.map +1 -0
- package/dist/src/edl/localStorage.d.ts +6 -0
- package/dist/src/edl/localStorage.d.ts.map +1 -0
- package/dist/src/edl/localStorage.js +10 -0
- package/dist/src/edl/localStorage.js.map +1 -0
- package/dist/src/edl/parser.d.ts +3 -0
- package/dist/src/edl/parser.d.ts.map +1 -0
- package/dist/src/edl/parser.js +166 -0
- package/dist/src/edl/parser.js.map +1 -0
- package/dist/src/helpers/functions.js +1 -1
- package/dist/src/helpers/functions.js.map +1 -1
- package/dist/src/helpers/iconHelper.js +7 -13
- package/dist/src/helpers/iconHelper.js.map +1 -1
- package/dist/src/helpers/pathHelper.js +1 -1
- package/dist/src/helpers/pathHelper.js.map +1 -1
- package/dist/src/helpers/themeHelpers.js +23 -3
- package/dist/src/helpers/themeHelpers.js.map +1 -1
- package/dist/src/hooks/useAction.js +3 -12
- package/dist/src/hooks/useAction.js.map +1 -1
- package/dist/src/hooks/useActionable.d.ts +1 -0
- package/dist/src/hooks/useActionable.d.ts.map +1 -1
- package/dist/src/hooks/useActionable.js +3 -1
- package/dist/src/hooks/useActionable.js.map +1 -1
- package/dist/src/hooks/useComponentConfigProps.js +1 -1
- package/dist/src/hooks/useComponentConfigProps.js.map +1 -1
- package/dist/src/hooks/useDataSource.js +1 -1
- package/dist/src/hooks/useDataSource.js.map +1 -1
- package/dist/src/hooks/useNavigator.js +1 -1
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/dist/src/hooks/useParams.js +1 -1
- package/dist/src/hooks/useParams.js.map +1 -1
- package/dist/src/middlewares/dataSourceMiddleware.js +11 -22
- package/dist/src/middlewares/dataSourceMiddleware.js.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.js +5 -5
- package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
- package/dist/src/providers/Scope.js +4 -1
- package/dist/src/providers/Scope.js.map +1 -1
- package/dist/src/reducers/adminMenus.js +1 -1
- package/dist/src/reducers/adminMenus.js.map +1 -1
- package/dist/src/reducers/collection.js +66 -15
- package/dist/src/reducers/collection.js.map +1 -1
- package/dist/src/reducers/components.js +28 -7
- package/dist/src/reducers/components.js.map +1 -1
- package/dist/src/reducers/config/index.js +16 -4
- package/dist/src/reducers/config/index.js.map +1 -1
- package/dist/src/reducers/context.js +5 -16
- package/dist/src/reducers/context.js.map +1 -1
- package/dist/src/reducers/dataSource.js +14 -2
- package/dist/src/reducers/dataSource.js.map +1 -1
- package/dist/src/reducers/files.js +18 -4
- package/dist/src/reducers/files.js.map +1 -1
- package/dist/src/reducers/fonts.js +15 -6
- package/dist/src/reducers/fonts.js.map +1 -1
- package/dist/src/reducers/icons.js +3 -12
- package/dist/src/reducers/icons.js.map +1 -1
- package/dist/src/reducers/modals.js +1 -1
- package/dist/src/reducers/modals.js.map +1 -1
- package/dist/src/reducers/pages/index.js +69 -27
- package/dist/src/reducers/pages/index.js.map +1 -1
- package/dist/src/reducers/routes.js +19 -21
- package/dist/src/reducers/routes.js.map +1 -1
- package/dist/src/reducers/search.js +4 -1
- package/dist/src/reducers/search.js.map +1 -1
- package/dist/src/reducers/session.js +21 -4
- package/dist/src/reducers/session.js.map +1 -1
- package/dist/src/reducers/user.js +12 -2
- package/dist/src/reducers/user.js.map +1 -1
- package/dist/src/services/SessionManager.js +4 -1
- package/dist/src/services/SessionManager.js.map +1 -1
- package/package.json +1 -1
@@ -1,13 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
3
|
exports.dataSourceMiddleware = void 0;
|
13
4
|
const lodash_1 = require("lodash");
|
@@ -23,13 +14,11 @@ function getCurrentState(store, key) {
|
|
23
14
|
return state.dataSource.data[key];
|
24
15
|
}
|
25
16
|
// load data using the data loader from data source
|
26
|
-
function fetchData(dataSource, options, { scope, store, state }) {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
return data;
|
32
|
-
});
|
17
|
+
async function fetchData(dataSource, options, { scope, store, state }) {
|
18
|
+
if (!dataSource)
|
19
|
+
return null;
|
20
|
+
const data = await dataSource(options, { scope, dispatch: store.dispatch, state });
|
21
|
+
return data;
|
33
22
|
}
|
34
23
|
;
|
35
24
|
// convert the raw response returned into the state
|
@@ -54,7 +43,7 @@ function arrayDataToState(options, fetchDataResponse) {
|
|
54
43
|
meta: meta || {},
|
55
44
|
};
|
56
45
|
}
|
57
|
-
const dataSourceMiddleware = store => next => (action) =>
|
46
|
+
const dataSourceMiddleware = store => next => async (action) => {
|
58
47
|
switch (action.type) {
|
59
48
|
case reducers_1.DATA_SOURCE_LOAD_DATA: {
|
60
49
|
const { datasourceName, options, scope, key } = action;
|
@@ -64,7 +53,7 @@ const dataSourceMiddleware = store => next => (action) => __awaiter(void 0, void
|
|
64
53
|
return null;
|
65
54
|
const requestOptions = lodash_1.defaults({}, options, { page: 1, pageSize: 20 });
|
66
55
|
next({ type: reducers_1.DATA_SOURCE_UPDATE_DATA, key, data: lodash_1.assign({}, currentState, { isLoading: true, isRefreshing: true }) });
|
67
|
-
const data =
|
56
|
+
const data = await fetchData(dataSource, requestOptions, { scope, store, state: currentState });
|
68
57
|
let newState = data;
|
69
58
|
if (lodash_1.get(dataSource, 'type') === 'Array') {
|
70
59
|
newState = arrayDataToState(options, data);
|
@@ -83,7 +72,7 @@ const dataSourceMiddleware = store => next => (action) => __awaiter(void 0, void
|
|
83
72
|
return null;
|
84
73
|
const requestOptions = lodash_1.defaults({ page: lodash_1.get(currentState, 'page', 0) + 1 }, options, lodash_1.get(currentState, 'options'));
|
85
74
|
next({ type: reducers_1.DATA_SOURCE_UPDATE_DATA, key, data: lodash_1.assign({}, currentState, { isLoading: true, isRefreshing: false }) });
|
86
|
-
const data =
|
75
|
+
const data = await fetchData(dataSource, requestOptions, { scope, store, state: currentState });
|
87
76
|
const newItems = lodash_1.union(lodash_1.get(currentState, 'items'), lodash_1.get(data, 'items'));
|
88
77
|
const newState = arrayDataToState(requestOptions, lodash_1.assign({}, data, { items: newItems }));
|
89
78
|
return next({
|
@@ -100,7 +89,7 @@ const dataSourceMiddleware = store => next => (action) => __awaiter(void 0, void
|
|
100
89
|
return null;
|
101
90
|
const requestOptions = lodash_1.defaults({ page: lodash_1.get(currentState, 'page', 0) + 1 }, options, { pageSize: 20 });
|
102
91
|
next({ type: reducers_1.DATA_SOURCE_UPDATE_DATA, key, data: lodash_1.assign({}, currentState, { isLoading: true, isRefreshing: false }) });
|
103
|
-
const data =
|
92
|
+
const data = await fetchData(dataSource, requestOptions, { scope, store, state: currentState });
|
104
93
|
let newState = data;
|
105
94
|
if (lodash_1.get(dataSource, 'type') === 'Array') {
|
106
95
|
newState = arrayDataToState(options, data);
|
@@ -119,7 +108,7 @@ const dataSourceMiddleware = store => next => (action) => __awaiter(void 0, void
|
|
119
108
|
return null;
|
120
109
|
const requestOptions = lodash_1.defaults({ page: Math.max(1, lodash_1.get(currentState, 'page', 1) - 1) }, options, { pageSize: 20 });
|
121
110
|
next({ type: reducers_1.DATA_SOURCE_UPDATE_DATA, key, data: lodash_1.assign({}, currentState, { isLoading: true, isRefreshing: false }) });
|
122
|
-
const data =
|
111
|
+
const data = await fetchData(dataSource, requestOptions, { scope, store, state: currentState });
|
123
112
|
let newState = data;
|
124
113
|
if (lodash_1.get(dataSource, 'type') === 'Array') {
|
125
114
|
newState = arrayDataToState(options, data);
|
@@ -132,7 +121,7 @@ const dataSourceMiddleware = store => next => (action) => __awaiter(void 0, void
|
|
132
121
|
}
|
133
122
|
}
|
134
123
|
return next(action);
|
135
|
-
}
|
124
|
+
};
|
136
125
|
exports.dataSourceMiddleware = dataSourceMiddleware;
|
137
126
|
exports.default = exports.dataSourceMiddleware;
|
138
127
|
//# sourceMappingURL=dataSourceMiddleware.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataSourceMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/dataSourceMiddleware.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"dataSourceMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/dataSourceMiddleware.ts"],"names":[],"mappings":";;;AAAA,mCAA+D;AAC/D,4CAA0C;AAC1C,0CAA4L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ACjB,CAAC,CAAC;SACN;KACJ;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC;AAlFW,QAAA,oBAAoB,wBAkF/B;AAEF,kBAAe,4BAAoB,CAAC"}
|
@@ -35,33 +35,33 @@ const restApiMiddleware = (store) => {
|
|
35
35
|
dispatch({ type: action.types[0] });
|
36
36
|
return axiosClient_1.default.post(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
37
37
|
.then(resp => (resp.data))
|
38
|
-
.then(response => dispatch(
|
38
|
+
.then(response => dispatch({ ...action, success: true, type: action.types[1], response }))
|
39
39
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
40
40
|
}
|
41
41
|
case actions_1.PUT:
|
42
42
|
dispatch({ type: action.types[0] });
|
43
43
|
return axiosClient_1.default.put(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
44
44
|
.then(resp => (resp.data))
|
45
|
-
.then(response => dispatch(
|
45
|
+
.then(response => dispatch({ ...action, success: true, type: action.types[1], response }))
|
46
46
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
47
47
|
case actions_1.PATCH:
|
48
48
|
dispatch({ type: action.types[0] });
|
49
49
|
return axiosClient_1.default.patch(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
50
50
|
.then(resp => (resp.data))
|
51
|
-
.then(response => dispatch(
|
51
|
+
.then(response => dispatch({ ...action, success: true, type: action.types[1], response }))
|
52
52
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
53
53
|
case actions_1.DELETE:
|
54
54
|
dispatch({ type: action.types[0] });
|
55
55
|
return axiosClient_1.default.delete(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
56
56
|
.then(resp => (resp.data))
|
57
|
-
.then(response => dispatch(
|
57
|
+
.then(response => dispatch({ ...action, success: true, type: action.types[1], response }))
|
58
58
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
59
59
|
default:
|
60
60
|
case actions_1.GET:
|
61
61
|
dispatch({ type: action.types[0] });
|
62
62
|
return axiosClient_1.default.get(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.data }, { params: action.params, headers: action.headers }))
|
63
63
|
.then(resp => resp.data)
|
64
|
-
.then(response => dispatch(
|
64
|
+
.then(response => dispatch({ ...action, success: true, type: action.types[1], response }))
|
65
65
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
66
66
|
}
|
67
67
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,wCAA6E;AAC7E,4EAAoD;AACpD,wCAA2C;AAC3C,yEAAgD;AAEzC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAC,EAAE;IACtC,OAAO,CAAC,QAAiB,EAAC,EAAE,CAAA,CAAC,MAAU,EAAC,EAAE;QAC1C,IAAG,MAAM,CAAC,aAAa,EAAC;YACpB,OAAO,sBAAY,EAAE,CAAC,IAAI,CAAC,CAAC,KAAa,EAAE,EAAE;gBACzC,MAAM,cAAc,GAAG,EAAE,CAAC;gBAC1B,IAAG,KAAK,EAAC;oBACL,YAAG,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,UAAU,KAAK,EAAE,CAAC,CAAA;iBACvE;gBACD,IAAI,QAAQ,GAAU,MAAM,CAAC,QAAQ,CAAC;gBACtC,MAAM,UAAU,GAAG,uBAAa,CAAC,QAAQ,CAAC,CAAC;gBAC3C,IAAG,CAAC,UAAU,EAAC;oBACX,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;iBAC/C;gBACD,IAAG,MAAM,CAAC,UAAU,EAAC;oBACjB,0BAA0B;oBAC1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,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC;aAC5C;YACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC3B;IAEL,CAAC,CAAA;AAAA,CAAC,CAAC;AAjEU,QAAA,iBAAiB,qBAiE3B;AAEH,kBAAe,yBAAiB,CAAC"}
|
@@ -28,7 +28,10 @@ const hooks_1 = require("../hooks");
|
|
28
28
|
*/
|
29
29
|
const Scope = ({ name, value, children }) => {
|
30
30
|
const scope = hooks_1.useScope();
|
31
|
-
const newScope = react_1.useMemo(() => (
|
31
|
+
const newScope = react_1.useMemo(() => ({
|
32
|
+
...scope,
|
33
|
+
[name]: value
|
34
|
+
}), [scope, name, value]);
|
32
35
|
return (react_1.default.createElement(contexts_1.DataProvider, { value: newScope }, children));
|
33
36
|
};
|
34
37
|
exports.Scope = Scope;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqC;AACrC,0CAAyC;AACzC,oCAAkC;AAQlC;;GAEG;AACI,MAAM,KAAK,GAAwC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAG,QAAQ,EAAC,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,gBAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,
|
1
|
+
{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqC;AACrC,0CAAyC;AACzC,oCAAkC;AAQlC;;GAEG;AACI,MAAM,KAAK,GAAwC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAG,QAAQ,EAAC,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,gBAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,CACzB;QACI,GAAG,KAAK;QACR,CAAC,IAAI,CAAC,EAAE,KAAK;KAChB,CACJ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzB,OAAO,CACH,8BAAC,uBAAY,IAAC,KAAK,EAAE,QAAQ,IACxB,QAAQ,CACE,CAClB,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,KAAK,SAehB;AAEW,QAAA,aAAa,GAAG,aAAK,CAAC;AAEnC,kBAAe,aAAK,CAAC"}
|
@@ -22,7 +22,7 @@ let initialState = [];
|
|
22
22
|
exports.default = (state = initialState, action) => {
|
23
23
|
switch (action.type) {
|
24
24
|
case exports.ADD_ADMIN_MENU_ITEM: {
|
25
|
-
return [...state,
|
25
|
+
return [...state, { id: action.id, ...action.data }];
|
26
26
|
}
|
27
27
|
case exports.REMOVE_ADMIN_MENU_ITEM: {
|
28
28
|
return state.filter(item => item.id !== action.id);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"adminMenus.js","sourceRoot":"","sources":["../../../src/reducers/adminMenus.tsx"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,SAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI;IACrC,OAAO;QACH,IAAI,EAAE,2BAAmB;QACzB,EAAE;QACF,IAAI,EAAE,IAAI;KACb,CAAC;AACN,CAAC;AAND,4CAMC;AAED,SAAgB,mBAAmB,CAAC,EAAE;IAClC,OAAO;QACH,IAAI,EAAE,8BAAsB;QAC5B,EAAE;KACL,CAAC;AACN,CAAC;AALD,kDAKC;AAED,IAAI,YAAY,GAAO,EAAE,CAAC;AAG1B,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,2BAAmB,CAAC,CAAA;YACrB,OAAO,CAAC,GAAG,KAAK,
|
1
|
+
{"version":3,"file":"adminMenus.js","sourceRoot":"","sources":["../../../src/reducers/adminMenus.tsx"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,SAAgB,gBAAgB,CAAC,EAAE,EAAE,IAAI;IACrC,OAAO;QACH,IAAI,EAAE,2BAAmB;QACzB,EAAE;QACF,IAAI,EAAE,IAAI;KACb,CAAC;AACN,CAAC;AAND,4CAMC;AAED,SAAgB,mBAAmB,CAAC,EAAE;IAClC,OAAO;QACH,IAAI,EAAE,8BAAsB;QAC5B,EAAE;KACL,CAAC;AACN,CAAC;AALD,kDAKC;AAED,IAAI,YAAY,GAAO,EAAE,CAAC;AAG1B,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,2BAAmB,CAAC,CAAA;YACrB,OAAO,CAAC,GAAG,KAAK,EAAE,EAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,IAAI,EAAC,CAAC,CAAA;SACrD;QACD,KAAK,8BAAsB,CAAC,CAAA;YACxB,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;SACtD;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -116,55 +116,106 @@ const initialState = {
|
|
116
116
|
const collection = (state = initialState, action) => {
|
117
117
|
switch (action.type) {
|
118
118
|
case exports.REGISTER_MODEL:
|
119
|
-
return
|
119
|
+
return {
|
120
|
+
...state,
|
121
|
+
models: [
|
120
122
|
...state.models,
|
121
123
|
action.model,
|
122
|
-
].filter(m => m)
|
124
|
+
].filter(m => m)
|
125
|
+
};
|
123
126
|
case exports.UNREGISTER_MODEL:
|
124
|
-
return
|
127
|
+
return {
|
128
|
+
...state,
|
129
|
+
models: state.models.filter(model => model.collectionName !== action.model.collectionName)
|
130
|
+
};
|
125
131
|
case exports.COLLECTION_LOAD_MORE_STARTED:
|
126
132
|
case exports.COLLECTION_LOAD_PAGE_STARTED: {
|
127
133
|
const { key } = action;
|
128
134
|
const { [key]: previousState = collectionIntitialState } = state;
|
129
|
-
return
|
135
|
+
return {
|
136
|
+
...state,
|
137
|
+
[key]: {
|
138
|
+
...previousState,
|
139
|
+
isLoading: true,
|
140
|
+
}
|
141
|
+
};
|
130
142
|
}
|
131
143
|
case exports.COLLECTION_LOAD_MORE_FAILED:
|
132
144
|
case exports.COLLECTION_LOAD_PAGE_FAILED: {
|
133
145
|
const { key } = action;
|
134
146
|
const { [key]: previousState = collectionIntitialState } = state;
|
135
|
-
return
|
147
|
+
return {
|
148
|
+
...state,
|
149
|
+
[key]: {
|
150
|
+
...previousState,
|
151
|
+
isLoading: false,
|
152
|
+
}
|
153
|
+
};
|
136
154
|
}
|
137
155
|
case exports.COLLECTION_LOAD_PAGE_SUCCESS: {
|
138
156
|
const { key, response } = action;
|
139
157
|
const { [key]: previousState = collectionIntitialState } = state;
|
140
158
|
const { data: items, page, pageSize, totalPages, totalRecords } = response;
|
141
|
-
const newState =
|
159
|
+
const newState = {
|
160
|
+
...previousState,
|
161
|
+
isLoading: false,
|
162
|
+
items: items,
|
163
|
+
cache: { ...previousState.cache, ...lodash_1.keyBy(items, 'id'), ...lodash_1.keyBy(items, 'slug'), ...lodash_1.keyBy(items, '_id') },
|
164
|
+
page: +page,
|
165
|
+
pageSize,
|
142
166
|
totalPages,
|
143
|
-
totalRecords
|
144
|
-
|
167
|
+
totalRecords,
|
168
|
+
};
|
169
|
+
return {
|
170
|
+
...state,
|
171
|
+
[key]: newState,
|
172
|
+
};
|
145
173
|
}
|
146
174
|
case exports.COLLECTION_LOAD_MORE_SUCCESS: {
|
147
175
|
const { key, response } = action;
|
148
176
|
const { [key]: previousState = collectionIntitialState } = state;
|
149
177
|
const { data: items, page, pageSize, totalPages, totalRecords } = response;
|
150
|
-
const newState =
|
178
|
+
const newState = {
|
179
|
+
...previousState,
|
180
|
+
isLoading: false,
|
181
|
+
items: lodash_1.unionBy(previousState.items, items, 'id'),
|
182
|
+
cache: { ...previousState.cache, ...lodash_1.keyBy(items, 'id'), ...lodash_1.keyBy(items, 'slug'), ...lodash_1.keyBy(items, '_id') },
|
183
|
+
page: +page,
|
184
|
+
pageSize,
|
151
185
|
totalPages,
|
152
|
-
totalRecords
|
153
|
-
|
186
|
+
totalRecords,
|
187
|
+
};
|
188
|
+
return {
|
189
|
+
...state,
|
190
|
+
[key]: newState,
|
191
|
+
};
|
154
192
|
}
|
155
193
|
case exports.COLLECTION_GET_RECORD_SUCCESS: {
|
156
194
|
const { key, response } = action;
|
157
195
|
const { [key]: previousState = collectionIntitialState } = state;
|
158
196
|
const item = response;
|
159
197
|
const items = [item];
|
160
|
-
const newState =
|
161
|
-
|
198
|
+
const newState = {
|
199
|
+
...previousState,
|
200
|
+
cache: { ...previousState.cache, ...lodash_1.keyBy(items, 'id'), ...lodash_1.keyBy(items, 'slug'), ...lodash_1.keyBy(items, '_id') },
|
201
|
+
};
|
202
|
+
return {
|
203
|
+
...state,
|
204
|
+
[key]: newState,
|
205
|
+
};
|
162
206
|
}
|
163
207
|
case exports.COLLECTION_DELETE_RECORD_SUCCESS: {
|
164
208
|
const { key, pathParams: { id = null } = {} } = action;
|
165
209
|
const { [key]: previousState = collectionIntitialState } = state;
|
166
|
-
const newState =
|
167
|
-
|
210
|
+
const newState = {
|
211
|
+
...previousState,
|
212
|
+
items: lodash_1.filter(previousState.items, (item) => item.id !== id),
|
213
|
+
cache: lodash_1.omit(previousState.cache, [id]),
|
214
|
+
};
|
215
|
+
return {
|
216
|
+
...state,
|
217
|
+
[key]: newState,
|
218
|
+
};
|
168
219
|
}
|
169
220
|
default:
|
170
221
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,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KAAI,EAAE,CAAC;gBAC/D,KAAK,EAAE,aAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aACzC,CAAC;YACF,OAAO;gBACH,GAAG,KAAK;gBACR,CAAC,GAAG,CAAC,EAAE,QAAQ;aAClB,CAAC;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
@@ -97,20 +97,41 @@ const components = (state = initialState, action) => {
|
|
97
97
|
else {
|
98
98
|
newComponents.push(action.component);
|
99
99
|
}
|
100
|
-
return
|
100
|
+
return {
|
101
|
+
...state,
|
102
|
+
components: lodash_1.assign(newComponents, lodash_1.keyBy(newComponents, 'uuid'))
|
103
|
+
};
|
101
104
|
}
|
102
105
|
case exports.REGISTER_PAGE_COMPONENT:
|
103
|
-
return
|
106
|
+
return {
|
107
|
+
...state,
|
108
|
+
pageComponents: [...state.pageComponents, action.component]
|
109
|
+
};
|
104
110
|
case exports.REGISTER_FIELD_COMPONENT:
|
105
|
-
return
|
111
|
+
return {
|
112
|
+
...state,
|
113
|
+
fieldComponents: [...state.fieldComponents, { ...action.component }]
|
114
|
+
};
|
106
115
|
case exports.REGISTER_STYLE_COMPONENT:
|
107
|
-
return
|
116
|
+
return {
|
117
|
+
...state,
|
118
|
+
styleComponents: [...state.styleComponents, { ...action.component }]
|
119
|
+
};
|
108
120
|
case exports.REMOVE_PACKAGE:
|
109
|
-
return
|
121
|
+
return {
|
122
|
+
...state,
|
123
|
+
components: state.components.filter(component => component.packageName !== action.packageName)
|
124
|
+
};
|
110
125
|
case exports.ADD_COMPONENT_TO_LIST:
|
111
|
-
return
|
126
|
+
return {
|
127
|
+
...state,
|
128
|
+
list: [...state.list, action.component]
|
129
|
+
};
|
112
130
|
case exports.ADD_COMPONENT_PLUGIN:
|
113
|
-
return
|
131
|
+
return {
|
132
|
+
...state,
|
133
|
+
componentPlugins: [...state.componentPlugins, action.plugin]
|
134
|
+
};
|
114
135
|
default:
|
115
136
|
return state;
|
116
137
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/reducers/components.tsx"],"names":[],"mappings":";;;AAAA,mCAAuC;AAE1B,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AACpD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAG/C,SAAgB,oBAAoB,CAAC,SAAS;IAC1C,OAAO;QACH,IAAI,EAAE,gCAAwB;QAC9B,SAAS;KACZ,CAAC;AACN,CAAC;AALD,oDAKC;AAED,SAAgB,uBAAuB,CAAC,SAAS;IAC7C,OAAO;QACH,IAAI,EAAE,kCAA0B;QAChC,SAAS;KACZ,CAAC;AACN,CAAC;AALD,0DAKC;AAED,SAAgB,kBAAkB,CAAC,SAAS;IACxC,OAAO;QACH,IAAI,EAAE,6BAAqB;QAC3B,SAAS;KACZ,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,kBAAkB,CAAC,MAAM;IACrC,OAAO;QACH,IAAI,EAAE,4BAAoB;QAC1B,MAAM;KACT,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,iBAAiB,CAAC,SAAS;IACvC,OAAO;QACH,IAAI,EAAE,0BAAkB;QACxB,SAAS;KACZ,CAAC;AACN,CAAC;AALD,8CAKC;AAED,SAAgB,qBAAqB,CAAC,SAAS;IAC3C,OAAO;QACH,IAAI,EAAE,+BAAuB;QAC7B,SAAS;KACZ,CAAC;AACN,CAAC;AALD,sDAKC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,GAAG,KAAK;gBACR,cAAc,EAAE,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC;aAC9D,CAAC;QAEN,KAAK,gCAAwB;YACzB,OAAO;gBACH,GAAG,KAAK;gBACR,eAAe,EAAE,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,EAAC,GAAG,MAAM,CAAC,SAAS,EAAC,CAAC;aACrE,CAAC;QACN,KAAK,gCAAwB;YACzB,OAAO;gBACH,GAAG,KAAK;gBACR,eAAe,EAAE,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,EAAC,GAAG,MAAM,CAAC,SAAS,EAAC,CAAC;aACrE,CAAC;QACN,KAAK,sBAAc;YACf,OAAM;gBACF,GAAG,KAAK;gBACR,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAA,EAAE,CAAA,SAAS,CAAC,WAAW,KAAG,MAAM,CAAC,WAAW,CAAC;aAC7F,CAAC;QACN,KAAK,6BAAqB;YACtB,OAAO;gBACH,GAAG,KAAK;gBACR,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC;aAC1C,CAAC;QACN,KAAK,4BAAoB;YACrB,OAAO;gBACH,GAAG,KAAK;gBACR,gBAAgB,EAAE,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC;aAC/D,CAAC;QACN;YACI,OAAO,KAAK,CAAC;KACpB;AAEL,CAAC,CAAC;AAtDW,QAAA,UAAU,cAsDrB;AAEF,kBAAe,kBAAU,CAAC"}
|
@@ -56,20 +56,32 @@ const config = (state = initialState_1.default, action) => {
|
|
56
56
|
case exports.SAVE_CONFIG_SUCCESS:
|
57
57
|
case exports.GET_CONFIG_SUCCESS: {
|
58
58
|
const { configName, response: configData } = action;
|
59
|
-
const configDataNewState =
|
59
|
+
const configDataNewState = { ...state.data };
|
60
60
|
if (configName) {
|
61
61
|
lodash_1.set(configDataNewState, configName, configData);
|
62
62
|
}
|
63
63
|
else {
|
64
64
|
lodash_1.assign(configDataNewState, configData);
|
65
65
|
}
|
66
|
-
return
|
66
|
+
return {
|
67
|
+
...state,
|
68
|
+
data: configDataNewState,
|
69
|
+
};
|
67
70
|
}
|
68
71
|
case exports.SET_CONFIG:
|
69
|
-
return
|
72
|
+
return {
|
73
|
+
...state,
|
74
|
+
data: lodash_1.reduce(action.values, (oldState, value, path) => lodash_1.set(oldState, path, value), lodash_1.cloneDeep(state.data))
|
75
|
+
};
|
70
76
|
case exports.ADD_SETTINGS_FIELD: {
|
71
77
|
const { fields: { [action.configName]: fields = [] } } = state;
|
72
|
-
return
|
78
|
+
return {
|
79
|
+
...state,
|
80
|
+
fields: {
|
81
|
+
...state.fields,
|
82
|
+
[action.configName]: [...fields, action.field]
|
83
|
+
}
|
84
|
+
};
|
73
85
|
}
|
74
86
|
default:
|
75
87
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAAgD;AAChD,mCAAwD;AACxD,kEAAgD;AAEnC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,YAAY,GAAG,mBAAmB,CAAC;AACnC,QAAA,UAAU,GAAG,YAAY,CAAC;AAE1B,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAE1C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD,SAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK;IACtD,OAAO;QACH,IAAI,EAAE,0BAAkB;QACx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AK,CAAC;YAC/D,OAAM;gBACF,GAAG,KAAK;gBACR,MAAM,EAAE;oBACJ,GAAG,KAAK,CAAC,MAAM;oBACf,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,KAAK,CAAE;iBAClD;aACJ,CAAC;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAEtB,kBAAe,MAAM,CAAC"}
|
@@ -1,15 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
-
var t = {};
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
-
t[p] = s[p];
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
-
t[p[i]] = s[p[i]];
|
10
|
-
}
|
11
|
-
return t;
|
12
|
-
};
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
3
|
exports.updateContext = exports.resetContext = exports.addContext = exports.setContext = exports.RESET_CONTEXT = exports.ADD_CONTEXT = exports.SET_CONTEXT = void 0;
|
15
4
|
const change_case_1 = require("change-case");
|
@@ -37,15 +26,15 @@ let initialState = {};
|
|
37
26
|
const context = (state = initialState, action) => {
|
38
27
|
switch (action.type) {
|
39
28
|
case exports.SET_CONTEXT:
|
40
|
-
return
|
29
|
+
return { ...action.context };
|
41
30
|
case exports.ADD_CONTEXT:
|
42
|
-
return
|
31
|
+
return { ...state, [action.name]: action.data };
|
43
32
|
case exports.RESET_CONTEXT:
|
44
33
|
if (action.name) {
|
45
|
-
const
|
46
|
-
return
|
34
|
+
const { [action.name]: contextToRemove, ...remainingContext } = state;
|
35
|
+
return { ...remainingContext };
|
47
36
|
}
|
48
|
-
return
|
37
|
+
return { ...initialState };
|
49
38
|
default:
|
50
39
|
return state;
|
51
40
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/reducers/context.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/reducers/context.tsx"],"names":[],"mappings":";;;AAAA,6CAAwC;AAE3B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,aAAa,GAAG,eAAe,CAAC;AAEtC,MAAM,UAAU,GAAG,CAAC,OAAO,GAAC,EAAE,EAAC,EAAE,CAAA,CAAC;IACrC,IAAI,EAAE,mBAAW;IACjB,OAAO;CACV,CAAC,CAAC;AAHU,QAAA,UAAU,cAGpB;AAEI,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,GAAC,EAAE,EAAC,EAAE,CAAA,CAAC;IACxC,IAAI,EAAE,mBAAW;IACjB,IAAI,EAAE,IAAI,IAAI,uBAAS,CAAC,IAAI,CAAC;IAC7B,IAAI;CACP,CAAC,CAAC;AAJU,QAAA,UAAU,cAIpB;AAEI,MAAM,YAAY,GAAG,CAAC,IAAI,EAAC,EAAE,CAAA,CAAC;IACjC,IAAI,EAAE,qBAAa;IACnB,IAAI,EAAE,IAAI,IAAI,uBAAS,CAAC,IAAI,CAAC;CAChC,CAAC,CAAC;AAHU,QAAA,YAAY,gBAGtB;AAEU,QAAA,aAAa,GAAG,kBAAU,CAAC;AAExC,IAAI,YAAY,GAAO,EACtB,CAAC;AAEF,MAAM,OAAO,GAAI,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC7C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,mBAAW;YACZ,OAAO,EAAC,GAAG,MAAM,CAAC,OAAO,EAAC,CAAC;QAC/B,KAAK,mBAAW;YACZ,OAAO,EAAC,GAAG,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAC,MAAM,CAAC,IAAI,EAAC,CAAC;QACjD,KAAK,qBAAa;YACd,IAAG,MAAM,CAAC,IAAI,EAAE;gBACZ,MAAM,EAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAC,GAAG,KAAK,CAAC;gBACpE,OAAO,EAAC,GAAG,gBAAgB,EAAC,CAAC;aAChC;YAAC,OAAO,EAAC,GAAG,YAAY,EAAC,CAAC;QAC/B;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -34,11 +34,23 @@ exports.default = (state = initialState, action) => {
|
|
34
34
|
switch (action.type) {
|
35
35
|
case exports.REGISTER_DATA_SOURCE: {
|
36
36
|
const { dataSource } = action;
|
37
|
-
return
|
37
|
+
return {
|
38
|
+
...state,
|
39
|
+
dataSources: {
|
40
|
+
...state.dataSources,
|
41
|
+
[dataSource.identifier]: dataSource
|
42
|
+
},
|
43
|
+
};
|
38
44
|
}
|
39
45
|
case exports.DATA_SOURCE_UPDATE_DATA: {
|
40
46
|
const { key, data } = action;
|
41
|
-
return
|
47
|
+
return {
|
48
|
+
...state,
|
49
|
+
data: {
|
50
|
+
...state.data,
|
51
|
+
[key]: data,
|
52
|
+
}
|
53
|
+
};
|
42
54
|
}
|
43
55
|
default:
|
44
56
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataSource.js","sourceRoot":"","sources":["../../../src/reducers/dataSource.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AACpD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,+BAA+B,GAAG,iCAAiC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IAAI,EAAE,4BAAoB;QAC1B,UAAU;KACb,CAAC;AACN,CAAC;AALD,gDAKC;AAED,SAAgB,UAAU,CAAC,GAAW,EAAE,IAAS;IAC7C,OAAO;QACH,IAAI,EAAE,+BAAuB;QAC7B,GAAG;QACH,IAAI;KACP,CAAC;AACN,CAAC;AAND,gCAMC;AAED,IAAI,YAAY,GAAO;IACnB,WAAW,EAAE,EAAE;IACf,IAAI,EAAE,EAAE;CACX,CAAC;AAGF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,4BAAoB,CAAC,CAAA;YACtB,MAAM,EAAC,UAAU,EAAC,GAAG,MAAM,CAAC;YAC5B,OAAO;gBACH,GAAG,KAAK;gBACR,WAAW,EAAE;oBACT,GAAG,KAAK,CAAC,WAAW;oBACpB,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU;iBACtC;aACJ,CAAA;SACJ;QACD,KAAK,+BAAuB,CAAC,CAAA;YACzB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAC,GAAG,MAAM,CAAC;YAC3B,OAAO;gBACH,GAAG,KAAK;gBACR,IAAI,EAAC;oBACD,GAAG,KAAK,CAAC,IAAI;oBACb,CAAC,GAAG,CAAC,EAAC,IAAI;iBACb;aACJ,CAAA;SACJ;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
@@ -70,13 +70,27 @@ const initialState = {
|
|
70
70
|
const files = (state = initialState, action) => {
|
71
71
|
switch (action.type) {
|
72
72
|
case exports.GET_FILES_REQUEST:
|
73
|
-
return
|
73
|
+
return {
|
74
|
+
...state,
|
75
|
+
files: [...state.files],
|
76
|
+
loading: true,
|
77
|
+
};
|
74
78
|
case exports.GET_FILES_SUCCESS:
|
75
|
-
return
|
79
|
+
return {
|
80
|
+
...state,
|
81
|
+
loading: false,
|
82
|
+
loaded: true,
|
83
|
+
files: [...action.response]
|
84
|
+
};
|
76
85
|
case exports.UPLOAD_FILE_REQUEST:
|
77
|
-
return
|
86
|
+
return {
|
87
|
+
...state,
|
88
|
+
files: [{ etag: Math.random(), loading: true }, ...state.files]
|
89
|
+
};
|
78
90
|
case exports.UPLOAD_FILE_FAILURE:
|
79
|
-
return
|
91
|
+
return {
|
92
|
+
...state,
|
93
|
+
};
|
80
94
|
default:
|
81
95
|
return state;
|
82
96
|
}
|