@pelcro/react-pelcro-js 3.26.0-beta.27 → 3.26.0-beta.28
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 +1121 -503
- package/dist/index.esm.js +1115 -504
- package/dist/pelcro.css +22 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3356,7 +3356,15 @@ var select$6 = {
|
|
|
3356
3356
|
};
|
|
3357
3357
|
var paymentMethod_en = {
|
|
3358
3358
|
update: update$3,
|
|
3359
|
-
select: select$6
|
|
3359
|
+
select: select$6,
|
|
3360
|
+
"delete": {
|
|
3361
|
+
title: "Active subscriptions are linked to this payment method.",
|
|
3362
|
+
subtitle: "Please choose an existing card or add a new payment method.",
|
|
3363
|
+
options: {
|
|
3364
|
+
select: "Select an existing payment method",
|
|
3365
|
+
add: "Add a new payment method"
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3360
3368
|
};
|
|
3361
3369
|
|
|
3362
3370
|
var title$z = "Enter your email to subscribe to our newsletter";
|
|
@@ -3462,7 +3470,8 @@ var labels$15 = {
|
|
|
3462
3470
|
order: "Order",
|
|
3463
3471
|
amount: "Amount",
|
|
3464
3472
|
email: "Email",
|
|
3465
|
-
password: "Password"
|
|
3473
|
+
password: "Password",
|
|
3474
|
+
isDefault: "Set as default"
|
|
3466
3475
|
};
|
|
3467
3476
|
var checkoutForm_en = {
|
|
3468
3477
|
messages: messages$18,
|
|
@@ -3925,6 +3934,8 @@ var labels$Z = {
|
|
|
3925
3934
|
renewsOn: "Renews",
|
|
3926
3935
|
canceledOn: "Canceled on",
|
|
3927
3936
|
recipient: "Recipient",
|
|
3937
|
+
addPaymentSource: "Add payment method",
|
|
3938
|
+
setDefault: "Set as default",
|
|
3928
3939
|
addAddress: "Add address",
|
|
3929
3940
|
editAddress: "Edit address",
|
|
3930
3941
|
addSubscription: "New Subscription",
|
|
@@ -3986,6 +3997,13 @@ var messages$_ = {
|
|
|
3986
3997
|
loading: "Unsuspending your donation",
|
|
3987
3998
|
success: "Donation is successfully unsuspended",
|
|
3988
3999
|
error: "Error while unsuspending your donation"
|
|
4000
|
+
},
|
|
4001
|
+
paymentMethodDeletion: {
|
|
4002
|
+
isSureToDelete: "Are you sure you want to delete this payment method?",
|
|
4003
|
+
loading: "Deleting your payment method",
|
|
4004
|
+
success: "Payment method is successfully deleted",
|
|
4005
|
+
error: "Error while deleting your payment method",
|
|
4006
|
+
nonDeletable: "This payment method can't be deleted"
|
|
3989
4007
|
}
|
|
3990
4008
|
};
|
|
3991
4009
|
var dashboard_en = {
|
|
@@ -8982,7 +9000,7 @@ class PelcroActions {
|
|
|
8982
9000
|
view,
|
|
8983
9001
|
cartItems,
|
|
8984
9002
|
...otherStateFields
|
|
8985
|
-
} = initialState$
|
|
9003
|
+
} = initialState$o;
|
|
8986
9004
|
this.set(otherStateFields);
|
|
8987
9005
|
});
|
|
8988
9006
|
_defineProperty$3(this, "switchView", view => {
|
|
@@ -9287,6 +9305,38 @@ class PelcroActions {
|
|
|
9287
9305
|
}
|
|
9288
9306
|
switchToAddressView();
|
|
9289
9307
|
});
|
|
9308
|
+
_defineProperty$3(this, "setPaymentMethodToEdit", id => {
|
|
9309
|
+
window.Pelcro.paymentMethods.getPaymentMethod({
|
|
9310
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
9311
|
+
payment_method_id: id
|
|
9312
|
+
}, (err, res) => {
|
|
9313
|
+
if (err) {
|
|
9314
|
+
return console.error("invalid payment method id");
|
|
9315
|
+
}
|
|
9316
|
+
if (res) {
|
|
9317
|
+
const paymentMethodToEdit = res.data;
|
|
9318
|
+
this.set({
|
|
9319
|
+
paymentMethodToEdit
|
|
9320
|
+
});
|
|
9321
|
+
}
|
|
9322
|
+
});
|
|
9323
|
+
});
|
|
9324
|
+
_defineProperty$3(this, "setPaymentMethodToDelete", id => {
|
|
9325
|
+
window.Pelcro.paymentMethods.getPaymentMethod({
|
|
9326
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
9327
|
+
payment_method_id: id
|
|
9328
|
+
}, (err, res) => {
|
|
9329
|
+
if (err) {
|
|
9330
|
+
return console.error("invalid payment method id");
|
|
9331
|
+
}
|
|
9332
|
+
if (res) {
|
|
9333
|
+
const paymentMethodToDelete = res.data;
|
|
9334
|
+
this.set({
|
|
9335
|
+
paymentMethodToDelete
|
|
9336
|
+
});
|
|
9337
|
+
}
|
|
9338
|
+
});
|
|
9339
|
+
});
|
|
9290
9340
|
this.set = storeSetter;
|
|
9291
9341
|
this.get = storeGetter;
|
|
9292
9342
|
}
|
|
@@ -9331,7 +9381,7 @@ class PelcroCallbacks {
|
|
|
9331
9381
|
}
|
|
9332
9382
|
}
|
|
9333
9383
|
|
|
9334
|
-
const initialState$
|
|
9384
|
+
const initialState$o = {
|
|
9335
9385
|
// View
|
|
9336
9386
|
view: null,
|
|
9337
9387
|
// Plans
|
|
@@ -9369,7 +9419,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
9369
9419
|
return {
|
|
9370
9420
|
// Store setter
|
|
9371
9421
|
set,
|
|
9372
|
-
...initialState$
|
|
9422
|
+
...initialState$o,
|
|
9373
9423
|
// State actions
|
|
9374
9424
|
...actions,
|
|
9375
9425
|
// Callbacks
|
|
@@ -10323,8 +10373,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
10323
10373
|
|
|
10324
10374
|
let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i$1=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$1(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g;u.bind({g:1});let h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l;}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
|
|
10325
10375
|
|
|
10326
|
-
function _extends$
|
|
10327
|
-
_extends$
|
|
10376
|
+
function _extends$C() {
|
|
10377
|
+
_extends$C = Object.assign || function (target) {
|
|
10328
10378
|
for (var i = 1; i < arguments.length; i++) {
|
|
10329
10379
|
var source = arguments[i];
|
|
10330
10380
|
|
|
@@ -10338,7 +10388,7 @@ function _extends$B() {
|
|
|
10338
10388
|
return target;
|
|
10339
10389
|
};
|
|
10340
10390
|
|
|
10341
|
-
return _extends$
|
|
10391
|
+
return _extends$C.apply(this, arguments);
|
|
10342
10392
|
}
|
|
10343
10393
|
|
|
10344
10394
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -10428,7 +10478,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
10428
10478
|
var reducer = function reducer(state, action) {
|
|
10429
10479
|
switch (action.type) {
|
|
10430
10480
|
case ActionType.ADD_TOAST:
|
|
10431
|
-
return _extends$
|
|
10481
|
+
return _extends$C({}, state, {
|
|
10432
10482
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
10433
10483
|
});
|
|
10434
10484
|
|
|
@@ -10438,9 +10488,9 @@ var reducer = function reducer(state, action) {
|
|
|
10438
10488
|
clearFromRemoveQueue(action.toast.id);
|
|
10439
10489
|
}
|
|
10440
10490
|
|
|
10441
|
-
return _extends$
|
|
10491
|
+
return _extends$C({}, state, {
|
|
10442
10492
|
toasts: state.toasts.map(function (t) {
|
|
10443
|
-
return t.id === action.toast.id ? _extends$
|
|
10493
|
+
return t.id === action.toast.id ? _extends$C({}, t, action.toast) : t;
|
|
10444
10494
|
})
|
|
10445
10495
|
});
|
|
10446
10496
|
|
|
@@ -10467,9 +10517,9 @@ var reducer = function reducer(state, action) {
|
|
|
10467
10517
|
});
|
|
10468
10518
|
}
|
|
10469
10519
|
|
|
10470
|
-
return _extends$
|
|
10520
|
+
return _extends$C({}, state, {
|
|
10471
10521
|
toasts: state.toasts.map(function (t) {
|
|
10472
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
10522
|
+
return t.id === toastId || toastId === undefined ? _extends$C({}, t, {
|
|
10473
10523
|
visible: false
|
|
10474
10524
|
}) : t;
|
|
10475
10525
|
})
|
|
@@ -10477,28 +10527,28 @@ var reducer = function reducer(state, action) {
|
|
|
10477
10527
|
|
|
10478
10528
|
case ActionType.REMOVE_TOAST:
|
|
10479
10529
|
if (action.toastId === undefined) {
|
|
10480
|
-
return _extends$
|
|
10530
|
+
return _extends$C({}, state, {
|
|
10481
10531
|
toasts: []
|
|
10482
10532
|
});
|
|
10483
10533
|
}
|
|
10484
10534
|
|
|
10485
|
-
return _extends$
|
|
10535
|
+
return _extends$C({}, state, {
|
|
10486
10536
|
toasts: state.toasts.filter(function (t) {
|
|
10487
10537
|
return t.id !== action.toastId;
|
|
10488
10538
|
})
|
|
10489
10539
|
});
|
|
10490
10540
|
|
|
10491
10541
|
case ActionType.START_PAUSE:
|
|
10492
|
-
return _extends$
|
|
10542
|
+
return _extends$C({}, state, {
|
|
10493
10543
|
pausedAt: action.time
|
|
10494
10544
|
});
|
|
10495
10545
|
|
|
10496
10546
|
case ActionType.END_PAUSE:
|
|
10497
10547
|
var diff = action.time - (state.pausedAt || 0);
|
|
10498
|
-
return _extends$
|
|
10548
|
+
return _extends$C({}, state, {
|
|
10499
10549
|
pausedAt: undefined,
|
|
10500
10550
|
toasts: state.toasts.map(function (t) {
|
|
10501
|
-
return _extends$
|
|
10551
|
+
return _extends$C({}, t, {
|
|
10502
10552
|
pauseDuration: t.pauseDuration + diff
|
|
10503
10553
|
});
|
|
10504
10554
|
})
|
|
@@ -10545,12 +10595,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
10545
10595
|
var mergedToasts = state.toasts.map(function (t) {
|
|
10546
10596
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
10547
10597
|
|
|
10548
|
-
return _extends$
|
|
10598
|
+
return _extends$C({}, toastOptions, toastOptions[t.type], t, {
|
|
10549
10599
|
duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
|
|
10550
|
-
style: _extends$
|
|
10600
|
+
style: _extends$C({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
10551
10601
|
});
|
|
10552
10602
|
});
|
|
10553
|
-
return _extends$
|
|
10603
|
+
return _extends$C({}, state, {
|
|
10554
10604
|
toasts: mergedToasts
|
|
10555
10605
|
});
|
|
10556
10606
|
};
|
|
@@ -10560,7 +10610,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
10560
10610
|
type = 'blank';
|
|
10561
10611
|
}
|
|
10562
10612
|
|
|
10563
|
-
return _extends$
|
|
10613
|
+
return _extends$C({
|
|
10564
10614
|
createdAt: Date.now(),
|
|
10565
10615
|
visible: true,
|
|
10566
10616
|
type: type,
|
|
@@ -10610,14 +10660,14 @@ toast.remove = function (toastId) {
|
|
|
10610
10660
|
};
|
|
10611
10661
|
|
|
10612
10662
|
toast.promise = function (promise, msgs, opts) {
|
|
10613
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
10663
|
+
var id = toast.loading(msgs.loading, _extends$C({}, opts, opts == null ? void 0 : opts.loading));
|
|
10614
10664
|
promise.then(function (p) {
|
|
10615
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
10665
|
+
toast.success(resolveValue(msgs.success, p), _extends$C({
|
|
10616
10666
|
id: id
|
|
10617
10667
|
}, opts, opts == null ? void 0 : opts.success));
|
|
10618
10668
|
return p;
|
|
10619
10669
|
})["catch"](function (e) {
|
|
10620
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
10670
|
+
toast.error(resolveValue(msgs.error, e), _extends$C({
|
|
10621
10671
|
id: id
|
|
10622
10672
|
}, opts, opts == null ? void 0 : opts.error));
|
|
10623
10673
|
});
|
|
@@ -10956,7 +11006,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
10956
11006
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
10957
11007
|
return React.createElement(ToastBarBase, {
|
|
10958
11008
|
className: toast.className,
|
|
10959
|
-
style: _extends$
|
|
11009
|
+
style: _extends$C({}, animationStyle, style, toast.style)
|
|
10960
11010
|
}, typeof children === 'function' ? children({
|
|
10961
11011
|
icon: icon,
|
|
10962
11012
|
message: message
|
|
@@ -10986,7 +11036,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
10986
11036
|
} : position.includes('right') ? {
|
|
10987
11037
|
justifyContent: 'flex-end'
|
|
10988
11038
|
} : {};
|
|
10989
|
-
return _extends$
|
|
11039
|
+
return _extends$C({
|
|
10990
11040
|
left: 0,
|
|
10991
11041
|
right: 0,
|
|
10992
11042
|
display: 'flex',
|
|
@@ -11013,7 +11063,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
11013
11063
|
handlers = _useToaster.handlers;
|
|
11014
11064
|
|
|
11015
11065
|
return React.createElement("div", {
|
|
11016
|
-
style: _extends$
|
|
11066
|
+
style: _extends$C({
|
|
11017
11067
|
position: 'fixed',
|
|
11018
11068
|
zIndex: 9999,
|
|
11019
11069
|
top: DEFAULT_OFFSET,
|
|
@@ -11048,72 +11098,72 @@ var Toaster = function Toaster(_ref) {
|
|
|
11048
11098
|
}));
|
|
11049
11099
|
};
|
|
11050
11100
|
|
|
11051
|
-
var _path$
|
|
11052
|
-
function _extends$
|
|
11101
|
+
var _path$z;
|
|
11102
|
+
function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
|
|
11053
11103
|
function SvgCheckSolid(props) {
|
|
11054
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11104
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
11055
11105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11056
11106
|
className: "h-5 w-5",
|
|
11057
11107
|
viewBox: "0 0 20 20",
|
|
11058
11108
|
fill: "currentColor"
|
|
11059
|
-
}, props), _path$
|
|
11109
|
+
}, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11060
11110
|
fillRule: "evenodd",
|
|
11061
11111
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
11062
11112
|
clipRule: "evenodd"
|
|
11063
11113
|
})));
|
|
11064
11114
|
}
|
|
11065
11115
|
|
|
11066
|
-
var _path$
|
|
11067
|
-
function _extends$
|
|
11116
|
+
var _path$y;
|
|
11117
|
+
function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
|
|
11068
11118
|
function SvgXIcon(props) {
|
|
11069
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11119
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
11070
11120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11071
11121
|
viewBox: "0 0 20 20",
|
|
11072
11122
|
fill: "currentColor"
|
|
11073
|
-
}, props), _path$
|
|
11123
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11074
11124
|
fill: "evenodd",
|
|
11075
11125
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
11076
11126
|
clipRule: "evenodd"
|
|
11077
11127
|
})));
|
|
11078
11128
|
}
|
|
11079
11129
|
|
|
11080
|
-
var _path$
|
|
11081
|
-
function _extends$
|
|
11130
|
+
var _path$x;
|
|
11131
|
+
function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
|
|
11082
11132
|
function SvgXIconSolid(props) {
|
|
11083
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11133
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
11084
11134
|
className: "plc-w-4 plc-h-4",
|
|
11085
11135
|
fill: "currentColor",
|
|
11086
11136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11087
11137
|
viewBox: "0 0 100 100"
|
|
11088
|
-
}, props), _path$
|
|
11138
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11089
11139
|
d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
|
|
11090
11140
|
})));
|
|
11091
11141
|
}
|
|
11092
11142
|
|
|
11093
|
-
var _path$
|
|
11094
|
-
function _extends$
|
|
11143
|
+
var _path$w;
|
|
11144
|
+
function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
11095
11145
|
function SvgExclamation(props) {
|
|
11096
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11146
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
11097
11147
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
11098
11148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11099
11149
|
viewBox: "0 0 20 20",
|
|
11100
11150
|
fill: "currentColor"
|
|
11101
|
-
}, props), _path$
|
|
11151
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11102
11152
|
fillRule: "evenodd",
|
|
11103
11153
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
11104
11154
|
clipRule: "evenodd"
|
|
11105
11155
|
})));
|
|
11106
11156
|
}
|
|
11107
11157
|
|
|
11108
|
-
var _path$
|
|
11109
|
-
function _extends$
|
|
11158
|
+
var _path$v, _path2$4;
|
|
11159
|
+
function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
11110
11160
|
function SvgSpinner(props) {
|
|
11111
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11161
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
11112
11162
|
className: "plc-animate-spin",
|
|
11113
11163
|
viewBox: "0 0 24 24",
|
|
11114
11164
|
fill: "currentColor",
|
|
11115
11165
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11116
|
-
}, props), _path$
|
|
11166
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11117
11167
|
opacity: 0.2,
|
|
11118
11168
|
fill: "evenodd",
|
|
11119
11169
|
clipRule: "evenodd",
|
|
@@ -11804,6 +11854,17 @@ function getSiteCardProcessor() {
|
|
|
11804
11854
|
}
|
|
11805
11855
|
return "stripe";
|
|
11806
11856
|
}
|
|
11857
|
+
function getFourDigitYear(lastTwoDigits) {
|
|
11858
|
+
// Get the current year
|
|
11859
|
+
const currentYear = new Date().getFullYear();
|
|
11860
|
+
|
|
11861
|
+
// Extract the current century (first two digits)
|
|
11862
|
+
const currentCentury = Math.floor(currentYear / 100);
|
|
11863
|
+
|
|
11864
|
+
// Combine the century and the provided last two digits
|
|
11865
|
+
const fourDigitYear = currentCentury * 100 + lastTwoDigits;
|
|
11866
|
+
return fourDigitYear;
|
|
11867
|
+
}
|
|
11807
11868
|
|
|
11808
11869
|
/**
|
|
11809
11870
|
* @typedef {Object} OptionsType
|
|
@@ -12848,6 +12909,9 @@ const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
|
|
|
12848
12909
|
const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
|
|
12849
12910
|
const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
|
|
12850
12911
|
const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
|
|
12912
|
+
const SET_IS_DEFAULT_PAYMENT_METHOD = "SET_IS_DEFAULT_PAYMENT_METHOD";
|
|
12913
|
+
const SET_DELETE_PAYMENT_METHOD_OPTION = "SET_DELETE_PAYMENT_METHOD_OPTION";
|
|
12914
|
+
const SET_PAYMENT_METHODS = "SET_PAYMENT_METHODS";
|
|
12851
12915
|
const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
|
|
12852
12916
|
const SET_EMAILS = "SET_EMAILS";
|
|
12853
12917
|
const SET_EMAILS_ERROR = "SET_EMAILS_ERROR";
|
|
@@ -12859,7 +12923,7 @@ const UPDATE_MEMBERS = "UPDATE_MEMBERS";
|
|
|
12859
12923
|
const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
|
|
12860
12924
|
const UPDATE_CYBERSOURCE_SESSION_ID = "UPDATE_CYBERSOURCE_SESSION_ID";
|
|
12861
12925
|
|
|
12862
|
-
const initialState$
|
|
12926
|
+
const initialState$n = {
|
|
12863
12927
|
email: "",
|
|
12864
12928
|
username: "",
|
|
12865
12929
|
password: "",
|
|
@@ -12872,10 +12936,10 @@ const initialState$m = {
|
|
|
12872
12936
|
content: ""
|
|
12873
12937
|
}
|
|
12874
12938
|
};
|
|
12875
|
-
const store$
|
|
12939
|
+
const store$n = /*#__PURE__*/React.createContext(initialState$n);
|
|
12876
12940
|
const {
|
|
12877
|
-
Provider: Provider$
|
|
12878
|
-
} = store$
|
|
12941
|
+
Provider: Provider$n
|
|
12942
|
+
} = store$n;
|
|
12879
12943
|
const LoginContainer = _ref => {
|
|
12880
12944
|
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
12881
12945
|
let {
|
|
@@ -13012,7 +13076,7 @@ const LoginContainer = _ref => {
|
|
|
13012
13076
|
alert: action.payload
|
|
13013
13077
|
});
|
|
13014
13078
|
case RESET_LOGIN_FORM:
|
|
13015
|
-
return initialState$
|
|
13079
|
+
return initialState$n;
|
|
13016
13080
|
case DISABLE_LOGIN_BUTTON:
|
|
13017
13081
|
return lib_7({
|
|
13018
13082
|
...state,
|
|
@@ -13028,13 +13092,13 @@ const LoginContainer = _ref => {
|
|
|
13028
13092
|
default:
|
|
13029
13093
|
return state;
|
|
13030
13094
|
}
|
|
13031
|
-
}, initialState$
|
|
13095
|
+
}, initialState$n);
|
|
13032
13096
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13033
13097
|
style: {
|
|
13034
13098
|
...style
|
|
13035
13099
|
},
|
|
13036
13100
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
13037
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
13101
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$n, {
|
|
13038
13102
|
value: {
|
|
13039
13103
|
state,
|
|
13040
13104
|
dispatch
|
|
@@ -13042,12 +13106,12 @@ const LoginContainer = _ref => {
|
|
|
13042
13106
|
}, children.length ? children.map((child, i) => {
|
|
13043
13107
|
if (child) {
|
|
13044
13108
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13045
|
-
store: store$
|
|
13109
|
+
store: store$n,
|
|
13046
13110
|
key: i
|
|
13047
13111
|
});
|
|
13048
13112
|
}
|
|
13049
13113
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13050
|
-
store: store$
|
|
13114
|
+
store: store$n
|
|
13051
13115
|
})));
|
|
13052
13116
|
};
|
|
13053
13117
|
|
|
@@ -13356,7 +13420,7 @@ const LoginButton = _ref => {
|
|
|
13356
13420
|
buttonDisabled
|
|
13357
13421
|
},
|
|
13358
13422
|
dispatch
|
|
13359
|
-
} = React.useContext(store$
|
|
13423
|
+
} = React.useContext(store$n);
|
|
13360
13424
|
const {
|
|
13361
13425
|
t
|
|
13362
13426
|
} = useTranslation("login");
|
|
@@ -13376,14 +13440,14 @@ const LoginButton = _ref => {
|
|
|
13376
13440
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.login"));
|
|
13377
13441
|
};
|
|
13378
13442
|
|
|
13379
|
-
var _path$
|
|
13380
|
-
function _extends$
|
|
13443
|
+
var _path$u, _path2$3;
|
|
13444
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
13381
13445
|
function SvgEmailVerify(props) {
|
|
13382
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13446
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
13383
13447
|
className: "plc-w-6 plc-h-6",
|
|
13384
13448
|
viewBox: "0 0 700 700",
|
|
13385
13449
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13386
|
-
}, props), _path$
|
|
13450
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13387
13451
|
d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
|
|
13388
13452
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13389
13453
|
d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
|
|
@@ -13413,25 +13477,25 @@ const LoginRequestLoginToken = _ref => {
|
|
|
13413
13477
|
};
|
|
13414
13478
|
|
|
13415
13479
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
13416
|
-
store: store$
|
|
13480
|
+
store: store$n
|
|
13417
13481
|
}, props));
|
|
13418
13482
|
|
|
13419
13483
|
const LoginUsername = props => /*#__PURE__*/React__default['default'].createElement(UserNameInput, Object.assign({
|
|
13420
|
-
store: store$
|
|
13484
|
+
store: store$n
|
|
13421
13485
|
}, props));
|
|
13422
13486
|
|
|
13423
13487
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
13424
|
-
store: store$
|
|
13488
|
+
store: store$n
|
|
13425
13489
|
}, props));
|
|
13426
13490
|
|
|
13427
|
-
var _path$
|
|
13428
|
-
function _extends$
|
|
13491
|
+
var _path$t;
|
|
13492
|
+
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
13429
13493
|
function SvgCheck(props) {
|
|
13430
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13494
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
13431
13495
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13432
13496
|
fill: "currentColor",
|
|
13433
13497
|
viewBox: "0 0 20 20"
|
|
13434
|
-
}, props), _path$
|
|
13498
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13435
13499
|
fillRule: "evenodd",
|
|
13436
13500
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
13437
13501
|
clipRule: "evenodd"
|
|
@@ -13497,7 +13561,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
13497
13561
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
13498
13562
|
facebookLoginRenderProps.FacebookLogin;
|
|
13499
13563
|
|
|
13500
|
-
const initialState$
|
|
13564
|
+
const initialState$m = {
|
|
13501
13565
|
email: "",
|
|
13502
13566
|
password: "",
|
|
13503
13567
|
firstName: "",
|
|
@@ -13518,10 +13582,10 @@ const initialState$l = {
|
|
|
13518
13582
|
content: ""
|
|
13519
13583
|
}
|
|
13520
13584
|
};
|
|
13521
|
-
const store$
|
|
13585
|
+
const store$m = /*#__PURE__*/React.createContext(initialState$m);
|
|
13522
13586
|
const {
|
|
13523
|
-
Provider: Provider$
|
|
13524
|
-
} = store$
|
|
13587
|
+
Provider: Provider$m
|
|
13588
|
+
} = store$m;
|
|
13525
13589
|
const RegisterContainer = _ref => {
|
|
13526
13590
|
let {
|
|
13527
13591
|
style,
|
|
@@ -13733,7 +13797,7 @@ const RegisterContainer = _ref => {
|
|
|
13733
13797
|
alert: action.payload
|
|
13734
13798
|
});
|
|
13735
13799
|
case RESET_LOGIN_FORM:
|
|
13736
|
-
return initialState$
|
|
13800
|
+
return initialState$m;
|
|
13737
13801
|
case DISABLE_REGISTRATION_BUTTON:
|
|
13738
13802
|
return lib_7({
|
|
13739
13803
|
...state,
|
|
@@ -13749,13 +13813,13 @@ const RegisterContainer = _ref => {
|
|
|
13749
13813
|
default:
|
|
13750
13814
|
return state;
|
|
13751
13815
|
}
|
|
13752
|
-
}, initialState$
|
|
13816
|
+
}, initialState$m);
|
|
13753
13817
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13754
13818
|
style: {
|
|
13755
13819
|
...style
|
|
13756
13820
|
},
|
|
13757
13821
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
13758
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
13822
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
|
|
13759
13823
|
value: {
|
|
13760
13824
|
state,
|
|
13761
13825
|
dispatch
|
|
@@ -13763,12 +13827,12 @@ const RegisterContainer = _ref => {
|
|
|
13763
13827
|
}, children.length ? children.map((child, i) => {
|
|
13764
13828
|
if (child) {
|
|
13765
13829
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13766
|
-
store: store$
|
|
13830
|
+
store: store$m,
|
|
13767
13831
|
key: i
|
|
13768
13832
|
});
|
|
13769
13833
|
}
|
|
13770
13834
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13771
|
-
store: store$
|
|
13835
|
+
store: store$m
|
|
13772
13836
|
})));
|
|
13773
13837
|
};
|
|
13774
13838
|
|
|
@@ -13782,13 +13846,13 @@ function hasSecurityTokenEnabled$1() {
|
|
|
13782
13846
|
return hasSecuritySdkLoaded;
|
|
13783
13847
|
}
|
|
13784
13848
|
|
|
13785
|
-
var _path$
|
|
13786
|
-
function _extends$
|
|
13849
|
+
var _path$s;
|
|
13850
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
13787
13851
|
function SvgFacebookLogo(props) {
|
|
13788
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13852
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
13789
13853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13790
13854
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
13791
|
-
}, props), _path$
|
|
13855
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13792
13856
|
d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
|
|
13793
13857
|
fill: "#3c5a9a"
|
|
13794
13858
|
})));
|
|
@@ -13805,10 +13869,10 @@ const FacebookLoginButton = _ref => {
|
|
|
13805
13869
|
const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
|
|
13806
13870
|
const {
|
|
13807
13871
|
dispatch: loginDispatch
|
|
13808
|
-
} = React.useContext(store$
|
|
13872
|
+
} = React.useContext(store$n);
|
|
13809
13873
|
const {
|
|
13810
13874
|
dispatch: registerDispatch
|
|
13811
|
-
} = React.useContext(store$
|
|
13875
|
+
} = React.useContext(store$m);
|
|
13812
13876
|
const onSuccess = facebookUser => {
|
|
13813
13877
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
13814
13878
|
type: HANDLE_SOCIAL_LOGIN,
|
|
@@ -13858,13 +13922,13 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
13858
13922
|
unwrapExports(googleLogin);
|
|
13859
13923
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
13860
13924
|
|
|
13861
|
-
var _path$
|
|
13862
|
-
function _extends$
|
|
13925
|
+
var _path$r, _path2$2, _path3$1, _path4;
|
|
13926
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
13863
13927
|
function SvgGoogleLogo(props) {
|
|
13864
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13928
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
13865
13929
|
viewBox: "0 0 24 24",
|
|
13866
13930
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13867
|
-
}, props), _path$
|
|
13931
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13868
13932
|
fill: "#4285F4",
|
|
13869
13933
|
d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
|
|
13870
13934
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -13968,10 +14032,10 @@ const GoogleLoginButton = _ref => {
|
|
|
13968
14032
|
const googleClientId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
|
|
13969
14033
|
const {
|
|
13970
14034
|
dispatch: loginDispatch
|
|
13971
|
-
} = React.useContext(store$
|
|
14035
|
+
} = React.useContext(store$n);
|
|
13972
14036
|
const {
|
|
13973
14037
|
dispatch: registerDispatch
|
|
13974
|
-
} = React.useContext(store$
|
|
14038
|
+
} = React.useContext(store$m);
|
|
13975
14039
|
React.useEffect(() => {
|
|
13976
14040
|
gapi.load("client:auth2", () => {
|
|
13977
14041
|
gapi.auth2.init({
|
|
@@ -14022,13 +14086,13 @@ const GoogleLoginButton = _ref => {
|
|
|
14022
14086
|
}) : null;
|
|
14023
14087
|
};
|
|
14024
14088
|
|
|
14025
|
-
var _path$
|
|
14026
|
-
function _extends$
|
|
14089
|
+
var _path$q;
|
|
14090
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
14027
14091
|
function SvgAuth0Logo(props) {
|
|
14028
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14092
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
14029
14093
|
viewBox: "0 0 256 285",
|
|
14030
14094
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14031
|
-
}, props), _path$
|
|
14095
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14032
14096
|
d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
|
|
14033
14097
|
})));
|
|
14034
14098
|
}
|
|
@@ -14066,10 +14130,10 @@ const Auth0LoginButton = _ref => {
|
|
|
14066
14130
|
}, [auth0Enabled, auth0Loaded]);
|
|
14067
14131
|
const {
|
|
14068
14132
|
dispatch: loginDispatch
|
|
14069
|
-
} = React.useContext(store$
|
|
14133
|
+
} = React.useContext(store$n);
|
|
14070
14134
|
const {
|
|
14071
14135
|
dispatch: registerDispatch
|
|
14072
|
-
} = React.useContext(store$
|
|
14136
|
+
} = React.useContext(store$m);
|
|
14073
14137
|
function handleClick() {
|
|
14074
14138
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
14075
14139
|
if (!auth0Loaded) {
|
|
@@ -14212,13 +14276,13 @@ function LoginView(props) {
|
|
|
14212
14276
|
}))));
|
|
14213
14277
|
}
|
|
14214
14278
|
|
|
14215
|
-
var _path$
|
|
14216
|
-
function _extends$
|
|
14279
|
+
var _path$p, _path2$1, _path3;
|
|
14280
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
14217
14281
|
function SvgPelcroAuthorship(props) {
|
|
14218
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14282
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
14219
14283
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14220
14284
|
viewBox: "0 -80.652 497.072 179.991"
|
|
14221
|
-
}, props), _path$
|
|
14285
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14222
14286
|
fill: "none",
|
|
14223
14287
|
stroke: "#4a4a4a",
|
|
14224
14288
|
d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
|
|
@@ -14390,11 +14454,11 @@ function LoginModal(_ref) {
|
|
|
14390
14454
|
LoginModal.viewId = "login";
|
|
14391
14455
|
|
|
14392
14456
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
14393
|
-
store: store$
|
|
14457
|
+
store: store$m
|
|
14394
14458
|
}, props));
|
|
14395
14459
|
|
|
14396
14460
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
14397
|
-
store: store$
|
|
14461
|
+
store: store$m
|
|
14398
14462
|
}, props));
|
|
14399
14463
|
|
|
14400
14464
|
const RegisterButton = _ref => {
|
|
@@ -14414,7 +14478,7 @@ const RegisterButton = _ref => {
|
|
|
14414
14478
|
buttonDisabled
|
|
14415
14479
|
},
|
|
14416
14480
|
dispatch
|
|
14417
|
-
} = React.useContext(store$
|
|
14481
|
+
} = React.useContext(store$m);
|
|
14418
14482
|
const {
|
|
14419
14483
|
t
|
|
14420
14484
|
} = useTranslation("register");
|
|
@@ -14512,7 +14576,7 @@ function FirstName(_ref) {
|
|
|
14512
14576
|
}
|
|
14513
14577
|
|
|
14514
14578
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
14515
|
-
store: store$
|
|
14579
|
+
store: store$m
|
|
14516
14580
|
}, props));
|
|
14517
14581
|
|
|
14518
14582
|
function LastName(_ref) {
|
|
@@ -14590,7 +14654,7 @@ function LastName(_ref) {
|
|
|
14590
14654
|
}
|
|
14591
14655
|
|
|
14592
14656
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
14593
|
-
store: store$
|
|
14657
|
+
store: store$m
|
|
14594
14658
|
}, props));
|
|
14595
14659
|
|
|
14596
14660
|
function Phone(_ref) {
|
|
@@ -14871,7 +14935,7 @@ function TextInput(_ref) {
|
|
|
14871
14935
|
|
|
14872
14936
|
const RegisterTextInput = props => {
|
|
14873
14937
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
14874
|
-
store: store$
|
|
14938
|
+
store: store$m
|
|
14875
14939
|
}));
|
|
14876
14940
|
};
|
|
14877
14941
|
|
|
@@ -18047,7 +18111,7 @@ class CybersourceGateway {
|
|
|
18047
18111
|
*/
|
|
18048
18112
|
|
|
18049
18113
|
/** @type {PaymentStateType} */
|
|
18050
|
-
const initialState$
|
|
18114
|
+
const initialState$l = {
|
|
18051
18115
|
disableSubmit: false,
|
|
18052
18116
|
isLoading: false,
|
|
18053
18117
|
disableCouponButton: false,
|
|
@@ -18074,15 +18138,16 @@ const initialState$k = {
|
|
|
18074
18138
|
year: "",
|
|
18075
18139
|
passwordError: null,
|
|
18076
18140
|
cyberSourceSessionId: null,
|
|
18141
|
+
isDefault: false,
|
|
18077
18142
|
alert: {
|
|
18078
18143
|
type: "error",
|
|
18079
18144
|
content: ""
|
|
18080
18145
|
}
|
|
18081
18146
|
};
|
|
18082
|
-
const store$
|
|
18147
|
+
const store$l = /*#__PURE__*/React.createContext(initialState$l);
|
|
18083
18148
|
const {
|
|
18084
|
-
Provider: Provider$
|
|
18085
|
-
} = store$
|
|
18149
|
+
Provider: Provider$l
|
|
18150
|
+
} = store$l;
|
|
18086
18151
|
const PaymentMethodContainerWithoutStripe = _ref => {
|
|
18087
18152
|
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isGift, _props$isRenewingGift, _props$invoice, _window$Pelcro, _window$Pelcro$uiSett;
|
|
18088
18153
|
let {
|
|
@@ -18110,7 +18175,9 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18110
18175
|
selectedDonationAmount,
|
|
18111
18176
|
customDonationAmount,
|
|
18112
18177
|
isAuthenticated,
|
|
18113
|
-
switchView
|
|
18178
|
+
switchView,
|
|
18179
|
+
paymentMethodToEdit,
|
|
18180
|
+
paymentMethodToDelete
|
|
18114
18181
|
} = usePelcro();
|
|
18115
18182
|
const {
|
|
18116
18183
|
whenUserReady
|
|
@@ -18767,13 +18834,122 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18767
18834
|
} else if (type === "invoicePayment") {
|
|
18768
18835
|
payInvoice(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18769
18836
|
} else if (type === "updatePaymentSource") {
|
|
18770
|
-
|
|
18837
|
+
if (paymentMethodToEdit) {
|
|
18838
|
+
updateVantivCard();
|
|
18839
|
+
} else {
|
|
18840
|
+
createNewVantivCard();
|
|
18841
|
+
}
|
|
18842
|
+
} else if (type === "deletePaymentSource") {
|
|
18843
|
+
replaceVantivCard();
|
|
18771
18844
|
}
|
|
18772
18845
|
function createNewVantivCard() {
|
|
18773
|
-
window.Pelcro.
|
|
18846
|
+
window.Pelcro.paymentMethods.create({
|
|
18847
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18848
|
+
token: paymentRequest,
|
|
18849
|
+
gateway: "vantiv"
|
|
18850
|
+
}, (err, res) => {
|
|
18851
|
+
dispatch({
|
|
18852
|
+
type: DISABLE_SUBMIT,
|
|
18853
|
+
payload: false
|
|
18854
|
+
});
|
|
18855
|
+
dispatch({
|
|
18856
|
+
type: LOADING,
|
|
18857
|
+
payload: false
|
|
18858
|
+
});
|
|
18859
|
+
if (err) {
|
|
18860
|
+
onFailure(err);
|
|
18861
|
+
return dispatch({
|
|
18862
|
+
type: SHOW_ALERT,
|
|
18863
|
+
payload: {
|
|
18864
|
+
type: "error",
|
|
18865
|
+
content: getErrorMessages(err)
|
|
18866
|
+
}
|
|
18867
|
+
});
|
|
18868
|
+
}
|
|
18869
|
+
dispatch({
|
|
18870
|
+
type: SHOW_ALERT,
|
|
18871
|
+
payload: {
|
|
18872
|
+
type: "success",
|
|
18873
|
+
content: t("messages.sourceUpdated")
|
|
18874
|
+
}
|
|
18875
|
+
});
|
|
18876
|
+
onSuccess(res);
|
|
18877
|
+
});
|
|
18878
|
+
}
|
|
18879
|
+
function replaceVantivCard() {
|
|
18880
|
+
const {
|
|
18881
|
+
id: paymentMethodId
|
|
18882
|
+
} = paymentMethodToDelete;
|
|
18883
|
+
window.Pelcro.paymentMethods.create({
|
|
18774
18884
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
18775
18885
|
token: paymentRequest,
|
|
18776
18886
|
gateway: "vantiv"
|
|
18887
|
+
}, (err, res) => {
|
|
18888
|
+
dispatch({
|
|
18889
|
+
type: DISABLE_SUBMIT,
|
|
18890
|
+
payload: false
|
|
18891
|
+
});
|
|
18892
|
+
dispatch({
|
|
18893
|
+
type: LOADING,
|
|
18894
|
+
payload: false
|
|
18895
|
+
});
|
|
18896
|
+
if (err) {
|
|
18897
|
+
onFailure(err);
|
|
18898
|
+
return dispatch({
|
|
18899
|
+
type: SHOW_ALERT,
|
|
18900
|
+
payload: {
|
|
18901
|
+
type: "error",
|
|
18902
|
+
content: getErrorMessages(err)
|
|
18903
|
+
}
|
|
18904
|
+
});
|
|
18905
|
+
}
|
|
18906
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
18907
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18908
|
+
payment_method_id: paymentMethodId
|
|
18909
|
+
}, (err, res) => {
|
|
18910
|
+
if (err) {
|
|
18911
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
18912
|
+
}
|
|
18913
|
+
dispatch({
|
|
18914
|
+
type: SHOW_ALERT,
|
|
18915
|
+
payload: {
|
|
18916
|
+
type: "success",
|
|
18917
|
+
content: t("messages.sourceUpdated")
|
|
18918
|
+
}
|
|
18919
|
+
});
|
|
18920
|
+
onSuccess(res);
|
|
18921
|
+
});
|
|
18922
|
+
});
|
|
18923
|
+
}
|
|
18924
|
+
function updateVantivCard() {
|
|
18925
|
+
const {
|
|
18926
|
+
id: paymentMethodId
|
|
18927
|
+
} = paymentMethodToEdit;
|
|
18928
|
+
const {
|
|
18929
|
+
paypageRegistrationId,
|
|
18930
|
+
bin,
|
|
18931
|
+
type,
|
|
18932
|
+
firstSix,
|
|
18933
|
+
lastFour,
|
|
18934
|
+
expMonth,
|
|
18935
|
+
expYear
|
|
18936
|
+
} = paymentRequest;
|
|
18937
|
+
const {
|
|
18938
|
+
isDefault
|
|
18939
|
+
} = state;
|
|
18940
|
+
const fourDigitExpYear = getFourDigitYear(Number(expYear)).toString();
|
|
18941
|
+
window.Pelcro.paymentMethods.update({
|
|
18942
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18943
|
+
payment_method_id: paymentMethodId,
|
|
18944
|
+
gateway: "vantiv",
|
|
18945
|
+
paypageRegistrationId: paypageRegistrationId,
|
|
18946
|
+
bin: bin,
|
|
18947
|
+
type: type,
|
|
18948
|
+
firstSix: firstSix,
|
|
18949
|
+
lastFour: lastFour,
|
|
18950
|
+
exp_month: expMonth,
|
|
18951
|
+
exp_year: fourDigitExpYear,
|
|
18952
|
+
is_default: isDefault
|
|
18777
18953
|
}, (err, res) => {
|
|
18778
18954
|
dispatch({
|
|
18779
18955
|
type: DISABLE_SUBMIT,
|
|
@@ -19652,7 +19828,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19652
19828
|
}
|
|
19653
19829
|
});
|
|
19654
19830
|
}
|
|
19655
|
-
window.Pelcro.
|
|
19831
|
+
window.Pelcro.paymentMethods.create({
|
|
19656
19832
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
19657
19833
|
token: source.id
|
|
19658
19834
|
}, (err, res) => {
|
|
@@ -20180,16 +20356,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20180
20356
|
...state,
|
|
20181
20357
|
cyberSourceSessionId: action.payload
|
|
20182
20358
|
});
|
|
20359
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
20360
|
+
return lib_7({
|
|
20361
|
+
...state,
|
|
20362
|
+
...action.payload
|
|
20363
|
+
});
|
|
20364
|
+
case SET_IS_DEFAULT_PAYMENT_METHOD:
|
|
20365
|
+
return lib_7({
|
|
20366
|
+
...state,
|
|
20367
|
+
...action.payload
|
|
20368
|
+
});
|
|
20183
20369
|
default:
|
|
20184
20370
|
return state;
|
|
20185
20371
|
}
|
|
20186
|
-
}, initialState$
|
|
20372
|
+
}, initialState$l);
|
|
20187
20373
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20188
20374
|
style: {
|
|
20189
20375
|
...style
|
|
20190
20376
|
},
|
|
20191
20377
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
20192
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20378
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
|
|
20193
20379
|
value: {
|
|
20194
20380
|
state,
|
|
20195
20381
|
dispatch
|
|
@@ -20197,12 +20383,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20197
20383
|
}, children.length ? children.map((child, i) => {
|
|
20198
20384
|
if (child) {
|
|
20199
20385
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
20200
|
-
store: store$
|
|
20386
|
+
store: store$l,
|
|
20201
20387
|
key: i
|
|
20202
20388
|
});
|
|
20203
20389
|
}
|
|
20204
20390
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
20205
|
-
store: store$
|
|
20391
|
+
store: store$l
|
|
20206
20392
|
})));
|
|
20207
20393
|
};
|
|
20208
20394
|
const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
|
|
@@ -20223,11 +20409,11 @@ const PaymentMethodContainer = props => {
|
|
|
20223
20409
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
20224
20410
|
locale: getPageOrDefaultLanguage()
|
|
20225
20411
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
20226
|
-
store: store$
|
|
20412
|
+
store: store$l
|
|
20227
20413
|
}, props))));
|
|
20228
20414
|
} else if (cardProcessor !== "stripe") {
|
|
20229
20415
|
return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainerWithoutStripe, Object.assign({
|
|
20230
|
-
store: store$
|
|
20416
|
+
store: store$l
|
|
20231
20417
|
}, props));
|
|
20232
20418
|
}
|
|
20233
20419
|
return null;
|
|
@@ -20387,7 +20573,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
20387
20573
|
currentPlan,
|
|
20388
20574
|
updatedPrice
|
|
20389
20575
|
}
|
|
20390
|
-
} = React.useContext(store$
|
|
20576
|
+
} = React.useContext(store$l);
|
|
20391
20577
|
const updatePaymentRequest = () => {
|
|
20392
20578
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
20393
20579
|
paymentRequest === null || paymentRequest === void 0 ? void 0 : paymentRequest.update({
|
|
@@ -20439,12 +20625,12 @@ const CheckoutForm = () => {
|
|
|
20439
20625
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20440
20626
|
className: "plc-w-6/12 plc-pr-4"
|
|
20441
20627
|
}, /*#__PURE__*/React__default['default'].createElement(MonthSelect, {
|
|
20442
|
-
store: store$
|
|
20628
|
+
store: store$l,
|
|
20443
20629
|
placeholder: "Exp Month *"
|
|
20444
20630
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20445
20631
|
className: "plc-w-6/12"
|
|
20446
20632
|
}, /*#__PURE__*/React__default['default'].createElement(YearSelect, {
|
|
20447
|
-
store: store$
|
|
20633
|
+
store: store$l,
|
|
20448
20634
|
placeholder: "Exp Year *"
|
|
20449
20635
|
}))));
|
|
20450
20636
|
}
|
|
@@ -20478,7 +20664,7 @@ const DiscountedPrice = props => {
|
|
|
20478
20664
|
taxAmount,
|
|
20479
20665
|
percentOff
|
|
20480
20666
|
}
|
|
20481
|
-
} = React.useContext(store$
|
|
20667
|
+
} = React.useContext(store$l);
|
|
20482
20668
|
const {
|
|
20483
20669
|
order,
|
|
20484
20670
|
plan
|
|
@@ -20539,7 +20725,7 @@ const SubmitPaymentMethod = _ref => {
|
|
|
20539
20725
|
month,
|
|
20540
20726
|
year
|
|
20541
20727
|
}
|
|
20542
|
-
} = React.useContext(store$
|
|
20728
|
+
} = React.useContext(store$l);
|
|
20543
20729
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
20544
20730
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
20545
20731
|
const priceFormatted = (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -20573,15 +20759,15 @@ const SubmitPaymentMethod = _ref => {
|
|
|
20573
20759
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
20574
20760
|
};
|
|
20575
20761
|
|
|
20576
|
-
var _path$
|
|
20577
|
-
function _extends$
|
|
20762
|
+
var _path$o;
|
|
20763
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
20578
20764
|
function SvgArrowLeft(props) {
|
|
20579
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
20765
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
20580
20766
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20581
20767
|
fill: "none",
|
|
20582
20768
|
viewBox: "0 0 24 24",
|
|
20583
20769
|
stroke: "currentColor"
|
|
20584
|
-
}, props), _path$
|
|
20770
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20585
20771
|
strokeLinecap: "round",
|
|
20586
20772
|
strokeLinejoin: "round",
|
|
20587
20773
|
strokeWidth: 2,
|
|
@@ -20601,7 +20787,7 @@ const ApplyCouponButton = _ref => {
|
|
|
20601
20787
|
disableCouponButton
|
|
20602
20788
|
},
|
|
20603
20789
|
dispatch
|
|
20604
|
-
} = React.useContext(store$
|
|
20790
|
+
} = React.useContext(store$l);
|
|
20605
20791
|
const {
|
|
20606
20792
|
t
|
|
20607
20793
|
} = useTranslation("checkoutForm");
|
|
@@ -20633,7 +20819,7 @@ const CouponCodeField = props => {
|
|
|
20633
20819
|
couponCode,
|
|
20634
20820
|
couponError
|
|
20635
20821
|
}
|
|
20636
|
-
} = React.useContext(store$
|
|
20822
|
+
} = React.useContext(store$l);
|
|
20637
20823
|
const onCouponCodeChange = e => {
|
|
20638
20824
|
dispatch({
|
|
20639
20825
|
type: UPDATE_COUPON_CODE,
|
|
@@ -20659,15 +20845,15 @@ const CouponCodeField = props => {
|
|
|
20659
20845
|
}, props));
|
|
20660
20846
|
};
|
|
20661
20847
|
|
|
20662
|
-
var _path$
|
|
20663
|
-
function _extends$
|
|
20848
|
+
var _path$n;
|
|
20849
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
20664
20850
|
function SvgTicket(props) {
|
|
20665
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
20851
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
20666
20852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20667
20853
|
fill: "none",
|
|
20668
20854
|
viewBox: "0 0 24 24",
|
|
20669
20855
|
stroke: "currentColor"
|
|
20670
|
-
}, props), _path$
|
|
20856
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20671
20857
|
strokeLinecap: "round",
|
|
20672
20858
|
strokeLinejoin: "round",
|
|
20673
20859
|
strokeWidth: 2,
|
|
@@ -20685,7 +20871,7 @@ const CouponCode = _ref => {
|
|
|
20685
20871
|
state: {
|
|
20686
20872
|
enableCouponField
|
|
20687
20873
|
}
|
|
20688
|
-
} = React.useContext(store$
|
|
20874
|
+
} = React.useContext(store$l);
|
|
20689
20875
|
const {
|
|
20690
20876
|
t
|
|
20691
20877
|
} = useTranslation("checkoutForm");
|
|
@@ -20909,7 +21095,7 @@ const PaypalSubscribeButton = props => {
|
|
|
20909
21095
|
const {
|
|
20910
21096
|
dispatch,
|
|
20911
21097
|
state
|
|
20912
|
-
} = React.useContext(store$
|
|
21098
|
+
} = React.useContext(store$l);
|
|
20913
21099
|
const {
|
|
20914
21100
|
product,
|
|
20915
21101
|
plan,
|
|
@@ -21025,14 +21211,14 @@ const BankAuthenticationSuccess = () => {
|
|
|
21025
21211
|
}));
|
|
21026
21212
|
};
|
|
21027
21213
|
|
|
21028
|
-
var _path$
|
|
21029
|
-
function _extends$
|
|
21214
|
+
var _path$m;
|
|
21215
|
+
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
21030
21216
|
function SvgLock(props) {
|
|
21031
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21217
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
21032
21218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21033
21219
|
viewBox: "0 0 20 20",
|
|
21034
21220
|
fill: "currentColor"
|
|
21035
|
-
}, props), _path$
|
|
21221
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21036
21222
|
fillRule: "evenodd",
|
|
21037
21223
|
d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
|
|
21038
21224
|
clipRule: "evenodd"
|
|
@@ -21048,7 +21234,7 @@ const SelectedPaymentMethod = () => {
|
|
|
21048
21234
|
state: {
|
|
21049
21235
|
isLoading
|
|
21050
21236
|
}
|
|
21051
|
-
} = React.useContext(store$
|
|
21237
|
+
} = React.useContext(store$l);
|
|
21052
21238
|
const {
|
|
21053
21239
|
switchView,
|
|
21054
21240
|
selectedPaymentMethodId
|
|
@@ -21089,7 +21275,7 @@ const TaxAmount = () => {
|
|
|
21089
21275
|
state: {
|
|
21090
21276
|
taxAmount
|
|
21091
21277
|
}
|
|
21092
|
-
} = React.useContext(store$
|
|
21278
|
+
} = React.useContext(store$l);
|
|
21093
21279
|
const {
|
|
21094
21280
|
plan
|
|
21095
21281
|
} = usePelcro();
|
|
@@ -21107,15 +21293,15 @@ const TaxAmount = () => {
|
|
|
21107
21293
|
};
|
|
21108
21294
|
|
|
21109
21295
|
const IncludeFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
21110
|
-
store: store$
|
|
21296
|
+
store: store$l
|
|
21111
21297
|
}, props));
|
|
21112
21298
|
|
|
21113
21299
|
const IncludeLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
21114
|
-
store: store$
|
|
21300
|
+
store: store$l
|
|
21115
21301
|
}, props));
|
|
21116
21302
|
|
|
21117
21303
|
const IncludePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
21118
|
-
store: store$
|
|
21304
|
+
store: store$l
|
|
21119
21305
|
}, props));
|
|
21120
21306
|
|
|
21121
21307
|
const SubscriptionCreateFreePlanButton = _ref => {
|
|
@@ -21129,7 +21315,7 @@ const SubscriptionCreateFreePlanButton = _ref => {
|
|
|
21129
21315
|
disableSubmit
|
|
21130
21316
|
},
|
|
21131
21317
|
dispatch
|
|
21132
|
-
} = React.useContext(store$
|
|
21318
|
+
} = React.useContext(store$l);
|
|
21133
21319
|
const {
|
|
21134
21320
|
t
|
|
21135
21321
|
} = useTranslation("common");
|
|
@@ -21165,7 +21351,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
21165
21351
|
disableSubmit
|
|
21166
21352
|
},
|
|
21167
21353
|
dispatch
|
|
21168
|
-
} = React.useContext(store$
|
|
21354
|
+
} = React.useContext(store$l);
|
|
21169
21355
|
const {
|
|
21170
21356
|
t
|
|
21171
21357
|
} = useTranslation("checkoutForm");
|
|
@@ -21191,7 +21377,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
21191
21377
|
};
|
|
21192
21378
|
|
|
21193
21379
|
const DonationEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
21194
|
-
store: store$
|
|
21380
|
+
store: store$l
|
|
21195
21381
|
}, props));
|
|
21196
21382
|
|
|
21197
21383
|
/**
|
|
@@ -21208,7 +21394,7 @@ const ApplePayButton = _ref => {
|
|
|
21208
21394
|
const {
|
|
21209
21395
|
dispatch,
|
|
21210
21396
|
state
|
|
21211
|
-
} = React.useContext(store$
|
|
21397
|
+
} = React.useContext(store$l);
|
|
21212
21398
|
const {
|
|
21213
21399
|
plan,
|
|
21214
21400
|
invoice,
|
|
@@ -21521,6 +21707,43 @@ const ApplePayButton = _ref => {
|
|
|
21521
21707
|
});
|
|
21522
21708
|
};
|
|
21523
21709
|
|
|
21710
|
+
function PaymentMethodUpdateSetDefault(props) {
|
|
21711
|
+
const {
|
|
21712
|
+
dispatch,
|
|
21713
|
+
state: {
|
|
21714
|
+
isDefault
|
|
21715
|
+
}
|
|
21716
|
+
} = React.useContext(store$l);
|
|
21717
|
+
const {
|
|
21718
|
+
paymentMethodToEdit
|
|
21719
|
+
} = usePelcro();
|
|
21720
|
+
React.useEffect(() => {
|
|
21721
|
+
if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default) {
|
|
21722
|
+
dispatch({
|
|
21723
|
+
type: SET_IS_DEFAULT_PAYMENT_METHOD,
|
|
21724
|
+
payload: {
|
|
21725
|
+
isDefault: true
|
|
21726
|
+
}
|
|
21727
|
+
});
|
|
21728
|
+
}
|
|
21729
|
+
}, [paymentMethodToEdit]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
21730
|
+
|
|
21731
|
+
const handleCheckboxChange = e => {
|
|
21732
|
+
dispatch({
|
|
21733
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
21734
|
+
payload: {
|
|
21735
|
+
isDefault: e.target.checked
|
|
21736
|
+
}
|
|
21737
|
+
});
|
|
21738
|
+
};
|
|
21739
|
+
return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
|
|
21740
|
+
onChange: e => handleCheckboxChange(e),
|
|
21741
|
+
id: props.id,
|
|
21742
|
+
checked: isDefault,
|
|
21743
|
+
disabled: paymentMethodToEdit === null || paymentMethodToEdit === void 0 ? void 0 : paymentMethodToEdit.is_default
|
|
21744
|
+
}, props.label);
|
|
21745
|
+
}
|
|
21746
|
+
|
|
21524
21747
|
/**
|
|
21525
21748
|
*
|
|
21526
21749
|
*/
|
|
@@ -21608,7 +21831,10 @@ function PaymentMethodView(_ref) {
|
|
|
21608
21831
|
autoFocus: true
|
|
21609
21832
|
})), /*#__PURE__*/React__default['default'].createElement(CheckoutForm, null), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21610
21833
|
className: "plc-mb-2"
|
|
21611
|
-
}, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), /*#__PURE__*/React__default['default'].createElement(
|
|
21834
|
+
}, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodUpdateSetDefault, {
|
|
21835
|
+
id: "pelcro-input-is-default",
|
|
21836
|
+
label: t("labels.isDefault")
|
|
21837
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21612
21838
|
className: "plc-grid plc-mt-4 plc-gap-y-2"
|
|
21613
21839
|
}, /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, null), showExternalPaymentMethods && !supportsVantiv && !supportsCybersource && !supportsTap ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PelcroPaymentRequestButton, null), /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : showExternalPaymentMethods && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : null, showApplePayButton && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ApplePayButton, null)) : null)))));
|
|
21614
21840
|
}
|
|
@@ -21728,14 +21954,14 @@ function SubscriptionRenewModal(_ref) {
|
|
|
21728
21954
|
}
|
|
21729
21955
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
21730
21956
|
|
|
21731
|
-
const initialState$
|
|
21957
|
+
const initialState$k = {
|
|
21732
21958
|
cancelationReason: "",
|
|
21733
21959
|
cancelationOption: ""
|
|
21734
21960
|
};
|
|
21735
|
-
const store$
|
|
21961
|
+
const store$k = /*#__PURE__*/React.createContext(initialState$k);
|
|
21736
21962
|
const {
|
|
21737
|
-
Provider: Provider$
|
|
21738
|
-
} = store$
|
|
21963
|
+
Provider: Provider$k
|
|
21964
|
+
} = store$k;
|
|
21739
21965
|
const SubscriptionCancelContainer = _ref => {
|
|
21740
21966
|
let {
|
|
21741
21967
|
style,
|
|
@@ -21760,35 +21986,35 @@ const SubscriptionCancelContainer = _ref => {
|
|
|
21760
21986
|
default:
|
|
21761
21987
|
return state;
|
|
21762
21988
|
}
|
|
21763
|
-
}, initialState$
|
|
21989
|
+
}, initialState$k);
|
|
21764
21990
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21765
21991
|
style: {
|
|
21766
21992
|
...style
|
|
21767
21993
|
},
|
|
21768
21994
|
className: `pelcro-container pelcro-subscription-cancel-container ${className}`
|
|
21769
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
21995
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
|
|
21770
21996
|
value: {
|
|
21771
21997
|
state,
|
|
21772
21998
|
dispatch
|
|
21773
21999
|
}
|
|
21774
22000
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
21775
|
-
store: store$
|
|
22001
|
+
store: store$k,
|
|
21776
22002
|
key: i
|
|
21777
22003
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
21778
|
-
store: store$
|
|
22004
|
+
store: store$k
|
|
21779
22005
|
})));
|
|
21780
22006
|
};
|
|
21781
22007
|
|
|
21782
|
-
var _path$
|
|
21783
|
-
function _extends$
|
|
22008
|
+
var _path$l;
|
|
22009
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
21784
22010
|
function SvgInfoCircle(props) {
|
|
21785
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22011
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
21786
22012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21787
22013
|
className: "plc-w-5 plc-h-5",
|
|
21788
22014
|
fill: "none",
|
|
21789
22015
|
viewBox: "0 0 24 24",
|
|
21790
22016
|
stroke: "currentColor"
|
|
21791
|
-
}, props), _path$
|
|
22017
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21792
22018
|
strokeLinecap: "round",
|
|
21793
22019
|
strokeLinejoin: "round",
|
|
21794
22020
|
strokeWidth: 2,
|
|
@@ -21857,7 +22083,7 @@ const SubscriptionCancelReason = props => {
|
|
|
21857
22083
|
} = useTranslation("subscriptionCancel");
|
|
21858
22084
|
const {
|
|
21859
22085
|
dispatch
|
|
21860
|
-
} = React.useContext(store$
|
|
22086
|
+
} = React.useContext(store$k);
|
|
21861
22087
|
const handleOnTextAreaBlur = e => {
|
|
21862
22088
|
dispatch({
|
|
21863
22089
|
type: SET_CANCEL_SUBSCRIPTION_REASON,
|
|
@@ -21871,9 +22097,9 @@ const SubscriptionCancelReason = props => {
|
|
|
21871
22097
|
};
|
|
21872
22098
|
|
|
21873
22099
|
var _switch;
|
|
21874
|
-
function _extends$
|
|
22100
|
+
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
21875
22101
|
function SvgSubscription(props) {
|
|
21876
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22102
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
21877
22103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21878
22104
|
viewBox: "0 0 100 125",
|
|
21879
22105
|
fill: "currentColor"
|
|
@@ -21902,7 +22128,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21902
22128
|
cancelationReason,
|
|
21903
22129
|
cancelationOption
|
|
21904
22130
|
}
|
|
21905
|
-
} = React.useContext(store$
|
|
22131
|
+
} = React.useContext(store$k);
|
|
21906
22132
|
const {
|
|
21907
22133
|
t
|
|
21908
22134
|
} = useTranslation("subscriptionCancel");
|
|
@@ -21981,7 +22207,7 @@ const SubscriptionCancelOptions = _ref => {
|
|
|
21981
22207
|
cancelationOption
|
|
21982
22208
|
},
|
|
21983
22209
|
dispatch
|
|
21984
|
-
} = React.useContext(store$
|
|
22210
|
+
} = React.useContext(store$k);
|
|
21985
22211
|
const {
|
|
21986
22212
|
t
|
|
21987
22213
|
} = useTranslation("subscriptionCancel");
|
|
@@ -22097,14 +22323,14 @@ const SubscriptionCancelModal = _ref => {
|
|
|
22097
22323
|
};
|
|
22098
22324
|
SubscriptionCancelModal.viewId = "subscription-cancel";
|
|
22099
22325
|
|
|
22100
|
-
const initialState$
|
|
22326
|
+
const initialState$j = {
|
|
22101
22327
|
suspendDate: null,
|
|
22102
22328
|
buttonDisabled: false
|
|
22103
22329
|
};
|
|
22104
|
-
const store$
|
|
22330
|
+
const store$j = /*#__PURE__*/React.createContext(initialState$j);
|
|
22105
22331
|
const {
|
|
22106
|
-
Provider: Provider$
|
|
22107
|
-
} = store$
|
|
22332
|
+
Provider: Provider$j
|
|
22333
|
+
} = store$j;
|
|
22108
22334
|
const SubscriptionSuspendContainer = _ref => {
|
|
22109
22335
|
let {
|
|
22110
22336
|
style,
|
|
@@ -22130,22 +22356,22 @@ const SubscriptionSuspendContainer = _ref => {
|
|
|
22130
22356
|
default:
|
|
22131
22357
|
return state;
|
|
22132
22358
|
}
|
|
22133
|
-
}, initialState$
|
|
22359
|
+
}, initialState$j);
|
|
22134
22360
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22135
22361
|
style: {
|
|
22136
22362
|
...style
|
|
22137
22363
|
},
|
|
22138
22364
|
className: `pelcro-container pelcro-subscription-suspend-container ${className}`
|
|
22139
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
22365
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
|
|
22140
22366
|
value: {
|
|
22141
22367
|
state,
|
|
22142
22368
|
dispatch
|
|
22143
22369
|
}
|
|
22144
22370
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22145
|
-
store: store$
|
|
22371
|
+
store: store$j,
|
|
22146
22372
|
key: i
|
|
22147
22373
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22148
|
-
store: store$
|
|
22374
|
+
store: store$j
|
|
22149
22375
|
})));
|
|
22150
22376
|
};
|
|
22151
22377
|
|
|
@@ -22194,7 +22420,7 @@ const SubscriptionSuspendDate = props => {
|
|
|
22194
22420
|
const {
|
|
22195
22421
|
dispatch,
|
|
22196
22422
|
state
|
|
22197
|
-
} = React.useContext(store$
|
|
22423
|
+
} = React.useContext(store$j);
|
|
22198
22424
|
const handleInputChange = value => {
|
|
22199
22425
|
if (value) {
|
|
22200
22426
|
dispatch({
|
|
@@ -22236,7 +22462,7 @@ const SubscriptionSuspendButton = _ref => {
|
|
|
22236
22462
|
buttonDisabled
|
|
22237
22463
|
},
|
|
22238
22464
|
dispatch
|
|
22239
|
-
} = React.useContext(store$
|
|
22465
|
+
} = React.useContext(store$j);
|
|
22240
22466
|
const {
|
|
22241
22467
|
t
|
|
22242
22468
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -22337,10 +22563,10 @@ function SubscriptionSuspendModal(_ref) {
|
|
|
22337
22563
|
}
|
|
22338
22564
|
SubscriptionSuspendModal.viewId = "subscription-suspend";
|
|
22339
22565
|
|
|
22340
|
-
var _path$
|
|
22341
|
-
function _extends$
|
|
22566
|
+
var _path$k;
|
|
22567
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
22342
22568
|
function SvgGift(props) {
|
|
22343
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22569
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
22344
22570
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22345
22571
|
fill: "none",
|
|
22346
22572
|
stroke: "currentColor",
|
|
@@ -22349,7 +22575,7 @@ function SvgGift(props) {
|
|
|
22349
22575
|
strokeWidth: 2,
|
|
22350
22576
|
viewBox: "0 0 24 24",
|
|
22351
22577
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22352
|
-
}, props), _path$
|
|
22578
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22353
22579
|
d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
|
|
22354
22580
|
})));
|
|
22355
22581
|
}
|
|
@@ -22655,7 +22881,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
22655
22881
|
}
|
|
22656
22882
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
22657
22883
|
|
|
22658
|
-
const initialState$
|
|
22884
|
+
const initialState$i = {
|
|
22659
22885
|
didSubToNewslettersBefore: false,
|
|
22660
22886
|
newsletters: [],
|
|
22661
22887
|
isListLoading: true,
|
|
@@ -22665,10 +22891,10 @@ const initialState$h = {
|
|
|
22665
22891
|
content: ""
|
|
22666
22892
|
}
|
|
22667
22893
|
};
|
|
22668
|
-
const store$
|
|
22894
|
+
const store$i = /*#__PURE__*/React.createContext(initialState$i);
|
|
22669
22895
|
const {
|
|
22670
|
-
Provider: Provider$
|
|
22671
|
-
} = store$
|
|
22896
|
+
Provider: Provider$i
|
|
22897
|
+
} = store$i;
|
|
22672
22898
|
const NewsletterUpdateContainer = _ref => {
|
|
22673
22899
|
let {
|
|
22674
22900
|
style,
|
|
@@ -22775,7 +23001,7 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22775
23001
|
default:
|
|
22776
23002
|
return state;
|
|
22777
23003
|
}
|
|
22778
|
-
}, initialState$
|
|
23004
|
+
}, initialState$i);
|
|
22779
23005
|
React.useEffect(() => {
|
|
22780
23006
|
const getUserNewsletters = () => {
|
|
22781
23007
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -22817,7 +23043,7 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22817
23043
|
...style
|
|
22818
23044
|
},
|
|
22819
23045
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
22820
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23046
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
|
|
22821
23047
|
value: {
|
|
22822
23048
|
state,
|
|
22823
23049
|
dispatch
|
|
@@ -22825,12 +23051,12 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22825
23051
|
}, children.length ? children.map((child, i) => {
|
|
22826
23052
|
if (child) {
|
|
22827
23053
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22828
|
-
store: store$
|
|
23054
|
+
store: store$i,
|
|
22829
23055
|
key: i
|
|
22830
23056
|
});
|
|
22831
23057
|
}
|
|
22832
23058
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22833
|
-
store: store$
|
|
23059
|
+
store: store$i
|
|
22834
23060
|
})));
|
|
22835
23061
|
};
|
|
22836
23062
|
|
|
@@ -22846,7 +23072,7 @@ const NewsletterUpdateButton = _ref => {
|
|
|
22846
23072
|
isSubmitting,
|
|
22847
23073
|
isListLoading
|
|
22848
23074
|
}
|
|
22849
|
-
} = React.useContext(store$
|
|
23075
|
+
} = React.useContext(store$i);
|
|
22850
23076
|
const {
|
|
22851
23077
|
t
|
|
22852
23078
|
} = useTranslation("newsletter");
|
|
@@ -22875,7 +23101,7 @@ const NewsletterUpdateList = () => {
|
|
|
22875
23101
|
newsletters,
|
|
22876
23102
|
isListLoading
|
|
22877
23103
|
}
|
|
22878
|
-
} = React.useContext(store$
|
|
23104
|
+
} = React.useContext(store$i);
|
|
22879
23105
|
if (isListLoading) {
|
|
22880
23106
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
22881
23107
|
width: 60,
|
|
@@ -23072,7 +23298,7 @@ function SubscriptionCreateModal(_ref) {
|
|
|
23072
23298
|
}
|
|
23073
23299
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
23074
23300
|
|
|
23075
|
-
const initialState$
|
|
23301
|
+
const initialState$h = {
|
|
23076
23302
|
emails: "",
|
|
23077
23303
|
emailsError: null,
|
|
23078
23304
|
buttonDisabled: false,
|
|
@@ -23084,10 +23310,10 @@ const initialState$g = {
|
|
|
23084
23310
|
content: ""
|
|
23085
23311
|
}
|
|
23086
23312
|
};
|
|
23087
|
-
const store$
|
|
23313
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
23088
23314
|
const {
|
|
23089
|
-
Provider: Provider$
|
|
23090
|
-
} = store$
|
|
23315
|
+
Provider: Provider$h
|
|
23316
|
+
} = store$h;
|
|
23091
23317
|
const SubscriptionManageMembersContainer = _ref => {
|
|
23092
23318
|
let {
|
|
23093
23319
|
style,
|
|
@@ -23251,7 +23477,7 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23251
23477
|
default:
|
|
23252
23478
|
return state;
|
|
23253
23479
|
}
|
|
23254
|
-
}, initialState$
|
|
23480
|
+
}, initialState$h);
|
|
23255
23481
|
React.useEffect(() => {
|
|
23256
23482
|
dispatch({
|
|
23257
23483
|
type: HANDLE_LIST_MEMBERS
|
|
@@ -23262,7 +23488,7 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23262
23488
|
...style
|
|
23263
23489
|
},
|
|
23264
23490
|
className: `pelcro-container pelcro-manage-members-container ${className}`
|
|
23265
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23491
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
23266
23492
|
value: {
|
|
23267
23493
|
state,
|
|
23268
23494
|
dispatch
|
|
@@ -23270,12 +23496,12 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23270
23496
|
}, children.length ? children.map((child, i) => {
|
|
23271
23497
|
if (child) {
|
|
23272
23498
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
23273
|
-
store: store$
|
|
23499
|
+
store: store$h,
|
|
23274
23500
|
key: i
|
|
23275
23501
|
});
|
|
23276
23502
|
}
|
|
23277
23503
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
23278
|
-
store: store$
|
|
23504
|
+
store: store$h
|
|
23279
23505
|
})));
|
|
23280
23506
|
};
|
|
23281
23507
|
|
|
@@ -23292,7 +23518,7 @@ const SubscriptionManageMembersButton = _ref => {
|
|
|
23292
23518
|
buttonDisabled
|
|
23293
23519
|
},
|
|
23294
23520
|
dispatch
|
|
23295
|
-
} = React.useContext(store$
|
|
23521
|
+
} = React.useContext(store$h);
|
|
23296
23522
|
const {
|
|
23297
23523
|
t
|
|
23298
23524
|
} = useTranslation("subscriptionManageMembers");
|
|
@@ -23322,7 +23548,7 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
23322
23548
|
emails: stateEmails,
|
|
23323
23549
|
emailsError
|
|
23324
23550
|
}
|
|
23325
|
-
} = React.useContext(store$
|
|
23551
|
+
} = React.useContext(store$h);
|
|
23326
23552
|
const [emails, setEmails] = React.useState(stateEmails);
|
|
23327
23553
|
const [finishedTyping, setFinishedTyping] = React.useState(false);
|
|
23328
23554
|
const handleInputChange = React.useCallback(value => {
|
|
@@ -23352,15 +23578,15 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
23352
23578
|
}, props));
|
|
23353
23579
|
}
|
|
23354
23580
|
|
|
23355
|
-
var _path$
|
|
23356
|
-
function _extends$
|
|
23581
|
+
var _path$j;
|
|
23582
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
23357
23583
|
function SvgCheckMark(props) {
|
|
23358
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23584
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
23359
23585
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
23360
23586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23361
23587
|
viewBox: "0 0 20 20",
|
|
23362
23588
|
fill: "currentColor"
|
|
23363
|
-
}, props), _path$
|
|
23589
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23364
23590
|
fillRule: "evenodd",
|
|
23365
23591
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
23366
23592
|
clipRule: "evenodd"
|
|
@@ -23378,7 +23604,7 @@ function SubscriptionManageMembersList(props) {
|
|
|
23378
23604
|
removeMemberId,
|
|
23379
23605
|
loading
|
|
23380
23606
|
}
|
|
23381
|
-
} = React.useContext(store$
|
|
23607
|
+
} = React.useContext(store$h);
|
|
23382
23608
|
const getMemberStatus = React.useCallback(sub => {
|
|
23383
23609
|
if (sub.status === "pending") {
|
|
23384
23610
|
return {
|
|
@@ -23541,7 +23767,7 @@ function SubscriptionManageMembersModal(_ref) {
|
|
|
23541
23767
|
SubscriptionManageMembersModal.viewId = "manage-members";
|
|
23542
23768
|
|
|
23543
23769
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
23544
|
-
const initialState$
|
|
23770
|
+
const initialState$g = {
|
|
23545
23771
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
23546
23772
|
emailError: null,
|
|
23547
23773
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
@@ -23561,10 +23787,10 @@ const initialState$f = {
|
|
|
23561
23787
|
content: ""
|
|
23562
23788
|
}
|
|
23563
23789
|
};
|
|
23564
|
-
const store$
|
|
23790
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
23565
23791
|
const {
|
|
23566
|
-
Provider: Provider$
|
|
23567
|
-
} = store$
|
|
23792
|
+
Provider: Provider$g
|
|
23793
|
+
} = store$g;
|
|
23568
23794
|
const UserUpdateContainer = _ref => {
|
|
23569
23795
|
let {
|
|
23570
23796
|
style,
|
|
@@ -23760,13 +23986,13 @@ const UserUpdateContainer = _ref => {
|
|
|
23760
23986
|
default:
|
|
23761
23987
|
return state;
|
|
23762
23988
|
}
|
|
23763
|
-
}, initialState$
|
|
23989
|
+
}, initialState$g);
|
|
23764
23990
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
23765
23991
|
style: {
|
|
23766
23992
|
...style
|
|
23767
23993
|
},
|
|
23768
23994
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
23769
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23995
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
23770
23996
|
value: {
|
|
23771
23997
|
state,
|
|
23772
23998
|
dispatch
|
|
@@ -23774,24 +24000,24 @@ const UserUpdateContainer = _ref => {
|
|
|
23774
24000
|
}, children.length ? children.map((child, i) => {
|
|
23775
24001
|
if (child) {
|
|
23776
24002
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
23777
|
-
store: store$
|
|
24003
|
+
store: store$g,
|
|
23778
24004
|
key: i
|
|
23779
24005
|
});
|
|
23780
24006
|
}
|
|
23781
24007
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
23782
|
-
store: store$
|
|
24008
|
+
store: store$g
|
|
23783
24009
|
})));
|
|
23784
24010
|
};
|
|
23785
24011
|
|
|
23786
|
-
var _path$
|
|
23787
|
-
function _extends$
|
|
24012
|
+
var _path$i;
|
|
24013
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
23788
24014
|
function SvgEdit(props) {
|
|
23789
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24015
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
23790
24016
|
className: "plc-w-6 plc-h-6",
|
|
23791
24017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23792
24018
|
viewBox: "0 0 20 20",
|
|
23793
24019
|
fill: "currentColor"
|
|
23794
|
-
}, props), _path$
|
|
24020
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23795
24021
|
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
23796
24022
|
})));
|
|
23797
24023
|
}
|
|
@@ -23803,7 +24029,7 @@ const UserUpdateEmail = props => {
|
|
|
23803
24029
|
email,
|
|
23804
24030
|
emailError
|
|
23805
24031
|
}
|
|
23806
|
-
} = React.useContext(store$
|
|
24032
|
+
} = React.useContext(store$g);
|
|
23807
24033
|
const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
|
|
23808
24034
|
const {
|
|
23809
24035
|
t
|
|
@@ -23827,7 +24053,7 @@ const UserUpdateEmail = props => {
|
|
|
23827
24053
|
className: "plc-flex plc-items-start plc-relative"
|
|
23828
24054
|
}, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
23829
24055
|
disabled: !enableEmailEdit,
|
|
23830
|
-
store: store$
|
|
24056
|
+
store: store$g,
|
|
23831
24057
|
label: t("labels.email"),
|
|
23832
24058
|
enableEmailEdit: enableEmailEdit
|
|
23833
24059
|
}, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
@@ -23861,7 +24087,7 @@ const UserUpdateButton = _ref => {
|
|
|
23861
24087
|
phoneError
|
|
23862
24088
|
},
|
|
23863
24089
|
dispatch
|
|
23864
|
-
} = React.useContext(store$
|
|
24090
|
+
} = React.useContext(store$g);
|
|
23865
24091
|
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);
|
|
23866
24092
|
const {
|
|
23867
24093
|
t
|
|
@@ -23957,19 +24183,19 @@ function UpdateUserNameInput(_ref) {
|
|
|
23957
24183
|
}
|
|
23958
24184
|
|
|
23959
24185
|
const UserUpdateUsername = props => /*#__PURE__*/React__default['default'].createElement(UpdateUserNameInput, Object.assign({
|
|
23960
|
-
store: store$
|
|
24186
|
+
store: store$g
|
|
23961
24187
|
}, props));
|
|
23962
24188
|
|
|
23963
24189
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
23964
|
-
store: store$
|
|
24190
|
+
store: store$g
|
|
23965
24191
|
}, props));
|
|
23966
24192
|
|
|
23967
24193
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
23968
|
-
store: store$
|
|
24194
|
+
store: store$g
|
|
23969
24195
|
}, props));
|
|
23970
24196
|
|
|
23971
24197
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
23972
|
-
store: store$
|
|
24198
|
+
store: store$g
|
|
23973
24199
|
}, props));
|
|
23974
24200
|
|
|
23975
24201
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
@@ -24056,7 +24282,7 @@ function Tin(_ref) {
|
|
|
24056
24282
|
}
|
|
24057
24283
|
|
|
24058
24284
|
const UserUpdateTin = props => /*#__PURE__*/React__default['default'].createElement(Tin, Object.assign({
|
|
24059
|
-
store: store$
|
|
24285
|
+
store: store$g
|
|
24060
24286
|
}, props));
|
|
24061
24287
|
|
|
24062
24288
|
function DisplayName(_ref) {
|
|
@@ -24085,7 +24311,7 @@ function DisplayName(_ref) {
|
|
|
24085
24311
|
}
|
|
24086
24312
|
|
|
24087
24313
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
24088
|
-
store: store$
|
|
24314
|
+
store: store$g
|
|
24089
24315
|
}, props));
|
|
24090
24316
|
|
|
24091
24317
|
const UserUpdateView = props => {
|
|
@@ -24179,11 +24405,11 @@ UserUpdateModal.viewId = "user-edit";
|
|
|
24179
24405
|
|
|
24180
24406
|
const UserUpdateTextInput = props => {
|
|
24181
24407
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
24182
|
-
store: store$
|
|
24408
|
+
store: store$g
|
|
24183
24409
|
}));
|
|
24184
24410
|
};
|
|
24185
24411
|
|
|
24186
|
-
const initialState$
|
|
24412
|
+
const initialState$f = {
|
|
24187
24413
|
isSubmitting: false,
|
|
24188
24414
|
firstName: "",
|
|
24189
24415
|
firstNameError: "",
|
|
@@ -24209,10 +24435,10 @@ const initialState$e = {
|
|
|
24209
24435
|
content: ""
|
|
24210
24436
|
}
|
|
24211
24437
|
};
|
|
24212
|
-
const store$
|
|
24438
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
24213
24439
|
const {
|
|
24214
|
-
Provider: Provider$
|
|
24215
|
-
} = store$
|
|
24440
|
+
Provider: Provider$f
|
|
24441
|
+
} = store$f;
|
|
24216
24442
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
24217
24443
|
const AddressCreateContainer = _ref => {
|
|
24218
24444
|
var _props$giftCode, _ref2, _props$subscriptionId;
|
|
@@ -24446,7 +24672,7 @@ const AddressCreateContainer = _ref => {
|
|
|
24446
24672
|
default:
|
|
24447
24673
|
return state;
|
|
24448
24674
|
}
|
|
24449
|
-
}, initialState$
|
|
24675
|
+
}, initialState$f);
|
|
24450
24676
|
React.useEffect(() => {
|
|
24451
24677
|
const getStates = () => {
|
|
24452
24678
|
dispatch({
|
|
@@ -24478,16 +24704,16 @@ const AddressCreateContainer = _ref => {
|
|
|
24478
24704
|
...style
|
|
24479
24705
|
},
|
|
24480
24706
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
24481
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
24707
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
24482
24708
|
value: {
|
|
24483
24709
|
state,
|
|
24484
24710
|
dispatch
|
|
24485
24711
|
}
|
|
24486
24712
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24487
|
-
store: store$
|
|
24713
|
+
store: store$f,
|
|
24488
24714
|
key: i
|
|
24489
24715
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24490
|
-
store: store$
|
|
24716
|
+
store: store$f
|
|
24491
24717
|
})));
|
|
24492
24718
|
};
|
|
24493
24719
|
|
|
@@ -24498,7 +24724,7 @@ function AddressCreateFirstName(props) {
|
|
|
24498
24724
|
firstName,
|
|
24499
24725
|
firstNameError
|
|
24500
24726
|
}
|
|
24501
|
-
} = React.useContext(store$
|
|
24727
|
+
} = React.useContext(store$f);
|
|
24502
24728
|
const handleInputChange = value => {
|
|
24503
24729
|
dispatch({
|
|
24504
24730
|
type: SET_TEXT_FIELD,
|
|
@@ -24532,7 +24758,7 @@ function AddressCreateLastName(props) {
|
|
|
24532
24758
|
lastName,
|
|
24533
24759
|
lastNameError
|
|
24534
24760
|
}
|
|
24535
|
-
} = React.useContext(store$
|
|
24761
|
+
} = React.useContext(store$f);
|
|
24536
24762
|
const handleInputChange = value => {
|
|
24537
24763
|
dispatch({
|
|
24538
24764
|
type: SET_TEXT_FIELD,
|
|
@@ -24564,7 +24790,7 @@ function AddressCreateLine1(props) {
|
|
|
24564
24790
|
line1,
|
|
24565
24791
|
line1Error
|
|
24566
24792
|
}
|
|
24567
|
-
} = React.useContext(store$
|
|
24793
|
+
} = React.useContext(store$f);
|
|
24568
24794
|
const handleBlur = () => {
|
|
24569
24795
|
return dispatch({
|
|
24570
24796
|
type: VALIDATE_FIELD,
|
|
@@ -24603,7 +24829,7 @@ function AddressCreateCity(props) {
|
|
|
24603
24829
|
city,
|
|
24604
24830
|
cityError
|
|
24605
24831
|
}
|
|
24606
|
-
} = React.useContext(store$
|
|
24832
|
+
} = React.useContext(store$f);
|
|
24607
24833
|
const handleInputChange = value => {
|
|
24608
24834
|
dispatch({
|
|
24609
24835
|
type: SET_TEXT_FIELD,
|
|
@@ -24635,7 +24861,7 @@ function AddressCreatePostalCode(props) {
|
|
|
24635
24861
|
postalCode,
|
|
24636
24862
|
postalCodeError
|
|
24637
24863
|
}
|
|
24638
|
-
} = React.useContext(store$
|
|
24864
|
+
} = React.useContext(store$f);
|
|
24639
24865
|
const handleInputChange = value => {
|
|
24640
24866
|
dispatch({
|
|
24641
24867
|
type: SET_TEXT_FIELD,
|
|
@@ -24671,7 +24897,7 @@ const AddressCreateSubmit = _ref => {
|
|
|
24671
24897
|
state: {
|
|
24672
24898
|
isSubmitting
|
|
24673
24899
|
}
|
|
24674
|
-
} = React.useContext(store$
|
|
24900
|
+
} = React.useContext(store$f);
|
|
24675
24901
|
const {
|
|
24676
24902
|
t
|
|
24677
24903
|
} = useTranslation("address");
|
|
@@ -24751,7 +24977,7 @@ function CountrySelect(_ref) {
|
|
|
24751
24977
|
}
|
|
24752
24978
|
|
|
24753
24979
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
24754
|
-
store: store$
|
|
24980
|
+
store: store$f
|
|
24755
24981
|
}, props));
|
|
24756
24982
|
|
|
24757
24983
|
function StateSelect(_ref) {
|
|
@@ -24833,14 +25059,14 @@ function StateSelect(_ref) {
|
|
|
24833
25059
|
}
|
|
24834
25060
|
|
|
24835
25061
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
24836
|
-
store: store$
|
|
25062
|
+
store: store$f
|
|
24837
25063
|
}, props));
|
|
24838
25064
|
|
|
24839
25065
|
const AddressCreateSetDefault = props => {
|
|
24840
25066
|
const {
|
|
24841
25067
|
dispatch,
|
|
24842
25068
|
state
|
|
24843
|
-
} = React.useContext(store$
|
|
25069
|
+
} = React.useContext(store$f);
|
|
24844
25070
|
const handleCheckboxChange = e => {
|
|
24845
25071
|
dispatch({
|
|
24846
25072
|
type: HANDLE_CHECKBOX_CHANGE,
|
|
@@ -24965,18 +25191,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
24965
25191
|
|
|
24966
25192
|
const AddressCreateTextInput = props => {
|
|
24967
25193
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
24968
|
-
store: store$
|
|
25194
|
+
store: store$f
|
|
24969
25195
|
}));
|
|
24970
25196
|
};
|
|
24971
25197
|
|
|
24972
25198
|
const AddressCreateLine2 = props => {
|
|
24973
25199
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
24974
25200
|
fieldName: "line2",
|
|
24975
|
-
store: store$
|
|
25201
|
+
store: store$f
|
|
24976
25202
|
}, props));
|
|
24977
25203
|
};
|
|
24978
25204
|
|
|
24979
|
-
const initialState$
|
|
25205
|
+
const initialState$e = {
|
|
24980
25206
|
isSubmitting: false,
|
|
24981
25207
|
firstName: "",
|
|
24982
25208
|
firstNameError: "",
|
|
@@ -25002,10 +25228,10 @@ const initialState$d = {
|
|
|
25002
25228
|
content: ""
|
|
25003
25229
|
}
|
|
25004
25230
|
};
|
|
25005
|
-
const store$
|
|
25231
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
25006
25232
|
const {
|
|
25007
|
-
Provider: Provider$
|
|
25008
|
-
} = store$
|
|
25233
|
+
Provider: Provider$e
|
|
25234
|
+
} = store$e;
|
|
25009
25235
|
const AddressUpdateContainer = _ref => {
|
|
25010
25236
|
var _props$addressId, _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
25011
25237
|
let {
|
|
@@ -25054,7 +25280,7 @@ const AddressUpdateContainer = _ref => {
|
|
|
25054
25280
|
const thisAddress = addresses[address];
|
|
25055
25281
|
if (+thisAddress.id === +addressId) {
|
|
25056
25282
|
const newState = {
|
|
25057
|
-
...initialState$
|
|
25283
|
+
...initialState$e,
|
|
25058
25284
|
firstName: thisAddress.first_name,
|
|
25059
25285
|
lastName: thisAddress.last_name,
|
|
25060
25286
|
line1: thisAddress.line1,
|
|
@@ -25205,7 +25431,7 @@ const AddressUpdateContainer = _ref => {
|
|
|
25205
25431
|
default:
|
|
25206
25432
|
return state;
|
|
25207
25433
|
}
|
|
25208
|
-
}, initialState$
|
|
25434
|
+
}, initialState$e);
|
|
25209
25435
|
React.useEffect(() => {
|
|
25210
25436
|
const getStates = () => {
|
|
25211
25437
|
dispatch({
|
|
@@ -25237,21 +25463,21 @@ const AddressUpdateContainer = _ref => {
|
|
|
25237
25463
|
...style
|
|
25238
25464
|
},
|
|
25239
25465
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
25240
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
25466
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
25241
25467
|
value: {
|
|
25242
25468
|
state,
|
|
25243
25469
|
dispatch
|
|
25244
25470
|
}
|
|
25245
25471
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25246
|
-
store: store$
|
|
25472
|
+
store: store$e,
|
|
25247
25473
|
key: i
|
|
25248
25474
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25249
|
-
store: store$
|
|
25475
|
+
store: store$e
|
|
25250
25476
|
})));
|
|
25251
25477
|
};
|
|
25252
25478
|
|
|
25253
25479
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
25254
|
-
store: store$
|
|
25480
|
+
store: store$e
|
|
25255
25481
|
}, props));
|
|
25256
25482
|
|
|
25257
25483
|
function AddressUpdateFirstName(props) {
|
|
@@ -25261,7 +25487,7 @@ function AddressUpdateFirstName(props) {
|
|
|
25261
25487
|
firstName,
|
|
25262
25488
|
firstNameError
|
|
25263
25489
|
}
|
|
25264
|
-
} = React.useContext(store$
|
|
25490
|
+
} = React.useContext(store$e);
|
|
25265
25491
|
const handleBlur = () => {
|
|
25266
25492
|
return dispatch({
|
|
25267
25493
|
type: VALIDATE_FIELD,
|
|
@@ -25300,7 +25526,7 @@ function AddressUpdateLastName(props) {
|
|
|
25300
25526
|
lastName,
|
|
25301
25527
|
lastNameError
|
|
25302
25528
|
}
|
|
25303
|
-
} = React.useContext(store$
|
|
25529
|
+
} = React.useContext(store$e);
|
|
25304
25530
|
const handleBlur = () => {
|
|
25305
25531
|
return dispatch({
|
|
25306
25532
|
type: VALIDATE_FIELD,
|
|
@@ -25339,7 +25565,7 @@ function AddressUpdateLine1(props) {
|
|
|
25339
25565
|
line1,
|
|
25340
25566
|
line1Error
|
|
25341
25567
|
}
|
|
25342
|
-
} = React.useContext(store$
|
|
25568
|
+
} = React.useContext(store$e);
|
|
25343
25569
|
const handleBlur = () => {
|
|
25344
25570
|
return dispatch({
|
|
25345
25571
|
type: VALIDATE_FIELD,
|
|
@@ -25375,7 +25601,7 @@ const AddressUpdateLine2 = props => {
|
|
|
25375
25601
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
25376
25602
|
fieldName: "line2"
|
|
25377
25603
|
}, props, {
|
|
25378
|
-
store: store$
|
|
25604
|
+
store: store$e
|
|
25379
25605
|
}));
|
|
25380
25606
|
};
|
|
25381
25607
|
|
|
@@ -25386,7 +25612,7 @@ function AddressUpdateCity(props) {
|
|
|
25386
25612
|
city,
|
|
25387
25613
|
cityError
|
|
25388
25614
|
}
|
|
25389
|
-
} = React.useContext(store$
|
|
25615
|
+
} = React.useContext(store$e);
|
|
25390
25616
|
const handleBlur = () => {
|
|
25391
25617
|
return dispatch({
|
|
25392
25618
|
type: VALIDATE_FIELD,
|
|
@@ -25425,7 +25651,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
25425
25651
|
postalCode,
|
|
25426
25652
|
postalCodeError
|
|
25427
25653
|
}
|
|
25428
|
-
} = React.useContext(store$
|
|
25654
|
+
} = React.useContext(store$e);
|
|
25429
25655
|
const handleBlur = () => {
|
|
25430
25656
|
return dispatch({
|
|
25431
25657
|
type: VALIDATE_FIELD,
|
|
@@ -25468,7 +25694,7 @@ const AddressUpdateSubmit = _ref => {
|
|
|
25468
25694
|
state: {
|
|
25469
25695
|
isSubmitting
|
|
25470
25696
|
}
|
|
25471
|
-
} = React.useContext(store$
|
|
25697
|
+
} = React.useContext(store$e);
|
|
25472
25698
|
const {
|
|
25473
25699
|
t
|
|
25474
25700
|
} = useTranslation("address");
|
|
@@ -25484,7 +25710,7 @@ const AddressUpdateSubmit = _ref => {
|
|
|
25484
25710
|
};
|
|
25485
25711
|
|
|
25486
25712
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
25487
|
-
store: store$
|
|
25713
|
+
store: store$e
|
|
25488
25714
|
}, props));
|
|
25489
25715
|
|
|
25490
25716
|
function AddressUpdateSetDefault(props) {
|
|
@@ -25493,7 +25719,7 @@ function AddressUpdateSetDefault(props) {
|
|
|
25493
25719
|
state: {
|
|
25494
25720
|
isDefault
|
|
25495
25721
|
}
|
|
25496
|
-
} = React.useContext(store$
|
|
25722
|
+
} = React.useContext(store$e);
|
|
25497
25723
|
const handleCheckboxChange = e => {
|
|
25498
25724
|
dispatch({
|
|
25499
25725
|
type: HANDLE_CHECKBOX_CHANGE,
|
|
@@ -25595,7 +25821,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
25595
25821
|
|
|
25596
25822
|
const AddressUpdateTextInput = props => {
|
|
25597
25823
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
25598
|
-
store: store$
|
|
25824
|
+
store: store$e
|
|
25599
25825
|
}));
|
|
25600
25826
|
};
|
|
25601
25827
|
|
|
@@ -25685,7 +25911,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
25685
25911
|
};
|
|
25686
25912
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
25687
25913
|
|
|
25688
|
-
const initialState$
|
|
25914
|
+
const initialState$d = {
|
|
25689
25915
|
email: "",
|
|
25690
25916
|
password: "",
|
|
25691
25917
|
passwordError: null,
|
|
@@ -25698,10 +25924,10 @@ const initialState$c = {
|
|
|
25698
25924
|
content: ""
|
|
25699
25925
|
}
|
|
25700
25926
|
};
|
|
25701
|
-
const store$
|
|
25927
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
25702
25928
|
const {
|
|
25703
|
-
Provider: Provider$
|
|
25704
|
-
} = store$
|
|
25929
|
+
Provider: Provider$d
|
|
25930
|
+
} = store$d;
|
|
25705
25931
|
const PasswordResetContainer = _ref => {
|
|
25706
25932
|
let {
|
|
25707
25933
|
style,
|
|
@@ -25756,7 +25982,7 @@ const PasswordResetContainer = _ref => {
|
|
|
25756
25982
|
type: SET_EMAIL,
|
|
25757
25983
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
25758
25984
|
});
|
|
25759
|
-
initialState$
|
|
25985
|
+
initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
|
|
25760
25986
|
dispatch({
|
|
25761
25987
|
type: SET_TOKEN,
|
|
25762
25988
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -25816,27 +26042,27 @@ const PasswordResetContainer = _ref => {
|
|
|
25816
26042
|
default:
|
|
25817
26043
|
return state;
|
|
25818
26044
|
}
|
|
25819
|
-
}, initialState$
|
|
26045
|
+
}, initialState$d);
|
|
25820
26046
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25821
26047
|
style: {
|
|
25822
26048
|
...style
|
|
25823
26049
|
},
|
|
25824
26050
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
25825
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26051
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
25826
26052
|
value: {
|
|
25827
26053
|
state,
|
|
25828
26054
|
dispatch
|
|
25829
26055
|
}
|
|
25830
26056
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25831
|
-
store: store$
|
|
26057
|
+
store: store$d,
|
|
25832
26058
|
key: i
|
|
25833
26059
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25834
|
-
store: store$
|
|
26060
|
+
store: store$d
|
|
25835
26061
|
})));
|
|
25836
26062
|
};
|
|
25837
26063
|
|
|
25838
26064
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
25839
|
-
store: store$
|
|
26065
|
+
store: store$d
|
|
25840
26066
|
}, props));
|
|
25841
26067
|
|
|
25842
26068
|
const PasswordResetButton = _ref => {
|
|
@@ -25850,7 +26076,7 @@ const PasswordResetButton = _ref => {
|
|
|
25850
26076
|
buttonDisabled
|
|
25851
26077
|
},
|
|
25852
26078
|
dispatch
|
|
25853
|
-
} = React.useContext(store$
|
|
26079
|
+
} = React.useContext(store$d);
|
|
25854
26080
|
const {
|
|
25855
26081
|
t
|
|
25856
26082
|
} = useTranslation("passwordReset");
|
|
@@ -25867,14 +26093,14 @@ const PasswordResetButton = _ref => {
|
|
|
25867
26093
|
};
|
|
25868
26094
|
|
|
25869
26095
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
25870
|
-
store: store$
|
|
26096
|
+
store: store$d
|
|
25871
26097
|
}, props, {
|
|
25872
26098
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
25873
26099
|
disabled: true
|
|
25874
26100
|
}));
|
|
25875
26101
|
|
|
25876
26102
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
25877
|
-
store: store$
|
|
26103
|
+
store: store$d
|
|
25878
26104
|
}, props));
|
|
25879
26105
|
|
|
25880
26106
|
const PasswordResetView = props => {
|
|
@@ -25927,7 +26153,7 @@ const PasswordResetModal = _ref => {
|
|
|
25927
26153
|
};
|
|
25928
26154
|
PasswordResetModal.viewId = "password-reset";
|
|
25929
26155
|
|
|
25930
|
-
const initialState$
|
|
26156
|
+
const initialState$c = {
|
|
25931
26157
|
email: "",
|
|
25932
26158
|
emailError: null,
|
|
25933
26159
|
buttonDisabled: false,
|
|
@@ -25936,10 +26162,10 @@ const initialState$b = {
|
|
|
25936
26162
|
content: ""
|
|
25937
26163
|
}
|
|
25938
26164
|
};
|
|
25939
|
-
const store$
|
|
26165
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
25940
26166
|
const {
|
|
25941
|
-
Provider: Provider$
|
|
25942
|
-
} = store$
|
|
26167
|
+
Provider: Provider$c
|
|
26168
|
+
} = store$c;
|
|
25943
26169
|
const PasswordForgotContainer = _ref => {
|
|
25944
26170
|
let {
|
|
25945
26171
|
style,
|
|
@@ -26015,22 +26241,22 @@ const PasswordForgotContainer = _ref => {
|
|
|
26015
26241
|
default:
|
|
26016
26242
|
return state;
|
|
26017
26243
|
}
|
|
26018
|
-
}, initialState$
|
|
26244
|
+
}, initialState$c);
|
|
26019
26245
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26020
26246
|
style: {
|
|
26021
26247
|
...style
|
|
26022
26248
|
},
|
|
26023
26249
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
26024
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26250
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
26025
26251
|
value: {
|
|
26026
26252
|
state,
|
|
26027
26253
|
dispatch
|
|
26028
26254
|
}
|
|
26029
26255
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26030
|
-
store: store$
|
|
26256
|
+
store: store$c,
|
|
26031
26257
|
key: i
|
|
26032
26258
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26033
|
-
store: store$
|
|
26259
|
+
store: store$c
|
|
26034
26260
|
})));
|
|
26035
26261
|
};
|
|
26036
26262
|
|
|
@@ -26047,7 +26273,7 @@ const PasswordForgotButton = _ref => {
|
|
|
26047
26273
|
emailError
|
|
26048
26274
|
},
|
|
26049
26275
|
dispatch
|
|
26050
|
-
} = React.useContext(store$
|
|
26276
|
+
} = React.useContext(store$c);
|
|
26051
26277
|
const {
|
|
26052
26278
|
t
|
|
26053
26279
|
} = useTranslation("passwordForgot");
|
|
@@ -26068,7 +26294,7 @@ const PasswordForgotButton = _ref => {
|
|
|
26068
26294
|
};
|
|
26069
26295
|
|
|
26070
26296
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
26071
|
-
store: store$
|
|
26297
|
+
store: store$c
|
|
26072
26298
|
}, props));
|
|
26073
26299
|
|
|
26074
26300
|
const PasswordForgotView = props => {
|
|
@@ -26119,7 +26345,7 @@ const PasswordForgotModal = _ref => {
|
|
|
26119
26345
|
};
|
|
26120
26346
|
PasswordForgotModal.viewId = "password-forgot";
|
|
26121
26347
|
|
|
26122
|
-
const initialState$
|
|
26348
|
+
const initialState$b = {
|
|
26123
26349
|
email: "",
|
|
26124
26350
|
emailError: null,
|
|
26125
26351
|
buttonDisabled: false,
|
|
@@ -26128,10 +26354,10 @@ const initialState$a = {
|
|
|
26128
26354
|
content: ""
|
|
26129
26355
|
}
|
|
26130
26356
|
};
|
|
26131
|
-
const store$
|
|
26357
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
26132
26358
|
const {
|
|
26133
|
-
Provider: Provider$
|
|
26134
|
-
} = store$
|
|
26359
|
+
Provider: Provider$b
|
|
26360
|
+
} = store$b;
|
|
26135
26361
|
const PasswordlessRequestContainer = _ref => {
|
|
26136
26362
|
let {
|
|
26137
26363
|
style,
|
|
@@ -26207,22 +26433,22 @@ const PasswordlessRequestContainer = _ref => {
|
|
|
26207
26433
|
default:
|
|
26208
26434
|
return state;
|
|
26209
26435
|
}
|
|
26210
|
-
}, initialState$
|
|
26436
|
+
}, initialState$b);
|
|
26211
26437
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26212
26438
|
style: {
|
|
26213
26439
|
...style
|
|
26214
26440
|
},
|
|
26215
26441
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
26216
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26442
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
26217
26443
|
value: {
|
|
26218
26444
|
state,
|
|
26219
26445
|
dispatch
|
|
26220
26446
|
}
|
|
26221
26447
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26222
|
-
store: store$
|
|
26448
|
+
store: store$b,
|
|
26223
26449
|
key: i
|
|
26224
26450
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26225
|
-
store: store$
|
|
26451
|
+
store: store$b
|
|
26226
26452
|
})));
|
|
26227
26453
|
};
|
|
26228
26454
|
|
|
@@ -26239,7 +26465,7 @@ const PasswordlessRequestViewButton = _ref => {
|
|
|
26239
26465
|
emailError
|
|
26240
26466
|
},
|
|
26241
26467
|
dispatch
|
|
26242
|
-
} = React.useContext(store$
|
|
26468
|
+
} = React.useContext(store$b);
|
|
26243
26469
|
const {
|
|
26244
26470
|
t
|
|
26245
26471
|
} = useTranslation("passwordlessRequest");
|
|
@@ -26260,7 +26486,7 @@ const PasswordlessRequestViewButton = _ref => {
|
|
|
26260
26486
|
};
|
|
26261
26487
|
|
|
26262
26488
|
const PasswordlessRequestEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
26263
|
-
store: store$
|
|
26489
|
+
store: store$b
|
|
26264
26490
|
}, props));
|
|
26265
26491
|
|
|
26266
26492
|
const PasswordlessRequestView = props => {
|
|
@@ -26302,7 +26528,7 @@ const PasswordlessRequestModal = _ref => {
|
|
|
26302
26528
|
};
|
|
26303
26529
|
PasswordlessRequestModal.viewId = "passwordless-request";
|
|
26304
26530
|
|
|
26305
|
-
const initialState$
|
|
26531
|
+
const initialState$a = {
|
|
26306
26532
|
currentPassword: "",
|
|
26307
26533
|
newPassword: "",
|
|
26308
26534
|
confirmNewPassword: "",
|
|
@@ -26316,10 +26542,10 @@ const initialState$9 = {
|
|
|
26316
26542
|
content: ""
|
|
26317
26543
|
}
|
|
26318
26544
|
};
|
|
26319
|
-
const store$
|
|
26545
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
26320
26546
|
const {
|
|
26321
|
-
Provider: Provider$
|
|
26322
|
-
} = store$
|
|
26547
|
+
Provider: Provider$a
|
|
26548
|
+
} = store$a;
|
|
26323
26549
|
const PasswordChangeContainer = _ref => {
|
|
26324
26550
|
let {
|
|
26325
26551
|
style,
|
|
@@ -26470,22 +26696,22 @@ const PasswordChangeContainer = _ref => {
|
|
|
26470
26696
|
default:
|
|
26471
26697
|
return state;
|
|
26472
26698
|
}
|
|
26473
|
-
}, initialState$
|
|
26699
|
+
}, initialState$a);
|
|
26474
26700
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26475
26701
|
style: {
|
|
26476
26702
|
...style
|
|
26477
26703
|
},
|
|
26478
26704
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
26479
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26705
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
26480
26706
|
value: {
|
|
26481
26707
|
state,
|
|
26482
26708
|
dispatch
|
|
26483
26709
|
}
|
|
26484
26710
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26485
|
-
store: store$
|
|
26711
|
+
store: store$a,
|
|
26486
26712
|
key: i
|
|
26487
26713
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26488
|
-
store: store$
|
|
26714
|
+
store: store$a
|
|
26489
26715
|
})));
|
|
26490
26716
|
};
|
|
26491
26717
|
|
|
@@ -26496,7 +26722,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
26496
26722
|
currentPassword,
|
|
26497
26723
|
currentPasswordError
|
|
26498
26724
|
}
|
|
26499
|
-
} = React.useContext(store$
|
|
26725
|
+
} = React.useContext(store$a);
|
|
26500
26726
|
const handleBlur = React.useCallback(() => {
|
|
26501
26727
|
return dispatch({
|
|
26502
26728
|
type: VALIDATE_PASSWORD
|
|
@@ -26530,7 +26756,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
26530
26756
|
newPassword,
|
|
26531
26757
|
newPasswordError
|
|
26532
26758
|
}
|
|
26533
|
-
} = React.useContext(store$
|
|
26759
|
+
} = React.useContext(store$a);
|
|
26534
26760
|
const handleBlur = React.useCallback(() => {
|
|
26535
26761
|
return dispatch({
|
|
26536
26762
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -26564,7 +26790,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
26564
26790
|
confirmNewPassword,
|
|
26565
26791
|
confirmNewPasswordError
|
|
26566
26792
|
}
|
|
26567
|
-
} = React.useContext(store$
|
|
26793
|
+
} = React.useContext(store$a);
|
|
26568
26794
|
const handleBlur = React.useCallback(() => {
|
|
26569
26795
|
return dispatch({
|
|
26570
26796
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -26606,7 +26832,7 @@ const PasswordChangeButton = _ref => {
|
|
|
26606
26832
|
confirmNewPasswordError
|
|
26607
26833
|
},
|
|
26608
26834
|
dispatch
|
|
26609
|
-
} = React.useContext(store$
|
|
26835
|
+
} = React.useContext(store$a);
|
|
26610
26836
|
const {
|
|
26611
26837
|
t
|
|
26612
26838
|
} = useTranslation("passwordChange");
|
|
@@ -26673,17 +26899,17 @@ const PasswordChangeModal = _ref => {
|
|
|
26673
26899
|
};
|
|
26674
26900
|
PasswordChangeModal.viewId = "password-change";
|
|
26675
26901
|
|
|
26676
|
-
const initialState$
|
|
26902
|
+
const initialState$9 = {
|
|
26677
26903
|
buttonDisabled: false,
|
|
26678
26904
|
alert: {
|
|
26679
26905
|
type: "error",
|
|
26680
26906
|
content: ""
|
|
26681
26907
|
}
|
|
26682
26908
|
};
|
|
26683
|
-
const store$
|
|
26909
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
26684
26910
|
const {
|
|
26685
|
-
Provider: Provider$
|
|
26686
|
-
} = store$
|
|
26911
|
+
Provider: Provider$9
|
|
26912
|
+
} = store$9;
|
|
26687
26913
|
const CartContainer = _ref => {
|
|
26688
26914
|
let {
|
|
26689
26915
|
style,
|
|
@@ -26769,22 +26995,22 @@ const CartContainer = _ref => {
|
|
|
26769
26995
|
default:
|
|
26770
26996
|
return state;
|
|
26771
26997
|
}
|
|
26772
|
-
}, initialState$
|
|
26998
|
+
}, initialState$9);
|
|
26773
26999
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26774
27000
|
style: {
|
|
26775
27001
|
...style
|
|
26776
27002
|
},
|
|
26777
27003
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
26778
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
27004
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
26779
27005
|
value: {
|
|
26780
27006
|
state,
|
|
26781
27007
|
dispatch
|
|
26782
27008
|
}
|
|
26783
27009
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26784
|
-
store: store$
|
|
27010
|
+
store: store$9,
|
|
26785
27011
|
key: i
|
|
26786
27012
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26787
|
-
store: store$
|
|
27013
|
+
store: store$9
|
|
26788
27014
|
})));
|
|
26789
27015
|
};
|
|
26790
27016
|
|
|
@@ -26826,7 +27052,7 @@ const CartSubmit = _ref => {
|
|
|
26826
27052
|
buttonDisabled
|
|
26827
27053
|
},
|
|
26828
27054
|
dispatch
|
|
26829
|
-
} = React.useContext(store$
|
|
27055
|
+
} = React.useContext(store$9);
|
|
26830
27056
|
const {
|
|
26831
27057
|
t
|
|
26832
27058
|
} = useTranslation("cart");
|
|
@@ -26861,7 +27087,7 @@ const CartTotalPrice = () => {
|
|
|
26861
27087
|
state: {
|
|
26862
27088
|
alert
|
|
26863
27089
|
}
|
|
26864
|
-
} = React.useContext(store$
|
|
27090
|
+
} = React.useContext(store$9);
|
|
26865
27091
|
const {
|
|
26866
27092
|
cartItems
|
|
26867
27093
|
} = usePelcro();
|
|
@@ -27175,7 +27401,7 @@ const OrderConfirmModal = props => {
|
|
|
27175
27401
|
};
|
|
27176
27402
|
OrderConfirmModal.viewId = "order-confirm";
|
|
27177
27403
|
|
|
27178
|
-
const initialState$
|
|
27404
|
+
const initialState$8 = {
|
|
27179
27405
|
email: "",
|
|
27180
27406
|
firstName: "",
|
|
27181
27407
|
lastName: "",
|
|
@@ -27187,10 +27413,10 @@ const initialState$7 = {
|
|
|
27187
27413
|
content: ""
|
|
27188
27414
|
}
|
|
27189
27415
|
};
|
|
27190
|
-
const store$
|
|
27416
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
27191
27417
|
const {
|
|
27192
|
-
Provider: Provider$
|
|
27193
|
-
} = store$
|
|
27418
|
+
Provider: Provider$8
|
|
27419
|
+
} = store$8;
|
|
27194
27420
|
const GiftCreateContainer = _ref => {
|
|
27195
27421
|
let {
|
|
27196
27422
|
style,
|
|
@@ -27288,22 +27514,22 @@ const GiftCreateContainer = _ref => {
|
|
|
27288
27514
|
default:
|
|
27289
27515
|
return state;
|
|
27290
27516
|
}
|
|
27291
|
-
}, initialState$
|
|
27517
|
+
}, initialState$8);
|
|
27292
27518
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
27293
27519
|
style: {
|
|
27294
27520
|
...style
|
|
27295
27521
|
},
|
|
27296
27522
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
27297
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
27523
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
27298
27524
|
value: {
|
|
27299
27525
|
state,
|
|
27300
27526
|
dispatch
|
|
27301
27527
|
}
|
|
27302
27528
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27303
|
-
store: store$
|
|
27529
|
+
store: store$8,
|
|
27304
27530
|
key: i
|
|
27305
27531
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27306
|
-
store: store$
|
|
27532
|
+
store: store$8
|
|
27307
27533
|
})));
|
|
27308
27534
|
};
|
|
27309
27535
|
|
|
@@ -27318,7 +27544,7 @@ const GiftCreateSubmitButton = _ref => {
|
|
|
27318
27544
|
state: {
|
|
27319
27545
|
disableSubmit
|
|
27320
27546
|
}
|
|
27321
|
-
} = React.useContext(store$
|
|
27547
|
+
} = React.useContext(store$8);
|
|
27322
27548
|
const {
|
|
27323
27549
|
t
|
|
27324
27550
|
} = useTranslation("register");
|
|
@@ -27335,17 +27561,17 @@ const GiftCreateSubmitButton = _ref => {
|
|
|
27335
27561
|
|
|
27336
27562
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
27337
27563
|
initWithUserEmail: false,
|
|
27338
|
-
store: store$
|
|
27564
|
+
store: store$8
|
|
27339
27565
|
}, props));
|
|
27340
27566
|
|
|
27341
27567
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
27342
27568
|
initWithUserFirstName: false,
|
|
27343
|
-
store: store$
|
|
27569
|
+
store: store$8
|
|
27344
27570
|
}, props));
|
|
27345
27571
|
|
|
27346
27572
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
27347
27573
|
initWithUserLastName: false,
|
|
27348
|
-
store: store$
|
|
27574
|
+
store: store$8
|
|
27349
27575
|
}, props));
|
|
27350
27576
|
|
|
27351
27577
|
const nowDate = new Date();
|
|
@@ -27359,7 +27585,7 @@ const GiftCreateStartDate = props => {
|
|
|
27359
27585
|
const {
|
|
27360
27586
|
dispatch,
|
|
27361
27587
|
state
|
|
27362
|
-
} = React.useContext(store$
|
|
27588
|
+
} = React.useContext(store$8);
|
|
27363
27589
|
const handleInputChange = value => {
|
|
27364
27590
|
dispatch({
|
|
27365
27591
|
type: SET_START_DATE,
|
|
@@ -27389,7 +27615,7 @@ function GiftCreateMessage(props) {
|
|
|
27389
27615
|
const {
|
|
27390
27616
|
dispatch,
|
|
27391
27617
|
state
|
|
27392
|
-
} = React.useContext(store$
|
|
27618
|
+
} = React.useContext(store$8);
|
|
27393
27619
|
const MAX_CHARS_COUNT = 200;
|
|
27394
27620
|
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
27395
27621
|
const handleInputChange = value => {
|
|
@@ -27507,7 +27733,7 @@ const GiftCreateModal = _ref => {
|
|
|
27507
27733
|
};
|
|
27508
27734
|
GiftCreateModal.viewId = "gift-create";
|
|
27509
27735
|
|
|
27510
|
-
const initialState$
|
|
27736
|
+
const initialState$7 = {
|
|
27511
27737
|
isSubmitting: false,
|
|
27512
27738
|
giftCode: "",
|
|
27513
27739
|
buttonDisabled: true,
|
|
@@ -27516,10 +27742,10 @@ const initialState$6 = {
|
|
|
27516
27742
|
content: ""
|
|
27517
27743
|
}
|
|
27518
27744
|
};
|
|
27519
|
-
const store$
|
|
27745
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
27520
27746
|
const {
|
|
27521
|
-
Provider: Provider$
|
|
27522
|
-
} = store$
|
|
27747
|
+
Provider: Provider$7
|
|
27748
|
+
} = store$7;
|
|
27523
27749
|
const GiftRedeemContainer = _ref => {
|
|
27524
27750
|
var _ref2, _props$subscriptionId;
|
|
27525
27751
|
let {
|
|
@@ -27629,22 +27855,22 @@ const GiftRedeemContainer = _ref => {
|
|
|
27629
27855
|
default:
|
|
27630
27856
|
return state;
|
|
27631
27857
|
}
|
|
27632
|
-
}, initialState$
|
|
27858
|
+
}, initialState$7);
|
|
27633
27859
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
27634
27860
|
style: {
|
|
27635
27861
|
...style
|
|
27636
27862
|
},
|
|
27637
27863
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
27638
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
27864
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
27639
27865
|
value: {
|
|
27640
27866
|
state,
|
|
27641
27867
|
dispatch
|
|
27642
27868
|
}
|
|
27643
27869
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27644
|
-
store: store$
|
|
27870
|
+
store: store$7,
|
|
27645
27871
|
key: i
|
|
27646
27872
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27647
|
-
store: store$
|
|
27873
|
+
store: store$7
|
|
27648
27874
|
})));
|
|
27649
27875
|
};
|
|
27650
27876
|
|
|
@@ -27678,7 +27904,7 @@ function GiftCode(_ref) {
|
|
|
27678
27904
|
}
|
|
27679
27905
|
|
|
27680
27906
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
27681
|
-
store: store$
|
|
27907
|
+
store: store$7
|
|
27682
27908
|
}, props));
|
|
27683
27909
|
|
|
27684
27910
|
const GiftRedeemSubmitButton = _ref => {
|
|
@@ -27693,7 +27919,7 @@ const GiftRedeemSubmitButton = _ref => {
|
|
|
27693
27919
|
disableSubmit,
|
|
27694
27920
|
isSubmitting
|
|
27695
27921
|
}
|
|
27696
|
-
} = React.useContext(store$
|
|
27922
|
+
} = React.useContext(store$7);
|
|
27697
27923
|
const {
|
|
27698
27924
|
t
|
|
27699
27925
|
} = useTranslation("register");
|
|
@@ -27778,7 +28004,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
27778
28004
|
const addressesWithoutDefault = addresses.filter(address => !address.is_default);
|
|
27779
28005
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
27780
28006
|
};
|
|
27781
|
-
const initialState$
|
|
28007
|
+
const initialState$6 = {
|
|
27782
28008
|
addresses: [],
|
|
27783
28009
|
selectedAddressId: null,
|
|
27784
28010
|
isSubmitting: false,
|
|
@@ -27787,10 +28013,10 @@ const initialState$5 = {
|
|
|
27787
28013
|
content: ""
|
|
27788
28014
|
}
|
|
27789
28015
|
};
|
|
27790
|
-
const store$
|
|
28016
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
27791
28017
|
const {
|
|
27792
|
-
Provider: Provider$
|
|
27793
|
-
} = store$
|
|
28018
|
+
Provider: Provider$6
|
|
28019
|
+
} = store$6;
|
|
27794
28020
|
const AddressSelectContainer = _ref => {
|
|
27795
28021
|
var _props$giftCode, _ref2, _props$subscriptionId;
|
|
27796
28022
|
let {
|
|
@@ -27917,7 +28143,7 @@ const AddressSelectContainer = _ref => {
|
|
|
27917
28143
|
default:
|
|
27918
28144
|
return state;
|
|
27919
28145
|
}
|
|
27920
|
-
}, initialState$
|
|
28146
|
+
}, initialState$6);
|
|
27921
28147
|
React.useEffect(() => {
|
|
27922
28148
|
var _window$Pelcro$user$r;
|
|
27923
28149
|
dispatch({
|
|
@@ -27930,16 +28156,16 @@ const AddressSelectContainer = _ref => {
|
|
|
27930
28156
|
...style
|
|
27931
28157
|
},
|
|
27932
28158
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
27933
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
28159
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
27934
28160
|
value: {
|
|
27935
28161
|
state,
|
|
27936
28162
|
dispatch
|
|
27937
28163
|
}
|
|
27938
28164
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27939
|
-
store: store$
|
|
28165
|
+
store: store$6,
|
|
27940
28166
|
key: i
|
|
27941
28167
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27942
|
-
store: store$
|
|
28168
|
+
store: store$6
|
|
27943
28169
|
})));
|
|
27944
28170
|
};
|
|
27945
28171
|
|
|
@@ -27950,7 +28176,7 @@ const AddressSelectList = () => {
|
|
|
27950
28176
|
addresses,
|
|
27951
28177
|
selectedAddressId
|
|
27952
28178
|
}
|
|
27953
|
-
} = React.useContext(store$
|
|
28179
|
+
} = React.useContext(store$6);
|
|
27954
28180
|
const handleAddressSelect = event => {
|
|
27955
28181
|
dispatch({
|
|
27956
28182
|
type: SELECT_ADDRESS,
|
|
@@ -27993,7 +28219,7 @@ const AddressSelectSubmit = _ref => {
|
|
|
27993
28219
|
selectedAddressId,
|
|
27994
28220
|
isSubmitting
|
|
27995
28221
|
}
|
|
27996
|
-
} = React.useContext(store$
|
|
28222
|
+
} = React.useContext(store$6);
|
|
27997
28223
|
const {
|
|
27998
28224
|
t
|
|
27999
28225
|
} = useTranslation("address");
|
|
@@ -28089,7 +28315,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
28089
28315
|
}
|
|
28090
28316
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
28091
28317
|
};
|
|
28092
|
-
const initialState$
|
|
28318
|
+
const initialState$5 = {
|
|
28093
28319
|
paymentMethods: [],
|
|
28094
28320
|
selectedPaymentMethodId: null,
|
|
28095
28321
|
isSubmitting: false,
|
|
@@ -28098,10 +28324,10 @@ const initialState$4 = {
|
|
|
28098
28324
|
content: ""
|
|
28099
28325
|
}
|
|
28100
28326
|
};
|
|
28101
|
-
const store$
|
|
28327
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
28102
28328
|
const {
|
|
28103
|
-
Provider: Provider$
|
|
28104
|
-
} = store$
|
|
28329
|
+
Provider: Provider$5
|
|
28330
|
+
} = store$5;
|
|
28105
28331
|
const PaymentMethodSelectContainer = _ref => {
|
|
28106
28332
|
let {
|
|
28107
28333
|
style,
|
|
@@ -28154,7 +28380,7 @@ const PaymentMethodSelectContainer = _ref => {
|
|
|
28154
28380
|
default:
|
|
28155
28381
|
return state;
|
|
28156
28382
|
}
|
|
28157
|
-
}, initialState$
|
|
28383
|
+
}, initialState$5);
|
|
28158
28384
|
React.useEffect(() => {
|
|
28159
28385
|
var _window$Pelcro$user$r3;
|
|
28160
28386
|
dispatch({
|
|
@@ -28167,16 +28393,16 @@ const PaymentMethodSelectContainer = _ref => {
|
|
|
28167
28393
|
...style
|
|
28168
28394
|
},
|
|
28169
28395
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
28170
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
28396
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
28171
28397
|
value: {
|
|
28172
28398
|
state,
|
|
28173
28399
|
dispatch
|
|
28174
28400
|
}
|
|
28175
28401
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
28176
|
-
store: store$
|
|
28402
|
+
store: store$5,
|
|
28177
28403
|
key: i
|
|
28178
28404
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
28179
|
-
store: store$
|
|
28405
|
+
store: store$5
|
|
28180
28406
|
})));
|
|
28181
28407
|
};
|
|
28182
28408
|
|
|
@@ -28190,7 +28416,7 @@ const PaymentMethodSelectList = () => {
|
|
|
28190
28416
|
paymentMethods,
|
|
28191
28417
|
selectedPaymentMethodId
|
|
28192
28418
|
}
|
|
28193
|
-
} = React.useContext(store$
|
|
28419
|
+
} = React.useContext(store$5);
|
|
28194
28420
|
const handlePaymentMethodSelect = event => {
|
|
28195
28421
|
dispatch({
|
|
28196
28422
|
type: SELECT_PAYMENT_METHOD,
|
|
@@ -28238,7 +28464,7 @@ const PaymentMethodSelectSubmit = _ref => {
|
|
|
28238
28464
|
selectedPaymentMethodId,
|
|
28239
28465
|
isSubmitting
|
|
28240
28466
|
}
|
|
28241
|
-
} = React.useContext(store$
|
|
28467
|
+
} = React.useContext(store$5);
|
|
28242
28468
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
28243
28469
|
onClick: () => {
|
|
28244
28470
|
dispatch({
|
|
@@ -28318,33 +28544,322 @@ const PaymentMethodSelectModal = _ref => {
|
|
|
28318
28544
|
};
|
|
28319
28545
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
28320
28546
|
|
|
28321
|
-
|
|
28322
|
-
|
|
28323
|
-
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
|
|
28327
|
-
|
|
28328
|
-
|
|
28329
|
-
|
|
28330
|
-
|
|
28331
|
-
|
|
28332
|
-
|
|
28333
|
-
|
|
28334
|
-
|
|
28335
|
-
|
|
28336
|
-
|
|
28337
|
-
|
|
28338
|
-
|
|
28339
|
-
|
|
28340
|
-
|
|
28341
|
-
|
|
28342
|
-
|
|
28343
|
-
|
|
28344
|
-
|
|
28345
|
-
|
|
28346
|
-
|
|
28347
|
-
|
|
28547
|
+
const initialState$4 = {
|
|
28548
|
+
paymentMethods: [],
|
|
28549
|
+
selectedPaymentMethodId: null,
|
|
28550
|
+
isSubmitting: false,
|
|
28551
|
+
deleteOption: "add",
|
|
28552
|
+
alert: {
|
|
28553
|
+
type: "error",
|
|
28554
|
+
content: ""
|
|
28555
|
+
}
|
|
28556
|
+
};
|
|
28557
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
28558
|
+
const {
|
|
28559
|
+
Provider: Provider$4
|
|
28560
|
+
} = store$4;
|
|
28561
|
+
const PaymentMethodDeleteContainer = _ref => {
|
|
28562
|
+
let {
|
|
28563
|
+
style,
|
|
28564
|
+
className = "",
|
|
28565
|
+
onSuccess = () => {},
|
|
28566
|
+
onFailure = () => {},
|
|
28567
|
+
children
|
|
28568
|
+
} = _ref;
|
|
28569
|
+
const {
|
|
28570
|
+
paymentMethodToDelete
|
|
28571
|
+
} = usePelcro();
|
|
28572
|
+
React.useEffect(() => {
|
|
28573
|
+
window.Pelcro.paymentMethods.list({
|
|
28574
|
+
auth_token: window.Pelcro.user.read().auth_token
|
|
28575
|
+
}, (err, res) => {
|
|
28576
|
+
if (err) {
|
|
28577
|
+
return console.error(err);
|
|
28578
|
+
}
|
|
28579
|
+
if (res) {
|
|
28580
|
+
dispatch({
|
|
28581
|
+
type: SET_PAYMENT_METHODS,
|
|
28582
|
+
payload: res.data
|
|
28583
|
+
});
|
|
28584
|
+
// if (res.data.length !== 1) {
|
|
28585
|
+
// dispatch({
|
|
28586
|
+
// type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28587
|
+
// payload: "select"
|
|
28588
|
+
// });
|
|
28589
|
+
// } else {
|
|
28590
|
+
// dispatch({
|
|
28591
|
+
// type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28592
|
+
// payload: "add"
|
|
28593
|
+
// });
|
|
28594
|
+
// }
|
|
28595
|
+
}
|
|
28596
|
+
});
|
|
28597
|
+
}, []);
|
|
28598
|
+
const setDefaultPaymentMethod = () => {
|
|
28599
|
+
const {
|
|
28600
|
+
selectedPaymentMethodId: paymentMethodId
|
|
28601
|
+
} = state;
|
|
28602
|
+
window.Pelcro.paymentMethods.update({
|
|
28603
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
28604
|
+
payment_method_id: paymentMethodId,
|
|
28605
|
+
is_default: true
|
|
28606
|
+
}, (err, res) => {
|
|
28607
|
+
if (err) {
|
|
28608
|
+
onFailure(err);
|
|
28609
|
+
return dispatch({
|
|
28610
|
+
type: SHOW_ALERT,
|
|
28611
|
+
payload: {
|
|
28612
|
+
type: "error",
|
|
28613
|
+
content: getErrorMessages(err)
|
|
28614
|
+
}
|
|
28615
|
+
});
|
|
28616
|
+
}
|
|
28617
|
+
deletePaymentMethod();
|
|
28618
|
+
});
|
|
28619
|
+
};
|
|
28620
|
+
const deletePaymentMethod = () => {
|
|
28621
|
+
const {
|
|
28622
|
+
id: paymentMethodId
|
|
28623
|
+
} = paymentMethodToDelete;
|
|
28624
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
28625
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
28626
|
+
payment_method_id: paymentMethodId
|
|
28627
|
+
}, (err, res) => {
|
|
28628
|
+
if (err) {
|
|
28629
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
28630
|
+
}
|
|
28631
|
+
dispatch({
|
|
28632
|
+
type: SHOW_ALERT,
|
|
28633
|
+
payload: {
|
|
28634
|
+
type: "success",
|
|
28635
|
+
content: "messages.sourceUpdated"
|
|
28636
|
+
}
|
|
28637
|
+
});
|
|
28638
|
+
onSuccess(res);
|
|
28639
|
+
});
|
|
28640
|
+
};
|
|
28641
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
28642
|
+
switch (action.type) {
|
|
28643
|
+
case SELECT_PAYMENT_METHOD:
|
|
28644
|
+
return lib_7({
|
|
28645
|
+
...state,
|
|
28646
|
+
selectedPaymentMethodId: action.payload
|
|
28647
|
+
});
|
|
28648
|
+
case HANDLE_SUBMIT:
|
|
28649
|
+
return lib_5({
|
|
28650
|
+
...state,
|
|
28651
|
+
isSubmitting: true
|
|
28652
|
+
}, (state, dispatch) => setDefaultPaymentMethod());
|
|
28653
|
+
case SET_DELETE_PAYMENT_METHOD_OPTION:
|
|
28654
|
+
return lib_7({
|
|
28655
|
+
...state,
|
|
28656
|
+
deleteOption: action.payload
|
|
28657
|
+
});
|
|
28658
|
+
case SET_PAYMENT_METHODS:
|
|
28659
|
+
return lib_7({
|
|
28660
|
+
...state,
|
|
28661
|
+
paymentMethods: action.payload
|
|
28662
|
+
});
|
|
28663
|
+
default:
|
|
28664
|
+
return state;
|
|
28665
|
+
}
|
|
28666
|
+
}, initialState$4);
|
|
28667
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28668
|
+
style: {
|
|
28669
|
+
...style
|
|
28670
|
+
},
|
|
28671
|
+
className: `pelcro-container pelcro-payment-method-delete-container ${className}`
|
|
28672
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
28673
|
+
value: {
|
|
28674
|
+
state,
|
|
28675
|
+
dispatch
|
|
28676
|
+
}
|
|
28677
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
28678
|
+
store: store$4,
|
|
28679
|
+
key: i
|
|
28680
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
28681
|
+
store: store$4
|
|
28682
|
+
})));
|
|
28683
|
+
};
|
|
28684
|
+
|
|
28685
|
+
const PaymentMethodDeleteSubmit = _ref => {
|
|
28686
|
+
let {
|
|
28687
|
+
name,
|
|
28688
|
+
onClick,
|
|
28689
|
+
...otherProps
|
|
28690
|
+
} = _ref;
|
|
28691
|
+
const {
|
|
28692
|
+
t
|
|
28693
|
+
} = useTranslation("paymentMethod");
|
|
28694
|
+
const {
|
|
28695
|
+
dispatch,
|
|
28696
|
+
state: {
|
|
28697
|
+
selectedPaymentMethodId,
|
|
28698
|
+
isSubmitting
|
|
28699
|
+
}
|
|
28700
|
+
} = React.useContext(store$4);
|
|
28701
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
28702
|
+
onClick: () => {
|
|
28703
|
+
dispatch({
|
|
28704
|
+
type: HANDLE_SUBMIT
|
|
28705
|
+
});
|
|
28706
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
28707
|
+
},
|
|
28708
|
+
disabled: !selectedPaymentMethodId,
|
|
28709
|
+
isLoading: isSubmitting,
|
|
28710
|
+
className: "plc-w-full"
|
|
28711
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("select.buttons.selectPaymentMethod"));
|
|
28712
|
+
};
|
|
28713
|
+
|
|
28714
|
+
const PaymentMethodDeleteList = props => {
|
|
28715
|
+
const {
|
|
28716
|
+
t
|
|
28717
|
+
} = useTranslation("paymentMethod");
|
|
28718
|
+
const {
|
|
28719
|
+
dispatch,
|
|
28720
|
+
state: {
|
|
28721
|
+
deleteOption,
|
|
28722
|
+
selectedPaymentMethodId,
|
|
28723
|
+
paymentMethods
|
|
28724
|
+
}
|
|
28725
|
+
} = React.useContext(store$4);
|
|
28726
|
+
const {
|
|
28727
|
+
paymentMethodToDelete
|
|
28728
|
+
} = usePelcro();
|
|
28729
|
+
const handlePaymentMethodSelect = event => {
|
|
28730
|
+
dispatch({
|
|
28731
|
+
type: SELECT_PAYMENT_METHOD,
|
|
28732
|
+
payload: event.target.value
|
|
28733
|
+
});
|
|
28734
|
+
};
|
|
28735
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, paymentMethods && deleteOption === "select" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28736
|
+
className: "plc-px-3 plc-py-2 plc-space-y-4 plc-overflow-y-scroll plc-max-h-80 pelcro-payment-method-select-wrapper"
|
|
28737
|
+
}, paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => {
|
|
28738
|
+
var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4;
|
|
28739
|
+
const isSelected = selectedPaymentMethodId === String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
28740
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28741
|
+
key: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
|
|
28742
|
+
className: `plc-p-2 plc-pl-4 plc-shadow-md plc-text-gray-900 plc-rounded pelcro-payment-method-wrapper`
|
|
28743
|
+
}, /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
28744
|
+
className: "plc-flex plc-items-center pelcro-select-payment-method-radio",
|
|
28745
|
+
labelClassName: "plc-flex plc-items-center plc-space-x-2 plc-cursor-pointer plc-w-full",
|
|
28746
|
+
id: `pelcro-payment-method-select-${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id}`,
|
|
28747
|
+
name: "paymentMethod",
|
|
28748
|
+
checked: isSelected,
|
|
28749
|
+
value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
|
|
28750
|
+
onChange: handlePaymentMethodSelect
|
|
28751
|
+
}, getPaymentCardIcon$1((_paymentMethod$proper = paymentMethod.properties) === null || _paymentMethod$proper === void 0 ? void 0 : _paymentMethod$proper.brand), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28752
|
+
className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
|
|
28753
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
28754
|
+
className: "plc-font-semibold"
|
|
28755
|
+
}, "\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['default'].createElement("p", {
|
|
28756
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
28757
|
+
}, 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))));
|
|
28758
|
+
})), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteSubmit, null)), deleteOption === "add" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
|
|
28759
|
+
type: "deletePaymentSource",
|
|
28760
|
+
showCoupon: false,
|
|
28761
|
+
showExternalPaymentMethods: false,
|
|
28762
|
+
showApplePayButton: false,
|
|
28763
|
+
onDisplay: props.onDisplay,
|
|
28764
|
+
onFailure: props.onFailure,
|
|
28765
|
+
onSuccess: props.onSuccess,
|
|
28766
|
+
setAsDefault: true
|
|
28767
|
+
}));
|
|
28768
|
+
};
|
|
28769
|
+
|
|
28770
|
+
const PaymentMethodDeleteOptions = _ref => {
|
|
28771
|
+
const {
|
|
28772
|
+
state: {
|
|
28773
|
+
deleteOption,
|
|
28774
|
+
paymentMethods
|
|
28775
|
+
},
|
|
28776
|
+
dispatch
|
|
28777
|
+
} = React.useContext(store$4);
|
|
28778
|
+
const {
|
|
28779
|
+
t
|
|
28780
|
+
} = useTranslation("paymentMethod");
|
|
28781
|
+
const handleOptionSelect = event => {
|
|
28782
|
+
dispatch({
|
|
28783
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28784
|
+
payload: event.target.value
|
|
28785
|
+
});
|
|
28786
|
+
};
|
|
28787
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28788
|
+
className: "plc-text-left plc-mr-auto plc-mb-6"
|
|
28789
|
+
}, /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
28790
|
+
onChange: handleOptionSelect,
|
|
28791
|
+
checked: deleteOption === "add",
|
|
28792
|
+
value: "add"
|
|
28793
|
+
}, t("delete.options.add")));
|
|
28794
|
+
};
|
|
28795
|
+
|
|
28796
|
+
function PaymentMethodDeleteView() {
|
|
28797
|
+
const [t] = useTranslation("paymentMethod");
|
|
28798
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28799
|
+
id: "pelcro-payment-method-delete-view"
|
|
28800
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28801
|
+
className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
28802
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
28803
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
28804
|
+
}, t("delete.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("delete.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteContainer, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteOptions, null), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteList, null)));
|
|
28805
|
+
}
|
|
28806
|
+
|
|
28807
|
+
const PaymentMethodDeleteModal = props => {
|
|
28808
|
+
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
28809
|
+
const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
|
|
28810
|
+
const onSuccess = res => {
|
|
28811
|
+
var _props$onSuccess;
|
|
28812
|
+
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
28813
|
+
if (enableReactGA4) {
|
|
28814
|
+
ReactGA4.event("Delete payment card", {
|
|
28815
|
+
nonInteraction: true
|
|
28816
|
+
});
|
|
28817
|
+
} else {
|
|
28818
|
+
var _ReactGA$event;
|
|
28819
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
28820
|
+
category: "ACTIONS",
|
|
28821
|
+
action: "Delete payment card",
|
|
28822
|
+
nonInteraction: true
|
|
28823
|
+
});
|
|
28824
|
+
}
|
|
28825
|
+
};
|
|
28826
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
28827
|
+
id: "pelcro-payment-method-delete-modal",
|
|
28828
|
+
onDisplay: props.onDisplay,
|
|
28829
|
+
onClose: props.onClose
|
|
28830
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteView, Object.assign({}, props, {
|
|
28831
|
+
onSuccess: onSuccess
|
|
28832
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
28833
|
+
};
|
|
28834
|
+
PaymentMethodDeleteModal.viewId = "payment-method-delete";
|
|
28835
|
+
|
|
28836
|
+
function _extends$i() {
|
|
28837
|
+
_extends$i = Object.assign || function (target) {
|
|
28838
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
28839
|
+
var source = arguments[i];
|
|
28840
|
+
|
|
28841
|
+
for (var key in source) {
|
|
28842
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
28843
|
+
target[key] = source[key];
|
|
28844
|
+
}
|
|
28845
|
+
}
|
|
28846
|
+
}
|
|
28847
|
+
|
|
28848
|
+
return target;
|
|
28849
|
+
};
|
|
28850
|
+
|
|
28851
|
+
return _extends$i.apply(this, arguments);
|
|
28852
|
+
}
|
|
28853
|
+
|
|
28854
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
28855
|
+
if (source == null) return {};
|
|
28856
|
+
var target = {};
|
|
28857
|
+
var sourceKeys = Object.keys(source);
|
|
28858
|
+
var key, i;
|
|
28859
|
+
|
|
28860
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
28861
|
+
key = sourceKeys[i];
|
|
28862
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
28348
28863
|
target[key] = source[key];
|
|
28349
28864
|
}
|
|
28350
28865
|
|
|
@@ -28517,7 +29032,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
28517
29032
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
28518
29033
|
return null;
|
|
28519
29034
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
28520
|
-
return _render(_extends$
|
|
29035
|
+
return _render(_extends$i({}, _rest, {
|
|
28521
29036
|
hidden: true,
|
|
28522
29037
|
style: {
|
|
28523
29038
|
display: 'none'
|
|
@@ -29045,7 +29560,7 @@ function TransitionChild(props) {
|
|
|
29045
29560
|
var passthroughProps = rest;
|
|
29046
29561
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
29047
29562
|
value: nesting
|
|
29048
|
-
}, render(_extends$
|
|
29563
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
29049
29564
|
}
|
|
29050
29565
|
|
|
29051
29566
|
function Transition(props) {
|
|
@@ -29089,7 +29604,7 @@ function Transition(props) {
|
|
|
29089
29604
|
value: nestingBag
|
|
29090
29605
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
29091
29606
|
value: transitionBag
|
|
29092
|
-
}, render(_extends$
|
|
29607
|
+
}, render(_extends$i({}, sharedProps, {
|
|
29093
29608
|
as: React.Fragment,
|
|
29094
29609
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
29095
29610
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -29216,12 +29731,12 @@ var ActionTypes;
|
|
|
29216
29731
|
})(ActionTypes || (ActionTypes = {}));
|
|
29217
29732
|
|
|
29218
29733
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
29219
|
-
return _extends$
|
|
29734
|
+
return _extends$i({}, state, {
|
|
29220
29735
|
activeItemIndex: null,
|
|
29221
29736
|
menuState: MenuStates.Closed
|
|
29222
29737
|
});
|
|
29223
29738
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
29224
|
-
return _extends$
|
|
29739
|
+
return _extends$i({}, state, {
|
|
29225
29740
|
menuState: MenuStates.Open
|
|
29226
29741
|
});
|
|
29227
29742
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -29240,7 +29755,7 @@ var ActionTypes;
|
|
|
29240
29755
|
}
|
|
29241
29756
|
});
|
|
29242
29757
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
29243
|
-
return _extends$
|
|
29758
|
+
return _extends$i({}, state, {
|
|
29244
29759
|
searchQuery: '',
|
|
29245
29760
|
activeItemIndex: activeItemIndex
|
|
29246
29761
|
});
|
|
@@ -29251,19 +29766,19 @@ var ActionTypes;
|
|
|
29251
29766
|
|
|
29252
29767
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
29253
29768
|
});
|
|
29254
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
29769
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
29255
29770
|
searchQuery: searchQuery
|
|
29256
29771
|
});
|
|
29257
|
-
return _extends$
|
|
29772
|
+
return _extends$i({}, state, {
|
|
29258
29773
|
searchQuery: searchQuery,
|
|
29259
29774
|
activeItemIndex: match
|
|
29260
29775
|
});
|
|
29261
29776
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
29262
|
-
return _extends$
|
|
29777
|
+
return _extends$i({}, state, {
|
|
29263
29778
|
searchQuery: ''
|
|
29264
29779
|
});
|
|
29265
29780
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
29266
|
-
return _extends$
|
|
29781
|
+
return _extends$i({}, state, {
|
|
29267
29782
|
items: [].concat(state.items, [{
|
|
29268
29783
|
id: action.id,
|
|
29269
29784
|
dataRef: action.dataRef
|
|
@@ -29276,7 +29791,7 @@ var ActionTypes;
|
|
|
29276
29791
|
return a.id === action.id;
|
|
29277
29792
|
});
|
|
29278
29793
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
29279
|
-
return _extends$
|
|
29794
|
+
return _extends$i({}, state, {
|
|
29280
29795
|
items: nextItems,
|
|
29281
29796
|
activeItemIndex: function () {
|
|
29282
29797
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -29315,19 +29830,19 @@ var ActionTypes$1;
|
|
|
29315
29830
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
29316
29831
|
if (state.disabled) return state;
|
|
29317
29832
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
29318
|
-
return _extends$
|
|
29833
|
+
return _extends$i({}, state, {
|
|
29319
29834
|
activeOptionIndex: null,
|
|
29320
29835
|
listboxState: ListboxStates.Closed
|
|
29321
29836
|
});
|
|
29322
29837
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
29323
29838
|
if (state.disabled) return state;
|
|
29324
29839
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
29325
|
-
return _extends$
|
|
29840
|
+
return _extends$i({}, state, {
|
|
29326
29841
|
listboxState: ListboxStates.Open
|
|
29327
29842
|
});
|
|
29328
29843
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
29329
29844
|
if (state.disabled === action.disabled) return state;
|
|
29330
|
-
return _extends$
|
|
29845
|
+
return _extends$i({}, state, {
|
|
29331
29846
|
disabled: action.disabled
|
|
29332
29847
|
});
|
|
29333
29848
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -29348,7 +29863,7 @@ var ActionTypes$1;
|
|
|
29348
29863
|
}
|
|
29349
29864
|
});
|
|
29350
29865
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
29351
|
-
return _extends$
|
|
29866
|
+
return _extends$i({}, state, {
|
|
29352
29867
|
searchQuery: '',
|
|
29353
29868
|
activeOptionIndex: activeOptionIndex
|
|
29354
29869
|
});
|
|
@@ -29361,10 +29876,10 @@ var ActionTypes$1;
|
|
|
29361
29876
|
|
|
29362
29877
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
29363
29878
|
});
|
|
29364
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
29879
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
29365
29880
|
searchQuery: searchQuery
|
|
29366
29881
|
});
|
|
29367
|
-
return _extends$
|
|
29882
|
+
return _extends$i({}, state, {
|
|
29368
29883
|
searchQuery: searchQuery,
|
|
29369
29884
|
activeOptionIndex: match
|
|
29370
29885
|
});
|
|
@@ -29372,11 +29887,11 @@ var ActionTypes$1;
|
|
|
29372
29887
|
if (state.disabled) return state;
|
|
29373
29888
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
29374
29889
|
if (state.searchQuery === '') return state;
|
|
29375
|
-
return _extends$
|
|
29890
|
+
return _extends$i({}, state, {
|
|
29376
29891
|
searchQuery: ''
|
|
29377
29892
|
});
|
|
29378
29893
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
29379
|
-
return _extends$
|
|
29894
|
+
return _extends$i({}, state, {
|
|
29380
29895
|
options: [].concat(state.options, [{
|
|
29381
29896
|
id: action.id,
|
|
29382
29897
|
dataRef: action.dataRef
|
|
@@ -29389,7 +29904,7 @@ var ActionTypes$1;
|
|
|
29389
29904
|
return a.id === action.id;
|
|
29390
29905
|
});
|
|
29391
29906
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
29392
|
-
return _extends$
|
|
29907
|
+
return _extends$i({}, state, {
|
|
29393
29908
|
options: nextOptions,
|
|
29394
29909
|
activeOptionIndex: function () {
|
|
29395
29910
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -29408,6 +29923,7 @@ var GroupContext = /*#__PURE__*/React.createContext(null);
|
|
|
29408
29923
|
GroupContext.displayName = 'GroupContext';
|
|
29409
29924
|
|
|
29410
29925
|
const getPaymentCardIcon = name => {
|
|
29926
|
+
var _icons$name$toLowerCa;
|
|
29411
29927
|
const icons = {
|
|
29412
29928
|
visa: /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
29413
29929
|
className: "plc-w-12",
|
|
@@ -29434,7 +29950,7 @@ const getPaymentCardIcon = name => {
|
|
|
29434
29950
|
d: "M 5 7 C 2.25 7 0 9.25 0 12 L 0 38 C 0 40.75 2.25 43 5 43 L 45 43 C 47.75 43 50 40.75 50 38 L 50 12 C 50 9.25 47.75 7 45 7 Z M 5 9 L 45 9 C 46.667969 9 48 10.332031 48 12 L 48 38 C 48 39.667969 46.667969 41 45 41 L 5 41 C 3.332031 41 2 39.667969 2 38 L 2 12 C 2 10.332031 3.332031 9 5 9 Z M 8.5625 19.90625 L 4.84375 28.40625 L 7.0625 28.40625 L 7.875 26.5 L 12.0625 26.5 L 12.875 28.40625 L 17.09375 28.40625 L 17.09375 22.09375 L 19.90625 28.40625 L 21.8125 28.40625 L 24.65625 22.1875 L 24.65625 28.40625 L 26.75 28.40625 L 26.75 19.90625 L 23.40625 19.90625 L 20.84375 25.625 L 18.28125 19.90625 L 15 19.90625 L 15 28.09375 L 11.34375 19.90625 Z M 29.5 19.90625 L 29.5 28.4375 L 37.5 28.4375 L 40 25.59375 L 42.46875 28.4375 L 45.125 28.4375 L 41.375 24.0625 L 45.125 19.90625 L 42.46875 19.90625 L 40.0625 22.5625 L 37.75 19.90625 Z M 9.90625 21.6875 L 11.21875 24.6875 L 8.65625 24.6875 Z M 31.5625 21.71875 L 36.65625 21.75 L 38.6875 24.0625 L 36.40625 26.625 L 31.5625 26.625 L 31.5625 24.9375 L 36.1875 24.9375 L 36.1875 23.3125 L 31.5625 23.3125 Z"
|
|
29435
29951
|
}))
|
|
29436
29952
|
};
|
|
29437
|
-
return name
|
|
29953
|
+
return (_icons$name$toLowerCa = icons[name.toLowerCase()]) !== null && _icons$name$toLowerCa !== void 0 ? _icons$name$toLowerCa : /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
29438
29954
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29439
29955
|
className: "plc-w-12",
|
|
29440
29956
|
fill: "none",
|
|
@@ -29448,16 +29964,16 @@ const getPaymentCardIcon = name => {
|
|
|
29448
29964
|
}));
|
|
29449
29965
|
};
|
|
29450
29966
|
|
|
29451
|
-
var _path$
|
|
29452
|
-
function _extends$
|
|
29967
|
+
var _path$h;
|
|
29968
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
29453
29969
|
function SvgChevronRight(props) {
|
|
29454
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
29970
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
29455
29971
|
className: "plc-w-6 plc-h-6",
|
|
29456
29972
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29457
29973
|
fill: "none",
|
|
29458
29974
|
viewBox: "0 0 24 24",
|
|
29459
29975
|
stroke: "currentColor"
|
|
29460
|
-
}, props), _path$
|
|
29976
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29461
29977
|
strokeLinecap: "round",
|
|
29462
29978
|
strokeLinejoin: "round",
|
|
29463
29979
|
strokeWidth: 2,
|
|
@@ -29686,16 +30202,16 @@ const SavedItems = _ref3 => {
|
|
|
29686
30202
|
});
|
|
29687
30203
|
};
|
|
29688
30204
|
|
|
29689
|
-
var _path$
|
|
29690
|
-
function _extends$
|
|
30205
|
+
var _path$g;
|
|
30206
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
29691
30207
|
function SvgRefresh(props) {
|
|
29692
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30208
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
29693
30209
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
29694
30210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29695
30211
|
fill: "none",
|
|
29696
30212
|
viewBox: "0 0 24 24",
|
|
29697
30213
|
stroke: "currentColor"
|
|
29698
|
-
}, props), _path$
|
|
30214
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29699
30215
|
strokeLinecap: "round",
|
|
29700
30216
|
strokeLinejoin: "round",
|
|
29701
30217
|
strokeWidth: 2,
|
|
@@ -29703,31 +30219,31 @@ function SvgRefresh(props) {
|
|
|
29703
30219
|
})));
|
|
29704
30220
|
}
|
|
29705
30221
|
|
|
29706
|
-
var _path$
|
|
29707
|
-
function _extends$
|
|
30222
|
+
var _path$f;
|
|
30223
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
29708
30224
|
function SvgCalendar(props) {
|
|
29709
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30225
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
29710
30226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29711
30227
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
29712
30228
|
viewBox: "0 0 20 20",
|
|
29713
30229
|
fill: "currentColor"
|
|
29714
|
-
}, props), _path$
|
|
30230
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29715
30231
|
fillRule: "evenodd",
|
|
29716
30232
|
d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
|
|
29717
30233
|
clipRule: "evenodd"
|
|
29718
30234
|
})));
|
|
29719
30235
|
}
|
|
29720
30236
|
|
|
29721
|
-
var _path$
|
|
29722
|
-
function _extends$
|
|
30237
|
+
var _path$e;
|
|
30238
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
29723
30239
|
function SvgPlus(props) {
|
|
29724
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30240
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
29725
30241
|
className: "plc-w-5 plc-h-5",
|
|
29726
30242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29727
30243
|
fill: "none",
|
|
29728
30244
|
viewBox: "0 0 24 24",
|
|
29729
30245
|
stroke: "currentColor"
|
|
29730
|
-
}, props), _path$
|
|
30246
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29731
30247
|
strokeLinecap: "round",
|
|
29732
30248
|
strokeLinejoin: "round",
|
|
29733
30249
|
strokeWidth: 2,
|
|
@@ -30090,16 +30606,16 @@ Accordion.item = function AccordionItem(_ref2) {
|
|
|
30090
30606
|
}, content)) : null;
|
|
30091
30607
|
};
|
|
30092
30608
|
|
|
30093
|
-
var _path$
|
|
30094
|
-
function _extends$
|
|
30609
|
+
var _path$d;
|
|
30610
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
30095
30611
|
function SvgExit(props) {
|
|
30096
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30612
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
30097
30613
|
className: "plc-w-6 plc-h-6",
|
|
30098
30614
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30099
30615
|
fill: "none",
|
|
30100
30616
|
viewBox: "0 0 24 24",
|
|
30101
30617
|
stroke: "currentColor"
|
|
30102
|
-
}, props), _path$
|
|
30618
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30103
30619
|
strokeLinecap: "round",
|
|
30104
30620
|
strokeLinejoin: "round",
|
|
30105
30621
|
strokeWidth: 2,
|
|
@@ -30107,15 +30623,15 @@ function SvgExit(props) {
|
|
|
30107
30623
|
})));
|
|
30108
30624
|
}
|
|
30109
30625
|
|
|
30110
|
-
var _path$
|
|
30111
|
-
function _extends$
|
|
30626
|
+
var _path$c;
|
|
30627
|
+
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
30112
30628
|
function SvgUser(props) {
|
|
30113
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30629
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
30114
30630
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30115
30631
|
fill: "none",
|
|
30116
30632
|
viewBox: "0 0 24 24",
|
|
30117
30633
|
stroke: "currentColor"
|
|
30118
|
-
}, props), _path$
|
|
30634
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30119
30635
|
strokeLinecap: "round",
|
|
30120
30636
|
strokeLinejoin: "round",
|
|
30121
30637
|
strokeWidth: 2,
|
|
@@ -30123,16 +30639,16 @@ function SvgUser(props) {
|
|
|
30123
30639
|
})));
|
|
30124
30640
|
}
|
|
30125
30641
|
|
|
30126
|
-
var _path$
|
|
30127
|
-
function _extends$
|
|
30642
|
+
var _path$b;
|
|
30643
|
+
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
30128
30644
|
function SvgNewsletter(props) {
|
|
30129
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30645
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
30130
30646
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30131
30647
|
className: "plc-h-5 plc-w-5",
|
|
30132
30648
|
fill: "none",
|
|
30133
30649
|
viewBox: "0 0 24 24",
|
|
30134
30650
|
stroke: "currentColor"
|
|
30135
|
-
}, props), _path$
|
|
30651
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30136
30652
|
strokeLinecap: "round",
|
|
30137
30653
|
strokeLinejoin: "round",
|
|
30138
30654
|
strokeWidth: 2,
|
|
@@ -30140,16 +30656,16 @@ function SvgNewsletter(props) {
|
|
|
30140
30656
|
})));
|
|
30141
30657
|
}
|
|
30142
30658
|
|
|
30143
|
-
var _path$
|
|
30144
|
-
function _extends$
|
|
30659
|
+
var _path$a;
|
|
30660
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
30145
30661
|
function SvgDocument(props) {
|
|
30146
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30662
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
30147
30663
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30148
30664
|
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
30149
30665
|
fill: "none",
|
|
30150
30666
|
viewBox: "0 0 24 24",
|
|
30151
30667
|
stroke: "currentColor"
|
|
30152
|
-
}, props), _path$
|
|
30668
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30153
30669
|
strokeLinecap: "round",
|
|
30154
30670
|
strokeLinejoin: "round",
|
|
30155
30671
|
strokeWidth: 2,
|
|
@@ -30157,16 +30673,16 @@ function SvgDocument(props) {
|
|
|
30157
30673
|
})));
|
|
30158
30674
|
}
|
|
30159
30675
|
|
|
30160
|
-
var _path$
|
|
30161
|
-
function _extends$
|
|
30676
|
+
var _path$9;
|
|
30677
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
30162
30678
|
function SvgPaymentCard(props) {
|
|
30163
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30679
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
30164
30680
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30165
30681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30166
30682
|
fill: "none",
|
|
30167
30683
|
viewBox: "0 0 24 24",
|
|
30168
30684
|
stroke: "currentColor"
|
|
30169
|
-
}, props), _path$
|
|
30685
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30170
30686
|
strokeLinecap: "round",
|
|
30171
30687
|
strokeLinejoin: "round",
|
|
30172
30688
|
strokeWidth: 2,
|
|
@@ -30174,16 +30690,16 @@ function SvgPaymentCard(props) {
|
|
|
30174
30690
|
})));
|
|
30175
30691
|
}
|
|
30176
30692
|
|
|
30177
|
-
var _path$
|
|
30178
|
-
function _extends$
|
|
30693
|
+
var _path$8, _path2;
|
|
30694
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
30179
30695
|
function SvgLocationPin(props) {
|
|
30180
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30696
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
30181
30697
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30182
30698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30183
30699
|
fill: "none",
|
|
30184
30700
|
viewBox: "0 0 24 24",
|
|
30185
30701
|
stroke: "currentColor"
|
|
30186
|
-
}, props), _path$
|
|
30702
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30187
30703
|
strokeLinecap: "round",
|
|
30188
30704
|
strokeLinejoin: "round",
|
|
30189
30705
|
strokeWidth: 2,
|
|
@@ -30196,16 +30712,16 @@ function SvgLocationPin(props) {
|
|
|
30196
30712
|
})));
|
|
30197
30713
|
}
|
|
30198
30714
|
|
|
30199
|
-
var _path$
|
|
30200
|
-
function _extends$
|
|
30715
|
+
var _path$7;
|
|
30716
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
30201
30717
|
function SvgShopping(props) {
|
|
30202
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30718
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
30203
30719
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30204
30720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30205
30721
|
fill: "none",
|
|
30206
30722
|
viewBox: "0 0 24 24",
|
|
30207
30723
|
stroke: "currentColor"
|
|
30208
|
-
}, props), _path$
|
|
30724
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30209
30725
|
strokeLinecap: "round",
|
|
30210
30726
|
strokeLinejoin: "round",
|
|
30211
30727
|
strokeWidth: 2,
|
|
@@ -30213,16 +30729,16 @@ function SvgShopping(props) {
|
|
|
30213
30729
|
})));
|
|
30214
30730
|
}
|
|
30215
30731
|
|
|
30216
|
-
var _path$
|
|
30217
|
-
function _extends$
|
|
30732
|
+
var _path$6;
|
|
30733
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
30218
30734
|
function SvgBookmark(props) {
|
|
30219
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30735
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
30220
30736
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30221
30737
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30222
30738
|
fill: "none",
|
|
30223
30739
|
viewBox: "0 0 24 24",
|
|
30224
30740
|
stroke: "currentColor"
|
|
30225
|
-
}, props), _path$
|
|
30741
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30226
30742
|
strokeLinecap: "round",
|
|
30227
30743
|
strokeLinejoin: "round",
|
|
30228
30744
|
strokeWidth: 2,
|
|
@@ -30230,63 +30746,76 @@ function SvgBookmark(props) {
|
|
|
30230
30746
|
})));
|
|
30231
30747
|
}
|
|
30232
30748
|
|
|
30233
|
-
var _path$
|
|
30234
|
-
function _extends$
|
|
30749
|
+
var _path$5;
|
|
30750
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
30235
30751
|
function SvgKey(props) {
|
|
30236
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30752
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
30237
30753
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30238
30754
|
viewBox: "0 0 20 20",
|
|
30239
30755
|
fill: "currentColor"
|
|
30240
|
-
}, props), _path$
|
|
30756
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30241
30757
|
fillRule: "evenodd",
|
|
30242
30758
|
d: "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
|
|
30243
30759
|
clipRule: "evenodd"
|
|
30244
30760
|
})));
|
|
30245
30761
|
}
|
|
30246
30762
|
|
|
30247
|
-
var _path$
|
|
30248
|
-
function _extends$
|
|
30763
|
+
var _path$4;
|
|
30764
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
30249
30765
|
function SvgDonate(props) {
|
|
30250
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30766
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
30251
30767
|
width: 24,
|
|
30252
30768
|
height: 24,
|
|
30253
30769
|
fill: "currentColor",
|
|
30254
30770
|
xmlns: "http://www.w3.org/2000/svg"
|
|
30255
|
-
}, props), _path$
|
|
30771
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30256
30772
|
d: "M4 21h9.62a3.995 3.995 0 003.037-1.397l5.102-5.952a1 1 0 00-.442-1.6l-1.968-.656a3.043 3.043 0 00-2.823.503l-3.185 2.547-.617-1.235A3.98 3.98 0 009.146 11H4c-1.103 0-2 .897-2 2v6c0 1.103.897 2 2 2zm0-8h5.146c.763 0 1.448.423 1.789 1.105l.447.895H7v2h6.014a.996.996 0 00.442-.11l.003-.001.004-.002h.003l.002-.001h.004l.001-.001c.009.003.003-.001.003-.001.01 0 .002-.001.002-.001h.001l.002-.001.003-.001.002-.001.002-.001.003-.001.002-.001c.003 0 .001-.001.002-.001l.003-.002.002-.001.002-.001.003-.001.002-.001h.001l.002-.001h.001l.002-.001.002-.001c.009-.001.003-.001.003-.001l.002-.001a.915.915 0 00.11-.078l4.146-3.317c.262-.208.623-.273.94-.167l.557.186-4.133 4.823a2.029 2.029 0 01-1.52.688H4v-6zM16 2h-.017c-.163.002-1.006.039-1.983.705-.951-.648-1.774-.7-1.968-.704L12.002 2h-.004c-.801 0-1.555.313-2.119.878C9.313 3.445 9 4.198 9 5s.313 1.555.861 2.104l3.414 3.586a1.006 1.006 0 001.45-.001l3.396-3.568C18.688 6.555 19 5.802 19 5s-.313-1.555-.878-2.121A2.978 2.978 0 0016.002 2H16zm1 3c0 .267-.104.518-.311.725L14 8.55l-2.707-2.843C11.104 5.518 11 5.267 11 5s.104-.518.294-.708A.977.977 0 0111.979 4c.025.001.502.032 1.067.485.081.065.163.139.247.222l.707.707.707-.707c.084-.083.166-.157.247-.222.529-.425.976-.478 1.052-.484a.987.987 0 01.701.292c.189.189.293.44.293.707z"
|
|
30257
30773
|
})));
|
|
30258
30774
|
}
|
|
30259
30775
|
|
|
30260
|
-
var _path$
|
|
30261
|
-
function _extends$
|
|
30776
|
+
var _path$3;
|
|
30777
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
30262
30778
|
function SvgMemberships(props) {
|
|
30263
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30779
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
30264
30780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30265
30781
|
fill: "none",
|
|
30266
30782
|
strokeWidth: 1.5,
|
|
30267
30783
|
stroke: "currentColor",
|
|
30268
30784
|
width: 24,
|
|
30269
30785
|
height: 24
|
|
30270
|
-
}, props), _path$
|
|
30786
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30271
30787
|
strokeLinecap: "round",
|
|
30272
30788
|
strokeLinejoin: "round",
|
|
30273
30789
|
d: "M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5zm6-10.125a1.875 1.875 0 11-3.75 0 1.875 1.875 0 013.75 0zm1.294 6.336a6.721 6.721 0 01-3.17.789 6.721 6.721 0 01-3.168-.789 3.376 3.376 0 016.338 0z"
|
|
30274
30790
|
})));
|
|
30275
30791
|
}
|
|
30276
30792
|
|
|
30277
|
-
var _path$
|
|
30278
|
-
function _extends$
|
|
30793
|
+
var _path$2;
|
|
30794
|
+
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
30279
30795
|
function SvgQrcode(props) {
|
|
30280
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30796
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
30281
30797
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30282
30798
|
width: 682.667,
|
|
30283
30799
|
height: 682.667,
|
|
30284
30800
|
viewBox: "0 0 512 512"
|
|
30285
|
-
}, props), _path$
|
|
30801
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30286
30802
|
d: "M93.5 62.4c-15.7 3.9-28 16.6-31.4 32.4-.7 3.3-1.1 17.2-1.1 36.4 0 29.1.1 31.4 2 35.3 5.3 11 21.2 11.1 26.4.1 1.4-2.9 1.6-7.9 1.6-34.6 0-34.4.1-35.3 6.3-39 3-1.9 5.2-2 34.5-2 26.9 0 31.9-.2 34.8-1.6 11-5.2 10.9-21.1-.1-26.4-3.9-1.9-6.1-2-36.1-1.9-21.8 0-33.5.5-36.9 1.3zM345.4 63c-10.9 5.4-10.9 21.2 0 26.4 2.9 1.4 7.9 1.6 34.8 1.6 29.3 0 31.5.1 34.5 2 6.2 3.7 6.3 4.6 6.3 39 0 26.7.2 31.7 1.6 34.6 5.2 11 21.1 10.9 26.4-.1 1.9-3.9 2-6.2 2-35.3 0-19.2-.4-33.1-1.1-36.4-3.5-16.2-16.5-29.2-32.7-32.7-3.3-.7-17.2-1.1-36.5-1.1-29.3 0-31.5.1-35.3 2zM146 128.9c-6.9 2.1-12.1 6.5-15.6 13.1-1.8 3.2-1.9 6.3-1.9 38.5 0 34.2 0 35.1 2.2 39.1 2.8 5.3 9.1 10.7 14.2 12.2 2.5.8 14.4 1.2 35.8 1.2 36.3 0 38.3-.3 45.2-7.2 6.8-6.9 7.1-8.9 7.1-45.1 0-22.2-.4-33.2-1.2-36.1-1.8-6-10-13.9-16-15.4-5.3-1.3-65.5-1.6-69.8-.3zm57 51.6V203h-45v-45h45v22.5zM297 128.9c-8 2.5-14.9 9.2-16.9 16.4-.9 2.9-1.1 14.3-.9 37.7.3 37.2.2 36.2 7.4 43.3 6.6 6.4 8.8 6.7 45 6.7 35.6 0 38-.3 44.2-6.3 1.9-1.8 4.3-5 5.5-7.2 2.1-3.9 2.2-5 2.2-39s-.1-35.1-2.2-39c-2.5-4.7-6.4-8.5-11.3-11.1-3.2-1.7-6.4-1.9-37-2.1-18.4-.1-34.6.2-36 .6zm57 51.6V203h-45v-45h45v22.5zM144.1 280.3c-4.8 1.8-10.8 7.2-13.4 12-2.2 4.1-2.2 4.9-2.2 39.2 0 34 .1 35.1 2.2 39 2.5 4.7 6.4 8.5 11.3 11.1 3.2 1.7 6.6 1.9 35.5 2.2 38.9.4 40.7.2 48-7.2 3.2-3.2 5.5-6.6 6.3-9.2.8-2.9 1.2-13.9 1.2-36.1 0-35.8-.4-38.3-6.6-44.7-7-7.2-6-7.1-44.4-7.3-25.4-.1-35.4.1-37.9 1zm58.9 51.2V354h-45v-45h45v22.5zM294.8 280.4c-6.8 2.4-12.9 8.9-14.8 15.7-1.5 5-1.3 66.2.2 71 1.5 5.1 6.9 11.4 12.2 14.2 4 2.2 4.9 2.2 39.1 2.2 32.2 0 35.3-.1 38.5-1.9 4.9-2.6 8.8-6.4 11.3-11.1 2.1-3.9 2.2-5 2.2-39s-.1-35.1-2.2-39c-3-5.6-8-10.1-13.2-12-5.9-2-67.5-2.2-73.3-.1zm59.2 51.1V354h-45v-45h45v22.5zM68.7 339.2c-2.2 1.3-4.5 3.8-5.7 6.3-1.9 3.9-2 6.2-2 35.3 0 19.2.4 33.1 1.1 36.4 3.4 16.1 16.6 29.3 32.7 32.7 3.3.7 17.2 1.1 36.4 1.1 29.1 0 31.4-.1 35.3-2 11-5.3 11.1-21.2.1-26.4-2.9-1.4-7.9-1.6-34.6-1.6-34.4 0-35.3-.1-39-6.3-1.9-3-2-5.2-2-34.5 0-26.9-.2-31.9-1.6-34.8-3.6-7.5-13.5-10.5-20.7-6.2zM429.2 338.7c-1.8.9-4.3 3-5.5 4.7-2.1 3-2.2 4-2.7 36.1-.5 35.8-.6 36.1-6.3 39.5-3 1.9-5.3 2-34.5 2-34.5 0-36.1.2-40.2 6-5.4 7.5-2.8 18 5.5 22 3.9 1.9 6.2 2 35.3 2 19.2 0 33.1-.4 36.4-1.1 16.2-3.5 29.2-16.5 32.7-32.7.7-3.3 1.1-17.2 1.1-36.4 0-29.1-.1-31.4-2-35.3-3.6-7.4-12.5-10.4-19.8-6.8z"
|
|
30287
30803
|
})));
|
|
30288
30804
|
}
|
|
30289
30805
|
|
|
30806
|
+
var _path$1;
|
|
30807
|
+
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
30808
|
+
function SvgTrashCan(props) {
|
|
30809
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
30810
|
+
className: "plc-w-6 plc-h-6",
|
|
30811
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30812
|
+
viewBox: "0 0 448 512",
|
|
30813
|
+
fill: "currentColor"
|
|
30814
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30815
|
+
d: "M135.2 17.7C140.6 6.8 151.7 0 163.8 0h120.4c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64s14.3-32 32-32h96l7.2-14.3zM32 128h384v320c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"
|
|
30816
|
+
})));
|
|
30817
|
+
}
|
|
30818
|
+
|
|
30290
30819
|
const DonationsMenu = _ref => {
|
|
30291
30820
|
let {
|
|
30292
30821
|
onClose,
|
|
@@ -30608,7 +31137,9 @@ function DashboardWithHook(props) {
|
|
|
30608
31137
|
switchView,
|
|
30609
31138
|
resetView,
|
|
30610
31139
|
logout,
|
|
30611
|
-
set
|
|
31140
|
+
set,
|
|
31141
|
+
setPaymentMethodToEdit,
|
|
31142
|
+
setPaymentMethodToDelete
|
|
30612
31143
|
} = usePelcro();
|
|
30613
31144
|
return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
|
|
30614
31145
|
setAddress: addressIdToEdit => set({
|
|
@@ -30631,7 +31162,9 @@ function DashboardWithHook(props) {
|
|
|
30631
31162
|
product,
|
|
30632
31163
|
plan,
|
|
30633
31164
|
isGift
|
|
30634
|
-
})
|
|
31165
|
+
}),
|
|
31166
|
+
setPaymentMethodToEdit: setPaymentMethodToEdit,
|
|
31167
|
+
setPaymentMethodToDelete: setPaymentMethodToDelete
|
|
30635
31168
|
});
|
|
30636
31169
|
}
|
|
30637
31170
|
DashboardWithHook.viewId = "dashboard";
|
|
@@ -30658,6 +31191,18 @@ class Dashboard extends React.Component {
|
|
|
30658
31191
|
nonInteraction: true
|
|
30659
31192
|
});
|
|
30660
31193
|
}
|
|
31194
|
+
window.Pelcro.paymentMethods.list({
|
|
31195
|
+
auth_token: window.Pelcro.user.read().auth_token
|
|
31196
|
+
}, (err, res) => {
|
|
31197
|
+
if (err) {
|
|
31198
|
+
return console.error(err);
|
|
31199
|
+
}
|
|
31200
|
+
if (res) {
|
|
31201
|
+
this.setState({
|
|
31202
|
+
sources: res.data
|
|
31203
|
+
});
|
|
31204
|
+
}
|
|
31205
|
+
});
|
|
30661
31206
|
const {
|
|
30662
31207
|
addresses
|
|
30663
31208
|
} = window.Pelcro.user.read();
|
|
@@ -30727,10 +31272,47 @@ class Dashboard extends React.Component {
|
|
|
30727
31272
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
30728
31273
|
});
|
|
30729
31274
|
});
|
|
31275
|
+
_defineProperty$3(this, "deletePaymentMethod", (paymentMethodId, onSuccess, onFailure) => {
|
|
31276
|
+
// disable the Login button to prevent repeated clicks
|
|
31277
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
31278
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
31279
|
+
payment_method_id: paymentMethodId
|
|
31280
|
+
}, (err, res) => {
|
|
31281
|
+
if (err) {
|
|
31282
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
31283
|
+
}
|
|
31284
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
31285
|
+
});
|
|
31286
|
+
});
|
|
31287
|
+
_defineProperty$3(this, "onDeletePaymentMethodClick", source => {
|
|
31288
|
+
const isDeletable = source === null || source === void 0 ? void 0 : source.deletable;
|
|
31289
|
+
if (isDeletable) {
|
|
31290
|
+
this.props.onClose();
|
|
31291
|
+
notify.confirm((onSuccess, onFailure) => {
|
|
31292
|
+
this.deletePaymentMethod(source.id, onSuccess, onFailure);
|
|
31293
|
+
}, {
|
|
31294
|
+
confirmMessage: this.locale("messages.paymentMethodDeletion.isSureToDelete"),
|
|
31295
|
+
loadingMessage: this.locale("messages.paymentMethodDeletion.loading"),
|
|
31296
|
+
successMessage: this.locale("messages.paymentMethodDeletion.success"),
|
|
31297
|
+
errorMessage: this.locale("messages.paymentMethodDeletion.error")
|
|
31298
|
+
}, {
|
|
31299
|
+
closeButtonLabel: this.locale("labels.subCancellation.goBack")
|
|
31300
|
+
});
|
|
31301
|
+
} else {
|
|
31302
|
+
this.props.setPaymentMethodToDelete(source.id);
|
|
31303
|
+
return this.props.setView("payment-method-delete");
|
|
31304
|
+
// this.props.onClose();
|
|
31305
|
+
// notify.warning(
|
|
31306
|
+
// this.locale("messages.paymentMethodDeletion.nonDeletable")
|
|
31307
|
+
// );
|
|
31308
|
+
}
|
|
31309
|
+
});
|
|
30730
31310
|
_defineProperty$3(this, "displayRedeem", () => {
|
|
30731
31311
|
return this.props.setView("gift-redeem");
|
|
30732
31312
|
});
|
|
30733
|
-
_defineProperty$3(this, "displaySourceCreate",
|
|
31313
|
+
_defineProperty$3(this, "displaySourceCreate", e => {
|
|
31314
|
+
const source = e.currentTarget.dataset.key;
|
|
31315
|
+
this.props.setPaymentMethodToEdit(source);
|
|
30734
31316
|
return this.props.setView("payment-method-update");
|
|
30735
31317
|
});
|
|
30736
31318
|
_defineProperty$3(this, "displayUserEdit", () => {
|
|
@@ -30992,6 +31574,52 @@ class Dashboard extends React.Component {
|
|
|
30992
31574
|
onClick: this.displayAddressCreate
|
|
30993
31575
|
}, this.locale("labels.addAddress"))))));
|
|
30994
31576
|
});
|
|
31577
|
+
_defineProperty$3(this, "renderSources", () => {
|
|
31578
|
+
const sources = this.state.sources && this.state.sources.sort((a, b) => a.is_default === b.is_default ? 0 : a.is_default ? -1 : 1).map((source, index) => {
|
|
31579
|
+
var _source$properties, _source$properties2;
|
|
31580
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31581
|
+
key: "dashboard-source-" + source.id,
|
|
31582
|
+
className: "plc-flex plc-flex-row plc-pr-6"
|
|
31583
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31584
|
+
className: "plc-flex plc-flex-grow plc-items-center plc-justify-between plc-max-w-xs plc-p-4 plc-mb-2 plc-text-white plc-bg-gray-800 plc-rounded-md plc-h-14"
|
|
31585
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, getPaymentCardIcon(source === null || source === void 0 ? void 0 : (_source$properties = source.properties) === null || _source$properties === void 0 ? void 0 : _source$properties.brand)), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31586
|
+
className: "plc-ml-1 plc-text-lg plc-tracking-widest plc-flex-grow plc-text-center"
|
|
31587
|
+
}, "\u2022\u2022\u2022\u2022 ", source === null || source === void 0 ? void 0 : (_source$properties2 = source.properties) === null || _source$properties2 === void 0 ? void 0 : _source$properties2.last4), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31588
|
+
id: "pelcro-button-update-source-" + index,
|
|
31589
|
+
variant: "icon",
|
|
31590
|
+
className: "plc-text-white",
|
|
31591
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
31592
|
+
"data-key": source.id,
|
|
31593
|
+
onClick: this.displaySourceCreate,
|
|
31594
|
+
disabled: this.state.disableSubmit
|
|
31595
|
+
}), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31596
|
+
id: "pelcro-button-delete-source-" + index,
|
|
31597
|
+
variant: "icon",
|
|
31598
|
+
className: "plc-text-white",
|
|
31599
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgTrashCan, null),
|
|
31600
|
+
onClick: () => {
|
|
31601
|
+
this.onDeletePaymentMethodClick(source);
|
|
31602
|
+
},
|
|
31603
|
+
disabled: this.state.disableSubmit
|
|
31604
|
+
})), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31605
|
+
className: "plc-flex-grow"
|
|
31606
|
+
}), source.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31607
|
+
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-h-7 plc-my-auto plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
31608
|
+
}, this.locale("labels.default")));
|
|
31609
|
+
});
|
|
31610
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31611
|
+
className: "plc-pr-2"
|
|
31612
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31613
|
+
className: "plc-overflow-y-scroll plc-max-h-52"
|
|
31614
|
+
}, sources), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31615
|
+
variant: "ghost",
|
|
31616
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
|
|
31617
|
+
className: "plc-w-4 plc-mr-1"
|
|
31618
|
+
}),
|
|
31619
|
+
className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100 plc-my-1 plc-ml-1",
|
|
31620
|
+
onClick: this.displaySourceCreate
|
|
31621
|
+
}, this.locale("labels.addPaymentSource")));
|
|
31622
|
+
});
|
|
30995
31623
|
_defineProperty$3(this, "closeDashboard", () => {
|
|
30996
31624
|
this.setState({
|
|
30997
31625
|
isOpen: false
|
|
@@ -31002,7 +31630,8 @@ class Dashboard extends React.Component {
|
|
|
31002
31630
|
subscriptions: window.Pelcro.subscription.list(),
|
|
31003
31631
|
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 : [],
|
|
31004
31632
|
disableSubmit: false,
|
|
31005
|
-
addresses: []
|
|
31633
|
+
addresses: [],
|
|
31634
|
+
sources: []
|
|
31006
31635
|
};
|
|
31007
31636
|
this.site = window.Pelcro.site.read();
|
|
31008
31637
|
this.locale = this.props.t;
|
|
@@ -31011,7 +31640,7 @@ class Dashboard extends React.Component {
|
|
|
31011
31640
|
this.enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
|
|
31012
31641
|
}
|
|
31013
31642
|
render() {
|
|
31014
|
-
var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet
|
|
31643
|
+
var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet;
|
|
31015
31644
|
const {
|
|
31016
31645
|
isOpen
|
|
31017
31646
|
} = this.state;
|
|
@@ -31114,25 +31743,7 @@ class Dashboard extends React.Component {
|
|
|
31114
31743
|
name: SUB_MENUS.PAYMENT_CARDS,
|
|
31115
31744
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
|
|
31116
31745
|
title: this.locale("labels.paymentSource"),
|
|
31117
|
-
content:
|
|
31118
|
-
className: "plc-flex plc-items-center plc-justify-between plc-max-w-xs plc-p-4 plc-mb-2 plc-text-white plc-bg-gray-800 plc-rounded-md plc-h-14"
|
|
31119
|
-
}, this.user.source ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, getPaymentCardIcon((_this$user$source = this.user.source) === null || _this$user$source === void 0 ? void 0 : (_this$user$source$pro = _this$user$source.properties) === null || _this$user$source$pro === void 0 ? void 0 : _this$user$source$pro.brand), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31120
|
-
className: "plc-ml-1 plc-text-lg plc-tracking-widest"
|
|
31121
|
-
}, "\u2022\u2022\u2022\u2022 ", (_this$user$source2 = this.user.source) === null || _this$user$source2 === void 0 ? void 0 : (_this$user$source2$pr = _this$user$source2.properties) === null || _this$user$source2$pr === void 0 ? void 0 : _this$user$source2$pr.last4), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31122
|
-
variant: "icon",
|
|
31123
|
-
className: "plc-text-white",
|
|
31124
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
31125
|
-
onClick: this.displaySourceCreate,
|
|
31126
|
-
disabled: this.state.disableSubmit
|
|
31127
|
-
})) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", null, this.locale("messages.noCard")), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31128
|
-
variant: "icon",
|
|
31129
|
-
className: "plc-text-white",
|
|
31130
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
|
|
31131
|
-
className: "plc-w-6 plc-h-6"
|
|
31132
|
-
}),
|
|
31133
|
-
onClick: this.displaySourceCreate,
|
|
31134
|
-
disabled: this.state.disableSubmit
|
|
31135
|
-
})))
|
|
31746
|
+
content: this.renderSources()
|
|
31136
31747
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
31137
31748
|
name: SUB_MENUS.ADDRESSES,
|
|
31138
31749
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
|
|
@@ -35197,6 +35808,12 @@ exports.PasswordlessRequestViewButton = PasswordlessRequestViewButton;
|
|
|
35197
35808
|
exports.PaymentCreateContainer = PaymentCreateContainer;
|
|
35198
35809
|
exports.PaymentCreateView = PaymentCreateView;
|
|
35199
35810
|
exports.PaymentMethodContainer = PaymentMethodContainer;
|
|
35811
|
+
exports.PaymentMethodDeleteContainer = PaymentMethodDeleteContainer;
|
|
35812
|
+
exports.PaymentMethodDeleteList = PaymentMethodDeleteList;
|
|
35813
|
+
exports.PaymentMethodDeleteModal = PaymentMethodDeleteModal;
|
|
35814
|
+
exports.PaymentMethodDeleteOptions = PaymentMethodDeleteOptions;
|
|
35815
|
+
exports.PaymentMethodDeleteSubmit = PaymentMethodDeleteSubmit;
|
|
35816
|
+
exports.PaymentMethodDeleteView = PaymentMethodDeleteView;
|
|
35200
35817
|
exports.PaymentMethodSelectContainer = PaymentMethodSelectContainer;
|
|
35201
35818
|
exports.PaymentMethodSelectList = PaymentMethodSelectList;
|
|
35202
35819
|
exports.PaymentMethodSelectModal = PaymentMethodSelectModal;
|
|
@@ -35204,6 +35821,7 @@ exports.PaymentMethodSelectSubmit = PaymentMethodSelectSubmit;
|
|
|
35204
35821
|
exports.PaymentMethodSelectView = PaymentMethodSelectView;
|
|
35205
35822
|
exports.PaymentMethodUpdateContainer = PaymentMethodUpdateContainer;
|
|
35206
35823
|
exports.PaymentMethodUpdateModal = PaymentMethodUpdateModal;
|
|
35824
|
+
exports.PaymentMethodUpdateSetDefault = PaymentMethodUpdateSetDefault;
|
|
35207
35825
|
exports.PaymentMethodUpdateView = PaymentMethodUpdateView;
|
|
35208
35826
|
exports.PaymentMethodView = PaymentMethodView;
|
|
35209
35827
|
exports.PaymentSuccessModal = PaymentSuccessModal;
|