@pelcro/react-pelcro-js 3.20.1 → 3.20.3-beta.1
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 -7
- package/dist/index.esm.js +14 -7
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13946,8 +13946,8 @@ function SelectModalWithHook(props) {
|
|
|
13946
13946
|
}
|
|
13947
13947
|
SelectModalWithHook.viewId = "plan-select";
|
|
13948
13948
|
class SelectModal extends React.Component {
|
|
13949
|
-
constructor(
|
|
13950
|
-
super(
|
|
13949
|
+
constructor(_props) {
|
|
13950
|
+
super(_props);
|
|
13951
13951
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13952
13952
|
if (this.props.product) {
|
|
13953
13953
|
const {
|
|
@@ -14006,6 +14006,13 @@ class SelectModal extends React.Component {
|
|
|
14006
14006
|
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
14007
|
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
14008
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
14009
|
+
matchingEntitlementsProps: props.matchingEntitlements,
|
|
14010
|
+
productListState: this.state.productList,
|
|
14011
|
+
methods: {
|
|
14012
|
+
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
14013
|
+
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
14014
|
+
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
14015
|
+
},
|
|
14009
14016
|
userCurrency: userCurrency,
|
|
14010
14017
|
userCountry: userCountry,
|
|
14011
14018
|
userLanguage: userLanguage,
|
|
@@ -14222,10 +14229,10 @@ class SelectModal extends React.Component {
|
|
|
14222
14229
|
this.state = {
|
|
14223
14230
|
product: {},
|
|
14224
14231
|
plan: {},
|
|
14225
|
-
isGift:
|
|
14232
|
+
isGift: _props.isGift,
|
|
14226
14233
|
disabled: true,
|
|
14227
14234
|
mode: "product",
|
|
14228
|
-
productList:
|
|
14235
|
+
productList: _props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(_props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14229
14236
|
};
|
|
14230
14237
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14231
14238
|
this.locale = this.props.t;
|
|
@@ -16710,9 +16717,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16710
16717
|
const renewSubscription = !isGift && subscriptionIdToRenew;
|
|
16711
16718
|
const giftSubscriprition = isGift && !subscriptionIdToRenew;
|
|
16712
16719
|
const renewGift = isRenewingGift;
|
|
16713
|
-
const
|
|
16714
|
-
couponCode
|
|
16715
|
-
} = state;
|
|
16720
|
+
const couponCode = state.couponCode || window.Pelcro.coupon.getFromUrl() || "";
|
|
16716
16721
|
if (renewGift) {
|
|
16717
16722
|
return payment.execute({
|
|
16718
16723
|
type: PAYMENT_TYPES.RENEW_GIFTED_SUBSCRIPTION,
|
|
@@ -16786,6 +16791,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16786
16791
|
const tapInstanceRef = React__default['default'].useRef(null);
|
|
16787
16792
|
const tapInstanceCard = React__default['default'].useRef(null);
|
|
16788
16793
|
React.useEffect(() => {
|
|
16794
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16789
16795
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
16790
16796
|
var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
16791
16797
|
const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
|
|
@@ -16814,6 +16820,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16814
16820
|
}, [selectedPaymentMethodId]);
|
|
16815
16821
|
React.useEffect(() => {
|
|
16816
16822
|
whenUserReady(() => {
|
|
16823
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16817
16824
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
16818
16825
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
16819
16826
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
package/dist/index.esm.js
CHANGED
|
@@ -13916,8 +13916,8 @@ function SelectModalWithHook(props) {
|
|
|
13916
13916
|
}
|
|
13917
13917
|
SelectModalWithHook.viewId = "plan-select";
|
|
13918
13918
|
class SelectModal extends Component {
|
|
13919
|
-
constructor(
|
|
13920
|
-
super(
|
|
13919
|
+
constructor(_props) {
|
|
13920
|
+
super(_props);
|
|
13921
13921
|
_defineProperty$3(this, "componentDidMount", () => {
|
|
13922
13922
|
if (this.props.product) {
|
|
13923
13923
|
const {
|
|
@@ -13976,6 +13976,13 @@ class SelectModal extends Component {
|
|
|
13976
13976
|
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
13977
|
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
13978
|
environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
|
|
13979
|
+
matchingEntitlementsProps: props.matchingEntitlements,
|
|
13980
|
+
productListState: this.state.productList,
|
|
13981
|
+
methods: {
|
|
13982
|
+
productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
|
|
13983
|
+
pelcroSDKProductsListMethod: window.Pelcro.product.list(),
|
|
13984
|
+
pelcroSDKGetByEntitlements: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : null
|
|
13985
|
+
},
|
|
13979
13986
|
userCurrency: userCurrency,
|
|
13980
13987
|
userCountry: userCountry,
|
|
13981
13988
|
userLanguage: userLanguage,
|
|
@@ -14192,10 +14199,10 @@ class SelectModal extends Component {
|
|
|
14192
14199
|
this.state = {
|
|
14193
14200
|
product: {},
|
|
14194
14201
|
plan: {},
|
|
14195
|
-
isGift:
|
|
14202
|
+
isGift: _props.isGift,
|
|
14196
14203
|
disabled: true,
|
|
14197
14204
|
mode: "product",
|
|
14198
|
-
productList:
|
|
14205
|
+
productList: _props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(_props.matchingEntitlements) : window.Pelcro.product.list()
|
|
14199
14206
|
};
|
|
14200
14207
|
this.product = this.props.product || window.Pelcro.paywall.getProduct();
|
|
14201
14208
|
this.locale = this.props.t;
|
|
@@ -16680,9 +16687,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16680
16687
|
const renewSubscription = !isGift && subscriptionIdToRenew;
|
|
16681
16688
|
const giftSubscriprition = isGift && !subscriptionIdToRenew;
|
|
16682
16689
|
const renewGift = isRenewingGift;
|
|
16683
|
-
const
|
|
16684
|
-
couponCode
|
|
16685
|
-
} = state;
|
|
16690
|
+
const couponCode = state.couponCode || window.Pelcro.coupon.getFromUrl() || "";
|
|
16686
16691
|
if (renewGift) {
|
|
16687
16692
|
return payment.execute({
|
|
16688
16693
|
type: PAYMENT_TYPES.RENEW_GIFTED_SUBSCRIPTION,
|
|
@@ -16756,6 +16761,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16756
16761
|
const tapInstanceRef = React__default.useRef(null);
|
|
16757
16762
|
const tapInstanceCard = React__default.useRef(null);
|
|
16758
16763
|
useEffect(() => {
|
|
16764
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16759
16765
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
16760
16766
|
var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
16761
16767
|
const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
|
|
@@ -16784,6 +16790,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16784
16790
|
}, [selectedPaymentMethodId]);
|
|
16785
16791
|
useEffect(() => {
|
|
16786
16792
|
whenUserReady(() => {
|
|
16793
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16787
16794
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
16788
16795
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
16789
16796
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|