@evlop/commons 1.0.114 → 1.0.117
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/helpers/base64/index.d.ts +3 -0
- package/dist/src/helpers/base64/index.d.ts.map +1 -0
- package/dist/src/helpers/base64/index.js +6 -0
- package/dist/src/helpers/base64/index.js.map +1 -0
- package/dist/src/helpers/base64/index.native.d.ts +3 -0
- package/dist/src/helpers/base64/index.native.d.ts.map +1 -0
- package/dist/src/helpers/base64/index.native.js +10 -0
- package/dist/src/helpers/base64/index.native.js.map +1 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/index.js +1 -0
- package/dist/src/helpers/index.js.map +1 -1
- package/dist/src/hooks/useScope.d.ts.map +1 -1
- package/dist/src/hooks/useScope.js +2 -2
- package/dist/src/hooks/useScope.js.map +1 -1
- package/dist/src/reducers/config/initialState.native.d.ts.map +1 -1
- package/dist/src/reducers/config/initialState.native.js +7 -3
- package/dist/src/reducers/config/initialState.native.js.map +1 -1
- package/dist/src/reducers/pages/initialState.native.js +7 -3
- package/dist/src/reducers/pages/initialState.native.js.map +1 -1
- package/package.json +3 -2
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/base64/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAO,CAAC;AACjC,eAAO,MAAM,YAAY,aAAO,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/base64/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,IAAI,CAAC;AACpB,QAAA,YAAY,GAAG,IAAI,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/helpers/base64/index.native.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,KAAgB,CAAC;AAC1C,eAAO,MAAM,YAAY,KAAgB,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.decodeBase64 = exports.encodeBase64 = void 0;
|
7
|
+
const react_native_base64_1 = __importDefault(require("react-native-base64"));
|
8
|
+
exports.encodeBase64 = react_native_base64_1.default.encode;
|
9
|
+
exports.decodeBase64 = react_native_base64_1.default.decode;
|
10
|
+
//# sourceMappingURL=index.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/helpers/base64/index.native.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAyC;AAE5B,QAAA,YAAY,GAAG,6BAAM,CAAC,MAAM,CAAC;AAC7B,QAAA,YAAY,GAAG,6BAAM,CAAC,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
@@ -14,4 +14,5 @@ require("./handlebarHelpers");
|
|
14
14
|
__exportStar(require("./functions"), exports);
|
15
15
|
__exportStar(require("./commonStyles"), exports);
|
16
16
|
__exportStar(require("./themeHelpers"), exports);
|
17
|
+
__exportStar(require("./base64"), exports);
|
17
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8BAA4B;AAC5B,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useScope.d.ts","sourceRoot":"","sources":["../../../src/hooks/useScope.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useScope.d.ts","sourceRoot":"","sources":["../../../src/hooks/useScope.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,mBAAoB,MAAM,iBAAiB,GAAG,QAMlE,CAAC;AAEF,OAAO,EAAC,QAAQ,IAAI,OAAO,EAAC,CAAC"}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.useData = exports.useScope = void 0;
|
4
|
+
const lodash_1 = require("lodash");
|
4
5
|
const react_1 = require("react");
|
5
6
|
const contexts_1 = require("../contexts");
|
6
7
|
const useScope = (scopeVariable, defaultValue) => {
|
7
8
|
const scope = react_1.useContext(contexts_1.DataContext);
|
8
9
|
if (scopeVariable) {
|
9
|
-
|
10
|
-
return value;
|
10
|
+
return lodash_1.get(scope, scopeVariable, defaultValue);
|
11
11
|
}
|
12
12
|
return scope;
|
13
13
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useScope.js","sourceRoot":"","sources":["../../../src/hooks/useScope.tsx"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,0CAA0C;AAEnC,MAAM,QAAQ,GAAG,CAAC,aAAsB,EAAE,YAAkB,EAAC,EAAE;IAClE,MAAM,KAAK,GAAS,kBAAU,CAAC,sBAAW,CAAC,CAAC;IAC5C,IAAG,aAAa,EAAC;QACb,
|
1
|
+
{"version":3,"file":"useScope.js","sourceRoot":"","sources":["../../../src/hooks/useScope.tsx"],"names":[],"mappings":";;;AAAA,mCAA6B;AAC7B,iCAAmC;AACnC,0CAA0C;AAEnC,MAAM,QAAQ,GAAG,CAAC,aAAsB,EAAE,YAAkB,EAAC,EAAE;IAClE,MAAM,KAAK,GAAS,kBAAU,CAAC,sBAAW,CAAC,CAAC;IAC5C,IAAG,aAAa,EAAC;QACb,OAAO,YAAG,CAAC,KAAK,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;KAClD;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB;AAEkB,kBARP,gBAAQ,CAQM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initialState.native.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"initialState.native.d.ts","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,kBAAkB;;;CAGvB,CAAA;AAED,eAAe,kBAAkB,CAAC"}
|
@@ -1,14 +1,18 @@
|
|
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
6
|
const react_native_1 = require("react-native");
|
4
7
|
const { AppConstants } = react_native_1.NativeModules;
|
5
|
-
const
|
8
|
+
const react_native_base64_1 = __importDefault(require("react-native-base64"));
|
6
9
|
let configData = null;
|
7
10
|
try {
|
8
|
-
|
11
|
+
const configDataJSONBase64 = AppConstants.getConfigDataJSONBase64();
|
12
|
+
configData = JSON.parse(react_native_base64_1.default.decode(configDataJSONBase64));
|
9
13
|
}
|
10
14
|
catch (e) {
|
11
|
-
console.log('Error redux initial state for config');
|
15
|
+
console.log('Error redux initial state for config', e);
|
12
16
|
configData = {};
|
13
17
|
}
|
14
18
|
const configInitialState = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/config/initialState.native.tsx"],"names":[],"mappings":"
|
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;AACrC,8EAAyC;AAGzC,IAAI,UAAU,GAAG,IAAI,CAAC;AAEtB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAC;IACpE,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,6BAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAChE;AAAA,OAAM,CAAC,EAAC;IACL,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;IACvD,UAAU,GAAG,EAAE,CAAA;CAClB;AAED,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAC,UAAU;CAClB,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
|
@@ -1,19 +1,23 @@
|
|
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
6
|
const lodash_1 = require("lodash");
|
4
7
|
const react_native_1 = require("react-native");
|
5
8
|
const { AppConstants } = react_native_1.NativeModules;
|
6
|
-
const
|
9
|
+
const react_native_base64_1 = __importDefault(require("react-native-base64"));
|
7
10
|
let pagesArray = [];
|
8
11
|
let pagesById = {};
|
9
12
|
try {
|
10
|
-
|
13
|
+
const configDataJSONBase64 = AppConstants.getPagesJSONBase64();
|
14
|
+
pagesArray = JSON.parse(react_native_base64_1.default.decode(configDataJSONBase64));
|
11
15
|
if (!Array.isArray(pagesArray))
|
12
16
|
throw new Error('Pages must be an array');
|
13
17
|
pagesById = lodash_1.keyBy(pagesArray, 'id');
|
14
18
|
}
|
15
19
|
catch (e) {
|
16
|
-
console.log('Error redux initial state for pages');
|
20
|
+
console.log('Error redux initial state for pages', e);
|
17
21
|
pagesArray = [];
|
18
22
|
pagesById = {};
|
19
23
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initialState.native.js","sourceRoot":"","sources":["../../../../src/reducers/pages/initialState.native.tsx"],"names":[],"mappings":"
|
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;AACrC,8EAAyC;AAEzC,IAAI,UAAU,GAAQ,EAAE,CAAC;AACzB,IAAI,SAAS,GAAQ,EAAE,CAAC;AAExB,IAAG;IACC,MAAM,oBAAoB,GAAG,YAAY,CAAC,kBAAkB,EAAE,CAAC;IAC/D,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,6BAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7D,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,EAAE,CAAC,CAAC,CAAC;IACtD,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.
|
3
|
+
"version": "1.0.117",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"peerDependencies": {
|
@@ -27,7 +27,8 @@
|
|
27
27
|
"optionalDependencies": {},
|
28
28
|
"dependencies": {
|
29
29
|
"@evlop/web-components": "^1.0.21",
|
30
|
-
"moment": "^2.29.1"
|
30
|
+
"moment": "^2.29.1",
|
31
|
+
"react-native-base64": "^0.2.1"
|
31
32
|
},
|
32
33
|
"scripts": {
|
33
34
|
"prepack": " rm -rf dist && tsc",
|