@monei-js/components 1.7.1 → 1.7.2
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/bizum/types.d.ts +3 -1
- package/dist/cofidis/types.d.ts +1 -0
- package/dist/cofidisLoan/types.d.ts +1 -0
- package/dist/components.cjs.development.js +131 -53
- package/dist/components.cjs.development.js.map +1 -1
- package/dist/components.cjs.production.min.js +1 -1
- package/dist/components.cjs.production.min.js.map +1 -1
- package/dist/components.esm.js +131 -53
- package/dist/components.esm.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/paymentRequest/types.d.ts +1 -0
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
- package/types/component.d.ts +3 -5
package/dist/components.esm.js
CHANGED
|
@@ -993,32 +993,35 @@ var globalConfig = {
|
|
|
993
993
|
var stageConfig = {
|
|
994
994
|
local: {
|
|
995
995
|
paymentPageUrl: "http://localhost:8080/",
|
|
996
|
-
posPaymentPageUrl: "http://
|
|
997
|
-
cardInputUrl: "http://
|
|
998
|
-
paymentModalUrl: "http://
|
|
999
|
-
paypalUrl: "http://
|
|
1000
|
-
bizumUrl: "http://
|
|
1001
|
-
bizumButtonUrl: "http://
|
|
1002
|
-
googlePayUrl: "http://
|
|
996
|
+
posPaymentPageUrl: "http://localhost:8080/",
|
|
997
|
+
cardInputUrl: "http://localhost:3001/" + version + "/inner-card-input/",
|
|
998
|
+
paymentModalUrl: "http://localhost:3002/" + version + "/inner-payment-modal/",
|
|
999
|
+
paypalUrl: "http://localhost:3003/" + version + "/inner-paypal/",
|
|
1000
|
+
bizumUrl: "http://localhost:3004/" + version + "/inner-bizum/",
|
|
1001
|
+
bizumButtonUrl: "http://localhost:3005/" + version + "/inner-bizum-button/",
|
|
1002
|
+
googlePayUrl: "http://localhost:3006/" + version + "/inner-google-pay/",
|
|
1003
1003
|
paymentRequestUrl: "https://monei-local.ngrok.io/" + version + "/inner-payment-request/",
|
|
1004
|
-
click2PayUrl: "http://
|
|
1005
|
-
click2PayButtonUrl: "http://
|
|
1006
|
-
cofidisUrl: "http://
|
|
1007
|
-
cofidisButtonUrl: "http://
|
|
1008
|
-
cofidisWidgetUrl: "http://
|
|
1009
|
-
cofidisLoanUrl: "http://
|
|
1010
|
-
cofidisLoanButtonUrl: "http://
|
|
1011
|
-
cofidisLoanWidgetUrl: "http://
|
|
1004
|
+
click2PayUrl: "http://localhost:3008/inner-click2pay/",
|
|
1005
|
+
click2PayButtonUrl: "http://localhost:3009/inner-click2pay-button/",
|
|
1006
|
+
cofidisUrl: "http://localhost:3010/" + version + "/inner-cofidis/",
|
|
1007
|
+
cofidisButtonUrl: "http://localhost:3011/" + version + "/inner-cofidis-button/",
|
|
1008
|
+
cofidisWidgetUrl: "http://localhost:3012/" + version + "/inner-cofidis-widget/",
|
|
1009
|
+
cofidisLoanUrl: "http://localhost:3013/" + version + "/inner-cofidis-loan/",
|
|
1010
|
+
cofidisLoanButtonUrl: "http://localhost:3014/" + version + "/inner-cofidis-loan-button/",
|
|
1011
|
+
cofidisLoanWidgetUrl: "http://localhost:3015/" + version + "/inner-cofidis-loan-widget/",
|
|
1012
1012
|
apiUrl: 'https://api.monei.com/v1',
|
|
1013
|
-
secureDomain: 'https://secure.monei.com'
|
|
1013
|
+
secureDomain: 'https://secure.monei.com',
|
|
1014
|
+
rootDomain: 'monei.com'
|
|
1014
1015
|
},
|
|
1015
1016
|
dev: {
|
|
1016
1017
|
apiUrl: 'https://api.microapps-staging.com/v1',
|
|
1017
|
-
secureDomain: 'https://secure.microapps-staging.com'
|
|
1018
|
+
secureDomain: 'https://secure.microapps-staging.com',
|
|
1019
|
+
rootDomain: 'microapps-staging.com'
|
|
1018
1020
|
},
|
|
1019
1021
|
prod: {
|
|
1020
1022
|
apiUrl: 'https://api.monei.com/v1',
|
|
1021
|
-
secureDomain: 'https://secure.monei.com'
|
|
1023
|
+
secureDomain: 'https://secure.monei.com',
|
|
1024
|
+
rootDomain: 'monei.com'
|
|
1022
1025
|
}
|
|
1023
1026
|
};
|
|
1024
1027
|
var config = /*#__PURE__*/_extends({}, globalConfig, stageConfig[stage]);
|
|
@@ -5623,7 +5626,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
5623
5626
|
var _result = {};
|
|
5624
5627
|
|
|
5625
5628
|
var _loop3 = function _loop3(key) {
|
|
5626
|
-
if (!item.hasOwnProperty(key)) return
|
|
5629
|
+
if (!item.hasOwnProperty(key)) return 1;
|
|
5627
5630
|
defineLazyProp(_result, key, function () {
|
|
5628
5631
|
var itemKey = fullKey ? fullKey + "." + key : "" + key;
|
|
5629
5632
|
var child = replacer(item[key], key, itemKey);
|
|
@@ -7351,7 +7354,8 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
7351
7354
|
if (messages) {
|
|
7352
7355
|
markWindowKnown(source);
|
|
7353
7356
|
|
|
7354
|
-
var
|
|
7357
|
+
var _ret,
|
|
7358
|
+
_loop = function _loop() {
|
|
7355
7359
|
var message = messages[_i2];
|
|
7356
7360
|
if (receivedMessages.has(message.id)) return {
|
|
7357
7361
|
v: void 0
|
|
@@ -7465,9 +7469,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
7465
7469
|
};
|
|
7466
7470
|
|
|
7467
7471
|
for (var _i2 = 0; _i2 < messages.length; _i2++) {
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
if ("object" == typeof _ret) return _ret.v;
|
|
7472
|
+
if (_ret = _loop()) return _ret.v;
|
|
7471
7473
|
}
|
|
7472
7474
|
}
|
|
7473
7475
|
}
|
|
@@ -7799,8 +7801,8 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
7799
7801
|
|
|
7800
7802
|
function lib_global_getGlobal(win) {
|
|
7801
7803
|
if (!isSameDomain(win)) throw new Error("Can not get global for window on different domain");
|
|
7802
|
-
win.
|
|
7803
|
-
return win.
|
|
7804
|
+
win.__zoid_10_3_3__ || (win.__zoid_10_3_3__ = {});
|
|
7805
|
+
return win.__zoid_10_3_3__;
|
|
7804
7806
|
}
|
|
7805
7807
|
|
|
7806
7808
|
function tryGlobal(win, handler) {
|
|
@@ -8263,6 +8265,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
8263
8265
|
var childComponent;
|
|
8264
8266
|
var currentChildDomain;
|
|
8265
8267
|
var currentContainer;
|
|
8268
|
+
var isRenderFinished = !1;
|
|
8266
8269
|
var onErrorOverride = overrides.onError;
|
|
8267
8270
|
var getProxyContainerOverride = overrides.getProxyContainer;
|
|
8268
8271
|
var showOverride = overrides.show;
|
|
@@ -8474,11 +8477,21 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
8474
8477
|
|
|
8475
8478
|
var initChild = function initChild(childDomain, childExports) {
|
|
8476
8479
|
return promise_ZalgoPromise["try"](function () {
|
|
8480
|
+
var _currentProxyWin;
|
|
8481
|
+
|
|
8477
8482
|
currentChildDomain = childDomain;
|
|
8478
8483
|
childComponent = childExports;
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8484
|
+
null == (_currentProxyWin = currentProxyWin) || _currentProxyWin.isPopup().then(function (isPopup) {
|
|
8485
|
+
if ("" !== (null == childExports ? void 0 : childExports.name) && isPopup) {
|
|
8486
|
+
var _currentProxyWin2;
|
|
8487
|
+
|
|
8488
|
+
null == (_currentProxyWin2 = currentProxyWin) || _currentProxyWin2.setName(null == childExports ? void 0 : childExports.name);
|
|
8489
|
+
}
|
|
8490
|
+
})["finally"](function () {
|
|
8491
|
+
resolveInitPromise();
|
|
8492
|
+
clean.register(function () {
|
|
8493
|
+
return childExports.close.fireAndForget()["catch"](src_util_noop);
|
|
8494
|
+
});
|
|
8482
8495
|
});
|
|
8483
8496
|
});
|
|
8484
8497
|
};
|
|
@@ -9271,7 +9284,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
9271
9284
|
context: context,
|
|
9272
9285
|
tag: tag,
|
|
9273
9286
|
childDomainMatch: childDomainMatch,
|
|
9274
|
-
version: "
|
|
9287
|
+
version: "10_3_3",
|
|
9275
9288
|
props: childProps,
|
|
9276
9289
|
exports: (win = proxyWin, {
|
|
9277
9290
|
init: function init(childExports) {
|
|
@@ -9419,7 +9432,11 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
9419
9432
|
return promise_ZalgoPromise.delay(2e3).then(function () {
|
|
9420
9433
|
return proxyWin.isClosed();
|
|
9421
9434
|
}).then(function (isClosed) {
|
|
9422
|
-
if (!cancelled)
|
|
9435
|
+
if (!cancelled) {
|
|
9436
|
+
if (context === CONTEXT.POPUP && isClosed) return close(new Error("Detected popup close"));
|
|
9437
|
+
var isCurrentContainerClosed = Boolean(currentContainer && isElementClosed(currentContainer));
|
|
9438
|
+
return context === CONTEXT.IFRAME && isClosed && (isCurrentContainerClosed || isRenderFinished) ? close(new Error("Detected iframe close")) : watchForClose(proxyWin, context);
|
|
9439
|
+
}
|
|
9423
9440
|
});
|
|
9424
9441
|
}(proxyWin, context);
|
|
9425
9442
|
});
|
|
@@ -9456,6 +9473,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
9456
9473
|
});
|
|
9457
9474
|
});
|
|
9458
9475
|
var onRenderedPromise = initPromise.then(function () {
|
|
9476
|
+
isRenderFinished = !0;
|
|
9459
9477
|
return event.trigger(EVENT.RENDERED);
|
|
9460
9478
|
});
|
|
9461
9479
|
return promise_ZalgoPromise.hash({
|
|
@@ -10162,9 +10180,9 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
10162
10180
|
context = payload.context,
|
|
10163
10181
|
initialProps = payload.props;
|
|
10164
10182
|
if (!function (version1, version2) {
|
|
10165
|
-
if (!/_/.test(version1) || !/_/.test("
|
|
10166
|
-
return version1.split("_")[0] === "
|
|
10167
|
-
}(version)) throw new Error("Parent window has zoid version " + version + ", child window has version
|
|
10183
|
+
if (!/_/.test(version1) || !/_/.test("10_3_3")) throw new Error("Versions are in an invalid format (" + version1 + ", 10_3_3)");
|
|
10184
|
+
return version1.split("_")[0] === "10_3_3".split("_")[0];
|
|
10185
|
+
}(version)) throw new Error("Parent window has zoid version " + version + ", child window has version 10_3_3");
|
|
10168
10186
|
var show = parentExports.show,
|
|
10169
10187
|
hide = parentExports.hide,
|
|
10170
10188
|
close = parentExports.close,
|
|
@@ -10293,7 +10311,8 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
10293
10311
|
return {
|
|
10294
10312
|
init: function init() {
|
|
10295
10313
|
return promise_ZalgoPromise["try"](function () {
|
|
10296
|
-
|
|
10314
|
+
var updatedChildName = "";
|
|
10315
|
+
isSameDomain(parentComponentWindow) && (updatedChildName = function (_ref3) {
|
|
10297
10316
|
var componentName = _ref3.componentName,
|
|
10298
10317
|
parentComponentWindow = _ref3.parentComponentWindow;
|
|
10299
10318
|
|
|
@@ -10307,30 +10326,30 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
10307
10326
|
sender = _crossDomainDeseriali2.sender;
|
|
10308
10327
|
|
|
10309
10328
|
if ("uid" === _crossDomainDeseriali2.reference.type || "global" === _crossDomainDeseriali2.metaData.windowRef.type) {
|
|
10310
|
-
var
|
|
10311
|
-
data: _crossDomainDeseriali2.data,
|
|
10312
|
-
metaData: {
|
|
10313
|
-
windowRef: window_getWindowRef(parentComponentWindow)
|
|
10314
|
-
},
|
|
10315
|
-
sender: {
|
|
10316
|
-
domain: sender.domain
|
|
10317
|
-
},
|
|
10318
|
-
receiver: {
|
|
10319
|
-
win: window,
|
|
10320
|
-
domain: getDomain()
|
|
10321
|
-
},
|
|
10322
|
-
basic: !0
|
|
10323
|
-
});
|
|
10324
|
-
|
|
10325
|
-
window.name = buildChildWindowName({
|
|
10329
|
+
var childWindowName = buildChildWindowName({
|
|
10326
10330
|
name: componentName,
|
|
10327
|
-
serializedPayload:
|
|
10331
|
+
serializedPayload: crossDomainSerialize({
|
|
10332
|
+
data: _crossDomainDeseriali2.data,
|
|
10333
|
+
metaData: {
|
|
10334
|
+
windowRef: window_getWindowRef(parentComponentWindow)
|
|
10335
|
+
},
|
|
10336
|
+
sender: {
|
|
10337
|
+
domain: sender.domain
|
|
10338
|
+
},
|
|
10339
|
+
receiver: {
|
|
10340
|
+
win: window,
|
|
10341
|
+
domain: getDomain()
|
|
10342
|
+
},
|
|
10343
|
+
basic: !0
|
|
10344
|
+
}).serializedData
|
|
10328
10345
|
});
|
|
10346
|
+
window.name = childWindowName;
|
|
10347
|
+
return childWindowName;
|
|
10329
10348
|
}
|
|
10330
10349
|
}({
|
|
10331
10350
|
componentName: options.name,
|
|
10332
10351
|
parentComponentWindow: parentComponentWindow
|
|
10333
|
-
});
|
|
10352
|
+
}) || "");
|
|
10334
10353
|
lib_global_getGlobal(window).exports = options.exports({
|
|
10335
10354
|
getExports: function getExports() {
|
|
10336
10355
|
return exportsPromise;
|
|
@@ -10352,6 +10371,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
10352
10371
|
});
|
|
10353
10372
|
}();
|
|
10354
10373
|
return parentInit({
|
|
10374
|
+
name: updatedChildName,
|
|
10355
10375
|
updateProps: updateProps,
|
|
10356
10376
|
close: child_destroy
|
|
10357
10377
|
});
|
|
@@ -10689,7 +10709,7 @@ var zoid_frameworks = createCommonjsModule(function (module, exports) {
|
|
|
10689
10709
|
|
|
10690
10710
|
function component_destroy(err) {
|
|
10691
10711
|
destroyAll();
|
|
10692
|
-
delete window.
|
|
10712
|
+
delete window.__zoid_10_3_3__;
|
|
10693
10713
|
!function () {
|
|
10694
10714
|
!function () {
|
|
10695
10715
|
var responseListeners = globalStore("responseListeners");
|
|
@@ -15340,6 +15360,15 @@ function containerTemplate$1(_ref) {
|
|
|
15340
15360
|
}
|
|
15341
15361
|
|
|
15342
15362
|
var div = doc.createElement('div');
|
|
15363
|
+
|
|
15364
|
+
if (props.isHidden) {
|
|
15365
|
+
div.setAttribute('id', uid);
|
|
15366
|
+
div.style.display = 'none';
|
|
15367
|
+
div.appendChild(frame);
|
|
15368
|
+
div.appendChild(prerenderFrame);
|
|
15369
|
+
return div;
|
|
15370
|
+
}
|
|
15371
|
+
|
|
15343
15372
|
var backdrop = doc.createElement('div');
|
|
15344
15373
|
div.setAttribute('id', uid);
|
|
15345
15374
|
backdrop.classList.add('backdrop');
|
|
@@ -15435,6 +15464,10 @@ var options$3 = {
|
|
|
15435
15464
|
type: zoid.PROP_TYPE.STRING,
|
|
15436
15465
|
required: false
|
|
15437
15466
|
},
|
|
15467
|
+
isHidden: {
|
|
15468
|
+
type: zoid.PROP_TYPE.BOOLEAN,
|
|
15469
|
+
required: false
|
|
15470
|
+
},
|
|
15438
15471
|
onError: {
|
|
15439
15472
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
15440
15473
|
required: false
|
|
@@ -15461,6 +15494,14 @@ var options$3 = {
|
|
|
15461
15494
|
};
|
|
15462
15495
|
}
|
|
15463
15496
|
}
|
|
15497
|
+
},
|
|
15498
|
+
exports: {
|
|
15499
|
+
setPhoneNumber: {
|
|
15500
|
+
type: 'function'
|
|
15501
|
+
},
|
|
15502
|
+
getPhoneNumber: {
|
|
15503
|
+
type: 'function'
|
|
15504
|
+
}
|
|
15464
15505
|
}
|
|
15465
15506
|
};
|
|
15466
15507
|
var BizumModal = /*#__PURE__*/zoid.create(options$3);
|
|
@@ -15522,6 +15563,10 @@ var options$4 = {
|
|
|
15522
15563
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
15523
15564
|
required: false
|
|
15524
15565
|
},
|
|
15566
|
+
onBeforeOpen: {
|
|
15567
|
+
type: zoid.PROP_TYPE.FUNCTION,
|
|
15568
|
+
required: false
|
|
15569
|
+
},
|
|
15525
15570
|
onSubmit: {
|
|
15526
15571
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
15527
15572
|
required: false
|
|
@@ -15548,6 +15593,13 @@ var options$4 = {
|
|
|
15548
15593
|
required: false,
|
|
15549
15594
|
value: function value(_ref2) {
|
|
15550
15595
|
var props = _ref2.props;
|
|
15596
|
+
var shouldOpen = true;
|
|
15597
|
+
|
|
15598
|
+
if (props.onBeforeOpen) {
|
|
15599
|
+
shouldOpen = props.onBeforeOpen();
|
|
15600
|
+
}
|
|
15601
|
+
|
|
15602
|
+
if (!shouldOpen) return function () {};
|
|
15551
15603
|
var rootNode = document.createElement('div');
|
|
15552
15604
|
document.body.appendChild(rootNode);
|
|
15553
15605
|
return function (_ref3) {
|
|
@@ -15818,6 +15870,10 @@ var options$7 = {
|
|
|
15818
15870
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
15819
15871
|
required: false
|
|
15820
15872
|
},
|
|
15873
|
+
onBeforeOpen: {
|
|
15874
|
+
type: zoid.PROP_TYPE.FUNCTION,
|
|
15875
|
+
required: false
|
|
15876
|
+
},
|
|
15821
15877
|
onOpen: {
|
|
15822
15878
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
15823
15879
|
required: false
|
|
@@ -15849,6 +15905,13 @@ var options$7 = {
|
|
|
15849
15905
|
required: false,
|
|
15850
15906
|
value: function value(_ref2) {
|
|
15851
15907
|
var props = _ref2.props;
|
|
15908
|
+
var shouldOpen = true;
|
|
15909
|
+
|
|
15910
|
+
if (props.onBeforeOpen) {
|
|
15911
|
+
shouldOpen = props.onBeforeOpen();
|
|
15912
|
+
}
|
|
15913
|
+
|
|
15914
|
+
if (!shouldOpen) return;
|
|
15852
15915
|
var rootNode = document.createElement('div');
|
|
15853
15916
|
document.body.appendChild(rootNode);
|
|
15854
15917
|
return function (_ref3) {
|
|
@@ -16122,6 +16185,10 @@ var options$a = {
|
|
|
16122
16185
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
16123
16186
|
required: false
|
|
16124
16187
|
},
|
|
16188
|
+
onBeforeOpen: {
|
|
16189
|
+
type: zoid.PROP_TYPE.FUNCTION,
|
|
16190
|
+
required: false
|
|
16191
|
+
},
|
|
16125
16192
|
onOpen: {
|
|
16126
16193
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
16127
16194
|
required: false
|
|
@@ -16153,6 +16220,13 @@ var options$a = {
|
|
|
16153
16220
|
required: false,
|
|
16154
16221
|
value: function value(_ref2) {
|
|
16155
16222
|
var props = _ref2.props;
|
|
16223
|
+
var shouldOpen = true;
|
|
16224
|
+
|
|
16225
|
+
if (props.onBeforeOpen) {
|
|
16226
|
+
shouldOpen = props.onBeforeOpen();
|
|
16227
|
+
}
|
|
16228
|
+
|
|
16229
|
+
if (!shouldOpen) return;
|
|
16156
16230
|
var rootNode = document.createElement('div');
|
|
16157
16231
|
document.body.appendChild(rootNode);
|
|
16158
16232
|
return function (_ref3) {
|
|
@@ -16429,6 +16503,10 @@ var options$c = {
|
|
|
16429
16503
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
16430
16504
|
required: false
|
|
16431
16505
|
},
|
|
16506
|
+
onBeforeOpen: {
|
|
16507
|
+
type: zoid.PROP_TYPE.FUNCTION,
|
|
16508
|
+
required: false
|
|
16509
|
+
},
|
|
16432
16510
|
onSubmit: {
|
|
16433
16511
|
type: zoid.PROP_TYPE.FUNCTION,
|
|
16434
16512
|
required: false
|