@pelcro/react-pelcro-js 2.7.0-beta.4 → 2.7.0-beta.8
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 +411 -216
- package/dist/index.esm.js +411 -216
- package/dist/pelcro.css +13 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3590,7 +3590,8 @@ var labels$h = {
|
|
|
3590
3590
|
"for": "for",
|
|
3591
3591
|
interval: "{{count}} {{interval}}",
|
|
3592
3592
|
interval_plural: "{{count}} {{interval}}s",
|
|
3593
|
-
tax: "+ Tax"
|
|
3593
|
+
tax: "+ Tax",
|
|
3594
|
+
removeCoupon: "REMOVE"
|
|
3594
3595
|
};
|
|
3595
3596
|
var checkoutForm_en = {
|
|
3596
3597
|
messages: messages$j,
|
|
@@ -3616,7 +3617,8 @@ var labels$g = {
|
|
|
3616
3617
|
"for": "pour",
|
|
3617
3618
|
interval: "{{count}} {{interval}}",
|
|
3618
3619
|
interval_plural: "{{count}} {{interval}}s",
|
|
3619
|
-
tax: "+ Taxe"
|
|
3620
|
+
tax: "+ Taxe",
|
|
3621
|
+
removeCoupon: "RETIRER"
|
|
3620
3622
|
};
|
|
3621
3623
|
var checkoutForm_fr = {
|
|
3622
3624
|
messages: messages$i,
|
|
@@ -3764,7 +3766,7 @@ var gift$1 = {
|
|
|
3764
3766
|
lastName: "Last name",
|
|
3765
3767
|
email: "Email",
|
|
3766
3768
|
startDate: "Gift date",
|
|
3767
|
-
giftMessage: "Gift message (
|
|
3769
|
+
giftMessage: "Gift message (200 characters max)",
|
|
3768
3770
|
required: "required",
|
|
3769
3771
|
firstNamePlaceholder: "First name",
|
|
3770
3772
|
lastNamePlaceholder: "Last name",
|
|
@@ -3860,7 +3862,7 @@ var gift = {
|
|
|
3860
3862
|
lastName: "Nom de famille",
|
|
3861
3863
|
email: "Adresse courriel",
|
|
3862
3864
|
startDate: "Date de début",
|
|
3863
|
-
giftMessage: "Message du cadeau (
|
|
3865
|
+
giftMessage: "Message du cadeau (200 caractères max)",
|
|
3864
3866
|
required: "Champs obligatoires",
|
|
3865
3867
|
firstNamePlaceholder: "Prénom",
|
|
3866
3868
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -4346,6 +4348,7 @@ var labels$3 = {
|
|
|
4346
4348
|
account: "Account",
|
|
4347
4349
|
purchases: "Purchases",
|
|
4348
4350
|
subscriptions: "Subscriptions",
|
|
4351
|
+
donations: "Donations",
|
|
4349
4352
|
updatePaymentSource: "Update",
|
|
4350
4353
|
profile: "Profile",
|
|
4351
4354
|
updateProfile: "Edit profile",
|
|
@@ -4361,6 +4364,7 @@ var labels$3 = {
|
|
|
4361
4364
|
actions: "Actions",
|
|
4362
4365
|
expiresOn: "Ends",
|
|
4363
4366
|
startsOn: "Starts",
|
|
4367
|
+
startDate: "Start date",
|
|
4364
4368
|
renewsOn: "Renews",
|
|
4365
4369
|
canceledOn: "Canceled on",
|
|
4366
4370
|
recipient: "Recipient",
|
|
@@ -4425,6 +4429,7 @@ var labels$2 = {
|
|
|
4425
4429
|
account: "Compte",
|
|
4426
4430
|
purchases: "Achats",
|
|
4427
4431
|
subscriptions: "Abonnements",
|
|
4432
|
+
donations: "Des dons",
|
|
4428
4433
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4429
4434
|
profile: "Profil",
|
|
4430
4435
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4440,6 +4445,7 @@ var labels$2 = {
|
|
|
4440
4445
|
actions: "Actes",
|
|
4441
4446
|
expiresOn: "Expire le",
|
|
4442
4447
|
startsOn: "Débute le",
|
|
4448
|
+
startDate: "Date de début",
|
|
4443
4449
|
renewsOn: "Renouvelle le",
|
|
4444
4450
|
canceledOn: "Annulé le",
|
|
4445
4451
|
recipient: "Destinataire",
|
|
@@ -4496,7 +4502,11 @@ var labels$1 = {
|
|
|
4496
4502
|
},
|
|
4497
4503
|
selectProduct: "Select a product",
|
|
4498
4504
|
selectPlan: "Select a plan",
|
|
4499
|
-
startingAt: "Starting at"
|
|
4505
|
+
startingAt: "Starting at",
|
|
4506
|
+
restrictiveArticles: {
|
|
4507
|
+
subscribeTo: "Subscribe to one of the following options to get access to this page",
|
|
4508
|
+
or: "Or take a look at some of our other options below"
|
|
4509
|
+
}
|
|
4500
4510
|
};
|
|
4501
4511
|
var buttons$1 = {
|
|
4502
4512
|
next: "Next",
|
|
@@ -4525,7 +4535,11 @@ var labels = {
|
|
|
4525
4535
|
},
|
|
4526
4536
|
selectProduct: "Sélectionnez un produit",
|
|
4527
4537
|
selectPlan: "Sélectionnez un plan",
|
|
4528
|
-
starningAt: "À partir de"
|
|
4538
|
+
starningAt: "À partir de",
|
|
4539
|
+
restrictiveArticles: {
|
|
4540
|
+
subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
|
|
4541
|
+
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4542
|
+
}
|
|
4529
4543
|
};
|
|
4530
4544
|
var buttons = {
|
|
4531
4545
|
next: "Prochain",
|
|
@@ -6901,8 +6915,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6901
6915
|
|
|
6902
6916
|
let e={data:""},t=t=>"undefined"!=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-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(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=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
|
|
6903
6917
|
|
|
6904
|
-
function _extends$
|
|
6905
|
-
_extends$
|
|
6918
|
+
function _extends$x() {
|
|
6919
|
+
_extends$x = Object.assign || function (target) {
|
|
6906
6920
|
for (var i = 1; i < arguments.length; i++) {
|
|
6907
6921
|
var source = arguments[i];
|
|
6908
6922
|
|
|
@@ -6916,7 +6930,7 @@ function _extends$w() {
|
|
|
6916
6930
|
return target;
|
|
6917
6931
|
};
|
|
6918
6932
|
|
|
6919
|
-
return _extends$
|
|
6933
|
+
return _extends$x.apply(this, arguments);
|
|
6920
6934
|
}
|
|
6921
6935
|
|
|
6922
6936
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7006,7 +7020,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7006
7020
|
var reducer = function reducer(state, action) {
|
|
7007
7021
|
switch (action.type) {
|
|
7008
7022
|
case ActionType.ADD_TOAST:
|
|
7009
|
-
return _extends$
|
|
7023
|
+
return _extends$x({}, state, {
|
|
7010
7024
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7011
7025
|
});
|
|
7012
7026
|
|
|
@@ -7016,9 +7030,9 @@ var reducer = function reducer(state, action) {
|
|
|
7016
7030
|
clearFromRemoveQueue(action.toast.id);
|
|
7017
7031
|
}
|
|
7018
7032
|
|
|
7019
|
-
return _extends$
|
|
7033
|
+
return _extends$x({}, state, {
|
|
7020
7034
|
toasts: state.toasts.map(function (t) {
|
|
7021
|
-
return t.id === action.toast.id ? _extends$
|
|
7035
|
+
return t.id === action.toast.id ? _extends$x({}, t, action.toast) : t;
|
|
7022
7036
|
})
|
|
7023
7037
|
});
|
|
7024
7038
|
|
|
@@ -7045,9 +7059,9 @@ var reducer = function reducer(state, action) {
|
|
|
7045
7059
|
});
|
|
7046
7060
|
}
|
|
7047
7061
|
|
|
7048
|
-
return _extends$
|
|
7062
|
+
return _extends$x({}, state, {
|
|
7049
7063
|
toasts: state.toasts.map(function (t) {
|
|
7050
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7064
|
+
return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
|
|
7051
7065
|
visible: false
|
|
7052
7066
|
}) : t;
|
|
7053
7067
|
})
|
|
@@ -7055,28 +7069,28 @@ var reducer = function reducer(state, action) {
|
|
|
7055
7069
|
|
|
7056
7070
|
case ActionType.REMOVE_TOAST:
|
|
7057
7071
|
if (action.toastId === undefined) {
|
|
7058
|
-
return _extends$
|
|
7072
|
+
return _extends$x({}, state, {
|
|
7059
7073
|
toasts: []
|
|
7060
7074
|
});
|
|
7061
7075
|
}
|
|
7062
7076
|
|
|
7063
|
-
return _extends$
|
|
7077
|
+
return _extends$x({}, state, {
|
|
7064
7078
|
toasts: state.toasts.filter(function (t) {
|
|
7065
7079
|
return t.id !== action.toastId;
|
|
7066
7080
|
})
|
|
7067
7081
|
});
|
|
7068
7082
|
|
|
7069
7083
|
case ActionType.START_PAUSE:
|
|
7070
|
-
return _extends$
|
|
7084
|
+
return _extends$x({}, state, {
|
|
7071
7085
|
pausedAt: action.time
|
|
7072
7086
|
});
|
|
7073
7087
|
|
|
7074
7088
|
case ActionType.END_PAUSE:
|
|
7075
7089
|
var diff = action.time - (state.pausedAt || 0);
|
|
7076
|
-
return _extends$
|
|
7090
|
+
return _extends$x({}, state, {
|
|
7077
7091
|
pausedAt: undefined,
|
|
7078
7092
|
toasts: state.toasts.map(function (t) {
|
|
7079
|
-
return _extends$
|
|
7093
|
+
return _extends$x({}, t, {
|
|
7080
7094
|
pauseDuration: t.pauseDuration + diff
|
|
7081
7095
|
});
|
|
7082
7096
|
})
|
|
@@ -7123,12 +7137,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7123
7137
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7124
7138
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7125
7139
|
|
|
7126
|
-
return _extends$
|
|
7140
|
+
return _extends$x({}, toastOptions, toastOptions[t.type], t, {
|
|
7127
7141
|
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],
|
|
7128
|
-
style: _extends$
|
|
7142
|
+
style: _extends$x({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7129
7143
|
});
|
|
7130
7144
|
});
|
|
7131
|
-
return _extends$
|
|
7145
|
+
return _extends$x({}, state, {
|
|
7132
7146
|
toasts: mergedToasts
|
|
7133
7147
|
});
|
|
7134
7148
|
};
|
|
@@ -7138,7 +7152,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7138
7152
|
type = 'blank';
|
|
7139
7153
|
}
|
|
7140
7154
|
|
|
7141
|
-
return _extends$
|
|
7155
|
+
return _extends$x({
|
|
7142
7156
|
createdAt: Date.now(),
|
|
7143
7157
|
visible: true,
|
|
7144
7158
|
type: type,
|
|
@@ -7188,14 +7202,14 @@ toast.remove = function (toastId) {
|
|
|
7188
7202
|
};
|
|
7189
7203
|
|
|
7190
7204
|
toast.promise = function (promise, msgs, opts) {
|
|
7191
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7205
|
+
var id = toast.loading(msgs.loading, _extends$x({}, opts, opts == null ? void 0 : opts.loading));
|
|
7192
7206
|
promise.then(function (p) {
|
|
7193
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7207
|
+
toast.success(resolveValue(msgs.success, p), _extends$x({
|
|
7194
7208
|
id: id
|
|
7195
7209
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7196
7210
|
return p;
|
|
7197
7211
|
})["catch"](function (e) {
|
|
7198
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7212
|
+
toast.error(resolveValue(msgs.error, e), _extends$x({
|
|
7199
7213
|
id: id
|
|
7200
7214
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7201
7215
|
});
|
|
@@ -7534,7 +7548,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
|
|
|
7534
7548
|
var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7535
7549
|
return createElement(ToastBarBase, {
|
|
7536
7550
|
className: toast.className,
|
|
7537
|
-
style: _extends$
|
|
7551
|
+
style: _extends$x({}, animationStyle, style, toast.style)
|
|
7538
7552
|
}, typeof children === 'function' ? children({
|
|
7539
7553
|
icon: icon,
|
|
7540
7554
|
message: message
|
|
@@ -7564,7 +7578,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7564
7578
|
} : position.includes('right') ? {
|
|
7565
7579
|
justifyContent: 'flex-end'
|
|
7566
7580
|
} : {};
|
|
7567
|
-
return _extends$
|
|
7581
|
+
return _extends$x({
|
|
7568
7582
|
left: 0,
|
|
7569
7583
|
right: 0,
|
|
7570
7584
|
display: 'flex',
|
|
@@ -7591,7 +7605,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7591
7605
|
handlers = _useToaster.handlers;
|
|
7592
7606
|
|
|
7593
7607
|
return createElement("div", {
|
|
7594
|
-
style: _extends$
|
|
7608
|
+
style: _extends$x({
|
|
7595
7609
|
position: 'fixed',
|
|
7596
7610
|
zIndex: 9999,
|
|
7597
7611
|
top: DEFAULT_OFFSET,
|
|
@@ -7626,82 +7640,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7626
7640
|
}));
|
|
7627
7641
|
};
|
|
7628
7642
|
|
|
7629
|
-
var _path$
|
|
7643
|
+
var _path$u;
|
|
7630
7644
|
|
|
7631
|
-
function _extends$
|
|
7645
|
+
function _extends$w() { _extends$w = Object.assign || 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); }
|
|
7632
7646
|
|
|
7633
7647
|
function SvgCheckSolid(props) {
|
|
7634
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7648
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
7635
7649
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7636
7650
|
className: "h-5 w-5",
|
|
7637
7651
|
viewBox: "0 0 20 20",
|
|
7638
7652
|
fill: "currentColor"
|
|
7639
|
-
}, props), _path$
|
|
7653
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
|
|
7640
7654
|
fillRule: "evenodd",
|
|
7641
7655
|
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",
|
|
7642
7656
|
clipRule: "evenodd"
|
|
7643
7657
|
})));
|
|
7644
7658
|
}
|
|
7645
7659
|
|
|
7646
|
-
var _path$
|
|
7660
|
+
var _path$t;
|
|
7647
7661
|
|
|
7648
|
-
function _extends$
|
|
7662
|
+
function _extends$v() { _extends$v = Object.assign || 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); }
|
|
7649
7663
|
|
|
7650
7664
|
function SvgXIcon(props) {
|
|
7651
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7665
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
7652
7666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7653
7667
|
viewBox: "0 0 20 20",
|
|
7654
7668
|
fill: "currentColor"
|
|
7655
|
-
}, props), _path$
|
|
7669
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
|
|
7656
7670
|
fill: "evenodd",
|
|
7657
7671
|
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",
|
|
7658
7672
|
clipRule: "evenodd"
|
|
7659
7673
|
})));
|
|
7660
7674
|
}
|
|
7661
7675
|
|
|
7662
|
-
var _path$
|
|
7676
|
+
var _path$s;
|
|
7663
7677
|
|
|
7664
|
-
function _extends$
|
|
7678
|
+
function _extends$u() { _extends$u = Object.assign || 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); }
|
|
7665
7679
|
|
|
7666
7680
|
function SvgXIconSolid(props) {
|
|
7667
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7681
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
7668
7682
|
className: "plc-w-4 plc-h-4",
|
|
7669
7683
|
fill: "currentColor",
|
|
7670
7684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7671
7685
|
viewBox: "0 0 100 100"
|
|
7672
|
-
}, props), _path$
|
|
7686
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
|
|
7673
7687
|
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"
|
|
7674
7688
|
})));
|
|
7675
7689
|
}
|
|
7676
7690
|
|
|
7677
|
-
var _path$
|
|
7691
|
+
var _path$r;
|
|
7678
7692
|
|
|
7679
|
-
function _extends$
|
|
7693
|
+
function _extends$t() { _extends$t = Object.assign || 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); }
|
|
7680
7694
|
|
|
7681
7695
|
function SvgExclamation(props) {
|
|
7682
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7696
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
7683
7697
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7684
7698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7685
7699
|
viewBox: "0 0 20 20",
|
|
7686
7700
|
fill: "currentColor"
|
|
7687
|
-
}, props), _path$
|
|
7701
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
7688
7702
|
fillRule: "evenodd",
|
|
7689
7703
|
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",
|
|
7690
7704
|
clipRule: "evenodd"
|
|
7691
7705
|
})));
|
|
7692
7706
|
}
|
|
7693
7707
|
|
|
7694
|
-
var _path$
|
|
7708
|
+
var _path$q, _path2$3;
|
|
7695
7709
|
|
|
7696
|
-
function _extends$
|
|
7710
|
+
function _extends$s() { _extends$s = Object.assign || 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); }
|
|
7697
7711
|
|
|
7698
7712
|
function SvgSpinner(props) {
|
|
7699
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7713
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
7700
7714
|
className: "plc-animate-spin",
|
|
7701
7715
|
viewBox: "0 0 24 24",
|
|
7702
7716
|
fill: "currentColor",
|
|
7703
7717
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7704
|
-
}, props), _path$
|
|
7718
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
7705
7719
|
opacity: 0.2,
|
|
7706
7720
|
fill: "evenodd",
|
|
7707
7721
|
clipRule: "evenodd",
|
|
@@ -9102,6 +9116,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
|
9102
9116
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
9103
9117
|
const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
|
|
9104
9118
|
const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
|
|
9119
|
+
const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
|
|
9105
9120
|
const SET_PERCENT_OFF = "SET_PERCENT_OFF";
|
|
9106
9121
|
const SET_COUPON = "SET_COUPON";
|
|
9107
9122
|
const SET_COUPON_ERROR = "SET_COUPON_ERROR";
|
|
@@ -9648,16 +9663,16 @@ const LoginPassword = props => /*#__PURE__*/React__default.createElement(Passwor
|
|
|
9648
9663
|
store: store$f
|
|
9649
9664
|
}, props));
|
|
9650
9665
|
|
|
9651
|
-
var _path$
|
|
9666
|
+
var _path$p;
|
|
9652
9667
|
|
|
9653
|
-
function _extends$
|
|
9668
|
+
function _extends$r() { _extends$r = Object.assign || 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); }
|
|
9654
9669
|
|
|
9655
9670
|
function SvgCheck(props) {
|
|
9656
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9671
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
9657
9672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9658
9673
|
fill: "currentColor",
|
|
9659
9674
|
viewBox: "0 0 20 20"
|
|
9660
|
-
}, props), _path$
|
|
9675
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
9661
9676
|
fillRule: "evenodd",
|
|
9662
9677
|
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",
|
|
9663
9678
|
clipRule: "evenodd"
|
|
@@ -9970,19 +9985,21 @@ const RegisterContainer = ({
|
|
|
9970
9985
|
*/
|
|
9971
9986
|
|
|
9972
9987
|
function hasSecurityTokenEnabled$1() {
|
|
9973
|
-
|
|
9988
|
+
var _window$Pelcro$site$r2;
|
|
9989
|
+
|
|
9990
|
+
const hasSecuritySdkLoaded = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.security_key);
|
|
9974
9991
|
return hasSecuritySdkLoaded;
|
|
9975
9992
|
}
|
|
9976
9993
|
|
|
9977
|
-
var _path$
|
|
9994
|
+
var _path$o;
|
|
9978
9995
|
|
|
9979
|
-
function _extends$
|
|
9996
|
+
function _extends$q() { _extends$q = Object.assign || 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); }
|
|
9980
9997
|
|
|
9981
9998
|
function SvgFacebookLogo(props) {
|
|
9982
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9999
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
9983
10000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9984
10001
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
9985
|
-
}, props), _path$
|
|
10002
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
9986
10003
|
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",
|
|
9987
10004
|
fill: "#3c5a9a"
|
|
9988
10005
|
})));
|
|
@@ -10055,15 +10072,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10055
10072
|
unwrapExports(googleLogin);
|
|
10056
10073
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10057
10074
|
|
|
10058
|
-
var _path$
|
|
10075
|
+
var _path$n, _path2$2, _path3$1, _path4;
|
|
10059
10076
|
|
|
10060
|
-
function _extends$
|
|
10077
|
+
function _extends$p() { _extends$p = Object.assign || 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); }
|
|
10061
10078
|
|
|
10062
10079
|
function SvgGoogleLogo(props) {
|
|
10063
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10080
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
10064
10081
|
viewBox: "0 0 24 24",
|
|
10065
10082
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10066
|
-
}, props), _path$
|
|
10083
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
10067
10084
|
fill: "#4285F4",
|
|
10068
10085
|
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"
|
|
10069
10086
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10140,15 +10157,15 @@ const GoogleLoginButton = ({
|
|
|
10140
10157
|
}) : null;
|
|
10141
10158
|
};
|
|
10142
10159
|
|
|
10143
|
-
var _path$
|
|
10160
|
+
var _path$m;
|
|
10144
10161
|
|
|
10145
|
-
function _extends$
|
|
10162
|
+
function _extends$o() { _extends$o = Object.assign || 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); }
|
|
10146
10163
|
|
|
10147
10164
|
function SvgAuth0Logo(props) {
|
|
10148
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10165
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
10149
10166
|
viewBox: "0 0 256 285",
|
|
10150
10167
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10151
|
-
}, props), _path$
|
|
10168
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
10152
10169
|
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"
|
|
10153
10170
|
})));
|
|
10154
10171
|
}
|
|
@@ -10307,15 +10324,15 @@ function LoginView(props) {
|
|
|
10307
10324
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10308
10325
|
}
|
|
10309
10326
|
|
|
10310
|
-
var _path$
|
|
10327
|
+
var _path$l, _path2$1, _path3;
|
|
10311
10328
|
|
|
10312
|
-
function _extends$
|
|
10329
|
+
function _extends$n() { _extends$n = Object.assign || 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); }
|
|
10313
10330
|
|
|
10314
10331
|
function SvgPelcroAuthorship(props) {
|
|
10315
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10332
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
10316
10333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10317
10334
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10318
|
-
}, props), _path$
|
|
10335
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
10319
10336
|
fill: "none",
|
|
10320
10337
|
stroke: "#4a4a4a",
|
|
10321
10338
|
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"
|
|
@@ -11031,42 +11048,80 @@ class SelectModal extends Component {
|
|
|
11031
11048
|
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
11032
11049
|
});
|
|
11033
11050
|
|
|
11051
|
+
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
11052
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11053
|
+
const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
|
|
11054
|
+
const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
|
|
11055
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11056
|
+
key: product.id,
|
|
11057
|
+
className: `plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper ${options !== null && options !== void 0 && options.emphasize ? "plc-border-2" : "plc-border"}`
|
|
11058
|
+
}, product.image && /*#__PURE__*/React__default.createElement("img", {
|
|
11059
|
+
alt: `image of ${product.name}`,
|
|
11060
|
+
src: product.image,
|
|
11061
|
+
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11062
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11063
|
+
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11064
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11065
|
+
className: "plc-w-full pelcro-select-product-header"
|
|
11066
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11067
|
+
className: "plc-font-bold pelcro-select-product-title"
|
|
11068
|
+
}, product.name), /*#__PURE__*/React__default.createElement("p", {
|
|
11069
|
+
className: "plc-text-xs pelcro-select-product-description"
|
|
11070
|
+
}, product.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
11071
|
+
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11072
|
+
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
11073
|
+
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11074
|
+
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
11075
|
+
onClick: productButtonCallback,
|
|
11076
|
+
"data-key": product.id,
|
|
11077
|
+
id: "pelcro-select-product-back-button",
|
|
11078
|
+
className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
|
|
11079
|
+
}, index === 0 && {
|
|
11080
|
+
autoFocus: true
|
|
11081
|
+
}), productButtonLabel))));
|
|
11082
|
+
});
|
|
11083
|
+
|
|
11034
11084
|
_defineProperty$3(this, "renderProducts", () => {
|
|
11035
11085
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
11036
11086
|
const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
return productsToShow.map((product, i) => {
|
|
11040
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11041
|
-
key: product.id,
|
|
11042
|
-
className: "plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper"
|
|
11043
|
-
}, product.image && /*#__PURE__*/React__default.createElement("img", {
|
|
11044
|
-
alt: `image of ${product.name}`,
|
|
11045
|
-
src: product.image,
|
|
11046
|
-
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11047
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11048
|
-
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11049
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11050
|
-
className: "plc-w-full pelcro-select-product-header"
|
|
11051
|
-
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11052
|
-
className: "plc-font-bold pelcro-select-product-title"
|
|
11053
|
-
}, product.name), /*#__PURE__*/React__default.createElement("p", {
|
|
11054
|
-
className: "plc-text-xs pelcro-select-product-description"
|
|
11055
|
-
}, product.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
11056
|
-
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11057
|
-
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
11058
|
-
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11059
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
11060
|
-
onClick: productButtonCallback,
|
|
11061
|
-
"data-key": product.id,
|
|
11062
|
-
id: "pelcro-select-product-back-button",
|
|
11063
|
-
className: "plc-ml-auto plc-text-xs"
|
|
11064
|
-
}, i === 0 && {
|
|
11065
|
-
autoFocus: true
|
|
11066
|
-
}), productButtonLabel))));
|
|
11087
|
+
return productsToShow.map((product, index) => {
|
|
11088
|
+
return this.renderOneProduct(product, index);
|
|
11067
11089
|
});
|
|
11068
11090
|
});
|
|
11069
11091
|
|
|
11092
|
+
_defineProperty$3(this, "renderMatchingProductsFirst", () => {
|
|
11093
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11094
|
+
|
|
11095
|
+
if (isPlanMode) {
|
|
11096
|
+
return this.renderOneProduct(this.state.product);
|
|
11097
|
+
}
|
|
11098
|
+
|
|
11099
|
+
const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
|
|
11100
|
+
|
|
11101
|
+
if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
|
|
11102
|
+
return this.renderProducts();
|
|
11103
|
+
}
|
|
11104
|
+
|
|
11105
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h3", {
|
|
11106
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11107
|
+
}, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
|
|
11108
|
+
emphasize: true
|
|
11109
|
+
})), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("hr", {
|
|
11110
|
+
className: "plc-my-4"
|
|
11111
|
+
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
11112
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11113
|
+
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
11114
|
+
|
|
11115
|
+
function productsWithMatchedTaggedFirst() {
|
|
11116
|
+
var _window$Pelcro$produc;
|
|
11117
|
+
|
|
11118
|
+
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
11119
|
+
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
11120
|
+
const allProductsMinusMatched = allProducts.filter(product => productsThatMatchArticleTag.find(matchedProduct => matchedProduct.id !== product.id));
|
|
11121
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
11122
|
+
}
|
|
11123
|
+
});
|
|
11124
|
+
|
|
11070
11125
|
_defineProperty$3(this, "renderPlans", () => {
|
|
11071
11126
|
return this.state.planList.map(plan => {
|
|
11072
11127
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
@@ -11193,7 +11248,7 @@ class SelectModal extends Component {
|
|
|
11193
11248
|
}
|
|
11194
11249
|
|
|
11195
11250
|
render() {
|
|
11196
|
-
var _window$Pelcro$
|
|
11251
|
+
var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
|
|
11197
11252
|
|
|
11198
11253
|
const {
|
|
11199
11254
|
disableGifting
|
|
@@ -11227,9 +11282,9 @@ class SelectModal extends Component {
|
|
|
11227
11282
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11228
11283
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
11229
11284
|
className: "plc-text-2xl plc-font-semibold"
|
|
11230
|
-
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$
|
|
11285
|
+
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
|
|
11231
11286
|
className: "pelcro-select-products-wrapper"
|
|
11232
|
-
}, this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11287
|
+
}, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11233
11288
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
11234
11289
|
}, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
|
|
11235
11290
|
className: "plc-flex plc-justify-center plc-mt-2"
|
|
@@ -12935,10 +12990,6 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12935
12990
|
});
|
|
12936
12991
|
|
|
12937
12992
|
if (err) {
|
|
12938
|
-
dispatch({
|
|
12939
|
-
type: SET_PERCENT_OFF,
|
|
12940
|
-
payload: ""
|
|
12941
|
-
});
|
|
12942
12993
|
onFailure(err);
|
|
12943
12994
|
return dispatch({
|
|
12944
12995
|
type: SET_COUPON_ERROR,
|
|
@@ -13033,6 +13084,54 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13033
13084
|
|
|
13034
13085
|
const debouncedApplyCouponCode = useRef(debounce(onApplyCouponCode, 1000)).current;
|
|
13035
13086
|
|
|
13087
|
+
const removeAppliedCoupon = state => {
|
|
13088
|
+
state.couponCode = "";
|
|
13089
|
+
dispatch({
|
|
13090
|
+
type: SET_COUPON_ERROR,
|
|
13091
|
+
payload: ""
|
|
13092
|
+
});
|
|
13093
|
+
dispatch({
|
|
13094
|
+
type: SHOW_COUPON_FIELD,
|
|
13095
|
+
payload: false
|
|
13096
|
+
});
|
|
13097
|
+
dispatch({
|
|
13098
|
+
type: SET_COUPON,
|
|
13099
|
+
payload: null
|
|
13100
|
+
});
|
|
13101
|
+
dispatch({
|
|
13102
|
+
type: SET_PERCENT_OFF,
|
|
13103
|
+
payload: ""
|
|
13104
|
+
});
|
|
13105
|
+
dispatch({
|
|
13106
|
+
type: SET_UPDATED_PRICE,
|
|
13107
|
+
payload: null
|
|
13108
|
+
});
|
|
13109
|
+
dispatch({
|
|
13110
|
+
type: SET_TAX_AMOUNT,
|
|
13111
|
+
payload: null
|
|
13112
|
+
});
|
|
13113
|
+
const {
|
|
13114
|
+
currentPlan
|
|
13115
|
+
} = state;
|
|
13116
|
+
|
|
13117
|
+
if (currentPlan) {
|
|
13118
|
+
var _currentPlan$quantity;
|
|
13119
|
+
|
|
13120
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13121
|
+
const price = currentPlan.amount;
|
|
13122
|
+
dispatch({
|
|
13123
|
+
type: SET_UPDATED_PRICE,
|
|
13124
|
+
// set original plan price
|
|
13125
|
+
payload: price * quantity
|
|
13126
|
+
});
|
|
13127
|
+
dispatch({
|
|
13128
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13129
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13130
|
+
|
|
13131
|
+
updateTotalAmountWithTax();
|
|
13132
|
+
}
|
|
13133
|
+
};
|
|
13134
|
+
|
|
13036
13135
|
const subscribe = (stripeSource, state, dispatch) => {
|
|
13037
13136
|
const {
|
|
13038
13137
|
couponCode
|
|
@@ -13650,6 +13749,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13650
13749
|
disableCouponButton: true
|
|
13651
13750
|
}, (state, dispatch) => onApplyCouponCode(state, dispatch));
|
|
13652
13751
|
|
|
13752
|
+
case REMOVE_APPLIED_COUPON:
|
|
13753
|
+
return lib_5(state, () => removeAppliedCoupon(state));
|
|
13754
|
+
|
|
13653
13755
|
case SET_COUPON:
|
|
13654
13756
|
return lib_7({ ...state,
|
|
13655
13757
|
couponObject: action.payload
|
|
@@ -13818,6 +13920,10 @@ const DiscountedPrice = props => {
|
|
|
13818
13920
|
var _order$currency, _order$, _plan$quantity;
|
|
13819
13921
|
|
|
13820
13922
|
const {
|
|
13923
|
+
t
|
|
13924
|
+
} = useTranslation("checkoutForm");
|
|
13925
|
+
const {
|
|
13926
|
+
dispatch,
|
|
13821
13927
|
state: {
|
|
13822
13928
|
updatedPrice,
|
|
13823
13929
|
taxAmount,
|
|
@@ -13833,12 +13939,22 @@ const DiscountedPrice = props => {
|
|
|
13833
13939
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
13834
13940
|
const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
13835
13941
|
|
|
13942
|
+
const onCouponRemove = () => {
|
|
13943
|
+
dispatch({
|
|
13944
|
+
type: REMOVE_APPLIED_COUPON
|
|
13945
|
+
});
|
|
13946
|
+
};
|
|
13947
|
+
|
|
13836
13948
|
if (percentOff) {
|
|
13837
13949
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({
|
|
13838
|
-
className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
|
|
13839
|
-
}, props), "(-", percentOff, ")",
|
|
13840
|
-
className: "plc-font-bold pelcro-discounted-price"
|
|
13841
|
-
}, priceFormatted)
|
|
13950
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
|
|
13951
|
+
}, props), "(-", percentOff, ")", /*#__PURE__*/React__default.createElement("span", {
|
|
13952
|
+
className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
|
|
13953
|
+
}, priceFormatted), /*#__PURE__*/React__default.createElement(Button, {
|
|
13954
|
+
variant: "ghost",
|
|
13955
|
+
className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
13956
|
+
onClick: onCouponRemove
|
|
13957
|
+
}, "\u2715 ", t("labels.removeCoupon")));
|
|
13842
13958
|
}
|
|
13843
13959
|
|
|
13844
13960
|
return "";
|
|
@@ -13884,17 +14000,17 @@ const SubmitPaymentMethod = ({
|
|
|
13884
14000
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
13885
14001
|
};
|
|
13886
14002
|
|
|
13887
|
-
var _path$
|
|
14003
|
+
var _path$k;
|
|
13888
14004
|
|
|
13889
|
-
function _extends$
|
|
14005
|
+
function _extends$m() { _extends$m = Object.assign || 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); }
|
|
13890
14006
|
|
|
13891
14007
|
function SvgArrowLeft(props) {
|
|
13892
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14008
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
13893
14009
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13894
14010
|
fill: "none",
|
|
13895
14011
|
viewBox: "0 0 24 24",
|
|
13896
14012
|
stroke: "currentColor"
|
|
13897
|
-
}, props), _path$
|
|
14013
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
13898
14014
|
strokeLinecap: "round",
|
|
13899
14015
|
strokeLinejoin: "round",
|
|
13900
14016
|
strokeWidth: 2,
|
|
@@ -13976,17 +14092,17 @@ const CouponCodeField = props => {
|
|
|
13976
14092
|
}, props));
|
|
13977
14093
|
};
|
|
13978
14094
|
|
|
13979
|
-
var _path$
|
|
14095
|
+
var _path$j;
|
|
13980
14096
|
|
|
13981
|
-
function _extends$
|
|
14097
|
+
function _extends$l() { _extends$l = Object.assign || 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); }
|
|
13982
14098
|
|
|
13983
14099
|
function SvgTicket(props) {
|
|
13984
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14100
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
13985
14101
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13986
14102
|
fill: "none",
|
|
13987
14103
|
viewBox: "0 0 24 24",
|
|
13988
14104
|
stroke: "currentColor"
|
|
13989
|
-
}, props), _path$
|
|
14105
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
13990
14106
|
strokeLinecap: "round",
|
|
13991
14107
|
strokeLinejoin: "round",
|
|
13992
14108
|
strokeWidth: 2,
|
|
@@ -14345,16 +14461,16 @@ const BankRedirection = () => {
|
|
|
14345
14461
|
}));
|
|
14346
14462
|
};
|
|
14347
14463
|
|
|
14348
|
-
var _path$
|
|
14464
|
+
var _path$i;
|
|
14349
14465
|
|
|
14350
|
-
function _extends$
|
|
14466
|
+
function _extends$k() { _extends$k = Object.assign || 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); }
|
|
14351
14467
|
|
|
14352
14468
|
function SvgLock(props) {
|
|
14353
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14469
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
14354
14470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14355
14471
|
viewBox: "0 0 20 20",
|
|
14356
14472
|
fill: "currentColor"
|
|
14357
|
-
}, props), _path$
|
|
14473
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
14358
14474
|
fillRule: "evenodd",
|
|
14359
14475
|
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",
|
|
14360
14476
|
clipRule: "evenodd"
|
|
@@ -14576,12 +14692,12 @@ function SubscriptionRenewModal({
|
|
|
14576
14692
|
}
|
|
14577
14693
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14578
14694
|
|
|
14579
|
-
var _path$
|
|
14695
|
+
var _path$h;
|
|
14580
14696
|
|
|
14581
|
-
function _extends$
|
|
14697
|
+
function _extends$j() { _extends$j = Object.assign || 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); }
|
|
14582
14698
|
|
|
14583
14699
|
function SvgGift(props) {
|
|
14584
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14700
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
14585
14701
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14586
14702
|
fill: "none",
|
|
14587
14703
|
stroke: "currentColor",
|
|
@@ -14590,7 +14706,7 @@ function SvgGift(props) {
|
|
|
14590
14706
|
strokeWidth: 2,
|
|
14591
14707
|
viewBox: "0 0 24 24",
|
|
14592
14708
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14593
|
-
}, props), _path$
|
|
14709
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
14594
14710
|
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"
|
|
14595
14711
|
})));
|
|
14596
14712
|
}
|
|
@@ -15589,17 +15705,17 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone
|
|
|
15589
15705
|
|
|
15590
15706
|
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";
|
|
15591
15707
|
|
|
15592
|
-
var _path$
|
|
15708
|
+
var _path$g;
|
|
15593
15709
|
|
|
15594
|
-
function _extends$
|
|
15710
|
+
function _extends$i() { _extends$i = Object.assign || 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$i.apply(this, arguments); }
|
|
15595
15711
|
|
|
15596
15712
|
function SvgEdit(props) {
|
|
15597
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15713
|
+
return /*#__PURE__*/React.createElement("svg", _extends$i({
|
|
15598
15714
|
className: "plc-w-6 plc-h-6",
|
|
15599
15715
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15600
15716
|
viewBox: "0 0 20 20",
|
|
15601
15717
|
fill: "currentColor"
|
|
15602
|
-
}, props), _path$
|
|
15718
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
15603
15719
|
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"
|
|
15604
15720
|
})));
|
|
15605
15721
|
}
|
|
@@ -18709,18 +18825,18 @@ const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(La
|
|
|
18709
18825
|
store: store$4
|
|
18710
18826
|
}, props));
|
|
18711
18827
|
|
|
18712
|
-
var _path$
|
|
18828
|
+
var _path$f;
|
|
18713
18829
|
|
|
18714
|
-
function _extends$
|
|
18830
|
+
function _extends$h() { _extends$h = Object.assign || 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); }
|
|
18715
18831
|
|
|
18716
18832
|
function SvgInfoCircle(props) {
|
|
18717
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
18833
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
18718
18834
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18719
18835
|
className: "plc-w-5 plc-h-5",
|
|
18720
18836
|
fill: "none",
|
|
18721
18837
|
viewBox: "0 0 24 24",
|
|
18722
18838
|
stroke: "currentColor"
|
|
18723
|
-
}, props), _path$
|
|
18839
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
18724
18840
|
strokeLinecap: "round",
|
|
18725
18841
|
strokeLinejoin: "round",
|
|
18726
18842
|
strokeWidth: 2,
|
|
@@ -18878,7 +18994,7 @@ function GiftCreateMessage(props) {
|
|
|
18878
18994
|
return /*#__PURE__*/React__default.createElement(TextArea, Object.assign({
|
|
18879
18995
|
onChange: e => handleInputChange(e.target.value),
|
|
18880
18996
|
value: state.giftMessage,
|
|
18881
|
-
maxLength: "
|
|
18997
|
+
maxLength: "200",
|
|
18882
18998
|
rows: 3,
|
|
18883
18999
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
18884
19000
|
}, props));
|
|
@@ -19707,8 +19823,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19707
19823
|
};
|
|
19708
19824
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19709
19825
|
|
|
19710
|
-
function _extends$
|
|
19711
|
-
_extends$
|
|
19826
|
+
function _extends$g() {
|
|
19827
|
+
_extends$g = Object.assign || function (target) {
|
|
19712
19828
|
for (var i = 1; i < arguments.length; i++) {
|
|
19713
19829
|
var source = arguments[i];
|
|
19714
19830
|
|
|
@@ -19722,7 +19838,7 @@ function _extends$f() {
|
|
|
19722
19838
|
return target;
|
|
19723
19839
|
};
|
|
19724
19840
|
|
|
19725
|
-
return _extends$
|
|
19841
|
+
return _extends$g.apply(this, arguments);
|
|
19726
19842
|
}
|
|
19727
19843
|
|
|
19728
19844
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -19906,7 +20022,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
19906
20022
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
19907
20023
|
return null;
|
|
19908
20024
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
19909
|
-
return _render(_extends$
|
|
20025
|
+
return _render(_extends$g({}, _rest, {
|
|
19910
20026
|
hidden: true,
|
|
19911
20027
|
style: {
|
|
19912
20028
|
display: 'none'
|
|
@@ -20434,7 +20550,7 @@ function TransitionChild(props) {
|
|
|
20434
20550
|
var passthroughProps = rest;
|
|
20435
20551
|
return React__default.createElement(NestingContext.Provider, {
|
|
20436
20552
|
value: nesting
|
|
20437
|
-
}, render(_extends$
|
|
20553
|
+
}, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20438
20554
|
}
|
|
20439
20555
|
|
|
20440
20556
|
function Transition(props) {
|
|
@@ -20478,7 +20594,7 @@ function Transition(props) {
|
|
|
20478
20594
|
value: nestingBag
|
|
20479
20595
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
20480
20596
|
value: transitionBag
|
|
20481
|
-
}, render(_extends$
|
|
20597
|
+
}, render(_extends$g({}, sharedProps, {
|
|
20482
20598
|
as: Fragment,
|
|
20483
20599
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20484
20600
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20605,12 +20721,12 @@ var ActionTypes;
|
|
|
20605
20721
|
})(ActionTypes || (ActionTypes = {}));
|
|
20606
20722
|
|
|
20607
20723
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20608
|
-
return _extends$
|
|
20724
|
+
return _extends$g({}, state, {
|
|
20609
20725
|
activeItemIndex: null,
|
|
20610
20726
|
menuState: MenuStates.Closed
|
|
20611
20727
|
});
|
|
20612
20728
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20613
|
-
return _extends$
|
|
20729
|
+
return _extends$g({}, state, {
|
|
20614
20730
|
menuState: MenuStates.Open
|
|
20615
20731
|
});
|
|
20616
20732
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20629,7 +20745,7 @@ var ActionTypes;
|
|
|
20629
20745
|
}
|
|
20630
20746
|
});
|
|
20631
20747
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20632
|
-
return _extends$
|
|
20748
|
+
return _extends$g({}, state, {
|
|
20633
20749
|
searchQuery: '',
|
|
20634
20750
|
activeItemIndex: activeItemIndex
|
|
20635
20751
|
});
|
|
@@ -20640,19 +20756,19 @@ var ActionTypes;
|
|
|
20640
20756
|
|
|
20641
20757
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20642
20758
|
});
|
|
20643
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
20759
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
|
|
20644
20760
|
searchQuery: searchQuery
|
|
20645
20761
|
});
|
|
20646
|
-
return _extends$
|
|
20762
|
+
return _extends$g({}, state, {
|
|
20647
20763
|
searchQuery: searchQuery,
|
|
20648
20764
|
activeItemIndex: match
|
|
20649
20765
|
});
|
|
20650
20766
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20651
|
-
return _extends$
|
|
20767
|
+
return _extends$g({}, state, {
|
|
20652
20768
|
searchQuery: ''
|
|
20653
20769
|
});
|
|
20654
20770
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20655
|
-
return _extends$
|
|
20771
|
+
return _extends$g({}, state, {
|
|
20656
20772
|
items: [].concat(state.items, [{
|
|
20657
20773
|
id: action.id,
|
|
20658
20774
|
dataRef: action.dataRef
|
|
@@ -20665,7 +20781,7 @@ var ActionTypes;
|
|
|
20665
20781
|
return a.id === action.id;
|
|
20666
20782
|
});
|
|
20667
20783
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20668
|
-
return _extends$
|
|
20784
|
+
return _extends$g({}, state, {
|
|
20669
20785
|
items: nextItems,
|
|
20670
20786
|
activeItemIndex: function () {
|
|
20671
20787
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20704,19 +20820,19 @@ var ActionTypes$1;
|
|
|
20704
20820
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20705
20821
|
if (state.disabled) return state;
|
|
20706
20822
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20707
|
-
return _extends$
|
|
20823
|
+
return _extends$g({}, state, {
|
|
20708
20824
|
activeOptionIndex: null,
|
|
20709
20825
|
listboxState: ListboxStates.Closed
|
|
20710
20826
|
});
|
|
20711
20827
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20712
20828
|
if (state.disabled) return state;
|
|
20713
20829
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20714
|
-
return _extends$
|
|
20830
|
+
return _extends$g({}, state, {
|
|
20715
20831
|
listboxState: ListboxStates.Open
|
|
20716
20832
|
});
|
|
20717
20833
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20718
20834
|
if (state.disabled === action.disabled) return state;
|
|
20719
|
-
return _extends$
|
|
20835
|
+
return _extends$g({}, state, {
|
|
20720
20836
|
disabled: action.disabled
|
|
20721
20837
|
});
|
|
20722
20838
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20737,7 +20853,7 @@ var ActionTypes$1;
|
|
|
20737
20853
|
}
|
|
20738
20854
|
});
|
|
20739
20855
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
20740
|
-
return _extends$
|
|
20856
|
+
return _extends$g({}, state, {
|
|
20741
20857
|
searchQuery: '',
|
|
20742
20858
|
activeOptionIndex: activeOptionIndex
|
|
20743
20859
|
});
|
|
@@ -20750,10 +20866,10 @@ var ActionTypes$1;
|
|
|
20750
20866
|
|
|
20751
20867
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
20752
20868
|
});
|
|
20753
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
20869
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
|
|
20754
20870
|
searchQuery: searchQuery
|
|
20755
20871
|
});
|
|
20756
|
-
return _extends$
|
|
20872
|
+
return _extends$g({}, state, {
|
|
20757
20873
|
searchQuery: searchQuery,
|
|
20758
20874
|
activeOptionIndex: match
|
|
20759
20875
|
});
|
|
@@ -20761,11 +20877,11 @@ var ActionTypes$1;
|
|
|
20761
20877
|
if (state.disabled) return state;
|
|
20762
20878
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20763
20879
|
if (state.searchQuery === '') return state;
|
|
20764
|
-
return _extends$
|
|
20880
|
+
return _extends$g({}, state, {
|
|
20765
20881
|
searchQuery: ''
|
|
20766
20882
|
});
|
|
20767
20883
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
20768
|
-
return _extends$
|
|
20884
|
+
return _extends$g({}, state, {
|
|
20769
20885
|
options: [].concat(state.options, [{
|
|
20770
20886
|
id: action.id,
|
|
20771
20887
|
dataRef: action.dataRef
|
|
@@ -20778,7 +20894,7 @@ var ActionTypes$1;
|
|
|
20778
20894
|
return a.id === action.id;
|
|
20779
20895
|
});
|
|
20780
20896
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
20781
|
-
return _extends$
|
|
20897
|
+
return _extends$g({}, state, {
|
|
20782
20898
|
options: nextOptions,
|
|
20783
20899
|
activeOptionIndex: function () {
|
|
20784
20900
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -20839,18 +20955,18 @@ const getPaymentCardIcon = name => {
|
|
|
20839
20955
|
}));
|
|
20840
20956
|
};
|
|
20841
20957
|
|
|
20842
|
-
var _path$
|
|
20958
|
+
var _path$e;
|
|
20843
20959
|
|
|
20844
|
-
function _extends$
|
|
20960
|
+
function _extends$f() { _extends$f = Object.assign || 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); }
|
|
20845
20961
|
|
|
20846
20962
|
function SvgChevronRight(props) {
|
|
20847
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
20963
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
20848
20964
|
className: "plc-w-6 plc-h-6",
|
|
20849
20965
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20850
20966
|
fill: "none",
|
|
20851
20967
|
viewBox: "0 0 24 24",
|
|
20852
20968
|
stroke: "currentColor"
|
|
20853
|
-
}, props), _path$
|
|
20969
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
20854
20970
|
strokeLinecap: "round",
|
|
20855
20971
|
strokeLinejoin: "round",
|
|
20856
20972
|
strokeWidth: 2,
|
|
@@ -21066,18 +21182,18 @@ const SavedItems = ({
|
|
|
21066
21182
|
});
|
|
21067
21183
|
};
|
|
21068
21184
|
|
|
21069
|
-
var _path$
|
|
21185
|
+
var _path$d;
|
|
21070
21186
|
|
|
21071
|
-
function _extends$
|
|
21187
|
+
function _extends$e() { _extends$e = Object.assign || 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); }
|
|
21072
21188
|
|
|
21073
21189
|
function SvgRefresh(props) {
|
|
21074
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21190
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
21075
21191
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21076
21192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21077
21193
|
fill: "none",
|
|
21078
21194
|
viewBox: "0 0 24 24",
|
|
21079
21195
|
stroke: "currentColor"
|
|
21080
|
-
}, props), _path$
|
|
21196
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
21081
21197
|
strokeLinecap: "round",
|
|
21082
21198
|
strokeLinejoin: "round",
|
|
21083
21199
|
strokeWidth: 2,
|
|
@@ -21085,35 +21201,35 @@ function SvgRefresh(props) {
|
|
|
21085
21201
|
})));
|
|
21086
21202
|
}
|
|
21087
21203
|
|
|
21088
|
-
var _path$
|
|
21204
|
+
var _path$c;
|
|
21089
21205
|
|
|
21090
|
-
function _extends$
|
|
21206
|
+
function _extends$d() { _extends$d = Object.assign || 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); }
|
|
21091
21207
|
|
|
21092
21208
|
function SvgCalendar(props) {
|
|
21093
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21209
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
21094
21210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21095
21211
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21096
21212
|
viewBox: "0 0 20 20",
|
|
21097
21213
|
fill: "currentColor"
|
|
21098
|
-
}, props), _path$
|
|
21214
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
21099
21215
|
fillRule: "evenodd",
|
|
21100
21216
|
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",
|
|
21101
21217
|
clipRule: "evenodd"
|
|
21102
21218
|
})));
|
|
21103
21219
|
}
|
|
21104
21220
|
|
|
21105
|
-
var _path$
|
|
21221
|
+
var _path$b;
|
|
21106
21222
|
|
|
21107
|
-
function _extends$
|
|
21223
|
+
function _extends$c() { _extends$c = Object.assign || 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); }
|
|
21108
21224
|
|
|
21109
21225
|
function SvgPlus(props) {
|
|
21110
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21226
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
21111
21227
|
className: "plc-w-5 plc-h-5",
|
|
21112
21228
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21113
21229
|
fill: "none",
|
|
21114
21230
|
viewBox: "0 0 24 24",
|
|
21115
21231
|
stroke: "currentColor"
|
|
21116
|
-
}, props), _path$
|
|
21232
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
21117
21233
|
strokeLinecap: "round",
|
|
21118
21234
|
strokeLinejoin: "round",
|
|
21119
21235
|
strokeWidth: 2,
|
|
@@ -21121,17 +21237,17 @@ function SvgPlus(props) {
|
|
|
21121
21237
|
})));
|
|
21122
21238
|
}
|
|
21123
21239
|
|
|
21124
|
-
var _path$
|
|
21240
|
+
var _path$a;
|
|
21125
21241
|
|
|
21126
|
-
function _extends$
|
|
21242
|
+
function _extends$b() { _extends$b = Object.assign || 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); }
|
|
21127
21243
|
|
|
21128
21244
|
function SvgCheckMark(props) {
|
|
21129
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21245
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
21130
21246
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21131
21247
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21132
21248
|
viewBox: "0 0 20 20",
|
|
21133
21249
|
fill: "currentColor"
|
|
21134
|
-
}, props), _path$
|
|
21250
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
21135
21251
|
fillRule: "evenodd",
|
|
21136
21252
|
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",
|
|
21137
21253
|
clipRule: "evenodd"
|
|
@@ -21193,9 +21309,9 @@ const SubscriptionsItems = ({
|
|
|
21193
21309
|
const {
|
|
21194
21310
|
t
|
|
21195
21311
|
} = useTranslation("dashboard");
|
|
21196
|
-
const subs =
|
|
21197
|
-
if (
|
|
21198
|
-
return
|
|
21312
|
+
const subs = getNonDonationSubs();
|
|
21313
|
+
if (subs.length === 0) return null;
|
|
21314
|
+
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21199
21315
|
const isActive = activeMenu === sub.id; // Cancel button click handlers
|
|
21200
21316
|
|
|
21201
21317
|
const onCancelClick = () => {
|
|
@@ -21326,6 +21442,12 @@ const SubscriptionsItems = ({
|
|
|
21326
21442
|
});
|
|
21327
21443
|
};
|
|
21328
21444
|
|
|
21445
|
+
function getNonDonationSubs() {
|
|
21446
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21447
|
+
|
|
21448
|
+
return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => !sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
21449
|
+
}
|
|
21450
|
+
|
|
21329
21451
|
/**
|
|
21330
21452
|
* @typedef {Object} AccordionPropsType
|
|
21331
21453
|
* @property {string} initialActiveMenu the initial active menu
|
|
@@ -21408,18 +21530,18 @@ Accordion.item = function AccordionItem({
|
|
|
21408
21530
|
}, content)) : null;
|
|
21409
21531
|
};
|
|
21410
21532
|
|
|
21411
|
-
var _path$
|
|
21533
|
+
var _path$9;
|
|
21412
21534
|
|
|
21413
|
-
function _extends$
|
|
21535
|
+
function _extends$a() { _extends$a = Object.assign || 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); }
|
|
21414
21536
|
|
|
21415
21537
|
function SvgExit(props) {
|
|
21416
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21538
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
21417
21539
|
className: "plc-w-6 plc-h-6",
|
|
21418
21540
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21419
21541
|
fill: "none",
|
|
21420
21542
|
viewBox: "0 0 24 24",
|
|
21421
21543
|
stroke: "currentColor"
|
|
21422
|
-
}, props), _path$
|
|
21544
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
21423
21545
|
strokeLinecap: "round",
|
|
21424
21546
|
strokeLinejoin: "round",
|
|
21425
21547
|
strokeWidth: 2,
|
|
@@ -21427,17 +21549,17 @@ function SvgExit(props) {
|
|
|
21427
21549
|
})));
|
|
21428
21550
|
}
|
|
21429
21551
|
|
|
21430
|
-
var _path$
|
|
21552
|
+
var _path$8;
|
|
21431
21553
|
|
|
21432
|
-
function _extends$
|
|
21554
|
+
function _extends$9() { _extends$9 = Object.assign || 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); }
|
|
21433
21555
|
|
|
21434
21556
|
function SvgUser(props) {
|
|
21435
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21557
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
21436
21558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21437
21559
|
fill: "none",
|
|
21438
21560
|
viewBox: "0 0 24 24",
|
|
21439
21561
|
stroke: "currentColor"
|
|
21440
|
-
}, props), _path$
|
|
21562
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
|
|
21441
21563
|
strokeLinecap: "round",
|
|
21442
21564
|
strokeLinejoin: "round",
|
|
21443
21565
|
strokeWidth: 2,
|
|
@@ -21445,18 +21567,18 @@ function SvgUser(props) {
|
|
|
21445
21567
|
})));
|
|
21446
21568
|
}
|
|
21447
21569
|
|
|
21448
|
-
var _path$
|
|
21570
|
+
var _path$7;
|
|
21449
21571
|
|
|
21450
|
-
function _extends$
|
|
21572
|
+
function _extends$8() { _extends$8 = Object.assign || 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); }
|
|
21451
21573
|
|
|
21452
21574
|
function SvgNewsletter(props) {
|
|
21453
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21575
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
21454
21576
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21455
21577
|
className: "plc-h-5 plc-w-5",
|
|
21456
21578
|
fill: "none",
|
|
21457
21579
|
viewBox: "0 0 24 24",
|
|
21458
21580
|
stroke: "currentColor"
|
|
21459
|
-
}, props), _path$
|
|
21581
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
|
|
21460
21582
|
strokeLinecap: "round",
|
|
21461
21583
|
strokeLinejoin: "round",
|
|
21462
21584
|
strokeWidth: 2,
|
|
@@ -21464,18 +21586,18 @@ function SvgNewsletter(props) {
|
|
|
21464
21586
|
})));
|
|
21465
21587
|
}
|
|
21466
21588
|
|
|
21467
|
-
var _path$
|
|
21589
|
+
var _path$6;
|
|
21468
21590
|
|
|
21469
|
-
function _extends$
|
|
21591
|
+
function _extends$7() { _extends$7 = Object.assign || 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); }
|
|
21470
21592
|
|
|
21471
21593
|
function SvgPaymentCard(props) {
|
|
21472
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21594
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
21473
21595
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21474
21596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21475
21597
|
fill: "none",
|
|
21476
21598
|
viewBox: "0 0 24 24",
|
|
21477
21599
|
stroke: "currentColor"
|
|
21478
|
-
}, props), _path$
|
|
21600
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
|
|
21479
21601
|
strokeLinecap: "round",
|
|
21480
21602
|
strokeLinejoin: "round",
|
|
21481
21603
|
strokeWidth: 2,
|
|
@@ -21483,18 +21605,18 @@ function SvgPaymentCard(props) {
|
|
|
21483
21605
|
})));
|
|
21484
21606
|
}
|
|
21485
21607
|
|
|
21486
|
-
var _path$
|
|
21608
|
+
var _path$5, _path2;
|
|
21487
21609
|
|
|
21488
|
-
function _extends$
|
|
21610
|
+
function _extends$6() { _extends$6 = Object.assign || 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); }
|
|
21489
21611
|
|
|
21490
21612
|
function SvgLocationPin(props) {
|
|
21491
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21613
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
21492
21614
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21493
21615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21494
21616
|
fill: "none",
|
|
21495
21617
|
viewBox: "0 0 24 24",
|
|
21496
21618
|
stroke: "currentColor"
|
|
21497
|
-
}, props), _path$
|
|
21619
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
|
|
21498
21620
|
strokeLinecap: "round",
|
|
21499
21621
|
strokeLinejoin: "round",
|
|
21500
21622
|
strokeWidth: 2,
|
|
@@ -21509,10 +21631,10 @@ function SvgLocationPin(props) {
|
|
|
21509
21631
|
|
|
21510
21632
|
var _switch;
|
|
21511
21633
|
|
|
21512
|
-
function _extends$
|
|
21634
|
+
function _extends$5() { _extends$5 = Object.assign || 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); }
|
|
21513
21635
|
|
|
21514
21636
|
function SvgSubscription(props) {
|
|
21515
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21637
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
21516
21638
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21517
21639
|
viewBox: "0 0 100 125",
|
|
21518
21640
|
fill: "currentColor"
|
|
@@ -21527,18 +21649,18 @@ function SvgSubscription(props) {
|
|
|
21527
21649
|
}))))));
|
|
21528
21650
|
}
|
|
21529
21651
|
|
|
21530
|
-
var _path$
|
|
21652
|
+
var _path$4;
|
|
21531
21653
|
|
|
21532
|
-
function _extends$
|
|
21654
|
+
function _extends$4() { _extends$4 = Object.assign || 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); }
|
|
21533
21655
|
|
|
21534
21656
|
function SvgShopping(props) {
|
|
21535
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21657
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
21536
21658
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21537
21659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21538
21660
|
fill: "none",
|
|
21539
21661
|
viewBox: "0 0 24 24",
|
|
21540
21662
|
stroke: "currentColor"
|
|
21541
|
-
}, props), _path$
|
|
21663
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
|
|
21542
21664
|
strokeLinecap: "round",
|
|
21543
21665
|
strokeLinejoin: "round",
|
|
21544
21666
|
strokeWidth: 2,
|
|
@@ -21546,18 +21668,18 @@ function SvgShopping(props) {
|
|
|
21546
21668
|
})));
|
|
21547
21669
|
}
|
|
21548
21670
|
|
|
21549
|
-
var _path$
|
|
21671
|
+
var _path$3;
|
|
21550
21672
|
|
|
21551
|
-
function _extends$
|
|
21673
|
+
function _extends$3() { _extends$3 = Object.assign || 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); }
|
|
21552
21674
|
|
|
21553
21675
|
function SvgBookmark(props) {
|
|
21554
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21676
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
21555
21677
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21556
21678
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21557
21679
|
fill: "none",
|
|
21558
21680
|
viewBox: "0 0 24 24",
|
|
21559
21681
|
stroke: "currentColor"
|
|
21560
|
-
}, props), _path$
|
|
21682
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
21561
21683
|
strokeLinecap: "round",
|
|
21562
21684
|
strokeLinejoin: "round",
|
|
21563
21685
|
strokeWidth: 2,
|
|
@@ -21565,25 +21687,83 @@ function SvgBookmark(props) {
|
|
|
21565
21687
|
})));
|
|
21566
21688
|
}
|
|
21567
21689
|
|
|
21568
|
-
var _path$
|
|
21690
|
+
var _path$2;
|
|
21569
21691
|
|
|
21570
|
-
function _extends$
|
|
21692
|
+
function _extends$2() { _extends$2 = Object.assign || 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); }
|
|
21571
21693
|
|
|
21572
21694
|
function SvgKey(props) {
|
|
21573
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21695
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
21574
21696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21575
21697
|
viewBox: "0 0 20 20",
|
|
21576
21698
|
fill: "currentColor"
|
|
21577
|
-
}, props), _path$
|
|
21699
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
21578
21700
|
fillRule: "evenodd",
|
|
21579
21701
|
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",
|
|
21580
21702
|
clipRule: "evenodd"
|
|
21581
21703
|
})));
|
|
21582
21704
|
}
|
|
21583
21705
|
|
|
21706
|
+
var _path$1;
|
|
21707
|
+
|
|
21708
|
+
function _extends$1() { _extends$1 = Object.assign || 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); }
|
|
21709
|
+
|
|
21710
|
+
function SvgDonate(props) {
|
|
21711
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
21712
|
+
width: 24,
|
|
21713
|
+
height: 24,
|
|
21714
|
+
fill: "currentColor",
|
|
21715
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21716
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
21717
|
+
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"
|
|
21718
|
+
})));
|
|
21719
|
+
}
|
|
21720
|
+
|
|
21721
|
+
const DonationsMenu = () => {
|
|
21722
|
+
const {
|
|
21723
|
+
t
|
|
21724
|
+
} = useTranslation("dashboard");
|
|
21725
|
+
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21726
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
21727
|
+
key: sub.id,
|
|
21728
|
+
className: "plc-w-full plc-align-top pelcro-donation-row"
|
|
21729
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
21730
|
+
className: "plc-truncate"
|
|
21731
|
+
}, sub.plan.nickname && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
21732
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-donation-plan"
|
|
21733
|
+
}, sub.plan.nickname), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
21734
|
+
className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
|
|
21735
|
+
}, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
|
|
21736
|
+
className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
|
|
21737
|
+
}, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
|
|
21738
|
+
});
|
|
21739
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
21740
|
+
className: "plc-w-full plc-table-fixed pelcro-donations-table"
|
|
21741
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
21742
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
21743
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
21744
|
+
className: "plc-w-6/12 "
|
|
21745
|
+
}, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
|
|
21746
|
+
className: "plc-w-6/12 "
|
|
21747
|
+
}, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
21748
|
+
className: "plc-h-4"
|
|
21749
|
+
}), subscriptions));
|
|
21750
|
+
};
|
|
21751
|
+
|
|
21752
|
+
function getDonationSubs() {
|
|
21753
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21754
|
+
|
|
21755
|
+
return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
21756
|
+
}
|
|
21757
|
+
|
|
21758
|
+
function formatStartDate(date) {
|
|
21759
|
+
const startDate = new Date(date);
|
|
21760
|
+
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21761
|
+
}
|
|
21762
|
+
|
|
21584
21763
|
const SUB_MENUS = {
|
|
21585
21764
|
PROFILE: "profile",
|
|
21586
21765
|
SUBSCRIPTIONS: "subscriptions",
|
|
21766
|
+
DONATIONS: "donations",
|
|
21587
21767
|
PAYMENT_CARDS: "payment-cards",
|
|
21588
21768
|
ADDRESSES: "addresses",
|
|
21589
21769
|
GIFTS: "gifts",
|
|
@@ -22111,6 +22291,14 @@ class Dashboard extends Component {
|
|
|
22111
22291
|
displayProductSelect: this.displayProductSelect,
|
|
22112
22292
|
displayRedeem: this.displayRedeem
|
|
22113
22293
|
})
|
|
22294
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22295
|
+
show: hasDonationSubs(),
|
|
22296
|
+
name: SUB_MENUS.DONATIONS,
|
|
22297
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
|
|
22298
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
22299
|
+
}),
|
|
22300
|
+
title: this.locale("labels.donations"),
|
|
22301
|
+
content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
|
|
22114
22302
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22115
22303
|
name: SUB_MENUS.GIFTS,
|
|
22116
22304
|
icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
|
|
@@ -22137,6 +22325,13 @@ class Dashboard extends Component {
|
|
|
22137
22325
|
|
|
22138
22326
|
}
|
|
22139
22327
|
|
|
22328
|
+
function hasDonationSubs() {
|
|
22329
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22330
|
+
|
|
22331
|
+
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22332
|
+
return donations.length > 0;
|
|
22333
|
+
}
|
|
22334
|
+
|
|
22140
22335
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
22141
22336
|
|
|
22142
22337
|
// The button in the lower right that shows the dashboard.
|