@paydock/client-sdk 1.106.1-beta → 1.106.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.
@@ -383,7 +383,7 @@
383
383
  // the empty string is set in case if version not provided.
384
384
  //
385
385
  // e.g: grunt build --sdk-version=v1.0.0
386
- SDK._version = 'v1.106.1-beta';
386
+ SDK._version = 'v1.106.2';
387
387
 
388
388
  var ENV = {
389
389
  SANDBOX: 'sandbox',
@@ -6149,18 +6149,20 @@
6149
6149
  return WalletTrigger;
6150
6150
  }(Trigger);
6151
6151
 
6152
- var TEMPLATE$2 = "\n <div class=\"checkout-container\">\n <div class=\"checkout-bg-logo\"></div>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
6153
- var STYLES$1 = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n\n .checkout-overlay {\n z-index: 2147483647;\n }\n\n .checkout-container [data-close] {\n opacity: 1;\n }\n .checkout-container [data-close]:before,\n .checkout-container [data-close]:after {\n background-color: #fff;\n }\n";
6152
+ var TEMPLATE$2 = "\n <div class=\"checkout-container\">\n <div class=\"checkout-bg-logo\"></div>\n <a href=\"#\" data-continue>Continue</a>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
6153
+ var STYLES$1 = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n [data-continue] {\n margin-top: 24px;\n display: block;\n font-family: Helvetica, sans-serif;\n text-decoration: none;\n color: #fff !important;\n border: 1px solid white;\n width: 100px;\n border-radius: 16px;\n padding: 5px;\n }\n [data-continue]:hover {\n background-color: #f2f2f2;\n border: none;\n color: rgba(0, 0, 0, 0.7) !important;\n }\n .checkout-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .checkout-overlay {\n z-index: 2147483647;\n }\n\n .checkout-container [data-close] {\n opacity: 1;\n }\n .checkout-container [data-close]:before,\n .checkout-container [data-close]:after {\n background-color: #fff;\n }\n";
6154
6154
  var WalletBackground = /*#__PURE__*/function (_Background) {
6155
6155
  _inherits(WalletBackground, _Background);
6156
6156
  var _super = _createSuper(WalletBackground);
6157
6157
  function WalletBackground(bgImageUrl) {
6158
6158
  var _this;
6159
6159
  var hideCloseButton = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6160
+ var hideContinueButton = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
6160
6161
  _classCallCheck(this, WalletBackground);
6161
6162
  _this = _super.call(this);
6162
6163
  _this.bgImageUrl = bgImageUrl;
6163
6164
  _this.hideCloseButton = hideCloseButton;
6165
+ _this.hideContinueButton = hideContinueButton;
6164
6166
  _this.imageStyle = null;
6165
6167
  return _this;
6166
6168
  }
@@ -6184,6 +6186,7 @@
6184
6186
  var body = document.body || document.getElementsByTagName("body")[0];
6185
6187
  var template = String(TEMPLATE$2);
6186
6188
  if (this.hideCloseButton === true) template = template.replace('<a href="#" data-close>Close</a>', '');
6189
+ if (this.hideContinueButton === true) template = template.replace('<a href="#" data-continue>Continue</a>', '');
6187
6190
  this.overlay = document.createElement("div");
6188
6191
  this.overlay.classList.add("checkout-overlay");
6189
6192
  this.overlay.setAttribute("checkout-overlay", " ");
@@ -8524,7 +8527,9 @@
8524
8527
  key: "initBackground",
8525
8528
  value: function initBackground() {
8526
8529
  var _this5 = this;
8527
- var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK);
8530
+ var hideCloseButton = true;
8531
+ var hideContinueButton = false;
8532
+ var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK, hideCloseButton, hideContinueButton);
8528
8533
  bg.setBackdropTitle("");
8529
8534
  bg.setBackdropDescription("");
8530
8535
  bg.onTrigger(TRIGGER$1.CLOSE, function () {
@@ -8533,6 +8538,9 @@
8533
8538
  (_a = _this5.background) === null || _a === void 0 ? void 0 : _a.clear();
8534
8539
  _this5.enable();
8535
8540
  });
8541
+ bg.onTrigger(TRIGGER$1.FOCUS, function () {
8542
+ return _this5.checkout.open();
8543
+ });
8536
8544
  return bg;
8537
8545
  }
8538
8546
  }]);
@@ -10335,7 +10343,6 @@
10335
10343
  title: 'Mastercard SRC checkout'
10336
10344
  });
10337
10345
  var iframeElement = this.iFrame.getElement();
10338
- this.iFrame.setStyle('width', '100%');
10339
10346
  if (iframeElement) iframeElement.onload = function () {
10340
10347
  return _this2.eventEmitter.emit(EVENT$2.IFRAME_LOADED, {});
10341
10348
  };