@pelcro/react-pelcro-js 4.0.0-alpha.11 → 4.0.0-alpha.13
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 +292 -313
- package/dist/index.esm.js +291 -313
- package/dist/pelcro.css +47 -41
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3072,7 +3072,7 @@ var _slicedToArray = unwrapExports(slicedToArray);
|
|
|
3072
3072
|
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3073
3073
|
|
|
3074
3074
|
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3075
|
-
function useTranslation
|
|
3075
|
+
function useTranslation(ns) {
|
|
3076
3076
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3077
3077
|
var i18nFromProps = props.i18n;
|
|
3078
3078
|
|
|
@@ -3177,7 +3177,7 @@ function withTranslation(ns) {
|
|
|
3177
3177
|
var forwardedRef = _ref.forwardedRef,
|
|
3178
3178
|
rest = _objectWithoutProperties$2(_ref, ["forwardedRef"]);
|
|
3179
3179
|
|
|
3180
|
-
var _useTranslation = useTranslation
|
|
3180
|
+
var _useTranslation = useTranslation(ns, rest),
|
|
3181
3181
|
_useTranslation2 = _slicedToArray(_useTranslation, 3),
|
|
3182
3182
|
t = _useTranslation2[0],
|
|
3183
3183
|
i18n = _useTranslation2[1],
|
|
@@ -10010,7 +10010,7 @@ const VARIANTS = {
|
|
|
10010
10010
|
ICON: "icon",
|
|
10011
10011
|
GHOST: "ghost"
|
|
10012
10012
|
};
|
|
10013
|
-
function Button
|
|
10013
|
+
function Button({
|
|
10014
10014
|
variant = "solid",
|
|
10015
10015
|
isLoading,
|
|
10016
10016
|
icon,
|
|
@@ -10135,11 +10135,11 @@ toast.confirm = (onConfirm, {
|
|
|
10135
10135
|
className: "plc-font-semibold"
|
|
10136
10136
|
}, confirmMessage), /*#__PURE__*/React__default.createElement("div", {
|
|
10137
10137
|
className: "plc-space-y-2 sm:plc-space-y-0 sm:plc-space-x-2"
|
|
10138
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
10138
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
10139
10139
|
variant: "solid",
|
|
10140
10140
|
className: "plc-text-xs plc-bg-red-500 hover:plc-bg-red-600",
|
|
10141
10141
|
onClick: onConfirmClick
|
|
10142
|
-
}, confirmButtonLabel !== null && confirmButtonLabel !== void 0 ? confirmButtonLabel : translations.labels.confirm), /*#__PURE__*/React__default.createElement(Button
|
|
10142
|
+
}, confirmButtonLabel !== null && confirmButtonLabel !== void 0 ? confirmButtonLabel : translations.labels.confirm), /*#__PURE__*/React__default.createElement(Button, {
|
|
10143
10143
|
className: "plc-text-xs",
|
|
10144
10144
|
variant: "outline",
|
|
10145
10145
|
onClick: () => toast.dismiss(t.id)
|
|
@@ -11915,7 +11915,7 @@ function Email({
|
|
|
11915
11915
|
}) {
|
|
11916
11916
|
const {
|
|
11917
11917
|
t
|
|
11918
|
-
} = useTranslation
|
|
11918
|
+
} = useTranslation("common");
|
|
11919
11919
|
const {
|
|
11920
11920
|
dispatch,
|
|
11921
11921
|
state: {
|
|
@@ -12006,7 +12006,7 @@ function Password({
|
|
|
12006
12006
|
}) {
|
|
12007
12007
|
const {
|
|
12008
12008
|
t
|
|
12009
|
-
} = useTranslation
|
|
12009
|
+
} = useTranslation("common");
|
|
12010
12010
|
const {
|
|
12011
12011
|
dispatch,
|
|
12012
12012
|
state: {
|
|
@@ -12054,7 +12054,7 @@ function ConfirmPassword({
|
|
|
12054
12054
|
}) {
|
|
12055
12055
|
const {
|
|
12056
12056
|
t
|
|
12057
|
-
} = useTranslation
|
|
12057
|
+
} = useTranslation("common");
|
|
12058
12058
|
const {
|
|
12059
12059
|
dispatch,
|
|
12060
12060
|
state: {
|
|
@@ -12135,12 +12135,12 @@ const LoginButton = ({
|
|
|
12135
12135
|
} = useContext(store$l);
|
|
12136
12136
|
const {
|
|
12137
12137
|
t
|
|
12138
|
-
} = useTranslation
|
|
12138
|
+
} = useTranslation("login");
|
|
12139
12139
|
const [isDisabled, setDisabled] = useState(true);
|
|
12140
12140
|
useEffect(() => {
|
|
12141
12141
|
setDisabled(emailError || passwordError || !email.length || !password.length || buttonDisabled);
|
|
12142
12142
|
}, [emailError, passwordError, email, password, buttonDisabled]);
|
|
12143
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
12143
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
12144
12144
|
onClick: () => {
|
|
12145
12145
|
dispatch({
|
|
12146
12146
|
type: HANDLE_LOGIN
|
|
@@ -12178,7 +12178,7 @@ const LoginRequestLoginToken = ({
|
|
|
12178
12178
|
}) => {
|
|
12179
12179
|
const {
|
|
12180
12180
|
t
|
|
12181
|
-
} = useTranslation
|
|
12181
|
+
} = useTranslation("passwordlessRequest");
|
|
12182
12182
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
12183
12183
|
type: "button",
|
|
12184
12184
|
onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(),
|
|
@@ -12885,7 +12885,7 @@ function LoginView(props) {
|
|
|
12885
12885
|
|
|
12886
12886
|
const {
|
|
12887
12887
|
t
|
|
12888
|
-
} = useTranslation
|
|
12888
|
+
} = useTranslation("login");
|
|
12889
12889
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
12890
12890
|
const passwordlessEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.passwordless_enabled;
|
|
12891
12891
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12973,7 +12973,7 @@ const Authorship = () => {
|
|
|
12973
12973
|
target: "_blank",
|
|
12974
12974
|
className: "plc-inline-flex plc-flex-col plc-items-center"
|
|
12975
12975
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
12976
|
-
className: "plc-inline-flex plc-mb-2"
|
|
12976
|
+
className: "plc-inline-flex plc-mb-2 pelcro-authorship"
|
|
12977
12977
|
}, "Powered by"), /*#__PURE__*/React__default.createElement(SvgPelcroAuthorship, {
|
|
12978
12978
|
className: "pelcro-authorship"
|
|
12979
12979
|
}));
|
|
@@ -13002,7 +13002,7 @@ function Modal({
|
|
|
13002
13002
|
className: "pelcro-modal-content"
|
|
13003
13003
|
}, children.find(({
|
|
13004
13004
|
type
|
|
13005
|
-
}) => type === ModalHeader
|
|
13005
|
+
}) => type === ModalHeader && /*#__PURE__*/React__default.createElement(ModalHeader, Object.assign({
|
|
13006
13006
|
id: id,
|
|
13007
13007
|
onDisplay: onDisplay,
|
|
13008
13008
|
hideCloseButton: hideCloseButton
|
|
@@ -13012,7 +13012,7 @@ function Modal({
|
|
|
13012
13012
|
type
|
|
13013
13013
|
}) => type === ModalFooter))));
|
|
13014
13014
|
}
|
|
13015
|
-
const ModalHeader
|
|
13015
|
+
const ModalHeader = ({
|
|
13016
13016
|
id,
|
|
13017
13017
|
onDisplay,
|
|
13018
13018
|
hideCloseButton,
|
|
@@ -13077,7 +13077,7 @@ function LoginModal({
|
|
|
13077
13077
|
}) {
|
|
13078
13078
|
const {
|
|
13079
13079
|
t
|
|
13080
|
-
} = useTranslation
|
|
13080
|
+
} = useTranslation("login");
|
|
13081
13081
|
const {
|
|
13082
13082
|
switchView,
|
|
13083
13083
|
resetView,
|
|
@@ -13117,7 +13117,7 @@ function LoginModal({
|
|
|
13117
13117
|
id: "pelcro-login-modal",
|
|
13118
13118
|
onDisplay: onDisplay,
|
|
13119
13119
|
onClose: onClose
|
|
13120
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
13120
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
13121
13121
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
13122
13122
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
13123
13123
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -13165,12 +13165,12 @@ const RegisterButton = ({
|
|
|
13165
13165
|
} = useContext(store$k);
|
|
13166
13166
|
const {
|
|
13167
13167
|
t
|
|
13168
|
-
} = useTranslation
|
|
13168
|
+
} = useTranslation("register");
|
|
13169
13169
|
const [isDisabled, setDisabled] = useState(true);
|
|
13170
13170
|
useEffect(() => {
|
|
13171
13171
|
setDisabled(buttonDisabled || emailError || passwordError || !email.length || !password.length);
|
|
13172
13172
|
}, [buttonDisabled, emailError, passwordError, email, password]);
|
|
13173
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
13173
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
13174
13174
|
onClick: () => {
|
|
13175
13175
|
dispatch({
|
|
13176
13176
|
type: HANDLE_REGISTRATION
|
|
@@ -13192,7 +13192,7 @@ function FirstName({
|
|
|
13192
13192
|
}) {
|
|
13193
13193
|
const {
|
|
13194
13194
|
t
|
|
13195
|
-
} = useTranslation
|
|
13195
|
+
} = useTranslation("common");
|
|
13196
13196
|
const {
|
|
13197
13197
|
dispatch,
|
|
13198
13198
|
state: {
|
|
@@ -13270,7 +13270,7 @@ function LastName({
|
|
|
13270
13270
|
}) {
|
|
13271
13271
|
const {
|
|
13272
13272
|
t
|
|
13273
|
-
} = useTranslation
|
|
13273
|
+
} = useTranslation("common");
|
|
13274
13274
|
const {
|
|
13275
13275
|
dispatch,
|
|
13276
13276
|
state: {
|
|
@@ -13348,7 +13348,7 @@ function Phone({
|
|
|
13348
13348
|
}) {
|
|
13349
13349
|
const {
|
|
13350
13350
|
t
|
|
13351
|
-
} = useTranslation
|
|
13351
|
+
} = useTranslation("common");
|
|
13352
13352
|
const {
|
|
13353
13353
|
dispatch,
|
|
13354
13354
|
state: {
|
|
@@ -13424,7 +13424,7 @@ function RegisterView(props) {
|
|
|
13424
13424
|
|
|
13425
13425
|
const {
|
|
13426
13426
|
t
|
|
13427
|
-
} = useTranslation
|
|
13427
|
+
} = useTranslation("register");
|
|
13428
13428
|
usePelcro();
|
|
13429
13429
|
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
13430
13430
|
const showNameFields = (_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.enableNameFieldsInRegister;
|
|
@@ -13654,7 +13654,7 @@ function RegisterModal(props) {
|
|
|
13654
13654
|
|
|
13655
13655
|
const {
|
|
13656
13656
|
t
|
|
13657
|
-
} = useTranslation
|
|
13657
|
+
} = useTranslation("register");
|
|
13658
13658
|
const {
|
|
13659
13659
|
switchView,
|
|
13660
13660
|
resetView,
|
|
@@ -13723,7 +13723,7 @@ function RegisterModal(props) {
|
|
|
13723
13723
|
id: "pelcro-register-modal",
|
|
13724
13724
|
onDisplay: props === null || props === void 0 ? void 0 : props.onDisplay,
|
|
13725
13725
|
onClose: props === null || props === void 0 ? void 0 : props.onClose
|
|
13726
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
13726
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
13727
13727
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
13728
13728
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
13729
13729
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -18458,7 +18458,7 @@ const NextArrow = ({
|
|
|
18458
18458
|
onClick,
|
|
18459
18459
|
className
|
|
18460
18460
|
}) => /*#__PURE__*/React__default.createElement("button", {
|
|
18461
|
-
className: `plc-text-white plc-w-11 plc-h-11 plc-bg-primary
|
|
18461
|
+
className: `sm:plc-flex plc-hidden plc-text-white plc-w-11 plc-h-11 plc-bg-primary plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--right-16 plc-transform plc--translate-y-1/2 plc-border plc-border-primary hover:plc-bg-white hover:plc-text-primary ${className}`,
|
|
18462
18462
|
onClick: onClick
|
|
18463
18463
|
}, /*#__PURE__*/React__default.createElement(SvgArrowThinRight, {
|
|
18464
18464
|
stroke: "currentColor",
|
|
@@ -18471,7 +18471,7 @@ const PrevArrow = ({
|
|
|
18471
18471
|
onClick,
|
|
18472
18472
|
className
|
|
18473
18473
|
}) => /*#__PURE__*/React__default.createElement("button", {
|
|
18474
|
-
className: `plc-text-white plc-w-11 plc-h-11 plc-bg-primary plc-
|
|
18474
|
+
className: `sm:plc-flex plc-hidden plc-text-white plc-w-11 plc-h-11 plc-bg-primary plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--left-16 plc-transform plc--translate-y-1/2 plc-border plc-border-primary hover:plc-bg-white hover:plc-text-primary ${className}`,
|
|
18475
18475
|
onClick: onClick
|
|
18476
18476
|
}, /*#__PURE__*/React__default.createElement(SvgArrowThinLeft, {
|
|
18477
18477
|
stroke: "currentColor",
|
|
@@ -18512,19 +18512,11 @@ function Carousel({
|
|
|
18512
18512
|
}
|
|
18513
18513
|
}]
|
|
18514
18514
|
};
|
|
18515
|
-
return (
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
|
|
18519
|
-
|
|
18520
|
-
// }`}
|
|
18521
|
-
// >
|
|
18522
|
-
React__default.createElement("div", {
|
|
18523
|
-
className: "carousel-wrapper plc-relative plc-px-16"
|
|
18524
|
-
}, /*#__PURE__*/React__default.createElement(Slider, Object.assign({
|
|
18525
|
-
ref: ref
|
|
18526
|
-
}, settings), children))
|
|
18527
|
-
);
|
|
18515
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
18516
|
+
className: "carousel-wrapper plc-relative sm:plc-px-16 plc-px-0"
|
|
18517
|
+
}, /*#__PURE__*/React__default.createElement(Slider, Object.assign({
|
|
18518
|
+
ref: ref
|
|
18519
|
+
}, settings), children));
|
|
18528
18520
|
}
|
|
18529
18521
|
|
|
18530
18522
|
var _path$m;
|
|
@@ -18706,7 +18698,7 @@ class SelectModal extends Component {
|
|
|
18706
18698
|
className: "plc-mb-2"
|
|
18707
18699
|
}, this.locale("labels.startingAt")), this.countStartPrice(product.plans)))), isPlanMode || /*#__PURE__*/React__default.createElement("div", {
|
|
18708
18700
|
className: "plc-mt-auto plc-w-full"
|
|
18709
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
18701
|
+
}, /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
18710
18702
|
onClick: productButtonCallback,
|
|
18711
18703
|
"data-key": product.id,
|
|
18712
18704
|
id: "pelcro-select-product-back-button",
|
|
@@ -18732,20 +18724,20 @@ class SelectModal extends Component {
|
|
|
18732
18724
|
description
|
|
18733
18725
|
} = this.state.product;
|
|
18734
18726
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18735
|
-
className: "productTabs
|
|
18727
|
+
className: "productTabs"
|
|
18736
18728
|
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
18737
|
-
className: "tabs plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-
|
|
18729
|
+
className: "tabs plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
|
|
18738
18730
|
}, this.state.productList.map((product, index) => {
|
|
18739
18731
|
var _this$state$product;
|
|
18740
18732
|
|
|
18741
18733
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
18742
18734
|
key: product.id,
|
|
18743
18735
|
id: `${product.id === ((_this$state$product = this.state.product) === null || _this$state$product === void 0 ? void 0 : _this$state$product.id) ? "activeTab" : ""}`,
|
|
18744
|
-
className: "plc-relative"
|
|
18736
|
+
className: "plc-relative plc-mx-1"
|
|
18745
18737
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
18746
18738
|
onClick: productButtonCallback,
|
|
18747
18739
|
"data-key": product.id,
|
|
18748
|
-
className: "plc-px-4 plc-py-2 plc-text-gray-600 focus:plc-outline-none plc-whitespace-nowrap"
|
|
18740
|
+
className: "plc-px-4 plc-py-2 plc-bg-white plc-border plc-border-gray-200 plc-rounded plc-text-gray-600 focus:plc-outline-none plc-whitespace-nowrap"
|
|
18749
18741
|
}, product.name));
|
|
18750
18742
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
18751
18743
|
className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center"
|
|
@@ -18754,7 +18746,9 @@ class SelectModal extends Component {
|
|
|
18754
18746
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
18755
18747
|
src: image,
|
|
18756
18748
|
alt: "Product Image"
|
|
18757
|
-
})), description && /*#__PURE__*/React__default.createElement("p",
|
|
18749
|
+
})), description && /*#__PURE__*/React__default.createElement("p", {
|
|
18750
|
+
className: "plc-text-center"
|
|
18751
|
+
}, description)));
|
|
18758
18752
|
});
|
|
18759
18753
|
|
|
18760
18754
|
_defineProperty$3(this, "renderMatchingProductsFirst", () => {
|
|
@@ -18810,7 +18804,7 @@ class SelectModal extends Component {
|
|
|
18810
18804
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
18811
18805
|
className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full plc-border-b plc-border-gray-300"
|
|
18812
18806
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
18813
|
-
className: "pelcro-select-plan-title plc-font-medium plc-text-xl"
|
|
18807
|
+
className: "pelcro-select-plan-title plc-font-medium plc-text-xl plc-break-all"
|
|
18814
18808
|
}, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
|
|
18815
18809
|
className: "plc-text-sm plc-mt-1 pelcro-select-plan-description"
|
|
18816
18810
|
}, plan.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -18976,7 +18970,7 @@ class SelectModal extends Component {
|
|
|
18976
18970
|
hideCloseButton: !this.closeButton,
|
|
18977
18971
|
onClose: this.props.onClose,
|
|
18978
18972
|
id: "pelcro-selection-modal"
|
|
18979
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
18973
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
18980
18974
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
18981
18975
|
}, this.state.mode === "plan" && /*#__PURE__*/React__default.createElement("button", {
|
|
18982
18976
|
type: "button",
|
|
@@ -18996,7 +18990,7 @@ class SelectModal extends Component {
|
|
|
18996
18990
|
onChange: this.onIsGiftChange,
|
|
18997
18991
|
checked: this.state.isGift,
|
|
18998
18992
|
id: "pelcro-input-is-gift"
|
|
18999
|
-
}, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button
|
|
18993
|
+
}, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
|
|
19000
18994
|
disabled: this.state.disabled,
|
|
19001
18995
|
onClick: this.submitOption,
|
|
19002
18996
|
id: "pelcro-submit",
|
|
@@ -21123,7 +21117,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21123
21117
|
|
|
21124
21118
|
const {
|
|
21125
21119
|
t
|
|
21126
|
-
} = useTranslation
|
|
21120
|
+
} = useTranslation("payment");
|
|
21127
21121
|
const pelcroStore = usePelcro();
|
|
21128
21122
|
const {
|
|
21129
21123
|
set,
|
|
@@ -22841,7 +22835,7 @@ const StripeInputStyle = {
|
|
|
22841
22835
|
const PelcroCardNumber = props => {
|
|
22842
22836
|
const {
|
|
22843
22837
|
t
|
|
22844
|
-
} = useTranslation
|
|
22838
|
+
} = useTranslation("checkoutForm");
|
|
22845
22839
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("label", {
|
|
22846
22840
|
htmlFor: "pelcro-input-card-number"
|
|
22847
22841
|
}, t("labels.card"), " *"), /*#__PURE__*/React__default.createElement(es_9, Object.assign({
|
|
@@ -22852,7 +22846,7 @@ const PelcroCardNumber = props => {
|
|
|
22852
22846
|
const PelcroCardCVC = props => {
|
|
22853
22847
|
const {
|
|
22854
22848
|
t
|
|
22855
|
-
} = useTranslation
|
|
22849
|
+
} = useTranslation("checkoutForm");
|
|
22856
22850
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("label", {
|
|
22857
22851
|
htmlFor: "pelcro-input-cvc-number"
|
|
22858
22852
|
}, t("labels.CVC"), " *"), /*#__PURE__*/React__default.createElement(es_6, Object.assign({
|
|
@@ -22863,7 +22857,7 @@ const PelcroCardCVC = props => {
|
|
|
22863
22857
|
const PelcroCardExpiry = props => {
|
|
22864
22858
|
const {
|
|
22865
22859
|
t
|
|
22866
|
-
} = useTranslation
|
|
22860
|
+
} = useTranslation("checkoutForm");
|
|
22867
22861
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("label", {
|
|
22868
22862
|
htmlFor: "pelcro-input-expiry-date"
|
|
22869
22863
|
}, t("labels.date"), " *"), /*#__PURE__*/React__default.createElement(es_8, Object.assign({
|
|
@@ -22953,7 +22947,7 @@ const DiscountedPrice = props => {
|
|
|
22953
22947
|
|
|
22954
22948
|
const {
|
|
22955
22949
|
t
|
|
22956
|
-
} = useTranslation
|
|
22950
|
+
} = useTranslation("checkoutForm");
|
|
22957
22951
|
const {
|
|
22958
22952
|
dispatch,
|
|
22959
22953
|
state: {
|
|
@@ -22983,7 +22977,7 @@ const DiscountedPrice = props => {
|
|
|
22983
22977
|
className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
|
|
22984
22978
|
}, props), "(-", percentOff, ")", /*#__PURE__*/React__default.createElement("span", {
|
|
22985
22979
|
className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
|
|
22986
|
-
}, priceFormatted), /*#__PURE__*/React__default.createElement(Button
|
|
22980
|
+
}, priceFormatted), /*#__PURE__*/React__default.createElement(Button, {
|
|
22987
22981
|
variant: "ghost",
|
|
22988
22982
|
className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
22989
22983
|
onClick: onCouponRemove
|
|
@@ -23004,7 +22998,7 @@ const SubmitPaymentMethod = ({
|
|
|
23004
22998
|
} = usePelcro();
|
|
23005
22999
|
const {
|
|
23006
23000
|
t
|
|
23007
|
-
} = useTranslation
|
|
23001
|
+
} = useTranslation("checkoutForm");
|
|
23008
23002
|
const {
|
|
23009
23003
|
dispatch,
|
|
23010
23004
|
state: {
|
|
@@ -23034,7 +23028,7 @@ const SubmitPaymentMethod = ({
|
|
|
23034
23028
|
setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length));
|
|
23035
23029
|
}
|
|
23036
23030
|
}, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone]);
|
|
23037
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
23031
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
23038
23032
|
role: "submit",
|
|
23039
23033
|
className: "plc-w-full plc-py-3",
|
|
23040
23034
|
variant: "solid",
|
|
@@ -23065,7 +23059,7 @@ const ApplyCouponButton = ({
|
|
|
23065
23059
|
} = useContext(store$j);
|
|
23066
23060
|
const {
|
|
23067
23061
|
t
|
|
23068
|
-
} = useTranslation
|
|
23062
|
+
} = useTranslation("checkoutForm");
|
|
23069
23063
|
|
|
23070
23064
|
const onApplyCouponCode = () => {
|
|
23071
23065
|
dispatch({
|
|
@@ -23074,7 +23068,7 @@ const ApplyCouponButton = ({
|
|
|
23074
23068
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
23075
23069
|
};
|
|
23076
23070
|
|
|
23077
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
23071
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
23078
23072
|
className: "plc-h-12 plc-ml-4",
|
|
23079
23073
|
variant: "solid",
|
|
23080
23074
|
"aria-label": t("labels.applyCouponCode"),
|
|
@@ -23089,7 +23083,7 @@ const ApplyCouponButton = ({
|
|
|
23089
23083
|
const CouponCodeField = props => {
|
|
23090
23084
|
const {
|
|
23091
23085
|
t
|
|
23092
|
-
} = useTranslation
|
|
23086
|
+
} = useTranslation("checkoutForm");
|
|
23093
23087
|
const {
|
|
23094
23088
|
dispatch,
|
|
23095
23089
|
state: {
|
|
@@ -23155,7 +23149,7 @@ const CouponCode = ({
|
|
|
23155
23149
|
} = useContext(store$j);
|
|
23156
23150
|
const {
|
|
23157
23151
|
t
|
|
23158
|
-
} = useTranslation
|
|
23152
|
+
} = useTranslation("checkoutForm");
|
|
23159
23153
|
|
|
23160
23154
|
const showCouponField = () => {
|
|
23161
23155
|
dispatch({
|
|
@@ -23167,7 +23161,7 @@ const CouponCode = ({
|
|
|
23167
23161
|
|
|
23168
23162
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23169
23163
|
className: "plc-mt-4 plc-mb-6"
|
|
23170
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
23164
|
+
}, /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
23171
23165
|
className: "plc-mb-2 plc-text-base plc-text-gray-500",
|
|
23172
23166
|
variant: "ghost",
|
|
23173
23167
|
icon: /*#__PURE__*/React__default.createElement(SvgTicket, {
|
|
@@ -23508,7 +23502,7 @@ const PaypalSubscribeButton = props => {
|
|
|
23508
23502
|
const BankRedirection = () => {
|
|
23509
23503
|
const {
|
|
23510
23504
|
t
|
|
23511
|
-
} = useTranslation
|
|
23505
|
+
} = useTranslation("checkoutForm");
|
|
23512
23506
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23513
23507
|
className: "plc-absolute plc-inset-0 plc-flex-col plc-items-center plc-justify-center plc-hidden plc-text-lg plc-bg-white plc-z-max plc-text-primary-500 card-authentication-container"
|
|
23514
23508
|
}, t("messages.bankRedirection"), /*#__PURE__*/React__default.createElement(SvgSpinner, {
|
|
@@ -23519,7 +23513,7 @@ const BankRedirection = () => {
|
|
|
23519
23513
|
const BankAuthenticationSuccess = () => {
|
|
23520
23514
|
const {
|
|
23521
23515
|
t
|
|
23522
|
-
} = useTranslation
|
|
23516
|
+
} = useTranslation("checkoutForm");
|
|
23523
23517
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23524
23518
|
className: "plc-absolute plc-inset-0 plc-flex-col plc-items-center plc-justify-center plc-hidden plc-text-lg plc-bg-white plc-z-max plc-text-primary-500 card-authentication-success-container"
|
|
23525
23519
|
}, t("messages.bankAuthenticationSuccess"), /*#__PURE__*/React__default.createElement(SvgSpinner, {
|
|
@@ -23548,7 +23542,7 @@ const SelectedPaymentMethod = () => {
|
|
|
23548
23542
|
|
|
23549
23543
|
const {
|
|
23550
23544
|
t
|
|
23551
|
-
} = useTranslation
|
|
23545
|
+
} = useTranslation("paymentMethod");
|
|
23552
23546
|
const {
|
|
23553
23547
|
state: {
|
|
23554
23548
|
isLoading
|
|
@@ -23577,7 +23571,7 @@ const SelectedPaymentMethod = () => {
|
|
|
23577
23571
|
className: "plc-font-semibold"
|
|
23578
23572
|
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ", (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.last4), /*#__PURE__*/React__default.createElement("p", {
|
|
23579
23573
|
className: "plc-text-sm plc-text-gray-500"
|
|
23580
|
-
}, t("select.expires"), " ", (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.exp_month, "/", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_year))), /*#__PURE__*/React__default.createElement(Button
|
|
23574
|
+
}, t("select.expires"), " ", (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.exp_month, "/", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_year))), /*#__PURE__*/React__default.createElement(Button, {
|
|
23581
23575
|
onClick: () => switchView("payment-method-select"),
|
|
23582
23576
|
disabled: isLoading,
|
|
23583
23577
|
variant: "ghost",
|
|
@@ -23590,7 +23584,7 @@ const TaxAmount = () => {
|
|
|
23590
23584
|
|
|
23591
23585
|
const {
|
|
23592
23586
|
t
|
|
23593
|
-
} = useTranslation
|
|
23587
|
+
} = useTranslation("checkoutForm");
|
|
23594
23588
|
const {
|
|
23595
23589
|
state: {
|
|
23596
23590
|
taxAmount
|
|
@@ -23642,7 +23636,7 @@ function PaymentMethodView({
|
|
|
23642
23636
|
|
|
23643
23637
|
const {
|
|
23644
23638
|
t
|
|
23645
|
-
} = useTranslation
|
|
23639
|
+
} = useTranslation("checkoutForm");
|
|
23646
23640
|
const cardProcessor = getSiteCardProcessor();
|
|
23647
23641
|
const supportsVantiv = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings);
|
|
23648
23642
|
const supportsTap = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.tap_gateway_settings);
|
|
@@ -23702,7 +23696,7 @@ const SubscriptionRenewView = ({
|
|
|
23702
23696
|
}) => {
|
|
23703
23697
|
const {
|
|
23704
23698
|
t
|
|
23705
|
-
} = useTranslation
|
|
23699
|
+
} = useTranslation("checkoutForm");
|
|
23706
23700
|
const {
|
|
23707
23701
|
plan
|
|
23708
23702
|
} = usePelcro();
|
|
@@ -23790,7 +23784,7 @@ function SubscriptionRenewModal({
|
|
|
23790
23784
|
id: "pelcro-subscription-renew-modal",
|
|
23791
23785
|
onDisplay: onDisplay,
|
|
23792
23786
|
onClose: onClose
|
|
23793
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
23787
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
23794
23788
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
23795
23789
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
23796
23790
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -23817,7 +23811,7 @@ const SubscriptionCancelContainer = ({
|
|
|
23817
23811
|
children,
|
|
23818
23812
|
...props
|
|
23819
23813
|
}) => {
|
|
23820
|
-
useTranslation
|
|
23814
|
+
useTranslation("verifyEmail");
|
|
23821
23815
|
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
23822
23816
|
switch (action.type) {
|
|
23823
23817
|
case SET_CANCEL_SUBSCRIPTION_REASON:
|
|
@@ -23923,7 +23917,7 @@ function TextArea({
|
|
|
23923
23917
|
const SubscriptionCancelReason = props => {
|
|
23924
23918
|
const {
|
|
23925
23919
|
t
|
|
23926
|
-
} = useTranslation
|
|
23920
|
+
} = useTranslation("subscriptionCancel");
|
|
23927
23921
|
const {
|
|
23928
23922
|
dispatch,
|
|
23929
23923
|
state
|
|
@@ -23980,7 +23974,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
23980
23974
|
} = useContext(store$i);
|
|
23981
23975
|
const {
|
|
23982
23976
|
t
|
|
23983
|
-
} = useTranslation
|
|
23977
|
+
} = useTranslation("subscriptionCancel");
|
|
23984
23978
|
|
|
23985
23979
|
const cancelSubscription = (payload, onSuccess, onFailure) => {
|
|
23986
23980
|
window.Pelcro.subscription.cancel({
|
|
@@ -24030,7 +24024,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
24030
24024
|
});
|
|
24031
24025
|
};
|
|
24032
24026
|
|
|
24033
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
24027
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
24034
24028
|
onClick: handleCancelNowClick,
|
|
24035
24029
|
className: `${className}`
|
|
24036
24030
|
}, t("messages.cancelNow"));
|
|
@@ -24054,7 +24048,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
24054
24048
|
} = useContext(store$i);
|
|
24055
24049
|
const {
|
|
24056
24050
|
t
|
|
24057
|
-
} = useTranslation
|
|
24051
|
+
} = useTranslation("subscriptionCancel");
|
|
24058
24052
|
|
|
24059
24053
|
const cancelSubscription = (payload, onSuccess, onFailure) => {
|
|
24060
24054
|
window.Pelcro.subscription.cancel({
|
|
@@ -24104,7 +24098,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
24104
24098
|
});
|
|
24105
24099
|
};
|
|
24106
24100
|
|
|
24107
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
24101
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
24108
24102
|
onClick: handleCancelNowClick,
|
|
24109
24103
|
className: `${className}`
|
|
24110
24104
|
}, t("messages.cancelLater"));
|
|
@@ -24116,7 +24110,7 @@ const SubscriptionCancelView = props => {
|
|
|
24116
24110
|
} = usePelcro();
|
|
24117
24111
|
const {
|
|
24118
24112
|
t
|
|
24119
|
-
} = useTranslation
|
|
24113
|
+
} = useTranslation("subscriptionCancel");
|
|
24120
24114
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24121
24115
|
id: "pelcro-subscription-cancel-view"
|
|
24122
24116
|
}, /*#__PURE__*/React__default.createElement(SubscriptionCancelContainer, props, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -24147,12 +24141,12 @@ const SubscriptionCancelModal = ({
|
|
|
24147
24141
|
} = usePelcro();
|
|
24148
24142
|
const {
|
|
24149
24143
|
t
|
|
24150
|
-
} = useTranslation
|
|
24144
|
+
} = useTranslation("subscriptionCancel");
|
|
24151
24145
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
24152
24146
|
onDisplay: onDisplay,
|
|
24153
24147
|
onClose: onClose,
|
|
24154
24148
|
id: "pelcro-subscription-cancel-modal"
|
|
24155
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
24149
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
24156
24150
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
24157
24151
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
24158
24152
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -24179,7 +24173,7 @@ const SubscriptionSuspendContainer = ({
|
|
|
24179
24173
|
children,
|
|
24180
24174
|
...props
|
|
24181
24175
|
}) => {
|
|
24182
|
-
useTranslation
|
|
24176
|
+
useTranslation("SubscriptionSuspend");
|
|
24183
24177
|
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
24184
24178
|
switch (action.type) {
|
|
24185
24179
|
case SET_SUBSCRIPTION_SUSPEND_DATE:
|
|
@@ -24254,7 +24248,7 @@ const SubscriptionSuspendDate = props => {
|
|
|
24254
24248
|
|
|
24255
24249
|
const {
|
|
24256
24250
|
t
|
|
24257
|
-
} = useTranslation
|
|
24251
|
+
} = useTranslation("subscriptionSuspend");
|
|
24258
24252
|
const {
|
|
24259
24253
|
dispatch,
|
|
24260
24254
|
state
|
|
@@ -24305,7 +24299,7 @@ const SubscriptionSuspendButton = ({
|
|
|
24305
24299
|
} = useContext(store$h);
|
|
24306
24300
|
const {
|
|
24307
24301
|
t
|
|
24308
|
-
} = useTranslation
|
|
24302
|
+
} = useTranslation("subscriptionSuspend");
|
|
24309
24303
|
|
|
24310
24304
|
const suspendSubscription = (payload, onSuccess, onFailure) => {
|
|
24311
24305
|
window.Pelcro.subscription.update({
|
|
@@ -24349,7 +24343,7 @@ const SubscriptionSuspendButton = ({
|
|
|
24349
24343
|
});
|
|
24350
24344
|
};
|
|
24351
24345
|
|
|
24352
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
24346
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
24353
24347
|
onClick: handleClick,
|
|
24354
24348
|
className: `${className}`,
|
|
24355
24349
|
disabled: buttonDisabled
|
|
@@ -24362,7 +24356,7 @@ const SubscriptionSuspendView = props => {
|
|
|
24362
24356
|
} = usePelcro();
|
|
24363
24357
|
const {
|
|
24364
24358
|
t
|
|
24365
|
-
} = useTranslation
|
|
24359
|
+
} = useTranslation("subscriptionSuspend");
|
|
24366
24360
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24367
24361
|
id: "pelcro-subscription-suspend-view"
|
|
24368
24362
|
}, /*#__PURE__*/React__default.createElement(SubscriptionSuspendContainer, props, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -24428,7 +24422,7 @@ const PaymentSuccessView = ({
|
|
|
24428
24422
|
}) => {
|
|
24429
24423
|
const {
|
|
24430
24424
|
t
|
|
24431
|
-
} = useTranslation
|
|
24425
|
+
} = useTranslation("success");
|
|
24432
24426
|
const {
|
|
24433
24427
|
successTitle,
|
|
24434
24428
|
successContent,
|
|
@@ -24442,7 +24436,7 @@ const PaymentSuccessView = ({
|
|
|
24442
24436
|
className: "plc-text-center plc-text-gray-900"
|
|
24443
24437
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
24444
24438
|
className: "plc-mb-4 plc-text-3xl"
|
|
24445
|
-
}, successTitle), /*#__PURE__*/React__default.createElement("p", null, successContent)), /*#__PURE__*/React__default.createElement(Button
|
|
24439
|
+
}, successTitle), /*#__PURE__*/React__default.createElement("p", null, successContent)), /*#__PURE__*/React__default.createElement(Button, {
|
|
24446
24440
|
className: "plc-mt-6",
|
|
24447
24441
|
onClick: onClose,
|
|
24448
24442
|
autoFocus: true
|
|
@@ -24696,7 +24690,7 @@ class DefaultNewsLetter extends Component {
|
|
|
24696
24690
|
hideCloseButton: !this.closeButton,
|
|
24697
24691
|
onClose: this.props.onClose,
|
|
24698
24692
|
id: "pelcro-newsletter-modal"
|
|
24699
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
24693
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
24700
24694
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
24701
24695
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
24702
24696
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -24739,7 +24733,7 @@ class DefaultNewsLetter extends Component {
|
|
|
24739
24733
|
label: t("labels.postalCode")
|
|
24740
24734
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
24741
24735
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
24742
|
-
}, "* ", t("labels.required")), /*#__PURE__*/React__default.createElement(Button
|
|
24736
|
+
}, "* ", t("labels.required")), /*#__PURE__*/React__default.createElement(Button, {
|
|
24743
24737
|
role: "submit",
|
|
24744
24738
|
className: "plc-w-full plc-mt-2",
|
|
24745
24739
|
id: "pelcro-submit",
|
|
@@ -24787,7 +24781,7 @@ const NewsletterUpdateContainer = ({
|
|
|
24787
24781
|
onFailure = () => {},
|
|
24788
24782
|
children
|
|
24789
24783
|
}) => {
|
|
24790
|
-
const [t] = useTranslation
|
|
24784
|
+
const [t] = useTranslation("newsletter");
|
|
24791
24785
|
|
|
24792
24786
|
const handleSubmit = ({
|
|
24793
24787
|
newsletters,
|
|
@@ -24966,8 +24960,8 @@ const NewsletterUpdateButton = ({
|
|
|
24966
24960
|
} = useContext(store$g);
|
|
24967
24961
|
const {
|
|
24968
24962
|
t
|
|
24969
|
-
} = useTranslation
|
|
24970
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
24963
|
+
} = useTranslation("newsletter");
|
|
24964
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
24971
24965
|
onClick: () => {
|
|
24972
24966
|
dispatch({
|
|
24973
24967
|
type: HANDLE_SUBMIT
|
|
@@ -25020,7 +25014,7 @@ const NewsletterUpdateList = () => {
|
|
|
25020
25014
|
const NewsletterUpdateView = props => {
|
|
25021
25015
|
const {
|
|
25022
25016
|
t
|
|
25023
|
-
} = useTranslation
|
|
25017
|
+
} = useTranslation("newsletter");
|
|
25024
25018
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
25025
25019
|
id: "pelcro-newsletter-update-view"
|
|
25026
25020
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -25041,12 +25035,12 @@ const NewsletterUpdateModal = ({
|
|
|
25041
25035
|
}) => {
|
|
25042
25036
|
const {
|
|
25043
25037
|
t
|
|
25044
|
-
} = useTranslation
|
|
25038
|
+
} = useTranslation("newsletter");
|
|
25045
25039
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
25046
25040
|
id: "pelcro-newsletter-update-modal",
|
|
25047
25041
|
onDisplay: onDisplay,
|
|
25048
25042
|
onClose: onClose
|
|
25049
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
25043
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
25050
25044
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
25051
25045
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25052
25046
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -25059,7 +25053,7 @@ const MeterView = () => {
|
|
|
25059
25053
|
|
|
25060
25054
|
const {
|
|
25061
25055
|
t
|
|
25062
|
-
} = useTranslation
|
|
25056
|
+
} = useTranslation("meter");
|
|
25063
25057
|
const {
|
|
25064
25058
|
switchView,
|
|
25065
25059
|
product,
|
|
@@ -25075,10 +25069,10 @@ const MeterView = () => {
|
|
|
25075
25069
|
className: "plc-text-sm plc-text-gray-600"
|
|
25076
25070
|
}, subtitle, ",", !isAuthenticated() && " or " + t("messages.alreadyHaveAccount")), /*#__PURE__*/React__default.createElement("div", {
|
|
25077
25071
|
className: "plc-flex plc-mt-2"
|
|
25078
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
25072
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
25079
25073
|
className: "plc-w-1/2",
|
|
25080
25074
|
onClick: () => switchView("plan-select")
|
|
25081
|
-
}, t("messages.subscribeNow")), !isAuthenticated() && /*#__PURE__*/React__default.createElement(Button
|
|
25075
|
+
}, t("messages.subscribeNow")), !isAuthenticated() && /*#__PURE__*/React__default.createElement(Button, {
|
|
25082
25076
|
className: "pelcro-button-ghost plc-w-1/2",
|
|
25083
25077
|
onClick: () => switchView("login")
|
|
25084
25078
|
}, t("messages.loginHere"))));
|
|
@@ -25120,7 +25114,7 @@ const SubscriptionCreateView = ({
|
|
|
25120
25114
|
}) => {
|
|
25121
25115
|
const {
|
|
25122
25116
|
t
|
|
25123
|
-
} = useTranslation
|
|
25117
|
+
} = useTranslation("checkoutForm");
|
|
25124
25118
|
const {
|
|
25125
25119
|
plan
|
|
25126
25120
|
} = usePelcro();
|
|
@@ -25192,7 +25186,7 @@ function SubscriptionCreateModal({
|
|
|
25192
25186
|
id: "pelcro-subscription-create-modal",
|
|
25193
25187
|
onDisplay: onDisplay,
|
|
25194
25188
|
onClose: onClose
|
|
25195
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
25189
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
25196
25190
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
25197
25191
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25198
25192
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -25235,7 +25229,7 @@ const UserUpdateContainer = ({
|
|
|
25235
25229
|
}) => {
|
|
25236
25230
|
const {
|
|
25237
25231
|
t
|
|
25238
|
-
} = useTranslation
|
|
25232
|
+
} = useTranslation("userEdit");
|
|
25239
25233
|
useEffect(() => {
|
|
25240
25234
|
document.addEventListener("PelcroUserLoaded", () => {
|
|
25241
25235
|
loadUserDataIntoFields();
|
|
@@ -25448,7 +25442,7 @@ const UserUpdateEmail = props => {
|
|
|
25448
25442
|
const [enableEmailEdit, setEnableEmailEdit] = useState(false);
|
|
25449
25443
|
const {
|
|
25450
25444
|
t
|
|
25451
|
-
} = useTranslation
|
|
25445
|
+
} = useTranslation("userEdit");
|
|
25452
25446
|
|
|
25453
25447
|
const handleEnableEmailEdit = () => {
|
|
25454
25448
|
if (enableEmailEdit) {
|
|
@@ -25473,7 +25467,7 @@ const UserUpdateEmail = props => {
|
|
|
25473
25467
|
store: store$f,
|
|
25474
25468
|
label: t("labels.email"),
|
|
25475
25469
|
enableEmailEdit: enableEmailEdit
|
|
25476
|
-
}, props)), /*#__PURE__*/React__default.createElement(Button
|
|
25470
|
+
}, props)), /*#__PURE__*/React__default.createElement(Button, {
|
|
25477
25471
|
variant: "icon",
|
|
25478
25472
|
className: "plc-absolute plc-rounded-none plc-text-gray-500 plc-w-12 plc-h-12 plc-top-7 plc-right-0 hover:plc-text-gray-900 hover:plc-bg-transparent focus:plc-ring-0 focus:plc-shadow-none",
|
|
25479
25473
|
icon: enableEmailEdit ? /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
@@ -25508,12 +25502,12 @@ const UserUpdateButton = ({
|
|
|
25508
25502
|
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
25509
25503
|
const {
|
|
25510
25504
|
t
|
|
25511
|
-
} = useTranslation
|
|
25505
|
+
} = useTranslation("userEdit");
|
|
25512
25506
|
const [isDisabled, setDisabled] = useState(true);
|
|
25513
25507
|
useEffect(() => {
|
|
25514
25508
|
setDisabled(buttonDisabled || emailError || !(email !== null && email !== void 0 && email.length) || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length));
|
|
25515
25509
|
}, [email, firstName, lastName, phone, buttonDisabled, emailError, firstNameError, lastNameError, phoneError]);
|
|
25516
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
25510
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
25517
25511
|
onClick: () => {
|
|
25518
25512
|
dispatch({
|
|
25519
25513
|
type: HANDLE_USER_UPDATE
|
|
@@ -25555,7 +25549,7 @@ const UserUpdateProfilePic = ({
|
|
|
25555
25549
|
src: profilePicture,
|
|
25556
25550
|
alt: "profile picture",
|
|
25557
25551
|
onClick: onClick
|
|
25558
|
-
}, otherProps)), /*#__PURE__*/React__default.createElement(Button
|
|
25552
|
+
}, otherProps)), /*#__PURE__*/React__default.createElement(Button, {
|
|
25559
25553
|
variant: "icon",
|
|
25560
25554
|
className: "plc-absolute plc-bg-gray-500 plc-text-white plc-w-10 plc-h-10 plc-top-24 plc-right-2 hover:plc-bg-gray-600 hover:plc-text-white",
|
|
25561
25555
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
@@ -25569,7 +25563,7 @@ function Tin({
|
|
|
25569
25563
|
store,
|
|
25570
25564
|
...otherProps
|
|
25571
25565
|
}) {
|
|
25572
|
-
useTranslation
|
|
25566
|
+
useTranslation("common");
|
|
25573
25567
|
const {
|
|
25574
25568
|
dispatch,
|
|
25575
25569
|
state: {
|
|
@@ -25629,7 +25623,7 @@ const UserUpdateView = props => {
|
|
|
25629
25623
|
|
|
25630
25624
|
const {
|
|
25631
25625
|
t
|
|
25632
|
-
} = useTranslation
|
|
25626
|
+
} = useTranslation("userEdit");
|
|
25633
25627
|
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
25634
25628
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
25635
25629
|
id: "pelcro-user-update-view"
|
|
@@ -25688,7 +25682,7 @@ function UserUpdateModal({
|
|
|
25688
25682
|
} = usePelcro();
|
|
25689
25683
|
const {
|
|
25690
25684
|
t
|
|
25691
|
-
} = useTranslation
|
|
25685
|
+
} = useTranslation("userEdit");
|
|
25692
25686
|
|
|
25693
25687
|
const onPictureClick = () => {
|
|
25694
25688
|
switchView("profile-picture");
|
|
@@ -25698,7 +25692,7 @@ function UserUpdateModal({
|
|
|
25698
25692
|
id: "pelcro-user-update-modal",
|
|
25699
25693
|
onDisplay: onDisplay,
|
|
25700
25694
|
onClose: onClose
|
|
25701
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
25695
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
25702
25696
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
25703
25697
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25704
25698
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -25793,7 +25787,7 @@ const AddressCreateContainer = ({
|
|
|
25793
25787
|
|
|
25794
25788
|
const {
|
|
25795
25789
|
t
|
|
25796
|
-
} = useTranslation
|
|
25790
|
+
} = useTranslation("address");
|
|
25797
25791
|
const {
|
|
25798
25792
|
giftCode: giftCodeFromStore,
|
|
25799
25793
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
@@ -26263,8 +26257,8 @@ const AddressCreateSubmit = ({
|
|
|
26263
26257
|
} = useContext(store$e);
|
|
26264
26258
|
const {
|
|
26265
26259
|
t
|
|
26266
|
-
} = useTranslation
|
|
26267
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
26260
|
+
} = useTranslation("address");
|
|
26261
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
26268
26262
|
onClick: () => {
|
|
26269
26263
|
dispatch({
|
|
26270
26264
|
type: HANDLE_SUBMIT
|
|
@@ -26489,7 +26483,7 @@ const AddressCreateSetDefault = props => {
|
|
|
26489
26483
|
const AddressCreateView = props => {
|
|
26490
26484
|
const {
|
|
26491
26485
|
t
|
|
26492
|
-
} = useTranslation
|
|
26486
|
+
} = useTranslation("address");
|
|
26493
26487
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26494
26488
|
id: "pelcro-address-create-view"
|
|
26495
26489
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -26561,7 +26555,7 @@ const AddressCreateModal = ({
|
|
|
26561
26555
|
} = usePelcro();
|
|
26562
26556
|
const {
|
|
26563
26557
|
t
|
|
26564
|
-
} = useTranslation
|
|
26558
|
+
} = useTranslation("address");
|
|
26565
26559
|
|
|
26566
26560
|
const onSuccess = newAddressId => {
|
|
26567
26561
|
var _otherProps$onSuccess;
|
|
@@ -26589,7 +26583,7 @@ const AddressCreateModal = ({
|
|
|
26589
26583
|
id: "pelcro-address-create-modal",
|
|
26590
26584
|
onDisplay: onDisplay,
|
|
26591
26585
|
onClose: onClose
|
|
26592
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
26586
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
26593
26587
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
26594
26588
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
26595
26589
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -26660,7 +26654,7 @@ const AddressUpdateContainer = ({
|
|
|
26660
26654
|
addressIdToEdit
|
|
26661
26655
|
} = usePelcro();
|
|
26662
26656
|
const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
|
|
26663
|
-
const [t] = useTranslation
|
|
26657
|
+
const [t] = useTranslation("address");
|
|
26664
26658
|
useEffect(() => {
|
|
26665
26659
|
const getCountries = () => {
|
|
26666
26660
|
dispatch({
|
|
@@ -27121,8 +27115,8 @@ const AddressUpdateSubmit = ({
|
|
|
27121
27115
|
} = useContext(store$d);
|
|
27122
27116
|
const {
|
|
27123
27117
|
t
|
|
27124
|
-
} = useTranslation
|
|
27125
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
27118
|
+
} = useTranslation("address");
|
|
27119
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
27126
27120
|
onClick: () => {
|
|
27127
27121
|
dispatch({
|
|
27128
27122
|
type: HANDLE_SUBMIT
|
|
@@ -27164,7 +27158,7 @@ function AddressUpdateSetDefault(props) {
|
|
|
27164
27158
|
const AddressUpdateView = props => {
|
|
27165
27159
|
const {
|
|
27166
27160
|
t
|
|
27167
|
-
} = useTranslation
|
|
27161
|
+
} = useTranslation("address");
|
|
27168
27162
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27169
27163
|
id: "pelcro-address-update-view"
|
|
27170
27164
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -27236,12 +27230,12 @@ const AddressUpdateModal = ({
|
|
|
27236
27230
|
}) => {
|
|
27237
27231
|
const {
|
|
27238
27232
|
t
|
|
27239
|
-
} = useTranslation
|
|
27233
|
+
} = useTranslation("address");
|
|
27240
27234
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
27241
27235
|
id: "pelcro-address-update-modal",
|
|
27242
27236
|
onDisplay: onDisplay,
|
|
27243
27237
|
onClose: onClose
|
|
27244
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
27238
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
27245
27239
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
27246
27240
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
27247
27241
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -27308,7 +27302,7 @@ const ReactGA$2 = (_window$2 = window) !== null && _window$2 !== void 0 && (_win
|
|
|
27308
27302
|
const PaymentMethodUpdateModal = props => {
|
|
27309
27303
|
const {
|
|
27310
27304
|
t
|
|
27311
|
-
} = useTranslation
|
|
27305
|
+
} = useTranslation("paymentMethod");
|
|
27312
27306
|
|
|
27313
27307
|
const onSuccess = res => {
|
|
27314
27308
|
var _props$onSuccess, _ReactGA$event;
|
|
@@ -27325,7 +27319,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
27325
27319
|
id: "pelcro-payment-method-update-modal",
|
|
27326
27320
|
onDisplay: props.onDisplay,
|
|
27327
27321
|
onClose: props.onClose
|
|
27328
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
27322
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
27329
27323
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
27330
27324
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
27331
27325
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -27362,7 +27356,7 @@ const PasswordResetContainer = ({
|
|
|
27362
27356
|
}) => {
|
|
27363
27357
|
const {
|
|
27364
27358
|
t
|
|
27365
|
-
} = useTranslation
|
|
27359
|
+
} = useTranslation("passwordReset");
|
|
27366
27360
|
|
|
27367
27361
|
const handleSubmit = ({
|
|
27368
27362
|
email,
|
|
@@ -27503,8 +27497,8 @@ const PasswordResetButton = ({
|
|
|
27503
27497
|
} = useContext(store$c);
|
|
27504
27498
|
const {
|
|
27505
27499
|
t
|
|
27506
|
-
} = useTranslation
|
|
27507
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
27500
|
+
} = useTranslation("passwordReset");
|
|
27501
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
27508
27502
|
onClick: () => {
|
|
27509
27503
|
dispatch({
|
|
27510
27504
|
type: HANDLE_SUBMIT
|
|
@@ -27530,7 +27524,7 @@ const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.create
|
|
|
27530
27524
|
const PasswordResetView = props => {
|
|
27531
27525
|
const {
|
|
27532
27526
|
t
|
|
27533
|
-
} = useTranslation
|
|
27527
|
+
} = useTranslation("passwordReset");
|
|
27534
27528
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27535
27529
|
id: "pelcro-password-reset-view"
|
|
27536
27530
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -27566,12 +27560,12 @@ const PasswordResetModal = ({
|
|
|
27566
27560
|
}) => {
|
|
27567
27561
|
const {
|
|
27568
27562
|
t
|
|
27569
|
-
} = useTranslation
|
|
27563
|
+
} = useTranslation("passwordReset");
|
|
27570
27564
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
27571
27565
|
onDisplay: onDisplay,
|
|
27572
27566
|
onClose: onClose,
|
|
27573
27567
|
id: "pelcro-password-reset-modal"
|
|
27574
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
27568
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
27575
27569
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
27576
27570
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
27577
27571
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -27602,7 +27596,7 @@ const PasswordForgotContainer = ({
|
|
|
27602
27596
|
}) => {
|
|
27603
27597
|
const {
|
|
27604
27598
|
t
|
|
27605
|
-
} = useTranslation
|
|
27599
|
+
} = useTranslation("passwordForgot");
|
|
27606
27600
|
|
|
27607
27601
|
const handleSubmit = ({
|
|
27608
27602
|
email
|
|
@@ -27702,12 +27696,12 @@ const PasswordForgotButton = ({
|
|
|
27702
27696
|
} = useContext(store$b);
|
|
27703
27697
|
const {
|
|
27704
27698
|
t
|
|
27705
|
-
} = useTranslation
|
|
27699
|
+
} = useTranslation("passwordForgot");
|
|
27706
27700
|
const [isDisabled, setDisabled] = useState(true);
|
|
27707
27701
|
useEffect(() => {
|
|
27708
27702
|
setDisabled(emailError || !email.length || buttonDisabled);
|
|
27709
27703
|
}, [emailError, email, buttonDisabled]);
|
|
27710
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
27704
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
27711
27705
|
onClick: () => {
|
|
27712
27706
|
dispatch({
|
|
27713
27707
|
type: HANDLE_SUBMIT
|
|
@@ -27726,7 +27720,7 @@ const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(E
|
|
|
27726
27720
|
const PasswordForgotView = props => {
|
|
27727
27721
|
const {
|
|
27728
27722
|
t
|
|
27729
|
-
} = useTranslation
|
|
27723
|
+
} = useTranslation("passwordForgot");
|
|
27730
27724
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27731
27725
|
id: "pelcro-password-forgot-view"
|
|
27732
27726
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -27751,7 +27745,7 @@ const PasswordForgotModal = ({
|
|
|
27751
27745
|
}) => {
|
|
27752
27746
|
const {
|
|
27753
27747
|
t
|
|
27754
|
-
} = useTranslation
|
|
27748
|
+
} = useTranslation("passwordForgot");
|
|
27755
27749
|
const {
|
|
27756
27750
|
switchView
|
|
27757
27751
|
} = usePelcro();
|
|
@@ -27759,7 +27753,7 @@ const PasswordForgotModal = ({
|
|
|
27759
27753
|
id: "pelcro-password-forgot-modal",
|
|
27760
27754
|
onDisplay: onDisplay,
|
|
27761
27755
|
onClose: onClose
|
|
27762
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
27756
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
27763
27757
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
27764
27758
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
27765
27759
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -27797,7 +27791,7 @@ const PasswordlessRequestContainer = ({
|
|
|
27797
27791
|
}) => {
|
|
27798
27792
|
const {
|
|
27799
27793
|
t
|
|
27800
|
-
} = useTranslation
|
|
27794
|
+
} = useTranslation("passwordlessRequest");
|
|
27801
27795
|
|
|
27802
27796
|
const handleSubmit = ({
|
|
27803
27797
|
email
|
|
@@ -27897,12 +27891,12 @@ const PasswordlessRequestViewButton = ({
|
|
|
27897
27891
|
} = useContext(store$a);
|
|
27898
27892
|
const {
|
|
27899
27893
|
t
|
|
27900
|
-
} = useTranslation
|
|
27894
|
+
} = useTranslation("passwordlessRequest");
|
|
27901
27895
|
const [isDisabled, setDisabled] = useState(true);
|
|
27902
27896
|
useEffect(() => {
|
|
27903
27897
|
setDisabled(emailError || !email.length || buttonDisabled);
|
|
27904
27898
|
}, [emailError, email, buttonDisabled]);
|
|
27905
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
27899
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
27906
27900
|
onClick: () => {
|
|
27907
27901
|
dispatch({
|
|
27908
27902
|
type: HANDLE_SUBMIT
|
|
@@ -27921,7 +27915,7 @@ const PasswordlessRequestEmail = props => /*#__PURE__*/React__default.createElem
|
|
|
27921
27915
|
const PasswordlessRequestView = props => {
|
|
27922
27916
|
const {
|
|
27923
27917
|
t
|
|
27924
|
-
} = useTranslation
|
|
27918
|
+
} = useTranslation("passwordlessRequest");
|
|
27925
27919
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27926
27920
|
id: "pelcro-password-forgot-view"
|
|
27927
27921
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -27946,12 +27940,12 @@ const PasswordlessRequestModal = ({
|
|
|
27946
27940
|
}) => {
|
|
27947
27941
|
const {
|
|
27948
27942
|
t
|
|
27949
|
-
} = useTranslation
|
|
27943
|
+
} = useTranslation("passwordlessRequest");
|
|
27950
27944
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
27951
27945
|
id: "pelcro-password-forgot-modal",
|
|
27952
27946
|
onDisplay: onDisplay,
|
|
27953
27947
|
onClose: onClose
|
|
27954
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
27948
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
27955
27949
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
27956
27950
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
27957
27951
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -27986,7 +27980,7 @@ const PasswordChangeContainer = ({
|
|
|
27986
27980
|
}) => {
|
|
27987
27981
|
const {
|
|
27988
27982
|
t
|
|
27989
|
-
} = useTranslation
|
|
27983
|
+
} = useTranslation("passwordChange");
|
|
27990
27984
|
|
|
27991
27985
|
const handleSubmit = ({
|
|
27992
27986
|
currentPassword,
|
|
@@ -28265,9 +28259,9 @@ const PasswordChangeButton = ({
|
|
|
28265
28259
|
} = useContext(store$9);
|
|
28266
28260
|
const {
|
|
28267
28261
|
t
|
|
28268
|
-
} = useTranslation
|
|
28262
|
+
} = useTranslation("passwordChange");
|
|
28269
28263
|
const hasInvalidField = currentPasswordError || newPasswordError || confirmNewPasswordError;
|
|
28270
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28264
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
28271
28265
|
onClick: () => {
|
|
28272
28266
|
dispatch({
|
|
28273
28267
|
type: HANDLE_SUBMIT
|
|
@@ -28282,7 +28276,7 @@ const PasswordChangeButton = ({
|
|
|
28282
28276
|
const PasswordChangeView = props => {
|
|
28283
28277
|
const {
|
|
28284
28278
|
t
|
|
28285
|
-
} = useTranslation
|
|
28279
|
+
} = useTranslation("passwordChange");
|
|
28286
28280
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28287
28281
|
id: "pelcro-password-change-view"
|
|
28288
28282
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -28318,12 +28312,12 @@ const PasswordChangeModal = ({
|
|
|
28318
28312
|
}) => {
|
|
28319
28313
|
const {
|
|
28320
28314
|
t
|
|
28321
|
-
} = useTranslation
|
|
28315
|
+
} = useTranslation("passwordChange");
|
|
28322
28316
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
28323
28317
|
id: "pelcro-password-change-modal",
|
|
28324
28318
|
onDisplay: onDisplay,
|
|
28325
28319
|
onClose: onClose
|
|
28326
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
28320
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
28327
28321
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
28328
28322
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
28329
28323
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -28356,7 +28350,7 @@ const CartContainer = ({
|
|
|
28356
28350
|
} = usePelcro();
|
|
28357
28351
|
const {
|
|
28358
28352
|
t
|
|
28359
|
-
} = useTranslation
|
|
28353
|
+
} = useTranslation("shop");
|
|
28360
28354
|
useEffect(() => {
|
|
28361
28355
|
dispatch({
|
|
28362
28356
|
type: DISABLE_SUBMIT,
|
|
@@ -28459,7 +28453,7 @@ const CartRemoveItemButton = ({
|
|
|
28459
28453
|
const {
|
|
28460
28454
|
removeFromCart
|
|
28461
28455
|
} = usePelcro();
|
|
28462
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28456
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
28463
28457
|
variant: "icon",
|
|
28464
28458
|
"data-key": itemId,
|
|
28465
28459
|
icon: /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
@@ -28487,8 +28481,8 @@ const CartSubmit = ({
|
|
|
28487
28481
|
} = useContext(store$8);
|
|
28488
28482
|
const {
|
|
28489
28483
|
t
|
|
28490
|
-
} = useTranslation
|
|
28491
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28484
|
+
} = useTranslation("cart");
|
|
28485
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({}, otherProps, {
|
|
28492
28486
|
onClick: () => {
|
|
28493
28487
|
dispatch({
|
|
28494
28488
|
type: HANDLE_SUBMIT
|
|
@@ -28525,7 +28519,7 @@ const CartTotalPrice = () => {
|
|
|
28525
28519
|
const totalPriceCurrency = cartItems[0].currency;
|
|
28526
28520
|
const {
|
|
28527
28521
|
t
|
|
28528
|
-
} = useTranslation
|
|
28522
|
+
} = useTranslation("cart");
|
|
28529
28523
|
|
|
28530
28524
|
if (!alert.content) {
|
|
28531
28525
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -28544,7 +28538,7 @@ const CartView = props => {
|
|
|
28544
28538
|
} = usePelcro();
|
|
28545
28539
|
const {
|
|
28546
28540
|
t
|
|
28547
|
-
} = useTranslation
|
|
28541
|
+
} = useTranslation("cart");
|
|
28548
28542
|
useEffect(() => {
|
|
28549
28543
|
document.dispatchEvent(cartOpened(cartItems));
|
|
28550
28544
|
}, []);
|
|
@@ -28603,7 +28597,7 @@ const CartModal = ({
|
|
|
28603
28597
|
} = usePelcro();
|
|
28604
28598
|
const {
|
|
28605
28599
|
t
|
|
28606
|
-
} = useTranslation
|
|
28600
|
+
} = useTranslation("cart");
|
|
28607
28601
|
|
|
28608
28602
|
const onSuccess = items => {
|
|
28609
28603
|
var _otherProps$onSuccess;
|
|
@@ -28622,7 +28616,7 @@ const CartModal = ({
|
|
|
28622
28616
|
onDisplay: onDisplay,
|
|
28623
28617
|
onClose: onClose,
|
|
28624
28618
|
hideCloseButton: false
|
|
28625
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
28619
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
28626
28620
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
28627
28621
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
28628
28622
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -28642,7 +28636,7 @@ const ShopSelectProductButton = ({
|
|
|
28642
28636
|
} = usePelcro();
|
|
28643
28637
|
const {
|
|
28644
28638
|
t
|
|
28645
|
-
} = useTranslation
|
|
28639
|
+
} = useTranslation("shop");
|
|
28646
28640
|
const [disabled, setDisabled] = useState(false);
|
|
28647
28641
|
const [textContent, setTextContent] = useState(t("buttons.select"));
|
|
28648
28642
|
|
|
@@ -28657,7 +28651,7 @@ const ShopSelectProductButton = ({
|
|
|
28657
28651
|
}, 1000);
|
|
28658
28652
|
};
|
|
28659
28653
|
|
|
28660
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28654
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
28661
28655
|
"data-sku-id": itemId,
|
|
28662
28656
|
id: `pelcro-shop-select-${itemId}`,
|
|
28663
28657
|
onClick: handleClick,
|
|
@@ -28674,8 +28668,8 @@ const ShopPurchaseButton = ({
|
|
|
28674
28668
|
} = usePelcro();
|
|
28675
28669
|
const {
|
|
28676
28670
|
t
|
|
28677
|
-
} = useTranslation
|
|
28678
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28671
|
+
} = useTranslation("shop");
|
|
28672
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({}, otherProps, {
|
|
28679
28673
|
"data-sku-id": itemId,
|
|
28680
28674
|
id: `pelcro-shop-purchase-${itemId}`,
|
|
28681
28675
|
onClick: () => purchaseItem(itemId)
|
|
@@ -28745,7 +28739,7 @@ const OrderCreateModal = ({
|
|
|
28745
28739
|
} = usePelcro();
|
|
28746
28740
|
const {
|
|
28747
28741
|
t
|
|
28748
|
-
} = useTranslation
|
|
28742
|
+
} = useTranslation("payment");
|
|
28749
28743
|
|
|
28750
28744
|
const onSuccess = () => {
|
|
28751
28745
|
var _otherProps$onSuccess;
|
|
@@ -28758,7 +28752,7 @@ const OrderCreateModal = ({
|
|
|
28758
28752
|
id: "pelcro-order-create-modal",
|
|
28759
28753
|
onDisplay: onDisplay,
|
|
28760
28754
|
onClose: onClose
|
|
28761
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
28755
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
28762
28756
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
28763
28757
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
28764
28758
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -28776,7 +28770,7 @@ const OrderConfirmModal = props => {
|
|
|
28776
28770
|
const latestOrderDiscount = latestOrder === null || latestOrder === void 0 ? void 0 : (_latestOrder$coupon = latestOrder.coupon) === null || _latestOrder$coupon === void 0 ? void 0 : _latestOrder$coupon.percent_off;
|
|
28777
28771
|
const {
|
|
28778
28772
|
t
|
|
28779
|
-
} = useTranslation
|
|
28773
|
+
} = useTranslation("shop");
|
|
28780
28774
|
const {
|
|
28781
28775
|
resetView
|
|
28782
28776
|
} = usePelcro();
|
|
@@ -28834,7 +28828,7 @@ const OrderConfirmModal = props => {
|
|
|
28834
28828
|
className: "pelcro-summary-total"
|
|
28835
28829
|
}, latestOrderDiscount && `(-${latestOrderDiscount}%) `, getFormattedPriceByLocal(latestOrder === null || latestOrder === void 0 ? void 0 : latestOrder.amount, latestOrder === null || latestOrder === void 0 ? void 0 : latestOrder.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("div", {
|
|
28836
28830
|
className: "plc-flex plc-justify-center plc-mt-6"
|
|
28837
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
28831
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
28838
28832
|
id: "pelcro-submit",
|
|
28839
28833
|
onClick: onClose,
|
|
28840
28834
|
autoFocus: true
|
|
@@ -28868,7 +28862,7 @@ const GiftCreateContainer = ({
|
|
|
28868
28862
|
}) => {
|
|
28869
28863
|
const {
|
|
28870
28864
|
t
|
|
28871
|
-
} = useTranslation
|
|
28865
|
+
} = useTranslation("register");
|
|
28872
28866
|
const {
|
|
28873
28867
|
set
|
|
28874
28868
|
} = usePelcro();
|
|
@@ -28992,8 +28986,8 @@ const GiftCreateSubmitButton = ({
|
|
|
28992
28986
|
} = useContext(store$7);
|
|
28993
28987
|
const {
|
|
28994
28988
|
t
|
|
28995
|
-
} = useTranslation
|
|
28996
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
28989
|
+
} = useTranslation("register");
|
|
28990
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
28997
28991
|
onClick: () => {
|
|
28998
28992
|
dispatch({
|
|
28999
28993
|
type: HANDLE_SUBMIT
|
|
@@ -29027,7 +29021,7 @@ const GiftCreateStartDate = props => {
|
|
|
29027
29021
|
|
|
29028
29022
|
const {
|
|
29029
29023
|
t
|
|
29030
|
-
} = useTranslation
|
|
29024
|
+
} = useTranslation("register");
|
|
29031
29025
|
const {
|
|
29032
29026
|
dispatch,
|
|
29033
29027
|
state
|
|
@@ -29062,7 +29056,7 @@ function GiftCreateMessage(props) {
|
|
|
29062
29056
|
|
|
29063
29057
|
const {
|
|
29064
29058
|
t
|
|
29065
|
-
} = useTranslation
|
|
29059
|
+
} = useTranslation("register");
|
|
29066
29060
|
const {
|
|
29067
29061
|
dispatch,
|
|
29068
29062
|
state
|
|
@@ -29096,7 +29090,7 @@ function GiftCreateMessage(props) {
|
|
|
29096
29090
|
const GiftCreateView = props => {
|
|
29097
29091
|
const {
|
|
29098
29092
|
t
|
|
29099
|
-
} = useTranslation
|
|
29093
|
+
} = useTranslation("register");
|
|
29100
29094
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29101
29095
|
id: "pelcro-gift-create-view"
|
|
29102
29096
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -29155,7 +29149,7 @@ const GiftCreateModal = ({
|
|
|
29155
29149
|
}) => {
|
|
29156
29150
|
const {
|
|
29157
29151
|
t
|
|
29158
|
-
} = useTranslation
|
|
29152
|
+
} = useTranslation("register");
|
|
29159
29153
|
const {
|
|
29160
29154
|
switchView,
|
|
29161
29155
|
switchToAddressView,
|
|
@@ -29179,7 +29173,7 @@ const GiftCreateModal = ({
|
|
|
29179
29173
|
id: "pelcro-gift-create-modal",
|
|
29180
29174
|
onDisplay: onDisplay,
|
|
29181
29175
|
onClose: onClose
|
|
29182
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
29176
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
29183
29177
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
29184
29178
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
29185
29179
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -29219,7 +29213,7 @@ const GiftRedeemContainer = ({
|
|
|
29219
29213
|
}) => {
|
|
29220
29214
|
const {
|
|
29221
29215
|
t
|
|
29222
|
-
} = useTranslation
|
|
29216
|
+
} = useTranslation("register");
|
|
29223
29217
|
const {
|
|
29224
29218
|
set
|
|
29225
29219
|
} = usePelcro();
|
|
@@ -29339,8 +29333,8 @@ const GiftRedeemSubmitButton = ({
|
|
|
29339
29333
|
} = useContext(store$6);
|
|
29340
29334
|
const {
|
|
29341
29335
|
t
|
|
29342
|
-
} = useTranslation
|
|
29343
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
29336
|
+
} = useTranslation("register");
|
|
29337
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
29344
29338
|
onClick: () => {
|
|
29345
29339
|
dispatch({
|
|
29346
29340
|
type: HANDLE_SUBMIT
|
|
@@ -29354,7 +29348,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
29354
29348
|
const GiftRedeemView = props => {
|
|
29355
29349
|
const {
|
|
29356
29350
|
t
|
|
29357
|
-
} = useTranslation
|
|
29351
|
+
} = useTranslation("register");
|
|
29358
29352
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29359
29353
|
id: "pelcro-gift-redeem-view"
|
|
29360
29354
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -29383,7 +29377,7 @@ const GiftRedeemModal = ({
|
|
|
29383
29377
|
}) => {
|
|
29384
29378
|
const {
|
|
29385
29379
|
t
|
|
29386
|
-
} = useTranslation
|
|
29380
|
+
} = useTranslation("register");
|
|
29387
29381
|
const {
|
|
29388
29382
|
switchView,
|
|
29389
29383
|
switchToAddressView,
|
|
@@ -29406,7 +29400,7 @@ const GiftRedeemModal = ({
|
|
|
29406
29400
|
id: "pelcro-gift-redeem-modal",
|
|
29407
29401
|
onClose: onClose,
|
|
29408
29402
|
onDisplay: onDisplay
|
|
29409
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
29403
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
29410
29404
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
29411
29405
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
29412
29406
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -29463,7 +29457,7 @@ const AddressSelectContainer = ({
|
|
|
29463
29457
|
|
|
29464
29458
|
const {
|
|
29465
29459
|
t
|
|
29466
|
-
} = useTranslation
|
|
29460
|
+
} = useTranslation("address");
|
|
29467
29461
|
const {
|
|
29468
29462
|
switchView,
|
|
29469
29463
|
giftCode: giftCodeFromStore,
|
|
@@ -29664,8 +29658,8 @@ const AddressSelectSubmit = ({
|
|
|
29664
29658
|
} = useContext(store$5);
|
|
29665
29659
|
const {
|
|
29666
29660
|
t
|
|
29667
|
-
} = useTranslation
|
|
29668
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
29661
|
+
} = useTranslation("address");
|
|
29662
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
29669
29663
|
onClick: () => {
|
|
29670
29664
|
dispatch({
|
|
29671
29665
|
type: HANDLE_SUBMIT
|
|
@@ -29680,7 +29674,7 @@ const AddressSelectSubmit = ({
|
|
|
29680
29674
|
const AddressSelectView = props => {
|
|
29681
29675
|
const {
|
|
29682
29676
|
t
|
|
29683
|
-
} = useTranslation
|
|
29677
|
+
} = useTranslation("address");
|
|
29684
29678
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29685
29679
|
id: "pelcro-address-select-view"
|
|
29686
29680
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -29712,7 +29706,7 @@ const AddressSelectModal = ({
|
|
|
29712
29706
|
} = usePelcro();
|
|
29713
29707
|
const {
|
|
29714
29708
|
t
|
|
29715
|
-
} = useTranslation
|
|
29709
|
+
} = useTranslation("address");
|
|
29716
29710
|
|
|
29717
29711
|
const onSuccess = selectedAddressId => {
|
|
29718
29712
|
var _otherProps$onSuccess;
|
|
@@ -29744,7 +29738,7 @@ const AddressSelectModal = ({
|
|
|
29744
29738
|
onDisplay: onDisplay,
|
|
29745
29739
|
onClose: onClose,
|
|
29746
29740
|
id: "pelcro-address-select-modal"
|
|
29747
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
29741
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
29748
29742
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
29749
29743
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
29750
29744
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -29871,7 +29865,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
29871
29865
|
const PaymentMethodSelectList = () => {
|
|
29872
29866
|
const {
|
|
29873
29867
|
t
|
|
29874
|
-
} = useTranslation
|
|
29868
|
+
} = useTranslation("paymentMethod");
|
|
29875
29869
|
const {
|
|
29876
29870
|
dispatch,
|
|
29877
29871
|
state: {
|
|
@@ -29921,7 +29915,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
29921
29915
|
}) => {
|
|
29922
29916
|
const {
|
|
29923
29917
|
t
|
|
29924
|
-
} = useTranslation
|
|
29918
|
+
} = useTranslation("paymentMethod");
|
|
29925
29919
|
const {
|
|
29926
29920
|
dispatch,
|
|
29927
29921
|
state: {
|
|
@@ -29929,7 +29923,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
29929
29923
|
isSubmitting
|
|
29930
29924
|
}
|
|
29931
29925
|
} = useContext(store$4);
|
|
29932
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
29926
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
29933
29927
|
onClick: () => {
|
|
29934
29928
|
dispatch({
|
|
29935
29929
|
type: HANDLE_SUBMIT
|
|
@@ -29944,7 +29938,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
29944
29938
|
const PaymentMethodSelectView = props => {
|
|
29945
29939
|
const {
|
|
29946
29940
|
t
|
|
29947
|
-
} = useTranslation
|
|
29941
|
+
} = useTranslation("paymentMethod");
|
|
29948
29942
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29949
29943
|
id: "pelcro-payment-method-select-view"
|
|
29950
29944
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -29973,7 +29967,7 @@ const PaymentMethodSelectModal = ({
|
|
|
29973
29967
|
} = usePelcro();
|
|
29974
29968
|
const {
|
|
29975
29969
|
t
|
|
29976
|
-
} = useTranslation
|
|
29970
|
+
} = useTranslation("paymentMethod");
|
|
29977
29971
|
|
|
29978
29972
|
const onSuccess = selectedPaymentMethodId => {
|
|
29979
29973
|
var _otherProps$onSuccess;
|
|
@@ -29993,7 +29987,7 @@ const PaymentMethodSelectModal = ({
|
|
|
29993
29987
|
onDisplay: onDisplay,
|
|
29994
29988
|
onClose: onClose,
|
|
29995
29989
|
id: "pelcro-payment-method-select-modal"
|
|
29996
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
29990
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
29997
29991
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
29998
29992
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
29999
29993
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -31380,7 +31374,7 @@ const Card = ({
|
|
|
31380
31374
|
requestStates,
|
|
31381
31375
|
...restProps
|
|
31382
31376
|
}) => {
|
|
31383
|
-
useTranslation
|
|
31377
|
+
useTranslation("dashboard");
|
|
31384
31378
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
31385
31379
|
className: `plc-bg-white plc-border-2 plc-p-6 plc-rounded plc-my-20 ${className}`,
|
|
31386
31380
|
id: "plc-dashboard-card"
|
|
@@ -31404,7 +31398,7 @@ const ReactGA$1 = (_window$1 = window) !== null && _window$1 !== void 0 && (_win
|
|
|
31404
31398
|
const SavedItemsMenu = () => {
|
|
31405
31399
|
const {
|
|
31406
31400
|
t
|
|
31407
|
-
} = useTranslation
|
|
31401
|
+
} = useTranslation("dashboard");
|
|
31408
31402
|
const [userMetadata, setUserMetadata] = useState(window.Pelcro.user.read().metadata);
|
|
31409
31403
|
const userSavedItems = userMetadata ? Object.entries(userMetadata) // only get metadata related to saved items
|
|
31410
31404
|
.filter(([categoryTitle, value]) => categoryTitle.startsWith("metadata_saved_") && (value === null || value === void 0 ? void 0 : value.length)) // drop the "metadata_saved_" from the category title
|
|
@@ -31424,7 +31418,7 @@ const SavedItems = ({
|
|
|
31424
31418
|
}) => {
|
|
31425
31419
|
const {
|
|
31426
31420
|
t
|
|
31427
|
-
} = useTranslation
|
|
31421
|
+
} = useTranslation("dashboard");
|
|
31428
31422
|
const [isLoading, setLoading] = useState(false);
|
|
31429
31423
|
const {
|
|
31430
31424
|
isAuthenticated
|
|
@@ -31484,7 +31478,7 @@ const SavedItems = ({
|
|
|
31484
31478
|
src: item === null || item === void 0 ? void 0 : item.image
|
|
31485
31479
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
31486
31480
|
className: "plc-font-semibold"
|
|
31487
|
-
}, item.title)))), /*#__PURE__*/React__default.createElement(Button
|
|
31481
|
+
}, item.title)))), /*#__PURE__*/React__default.createElement(Button, {
|
|
31488
31482
|
variant: "ghost",
|
|
31489
31483
|
type: "button",
|
|
31490
31484
|
className: "plc-text-gray-500 plc-rounded-2xl",
|
|
@@ -31513,10 +31507,30 @@ function SvgCalendar(props) {
|
|
|
31513
31507
|
})));
|
|
31514
31508
|
}
|
|
31515
31509
|
|
|
31510
|
+
const AddNew = ({
|
|
31511
|
+
title,
|
|
31512
|
+
onClick
|
|
31513
|
+
}) => {
|
|
31514
|
+
const handleClick = () => {
|
|
31515
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
31516
|
+
};
|
|
31517
|
+
|
|
31518
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, title && /*#__PURE__*/React__default.createElement("div", {
|
|
31519
|
+
className: "plc-mt-5 plc-relative plc-text-primary-500"
|
|
31520
|
+
}, /*#__PURE__*/React__default.createElement("hr", {
|
|
31521
|
+
className: "plc-absolute plc-border-t-2 plc-my-4 plc-top-1.5 plc-w-full"
|
|
31522
|
+
}), /*#__PURE__*/React__default.createElement("button", {
|
|
31523
|
+
onClick: handleClick,
|
|
31524
|
+
className: "plc-bg-white plc-flex plc-items-center plc-mx-auto plc-p-2 plc-relative focus-within:plc-outline-none"
|
|
31525
|
+
}, /*#__PURE__*/React__default.createElement(SvgPlus, {
|
|
31526
|
+
className: "plc-w-4 plc-h-4 plc-mr-1"
|
|
31527
|
+
}), /*#__PURE__*/React__default.createElement("span", null, title))));
|
|
31528
|
+
};
|
|
31529
|
+
|
|
31516
31530
|
const SubscriptionsMenu = props => {
|
|
31517
31531
|
const {
|
|
31518
31532
|
t
|
|
31519
|
-
} = useTranslation
|
|
31533
|
+
} = useTranslation("dashboard");
|
|
31520
31534
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
31521
31535
|
id: "pelcro-dashboard-subscriptions-menu",
|
|
31522
31536
|
className: "plc-max-w-80% plc-m-auto",
|
|
@@ -31537,20 +31551,15 @@ const SubscriptionsMenu = props => {
|
|
|
31537
31551
|
className: "plc-w-1/5"
|
|
31538
31552
|
}, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
31539
31553
|
className: "plc-h-4"
|
|
31540
|
-
})), /*#__PURE__*/React__default.createElement(Accordion, null, /*#__PURE__*/React__default.createElement(SubscriptionsItems, props)), /*#__PURE__*/React__default.createElement(
|
|
31541
|
-
|
|
31542
|
-
className: "plc-p-1"
|
|
31543
|
-
}, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
31544
|
-
variant: "ghost",
|
|
31545
|
-
icon: /*#__PURE__*/React__default.createElement(SvgPlus, {
|
|
31546
|
-
className: "plc-w-4 plc-h-4 plc-mr-1"
|
|
31547
|
-
}),
|
|
31548
|
-
className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase plc-rounded-none hover:plc-bg-gray-100",
|
|
31554
|
+
})), /*#__PURE__*/React__default.createElement(Accordion, null, /*#__PURE__*/React__default.createElement(SubscriptionsItems, props))), /*#__PURE__*/React__default.createElement(AddNew, {
|
|
31555
|
+
title: t("labels.addSubscription"),
|
|
31549
31556
|
onClick: props.displayProductSelect
|
|
31550
|
-
}
|
|
31557
|
+
}), /*#__PURE__*/React__default.createElement("table", {
|
|
31558
|
+
className: "plc-w-full plc-table-fixed pelcro-subscriptions-table plc-text-left"
|
|
31559
|
+
}, /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
31551
31560
|
colSpan: "5",
|
|
31552
31561
|
className: "plc-p-1"
|
|
31553
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
31562
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
31554
31563
|
variant: "ghost",
|
|
31555
31564
|
icon: /*#__PURE__*/React__default.createElement(SvgGift, {
|
|
31556
31565
|
className: "plc-w-4 plc-h-4 plc-mr-1"
|
|
@@ -31574,7 +31583,7 @@ const SubscriptionsItems = ({
|
|
|
31574
31583
|
}) => {
|
|
31575
31584
|
const {
|
|
31576
31585
|
t
|
|
31577
|
-
} = useTranslation
|
|
31586
|
+
} = useTranslation("dashboard");
|
|
31578
31587
|
const {
|
|
31579
31588
|
switchView,
|
|
31580
31589
|
setSubscriptionToCancel,
|
|
@@ -31703,35 +31712,35 @@ const SubscriptionsItems = ({
|
|
|
31703
31712
|
className: "plc-inline-block plc-mt-1 plc-underline"
|
|
31704
31713
|
}, getSubscriptionStatus(sub).content), /*#__PURE__*/React__default.createElement("br", null), sub.shipments_remaining ? /*#__PURE__*/React__default.createElement("span", {
|
|
31705
31714
|
className: "plc-inline-block plc-mt-1"
|
|
31706
|
-
}, sub.shipments_remaining, " ", t("labels.shipments")) : null)), /*#__PURE__*/React__default.createElement("td", null, sub.cancel_at_period_end === 1 && sub.plan.auto_renew && !sub.is_gift_recipient && /*#__PURE__*/React__default.createElement(Button
|
|
31715
|
+
}, sub.shipments_remaining, " ", t("labels.shipments")) : null)), /*#__PURE__*/React__default.createElement("td", null, sub.cancel_at_period_end === 1 && sub.plan.auto_renew && !sub.is_gift_recipient && /*#__PURE__*/React__default.createElement(Button, {
|
|
31707
31716
|
variant: "ghost",
|
|
31708
31717
|
className: "plc-text-green-400 focus:plc-ring-green-300 pelcro-dashboard-sub-reactivate-button",
|
|
31709
31718
|
icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
|
|
31710
31719
|
onClick: onReactivateClick,
|
|
31711
31720
|
disabled: disableSubmit,
|
|
31712
31721
|
"data-key": sub.id
|
|
31713
|
-
}, t("labels.reactivate")), sub.cancel_at_period_end === 1 && sub.status !== "incomplete" && /*#__PURE__*/React__default.createElement(Button
|
|
31722
|
+
}, t("labels.reactivate")), sub.cancel_at_period_end === 1 && sub.status !== "incomplete" && /*#__PURE__*/React__default.createElement(Button, {
|
|
31714
31723
|
variant: "ghost",
|
|
31715
31724
|
className: "plc-text-blue-400 pelcro-dashboard-sub-renew-button",
|
|
31716
31725
|
icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
|
|
31717
31726
|
onClick: onRenewClick,
|
|
31718
31727
|
disabled: disableSubmit,
|
|
31719
31728
|
"data-key": sub.id
|
|
31720
|
-
}, t("labels.renew")), sub.shipments_suspended_until && isDateAfterToday(sub.shipments_suspended_until) && sub.shipments_remaining > 0 && /*#__PURE__*/React__default.createElement(Button
|
|
31729
|
+
}, t("labels.renew")), sub.shipments_suspended_until && isDateAfterToday(sub.shipments_suspended_until) && sub.shipments_remaining > 0 && /*#__PURE__*/React__default.createElement(Button, {
|
|
31721
31730
|
variant: "ghost",
|
|
31722
31731
|
className: "plc-text-blue-400 pelcro-dashboard-sub-suspend-button",
|
|
31723
31732
|
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
31724
31733
|
onClick: onUnSuspendClick,
|
|
31725
31734
|
disabled: disableSubmit,
|
|
31726
31735
|
"data-key": sub.id
|
|
31727
|
-
}, t("labels.unsuspend")), (!sub.shipments_suspended_until && sub.shipments_remaining > 0 || sub.shipments_suspended_until && !isDateAfterToday(sub.shipments_suspended_until)) && /*#__PURE__*/React__default.createElement(Button
|
|
31736
|
+
}, t("labels.unsuspend")), (!sub.shipments_suspended_until && sub.shipments_remaining > 0 || sub.shipments_suspended_until && !isDateAfterToday(sub.shipments_suspended_until)) && /*#__PURE__*/React__default.createElement(Button, {
|
|
31728
31737
|
variant: "ghost",
|
|
31729
31738
|
className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-suspend-button",
|
|
31730
31739
|
icon: /*#__PURE__*/React__default.createElement(SvgCalendar, null),
|
|
31731
31740
|
onClick: onSuspendClick,
|
|
31732
31741
|
disabled: disableSubmit,
|
|
31733
31742
|
"data-key": sub.id
|
|
31734
|
-
}, t("labels.suspend")), !sub.plan.auto_renew || sub.plan.auto_renew && sub.cancel_at_period_end === 0 ? /*#__PURE__*/React__default.createElement(Button
|
|
31743
|
+
}, t("labels.suspend")), !sub.plan.auto_renew || sub.plan.auto_renew && sub.cancel_at_period_end === 0 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
31735
31744
|
variant: "ghost",
|
|
31736
31745
|
className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
31737
31746
|
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
@@ -31875,7 +31884,7 @@ Accordion.item = function AccordionItem({
|
|
|
31875
31884
|
const OrdersMenu = () => {
|
|
31876
31885
|
const {
|
|
31877
31886
|
t
|
|
31878
|
-
} = useTranslation
|
|
31887
|
+
} = useTranslation("dashboard");
|
|
31879
31888
|
const userOrders = window.Pelcro.user.read().orders;
|
|
31880
31889
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
31881
31890
|
id: "pelcro-dashboard-orders-menu",
|
|
@@ -31910,9 +31919,11 @@ const OrderItems = ({
|
|
|
31910
31919
|
|
|
31911
31920
|
const {
|
|
31912
31921
|
t
|
|
31913
|
-
} = useTranslation
|
|
31922
|
+
} = useTranslation("dashboard");
|
|
31914
31923
|
if ((orders === null || orders === void 0 ? void 0 : orders.length) === 0) return null;
|
|
31915
31924
|
return !(orders !== null && orders !== void 0 && orders.length) ? null : orders === null || orders === void 0 ? void 0 : orders.map(order => {
|
|
31925
|
+
var _order$items;
|
|
31926
|
+
|
|
31916
31927
|
const isActive = activeMenu === order.id;
|
|
31917
31928
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
31918
31929
|
key: order.id
|
|
@@ -31930,7 +31941,7 @@ const OrderItems = ({
|
|
|
31930
31941
|
count: getItemsAmount(order.id)
|
|
31931
31942
|
}))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("p", {
|
|
31932
31943
|
className: "plc-font-semibold "
|
|
31933
|
-
}, order.
|
|
31944
|
+
}, order === null || order === void 0 ? void 0 : (_order$items = order.items) === null || _order$items === void 0 ? void 0 : _order$items[0].created_at)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
|
|
31934
31945
|
className: `plc-flex plc-items-center plc-justify-center plc-transition-transform plc-ease-out plc-transform plc-rounded-full plc-w-7 plc-h-7 ${isActive ? "plc-flex plc-place-items-center plc-w-7 plc-h-7 plc-p-1 plc-bg-primary-400 plc-rounded-full" : "accordion-chevron"}`
|
|
31935
31946
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
31936
31947
|
className: `plc-transition plc-ease-out ${isActive && "plc-text-white plc-transform plc-rotate-90"}`
|
|
@@ -31962,30 +31973,10 @@ const OrderItems = ({
|
|
|
31962
31973
|
});
|
|
31963
31974
|
};
|
|
31964
31975
|
|
|
31965
|
-
const AddNew = ({
|
|
31966
|
-
title,
|
|
31967
|
-
onClick
|
|
31968
|
-
}) => {
|
|
31969
|
-
const handleClick = () => {
|
|
31970
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
31971
|
-
};
|
|
31972
|
-
|
|
31973
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, title && /*#__PURE__*/React__default.createElement("div", {
|
|
31974
|
-
className: "plc-mt-5 plc-relative plc-text-primary-500"
|
|
31975
|
-
}, /*#__PURE__*/React__default.createElement("hr", {
|
|
31976
|
-
className: "plc-absolute plc-border-t-2 plc-my-4 plc-top-1.5 plc-w-full"
|
|
31977
|
-
}), /*#__PURE__*/React__default.createElement("button", {
|
|
31978
|
-
onClick: handleClick,
|
|
31979
|
-
className: "plc-bg-white plc-flex plc-items-center plc-mx-auto plc-p-2 plc-relative focus-within:plc-outline-none"
|
|
31980
|
-
}, /*#__PURE__*/React__default.createElement(SvgPlus, {
|
|
31981
|
-
className: "plc-w-4 plc-h-4 plc-mr-1"
|
|
31982
|
-
}), /*#__PURE__*/React__default.createElement("span", null, title))));
|
|
31983
|
-
};
|
|
31984
|
-
|
|
31985
31976
|
const DonationsMenu = props => {
|
|
31986
31977
|
const {
|
|
31987
31978
|
t
|
|
31988
|
-
} = useTranslation
|
|
31979
|
+
} = useTranslation("dashboard");
|
|
31989
31980
|
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
31990
31981
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
31991
31982
|
key: sub.id,
|
|
@@ -31998,22 +31989,7 @@ const DonationsMenu = props => {
|
|
|
31998
31989
|
className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
|
|
31999
31990
|
}, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
|
|
32000
31991
|
className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
|
|
32001
|
-
}, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start))))
|
|
32002
|
-
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(sub).bgColor} plc-uppercase ${props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(sub).textColor} plc-rounded-lg`
|
|
32003
|
-
}, props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(sub).icon, props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(sub).title), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("div", {
|
|
32004
|
-
className: "plc-mb-4 plc-text-xs plc-text-gray-500"
|
|
32005
|
-
}, sub.status && /*#__PURE__*/React__default.createElement("span", {
|
|
32006
|
-
className: "plc-inline-block plc-mt-1 plc-underline"
|
|
32007
|
-
}, props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(sub).content))), /*#__PURE__*/React__default.createElement("td", null, sub.cancel_at_period_end === 1 && /*#__PURE__*/React__default.createElement(Button, {
|
|
32008
|
-
variant: "ghost",
|
|
32009
|
-
icon: /*#__PURE__*/React__default.createElement(RefreshIcon, {
|
|
32010
|
-
className: "plc-w-4 plc-h-4"
|
|
32011
|
-
}),
|
|
32012
|
-
className: "plc-text-blue-400" // onClick={onRenewClick}
|
|
32013
|
-
// disabled={this.state.disableSubmit}
|
|
32014
|
-
,
|
|
32015
|
-
"data-key": sub.id
|
|
32016
|
-
}, t("labels.renew"))));
|
|
31992
|
+
}, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
|
|
32017
31993
|
});
|
|
32018
31994
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
32019
31995
|
id: "pelcro-dashboard-donation-menu",
|
|
@@ -32027,13 +32003,7 @@ const DonationsMenu = props => {
|
|
|
32027
32003
|
className: "plc-w-1/4"
|
|
32028
32004
|
}, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
|
|
32029
32005
|
className: "plc-w-1/4"
|
|
32030
|
-
}, t("labels.startDate")), /*#__PURE__*/React__default.createElement("
|
|
32031
|
-
className: "plc-w-1/4"
|
|
32032
|
-
}, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
|
|
32033
|
-
className: "plc-w-1/4"
|
|
32034
|
-
}, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, subscriptions)), /*#__PURE__*/React__default.createElement(AddNew, {
|
|
32035
|
-
title: t("labels.newDonations")
|
|
32036
|
-
}));
|
|
32006
|
+
}, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, subscriptions)));
|
|
32037
32007
|
};
|
|
32038
32008
|
|
|
32039
32009
|
function getDonationSubs() {
|
|
@@ -32052,7 +32022,7 @@ function formatStartDate(date) {
|
|
|
32052
32022
|
const InvoicesMenu = props => {
|
|
32053
32023
|
const {
|
|
32054
32024
|
t
|
|
32055
|
-
} = useTranslation
|
|
32025
|
+
} = useTranslation("dashboard");
|
|
32056
32026
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
32057
32027
|
id: "pelcro-dashboard-invoices-menu",
|
|
32058
32028
|
className: "plc-max-w-80% plc-m-auto",
|
|
@@ -32079,7 +32049,7 @@ const InvoicesItems = () => {
|
|
|
32079
32049
|
|
|
32080
32050
|
const {
|
|
32081
32051
|
t
|
|
32082
|
-
} = useTranslation
|
|
32052
|
+
} = useTranslation("dashboard");
|
|
32083
32053
|
const {
|
|
32084
32054
|
setInvoice,
|
|
32085
32055
|
switchView
|
|
@@ -32111,7 +32081,7 @@ const InvoicesItems = () => {
|
|
|
32111
32081
|
className: "plc-py-2"
|
|
32112
32082
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
32113
32083
|
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
32114
|
-
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button
|
|
32084
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
32115
32085
|
variant: "ghost",
|
|
32116
32086
|
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
32117
32087
|
icon: /*#__PURE__*/React__default.createElement(SvgDocument, {
|
|
@@ -32190,7 +32160,7 @@ function getInvoiceStatus(invoice) {
|
|
|
32190
32160
|
const MembershipsMenu = props => {
|
|
32191
32161
|
const {
|
|
32192
32162
|
t
|
|
32193
|
-
} = useTranslation
|
|
32163
|
+
} = useTranslation("dashboard");
|
|
32194
32164
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
32195
32165
|
id: "pelcro-dashboard-donation-menu",
|
|
32196
32166
|
className: "plc-max-w-80% plc-m-auto",
|
|
@@ -32215,7 +32185,7 @@ const MembershipsMenu = props => {
|
|
|
32215
32185
|
const MembershipsItems = props => {
|
|
32216
32186
|
const {
|
|
32217
32187
|
t
|
|
32218
|
-
} = useTranslation
|
|
32188
|
+
} = useTranslation("dashboard");
|
|
32219
32189
|
const {
|
|
32220
32190
|
switchView,
|
|
32221
32191
|
setSelectedMembership,
|
|
@@ -32262,7 +32232,7 @@ const MembershipsItems = props => {
|
|
|
32262
32232
|
className: "plc-inline-block plc-mt-1"
|
|
32263
32233
|
}, membership.subscription.shipments_remaining, " ", t("labels.shipments")) : null)), /*#__PURE__*/React__default.createElement("td", {
|
|
32264
32234
|
className: "plc-truncate"
|
|
32265
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
32235
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
32266
32236
|
variant: "ghost",
|
|
32267
32237
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, {
|
|
32268
32238
|
className: "plc-w-4 plc-h-4"
|
|
@@ -32329,7 +32299,7 @@ const GiftsMenu = props => {
|
|
|
32329
32299
|
|
|
32330
32300
|
const {
|
|
32331
32301
|
t
|
|
32332
|
-
} = useTranslation
|
|
32302
|
+
} = useTranslation("dashboard");
|
|
32333
32303
|
const giftRecipients = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
32334
32304
|
|
|
32335
32305
|
const renderGiftRecipients = () => {
|
|
@@ -32359,7 +32329,7 @@ const GiftsMenu = props => {
|
|
|
32359
32329
|
className: "plc-mb-4 plc-text-xs plc-text-gray-500"
|
|
32360
32330
|
}, recipient.status && /*#__PURE__*/React__default.createElement("span", {
|
|
32361
32331
|
className: "plc-inline-block plc-mt-1 plc-underline"
|
|
32362
|
-
}, props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(recipient).content))), recipient.cancel_at_period_end === 1 && /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button
|
|
32332
|
+
}, props === null || props === void 0 ? void 0 : props.getSubscriptionStatus(recipient).content))), recipient.cancel_at_period_end === 1 && /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
32363
32333
|
variant: "ghost",
|
|
32364
32334
|
icon: /*#__PURE__*/React__default.createElement(SvgRefresh, {
|
|
32365
32335
|
className: "plc-w-4 plc-h-4"
|
|
@@ -32402,7 +32372,7 @@ const GiftsMenu = props => {
|
|
|
32402
32372
|
const AddressesMenu = props => {
|
|
32403
32373
|
const {
|
|
32404
32374
|
t
|
|
32405
|
-
} = useTranslation
|
|
32375
|
+
} = useTranslation("dashboard");
|
|
32406
32376
|
const [requestStates, setRequestStates] = useState({
|
|
32407
32377
|
loading: false,
|
|
32408
32378
|
success: false,
|
|
@@ -32426,7 +32396,7 @@ const AddressesMenu = props => {
|
|
|
32426
32396
|
const AddressesItems = props => {
|
|
32427
32397
|
var _window$Pelcro$user$r;
|
|
32428
32398
|
|
|
32429
|
-
useTranslation
|
|
32399
|
+
useTranslation("dashboard");
|
|
32430
32400
|
const {
|
|
32431
32401
|
switchView
|
|
32432
32402
|
} = usePelcro();
|
|
@@ -32465,7 +32435,7 @@ const AddressesItems = props => {
|
|
|
32465
32435
|
className: "pelcro-address-line1 plc-text-sm plc-mt-2"
|
|
32466
32436
|
}, address.line1), /*#__PURE__*/React__default.createElement("p", {
|
|
32467
32437
|
className: "pelcro-address-country plc-text-sm"
|
|
32468
|
-
}, address.city, ", ", address.state_name, " ", address.postal_code, ", ", address.country_name)), /*#__PURE__*/React__default.createElement(Button
|
|
32438
|
+
}, address.city, ", ", address.state_name, " ", address.postal_code, ", ", address.country_name)), /*#__PURE__*/React__default.createElement(Button, {
|
|
32469
32439
|
variant: "icon",
|
|
32470
32440
|
className: "plc-text-gray-500",
|
|
32471
32441
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
@@ -32519,7 +32489,7 @@ const getPaymentCardIcon = name => {
|
|
|
32519
32489
|
const PaymentCardsMenu = props => {
|
|
32520
32490
|
const {
|
|
32521
32491
|
t
|
|
32522
|
-
} = useTranslation
|
|
32492
|
+
} = useTranslation("dashboard");
|
|
32523
32493
|
const source = window.Pelcro.user.read().source;
|
|
32524
32494
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
32525
32495
|
id: "pelcro-dashboard-payment-menu",
|
|
@@ -32537,7 +32507,7 @@ const PaymentCardsMenu = props => {
|
|
|
32537
32507
|
const PaymentCardsItems = props => {
|
|
32538
32508
|
var _props$source, _props$source$propert, _props$source2, _props$source2$proper;
|
|
32539
32509
|
|
|
32540
|
-
useTranslation
|
|
32510
|
+
useTranslation("dashboard");
|
|
32541
32511
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
32542
32512
|
className: `plc-py-2 plc-px-4 plc-mt-5 plc-flex plc-items-center plc-justify-between last:plc-mb-0 plc-rounded plc-text-gray-900 pelcro-address-wrapper plc-bg-white plc-shadow-md_dark`
|
|
32543
32513
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -32546,7 +32516,7 @@ const PaymentCardsItems = props => {
|
|
|
32546
32516
|
className: "plc-mr-6"
|
|
32547
32517
|
}, getPaymentCardIcon(props === null || props === void 0 ? void 0 : (_props$source = props.source) === null || _props$source === void 0 ? void 0 : (_props$source$propert = _props$source.properties) === null || _props$source$propert === void 0 ? void 0 : _props$source$propert.brand)), /*#__PURE__*/React__default.createElement("p", {
|
|
32548
32518
|
className: "plc-ml-1 plc-text-lg plc-tracking-widest"
|
|
32549
|
-
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ", props === null || props === void 0 ? void 0 : (_props$source2 = props.source) === null || _props$source2 === void 0 ? void 0 : (_props$source2$proper = _props$source2.properties) === null || _props$source2$proper === void 0 ? void 0 : _props$source2$proper.last4)), /*#__PURE__*/React__default.createElement(Button
|
|
32519
|
+
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ", props === null || props === void 0 ? void 0 : (_props$source2 = props.source) === null || _props$source2 === void 0 ? void 0 : (_props$source2$proper = _props$source2.properties) === null || _props$source2$proper === void 0 ? void 0 : _props$source2$proper.last4)), /*#__PURE__*/React__default.createElement(Button, {
|
|
32550
32520
|
variant: "icon",
|
|
32551
32521
|
className: "plc-text-gray-500",
|
|
32552
32522
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
@@ -33951,7 +33921,7 @@ var QRCode = unwrapExports(lib);
|
|
|
33951
33921
|
const QRCodeMenu = props => {
|
|
33952
33922
|
const {
|
|
33953
33923
|
t
|
|
33954
|
-
} = useTranslation
|
|
33924
|
+
} = useTranslation("qr");
|
|
33955
33925
|
const value = window.Pelcro.user.read().id ? `${window.Pelcro.environment.domain}/admin/${window.Pelcro.siteid}/customers/${window.Pelcro.user.read().id}` : `${window.Pelcro.environment.domain}/admin/${window.Pelcro.siteid}/customers`;
|
|
33956
33926
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
33957
33927
|
id: "pelcro-dashboard-donation-menu",
|
|
@@ -33968,7 +33938,7 @@ const QRCodeMenu = props => {
|
|
|
33968
33938
|
const ProfileMenu = props => {
|
|
33969
33939
|
const {
|
|
33970
33940
|
t
|
|
33971
|
-
} = useTranslation
|
|
33941
|
+
} = useTranslation("dashboard");
|
|
33972
33942
|
const {
|
|
33973
33943
|
switchView
|
|
33974
33944
|
} = usePelcro();
|
|
@@ -34014,7 +33984,7 @@ const NewslettersMenu = props => {
|
|
|
34014
33984
|
|
|
34015
33985
|
const {
|
|
34016
33986
|
t
|
|
34017
|
-
} = useTranslation
|
|
33987
|
+
} = useTranslation("dashboard");
|
|
34018
33988
|
const defaultStatues = {
|
|
34019
33989
|
loading: false,
|
|
34020
33990
|
success: false,
|
|
@@ -34109,7 +34079,7 @@ const NewslettersMenu = props => {
|
|
|
34109
34079
|
newsletters: newsletters
|
|
34110
34080
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
34111
34081
|
className: "plc-flex plc-justify-center"
|
|
34112
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
34082
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
34113
34083
|
onClick: handleSubmit,
|
|
34114
34084
|
disabled: requestStates.loading
|
|
34115
34085
|
}, "SUBMIT")));
|
|
@@ -34119,7 +34089,7 @@ const NewsLettersItems = ({
|
|
|
34119
34089
|
newsletters,
|
|
34120
34090
|
handleChange
|
|
34121
34091
|
}) => {
|
|
34122
|
-
useTranslation
|
|
34092
|
+
useTranslation("dashboard");
|
|
34123
34093
|
if (newsletters.length === 0) return null;
|
|
34124
34094
|
return newsletters.map(newsletter => {
|
|
34125
34095
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -34451,7 +34421,7 @@ class Dashboard extends Component {
|
|
|
34451
34421
|
className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
|
|
34452
34422
|
}, address.type), address.is_default && /*#__PURE__*/React__default.createElement("span", {
|
|
34453
34423
|
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
34454
|
-
}, this.locale("labels.default")))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button
|
|
34424
|
+
}, this.locale("labels.default")))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
34455
34425
|
variant: "icon",
|
|
34456
34426
|
className: "plc-text-gray-500",
|
|
34457
34427
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
@@ -34473,7 +34443,7 @@ class Dashboard extends Component {
|
|
|
34473
34443
|
}), addresses, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
34474
34444
|
colSpan: "2",
|
|
34475
34445
|
className: "plc-p-1"
|
|
34476
|
-
}, /*#__PURE__*/React__default.createElement(Button
|
|
34446
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
34477
34447
|
variant: "ghost",
|
|
34478
34448
|
icon: /*#__PURE__*/React__default.createElement(SvgPlus, {
|
|
34479
34449
|
className: "plc-w-4 plc-mr-1"
|
|
@@ -34585,9 +34555,10 @@ class Dashboard extends Component {
|
|
|
34585
34555
|
setActiveDashboardLink: this.setActiveDashboardLink,
|
|
34586
34556
|
activeDashboardLink: this.state.activeDashboardLink
|
|
34587
34557
|
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
34558
|
+
show: showNewsletters(),
|
|
34588
34559
|
name: SUB_MENUS.NEWSLETTERS,
|
|
34589
34560
|
icon: /*#__PURE__*/React__default.createElement(SvgNewsletter, {
|
|
34590
|
-
className: "plc-transform plc-scale-
|
|
34561
|
+
className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
34591
34562
|
}),
|
|
34592
34563
|
title: this.locale("labels.Newsletters"),
|
|
34593
34564
|
setActiveDashboardLink: this.setActiveDashboardLink,
|
|
@@ -34683,7 +34654,7 @@ class Dashboard extends Component {
|
|
|
34683
34654
|
setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
|
|
34684
34655
|
setIsRenewingGift: this.props.setIsRenewingGift,
|
|
34685
34656
|
setView: this.props.setView
|
|
34686
|
-
}), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default.createElement(Button
|
|
34657
|
+
}), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default.createElement(Button, {
|
|
34687
34658
|
variant: "ghost",
|
|
34688
34659
|
type: "button",
|
|
34689
34660
|
className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
|
|
@@ -34702,15 +34673,22 @@ function hasInvoices() {
|
|
|
34702
34673
|
return invoices.length > 0;
|
|
34703
34674
|
}
|
|
34704
34675
|
|
|
34676
|
+
function showNewsletters() {
|
|
34677
|
+
var _ref, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro3$uiSet2;
|
|
34678
|
+
|
|
34679
|
+
const showNewslettersUiSettings = (_ref = ((_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : (_window$Pelcro3$uiSet2 = _window$Pelcro3$uiSet.newsletters) === null || _window$Pelcro3$uiSet2 === void 0 ? void 0 : _window$Pelcro3$uiSet2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
|
|
34680
|
+
return showNewslettersUiSettings;
|
|
34681
|
+
}
|
|
34682
|
+
|
|
34705
34683
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
34706
34684
|
|
|
34707
|
-
// The button in the lower
|
|
34685
|
+
// The button in the lower left that shows the dashboard.
|
|
34708
34686
|
const DashboardOpenButton = () => {
|
|
34709
34687
|
const {
|
|
34710
34688
|
switchView
|
|
34711
34689
|
} = usePelcro();
|
|
34712
34690
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
34713
|
-
className: "plc-fixed plc-
|
|
34691
|
+
className: "plc-fixed plc-left-4 plc-bottom-4 pelcro-open-dashboard-btn"
|
|
34714
34692
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
34715
34693
|
className: "plc-bg-white plc-border-2 plc-rounded-full focus:plc-outline-none plc-border-primary-300 hover:plc-bg-white",
|
|
34716
34694
|
name: "menu",
|
|
@@ -34759,7 +34737,7 @@ const ProfilePicChangeContainer = ({
|
|
|
34759
34737
|
}) => {
|
|
34760
34738
|
const {
|
|
34761
34739
|
t
|
|
34762
|
-
} = useTranslation
|
|
34740
|
+
} = useTranslation("userEdit");
|
|
34763
34741
|
|
|
34764
34742
|
const handleUpdatePicture = async ({
|
|
34765
34743
|
imageSrc,
|
|
@@ -34959,8 +34937,8 @@ const ProfilePicChangeButton = ({
|
|
|
34959
34937
|
} = useContext(store$3);
|
|
34960
34938
|
const {
|
|
34961
34939
|
t
|
|
34962
|
-
} = useTranslation
|
|
34963
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
34940
|
+
} = useTranslation("userEdit");
|
|
34941
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
34964
34942
|
onClick: () => {
|
|
34965
34943
|
dispatch({
|
|
34966
34944
|
type: HANDLE_USER_UPDATE
|
|
@@ -36369,7 +36347,7 @@ const ProfilePicChangeZoom = ({
|
|
|
36369
36347
|
} = useContext(store$3);
|
|
36370
36348
|
const {
|
|
36371
36349
|
t
|
|
36372
|
-
} = useTranslation
|
|
36350
|
+
} = useTranslation("userEdit");
|
|
36373
36351
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
36374
36352
|
className: `plc-flex plc-flex-col plc-items-center ${className}`
|
|
36375
36353
|
}, /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -36421,7 +36399,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
36421
36399
|
} = useContext(store$3);
|
|
36422
36400
|
const {
|
|
36423
36401
|
t
|
|
36424
|
-
} = useTranslation
|
|
36402
|
+
} = useTranslation("userEdit");
|
|
36425
36403
|
|
|
36426
36404
|
const browseFiles = () => {
|
|
36427
36405
|
const fileInput = document.getElementById("pelcro-profile-picture-selector");
|
|
@@ -36432,7 +36410,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
36432
36410
|
}
|
|
36433
36411
|
};
|
|
36434
36412
|
|
|
36435
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Button
|
|
36413
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
36436
36414
|
icon: /*#__PURE__*/React__default.createElement(SvgPhotograph, null),
|
|
36437
36415
|
disabled: isSubmitting,
|
|
36438
36416
|
onClick: browseFiles,
|
|
@@ -36463,8 +36441,8 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
36463
36441
|
} = useContext(store$3);
|
|
36464
36442
|
const {
|
|
36465
36443
|
t
|
|
36466
|
-
} = useTranslation
|
|
36467
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
36444
|
+
} = useTranslation("userEdit");
|
|
36445
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
36468
36446
|
icon: /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
36469
36447
|
className: "plc-h-6 plc-w-6"
|
|
36470
36448
|
}),
|
|
@@ -36486,7 +36464,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
36486
36464
|
} = useContext(store$3);
|
|
36487
36465
|
const {
|
|
36488
36466
|
t
|
|
36489
|
-
} = useTranslation
|
|
36467
|
+
} = useTranslation("userEdit");
|
|
36490
36468
|
const currentProfilePicture = window.Pelcro.user.read().profile_photo;
|
|
36491
36469
|
return imageSrc ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ProfilePicChangeCropper, null), /*#__PURE__*/React__default.createElement(ProfilePicChangeZoom, {
|
|
36492
36470
|
className: "plc-mt-4 plc-mb-4"
|
|
@@ -36532,12 +36510,12 @@ function ProfilePicChangeModal({
|
|
|
36532
36510
|
}) {
|
|
36533
36511
|
const {
|
|
36534
36512
|
t
|
|
36535
|
-
} = useTranslation
|
|
36513
|
+
} = useTranslation("userEdit");
|
|
36536
36514
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
36537
36515
|
id: "pelcro-profile-picture-modal",
|
|
36538
36516
|
onDisplay: onDisplay,
|
|
36539
36517
|
onClose: onClose
|
|
36540
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
36518
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
36541
36519
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
36542
36520
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
36543
36521
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -36567,7 +36545,7 @@ const EmailVerifyContainer = ({
|
|
|
36567
36545
|
}) => {
|
|
36568
36546
|
const {
|
|
36569
36547
|
t
|
|
36570
|
-
} = useTranslation
|
|
36548
|
+
} = useTranslation("verifyEmail");
|
|
36571
36549
|
|
|
36572
36550
|
const submit = () => {
|
|
36573
36551
|
window.Pelcro.user.resendEmailVerification((err, res) => {
|
|
@@ -36649,8 +36627,8 @@ const EmailVerifyResendButton = ({
|
|
|
36649
36627
|
} = useContext(store$2);
|
|
36650
36628
|
const {
|
|
36651
36629
|
t
|
|
36652
|
-
} = useTranslation
|
|
36653
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
36630
|
+
} = useTranslation("verifyEmail");
|
|
36631
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
36654
36632
|
onClick: () => {
|
|
36655
36633
|
dispatch({
|
|
36656
36634
|
type: HANDLE_SUBMIT
|
|
@@ -36666,7 +36644,7 @@ const EmailVerifyView = props => {
|
|
|
36666
36644
|
|
|
36667
36645
|
const {
|
|
36668
36646
|
t
|
|
36669
|
-
} = useTranslation
|
|
36647
|
+
} = useTranslation("verifyEmail");
|
|
36670
36648
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
36671
36649
|
id: "pelcro-email-verify-view"
|
|
36672
36650
|
}, /*#__PURE__*/React__default.createElement("form", {
|
|
@@ -36695,12 +36673,12 @@ const EmailVerifyModal = ({
|
|
|
36695
36673
|
}) => {
|
|
36696
36674
|
const {
|
|
36697
36675
|
t
|
|
36698
|
-
} = useTranslation
|
|
36676
|
+
} = useTranslation("verifyEmail");
|
|
36699
36677
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
36700
36678
|
onDisplay: onDisplay,
|
|
36701
36679
|
onClose: onClose,
|
|
36702
36680
|
id: "pelcro-email-verify-modal"
|
|
36703
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
36681
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
36704
36682
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
36705
36683
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
36706
36684
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -36836,7 +36814,7 @@ function VerifyLinkTokenModal({
|
|
|
36836
36814
|
}) {
|
|
36837
36815
|
const {
|
|
36838
36816
|
t
|
|
36839
|
-
} = useTranslation
|
|
36817
|
+
} = useTranslation("verifyLinkToken");
|
|
36840
36818
|
const {
|
|
36841
36819
|
resetView
|
|
36842
36820
|
} = usePelcro();
|
|
@@ -36853,7 +36831,7 @@ function VerifyLinkTokenModal({
|
|
|
36853
36831
|
id: "pelcro-login-modal",
|
|
36854
36832
|
onDisplay: onDisplay,
|
|
36855
36833
|
onClose: onClose
|
|
36856
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
36834
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
36857
36835
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
36858
36836
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
36859
36837
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -36891,7 +36869,7 @@ const InvoicePaymentModal = ({
|
|
|
36891
36869
|
} = usePelcro();
|
|
36892
36870
|
const {
|
|
36893
36871
|
t
|
|
36894
|
-
} = useTranslation
|
|
36872
|
+
} = useTranslation("payment");
|
|
36895
36873
|
|
|
36896
36874
|
const onSuccess = () => {
|
|
36897
36875
|
var _otherProps$onSuccess;
|
|
@@ -36904,7 +36882,7 @@ const InvoicePaymentModal = ({
|
|
|
36904
36882
|
id: "pelcro-invoice-payment-modal",
|
|
36905
36883
|
onDisplay: onDisplay,
|
|
36906
36884
|
onClose: onClose
|
|
36907
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
36885
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
36908
36886
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
36909
36887
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
36910
36888
|
className: "plc-text-2xl plc-font-semibold "
|
|
@@ -36969,7 +36947,7 @@ const InvoiceDetailsDownloadButton = ({
|
|
|
36969
36947
|
}) => {
|
|
36970
36948
|
const {
|
|
36971
36949
|
t
|
|
36972
|
-
} = useTranslation
|
|
36950
|
+
} = useTranslation("invoiceDetails");
|
|
36973
36951
|
const {
|
|
36974
36952
|
invoice
|
|
36975
36953
|
} = usePelcro();
|
|
@@ -36992,8 +36970,8 @@ const InvoiceDetailsPayButton = ({
|
|
|
36992
36970
|
} = useContext(store);
|
|
36993
36971
|
const {
|
|
36994
36972
|
t
|
|
36995
|
-
} = useTranslation
|
|
36996
|
-
return /*#__PURE__*/React__default.createElement(Button
|
|
36973
|
+
} = useTranslation("invoiceDetails");
|
|
36974
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
36997
36975
|
onClick: () => {
|
|
36998
36976
|
dispatch({
|
|
36999
36977
|
type: HANDLE_SUBMIT
|
|
@@ -37006,7 +36984,7 @@ const InvoiceDetailsPayButton = ({
|
|
|
37006
36984
|
const InvoiceDetailsView = props => {
|
|
37007
36985
|
const {
|
|
37008
36986
|
t
|
|
37009
|
-
} = useTranslation
|
|
36987
|
+
} = useTranslation("invoiceDetails");
|
|
37010
36988
|
const {
|
|
37011
36989
|
invoice
|
|
37012
36990
|
} = usePelcro();
|
|
@@ -37076,7 +37054,7 @@ const InvoiceDetailsModal = ({
|
|
|
37076
37054
|
} = usePelcro();
|
|
37077
37055
|
const {
|
|
37078
37056
|
t
|
|
37079
|
-
} = useTranslation
|
|
37057
|
+
} = useTranslation("invoiceDetails");
|
|
37080
37058
|
|
|
37081
37059
|
const onSuccess = () => {
|
|
37082
37060
|
var _otherProps$onSuccess;
|
|
@@ -37089,7 +37067,7 @@ const InvoiceDetailsModal = ({
|
|
|
37089
37067
|
onDisplay: onDisplay,
|
|
37090
37068
|
onClose: onClose,
|
|
37091
37069
|
id: "pelcro-invoice-details-modal"
|
|
37092
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
37070
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
37093
37071
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
37094
37072
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
37095
37073
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -37119,12 +37097,12 @@ const QrCodeModal = ({
|
|
|
37119
37097
|
}) => {
|
|
37120
37098
|
const {
|
|
37121
37099
|
t
|
|
37122
|
-
} = useTranslation
|
|
37100
|
+
} = useTranslation("qr");
|
|
37123
37101
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
37124
37102
|
id: "pelcro-qrcode-create-modal",
|
|
37125
37103
|
onDisplay: onDisplay,
|
|
37126
37104
|
onClose: onClose
|
|
37127
|
-
}, /*#__PURE__*/React__default.createElement(ModalHeader
|
|
37105
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
|
|
37128
37106
|
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
37129
37107
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
37130
37108
|
className: "plc-text-2xl plc-font-semibold"
|
|
@@ -37132,4 +37110,4 @@ const QrCodeModal = ({
|
|
|
37132
37110
|
};
|
|
37133
37111
|
QrCodeModal.viewId = "qrcode";
|
|
37134
37112
|
|
|
37135
|
-
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button
|
|
37113
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
|