@monei-js/components 1.5.2 → 1.6.1

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,14 @@ 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
+ required: false
14337
+ },
14326
14338
  billingDetails: {
14327
14339
  type: zoid.PROP_TYPE.OBJECT,
14328
14340
  required: false
@@ -14445,7 +14457,7 @@ var onLoadPaypal = /*#__PURE__*/function () {
14445
14457
  switch (_context2.prev = _context2.next) {
14446
14458
  case 0:
14447
14459
  _context2.next = 2;
14448
- return loadScript(src, {
14460
+ return loadScript(src, props.cspNonce, {
14449
14461
  namespace: namespace,
14450
14462
  cspNonce: props.cspNonce
14451
14463
  });
@@ -14732,6 +14744,10 @@ var options$3 = {
14732
14744
  type: zoid.PROP_TYPE.STRING,
14733
14745
  required: false
14734
14746
  },
14747
+ phoneNumber: {
14748
+ type: zoid.PROP_TYPE.STRING,
14749
+ required: false
14750
+ },
14735
14751
  onError: {
14736
14752
  type: zoid.PROP_TYPE.FUNCTION,
14737
14753
  required: false
@@ -14803,6 +14819,10 @@ var options$4 = {
14803
14819
  type: zoid.PROP_TYPE.STRING,
14804
14820
  required: false
14805
14821
  },
14822
+ phoneNumber: {
14823
+ type: zoid.PROP_TYPE.STRING,
14824
+ required: false
14825
+ },
14806
14826
  onError: {
14807
14827
  type: zoid.PROP_TYPE.FUNCTION,
14808
14828
  required: false
@@ -14842,9 +14862,10 @@ var options$4 = {
14842
14862
  return function (_ref3) {
14843
14863
  var amount = _ref3.amount,
14844
14864
  currency = _ref3.currency;
14845
- var bizumModal = new BizumModal(_extends({}, props, {
14865
+ var bizumModal = new BizumModal(_extends({
14846
14866
  amount: amount,
14847
- currency: currency,
14867
+ currency: currency
14868
+ }, props, {
14848
14869
  onClose: function onClose() {
14849
14870
  window.onpopstate = null;
14850
14871
  document.body.style.overflow = '';
@@ -15766,6 +15787,7 @@ var PaymentRequest = /*#__PURE__*/zoid.create(options$c);
15766
15787
  (function (NextActionType) {
15767
15788
  NextActionType["CONFIRM"] = "CONFIRM";
15768
15789
  NextActionType["FRICTIONLESS_CHALLENGE"] = "FRICTIONLESS_CHALLENGE";
15790
+ NextActionType["BIZUM_CHALLENGE"] = "BIZUM_CHALLENGE";
15769
15791
  NextActionType["CHALLENGE"] = "CHALLENGE";
15770
15792
  NextActionType["COMPLETE"] = "COMPLETE";
15771
15793
  })(exports.NextActionType || (exports.NextActionType = {}));