@quintype/components 3.4.2 → 3.4.3-paywall-loader.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 +36 -35
- package/dist/es/components/access-type.js +36 -35
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -5512,7 +5512,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5512
5512
|
|
|
5513
5513
|
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "checkAccess", /*#__PURE__*/function () {
|
|
5514
5514
|
var _ref14 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(assetId) {
|
|
5515
|
-
var asset, _yield$awaitHelper10, error, accessData, accessById, granted, grantReason,
|
|
5515
|
+
var asset, _yield$awaitHelper10, error, accessData, accessById, _ref15, granted, grantReason, _ref15$data, data;
|
|
5516
5516
|
|
|
5517
5517
|
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
|
|
5518
5518
|
while (1) {
|
|
@@ -5540,13 +5540,22 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5540
5540
|
_yield$awaitHelper10 = _context12.sent;
|
|
5541
5541
|
error = _yield$awaitHelper10.error;
|
|
5542
5542
|
accessData = _yield$awaitHelper10.data;
|
|
5543
|
+
|
|
5544
|
+
if (!error) {
|
|
5545
|
+
_context12.next = 12;
|
|
5546
|
+
break;
|
|
5547
|
+
}
|
|
5548
|
+
|
|
5549
|
+
return _context12.abrupt("return", error);
|
|
5550
|
+
|
|
5551
|
+
case 12:
|
|
5543
5552
|
accessById = _defineProperty__default["default"]({}, assetId, accessData);
|
|
5544
5553
|
|
|
5545
5554
|
_this.props.accessUpdated(accessById);
|
|
5546
5555
|
|
|
5547
5556
|
_this.props.accessIsLoading(false);
|
|
5548
5557
|
|
|
5549
|
-
granted =
|
|
5558
|
+
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
5550
5559
|
|
|
5551
5560
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
5552
5561
|
_this.pingBackMeteredStory(asset, accessData);
|
|
@@ -5554,14 +5563,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5554
5563
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
5555
5564
|
}
|
|
5556
5565
|
|
|
5557
|
-
if (!error) {
|
|
5558
|
-
_context12.next = 17;
|
|
5559
|
-
break;
|
|
5560
|
-
}
|
|
5561
|
-
|
|
5562
|
-
return _context12.abrupt("return", error);
|
|
5563
|
-
|
|
5564
|
-
case 17:
|
|
5565
5566
|
return _context12.abrupt("return", accessById);
|
|
5566
5567
|
|
|
5567
5568
|
case 18:
|
|
@@ -5607,7 +5608,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5607
5608
|
})));
|
|
5608
5609
|
|
|
5609
5610
|
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "setSubscriberMetadata", /*#__PURE__*/function () {
|
|
5610
|
-
var
|
|
5611
|
+
var _ref17 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(subscriberMetadata) {
|
|
5611
5612
|
var response;
|
|
5612
5613
|
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
|
|
5613
5614
|
while (1) {
|
|
@@ -5637,7 +5638,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5637
5638
|
}));
|
|
5638
5639
|
|
|
5639
5640
|
return function (_x9) {
|
|
5640
|
-
return
|
|
5641
|
+
return _ref17.apply(this, arguments);
|
|
5641
5642
|
};
|
|
5642
5643
|
}());
|
|
5643
5644
|
|
|
@@ -5653,29 +5654,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5653
5654
|
}
|
|
5654
5655
|
}, {
|
|
5655
5656
|
key: "makePaymentObject",
|
|
5656
|
-
value: function makePaymentObject(
|
|
5657
|
-
var
|
|
5658
|
-
selectedPlan =
|
|
5659
|
-
|
|
5660
|
-
couponCode =
|
|
5661
|
-
|
|
5662
|
-
recipientSubscriber =
|
|
5663
|
-
|
|
5664
|
-
planType =
|
|
5665
|
-
|
|
5666
|
-
storyId =
|
|
5667
|
-
|
|
5668
|
-
storyHeadline =
|
|
5669
|
-
|
|
5670
|
-
storySlug =
|
|
5671
|
-
|
|
5672
|
-
paymentType =
|
|
5673
|
-
|
|
5674
|
-
successUrl =
|
|
5675
|
-
|
|
5676
|
-
returnUrl =
|
|
5677
|
-
|
|
5678
|
-
cancelUrl =
|
|
5657
|
+
value: function makePaymentObject(_ref18) {
|
|
5658
|
+
var _ref18$selectedPlan = _ref18.selectedPlan,
|
|
5659
|
+
selectedPlan = _ref18$selectedPlan === void 0 ? {} : _ref18$selectedPlan,
|
|
5660
|
+
_ref18$couponCode = _ref18.couponCode,
|
|
5661
|
+
couponCode = _ref18$couponCode === void 0 ? "" : _ref18$couponCode,
|
|
5662
|
+
_ref18$recipientSubsc = _ref18.recipientSubscriber,
|
|
5663
|
+
recipientSubscriber = _ref18$recipientSubsc === void 0 ? {} : _ref18$recipientSubsc,
|
|
5664
|
+
_ref18$planType = _ref18.planType,
|
|
5665
|
+
planType = _ref18$planType === void 0 ? "" : _ref18$planType,
|
|
5666
|
+
_ref18$storyId = _ref18.storyId,
|
|
5667
|
+
storyId = _ref18$storyId === void 0 ? "" : _ref18$storyId,
|
|
5668
|
+
_ref18$storyHeadline = _ref18.storyHeadline,
|
|
5669
|
+
storyHeadline = _ref18$storyHeadline === void 0 ? "" : _ref18$storyHeadline,
|
|
5670
|
+
_ref18$storySlug = _ref18.storySlug,
|
|
5671
|
+
storySlug = _ref18$storySlug === void 0 ? "" : _ref18$storySlug,
|
|
5672
|
+
_ref18$paymentType = _ref18.paymentType,
|
|
5673
|
+
paymentType = _ref18$paymentType === void 0 ? "" : _ref18$paymentType,
|
|
5674
|
+
_ref18$successUrl = _ref18.successUrl,
|
|
5675
|
+
successUrl = _ref18$successUrl === void 0 ? "" : _ref18$successUrl,
|
|
5676
|
+
_ref18$returnUrl = _ref18.returnUrl,
|
|
5677
|
+
returnUrl = _ref18$returnUrl === void 0 ? "" : _ref18$returnUrl,
|
|
5678
|
+
_ref18$cancelUrl = _ref18.cancelUrl,
|
|
5679
|
+
cancelUrl = _ref18$cancelUrl === void 0 ? "" : _ref18$cancelUrl;
|
|
5679
5680
|
var id = selectedPlan.id,
|
|
5680
5681
|
title = selectedPlan.title,
|
|
5681
5682
|
description = selectedPlan.description,
|
|
@@ -782,7 +782,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
782
782
|
|
|
783
783
|
_defineProperty(_assertThisInitialized(_this), "checkAccess", /*#__PURE__*/function () {
|
|
784
784
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(assetId) {
|
|
785
|
-
var asset, _yield$awaitHelper10, error, accessData, accessById, granted, grantReason,
|
|
785
|
+
var asset, _yield$awaitHelper10, error, accessData, accessById, _ref15, granted, grantReason, _ref15$data, data;
|
|
786
786
|
|
|
787
787
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
788
788
|
while (1) {
|
|
@@ -810,13 +810,22 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
810
810
|
_yield$awaitHelper10 = _context12.sent;
|
|
811
811
|
error = _yield$awaitHelper10.error;
|
|
812
812
|
accessData = _yield$awaitHelper10.data;
|
|
813
|
+
|
|
814
|
+
if (!error) {
|
|
815
|
+
_context12.next = 12;
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
return _context12.abrupt("return", error);
|
|
820
|
+
|
|
821
|
+
case 12:
|
|
813
822
|
accessById = _defineProperty({}, assetId, accessData);
|
|
814
823
|
|
|
815
824
|
_this.props.accessUpdated(accessById);
|
|
816
825
|
|
|
817
826
|
_this.props.accessIsLoading(false);
|
|
818
827
|
|
|
819
|
-
granted =
|
|
828
|
+
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
820
829
|
|
|
821
830
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
822
831
|
_this.pingBackMeteredStory(asset, accessData);
|
|
@@ -824,14 +833,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
824
833
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
825
834
|
}
|
|
826
835
|
|
|
827
|
-
if (!error) {
|
|
828
|
-
_context12.next = 17;
|
|
829
|
-
break;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
return _context12.abrupt("return", error);
|
|
833
|
-
|
|
834
|
-
case 17:
|
|
835
836
|
return _context12.abrupt("return", accessById);
|
|
836
837
|
|
|
837
838
|
case 18:
|
|
@@ -877,7 +878,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
877
878
|
})));
|
|
878
879
|
|
|
879
880
|
_defineProperty(_assertThisInitialized(_this), "setSubscriberMetadata", /*#__PURE__*/function () {
|
|
880
|
-
var
|
|
881
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(subscriberMetadata) {
|
|
881
882
|
var response;
|
|
882
883
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
883
884
|
while (1) {
|
|
@@ -907,7 +908,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
907
908
|
}));
|
|
908
909
|
|
|
909
910
|
return function (_x9) {
|
|
910
|
-
return
|
|
911
|
+
return _ref17.apply(this, arguments);
|
|
911
912
|
};
|
|
912
913
|
}());
|
|
913
914
|
|
|
@@ -923,29 +924,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
923
924
|
}
|
|
924
925
|
}, {
|
|
925
926
|
key: "makePaymentObject",
|
|
926
|
-
value: function makePaymentObject(
|
|
927
|
-
var
|
|
928
|
-
selectedPlan =
|
|
929
|
-
|
|
930
|
-
couponCode =
|
|
931
|
-
|
|
932
|
-
recipientSubscriber =
|
|
933
|
-
|
|
934
|
-
planType =
|
|
935
|
-
|
|
936
|
-
storyId =
|
|
937
|
-
|
|
938
|
-
storyHeadline =
|
|
939
|
-
|
|
940
|
-
storySlug =
|
|
941
|
-
|
|
942
|
-
paymentType =
|
|
943
|
-
|
|
944
|
-
successUrl =
|
|
945
|
-
|
|
946
|
-
returnUrl =
|
|
947
|
-
|
|
948
|
-
cancelUrl =
|
|
927
|
+
value: function makePaymentObject(_ref18) {
|
|
928
|
+
var _ref18$selectedPlan = _ref18.selectedPlan,
|
|
929
|
+
selectedPlan = _ref18$selectedPlan === void 0 ? {} : _ref18$selectedPlan,
|
|
930
|
+
_ref18$couponCode = _ref18.couponCode,
|
|
931
|
+
couponCode = _ref18$couponCode === void 0 ? "" : _ref18$couponCode,
|
|
932
|
+
_ref18$recipientSubsc = _ref18.recipientSubscriber,
|
|
933
|
+
recipientSubscriber = _ref18$recipientSubsc === void 0 ? {} : _ref18$recipientSubsc,
|
|
934
|
+
_ref18$planType = _ref18.planType,
|
|
935
|
+
planType = _ref18$planType === void 0 ? "" : _ref18$planType,
|
|
936
|
+
_ref18$storyId = _ref18.storyId,
|
|
937
|
+
storyId = _ref18$storyId === void 0 ? "" : _ref18$storyId,
|
|
938
|
+
_ref18$storyHeadline = _ref18.storyHeadline,
|
|
939
|
+
storyHeadline = _ref18$storyHeadline === void 0 ? "" : _ref18$storyHeadline,
|
|
940
|
+
_ref18$storySlug = _ref18.storySlug,
|
|
941
|
+
storySlug = _ref18$storySlug === void 0 ? "" : _ref18$storySlug,
|
|
942
|
+
_ref18$paymentType = _ref18.paymentType,
|
|
943
|
+
paymentType = _ref18$paymentType === void 0 ? "" : _ref18$paymentType,
|
|
944
|
+
_ref18$successUrl = _ref18.successUrl,
|
|
945
|
+
successUrl = _ref18$successUrl === void 0 ? "" : _ref18$successUrl,
|
|
946
|
+
_ref18$returnUrl = _ref18.returnUrl,
|
|
947
|
+
returnUrl = _ref18$returnUrl === void 0 ? "" : _ref18$returnUrl,
|
|
948
|
+
_ref18$cancelUrl = _ref18.cancelUrl,
|
|
949
|
+
cancelUrl = _ref18$cancelUrl === void 0 ? "" : _ref18$cancelUrl;
|
|
949
950
|
var id = selectedPlan.id,
|
|
950
951
|
title = selectedPlan.title,
|
|
951
952
|
description = selectedPlan.description,
|