@evlop/commons 1.0.278 → 1.0.280
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/edl/index.js +2 -2
- package/dist/cjs/src/edl/index.js.map +1 -1
- package/dist/cjs/src/helpers/communicationBridgeHelper.d.ts +2 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.d.ts.map +1 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.js +42 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.js.map +1 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.native.d.ts +2 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.native.d.ts.map +1 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.native.js +6 -0
- package/dist/cjs/src/helpers/communicationBridgeHelper.native.js.map +1 -0
- package/dist/cjs/src/helpers/index.d.ts +1 -0
- package/dist/cjs/src/helpers/index.d.ts.map +1 -1
- package/dist/cjs/src/helpers/index.js +1 -0
- package/dist/cjs/src/helpers/index.js.map +1 -1
- package/dist/cjs/src/middlewares/index.d.ts +0 -1
- package/dist/cjs/src/middlewares/index.d.ts.map +1 -1
- package/dist/cjs/src/middlewares/index.js +0 -1
- package/dist/cjs/src/middlewares/index.js.map +1 -1
- package/dist/esm/src/edl/index.js +3 -3
- package/dist/esm/src/edl/index.js.map +1 -1
- package/dist/esm/src/helpers/communicationBridgeHelper.d.ts +2 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.d.ts.map +1 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.js +35 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.js.map +1 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.native.d.ts +2 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.native.d.ts.map +1 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.native.js +2 -0
- package/dist/esm/src/helpers/communicationBridgeHelper.native.js.map +1 -0
- package/dist/esm/src/helpers/index.d.ts +1 -0
- package/dist/esm/src/helpers/index.d.ts.map +1 -1
- package/dist/esm/src/helpers/index.js +1 -0
- package/dist/esm/src/helpers/index.js.map +1 -1
- package/dist/esm/src/middlewares/index.d.ts +0 -1
- package/dist/esm/src/middlewares/index.d.ts.map +1 -1
- package/dist/esm/src/middlewares/index.js +0 -1
- package/dist/esm/src/middlewares/index.js.map +1 -1
- package/dist/types/src/helpers/communicationBridgeHelper.d.ts +2 -0
- package/dist/types/src/helpers/communicationBridgeHelper.d.ts.map +1 -0
- package/dist/types/src/helpers/communicationBridgeHelper.native.d.ts +2 -0
- package/dist/types/src/helpers/communicationBridgeHelper.native.d.ts.map +1 -0
- package/dist/types/src/helpers/index.d.ts +1 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -1
- package/dist/types/src/middlewares/index.d.ts +0 -1
- package/dist/types/src/middlewares/index.d.ts.map +1 -1
- package/package.json +4 -16
- package/dist/cjs/src/middlewares/platformEventsMiddleware.d.ts +0 -5
- package/dist/cjs/src/middlewares/platformEventsMiddleware.d.ts.map +0 -1
- package/dist/cjs/src/middlewares/platformEventsMiddleware.js +0 -33
- package/dist/cjs/src/middlewares/platformEventsMiddleware.js.map +0 -1
- package/dist/cjs/src/middlewares/platformEventsMiddleware.native.d.ts +0 -3
- package/dist/cjs/src/middlewares/platformEventsMiddleware.native.d.ts.map +0 -1
- package/dist/cjs/src/middlewares/platformEventsMiddleware.native.js +0 -7
- package/dist/cjs/src/middlewares/platformEventsMiddleware.native.js.map +0 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.d.ts +0 -5
- package/dist/esm/src/middlewares/platformEventsMiddleware.d.ts.map +0 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.js +0 -29
- package/dist/esm/src/middlewares/platformEventsMiddleware.js.map +0 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.native.d.ts +0 -3
- package/dist/esm/src/middlewares/platformEventsMiddleware.native.d.ts.map +0 -1
- package/dist/esm/src/middlewares/platformEventsMiddleware.native.js +0 -3
- package/dist/esm/src/middlewares/platformEventsMiddleware.native.js.map +0 -1
- package/dist/types/src/middlewares/platformEventsMiddleware.d.ts +0 -5
- package/dist/types/src/middlewares/platformEventsMiddleware.d.ts.map +0 -1
- package/dist/types/src/middlewares/platformEventsMiddleware.native.d.ts +0 -3
- package/dist/types/src/middlewares/platformEventsMiddleware.native.d.ts.map +0 -1
@@ -120,7 +120,7 @@ const RenderEDL = ({ edl, data: staticData, dataSources, scopes: scopesToInject
|
|
120
120
|
...datasourceData,
|
121
121
|
...lodash_1.mapValues(scopesToInject, (scopeName) => scope[scopeName]),
|
122
122
|
}), [staticData, datasourceData, scope, scopesToInject]);
|
123
|
-
const renderContext = react_1.useMemo(() =>
|
123
|
+
const renderContext = react_1.useMemo(() => ({
|
124
124
|
setState: setState,
|
125
125
|
setStates,
|
126
126
|
state,
|
@@ -132,7 +132,7 @@ const RenderEDL = ({ edl, data: staticData, dataSources, scopes: scopesToInject
|
|
132
132
|
...renderContextStaticValues,
|
133
133
|
...lodash_1.mapValues(renderContextScopes, scopeName => scope[scopeName]),
|
134
134
|
...runtimeData,
|
135
|
-
}), [scope, setState, runtimeData, setRuntimeData, state, renderData
|
135
|
+
}), [scope, setState, runtimeData, setRuntimeData, state, renderData]);
|
136
136
|
const dataSourceLoaders = react_1.useMemo(() => lodash_1.map(dataSources, (dataSource, name) => (react_1.default.createElement(DataSourceLoader_1.default, { key: name, name: name, dataSource: dataSource, setDatasourceData: setDatasourceData }))), [dataSources]);
|
137
137
|
const renderedBlocks = react_1.useMemo(() => edlBlockRenderer.renderBlocks(blocks, renderContext, null), [blocks, renderContext]);
|
138
138
|
return react_1.useMemo(() => react_1.default.createElement(EDLContext_1.EDLProvider, { value: { setRuntimeData }, children: [...dataSourceLoaders, ...renderedBlocks] }), [dataSourceLoaders, renderedBlocks]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/edl/index.tsx"],"names":[],"mapp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,KAAK,EAAE,GAAG,QA+BjD"}
|
@@ -0,0 +1,42 @@
|
|
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.initCommunicationBridge = void 0;
|
7
|
+
const remoteAction_1 = __importDefault(require("./remoteAction"));
|
8
|
+
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
9
|
+
const TYPE_APP_ACTION = 'APP_ACTION';
|
10
|
+
function initCommunicationBridge(store) {
|
11
|
+
if (typeof window === 'undefined')
|
12
|
+
return;
|
13
|
+
let requiresBridgeMode = false;
|
14
|
+
if (window.parent !== window) {
|
15
|
+
requiresBridgeMode = true;
|
16
|
+
window.parent.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
17
|
+
}
|
18
|
+
if (window.opener) {
|
19
|
+
requiresBridgeMode = true;
|
20
|
+
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
21
|
+
}
|
22
|
+
if (!requiresBridgeMode)
|
23
|
+
return;
|
24
|
+
if (typeof window.addEventListener === 'function') {
|
25
|
+
window.addEventListener('message', (message) => {
|
26
|
+
try {
|
27
|
+
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
28
|
+
switch (messageObject.type) {
|
29
|
+
case TYPE_REDUX_ACTION:
|
30
|
+
store.dispatch(messageObject.action);
|
31
|
+
break;
|
32
|
+
case TYPE_APP_ACTION:
|
33
|
+
remoteAction_1.default.do(messageObject.action);
|
34
|
+
break;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
catch (e) { }
|
38
|
+
});
|
39
|
+
}
|
40
|
+
}
|
41
|
+
exports.initCommunicationBridge = initCommunicationBridge;
|
42
|
+
//# sourceMappingURL=communicationBridgeHelper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.js","sourceR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AAM,CAAC,EAAC,GAAE;QAChB,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AA/BD,0DA+BC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.native.d.ts","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,QAAG"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.initCommunicationBridge = void 0;
|
4
|
+
function initCommunicationBridge(store) { }
|
5
|
+
exports.initCommunicationBridge = initCommunicationBridge;
|
6
|
+
//# sourceMappingURL=communicationBridgeHelper.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.native.js","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.native.ts"],"names":[],"mappings":";;;AAAA,SAAgB,uBAAuB,CAAC,KAAU,IAAE,CAAC;AAArD,0DAAqD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
11
|
};
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./communicationBridgeHelper"), exports);
|
13
14
|
__exportStar(require("./handlebarHelpers"), exports);
|
14
15
|
__exportStar(require("./functions"), exports);
|
15
16
|
__exportStar(require("./commonStyles"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,iDAA+B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAA4C;AAC5C,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,iDAA+B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
@@ -13,5 +13,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./restApiMiddleware"), exports);
|
14
14
|
__exportStar(require("./socketMiddleware"), exports);
|
15
15
|
__exportStar(require("./dataSourceMiddleware"), exports);
|
16
|
-
__exportStar(require("./platformEventsMiddleware"), exports);
|
17
16
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { map, mapValues, memoize } from 'lodash';
|
2
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
3
3
|
import DataSourceLoader from './DataSourceLoader';
|
4
4
|
import coreElements from './elements';
|
@@ -95,7 +95,7 @@ const RenderEDL = ({ edl, data: staticData, dataSources, scopes: scopesToInject
|
|
95
95
|
...datasourceData,
|
96
96
|
...mapValues(scopesToInject, (scopeName) => scope[scopeName]),
|
97
97
|
}), [staticData, datasourceData, scope, scopesToInject]);
|
98
|
-
const renderContext = useMemo(() =>
|
98
|
+
const renderContext = useMemo(() => ({
|
99
99
|
setState: setState,
|
100
100
|
setStates,
|
101
101
|
state,
|
@@ -107,7 +107,7 @@ const RenderEDL = ({ edl, data: staticData, dataSources, scopes: scopesToInject
|
|
107
107
|
...renderContextStaticValues,
|
108
108
|
...mapValues(renderContextScopes, scopeName => scope[scopeName]),
|
109
109
|
...runtimeData,
|
110
|
-
}), [scope, setState, runtimeData, setRuntimeData, state, renderData
|
110
|
+
}), [scope, setState, runtimeData, setRuntimeData, state, renderData]);
|
111
111
|
const dataSourceLoaders = useMemo(() => map(dataSources, (dataSource, name) => (React.createElement(DataSourceLoader, { key: name, name: name, dataSource: dataSource, setDatasourceData: setDatasourceData }))), [dataSources]);
|
112
112
|
const renderedBlocks = useMemo(() => edlBlockRenderer.renderBlocks(blocks, renderContext, null), [blocks, renderContext]);
|
113
113
|
return useMemo(() => React.createElement(EDLProvider, { value: { setRuntimeData }, children: [...dataSourceLoaders, ...renderedBlocks] }), [dataSourceLoaders, renderedBlocks]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/edl/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/edl/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,GAAG,EAAE,SAAS,EAAE,OAAO,EAAU,MAAM,QAAQ,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,YAAY,MAAM,YAAY,CAAC;AACtC,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AA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C,GAAE,EAAE,CAAA,oBAAC,WAAW,IAAC,KAAK,EAAE,EAAC,cAAc,EAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,iBAAiB,EAAE,GAAG,cAAc,CAAC,GAAI,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC;AACzJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,MAAM,EAAE,SAAS;IACjB,eAAe;IACf,gBAAgB;IAChB,oBAAoB,EAAE,6BAA6B;IACnD,qBAAqB,EAAE,8BAA8B;IACrD,6BAA6B;IAC7B,8BAA8B;IAC9B,2BAA2B;IAC3B,0BAA0B;IAC1B,UAAU;IACV,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,gBAAgB;CAC1B,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.d.ts","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.ts"],"names":[],"mappings":"AAKA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,QA+BjD"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import remoteAction from "./remoteAction";
|
2
|
+
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
3
|
+
const TYPE_APP_ACTION = 'APP_ACTION';
|
4
|
+
export function initCommunicationBridge(store) {
|
5
|
+
if (typeof window === 'undefined')
|
6
|
+
return;
|
7
|
+
let requiresBridgeMode = false;
|
8
|
+
if (window.parent !== window) {
|
9
|
+
requiresBridgeMode = true;
|
10
|
+
window.parent.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
11
|
+
}
|
12
|
+
if (window.opener) {
|
13
|
+
requiresBridgeMode = true;
|
14
|
+
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
15
|
+
}
|
16
|
+
if (!requiresBridgeMode)
|
17
|
+
return;
|
18
|
+
if (typeof window.addEventListener === 'function') {
|
19
|
+
window.addEventListener('message', (message) => {
|
20
|
+
try {
|
21
|
+
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
22
|
+
switch (messageObject.type) {
|
23
|
+
case TYPE_REDUX_ACTION:
|
24
|
+
store.dispatch(messageObject.action);
|
25
|
+
break;
|
26
|
+
case TYPE_APP_ACTION:
|
27
|
+
remoteAction.do(messageObject.action);
|
28
|
+
break;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
catch (e) { }
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
35
|
+
//# sourceMappingURL=communicationBridgeHelper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.js","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,eAAe,GAAG,YAAY,CAAC;AAErC,MAAM,UAAU,uBAAuB,CAAC,KAAU;IAC9C,IAAG,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAEzC,IAAI,kBAAkB,GAAG,KAAK,CAAC;IAE/B,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE;QAC1B,kBAAkB,GAAG,IAAI,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;KAC9D;IACD,IAAI,MAAM,CAAC,MAAM,EAAE;QACf,kBAAkB,GAAG,IAAI,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;KAC9D;IAED,IAAG,CAAC,kBAAkB;QAAE,OAAO;IAE/B,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;oBACV,KAAK,eAAe;wBAChB,YAAY,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;wBACtC,MAAM;iBACb;aACJ;YAAC,OAAM,CAAC,EAAC,GAAE;QAChB,CAAC,CAAC,CAAC;KACN;AACL,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.native.d.ts","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,QAAG"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.native.js","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.native.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,uBAAuB,CAAC,KAAU,IAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.d.ts","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.ts"],"names":[],"mappings":"AAKA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,QA+BjD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationBridgeHelper.native.d.ts","sourceRoot":"","sources":["../../../../src/helpers/communicationBridgeHelper.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,QAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/middlewares/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
package/package.json
CHANGED
@@ -1,26 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evlop/commons",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.280",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/cjs/main.js",
|
6
6
|
"module": "dist/esm/main.js",
|
7
7
|
"types": "dist/types/main.d.ts",
|
8
8
|
"exports": {
|
9
|
-
".":
|
10
|
-
|
11
|
-
|
12
|
-
"types": "./dist/types/main.d.ts"
|
13
|
-
},
|
14
|
-
"./helpers/*": {
|
15
|
-
"require": "./dist/cjs/src/helpers/*.js",
|
16
|
-
"import": "./dist/esm/src/helpers/*.js",
|
17
|
-
"types": "./dist/types/src/helpers/*.d.ts"
|
18
|
-
},
|
19
|
-
"./constants/*": {
|
20
|
-
"require": "./dist/cjs/src/constants/*.js",
|
21
|
-
"import": "./dist/esm/src/constants/*.js",
|
22
|
-
"types": "./dist/types/src/constants/*.d.ts"
|
23
|
-
}
|
9
|
+
".": "./dist/cjs/main.js",
|
10
|
+
"./helpers/*": "./dist/cjs/src/helpers/*.js",
|
11
|
+
"./constants/*": "./dist/cjs/src/constants/*.js"
|
24
12
|
},
|
25
13
|
"peerDependencies": {
|
26
14
|
"change-case": ">=4.1.2",
|
@@ -1 +0,0 @@
|
|
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,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.platformEventsMiddleware = void 0;
|
4
|
-
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
5
|
-
const actionForwarder = (next) => (action) => next(action);
|
6
|
-
// listen to window message events and pass to redux
|
7
|
-
const platformEventsMiddleware = (store) => {
|
8
|
-
if (typeof window === 'undefined')
|
9
|
-
return actionForwarder;
|
10
|
-
if (typeof window.addEventListener === 'function') {
|
11
|
-
window.addEventListener('message', (message) => {
|
12
|
-
try {
|
13
|
-
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
14
|
-
switch (messageObject.type) {
|
15
|
-
case TYPE_REDUX_ACTION:
|
16
|
-
store.dispatch(messageObject.action);
|
17
|
-
break;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
catch (e) { }
|
21
|
-
});
|
22
|
-
if (window.parent !== window) {
|
23
|
-
window.parent.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
24
|
-
}
|
25
|
-
if (window.opener) {
|
26
|
-
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
27
|
-
}
|
28
|
-
}
|
29
|
-
return actionForwarder;
|
30
|
-
};
|
31
|
-
exports.platformEventsMiddleware = platformEventsMiddleware;
|
32
|
-
exports.default = exports.platformEventsMiddleware;
|
33
|
-
//# sourceMappingURL=platformEventsMiddleware.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.js","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.tsx"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC,MAAM,eAAe,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAErE,oDAAoD;AAC7C,MAAM,wBAAwB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAClF,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,eAAe,CAAC;IAC1D,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,eAAe,CAAC;AAC3B,CAAC,CAAC;AAvBW,QAAA,wBAAwB,4BAuBnC;AAEF,kBAAe,gCAAwB,CAAC"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,7 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
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,29 +0,0 @@
|
|
1
|
-
const TYPE_REDUX_ACTION = 'REDUX_ACTION';
|
2
|
-
const actionForwarder = (next) => (action) => next(action);
|
3
|
-
// listen to window message events and pass to redux
|
4
|
-
export const platformEventsMiddleware = (store) => {
|
5
|
-
if (typeof window === 'undefined')
|
6
|
-
return actionForwarder;
|
7
|
-
if (typeof window.addEventListener === 'function') {
|
8
|
-
window.addEventListener('message', (message) => {
|
9
|
-
try {
|
10
|
-
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
11
|
-
switch (messageObject.type) {
|
12
|
-
case TYPE_REDUX_ACTION:
|
13
|
-
store.dispatch(messageObject.action);
|
14
|
-
break;
|
15
|
-
}
|
16
|
-
}
|
17
|
-
catch (e) { }
|
18
|
-
});
|
19
|
-
if (window.parent !== window) {
|
20
|
-
window.parent.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
21
|
-
}
|
22
|
-
if (window.opener) {
|
23
|
-
window.opener.postMessage({ type: 'LOAD_COMPLETED' }, '*');
|
24
|
-
}
|
25
|
-
}
|
26
|
-
return actionForwarder;
|
27
|
-
};
|
28
|
-
export default platformEventsMiddleware;
|
29
|
-
//# sourceMappingURL=platformEventsMiddleware.js.map
|
@@ -1 +0,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C;AAC3B,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"platformEventsMiddleware.native.js","sourceRoot":"","sources":["../../../../src/middlewares/platformEventsMiddleware.native.tsx"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAS,EAAE,EAAE,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAEpG,eAAe,wBAAwB,CAAC"}
|
@@ -1 +0,0 @@
|
|
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 +0,0 @@
|
|
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"}
|