@evlop/commons 1.0.122 → 1.0.123
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const ADD_SETTINGS_FIELD = "ADD_SETTINGS_FIELD";
|
2
2
|
export declare const ADD_SITE_PAGE = "ADD_SITE_PAGE";
|
3
3
|
export declare const UPDATE_THEME = "UPDATE_SITE_THEME";
|
4
|
-
export declare const
|
4
|
+
export declare const SET_CONFIG = "SET_CONFIG";
|
5
5
|
export declare const GET_CONFIG_REQUEST = "GET_CONFIG_REQUEST";
|
6
6
|
export declare const GET_CONFIG_SUCCESS = "GET_CONFIG_SUCCESS";
|
7
7
|
export declare const GET_CONFIG_FAILURE = "GET_CONFIG_FAILURE";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAChD,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAChD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,EAAE,UAAU,SAAQ;;;;EAMzD;AAED,eAAO,MAAM,SAAS;;;;;;;;;CAOpB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;CAQrB,CAAC;AAEH,aAAK,WAAW,GAAG;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,GAAG,CAAA;CAAE,CAAC;AAE9C,QAAA,MAAM,MAAM;;;CA6BX,CAAA;AAID,eAAe,MAAM,CAAC"}
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.saveConfig = exports.getConfig = exports.addSettingsField = exports.SAVE_CONFIG_FAILURE = exports.SAVE_CONFIG_SUCCESS = exports.SAVE_CONFIG_REQUEST = exports.GET_CONFIG_FAILURE = exports.GET_CONFIG_SUCCESS = exports.GET_CONFIG_REQUEST = exports.
|
6
|
+
exports.saveConfig = exports.getConfig = exports.addSettingsField = exports.SAVE_CONFIG_FAILURE = exports.SAVE_CONFIG_SUCCESS = exports.SAVE_CONFIG_REQUEST = exports.GET_CONFIG_FAILURE = exports.GET_CONFIG_SUCCESS = exports.GET_CONFIG_REQUEST = exports.SET_CONFIG = exports.UPDATE_THEME = exports.ADD_SITE_PAGE = exports.ADD_SETTINGS_FIELD = void 0;
|
7
7
|
const redux_rest_1 = require("@mukti107/redux-rest");
|
8
8
|
const lodash_1 = require("lodash");
|
9
9
|
const initialState_1 = __importDefault(require("./initialState"));
|
10
10
|
exports.ADD_SETTINGS_FIELD = 'ADD_SETTINGS_FIELD';
|
11
11
|
exports.ADD_SITE_PAGE = 'ADD_SITE_PAGE';
|
12
12
|
exports.UPDATE_THEME = 'UPDATE_SITE_THEME';
|
13
|
-
exports.
|
13
|
+
exports.SET_CONFIG = 'SET_CONFIG';
|
14
14
|
exports.GET_CONFIG_REQUEST = 'GET_CONFIG_REQUEST';
|
15
15
|
exports.GET_CONFIG_SUCCESS = 'GET_CONFIG_SUCCESS';
|
16
16
|
exports.GET_CONFIG_FAILURE = 'GET_CONFIG_FAILURE';
|
@@ -49,8 +49,8 @@ const config = (state = initialState_1.default, action) => {
|
|
49
49
|
case exports.SAVE_CONFIG_SUCCESS:
|
50
50
|
case exports.GET_CONFIG_SUCCESS:
|
51
51
|
return Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, state.data), { [action.configName]: action.response }) });
|
52
|
-
case exports.
|
53
|
-
return Object.assign(Object.assign({}, state), { data: lodash_1.set(lodash_1.cloneDeep(state.data)
|
52
|
+
case exports.SET_CONFIG:
|
53
|
+
return Object.assign(Object.assign({}, state), { data: lodash_1.reduce(action.values, (oldState, value, path) => lodash_1.set(oldState, path, value), lodash_1.cloneDeep(state.data)) });
|
54
54
|
case exports.ADD_SETTINGS_FIELD: {
|
55
55
|
const { fields: { [action.configName]: fields = [] } } = state;
|
56
56
|
return Object.assign(Object.assign({}, state), { fields: Object.assign(Object.assign({}, state.fields), { [action.configName]: [...fields, action.field] }) });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAAgD;AAChD,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAAgD;AAChD,mCAAgD;AAChD,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;AAC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