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