@evlop/commons 1.0.163 → 1.0.164
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/middlewares/platformEventsMiddleware.d.ts +3 -1
- package/dist/src/middlewares/platformEventsMiddleware.d.ts.map +1 -1
- package/dist/src/middlewares/platformEventsMiddleware.js +13 -1
- package/dist/src/middlewares/platformEventsMiddleware.js.map +1 -1
- package/dist/src/middlewares/platformEventsMiddleware.native.d.ts +3 -0
- package/dist/src/middlewares/platformEventsMiddleware.native.d.ts.map +1 -0
- package/dist/src/middlewares/platformEventsMiddleware.native.js +7 -0
- package/dist/src/middlewares/platformEventsMiddleware.native.js.map +1 -0
- package/package.json +1 -1
- package/dist/src/middlewares/platformEventsMiddleware.web.d.ts +0 -5
- package/dist/src/middlewares/platformEventsMiddleware.web.d.ts.map +0 -1
- package/dist/src/middlewares/platformEventsMiddleware.web.js +0 -19
- package/dist/src/middlewares/platformEventsMiddleware.web.js.map +0 -1
@@ -1,3 +1,5 @@
|
|
1
|
-
export declare const platformEventsMiddleware: (store:
|
1
|
+
export declare const platformEventsMiddleware: (store: {
|
2
|
+
dispatch: (arg0: any) => void;
|
3
|
+
}) => (next: any) => (action: any) => any;
|
2
4
|
export default platformEventsMiddleware;
|
3
5
|
//# sourceMappingURL=platformEventsMiddleware.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB;qBAA8B,GAAG,KAAK,IAAI;aAW7D,GAAG,cAAc,GAAG,QACrC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -1,7 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.platformEventsMiddleware = void 0;
|
4
|
-
|
4
|
+
// listen to window message events and pass to redux
|
5
|
+
const platformEventsMiddleware = (store) => {
|
6
|
+
window.addEventListener('message', (message) => {
|
7
|
+
try {
|
8
|
+
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
9
|
+
if (messageObject.type === 'REDUX_ACTION') {
|
10
|
+
store.dispatch(messageObject.action);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
catch (e) { }
|
14
|
+
});
|
15
|
+
return (next) => (action) => next(action);
|
16
|
+
};
|
5
17
|
exports.platformEventsMiddleware = platformEventsMiddleware;
|
6
18
|
exports.default = exports.platformEventsMiddleware;
|
7
19
|
//# sourceMappingURL=platformEventsMiddleware.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":";;;AAAA,oDAAoD;AAC7C,MAAM,wBAAwB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAClF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,OAAO,EAAC,EAAE;QAC1C,IAAG;YACC,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;YACjG,IAAG,aAAa,CAAC,IAAI,KAAK,cAAc,EAAC;gBACrC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;aACxC;SACJ;QAAC,OAAM,CAAC,EAAC,GAAE;IAChB,CAAC,CAAC,CAAC;IAGH,OAAO,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxD,CAAC,CAAC;AAZW,QAAA,wBAAwB,4BAYnC;AAEF,kBAAe,gCAAwB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.native.d.ts","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.native.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,UAAU,GAAG,YAAY,GAAG,cAAc,GAAG,QAAiB,CAAC;AAEpG,eAAe,wBAAwB,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.platformEventsMiddleware = void 0;
|
4
|
+
const platformEventsMiddleware = (store) => (next) => (action) => next(action);
|
5
|
+
exports.platformEventsMiddleware = platformEventsMiddleware;
|
6
|
+
exports.default = exports.platformEventsMiddleware;
|
7
|
+
//# sourceMappingURL=platformEventsMiddleware.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"platformEventsMiddleware.native.js","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.native.tsx"],"names":[],"mappings":";;;AACO,MAAM,wBAAwB,GAAG,CAAC,KAAS,EAAE,EAAE,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAAvF,QAAA,wBAAwB,4BAA+D;AAEpG,kBAAe,gCAAwB,CAAC"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.web.d.ts","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.web.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB;qBAA8B,GAAG,KAAK,IAAI;aAW7D,GAAG,cAAc,GAAG,QACrC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.platformEventsMiddleware = void 0;
|
4
|
-
// listen to window message events and pass to redux
|
5
|
-
const platformEventsMiddleware = (store) => {
|
6
|
-
window.addEventListener('message', (message) => {
|
7
|
-
try {
|
8
|
-
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
9
|
-
if (messageObject.type === 'REDUX_ACTION') {
|
10
|
-
store.dispatch(messageObject.action);
|
11
|
-
}
|
12
|
-
}
|
13
|
-
catch (e) { }
|
14
|
-
});
|
15
|
-
return (next) => (action) => next(action);
|
16
|
-
};
|
17
|
-
exports.platformEventsMiddleware = platformEventsMiddleware;
|
18
|
-
exports.default = exports.platformEventsMiddleware;
|
19
|
-
//# sourceMappingURL=platformEventsMiddleware.web.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.web.js","sourceRoot":"","sources":["../../../src/middlewares/platformEventsMiddleware.web.tsx"],"names":[],"mappings":";;;AAAA,oDAAoD;AAC7C,MAAM,wBAAwB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAClF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,OAAO,EAAC,EAAE;QAC1C,IAAG;YACC,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;YACjG,IAAG,aAAa,CAAC,IAAI,KAAK,cAAc,EAAC;gBACrC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;aACxC;SACJ;QAAC,OAAM,CAAC,EAAC,GAAE;IAChB,CAAC,CAAC,CAAC;IAGH,OAAO,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxD,CAAC,CAAC;AAZW,QAAA,wBAAwB,4BAYnC;AAEF,kBAAe,gCAAwB,CAAC"}
|