@evlop/commons 1.0.98 → 1.0.102

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/dist/src/adapters/getUserToken/index.d.ts.map +1 -1
  2. package/dist/src/adapters/getUserToken/index.js +6 -1
  3. package/dist/src/adapters/getUserToken/index.js.map +1 -1
  4. package/dist/src/adapters/getUserToken/index.native.js +1 -1
  5. package/dist/src/adapters/getUserToken/index.native.js.map +1 -1
  6. package/dist/src/adapters/setUserToken/index.d.ts +2 -0
  7. package/dist/src/adapters/setUserToken/index.d.ts.map +1 -0
  8. package/dist/src/adapters/setUserToken/index.js +22 -0
  9. package/dist/src/adapters/setUserToken/index.js.map +1 -0
  10. package/dist/src/adapters/setUserToken/index.native.d.ts +2 -0
  11. package/dist/src/adapters/setUserToken/index.native.d.ts.map +1 -0
  12. package/dist/src/adapters/setUserToken/index.native.js +28 -0
  13. package/dist/src/adapters/setUserToken/index.native.js.map +1 -0
  14. package/dist/src/data-sources/scopeDataSource.d.ts.map +1 -1
  15. package/dist/src/data-sources/scopeDataSource.js +9 -1
  16. package/dist/src/data-sources/scopeDataSource.js.map +1 -1
  17. package/dist/src/middlewares/restApiMiddleware.d.ts.map +1 -1
  18. package/dist/src/middlewares/restApiMiddleware.js +4 -5
  19. package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
  20. package/dist/src/reducers/{config.d.ts → config/index.d.ts} +7 -2
  21. package/dist/src/reducers/config/index.d.ts.map +1 -0
  22. package/dist/src/reducers/{config.js → config/index.js} +11 -7
  23. package/dist/src/reducers/config/index.js.map +1 -0
  24. package/dist/src/reducers/config/initialState.d.ts +6 -0
  25. package/dist/src/reducers/config/initialState.d.ts.map +1 -0
  26. package/dist/src/reducers/config/initialState.js +8 -0
  27. package/dist/src/reducers/config/initialState.js.map +1 -0
  28. package/dist/src/reducers/config/initialState.native.d.ts +6 -0
  29. package/dist/src/reducers/config/initialState.native.d.ts.map +1 -0
  30. package/dist/src/reducers/config/initialState.native.js +19 -0
  31. package/dist/src/reducers/config/initialState.native.js.map +1 -0
  32. package/dist/src/reducers/index.d.ts +7 -1
  33. package/dist/src/reducers/index.d.ts.map +1 -1
  34. package/dist/src/reducers/{pages.d.ts → pages/index.d.ts} +1 -1
  35. package/dist/src/reducers/pages/index.d.ts.map +1 -0
  36. package/dist/src/reducers/{pages.js → pages/index.js} +6 -2
  37. package/dist/src/reducers/pages/index.js.map +1 -0
  38. package/dist/src/reducers/pages/initialState.d.ts +10 -0
  39. package/dist/src/reducers/pages/initialState.d.ts.map +1 -0
  40. package/dist/src/reducers/pages/initialState.js +5 -0
  41. package/dist/src/reducers/pages/initialState.js.map +1 -0
  42. package/dist/src/reducers/pages/initialState.native.d.ts +10 -0
  43. package/dist/src/reducers/pages/initialState.native.d.ts.map +1 -0
  44. package/dist/src/reducers/pages/initialState.native.js +22 -0
  45. package/dist/src/reducers/pages/initialState.native.js.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/src/reducers/config.d.ts.map +0 -1
  48. package/dist/src/reducers/config.js.map +0 -1
  49. package/dist/src/reducers/pages.d.ts.map +0 -1
  50. package/dist/src/reducers/pages.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.ts"],"names":[],"mappings":"AAAA,wBAA8B,YAAY,oBAEzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.ts"],"names":[],"mappings":"AAAA,wBAA8B,YAAY,oBAMzC"}
@@ -11,7 +11,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  function getUserToken() {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
- return localStorage.getItem('token');
14
+ try {
15
+ return localStorage.getItem('token');
16
+ }
17
+ catch (e) {
18
+ return null;
19
+ }
15
20
  });
16
21
  }
17
22
  exports.default = getUserToken;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA8B,YAAY;;QACtC,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CAAA;AAFD,+BAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA8B,YAAY;;QACtC,IAAG;YACC,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACxC;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,IAAI,CAAC;SACf;IACL,CAAC;CAAA;AAND,+BAMC"}
@@ -22,7 +22,7 @@ function getUserToken() {
22
22
  catch (e) {
23
23
  console.log('Error getting token');
24
24
  }
25
- return '';
25
+ return null;
26
26
  });
27
27
  }
28
28
  exports.default = getUserToken;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.native.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8FAAqE;AAErE,SAA8B,YAAY;;QACtC,IAAG;YACC,MAAM,KAAK,GAAG,MAAM,uBAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YACxD,OAAO,KAAK,CAAC;SAChB;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SACtC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CAAA;AARD,+BAQC"}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/adapters/getUserToken/index.native.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8FAAqE;AAErE,SAA8B,YAAY;;QACtC,IAAG;YACC,MAAM,KAAK,GAAG,MAAM,uBAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YACxD,OAAO,KAAK,CAAC;SAChB;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CAAA;AARD,+BAQC"}
@@ -0,0 +1,2 @@
1
+ export default function setUserToken(token: string): Promise<void>;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":"AAAA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,iBAKvD"}
@@ -0,0 +1,22 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ function setUserToken(token) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ try {
15
+ localStorage.setItem('token', token);
16
+ }
17
+ catch (e) {
18
+ }
19
+ });
20
+ }
21
+ exports.default = setUserToken;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SACxC;QAAC,OAAM,CAAC,EAAC;SACT;IACL,CAAC;CAAA;AALD,+BAKC"}
@@ -0,0 +1,2 @@
1
+ export default function setUserToken(token: string): Promise<any>;
2
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":"AAEA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,gBAOvD"}
@@ -0,0 +1,28 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
16
+ function setUserToken(token) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ try {
19
+ yield async_storage_1.default.setItem('@User:token', token);
20
+ }
21
+ catch (e) {
22
+ console.log('Error setting token');
23
+ }
24
+ return null;
25
+ });
26
+ }
27
+ exports.default = setUserToken;
28
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8FAAqE;AAErE,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,MAAM,uBAAY,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SACpD;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CAAA;AAPD,+BAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"scopeDataSource.d.ts","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,QAAA,MAAM,eAAe,EAAE,WAEtB,CAAC;AAcF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"scopeDataSource.d.ts","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,QAAA,MAAM,eAAe,EAAE,WAEtB,CAAC;AAsBF,eAAe,eAAe,CAAC"}
@@ -8,7 +8,15 @@ const scopeDataSource = (options, { scope }) => {
8
8
  };
9
9
  scopeDataSource.keyExtractor = (options, { scope }) => {
10
10
  const path = lodash_1.get(options, 'path', '');
11
- return uuid_1.v5([path, JSON.stringify(lodash_1.get(scope, lodash_1.get(options, 'path')))].join(':'), constants_1.DATA_SOURCE_KEY_NAMESPACE);
11
+ const scopeValue = lodash_1.get(scope, lodash_1.get(options, 'path'));
12
+ return uuid_1.v5([
13
+ path,
14
+ JSON.stringify(scopeValue),
15
+ // to detect change in collection
16
+ lodash_1.get(scopeValue, 'page', ''),
17
+ lodash_1.get(scopeValue, 'isLoading', ''),
18
+ lodash_1.get(scopeValue, 'hasMore', ''),
19
+ ].join(':'), constants_1.DATA_SOURCE_KEY_NAMESPACE);
12
20
  };
13
21
  scopeDataSource.displayName = 'Scope';
14
22
  scopeDataSource.identifier = 'scope';
@@ -1 +1 @@
1
- {"version":3,"file":"scopeDataSource.js","sourceRoot":"","sources":["../../../src/data-sources/scopeDataSource.ts"],"names":[],"mappings":";;AAAA,mCAA6B;AAE7B,+BAAkC;AAClC,4CAAyD;AAGzD,MAAM,eAAe,GAAgB,CAAC,OAA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EAAE;IAC/C,MAAM,IAAI,GAAG,YAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,YAAG,CAAC,KAAK,EAAC,YAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,OAAO,SAAM,CAAC;QACV,IAAI;QACJ,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QAC1B,iCAAiC;QACjC,YAAG,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;QAC3B,YAAG,CAAC,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;QAChC,YAAG,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC;KACjC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,qCAAyB,CAAC,CAAA;AAC3C,CAAC,CAAC;AACF,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC;AACtC,eAAe,CAAC,UAAU,GAAG,OAAO,CAAC;AACrC,eAAe,CAAC,IAAI,GAAG,QAAQ,CAAC;AAChC,eAAe,CAAC,oBAAoB,GAAG;IACnC,EAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAG,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAC;CAEjG,CAAC;AAEF,kBAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"restApiMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,yDA6D7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"restApiMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,yDA4D7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -14,11 +14,10 @@ const apiBaseUrl = constants_1.API_BASE_URL || '/api/';
14
14
  const restApiMiddleware = (store) => (dispatch) => (action) => {
15
15
  if (action.isRestRequest) {
16
16
  return getUserToken_1.default().then((token) => {
17
- const requestOptions = {
18
- headers: {
19
- 'Authorization': `Bearer ${token}`,
20
- }
21
- };
17
+ const requestOptions = {};
18
+ if (token) {
19
+ lodash_1.set(requestOptions, ['headers', 'Authorization'], `Bearer ${token}`);
20
+ }
22
21
  let endpoint = action.endpoint;
23
22
  const isExternal = helpers_1.isExternalUrl(endpoint);
24
23
  if (!isExternal) {
@@ -1 +1 @@
1
- {"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wCAAyC;AACzC,wCAAwD;AACxD,4EAAoD;AACpD,4CAA0C;AAC1C,mCAAsC;AAEtC,MAAM,UAAU,GAAG,wBAAY,IAAI,OAAO,CAAC;AAEpC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAC,EAAE,CAAA,CAAC,QAAQ,EAAC,EAAE,CAAA,CAAC,MAAM,EAAC,EAAE;IAC5D,IAAG,MAAM,CAAC,aAAa,EAAC;QACpB,OAAO,sBAAY,EAAE,CAAC,IAAI,CAAC,CAAC,KAAa,EAAE,EAAE;YACzC,MAAM,cAAc,GAAG;gBACnB,OAAO,EAAE;oBACL,eAAe,EAAE,UAAU,KAAK,EAAE;iBACrC;aACJ,CAAC;YACF,IAAI,QAAQ,GAAU,MAAM,CAAC,QAAQ,CAAC;YACtC,MAAM,UAAU,GAAG,uBAAa,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAG,CAAC,UAAU,EAAC;gBACX,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,UAAU,IAAI,CAAC,CAAA;aAC1E;YACD,IAAG,MAAM,CAAC,UAAU,EAAC;gBACjB,0BAA0B;gBAC1B,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;gBAC9B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,QAAQ;gBACR,KAAK,aAAG;oBACJ,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC;oBAClC,OAAO,eAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,qBAAY,CAAC,cAAc,EAAE,EAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAC,CAAC,CAAC;yBAC5H,IAAI,CAAC,IAAI,CAAA,EAAE,CAAA,IAAI,CAAC,IAAI,CAAC;yBACrB,IAAI,CAAC,QAAQ,CAAA,EAAE,CAAC,QAAQ,iCAAK,MAAM,KAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAE,CAAC;yBACtF,KAAK,CAAC,CAAC,EAAC,QAAQ,EAAC,EAAC,EAAE,CAAA,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC,CAAC;aACzF;QACL,CAAC,CAAC,CAAC;KACN;;QAEG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEhC,CAAC,CAAC;AA5DW,QAAA,iBAAiB,qBA4D5B;AAEF,kBAAe,yBAAiB,CAAC"}
@@ -1,6 +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 UPDATE_CONFIG = "UPDATE_CONFIG";
4
5
  export declare const GET_CONFIG_REQUEST = "GET_CONFIG_REQUEST";
5
6
  export declare const GET_CONFIG_SUCCESS = "GET_CONFIG_SUCCESS";
6
7
  export declare const GET_CONFIG_FAILURE = "GET_CONFIG_FAILURE";
@@ -33,9 +34,13 @@ export declare const saveConfig: (data: any, configName?: string) => {
33
34
  method: any;
34
35
  isRestRequest: boolean;
35
36
  };
37
+ declare type ConfigState = {
38
+ data: any;
39
+ fields: any;
40
+ };
36
41
  declare const config: {
37
- (state: any, action: any): any;
42
+ (state: ConfigState, action: any): ConfigState;
38
43
  persist: boolean;
39
44
  };
40
45
  export default config;
41
- //# sourceMappingURL=config.d.ts.map
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,aAAa,kBAAkB,CAAC;AAE7C,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"}
@@ -1,20 +1,22 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.UPDATE_THEME = exports.ADD_SITE_PAGE = exports.ADD_SETTINGS_FIELD = void 0;
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.UPDATE_CONFIG = exports.UPDATE_THEME = exports.ADD_SITE_PAGE = exports.ADD_SETTINGS_FIELD = void 0;
4
7
  const redux_rest_1 = require("@mukti107/redux-rest");
8
+ const lodash_1 = require("lodash");
9
+ const initialState_1 = __importDefault(require("./initialState"));
5
10
  exports.ADD_SETTINGS_FIELD = 'ADD_SETTINGS_FIELD';
6
11
  exports.ADD_SITE_PAGE = 'ADD_SITE_PAGE';
7
12
  exports.UPDATE_THEME = 'UPDATE_SITE_THEME';
13
+ exports.UPDATE_CONFIG = 'UPDATE_CONFIG';
8
14
  exports.GET_CONFIG_REQUEST = 'GET_CONFIG_REQUEST';
9
15
  exports.GET_CONFIG_SUCCESS = 'GET_CONFIG_SUCCESS';
10
16
  exports.GET_CONFIG_FAILURE = 'GET_CONFIG_FAILURE';
11
17
  exports.SAVE_CONFIG_REQUEST = 'SAVE_CONFIG_REQUEST';
12
18
  exports.SAVE_CONFIG_SUCCESS = 'SAVE_CONFIG_SUCCESS';
13
19
  exports.SAVE_CONFIG_FAILURE = 'SAVE_CONFIG_FAILURE';
14
- let initialState = {
15
- fields: {},
16
- data: {},
17
- };
18
20
  function addSettingsField(field, configName = 'web') {
19
21
  return {
20
22
  type: exports.ADD_SETTINGS_FIELD,
@@ -42,11 +44,13 @@ const saveConfig = (data, configName = "web") => ({
42
44
  isRestRequest: true,
43
45
  });
44
46
  exports.saveConfig = saveConfig;
45
- const config = (state = initialState, action) => {
47
+ const config = (state = initialState_1.default, action) => {
46
48
  switch (action.type) {
47
49
  case exports.SAVE_CONFIG_SUCCESS:
48
50
  case exports.GET_CONFIG_SUCCESS:
49
51
  return Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, state.data), { [action.configName]: action.response }) });
52
+ case exports.UPDATE_CONFIG:
53
+ return Object.assign(Object.assign({}, state), { data: lodash_1.set(lodash_1.cloneDeep(state.data), action.key, action.value) });
50
54
  case exports.ADD_SETTINGS_FIELD: {
51
55
  const { fields: { [action.configName]: fields = [] } } = state;
52
56
  return Object.assign(Object.assign({}, state), { fields: Object.assign(Object.assign({}, state.fields), { [action.configName]: [...fields, action.field] }) });
@@ -57,4 +61,4 @@ const config = (state = initialState, action) => {
57
61
  };
58
62
  config.persist = true;
59
63
  exports.default = config;
60
- //# sourceMappingURL=config.js.map
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/config/index.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAAgD;AAChD,mCAAwC;AACxC,kEAAgD;AAEnC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,YAAY,GAAG,mBAAmB,CAAC;AACnC,QAAA,aAAa,GAAG,eAAe,CAAC;AAEhC,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,qB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IAC5D;QACN,KAAK,0BAAkB,CAAC,CAAA;YACpB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;YAC/D,uCACO,KAAK,KACR,MAAM,kCACC,KAAK,CAAC,MAAM,KACf,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,KAAK,CAAE,OAErD;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAEtB,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const configInitialState: {
2
+ fields: {};
3
+ data: {};
4
+ };
5
+ export default configInitialState;
6
+ //# sourceMappingURL=initialState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB;;;CAGvB,CAAA;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const configInitialState = {
4
+ fields: {},
5
+ data: {},
6
+ };
7
+ exports.default = configInitialState;
8
+ //# sourceMappingURL=initialState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.js","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.tsx"],"names":[],"mappings":";;AAAA,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAC,EAAE;CACV,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const configInitialState: {
2
+ fields: {};
3
+ data: any;
4
+ };
5
+ export default configInitialState;
6
+ //# sourceMappingURL=initialState.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.native.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,kBAAkB;;;CAGvB,CAAA;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_native_1 = require("react-native");
4
+ const { AppConstants } = react_native_1.NativeModules;
5
+ const configDataJSON = AppConstants.getConfigDataJSON();
6
+ let configData = null;
7
+ try {
8
+ configData = JSON.parse(configDataJSON);
9
+ }
10
+ catch (e) {
11
+ console.log('Error redux initial state for config');
12
+ configData = {};
13
+ }
14
+ const configInitialState = {
15
+ fields: {},
16
+ data: configData,
17
+ };
18
+ exports.default = configInitialState;
19
+ //# sourceMappingURL=initialState.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":";;AAAA,+CAA2C;AAC3C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAErC,MAAM,cAAc,GAAG,YAAY,CAAC,iBAAiB,EAAE,CAAC;AAExD,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,IAAG;IACC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;CAC3C;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,UAAU,GAAG,EAAE,CAAA;CAClB;AAED,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAC,UAAU;CAClB,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
@@ -23,7 +23,13 @@ export declare const reducers: {
23
23
  icons: (state: any, action: any) => any;
24
24
  fonts: (state: any, action: any) => any;
25
25
  config: {
26
- (state: any, action: any): any;
26
+ (state: {
27
+ data: any;
28
+ fields: any;
29
+ }, action: any): {
30
+ data: any;
31
+ fields: any;
32
+ };
27
33
  persist: boolean;
28
34
  };
29
35
  routes: (state: any, action: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/index.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,qBAAqB,KAAgC,CAAC;AACnE,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;CAmBpB,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/index.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,qBAAqB,KAAgC,CAAC;AACnE,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBpB,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,eAAe,QAAQ,CAAC"}
@@ -3,4 +3,4 @@ declare const pages: {
3
3
  persist: boolean;
4
4
  };
5
5
  export default pages;
6
- //# sourceMappingURL=pages.d.ts.map
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CA0HxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -10,7 +10,11 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
13
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ const initialState_1 = __importDefault(require("./initialState"));
14
18
  const REST_LIST_PAGES_SUCCESS = "REST_LIST_PAGES_SUCCESS";
15
19
  const REST_FIND_PAGE_SUCCESS = "REST_FIND_PAGE_SUCCESS";
16
20
  const REST_FIND_ID_PAGE_SUCCESS = "REST_FIND_ID_PAGE_SUCCESS";
@@ -21,7 +25,7 @@ const REST_QUERY_PAGE_RUNNING = "REST_QUERY_PAGE_RUNNING";
21
25
  const REST_QUERY_PAGE_FAILED = "REST_QUERY_PAGE_FAILED";
22
26
  const PAGE_BLOCKS_UPDATED = "PAGE_BLOCKS_UPDATED";
23
27
  // reducer copied from @mukti107/redux-rest
24
- const initialState = { records: { data: [], isLoading: false }, collection: {}, isLoading: 0 };
28
+ const initialState = initialState_1.default;
25
29
  const pages = function (state = initialState, action) {
26
30
  switch (action.type) {
27
31
  case REST_FIND_PAGE_SUCCESS:
@@ -95,4 +99,4 @@ const pages = function (state = initialState, action) {
95
99
  };
96
100
  pages.persist = true;
97
101
  exports.default = pages;
98
- //# sourceMappingURL=pages.js.map
102
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAA+C;AAE/C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,2CAA2C;AAE3C,MAAM,YAAY,GAAO,sBAAiB,CAAA;AAC1C,MAAM,KAAK,GAAG,UAAU,KAAK,GAAG,YAAY,EAAE,MAAW;IACjD,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,sBAAsB,CAAC;QAC5B,KAAK,uBAAuB,CAAC,CAAC;YAC1B,MAAM,KAAsB,MAAM,CAAC,QAAQ,EAArC,EAAC,IAAI,OAAgC,EAA3B,QAAQ,cAAlB,QAAmB,CAAkB,CAAC;YAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAA,EAAE,CAAA,iBAAE,EAAE,EAAC,IAAI,CAAC,GAAG,IAAK,IAAI,EAAE,CAAC,CAAC;YACzD,MAAM,EAA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C;aACnC;YAED,uCACO,KAAK,KACR,UAAU,EAAE,aAAa,EACzB,OAAO,kCACA,cAAc,KACjB,IAAI,EAAE,OAAO,OAEnB;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AAET,CAAC,CAAC;AAEF,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;AAErB,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,10 @@
1
+ declare const pagesInitialState: {
2
+ records: {
3
+ data: any[];
4
+ isLoading: boolean;
5
+ };
6
+ collection: {};
7
+ isLoading: number;
8
+ };
9
+ export default pagesInitialState;
10
+ //# sourceMappingURL=initialState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB;;;;;;;CAA4E,CAAA;AAEnG,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const pagesInitialState = { records: { data: [], isLoading: false }, collection: {}, isLoading: 0 };
4
+ exports.default = pagesInitialState;
5
+ //# sourceMappingURL=initialState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.js","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.tsx"],"names":[],"mappings":";;AAAA,MAAM,iBAAiB,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;AAEnG,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ declare const pagesInitialState: {
2
+ records: {
3
+ data: any;
4
+ isLoading: boolean;
5
+ };
6
+ collection: any;
7
+ isLoading: number;
8
+ };
9
+ export default pagesInitialState;
10
+ //# sourceMappingURL=initialState.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.native.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.native.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,iBAAiB;;;;;;;CAA2F,CAAA;AAElH,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lodash_1 = require("lodash");
4
+ const react_native_1 = require("react-native");
5
+ const { AppConstants } = react_native_1.NativeModules;
6
+ const configDataJSON = AppConstants.getPagesJSON();
7
+ let pagesArray = [];
8
+ let pagesById = {};
9
+ try {
10
+ pagesArray = JSON.parse(configDataJSON);
11
+ if (!Array.isArray(pagesArray))
12
+ throw new Error('Pages must be an array');
13
+ pagesById = lodash_1.keyBy(pagesArray, 'id');
14
+ }
15
+ catch (e) {
16
+ console.log('Error redux initial state for pages');
17
+ pagesArray = [];
18
+ pagesById = {};
19
+ }
20
+ const pagesInitialState = { records: { data: pagesArray, isLoading: false }, collection: pagesById, isLoading: 0 };
21
+ exports.default = pagesInitialState;
22
+ //# sourceMappingURL=initialState.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.native.tsx"],"names":[],"mappings":";;AAAA,mCAA+B;AAC/B,+CAA2C;AAC3C,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAErC,MAAM,cAAc,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;AAEnD,IAAI,UAAU,GAAQ,EAAE,CAAC;AACzB,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAG;IACC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACxC,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzE,SAAS,GAAG,cAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;CACvC;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACnD,UAAU,GAAG,EAAE,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;CAClB;AAED,MAAM,iBAAiB,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;AAElH,kBAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.98",
3
+ "version": "1.0.102",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/reducers/config.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAEhD,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;AAOzD,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,EAAE,UAAU,SAAQ;;;;EAMzD;AAED,eAAO,MAAM,SAAS;;;;;;;;;CAOpB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;CAQrB,CAAC;AAEH,QAAA,MAAM,MAAM;;;CAwBX,CAAA;AAID,eAAe,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/reducers/config.tsx"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CACtB,CAAC,CAAC;AARU,QAAA,UAAU,cAQpB;AAEH,MAAM,MAAM,GAAG,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,2BAAmB,CAAC;QACzB,KAAK,0BAAkB;YACnB,uCACO,KAAK,KACR,IAAI,kCACG,KAAK,CAAC,IAAI,KACb,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,QAAQ,OAE1C;QACN,KAAK,0BAAkB,CAAC,CAAA;YACpB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;YAC/D,uCACO,KAAK,KACR,MAAM,kCACC,KAAK,CAAC,MAAM,KACf,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,CAAC,KAAK,CAAE,OAErD;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA;AAED,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AAEtB,kBAAe,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/reducers/pages.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CA0HxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/reducers/pages.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AACA,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D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