@tiendanube/nexo 0.2.3 → 0.3.0-rc1
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/core/transporter.js +6 -5
- package/dist/actions/index.d.ts +1 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/index.d.ts +10 -0
- package/package.json +2 -2
package/core/transporter.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerIframe = exports.suscribeAndUnsuscribeHandlers = exports.createHandler = void 0;
|
|
4
|
+
var actions_1 = require("../actions");
|
|
4
5
|
var dispatchMessage = function (message) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
if (!('postMessage' in window.parent)) {
|
|
6
|
+
var windowParent = window.parent === window ? window.opener : window.parent;
|
|
7
|
+
if (!('postMessage' in windowParent)) {
|
|
9
8
|
console.error('can not send a event', message);
|
|
10
9
|
}
|
|
11
10
|
logger('dispatched', message.type, message.payload);
|
|
12
|
-
|
|
11
|
+
windowParent.postMessage(message, '*');
|
|
12
|
+
if (message.type === actions_1.ACTION_NAVIGATE_GOTO)
|
|
13
|
+
window.close();
|
|
13
14
|
};
|
|
14
15
|
var createHandler = function (type, callback) {
|
|
15
16
|
return function (message) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './actions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './helpers';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { create, NexoClient } from './core/nexoClient';
|
|
2
|
+
declare const nexo: {
|
|
3
|
+
create: ({ clientId, log, }: {
|
|
4
|
+
clientId: string;
|
|
5
|
+
log?: boolean | undefined;
|
|
6
|
+
}) => import("./core/nexoClient").NexoClient;
|
|
7
|
+
};
|
|
8
|
+
export * from './actions';
|
|
9
|
+
export * from './helpers';
|
|
10
|
+
export default nexo;
|
package/package.json
CHANGED