@pelcro/react-pelcro-js 3.21.1 → 3.21.2
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 +7 -9
- package/dist/index.esm.js +7 -9
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14002,12 +14002,9 @@ class SelectModal extends React.Component {
|
|
|
14002
14002
|
const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
|
|
14003
14003
|
const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
|
|
14004
14004
|
const userLanguage = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
|
|
14005
|
-
const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.
|
|
14005
|
+
const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
|
|
14006
14006
|
const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
|
|
14007
|
-
return
|
|
14008
|
-
...product,
|
|
14009
|
-
plans: filteredPlans
|
|
14010
|
-
};
|
|
14007
|
+
if (filteredPlans.length) return filteredPlans;
|
|
14011
14008
|
});
|
|
14012
14009
|
const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
|
|
14013
14010
|
const filteredPlans = product.plans.filter(plan => {
|
|
@@ -14018,7 +14015,7 @@ class SelectModal extends React.Component {
|
|
|
14018
14015
|
});
|
|
14019
14016
|
notifyBugsnag(() => {
|
|
14020
14017
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
14021
|
-
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;
|
|
14018
|
+
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;
|
|
14022
14019
|
event.addMetadata("MetaData", {
|
|
14023
14020
|
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(),
|
|
14024
14021
|
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(),
|
|
@@ -14035,9 +14032,10 @@ class SelectModal extends React.Component {
|
|
|
14035
14032
|
userCountry: userCountry,
|
|
14036
14033
|
userLanguage: userLanguage,
|
|
14037
14034
|
siteLanguage: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$helpe = _window$Pelcro9.helpers) === null || _window$Pelcro9$helpe === void 0 ? void 0 : _window$Pelcro9$helpe.getHtmlLanguageAttribute(),
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14035
|
+
products: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$site = _window$Pelcro10.site) === null || _window$Pelcro10$site === void 0 ? void 0 : _window$Pelcro10$site.read().products.length,
|
|
14036
|
+
currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
|
|
14037
|
+
country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
|
|
14038
|
+
language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
|
|
14041
14039
|
});
|
|
14042
14040
|
});
|
|
14043
14041
|
});
|
package/dist/index.esm.js
CHANGED
|
@@ -13972,12 +13972,9 @@ class SelectModal extends Component {
|
|
|
13972
13972
|
const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
|
|
13973
13973
|
const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
|
|
13974
13974
|
const userLanguage = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
|
|
13975
|
-
const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.
|
|
13975
|
+
const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
|
|
13976
13976
|
const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
|
|
13977
|
-
return
|
|
13978
|
-
...product,
|
|
13979
|
-
plans: filteredPlans
|
|
13980
|
-
};
|
|
13977
|
+
if (filteredPlans.length) return filteredPlans;
|
|
13981
13978
|
});
|
|
13982
13979
|
const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
|
|
13983
13980
|
const filteredPlans = product.plans.filter(plan => {
|
|
@@ -13988,7 +13985,7 @@ class SelectModal extends Component {
|
|
|
13988
13985
|
});
|
|
13989
13986
|
notifyBugsnag(() => {
|
|
13990
13987
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
13991
|
-
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;
|
|
13988
|
+
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;
|
|
13992
13989
|
event.addMetadata("MetaData", {
|
|
13993
13990
|
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(),
|
|
13994
13991
|
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(),
|
|
@@ -14005,9 +14002,10 @@ class SelectModal extends Component {
|
|
|
14005
14002
|
userCountry: userCountry,
|
|
14006
14003
|
userLanguage: userLanguage,
|
|
14007
14004
|
siteLanguage: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$helpe = _window$Pelcro9.helpers) === null || _window$Pelcro9$helpe === void 0 ? void 0 : _window$Pelcro9$helpe.getHtmlLanguageAttribute(),
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14005
|
+
products: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$site = _window$Pelcro10.site) === null || _window$Pelcro10$site === void 0 ? void 0 : _window$Pelcro10$site.read().products.length,
|
|
14006
|
+
currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
|
|
14007
|
+
country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
|
|
14008
|
+
language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
|
|
14011
14009
|
});
|
|
14012
14010
|
});
|
|
14013
14011
|
});
|