@pelcro/react-pelcro-js 4.0.0-alpha.22 → 4.0.0-alpha.24
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 +487 -373
- package/dist/index.esm.js +545 -431
- package/dist/pelcro.css +17 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8697,7 +8697,7 @@ const createPelcroHook = store => {
|
|
|
8697
8697
|
|
|
8698
8698
|
pelcroHook.override = fn => {
|
|
8699
8699
|
const partialState = fn(store.setState, store.getState);
|
|
8700
|
-
usePelcro
|
|
8700
|
+
usePelcro.setState(partialState);
|
|
8701
8701
|
};
|
|
8702
8702
|
|
|
8703
8703
|
pelcroHook.getStore = pelcroHook.getState;
|
|
@@ -8705,11 +8705,11 @@ const createPelcroHook = store => {
|
|
|
8705
8705
|
};
|
|
8706
8706
|
|
|
8707
8707
|
const pelcroStore = createPelcroStore();
|
|
8708
|
-
const usePelcro
|
|
8708
|
+
const usePelcro = createPelcroHook(pelcroStore);
|
|
8709
8709
|
/* istanbul ignore next */
|
|
8710
8710
|
|
|
8711
8711
|
if (process.env.NODE_ENV === "development") {
|
|
8712
|
-
c$1("Pelcro Store", usePelcro
|
|
8712
|
+
c$1("Pelcro Store", usePelcro);
|
|
8713
8713
|
}
|
|
8714
8714
|
|
|
8715
8715
|
/**
|
|
@@ -8914,7 +8914,7 @@ const trackSubscriptionOnGA = () => {
|
|
|
8914
8914
|
product,
|
|
8915
8915
|
plan,
|
|
8916
8916
|
couponCode
|
|
8917
|
-
} = usePelcro
|
|
8917
|
+
} = usePelcro.getStore();
|
|
8918
8918
|
/*
|
|
8919
8919
|
getting the latest subscription id from invoices instead of subscriptions
|
|
8920
8920
|
to handle gifted subs which are not added to subs list
|
|
@@ -9239,7 +9239,7 @@ class SaveToMetadataButtonClass {
|
|
|
9239
9239
|
_defineProperty$3(this, "unauthenticated", () => {
|
|
9240
9240
|
const {
|
|
9241
9241
|
switchView
|
|
9242
|
-
} = usePelcro
|
|
9242
|
+
} = usePelcro.getStore();
|
|
9243
9243
|
|
|
9244
9244
|
_classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
|
|
9245
9245
|
|
|
@@ -9322,7 +9322,7 @@ class SaveToMetadataButtonClass {
|
|
|
9322
9322
|
const user = window.Pelcro.user.read();
|
|
9323
9323
|
const {
|
|
9324
9324
|
switchView
|
|
9325
|
-
} = usePelcro
|
|
9325
|
+
} = usePelcro.getStore();
|
|
9326
9326
|
const {
|
|
9327
9327
|
key,
|
|
9328
9328
|
...buttonMetadata
|
|
@@ -9454,8 +9454,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
9454
9454
|
|
|
9455
9455
|
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$1=(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$1(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}}
|
|
9456
9456
|
|
|
9457
|
-
function _extends$
|
|
9458
|
-
_extends$
|
|
9457
|
+
function _extends$D() {
|
|
9458
|
+
_extends$D = Object.assign || function (target) {
|
|
9459
9459
|
for (var i = 1; i < arguments.length; i++) {
|
|
9460
9460
|
var source = arguments[i];
|
|
9461
9461
|
|
|
@@ -9469,7 +9469,7 @@ function _extends$C() {
|
|
|
9469
9469
|
return target;
|
|
9470
9470
|
};
|
|
9471
9471
|
|
|
9472
|
-
return _extends$
|
|
9472
|
+
return _extends$D.apply(this, arguments);
|
|
9473
9473
|
}
|
|
9474
9474
|
|
|
9475
9475
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -9559,7 +9559,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
9559
9559
|
var reducer = function reducer(state, action) {
|
|
9560
9560
|
switch (action.type) {
|
|
9561
9561
|
case ActionType.ADD_TOAST:
|
|
9562
|
-
return _extends$
|
|
9562
|
+
return _extends$D({}, state, {
|
|
9563
9563
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
9564
9564
|
});
|
|
9565
9565
|
|
|
@@ -9569,9 +9569,9 @@ var reducer = function reducer(state, action) {
|
|
|
9569
9569
|
clearFromRemoveQueue(action.toast.id);
|
|
9570
9570
|
}
|
|
9571
9571
|
|
|
9572
|
-
return _extends$
|
|
9572
|
+
return _extends$D({}, state, {
|
|
9573
9573
|
toasts: state.toasts.map(function (t) {
|
|
9574
|
-
return t.id === action.toast.id ? _extends$
|
|
9574
|
+
return t.id === action.toast.id ? _extends$D({}, t, action.toast) : t;
|
|
9575
9575
|
})
|
|
9576
9576
|
});
|
|
9577
9577
|
|
|
@@ -9598,9 +9598,9 @@ var reducer = function reducer(state, action) {
|
|
|
9598
9598
|
});
|
|
9599
9599
|
}
|
|
9600
9600
|
|
|
9601
|
-
return _extends$
|
|
9601
|
+
return _extends$D({}, state, {
|
|
9602
9602
|
toasts: state.toasts.map(function (t) {
|
|
9603
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
9603
|
+
return t.id === toastId || toastId === undefined ? _extends$D({}, t, {
|
|
9604
9604
|
visible: false
|
|
9605
9605
|
}) : t;
|
|
9606
9606
|
})
|
|
@@ -9608,28 +9608,28 @@ var reducer = function reducer(state, action) {
|
|
|
9608
9608
|
|
|
9609
9609
|
case ActionType.REMOVE_TOAST:
|
|
9610
9610
|
if (action.toastId === undefined) {
|
|
9611
|
-
return _extends$
|
|
9611
|
+
return _extends$D({}, state, {
|
|
9612
9612
|
toasts: []
|
|
9613
9613
|
});
|
|
9614
9614
|
}
|
|
9615
9615
|
|
|
9616
|
-
return _extends$
|
|
9616
|
+
return _extends$D({}, state, {
|
|
9617
9617
|
toasts: state.toasts.filter(function (t) {
|
|
9618
9618
|
return t.id !== action.toastId;
|
|
9619
9619
|
})
|
|
9620
9620
|
});
|
|
9621
9621
|
|
|
9622
9622
|
case ActionType.START_PAUSE:
|
|
9623
|
-
return _extends$
|
|
9623
|
+
return _extends$D({}, state, {
|
|
9624
9624
|
pausedAt: action.time
|
|
9625
9625
|
});
|
|
9626
9626
|
|
|
9627
9627
|
case ActionType.END_PAUSE:
|
|
9628
9628
|
var diff = action.time - (state.pausedAt || 0);
|
|
9629
|
-
return _extends$
|
|
9629
|
+
return _extends$D({}, state, {
|
|
9630
9630
|
pausedAt: undefined,
|
|
9631
9631
|
toasts: state.toasts.map(function (t) {
|
|
9632
|
-
return _extends$
|
|
9632
|
+
return _extends$D({}, t, {
|
|
9633
9633
|
pauseDuration: t.pauseDuration + diff
|
|
9634
9634
|
});
|
|
9635
9635
|
})
|
|
@@ -9676,12 +9676,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
9676
9676
|
var mergedToasts = state.toasts.map(function (t) {
|
|
9677
9677
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
9678
9678
|
|
|
9679
|
-
return _extends$
|
|
9679
|
+
return _extends$D({}, toastOptions, toastOptions[t.type], t, {
|
|
9680
9680
|
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],
|
|
9681
|
-
style: _extends$
|
|
9681
|
+
style: _extends$D({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
9682
9682
|
});
|
|
9683
9683
|
});
|
|
9684
|
-
return _extends$
|
|
9684
|
+
return _extends$D({}, state, {
|
|
9685
9685
|
toasts: mergedToasts
|
|
9686
9686
|
});
|
|
9687
9687
|
};
|
|
@@ -9691,7 +9691,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
9691
9691
|
type = 'blank';
|
|
9692
9692
|
}
|
|
9693
9693
|
|
|
9694
|
-
return _extends$
|
|
9694
|
+
return _extends$D({
|
|
9695
9695
|
createdAt: Date.now(),
|
|
9696
9696
|
visible: true,
|
|
9697
9697
|
type: type,
|
|
@@ -9741,14 +9741,14 @@ toast.remove = function (toastId) {
|
|
|
9741
9741
|
};
|
|
9742
9742
|
|
|
9743
9743
|
toast.promise = function (promise, msgs, opts) {
|
|
9744
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
9744
|
+
var id = toast.loading(msgs.loading, _extends$D({}, opts, opts == null ? void 0 : opts.loading));
|
|
9745
9745
|
promise.then(function (p) {
|
|
9746
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
9746
|
+
toast.success(resolveValue(msgs.success, p), _extends$D({
|
|
9747
9747
|
id: id
|
|
9748
9748
|
}, opts, opts == null ? void 0 : opts.success));
|
|
9749
9749
|
return p;
|
|
9750
9750
|
})["catch"](function (e) {
|
|
9751
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
9751
|
+
toast.error(resolveValue(msgs.error, e), _extends$D({
|
|
9752
9752
|
id: id
|
|
9753
9753
|
}, opts, opts == null ? void 0 : opts.error));
|
|
9754
9754
|
});
|
|
@@ -10087,7 +10087,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
10087
10087
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
10088
10088
|
return React.createElement(ToastBarBase, {
|
|
10089
10089
|
className: toast.className,
|
|
10090
|
-
style: _extends$
|
|
10090
|
+
style: _extends$D({}, animationStyle, style, toast.style)
|
|
10091
10091
|
}, typeof children === 'function' ? children({
|
|
10092
10092
|
icon: icon,
|
|
10093
10093
|
message: message
|
|
@@ -10117,7 +10117,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
10117
10117
|
} : position.includes('right') ? {
|
|
10118
10118
|
justifyContent: 'flex-end'
|
|
10119
10119
|
} : {};
|
|
10120
|
-
return _extends$
|
|
10120
|
+
return _extends$D({
|
|
10121
10121
|
left: 0,
|
|
10122
10122
|
right: 0,
|
|
10123
10123
|
display: 'flex',
|
|
@@ -10144,7 +10144,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
10144
10144
|
handlers = _useToaster.handlers;
|
|
10145
10145
|
|
|
10146
10146
|
return React.createElement("div", {
|
|
10147
|
-
style: _extends$
|
|
10147
|
+
style: _extends$D({
|
|
10148
10148
|
position: 'fixed',
|
|
10149
10149
|
zIndex: 9999,
|
|
10150
10150
|
top: DEFAULT_OFFSET,
|
|
@@ -10179,82 +10179,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
10179
10179
|
}));
|
|
10180
10180
|
};
|
|
10181
10181
|
|
|
10182
|
-
var _path$
|
|
10182
|
+
var _path$z;
|
|
10183
10183
|
|
|
10184
|
-
function _extends$
|
|
10184
|
+
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); }
|
|
10185
10185
|
|
|
10186
10186
|
function SvgCheckSolid(props) {
|
|
10187
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10187
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
10188
10188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10189
10189
|
className: "h-5 w-5",
|
|
10190
10190
|
viewBox: "0 0 20 20",
|
|
10191
10191
|
fill: "currentColor"
|
|
10192
|
-
}, props), _path$
|
|
10192
|
+
}, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10193
10193
|
fillRule: "evenodd",
|
|
10194
10194
|
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",
|
|
10195
10195
|
clipRule: "evenodd"
|
|
10196
10196
|
})));
|
|
10197
10197
|
}
|
|
10198
10198
|
|
|
10199
|
-
var _path$
|
|
10199
|
+
var _path$y;
|
|
10200
10200
|
|
|
10201
|
-
function _extends$
|
|
10201
|
+
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); }
|
|
10202
10202
|
|
|
10203
10203
|
function SvgXIcon(props) {
|
|
10204
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10204
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
10205
10205
|
width: 24,
|
|
10206
10206
|
height: 24,
|
|
10207
10207
|
fill: "none",
|
|
10208
10208
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10209
|
-
}, props), _path$
|
|
10209
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10210
10210
|
clipRule: "evenodd",
|
|
10211
10211
|
d: "M4.227 4.227a.774.774 0 011.095 0L12 10.905l6.678-6.678a.774.774 0 111.095 1.095L13.095 12l6.678 6.678a.774.774 0 11-1.095 1.095L12 13.095l-6.678 6.678a.774.774 0 11-1.095-1.095L10.905 12 4.227 5.322a.774.774 0 010-1.095z"
|
|
10212
10212
|
})));
|
|
10213
10213
|
}
|
|
10214
10214
|
|
|
10215
|
-
var _path$
|
|
10215
|
+
var _path$x;
|
|
10216
10216
|
|
|
10217
|
-
function _extends$
|
|
10217
|
+
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); }
|
|
10218
10218
|
|
|
10219
10219
|
function SvgXIconSolid(props) {
|
|
10220
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10220
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
10221
10221
|
className: "plc-w-4 plc-h-4",
|
|
10222
10222
|
fill: "currentColor",
|
|
10223
10223
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10224
10224
|
viewBox: "0 0 100 100"
|
|
10225
|
-
}, props), _path$
|
|
10225
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10226
10226
|
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"
|
|
10227
10227
|
})));
|
|
10228
10228
|
}
|
|
10229
10229
|
|
|
10230
|
-
var _path$
|
|
10230
|
+
var _path$w;
|
|
10231
10231
|
|
|
10232
|
-
function _extends$
|
|
10232
|
+
function _extends$z() { _extends$z = 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$z.apply(this, arguments); }
|
|
10233
10233
|
|
|
10234
10234
|
function SvgExclamation(props) {
|
|
10235
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10235
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
10236
10236
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
10237
10237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10238
10238
|
viewBox: "0 0 20 20",
|
|
10239
10239
|
fill: "currentColor"
|
|
10240
|
-
}, props), _path$
|
|
10240
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10241
10241
|
fillRule: "evenodd",
|
|
10242
10242
|
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",
|
|
10243
10243
|
clipRule: "evenodd"
|
|
10244
10244
|
})));
|
|
10245
10245
|
}
|
|
10246
10246
|
|
|
10247
|
-
var _path$
|
|
10247
|
+
var _path$v, _path2$3;
|
|
10248
10248
|
|
|
10249
|
-
function _extends$
|
|
10249
|
+
function _extends$y() { _extends$y = 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$y.apply(this, arguments); }
|
|
10250
10250
|
|
|
10251
10251
|
function SvgSpinner(props) {
|
|
10252
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10252
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
10253
10253
|
className: "plc-animate-spin",
|
|
10254
10254
|
viewBox: "0 0 24 24",
|
|
10255
10255
|
fill: "currentColor",
|
|
10256
10256
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10257
|
-
}, props), _path$
|
|
10257
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10258
10258
|
opacity: 0.2,
|
|
10259
10259
|
fill: "evenodd",
|
|
10260
10260
|
clipRule: "evenodd",
|
|
@@ -10458,7 +10458,7 @@ const init$1 = () => {
|
|
|
10458
10458
|
addToCart,
|
|
10459
10459
|
purchaseItem,
|
|
10460
10460
|
setSubscriptionToManageMembers
|
|
10461
|
-
} = usePelcro
|
|
10461
|
+
} = usePelcro.getStore();
|
|
10462
10462
|
const pelcroDashboardButtonsByClass = document.getElementsByClassName("pelcro-dashboard-button");
|
|
10463
10463
|
|
|
10464
10464
|
if (pelcroDashboardButtonsByClass.length !== 0) {
|
|
@@ -10761,7 +10761,7 @@ const init = () => {
|
|
|
10761
10761
|
const {
|
|
10762
10762
|
switchView,
|
|
10763
10763
|
set
|
|
10764
|
-
} = usePelcro
|
|
10764
|
+
} = usePelcro.getStore();
|
|
10765
10765
|
const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
|
|
10766
10766
|
|
|
10767
10767
|
if (entitlementsProtectedElements.length === 0) {
|
|
@@ -10852,7 +10852,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
|
|
|
10852
10852
|
document.addEventListener("PelcroSubscriptionCreate", event => {
|
|
10853
10853
|
const {
|
|
10854
10854
|
isGift
|
|
10855
|
-
} = usePelcro
|
|
10855
|
+
} = usePelcro.getStore();
|
|
10856
10856
|
if (isGift) return;
|
|
10857
10857
|
const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
|
|
10858
10858
|
const shouldUnblurContent = entitlements.some(ent => {
|
|
@@ -11190,7 +11190,7 @@ const initPaywalls = () => {
|
|
|
11190
11190
|
|
|
11191
11191
|
const {
|
|
11192
11192
|
switchView
|
|
11193
|
-
} = usePelcro
|
|
11193
|
+
} = usePelcro.getStore();
|
|
11194
11194
|
|
|
11195
11195
|
if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
|
|
11196
11196
|
/*
|
|
@@ -11212,7 +11212,7 @@ const loadPaymentSDKs = () => {
|
|
|
11212
11212
|
// Lazy load stripe's SDK
|
|
11213
11213
|
const {
|
|
11214
11214
|
whenUserReady
|
|
11215
|
-
} = usePelcro
|
|
11215
|
+
} = usePelcro.getStore();
|
|
11216
11216
|
whenUserReady(() => {
|
|
11217
11217
|
if (!window.Stripe) {
|
|
11218
11218
|
pure_1(window.Pelcro.environment.stripe);
|
|
@@ -11260,7 +11260,7 @@ const loadAuth0SDK = () => {
|
|
|
11260
11260
|
const initSecuritySdk = () => {
|
|
11261
11261
|
const {
|
|
11262
11262
|
whenSiteReady
|
|
11263
|
-
} = usePelcro
|
|
11263
|
+
} = usePelcro.getStore();
|
|
11264
11264
|
whenSiteReady(() => {
|
|
11265
11265
|
var _window$Pelcro$site$r2;
|
|
11266
11266
|
|
|
@@ -11296,7 +11296,7 @@ const dispatchModalDisplayEvents = modalName => {
|
|
|
11296
11296
|
const {
|
|
11297
11297
|
whenSiteReady,
|
|
11298
11298
|
whenEcommerceLoaded
|
|
11299
|
-
} = usePelcro
|
|
11299
|
+
} = usePelcro.getStore();
|
|
11300
11300
|
const renderShopView = shopComponent => {
|
|
11301
11301
|
whenEcommerceLoaded(() => {
|
|
11302
11302
|
const shopElement = document.getElementById("pelcro-shop");
|
|
@@ -11378,7 +11378,7 @@ const initViewFromURL = () => {
|
|
|
11378
11378
|
const {
|
|
11379
11379
|
switchView,
|
|
11380
11380
|
whenSiteReady
|
|
11381
|
-
} = usePelcro
|
|
11381
|
+
} = usePelcro.getStore();
|
|
11382
11382
|
|
|
11383
11383
|
if (isValidViewFromURL(view)) {
|
|
11384
11384
|
whenSiteReady(() => {
|
|
@@ -11436,7 +11436,7 @@ const initSubscriptionFromURL = () => {
|
|
|
11436
11436
|
switchView,
|
|
11437
11437
|
whenSiteReady,
|
|
11438
11438
|
set
|
|
11439
|
-
} = usePelcro
|
|
11439
|
+
} = usePelcro.getStore();
|
|
11440
11440
|
whenSiteReady(() => {
|
|
11441
11441
|
var _selectedProduct$plan;
|
|
11442
11442
|
|
|
@@ -11460,7 +11460,7 @@ const initSubscriptionFromURL = () => {
|
|
|
11460
11460
|
isAuthenticated,
|
|
11461
11461
|
switchToAddressView,
|
|
11462
11462
|
switchToPaymentView
|
|
11463
|
-
} = usePelcro
|
|
11463
|
+
} = usePelcro.getStore();
|
|
11464
11464
|
|
|
11465
11465
|
if (!isAuthenticated()) {
|
|
11466
11466
|
return switchView("register");
|
|
@@ -11492,7 +11492,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
|
|
|
11492
11492
|
switchToPaymentView,
|
|
11493
11493
|
switchToAddressView,
|
|
11494
11494
|
set
|
|
11495
|
-
} = usePelcro
|
|
11495
|
+
} = usePelcro.getStore();
|
|
11496
11496
|
whenSiteReady(() => {
|
|
11497
11497
|
window.Pelcro.plan.getPlan({
|
|
11498
11498
|
plan_id: offlinePlanId
|
|
@@ -11539,7 +11539,7 @@ const initPurchaseFromUrl = () => {
|
|
|
11539
11539
|
const {
|
|
11540
11540
|
whenEcommerceLoaded,
|
|
11541
11541
|
purchaseItem
|
|
11542
|
-
} = usePelcro
|
|
11542
|
+
} = usePelcro.getStore();
|
|
11543
11543
|
whenEcommerceLoaded(() => {
|
|
11544
11544
|
const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
|
|
11545
11545
|
purchaseItem(skuId);
|
|
@@ -11555,7 +11555,7 @@ const initCartFromUrl = () => {
|
|
|
11555
11555
|
whenEcommerceLoaded,
|
|
11556
11556
|
addToCart,
|
|
11557
11557
|
switchView
|
|
11558
|
-
} = usePelcro
|
|
11558
|
+
} = usePelcro.getStore();
|
|
11559
11559
|
whenEcommerceLoaded(() => {
|
|
11560
11560
|
const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
|
|
11561
11561
|
const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
|
|
@@ -11576,7 +11576,7 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
11576
11576
|
|
|
11577
11577
|
const {
|
|
11578
11578
|
whenSiteReady
|
|
11579
|
-
} = usePelcro
|
|
11579
|
+
} = usePelcro.getStore();
|
|
11580
11580
|
const translations = i18next.t("verifyEmail:messages", {
|
|
11581
11581
|
returnObjects: true
|
|
11582
11582
|
});
|
|
@@ -11605,7 +11605,7 @@ const verifyLinkTokenFromUrl = () => {
|
|
|
11605
11605
|
whenSiteReady,
|
|
11606
11606
|
resetView,
|
|
11607
11607
|
isAuthenticated
|
|
11608
|
-
} = usePelcro
|
|
11608
|
+
} = usePelcro.getStore();
|
|
11609
11609
|
const translations = i18next.t("verifyLinkToken:messages", {
|
|
11610
11610
|
returnObjects: true
|
|
11611
11611
|
});
|
|
@@ -11644,12 +11644,12 @@ const showPasswordlessRequestFromUrl = () => {
|
|
|
11644
11644
|
|
|
11645
11645
|
const {
|
|
11646
11646
|
isAuthenticated
|
|
11647
|
-
} = usePelcro
|
|
11647
|
+
} = usePelcro.getStore();
|
|
11648
11648
|
const passwordlessEnabled = (_window$Pelcro$site$r8 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r8 === void 0 ? void 0 : _window$Pelcro$site$r8.passwordless_enabled;
|
|
11649
11649
|
if (!passwordlessEnabled || isAuthenticated()) return;
|
|
11650
11650
|
const {
|
|
11651
11651
|
switchView
|
|
11652
|
-
} = usePelcro
|
|
11652
|
+
} = usePelcro.getStore();
|
|
11653
11653
|
return switchView("passwordless-request");
|
|
11654
11654
|
};
|
|
11655
11655
|
|
|
@@ -11659,7 +11659,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
11659
11659
|
setInvoice,
|
|
11660
11660
|
whenSiteReady,
|
|
11661
11661
|
switchView
|
|
11662
|
-
} = usePelcro
|
|
11662
|
+
} = usePelcro.getStore();
|
|
11663
11663
|
whenSiteReady(() => {
|
|
11664
11664
|
if (!isAuthenticated()) {
|
|
11665
11665
|
return switchView("login");
|
|
@@ -11677,7 +11677,7 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
11677
11677
|
|
|
11678
11678
|
const {
|
|
11679
11679
|
invoice
|
|
11680
|
-
} = usePelcro
|
|
11680
|
+
} = usePelcro.getStore();
|
|
11681
11681
|
|
|
11682
11682
|
if (invoice.total === 0) {
|
|
11683
11683
|
const errorMessage = i18next.t("messages:zeroTotalInvoice", {
|
|
@@ -11697,7 +11697,7 @@ const showSubscriptionManageMembersFromUrl = () => {
|
|
|
11697
11697
|
whenUserReady,
|
|
11698
11698
|
whenSiteReady,
|
|
11699
11699
|
switchView
|
|
11700
|
-
} = usePelcro
|
|
11700
|
+
} = usePelcro.getStore();
|
|
11701
11701
|
whenSiteReady(() => {
|
|
11702
11702
|
if (!isAuthenticated()) {
|
|
11703
11703
|
return switchView("login");
|
|
@@ -11737,7 +11737,7 @@ const PelcroModalController = ({
|
|
|
11737
11737
|
view,
|
|
11738
11738
|
isAuthenticated,
|
|
11739
11739
|
whenSiteReady
|
|
11740
|
-
} = usePelcro
|
|
11740
|
+
} = usePelcro();
|
|
11741
11741
|
React__default['default'].useEffect(() => {
|
|
11742
11742
|
init$1();
|
|
11743
11743
|
renderShopView(React__default['default'].Children.map(children, child => child).find(({
|
|
@@ -11989,6 +11989,9 @@ const SET_PASSWORD = "SET_PASSWORD";
|
|
|
11989
11989
|
const SET_EMAIL_ERROR = "SET_EMAIL_ERROR";
|
|
11990
11990
|
const SET_USERNAME_ERROR = "SET_USERNAME_ERROR";
|
|
11991
11991
|
const SET_PASSWORD_ERROR = "SET_PASSWORD_ERROR";
|
|
11992
|
+
const SET_FIRST_NAME_ERROR = "SET_FIRST_NAME_ERROR";
|
|
11993
|
+
const SET_LAST_NAME_ERROR = "SET_LAST_NAME_ERROR";
|
|
11994
|
+
const SET_PHONE_ERROR = "SET_PHONE_ERROR";
|
|
11992
11995
|
const SET_TEXT_FIELD = "SET_TEXT_FIELD";
|
|
11993
11996
|
const SET_TOKEN = "SET_TOKEN";
|
|
11994
11997
|
const SET_GIFT_CODE = "SET_GIFT_CODE";
|
|
@@ -12577,16 +12580,16 @@ const LoginButton = ({
|
|
|
12577
12580
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.login"));
|
|
12578
12581
|
};
|
|
12579
12582
|
|
|
12580
|
-
var _path$
|
|
12583
|
+
var _path$u, _path2$2;
|
|
12581
12584
|
|
|
12582
|
-
function _extends$
|
|
12585
|
+
function _extends$x() { _extends$x = 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$x.apply(this, arguments); }
|
|
12583
12586
|
|
|
12584
12587
|
function SvgEmailVerify(props) {
|
|
12585
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12588
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
12586
12589
|
className: "plc-w-6 plc-h-6",
|
|
12587
12590
|
viewBox: "0 0 700 700",
|
|
12588
12591
|
xmlns: "http://www.w3.org/2000/svg"
|
|
12589
|
-
}, props), _path$
|
|
12592
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12590
12593
|
d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
|
|
12591
12594
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12592
12595
|
d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
|
|
@@ -12627,16 +12630,16 @@ const LoginPassword = props => /*#__PURE__*/React__default['default'].createElem
|
|
|
12627
12630
|
store: store$m
|
|
12628
12631
|
}, props));
|
|
12629
12632
|
|
|
12630
|
-
var _path$
|
|
12633
|
+
var _path$t;
|
|
12631
12634
|
|
|
12632
|
-
function _extends$
|
|
12635
|
+
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); }
|
|
12633
12636
|
|
|
12634
12637
|
function SvgCheck(props) {
|
|
12635
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12638
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
12636
12639
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12637
12640
|
fill: "currentColor",
|
|
12638
12641
|
viewBox: "0 0 20 20"
|
|
12639
|
-
}, props), _path$
|
|
12642
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12640
12643
|
fillRule: "evenodd",
|
|
12641
12644
|
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",
|
|
12642
12645
|
clipRule: "evenodd"
|
|
@@ -12972,15 +12975,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
12972
12975
|
return hasSecuritySdkLoaded;
|
|
12973
12976
|
}
|
|
12974
12977
|
|
|
12975
|
-
var _path$
|
|
12978
|
+
var _path$s;
|
|
12976
12979
|
|
|
12977
|
-
function _extends$
|
|
12980
|
+
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); }
|
|
12978
12981
|
|
|
12979
12982
|
function SvgFacebookLogo(props) {
|
|
12980
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
12983
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
12981
12984
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12982
12985
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
12983
|
-
}, props), _path$
|
|
12986
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
12984
12987
|
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",
|
|
12985
12988
|
fill: "#3c5a9a"
|
|
12986
12989
|
})));
|
|
@@ -13054,15 +13057,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
13054
13057
|
unwrapExports(googleLogin);
|
|
13055
13058
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
13056
13059
|
|
|
13057
|
-
var _path$
|
|
13060
|
+
var _path$r, _path2$1, _path3, _path4;
|
|
13058
13061
|
|
|
13059
|
-
function _extends$
|
|
13062
|
+
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); }
|
|
13060
13063
|
|
|
13061
13064
|
function SvgGoogleLogo(props) {
|
|
13062
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13065
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
13063
13066
|
viewBox: "0 0 24 24",
|
|
13064
13067
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13065
|
-
}, props), _path$
|
|
13068
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13066
13069
|
fill: "#4285F4",
|
|
13067
13070
|
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"
|
|
13068
13071
|
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -13225,15 +13228,15 @@ const GoogleLoginButton = ({
|
|
|
13225
13228
|
}) : null;
|
|
13226
13229
|
};
|
|
13227
13230
|
|
|
13228
|
-
var _path$
|
|
13231
|
+
var _path$q;
|
|
13229
13232
|
|
|
13230
|
-
function _extends$
|
|
13233
|
+
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); }
|
|
13231
13234
|
|
|
13232
13235
|
function SvgAuth0Logo(props) {
|
|
13233
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13236
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
13234
13237
|
viewBox: "0 0 256 285",
|
|
13235
13238
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13236
|
-
}, props), _path$
|
|
13239
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13237
13240
|
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"
|
|
13238
13241
|
})));
|
|
13239
13242
|
}
|
|
@@ -13444,10 +13447,10 @@ function LoginView(props) {
|
|
|
13444
13447
|
}))));
|
|
13445
13448
|
}
|
|
13446
13449
|
|
|
13447
|
-
function _extends$
|
|
13450
|
+
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); }
|
|
13448
13451
|
|
|
13449
13452
|
function SvgPelcroAuthorship(props) {
|
|
13450
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13453
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
13451
13454
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13452
13455
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
13453
13456
|
width: 75.306,
|
|
@@ -13518,7 +13521,7 @@ const ModalHeader = ({
|
|
|
13518
13521
|
}) => {
|
|
13519
13522
|
var _window$Pelcro, _window$Pelcro$site$r;
|
|
13520
13523
|
|
|
13521
|
-
const resetView = usePelcro
|
|
13524
|
+
const resetView = usePelcro(state => state.resetView);
|
|
13522
13525
|
React.useEffect(() => {
|
|
13523
13526
|
onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
|
|
13524
13527
|
dispatchModalDisplayEvents(id);
|
|
@@ -13582,7 +13585,7 @@ function LoginModal({
|
|
|
13582
13585
|
order,
|
|
13583
13586
|
switchToAddressView,
|
|
13584
13587
|
switchToPaymentView
|
|
13585
|
-
} = usePelcro
|
|
13588
|
+
} = usePelcro();
|
|
13586
13589
|
|
|
13587
13590
|
const onSuccess = res => {
|
|
13588
13591
|
var _props$onSuccess;
|
|
@@ -13858,7 +13861,7 @@ function RegisterView(props) {
|
|
|
13858
13861
|
const {
|
|
13859
13862
|
t
|
|
13860
13863
|
} = useTranslation("register");
|
|
13861
|
-
usePelcro
|
|
13864
|
+
usePelcro();
|
|
13862
13865
|
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);
|
|
13863
13866
|
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;
|
|
13864
13867
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -14006,7 +14009,7 @@ function RegisterModal(props) {
|
|
|
14006
14009
|
order,
|
|
14007
14010
|
giftCode,
|
|
14008
14011
|
isGift
|
|
14009
|
-
} = usePelcro
|
|
14012
|
+
} = usePelcro();
|
|
14010
14013
|
|
|
14011
14014
|
const onSuccess = res => {
|
|
14012
14015
|
var _props$onSuccess;
|
|
@@ -18762,34 +18765,34 @@ exports["default"] = _default;
|
|
|
18762
18765
|
|
|
18763
18766
|
var Slider = unwrapExports(lib$1);
|
|
18764
18767
|
|
|
18765
|
-
var _path$
|
|
18768
|
+
var _path$p;
|
|
18766
18769
|
|
|
18767
|
-
function _extends$
|
|
18770
|
+
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); }
|
|
18768
18771
|
|
|
18769
18772
|
function SvgArrowThinRight(props) {
|
|
18770
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
18773
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
18771
18774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18772
18775
|
viewBox: "0 0 14.121 25.414",
|
|
18773
18776
|
fill: "none",
|
|
18774
18777
|
stroke: "#fff"
|
|
18775
|
-
}, props), _path$
|
|
18778
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18776
18779
|
"data-name": "Path 25368",
|
|
18777
18780
|
d: "M.707.705l12 12-12 12",
|
|
18778
18781
|
strokeWidth: 2
|
|
18779
18782
|
})));
|
|
18780
18783
|
}
|
|
18781
18784
|
|
|
18782
|
-
var _path$
|
|
18785
|
+
var _path$o;
|
|
18783
18786
|
|
|
18784
|
-
function _extends$
|
|
18787
|
+
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); }
|
|
18785
18788
|
|
|
18786
18789
|
function SvgArrowThinLeft(props) {
|
|
18787
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
18790
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
18788
18791
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18789
18792
|
viewBox: "0 0 14.121 25.414",
|
|
18790
18793
|
fill: "none",
|
|
18791
18794
|
stroke: "#fff"
|
|
18792
|
-
}, props), _path$
|
|
18795
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18793
18796
|
"data-name": "Path 25368",
|
|
18794
18797
|
d: "M13.414.705l-12 12 12 12",
|
|
18795
18798
|
strokeWidth: 2
|
|
@@ -18861,17 +18864,17 @@ function Carousel({
|
|
|
18861
18864
|
}, settings), children));
|
|
18862
18865
|
}
|
|
18863
18866
|
|
|
18864
|
-
var _path$
|
|
18867
|
+
var _path$n;
|
|
18865
18868
|
|
|
18866
|
-
function _extends$
|
|
18869
|
+
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); }
|
|
18867
18870
|
|
|
18868
18871
|
function SvgArrowLeft(props) {
|
|
18869
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
18872
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
18870
18873
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18871
18874
|
fill: "none",
|
|
18872
18875
|
viewBox: "0 0 24 24",
|
|
18873
18876
|
stroke: "currentColor"
|
|
18874
|
-
}, props), _path$
|
|
18877
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18875
18878
|
strokeLinecap: "round",
|
|
18876
18879
|
strokeLinejoin: "round",
|
|
18877
18880
|
strokeWidth: 2,
|
|
@@ -18898,7 +18901,7 @@ function SelectModalWithHook(props) {
|
|
|
18898
18901
|
resetView,
|
|
18899
18902
|
view,
|
|
18900
18903
|
set
|
|
18901
|
-
} = usePelcro
|
|
18904
|
+
} = usePelcro();
|
|
18902
18905
|
const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
|
|
18903
18906
|
const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
|
|
18904
18907
|
return /*#__PURE__*/React__default['default'].createElement(SelectModalWithTrans, {
|
|
@@ -19235,7 +19238,7 @@ class SelectModal extends React.Component {
|
|
|
19235
19238
|
const {
|
|
19236
19239
|
switchToAddressView,
|
|
19237
19240
|
switchToPaymentView
|
|
19238
|
-
} = usePelcro
|
|
19241
|
+
} = usePelcro.getStore();
|
|
19239
19242
|
|
|
19240
19243
|
if (!isAuthenticated) {
|
|
19241
19244
|
return setView("register");
|
|
@@ -21426,6 +21429,12 @@ const initialState$k = {
|
|
|
21426
21429
|
updatedPrice: null,
|
|
21427
21430
|
taxAmount: null,
|
|
21428
21431
|
currentPlan: null,
|
|
21432
|
+
firstName: "",
|
|
21433
|
+
lastName: "",
|
|
21434
|
+
phone: "",
|
|
21435
|
+
firstNameError: null,
|
|
21436
|
+
lastNameError: null,
|
|
21437
|
+
phoneError: null,
|
|
21429
21438
|
alert: {
|
|
21430
21439
|
type: "error",
|
|
21431
21440
|
content: ""
|
|
@@ -21452,13 +21461,16 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21452
21461
|
const {
|
|
21453
21462
|
t
|
|
21454
21463
|
} = useTranslation("payment");
|
|
21455
|
-
const pelcroStore = usePelcro
|
|
21464
|
+
const pelcroStore = usePelcro();
|
|
21456
21465
|
const {
|
|
21457
21466
|
set,
|
|
21458
21467
|
order,
|
|
21459
21468
|
selectedPaymentMethodId,
|
|
21460
21469
|
couponCode
|
|
21461
|
-
} = usePelcro
|
|
21470
|
+
} = usePelcro();
|
|
21471
|
+
const {
|
|
21472
|
+
whenUserReady
|
|
21473
|
+
} = usePelcro.getStore();
|
|
21462
21474
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
21463
21475
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
21464
21476
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -21468,6 +21480,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21468
21480
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
21469
21481
|
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
21470
21482
|
const skipPayment = (_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.skipPaymentForFreePlans;
|
|
21483
|
+
const cardProcessor = getSiteCardProcessor();
|
|
21471
21484
|
React.useEffect(() => {
|
|
21472
21485
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
21473
21486
|
dispatch({
|
|
@@ -21489,7 +21502,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21489
21502
|
/*====== Start Tap integration ========*/
|
|
21490
21503
|
|
|
21491
21504
|
const submitUsingTap = () => {
|
|
21492
|
-
var _ref, _ref2, _state$updatedPrice;
|
|
21505
|
+
var _ref, _ref2, _ref3, _state$updatedPrice;
|
|
21493
21506
|
|
|
21494
21507
|
const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
|
|
21495
21508
|
|
|
@@ -21522,7 +21535,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21522
21535
|
}, 0);
|
|
21523
21536
|
};
|
|
21524
21537
|
|
|
21525
|
-
const totalAmount = (_ref = (_ref2 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null &&
|
|
21538
|
+
const totalAmount = (_ref = (_ref2 = (_ref3 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref3 !== void 0 ? _ref3 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref2 !== void 0 ? _ref2 : getOrderItemsTotal()) !== null && _ref !== void 0 ? _ref : 10;
|
|
21526
21539
|
tapInstanceRef.current.createToken(tapInstanceCard.current).then(function (result) {
|
|
21527
21540
|
if (result.error) {
|
|
21528
21541
|
// Inform the user if there was an error
|
|
@@ -21543,9 +21556,11 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21543
21556
|
}
|
|
21544
21557
|
});
|
|
21545
21558
|
} else {
|
|
21546
|
-
console.log("Tap API Call result", result);
|
|
21547
21559
|
window.Pelcro.payment.authorize({
|
|
21548
21560
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
21561
|
+
first_name: window.Pelcro.user.read().first_name || state.firstName,
|
|
21562
|
+
last_name: window.Pelcro.user.read().last_name || state.lastName,
|
|
21563
|
+
phone: window.Pelcro.user.read().phone || state.phone,
|
|
21549
21564
|
site_id: window.Pelcro.siteid,
|
|
21550
21565
|
amount: totalAmount,
|
|
21551
21566
|
currency: (plan === null || plan === void 0 ? void 0 : plan.currency) || (invoice === null || invoice === void 0 ? void 0 : invoice.currency) || window.Pelcro.site.read().default_currency,
|
|
@@ -21582,6 +21597,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21582
21597
|
if (data.message === "3DS-authentication-complete") {
|
|
21583
21598
|
const tapID = data.tapID;
|
|
21584
21599
|
toggleAuthenticationPendingView(false);
|
|
21600
|
+
toggleAuthenticationSuccessPendingView(true);
|
|
21585
21601
|
window.removeEventListener("message", retrieveSourceInfoFromIframe);
|
|
21586
21602
|
dispatch({
|
|
21587
21603
|
type: SHOW_ALERT,
|
|
@@ -21606,21 +21622,6 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21606
21622
|
};
|
|
21607
21623
|
|
|
21608
21624
|
function handleTapPayment(paymentRequest) {
|
|
21609
|
-
// if (paymentRequest) {
|
|
21610
|
-
// const SUCCESS_STATUS = "870";
|
|
21611
|
-
// if (paymentRequest.response !== SUCCESS_STATUS) {
|
|
21612
|
-
// switch (paymentRequest.response) {
|
|
21613
|
-
// case "871":
|
|
21614
|
-
// return handlePaymentError({
|
|
21615
|
-
// error: new Error("Invalid account number")
|
|
21616
|
-
// });
|
|
21617
|
-
// default:
|
|
21618
|
-
// return handlePaymentError({
|
|
21619
|
-
// error: new Error(paymentRequest.message)
|
|
21620
|
-
// });
|
|
21621
|
-
// }
|
|
21622
|
-
// }
|
|
21623
|
-
// }
|
|
21624
21625
|
const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
|
|
21625
21626
|
|
|
21626
21627
|
if (type === "createPayment") {
|
|
@@ -21753,6 +21754,52 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21753
21754
|
}
|
|
21754
21755
|
}
|
|
21755
21756
|
}
|
|
21757
|
+
|
|
21758
|
+
const initTapScript = () => {
|
|
21759
|
+
var _window$Pelcro$site$r;
|
|
21760
|
+
|
|
21761
|
+
const tapKey = window.Tapjsli((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings.publishable_key);
|
|
21762
|
+
let elements = tapKey.elements({});
|
|
21763
|
+
let style = {
|
|
21764
|
+
base: {
|
|
21765
|
+
color: "#535353",
|
|
21766
|
+
lineHeight: "18px",
|
|
21767
|
+
fontFamily: "sans-serif",
|
|
21768
|
+
fontSmoothing: "antialiased",
|
|
21769
|
+
fontSize: "16px",
|
|
21770
|
+
"::placeholder": {
|
|
21771
|
+
color: "rgba(0, 0, 0, 0.26)",
|
|
21772
|
+
fontSize: "15px"
|
|
21773
|
+
}
|
|
21774
|
+
},
|
|
21775
|
+
invalid: {
|
|
21776
|
+
color: "red"
|
|
21777
|
+
}
|
|
21778
|
+
}; // input labels/placeholders
|
|
21779
|
+
|
|
21780
|
+
let labels = {
|
|
21781
|
+
cardNumber: "Card Number",
|
|
21782
|
+
expirationDate: "MM/YY",
|
|
21783
|
+
cvv: "CVV",
|
|
21784
|
+
cardHolder: "Card Holder Name"
|
|
21785
|
+
}; //payment options
|
|
21786
|
+
|
|
21787
|
+
let paymentOptions = {
|
|
21788
|
+
labels: labels,
|
|
21789
|
+
TextDirection: "ltr"
|
|
21790
|
+
}; //create element, pass style and payment options
|
|
21791
|
+
|
|
21792
|
+
let card = elements.create("card", {
|
|
21793
|
+
style: style
|
|
21794
|
+
}, paymentOptions); //mount element
|
|
21795
|
+
|
|
21796
|
+
card.mount("#tapPaymentIframe"); //card change event listener
|
|
21797
|
+
|
|
21798
|
+
card.addEventListener("change", function (event) {//If needed
|
|
21799
|
+
});
|
|
21800
|
+
tapInstanceRef.current = tapKey;
|
|
21801
|
+
tapInstanceCard.current = card;
|
|
21802
|
+
};
|
|
21756
21803
|
/*====== End Tap integration ========*/
|
|
21757
21804
|
|
|
21758
21805
|
|
|
@@ -21935,13 +21982,11 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21935
21982
|
const tapInstanceRef = React__default['default'].useRef(null);
|
|
21936
21983
|
const tapInstanceCard = React__default['default'].useRef(null);
|
|
21937
21984
|
React.useEffect(() => {
|
|
21938
|
-
const cardProcessor = getSiteCardProcessor();
|
|
21939
|
-
|
|
21940
21985
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
21941
|
-
var _window$Pelcro$site$
|
|
21986
|
+
var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
21942
21987
|
|
|
21943
|
-
const payPageId = (_window$Pelcro$site$
|
|
21944
|
-
const reportGroup = (_window$Pelcro$site$
|
|
21988
|
+
const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
|
|
21989
|
+
const reportGroup = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.vantiv_gateway_settings.report_group;
|
|
21945
21990
|
vantivInstanceRef.current = new window.EprotectIframeClient({
|
|
21946
21991
|
paypageId: payPageId,
|
|
21947
21992
|
reportGroup: reportGroup,
|
|
@@ -21963,72 +22008,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
21963
22008
|
}
|
|
21964
22009
|
});
|
|
21965
22010
|
}
|
|
22011
|
+
}, [selectedPaymentMethodId]);
|
|
22012
|
+
React.useEffect(() => {
|
|
22013
|
+
whenUserReady(() => {
|
|
22014
|
+
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
22015
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
22016
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
22017
|
+
document.querySelector('script[src="https://secure.gosell.io/js/sdk/tap.min.js"]').addEventListener("load", () => {
|
|
22018
|
+
initTapScript();
|
|
22019
|
+
});
|
|
22020
|
+
}
|
|
21966
22021
|
|
|
21967
|
-
|
|
21968
|
-
|
|
21969
|
-
|
|
21970
|
-
|
|
21971
|
-
let elements = tapKey.elements({});
|
|
21972
|
-
let style = {
|
|
21973
|
-
base: {
|
|
21974
|
-
color: "#535353",
|
|
21975
|
-
lineHeight: "18px",
|
|
21976
|
-
fontFamily: "sans-serif",
|
|
21977
|
-
fontSmoothing: "antialiased",
|
|
21978
|
-
fontSize: "16px",
|
|
21979
|
-
"::placeholder": {
|
|
21980
|
-
color: "rgba(0, 0, 0, 0.26)",
|
|
21981
|
-
fontSize: "15px"
|
|
21982
|
-
}
|
|
21983
|
-
},
|
|
21984
|
-
invalid: {
|
|
21985
|
-
color: "red"
|
|
21986
|
-
}
|
|
21987
|
-
}; // input labels/placeholders
|
|
21988
|
-
|
|
21989
|
-
let labels = {
|
|
21990
|
-
cardNumber: "Card Number",
|
|
21991
|
-
expirationDate: "MM/YY",
|
|
21992
|
-
cvv: "CVV",
|
|
21993
|
-
cardHolder: "Card Holder Name"
|
|
21994
|
-
}; //payment options
|
|
21995
|
-
|
|
21996
|
-
let paymentOptions = {
|
|
21997
|
-
labels: labels,
|
|
21998
|
-
TextDirection: "ltr"
|
|
21999
|
-
}; //create element, pass style and payment options
|
|
22000
|
-
|
|
22001
|
-
let card = elements.create("card", {
|
|
22002
|
-
style: style
|
|
22003
|
-
}, paymentOptions); //mount element
|
|
22004
|
-
|
|
22005
|
-
card.mount("#tapPaymentIframe"); //card change event listener
|
|
22006
|
-
|
|
22007
|
-
card.addEventListener("change", function (event) {// if (event.error_interactive) {
|
|
22008
|
-
// onFailure(event.error_interactive);
|
|
22009
|
-
// return dispatch({
|
|
22010
|
-
// type: SHOW_ALERT,
|
|
22011
|
-
// payload: {
|
|
22012
|
-
// type: "error",
|
|
22013
|
-
// content: getErrorMessages(event.error_interactive)
|
|
22014
|
-
// }
|
|
22015
|
-
// });
|
|
22016
|
-
// } else {
|
|
22017
|
-
// dispatch({
|
|
22018
|
-
// type: SHOW_ALERT,
|
|
22019
|
-
// payload: { type: "error", content: "" }
|
|
22020
|
-
// });
|
|
22021
|
-
// }
|
|
22022
|
-
// let displayError = document.getElementById("error-handler");
|
|
22023
|
-
// if (event.error) {
|
|
22024
|
-
// displayError.textContent = event.error.message;
|
|
22025
|
-
// } else {
|
|
22026
|
-
// displayError.textContent = "";
|
|
22027
|
-
// }
|
|
22028
|
-
});
|
|
22029
|
-
tapInstanceRef.current = tapKey;
|
|
22030
|
-
tapInstanceCard.current = card;
|
|
22031
|
-
}
|
|
22022
|
+
if (cardProcessor === "tap" && !selectedPaymentMethodId && window.Tapjsli) {
|
|
22023
|
+
initTapScript();
|
|
22024
|
+
}
|
|
22025
|
+
});
|
|
22032
22026
|
}, [selectedPaymentMethodId]);
|
|
22033
22027
|
|
|
22034
22028
|
const initPaymentRequest = (state, dispatch) => {
|
|
@@ -22094,7 +22088,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
22094
22088
|
payload: paymentRequest
|
|
22095
22089
|
});
|
|
22096
22090
|
} catch {
|
|
22097
|
-
console.log("Google Pay/Apple pay isn't available in this country");
|
|
22091
|
+
console.log("Google Pay/Apple pay isn't available/supported in this country");
|
|
22098
22092
|
}
|
|
22099
22093
|
};
|
|
22100
22094
|
/**
|
|
@@ -22750,7 +22744,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
22750
22744
|
source,
|
|
22751
22745
|
error
|
|
22752
22746
|
}) => {
|
|
22753
|
-
var
|
|
22747
|
+
var _ref4, _ref5, _state$updatedPrice2;
|
|
22754
22748
|
|
|
22755
22749
|
if (error) {
|
|
22756
22750
|
return handlePaymentError(error);
|
|
@@ -22776,7 +22770,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
22776
22770
|
}, 0);
|
|
22777
22771
|
};
|
|
22778
22772
|
|
|
22779
|
-
(
|
|
22773
|
+
(_ref4 = (_ref5 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref5 !== void 0 ? _ref5 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref4 !== void 0 ? _ref4 : getOrderItemsTotal();
|
|
22780
22774
|
return handlePayment(source);
|
|
22781
22775
|
}).catch(error => {
|
|
22782
22776
|
return handlePaymentError(error);
|
|
@@ -22877,6 +22871,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
22877
22871
|
const handlePaymentError = error => {
|
|
22878
22872
|
var _getErrorMessages;
|
|
22879
22873
|
|
|
22874
|
+
toggleAuthenticationSuccessPendingView(false);
|
|
22875
|
+
|
|
22880
22876
|
if (error.type === "validation_error" && // Subscription creation & renewal
|
|
22881
22877
|
type === "createPayment") {
|
|
22882
22878
|
var _state$couponObject;
|
|
@@ -22946,6 +22942,18 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
22946
22942
|
}
|
|
22947
22943
|
};
|
|
22948
22944
|
|
|
22945
|
+
const toggleAuthenticationSuccessPendingView = show => {
|
|
22946
|
+
const cardAuthContainer = document.querySelector(".card-authentication-success-container");
|
|
22947
|
+
|
|
22948
|
+
if (show) {
|
|
22949
|
+
cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
|
|
22950
|
+
cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
|
|
22951
|
+
} else {
|
|
22952
|
+
cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
|
|
22953
|
+
cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
|
|
22954
|
+
}
|
|
22955
|
+
};
|
|
22956
|
+
|
|
22949
22957
|
const injectCardAuthenticationIframe = source => {
|
|
22950
22958
|
var _source$redirect;
|
|
22951
22959
|
|
|
@@ -23074,6 +23082,42 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
23074
23082
|
percentOff: action.payload
|
|
23075
23083
|
});
|
|
23076
23084
|
|
|
23085
|
+
case SET_FIRST_NAME:
|
|
23086
|
+
return lib_7({ ...state,
|
|
23087
|
+
firstName: action.payload,
|
|
23088
|
+
firstNameError: null
|
|
23089
|
+
});
|
|
23090
|
+
|
|
23091
|
+
case SET_LAST_NAME:
|
|
23092
|
+
return lib_7({ ...state,
|
|
23093
|
+
lastName: action.payload,
|
|
23094
|
+
lastNameError: null
|
|
23095
|
+
});
|
|
23096
|
+
|
|
23097
|
+
case SET_PHONE:
|
|
23098
|
+
return lib_7({ ...state,
|
|
23099
|
+
phone: action.payload,
|
|
23100
|
+
phoneError: null
|
|
23101
|
+
});
|
|
23102
|
+
|
|
23103
|
+
case SET_FIRST_NAME_ERROR:
|
|
23104
|
+
return lib_7({ ...state,
|
|
23105
|
+
firstNameError: action.payload,
|
|
23106
|
+
firstName: ""
|
|
23107
|
+
});
|
|
23108
|
+
|
|
23109
|
+
case SET_LAST_NAME_ERROR:
|
|
23110
|
+
return lib_7({ ...state,
|
|
23111
|
+
lastNameError: action.payload,
|
|
23112
|
+
lastName: ""
|
|
23113
|
+
});
|
|
23114
|
+
|
|
23115
|
+
case SET_PHONE_ERROR:
|
|
23116
|
+
return lib_7({ ...state,
|
|
23117
|
+
phoneError: action.payload,
|
|
23118
|
+
phone: null
|
|
23119
|
+
});
|
|
23120
|
+
|
|
23077
23121
|
case SHOW_ALERT:
|
|
23078
23122
|
return lib_7({ ...state,
|
|
23079
23123
|
alert: action.payload
|
|
@@ -23104,12 +23148,17 @@ const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
|
|
|
23104
23148
|
|
|
23105
23149
|
const PaymentMethodContainer = props => {
|
|
23106
23150
|
const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
|
|
23151
|
+
const {
|
|
23152
|
+
whenUserReady
|
|
23153
|
+
} = usePelcro.getStore();
|
|
23107
23154
|
React.useEffect(() => {
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23155
|
+
whenUserReady(() => {
|
|
23156
|
+
if (!window.Stripe) {
|
|
23157
|
+
document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
|
|
23158
|
+
setIsStripeLoaded(true);
|
|
23159
|
+
});
|
|
23160
|
+
}
|
|
23161
|
+
});
|
|
23113
23162
|
}, []);
|
|
23114
23163
|
|
|
23115
23164
|
if (isStripeLoaded) {
|
|
@@ -23202,7 +23251,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
23202
23251
|
const CheckoutForm = () => {
|
|
23203
23252
|
const {
|
|
23204
23253
|
selectedPaymentMethodId
|
|
23205
|
-
} = usePelcro
|
|
23254
|
+
} = usePelcro();
|
|
23206
23255
|
const cardProcessor = getSiteCardProcessor();
|
|
23207
23256
|
|
|
23208
23257
|
if (selectedPaymentMethodId) {
|
|
@@ -23257,7 +23306,7 @@ const DiscountedPrice = props => {
|
|
|
23257
23306
|
const {
|
|
23258
23307
|
order,
|
|
23259
23308
|
plan
|
|
23260
|
-
} = usePelcro
|
|
23309
|
+
} = usePelcro();
|
|
23261
23310
|
const ecommOrderCurrency = (_order$currency = order === null || order === void 0 ? void 0 : order.currency) !== null && _order$currency !== void 0 ? _order$currency : order === null || order === void 0 ? void 0 : (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency;
|
|
23262
23311
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
23263
23312
|
const discountedPriceWithoutTax = updatedPrice - taxAmount;
|
|
@@ -23292,7 +23341,7 @@ const SubmitPaymentMethod = ({
|
|
|
23292
23341
|
|
|
23293
23342
|
const {
|
|
23294
23343
|
plan
|
|
23295
|
-
} = usePelcro
|
|
23344
|
+
} = usePelcro();
|
|
23296
23345
|
const {
|
|
23297
23346
|
t
|
|
23298
23347
|
} = useTranslation("checkoutForm");
|
|
@@ -23398,17 +23447,17 @@ const CouponCodeField = props => {
|
|
|
23398
23447
|
}, props));
|
|
23399
23448
|
};
|
|
23400
23449
|
|
|
23401
|
-
var _path$
|
|
23450
|
+
var _path$m;
|
|
23402
23451
|
|
|
23403
|
-
function _extends$
|
|
23452
|
+
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); }
|
|
23404
23453
|
|
|
23405
23454
|
function SvgTicket(props) {
|
|
23406
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23455
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
23407
23456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23408
23457
|
fill: "none",
|
|
23409
23458
|
viewBox: "0 0 24 24",
|
|
23410
23459
|
stroke: "currentColor"
|
|
23411
|
-
}, props), _path$
|
|
23460
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23412
23461
|
strokeLinecap: "round",
|
|
23413
23462
|
strokeLinejoin: "round",
|
|
23414
23463
|
strokeWidth: 2,
|
|
@@ -23688,7 +23737,7 @@ const PaypalSubscribeButton = props => {
|
|
|
23688
23737
|
plan,
|
|
23689
23738
|
invoice,
|
|
23690
23739
|
selectedAddressId
|
|
23691
|
-
} = usePelcro
|
|
23740
|
+
} = usePelcro();
|
|
23692
23741
|
React.useEffect(() => {
|
|
23693
23742
|
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
23694
23743
|
|
|
@@ -23789,16 +23838,16 @@ const BankRedirection = () => {
|
|
|
23789
23838
|
}));
|
|
23790
23839
|
};
|
|
23791
23840
|
|
|
23792
|
-
var _path$
|
|
23841
|
+
var _path$l;
|
|
23793
23842
|
|
|
23794
|
-
function _extends$
|
|
23843
|
+
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); }
|
|
23795
23844
|
|
|
23796
23845
|
function SvgLock(props) {
|
|
23797
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23846
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
23798
23847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23799
23848
|
viewBox: "0 0 20 20",
|
|
23800
23849
|
fill: "currentColor"
|
|
23801
|
-
}, props), _path$
|
|
23850
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23802
23851
|
fillRule: "evenodd",
|
|
23803
23852
|
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",
|
|
23804
23853
|
clipRule: "evenodd"
|
|
@@ -23819,7 +23868,7 @@ const SelectedPaymentMethod = () => {
|
|
|
23819
23868
|
const {
|
|
23820
23869
|
switchView,
|
|
23821
23870
|
selectedPaymentMethodId
|
|
23822
|
-
} = usePelcro
|
|
23871
|
+
} = usePelcro();
|
|
23823
23872
|
const paymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : (_window$Pelcro$user$r2 = _window$Pelcro$user$r.sources) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : (_window$Pelcro$user$r3 = _window$Pelcro$user$r2.find) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.call(_window$Pelcro$user$r2, source => {
|
|
23824
23873
|
return source.id == selectedPaymentMethodId;
|
|
23825
23874
|
});
|
|
@@ -23860,7 +23909,7 @@ const TaxAmount = () => {
|
|
|
23860
23909
|
} = React.useContext(store$k);
|
|
23861
23910
|
const {
|
|
23862
23911
|
plan
|
|
23863
|
-
} = usePelcro
|
|
23912
|
+
} = usePelcro();
|
|
23864
23913
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
23865
23914
|
const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
23866
23915
|
|
|
@@ -23947,6 +23996,17 @@ const SubscriptionCreateFreePlanButton = ({
|
|
|
23947
23996
|
}, otherProps), t("buttons.subscribe"));
|
|
23948
23997
|
};
|
|
23949
23998
|
|
|
23999
|
+
const BankAuthenticationSuccess = () => {
|
|
24000
|
+
const {
|
|
24001
|
+
t
|
|
24002
|
+
} = useTranslation("checkoutForm");
|
|
24003
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24004
|
+
className: "plc-absolute plc-inset-0 plc-flex-col plc-items-center plc-justify-center plc-hidden plc-text-lg plc-bg-white plc-z-max plc-text-primary-500 card-authentication-success-container"
|
|
24005
|
+
}, t("messages.bankAuthenticationSuccess"), /*#__PURE__*/React__default['default'].createElement(SvgSpinner, {
|
|
24006
|
+
className: "plc-w-10 plc-h-10 plc-mt-5 plc-animate-spin"
|
|
24007
|
+
}));
|
|
24008
|
+
};
|
|
24009
|
+
|
|
23950
24010
|
/**
|
|
23951
24011
|
*
|
|
23952
24012
|
*/
|
|
@@ -23968,6 +24028,9 @@ function PaymentMethodView({
|
|
|
23968
24028
|
const cardProcessor = getSiteCardProcessor();
|
|
23969
24029
|
const supportsVantiv = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings);
|
|
23970
24030
|
const supportsTap = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.tap_gateway_settings);
|
|
24031
|
+
const isUserFirstName = Boolean(window.Pelcro.user.read().first_name);
|
|
24032
|
+
const isUserLastName = Boolean(window.Pelcro.user.read().last_name);
|
|
24033
|
+
const isUserPhone = Boolean(window.Pelcro.user.read().phone);
|
|
23971
24034
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
23972
24035
|
className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
|
|
23973
24036
|
}, cardProcessor === "stripe" && !showSubscriptionButton && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -24027,7 +24090,7 @@ const SubscriptionRenewView = ({
|
|
|
24027
24090
|
const {
|
|
24028
24091
|
product,
|
|
24029
24092
|
plan
|
|
24030
|
-
} = usePelcro
|
|
24093
|
+
} = usePelcro();
|
|
24031
24094
|
const skipPayment = (_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.skipPaymentForFreePlans;
|
|
24032
24095
|
const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
|
|
24033
24096
|
|
|
@@ -24083,7 +24146,7 @@ function SubscriptionRenewModal({
|
|
|
24083
24146
|
const {
|
|
24084
24147
|
product,
|
|
24085
24148
|
switchView
|
|
24086
|
-
} = usePelcro
|
|
24149
|
+
} = usePelcro();
|
|
24087
24150
|
|
|
24088
24151
|
const onSuccess = res => {
|
|
24089
24152
|
var _otherProps$onSuccess, _ReactGA$event;
|
|
@@ -24169,18 +24232,18 @@ const SubscriptionCancelContainer = ({
|
|
|
24169
24232
|
})));
|
|
24170
24233
|
};
|
|
24171
24234
|
|
|
24172
|
-
var _path$
|
|
24235
|
+
var _path$k;
|
|
24173
24236
|
|
|
24174
|
-
function _extends$
|
|
24237
|
+
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); }
|
|
24175
24238
|
|
|
24176
24239
|
function SvgInfoCircle(props) {
|
|
24177
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24240
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
24178
24241
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24179
24242
|
className: "plc-w-5 plc-h-5",
|
|
24180
24243
|
fill: "none",
|
|
24181
24244
|
viewBox: "0 0 24 24",
|
|
24182
24245
|
stroke: "currentColor"
|
|
24183
|
-
}, props), _path$
|
|
24246
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24184
24247
|
strokeLinecap: "round",
|
|
24185
24248
|
strokeLinejoin: "round",
|
|
24186
24249
|
strokeWidth: 2,
|
|
@@ -24267,10 +24330,10 @@ const SubscriptionCancelReason = props => {
|
|
|
24267
24330
|
|
|
24268
24331
|
var _switch;
|
|
24269
24332
|
|
|
24270
|
-
function _extends$
|
|
24333
|
+
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); }
|
|
24271
24334
|
|
|
24272
24335
|
function SvgSubscription(props) {
|
|
24273
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24336
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
24274
24337
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24275
24338
|
viewBox: "0 0 100 125",
|
|
24276
24339
|
fill: "currentColor"
|
|
@@ -24292,7 +24355,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
24292
24355
|
}) => {
|
|
24293
24356
|
const {
|
|
24294
24357
|
switchView
|
|
24295
|
-
} = usePelcro
|
|
24358
|
+
} = usePelcro();
|
|
24296
24359
|
const {
|
|
24297
24360
|
state: {
|
|
24298
24361
|
cancelationReason
|
|
@@ -24364,7 +24427,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
24364
24427
|
}) => {
|
|
24365
24428
|
const {
|
|
24366
24429
|
switchView
|
|
24367
|
-
} = usePelcro
|
|
24430
|
+
} = usePelcro();
|
|
24368
24431
|
const {
|
|
24369
24432
|
state: {
|
|
24370
24433
|
cancelationReason
|
|
@@ -24432,7 +24495,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
24432
24495
|
const SubscriptionCancelView = props => {
|
|
24433
24496
|
const {
|
|
24434
24497
|
subscriptionToCancel
|
|
24435
|
-
} = usePelcro
|
|
24498
|
+
} = usePelcro();
|
|
24436
24499
|
const {
|
|
24437
24500
|
t
|
|
24438
24501
|
} = useTranslation("subscriptionCancel");
|
|
@@ -24463,7 +24526,7 @@ const SubscriptionCancelModal = ({
|
|
|
24463
24526
|
}) => {
|
|
24464
24527
|
const {
|
|
24465
24528
|
subscriptionToCancel
|
|
24466
|
-
} = usePelcro
|
|
24529
|
+
} = usePelcro();
|
|
24467
24530
|
const {
|
|
24468
24531
|
t
|
|
24469
24532
|
} = useTranslation("subscriptionCancel");
|
|
@@ -24612,7 +24675,7 @@ const SubscriptionSuspendButton = ({
|
|
|
24612
24675
|
}) => {
|
|
24613
24676
|
const {
|
|
24614
24677
|
switchView
|
|
24615
|
-
} = usePelcro
|
|
24678
|
+
} = usePelcro();
|
|
24616
24679
|
const {
|
|
24617
24680
|
state: {
|
|
24618
24681
|
suspendDate,
|
|
@@ -24676,7 +24739,7 @@ const SubscriptionSuspendButton = ({
|
|
|
24676
24739
|
const SubscriptionSuspendView = props => {
|
|
24677
24740
|
const {
|
|
24678
24741
|
subscriptionToSuspend
|
|
24679
|
-
} = usePelcro
|
|
24742
|
+
} = usePelcro();
|
|
24680
24743
|
const {
|
|
24681
24744
|
t
|
|
24682
24745
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -24703,7 +24766,7 @@ function SubscriptionSuspendModal({
|
|
|
24703
24766
|
}) {
|
|
24704
24767
|
const {
|
|
24705
24768
|
subscriptionToSuspend
|
|
24706
|
-
} = usePelcro
|
|
24769
|
+
} = usePelcro();
|
|
24707
24770
|
const {
|
|
24708
24771
|
t
|
|
24709
24772
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -24721,12 +24784,12 @@ function SubscriptionSuspendModal({
|
|
|
24721
24784
|
}
|
|
24722
24785
|
SubscriptionSuspendModal.viewId = "subscription-suspend";
|
|
24723
24786
|
|
|
24724
|
-
var _path$
|
|
24787
|
+
var _path$j;
|
|
24725
24788
|
|
|
24726
|
-
function _extends$
|
|
24789
|
+
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); }
|
|
24727
24790
|
|
|
24728
24791
|
function SvgGift(props) {
|
|
24729
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24792
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
24730
24793
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
24731
24794
|
fill: "none",
|
|
24732
24795
|
stroke: "currentColor",
|
|
@@ -24735,7 +24798,7 @@ function SvgGift(props) {
|
|
|
24735
24798
|
strokeWidth: 2,
|
|
24736
24799
|
viewBox: "0 0 24 24",
|
|
24737
24800
|
xmlns: "http://www.w3.org/2000/svg"
|
|
24738
|
-
}, props), _path$
|
|
24801
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
24739
24802
|
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"
|
|
24740
24803
|
})));
|
|
24741
24804
|
}
|
|
@@ -24775,7 +24838,7 @@ const getCurrentFlow = () => {
|
|
|
24775
24838
|
giftRecipient,
|
|
24776
24839
|
giftCode,
|
|
24777
24840
|
invoice
|
|
24778
|
-
} = usePelcro
|
|
24841
|
+
} = usePelcro.getStore();
|
|
24779
24842
|
|
|
24780
24843
|
if (invoice) {
|
|
24781
24844
|
return "invoicePayment";
|
|
@@ -24794,7 +24857,7 @@ const getSuccessContent = i18n => {
|
|
|
24794
24857
|
const flow = getCurrentFlow();
|
|
24795
24858
|
const {
|
|
24796
24859
|
product
|
|
24797
|
-
} = usePelcro
|
|
24860
|
+
} = usePelcro.getStore();
|
|
24798
24861
|
const wordingDictionary = {
|
|
24799
24862
|
subscriptionSuccess: {
|
|
24800
24863
|
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
@@ -24838,7 +24901,7 @@ function PaymentSuccessModal({
|
|
|
24838
24901
|
}) {
|
|
24839
24902
|
const {
|
|
24840
24903
|
resetView
|
|
24841
|
-
} = usePelcro
|
|
24904
|
+
} = usePelcro();
|
|
24842
24905
|
|
|
24843
24906
|
const onClose = () => {
|
|
24844
24907
|
var _props$onClose;
|
|
@@ -24871,7 +24934,7 @@ function NewsletterWithHook(props) {
|
|
|
24871
24934
|
switchView,
|
|
24872
24935
|
resetView,
|
|
24873
24936
|
product
|
|
24874
|
-
} = usePelcro
|
|
24937
|
+
} = usePelcro();
|
|
24875
24938
|
return /*#__PURE__*/React__default['default'].createElement(NewsLetter, {
|
|
24876
24939
|
onClose: () => {
|
|
24877
24940
|
var _props$onClose;
|
|
@@ -25381,7 +25444,7 @@ const MeterView = () => {
|
|
|
25381
25444
|
switchView,
|
|
25382
25445
|
product,
|
|
25383
25446
|
isAuthenticated
|
|
25384
|
-
} = usePelcro
|
|
25447
|
+
} = usePelcro();
|
|
25385
25448
|
const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
|
|
25386
25449
|
const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
|
|
25387
25450
|
const title = `${paywallProduct === null || paywallProduct === void 0 ? void 0 : (_paywallProduct$paywa = paywallProduct.paywall) === null || _paywallProduct$paywa === void 0 ? void 0 : _paywallProduct$paywa.meter_title}: ${visitsLeft}`;
|
|
@@ -25403,7 +25466,7 @@ const MeterView = () => {
|
|
|
25403
25466
|
const MeterModal = props => {
|
|
25404
25467
|
const {
|
|
25405
25468
|
resetView
|
|
25406
|
-
} = usePelcro
|
|
25469
|
+
} = usePelcro();
|
|
25407
25470
|
React.useEffect(() => {
|
|
25408
25471
|
var _props$onDisplay;
|
|
25409
25472
|
|
|
@@ -25441,7 +25504,7 @@ const SubscriptionCreateView = ({
|
|
|
25441
25504
|
const {
|
|
25442
25505
|
product,
|
|
25443
25506
|
plan
|
|
25444
|
-
} = usePelcro
|
|
25507
|
+
} = usePelcro();
|
|
25445
25508
|
const skipPayment = (_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.skipPaymentForFreePlans;
|
|
25446
25509
|
const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
|
|
25447
25510
|
|
|
@@ -25499,7 +25562,7 @@ function SubscriptionCreateModal({
|
|
|
25499
25562
|
const {
|
|
25500
25563
|
product,
|
|
25501
25564
|
switchView
|
|
25502
|
-
} = usePelcro
|
|
25565
|
+
} = usePelcro();
|
|
25503
25566
|
|
|
25504
25567
|
const onSuccess = res => {
|
|
25505
25568
|
var _otherProps$onSuccess;
|
|
@@ -25549,7 +25612,7 @@ const SubscriptionManageMembersContainer = ({
|
|
|
25549
25612
|
}) => {
|
|
25550
25613
|
const {
|
|
25551
25614
|
subscriptionToManageMembers
|
|
25552
|
-
} = usePelcro
|
|
25615
|
+
} = usePelcro();
|
|
25553
25616
|
const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
|
|
25554
25617
|
|
|
25555
25618
|
const handleListMembers = ({}, dispatch) => {
|
|
@@ -25810,17 +25873,17 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
25810
25873
|
}, props));
|
|
25811
25874
|
}
|
|
25812
25875
|
|
|
25813
|
-
var _path$
|
|
25876
|
+
var _path$i;
|
|
25814
25877
|
|
|
25815
|
-
function _extends$
|
|
25878
|
+
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); }
|
|
25816
25879
|
|
|
25817
25880
|
function SvgCheckMark(props) {
|
|
25818
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
25881
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
25819
25882
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
25820
25883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25821
25884
|
viewBox: "0 0 20 20",
|
|
25822
25885
|
fill: "currentColor"
|
|
25823
|
-
}, props), _path$
|
|
25886
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
25824
25887
|
fillRule: "evenodd",
|
|
25825
25888
|
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",
|
|
25826
25889
|
clipRule: "evenodd"
|
|
@@ -25930,11 +25993,7 @@ function SubscriptionManageMembersView(props) {
|
|
|
25930
25993
|
} = useTranslation("subscriptionManageMembers");
|
|
25931
25994
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25932
25995
|
id: "pelcro-login-view"
|
|
25933
|
-
}, /*#__PURE__*/React__default['default'].createElement("
|
|
25934
|
-
className: "plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25935
|
-
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25936
|
-
className: "plc-text-2xl"
|
|
25937
|
-
}, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25996
|
+
}, /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25938
25997
|
action: "javascript:void(0);",
|
|
25939
25998
|
className: "plc-mt-2 pelcro-form"
|
|
25940
25999
|
}, /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersEmails, {
|
|
@@ -25980,6 +26039,10 @@ function SubscriptionManageMembersModal({
|
|
|
25980
26039
|
onClose,
|
|
25981
26040
|
...props
|
|
25982
26041
|
}) {
|
|
26042
|
+
const {
|
|
26043
|
+
t
|
|
26044
|
+
} = useTranslation("subscriptionManageMembers");
|
|
26045
|
+
|
|
25983
26046
|
const onSuccess = res => {
|
|
25984
26047
|
var _props$onSuccess;
|
|
25985
26048
|
|
|
@@ -25991,9 +26054,13 @@ function SubscriptionManageMembersModal({
|
|
|
25991
26054
|
onDisplay: onDisplay,
|
|
25992
26055
|
onClose: onClose,
|
|
25993
26056
|
className: "plc-max-w-xl"
|
|
25994
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
26057
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalHeader, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26058
|
+
className: "plc-text-center plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
26059
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
26060
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
26061
|
+
}, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'"))), /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersView, Object.assign({}, props, {
|
|
25995
26062
|
onSuccess: onSuccess
|
|
25996
|
-
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null
|
|
26063
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null));
|
|
25997
26064
|
}
|
|
25998
26065
|
SubscriptionManageMembersModal.viewId = "manage-members";
|
|
25999
26066
|
|
|
@@ -26207,17 +26274,17 @@ const UserUpdateContainer = ({
|
|
|
26207
26274
|
})));
|
|
26208
26275
|
};
|
|
26209
26276
|
|
|
26210
|
-
var _path$
|
|
26277
|
+
var _path$h;
|
|
26211
26278
|
|
|
26212
|
-
function _extends$
|
|
26279
|
+
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); }
|
|
26213
26280
|
|
|
26214
26281
|
function SvgEdit(props) {
|
|
26215
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
26282
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
26216
26283
|
className: "plc-w-6 plc-h-6",
|
|
26217
26284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26218
26285
|
viewBox: "0 0 20 20",
|
|
26219
26286
|
fill: "currentColor"
|
|
26220
|
-
}, props), _path$
|
|
26287
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
26221
26288
|
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"
|
|
26222
26289
|
})));
|
|
26223
26290
|
}
|
|
@@ -26571,7 +26638,7 @@ function UserUpdateModal({
|
|
|
26571
26638
|
}) {
|
|
26572
26639
|
const {
|
|
26573
26640
|
switchView
|
|
26574
|
-
} = usePelcro
|
|
26641
|
+
} = usePelcro();
|
|
26575
26642
|
const {
|
|
26576
26643
|
t
|
|
26577
26644
|
} = useTranslation("userEdit");
|
|
@@ -26656,7 +26723,7 @@ const AddressCreateContainer = ({
|
|
|
26656
26723
|
order,
|
|
26657
26724
|
set,
|
|
26658
26725
|
selectedMembership
|
|
26659
|
-
} = usePelcro
|
|
26726
|
+
} = usePelcro();
|
|
26660
26727
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
26661
26728
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
26662
26729
|
React.useEffect(() => {
|
|
@@ -27414,7 +27481,7 @@ const AddressCreateModal = ({
|
|
|
27414
27481
|
switchToPaymentView,
|
|
27415
27482
|
resetView,
|
|
27416
27483
|
giftRecipient
|
|
27417
|
-
} = usePelcro
|
|
27484
|
+
} = usePelcro();
|
|
27418
27485
|
const {
|
|
27419
27486
|
t
|
|
27420
27487
|
} = useTranslation("address");
|
|
@@ -27512,7 +27579,7 @@ const AddressUpdateContainer = ({
|
|
|
27512
27579
|
|
|
27513
27580
|
const {
|
|
27514
27581
|
addressIdToEdit
|
|
27515
|
-
} = usePelcro
|
|
27582
|
+
} = usePelcro();
|
|
27516
27583
|
const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
|
|
27517
27584
|
const [t] = useTranslation("address");
|
|
27518
27585
|
React.useEffect(() => {
|
|
@@ -28606,7 +28673,7 @@ const PasswordForgotModal = ({
|
|
|
28606
28673
|
} = useTranslation("passwordForgot");
|
|
28607
28674
|
const {
|
|
28608
28675
|
switchView
|
|
28609
|
-
} = usePelcro
|
|
28676
|
+
} = usePelcro();
|
|
28610
28677
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
28611
28678
|
id: "pelcro-password-forgot-modal",
|
|
28612
28679
|
onDisplay: onDisplay,
|
|
@@ -29205,7 +29272,7 @@ const CartContainer = ({
|
|
|
29205
29272
|
const {
|
|
29206
29273
|
cartItems,
|
|
29207
29274
|
set
|
|
29208
|
-
} = usePelcro
|
|
29275
|
+
} = usePelcro();
|
|
29209
29276
|
const {
|
|
29210
29277
|
t
|
|
29211
29278
|
} = useTranslation("shop");
|
|
@@ -29310,15 +29377,16 @@ const CartRemoveItemButton = ({
|
|
|
29310
29377
|
}) => {
|
|
29311
29378
|
const {
|
|
29312
29379
|
removeFromCart
|
|
29313
|
-
} = usePelcro
|
|
29380
|
+
} = usePelcro();
|
|
29314
29381
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
29315
29382
|
variant: "icon",
|
|
29316
29383
|
"data-key": itemId,
|
|
29317
29384
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
|
|
29318
29385
|
"aria-hidden": "true",
|
|
29319
|
-
focusable: "false"
|
|
29386
|
+
focusable: "false",
|
|
29387
|
+
className: "plc-fill-current"
|
|
29320
29388
|
}),
|
|
29321
|
-
className: "plc-bg-transparent plc-w-9 plc-h-9 plc-p-2",
|
|
29389
|
+
className: "plc-bg-transparent plc-w-9 plc-h-9 plc-p-2 hover:plc-text-red-500 hover:plc-bg-transparent",
|
|
29322
29390
|
onClick: () => {
|
|
29323
29391
|
removeFromCart(itemId);
|
|
29324
29392
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
@@ -29373,7 +29441,7 @@ const CartTotalPrice = () => {
|
|
|
29373
29441
|
} = React.useContext(store$8);
|
|
29374
29442
|
const {
|
|
29375
29443
|
cartItems
|
|
29376
|
-
} = usePelcro
|
|
29444
|
+
} = usePelcro();
|
|
29377
29445
|
const totalPriceCurrency = cartItems[0].currency;
|
|
29378
29446
|
const {
|
|
29379
29447
|
t
|
|
@@ -29393,7 +29461,7 @@ const CartTotalPrice = () => {
|
|
|
29393
29461
|
const CartView = props => {
|
|
29394
29462
|
const {
|
|
29395
29463
|
cartItems
|
|
29396
|
-
} = usePelcro
|
|
29464
|
+
} = usePelcro();
|
|
29397
29465
|
const {
|
|
29398
29466
|
t
|
|
29399
29467
|
} = useTranslation("cart");
|
|
@@ -29452,7 +29520,7 @@ const CartModal = ({
|
|
|
29452
29520
|
switchView,
|
|
29453
29521
|
switchToAddressView,
|
|
29454
29522
|
isAuthenticated
|
|
29455
|
-
} = usePelcro
|
|
29523
|
+
} = usePelcro();
|
|
29456
29524
|
const {
|
|
29457
29525
|
t
|
|
29458
29526
|
} = useTranslation("cart");
|
|
@@ -29491,7 +29559,7 @@ const ShopSelectProductButton = ({
|
|
|
29491
29559
|
}) => {
|
|
29492
29560
|
const {
|
|
29493
29561
|
addToCart
|
|
29494
|
-
} = usePelcro
|
|
29562
|
+
} = usePelcro();
|
|
29495
29563
|
const {
|
|
29496
29564
|
t
|
|
29497
29565
|
} = useTranslation("shop");
|
|
@@ -29523,7 +29591,7 @@ const ShopPurchaseButton = ({
|
|
|
29523
29591
|
}) => {
|
|
29524
29592
|
const {
|
|
29525
29593
|
purchaseItem
|
|
29526
|
-
} = usePelcro
|
|
29594
|
+
} = usePelcro();
|
|
29527
29595
|
const {
|
|
29528
29596
|
t
|
|
29529
29597
|
} = useTranslation("shop");
|
|
@@ -29594,7 +29662,7 @@ const OrderCreateModal = ({
|
|
|
29594
29662
|
}) => {
|
|
29595
29663
|
const {
|
|
29596
29664
|
switchView
|
|
29597
|
-
} = usePelcro
|
|
29665
|
+
} = usePelcro();
|
|
29598
29666
|
const {
|
|
29599
29667
|
t
|
|
29600
29668
|
} = useTranslation("payment");
|
|
@@ -29631,7 +29699,7 @@ const OrderConfirmModal = props => {
|
|
|
29631
29699
|
} = useTranslation("shop");
|
|
29632
29700
|
const {
|
|
29633
29701
|
resetView
|
|
29634
|
-
} = usePelcro
|
|
29702
|
+
} = usePelcro();
|
|
29635
29703
|
|
|
29636
29704
|
const onClose = () => {
|
|
29637
29705
|
var _props$onClose;
|
|
@@ -29723,7 +29791,7 @@ const GiftCreateContainer = ({
|
|
|
29723
29791
|
} = useTranslation("register");
|
|
29724
29792
|
const {
|
|
29725
29793
|
set
|
|
29726
|
-
} = usePelcro
|
|
29794
|
+
} = usePelcro();
|
|
29727
29795
|
|
|
29728
29796
|
const handleSubmit = (state, dispatch) => {
|
|
29729
29797
|
const giftRecipient = {
|
|
@@ -30011,7 +30079,7 @@ const GiftCreateModal = ({
|
|
|
30011
30079
|
switchToAddressView,
|
|
30012
30080
|
switchToPaymentView,
|
|
30013
30081
|
product
|
|
30014
|
-
} = usePelcro
|
|
30082
|
+
} = usePelcro();
|
|
30015
30083
|
|
|
30016
30084
|
const onSuccess = giftRecipient => {
|
|
30017
30085
|
var _otherProps$onSuccess;
|
|
@@ -30076,13 +30144,13 @@ const GiftRedeemContainer = ({
|
|
|
30076
30144
|
} = useTranslation("register");
|
|
30077
30145
|
const {
|
|
30078
30146
|
set
|
|
30079
|
-
} = usePelcro
|
|
30147
|
+
} = usePelcro();
|
|
30080
30148
|
const {
|
|
30081
30149
|
switchView,
|
|
30082
30150
|
switchToAddressView,
|
|
30083
30151
|
isAuthenticated,
|
|
30084
30152
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore
|
|
30085
|
-
} = usePelcro
|
|
30153
|
+
} = usePelcro();
|
|
30086
30154
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
30087
30155
|
React.useEffect(() => {
|
|
30088
30156
|
onDisplay();
|
|
@@ -30290,7 +30358,7 @@ const GiftRedeemModal = ({
|
|
|
30290
30358
|
switchView,
|
|
30291
30359
|
switchToAddressView,
|
|
30292
30360
|
isAuthenticated
|
|
30293
|
-
} = usePelcro
|
|
30361
|
+
} = usePelcro();
|
|
30294
30362
|
|
|
30295
30363
|
const onSuccess = giftCode => {
|
|
30296
30364
|
var _otherProps$onSuccess;
|
|
@@ -30367,7 +30435,7 @@ const AddressSelectContainer = ({
|
|
|
30367
30435
|
subscriptionIdToRenew: subscriptionIdToRenewFromStore,
|
|
30368
30436
|
set,
|
|
30369
30437
|
selectedMembership
|
|
30370
|
-
} = usePelcro
|
|
30438
|
+
} = usePelcro();
|
|
30371
30439
|
const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
|
|
30372
30440
|
const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
|
|
30373
30441
|
|
|
@@ -30606,7 +30674,7 @@ const AddressSelectModal = ({
|
|
|
30606
30674
|
switchView,
|
|
30607
30675
|
switchToPaymentView,
|
|
30608
30676
|
resetView
|
|
30609
|
-
} = usePelcro
|
|
30677
|
+
} = usePelcro();
|
|
30610
30678
|
const {
|
|
30611
30679
|
t
|
|
30612
30680
|
} = useTranslation("address");
|
|
@@ -30691,7 +30759,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
30691
30759
|
const {
|
|
30692
30760
|
set,
|
|
30693
30761
|
selectedPaymentMethodId: selectedPaymentMethodIdFromStore
|
|
30694
|
-
} = usePelcro
|
|
30762
|
+
} = usePelcro();
|
|
30695
30763
|
|
|
30696
30764
|
const submitPaymentMethod = ({
|
|
30697
30765
|
selectedPaymentMethodId
|
|
@@ -30870,12 +30938,12 @@ const PaymentMethodSelectModal = ({
|
|
|
30870
30938
|
switchToCheckoutForm,
|
|
30871
30939
|
set,
|
|
30872
30940
|
plan
|
|
30873
|
-
} = usePelcro
|
|
30941
|
+
} = usePelcro();
|
|
30874
30942
|
const {
|
|
30875
30943
|
t
|
|
30876
30944
|
} = useTranslation("paymentMethod");
|
|
30877
30945
|
const skipPayment = (_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.skipPaymentForFreePlans;
|
|
30878
|
-
useEffect(() => {
|
|
30946
|
+
React.useEffect(() => {
|
|
30879
30947
|
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
|
|
30880
30948
|
switchToCheckoutForm();
|
|
30881
30949
|
}
|
|
@@ -30911,8 +30979,8 @@ const PaymentMethodSelectModal = ({
|
|
|
30911
30979
|
};
|
|
30912
30980
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
30913
30981
|
|
|
30914
|
-
function _extends$
|
|
30915
|
-
_extends$
|
|
30982
|
+
function _extends$h() {
|
|
30983
|
+
_extends$h = Object.assign || function (target) {
|
|
30916
30984
|
for (var i = 1; i < arguments.length; i++) {
|
|
30917
30985
|
var source = arguments[i];
|
|
30918
30986
|
|
|
@@ -30926,7 +30994,7 @@ function _extends$g() {
|
|
|
30926
30994
|
return target;
|
|
30927
30995
|
};
|
|
30928
30996
|
|
|
30929
|
-
return _extends$
|
|
30997
|
+
return _extends$h.apply(this, arguments);
|
|
30930
30998
|
}
|
|
30931
30999
|
|
|
30932
31000
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -31110,7 +31178,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
31110
31178
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
31111
31179
|
return null;
|
|
31112
31180
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
31113
|
-
return _render(_extends$
|
|
31181
|
+
return _render(_extends$h({}, _rest, {
|
|
31114
31182
|
hidden: true,
|
|
31115
31183
|
style: {
|
|
31116
31184
|
display: 'none'
|
|
@@ -31638,7 +31706,7 @@ function TransitionChild(props) {
|
|
|
31638
31706
|
var passthroughProps = rest;
|
|
31639
31707
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
31640
31708
|
value: nesting
|
|
31641
|
-
}, render(_extends$
|
|
31709
|
+
}, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
31642
31710
|
}
|
|
31643
31711
|
|
|
31644
31712
|
function Transition(props) {
|
|
@@ -31682,7 +31750,7 @@ function Transition(props) {
|
|
|
31682
31750
|
value: nestingBag
|
|
31683
31751
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
31684
31752
|
value: transitionBag
|
|
31685
|
-
}, render(_extends$
|
|
31753
|
+
}, render(_extends$h({}, sharedProps, {
|
|
31686
31754
|
as: React.Fragment,
|
|
31687
31755
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
31688
31756
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -31809,12 +31877,12 @@ var ActionTypes;
|
|
|
31809
31877
|
})(ActionTypes || (ActionTypes = {}));
|
|
31810
31878
|
|
|
31811
31879
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
31812
|
-
return _extends$
|
|
31880
|
+
return _extends$h({}, state, {
|
|
31813
31881
|
activeItemIndex: null,
|
|
31814
31882
|
menuState: MenuStates.Closed
|
|
31815
31883
|
});
|
|
31816
31884
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
31817
|
-
return _extends$
|
|
31885
|
+
return _extends$h({}, state, {
|
|
31818
31886
|
menuState: MenuStates.Open
|
|
31819
31887
|
});
|
|
31820
31888
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -31833,7 +31901,7 @@ var ActionTypes;
|
|
|
31833
31901
|
}
|
|
31834
31902
|
});
|
|
31835
31903
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
31836
|
-
return _extends$
|
|
31904
|
+
return _extends$h({}, state, {
|
|
31837
31905
|
searchQuery: '',
|
|
31838
31906
|
activeItemIndex: activeItemIndex
|
|
31839
31907
|
});
|
|
@@ -31844,19 +31912,19 @@ var ActionTypes;
|
|
|
31844
31912
|
|
|
31845
31913
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
31846
31914
|
});
|
|
31847
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
31915
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
|
|
31848
31916
|
searchQuery: searchQuery
|
|
31849
31917
|
});
|
|
31850
|
-
return _extends$
|
|
31918
|
+
return _extends$h({}, state, {
|
|
31851
31919
|
searchQuery: searchQuery,
|
|
31852
31920
|
activeItemIndex: match
|
|
31853
31921
|
});
|
|
31854
31922
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
31855
|
-
return _extends$
|
|
31923
|
+
return _extends$h({}, state, {
|
|
31856
31924
|
searchQuery: ''
|
|
31857
31925
|
});
|
|
31858
31926
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
31859
|
-
return _extends$
|
|
31927
|
+
return _extends$h({}, state, {
|
|
31860
31928
|
items: [].concat(state.items, [{
|
|
31861
31929
|
id: action.id,
|
|
31862
31930
|
dataRef: action.dataRef
|
|
@@ -31869,7 +31937,7 @@ var ActionTypes;
|
|
|
31869
31937
|
return a.id === action.id;
|
|
31870
31938
|
});
|
|
31871
31939
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
31872
|
-
return _extends$
|
|
31940
|
+
return _extends$h({}, state, {
|
|
31873
31941
|
items: nextItems,
|
|
31874
31942
|
activeItemIndex: function () {
|
|
31875
31943
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -31908,19 +31976,19 @@ var ActionTypes$1;
|
|
|
31908
31976
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
31909
31977
|
if (state.disabled) return state;
|
|
31910
31978
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
31911
|
-
return _extends$
|
|
31979
|
+
return _extends$h({}, state, {
|
|
31912
31980
|
activeOptionIndex: null,
|
|
31913
31981
|
listboxState: ListboxStates.Closed
|
|
31914
31982
|
});
|
|
31915
31983
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
31916
31984
|
if (state.disabled) return state;
|
|
31917
31985
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
31918
|
-
return _extends$
|
|
31986
|
+
return _extends$h({}, state, {
|
|
31919
31987
|
listboxState: ListboxStates.Open
|
|
31920
31988
|
});
|
|
31921
31989
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
31922
31990
|
if (state.disabled === action.disabled) return state;
|
|
31923
|
-
return _extends$
|
|
31991
|
+
return _extends$h({}, state, {
|
|
31924
31992
|
disabled: action.disabled
|
|
31925
31993
|
});
|
|
31926
31994
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -31941,7 +32009,7 @@ var ActionTypes$1;
|
|
|
31941
32009
|
}
|
|
31942
32010
|
});
|
|
31943
32011
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
31944
|
-
return _extends$
|
|
32012
|
+
return _extends$h({}, state, {
|
|
31945
32013
|
searchQuery: '',
|
|
31946
32014
|
activeOptionIndex: activeOptionIndex
|
|
31947
32015
|
});
|
|
@@ -31954,10 +32022,10 @@ var ActionTypes$1;
|
|
|
31954
32022
|
|
|
31955
32023
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
31956
32024
|
});
|
|
31957
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
32025
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
|
|
31958
32026
|
searchQuery: searchQuery
|
|
31959
32027
|
});
|
|
31960
|
-
return _extends$
|
|
32028
|
+
return _extends$h({}, state, {
|
|
31961
32029
|
searchQuery: searchQuery,
|
|
31962
32030
|
activeOptionIndex: match
|
|
31963
32031
|
});
|
|
@@ -31965,11 +32033,11 @@ var ActionTypes$1;
|
|
|
31965
32033
|
if (state.disabled) return state;
|
|
31966
32034
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
31967
32035
|
if (state.searchQuery === '') return state;
|
|
31968
|
-
return _extends$
|
|
32036
|
+
return _extends$h({}, state, {
|
|
31969
32037
|
searchQuery: ''
|
|
31970
32038
|
});
|
|
31971
32039
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
31972
|
-
return _extends$
|
|
32040
|
+
return _extends$h({}, state, {
|
|
31973
32041
|
options: [].concat(state.options, [{
|
|
31974
32042
|
id: action.id,
|
|
31975
32043
|
dataRef: action.dataRef
|
|
@@ -31982,7 +32050,7 @@ var ActionTypes$1;
|
|
|
31982
32050
|
return a.id === action.id;
|
|
31983
32051
|
});
|
|
31984
32052
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
31985
|
-
return _extends$
|
|
32053
|
+
return _extends$h({}, state, {
|
|
31986
32054
|
options: nextOptions,
|
|
31987
32055
|
activeOptionIndex: function () {
|
|
31988
32056
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -32000,13 +32068,31 @@ Features.RenderStrategy | Features.Static;
|
|
|
32000
32068
|
var GroupContext = /*#__PURE__*/React.createContext(null);
|
|
32001
32069
|
GroupContext.displayName = 'GroupContext';
|
|
32002
32070
|
|
|
32071
|
+
var _path$g;
|
|
32072
|
+
|
|
32073
|
+
function _extends$g() { _extends$g = 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$g.apply(this, arguments); }
|
|
32074
|
+
|
|
32075
|
+
function SvgExit(props) {
|
|
32076
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
32077
|
+
className: "plc-w-6 plc-h-6",
|
|
32078
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32079
|
+
fill: "none",
|
|
32080
|
+
viewBox: "0 0 24 24",
|
|
32081
|
+
stroke: "currentColor"
|
|
32082
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
32083
|
+
strokeLinecap: "round",
|
|
32084
|
+
strokeLinejoin: "round",
|
|
32085
|
+
strokeWidth: 2,
|
|
32086
|
+
d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
|
32087
|
+
})));
|
|
32088
|
+
}
|
|
32089
|
+
|
|
32003
32090
|
var _path$f;
|
|
32004
32091
|
|
|
32005
32092
|
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); }
|
|
32006
32093
|
|
|
32007
|
-
function
|
|
32094
|
+
function SvgUser(props) {
|
|
32008
32095
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
32009
|
-
className: "plc-w-6 plc-h-6",
|
|
32010
32096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32011
32097
|
fill: "none",
|
|
32012
32098
|
viewBox: "0 0 24 24",
|
|
@@ -32015,7 +32101,7 @@ function SvgExit(props) {
|
|
|
32015
32101
|
strokeLinecap: "round",
|
|
32016
32102
|
strokeLinejoin: "round",
|
|
32017
32103
|
strokeWidth: 2,
|
|
32018
|
-
d: "
|
|
32104
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
32019
32105
|
})));
|
|
32020
32106
|
}
|
|
32021
32107
|
|
|
@@ -32023,9 +32109,10 @@ var _path$e;
|
|
|
32023
32109
|
|
|
32024
32110
|
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); }
|
|
32025
32111
|
|
|
32026
|
-
function
|
|
32112
|
+
function SvgNewsletter(props) {
|
|
32027
32113
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
32028
32114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32115
|
+
className: "plc-h-5 plc-w-5",
|
|
32029
32116
|
fill: "none",
|
|
32030
32117
|
viewBox: "0 0 24 24",
|
|
32031
32118
|
stroke: "currentColor"
|
|
@@ -32033,7 +32120,7 @@ function SvgUser(props) {
|
|
|
32033
32120
|
strokeLinecap: "round",
|
|
32034
32121
|
strokeLinejoin: "round",
|
|
32035
32122
|
strokeWidth: 2,
|
|
32036
|
-
d: "
|
|
32123
|
+
d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
|
|
32037
32124
|
})));
|
|
32038
32125
|
}
|
|
32039
32126
|
|
|
@@ -32041,10 +32128,10 @@ var _path$d;
|
|
|
32041
32128
|
|
|
32042
32129
|
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); }
|
|
32043
32130
|
|
|
32044
|
-
function
|
|
32131
|
+
function SvgRefresh(props) {
|
|
32045
32132
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
32133
|
+
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
32046
32134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32047
|
-
className: "plc-h-5 plc-w-5",
|
|
32048
32135
|
fill: "none",
|
|
32049
32136
|
viewBox: "0 0 24 24",
|
|
32050
32137
|
stroke: "currentColor"
|
|
@@ -32052,7 +32139,7 @@ function SvgNewsletter(props) {
|
|
|
32052
32139
|
strokeLinecap: "round",
|
|
32053
32140
|
strokeLinejoin: "round",
|
|
32054
32141
|
strokeWidth: 2,
|
|
32055
|
-
d: "
|
|
32142
|
+
d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
|
|
32056
32143
|
})));
|
|
32057
32144
|
}
|
|
32058
32145
|
|
|
@@ -32060,10 +32147,10 @@ var _path$c;
|
|
|
32060
32147
|
|
|
32061
32148
|
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); }
|
|
32062
32149
|
|
|
32063
|
-
function
|
|
32150
|
+
function SvgDocument(props) {
|
|
32064
32151
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
32065
|
-
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
32066
32152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32153
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
32067
32154
|
fill: "none",
|
|
32068
32155
|
viewBox: "0 0 24 24",
|
|
32069
32156
|
stroke: "currentColor"
|
|
@@ -32071,7 +32158,7 @@ function SvgRefresh(props) {
|
|
|
32071
32158
|
strokeLinecap: "round",
|
|
32072
32159
|
strokeLinejoin: "round",
|
|
32073
32160
|
strokeWidth: 2,
|
|
32074
|
-
d: "
|
|
32161
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
32075
32162
|
})));
|
|
32076
32163
|
}
|
|
32077
32164
|
|
|
@@ -32079,10 +32166,10 @@ var _path$b;
|
|
|
32079
32166
|
|
|
32080
32167
|
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); }
|
|
32081
32168
|
|
|
32082
|
-
function
|
|
32169
|
+
function SvgPaymentCard(props) {
|
|
32083
32170
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
32171
|
+
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
32084
32172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32085
|
-
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
32086
32173
|
fill: "none",
|
|
32087
32174
|
viewBox: "0 0 24 24",
|
|
32088
32175
|
stroke: "currentColor"
|
|
@@ -32090,15 +32177,15 @@ function SvgDocument(props) {
|
|
|
32090
32177
|
strokeLinecap: "round",
|
|
32091
32178
|
strokeLinejoin: "round",
|
|
32092
32179
|
strokeWidth: 2,
|
|
32093
|
-
d: "
|
|
32180
|
+
d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
|
|
32094
32181
|
})));
|
|
32095
32182
|
}
|
|
32096
32183
|
|
|
32097
|
-
var _path$a;
|
|
32184
|
+
var _path$a, _path2;
|
|
32098
32185
|
|
|
32099
32186
|
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); }
|
|
32100
32187
|
|
|
32101
|
-
function
|
|
32188
|
+
function SvgLocationPin(props) {
|
|
32102
32189
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
32103
32190
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
32104
32191
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32109,15 +32196,20 @@ function SvgPaymentCard(props) {
|
|
|
32109
32196
|
strokeLinecap: "round",
|
|
32110
32197
|
strokeLinejoin: "round",
|
|
32111
32198
|
strokeWidth: 2,
|
|
32112
|
-
d: "
|
|
32199
|
+
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
32200
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
32201
|
+
strokeLinecap: "round",
|
|
32202
|
+
strokeLinejoin: "round",
|
|
32203
|
+
strokeWidth: 2,
|
|
32204
|
+
d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
32113
32205
|
})));
|
|
32114
32206
|
}
|
|
32115
32207
|
|
|
32116
|
-
var _path$9
|
|
32208
|
+
var _path$9;
|
|
32117
32209
|
|
|
32118
32210
|
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); }
|
|
32119
32211
|
|
|
32120
|
-
function
|
|
32212
|
+
function SvgShopping(props) {
|
|
32121
32213
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
32122
32214
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
32123
32215
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32128,12 +32220,7 @@ function SvgLocationPin(props) {
|
|
|
32128
32220
|
strokeLinecap: "round",
|
|
32129
32221
|
strokeLinejoin: "round",
|
|
32130
32222
|
strokeWidth: 2,
|
|
32131
|
-
d: "
|
|
32132
|
-
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
32133
|
-
strokeLinecap: "round",
|
|
32134
|
-
strokeLinejoin: "round",
|
|
32135
|
-
strokeWidth: 2,
|
|
32136
|
-
d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
32223
|
+
d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"
|
|
32137
32224
|
})));
|
|
32138
32225
|
}
|
|
32139
32226
|
|
|
@@ -32141,7 +32228,7 @@ var _path$8;
|
|
|
32141
32228
|
|
|
32142
32229
|
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); }
|
|
32143
32230
|
|
|
32144
|
-
function
|
|
32231
|
+
function SvgBookmark(props) {
|
|
32145
32232
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
32146
32233
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
32147
32234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32152,7 +32239,7 @@ function SvgShopping(props) {
|
|
|
32152
32239
|
strokeLinecap: "round",
|
|
32153
32240
|
strokeLinejoin: "round",
|
|
32154
32241
|
strokeWidth: 2,
|
|
32155
|
-
d: "
|
|
32242
|
+
d: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"
|
|
32156
32243
|
})));
|
|
32157
32244
|
}
|
|
32158
32245
|
|
|
@@ -32160,9 +32247,9 @@ var _path$7;
|
|
|
32160
32247
|
|
|
32161
32248
|
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); }
|
|
32162
32249
|
|
|
32163
|
-
function
|
|
32250
|
+
function SvgPlus(props) {
|
|
32164
32251
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
32165
|
-
className: "plc-w-
|
|
32252
|
+
className: "plc-w-5 plc-h-5",
|
|
32166
32253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32167
32254
|
fill: "none",
|
|
32168
32255
|
viewBox: "0 0 24 24",
|
|
@@ -32171,7 +32258,7 @@ function SvgBookmark(props) {
|
|
|
32171
32258
|
strokeLinecap: "round",
|
|
32172
32259
|
strokeLinejoin: "round",
|
|
32173
32260
|
strokeWidth: 2,
|
|
32174
|
-
d: "
|
|
32261
|
+
d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
|
|
32175
32262
|
})));
|
|
32176
32263
|
}
|
|
32177
32264
|
|
|
@@ -32179,18 +32266,15 @@ var _path$6;
|
|
|
32179
32266
|
|
|
32180
32267
|
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); }
|
|
32181
32268
|
|
|
32182
|
-
function
|
|
32269
|
+
function SvgKey(props) {
|
|
32183
32270
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
32184
|
-
className: "plc-w-5 plc-h-5",
|
|
32185
32271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
stroke: "currentColor"
|
|
32272
|
+
viewBox: "0 0 20 20",
|
|
32273
|
+
fill: "currentColor"
|
|
32189
32274
|
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
32190
|
-
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
|
|
32275
|
+
fillRule: "evenodd",
|
|
32276
|
+
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",
|
|
32277
|
+
clipRule: "evenodd"
|
|
32194
32278
|
})));
|
|
32195
32279
|
}
|
|
32196
32280
|
|
|
@@ -32315,7 +32399,7 @@ const SavedItems = ({
|
|
|
32315
32399
|
const [isLoading, setLoading] = React.useState(false);
|
|
32316
32400
|
const {
|
|
32317
32401
|
isAuthenticated
|
|
32318
|
-
} = usePelcro
|
|
32402
|
+
} = usePelcro();
|
|
32319
32403
|
|
|
32320
32404
|
const removeItemFromMetadata = (category, title) => {
|
|
32321
32405
|
const user = window.Pelcro.user.read();
|
|
@@ -32486,7 +32570,7 @@ const SubscriptionsItems = ({
|
|
|
32486
32570
|
setSubscriptionToCancel,
|
|
32487
32571
|
setSubscriptionToSuspend,
|
|
32488
32572
|
set
|
|
32489
|
-
} = usePelcro
|
|
32573
|
+
} = usePelcro();
|
|
32490
32574
|
const subs = getNonDonationSubs();
|
|
32491
32575
|
if (subs.length === 0) return null;
|
|
32492
32576
|
return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
@@ -32506,6 +32590,7 @@ const SubscriptionsItems = ({
|
|
|
32506
32590
|
return switchView("email-verify");
|
|
32507
32591
|
}
|
|
32508
32592
|
|
|
32593
|
+
switchView(null);
|
|
32509
32594
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
32510
32595
|
notify.confirm((onSuccess, onFailure) => {
|
|
32511
32596
|
cancelSubscription(sub.id, onSuccess, onFailure);
|
|
@@ -32904,7 +32989,7 @@ const DonationsMenu = ({
|
|
|
32904
32989
|
const {
|
|
32905
32990
|
t
|
|
32906
32991
|
} = useTranslation("dashboard");
|
|
32907
|
-
usePelcro
|
|
32992
|
+
usePelcro();
|
|
32908
32993
|
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
32909
32994
|
|
|
32910
32995
|
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
@@ -32982,7 +33067,7 @@ const InvoicesItems = () => {
|
|
|
32982
33067
|
const {
|
|
32983
33068
|
setInvoice,
|
|
32984
33069
|
switchView
|
|
32985
|
-
} = usePelcro
|
|
33070
|
+
} = usePelcro();
|
|
32986
33071
|
const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
32987
33072
|
|
|
32988
33073
|
const showInvoiceDetails = event => {
|
|
@@ -33131,7 +33216,7 @@ const MembershipsItems = props => {
|
|
|
33131
33216
|
switchView,
|
|
33132
33217
|
setSelectedMembership,
|
|
33133
33218
|
switchToAddressView
|
|
33134
|
-
} = usePelcro
|
|
33219
|
+
} = usePelcro();
|
|
33135
33220
|
const memberships = getActiveMemberships();
|
|
33136
33221
|
|
|
33137
33222
|
const onChangeAddressClick = membershipId => {
|
|
@@ -33359,7 +33444,7 @@ const AddressesItems = props => {
|
|
|
33359
33444
|
useTranslation("dashboard");
|
|
33360
33445
|
const {
|
|
33361
33446
|
switchView
|
|
33362
|
-
} = usePelcro
|
|
33447
|
+
} = usePelcro();
|
|
33363
33448
|
const [selectedAddressId, setSelectedAddressId] = React.useState(null);
|
|
33364
33449
|
const allAddresses = (_window$Pelcro$user$r = window.Pelcro.user.read().addresses) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
33365
33450
|
|
|
@@ -34903,7 +34988,7 @@ const ProfileMenu = props => {
|
|
|
34903
34988
|
} = useTranslation("dashboard");
|
|
34904
34989
|
const {
|
|
34905
34990
|
switchView
|
|
34906
|
-
} = usePelcro
|
|
34991
|
+
} = usePelcro();
|
|
34907
34992
|
|
|
34908
34993
|
const onPictureClick = () => {
|
|
34909
34994
|
switchView("profile-picture");
|
|
@@ -35068,9 +35153,21 @@ const NewsLettersItems = ({
|
|
|
35068
35153
|
});
|
|
35069
35154
|
};
|
|
35070
35155
|
|
|
35156
|
+
const PasswordChangeMenu = () => {
|
|
35157
|
+
const {
|
|
35158
|
+
t
|
|
35159
|
+
} = useTranslation("dashboard");
|
|
35160
|
+
return /*#__PURE__*/React__default['default'].createElement(Card, {
|
|
35161
|
+
id: "pelcro-dashboard-profile-menu",
|
|
35162
|
+
className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
|
|
35163
|
+
title: t("labels.changePassword")
|
|
35164
|
+
}, /*#__PURE__*/React__default['default'].createElement(PasswordChangeView, null));
|
|
35165
|
+
};
|
|
35166
|
+
|
|
35071
35167
|
const SUB_MENUS = {
|
|
35072
35168
|
PROFILE: "profile",
|
|
35073
35169
|
QRCODE: "qr-code",
|
|
35170
|
+
PASSWORDCHANGE: "passwordChange",
|
|
35074
35171
|
SUBSCRIPTIONS: "subscriptions",
|
|
35075
35172
|
DONATIONS: "donations",
|
|
35076
35173
|
MEMBERSHIPS: "memberships",
|
|
@@ -35098,7 +35195,7 @@ function DashboardWithHook(props) {
|
|
|
35098
35195
|
resetView,
|
|
35099
35196
|
logout,
|
|
35100
35197
|
set
|
|
35101
|
-
} = usePelcro
|
|
35198
|
+
} = usePelcro();
|
|
35102
35199
|
return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
|
|
35103
35200
|
setAddress: addressIdToEdit => set({
|
|
35104
35201
|
addressIdToEdit
|
|
@@ -35477,7 +35574,16 @@ class Dashboard extends React.Component {
|
|
|
35477
35574
|
className: "plc-font-bold"
|
|
35478
35575
|
}, this.user.first_name, " ", this.user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
35479
35576
|
className: `plc-m-0 plc-text-sm ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
|
|
35480
|
-
}, this.user.email))
|
|
35577
|
+
}, this.user.email)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35578
|
+
className: "lg:plc-hidden"
|
|
35579
|
+
}, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
35580
|
+
variant: "ghost",
|
|
35581
|
+
type: "button",
|
|
35582
|
+
className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
|
|
35583
|
+
onClick: this.closeDashboard
|
|
35584
|
+
}, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
|
|
35585
|
+
className: "plc-fill-current"
|
|
35586
|
+
}))))), /*#__PURE__*/React__default['default'].createElement("section", {
|
|
35481
35587
|
className: "plc-mt-6 plc-shadow-sm"
|
|
35482
35588
|
}, /*#__PURE__*/React__default['default'].createElement("header", {
|
|
35483
35589
|
className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
|
|
@@ -35499,6 +35605,14 @@ class Dashboard extends React.Component {
|
|
|
35499
35605
|
title: "My QR code",
|
|
35500
35606
|
setActiveDashboardLink: this.setActiveDashboardLink,
|
|
35501
35607
|
activeDashboardLink: this.state.activeDashboardLink
|
|
35608
|
+
}), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
|
|
35609
|
+
name: SUB_MENUS.PASSWORDCHANGE,
|
|
35610
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgKey, {
|
|
35611
|
+
className: "plc-w-6 plc-h-6 plc-mr-2"
|
|
35612
|
+
}),
|
|
35613
|
+
title: "Change password",
|
|
35614
|
+
setActiveDashboardLink: this.setActiveDashboardLink,
|
|
35615
|
+
activeDashboardLink: this.state.activeDashboardLink
|
|
35502
35616
|
}), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
|
|
35503
35617
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
35504
35618
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -35586,7 +35700,7 @@ class Dashboard extends React.Component {
|
|
|
35586
35700
|
}))), this.state.activeDashboardLink && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35587
35701
|
id: "pelcro-view-dashboard-submenus",
|
|
35588
35702
|
className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
|
|
35589
|
-
}, this.state.activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), this.state.activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), this.state.activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), this.state.activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, {
|
|
35703
|
+
}, this.state.activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), this.state.activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), this.state.activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default['default'].createElement(PasswordChangeMenu, null), this.state.activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), this.state.activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, {
|
|
35590
35704
|
displaySourceCreate: this.displaySourceCreate
|
|
35591
35705
|
}), this.state.activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default['default'].createElement(AddressesMenu, {
|
|
35592
35706
|
displayAddressCreate: this.displayAddressCreate,
|
|
@@ -35647,7 +35761,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
|
35647
35761
|
const DashboardOpenButton = () => {
|
|
35648
35762
|
const {
|
|
35649
35763
|
switchView
|
|
35650
|
-
} = usePelcro
|
|
35764
|
+
} = usePelcro();
|
|
35651
35765
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35652
35766
|
className: "plc-fixed plc-left-4 plc-bottom-4 pelcro-open-dashboard-btn"
|
|
35653
35767
|
}, /*#__PURE__*/React__default['default'].createElement("button", {
|
|
@@ -37405,7 +37519,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
37405
37519
|
} = useTranslation("userEdit");
|
|
37406
37520
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
37407
37521
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
|
|
37408
|
-
className: "plc-h-6 plc-w-6"
|
|
37522
|
+
className: "plc-h-6 plc-w-6 plc-fill-current"
|
|
37409
37523
|
}),
|
|
37410
37524
|
isLoading: isSubmitting,
|
|
37411
37525
|
onClick: () => {
|
|
@@ -37640,9 +37754,9 @@ const EmailVerifyModal = ({
|
|
|
37640
37754
|
} = usePelcro();
|
|
37641
37755
|
|
|
37642
37756
|
const onSuccess = res => {
|
|
37643
|
-
var
|
|
37757
|
+
var _otherProps$onSuccess;
|
|
37644
37758
|
|
|
37645
|
-
(
|
|
37759
|
+
otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
|
|
37646
37760
|
|
|
37647
37761
|
if (product) {
|
|
37648
37762
|
if (product.address_required) {
|
|
@@ -37801,7 +37915,7 @@ function VerifyLinkTokenModal({
|
|
|
37801
37915
|
} = useTranslation("verifyLinkToken");
|
|
37802
37916
|
const {
|
|
37803
37917
|
resetView
|
|
37804
|
-
} = usePelcro
|
|
37918
|
+
} = usePelcro();
|
|
37805
37919
|
|
|
37806
37920
|
const onSuccess = res => {
|
|
37807
37921
|
var _props$onSuccess;
|
|
@@ -37850,7 +37964,7 @@ const InvoicePaymentModal = ({
|
|
|
37850
37964
|
}) => {
|
|
37851
37965
|
const {
|
|
37852
37966
|
switchView
|
|
37853
|
-
} = usePelcro
|
|
37967
|
+
} = usePelcro();
|
|
37854
37968
|
const {
|
|
37855
37969
|
t
|
|
37856
37970
|
} = useTranslation("payment");
|
|
@@ -37934,7 +38048,7 @@ const InvoiceDetailsDownloadButton = ({
|
|
|
37934
38048
|
} = useTranslation("invoiceDetails");
|
|
37935
38049
|
const {
|
|
37936
38050
|
invoice
|
|
37937
|
-
} = usePelcro
|
|
38051
|
+
} = usePelcro();
|
|
37938
38052
|
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
37939
38053
|
className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
|
|
37940
38054
|
id: "pelcro-download-invoice-link",
|
|
@@ -37971,7 +38085,7 @@ const InvoiceDetailsView = props => {
|
|
|
37971
38085
|
} = useTranslation("invoiceDetails");
|
|
37972
38086
|
const {
|
|
37973
38087
|
invoice
|
|
37974
|
-
} = usePelcro
|
|
38088
|
+
} = usePelcro();
|
|
37975
38089
|
const showPayButton = canPayInvoice(invoice);
|
|
37976
38090
|
const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
|
|
37977
38091
|
const hasPlanDetails = Boolean(invoice.plan);
|
|
@@ -38035,7 +38149,7 @@ const InvoiceDetailsModal = ({
|
|
|
38035
38149
|
}) => {
|
|
38036
38150
|
const {
|
|
38037
38151
|
switchToPaymentView
|
|
38038
|
-
} = usePelcro
|
|
38152
|
+
} = usePelcro();
|
|
38039
38153
|
const {
|
|
38040
38154
|
t
|
|
38041
38155
|
} = useTranslation("invoiceDetails");
|
|
@@ -38325,4 +38439,4 @@ exports.initContentEntitlement = init;
|
|
|
38325
38439
|
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
38326
38440
|
exports.notify = notify;
|
|
38327
38441
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
38328
|
-
exports.usePelcro = usePelcro
|
|
38442
|
+
exports.usePelcro = usePelcro;
|