@monei-js/components 1.7.3 → 1.7.5

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.
@@ -15605,24 +15605,28 @@ var options$4 = {
15605
15605
  type: zoid.PROP_TYPE.FUNCTION,
15606
15606
  required: false,
15607
15607
  value: function value(_ref2) {
15608
- var props = _ref2.props;
15609
- var shouldOpen = true;
15610
-
15611
- if (props.onBeforeOpen) {
15612
- shouldOpen = props.onBeforeOpen();
15613
- }
15614
-
15615
- if (!shouldOpen) return function () {};
15608
+ var props = _ref2.props,
15609
+ state = _ref2.state;
15616
15610
  var rootNode = document.createElement('div');
15617
15611
  document.body.appendChild(rootNode);
15618
15612
  return function (_ref3) {
15619
15613
  var amount = _ref3.amount,
15620
15614
  currency = _ref3.currency;
15615
+ if (state.isOpen) return;
15616
+ var shouldOpen = true;
15617
+
15618
+ if (props.onBeforeOpen) {
15619
+ shouldOpen = props.onBeforeOpen();
15620
+ }
15621
+
15622
+ if (!shouldOpen) return;
15623
+ state.isOpen = true;
15621
15624
  var bizumModal = new BizumModal(_extends({
15622
15625
  amount: amount,
15623
15626
  currency: currency
15624
15627
  }, props, {
15625
15628
  onClose: function onClose() {
15629
+ state.isOpen = false;
15626
15630
  window.onpopstate = null;
15627
15631
  document.body.style.overflow = '';
15628
15632
  },
@@ -15918,19 +15922,19 @@ var options$7 = {
15918
15922
  required: false,
15919
15923
  value: function value(_ref2) {
15920
15924
  var props = _ref2.props;
15921
- var shouldOpen = true;
15922
-
15923
- if (props.onBeforeOpen) {
15924
- shouldOpen = props.onBeforeOpen();
15925
- }
15926
-
15927
- if (!shouldOpen) return;
15928
15925
  var rootNode = document.createElement('div');
15929
15926
  document.body.appendChild(rootNode);
15930
15927
  return function (_ref3) {
15931
15928
  var amount = _ref3.amount,
15932
15929
  currency = _ref3.currency,
15933
15930
  accountId = _ref3.accountId;
15931
+ var shouldOpen = true;
15932
+
15933
+ if (props.onBeforeOpen) {
15934
+ shouldOpen = props.onBeforeOpen();
15935
+ }
15936
+
15937
+ if (!shouldOpen) return;
15934
15938
  var cofidisModal = new CofidisModal(_extends({}, props, {
15935
15939
  amount: amount,
15936
15940
  currency: currency,
@@ -16233,19 +16237,19 @@ var options$a = {
16233
16237
  required: false,
16234
16238
  value: function value(_ref2) {
16235
16239
  var props = _ref2.props;
16236
- var shouldOpen = true;
16237
-
16238
- if (props.onBeforeOpen) {
16239
- shouldOpen = props.onBeforeOpen();
16240
- }
16241
-
16242
- if (!shouldOpen) return;
16243
16240
  var rootNode = document.createElement('div');
16244
16241
  document.body.appendChild(rootNode);
16245
16242
  return function (_ref3) {
16246
16243
  var amount = _ref3.amount,
16247
16244
  currency = _ref3.currency,
16248
16245
  accountId = _ref3.accountId;
16246
+ var shouldOpen = true;
16247
+
16248
+ if (props.onBeforeOpen) {
16249
+ shouldOpen = props.onBeforeOpen();
16250
+ }
16251
+
16252
+ if (!shouldOpen) return;
16249
16253
  var cofidisModal = new CofidisLoanModal(_extends({}, props, {
16250
16254
  amount: amount,
16251
16255
  currency: currency,