@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.cjs.js
CHANGED
|
@@ -3620,7 +3620,8 @@ var labels$h = {
|
|
|
3620
3620
|
"for": "for",
|
|
3621
3621
|
interval: "{{count}} {{interval}}",
|
|
3622
3622
|
interval_plural: "{{count}} {{interval}}s",
|
|
3623
|
-
tax: "+ Tax"
|
|
3623
|
+
tax: "+ Tax",
|
|
3624
|
+
removeCoupon: "REMOVE"
|
|
3624
3625
|
};
|
|
3625
3626
|
var checkoutForm_en = {
|
|
3626
3627
|
messages: messages$j,
|
|
@@ -3646,7 +3647,8 @@ var labels$g = {
|
|
|
3646
3647
|
"for": "pour",
|
|
3647
3648
|
interval: "{{count}} {{interval}}",
|
|
3648
3649
|
interval_plural: "{{count}} {{interval}}s",
|
|
3649
|
-
tax: "+ Taxe"
|
|
3650
|
+
tax: "+ Taxe",
|
|
3651
|
+
removeCoupon: "RETIRER"
|
|
3650
3652
|
};
|
|
3651
3653
|
var checkoutForm_fr = {
|
|
3652
3654
|
messages: messages$i,
|
|
@@ -3794,7 +3796,7 @@ var gift$1 = {
|
|
|
3794
3796
|
lastName: "Last name",
|
|
3795
3797
|
email: "Email",
|
|
3796
3798
|
startDate: "Gift date",
|
|
3797
|
-
giftMessage: "Gift message (
|
|
3799
|
+
giftMessage: "Gift message (200 characters max)",
|
|
3798
3800
|
required: "required",
|
|
3799
3801
|
firstNamePlaceholder: "First name",
|
|
3800
3802
|
lastNamePlaceholder: "Last name",
|
|
@@ -3890,7 +3892,7 @@ var gift = {
|
|
|
3890
3892
|
lastName: "Nom de famille",
|
|
3891
3893
|
email: "Adresse courriel",
|
|
3892
3894
|
startDate: "Date de début",
|
|
3893
|
-
giftMessage: "Message du cadeau (
|
|
3895
|
+
giftMessage: "Message du cadeau (200 caractères max)",
|
|
3894
3896
|
required: "Champs obligatoires",
|
|
3895
3897
|
firstNamePlaceholder: "Prénom",
|
|
3896
3898
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -4376,6 +4378,7 @@ var labels$3 = {
|
|
|
4376
4378
|
account: "Account",
|
|
4377
4379
|
purchases: "Purchases",
|
|
4378
4380
|
subscriptions: "Subscriptions",
|
|
4381
|
+
donations: "Donations",
|
|
4379
4382
|
updatePaymentSource: "Update",
|
|
4380
4383
|
profile: "Profile",
|
|
4381
4384
|
updateProfile: "Edit profile",
|
|
@@ -4391,6 +4394,7 @@ var labels$3 = {
|
|
|
4391
4394
|
actions: "Actions",
|
|
4392
4395
|
expiresOn: "Ends",
|
|
4393
4396
|
startsOn: "Starts",
|
|
4397
|
+
startDate: "Start date",
|
|
4394
4398
|
renewsOn: "Renews",
|
|
4395
4399
|
canceledOn: "Canceled on",
|
|
4396
4400
|
recipient: "Recipient",
|
|
@@ -4455,6 +4459,7 @@ var labels$2 = {
|
|
|
4455
4459
|
account: "Compte",
|
|
4456
4460
|
purchases: "Achats",
|
|
4457
4461
|
subscriptions: "Abonnements",
|
|
4462
|
+
donations: "Des dons",
|
|
4458
4463
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4459
4464
|
profile: "Profil",
|
|
4460
4465
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4470,6 +4475,7 @@ var labels$2 = {
|
|
|
4470
4475
|
actions: "Actes",
|
|
4471
4476
|
expiresOn: "Expire le",
|
|
4472
4477
|
startsOn: "Débute le",
|
|
4478
|
+
startDate: "Date de début",
|
|
4473
4479
|
renewsOn: "Renouvelle le",
|
|
4474
4480
|
canceledOn: "Annulé le",
|
|
4475
4481
|
recipient: "Destinataire",
|
|
@@ -4526,7 +4532,11 @@ var labels$1 = {
|
|
|
4526
4532
|
},
|
|
4527
4533
|
selectProduct: "Select a product",
|
|
4528
4534
|
selectPlan: "Select a plan",
|
|
4529
|
-
startingAt: "Starting at"
|
|
4535
|
+
startingAt: "Starting at",
|
|
4536
|
+
restrictiveArticles: {
|
|
4537
|
+
subscribeTo: "Subscribe to one of the following options to get access to this page",
|
|
4538
|
+
or: "Or take a look at some of our other options below"
|
|
4539
|
+
}
|
|
4530
4540
|
};
|
|
4531
4541
|
var buttons$1 = {
|
|
4532
4542
|
next: "Next",
|
|
@@ -4555,7 +4565,11 @@ var labels = {
|
|
|
4555
4565
|
},
|
|
4556
4566
|
selectProduct: "Sélectionnez un produit",
|
|
4557
4567
|
selectPlan: "Sélectionnez un plan",
|
|
4558
|
-
starningAt: "À partir de"
|
|
4568
|
+
starningAt: "À partir de",
|
|
4569
|
+
restrictiveArticles: {
|
|
4570
|
+
subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
|
|
4571
|
+
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4572
|
+
}
|
|
4559
4573
|
};
|
|
4560
4574
|
var buttons = {
|
|
4561
4575
|
next: "Prochain",
|
|
@@ -6800,6 +6814,8 @@ class SaveToMetadataButtonClass {
|
|
|
6800
6814
|
_saveToMetadata.set(this, {
|
|
6801
6815
|
writable: true,
|
|
6802
6816
|
value: event => {
|
|
6817
|
+
var _user$metadata;
|
|
6818
|
+
|
|
6803
6819
|
const button = event.currentTarget;
|
|
6804
6820
|
const user = window.Pelcro.user.read();
|
|
6805
6821
|
const {
|
|
@@ -6815,7 +6831,7 @@ class SaveToMetadataButtonClass {
|
|
|
6815
6831
|
|
|
6816
6832
|
let newMetadataValue = [buttonMetadata]; // if this key already exist in user metadata object, append to it.
|
|
6817
6833
|
|
|
6818
|
-
const oldValue = user.metadata[`metadata_saved_${key}`];
|
|
6834
|
+
const oldValue = (_user$metadata = user.metadata) === null || _user$metadata === void 0 ? void 0 : _user$metadata[`metadata_saved_${key}`];
|
|
6819
6835
|
|
|
6820
6836
|
if (oldValue) {
|
|
6821
6837
|
if (Array.isArray(oldValue)) {
|
|
@@ -6929,8 +6945,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6929
6945
|
|
|
6930
6946
|
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}}
|
|
6931
6947
|
|
|
6932
|
-
function _extends$
|
|
6933
|
-
_extends$
|
|
6948
|
+
function _extends$x() {
|
|
6949
|
+
_extends$x = Object.assign || function (target) {
|
|
6934
6950
|
for (var i = 1; i < arguments.length; i++) {
|
|
6935
6951
|
var source = arguments[i];
|
|
6936
6952
|
|
|
@@ -6944,7 +6960,7 @@ function _extends$w() {
|
|
|
6944
6960
|
return target;
|
|
6945
6961
|
};
|
|
6946
6962
|
|
|
6947
|
-
return _extends$
|
|
6963
|
+
return _extends$x.apply(this, arguments);
|
|
6948
6964
|
}
|
|
6949
6965
|
|
|
6950
6966
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7034,7 +7050,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7034
7050
|
var reducer = function reducer(state, action) {
|
|
7035
7051
|
switch (action.type) {
|
|
7036
7052
|
case ActionType.ADD_TOAST:
|
|
7037
|
-
return _extends$
|
|
7053
|
+
return _extends$x({}, state, {
|
|
7038
7054
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7039
7055
|
});
|
|
7040
7056
|
|
|
@@ -7044,9 +7060,9 @@ var reducer = function reducer(state, action) {
|
|
|
7044
7060
|
clearFromRemoveQueue(action.toast.id);
|
|
7045
7061
|
}
|
|
7046
7062
|
|
|
7047
|
-
return _extends$
|
|
7063
|
+
return _extends$x({}, state, {
|
|
7048
7064
|
toasts: state.toasts.map(function (t) {
|
|
7049
|
-
return t.id === action.toast.id ? _extends$
|
|
7065
|
+
return t.id === action.toast.id ? _extends$x({}, t, action.toast) : t;
|
|
7050
7066
|
})
|
|
7051
7067
|
});
|
|
7052
7068
|
|
|
@@ -7073,9 +7089,9 @@ var reducer = function reducer(state, action) {
|
|
|
7073
7089
|
});
|
|
7074
7090
|
}
|
|
7075
7091
|
|
|
7076
|
-
return _extends$
|
|
7092
|
+
return _extends$x({}, state, {
|
|
7077
7093
|
toasts: state.toasts.map(function (t) {
|
|
7078
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7094
|
+
return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
|
|
7079
7095
|
visible: false
|
|
7080
7096
|
}) : t;
|
|
7081
7097
|
})
|
|
@@ -7083,28 +7099,28 @@ var reducer = function reducer(state, action) {
|
|
|
7083
7099
|
|
|
7084
7100
|
case ActionType.REMOVE_TOAST:
|
|
7085
7101
|
if (action.toastId === undefined) {
|
|
7086
|
-
return _extends$
|
|
7102
|
+
return _extends$x({}, state, {
|
|
7087
7103
|
toasts: []
|
|
7088
7104
|
});
|
|
7089
7105
|
}
|
|
7090
7106
|
|
|
7091
|
-
return _extends$
|
|
7107
|
+
return _extends$x({}, state, {
|
|
7092
7108
|
toasts: state.toasts.filter(function (t) {
|
|
7093
7109
|
return t.id !== action.toastId;
|
|
7094
7110
|
})
|
|
7095
7111
|
});
|
|
7096
7112
|
|
|
7097
7113
|
case ActionType.START_PAUSE:
|
|
7098
|
-
return _extends$
|
|
7114
|
+
return _extends$x({}, state, {
|
|
7099
7115
|
pausedAt: action.time
|
|
7100
7116
|
});
|
|
7101
7117
|
|
|
7102
7118
|
case ActionType.END_PAUSE:
|
|
7103
7119
|
var diff = action.time - (state.pausedAt || 0);
|
|
7104
|
-
return _extends$
|
|
7120
|
+
return _extends$x({}, state, {
|
|
7105
7121
|
pausedAt: undefined,
|
|
7106
7122
|
toasts: state.toasts.map(function (t) {
|
|
7107
|
-
return _extends$
|
|
7123
|
+
return _extends$x({}, t, {
|
|
7108
7124
|
pauseDuration: t.pauseDuration + diff
|
|
7109
7125
|
});
|
|
7110
7126
|
})
|
|
@@ -7151,12 +7167,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7151
7167
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7152
7168
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7153
7169
|
|
|
7154
|
-
return _extends$
|
|
7170
|
+
return _extends$x({}, toastOptions, toastOptions[t.type], t, {
|
|
7155
7171
|
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],
|
|
7156
|
-
style: _extends$
|
|
7172
|
+
style: _extends$x({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7157
7173
|
});
|
|
7158
7174
|
});
|
|
7159
|
-
return _extends$
|
|
7175
|
+
return _extends$x({}, state, {
|
|
7160
7176
|
toasts: mergedToasts
|
|
7161
7177
|
});
|
|
7162
7178
|
};
|
|
@@ -7166,7 +7182,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7166
7182
|
type = 'blank';
|
|
7167
7183
|
}
|
|
7168
7184
|
|
|
7169
|
-
return _extends$
|
|
7185
|
+
return _extends$x({
|
|
7170
7186
|
createdAt: Date.now(),
|
|
7171
7187
|
visible: true,
|
|
7172
7188
|
type: type,
|
|
@@ -7216,14 +7232,14 @@ toast.remove = function (toastId) {
|
|
|
7216
7232
|
};
|
|
7217
7233
|
|
|
7218
7234
|
toast.promise = function (promise, msgs, opts) {
|
|
7219
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7235
|
+
var id = toast.loading(msgs.loading, _extends$x({}, opts, opts == null ? void 0 : opts.loading));
|
|
7220
7236
|
promise.then(function (p) {
|
|
7221
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7237
|
+
toast.success(resolveValue(msgs.success, p), _extends$x({
|
|
7222
7238
|
id: id
|
|
7223
7239
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7224
7240
|
return p;
|
|
7225
7241
|
})["catch"](function (e) {
|
|
7226
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7242
|
+
toast.error(resolveValue(msgs.error, e), _extends$x({
|
|
7227
7243
|
id: id
|
|
7228
7244
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7229
7245
|
});
|
|
@@ -7562,7 +7578,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7562
7578
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7563
7579
|
return React.createElement(ToastBarBase, {
|
|
7564
7580
|
className: toast.className,
|
|
7565
|
-
style: _extends$
|
|
7581
|
+
style: _extends$x({}, animationStyle, style, toast.style)
|
|
7566
7582
|
}, typeof children === 'function' ? children({
|
|
7567
7583
|
icon: icon,
|
|
7568
7584
|
message: message
|
|
@@ -7592,7 +7608,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7592
7608
|
} : position.includes('right') ? {
|
|
7593
7609
|
justifyContent: 'flex-end'
|
|
7594
7610
|
} : {};
|
|
7595
|
-
return _extends$
|
|
7611
|
+
return _extends$x({
|
|
7596
7612
|
left: 0,
|
|
7597
7613
|
right: 0,
|
|
7598
7614
|
display: 'flex',
|
|
@@ -7619,7 +7635,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7619
7635
|
handlers = _useToaster.handlers;
|
|
7620
7636
|
|
|
7621
7637
|
return React.createElement("div", {
|
|
7622
|
-
style: _extends$
|
|
7638
|
+
style: _extends$x({
|
|
7623
7639
|
position: 'fixed',
|
|
7624
7640
|
zIndex: 9999,
|
|
7625
7641
|
top: DEFAULT_OFFSET,
|
|
@@ -7654,82 +7670,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7654
7670
|
}));
|
|
7655
7671
|
};
|
|
7656
7672
|
|
|
7657
|
-
var _path$
|
|
7673
|
+
var _path$u;
|
|
7658
7674
|
|
|
7659
|
-
function _extends$
|
|
7675
|
+
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); }
|
|
7660
7676
|
|
|
7661
7677
|
function SvgCheckSolid(props) {
|
|
7662
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7678
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
7663
7679
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7664
7680
|
className: "h-5 w-5",
|
|
7665
7681
|
viewBox: "0 0 20 20",
|
|
7666
7682
|
fill: "currentColor"
|
|
7667
|
-
}, props), _path$
|
|
7683
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7668
7684
|
fillRule: "evenodd",
|
|
7669
7685
|
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",
|
|
7670
7686
|
clipRule: "evenodd"
|
|
7671
7687
|
})));
|
|
7672
7688
|
}
|
|
7673
7689
|
|
|
7674
|
-
var _path$
|
|
7690
|
+
var _path$t;
|
|
7675
7691
|
|
|
7676
|
-
function _extends$
|
|
7692
|
+
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); }
|
|
7677
7693
|
|
|
7678
7694
|
function SvgXIcon(props) {
|
|
7679
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7695
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
7680
7696
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7681
7697
|
viewBox: "0 0 20 20",
|
|
7682
7698
|
fill: "currentColor"
|
|
7683
|
-
}, props), _path$
|
|
7699
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7684
7700
|
fill: "evenodd",
|
|
7685
7701
|
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",
|
|
7686
7702
|
clipRule: "evenodd"
|
|
7687
7703
|
})));
|
|
7688
7704
|
}
|
|
7689
7705
|
|
|
7690
|
-
var _path$
|
|
7706
|
+
var _path$s;
|
|
7691
7707
|
|
|
7692
|
-
function _extends$
|
|
7708
|
+
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); }
|
|
7693
7709
|
|
|
7694
7710
|
function SvgXIconSolid(props) {
|
|
7695
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7711
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
7696
7712
|
className: "plc-w-4 plc-h-4",
|
|
7697
7713
|
fill: "currentColor",
|
|
7698
7714
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7699
7715
|
viewBox: "0 0 100 100"
|
|
7700
|
-
}, props), _path$
|
|
7716
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7701
7717
|
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"
|
|
7702
7718
|
})));
|
|
7703
7719
|
}
|
|
7704
7720
|
|
|
7705
|
-
var _path$
|
|
7721
|
+
var _path$r;
|
|
7706
7722
|
|
|
7707
|
-
function _extends$
|
|
7723
|
+
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); }
|
|
7708
7724
|
|
|
7709
7725
|
function SvgExclamation(props) {
|
|
7710
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7726
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
7711
7727
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7712
7728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7713
7729
|
viewBox: "0 0 20 20",
|
|
7714
7730
|
fill: "currentColor"
|
|
7715
|
-
}, props), _path$
|
|
7731
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7716
7732
|
fillRule: "evenodd",
|
|
7717
7733
|
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",
|
|
7718
7734
|
clipRule: "evenodd"
|
|
7719
7735
|
})));
|
|
7720
7736
|
}
|
|
7721
7737
|
|
|
7722
|
-
var _path$
|
|
7738
|
+
var _path$q, _path2$3;
|
|
7723
7739
|
|
|
7724
|
-
function _extends$
|
|
7740
|
+
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); }
|
|
7725
7741
|
|
|
7726
7742
|
function SvgSpinner(props) {
|
|
7727
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7743
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
7728
7744
|
className: "plc-animate-spin",
|
|
7729
7745
|
viewBox: "0 0 24 24",
|
|
7730
7746
|
fill: "currentColor",
|
|
7731
7747
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7732
|
-
}, props), _path$
|
|
7748
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7733
7749
|
opacity: 0.2,
|
|
7734
7750
|
fill: "evenodd",
|
|
7735
7751
|
clipRule: "evenodd",
|
|
@@ -9130,6 +9146,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
|
9130
9146
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
9131
9147
|
const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
|
|
9132
9148
|
const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
|
|
9149
|
+
const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
|
|
9133
9150
|
const SET_PERCENT_OFF = "SET_PERCENT_OFF";
|
|
9134
9151
|
const SET_COUPON = "SET_COUPON";
|
|
9135
9152
|
const SET_COUPON_ERROR = "SET_COUPON_ERROR";
|
|
@@ -9676,16 +9693,16 @@ const LoginPassword = props => /*#__PURE__*/React__default['default'].createElem
|
|
|
9676
9693
|
store: store$f
|
|
9677
9694
|
}, props));
|
|
9678
9695
|
|
|
9679
|
-
var _path$
|
|
9696
|
+
var _path$p;
|
|
9680
9697
|
|
|
9681
|
-
function _extends$
|
|
9698
|
+
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); }
|
|
9682
9699
|
|
|
9683
9700
|
function SvgCheck(props) {
|
|
9684
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9701
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
9685
9702
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9686
9703
|
fill: "currentColor",
|
|
9687
9704
|
viewBox: "0 0 20 20"
|
|
9688
|
-
}, props), _path$
|
|
9705
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9689
9706
|
fillRule: "evenodd",
|
|
9690
9707
|
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",
|
|
9691
9708
|
clipRule: "evenodd"
|
|
@@ -9998,19 +10015,21 @@ const RegisterContainer = ({
|
|
|
9998
10015
|
*/
|
|
9999
10016
|
|
|
10000
10017
|
function hasSecurityTokenEnabled$1() {
|
|
10001
|
-
|
|
10018
|
+
var _window$Pelcro$site$r2;
|
|
10019
|
+
|
|
10020
|
+
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);
|
|
10002
10021
|
return hasSecuritySdkLoaded;
|
|
10003
10022
|
}
|
|
10004
10023
|
|
|
10005
|
-
var _path$
|
|
10024
|
+
var _path$o;
|
|
10006
10025
|
|
|
10007
|
-
function _extends$
|
|
10026
|
+
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); }
|
|
10008
10027
|
|
|
10009
10028
|
function SvgFacebookLogo(props) {
|
|
10010
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10029
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10011
10030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10012
10031
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10013
|
-
}, props), _path$
|
|
10032
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10014
10033
|
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",
|
|
10015
10034
|
fill: "#3c5a9a"
|
|
10016
10035
|
})));
|
|
@@ -10083,15 +10102,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10083
10102
|
unwrapExports(googleLogin);
|
|
10084
10103
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10085
10104
|
|
|
10086
|
-
var _path$
|
|
10105
|
+
var _path$n, _path2$2, _path3$1, _path4;
|
|
10087
10106
|
|
|
10088
|
-
function _extends$
|
|
10107
|
+
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); }
|
|
10089
10108
|
|
|
10090
10109
|
function SvgGoogleLogo(props) {
|
|
10091
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10110
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10092
10111
|
viewBox: "0 0 24 24",
|
|
10093
10112
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10094
|
-
}, props), _path$
|
|
10113
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10095
10114
|
fill: "#4285F4",
|
|
10096
10115
|
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"
|
|
10097
10116
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10168,15 +10187,15 @@ const GoogleLoginButton = ({
|
|
|
10168
10187
|
}) : null;
|
|
10169
10188
|
};
|
|
10170
10189
|
|
|
10171
|
-
var _path$
|
|
10190
|
+
var _path$m;
|
|
10172
10191
|
|
|
10173
|
-
function _extends$
|
|
10192
|
+
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); }
|
|
10174
10193
|
|
|
10175
10194
|
function SvgAuth0Logo(props) {
|
|
10176
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10195
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
10177
10196
|
viewBox: "0 0 256 285",
|
|
10178
10197
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10179
|
-
}, props), _path$
|
|
10198
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10180
10199
|
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"
|
|
10181
10200
|
})));
|
|
10182
10201
|
}
|
|
@@ -10187,7 +10206,11 @@ const Auth0LoginButton = ({
|
|
|
10187
10206
|
labelClassName = "",
|
|
10188
10207
|
iconClassName = ""
|
|
10189
10208
|
}) => {
|
|
10190
|
-
|
|
10209
|
+
if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
|
|
10210
|
+
console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10211
|
+
}
|
|
10212
|
+
|
|
10213
|
+
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
|
|
10191
10214
|
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
10192
10215
|
React__default['default'].useEffect(() => {
|
|
10193
10216
|
if (auth0Enabled) {
|
|
@@ -10331,15 +10354,15 @@ function LoginView(props) {
|
|
|
10331
10354
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10332
10355
|
}
|
|
10333
10356
|
|
|
10334
|
-
var _path$
|
|
10357
|
+
var _path$l, _path2$1, _path3;
|
|
10335
10358
|
|
|
10336
|
-
function _extends$
|
|
10359
|
+
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); }
|
|
10337
10360
|
|
|
10338
10361
|
function SvgPelcroAuthorship(props) {
|
|
10339
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10362
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
10340
10363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10341
10364
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10342
|
-
}, props), _path$
|
|
10365
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10343
10366
|
fill: "none",
|
|
10344
10367
|
stroke: "#4a4a4a",
|
|
10345
10368
|
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"
|
|
@@ -11055,42 +11078,80 @@ class SelectModal extends React.Component {
|
|
|
11055
11078
|
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
11056
11079
|
});
|
|
11057
11080
|
|
|
11081
|
+
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
11082
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11083
|
+
const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
|
|
11084
|
+
const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
|
|
11085
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11086
|
+
key: product.id,
|
|
11087
|
+
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"}`
|
|
11088
|
+
}, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
11089
|
+
alt: `image of ${product.name}`,
|
|
11090
|
+
src: product.image,
|
|
11091
|
+
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11092
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11093
|
+
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11094
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11095
|
+
className: "plc-w-full pelcro-select-product-header"
|
|
11096
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11097
|
+
className: "plc-font-bold pelcro-select-product-title"
|
|
11098
|
+
}, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11099
|
+
className: "plc-text-xs pelcro-select-product-description"
|
|
11100
|
+
}, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11101
|
+
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11102
|
+
}, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11103
|
+
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11104
|
+
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
11105
|
+
onClick: productButtonCallback,
|
|
11106
|
+
"data-key": product.id,
|
|
11107
|
+
id: "pelcro-select-product-back-button",
|
|
11108
|
+
className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
|
|
11109
|
+
}, index === 0 && {
|
|
11110
|
+
autoFocus: true
|
|
11111
|
+
}), productButtonLabel))));
|
|
11112
|
+
});
|
|
11113
|
+
|
|
11058
11114
|
_defineProperty$3(this, "renderProducts", () => {
|
|
11059
11115
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
11060
11116
|
const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
return productsToShow.map((product, i) => {
|
|
11064
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11065
|
-
key: product.id,
|
|
11066
|
-
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"
|
|
11067
|
-
}, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
11068
|
-
alt: `image of ${product.name}`,
|
|
11069
|
-
src: product.image,
|
|
11070
|
-
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
11071
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11072
|
-
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
11073
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11074
|
-
className: "plc-w-full pelcro-select-product-header"
|
|
11075
|
-
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11076
|
-
className: "plc-font-bold pelcro-select-product-title"
|
|
11077
|
-
}, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11078
|
-
className: "plc-text-xs pelcro-select-product-description"
|
|
11079
|
-
}, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11080
|
-
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
11081
|
-
}, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
|
|
11082
|
-
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
11083
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
11084
|
-
onClick: productButtonCallback,
|
|
11085
|
-
"data-key": product.id,
|
|
11086
|
-
id: "pelcro-select-product-back-button",
|
|
11087
|
-
className: "plc-ml-auto plc-text-xs"
|
|
11088
|
-
}, i === 0 && {
|
|
11089
|
-
autoFocus: true
|
|
11090
|
-
}), productButtonLabel))));
|
|
11117
|
+
return productsToShow.map((product, index) => {
|
|
11118
|
+
return this.renderOneProduct(product, index);
|
|
11091
11119
|
});
|
|
11092
11120
|
});
|
|
11093
11121
|
|
|
11122
|
+
_defineProperty$3(this, "renderMatchingProductsFirst", () => {
|
|
11123
|
+
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
11124
|
+
|
|
11125
|
+
if (isPlanMode) {
|
|
11126
|
+
return this.renderOneProduct(this.state.product);
|
|
11127
|
+
}
|
|
11128
|
+
|
|
11129
|
+
const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
|
|
11130
|
+
|
|
11131
|
+
if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
|
|
11132
|
+
return this.renderProducts();
|
|
11133
|
+
}
|
|
11134
|
+
|
|
11135
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("h3", {
|
|
11136
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11137
|
+
}, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
|
|
11138
|
+
emphasize: true
|
|
11139
|
+
})), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("hr", {
|
|
11140
|
+
className: "plc-my-4"
|
|
11141
|
+
}), /*#__PURE__*/React__default['default'].createElement("h3", {
|
|
11142
|
+
className: "plc-text-sm plc-font-semibold"
|
|
11143
|
+
}, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
|
|
11144
|
+
|
|
11145
|
+
function productsWithMatchedTaggedFirst() {
|
|
11146
|
+
var _window$Pelcro$produc;
|
|
11147
|
+
|
|
11148
|
+
const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
|
|
11149
|
+
const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
|
|
11150
|
+
const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
|
|
11151
|
+
return [productsThatMatchArticleTag, allProductsMinusMatched];
|
|
11152
|
+
}
|
|
11153
|
+
});
|
|
11154
|
+
|
|
11094
11155
|
_defineProperty$3(this, "renderPlans", () => {
|
|
11095
11156
|
return this.state.planList.map(plan => {
|
|
11096
11157
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
@@ -11217,7 +11278,7 @@ class SelectModal extends React.Component {
|
|
|
11217
11278
|
}
|
|
11218
11279
|
|
|
11219
11280
|
render() {
|
|
11220
|
-
var _window$Pelcro$
|
|
11281
|
+
var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
|
|
11221
11282
|
|
|
11222
11283
|
const {
|
|
11223
11284
|
disableGifting
|
|
@@ -11251,9 +11312,9 @@ class SelectModal extends React.Component {
|
|
|
11251
11312
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11252
11313
|
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
11253
11314
|
className: "plc-text-2xl plc-font-semibold"
|
|
11254
|
-
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$
|
|
11315
|
+
}, 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['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['default'].createElement("div", {
|
|
11255
11316
|
className: "pelcro-select-products-wrapper"
|
|
11256
|
-
}, this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11317
|
+
}, (_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['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11257
11318
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
11258
11319
|
}, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11259
11320
|
className: "plc-flex plc-justify-center plc-mt-2"
|
|
@@ -12959,15 +13020,50 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12959
13020
|
});
|
|
12960
13021
|
|
|
12961
13022
|
if (err) {
|
|
13023
|
+
onFailure(err);
|
|
13024
|
+
dispatch({
|
|
13025
|
+
type: SET_COUPON_ERROR,
|
|
13026
|
+
payload: getErrorMessages(err)
|
|
13027
|
+
}); // remove current coupon
|
|
13028
|
+
|
|
13029
|
+
dispatch({
|
|
13030
|
+
type: SET_COUPON,
|
|
13031
|
+
payload: null
|
|
13032
|
+
});
|
|
12962
13033
|
dispatch({
|
|
12963
13034
|
type: SET_PERCENT_OFF,
|
|
12964
13035
|
payload: ""
|
|
12965
13036
|
});
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
payload: getErrorMessages(err)
|
|
13037
|
+
dispatch({
|
|
13038
|
+
type: SET_UPDATED_PRICE,
|
|
13039
|
+
payload: null
|
|
12970
13040
|
});
|
|
13041
|
+
dispatch({
|
|
13042
|
+
type: SET_TAX_AMOUNT,
|
|
13043
|
+
payload: null
|
|
13044
|
+
});
|
|
13045
|
+
const {
|
|
13046
|
+
currentPlan
|
|
13047
|
+
} = state;
|
|
13048
|
+
|
|
13049
|
+
if (currentPlan) {
|
|
13050
|
+
var _currentPlan$quantity;
|
|
13051
|
+
|
|
13052
|
+
const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
|
|
13053
|
+
const price = currentPlan.amount;
|
|
13054
|
+
dispatch({
|
|
13055
|
+
type: SET_UPDATED_PRICE,
|
|
13056
|
+
// set original plan price
|
|
13057
|
+
payload: price * quantity
|
|
13058
|
+
});
|
|
13059
|
+
dispatch({
|
|
13060
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13061
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13062
|
+
|
|
13063
|
+
updateTotalAmountWithTax();
|
|
13064
|
+
}
|
|
13065
|
+
|
|
13066
|
+
return;
|
|
12971
13067
|
}
|
|
12972
13068
|
|
|
12973
13069
|
dispatch({
|
|
@@ -13057,6 +13153,54 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13057
13153
|
|
|
13058
13154
|
const debouncedApplyCouponCode = React.useRef(debounce(onApplyCouponCode, 1000)).current;
|
|
13059
13155
|
|
|
13156
|
+
const removeAppliedCoupon = state => {
|
|
13157
|
+
state.couponCode = "";
|
|
13158
|
+
dispatch({
|
|
13159
|
+
type: SET_COUPON_ERROR,
|
|
13160
|
+
payload: ""
|
|
13161
|
+
});
|
|
13162
|
+
dispatch({
|
|
13163
|
+
type: SHOW_COUPON_FIELD,
|
|
13164
|
+
payload: false
|
|
13165
|
+
});
|
|
13166
|
+
dispatch({
|
|
13167
|
+
type: SET_COUPON,
|
|
13168
|
+
payload: null
|
|
13169
|
+
});
|
|
13170
|
+
dispatch({
|
|
13171
|
+
type: SET_PERCENT_OFF,
|
|
13172
|
+
payload: ""
|
|
13173
|
+
});
|
|
13174
|
+
dispatch({
|
|
13175
|
+
type: SET_UPDATED_PRICE,
|
|
13176
|
+
payload: null
|
|
13177
|
+
});
|
|
13178
|
+
dispatch({
|
|
13179
|
+
type: SET_TAX_AMOUNT,
|
|
13180
|
+
payload: null
|
|
13181
|
+
});
|
|
13182
|
+
const {
|
|
13183
|
+
currentPlan
|
|
13184
|
+
} = state;
|
|
13185
|
+
|
|
13186
|
+
if (currentPlan) {
|
|
13187
|
+
var _currentPlan$quantity2;
|
|
13188
|
+
|
|
13189
|
+
const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
|
|
13190
|
+
const price = currentPlan.amount;
|
|
13191
|
+
dispatch({
|
|
13192
|
+
type: SET_UPDATED_PRICE,
|
|
13193
|
+
// set original plan price
|
|
13194
|
+
payload: price * quantity
|
|
13195
|
+
});
|
|
13196
|
+
dispatch({
|
|
13197
|
+
type: UPDATE_PAYMENT_REQUEST
|
|
13198
|
+
}); // update the new amount with taxes if site has taxes enabled
|
|
13199
|
+
|
|
13200
|
+
updateTotalAmountWithTax();
|
|
13201
|
+
}
|
|
13202
|
+
};
|
|
13203
|
+
|
|
13060
13204
|
const subscribe = (stripeSource, state, dispatch) => {
|
|
13061
13205
|
const {
|
|
13062
13206
|
couponCode
|
|
@@ -13674,6 +13818,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13674
13818
|
disableCouponButton: true
|
|
13675
13819
|
}, (state, dispatch) => onApplyCouponCode(state, dispatch));
|
|
13676
13820
|
|
|
13821
|
+
case REMOVE_APPLIED_COUPON:
|
|
13822
|
+
return lib_5(state, () => removeAppliedCoupon(state));
|
|
13823
|
+
|
|
13677
13824
|
case SET_COUPON:
|
|
13678
13825
|
return lib_7({ ...state,
|
|
13679
13826
|
couponObject: action.payload
|
|
@@ -13842,6 +13989,10 @@ const DiscountedPrice = props => {
|
|
|
13842
13989
|
var _order$currency, _order$, _plan$quantity;
|
|
13843
13990
|
|
|
13844
13991
|
const {
|
|
13992
|
+
t
|
|
13993
|
+
} = useTranslation("checkoutForm");
|
|
13994
|
+
const {
|
|
13995
|
+
dispatch,
|
|
13845
13996
|
state: {
|
|
13846
13997
|
updatedPrice,
|
|
13847
13998
|
taxAmount,
|
|
@@ -13857,12 +14008,22 @@ const DiscountedPrice = props => {
|
|
|
13857
14008
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
13858
14009
|
const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
13859
14010
|
|
|
14011
|
+
const onCouponRemove = () => {
|
|
14012
|
+
dispatch({
|
|
14013
|
+
type: REMOVE_APPLIED_COUPON
|
|
14014
|
+
});
|
|
14015
|
+
};
|
|
14016
|
+
|
|
13860
14017
|
if (percentOff) {
|
|
13861
14018
|
return /*#__PURE__*/React__default['default'].createElement("div", Object.assign({
|
|
13862
|
-
className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
|
|
13863
|
-
}, props), "(-", percentOff, ")",
|
|
13864
|
-
className: "plc-font-bold pelcro-discounted-price"
|
|
13865
|
-
}, priceFormatted)
|
|
14019
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
|
|
14020
|
+
}, props), "(-", percentOff, ")", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
14021
|
+
className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
|
|
14022
|
+
}, priceFormatted), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
14023
|
+
variant: "ghost",
|
|
14024
|
+
className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
|
|
14025
|
+
onClick: onCouponRemove
|
|
14026
|
+
}, "\u2715 ", t("labels.removeCoupon")));
|
|
13866
14027
|
}
|
|
13867
14028
|
|
|
13868
14029
|
return "";
|
|
@@ -13908,17 +14069,17 @@ const SubmitPaymentMethod = ({
|
|
|
13908
14069
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
13909
14070
|
};
|
|
13910
14071
|
|
|
13911
|
-
var _path$
|
|
14072
|
+
var _path$k;
|
|
13912
14073
|
|
|
13913
|
-
function _extends$
|
|
14074
|
+
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); }
|
|
13914
14075
|
|
|
13915
14076
|
function SvgArrowLeft(props) {
|
|
13916
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14077
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
13917
14078
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13918
14079
|
fill: "none",
|
|
13919
14080
|
viewBox: "0 0 24 24",
|
|
13920
14081
|
stroke: "currentColor"
|
|
13921
|
-
}, props), _path$
|
|
14082
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13922
14083
|
strokeLinecap: "round",
|
|
13923
14084
|
strokeLinejoin: "round",
|
|
13924
14085
|
strokeWidth: 2,
|
|
@@ -14000,17 +14161,17 @@ const CouponCodeField = props => {
|
|
|
14000
14161
|
}, props));
|
|
14001
14162
|
};
|
|
14002
14163
|
|
|
14003
|
-
var _path$
|
|
14164
|
+
var _path$j;
|
|
14004
14165
|
|
|
14005
|
-
function _extends$
|
|
14166
|
+
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); }
|
|
14006
14167
|
|
|
14007
14168
|
function SvgTicket(props) {
|
|
14008
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14169
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14009
14170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14010
14171
|
fill: "none",
|
|
14011
14172
|
viewBox: "0 0 24 24",
|
|
14012
14173
|
stroke: "currentColor"
|
|
14013
|
-
}, props), _path$
|
|
14174
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14014
14175
|
strokeLinecap: "round",
|
|
14015
14176
|
strokeLinejoin: "round",
|
|
14016
14177
|
strokeWidth: 2,
|
|
@@ -14369,16 +14530,16 @@ const BankRedirection = () => {
|
|
|
14369
14530
|
}));
|
|
14370
14531
|
};
|
|
14371
14532
|
|
|
14372
|
-
var _path$
|
|
14533
|
+
var _path$i;
|
|
14373
14534
|
|
|
14374
|
-
function _extends$
|
|
14535
|
+
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); }
|
|
14375
14536
|
|
|
14376
14537
|
function SvgLock(props) {
|
|
14377
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14538
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
14378
14539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14379
14540
|
viewBox: "0 0 20 20",
|
|
14380
14541
|
fill: "currentColor"
|
|
14381
|
-
}, props), _path$
|
|
14542
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14382
14543
|
fillRule: "evenodd",
|
|
14383
14544
|
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",
|
|
14384
14545
|
clipRule: "evenodd"
|
|
@@ -14600,12 +14761,12 @@ function SubscriptionRenewModal({
|
|
|
14600
14761
|
}
|
|
14601
14762
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14602
14763
|
|
|
14603
|
-
var _path$
|
|
14764
|
+
var _path$h;
|
|
14604
14765
|
|
|
14605
|
-
function _extends$
|
|
14766
|
+
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); }
|
|
14606
14767
|
|
|
14607
14768
|
function SvgGift(props) {
|
|
14608
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14769
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
14609
14770
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14610
14771
|
fill: "none",
|
|
14611
14772
|
stroke: "currentColor",
|
|
@@ -14614,7 +14775,7 @@ function SvgGift(props) {
|
|
|
14614
14775
|
strokeWidth: 2,
|
|
14615
14776
|
viewBox: "0 0 24 24",
|
|
14616
14777
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14617
|
-
}, props), _path$
|
|
14778
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14618
14779
|
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"
|
|
14619
14780
|
})));
|
|
14620
14781
|
}
|
|
@@ -15613,17 +15774,17 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createEl
|
|
|
15613
15774
|
|
|
15614
15775
|
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";
|
|
15615
15776
|
|
|
15616
|
-
var _path$
|
|
15777
|
+
var _path$g;
|
|
15617
15778
|
|
|
15618
|
-
function _extends$
|
|
15779
|
+
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); }
|
|
15619
15780
|
|
|
15620
15781
|
function SvgEdit(props) {
|
|
15621
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15782
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
15622
15783
|
className: "plc-w-6 plc-h-6",
|
|
15623
15784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15624
15785
|
viewBox: "0 0 20 20",
|
|
15625
15786
|
fill: "currentColor"
|
|
15626
|
-
}, props), _path$
|
|
15787
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15627
15788
|
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"
|
|
15628
15789
|
})));
|
|
15629
15790
|
}
|
|
@@ -18733,18 +18894,18 @@ const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].creat
|
|
|
18733
18894
|
store: store$4
|
|
18734
18895
|
}, props));
|
|
18735
18896
|
|
|
18736
|
-
var _path$
|
|
18897
|
+
var _path$f;
|
|
18737
18898
|
|
|
18738
|
-
function _extends$
|
|
18899
|
+
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); }
|
|
18739
18900
|
|
|
18740
18901
|
function SvgInfoCircle(props) {
|
|
18741
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
18902
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
18742
18903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18743
18904
|
className: "plc-w-5 plc-h-5",
|
|
18744
18905
|
fill: "none",
|
|
18745
18906
|
viewBox: "0 0 24 24",
|
|
18746
18907
|
stroke: "currentColor"
|
|
18747
|
-
}, props), _path$
|
|
18908
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18748
18909
|
strokeLinecap: "round",
|
|
18749
18910
|
strokeLinejoin: "round",
|
|
18750
18911
|
strokeWidth: 2,
|
|
@@ -18902,7 +19063,7 @@ function GiftCreateMessage(props) {
|
|
|
18902
19063
|
return /*#__PURE__*/React__default['default'].createElement(TextArea, Object.assign({
|
|
18903
19064
|
onChange: e => handleInputChange(e.target.value),
|
|
18904
19065
|
value: state.giftMessage,
|
|
18905
|
-
maxLength: "
|
|
19066
|
+
maxLength: "200",
|
|
18906
19067
|
rows: 3,
|
|
18907
19068
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
18908
19069
|
}, props));
|
|
@@ -19731,8 +19892,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19731
19892
|
};
|
|
19732
19893
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19733
19894
|
|
|
19734
|
-
function _extends$
|
|
19735
|
-
_extends$
|
|
19895
|
+
function _extends$g() {
|
|
19896
|
+
_extends$g = Object.assign || function (target) {
|
|
19736
19897
|
for (var i = 1; i < arguments.length; i++) {
|
|
19737
19898
|
var source = arguments[i];
|
|
19738
19899
|
|
|
@@ -19746,7 +19907,7 @@ function _extends$f() {
|
|
|
19746
19907
|
return target;
|
|
19747
19908
|
};
|
|
19748
19909
|
|
|
19749
|
-
return _extends$
|
|
19910
|
+
return _extends$g.apply(this, arguments);
|
|
19750
19911
|
}
|
|
19751
19912
|
|
|
19752
19913
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -19930,7 +20091,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
19930
20091
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
19931
20092
|
return null;
|
|
19932
20093
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
19933
|
-
return _render(_extends$
|
|
20094
|
+
return _render(_extends$g({}, _rest, {
|
|
19934
20095
|
hidden: true,
|
|
19935
20096
|
style: {
|
|
19936
20097
|
display: 'none'
|
|
@@ -20458,7 +20619,7 @@ function TransitionChild(props) {
|
|
|
20458
20619
|
var passthroughProps = rest;
|
|
20459
20620
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20460
20621
|
value: nesting
|
|
20461
|
-
}, render(_extends$
|
|
20622
|
+
}, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20462
20623
|
}
|
|
20463
20624
|
|
|
20464
20625
|
function Transition(props) {
|
|
@@ -20502,7 +20663,7 @@ function Transition(props) {
|
|
|
20502
20663
|
value: nestingBag
|
|
20503
20664
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20504
20665
|
value: transitionBag
|
|
20505
|
-
}, render(_extends$
|
|
20666
|
+
}, render(_extends$g({}, sharedProps, {
|
|
20506
20667
|
as: React.Fragment,
|
|
20507
20668
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20508
20669
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20629,12 +20790,12 @@ var ActionTypes;
|
|
|
20629
20790
|
})(ActionTypes || (ActionTypes = {}));
|
|
20630
20791
|
|
|
20631
20792
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20632
|
-
return _extends$
|
|
20793
|
+
return _extends$g({}, state, {
|
|
20633
20794
|
activeItemIndex: null,
|
|
20634
20795
|
menuState: MenuStates.Closed
|
|
20635
20796
|
});
|
|
20636
20797
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20637
|
-
return _extends$
|
|
20798
|
+
return _extends$g({}, state, {
|
|
20638
20799
|
menuState: MenuStates.Open
|
|
20639
20800
|
});
|
|
20640
20801
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20653,7 +20814,7 @@ var ActionTypes;
|
|
|
20653
20814
|
}
|
|
20654
20815
|
});
|
|
20655
20816
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20656
|
-
return _extends$
|
|
20817
|
+
return _extends$g({}, state, {
|
|
20657
20818
|
searchQuery: '',
|
|
20658
20819
|
activeItemIndex: activeItemIndex
|
|
20659
20820
|
});
|
|
@@ -20664,19 +20825,19 @@ var ActionTypes;
|
|
|
20664
20825
|
|
|
20665
20826
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20666
20827
|
});
|
|
20667
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
20828
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
|
|
20668
20829
|
searchQuery: searchQuery
|
|
20669
20830
|
});
|
|
20670
|
-
return _extends$
|
|
20831
|
+
return _extends$g({}, state, {
|
|
20671
20832
|
searchQuery: searchQuery,
|
|
20672
20833
|
activeItemIndex: match
|
|
20673
20834
|
});
|
|
20674
20835
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20675
|
-
return _extends$
|
|
20836
|
+
return _extends$g({}, state, {
|
|
20676
20837
|
searchQuery: ''
|
|
20677
20838
|
});
|
|
20678
20839
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20679
|
-
return _extends$
|
|
20840
|
+
return _extends$g({}, state, {
|
|
20680
20841
|
items: [].concat(state.items, [{
|
|
20681
20842
|
id: action.id,
|
|
20682
20843
|
dataRef: action.dataRef
|
|
@@ -20689,7 +20850,7 @@ var ActionTypes;
|
|
|
20689
20850
|
return a.id === action.id;
|
|
20690
20851
|
});
|
|
20691
20852
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20692
|
-
return _extends$
|
|
20853
|
+
return _extends$g({}, state, {
|
|
20693
20854
|
items: nextItems,
|
|
20694
20855
|
activeItemIndex: function () {
|
|
20695
20856
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20728,19 +20889,19 @@ var ActionTypes$1;
|
|
|
20728
20889
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20729
20890
|
if (state.disabled) return state;
|
|
20730
20891
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20731
|
-
return _extends$
|
|
20892
|
+
return _extends$g({}, state, {
|
|
20732
20893
|
activeOptionIndex: null,
|
|
20733
20894
|
listboxState: ListboxStates.Closed
|
|
20734
20895
|
});
|
|
20735
20896
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20736
20897
|
if (state.disabled) return state;
|
|
20737
20898
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20738
|
-
return _extends$
|
|
20899
|
+
return _extends$g({}, state, {
|
|
20739
20900
|
listboxState: ListboxStates.Open
|
|
20740
20901
|
});
|
|
20741
20902
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20742
20903
|
if (state.disabled === action.disabled) return state;
|
|
20743
|
-
return _extends$
|
|
20904
|
+
return _extends$g({}, state, {
|
|
20744
20905
|
disabled: action.disabled
|
|
20745
20906
|
});
|
|
20746
20907
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20761,7 +20922,7 @@ var ActionTypes$1;
|
|
|
20761
20922
|
}
|
|
20762
20923
|
});
|
|
20763
20924
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
20764
|
-
return _extends$
|
|
20925
|
+
return _extends$g({}, state, {
|
|
20765
20926
|
searchQuery: '',
|
|
20766
20927
|
activeOptionIndex: activeOptionIndex
|
|
20767
20928
|
});
|
|
@@ -20774,10 +20935,10 @@ var ActionTypes$1;
|
|
|
20774
20935
|
|
|
20775
20936
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
20776
20937
|
});
|
|
20777
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
20938
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
|
|
20778
20939
|
searchQuery: searchQuery
|
|
20779
20940
|
});
|
|
20780
|
-
return _extends$
|
|
20941
|
+
return _extends$g({}, state, {
|
|
20781
20942
|
searchQuery: searchQuery,
|
|
20782
20943
|
activeOptionIndex: match
|
|
20783
20944
|
});
|
|
@@ -20785,11 +20946,11 @@ var ActionTypes$1;
|
|
|
20785
20946
|
if (state.disabled) return state;
|
|
20786
20947
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20787
20948
|
if (state.searchQuery === '') return state;
|
|
20788
|
-
return _extends$
|
|
20949
|
+
return _extends$g({}, state, {
|
|
20789
20950
|
searchQuery: ''
|
|
20790
20951
|
});
|
|
20791
20952
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
20792
|
-
return _extends$
|
|
20953
|
+
return _extends$g({}, state, {
|
|
20793
20954
|
options: [].concat(state.options, [{
|
|
20794
20955
|
id: action.id,
|
|
20795
20956
|
dataRef: action.dataRef
|
|
@@ -20802,7 +20963,7 @@ var ActionTypes$1;
|
|
|
20802
20963
|
return a.id === action.id;
|
|
20803
20964
|
});
|
|
20804
20965
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
20805
|
-
return _extends$
|
|
20966
|
+
return _extends$g({}, state, {
|
|
20806
20967
|
options: nextOptions,
|
|
20807
20968
|
activeOptionIndex: function () {
|
|
20808
20969
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -20863,18 +21024,18 @@ const getPaymentCardIcon = name => {
|
|
|
20863
21024
|
}));
|
|
20864
21025
|
};
|
|
20865
21026
|
|
|
20866
|
-
var _path$
|
|
21027
|
+
var _path$e;
|
|
20867
21028
|
|
|
20868
|
-
function _extends$
|
|
21029
|
+
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); }
|
|
20869
21030
|
|
|
20870
21031
|
function SvgChevronRight(props) {
|
|
20871
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21032
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
20872
21033
|
className: "plc-w-6 plc-h-6",
|
|
20873
21034
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20874
21035
|
fill: "none",
|
|
20875
21036
|
viewBox: "0 0 24 24",
|
|
20876
21037
|
stroke: "currentColor"
|
|
20877
|
-
}, props), _path$
|
|
21038
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20878
21039
|
strokeLinecap: "round",
|
|
20879
21040
|
strokeLinejoin: "round",
|
|
20880
21041
|
strokeWidth: 2,
|
|
@@ -21090,18 +21251,18 @@ const SavedItems = ({
|
|
|
21090
21251
|
});
|
|
21091
21252
|
};
|
|
21092
21253
|
|
|
21093
|
-
var _path$
|
|
21254
|
+
var _path$d;
|
|
21094
21255
|
|
|
21095
|
-
function _extends$
|
|
21256
|
+
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); }
|
|
21096
21257
|
|
|
21097
21258
|
function SvgRefresh(props) {
|
|
21098
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21259
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21099
21260
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21100
21261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21101
21262
|
fill: "none",
|
|
21102
21263
|
viewBox: "0 0 24 24",
|
|
21103
21264
|
stroke: "currentColor"
|
|
21104
|
-
}, props), _path$
|
|
21265
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21105
21266
|
strokeLinecap: "round",
|
|
21106
21267
|
strokeLinejoin: "round",
|
|
21107
21268
|
strokeWidth: 2,
|
|
@@ -21109,35 +21270,35 @@ function SvgRefresh(props) {
|
|
|
21109
21270
|
})));
|
|
21110
21271
|
}
|
|
21111
21272
|
|
|
21112
|
-
var _path$
|
|
21273
|
+
var _path$c;
|
|
21113
21274
|
|
|
21114
|
-
function _extends$
|
|
21275
|
+
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); }
|
|
21115
21276
|
|
|
21116
21277
|
function SvgCalendar(props) {
|
|
21117
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21278
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21118
21279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21119
21280
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21120
21281
|
viewBox: "0 0 20 20",
|
|
21121
21282
|
fill: "currentColor"
|
|
21122
|
-
}, props), _path$
|
|
21283
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21123
21284
|
fillRule: "evenodd",
|
|
21124
21285
|
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",
|
|
21125
21286
|
clipRule: "evenodd"
|
|
21126
21287
|
})));
|
|
21127
21288
|
}
|
|
21128
21289
|
|
|
21129
|
-
var _path$
|
|
21290
|
+
var _path$b;
|
|
21130
21291
|
|
|
21131
|
-
function _extends$
|
|
21292
|
+
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); }
|
|
21132
21293
|
|
|
21133
21294
|
function SvgPlus(props) {
|
|
21134
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21295
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
21135
21296
|
className: "plc-w-5 plc-h-5",
|
|
21136
21297
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21137
21298
|
fill: "none",
|
|
21138
21299
|
viewBox: "0 0 24 24",
|
|
21139
21300
|
stroke: "currentColor"
|
|
21140
|
-
}, props), _path$
|
|
21301
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21141
21302
|
strokeLinecap: "round",
|
|
21142
21303
|
strokeLinejoin: "round",
|
|
21143
21304
|
strokeWidth: 2,
|
|
@@ -21145,17 +21306,17 @@ function SvgPlus(props) {
|
|
|
21145
21306
|
})));
|
|
21146
21307
|
}
|
|
21147
21308
|
|
|
21148
|
-
var _path$
|
|
21309
|
+
var _path$a;
|
|
21149
21310
|
|
|
21150
|
-
function _extends$
|
|
21311
|
+
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); }
|
|
21151
21312
|
|
|
21152
21313
|
function SvgCheckMark(props) {
|
|
21153
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21314
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21154
21315
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21155
21316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21156
21317
|
viewBox: "0 0 20 20",
|
|
21157
21318
|
fill: "currentColor"
|
|
21158
|
-
}, props), _path$
|
|
21319
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21159
21320
|
fillRule: "evenodd",
|
|
21160
21321
|
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",
|
|
21161
21322
|
clipRule: "evenodd"
|
|
@@ -21217,9 +21378,9 @@ const SubscriptionsItems = ({
|
|
|
21217
21378
|
const {
|
|
21218
21379
|
t
|
|
21219
21380
|
} = useTranslation("dashboard");
|
|
21220
|
-
const subs =
|
|
21221
|
-
if (
|
|
21222
|
-
return
|
|
21381
|
+
const subs = getNonDonationSubs();
|
|
21382
|
+
if (subs.length === 0) return null;
|
|
21383
|
+
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21223
21384
|
const isActive = activeMenu === sub.id; // Cancel button click handlers
|
|
21224
21385
|
|
|
21225
21386
|
const onCancelClick = () => {
|
|
@@ -21350,6 +21511,12 @@ const SubscriptionsItems = ({
|
|
|
21350
21511
|
});
|
|
21351
21512
|
};
|
|
21352
21513
|
|
|
21514
|
+
function getNonDonationSubs() {
|
|
21515
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21516
|
+
|
|
21517
|
+
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 : [];
|
|
21518
|
+
}
|
|
21519
|
+
|
|
21353
21520
|
/**
|
|
21354
21521
|
* @typedef {Object} AccordionPropsType
|
|
21355
21522
|
* @property {string} initialActiveMenu the initial active menu
|
|
@@ -21432,18 +21599,18 @@ Accordion.item = function AccordionItem({
|
|
|
21432
21599
|
}, content)) : null;
|
|
21433
21600
|
};
|
|
21434
21601
|
|
|
21435
|
-
var _path$
|
|
21602
|
+
var _path$9;
|
|
21436
21603
|
|
|
21437
|
-
function _extends$
|
|
21604
|
+
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); }
|
|
21438
21605
|
|
|
21439
21606
|
function SvgExit(props) {
|
|
21440
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21607
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21441
21608
|
className: "plc-w-6 plc-h-6",
|
|
21442
21609
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21443
21610
|
fill: "none",
|
|
21444
21611
|
viewBox: "0 0 24 24",
|
|
21445
21612
|
stroke: "currentColor"
|
|
21446
|
-
}, props), _path$
|
|
21613
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21447
21614
|
strokeLinecap: "round",
|
|
21448
21615
|
strokeLinejoin: "round",
|
|
21449
21616
|
strokeWidth: 2,
|
|
@@ -21451,17 +21618,17 @@ function SvgExit(props) {
|
|
|
21451
21618
|
})));
|
|
21452
21619
|
}
|
|
21453
21620
|
|
|
21454
|
-
var _path$
|
|
21621
|
+
var _path$8;
|
|
21455
21622
|
|
|
21456
|
-
function _extends$
|
|
21623
|
+
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); }
|
|
21457
21624
|
|
|
21458
21625
|
function SvgUser(props) {
|
|
21459
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21626
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21460
21627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21461
21628
|
fill: "none",
|
|
21462
21629
|
viewBox: "0 0 24 24",
|
|
21463
21630
|
stroke: "currentColor"
|
|
21464
|
-
}, props), _path$
|
|
21631
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21465
21632
|
strokeLinecap: "round",
|
|
21466
21633
|
strokeLinejoin: "round",
|
|
21467
21634
|
strokeWidth: 2,
|
|
@@ -21469,18 +21636,18 @@ function SvgUser(props) {
|
|
|
21469
21636
|
})));
|
|
21470
21637
|
}
|
|
21471
21638
|
|
|
21472
|
-
var _path$
|
|
21639
|
+
var _path$7;
|
|
21473
21640
|
|
|
21474
|
-
function _extends$
|
|
21641
|
+
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); }
|
|
21475
21642
|
|
|
21476
21643
|
function SvgNewsletter(props) {
|
|
21477
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21644
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
21478
21645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21479
21646
|
className: "plc-h-5 plc-w-5",
|
|
21480
21647
|
fill: "none",
|
|
21481
21648
|
viewBox: "0 0 24 24",
|
|
21482
21649
|
stroke: "currentColor"
|
|
21483
|
-
}, props), _path$
|
|
21650
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21484
21651
|
strokeLinecap: "round",
|
|
21485
21652
|
strokeLinejoin: "round",
|
|
21486
21653
|
strokeWidth: 2,
|
|
@@ -21488,18 +21655,18 @@ function SvgNewsletter(props) {
|
|
|
21488
21655
|
})));
|
|
21489
21656
|
}
|
|
21490
21657
|
|
|
21491
|
-
var _path$
|
|
21658
|
+
var _path$6;
|
|
21492
21659
|
|
|
21493
|
-
function _extends$
|
|
21660
|
+
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); }
|
|
21494
21661
|
|
|
21495
21662
|
function SvgPaymentCard(props) {
|
|
21496
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21663
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
21497
21664
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21498
21665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21499
21666
|
fill: "none",
|
|
21500
21667
|
viewBox: "0 0 24 24",
|
|
21501
21668
|
stroke: "currentColor"
|
|
21502
|
-
}, props), _path$
|
|
21669
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21503
21670
|
strokeLinecap: "round",
|
|
21504
21671
|
strokeLinejoin: "round",
|
|
21505
21672
|
strokeWidth: 2,
|
|
@@ -21507,18 +21674,18 @@ function SvgPaymentCard(props) {
|
|
|
21507
21674
|
})));
|
|
21508
21675
|
}
|
|
21509
21676
|
|
|
21510
|
-
var _path$
|
|
21677
|
+
var _path$5, _path2;
|
|
21511
21678
|
|
|
21512
|
-
function _extends$
|
|
21679
|
+
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); }
|
|
21513
21680
|
|
|
21514
21681
|
function SvgLocationPin(props) {
|
|
21515
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21682
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
21516
21683
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21517
21684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21518
21685
|
fill: "none",
|
|
21519
21686
|
viewBox: "0 0 24 24",
|
|
21520
21687
|
stroke: "currentColor"
|
|
21521
|
-
}, props), _path$
|
|
21688
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21522
21689
|
strokeLinecap: "round",
|
|
21523
21690
|
strokeLinejoin: "round",
|
|
21524
21691
|
strokeWidth: 2,
|
|
@@ -21533,10 +21700,10 @@ function SvgLocationPin(props) {
|
|
|
21533
21700
|
|
|
21534
21701
|
var _switch;
|
|
21535
21702
|
|
|
21536
|
-
function _extends$
|
|
21703
|
+
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); }
|
|
21537
21704
|
|
|
21538
21705
|
function SvgSubscription(props) {
|
|
21539
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21706
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
21540
21707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21541
21708
|
viewBox: "0 0 100 125",
|
|
21542
21709
|
fill: "currentColor"
|
|
@@ -21551,18 +21718,18 @@ function SvgSubscription(props) {
|
|
|
21551
21718
|
}))))));
|
|
21552
21719
|
}
|
|
21553
21720
|
|
|
21554
|
-
var _path$
|
|
21721
|
+
var _path$4;
|
|
21555
21722
|
|
|
21556
|
-
function _extends$
|
|
21723
|
+
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); }
|
|
21557
21724
|
|
|
21558
21725
|
function SvgShopping(props) {
|
|
21559
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21726
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
21560
21727
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21561
21728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21562
21729
|
fill: "none",
|
|
21563
21730
|
viewBox: "0 0 24 24",
|
|
21564
21731
|
stroke: "currentColor"
|
|
21565
|
-
}, props), _path$
|
|
21732
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21566
21733
|
strokeLinecap: "round",
|
|
21567
21734
|
strokeLinejoin: "round",
|
|
21568
21735
|
strokeWidth: 2,
|
|
@@ -21570,18 +21737,18 @@ function SvgShopping(props) {
|
|
|
21570
21737
|
})));
|
|
21571
21738
|
}
|
|
21572
21739
|
|
|
21573
|
-
var _path$
|
|
21740
|
+
var _path$3;
|
|
21574
21741
|
|
|
21575
|
-
function _extends$
|
|
21742
|
+
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); }
|
|
21576
21743
|
|
|
21577
21744
|
function SvgBookmark(props) {
|
|
21578
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21745
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
21579
21746
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21580
21747
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21581
21748
|
fill: "none",
|
|
21582
21749
|
viewBox: "0 0 24 24",
|
|
21583
21750
|
stroke: "currentColor"
|
|
21584
|
-
}, props), _path$
|
|
21751
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21585
21752
|
strokeLinecap: "round",
|
|
21586
21753
|
strokeLinejoin: "round",
|
|
21587
21754
|
strokeWidth: 2,
|
|
@@ -21589,25 +21756,83 @@ function SvgBookmark(props) {
|
|
|
21589
21756
|
})));
|
|
21590
21757
|
}
|
|
21591
21758
|
|
|
21592
|
-
var _path$
|
|
21759
|
+
var _path$2;
|
|
21593
21760
|
|
|
21594
|
-
function _extends$
|
|
21761
|
+
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); }
|
|
21595
21762
|
|
|
21596
21763
|
function SvgKey(props) {
|
|
21597
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21764
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
21598
21765
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21599
21766
|
viewBox: "0 0 20 20",
|
|
21600
21767
|
fill: "currentColor"
|
|
21601
|
-
}, props), _path$
|
|
21768
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21602
21769
|
fillRule: "evenodd",
|
|
21603
21770
|
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",
|
|
21604
21771
|
clipRule: "evenodd"
|
|
21605
21772
|
})));
|
|
21606
21773
|
}
|
|
21607
21774
|
|
|
21775
|
+
var _path$1;
|
|
21776
|
+
|
|
21777
|
+
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); }
|
|
21778
|
+
|
|
21779
|
+
function SvgDonate(props) {
|
|
21780
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
21781
|
+
width: 24,
|
|
21782
|
+
height: 24,
|
|
21783
|
+
fill: "currentColor",
|
|
21784
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21785
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21786
|
+
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"
|
|
21787
|
+
})));
|
|
21788
|
+
}
|
|
21789
|
+
|
|
21790
|
+
const DonationsMenu = () => {
|
|
21791
|
+
const {
|
|
21792
|
+
t
|
|
21793
|
+
} = useTranslation("dashboard");
|
|
21794
|
+
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
21795
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
21796
|
+
key: sub.id,
|
|
21797
|
+
className: "plc-w-full plc-align-top pelcro-donation-row"
|
|
21798
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
21799
|
+
className: "plc-truncate"
|
|
21800
|
+
}, sub.plan.nickname && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21801
|
+
className: "plc-font-semibold plc-text-gray-500 pelcro-donation-plan"
|
|
21802
|
+
}, sub.plan.nickname), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21803
|
+
className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
|
|
21804
|
+
}, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21805
|
+
className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
|
|
21806
|
+
}, sub.status && /*#__PURE__*/React__default['default'].createElement("span", null, formatStartDate(sub.start)))));
|
|
21807
|
+
});
|
|
21808
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
21809
|
+
className: "plc-w-full plc-table-fixed pelcro-donations-table"
|
|
21810
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
21811
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
21812
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
21813
|
+
className: "plc-w-6/12 "
|
|
21814
|
+
}, t("labels.plan")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
21815
|
+
className: "plc-w-6/12 "
|
|
21816
|
+
}, t("labels.startDate")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
21817
|
+
className: "plc-h-4"
|
|
21818
|
+
}), subscriptions));
|
|
21819
|
+
};
|
|
21820
|
+
|
|
21821
|
+
function getDonationSubs() {
|
|
21822
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
21823
|
+
|
|
21824
|
+
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 : [];
|
|
21825
|
+
}
|
|
21826
|
+
|
|
21827
|
+
function formatStartDate(date) {
|
|
21828
|
+
const startDate = new Date(date);
|
|
21829
|
+
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21830
|
+
}
|
|
21831
|
+
|
|
21608
21832
|
const SUB_MENUS = {
|
|
21609
21833
|
PROFILE: "profile",
|
|
21610
21834
|
SUBSCRIPTIONS: "subscriptions",
|
|
21835
|
+
DONATIONS: "donations",
|
|
21611
21836
|
PAYMENT_CARDS: "payment-cards",
|
|
21612
21837
|
ADDRESSES: "addresses",
|
|
21613
21838
|
GIFTS: "gifts",
|
|
@@ -22135,6 +22360,14 @@ class Dashboard extends React.Component {
|
|
|
22135
22360
|
displayProductSelect: this.displayProductSelect,
|
|
22136
22361
|
displayRedeem: this.displayRedeem
|
|
22137
22362
|
})
|
|
22363
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22364
|
+
show: hasDonationSubs(),
|
|
22365
|
+
name: SUB_MENUS.DONATIONS,
|
|
22366
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
|
|
22367
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
22368
|
+
}),
|
|
22369
|
+
title: this.locale("labels.donations"),
|
|
22370
|
+
content: /*#__PURE__*/React__default['default'].createElement(DonationsMenu, null)
|
|
22138
22371
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22139
22372
|
name: SUB_MENUS.GIFTS,
|
|
22140
22373
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
|
|
@@ -22161,6 +22394,13 @@ class Dashboard extends React.Component {
|
|
|
22161
22394
|
|
|
22162
22395
|
}
|
|
22163
22396
|
|
|
22397
|
+
function hasDonationSubs() {
|
|
22398
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22399
|
+
|
|
22400
|
+
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 : [];
|
|
22401
|
+
return donations.length > 0;
|
|
22402
|
+
}
|
|
22403
|
+
|
|
22164
22404
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
22165
22405
|
|
|
22166
22406
|
// The button in the lower right that shows the dashboard.
|