@pelcro/react-pelcro-js 3.22.0-beta.1 → 3.22.0-beta.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 +21 -13
- package/dist/index.esm.js +21 -13
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14042,12 +14042,9 @@ class SelectModal extends React.Component {
|
|
|
14042
14042
|
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;
|
|
14043
14043
|
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;
|
|
14044
14044
|
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;
|
|
14045
|
-
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.
|
|
14045
|
+
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 => {
|
|
14046
14046
|
const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
|
|
14047
|
-
return
|
|
14048
|
-
...product,
|
|
14049
|
-
plans: filteredPlans
|
|
14050
|
-
};
|
|
14047
|
+
if (filteredPlans.length) return filteredPlans;
|
|
14051
14048
|
});
|
|
14052
14049
|
const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
|
|
14053
14050
|
const filteredPlans = product.plans.filter(plan => {
|
|
@@ -14058,7 +14055,7 @@ class SelectModal extends React.Component {
|
|
|
14058
14055
|
});
|
|
14059
14056
|
notifyBugsnag(() => {
|
|
14060
14057
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
14061
|
-
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;
|
|
14058
|
+
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;
|
|
14062
14059
|
event.addMetadata("MetaData", {
|
|
14063
14060
|
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(),
|
|
14064
14061
|
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(),
|
|
@@ -14075,9 +14072,10 @@ class SelectModal extends React.Component {
|
|
|
14075
14072
|
userCountry: userCountry,
|
|
14076
14073
|
userLanguage: userLanguage,
|
|
14077
14074
|
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(),
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14075
|
+
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,
|
|
14076
|
+
currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
|
|
14077
|
+
country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
|
|
14078
|
+
language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
|
|
14081
14079
|
});
|
|
14082
14080
|
});
|
|
14083
14081
|
});
|
|
@@ -18783,7 +18781,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
18783
18781
|
setDisabled(disableSubmit);
|
|
18784
18782
|
}, [disableSubmit]);
|
|
18785
18783
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
18786
|
-
className: "plc-w-full",
|
|
18784
|
+
className: "plc-w-full plc-mt-6",
|
|
18787
18785
|
onClick: () => {
|
|
18788
18786
|
dispatch({
|
|
18789
18787
|
type: DISABLE_SUBMIT,
|
|
@@ -18812,7 +18810,8 @@ function PaymentMethodView(_ref) {
|
|
|
18812
18810
|
showCoupon,
|
|
18813
18811
|
showExternalPaymentMethods,
|
|
18814
18812
|
showSubscriptionButton,
|
|
18815
|
-
showOrderButton
|
|
18813
|
+
showOrderButton,
|
|
18814
|
+
order
|
|
18816
18815
|
} = _ref;
|
|
18817
18816
|
const {
|
|
18818
18817
|
t
|
|
@@ -18844,7 +18843,15 @@ function PaymentMethodView(_ref) {
|
|
|
18844
18843
|
onFailure: onFailure
|
|
18845
18844
|
}, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
|
|
18846
18845
|
className: "plc-mb-2"
|
|
18847
|
-
}), showSubscriptionButton && /*#__PURE__*/React__default['default'].createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default['default'].createElement(
|
|
18846
|
+
}), showSubscriptionButton && /*#__PURE__*/React__default['default'].createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18847
|
+
className: "plc-w-full plc-p-2 plc-mt-2 plc-font-semibold plc-text-center plc-text-gray-900 plc-bg-gray-100 plc-border plc-border-gray-200"
|
|
18848
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
18849
|
+
className: "plc-text-gray-600"
|
|
18850
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
18851
|
+
className: "plc-tracking-wider plc-uppercase"
|
|
18852
|
+
}, order === null || order === void 0 ? void 0 : order.name), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
18853
|
+
className: "plc-text-xl plc-font-semibold plc-text-primary-600"
|
|
18854
|
+
}, getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default['default'].createElement(OrderCreateFreeButton, null)), !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(BankRedirection, null), /*#__PURE__*/React__default['default'].createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default['default'].createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18848
18855
|
className: "plc-flex plc-items-start"
|
|
18849
18856
|
}, /*#__PURE__*/React__default['default'].createElement(IncludeFirstName, {
|
|
18850
18857
|
id: "pelcro-input-first-name",
|
|
@@ -24274,7 +24281,8 @@ const OrderCreateView = props => {
|
|
|
24274
24281
|
type: "orderCreate",
|
|
24275
24282
|
showCoupon: true,
|
|
24276
24283
|
showExternalPaymentMethods: false,
|
|
24277
|
-
showOrderButton: showOrderButton
|
|
24284
|
+
showOrderButton: showOrderButton,
|
|
24285
|
+
order: order
|
|
24278
24286
|
}, props))));
|
|
24279
24287
|
};
|
|
24280
24288
|
|
package/dist/index.esm.js
CHANGED
|
@@ -14012,12 +14012,9 @@ class SelectModal extends Component {
|
|
|
14012
14012
|
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;
|
|
14013
14013
|
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;
|
|
14014
14014
|
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;
|
|
14015
|
-
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.
|
|
14015
|
+
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 => {
|
|
14016
14016
|
const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
|
|
14017
|
-
return
|
|
14018
|
-
...product,
|
|
14019
|
-
plans: filteredPlans
|
|
14020
|
-
};
|
|
14017
|
+
if (filteredPlans.length) return filteredPlans;
|
|
14021
14018
|
});
|
|
14022
14019
|
const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
|
|
14023
14020
|
const filteredPlans = product.plans.filter(plan => {
|
|
@@ -14028,7 +14025,7 @@ class SelectModal extends Component {
|
|
|
14028
14025
|
});
|
|
14029
14026
|
notifyBugsnag(() => {
|
|
14030
14027
|
Bugsnag.notify("SelectModal - No data viewed", event => {
|
|
14031
|
-
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;
|
|
14028
|
+
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;
|
|
14032
14029
|
event.addMetadata("MetaData", {
|
|
14033
14030
|
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(),
|
|
14034
14031
|
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(),
|
|
@@ -14045,9 +14042,10 @@ class SelectModal extends Component {
|
|
|
14045
14042
|
userCountry: userCountry,
|
|
14046
14043
|
userLanguage: userLanguage,
|
|
14047
14044
|
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(),
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14045
|
+
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,
|
|
14046
|
+
currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
|
|
14047
|
+
country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
|
|
14048
|
+
language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
|
|
14051
14049
|
});
|
|
14052
14050
|
});
|
|
14053
14051
|
});
|
|
@@ -18753,7 +18751,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
18753
18751
|
setDisabled(disableSubmit);
|
|
18754
18752
|
}, [disableSubmit]);
|
|
18755
18753
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
18756
|
-
className: "plc-w-full",
|
|
18754
|
+
className: "plc-w-full plc-mt-6",
|
|
18757
18755
|
onClick: () => {
|
|
18758
18756
|
dispatch({
|
|
18759
18757
|
type: DISABLE_SUBMIT,
|
|
@@ -18782,7 +18780,8 @@ function PaymentMethodView(_ref) {
|
|
|
18782
18780
|
showCoupon,
|
|
18783
18781
|
showExternalPaymentMethods,
|
|
18784
18782
|
showSubscriptionButton,
|
|
18785
|
-
showOrderButton
|
|
18783
|
+
showOrderButton,
|
|
18784
|
+
order
|
|
18786
18785
|
} = _ref;
|
|
18787
18786
|
const {
|
|
18788
18787
|
t
|
|
@@ -18814,7 +18813,15 @@ function PaymentMethodView(_ref) {
|
|
|
18814
18813
|
onFailure: onFailure
|
|
18815
18814
|
}, /*#__PURE__*/React__default.createElement(AlertWithContext, {
|
|
18816
18815
|
className: "plc-mb-2"
|
|
18817
|
-
}), showSubscriptionButton && /*#__PURE__*/React__default.createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default.createElement(
|
|
18816
|
+
}), showSubscriptionButton && /*#__PURE__*/React__default.createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
18817
|
+
className: "plc-w-full plc-p-2 plc-mt-2 plc-font-semibold plc-text-center plc-text-gray-900 plc-bg-gray-100 plc-border plc-border-gray-200"
|
|
18818
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
18819
|
+
className: "plc-text-gray-600"
|
|
18820
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
18821
|
+
className: "plc-tracking-wider plc-uppercase"
|
|
18822
|
+
}, order === null || order === void 0 ? void 0 : order.name), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
18823
|
+
className: "plc-text-xl plc-font-semibold plc-text-primary-600"
|
|
18824
|
+
}, getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement(OrderCreateFreeButton, null)), !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default.createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
18818
18825
|
className: "plc-flex plc-items-start"
|
|
18819
18826
|
}, /*#__PURE__*/React__default.createElement(IncludeFirstName, {
|
|
18820
18827
|
id: "pelcro-input-first-name",
|
|
@@ -24244,7 +24251,8 @@ const OrderCreateView = props => {
|
|
|
24244
24251
|
type: "orderCreate",
|
|
24245
24252
|
showCoupon: true,
|
|
24246
24253
|
showExternalPaymentMethods: false,
|
|
24247
|
-
showOrderButton: showOrderButton
|
|
24254
|
+
showOrderButton: showOrderButton,
|
|
24255
|
+
order: order
|
|
24248
24256
|
}, props))));
|
|
24249
24257
|
};
|
|
24250
24258
|
|