@quintype/components 3.3.2-check-sub-error.11 → 3.3.2

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
@@ -1679,7 +1679,7 @@ var LoadMoreCollectionStories = /*#__PURE__*/function (_React$Component) {
1679
1679
 
1680
1680
  function LoadingIndicatorBase(props) {
1681
1681
  return /*#__PURE__*/React__default["default"].createElement("div", {
1682
- className: "loading-indicator ".concat(props.loading ? 'loading-indicator-loading' : '')
1682
+ className: "loading-indicator ".concat(props.loading ? "loading-indicator-loading" : "")
1683
1683
  }, props.loading && props.children);
1684
1684
  }
1685
1685
 
@@ -4623,7 +4623,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
4623
4623
  var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
4624
4624
 
4625
4625
  if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
4626
- console.log("enetred load script if block ");
4627
4626
  var accessTypeScript = document.createElement("script");
4628
4627
 
4629
4628
  accessTypeScript.onload = function () {
@@ -4635,18 +4634,10 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
4635
4634
  accessTypeScript.setAttribute("id", "AccessTypeScript");
4636
4635
  accessTypeScript.setAttribute("data-accessType-script", "1");
4637
4636
  accessTypeScript.async = 1;
4638
-
4639
- accessTypeScript.onerror = function () {
4640
- callback();
4641
- console.log(" load s cript failed");
4642
- };
4643
-
4644
4637
  document.body.appendChild(accessTypeScript);
4645
4638
  return true;
4646
4639
  }
4647
4640
 
4648
- console.log("enetred load script else block ");
4649
- console.log("global accesstype", global.AccessType);
4650
4641
  global.AccessType && callback();
4651
4642
  return true;
4652
4643
  });
@@ -4688,21 +4679,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
4688
4679
  _yield$awaitHelper = _context.sent;
4689
4680
  error = _yield$awaitHelper.error;
4690
4681
  user = _yield$awaitHelper.data;
4691
- console.log("setuser", user);
4692
4682
 
4693
4683
  if (!error) {
4694
- _context.next = 14;
4684
+ _context.next = 12;
4695
4685
  break;
4696
4686
  }
4697
4687
 
4698
4688
  console.warn("User context setting failed --> ", error);
4699
- console.log(" setuser failed");
4700
4689
  return _context.abrupt("return", error);
4701
4690
 
4702
- case 14:
4691
+ case 12:
4703
4692
  return _context.abrupt("return", user);
4704
4693
 
4705
- case 15:
4694
+ case 13:
4706
4695
  case "end":
4707
4696
  return _context.stop();
4708
4697
  }
@@ -5005,33 +4994,18 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5005
4994
  callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
5006
4995
  return null;
5007
4996
  };
5008
- _context8.prev = 1;
5009
- _context8.next = 4;
4997
+ _context8.next = 3;
5010
4998
  return fetch("/api/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
5011
4999
 
5012
- case 4:
5000
+ case 3:
5013
5001
  jwtResponse = _context8.sent;
5014
- _context8.next = 10;
5015
- break;
5016
-
5017
- case 7:
5018
- _context8.prev = 7;
5019
- _context8.t0 = _context8["catch"](1);
5020
- console.log("jet resposne error ", _context8.t0);
5021
-
5022
- case 10:
5023
- console.log("jwtresponse", jwtResponse);
5024
- _context8.next = 13;
5002
+ _context8.next = 6;
5025
5003
  return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
5026
5004
 
5027
- case 13:
5005
+ case 6:
5028
5006
  _yield$awaitHelper7 = _context8.sent;
5029
5007
  error = _yield$awaitHelper7.error;
5030
5008
 
5031
- if (error) {
5032
- console.log("error happened in set user ");
5033
- }
5034
-
5035
5009
  if (!error) {
5036
5010
  try {
5037
5011
  Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref9) {
@@ -5041,7 +5015,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5041
5015
  assetPlans = _ref10[2],
5042
5016
  campaignSubscriptionGroups = _ref10[3];
5043
5017
 
5044
- console.log("entered then inside promise all ");
5045
5018
  reactRedux.batch(function () {
5046
5019
  _this.props.subscriptionGroupLoaded(subscriptionGroups);
5047
5020
 
@@ -5051,22 +5024,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5051
5024
 
5052
5025
  _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
5053
5026
  });
5054
- console.log(" called callback after promise all ", callback);
5055
5027
  callback();
5056
- })["catch"](function (e) {
5057
- console.log("some promise all error", e);
5058
5028
  });
5059
5029
  } catch (e) {
5060
5030
  console.log("Subscription / payments failed", e);
5061
5031
  }
5062
5032
  }
5063
5033
 
5064
- case 17:
5034
+ case 9:
5065
5035
  case "end":
5066
5036
  return _context8.stop();
5067
5037
  }
5068
5038
  }
5069
- }, _callee8, null, [[1, 7]]);
5039
+ }, _callee8);
5070
5040
  })));
5071
5041
 
5072
5042
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "getSubscriptionForUser", /*#__PURE__*/_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
@@ -5118,7 +5088,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5118
5088
  _this.loadScript(function () {
5119
5089
  // dont try to initialize accessType if integration id is not available
5120
5090
  if (accessTypeBkIntegrationId === undefined) {
5121
- console.log("AccessType: Integration Id is undefined");
5091
+ console.warn("AccessType: Integration Id is undefined");
5122
5092
  return false;
5123
5093
  }
5124
5094
 
@@ -5126,7 +5096,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5126
5096
  });
5127
5097
  } catch (e) {
5128
5098
  console.warn("Accesstype load fail", e);
5129
- console.log("AT load fail");
5130
5099
  }
5131
5100
  });
5132
5101
 
@@ -5778,7 +5747,7 @@ var mapDispatchToProps$1 = function mapDispatchToProps(dispatch) {
5778
5747
  * if (paymentGateway === "stripe") {
5779
5748
  * const options = {
5780
5749
  * selectedPlan: plan,
5781
- * planType: x"standard",
5750
+ * planType: "standard",
5782
5751
  * successUrl: `${document.location.origin}/paypal-return-url`,
5783
5752
  * cancelUrl: `${document.location.origin}/paypal-cancel-url`
5784
5753
  * };
@@ -53,7 +53,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
53
53
  var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
54
54
 
55
55
  if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
56
- console.log("enetred load script if block ");
57
56
  var accessTypeScript = document.createElement("script");
58
57
 
59
58
  accessTypeScript.onload = function () {
@@ -65,18 +64,10 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
65
64
  accessTypeScript.setAttribute("id", "AccessTypeScript");
66
65
  accessTypeScript.setAttribute("data-accessType-script", "1");
67
66
  accessTypeScript.async = 1;
68
-
69
- accessTypeScript.onerror = function () {
70
- callback();
71
- console.log(" load s cript failed");
72
- };
73
-
74
67
  document.body.appendChild(accessTypeScript);
75
68
  return true;
76
69
  }
77
70
 
78
- console.log("enetred load script else block ");
79
- console.log("global accesstype", global.AccessType);
80
71
  global.AccessType && callback();
81
72
  return true;
82
73
  });
@@ -118,21 +109,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
118
109
  _yield$awaitHelper = _context.sent;
119
110
  error = _yield$awaitHelper.error;
120
111
  user = _yield$awaitHelper.data;
121
- console.log("setuser", user);
122
112
 
123
113
  if (!error) {
124
- _context.next = 14;
114
+ _context.next = 12;
125
115
  break;
126
116
  }
127
117
 
128
118
  console.warn("User context setting failed --> ", error);
129
- console.log(" setuser failed");
130
119
  return _context.abrupt("return", error);
131
120
 
132
- case 14:
121
+ case 12:
133
122
  return _context.abrupt("return", user);
134
123
 
135
- case 15:
124
+ case 13:
136
125
  case "end":
137
126
  return _context.stop();
138
127
  }
@@ -435,33 +424,18 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
435
424
  callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
436
425
  return null;
437
426
  };
438
- _context8.prev = 1;
439
- _context8.next = 4;
427
+ _context8.next = 3;
440
428
  return fetch("/api/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
441
429
 
442
- case 4:
430
+ case 3:
443
431
  jwtResponse = _context8.sent;
444
- _context8.next = 10;
445
- break;
446
-
447
- case 7:
448
- _context8.prev = 7;
449
- _context8.t0 = _context8["catch"](1);
450
- console.log("jet resposne error ", _context8.t0);
451
-
452
- case 10:
453
- console.log("jwtresponse", jwtResponse);
454
- _context8.next = 13;
432
+ _context8.next = 6;
455
433
  return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
456
434
 
457
- case 13:
435
+ case 6:
458
436
  _yield$awaitHelper7 = _context8.sent;
459
437
  error = _yield$awaitHelper7.error;
460
438
 
461
- if (error) {
462
- console.log("error happened in set user ");
463
- }
464
-
465
439
  if (!error) {
466
440
  try {
467
441
  Promise.all([_this.getSubscription(), _this.getPaymentOptions(), _this.getAssetPlans(), _this.getCampaignSubscription()]).then(function (_ref9) {
@@ -471,7 +445,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
471
445
  assetPlans = _ref10[2],
472
446
  campaignSubscriptionGroups = _ref10[3];
473
447
 
474
- console.log("entered then inside promise all ");
475
448
  batch(function () {
476
449
  _this.props.subscriptionGroupLoaded(subscriptionGroups);
477
450
 
@@ -481,22 +454,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
481
454
 
482
455
  _this.props.campaignSubscriptionGroupLoaded(campaignSubscriptionGroups);
483
456
  });
484
- console.log(" called callback after promise all ", callback);
485
457
  callback();
486
- })["catch"](function (e) {
487
- console.log("some promise all error", e);
488
458
  });
489
459
  } catch (e) {
490
460
  console.log("Subscription / payments failed", e);
491
461
  }
492
462
  }
493
463
 
494
- case 17:
464
+ case 9:
495
465
  case "end":
496
466
  return _context8.stop();
497
467
  }
498
468
  }
499
- }, _callee8, null, [[1, 7]]);
469
+ }, _callee8);
500
470
  })));
501
471
 
502
472
  _defineProperty(_assertThisInitialized(_this), "getSubscriptionForUser", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
@@ -548,7 +518,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
548
518
  _this.loadScript(function () {
549
519
  // dont try to initialize accessType if integration id is not available
550
520
  if (accessTypeBkIntegrationId === undefined) {
551
- console.log("AccessType: Integration Id is undefined");
521
+ console.warn("AccessType: Integration Id is undefined");
552
522
  return false;
553
523
  }
554
524
 
@@ -556,7 +526,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
556
526
  });
557
527
  } catch (e) {
558
528
  console.warn("Accesstype load fail", e);
559
- console.log("AT load fail");
560
529
  }
561
530
  });
562
531
 
@@ -1208,7 +1177,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
1208
1177
  * if (paymentGateway === "stripe") {
1209
1178
  * const options = {
1210
1179
  * selectedPlan: plan,
1211
- * planType: x"standard",
1180
+ * planType: "standard",
1212
1181
  * successUrl: `${document.location.origin}/paypal-return-url`,
1213
1182
  * cancelUrl: `${document.location.origin}/paypal-cancel-url`
1214
1183
  * };
@@ -3,7 +3,7 @@ import { connect } from "react-redux";
3
3
 
4
4
  function LoadingIndicatorBase(props) {
5
5
  return /*#__PURE__*/React.createElement("div", {
6
- className: "loading-indicator ".concat(props.loading ? 'loading-indicator-loading' : '')
6
+ className: "loading-indicator ".concat(props.loading ? "loading-indicator-loading" : "")
7
7
  }, props.loading && props.children);
8
8
  }
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/components",
3
- "version": "3.3.2-check-sub-error.11",
3
+ "version": "3.3.2",
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",