@quintype/components 3.5.0 → 3.5.1-test.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 +21 -8
- package/dist/es/components/access-type.js +21 -8
- 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");
|
|
@@ -5418,6 +5419,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5418
5419
|
case 6:
|
|
5419
5420
|
_yield$awaitHelper7 = _context8.sent;
|
|
5420
5421
|
error = _yield$awaitHelper7.error;
|
|
5422
|
+
console.log("error---------", error);
|
|
5421
5423
|
|
|
5422
5424
|
if (!error) {
|
|
5423
5425
|
try {
|
|
@@ -5444,7 +5446,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5444
5446
|
}
|
|
5445
5447
|
}
|
|
5446
5448
|
|
|
5447
|
-
case
|
|
5449
|
+
case 10:
|
|
5448
5450
|
case "end":
|
|
5449
5451
|
return _context8.stop();
|
|
5450
5452
|
}
|
|
@@ -5767,54 +5769,65 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5767
5769
|
while (1) {
|
|
5768
5770
|
switch (_context12.prev = _context12.next) {
|
|
5769
5771
|
case 0:
|
|
5772
|
+
console.log("check access--------");
|
|
5773
|
+
|
|
5770
5774
|
if (assetId) {
|
|
5771
|
-
_context12.next =
|
|
5775
|
+
_context12.next = 4;
|
|
5772
5776
|
break;
|
|
5773
5777
|
}
|
|
5774
5778
|
|
|
5775
5779
|
console.warn("AssetId is required");
|
|
5776
5780
|
return _context12.abrupt("return", false);
|
|
5777
5781
|
|
|
5778
|
-
case
|
|
5782
|
+
case 4:
|
|
5783
|
+
console.log("check access--------", assetId);
|
|
5784
|
+
|
|
5779
5785
|
_this.props.accessIsLoading(true);
|
|
5780
5786
|
|
|
5781
5787
|
asset = {
|
|
5782
5788
|
id: assetId,
|
|
5783
5789
|
type: "story"
|
|
5784
5790
|
};
|
|
5785
|
-
_context12.next =
|
|
5791
|
+
_context12.next = 9;
|
|
5786
5792
|
return awaitHelper(global.AccessType.isAssetAccessible(asset, _this.props.disableMetering));
|
|
5787
5793
|
|
|
5788
|
-
case
|
|
5794
|
+
case 9:
|
|
5789
5795
|
_yield$awaitHelper10 = _context12.sent;
|
|
5790
5796
|
error = _yield$awaitHelper10.error;
|
|
5791
5797
|
accessData = _yield$awaitHelper10.data;
|
|
5798
|
+
console.log("error-----------", error);
|
|
5792
5799
|
|
|
5793
5800
|
if (!error) {
|
|
5794
|
-
_context12.next =
|
|
5801
|
+
_context12.next = 15;
|
|
5795
5802
|
break;
|
|
5796
5803
|
}
|
|
5797
5804
|
|
|
5798
5805
|
return _context12.abrupt("return", error);
|
|
5799
5806
|
|
|
5800
|
-
case
|
|
5807
|
+
case 15:
|
|
5808
|
+
console.log("accessData-----------", accessData);
|
|
5801
5809
|
accessById = _defineProperty__default["default"]({}, assetId, accessData);
|
|
5810
|
+
console.log("accessbyid------------", accessById);
|
|
5802
5811
|
|
|
5803
5812
|
_this.props.accessUpdated(accessById);
|
|
5804
5813
|
|
|
5805
5814
|
_this.props.accessIsLoading(false);
|
|
5806
5815
|
|
|
5816
|
+
console.log("accessbyid------------ after updated", accessById);
|
|
5807
5817
|
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
5808
5818
|
|
|
5809
5819
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
5820
|
+
console.log("granted condition----------");
|
|
5821
|
+
|
|
5810
5822
|
_this.pingBackMeteredStory(asset, accessData);
|
|
5811
5823
|
|
|
5812
5824
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
5813
5825
|
}
|
|
5814
5826
|
|
|
5827
|
+
console.log("accessbyid------------ last one", accessById);
|
|
5815
5828
|
return _context12.abrupt("return", accessById);
|
|
5816
5829
|
|
|
5817
|
-
case
|
|
5830
|
+
case 25:
|
|
5818
5831
|
case "end":
|
|
5819
5832
|
return _context12.stop();
|
|
5820
5833
|
}
|
|
@@ -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");
|
|
@@ -439,6 +440,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
439
440
|
case 6:
|
|
440
441
|
_yield$awaitHelper7 = _context8.sent;
|
|
441
442
|
error = _yield$awaitHelper7.error;
|
|
443
|
+
console.log("error---------", error);
|
|
442
444
|
|
|
443
445
|
if (!error) {
|
|
444
446
|
try {
|
|
@@ -465,7 +467,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
465
467
|
}
|
|
466
468
|
}
|
|
467
469
|
|
|
468
|
-
case
|
|
470
|
+
case 10:
|
|
469
471
|
case "end":
|
|
470
472
|
return _context8.stop();
|
|
471
473
|
}
|
|
@@ -788,54 +790,65 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
788
790
|
while (1) {
|
|
789
791
|
switch (_context12.prev = _context12.next) {
|
|
790
792
|
case 0:
|
|
793
|
+
console.log("check access--------");
|
|
794
|
+
|
|
791
795
|
if (assetId) {
|
|
792
|
-
_context12.next =
|
|
796
|
+
_context12.next = 4;
|
|
793
797
|
break;
|
|
794
798
|
}
|
|
795
799
|
|
|
796
800
|
console.warn("AssetId is required");
|
|
797
801
|
return _context12.abrupt("return", false);
|
|
798
802
|
|
|
799
|
-
case
|
|
803
|
+
case 4:
|
|
804
|
+
console.log("check access--------", assetId);
|
|
805
|
+
|
|
800
806
|
_this.props.accessIsLoading(true);
|
|
801
807
|
|
|
802
808
|
asset = {
|
|
803
809
|
id: assetId,
|
|
804
810
|
type: "story"
|
|
805
811
|
};
|
|
806
|
-
_context12.next =
|
|
812
|
+
_context12.next = 9;
|
|
807
813
|
return awaitHelper(global.AccessType.isAssetAccessible(asset, _this.props.disableMetering));
|
|
808
814
|
|
|
809
|
-
case
|
|
815
|
+
case 9:
|
|
810
816
|
_yield$awaitHelper10 = _context12.sent;
|
|
811
817
|
error = _yield$awaitHelper10.error;
|
|
812
818
|
accessData = _yield$awaitHelper10.data;
|
|
819
|
+
console.log("error-----------", error);
|
|
813
820
|
|
|
814
821
|
if (!error) {
|
|
815
|
-
_context12.next =
|
|
822
|
+
_context12.next = 15;
|
|
816
823
|
break;
|
|
817
824
|
}
|
|
818
825
|
|
|
819
826
|
return _context12.abrupt("return", error);
|
|
820
827
|
|
|
821
|
-
case
|
|
828
|
+
case 15:
|
|
829
|
+
console.log("accessData-----------", accessData);
|
|
822
830
|
accessById = _defineProperty({}, assetId, accessData);
|
|
831
|
+
console.log("accessbyid------------", accessById);
|
|
823
832
|
|
|
824
833
|
_this.props.accessUpdated(accessById);
|
|
825
834
|
|
|
826
835
|
_this.props.accessIsLoading(false);
|
|
827
836
|
|
|
837
|
+
console.log("accessbyid------------ after updated", accessById);
|
|
828
838
|
_ref15 = accessData || {}, granted = _ref15.granted, grantReason = _ref15.grantReason, _ref15$data = _ref15.data, data = _ref15$data === void 0 ? {} : _ref15$data;
|
|
829
839
|
|
|
830
840
|
if (!_this.props.disableMetering && granted && grantReason === "METERING") {
|
|
841
|
+
console.log("granted condition----------");
|
|
842
|
+
|
|
831
843
|
_this.pingBackMeteredStory(asset, accessData);
|
|
832
844
|
|
|
833
845
|
_this.props.meterUpdated(data.numberRemaining || -1);
|
|
834
846
|
}
|
|
835
847
|
|
|
848
|
+
console.log("accessbyid------------ last one", accessById);
|
|
836
849
|
return _context12.abrupt("return", accessById);
|
|
837
850
|
|
|
838
|
-
case
|
|
851
|
+
case 25:
|
|
839
852
|
case "end":
|
|
840
853
|
return _context12.stop();
|
|
841
854
|
}
|