@monei-js/components 1.5.2 → 1.6.0

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.
@@ -2,6 +2,7 @@ export interface BizumProps {
2
2
  accountId?: string;
3
3
  sessionId?: string;
4
4
  paymentId?: string;
5
+ phoneNumber?: string;
5
6
  amount?: number;
6
7
  currency?: string;
7
8
  fullscreen?: boolean;
@@ -820,7 +820,7 @@ var transformStyle = function transformStyle(style) {
820
820
  return result;
821
821
  }, {});
822
822
  };
823
- var loadScript = function loadScript(src, dataset) {
823
+ var loadScript = function loadScript(src, nonce, dataset) {
824
824
  return new Promise(function (resolve, reject) {
825
825
  if (Array.from(document.scripts).findIndex(function (s) {
826
826
  return s.src === src;
@@ -839,6 +839,10 @@ var loadScript = function loadScript(src, dataset) {
839
839
  return reject(error);
840
840
  };
841
841
 
842
+ if (nonce) {
843
+ script.setAttribute('nonce', nonce);
844
+ }
845
+
842
846
  if (dataset) {
843
847
  Object.keys(dataset).forEach(function (key) {
844
848
  if (dataset[key]) {
@@ -14323,6 +14327,15 @@ var options$1 = {
14323
14327
  type: zoid.PROP_TYPE.OBJECT,
14324
14328
  required: false
14325
14329
  },
14330
+ allowedPaymentMethods: {
14331
+ type: zoid.PROP_TYPE.ARRAY,
14332
+ required: false
14333
+ },
14334
+ customDomain: {
14335
+ type: zoid.PROP_TYPE.STRING,
14336
+ "default": config.secureDomain,
14337
+ required: false
14338
+ },
14326
14339
  billingDetails: {
14327
14340
  type: zoid.PROP_TYPE.OBJECT,
14328
14341
  required: false
@@ -14445,7 +14458,7 @@ var onLoadPaypal = /*#__PURE__*/function () {
14445
14458
  switch (_context2.prev = _context2.next) {
14446
14459
  case 0:
14447
14460
  _context2.next = 2;
14448
- return loadScript(src, {
14461
+ return loadScript(src, props.cspNonce, {
14449
14462
  namespace: namespace,
14450
14463
  cspNonce: props.cspNonce
14451
14464
  });
@@ -14732,6 +14745,10 @@ var options$3 = {
14732
14745
  type: zoid.PROP_TYPE.STRING,
14733
14746
  required: false
14734
14747
  },
14748
+ phoneNumber: {
14749
+ type: zoid.PROP_TYPE.STRING,
14750
+ required: false
14751
+ },
14735
14752
  onError: {
14736
14753
  type: zoid.PROP_TYPE.FUNCTION,
14737
14754
  required: false
@@ -14803,6 +14820,10 @@ var options$4 = {
14803
14820
  type: zoid.PROP_TYPE.STRING,
14804
14821
  required: false
14805
14822
  },
14823
+ phoneNumber: {
14824
+ type: zoid.PROP_TYPE.STRING,
14825
+ required: false
14826
+ },
14806
14827
  onError: {
14807
14828
  type: zoid.PROP_TYPE.FUNCTION,
14808
14829
  required: false
@@ -14842,9 +14863,10 @@ var options$4 = {
14842
14863
  return function (_ref3) {
14843
14864
  var amount = _ref3.amount,
14844
14865
  currency = _ref3.currency;
14845
- var bizumModal = new BizumModal(_extends({}, props, {
14866
+ var bizumModal = new BizumModal(_extends({
14846
14867
  amount: amount,
14847
- currency: currency,
14868
+ currency: currency
14869
+ }, props, {
14848
14870
  onClose: function onClose() {
14849
14871
  window.onpopstate = null;
14850
14872
  document.body.style.overflow = '';
@@ -15766,6 +15788,7 @@ var PaymentRequest = /*#__PURE__*/zoid.create(options$c);
15766
15788
  (function (NextActionType) {
15767
15789
  NextActionType["CONFIRM"] = "CONFIRM";
15768
15790
  NextActionType["FRICTIONLESS_CHALLENGE"] = "FRICTIONLESS_CHALLENGE";
15791
+ NextActionType["BIZUM_CHALLENGE"] = "BIZUM_CHALLENGE";
15769
15792
  NextActionType["CHALLENGE"] = "CHALLENGE";
15770
15793
  NextActionType["COMPLETE"] = "COMPLETE";
15771
15794
  })(exports.NextActionType || (exports.NextActionType = {}));