@quintype/components 3.8.3 → 3.8.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.
package/dist/cjs/index.js CHANGED
@@ -5458,10 +5458,13 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5458
5458
  })));
5459
5459
 
5460
5460
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "runSequentialCalls", /*#__PURE__*/_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8() {
5461
- var _this$props;
5462
-
5463
5461
  var callback,
5464
- url,
5462
+ _ref9,
5463
+ email,
5464
+ phone,
5465
+ accessTypeBkIntegrationId,
5466
+ _ref9$executeSequenti,
5467
+ executeSequentialCalls,
5465
5468
  jwtResponse,
5466
5469
  _yield$awaitHelper7,
5467
5470
  error,
@@ -5474,14 +5477,14 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5474
5477
  callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
5475
5478
  return null;
5476
5479
  };
5477
- url = _this.getPath((_this$props = _this.props) === null || _this$props === void 0 ? void 0 : _this$props.sketchesHost, "/api/auth/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
5480
+ _ref9 = _this.props || {}, email = _ref9.email, phone = _ref9.phone, accessTypeBkIntegrationId = _ref9.accessTypeBkIntegrationId, _ref9$executeSequenti = _ref9.executeSequentialCalls, executeSequentialCalls = _ref9$executeSequenti === void 0 ? true : _ref9$executeSequenti;
5478
5481
  _context8.next = 4;
5479
- return fetch(url);
5482
+ return fetch("/api/auth/v1/access-token/integrations/".concat(accessTypeBkIntegrationId));
5480
5483
 
5481
5484
  case 4:
5482
5485
  jwtResponse = _context8.sent;
5483
5486
  _context8.next = 7;
5484
- return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get('x-integration-token'), !!jwtResponse.headers.get('x-integration-token')));
5487
+ return awaitHelper(_this.setUser(email, phone, jwtResponse.headers.get('x-integration-token'), !!jwtResponse.headers.get('x-integration-token')));
5485
5488
 
5486
5489
  case 7:
5487
5490
  _yield$awaitHelper7 = _context8.sent;
@@ -5489,24 +5492,28 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5489
5492
 
5490
5493
  if (!error) {
5491
5494
  try {
5492
- Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref9) {
5493
- var _ref10 = _slicedToArray__default["default"](_ref9, 4),
5494
- subscriptionGroups = _ref10[0],
5495
- paymentOptions = _ref10[1],
5496
- assetPlans = _ref10[2],
5497
- campaignSubscriptionGroups = _ref10[3];
5495
+ if (executeSequentialCalls) {
5496
+ Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref10) {
5497
+ var _ref11 = _slicedToArray__default["default"](_ref10, 4),
5498
+ subscriptionGroups = _ref11[0],
5499
+ paymentOptions = _ref11[1],
5500
+ assetPlans = _ref11[2],
5501
+ campaignSubscriptionGroups = _ref11[3];
5498
5502
 
5499
- reactRedux.batch(function () {
5500
- _this.props.subscriptionGroupLoaded(subscriptionGroups);
5503
+ reactRedux.batch(function () {
5504
+ _this.props.subscriptionGroupLoaded(subscriptionGroups);
5501
5505
 
5502
- _this.props.paymentOptionsLoaded(paymentOptions);
5506
+ _this.props.paymentOptionsLoaded(paymentOptions);
5503
5507
 
5504
- _this.props.assetPlanLoaded(assetPlans);
5508
+ _this.props.assetPlanLoaded(assetPlans);
5505
5509
 
5506
- _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
5510
+ _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
5511
+ });
5512
+ callback();
5507
5513
  });
5514
+ } else {
5508
5515
  callback();
5509
- });
5516
+ }
5510
5517
  } catch (e) {
5511
5518
  console.log("Subscription / payments failed", e);
5512
5519
  }
@@ -5563,7 +5570,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5563
5570
  })));
5564
5571
 
5565
5572
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "getSubscriptionsWithSwitchablePlans", /*#__PURE__*/function () {
5566
- var _ref12 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(planId) {
5573
+ var _ref13 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(planId) {
5567
5574
  var _yield$awaitHelper9, error, _yield$awaitHelper9$d, subscription;
5568
5575
 
5569
5576
  return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
@@ -5614,7 +5621,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5614
5621
  }));
5615
5622
 
5616
5623
  return function (_x6) {
5617
- return _ref12.apply(this, arguments);
5624
+ return _ref13.apply(this, arguments);
5618
5625
  };
5619
5626
  }());
5620
5627
 
@@ -5893,7 +5900,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5893
5900
  });
5894
5901
 
5895
5902
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "pingBackMeteredStory", /*#__PURE__*/function () {
5896
- var _ref14 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(asset, accessData) {
5903
+ var _ref15 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(asset, accessData) {
5897
5904
  return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
5898
5905
  while (1) {
5899
5906
  switch (_context12.prev = _context12.next) {
@@ -5915,13 +5922,13 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5915
5922
  }));
5916
5923
 
5917
5924
  return function (_x7, _x8) {
5918
- return _ref14.apply(this, arguments);
5925
+ return _ref15.apply(this, arguments);
5919
5926
  };
5920
5927
  }());
5921
5928
 
5922
5929
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "checkAccess", /*#__PURE__*/function () {
5923
- var _ref15 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(assetId) {
5924
- var asset, _yield$awaitHelper12, error, accessData, accessById, _ref16, granted, grantReason, _ref16$data, data;
5930
+ var _ref16 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(assetId) {
5931
+ var asset, _yield$awaitHelper12, error, accessData, accessById, _ref17, granted, grantReason, _ref17$data, data;
5925
5932
 
5926
5933
  return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
5927
5934
  while (1) {
@@ -5964,7 +5971,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5964
5971
 
5965
5972
  _this.props.accessIsLoading(false);
5966
5973
 
5967
- _ref16 = accessData || {}, granted = _ref16.granted, grantReason = _ref16.grantReason, _ref16$data = _ref16.data, data = _ref16$data === void 0 ? {} : _ref16$data;
5974
+ _ref17 = accessData || {}, granted = _ref17.granted, grantReason = _ref17.grantReason, _ref17$data = _ref17.data, data = _ref17$data === void 0 ? {} : _ref17$data;
5968
5975
 
5969
5976
  if (!_this.props.disableMetering && granted && grantReason === 'METERING') {
5970
5977
  _this.pingBackMeteredStory(asset, accessData);
@@ -5983,7 +5990,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5983
5990
  }));
5984
5991
 
5985
5992
  return function (_x9) {
5986
- return _ref15.apply(this, arguments);
5993
+ return _ref16.apply(this, arguments);
5987
5994
  };
5988
5995
  }());
5989
5996
 
@@ -6017,7 +6024,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
6017
6024
  })));
6018
6025
 
6019
6026
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "setSubscriberMetadata", /*#__PURE__*/function () {
6020
- var _ref18 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(subscriberMetadata) {
6027
+ var _ref19 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(subscriberMetadata) {
6021
6028
  var response;
6022
6029
  return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
6023
6030
  while (1) {
@@ -6047,7 +6054,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
6047
6054
  }));
6048
6055
 
6049
6056
  return function (_x10) {
6050
- return _ref18.apply(this, arguments);
6057
+ return _ref19.apply(this, arguments);
6051
6058
  };
6052
6059
  }());
6053
6060
 
@@ -6063,29 +6070,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
6063
6070
  }
6064
6071
  }, {
6065
6072
  key: "makePaymentObject",
6066
- value: function makePaymentObject(_ref19) {
6067
- var _ref19$selectedPlan = _ref19.selectedPlan,
6068
- selectedPlan = _ref19$selectedPlan === void 0 ? {} : _ref19$selectedPlan,
6069
- _ref19$couponCode = _ref19.couponCode,
6070
- couponCode = _ref19$couponCode === void 0 ? '' : _ref19$couponCode,
6071
- _ref19$recipientSubsc = _ref19.recipientSubscriber,
6072
- recipientSubscriber = _ref19$recipientSubsc === void 0 ? {} : _ref19$recipientSubsc,
6073
- _ref19$planType = _ref19.planType,
6074
- planType = _ref19$planType === void 0 ? '' : _ref19$planType,
6075
- _ref19$storyId = _ref19.storyId,
6076
- storyId = _ref19$storyId === void 0 ? '' : _ref19$storyId,
6077
- _ref19$storyHeadline = _ref19.storyHeadline,
6078
- storyHeadline = _ref19$storyHeadline === void 0 ? '' : _ref19$storyHeadline,
6079
- _ref19$storySlug = _ref19.storySlug,
6080
- storySlug = _ref19$storySlug === void 0 ? '' : _ref19$storySlug,
6081
- _ref19$paymentType = _ref19.paymentType,
6082
- paymentType = _ref19$paymentType === void 0 ? '' : _ref19$paymentType,
6083
- _ref19$successUrl = _ref19.successUrl,
6084
- successUrl = _ref19$successUrl === void 0 ? '' : _ref19$successUrl,
6085
- _ref19$returnUrl = _ref19.returnUrl,
6086
- returnUrl = _ref19$returnUrl === void 0 ? '' : _ref19$returnUrl,
6087
- _ref19$cancelUrl = _ref19.cancelUrl,
6088
- cancelUrl = _ref19$cancelUrl === void 0 ? '' : _ref19$cancelUrl;
6073
+ value: function makePaymentObject(_ref20) {
6074
+ var _ref20$selectedPlan = _ref20.selectedPlan,
6075
+ selectedPlan = _ref20$selectedPlan === void 0 ? {} : _ref20$selectedPlan,
6076
+ _ref20$couponCode = _ref20.couponCode,
6077
+ couponCode = _ref20$couponCode === void 0 ? '' : _ref20$couponCode,
6078
+ _ref20$recipientSubsc = _ref20.recipientSubscriber,
6079
+ recipientSubscriber = _ref20$recipientSubsc === void 0 ? {} : _ref20$recipientSubsc,
6080
+ _ref20$planType = _ref20.planType,
6081
+ planType = _ref20$planType === void 0 ? '' : _ref20$planType,
6082
+ _ref20$storyId = _ref20.storyId,
6083
+ storyId = _ref20$storyId === void 0 ? '' : _ref20$storyId,
6084
+ _ref20$storyHeadline = _ref20.storyHeadline,
6085
+ storyHeadline = _ref20$storyHeadline === void 0 ? '' : _ref20$storyHeadline,
6086
+ _ref20$storySlug = _ref20.storySlug,
6087
+ storySlug = _ref20$storySlug === void 0 ? '' : _ref20$storySlug,
6088
+ _ref20$paymentType = _ref20.paymentType,
6089
+ paymentType = _ref20$paymentType === void 0 ? '' : _ref20$paymentType,
6090
+ _ref20$successUrl = _ref20.successUrl,
6091
+ successUrl = _ref20$successUrl === void 0 ? '' : _ref20$successUrl,
6092
+ _ref20$returnUrl = _ref20.returnUrl,
6093
+ returnUrl = _ref20$returnUrl === void 0 ? '' : _ref20$returnUrl,
6094
+ _ref20$cancelUrl = _ref20.cancelUrl,
6095
+ cancelUrl = _ref20$cancelUrl === void 0 ? '' : _ref20$cancelUrl;
6089
6096
  var id = selectedPlan.id,
6090
6097
  title = selectedPlan.title,
6091
6098
  description = selectedPlan.description,
@@ -431,10 +431,13 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
431
431
  })));
432
432
 
433
433
  _defineProperty(_assertThisInitialized(_this), "runSequentialCalls", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
434
- var _this$props;
435
-
436
434
  var callback,
437
- url,
435
+ _ref9,
436
+ email,
437
+ phone,
438
+ accessTypeBkIntegrationId,
439
+ _ref9$executeSequenti,
440
+ executeSequentialCalls,
438
441
  jwtResponse,
439
442
  _yield$awaitHelper7,
440
443
  error,
@@ -447,14 +450,14 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
447
450
  callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
448
451
  return null;
449
452
  };
450
- url = _this.getPath((_this$props = _this.props) === null || _this$props === void 0 ? void 0 : _this$props.sketchesHost, "/api/auth/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
453
+ _ref9 = _this.props || {}, email = _ref9.email, phone = _ref9.phone, accessTypeBkIntegrationId = _ref9.accessTypeBkIntegrationId, _ref9$executeSequenti = _ref9.executeSequentialCalls, executeSequentialCalls = _ref9$executeSequenti === void 0 ? true : _ref9$executeSequenti;
451
454
  _context8.next = 4;
452
- return fetch(url);
455
+ return fetch("/api/auth/v1/access-token/integrations/".concat(accessTypeBkIntegrationId));
453
456
 
454
457
  case 4:
455
458
  jwtResponse = _context8.sent;
456
459
  _context8.next = 7;
457
- return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get('x-integration-token'), !!jwtResponse.headers.get('x-integration-token')));
460
+ return awaitHelper(_this.setUser(email, phone, jwtResponse.headers.get('x-integration-token'), !!jwtResponse.headers.get('x-integration-token')));
458
461
 
459
462
  case 7:
460
463
  _yield$awaitHelper7 = _context8.sent;
@@ -462,24 +465,28 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
462
465
 
463
466
  if (!error) {
464
467
  try {
465
- Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref9) {
466
- var _ref10 = _slicedToArray(_ref9, 4),
467
- subscriptionGroups = _ref10[0],
468
- paymentOptions = _ref10[1],
469
- assetPlans = _ref10[2],
470
- campaignSubscriptionGroups = _ref10[3];
468
+ if (executeSequentialCalls) {
469
+ Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref10) {
470
+ var _ref11 = _slicedToArray(_ref10, 4),
471
+ subscriptionGroups = _ref11[0],
472
+ paymentOptions = _ref11[1],
473
+ assetPlans = _ref11[2],
474
+ campaignSubscriptionGroups = _ref11[3];
471
475
 
472
- batch(function () {
473
- _this.props.subscriptionGroupLoaded(subscriptionGroups);
476
+ batch(function () {
477
+ _this.props.subscriptionGroupLoaded(subscriptionGroups);
474
478
 
475
- _this.props.paymentOptionsLoaded(paymentOptions);
479
+ _this.props.paymentOptionsLoaded(paymentOptions);
476
480
 
477
- _this.props.assetPlanLoaded(assetPlans);
481
+ _this.props.assetPlanLoaded(assetPlans);
478
482
 
479
- _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
483
+ _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
484
+ });
485
+ callback();
480
486
  });
487
+ } else {
481
488
  callback();
482
- });
489
+ }
483
490
  } catch (e) {
484
491
  console.log("Subscription / payments failed", e);
485
492
  }
@@ -536,7 +543,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
536
543
  })));
537
544
 
538
545
  _defineProperty(_assertThisInitialized(_this), "getSubscriptionsWithSwitchablePlans", /*#__PURE__*/function () {
539
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(planId) {
546
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(planId) {
540
547
  var _yield$awaitHelper9, error, _yield$awaitHelper9$d, subscription;
541
548
 
542
549
  return _regeneratorRuntime.wrap(function _callee10$(_context10) {
@@ -587,7 +594,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
587
594
  }));
588
595
 
589
596
  return function (_x6) {
590
- return _ref12.apply(this, arguments);
597
+ return _ref13.apply(this, arguments);
591
598
  };
592
599
  }());
593
600
 
@@ -866,7 +873,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
866
873
  });
867
874
 
868
875
  _defineProperty(_assertThisInitialized(_this), "pingBackMeteredStory", /*#__PURE__*/function () {
869
- var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(asset, accessData) {
876
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(asset, accessData) {
870
877
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
871
878
  while (1) {
872
879
  switch (_context12.prev = _context12.next) {
@@ -888,13 +895,13 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
888
895
  }));
889
896
 
890
897
  return function (_x7, _x8) {
891
- return _ref14.apply(this, arguments);
898
+ return _ref15.apply(this, arguments);
892
899
  };
893
900
  }());
894
901
 
895
902
  _defineProperty(_assertThisInitialized(_this), "checkAccess", /*#__PURE__*/function () {
896
- var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(assetId) {
897
- var asset, _yield$awaitHelper12, error, accessData, accessById, _ref16, granted, grantReason, _ref16$data, data;
903
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(assetId) {
904
+ var asset, _yield$awaitHelper12, error, accessData, accessById, _ref17, granted, grantReason, _ref17$data, data;
898
905
 
899
906
  return _regeneratorRuntime.wrap(function _callee13$(_context13) {
900
907
  while (1) {
@@ -937,7 +944,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
937
944
 
938
945
  _this.props.accessIsLoading(false);
939
946
 
940
- _ref16 = accessData || {}, granted = _ref16.granted, grantReason = _ref16.grantReason, _ref16$data = _ref16.data, data = _ref16$data === void 0 ? {} : _ref16$data;
947
+ _ref17 = accessData || {}, granted = _ref17.granted, grantReason = _ref17.grantReason, _ref17$data = _ref17.data, data = _ref17$data === void 0 ? {} : _ref17$data;
941
948
 
942
949
  if (!_this.props.disableMetering && granted && grantReason === 'METERING') {
943
950
  _this.pingBackMeteredStory(asset, accessData);
@@ -956,7 +963,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
956
963
  }));
957
964
 
958
965
  return function (_x9) {
959
- return _ref15.apply(this, arguments);
966
+ return _ref16.apply(this, arguments);
960
967
  };
961
968
  }());
962
969
 
@@ -990,7 +997,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
990
997
  })));
991
998
 
992
999
  _defineProperty(_assertThisInitialized(_this), "setSubscriberMetadata", /*#__PURE__*/function () {
993
- var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(subscriberMetadata) {
1000
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(subscriberMetadata) {
994
1001
  var response;
995
1002
  return _regeneratorRuntime.wrap(function _callee15$(_context15) {
996
1003
  while (1) {
@@ -1020,7 +1027,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
1020
1027
  }));
1021
1028
 
1022
1029
  return function (_x10) {
1023
- return _ref18.apply(this, arguments);
1030
+ return _ref19.apply(this, arguments);
1024
1031
  };
1025
1032
  }());
1026
1033
 
@@ -1036,29 +1043,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
1036
1043
  }
1037
1044
  }, {
1038
1045
  key: "makePaymentObject",
1039
- value: function makePaymentObject(_ref19) {
1040
- var _ref19$selectedPlan = _ref19.selectedPlan,
1041
- selectedPlan = _ref19$selectedPlan === void 0 ? {} : _ref19$selectedPlan,
1042
- _ref19$couponCode = _ref19.couponCode,
1043
- couponCode = _ref19$couponCode === void 0 ? '' : _ref19$couponCode,
1044
- _ref19$recipientSubsc = _ref19.recipientSubscriber,
1045
- recipientSubscriber = _ref19$recipientSubsc === void 0 ? {} : _ref19$recipientSubsc,
1046
- _ref19$planType = _ref19.planType,
1047
- planType = _ref19$planType === void 0 ? '' : _ref19$planType,
1048
- _ref19$storyId = _ref19.storyId,
1049
- storyId = _ref19$storyId === void 0 ? '' : _ref19$storyId,
1050
- _ref19$storyHeadline = _ref19.storyHeadline,
1051
- storyHeadline = _ref19$storyHeadline === void 0 ? '' : _ref19$storyHeadline,
1052
- _ref19$storySlug = _ref19.storySlug,
1053
- storySlug = _ref19$storySlug === void 0 ? '' : _ref19$storySlug,
1054
- _ref19$paymentType = _ref19.paymentType,
1055
- paymentType = _ref19$paymentType === void 0 ? '' : _ref19$paymentType,
1056
- _ref19$successUrl = _ref19.successUrl,
1057
- successUrl = _ref19$successUrl === void 0 ? '' : _ref19$successUrl,
1058
- _ref19$returnUrl = _ref19.returnUrl,
1059
- returnUrl = _ref19$returnUrl === void 0 ? '' : _ref19$returnUrl,
1060
- _ref19$cancelUrl = _ref19.cancelUrl,
1061
- cancelUrl = _ref19$cancelUrl === void 0 ? '' : _ref19$cancelUrl;
1046
+ value: function makePaymentObject(_ref20) {
1047
+ var _ref20$selectedPlan = _ref20.selectedPlan,
1048
+ selectedPlan = _ref20$selectedPlan === void 0 ? {} : _ref20$selectedPlan,
1049
+ _ref20$couponCode = _ref20.couponCode,
1050
+ couponCode = _ref20$couponCode === void 0 ? '' : _ref20$couponCode,
1051
+ _ref20$recipientSubsc = _ref20.recipientSubscriber,
1052
+ recipientSubscriber = _ref20$recipientSubsc === void 0 ? {} : _ref20$recipientSubsc,
1053
+ _ref20$planType = _ref20.planType,
1054
+ planType = _ref20$planType === void 0 ? '' : _ref20$planType,
1055
+ _ref20$storyId = _ref20.storyId,
1056
+ storyId = _ref20$storyId === void 0 ? '' : _ref20$storyId,
1057
+ _ref20$storyHeadline = _ref20.storyHeadline,
1058
+ storyHeadline = _ref20$storyHeadline === void 0 ? '' : _ref20$storyHeadline,
1059
+ _ref20$storySlug = _ref20.storySlug,
1060
+ storySlug = _ref20$storySlug === void 0 ? '' : _ref20$storySlug,
1061
+ _ref20$paymentType = _ref20.paymentType,
1062
+ paymentType = _ref20$paymentType === void 0 ? '' : _ref20$paymentType,
1063
+ _ref20$successUrl = _ref20.successUrl,
1064
+ successUrl = _ref20$successUrl === void 0 ? '' : _ref20$successUrl,
1065
+ _ref20$returnUrl = _ref20.returnUrl,
1066
+ returnUrl = _ref20$returnUrl === void 0 ? '' : _ref20$returnUrl,
1067
+ _ref20$cancelUrl = _ref20.cancelUrl,
1068
+ cancelUrl = _ref20$cancelUrl === void 0 ? '' : _ref20$cancelUrl;
1062
1069
  var id = selectedPlan.id,
1063
1070
  title = selectedPlan.title,
1064
1071
  description = selectedPlan.description,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/components",
3
- "version": "3.8.3",
3
+ "version": "3.8.4",
4
4
  "description": "Components to help build Quintype Node.js apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",