@pelcro/react-pelcro-js 2.7.0-beta.1 → 2.7.0-beta.10
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 +458 -218
- package/dist/index.esm.js +458 -218
- 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",
|
|
@@ -6770,6 +6784,8 @@ class SaveToMetadataButtonClass {
|
|
|
6770
6784
|
_saveToMetadata.set(this, {
|
|
6771
6785
|
writable: true,
|
|
6772
6786
|
value: event => {
|
|
6787
|
+
var _user$metadata;
|
|
6788
|
+
|
|
6773
6789
|
const button = event.currentTarget;
|
|
6774
6790
|
const user = window.Pelcro.user.read();
|
|
6775
6791
|
const {
|
|
@@ -6785,7 +6801,7 @@ class SaveToMetadataButtonClass {
|
|
|
6785
6801
|
|
|
6786
6802
|
let newMetadataValue = [buttonMetadata]; // if this key already exist in user metadata object, append to it.
|
|
6787
6803
|
|
|
6788
|
-
const oldValue = user.metadata[`metadata_saved_${key}`];
|
|
6804
|
+
const oldValue = (_user$metadata = user.metadata) === null || _user$metadata === void 0 ? void 0 : _user$metadata[`metadata_saved_${key}`];
|
|
6789
6805
|
|
|
6790
6806
|
if (oldValue) {
|
|
6791
6807
|
if (Array.isArray(oldValue)) {
|
|
@@ -6899,8 +6915,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6899
6915
|
|
|
6900
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}}
|
|
6901
6917
|
|
|
6902
|
-
function _extends$
|
|
6903
|
-
_extends$
|
|
6918
|
+
function _extends$x() {
|
|
6919
|
+
_extends$x = Object.assign || function (target) {
|
|
6904
6920
|
for (var i = 1; i < arguments.length; i++) {
|
|
6905
6921
|
var source = arguments[i];
|
|
6906
6922
|
|
|
@@ -6914,7 +6930,7 @@ function _extends$w() {
|
|
|
6914
6930
|
return target;
|
|
6915
6931
|
};
|
|
6916
6932
|
|
|
6917
|
-
return _extends$
|
|
6933
|
+
return _extends$x.apply(this, arguments);
|
|
6918
6934
|
}
|
|
6919
6935
|
|
|
6920
6936
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7004,7 +7020,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7004
7020
|
var reducer = function reducer(state, action) {
|
|
7005
7021
|
switch (action.type) {
|
|
7006
7022
|
case ActionType.ADD_TOAST:
|
|
7007
|
-
return _extends$
|
|
7023
|
+
return _extends$x({}, state, {
|
|
7008
7024
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7009
7025
|
});
|
|
7010
7026
|
|
|
@@ -7014,9 +7030,9 @@ var reducer = function reducer(state, action) {
|
|
|
7014
7030
|
clearFromRemoveQueue(action.toast.id);
|
|
7015
7031
|
}
|
|
7016
7032
|
|
|
7017
|
-
return _extends$
|
|
7033
|
+
return _extends$x({}, state, {
|
|
7018
7034
|
toasts: state.toasts.map(function (t) {
|
|
7019
|
-
return t.id === action.toast.id ? _extends$
|
|
7035
|
+
return t.id === action.toast.id ? _extends$x({}, t, action.toast) : t;
|
|
7020
7036
|
})
|
|
7021
7037
|
});
|
|
7022
7038
|
|
|
@@ -7043,9 +7059,9 @@ var reducer = function reducer(state, action) {
|
|
|
7043
7059
|
});
|
|
7044
7060
|
}
|
|
7045
7061
|
|
|
7046
|
-
return _extends$
|
|
7062
|
+
return _extends$x({}, state, {
|
|
7047
7063
|
toasts: state.toasts.map(function (t) {
|
|
7048
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7064
|
+
return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
|
|
7049
7065
|
visible: false
|
|
7050
7066
|
}) : t;
|
|
7051
7067
|
})
|
|
@@ -7053,28 +7069,28 @@ var reducer = function reducer(state, action) {
|
|
|
7053
7069
|
|
|
7054
7070
|
case ActionType.REMOVE_TOAST:
|
|
7055
7071
|
if (action.toastId === undefined) {
|
|
7056
|
-
return _extends$
|
|
7072
|
+
return _extends$x({}, state, {
|
|
7057
7073
|
toasts: []
|
|
7058
7074
|
});
|
|
7059
7075
|
}
|
|
7060
7076
|
|
|
7061
|
-
return _extends$
|
|
7077
|
+
return _extends$x({}, state, {
|
|
7062
7078
|
toasts: state.toasts.filter(function (t) {
|
|
7063
7079
|
return t.id !== action.toastId;
|
|
7064
7080
|
})
|
|
7065
7081
|
});
|
|
7066
7082
|
|
|
7067
7083
|
case ActionType.START_PAUSE:
|
|
7068
|
-
return _extends$
|
|
7084
|
+
return _extends$x({}, state, {
|
|
7069
7085
|
pausedAt: action.time
|
|
7070
7086
|
});
|
|
7071
7087
|
|
|
7072
7088
|
case ActionType.END_PAUSE:
|
|
7073
7089
|
var diff = action.time - (state.pausedAt || 0);
|
|
7074
|
-
return _extends$
|
|
7090
|
+
return _extends$x({}, state, {
|
|
7075
7091
|
pausedAt: undefined,
|
|
7076
7092
|
toasts: state.toasts.map(function (t) {
|
|
7077
|
-
return _extends$
|
|
7093
|
+
return _extends$x({}, t, {
|
|
7078
7094
|
pauseDuration: t.pauseDuration + diff
|
|
7079
7095
|
});
|
|
7080
7096
|
})
|
|
@@ -7121,12 +7137,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7121
7137
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7122
7138
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7123
7139
|
|
|
7124
|
-
return _extends$
|
|
7140
|
+
return _extends$x({}, toastOptions, toastOptions[t.type], t, {
|
|
7125
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],
|
|
7126
|
-
style: _extends$
|
|
7142
|
+
style: _extends$x({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7127
7143
|
});
|
|
7128
7144
|
});
|
|
7129
|
-
return _extends$
|
|
7145
|
+
return _extends$x({}, state, {
|
|
7130
7146
|
toasts: mergedToasts
|
|
7131
7147
|
});
|
|
7132
7148
|
};
|
|
@@ -7136,7 +7152,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7136
7152
|
type = 'blank';
|
|
7137
7153
|
}
|
|
7138
7154
|
|
|
7139
|
-
return _extends$
|
|
7155
|
+
return _extends$x({
|
|
7140
7156
|
createdAt: Date.now(),
|
|
7141
7157
|
visible: true,
|
|
7142
7158
|
type: type,
|
|
@@ -7186,14 +7202,14 @@ toast.remove = function (toastId) {
|
|
|
7186
7202
|
};
|
|
7187
7203
|
|
|
7188
7204
|
toast.promise = function (promise, msgs, opts) {
|
|
7189
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7205
|
+
var id = toast.loading(msgs.loading, _extends$x({}, opts, opts == null ? void 0 : opts.loading));
|
|
7190
7206
|
promise.then(function (p) {
|
|
7191
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7207
|
+
toast.success(resolveValue(msgs.success, p), _extends$x({
|
|
7192
7208
|
id: id
|
|
7193
7209
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7194
7210
|
return p;
|
|
7195
7211
|
})["catch"](function (e) {
|
|
7196
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7212
|
+
toast.error(resolveValue(msgs.error, e), _extends$x({
|
|
7197
7213
|
id: id
|
|
7198
7214
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7199
7215
|
});
|
|
@@ -7532,7 +7548,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
|
|
|
7532
7548
|
var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7533
7549
|
return createElement(ToastBarBase, {
|
|
7534
7550
|
className: toast.className,
|
|
7535
|
-
style: _extends$
|
|
7551
|
+
style: _extends$x({}, animationStyle, style, toast.style)
|
|
7536
7552
|
}, typeof children === 'function' ? children({
|
|
7537
7553
|
icon: icon,
|
|
7538
7554
|
message: message
|
|
@@ -7562,7 +7578,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7562
7578
|
} : position.includes('right') ? {
|
|
7563
7579
|
justifyContent: 'flex-end'
|
|
7564
7580
|
} : {};
|
|
7565
|
-
return _extends$
|
|
7581
|
+
return _extends$x({
|
|
7566
7582
|
left: 0,
|
|
7567
7583
|
right: 0,
|
|
7568
7584
|
display: 'flex',
|
|
@@ -7589,7 +7605,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7589
7605
|
handlers = _useToaster.handlers;
|
|
7590
7606
|
|
|
7591
7607
|
return createElement("div", {
|
|
7592
|
-
style: _extends$
|
|
7608
|
+
style: _extends$x({
|
|
7593
7609
|
position: 'fixed',
|
|
7594
7610
|
zIndex: 9999,
|
|
7595
7611
|
top: DEFAULT_OFFSET,
|
|
@@ -7624,82 +7640,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7624
7640
|
}));
|
|
7625
7641
|
};
|
|
7626
7642
|
|
|
7627
|
-
var _path$
|
|
7643
|
+
var _path$u;
|
|
7628
7644
|
|
|
7629
|
-
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); }
|
|
7630
7646
|
|
|
7631
7647
|
function SvgCheckSolid(props) {
|
|
7632
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7648
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
7633
7649
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7634
7650
|
className: "h-5 w-5",
|
|
7635
7651
|
viewBox: "0 0 20 20",
|
|
7636
7652
|
fill: "currentColor"
|
|
7637
|
-
}, props), _path$
|
|
7653
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
|
|
7638
7654
|
fillRule: "evenodd",
|
|
7639
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",
|
|
7640
7656
|
clipRule: "evenodd"
|
|
7641
7657
|
})));
|
|
7642
7658
|
}
|
|
7643
7659
|
|
|
7644
|
-
var _path$
|
|
7660
|
+
var _path$t;
|
|
7645
7661
|
|
|
7646
|
-
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); }
|
|
7647
7663
|
|
|
7648
7664
|
function SvgXIcon(props) {
|
|
7649
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7665
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
7650
7666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7651
7667
|
viewBox: "0 0 20 20",
|
|
7652
7668
|
fill: "currentColor"
|
|
7653
|
-
}, props), _path$
|
|
7669
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
|
|
7654
7670
|
fill: "evenodd",
|
|
7655
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",
|
|
7656
7672
|
clipRule: "evenodd"
|
|
7657
7673
|
})));
|
|
7658
7674
|
}
|
|
7659
7675
|
|
|
7660
|
-
var _path$
|
|
7676
|
+
var _path$s;
|
|
7661
7677
|
|
|
7662
|
-
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); }
|
|
7663
7679
|
|
|
7664
7680
|
function SvgXIconSolid(props) {
|
|
7665
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7681
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
7666
7682
|
className: "plc-w-4 plc-h-4",
|
|
7667
7683
|
fill: "currentColor",
|
|
7668
7684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7669
7685
|
viewBox: "0 0 100 100"
|
|
7670
|
-
}, props), _path$
|
|
7686
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
|
|
7671
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"
|
|
7672
7688
|
})));
|
|
7673
7689
|
}
|
|
7674
7690
|
|
|
7675
|
-
var _path$
|
|
7691
|
+
var _path$r;
|
|
7676
7692
|
|
|
7677
|
-
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); }
|
|
7678
7694
|
|
|
7679
7695
|
function SvgExclamation(props) {
|
|
7680
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7696
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
7681
7697
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7682
7698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7683
7699
|
viewBox: "0 0 20 20",
|
|
7684
7700
|
fill: "currentColor"
|
|
7685
|
-
}, props), _path$
|
|
7701
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
7686
7702
|
fillRule: "evenodd",
|
|
7687
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",
|
|
7688
7704
|
clipRule: "evenodd"
|
|
7689
7705
|
})));
|
|
7690
7706
|
}
|
|
7691
7707
|
|
|
7692
|
-
var _path$
|
|
7708
|
+
var _path$q, _path2$3;
|
|
7693
7709
|
|
|
7694
|
-
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); }
|
|
7695
7711
|
|
|
7696
7712
|
function SvgSpinner(props) {
|
|
7697
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7713
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
7698
7714
|
className: "plc-animate-spin",
|
|
7699
7715
|
viewBox: "0 0 24 24",
|
|
7700
7716
|
fill: "currentColor",
|
|
7701
7717
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7702
|
-
}, props), _path$
|
|
7718
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
7703
7719
|
opacity: 0.2,
|
|
7704
7720
|
fill: "evenodd",
|
|
7705
7721
|
clipRule: "evenodd",
|
|
@@ -9100,6 +9116,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
|
9100
9116
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
9101
9117
|
const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
|
|
9102
9118
|
const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
|
|
9119
|
+
const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
|
|
9103
9120
|
const SET_PERCENT_OFF = "SET_PERCENT_OFF";
|
|
9104
9121
|
const SET_COUPON = "SET_COUPON";
|
|
9105
9122
|
const SET_COUPON_ERROR = "SET_COUPON_ERROR";
|
|
@@ -9646,16 +9663,16 @@ const LoginPassword = props => /*#__PURE__*/React__default.createElement(Passwor
|
|
|
9646
9663
|
store: store$f
|
|
9647
9664
|
}, props));
|
|
9648
9665
|
|
|
9649
|
-
var _path$
|
|
9666
|
+
var _path$p;
|
|
9650
9667
|
|
|
9651
|
-
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); }
|
|
9652
9669
|
|
|
9653
9670
|
function SvgCheck(props) {
|
|
9654
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9671
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
9655
9672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9656
9673
|
fill: "currentColor",
|
|
9657
9674
|
viewBox: "0 0 20 20"
|
|
9658
|
-
}, props), _path$
|
|
9675
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
9659
9676
|
fillRule: "evenodd",
|
|
9660
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",
|
|
9661
9678
|
clipRule: "evenodd"
|
|
@@ -9968,19 +9985,21 @@ const RegisterContainer = ({
|
|
|
9968
9985
|
*/
|
|
9969
9986
|
|
|
9970
9987
|
function hasSecurityTokenEnabled$1() {
|
|
9971
|
-
|
|
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);
|
|
9972
9991
|
return hasSecuritySdkLoaded;
|
|
9973
9992
|
}
|
|
9974
9993
|
|
|
9975
|
-
var _path$
|
|
9994
|
+
var _path$o;
|
|
9976
9995
|
|
|
9977
|
-
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); }
|
|
9978
9997
|
|
|
9979
9998
|
function SvgFacebookLogo(props) {
|
|
9980
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9999
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
9981
10000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9982
10001
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
9983
|
-
}, props), _path$
|
|
10002
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
9984
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",
|
|
9985
10004
|
fill: "#3c5a9a"
|
|
9986
10005
|
})));
|
|
@@ -10053,15 +10072,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10053
10072
|
unwrapExports(googleLogin);
|
|
10054
10073
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10055
10074
|
|
|
10056
|
-
var _path$
|
|
10075
|
+
var _path$n, _path2$2, _path3$1, _path4;
|
|
10057
10076
|
|
|
10058
|
-
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); }
|
|
10059
10078
|
|
|
10060
10079
|
function SvgGoogleLogo(props) {
|
|
10061
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10080
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
10062
10081
|
viewBox: "0 0 24 24",
|
|
10063
10082
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10064
|
-
}, props), _path$
|
|
10083
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
10065
10084
|
fill: "#4285F4",
|
|
10066
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"
|
|
10067
10086
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10138,15 +10157,15 @@ const GoogleLoginButton = ({
|
|
|
10138
10157
|
}) : null;
|
|
10139
10158
|
};
|
|
10140
10159
|
|
|
10141
|
-
var _path$
|
|
10160
|
+
var _path$m;
|
|
10142
10161
|
|
|
10143
|
-
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); }
|
|
10144
10163
|
|
|
10145
10164
|
function SvgAuth0Logo(props) {
|
|
10146
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10165
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
10147
10166
|
viewBox: "0 0 256 285",
|
|
10148
10167
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10149
|
-
}, props), _path$
|
|
10168
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
10150
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"
|
|
10151
10170
|
})));
|
|
10152
10171
|
}
|
|
@@ -10157,7 +10176,11 @@ const Auth0LoginButton = ({
|
|
|
10157
10176
|
labelClassName = "",
|
|
10158
10177
|
iconClassName = ""
|
|
10159
10178
|
}) => {
|
|
10160
|
-
|
|
10179
|
+
if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
|
|
10180
|
+
console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10181
|
+
}
|
|
10182
|
+
|
|
10183
|
+
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
|
|
10161
10184
|
const auth0InstanceRef = React__default.useRef(null);
|
|
10162
10185
|
React__default.useEffect(() => {
|
|
10163
10186
|
if (auth0Enabled) {
|
|
@@ -10301,15 +10324,15 @@ function LoginView(props) {
|
|
|
10301
10324
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10302
10325
|
}
|
|
10303
10326
|
|
|
10304
|
-
var _path$
|
|
10327
|
+
var _path$l, _path2$1, _path3;
|
|
10305
10328
|
|
|
10306
|
-
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); }
|
|
10307
10330
|
|
|
10308
10331
|
function SvgPelcroAuthorship(props) {
|
|
10309
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10332
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
10310
10333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10311
10334
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10312
|
-
}, props), _path$
|
|
10335
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
10313
10336
|
fill: "none",
|
|
10314
10337
|
stroke: "#4a4a4a",
|
|
10315
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"
|
|
@@ -11025,42 +11048,80 @@ class SelectModal extends Component {
|
|
|
11025
11048
|
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
11026
11049
|
});
|
|
11027
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
|
+
|
|
11028
11084
|
_defineProperty$3(this, "renderProducts", () => {
|
|
11029
11085
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
11030
11086
|
const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
return productsToShow.map((product, i) => {
|
|
11034
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11035
|
-
key: product.id,
|
|
11036
|
-
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"
|
|
11037
|
-
}, product.image && /*#__PURE__*/React__default.createElement("img", {
|
|
11038
|
-
alt: `image of ${product.name}`,
|
|
11039
|
-
src: product.image,
|
|
11040
|
-
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11041
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11042
|
-
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11043
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11044
|
-
className: "plc-w-full pelcro-select-product-header"
|
|
11045
|
-
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11046
|
-
className: "plc-font-bold pelcro-select-product-title"
|
|
11047
|
-
}, product.name), /*#__PURE__*/React__default.createElement("p", {
|
|
11048
|
-
className: "plc-text-xs pelcro-select-product-description"
|
|
11049
|
-
}, product.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
11050
|
-
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11051
|
-
}, product.plans && /*#__PURE__*/React__default.createElement("p", {
|
|
11052
|
-
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11053
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
11054
|
-
onClick: productButtonCallback,
|
|
11055
|
-
"data-key": product.id,
|
|
11056
|
-
id: "pelcro-select-product-back-button",
|
|
11057
|
-
className: "plc-ml-auto plc-text-xs"
|
|
11058
|
-
}, i === 0 && {
|
|
11059
|
-
autoFocus: true
|
|
11060
|
-
}), productButtonLabel))));
|
|
11087
|
+
return productsToShow.map((product, index) => {
|
|
11088
|
+
return this.renderOneProduct(product, index);
|
|
11061
11089
|
});
|
|
11062
11090
|
});
|
|
11063
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.some(matchedProduct => matchedProduct.id === product.id));
|
|
11121
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
11122
|
+
}
|
|
11123
|
+
});
|
|
11124
|
+
|
|
11064
11125
|
_defineProperty$3(this, "renderPlans", () => {
|
|
11065
11126
|
return this.state.planList.map(plan => {
|
|
11066
11127
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
@@ -11187,7 +11248,7 @@ class SelectModal extends Component {
|
|
|
11187
11248
|
}
|
|
11188
11249
|
|
|
11189
11250
|
render() {
|
|
11190
|
-
var _window$Pelcro$
|
|
11251
|
+
var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
|
|
11191
11252
|
|
|
11192
11253
|
const {
|
|
11193
11254
|
disableGifting
|
|
@@ -11221,9 +11282,9 @@ class SelectModal extends Component {
|
|
|
11221
11282
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11222
11283
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
11223
11284
|
className: "plc-text-2xl plc-font-semibold"
|
|
11224
|
-
}, 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", {
|
|
11225
11286
|
className: "pelcro-select-products-wrapper"
|
|
11226
|
-
}, 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", {
|
|
11227
11288
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
11228
11289
|
}, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
|
|
11229
11290
|
className: "plc-flex plc-justify-center plc-mt-2"
|
|
@@ -12929,15 +12990,50 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12929
12990
|
});
|
|
12930
12991
|
|
|
12931
12992
|
if (err) {
|
|
12993
|
+
onFailure(err);
|
|
12994
|
+
dispatch({
|
|
12995
|
+
type: SET_COUPON_ERROR,
|
|
12996
|
+
payload: getErrorMessages(err)
|
|
12997
|
+
}); // remove current coupon
|
|
12998
|
+
|
|
12999
|
+
dispatch({
|
|
13000
|
+
type: SET_COUPON,
|
|
13001
|
+
payload: null
|
|
13002
|
+
});
|
|
12932
13003
|
dispatch({
|
|
12933
13004
|
type: SET_PERCENT_OFF,
|
|
12934
13005
|
payload: ""
|
|
12935
13006
|
});
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
payload: getErrorMessages(err)
|
|
13007
|
+
dispatch({
|
|
13008
|
+
type: SET_UPDATED_PRICE,
|
|
13009
|
+
payload: null
|
|
12940
13010
|
});
|
|
13011
|
+
dispatch({
|
|
13012
|
+
type: SET_TAX_AMOUNT,
|
|
13013
|
+
payload: null
|
|
13014
|
+
});
|
|
13015
|
+
const {
|
|
13016
|
+
currentPlan
|
|
13017
|
+
} = state;
|
|
13018
|
+
|
|
13019
|
+
if (currentPlan) {
|
|
13020
|
+
var _currentPlan$quantity;
|
|
13021
|
+
|
|
13022
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13023
|
+
const price = currentPlan.amount;
|
|
13024
|
+
dispatch({
|
|
13025
|
+
type: SET_UPDATED_PRICE,
|
|
13026
|
+
// set original plan price
|
|
13027
|
+
payload: price * quantity
|
|
13028
|
+
});
|
|
13029
|
+
dispatch({
|
|
13030
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13031
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13032
|
+
|
|
13033
|
+
updateTotalAmountWithTax();
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
return;
|
|
12941
13037
|
}
|
|
12942
13038
|
|
|
12943
13039
|
dispatch({
|
|
@@ -13027,6 +13123,54 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13027
13123
|
|
|
13028
13124
|
const debouncedApplyCouponCode = useRef(debounce(onApplyCouponCode, 1000)).current;
|
|
13029
13125
|
|
|
13126
|
+
const removeAppliedCoupon = state => {
|
|
13127
|
+
state.couponCode = "";
|
|
13128
|
+
dispatch({
|
|
13129
|
+
type: SET_COUPON_ERROR,
|
|
13130
|
+
payload: ""
|
|
13131
|
+
});
|
|
13132
|
+
dispatch({
|
|
13133
|
+
type: SHOW_COUPON_FIELD,
|
|
13134
|
+
payload: false
|
|
13135
|
+
});
|
|
13136
|
+
dispatch({
|
|
13137
|
+
type: SET_COUPON,
|
|
13138
|
+
payload: null
|
|
13139
|
+
});
|
|
13140
|
+
dispatch({
|
|
13141
|
+
type: SET_PERCENT_OFF,
|
|
13142
|
+
payload: ""
|
|
13143
|
+
});
|
|
13144
|
+
dispatch({
|
|
13145
|
+
type: SET_UPDATED_PRICE,
|
|
13146
|
+
payload: null
|
|
13147
|
+
});
|
|
13148
|
+
dispatch({
|
|
13149
|
+
type: SET_TAX_AMOUNT,
|
|
13150
|
+
payload: null
|
|
13151
|
+
});
|
|
13152
|
+
const {
|
|
13153
|
+
currentPlan
|
|
13154
|
+
} = state;
|
|
13155
|
+
|
|
13156
|
+
if (currentPlan) {
|
|
13157
|
+
var _currentPlan$quantity2;
|
|
13158
|
+
|
|
13159
|
+
const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
|
|
13160
|
+
const price = currentPlan.amount;
|
|
13161
|
+
dispatch({
|
|
13162
|
+
type: SET_UPDATED_PRICE,
|
|
13163
|
+
// set original plan price
|
|
13164
|
+
payload: price * quantity
|
|
13165
|
+
});
|
|
13166
|
+
dispatch({
|
|
13167
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13168
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13169
|
+
|
|
13170
|
+
updateTotalAmountWithTax();
|
|
13171
|
+
}
|
|
13172
|
+
};
|
|
13173
|
+
|
|
13030
13174
|
const subscribe = (stripeSource, state, dispatch) => {
|
|
13031
13175
|
const {
|
|
13032
13176
|
couponCode
|
|
@@ -13644,6 +13788,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13644
13788
|
disableCouponButton: true
|
|
13645
13789
|
}, (state, dispatch) => onApplyCouponCode(state, dispatch));
|
|
13646
13790
|
|
|
13791
|
+
case REMOVE_APPLIED_COUPON:
|
|
13792
|
+
return lib_5(state, () => removeAppliedCoupon(state));
|
|
13793
|
+
|
|
13647
13794
|
case SET_COUPON:
|
|
13648
13795
|
return lib_7({ ...state,
|
|
13649
13796
|
couponObject: action.payload
|
|
@@ -13812,6 +13959,10 @@ const DiscountedPrice = props => {
|
|
|
13812
13959
|
var _order$currency, _order$, _plan$quantity;
|
|
13813
13960
|
|
|
13814
13961
|
const {
|
|
13962
|
+
t
|
|
13963
|
+
} = useTranslation("checkoutForm");
|
|
13964
|
+
const {
|
|
13965
|
+
dispatch,
|
|
13815
13966
|
state: {
|
|
13816
13967
|
updatedPrice,
|
|
13817
13968
|
taxAmount,
|
|
@@ -13827,12 +13978,22 @@ const DiscountedPrice = props => {
|
|
|
13827
13978
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
13828
13979
|
const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
13829
13980
|
|
|
13981
|
+
const onCouponRemove = () => {
|
|
13982
|
+
dispatch({
|
|
13983
|
+
type: REMOVE_APPLIED_COUPON
|
|
13984
|
+
});
|
|
13985
|
+
};
|
|
13986
|
+
|
|
13830
13987
|
if (percentOff) {
|
|
13831
13988
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({
|
|
13832
|
-
className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
|
|
13833
|
-
}, props), "(-", percentOff, ")",
|
|
13834
|
-
className: "plc-font-bold pelcro-discounted-price"
|
|
13835
|
-
}, priceFormatted)
|
|
13989
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
|
|
13990
|
+
}, props), "(-", percentOff, ")", /*#__PURE__*/React__default.createElement("span", {
|
|
13991
|
+
className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
|
|
13992
|
+
}, priceFormatted), /*#__PURE__*/React__default.createElement(Button, {
|
|
13993
|
+
variant: "ghost",
|
|
13994
|
+
className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
13995
|
+
onClick: onCouponRemove
|
|
13996
|
+
}, "\u2715 ", t("labels.removeCoupon")));
|
|
13836
13997
|
}
|
|
13837
13998
|
|
|
13838
13999
|
return "";
|
|
@@ -13878,17 +14039,17 @@ const SubmitPaymentMethod = ({
|
|
|
13878
14039
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
13879
14040
|
};
|
|
13880
14041
|
|
|
13881
|
-
var _path$
|
|
14042
|
+
var _path$k;
|
|
13882
14043
|
|
|
13883
|
-
function _extends$
|
|
14044
|
+
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); }
|
|
13884
14045
|
|
|
13885
14046
|
function SvgArrowLeft(props) {
|
|
13886
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14047
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
13887
14048
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13888
14049
|
fill: "none",
|
|
13889
14050
|
viewBox: "0 0 24 24",
|
|
13890
14051
|
stroke: "currentColor"
|
|
13891
|
-
}, props), _path$
|
|
14052
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
13892
14053
|
strokeLinecap: "round",
|
|
13893
14054
|
strokeLinejoin: "round",
|
|
13894
14055
|
strokeWidth: 2,
|
|
@@ -13970,17 +14131,17 @@ const CouponCodeField = props => {
|
|
|
13970
14131
|
}, props));
|
|
13971
14132
|
};
|
|
13972
14133
|
|
|
13973
|
-
var _path$
|
|
14134
|
+
var _path$j;
|
|
13974
14135
|
|
|
13975
|
-
function _extends$
|
|
14136
|
+
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); }
|
|
13976
14137
|
|
|
13977
14138
|
function SvgTicket(props) {
|
|
13978
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14139
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
13979
14140
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13980
14141
|
fill: "none",
|
|
13981
14142
|
viewBox: "0 0 24 24",
|
|
13982
14143
|
stroke: "currentColor"
|
|
13983
|
-
}, props), _path$
|
|
14144
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
13984
14145
|
strokeLinecap: "round",
|
|
13985
14146
|
strokeLinejoin: "round",
|
|
13986
14147
|
strokeWidth: 2,
|
|
@@ -14339,16 +14500,16 @@ const BankRedirection = () => {
|
|
|
14339
14500
|
}));
|
|
14340
14501
|
};
|
|
14341
14502
|
|
|
14342
|
-
var _path$
|
|
14503
|
+
var _path$i;
|
|
14343
14504
|
|
|
14344
|
-
function _extends$
|
|
14505
|
+
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); }
|
|
14345
14506
|
|
|
14346
14507
|
function SvgLock(props) {
|
|
14347
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14508
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
14348
14509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14349
14510
|
viewBox: "0 0 20 20",
|
|
14350
14511
|
fill: "currentColor"
|
|
14351
|
-
}, props), _path$
|
|
14512
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
14352
14513
|
fillRule: "evenodd",
|
|
14353
14514
|
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",
|
|
14354
14515
|
clipRule: "evenodd"
|
|
@@ -14570,12 +14731,12 @@ function SubscriptionRenewModal({
|
|
|
14570
14731
|
}
|
|
14571
14732
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14572
14733
|
|
|
14573
|
-
var _path$
|
|
14734
|
+
var _path$h;
|
|
14574
14735
|
|
|
14575
|
-
function _extends$
|
|
14736
|
+
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); }
|
|
14576
14737
|
|
|
14577
14738
|
function SvgGift(props) {
|
|
14578
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14739
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
14579
14740
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14580
14741
|
fill: "none",
|
|
14581
14742
|
stroke: "currentColor",
|
|
@@ -14584,7 +14745,7 @@ function SvgGift(props) {
|
|
|
14584
14745
|
strokeWidth: 2,
|
|
14585
14746
|
viewBox: "0 0 24 24",
|
|
14586
14747
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14587
|
-
}, props), _path$
|
|
14748
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
14588
14749
|
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"
|
|
14589
14750
|
})));
|
|
14590
14751
|
}
|
|
@@ -15583,17 +15744,17 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone
|
|
|
15583
15744
|
|
|
15584
15745
|
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";
|
|
15585
15746
|
|
|
15586
|
-
var _path$
|
|
15747
|
+
var _path$g;
|
|
15587
15748
|
|
|
15588
|
-
function _extends$
|
|
15749
|
+
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); }
|
|
15589
15750
|
|
|
15590
15751
|
function SvgEdit(props) {
|
|
15591
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15752
|
+
return /*#__PURE__*/React.createElement("svg", _extends$i({
|
|
15592
15753
|
className: "plc-w-6 plc-h-6",
|
|
15593
15754
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15594
15755
|
viewBox: "0 0 20 20",
|
|
15595
15756
|
fill: "currentColor"
|
|
15596
|
-
}, props), _path$
|
|
15757
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
15597
15758
|
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"
|
|
15598
15759
|
})));
|
|
15599
15760
|
}
|
|
@@ -18703,18 +18864,18 @@ const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(La
|
|
|
18703
18864
|
store: store$4
|
|
18704
18865
|
}, props));
|
|
18705
18866
|
|
|
18706
|
-
var _path$
|
|
18867
|
+
var _path$f;
|
|
18707
18868
|
|
|
18708
|
-
function _extends$
|
|
18869
|
+
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); }
|
|
18709
18870
|
|
|
18710
18871
|
function SvgInfoCircle(props) {
|
|
18711
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
18872
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
18712
18873
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18713
18874
|
className: "plc-w-5 plc-h-5",
|
|
18714
18875
|
fill: "none",
|
|
18715
18876
|
viewBox: "0 0 24 24",
|
|
18716
18877
|
stroke: "currentColor"
|
|
18717
|
-
}, props), _path$
|
|
18878
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
18718
18879
|
strokeLinecap: "round",
|
|
18719
18880
|
strokeLinejoin: "round",
|
|
18720
18881
|
strokeWidth: 2,
|
|
@@ -18872,7 +19033,7 @@ function GiftCreateMessage(props) {
|
|
|
18872
19033
|
return /*#__PURE__*/React__default.createElement(TextArea, Object.assign({
|
|
18873
19034
|
onChange: e => handleInputChange(e.target.value),
|
|
18874
19035
|
value: state.giftMessage,
|
|
18875
|
-
maxLength: "
|
|
19036
|
+
maxLength: "200",
|
|
18876
19037
|
rows: 3,
|
|
18877
19038
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
18878
19039
|
}, props));
|
|
@@ -19701,8 +19862,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19701
19862
|
};
|
|
19702
19863
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19703
19864
|
|
|
19704
|
-
function _extends$
|
|
19705
|
-
_extends$
|
|
19865
|
+
function _extends$g() {
|
|
19866
|
+
_extends$g = Object.assign || function (target) {
|
|
19706
19867
|
for (var i = 1; i < arguments.length; i++) {
|
|
19707
19868
|
var source = arguments[i];
|
|
19708
19869
|
|
|
@@ -19716,7 +19877,7 @@ function _extends$f() {
|
|
|
19716
19877
|
return target;
|
|
19717
19878
|
};
|
|
19718
19879
|
|
|
19719
|
-
return _extends$
|
|
19880
|
+
return _extends$g.apply(this, arguments);
|
|
19720
19881
|
}
|
|
19721
19882
|
|
|
19722
19883
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -19900,7 +20061,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
19900
20061
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
19901
20062
|
return null;
|
|
19902
20063
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
19903
|
-
return _render(_extends$
|
|
20064
|
+
return _render(_extends$g({}, _rest, {
|
|
19904
20065
|
hidden: true,
|
|
19905
20066
|
style: {
|
|
19906
20067
|
display: 'none'
|
|
@@ -20428,7 +20589,7 @@ function TransitionChild(props) {
|
|
|
20428
20589
|
var passthroughProps = rest;
|
|
20429
20590
|
return React__default.createElement(NestingContext.Provider, {
|
|
20430
20591
|
value: nesting
|
|
20431
|
-
}, render(_extends$
|
|
20592
|
+
}, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20432
20593
|
}
|
|
20433
20594
|
|
|
20434
20595
|
function Transition(props) {
|
|
@@ -20472,7 +20633,7 @@ function Transition(props) {
|
|
|
20472
20633
|
value: nestingBag
|
|
20473
20634
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
20474
20635
|
value: transitionBag
|
|
20475
|
-
}, render(_extends$
|
|
20636
|
+
}, render(_extends$g({}, sharedProps, {
|
|
20476
20637
|
as: Fragment,
|
|
20477
20638
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20478
20639
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20599,12 +20760,12 @@ var ActionTypes;
|
|
|
20599
20760
|
})(ActionTypes || (ActionTypes = {}));
|
|
20600
20761
|
|
|
20601
20762
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20602
|
-
return _extends$
|
|
20763
|
+
return _extends$g({}, state, {
|
|
20603
20764
|
activeItemIndex: null,
|
|
20604
20765
|
menuState: MenuStates.Closed
|
|
20605
20766
|
});
|
|
20606
20767
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20607
|
-
return _extends$
|
|
20768
|
+
return _extends$g({}, state, {
|
|
20608
20769
|
menuState: MenuStates.Open
|
|
20609
20770
|
});
|
|
20610
20771
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20623,7 +20784,7 @@ var ActionTypes;
|
|
|
20623
20784
|
}
|
|
20624
20785
|
});
|
|
20625
20786
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20626
|
-
return _extends$
|
|
20787
|
+
return _extends$g({}, state, {
|
|
20627
20788
|
searchQuery: '',
|
|
20628
20789
|
activeItemIndex: activeItemIndex
|
|
20629
20790
|
});
|
|
@@ -20634,19 +20795,19 @@ var ActionTypes;
|
|
|
20634
20795
|
|
|
20635
20796
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20636
20797
|
});
|
|
20637
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
20798
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
|
|
20638
20799
|
searchQuery: searchQuery
|
|
20639
20800
|
});
|
|
20640
|
-
return _extends$
|
|
20801
|
+
return _extends$g({}, state, {
|
|
20641
20802
|
searchQuery: searchQuery,
|
|
20642
20803
|
activeItemIndex: match
|
|
20643
20804
|
});
|
|
20644
20805
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20645
|
-
return _extends$
|
|
20806
|
+
return _extends$g({}, state, {
|
|
20646
20807
|
searchQuery: ''
|
|
20647
20808
|
});
|
|
20648
20809
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20649
|
-
return _extends$
|
|
20810
|
+
return _extends$g({}, state, {
|
|
20650
20811
|
items: [].concat(state.items, [{
|
|
20651
20812
|
id: action.id,
|
|
20652
20813
|
dataRef: action.dataRef
|
|
@@ -20659,7 +20820,7 @@ var ActionTypes;
|
|
|
20659
20820
|
return a.id === action.id;
|
|
20660
20821
|
});
|
|
20661
20822
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20662
|
-
return _extends$
|
|
20823
|
+
return _extends$g({}, state, {
|
|
20663
20824
|
items: nextItems,
|
|
20664
20825
|
activeItemIndex: function () {
|
|
20665
20826
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20698,19 +20859,19 @@ var ActionTypes$1;
|
|
|
20698
20859
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20699
20860
|
if (state.disabled) return state;
|
|
20700
20861
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20701
|
-
return _extends$
|
|
20862
|
+
return _extends$g({}, state, {
|
|
20702
20863
|
activeOptionIndex: null,
|
|
20703
20864
|
listboxState: ListboxStates.Closed
|
|
20704
20865
|
});
|
|
20705
20866
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20706
20867
|
if (state.disabled) return state;
|
|
20707
20868
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20708
|
-
return _extends$
|
|
20869
|
+
return _extends$g({}, state, {
|
|
20709
20870
|
listboxState: ListboxStates.Open
|
|
20710
20871
|
});
|
|
20711
20872
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20712
20873
|
if (state.disabled === action.disabled) return state;
|
|
20713
|
-
return _extends$
|
|
20874
|
+
return _extends$g({}, state, {
|
|
20714
20875
|
disabled: action.disabled
|
|
20715
20876
|
});
|
|
20716
20877
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20731,7 +20892,7 @@ var ActionTypes$1;
|
|
|
20731
20892
|
}
|
|
20732
20893
|
});
|
|
20733
20894
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
20734
|
-
return _extends$
|
|
20895
|
+
return _extends$g({}, state, {
|
|
20735
20896
|
searchQuery: '',
|
|
20736
20897
|
activeOptionIndex: activeOptionIndex
|
|
20737
20898
|
});
|
|
@@ -20744,10 +20905,10 @@ var ActionTypes$1;
|
|
|
20744
20905
|
|
|
20745
20906
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
20746
20907
|
});
|
|
20747
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
20908
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
|
|
20748
20909
|
searchQuery: searchQuery
|
|
20749
20910
|
});
|
|
20750
|
-
return _extends$
|
|
20911
|
+
return _extends$g({}, state, {
|
|
20751
20912
|
searchQuery: searchQuery,
|
|
20752
20913
|
activeOptionIndex: match
|
|
20753
20914
|
});
|
|
@@ -20755,11 +20916,11 @@ var ActionTypes$1;
|
|
|
20755
20916
|
if (state.disabled) return state;
|
|
20756
20917
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20757
20918
|
if (state.searchQuery === '') return state;
|
|
20758
|
-
return _extends$
|
|
20919
|
+
return _extends$g({}, state, {
|
|
20759
20920
|
searchQuery: ''
|
|
20760
20921
|
});
|
|
20761
20922
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
20762
|
-
return _extends$
|
|
20923
|
+
return _extends$g({}, state, {
|
|
20763
20924
|
options: [].concat(state.options, [{
|
|
20764
20925
|
id: action.id,
|
|
20765
20926
|
dataRef: action.dataRef
|
|
@@ -20772,7 +20933,7 @@ var ActionTypes$1;
|
|
|
20772
20933
|
return a.id === action.id;
|
|
20773
20934
|
});
|
|
20774
20935
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
20775
|
-
return _extends$
|
|
20936
|
+
return _extends$g({}, state, {
|
|
20776
20937
|
options: nextOptions,
|
|
20777
20938
|
activeOptionIndex: function () {
|
|
20778
20939
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -20833,18 +20994,18 @@ const getPaymentCardIcon = name => {
|
|
|
20833
20994
|
}));
|
|
20834
20995
|
};
|
|
20835
20996
|
|
|
20836
|
-
var _path$
|
|
20997
|
+
var _path$e;
|
|
20837
20998
|
|
|
20838
|
-
function _extends$
|
|
20999
|
+
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); }
|
|
20839
21000
|
|
|
20840
21001
|
function SvgChevronRight(props) {
|
|
20841
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21002
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
20842
21003
|
className: "plc-w-6 plc-h-6",
|
|
20843
21004
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20844
21005
|
fill: "none",
|
|
20845
21006
|
viewBox: "0 0 24 24",
|
|
20846
21007
|
stroke: "currentColor"
|
|
20847
|
-
}, props), _path$
|
|
21008
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
20848
21009
|
strokeLinecap: "round",
|
|
20849
21010
|
strokeLinejoin: "round",
|
|
20850
21011
|
strokeWidth: 2,
|
|
@@ -21060,18 +21221,18 @@ const SavedItems = ({
|
|
|
21060
21221
|
});
|
|
21061
21222
|
};
|
|
21062
21223
|
|
|
21063
|
-
var _path$
|
|
21224
|
+
var _path$d;
|
|
21064
21225
|
|
|
21065
|
-
function _extends$
|
|
21226
|
+
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); }
|
|
21066
21227
|
|
|
21067
21228
|
function SvgRefresh(props) {
|
|
21068
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21229
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
21069
21230
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21070
21231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21071
21232
|
fill: "none",
|
|
21072
21233
|
viewBox: "0 0 24 24",
|
|
21073
21234
|
stroke: "currentColor"
|
|
21074
|
-
}, props), _path$
|
|
21235
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
21075
21236
|
strokeLinecap: "round",
|
|
21076
21237
|
strokeLinejoin: "round",
|
|
21077
21238
|
strokeWidth: 2,
|
|
@@ -21079,35 +21240,35 @@ function SvgRefresh(props) {
|
|
|
21079
21240
|
})));
|
|
21080
21241
|
}
|
|
21081
21242
|
|
|
21082
|
-
var _path$
|
|
21243
|
+
var _path$c;
|
|
21083
21244
|
|
|
21084
|
-
function _extends$
|
|
21245
|
+
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); }
|
|
21085
21246
|
|
|
21086
21247
|
function SvgCalendar(props) {
|
|
21087
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21248
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
21088
21249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21089
21250
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21090
21251
|
viewBox: "0 0 20 20",
|
|
21091
21252
|
fill: "currentColor"
|
|
21092
|
-
}, props), _path$
|
|
21253
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
21093
21254
|
fillRule: "evenodd",
|
|
21094
21255
|
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",
|
|
21095
21256
|
clipRule: "evenodd"
|
|
21096
21257
|
})));
|
|
21097
21258
|
}
|
|
21098
21259
|
|
|
21099
|
-
var _path$
|
|
21260
|
+
var _path$b;
|
|
21100
21261
|
|
|
21101
|
-
function _extends$
|
|
21262
|
+
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); }
|
|
21102
21263
|
|
|
21103
21264
|
function SvgPlus(props) {
|
|
21104
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21265
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
21105
21266
|
className: "plc-w-5 plc-h-5",
|
|
21106
21267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21107
21268
|
fill: "none",
|
|
21108
21269
|
viewBox: "0 0 24 24",
|
|
21109
21270
|
stroke: "currentColor"
|
|
21110
|
-
}, props), _path$
|
|
21271
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
21111
21272
|
strokeLinecap: "round",
|
|
21112
21273
|
strokeLinejoin: "round",
|
|
21113
21274
|
strokeWidth: 2,
|
|
@@ -21115,17 +21276,17 @@ function SvgPlus(props) {
|
|
|
21115
21276
|
})));
|
|
21116
21277
|
}
|
|
21117
21278
|
|
|
21118
|
-
var _path$
|
|
21279
|
+
var _path$a;
|
|
21119
21280
|
|
|
21120
|
-
function _extends$
|
|
21281
|
+
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); }
|
|
21121
21282
|
|
|
21122
21283
|
function SvgCheckMark(props) {
|
|
21123
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21284
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
21124
21285
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21125
21286
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21126
21287
|
viewBox: "0 0 20 20",
|
|
21127
21288
|
fill: "currentColor"
|
|
21128
|
-
}, props), _path$
|
|
21289
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
21129
21290
|
fillRule: "evenodd",
|
|
21130
21291
|
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",
|
|
21131
21292
|
clipRule: "evenodd"
|
|
@@ -21187,9 +21348,9 @@ const SubscriptionsItems = ({
|
|
|
21187
21348
|
const {
|
|
21188
21349
|
t
|
|
21189
21350
|
} = useTranslation("dashboard");
|
|
21190
|
-
const subs =
|
|
21191
|
-
if (
|
|
21192
|
-
return
|
|
21351
|
+
const subs = getNonDonationSubs();
|
|
21352
|
+
if (subs.length === 0) return null;
|
|
21353
|
+
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21193
21354
|
const isActive = activeMenu === sub.id; // Cancel button click handlers
|
|
21194
21355
|
|
|
21195
21356
|
const onCancelClick = () => {
|
|
@@ -21320,6 +21481,12 @@ const SubscriptionsItems = ({
|
|
|
21320
21481
|
});
|
|
21321
21482
|
};
|
|
21322
21483
|
|
|
21484
|
+
function getNonDonationSubs() {
|
|
21485
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21486
|
+
|
|
21487
|
+
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 : [];
|
|
21488
|
+
}
|
|
21489
|
+
|
|
21323
21490
|
/**
|
|
21324
21491
|
* @typedef {Object} AccordionPropsType
|
|
21325
21492
|
* @property {string} initialActiveMenu the initial active menu
|
|
@@ -21402,18 +21569,18 @@ Accordion.item = function AccordionItem({
|
|
|
21402
21569
|
}, content)) : null;
|
|
21403
21570
|
};
|
|
21404
21571
|
|
|
21405
|
-
var _path$
|
|
21572
|
+
var _path$9;
|
|
21406
21573
|
|
|
21407
|
-
function _extends$
|
|
21574
|
+
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); }
|
|
21408
21575
|
|
|
21409
21576
|
function SvgExit(props) {
|
|
21410
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21577
|
+
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
21411
21578
|
className: "plc-w-6 plc-h-6",
|
|
21412
21579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21413
21580
|
fill: "none",
|
|
21414
21581
|
viewBox: "0 0 24 24",
|
|
21415
21582
|
stroke: "currentColor"
|
|
21416
|
-
}, props), _path$
|
|
21583
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
|
|
21417
21584
|
strokeLinecap: "round",
|
|
21418
21585
|
strokeLinejoin: "round",
|
|
21419
21586
|
strokeWidth: 2,
|
|
@@ -21421,17 +21588,17 @@ function SvgExit(props) {
|
|
|
21421
21588
|
})));
|
|
21422
21589
|
}
|
|
21423
21590
|
|
|
21424
|
-
var _path$
|
|
21591
|
+
var _path$8;
|
|
21425
21592
|
|
|
21426
|
-
function _extends$
|
|
21593
|
+
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); }
|
|
21427
21594
|
|
|
21428
21595
|
function SvgUser(props) {
|
|
21429
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21596
|
+
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
21430
21597
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21431
21598
|
fill: "none",
|
|
21432
21599
|
viewBox: "0 0 24 24",
|
|
21433
21600
|
stroke: "currentColor"
|
|
21434
|
-
}, props), _path$
|
|
21601
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
|
|
21435
21602
|
strokeLinecap: "round",
|
|
21436
21603
|
strokeLinejoin: "round",
|
|
21437
21604
|
strokeWidth: 2,
|
|
@@ -21439,18 +21606,18 @@ function SvgUser(props) {
|
|
|
21439
21606
|
})));
|
|
21440
21607
|
}
|
|
21441
21608
|
|
|
21442
|
-
var _path$
|
|
21609
|
+
var _path$7;
|
|
21443
21610
|
|
|
21444
|
-
function _extends$
|
|
21611
|
+
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); }
|
|
21445
21612
|
|
|
21446
21613
|
function SvgNewsletter(props) {
|
|
21447
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21614
|
+
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
21448
21615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21449
21616
|
className: "plc-h-5 plc-w-5",
|
|
21450
21617
|
fill: "none",
|
|
21451
21618
|
viewBox: "0 0 24 24",
|
|
21452
21619
|
stroke: "currentColor"
|
|
21453
|
-
}, props), _path$
|
|
21620
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
|
|
21454
21621
|
strokeLinecap: "round",
|
|
21455
21622
|
strokeLinejoin: "round",
|
|
21456
21623
|
strokeWidth: 2,
|
|
@@ -21458,18 +21625,18 @@ function SvgNewsletter(props) {
|
|
|
21458
21625
|
})));
|
|
21459
21626
|
}
|
|
21460
21627
|
|
|
21461
|
-
var _path$
|
|
21628
|
+
var _path$6;
|
|
21462
21629
|
|
|
21463
|
-
function _extends$
|
|
21630
|
+
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); }
|
|
21464
21631
|
|
|
21465
21632
|
function SvgPaymentCard(props) {
|
|
21466
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21633
|
+
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
21467
21634
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21468
21635
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21469
21636
|
fill: "none",
|
|
21470
21637
|
viewBox: "0 0 24 24",
|
|
21471
21638
|
stroke: "currentColor"
|
|
21472
|
-
}, props), _path$
|
|
21639
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
|
|
21473
21640
|
strokeLinecap: "round",
|
|
21474
21641
|
strokeLinejoin: "round",
|
|
21475
21642
|
strokeWidth: 2,
|
|
@@ -21477,18 +21644,18 @@ function SvgPaymentCard(props) {
|
|
|
21477
21644
|
})));
|
|
21478
21645
|
}
|
|
21479
21646
|
|
|
21480
|
-
var _path$
|
|
21647
|
+
var _path$5, _path2;
|
|
21481
21648
|
|
|
21482
|
-
function _extends$
|
|
21649
|
+
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); }
|
|
21483
21650
|
|
|
21484
21651
|
function SvgLocationPin(props) {
|
|
21485
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21652
|
+
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
21486
21653
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21487
21654
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21488
21655
|
fill: "none",
|
|
21489
21656
|
viewBox: "0 0 24 24",
|
|
21490
21657
|
stroke: "currentColor"
|
|
21491
|
-
}, props), _path$
|
|
21658
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
|
|
21492
21659
|
strokeLinecap: "round",
|
|
21493
21660
|
strokeLinejoin: "round",
|
|
21494
21661
|
strokeWidth: 2,
|
|
@@ -21503,10 +21670,10 @@ function SvgLocationPin(props) {
|
|
|
21503
21670
|
|
|
21504
21671
|
var _switch;
|
|
21505
21672
|
|
|
21506
|
-
function _extends$
|
|
21673
|
+
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); }
|
|
21507
21674
|
|
|
21508
21675
|
function SvgSubscription(props) {
|
|
21509
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21676
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
21510
21677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21511
21678
|
viewBox: "0 0 100 125",
|
|
21512
21679
|
fill: "currentColor"
|
|
@@ -21521,18 +21688,18 @@ function SvgSubscription(props) {
|
|
|
21521
21688
|
}))))));
|
|
21522
21689
|
}
|
|
21523
21690
|
|
|
21524
|
-
var _path$
|
|
21691
|
+
var _path$4;
|
|
21525
21692
|
|
|
21526
|
-
function _extends$
|
|
21693
|
+
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); }
|
|
21527
21694
|
|
|
21528
21695
|
function SvgShopping(props) {
|
|
21529
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21696
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
21530
21697
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21531
21698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21532
21699
|
fill: "none",
|
|
21533
21700
|
viewBox: "0 0 24 24",
|
|
21534
21701
|
stroke: "currentColor"
|
|
21535
|
-
}, props), _path$
|
|
21702
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
|
|
21536
21703
|
strokeLinecap: "round",
|
|
21537
21704
|
strokeLinejoin: "round",
|
|
21538
21705
|
strokeWidth: 2,
|
|
@@ -21540,18 +21707,18 @@ function SvgShopping(props) {
|
|
|
21540
21707
|
})));
|
|
21541
21708
|
}
|
|
21542
21709
|
|
|
21543
|
-
var _path$
|
|
21710
|
+
var _path$3;
|
|
21544
21711
|
|
|
21545
|
-
function _extends$
|
|
21712
|
+
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); }
|
|
21546
21713
|
|
|
21547
21714
|
function SvgBookmark(props) {
|
|
21548
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21715
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
21549
21716
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21550
21717
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21551
21718
|
fill: "none",
|
|
21552
21719
|
viewBox: "0 0 24 24",
|
|
21553
21720
|
stroke: "currentColor"
|
|
21554
|
-
}, props), _path$
|
|
21721
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
21555
21722
|
strokeLinecap: "round",
|
|
21556
21723
|
strokeLinejoin: "round",
|
|
21557
21724
|
strokeWidth: 2,
|
|
@@ -21559,25 +21726,83 @@ function SvgBookmark(props) {
|
|
|
21559
21726
|
})));
|
|
21560
21727
|
}
|
|
21561
21728
|
|
|
21562
|
-
var _path$
|
|
21729
|
+
var _path$2;
|
|
21563
21730
|
|
|
21564
|
-
function _extends$
|
|
21731
|
+
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); }
|
|
21565
21732
|
|
|
21566
21733
|
function SvgKey(props) {
|
|
21567
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21734
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
21568
21735
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21569
21736
|
viewBox: "0 0 20 20",
|
|
21570
21737
|
fill: "currentColor"
|
|
21571
|
-
}, props), _path$
|
|
21738
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
21572
21739
|
fillRule: "evenodd",
|
|
21573
21740
|
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",
|
|
21574
21741
|
clipRule: "evenodd"
|
|
21575
21742
|
})));
|
|
21576
21743
|
}
|
|
21577
21744
|
|
|
21745
|
+
var _path$1;
|
|
21746
|
+
|
|
21747
|
+
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); }
|
|
21748
|
+
|
|
21749
|
+
function SvgDonate(props) {
|
|
21750
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
21751
|
+
width: 24,
|
|
21752
|
+
height: 24,
|
|
21753
|
+
fill: "currentColor",
|
|
21754
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21755
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
21756
|
+
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"
|
|
21757
|
+
})));
|
|
21758
|
+
}
|
|
21759
|
+
|
|
21760
|
+
const DonationsMenu = () => {
|
|
21761
|
+
const {
|
|
21762
|
+
t
|
|
21763
|
+
} = useTranslation("dashboard");
|
|
21764
|
+
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21765
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
21766
|
+
key: sub.id,
|
|
21767
|
+
className: "plc-w-full plc-align-top pelcro-donation-row"
|
|
21768
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
21769
|
+
className: "plc-truncate"
|
|
21770
|
+
}, sub.plan.nickname && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
21771
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-donation-plan"
|
|
21772
|
+
}, sub.plan.nickname), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
21773
|
+
className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
|
|
21774
|
+
}, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
|
|
21775
|
+
className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
|
|
21776
|
+
}, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
|
|
21777
|
+
});
|
|
21778
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
21779
|
+
className: "plc-w-full plc-table-fixed pelcro-donations-table"
|
|
21780
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
21781
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
21782
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
21783
|
+
className: "plc-w-6/12 "
|
|
21784
|
+
}, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
|
|
21785
|
+
className: "plc-w-6/12 "
|
|
21786
|
+
}, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
21787
|
+
className: "plc-h-4"
|
|
21788
|
+
}), subscriptions));
|
|
21789
|
+
};
|
|
21790
|
+
|
|
21791
|
+
function getDonationSubs() {
|
|
21792
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21793
|
+
|
|
21794
|
+
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 : [];
|
|
21795
|
+
}
|
|
21796
|
+
|
|
21797
|
+
function formatStartDate(date) {
|
|
21798
|
+
const startDate = new Date(date);
|
|
21799
|
+
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21800
|
+
}
|
|
21801
|
+
|
|
21578
21802
|
const SUB_MENUS = {
|
|
21579
21803
|
PROFILE: "profile",
|
|
21580
21804
|
SUBSCRIPTIONS: "subscriptions",
|
|
21805
|
+
DONATIONS: "donations",
|
|
21581
21806
|
PAYMENT_CARDS: "payment-cards",
|
|
21582
21807
|
ADDRESSES: "addresses",
|
|
21583
21808
|
GIFTS: "gifts",
|
|
@@ -22105,6 +22330,14 @@ class Dashboard extends Component {
|
|
|
22105
22330
|
displayProductSelect: this.displayProductSelect,
|
|
22106
22331
|
displayRedeem: this.displayRedeem
|
|
22107
22332
|
})
|
|
22333
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22334
|
+
show: hasDonationSubs(),
|
|
22335
|
+
name: SUB_MENUS.DONATIONS,
|
|
22336
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
|
|
22337
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
22338
|
+
}),
|
|
22339
|
+
title: this.locale("labels.donations"),
|
|
22340
|
+
content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
|
|
22108
22341
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22109
22342
|
name: SUB_MENUS.GIFTS,
|
|
22110
22343
|
icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
|
|
@@ -22131,6 +22364,13 @@ class Dashboard extends Component {
|
|
|
22131
22364
|
|
|
22132
22365
|
}
|
|
22133
22366
|
|
|
22367
|
+
function hasDonationSubs() {
|
|
22368
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22369
|
+
|
|
22370
|
+
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 : [];
|
|
22371
|
+
return donations.length > 0;
|
|
22372
|
+
}
|
|
22373
|
+
|
|
22134
22374
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
22135
22375
|
|
|
22136
22376
|
// The button in the lower right that shows the dashboard.
|