@monei-js/components 1.7.2 → 1.7.4

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.
@@ -15228,6 +15228,15 @@ var onLoadPaypal = /*#__PURE__*/function () {
15228
15228
  props.onError == null ? void 0 : props.onError(data);
15229
15229
  }
15230
15230
  },
15231
+ onClick: function onClick(_data, actions) {
15232
+ var shouldOpen = true;
15233
+
15234
+ if (props.onBeforeOpen) {
15235
+ shouldOpen = props.onBeforeOpen();
15236
+ }
15237
+
15238
+ if (!shouldOpen) return actions.reject();
15239
+ },
15231
15240
  style: _extends({}, defaultStyle, props.style)
15232
15241
  }).render(state.__container);
15233
15242
 
@@ -15308,6 +15317,10 @@ var options$2 = {
15308
15317
  type: zoid.PROP_TYPE.FUNCTION,
15309
15318
  required: false
15310
15319
  },
15320
+ onBeforeOpen: {
15321
+ type: zoid.PROP_TYPE.FUNCTION,
15322
+ required: false
15323
+ },
15311
15324
  onSubmit: {
15312
15325
  type: zoid.PROP_TYPE.FUNCTION,
15313
15326
  required: false
@@ -15593,18 +15606,18 @@ var options$4 = {
15593
15606
  required: false,
15594
15607
  value: function value(_ref2) {
15595
15608
  var props = _ref2.props;
15596
- var shouldOpen = true;
15597
-
15598
- if (props.onBeforeOpen) {
15599
- shouldOpen = props.onBeforeOpen();
15600
- }
15601
-
15602
- if (!shouldOpen) return function () {};
15603
15609
  var rootNode = document.createElement('div');
15604
15610
  document.body.appendChild(rootNode);
15605
15611
  return function (_ref3) {
15606
15612
  var amount = _ref3.amount,
15607
15613
  currency = _ref3.currency;
15614
+ var shouldOpen = true;
15615
+
15616
+ if (props.onBeforeOpen) {
15617
+ shouldOpen = props.onBeforeOpen();
15618
+ }
15619
+
15620
+ if (!shouldOpen) return;
15608
15621
  var bizumModal = new BizumModal(_extends({
15609
15622
  amount: amount,
15610
15623
  currency: currency
@@ -15905,19 +15918,19 @@ var options$7 = {
15905
15918
  required: false,
15906
15919
  value: function value(_ref2) {
15907
15920
  var props = _ref2.props;
15908
- var shouldOpen = true;
15909
-
15910
- if (props.onBeforeOpen) {
15911
- shouldOpen = props.onBeforeOpen();
15912
- }
15913
-
15914
- if (!shouldOpen) return;
15915
15921
  var rootNode = document.createElement('div');
15916
15922
  document.body.appendChild(rootNode);
15917
15923
  return function (_ref3) {
15918
15924
  var amount = _ref3.amount,
15919
15925
  currency = _ref3.currency,
15920
15926
  accountId = _ref3.accountId;
15927
+ var shouldOpen = true;
15928
+
15929
+ if (props.onBeforeOpen) {
15930
+ shouldOpen = props.onBeforeOpen();
15931
+ }
15932
+
15933
+ if (!shouldOpen) return;
15921
15934
  var cofidisModal = new CofidisModal(_extends({}, props, {
15922
15935
  amount: amount,
15923
15936
  currency: currency,
@@ -16220,19 +16233,19 @@ var options$a = {
16220
16233
  required: false,
16221
16234
  value: function value(_ref2) {
16222
16235
  var props = _ref2.props;
16223
- var shouldOpen = true;
16224
-
16225
- if (props.onBeforeOpen) {
16226
- shouldOpen = props.onBeforeOpen();
16227
- }
16228
-
16229
- if (!shouldOpen) return;
16230
16236
  var rootNode = document.createElement('div');
16231
16237
  document.body.appendChild(rootNode);
16232
16238
  return function (_ref3) {
16233
16239
  var amount = _ref3.amount,
16234
16240
  currency = _ref3.currency,
16235
16241
  accountId = _ref3.accountId;
16242
+ var shouldOpen = true;
16243
+
16244
+ if (props.onBeforeOpen) {
16245
+ shouldOpen = props.onBeforeOpen();
16246
+ }
16247
+
16248
+ if (!shouldOpen) return;
16236
16249
  var cofidisModal = new CofidisLoanModal(_extends({}, props, {
16237
16250
  amount: amount,
16238
16251
  currency: currency,