@monei-js/components 1.7.4 → 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.
@@ -1,5 +1,5 @@
1
- import { BizumProps } from './types';
2
1
  import { MoneiComponent } from '../../types/component';
3
- export * from './types';
2
+ import { BizumProps } from './types';
4
3
  export * from './modal';
4
+ export * from './types';
5
5
  export declare const Bizum: MoneiComponent<BizumProps>;
@@ -15609,12 +15609,14 @@ var options$4 = {
15609
15609
  type: zoid.PROP_TYPE.FUNCTION,
15610
15610
  required: false,
15611
15611
  value: function value(_ref2) {
15612
- var props = _ref2.props;
15612
+ var props = _ref2.props,
15613
+ state = _ref2.state;
15613
15614
  var rootNode = document.createElement('div');
15614
15615
  document.body.appendChild(rootNode);
15615
15616
  return function (_ref3) {
15616
15617
  var amount = _ref3.amount,
15617
15618
  currency = _ref3.currency;
15619
+ if (state.isOpen) return;
15618
15620
  var shouldOpen = true;
15619
15621
 
15620
15622
  if (props.onBeforeOpen) {
@@ -15622,11 +15624,13 @@ var options$4 = {
15622
15624
  }
15623
15625
 
15624
15626
  if (!shouldOpen) return;
15627
+ state.isOpen = true;
15625
15628
  var bizumModal = new BizumModal(_extends({
15626
15629
  amount: amount,
15627
15630
  currency: currency
15628
15631
  }, props, {
15629
15632
  onClose: function onClose() {
15633
+ state.isOpen = false;
15630
15634
  window.onpopstate = null;
15631
15635
  document.body.style.overflow = '';
15632
15636
  },