@pelcro/react-pelcro-js 2.6.1-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 +577 -221
- package/dist/index.esm.js +577 -222
- 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$v() {
|
|
|
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",
|
|
@@ -8481,6 +8497,7 @@ const optionsController = options => {
|
|
|
8481
8497
|
|
|
8482
8498
|
const optionsMethodsDict = {
|
|
8483
8499
|
loadPaymentSDKs: loadPaymentSDKs,
|
|
8500
|
+
loadAuth0SDK: loadAuth0SDK,
|
|
8484
8501
|
enableURLTriggers: initViewFromURL,
|
|
8485
8502
|
enableTheme: applyPelcroTheme,
|
|
8486
8503
|
enablePaywalls: initPaywalls,
|
|
@@ -8546,6 +8563,13 @@ const loadPaymentSDKs = () => {
|
|
|
8546
8563
|
window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/paypal-checkout.min.js", "braintree-paypal-sdk");
|
|
8547
8564
|
}
|
|
8548
8565
|
};
|
|
8566
|
+
const loadAuth0SDK = () => {
|
|
8567
|
+
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
8568
|
+
|
|
8569
|
+
if (auth0Enabled) {
|
|
8570
|
+
window.Pelcro.helpers.loadSDK("https://cdn.auth0.com/js/auth0/9.18/auth0.min.js", "auth0-sdk");
|
|
8571
|
+
}
|
|
8572
|
+
};
|
|
8549
8573
|
const initSecuritySdk = () => {
|
|
8550
8574
|
const {
|
|
8551
8575
|
whenSiteReady
|
|
@@ -8842,6 +8866,7 @@ const initCartFromUrl = () => {
|
|
|
8842
8866
|
|
|
8843
8867
|
const defaultOptions = {
|
|
8844
8868
|
loadPaymentSDKs: true,
|
|
8869
|
+
loadAuth0SDK: true,
|
|
8845
8870
|
enableURLTriggers: true,
|
|
8846
8871
|
enableTheme: true,
|
|
8847
8872
|
enablePaywalls: true,
|
|
@@ -9121,6 +9146,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
|
9121
9146
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
9122
9147
|
const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
|
|
9123
9148
|
const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
|
|
9149
|
+
const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
|
|
9124
9150
|
const SET_PERCENT_OFF = "SET_PERCENT_OFF";
|
|
9125
9151
|
const SET_COUPON = "SET_COUPON";
|
|
9126
9152
|
const SET_COUPON_ERROR = "SET_COUPON_ERROR";
|
|
@@ -9667,16 +9693,16 @@ const LoginPassword = props => /*#__PURE__*/React__default['default'].createElem
|
|
|
9667
9693
|
store: store$f
|
|
9668
9694
|
}, props));
|
|
9669
9695
|
|
|
9670
|
-
var _path$
|
|
9696
|
+
var _path$p;
|
|
9671
9697
|
|
|
9672
|
-
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); }
|
|
9673
9699
|
|
|
9674
9700
|
function SvgCheck(props) {
|
|
9675
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9701
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
9676
9702
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9677
9703
|
fill: "currentColor",
|
|
9678
9704
|
viewBox: "0 0 20 20"
|
|
9679
|
-
}, props), _path$
|
|
9705
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9680
9706
|
fillRule: "evenodd",
|
|
9681
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",
|
|
9682
9708
|
clipRule: "evenodd"
|
|
@@ -9989,19 +10015,21 @@ const RegisterContainer = ({
|
|
|
9989
10015
|
*/
|
|
9990
10016
|
|
|
9991
10017
|
function hasSecurityTokenEnabled$1() {
|
|
9992
|
-
|
|
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);
|
|
9993
10021
|
return hasSecuritySdkLoaded;
|
|
9994
10022
|
}
|
|
9995
10023
|
|
|
9996
|
-
var _path$
|
|
10024
|
+
var _path$o;
|
|
9997
10025
|
|
|
9998
|
-
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); }
|
|
9999
10027
|
|
|
10000
10028
|
function SvgFacebookLogo(props) {
|
|
10001
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10029
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10002
10030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10003
10031
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10004
|
-
}, props), _path$
|
|
10032
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10005
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",
|
|
10006
10034
|
fill: "#3c5a9a"
|
|
10007
10035
|
})));
|
|
@@ -10074,15 +10102,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10074
10102
|
unwrapExports(googleLogin);
|
|
10075
10103
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10076
10104
|
|
|
10077
|
-
var _path$
|
|
10105
|
+
var _path$n, _path2$2, _path3$1, _path4;
|
|
10078
10106
|
|
|
10079
|
-
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); }
|
|
10080
10108
|
|
|
10081
10109
|
function SvgGoogleLogo(props) {
|
|
10082
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10110
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10083
10111
|
viewBox: "0 0 24 24",
|
|
10084
10112
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10085
|
-
}, props), _path$
|
|
10113
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10086
10114
|
fill: "#4285F4",
|
|
10087
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"
|
|
10088
10116
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10159,17 +10187,127 @@ const GoogleLoginButton = ({
|
|
|
10159
10187
|
}) : null;
|
|
10160
10188
|
};
|
|
10161
10189
|
|
|
10190
|
+
var _path$m;
|
|
10191
|
+
|
|
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); }
|
|
10193
|
+
|
|
10194
|
+
function SvgAuth0Logo(props) {
|
|
10195
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
10196
|
+
viewBox: "0 0 256 285",
|
|
10197
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10198
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
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"
|
|
10200
|
+
})));
|
|
10201
|
+
}
|
|
10202
|
+
|
|
10203
|
+
const Auth0LoginButton = ({
|
|
10204
|
+
label = "Auth0",
|
|
10205
|
+
className = "",
|
|
10206
|
+
labelClassName = "",
|
|
10207
|
+
iconClassName = ""
|
|
10208
|
+
}) => {
|
|
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);
|
|
10214
|
+
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
10215
|
+
React__default['default'].useEffect(() => {
|
|
10216
|
+
if (auth0Enabled) {
|
|
10217
|
+
auth0InstanceRef.current = new window.auth0.WebAuth({
|
|
10218
|
+
domain: window.Pelcro.site.read().auth0_base_url,
|
|
10219
|
+
clientID: window.Pelcro.site.read().auth0_client_id
|
|
10220
|
+
});
|
|
10221
|
+
}
|
|
10222
|
+
}, []);
|
|
10223
|
+
const {
|
|
10224
|
+
dispatch: loginDispatch
|
|
10225
|
+
} = React.useContext(store$f);
|
|
10226
|
+
const {
|
|
10227
|
+
dispatch: registerDispatch
|
|
10228
|
+
} = React.useContext(store$e);
|
|
10229
|
+
|
|
10230
|
+
function handleClick() {
|
|
10231
|
+
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
10232
|
+
|
|
10233
|
+
(_auth0InstanceRef$cur = auth0InstanceRef.current) === null || _auth0InstanceRef$cur === void 0 ? void 0 : (_auth0InstanceRef$cur2 = _auth0InstanceRef$cur.popup) === null || _auth0InstanceRef$cur2 === void 0 ? void 0 : (_auth0InstanceRef$cur3 = _auth0InstanceRef$cur2.authorize) === null || _auth0InstanceRef$cur3 === void 0 ? void 0 : _auth0InstanceRef$cur3.call(_auth0InstanceRef$cur2, {
|
|
10234
|
+
responseType: "token id_token",
|
|
10235
|
+
owp: true // close popup when finished
|
|
10236
|
+
|
|
10237
|
+
}, function (error, authResult) {
|
|
10238
|
+
if (error) {
|
|
10239
|
+
return onFailure(error);
|
|
10240
|
+
}
|
|
10241
|
+
|
|
10242
|
+
onSuccess(authResult);
|
|
10243
|
+
});
|
|
10244
|
+
}
|
|
10245
|
+
|
|
10246
|
+
const onSuccess = authResult => {
|
|
10247
|
+
var _auth0InstanceRef$cur4, _auth0InstanceRef$cur5, _auth0InstanceRef$cur6;
|
|
10248
|
+
|
|
10249
|
+
const {
|
|
10250
|
+
accessToken
|
|
10251
|
+
} = authResult;
|
|
10252
|
+
(_auth0InstanceRef$cur4 = auth0InstanceRef.current) === null || _auth0InstanceRef$cur4 === void 0 ? void 0 : (_auth0InstanceRef$cur5 = _auth0InstanceRef$cur4.client) === null || _auth0InstanceRef$cur5 === void 0 ? void 0 : (_auth0InstanceRef$cur6 = _auth0InstanceRef$cur5.userInfo) === null || _auth0InstanceRef$cur6 === void 0 ? void 0 : _auth0InstanceRef$cur6.call(_auth0InstanceRef$cur5, accessToken, (error, user) => {
|
|
10253
|
+
if (error) {
|
|
10254
|
+
return onFailure(error);
|
|
10255
|
+
}
|
|
10256
|
+
|
|
10257
|
+
const {
|
|
10258
|
+
email,
|
|
10259
|
+
nickname
|
|
10260
|
+
} = user;
|
|
10261
|
+
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
10262
|
+
type: HANDLE_SOCIAL_LOGIN,
|
|
10263
|
+
payload: {
|
|
10264
|
+
idpName: "auth0",
|
|
10265
|
+
idpToken: accessToken,
|
|
10266
|
+
firstName: nickname,
|
|
10267
|
+
email
|
|
10268
|
+
}
|
|
10269
|
+
});
|
|
10270
|
+
registerDispatch === null || registerDispatch === void 0 ? void 0 : registerDispatch({
|
|
10271
|
+
type: HANDLE_SOCIAL_LOGIN,
|
|
10272
|
+
payload: {
|
|
10273
|
+
idpName: "auth0",
|
|
10274
|
+
idpToken: accessToken,
|
|
10275
|
+
firstName: nickname,
|
|
10276
|
+
email
|
|
10277
|
+
}
|
|
10278
|
+
});
|
|
10279
|
+
});
|
|
10280
|
+
};
|
|
10281
|
+
|
|
10282
|
+
const onFailure = error => {
|
|
10283
|
+
console.error(error);
|
|
10284
|
+
};
|
|
10285
|
+
|
|
10286
|
+
if (auth0Enabled) {
|
|
10287
|
+
return /*#__PURE__*/React__default['default'].createElement("button", {
|
|
10288
|
+
onClick: handleClick,
|
|
10289
|
+
className: `plc-flex plc-items-center plc-justify-center plc-w-full plc-p-3 plc-space-x-3 plc-text-gray-700 plc-border plc-border-gray-200 plc-rounded-3xl hover:plc-bg-gray-200 pelcro-auth0-login ${className}`
|
|
10290
|
+
}, /*#__PURE__*/React__default['default'].createElement(SvgAuth0Logo, {
|
|
10291
|
+
className: `plc-w-6 plc-h-auto pelcro-auth0-login-icon" ${iconClassName}`
|
|
10292
|
+
}), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
10293
|
+
className: `pelcro-auth0-login-label ${labelClassName}`
|
|
10294
|
+
}, label));
|
|
10295
|
+
}
|
|
10296
|
+
|
|
10297
|
+
return null;
|
|
10298
|
+
};
|
|
10299
|
+
|
|
10162
10300
|
/**
|
|
10163
10301
|
*
|
|
10164
10302
|
*/
|
|
10165
10303
|
|
|
10166
10304
|
function LoginView(props) {
|
|
10167
|
-
var _window$Pelcro$site$r, _window$Pelcro$site$r2;
|
|
10305
|
+
var _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
10168
10306
|
|
|
10169
10307
|
const {
|
|
10170
10308
|
t
|
|
10171
10309
|
} = useTranslation("login");
|
|
10172
|
-
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id);
|
|
10310
|
+
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
10173
10311
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10174
10312
|
id: "pelcro-login-view"
|
|
10175
10313
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -10213,18 +10351,18 @@ function LoginView(props) {
|
|
|
10213
10351
|
className: "plc-w-full plc-border-gray-300"
|
|
10214
10352
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10215
10353
|
className: "plc-flex plc-justify-center plc-px-5 plc-mt-1 plc-space-x-3"
|
|
10216
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null))))));
|
|
10354
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10217
10355
|
}
|
|
10218
10356
|
|
|
10219
|
-
var _path$
|
|
10357
|
+
var _path$l, _path2$1, _path3;
|
|
10220
10358
|
|
|
10221
|
-
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); }
|
|
10222
10360
|
|
|
10223
10361
|
function SvgPelcroAuthorship(props) {
|
|
10224
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10362
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
10225
10363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10226
10364
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10227
|
-
}, props), _path$
|
|
10365
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10228
10366
|
fill: "none",
|
|
10229
10367
|
stroke: "#4a4a4a",
|
|
10230
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"
|
|
@@ -10572,7 +10710,7 @@ const RegisterLastName = props => /*#__PURE__*/React__default['default'].createE
|
|
|
10572
10710
|
*/
|
|
10573
10711
|
|
|
10574
10712
|
function RegisterView(props) {
|
|
10575
|
-
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro, _window$Pelcro$uiSett;
|
|
10713
|
+
var _product$paywall$regi, _product$paywall, _product$paywall$regi2, _product$paywall2, _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$site$r3, _window$Pelcro, _window$Pelcro$uiSett;
|
|
10576
10714
|
|
|
10577
10715
|
const {
|
|
10578
10716
|
t
|
|
@@ -10582,7 +10720,7 @@ function RegisterView(props) {
|
|
|
10582
10720
|
} = usePelcro();
|
|
10583
10721
|
const title = (_product$paywall$regi = product === null || product === void 0 ? void 0 : (_product$paywall = product.paywall) === null || _product$paywall === void 0 ? void 0 : _product$paywall.register_title) !== null && _product$paywall$regi !== void 0 ? _product$paywall$regi : t("title");
|
|
10584
10722
|
const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
|
|
10585
|
-
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id);
|
|
10723
|
+
const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
|
|
10586
10724
|
const showNameFields = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableNameFieldsInRegister;
|
|
10587
10725
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10588
10726
|
id: "pelcro-register-view"
|
|
@@ -10640,7 +10778,7 @@ function RegisterView(props) {
|
|
|
10640
10778
|
className: "plc-w-full plc-border-gray-300"
|
|
10641
10779
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10642
10780
|
className: "plc-flex plc-justify-center plc-px-5 plc-mt-1 plc-space-x-3"
|
|
10643
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null))))));
|
|
10781
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10644
10782
|
}
|
|
10645
10783
|
/**
|
|
10646
10784
|
* Checks if the current site has security token enabled
|
|
@@ -10648,9 +10786,9 @@ function RegisterView(props) {
|
|
|
10648
10786
|
*/
|
|
10649
10787
|
|
|
10650
10788
|
function hasSecurityTokenEnabled() {
|
|
10651
|
-
var _window$Pelcro$site, _window$Pelcro$site$
|
|
10789
|
+
var _window$Pelcro$site, _window$Pelcro$site$r4;
|
|
10652
10790
|
|
|
10653
|
-
return Boolean((_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$
|
|
10791
|
+
return Boolean((_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r4 = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.security_key);
|
|
10654
10792
|
}
|
|
10655
10793
|
|
|
10656
10794
|
function TextInput({
|
|
@@ -10940,42 +11078,80 @@ class SelectModal extends React.Component {
|
|
|
10940
11078
|
return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
|
|
10941
11079
|
});
|
|
10942
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
|
+
|
|
10943
11114
|
_defineProperty$3(this, "renderProducts", () => {
|
|
10944
11115
|
const userDidSelectProduct = Boolean(this.state.mode === "plan");
|
|
10945
11116
|
const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
return productsToShow.map((product, i) => {
|
|
10949
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10950
|
-
key: product.id,
|
|
10951
|
-
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"
|
|
10952
|
-
}, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
10953
|
-
alt: `image of ${product.name}`,
|
|
10954
|
-
src: product.image,
|
|
10955
|
-
className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
|
|
10956
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10957
|
-
className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
|
|
10958
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10959
|
-
className: "plc-w-full pelcro-select-product-header"
|
|
10960
|
-
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
10961
|
-
className: "plc-font-bold pelcro-select-product-title"
|
|
10962
|
-
}, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
10963
|
-
className: "plc-text-xs pelcro-select-product-description"
|
|
10964
|
-
}, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10965
|
-
className: "plc-flex plc-items-end plc-w-full plc-mt-3"
|
|
10966
|
-
}, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
|
|
10967
|
-
className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
|
|
10968
|
-
}, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
10969
|
-
onClick: productButtonCallback,
|
|
10970
|
-
"data-key": product.id,
|
|
10971
|
-
id: "pelcro-select-product-back-button",
|
|
10972
|
-
className: "plc-ml-auto plc-text-xs"
|
|
10973
|
-
}, i === 0 && {
|
|
10974
|
-
autoFocus: true
|
|
10975
|
-
}), productButtonLabel))));
|
|
11117
|
+
return productsToShow.map((product, index) => {
|
|
11118
|
+
return this.renderOneProduct(product, index);
|
|
10976
11119
|
});
|
|
10977
11120
|
});
|
|
10978
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
|
+
|
|
10979
11155
|
_defineProperty$3(this, "renderPlans", () => {
|
|
10980
11156
|
return this.state.planList.map(plan => {
|
|
10981
11157
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
@@ -11102,7 +11278,7 @@ class SelectModal extends React.Component {
|
|
|
11102
11278
|
}
|
|
11103
11279
|
|
|
11104
11280
|
render() {
|
|
11105
|
-
var _window$Pelcro$
|
|
11281
|
+
var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
|
|
11106
11282
|
|
|
11107
11283
|
const {
|
|
11108
11284
|
disableGifting
|
|
@@ -11136,9 +11312,9 @@ class SelectModal extends React.Component {
|
|
|
11136
11312
|
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
11137
11313
|
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
11138
11314
|
className: "plc-text-2xl plc-font-semibold"
|
|
11139
|
-
}, 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", {
|
|
11140
11316
|
className: "pelcro-select-products-wrapper"
|
|
11141
|
-
}, 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", {
|
|
11142
11318
|
className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
|
|
11143
11319
|
}, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11144
11320
|
className: "plc-flex plc-justify-center plc-mt-2"
|
|
@@ -12844,15 +13020,50 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12844
13020
|
});
|
|
12845
13021
|
|
|
12846
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
|
+
});
|
|
12847
13033
|
dispatch({
|
|
12848
13034
|
type: SET_PERCENT_OFF,
|
|
12849
13035
|
payload: ""
|
|
12850
13036
|
});
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
payload: getErrorMessages(err)
|
|
13037
|
+
dispatch({
|
|
13038
|
+
type: SET_UPDATED_PRICE,
|
|
13039
|
+
payload: null
|
|
12855
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;
|
|
12856
13067
|
}
|
|
12857
13068
|
|
|
12858
13069
|
dispatch({
|
|
@@ -12942,6 +13153,54 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12942
13153
|
|
|
12943
13154
|
const debouncedApplyCouponCode = React.useRef(debounce(onApplyCouponCode, 1000)).current;
|
|
12944
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
|
+
|
|
12945
13204
|
const subscribe = (stripeSource, state, dispatch) => {
|
|
12946
13205
|
const {
|
|
12947
13206
|
couponCode
|
|
@@ -13559,6 +13818,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13559
13818
|
disableCouponButton: true
|
|
13560
13819
|
}, (state, dispatch) => onApplyCouponCode(state, dispatch));
|
|
13561
13820
|
|
|
13821
|
+
case REMOVE_APPLIED_COUPON:
|
|
13822
|
+
return lib_5(state, () => removeAppliedCoupon(state));
|
|
13823
|
+
|
|
13562
13824
|
case SET_COUPON:
|
|
13563
13825
|
return lib_7({ ...state,
|
|
13564
13826
|
couponObject: action.payload
|
|
@@ -13727,6 +13989,10 @@ const DiscountedPrice = props => {
|
|
|
13727
13989
|
var _order$currency, _order$, _plan$quantity;
|
|
13728
13990
|
|
|
13729
13991
|
const {
|
|
13992
|
+
t
|
|
13993
|
+
} = useTranslation("checkoutForm");
|
|
13994
|
+
const {
|
|
13995
|
+
dispatch,
|
|
13730
13996
|
state: {
|
|
13731
13997
|
updatedPrice,
|
|
13732
13998
|
taxAmount,
|
|
@@ -13742,12 +14008,22 @@ const DiscountedPrice = props => {
|
|
|
13742
14008
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
13743
14009
|
const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
13744
14010
|
|
|
14011
|
+
const onCouponRemove = () => {
|
|
14012
|
+
dispatch({
|
|
14013
|
+
type: REMOVE_APPLIED_COUPON
|
|
14014
|
+
});
|
|
14015
|
+
};
|
|
14016
|
+
|
|
13745
14017
|
if (percentOff) {
|
|
13746
14018
|
return /*#__PURE__*/React__default['default'].createElement("div", Object.assign({
|
|
13747
|
-
className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
|
|
13748
|
-
}, props), "(-", percentOff, ")",
|
|
13749
|
-
className: "plc-font-bold pelcro-discounted-price"
|
|
13750
|
-
}, 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")));
|
|
13751
14027
|
}
|
|
13752
14028
|
|
|
13753
14029
|
return "";
|
|
@@ -13793,17 +14069,17 @@ const SubmitPaymentMethod = ({
|
|
|
13793
14069
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
13794
14070
|
};
|
|
13795
14071
|
|
|
13796
|
-
var _path$
|
|
14072
|
+
var _path$k;
|
|
13797
14073
|
|
|
13798
|
-
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); }
|
|
13799
14075
|
|
|
13800
14076
|
function SvgArrowLeft(props) {
|
|
13801
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14077
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
13802
14078
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13803
14079
|
fill: "none",
|
|
13804
14080
|
viewBox: "0 0 24 24",
|
|
13805
14081
|
stroke: "currentColor"
|
|
13806
|
-
}, props), _path$
|
|
14082
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13807
14083
|
strokeLinecap: "round",
|
|
13808
14084
|
strokeLinejoin: "round",
|
|
13809
14085
|
strokeWidth: 2,
|
|
@@ -13885,17 +14161,17 @@ const CouponCodeField = props => {
|
|
|
13885
14161
|
}, props));
|
|
13886
14162
|
};
|
|
13887
14163
|
|
|
13888
|
-
var _path$
|
|
14164
|
+
var _path$j;
|
|
13889
14165
|
|
|
13890
|
-
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); }
|
|
13891
14167
|
|
|
13892
14168
|
function SvgTicket(props) {
|
|
13893
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14169
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
13894
14170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13895
14171
|
fill: "none",
|
|
13896
14172
|
viewBox: "0 0 24 24",
|
|
13897
14173
|
stroke: "currentColor"
|
|
13898
|
-
}, props), _path$
|
|
14174
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13899
14175
|
strokeLinecap: "round",
|
|
13900
14176
|
strokeLinejoin: "round",
|
|
13901
14177
|
strokeWidth: 2,
|
|
@@ -14254,16 +14530,16 @@ const BankRedirection = () => {
|
|
|
14254
14530
|
}));
|
|
14255
14531
|
};
|
|
14256
14532
|
|
|
14257
|
-
var _path$
|
|
14533
|
+
var _path$i;
|
|
14258
14534
|
|
|
14259
|
-
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); }
|
|
14260
14536
|
|
|
14261
14537
|
function SvgLock(props) {
|
|
14262
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14538
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
14263
14539
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14264
14540
|
viewBox: "0 0 20 20",
|
|
14265
14541
|
fill: "currentColor"
|
|
14266
|
-
}, props), _path$
|
|
14542
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14267
14543
|
fillRule: "evenodd",
|
|
14268
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",
|
|
14269
14545
|
clipRule: "evenodd"
|
|
@@ -14485,12 +14761,12 @@ function SubscriptionRenewModal({
|
|
|
14485
14761
|
}
|
|
14486
14762
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14487
14763
|
|
|
14488
|
-
var _path$
|
|
14764
|
+
var _path$h;
|
|
14489
14765
|
|
|
14490
|
-
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); }
|
|
14491
14767
|
|
|
14492
14768
|
function SvgGift(props) {
|
|
14493
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14769
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
14494
14770
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14495
14771
|
fill: "none",
|
|
14496
14772
|
stroke: "currentColor",
|
|
@@ -14499,7 +14775,7 @@ function SvgGift(props) {
|
|
|
14499
14775
|
strokeWidth: 2,
|
|
14500
14776
|
viewBox: "0 0 24 24",
|
|
14501
14777
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14502
|
-
}, props), _path$
|
|
14778
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14503
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"
|
|
14504
14780
|
})));
|
|
14505
14781
|
}
|
|
@@ -15498,17 +15774,17 @@ const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createEl
|
|
|
15498
15774
|
|
|
15499
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";
|
|
15500
15776
|
|
|
15501
|
-
var _path$
|
|
15777
|
+
var _path$g;
|
|
15502
15778
|
|
|
15503
|
-
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); }
|
|
15504
15780
|
|
|
15505
15781
|
function SvgEdit(props) {
|
|
15506
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15782
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
15507
15783
|
className: "plc-w-6 plc-h-6",
|
|
15508
15784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15509
15785
|
viewBox: "0 0 20 20",
|
|
15510
15786
|
fill: "currentColor"
|
|
15511
|
-
}, props), _path$
|
|
15787
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15512
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"
|
|
15513
15789
|
})));
|
|
15514
15790
|
}
|
|
@@ -18618,18 +18894,18 @@ const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].creat
|
|
|
18618
18894
|
store: store$4
|
|
18619
18895
|
}, props));
|
|
18620
18896
|
|
|
18621
|
-
var _path$
|
|
18897
|
+
var _path$f;
|
|
18622
18898
|
|
|
18623
|
-
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); }
|
|
18624
18900
|
|
|
18625
18901
|
function SvgInfoCircle(props) {
|
|
18626
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
18902
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
18627
18903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18628
18904
|
className: "plc-w-5 plc-h-5",
|
|
18629
18905
|
fill: "none",
|
|
18630
18906
|
viewBox: "0 0 24 24",
|
|
18631
18907
|
stroke: "currentColor"
|
|
18632
|
-
}, props), _path$
|
|
18908
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18633
18909
|
strokeLinecap: "round",
|
|
18634
18910
|
strokeLinejoin: "round",
|
|
18635
18911
|
strokeWidth: 2,
|
|
@@ -18787,7 +19063,7 @@ function GiftCreateMessage(props) {
|
|
|
18787
19063
|
return /*#__PURE__*/React__default['default'].createElement(TextArea, Object.assign({
|
|
18788
19064
|
onChange: e => handleInputChange(e.target.value),
|
|
18789
19065
|
value: state.giftMessage,
|
|
18790
|
-
maxLength: "
|
|
19066
|
+
maxLength: "200",
|
|
18791
19067
|
rows: 3,
|
|
18792
19068
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
18793
19069
|
}, props));
|
|
@@ -19616,8 +19892,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19616
19892
|
};
|
|
19617
19893
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19618
19894
|
|
|
19619
|
-
function _extends$
|
|
19620
|
-
_extends$
|
|
19895
|
+
function _extends$g() {
|
|
19896
|
+
_extends$g = Object.assign || function (target) {
|
|
19621
19897
|
for (var i = 1; i < arguments.length; i++) {
|
|
19622
19898
|
var source = arguments[i];
|
|
19623
19899
|
|
|
@@ -19631,7 +19907,7 @@ function _extends$f() {
|
|
|
19631
19907
|
return target;
|
|
19632
19908
|
};
|
|
19633
19909
|
|
|
19634
|
-
return _extends$
|
|
19910
|
+
return _extends$g.apply(this, arguments);
|
|
19635
19911
|
}
|
|
19636
19912
|
|
|
19637
19913
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -19815,7 +20091,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
19815
20091
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
19816
20092
|
return null;
|
|
19817
20093
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
19818
|
-
return _render(_extends$
|
|
20094
|
+
return _render(_extends$g({}, _rest, {
|
|
19819
20095
|
hidden: true,
|
|
19820
20096
|
style: {
|
|
19821
20097
|
display: 'none'
|
|
@@ -20343,7 +20619,7 @@ function TransitionChild(props) {
|
|
|
20343
20619
|
var passthroughProps = rest;
|
|
20344
20620
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20345
20621
|
value: nesting
|
|
20346
|
-
}, render(_extends$
|
|
20622
|
+
}, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20347
20623
|
}
|
|
20348
20624
|
|
|
20349
20625
|
function Transition(props) {
|
|
@@ -20387,7 +20663,7 @@ function Transition(props) {
|
|
|
20387
20663
|
value: nestingBag
|
|
20388
20664
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20389
20665
|
value: transitionBag
|
|
20390
|
-
}, render(_extends$
|
|
20666
|
+
}, render(_extends$g({}, sharedProps, {
|
|
20391
20667
|
as: React.Fragment,
|
|
20392
20668
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20393
20669
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20514,12 +20790,12 @@ var ActionTypes;
|
|
|
20514
20790
|
})(ActionTypes || (ActionTypes = {}));
|
|
20515
20791
|
|
|
20516
20792
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20517
|
-
return _extends$
|
|
20793
|
+
return _extends$g({}, state, {
|
|
20518
20794
|
activeItemIndex: null,
|
|
20519
20795
|
menuState: MenuStates.Closed
|
|
20520
20796
|
});
|
|
20521
20797
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20522
|
-
return _extends$
|
|
20798
|
+
return _extends$g({}, state, {
|
|
20523
20799
|
menuState: MenuStates.Open
|
|
20524
20800
|
});
|
|
20525
20801
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20538,7 +20814,7 @@ var ActionTypes;
|
|
|
20538
20814
|
}
|
|
20539
20815
|
});
|
|
20540
20816
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20541
|
-
return _extends$
|
|
20817
|
+
return _extends$g({}, state, {
|
|
20542
20818
|
searchQuery: '',
|
|
20543
20819
|
activeItemIndex: activeItemIndex
|
|
20544
20820
|
});
|
|
@@ -20549,19 +20825,19 @@ var ActionTypes;
|
|
|
20549
20825
|
|
|
20550
20826
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20551
20827
|
});
|
|
20552
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
20828
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
|
|
20553
20829
|
searchQuery: searchQuery
|
|
20554
20830
|
});
|
|
20555
|
-
return _extends$
|
|
20831
|
+
return _extends$g({}, state, {
|
|
20556
20832
|
searchQuery: searchQuery,
|
|
20557
20833
|
activeItemIndex: match
|
|
20558
20834
|
});
|
|
20559
20835
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20560
|
-
return _extends$
|
|
20836
|
+
return _extends$g({}, state, {
|
|
20561
20837
|
searchQuery: ''
|
|
20562
20838
|
});
|
|
20563
20839
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20564
|
-
return _extends$
|
|
20840
|
+
return _extends$g({}, state, {
|
|
20565
20841
|
items: [].concat(state.items, [{
|
|
20566
20842
|
id: action.id,
|
|
20567
20843
|
dataRef: action.dataRef
|
|
@@ -20574,7 +20850,7 @@ var ActionTypes;
|
|
|
20574
20850
|
return a.id === action.id;
|
|
20575
20851
|
});
|
|
20576
20852
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20577
|
-
return _extends$
|
|
20853
|
+
return _extends$g({}, state, {
|
|
20578
20854
|
items: nextItems,
|
|
20579
20855
|
activeItemIndex: function () {
|
|
20580
20856
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20613,19 +20889,19 @@ var ActionTypes$1;
|
|
|
20613
20889
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20614
20890
|
if (state.disabled) return state;
|
|
20615
20891
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20616
|
-
return _extends$
|
|
20892
|
+
return _extends$g({}, state, {
|
|
20617
20893
|
activeOptionIndex: null,
|
|
20618
20894
|
listboxState: ListboxStates.Closed
|
|
20619
20895
|
});
|
|
20620
20896
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20621
20897
|
if (state.disabled) return state;
|
|
20622
20898
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20623
|
-
return _extends$
|
|
20899
|
+
return _extends$g({}, state, {
|
|
20624
20900
|
listboxState: ListboxStates.Open
|
|
20625
20901
|
});
|
|
20626
20902
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20627
20903
|
if (state.disabled === action.disabled) return state;
|
|
20628
|
-
return _extends$
|
|
20904
|
+
return _extends$g({}, state, {
|
|
20629
20905
|
disabled: action.disabled
|
|
20630
20906
|
});
|
|
20631
20907
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20646,7 +20922,7 @@ var ActionTypes$1;
|
|
|
20646
20922
|
}
|
|
20647
20923
|
});
|
|
20648
20924
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
20649
|
-
return _extends$
|
|
20925
|
+
return _extends$g({}, state, {
|
|
20650
20926
|
searchQuery: '',
|
|
20651
20927
|
activeOptionIndex: activeOptionIndex
|
|
20652
20928
|
});
|
|
@@ -20659,10 +20935,10 @@ var ActionTypes$1;
|
|
|
20659
20935
|
|
|
20660
20936
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
20661
20937
|
});
|
|
20662
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
20938
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
|
|
20663
20939
|
searchQuery: searchQuery
|
|
20664
20940
|
});
|
|
20665
|
-
return _extends$
|
|
20941
|
+
return _extends$g({}, state, {
|
|
20666
20942
|
searchQuery: searchQuery,
|
|
20667
20943
|
activeOptionIndex: match
|
|
20668
20944
|
});
|
|
@@ -20670,11 +20946,11 @@ var ActionTypes$1;
|
|
|
20670
20946
|
if (state.disabled) return state;
|
|
20671
20947
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20672
20948
|
if (state.searchQuery === '') return state;
|
|
20673
|
-
return _extends$
|
|
20949
|
+
return _extends$g({}, state, {
|
|
20674
20950
|
searchQuery: ''
|
|
20675
20951
|
});
|
|
20676
20952
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
20677
|
-
return _extends$
|
|
20953
|
+
return _extends$g({}, state, {
|
|
20678
20954
|
options: [].concat(state.options, [{
|
|
20679
20955
|
id: action.id,
|
|
20680
20956
|
dataRef: action.dataRef
|
|
@@ -20687,7 +20963,7 @@ var ActionTypes$1;
|
|
|
20687
20963
|
return a.id === action.id;
|
|
20688
20964
|
});
|
|
20689
20965
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
20690
|
-
return _extends$
|
|
20966
|
+
return _extends$g({}, state, {
|
|
20691
20967
|
options: nextOptions,
|
|
20692
20968
|
activeOptionIndex: function () {
|
|
20693
20969
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -20748,18 +21024,18 @@ const getPaymentCardIcon = name => {
|
|
|
20748
21024
|
}));
|
|
20749
21025
|
};
|
|
20750
21026
|
|
|
20751
|
-
var _path$
|
|
21027
|
+
var _path$e;
|
|
20752
21028
|
|
|
20753
|
-
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); }
|
|
20754
21030
|
|
|
20755
21031
|
function SvgChevronRight(props) {
|
|
20756
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21032
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
20757
21033
|
className: "plc-w-6 plc-h-6",
|
|
20758
21034
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20759
21035
|
fill: "none",
|
|
20760
21036
|
viewBox: "0 0 24 24",
|
|
20761
21037
|
stroke: "currentColor"
|
|
20762
|
-
}, props), _path$
|
|
21038
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20763
21039
|
strokeLinecap: "round",
|
|
20764
21040
|
strokeLinejoin: "round",
|
|
20765
21041
|
strokeWidth: 2,
|
|
@@ -20975,18 +21251,18 @@ const SavedItems = ({
|
|
|
20975
21251
|
});
|
|
20976
21252
|
};
|
|
20977
21253
|
|
|
20978
|
-
var _path$
|
|
21254
|
+
var _path$d;
|
|
20979
21255
|
|
|
20980
|
-
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); }
|
|
20981
21257
|
|
|
20982
21258
|
function SvgRefresh(props) {
|
|
20983
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21259
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
20984
21260
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
20985
21261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20986
21262
|
fill: "none",
|
|
20987
21263
|
viewBox: "0 0 24 24",
|
|
20988
21264
|
stroke: "currentColor"
|
|
20989
|
-
}, props), _path$
|
|
21265
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20990
21266
|
strokeLinecap: "round",
|
|
20991
21267
|
strokeLinejoin: "round",
|
|
20992
21268
|
strokeWidth: 2,
|
|
@@ -20994,35 +21270,35 @@ function SvgRefresh(props) {
|
|
|
20994
21270
|
})));
|
|
20995
21271
|
}
|
|
20996
21272
|
|
|
20997
|
-
var _path$
|
|
21273
|
+
var _path$c;
|
|
20998
21274
|
|
|
20999
|
-
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); }
|
|
21000
21276
|
|
|
21001
21277
|
function SvgCalendar(props) {
|
|
21002
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21278
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21003
21279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21004
21280
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21005
21281
|
viewBox: "0 0 20 20",
|
|
21006
21282
|
fill: "currentColor"
|
|
21007
|
-
}, props), _path$
|
|
21283
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21008
21284
|
fillRule: "evenodd",
|
|
21009
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",
|
|
21010
21286
|
clipRule: "evenodd"
|
|
21011
21287
|
})));
|
|
21012
21288
|
}
|
|
21013
21289
|
|
|
21014
|
-
var _path$
|
|
21290
|
+
var _path$b;
|
|
21015
21291
|
|
|
21016
|
-
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); }
|
|
21017
21293
|
|
|
21018
21294
|
function SvgPlus(props) {
|
|
21019
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21295
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
21020
21296
|
className: "plc-w-5 plc-h-5",
|
|
21021
21297
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21022
21298
|
fill: "none",
|
|
21023
21299
|
viewBox: "0 0 24 24",
|
|
21024
21300
|
stroke: "currentColor"
|
|
21025
|
-
}, props), _path$
|
|
21301
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21026
21302
|
strokeLinecap: "round",
|
|
21027
21303
|
strokeLinejoin: "round",
|
|
21028
21304
|
strokeWidth: 2,
|
|
@@ -21030,17 +21306,17 @@ function SvgPlus(props) {
|
|
|
21030
21306
|
})));
|
|
21031
21307
|
}
|
|
21032
21308
|
|
|
21033
|
-
var _path$
|
|
21309
|
+
var _path$a;
|
|
21034
21310
|
|
|
21035
|
-
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); }
|
|
21036
21312
|
|
|
21037
21313
|
function SvgCheckMark(props) {
|
|
21038
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21314
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21039
21315
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21040
21316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21041
21317
|
viewBox: "0 0 20 20",
|
|
21042
21318
|
fill: "currentColor"
|
|
21043
|
-
}, props), _path$
|
|
21319
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21044
21320
|
fillRule: "evenodd",
|
|
21045
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",
|
|
21046
21322
|
clipRule: "evenodd"
|
|
@@ -21102,9 +21378,9 @@ const SubscriptionsItems = ({
|
|
|
21102
21378
|
const {
|
|
21103
21379
|
t
|
|
21104
21380
|
} = useTranslation("dashboard");
|
|
21105
|
-
const subs =
|
|
21106
|
-
if (
|
|
21107
|
-
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 => {
|
|
21108
21384
|
const isActive = activeMenu === sub.id; // Cancel button click handlers
|
|
21109
21385
|
|
|
21110
21386
|
const onCancelClick = () => {
|
|
@@ -21235,6 +21511,12 @@ const SubscriptionsItems = ({
|
|
|
21235
21511
|
});
|
|
21236
21512
|
};
|
|
21237
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
|
+
|
|
21238
21520
|
/**
|
|
21239
21521
|
* @typedef {Object} AccordionPropsType
|
|
21240
21522
|
* @property {string} initialActiveMenu the initial active menu
|
|
@@ -21317,18 +21599,18 @@ Accordion.item = function AccordionItem({
|
|
|
21317
21599
|
}, content)) : null;
|
|
21318
21600
|
};
|
|
21319
21601
|
|
|
21320
|
-
var _path$
|
|
21602
|
+
var _path$9;
|
|
21321
21603
|
|
|
21322
|
-
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); }
|
|
21323
21605
|
|
|
21324
21606
|
function SvgExit(props) {
|
|
21325
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21607
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21326
21608
|
className: "plc-w-6 plc-h-6",
|
|
21327
21609
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21328
21610
|
fill: "none",
|
|
21329
21611
|
viewBox: "0 0 24 24",
|
|
21330
21612
|
stroke: "currentColor"
|
|
21331
|
-
}, props), _path$
|
|
21613
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21332
21614
|
strokeLinecap: "round",
|
|
21333
21615
|
strokeLinejoin: "round",
|
|
21334
21616
|
strokeWidth: 2,
|
|
@@ -21336,17 +21618,17 @@ function SvgExit(props) {
|
|
|
21336
21618
|
})));
|
|
21337
21619
|
}
|
|
21338
21620
|
|
|
21339
|
-
var _path$
|
|
21621
|
+
var _path$8;
|
|
21340
21622
|
|
|
21341
|
-
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); }
|
|
21342
21624
|
|
|
21343
21625
|
function SvgUser(props) {
|
|
21344
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21626
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21345
21627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21346
21628
|
fill: "none",
|
|
21347
21629
|
viewBox: "0 0 24 24",
|
|
21348
21630
|
stroke: "currentColor"
|
|
21349
|
-
}, props), _path$
|
|
21631
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21350
21632
|
strokeLinecap: "round",
|
|
21351
21633
|
strokeLinejoin: "round",
|
|
21352
21634
|
strokeWidth: 2,
|
|
@@ -21354,18 +21636,18 @@ function SvgUser(props) {
|
|
|
21354
21636
|
})));
|
|
21355
21637
|
}
|
|
21356
21638
|
|
|
21357
|
-
var _path$
|
|
21639
|
+
var _path$7;
|
|
21358
21640
|
|
|
21359
|
-
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); }
|
|
21360
21642
|
|
|
21361
21643
|
function SvgNewsletter(props) {
|
|
21362
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21644
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
21363
21645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21364
21646
|
className: "plc-h-5 plc-w-5",
|
|
21365
21647
|
fill: "none",
|
|
21366
21648
|
viewBox: "0 0 24 24",
|
|
21367
21649
|
stroke: "currentColor"
|
|
21368
|
-
}, props), _path$
|
|
21650
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21369
21651
|
strokeLinecap: "round",
|
|
21370
21652
|
strokeLinejoin: "round",
|
|
21371
21653
|
strokeWidth: 2,
|
|
@@ -21373,18 +21655,18 @@ function SvgNewsletter(props) {
|
|
|
21373
21655
|
})));
|
|
21374
21656
|
}
|
|
21375
21657
|
|
|
21376
|
-
var _path$
|
|
21658
|
+
var _path$6;
|
|
21377
21659
|
|
|
21378
|
-
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); }
|
|
21379
21661
|
|
|
21380
21662
|
function SvgPaymentCard(props) {
|
|
21381
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21663
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
21382
21664
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21383
21665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21384
21666
|
fill: "none",
|
|
21385
21667
|
viewBox: "0 0 24 24",
|
|
21386
21668
|
stroke: "currentColor"
|
|
21387
|
-
}, props), _path$
|
|
21669
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21388
21670
|
strokeLinecap: "round",
|
|
21389
21671
|
strokeLinejoin: "round",
|
|
21390
21672
|
strokeWidth: 2,
|
|
@@ -21392,18 +21674,18 @@ function SvgPaymentCard(props) {
|
|
|
21392
21674
|
})));
|
|
21393
21675
|
}
|
|
21394
21676
|
|
|
21395
|
-
var _path$
|
|
21677
|
+
var _path$5, _path2;
|
|
21396
21678
|
|
|
21397
|
-
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); }
|
|
21398
21680
|
|
|
21399
21681
|
function SvgLocationPin(props) {
|
|
21400
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21682
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
21401
21683
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21402
21684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21403
21685
|
fill: "none",
|
|
21404
21686
|
viewBox: "0 0 24 24",
|
|
21405
21687
|
stroke: "currentColor"
|
|
21406
|
-
}, props), _path$
|
|
21688
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21407
21689
|
strokeLinecap: "round",
|
|
21408
21690
|
strokeLinejoin: "round",
|
|
21409
21691
|
strokeWidth: 2,
|
|
@@ -21418,10 +21700,10 @@ function SvgLocationPin(props) {
|
|
|
21418
21700
|
|
|
21419
21701
|
var _switch;
|
|
21420
21702
|
|
|
21421
|
-
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); }
|
|
21422
21704
|
|
|
21423
21705
|
function SvgSubscription(props) {
|
|
21424
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21706
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
21425
21707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21426
21708
|
viewBox: "0 0 100 125",
|
|
21427
21709
|
fill: "currentColor"
|
|
@@ -21436,18 +21718,18 @@ function SvgSubscription(props) {
|
|
|
21436
21718
|
}))))));
|
|
21437
21719
|
}
|
|
21438
21720
|
|
|
21439
|
-
var _path$
|
|
21721
|
+
var _path$4;
|
|
21440
21722
|
|
|
21441
|
-
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); }
|
|
21442
21724
|
|
|
21443
21725
|
function SvgShopping(props) {
|
|
21444
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21726
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
21445
21727
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21446
21728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21447
21729
|
fill: "none",
|
|
21448
21730
|
viewBox: "0 0 24 24",
|
|
21449
21731
|
stroke: "currentColor"
|
|
21450
|
-
}, props), _path$
|
|
21732
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21451
21733
|
strokeLinecap: "round",
|
|
21452
21734
|
strokeLinejoin: "round",
|
|
21453
21735
|
strokeWidth: 2,
|
|
@@ -21455,18 +21737,18 @@ function SvgShopping(props) {
|
|
|
21455
21737
|
})));
|
|
21456
21738
|
}
|
|
21457
21739
|
|
|
21458
|
-
var _path$
|
|
21740
|
+
var _path$3;
|
|
21459
21741
|
|
|
21460
|
-
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); }
|
|
21461
21743
|
|
|
21462
21744
|
function SvgBookmark(props) {
|
|
21463
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21745
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
21464
21746
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
21465
21747
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21466
21748
|
fill: "none",
|
|
21467
21749
|
viewBox: "0 0 24 24",
|
|
21468
21750
|
stroke: "currentColor"
|
|
21469
|
-
}, props), _path$
|
|
21751
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21470
21752
|
strokeLinecap: "round",
|
|
21471
21753
|
strokeLinejoin: "round",
|
|
21472
21754
|
strokeWidth: 2,
|
|
@@ -21474,25 +21756,83 @@ function SvgBookmark(props) {
|
|
|
21474
21756
|
})));
|
|
21475
21757
|
}
|
|
21476
21758
|
|
|
21477
|
-
var _path$
|
|
21759
|
+
var _path$2;
|
|
21478
21760
|
|
|
21479
|
-
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); }
|
|
21480
21762
|
|
|
21481
21763
|
function SvgKey(props) {
|
|
21482
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21764
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
21483
21765
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21484
21766
|
viewBox: "0 0 20 20",
|
|
21485
21767
|
fill: "currentColor"
|
|
21486
|
-
}, props), _path$
|
|
21768
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21487
21769
|
fillRule: "evenodd",
|
|
21488
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",
|
|
21489
21771
|
clipRule: "evenodd"
|
|
21490
21772
|
})));
|
|
21491
21773
|
}
|
|
21492
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
|
+
|
|
21493
21832
|
const SUB_MENUS = {
|
|
21494
21833
|
PROFILE: "profile",
|
|
21495
21834
|
SUBSCRIPTIONS: "subscriptions",
|
|
21835
|
+
DONATIONS: "donations",
|
|
21496
21836
|
PAYMENT_CARDS: "payment-cards",
|
|
21497
21837
|
ADDRESSES: "addresses",
|
|
21498
21838
|
GIFTS: "gifts",
|
|
@@ -22020,6 +22360,14 @@ class Dashboard extends React.Component {
|
|
|
22020
22360
|
displayProductSelect: this.displayProductSelect,
|
|
22021
22361
|
displayRedeem: this.displayRedeem
|
|
22022
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)
|
|
22023
22371
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22024
22372
|
name: SUB_MENUS.GIFTS,
|
|
22025
22373
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
|
|
@@ -22046,6 +22394,13 @@ class Dashboard extends React.Component {
|
|
|
22046
22394
|
|
|
22047
22395
|
}
|
|
22048
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
|
+
|
|
22049
22404
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
22050
22405
|
|
|
22051
22406
|
// The button in the lower right that shows the dashboard.
|
|
@@ -23923,6 +24278,7 @@ exports.AddressUpdateView = AddressUpdateView;
|
|
|
23923
24278
|
exports.Alert = AlertWithContext;
|
|
23924
24279
|
exports.AlertElement = Alert;
|
|
23925
24280
|
exports.ApplyCouponButton = ApplyCouponButton;
|
|
24281
|
+
exports.Auth0LoginButton = Auth0LoginButton;
|
|
23926
24282
|
exports.Badge = Badge;
|
|
23927
24283
|
exports.BankRedirection = BankRedirection;
|
|
23928
24284
|
exports.Button = Button;
|