@evlop/commons 1.0.150 → 1.0.152
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/helpers/handlebarHelpers.js.map +1 -1
- 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/helpers/remoteAction.d.ts +11 -0
- package/dist/src/helpers/remoteAction.d.ts.map +1 -0
- package/dist/src/helpers/remoteAction.js +20 -0
- package/dist/src/helpers/remoteAction.js.map +1 -0
- package/dist/src/middlewares/platformEventsMiddleware.web.js +1 -1
- package/dist/src/middlewares/platformEventsMiddleware.web.js.map +1 -1
- package/dist/src/providers/I18nProvider.d.ts.map +1 -1
- package/dist/src/providers/I18nProvider.js +2 -1
- package/dist/src/providers/I18nProvider.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handlebarHelpers.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.ts"],"names":[],"mappings":";;;;;AAAA,0FAA2D;AAC3D,oDAA4B;AAC5B,mCAA+B;
|
1
|
+
{"version":3,"file":"handlebarHelpers.js","sourceRoot":"","sources":["../../../src/helpers/handlebarHelpers.ts"],"names":[],"mappings":";;;;;AAAA,0FAA2D;AAC3D,oDAA4B;AAC5B,mCAA+B;AAC/B,6EAAqD;AAErD,2BAAU,CAAC,cAAc,CAAC,MAAM,EAAE,UAAS,OAAO;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC;AAEH,2BAAU,CAAC,cAAc,CAAC,MAAM,EAAE,UAAS,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM;IACrE,MAAM,UAAU,GAAW,OAAO,MAAM,KAAK,QAAQ,CAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACtE,MAAM,UAAU,GAAG,gBAAM,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
{"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,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
@@ -17,4 +17,5 @@ __exportStar(require("./themeHelpers"), exports);
|
|
17
17
|
__exportStar(require("./base64"), exports);
|
18
18
|
__exportStar(require("./i18nHelpers"), exports);
|
19
19
|
__exportStar(require("./analytics"), exports);
|
20
|
+
__exportStar(require("./remoteAction"), exports);
|
20
21
|
//# sourceMappingURL=index.js.map
|
@@ -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,8CAA4B"}
|
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,8CAA4B;AAC5B,iDAA+B"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Action } from '../hooks';
|
2
|
+
declare type ActionHandeller = (Action: any) => void;
|
3
|
+
declare type UnsubscribeActionHandeller = () => void;
|
4
|
+
declare class RemoteAction {
|
5
|
+
private eventEmitter;
|
6
|
+
do(action: Action): void;
|
7
|
+
onAction(actionHandeller: ActionHandeller): UnsubscribeActionHandeller;
|
8
|
+
}
|
9
|
+
export declare const remoteAction: RemoteAction;
|
10
|
+
export default remoteAction;
|
11
|
+
//# sourceMappingURL=remoteAction.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"remoteAction.d.ts","sourceRoot":"","sources":["../../../src/helpers/remoteAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,aAAK,eAAe,GAAG,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;AACxC,aAAK,0BAA0B,GAAG,MAAM,IAAI,CAAC;AAE7C,cAAM,YAAY;IACd,OAAO,CAAC,YAAY,CAAsB;IAE1C,EAAE,CAAC,MAAM,EAAE,MAAM;IAIjB,QAAQ,CAAC,eAAe,EAAE,eAAe,GAAG,0BAA0B;CAMzE;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.remoteAction = void 0;
|
4
|
+
const events_1 = require("events");
|
5
|
+
class RemoteAction {
|
6
|
+
constructor() {
|
7
|
+
this.eventEmitter = new events_1.EventEmitter();
|
8
|
+
}
|
9
|
+
do(action) {
|
10
|
+
this.eventEmitter.emit('executeAction', action);
|
11
|
+
}
|
12
|
+
onAction(actionHandeller) {
|
13
|
+
const handleAction = (action) => actionHandeller(action);
|
14
|
+
this.eventEmitter.addListener('executeAction', handleAction);
|
15
|
+
return () => this.eventEmitter.removeListener('executeAction', handleAction);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
exports.remoteAction = new RemoteAction();
|
19
|
+
exports.default = exports.remoteAction;
|
20
|
+
//# sourceMappingURL=remoteAction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"remoteAction.js","sourceRoot":"","sources":["../../../src/helpers/remoteAction.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAMtC,MAAM,YAAY;IAAlB;QACY,iBAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;IAY9C,CAAC;IAVG,EAAE,CAAC,MAAc;QACb,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IAED,QAAQ,CAAC,eAAgC;QACrC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAC,EAAE,CAAA,eAAe,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,eAAe,EAAC,YAAY,CAAC,CAAC;QAC5D,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IACjF,CAAC;CAEJ;AAEY,QAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAE/C,kBAAe,oBAAY,CAAC"}
|
@@ -5,7 +5,7 @@ exports.platformEventsMiddleware = void 0;
|
|
5
5
|
const platformEventsMiddleware = (store) => {
|
6
6
|
window.addEventListener('message', (message) => {
|
7
7
|
try {
|
8
|
-
const messageObject = JSON.parse(message.data);
|
8
|
+
const messageObject = typeof message.data === 'string' ? JSON.parse(message.data) : message.data;
|
9
9
|
if (messageObject.type === 'REDUX_ACTION') {
|
10
10
|
store.dispatch(messageObject.action);
|
11
11
|
}
|
@@ -1 +1 @@
|
|
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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,
|
1
|
+
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EA+ChC,CAAA;AAED,eAAe,YAAY,CAAC"}
|
@@ -52,7 +52,7 @@ const I18nProvider = ({ children }) => {
|
|
52
52
|
return () => i18ninstance_1.default.off("languageChanged", languageChangeHandeller);
|
53
53
|
}, [setLanguage]);
|
54
54
|
react_1.useEffect(() => {
|
55
|
-
const resourceChangeHandeller = () => setVersion(Date.now());
|
55
|
+
const resourceChangeHandeller = lodash_1.debounce(() => setVersion(Date.now()), 200);
|
56
56
|
i18ninstance_1.default.on("added", resourceChangeHandeller);
|
57
57
|
i18ninstance_1.default.on("removed", resourceChangeHandeller);
|
58
58
|
return () => {
|
@@ -62,6 +62,7 @@ const I18nProvider = ({ children }) => {
|
|
62
62
|
}, []);
|
63
63
|
react_1.useEffect(() => {
|
64
64
|
lodash_1.forEach(i18nResources, (values, language) => i18ninstance_1.default.addResources(language, 'common', values));
|
65
|
+
setVersion(Date.now());
|
65
66
|
}, [i18nResources]);
|
66
67
|
const i18nScope = react_1.useMemo(() => ({ v: version, language }), [version, language]);
|
67
68
|
return (react_1.default.createElement(Scope_1.ScopeProvider, { name: "i18n", value: i18nScope }, children));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyC;AACzC,+CAAuE;AACvE,6CAAqD;AACrD,6EAAqD;AACrD,kDAA+C;AAC/C,0CAA8C;AAC9C,mCAAwC;AAEjC,MAAM,YAAY,GAAa,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACnD,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,qBAAS,CAAC,MAAM,CAAC,CAAC;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,gBAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,yBAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1D,MAAM,W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