@quintype/components 3.5.0 → 3.5.1-test.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.
- package/dist/cjs/index.js +44 -22
- package/dist/es/components/access-type.js +44 -22
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -5030,6 +5030,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5030
5030
|
var environment = isStaging ? "&env=sandbox" : "";
|
|
5031
5031
|
var accessTypeHost = "".concat(HOST, "/frontend/v2/accesstype.js?key=").concat(accessTypeKey).concat(environment);
|
|
5032
5032
|
var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
|
|
5033
|
+
console.log("");
|
|
5033
5034
|
|
|
5034
5035
|
if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
|
|
5035
5036
|
var accessTypeScript = document.createElement("script");
|
|
@@ -5222,18 +5223,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5222
5223
|
subscriptions = _yield$awaitHelper3.data;
|
|
5223
5224
|
|
|
5224
5225
|
if (!error) {
|
|
5225
|
-
_context4.next =
|
|
5226
|
+
_context4.next = 16;
|
|
5226
5227
|
break;
|
|
5227
5228
|
}
|
|
5228
5229
|
|
|
5230
|
+
console.log("getSubscription---------", error);
|
|
5229
5231
|
return _context4.abrupt("return", {
|
|
5230
5232
|
error: "subscriptions fetch failed"
|
|
5231
5233
|
});
|
|
5232
5234
|
|
|
5233
|
-
case
|
|
5235
|
+
case 16:
|
|
5234
5236
|
return _context4.abrupt("return", subscriptions["subscription_groups"] || []);
|
|
5235
5237
|
|
|
5236
|
-
case
|
|
5238
|
+
case 17:
|
|
5237
5239
|
case "end":
|
|
5238
5240
|
return _context4.stop();
|
|
5239
5241
|
}
|
|
@@ -5265,18 +5267,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5265
5267
|
paymentOptions = _yield$awaitHelper4.data;
|
|
5266
5268
|
|
|
5267
5269
|
if (!error) {
|
|
5268
|
-
_context5.next =
|
|
5270
|
+
_context5.next = 10;
|
|
5269
5271
|
break;
|
|
5270
5272
|
}
|
|
5271
5273
|
|
|
5274
|
+
console.log("error---------------getPaymentOptions", error);
|
|
5272
5275
|
return _context5.abrupt("return", {
|
|
5273
5276
|
error: "payment options fetch failed"
|
|
5274
5277
|
});
|
|
5275
5278
|
|
|
5276
|
-
case
|
|
5279
|
+
case 10:
|
|
5277
5280
|
return _context5.abrupt("return", paymentOptions);
|
|
5278
5281
|
|
|
5279
|
-
case
|
|
5282
|
+
case 11:
|
|
5280
5283
|
case "end":
|
|
5281
5284
|
return _context5.stop();
|
|
5282
5285
|
}
|
|
@@ -5319,18 +5322,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5319
5322
|
assetPlans = _yield$awaitHelper5$d === void 0 ? {} : _yield$awaitHelper5$d;
|
|
5320
5323
|
|
|
5321
5324
|
if (!error) {
|
|
5322
|
-
_context6.next =
|
|
5325
|
+
_context6.next = 12;
|
|
5323
5326
|
break;
|
|
5324
5327
|
}
|
|
5325
5328
|
|
|
5329
|
+
console.log("error---------------getAssetPlans", error);
|
|
5326
5330
|
return _context6.abrupt("return", {
|
|
5327
5331
|
error: "asset plan fetch failed"
|
|
5328
5332
|
});
|
|
5329
5333
|
|
|
5330
|
-
case
|
|
5334
|
+
case 12:
|
|
5331
5335
|
return _context6.abrupt("return", assetPlans);
|
|
5332
5336
|
|
|
5333
|
-
case
|
|
5337
|
+
case 13:
|
|
5334
5338
|
case "end":
|
|
5335
5339
|
return _context6.stop();
|
|
5336
5340
|
}
|
|
@@ -5348,7 +5352,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5348
5352
|
isAccessTypeCampaignEnabled = get__default["default"](_this.props, ["isAccessTypeCampaignEnabled"], false);
|
|
5349
5353
|
|
|
5350
5354
|
if (!isAccessTypeCampaignEnabled) {
|
|
5351
|
-
_context7.next =
|
|
5355
|
+
_context7.next = 19;
|
|
5352
5356
|
break;
|
|
5353
5357
|
}
|
|
5354
5358
|
|
|
@@ -5371,21 +5375,22 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5371
5375
|
campaignSubscriptions = _yield$awaitHelper6.data;
|
|
5372
5376
|
|
|
5373
5377
|
if (!error) {
|
|
5374
|
-
_context7.next =
|
|
5378
|
+
_context7.next = 18;
|
|
5375
5379
|
break;
|
|
5376
5380
|
}
|
|
5377
5381
|
|
|
5382
|
+
console.log("error---------------getCampaignSubscription", error);
|
|
5378
5383
|
return _context7.abrupt("return", {
|
|
5379
5384
|
error: "subscriptions fetch failed"
|
|
5380
5385
|
});
|
|
5381
5386
|
|
|
5382
|
-
case
|
|
5387
|
+
case 18:
|
|
5383
5388
|
return _context7.abrupt("return", campaignSubscriptions["subscription_groups"] || []);
|
|
5384
5389
|
|
|
5385
|
-
case
|
|
5390
|
+
case 19:
|
|
5386
5391
|
return _context7.abrupt("return", []);
|
|
5387
5392
|
|
|
5388
|
-
case
|
|
5393
|
+
case 20:
|
|
5389
5394
|
case "end":
|
|
5390
5395
|
return _context7.stop();
|
|
5391
5396
|
}
|
|
@@ -5418,6 +5423,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5418
5423
|
case 6:
|
|
5419
5424
|
_yield$awaitHelper7 = _context8.sent;
|
|
5420
5425
|
error = _yield$awaitHelper7.error;
|
|
5426
|
+
console.log("error---------", error);
|
|
5421
5427
|
|
|
5422
5428
|
if (!error) {
|
|
5423
5429
|
try {
|
|
@@ -5429,6 +5435,11 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5429
5435
|
campaignSubscriptionGroups = _ref10[3];
|
|
5430
5436
|
|
|
5431
5437
|
reactRedux.batch(function () {
|
|
5438
|
+
console.log("subscriptionGroups----------", subscriptionGroups);
|
|
5439
|
+
console.log("paymentOptions----------", paymentOptions);
|
|
5440
|
+
console.log("assetPlans----------", assetPlans);
|
|
5441
|
+
console.log("campaignSubscriptionGroups----------", campaignSubscriptionGroups);
|
|
5442
|
+
|
|
5432
5443
|
_this.props.subscriptionGroupLoaded(subscriptionGroups);
|
|
5433
5444
|
|
|
5434
5445
|
_this.props.paymentOptionsLoaded(paymentOptions);
|
|
@@ -5444,7 +5455,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5444
5455
|
}
|
|
5445
5456
|
}
|
|
5446
5457
|
|
|
5447
|
-
case
|
|
5458
|
+
case 10:
|
|
5448
5459
|
case "end":
|
|
5449
5460
|
return _context8.stop();
|
|
5450
5461
|
}
|
|
@@ -5767,54 +5778,65 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5767
5778
|
while (1) {
|
|
5768
5779
|
switch (_context12.prev = _context12.next) {
|
|
5769
5780
|
case 0:
|
|
5781
|
+
console.log("check access--------");
|
|
5782
|
+
|
|
5770
5783
|
if (assetId) {
|
|
5771
|
-
_context12.next =
|
|
5784
|
+
_context12.next = 4;
|
|
5772
5785
|
break;
|
|
5773
5786
|
}
|
|
5774
5787
|
|
|
5775
5788
|
console.warn("AssetId is required");
|
|
5776
5789
|
return _context12.abrupt("return", false);
|
|
5777
5790
|
|
|
5778
|
-
case
|
|
5791
|
+
case 4:
|
|
5792
|
+
console.log("check access--------", assetId);
|
|
5793
|
+
|
|
5779
5794
|
_this.props.accessIsLoading(true);
|
|
5780
5795
|
|
|
5781
5796
|
asset = {
|
|
5782
5797
|
id: assetId,
|
|
5783
5798
|
type: "story"
|
|
5784
5799
|
};
|
|
5785
|
-
_context12.next =
|
|
5800
|
+
_context12.next = 9;
|
|
5786
5801
|
return awaitHelper(global.AccessType.isAssetAccessible(asset, _this.props.disableMetering));
|
|
5787
5802
|
|
|
5788
|
-
case
|
|
5803
|
+
case 9:
|
|
5789
5804
|
_yield$awaitHelper10 = _context12.sent;
|
|
5790
5805
|
error = _yield$awaitHelper10.error;
|
|
5791
5806
|
accessData = _yield$awaitHelper10.data;
|
|
5807
|
+
console.log("error-----------", error);
|
|
5792
5808
|
|
|
5793
5809
|
if (!error) {
|
|
5794
|
-
_context12.next =
|
|
5810
|
+
_context12.next = 15;
|
|
5795
5811
|
break;
|
|
5796
5812
|
}
|
|
5797
5813
|
|
|
5798
5814
|
return _context12.abrupt("return", error);
|
|
5799
5815
|
|
|
5800
|
-
case
|
|
5816
|
+
case 15:
|
|
5817
|
+
console.log("accessData-----------", accessData);
|
|
5801
5818
|
accessById = _defineProperty__default["default"]({}, assetId, accessData);
|
|
5819
|
+
console.log("accessbyid------------", accessById);
|
|
5802
5820
|
|
|
5803
5821
|
_this.props.accessUpdated(accessById);
|
|
5804
5822
|
|
|
5805
5823
|
_this.props.accessIsLoading(false);
|
|
5806
5824
|
|
|
5825
|
+
console.log("accessbyid------------ after updated", accessById);
|
|
5807
5826
|
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
5808
5827
|
|
|
5809
5828
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
5829
|
+
console.log("granted condition----------");
|
|
5830
|
+
|
|
5810
5831
|
_this.pingBackMeteredStory(asset, accessData);
|
|
5811
5832
|
|
|
5812
5833
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
5813
5834
|
}
|
|
5814
5835
|
|
|
5836
|
+
console.log("accessbyid------------ last one", accessById);
|
|
5815
5837
|
return _context12.abrupt("return", accessById);
|
|
5816
5838
|
|
|
5817
|
-
case
|
|
5839
|
+
case 25:
|
|
5818
5840
|
case "end":
|
|
5819
5841
|
return _context12.stop();
|
|
5820
5842
|
}
|
|
@@ -51,6 +51,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
var environment = isStaging ? "&env=sandbox" : "";
|
|
52
52
|
var accessTypeHost = "".concat(HOST, "/frontend/v2/accesstype.js?key=").concat(accessTypeKey).concat(environment);
|
|
53
53
|
var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
|
|
54
|
+
console.log("");
|
|
54
55
|
|
|
55
56
|
if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
|
|
56
57
|
var accessTypeScript = document.createElement("script");
|
|
@@ -243,18 +244,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
243
244
|
subscriptions = _yield$awaitHelper3.data;
|
|
244
245
|
|
|
245
246
|
if (!error) {
|
|
246
|
-
_context4.next =
|
|
247
|
+
_context4.next = 16;
|
|
247
248
|
break;
|
|
248
249
|
}
|
|
249
250
|
|
|
251
|
+
console.log("getSubscription---------", error);
|
|
250
252
|
return _context4.abrupt("return", {
|
|
251
253
|
error: "subscriptions fetch failed"
|
|
252
254
|
});
|
|
253
255
|
|
|
254
|
-
case
|
|
256
|
+
case 16:
|
|
255
257
|
return _context4.abrupt("return", subscriptions["subscription_groups"] || []);
|
|
256
258
|
|
|
257
|
-
case
|
|
259
|
+
case 17:
|
|
258
260
|
case "end":
|
|
259
261
|
return _context4.stop();
|
|
260
262
|
}
|
|
@@ -286,18 +288,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
286
288
|
paymentOptions = _yield$awaitHelper4.data;
|
|
287
289
|
|
|
288
290
|
if (!error) {
|
|
289
|
-
_context5.next =
|
|
291
|
+
_context5.next = 10;
|
|
290
292
|
break;
|
|
291
293
|
}
|
|
292
294
|
|
|
295
|
+
console.log("error---------------getPaymentOptions", error);
|
|
293
296
|
return _context5.abrupt("return", {
|
|
294
297
|
error: "payment options fetch failed"
|
|
295
298
|
});
|
|
296
299
|
|
|
297
|
-
case
|
|
300
|
+
case 10:
|
|
298
301
|
return _context5.abrupt("return", paymentOptions);
|
|
299
302
|
|
|
300
|
-
case
|
|
303
|
+
case 11:
|
|
301
304
|
case "end":
|
|
302
305
|
return _context5.stop();
|
|
303
306
|
}
|
|
@@ -340,18 +343,19 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
340
343
|
assetPlans = _yield$awaitHelper5$d === void 0 ? {} : _yield$awaitHelper5$d;
|
|
341
344
|
|
|
342
345
|
if (!error) {
|
|
343
|
-
_context6.next =
|
|
346
|
+
_context6.next = 12;
|
|
344
347
|
break;
|
|
345
348
|
}
|
|
346
349
|
|
|
350
|
+
console.log("error---------------getAssetPlans", error);
|
|
347
351
|
return _context6.abrupt("return", {
|
|
348
352
|
error: "asset plan fetch failed"
|
|
349
353
|
});
|
|
350
354
|
|
|
351
|
-
case
|
|
355
|
+
case 12:
|
|
352
356
|
return _context6.abrupt("return", assetPlans);
|
|
353
357
|
|
|
354
|
-
case
|
|
358
|
+
case 13:
|
|
355
359
|
case "end":
|
|
356
360
|
return _context6.stop();
|
|
357
361
|
}
|
|
@@ -369,7 +373,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
369
373
|
isAccessTypeCampaignEnabled = get(_this.props, ["isAccessTypeCampaignEnabled"], false);
|
|
370
374
|
|
|
371
375
|
if (!isAccessTypeCampaignEnabled) {
|
|
372
|
-
_context7.next =
|
|
376
|
+
_context7.next = 19;
|
|
373
377
|
break;
|
|
374
378
|
}
|
|
375
379
|
|
|
@@ -392,21 +396,22 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
392
396
|
campaignSubscriptions = _yield$awaitHelper6.data;
|
|
393
397
|
|
|
394
398
|
if (!error) {
|
|
395
|
-
_context7.next =
|
|
399
|
+
_context7.next = 18;
|
|
396
400
|
break;
|
|
397
401
|
}
|
|
398
402
|
|
|
403
|
+
console.log("error---------------getCampaignSubscription", error);
|
|
399
404
|
return _context7.abrupt("return", {
|
|
400
405
|
error: "subscriptions fetch failed"
|
|
401
406
|
});
|
|
402
407
|
|
|
403
|
-
case
|
|
408
|
+
case 18:
|
|
404
409
|
return _context7.abrupt("return", campaignSubscriptions["subscription_groups"] || []);
|
|
405
410
|
|
|
406
|
-
case
|
|
411
|
+
case 19:
|
|
407
412
|
return _context7.abrupt("return", []);
|
|
408
413
|
|
|
409
|
-
case
|
|
414
|
+
case 20:
|
|
410
415
|
case "end":
|
|
411
416
|
return _context7.stop();
|
|
412
417
|
}
|
|
@@ -439,6 +444,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
439
444
|
case 6:
|
|
440
445
|
_yield$awaitHelper7 = _context8.sent;
|
|
441
446
|
error = _yield$awaitHelper7.error;
|
|
447
|
+
console.log("error---------", error);
|
|
442
448
|
|
|
443
449
|
if (!error) {
|
|
444
450
|
try {
|
|
@@ -450,6 +456,11 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
450
456
|
campaignSubscriptionGroups = _ref10[3];
|
|
451
457
|
|
|
452
458
|
batch(function () {
|
|
459
|
+
console.log("subscriptionGroups----------", subscriptionGroups);
|
|
460
|
+
console.log("paymentOptions----------", paymentOptions);
|
|
461
|
+
console.log("assetPlans----------", assetPlans);
|
|
462
|
+
console.log("campaignSubscriptionGroups----------", campaignSubscriptionGroups);
|
|
463
|
+
|
|
453
464
|
_this.props.subscriptionGroupLoaded(subscriptionGroups);
|
|
454
465
|
|
|
455
466
|
_this.props.paymentOptionsLoaded(paymentOptions);
|
|
@@ -465,7 +476,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
465
476
|
}
|
|
466
477
|
}
|
|
467
478
|
|
|
468
|
-
case
|
|
479
|
+
case 10:
|
|
469
480
|
case "end":
|
|
470
481
|
return _context8.stop();
|
|
471
482
|
}
|
|
@@ -788,54 +799,65 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
788
799
|
while (1) {
|
|
789
800
|
switch (_context12.prev = _context12.next) {
|
|
790
801
|
case 0:
|
|
802
|
+
console.log("check access--------");
|
|
803
|
+
|
|
791
804
|
if (assetId) {
|
|
792
|
-
_context12.next =
|
|
805
|
+
_context12.next = 4;
|
|
793
806
|
break;
|
|
794
807
|
}
|
|
795
808
|
|
|
796
809
|
console.warn("AssetId is required");
|
|
797
810
|
return _context12.abrupt("return", false);
|
|
798
811
|
|
|
799
|
-
case
|
|
812
|
+
case 4:
|
|
813
|
+
console.log("check access--------", assetId);
|
|
814
|
+
|
|
800
815
|
_this.props.accessIsLoading(true);
|
|
801
816
|
|
|
802
817
|
asset = {
|
|
803
818
|
id: assetId,
|
|
804
819
|
type: "story"
|
|
805
820
|
};
|
|
806
|
-
_context12.next =
|
|
821
|
+
_context12.next = 9;
|
|
807
822
|
return awaitHelper(global.AccessType.isAssetAccessible(asset, _this.props.disableMetering));
|
|
808
823
|
|
|
809
|
-
case
|
|
824
|
+
case 9:
|
|
810
825
|
_yield$awaitHelper10 = _context12.sent;
|
|
811
826
|
error = _yield$awaitHelper10.error;
|
|
812
827
|
accessData = _yield$awaitHelper10.data;
|
|
828
|
+
console.log("error-----------", error);
|
|
813
829
|
|
|
814
830
|
if (!error) {
|
|
815
|
-
_context12.next =
|
|
831
|
+
_context12.next = 15;
|
|
816
832
|
break;
|
|
817
833
|
}
|
|
818
834
|
|
|
819
835
|
return _context12.abrupt("return", error);
|
|
820
836
|
|
|
821
|
-
case
|
|
837
|
+
case 15:
|
|
838
|
+
console.log("accessData-----------", accessData);
|
|
822
839
|
accessById = _defineProperty({}, assetId, accessData);
|
|
840
|
+
console.log("accessbyid------------", accessById);
|
|
823
841
|
|
|
824
842
|
_this.props.accessUpdated(accessById);
|
|
825
843
|
|
|
826
844
|
_this.props.accessIsLoading(false);
|
|
827
845
|
|
|
846
|
+
console.log("accessbyid------------ after updated", accessById);
|
|
828
847
|
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
829
848
|
|
|
830
849
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
850
|
+
console.log("granted condition----------");
|
|
851
|
+
|
|
831
852
|
_this.pingBackMeteredStory(asset, accessData);
|
|
832
853
|
|
|
833
854
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
834
855
|
}
|
|
835
856
|
|
|
857
|
+
console.log("accessbyid------------ last one", accessById);
|
|
836
858
|
return _context12.abrupt("return", accessById);
|
|
837
859
|
|
|
838
|
-
case
|
|
860
|
+
case 25:
|
|
839
861
|
case "end":
|
|
840
862
|
return _context12.stop();
|
|
841
863
|
}
|