@pelcro/react-pelcro-js 3.20.3-beta.1 → 3.20.3
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/index.cjs.js +14 -14
- package/dist/index.esm.js +14 -14
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13944,10 +13944,17 @@ function SelectModalWithHook(props) {
|
|
|
13944
13944
|
matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
|
|
13945
13945
|
});
|
|
13946
13946
|
}
|
|
13947
|
+
function productsWithMatchedTaggedFirst() {
|
|
13948
|
+
var _window$Pelcro$produc;
|
|
13949
|
+
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
13950
|
+
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
13951
|
+
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
13952
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
13953
|
+
}
|
|
13947
13954
|
SelectModalWithHook.viewId = "plan-select";
|
|
13948
13955
|
class SelectModal extends React.Component {
|
|
13949
|
-
constructor(
|
|
13950
|
-
super(
|
|
13956
|
+
constructor(props) {
|
|
13957
|
+
super(props);
|
|
13951
13958
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13952
13959
|
if (this.props.product) {
|
|
13953
13960
|
const {
|
|
@@ -14000,18 +14007,18 @@ class SelectModal extends React.Component {
|
|
|
14000
14007
|
}).length === 0 : false;
|
|
14001
14008
|
notifyBugsnag(() => {
|
|
14002
14009
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
14003
|
-
var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
|
|
14010
|
+
var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
|
|
14004
14011
|
event.addMetadata("MetaData", {
|
|
14005
14012
|
site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
|
|
14006
14013
|
user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
|
|
14007
14014
|
uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
|
|
14008
14015
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
14009
|
-
matchingEntitlementsProps: props.matchingEntitlements,
|
|
14016
|
+
matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
|
|
14010
14017
|
productListState: this.state.productList,
|
|
14011
14018
|
methods: {
|
|
14012
14019
|
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
14013
14020
|
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
14014
|
-
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
14021
|
+
pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
|
|
14015
14022
|
},
|
|
14016
14023
|
userCurrency: userCurrency,
|
|
14017
14024
|
userCountry: userCountry,
|
|
@@ -14120,13 +14127,6 @@ class SelectModal extends React.Component {
|
|
|
14120
14127
|
}), /*#__PURE__*/React__default['default'].createElement("h3", {
|
|
14121
14128
|
className: "plc-text-sm plc-font-semibold"
|
|
14122
14129
|
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
14123
|
-
function productsWithMatchedTaggedFirst() {
|
|
14124
|
-
var _window$Pelcro$produc;
|
|
14125
|
-
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
14126
|
-
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
14127
|
-
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
14128
|
-
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
14129
|
-
}
|
|
14130
14130
|
});
|
|
14131
14131
|
_defineProperty$3(this, "renderPlans", () => {
|
|
14132
14132
|
return this.state.planList.map(plan => {
|
|
@@ -14229,10 +14229,10 @@ class SelectModal extends React.Component {
|
|
|
14229
14229
|
this.state = {
|
|
14230
14230
|
product: {},
|
|
14231
14231
|
plan: {},
|
|
14232
|
-
isGift:
|
|
14232
|
+
isGift: props.isGift,
|
|
14233
14233
|
disabled: true,
|
|
14234
14234
|
mode: "product",
|
|
14235
|
-
productList:
|
|
14235
|
+
productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14236
14236
|
};
|
|
14237
14237
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14238
14238
|
this.locale = this.props.t;
|
package/dist/index.esm.js
CHANGED
|
@@ -13914,10 +13914,17 @@ function SelectModalWithHook(props) {
|
|
|
13914
13914
|
matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
|
|
13915
13915
|
});
|
|
13916
13916
|
}
|
|
13917
|
+
function productsWithMatchedTaggedFirst() {
|
|
13918
|
+
var _window$Pelcro$produc;
|
|
13919
|
+
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
13920
|
+
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
13921
|
+
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
13922
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
13923
|
+
}
|
|
13917
13924
|
SelectModalWithHook.viewId = "plan-select";
|
|
13918
13925
|
class SelectModal extends Component {
|
|
13919
|
-
constructor(
|
|
13920
|
-
super(
|
|
13926
|
+
constructor(props) {
|
|
13927
|
+
super(props);
|
|
13921
13928
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13922
13929
|
if (this.props.product) {
|
|
13923
13930
|
const {
|
|
@@ -13970,18 +13977,18 @@ class SelectModal extends Component {
|
|
|
13970
13977
|
}).length === 0 : false;
|
|
13971
13978
|
notifyBugsnag(() => {
|
|
13972
13979
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
13973
|
-
var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
|
|
13980
|
+
var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
|
|
13974
13981
|
event.addMetadata("MetaData", {
|
|
13975
13982
|
site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
|
|
13976
13983
|
user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
|
|
13977
13984
|
uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
|
|
13978
13985
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
13979
|
-
matchingEntitlementsProps: props.matchingEntitlements,
|
|
13986
|
+
matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
|
|
13980
13987
|
productListState: this.state.productList,
|
|
13981
13988
|
methods: {
|
|
13982
13989
|
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
13983
13990
|
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
13984
|
-
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
13991
|
+
pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
|
|
13985
13992
|
},
|
|
13986
13993
|
userCurrency: userCurrency,
|
|
13987
13994
|
userCountry: userCountry,
|
|
@@ -14090,13 +14097,6 @@ class SelectModal extends Component {
|
|
|
14090
14097
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
14091
14098
|
className: "plc-text-sm plc-font-semibold"
|
|
14092
14099
|
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
14093
|
-
function productsWithMatchedTaggedFirst() {
|
|
14094
|
-
var _window$Pelcro$produc;
|
|
14095
|
-
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
14096
|
-
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
14097
|
-
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
14098
|
-
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
14099
|
-
}
|
|
14100
14100
|
});
|
|
14101
14101
|
_defineProperty$3(this, "renderPlans", () => {
|
|
14102
14102
|
return this.state.planList.map(plan => {
|
|
@@ -14199,10 +14199,10 @@ class SelectModal extends Component {
|
|
|
14199
14199
|
this.state = {
|
|
14200
14200
|
product: {},
|
|
14201
14201
|
plan: {},
|
|
14202
|
-
isGift:
|
|
14202
|
+
isGift: props.isGift,
|
|
14203
14203
|
disabled: true,
|
|
14204
14204
|
mode: "product",
|
|
14205
|
-
productList:
|
|
14205
|
+
productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14206
14206
|
};
|
|
14207
14207
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14208
14208
|
this.locale = this.props.t;
|