@pelcro/react-pelcro-js 3.44.0 → 3.46.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/index.cjs.js +29 -28
- package/dist/index.esm.js +29 -28
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -11220,21 +11220,24 @@ const init$1 = () => {
|
|
|
11220
11220
|
if (!quickPurchaseItem) {
|
|
11221
11221
|
return console.error("invalid item SKU id");
|
|
11222
11222
|
}
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
if (itemDidntMatchUserCurrency) {
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11223
|
+
purchaseItem(itemSkuId);
|
|
11224
|
+
|
|
11225
|
+
// if (itemDidntMatchUserCurrency) {
|
|
11226
|
+
// const userCurrency = window.Pelcro.user
|
|
11227
|
+
// .read()
|
|
11228
|
+
// .currency?.toUpperCase();
|
|
11229
|
+
// const errorMsg = i18n.t(
|
|
11230
|
+
// "shop:messages.currencyMismatch",
|
|
11231
|
+
// { currency: userCurrency }
|
|
11232
|
+
// );
|
|
11233
|
+
// notify.error(errorMsg);
|
|
11234
|
+
// }
|
|
11233
11235
|
});
|
|
11234
11236
|
}
|
|
11235
11237
|
}
|
|
11236
11238
|
});
|
|
11237
11239
|
};
|
|
11240
|
+
|
|
11238
11241
|
const authenticatedButtons = () => {
|
|
11239
11242
|
saveToMetadataButton.authenticated();
|
|
11240
11243
|
const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
|
|
@@ -13105,7 +13108,7 @@ function Password(_ref) {
|
|
|
13105
13108
|
onFocus: () => setFinishedTyping(false)
|
|
13106
13109
|
}, otherProps)), ((_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.showPassword) && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
13107
13110
|
onClick: () => setShowPassword(!showPassword),
|
|
13108
|
-
className: "plc-absolute plc-right-2 plc-transform plc--translate-y-1/2 plc-cursor-pointer plc-opacity-50 plc-w-
|
|
13111
|
+
className: "plc-absolute plc-right-2 plc-transform plc--translate-y-1/2 plc-cursor-pointer plc-opacity-50 plc-w-9 plc-h-9",
|
|
13109
13112
|
style: {
|
|
13110
13113
|
top: "70%"
|
|
13111
13114
|
}
|
|
@@ -27223,23 +27226,21 @@ const CartContainer = _ref => {
|
|
|
27223
27226
|
}
|
|
27224
27227
|
});
|
|
27225
27228
|
} else {
|
|
27226
|
-
|
|
27227
|
-
|
|
27228
|
-
|
|
27229
|
-
|
|
27230
|
-
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
|
|
27234
|
-
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27239
|
-
|
|
27240
|
-
|
|
27241
|
-
});
|
|
27242
|
-
}
|
|
27229
|
+
window.Pelcro.user.read().currency;
|
|
27230
|
+
cartItems[0].currency;
|
|
27231
|
+
|
|
27232
|
+
// if (userCurrency && userCurrency !== itemsCurrency) {
|
|
27233
|
+
// dispatch({ type: DISABLE_SUBMIT, payload: true });
|
|
27234
|
+
// dispatch({
|
|
27235
|
+
// type: SHOW_ALERT,
|
|
27236
|
+
// payload: {
|
|
27237
|
+
// type: "error",
|
|
27238
|
+
// content: t("messages.currencyMismatch", {
|
|
27239
|
+
// currency: userCurrency.toUpperCase()
|
|
27240
|
+
// })
|
|
27241
|
+
// }
|
|
27242
|
+
// });
|
|
27243
|
+
// }
|
|
27243
27244
|
}
|
|
27244
27245
|
}, [cartItems]);
|
|
27245
27246
|
const submit = (state, dispatch) => {
|
package/dist/index.esm.js
CHANGED
|
@@ -11190,21 +11190,24 @@ const init$1 = () => {
|
|
|
11190
11190
|
if (!quickPurchaseItem) {
|
|
11191
11191
|
return console.error("invalid item SKU id");
|
|
11192
11192
|
}
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
if (itemDidntMatchUserCurrency) {
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11193
|
+
purchaseItem(itemSkuId);
|
|
11194
|
+
|
|
11195
|
+
// if (itemDidntMatchUserCurrency) {
|
|
11196
|
+
// const userCurrency = window.Pelcro.user
|
|
11197
|
+
// .read()
|
|
11198
|
+
// .currency?.toUpperCase();
|
|
11199
|
+
// const errorMsg = i18n.t(
|
|
11200
|
+
// "shop:messages.currencyMismatch",
|
|
11201
|
+
// { currency: userCurrency }
|
|
11202
|
+
// );
|
|
11203
|
+
// notify.error(errorMsg);
|
|
11204
|
+
// }
|
|
11203
11205
|
});
|
|
11204
11206
|
}
|
|
11205
11207
|
}
|
|
11206
11208
|
});
|
|
11207
11209
|
};
|
|
11210
|
+
|
|
11208
11211
|
const authenticatedButtons = () => {
|
|
11209
11212
|
saveToMetadataButton.authenticated();
|
|
11210
11213
|
const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
|
|
@@ -13075,7 +13078,7 @@ function Password(_ref) {
|
|
|
13075
13078
|
onFocus: () => setFinishedTyping(false)
|
|
13076
13079
|
}, otherProps)), ((_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.showPassword) && /*#__PURE__*/React__default.createElement("span", {
|
|
13077
13080
|
onClick: () => setShowPassword(!showPassword),
|
|
13078
|
-
className: "plc-absolute plc-right-2 plc-transform plc--translate-y-1/2 plc-cursor-pointer plc-opacity-50 plc-w-
|
|
13081
|
+
className: "plc-absolute plc-right-2 plc-transform plc--translate-y-1/2 plc-cursor-pointer plc-opacity-50 plc-w-9 plc-h-9",
|
|
13079
13082
|
style: {
|
|
13080
13083
|
top: "70%"
|
|
13081
13084
|
}
|
|
@@ -27193,23 +27196,21 @@ const CartContainer = _ref => {
|
|
|
27193
27196
|
}
|
|
27194
27197
|
});
|
|
27195
27198
|
} else {
|
|
27196
|
-
|
|
27197
|
-
|
|
27198
|
-
|
|
27199
|
-
|
|
27200
|
-
|
|
27201
|
-
|
|
27202
|
-
|
|
27203
|
-
|
|
27204
|
-
|
|
27205
|
-
|
|
27206
|
-
|
|
27207
|
-
|
|
27208
|
-
|
|
27209
|
-
|
|
27210
|
-
|
|
27211
|
-
});
|
|
27212
|
-
}
|
|
27199
|
+
window.Pelcro.user.read().currency;
|
|
27200
|
+
cartItems[0].currency;
|
|
27201
|
+
|
|
27202
|
+
// if (userCurrency && userCurrency !== itemsCurrency) {
|
|
27203
|
+
// dispatch({ type: DISABLE_SUBMIT, payload: true });
|
|
27204
|
+
// dispatch({
|
|
27205
|
+
// type: SHOW_ALERT,
|
|
27206
|
+
// payload: {
|
|
27207
|
+
// type: "error",
|
|
27208
|
+
// content: t("messages.currencyMismatch", {
|
|
27209
|
+
// currency: userCurrency.toUpperCase()
|
|
27210
|
+
// })
|
|
27211
|
+
// }
|
|
27212
|
+
// });
|
|
27213
|
+
// }
|
|
27213
27214
|
}
|
|
27214
27215
|
}, [cartItems]);
|
|
27215
27216
|
const submit = (state, dispatch) => {
|