@evlop/commons 1.0.276 → 1.0.278
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/middlewares/platformEventsMiddleware.d.ts.map +1 -1
- package/dist/cjs/src/middlewares/platformEventsMiddleware.js +4 -1
- package/dist/cjs/src/middlewares/platformEventsMiddleware.js.map +1 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.d.ts.map +1 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.js +4 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.js.map +1 -1
- package/dist/types/src/middlewares/platformEventsMiddleware.d.ts.map +1 -1
- package/package.json +2 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;qBAA8B,GAAG,KAAK,IAAI;aAHhD,GAAG,cAAc,GAAG,QA0BlD,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -2,8 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.platformEventsMiddleware = void 0;
|
4
4
|
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
5
|
+
const actionForwarder = (next) => (action) => next(action);
|
5
6
|
// listen to window message events and pass to redux
|
6
7
|
const platformEventsMiddleware = (store) => {
|
8
|
+
if (typeof window === 'undefined')
|
9
|
+
return actionForwarder;
|
7
10
|
if (typeof window.addEventListener === 'function') {
|
8
11
|
window.addEventListener('message', (message) => {
|
9
12
|
try {
|
@@ -23,7 +26,7 @@ const platformEventsMiddleware = (store) => {
|
|
23
26
|
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
24
27
|
}
|
25
28
|
}
|
26
|
-
return
|
29
|
+
return actionForwarder;
|
27
30
|
};
|
28
31
|
exports.platformEventsMiddleware = platformEventsMiddleware;
|
29
32
|
exports.default = exports.platformEventsMiddleware;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.js","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,oDAAoD;AAC7C,MAAM,wBAAwB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAClF,IAAG,OAAO,MAAM,CAAC,gBAAgB,KAAK,UAAU,EAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,OAAO,EAAC,EAAE;YAC1C,IAAG;gBACC,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;gBACjG,QAAO,aAAa,CAAC,IAAI,EAAC;oBACtB,KAAK,iBAAiB;wBAClB,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;wBACrC,MAAM;iBACb;aACJ;YAAC,OAAM,CAAC,EAAC,GAAE;QAChB,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE;YAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;SAC9D;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;SAC9D;KACJ;IAED,OAAO,
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.js","sourceR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kBAAe,gCAAwB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;qBAA8B,GAAG,KAAK,IAAI;aAHhD,GAAG,cAAc,GAAG,QA0BlD,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
2
|
+
const actionForwarder = (next) => (action) => next(action);
|
2
3
|
// listen to window message events and pass to redux
|
3
4
|
export const platformEventsMiddleware = (store) => {
|
5
|
+
if (typeof window === 'undefined')
|
6
|
+
return actionForwarder;
|
4
7
|
if (typeof window.addEventListener === 'function') {
|
5
8
|
window.addEventListener('message', (message) => {
|
6
9
|
try {
|
@@ -20,7 +23,7 @@ export const platformEventsMiddleware = (store) => {
|
|
20
23
|
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
21
24
|
}
|
22
25
|
}
|
23
|
-
return
|
26
|
+
return actionForwarder;
|
24
27
|
};
|
25
28
|
export default platformEventsMiddleware;
|
26
29
|
//# sourceMappingURL=platformEventsMiddleware.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.js","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAClF,IAAG,OAAO,MAAM,CAAC,gBAAgB,KAAK,UAAU,EAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,O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YAC1C,IAAG;gBACC,MAAM,aAAa,GAAG,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;gBACjG,QAAO,aAAa,CAAC,IAAI,EAAC;oBACtB,KAAK,iBAAiB;wBAClB,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;wBACrC,MAAM;iBACb;aACJ;YAAC,OAAM,CAAC,EAAC,GAAE;QAChB,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE;YAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;SAC9D;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YACf,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;SAC9D;KACJ;IAED,OAAO,eAAe,CAAC;AAC3B,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;qBAA8B,GAAG,KAAK,IAAI;aAHhD,GAAG,cAAc,GAAG,QA0BlD,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evlop/commons",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.278",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/cjs/main.js",
|
6
6
|
"module": "dist/esm/main.js",
|
@@ -28,6 +28,7 @@
|
|
28
28
|
"i18next": ">=21.8.8",
|
29
29
|
"lodash": ">=4.17.21",
|
30
30
|
"query-string": ">=7.1.0",
|
31
|
+
"react": ">=18.2.0",
|
31
32
|
"react-native": ">=0.68.2",
|
32
33
|
"react-native-vector-icons": ">=10.0.3",
|
33
34
|
"uuid": ">=8.3.2"
|