@quintype/components 3.4.4-debug.0 → 3.4.4-test-4.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.
package/dist/cjs/index.js CHANGED
@@ -2440,28 +2440,31 @@ var BrightcoveElement = function BrightcoveElement(props) {
2440
2440
  while (1) {
2441
2441
  switch (_context.prev = _context.next) {
2442
2442
  case 0:
2443
+ console.log("accountId", accountId, videoId);
2444
+ console.log("policyKey", policyKey);
2445
+
2443
2446
  if (posterImage) {
2444
- _context.next = 8;
2447
+ _context.next = 10;
2445
2448
  break;
2446
2449
  }
2447
2450
 
2448
- _context.next = 3;
2451
+ _context.next = 5;
2449
2452
  return fetch("https://edge.api.brightcove.com/playback/v1/accounts/".concat(accountId, "/videos?q=id:").concat(videoId), {
2450
2453
  headers: {
2451
2454
  "BCOV-Policy": policyKey
2452
2455
  }
2453
2456
  });
2454
2457
 
2455
- case 3:
2456
- _context.next = 5;
2458
+ case 5:
2459
+ _context.next = 7;
2457
2460
  return _context.sent.json();
2458
2461
 
2459
- case 5:
2462
+ case 7:
2460
2463
  _yield$yield$fetch$js = _context.sent;
2461
2464
  videos = _yield$yield$fetch$js.videos;
2462
2465
  setPosterImage(videos[0].poster || "");
2463
2466
 
2464
- case 8:
2467
+ case 10:
2465
2468
  case "end":
2466
2469
  return _context.stop();
2467
2470
  }
@@ -2477,6 +2480,8 @@ var BrightcoveElement = function BrightcoveElement(props) {
2477
2480
  if (loadIframeOnClick) {
2478
2481
  var _window3;
2479
2482
 
2483
+ console.log("coming in if");
2484
+
2480
2485
  if (!showVideo) {
2481
2486
  getPoster();
2482
2487
  }
@@ -2500,10 +2505,12 @@ var BrightcoveElement = function BrightcoveElement(props) {
2500
2505
  className: "brightcove-poster-fallback"
2501
2506
  })), showVideo && ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.BrightcovePlayerLoader) && brightcoveIframe(true));
2502
2507
  } else if (!loadIframeOnClick && (_window4 = window) !== null && _window4 !== void 0 && _window4.BrightcovePlayerLoader) {
2508
+ console.log("coming in else if");
2503
2509
  return /*#__PURE__*/React__default["default"].createElement("div", {
2504
2510
  className: "brightcove-wrapper"
2505
2511
  }, brightcoveIframe());
2506
2512
  } else {
2513
+ console.log("coming in else");
2507
2514
  return null;
2508
2515
  }
2509
2516
  };
@@ -5163,11 +5170,10 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5163
5170
 
5164
5171
  case 3:
5165
5172
  jwtResponse = _context8.sent;
5166
- console.log("\n\n*** jwtResponse >> ", jwtResponse, "\n\n");
5167
- _context8.next = 7;
5173
+ _context8.next = 6;
5168
5174
  return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
5169
5175
 
5170
- case 7:
5176
+ case 6:
5171
5177
  _yield$awaitHelper7 = _context8.sent;
5172
5178
  error = _yield$awaitHelper7.error;
5173
5179
 
@@ -5196,7 +5202,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5196
5202
  }
5197
5203
  }
5198
5204
 
5199
- case 10:
5205
+ case 9:
5200
5206
  case "end":
5201
5207
  return _context8.stop();
5202
5208
  }
@@ -5211,34 +5217,39 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5211
5217
  while (1) {
5212
5218
  switch (_context9.prev = _context9.next) {
5213
5219
  case 0:
5220
+ console.log("getSubscriptionForUser");
5221
+
5214
5222
  if (global.AccessType) {
5215
- _context9.next = 2;
5223
+ _context9.next = 3;
5216
5224
  break;
5217
5225
  }
5218
5226
 
5219
5227
  return _context9.abrupt("return", {});
5220
5228
 
5221
- case 2:
5222
- _context9.next = 4;
5229
+ case 3:
5230
+ console.log("accesstype available");
5231
+ _context9.next = 6;
5223
5232
  return awaitHelper(global.AccessType.getSubscriptions());
5224
5233
 
5225
- case 4:
5234
+ case 6:
5226
5235
  _yield$awaitHelper8 = _context9.sent;
5227
5236
  error = _yield$awaitHelper8.error;
5228
5237
  _yield$awaitHelper8$d = _yield$awaitHelper8.data;
5229
5238
  subscriptions = _yield$awaitHelper8$d === void 0 ? [] : _yield$awaitHelper8$d;
5230
5239
 
5231
5240
  if (!error) {
5232
- _context9.next = 10;
5241
+ _context9.next = 13;
5233
5242
  break;
5234
5243
  }
5235
5244
 
5245
+ console.log("coming in error", error);
5236
5246
  return _context9.abrupt("return", error);
5237
5247
 
5238
- case 10:
5248
+ case 13:
5249
+ console.log("coming in subscriptions", subscriptions);
5239
5250
  return _context9.abrupt("return", subscriptions);
5240
5251
 
5241
- case 11:
5252
+ case 15:
5242
5253
  case "end":
5243
5254
  return _context9.stop();
5244
5255
  }
@@ -433,11 +433,10 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
433
433
 
434
434
  case 3:
435
435
  jwtResponse = _context8.sent;
436
- console.log("\n\n*** jwtResponse >> ", jwtResponse, "\n\n");
437
- _context8.next = 7;
436
+ _context8.next = 6;
438
437
  return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
439
438
 
440
- case 7:
439
+ case 6:
441
440
  _yield$awaitHelper7 = _context8.sent;
442
441
  error = _yield$awaitHelper7.error;
443
442
 
@@ -466,7 +465,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
466
465
  }
467
466
  }
468
467
 
469
- case 10:
468
+ case 9:
470
469
  case "end":
471
470
  return _context8.stop();
472
471
  }
@@ -481,34 +480,39 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
481
480
  while (1) {
482
481
  switch (_context9.prev = _context9.next) {
483
482
  case 0:
483
+ console.log("getSubscriptionForUser");
484
+
484
485
  if (global.AccessType) {
485
- _context9.next = 2;
486
+ _context9.next = 3;
486
487
  break;
487
488
  }
488
489
 
489
490
  return _context9.abrupt("return", {});
490
491
 
491
- case 2:
492
- _context9.next = 4;
492
+ case 3:
493
+ console.log("accesstype available");
494
+ _context9.next = 6;
493
495
  return awaitHelper(global.AccessType.getSubscriptions());
494
496
 
495
- case 4:
497
+ case 6:
496
498
  _yield$awaitHelper8 = _context9.sent;
497
499
  error = _yield$awaitHelper8.error;
498
500
  _yield$awaitHelper8$d = _yield$awaitHelper8.data;
499
501
  subscriptions = _yield$awaitHelper8$d === void 0 ? [] : _yield$awaitHelper8$d;
500
502
 
501
503
  if (!error) {
502
- _context9.next = 10;
504
+ _context9.next = 13;
503
505
  break;
504
506
  }
505
507
 
508
+ console.log("coming in error", error);
506
509
  return _context9.abrupt("return", error);
507
510
 
508
- case 10:
511
+ case 13:
512
+ console.log("coming in subscriptions", subscriptions);
509
513
  return _context9.abrupt("return", subscriptions);
510
514
 
511
- case 11:
515
+ case 15:
512
516
  case "end":
513
517
  return _context9.stop();
514
518
  }
@@ -89,28 +89,31 @@ var BrightcoveElement = function BrightcoveElement(props) {
89
89
  while (1) {
90
90
  switch (_context.prev = _context.next) {
91
91
  case 0:
92
+ console.log("accountId", accountId, videoId);
93
+ console.log("policyKey", policyKey);
94
+
92
95
  if (posterImage) {
93
- _context.next = 8;
96
+ _context.next = 10;
94
97
  break;
95
98
  }
96
99
 
97
- _context.next = 3;
100
+ _context.next = 5;
98
101
  return fetch("https://edge.api.brightcove.com/playback/v1/accounts/".concat(accountId, "/videos?q=id:").concat(videoId), {
99
102
  headers: {
100
103
  "BCOV-Policy": policyKey
101
104
  }
102
105
  });
103
106
 
104
- case 3:
105
- _context.next = 5;
107
+ case 5:
108
+ _context.next = 7;
106
109
  return _context.sent.json();
107
110
 
108
- case 5:
111
+ case 7:
109
112
  _yield$yield$fetch$js = _context.sent;
110
113
  videos = _yield$yield$fetch$js.videos;
111
114
  setPosterImage(videos[0].poster || "");
112
115
 
113
- case 8:
116
+ case 10:
114
117
  case "end":
115
118
  return _context.stop();
116
119
  }
@@ -126,6 +129,8 @@ var BrightcoveElement = function BrightcoveElement(props) {
126
129
  if (loadIframeOnClick) {
127
130
  var _window3;
128
131
 
132
+ console.log("coming in if");
133
+
129
134
  if (!showVideo) {
130
135
  getPoster();
131
136
  }
@@ -149,10 +154,12 @@ var BrightcoveElement = function BrightcoveElement(props) {
149
154
  className: "brightcove-poster-fallback"
150
155
  })), showVideo && ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.BrightcovePlayerLoader) && brightcoveIframe(true));
151
156
  } else if (!loadIframeOnClick && (_window4 = window) !== null && _window4 !== void 0 && _window4.BrightcovePlayerLoader) {
157
+ console.log("coming in else if");
152
158
  return /*#__PURE__*/React.createElement("div", {
153
159
  className: "brightcove-wrapper"
154
160
  }, brightcoveIframe());
155
161
  } else {
162
+ console.log("coming in else");
156
163
  return null;
157
164
  }
158
165
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/components",
3
- "version": "3.4.4-debug.0",
3
+ "version": "3.4.4-test-4.0",
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",