@pelcro/react-pelcro-js 4.0.0-alpha.32 → 4.0.0-alpha.34
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 +1020 -925
- package/dist/index.esm.js +1002 -925
- package/dist/pelcro.css +562 -570
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3715,7 +3715,7 @@ var passwordChange_en = {
|
|
|
3715
3715
|
weakPassword: weakPassword$3
|
|
3716
3716
|
};
|
|
3717
3717
|
|
|
3718
|
-
var title$w = "Passwordless
|
|
3718
|
+
var title$w = "Passwordless";
|
|
3719
3719
|
var email$9 = "Enter email";
|
|
3720
3720
|
var submit$c = "Submit";
|
|
3721
3721
|
var required$c = "Required";
|
|
@@ -4660,7 +4660,7 @@ var passwordChange_fr = {
|
|
|
4660
4660
|
weakPassword: weakPassword$2
|
|
4661
4661
|
};
|
|
4662
4662
|
|
|
4663
|
-
var title$n = "
|
|
4663
|
+
var title$n = "Sans mot de passe";
|
|
4664
4664
|
var email$6 = "Entrez votre adresse courriel";
|
|
4665
4665
|
var submit$8 = "Soumettre";
|
|
4666
4666
|
var required$8 = "Champs obligatoires";
|
|
@@ -5551,7 +5551,7 @@ var passwordChange_ko = {
|
|
|
5551
5551
|
weakPassword: weakPassword$1
|
|
5552
5552
|
};
|
|
5553
5553
|
|
|
5554
|
-
var title$e = "
|
|
5554
|
+
var title$e = "암호 없음";
|
|
5555
5555
|
var email$3 = "이메일 입력";
|
|
5556
5556
|
var submit$4 = "제출";
|
|
5557
5557
|
var required$4 = "필수 항목";
|
|
@@ -6489,7 +6489,7 @@ var passwordChange_es = {
|
|
|
6489
6489
|
weakPassword: weakPassword
|
|
6490
6490
|
};
|
|
6491
6491
|
|
|
6492
|
-
var title$5 = "
|
|
6492
|
+
var title$5 = "sin contraseña";
|
|
6493
6493
|
var email = "Ingresar correo";
|
|
6494
6494
|
var submit = "Enviar";
|
|
6495
6495
|
var required = "obligatorio";
|
|
@@ -6831,7 +6831,7 @@ var subscriptionSuspend_es = {
|
|
|
6831
6831
|
messages: messages
|
|
6832
6832
|
};
|
|
6833
6833
|
|
|
6834
|
-
var title$2 = "
|
|
6834
|
+
var title$2 = "QR code";
|
|
6835
6835
|
var qr_en = {
|
|
6836
6836
|
title: title$2
|
|
6837
6837
|
};
|
|
@@ -8242,7 +8242,7 @@ class PelcroActions {
|
|
|
8242
8242
|
view,
|
|
8243
8243
|
cartItems,
|
|
8244
8244
|
...otherStateFields
|
|
8245
|
-
} = initialState$
|
|
8245
|
+
} = initialState$o;
|
|
8246
8246
|
this.set(otherStateFields);
|
|
8247
8247
|
});
|
|
8248
8248
|
|
|
@@ -8648,7 +8648,7 @@ class PelcroCallbacks {
|
|
|
8648
8648
|
|
|
8649
8649
|
}
|
|
8650
8650
|
|
|
8651
|
-
const initialState$
|
|
8651
|
+
const initialState$o = {
|
|
8652
8652
|
// View
|
|
8653
8653
|
view: null,
|
|
8654
8654
|
// Plans
|
|
@@ -8683,7 +8683,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
8683
8683
|
return {
|
|
8684
8684
|
// Store setter
|
|
8685
8685
|
set,
|
|
8686
|
-
...initialState$
|
|
8686
|
+
...initialState$o,
|
|
8687
8687
|
// State actions
|
|
8688
8688
|
...actions,
|
|
8689
8689
|
// Callbacks
|
|
@@ -12104,9 +12104,18 @@ const HANDLE_INVITE_MEMBERS = "HANDLE_INVITE_MEMBERS";
|
|
|
12104
12104
|
const HANDLE_REMOVE_MEMBER = "HANDLE_REMOVE_MEMBER";
|
|
12105
12105
|
const UPDATE_INVITE_BUTTON = "UPDATE_INVITE_BUTTON";
|
|
12106
12106
|
const UPDATE_MEMBERS = "UPDATE_MEMBERS";
|
|
12107
|
-
const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
|
|
12107
|
+
const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID"; //Dashboard
|
|
12108
12108
|
|
|
12109
|
-
const
|
|
12109
|
+
const SET_IS_OPEN = "SET_IS_OPEN";
|
|
12110
|
+
const SET_ADDRESSES = "SET_ADDRESSES";
|
|
12111
|
+
const CLOSE_DASHBOARD = "CLOSE_DASHBOARD";
|
|
12112
|
+
const SET_ACTIVE_DASHBOARD_LINK = "SET_ACTIVE_DASHBOARD_LINK";
|
|
12113
|
+
const SET_DISABLESUBMIT = "SET_DISABLESUBMIT";
|
|
12114
|
+
const CANCEL_SUBSCRIPTION = "CANCEL_SUBSCRIPTION";
|
|
12115
|
+
const UNSUSPEND_SUBSCRIPTION = "UNSUSPEND_SUBSCRIPTION";
|
|
12116
|
+
const REACTIVATE_SUBSCRIPTION = "REACTIVATE_SUBSCRIPTION"; //========
|
|
12117
|
+
|
|
12118
|
+
const initialState$n = {
|
|
12110
12119
|
email: "",
|
|
12111
12120
|
username: "",
|
|
12112
12121
|
password: "",
|
|
@@ -12119,10 +12128,10 @@ const initialState$m = {
|
|
|
12119
12128
|
content: ""
|
|
12120
12129
|
}
|
|
12121
12130
|
};
|
|
12122
|
-
const store$
|
|
12131
|
+
const store$n = /*#__PURE__*/createContext(initialState$n);
|
|
12123
12132
|
const {
|
|
12124
|
-
Provider: Provider$
|
|
12125
|
-
} = store$
|
|
12133
|
+
Provider: Provider$n
|
|
12134
|
+
} = store$n;
|
|
12126
12135
|
|
|
12127
12136
|
const LoginContainer = ({
|
|
12128
12137
|
style,
|
|
@@ -12246,7 +12255,7 @@ const LoginContainer = ({
|
|
|
12246
12255
|
});
|
|
12247
12256
|
|
|
12248
12257
|
case RESET_LOGIN_FORM:
|
|
12249
|
-
return initialState$
|
|
12258
|
+
return initialState$n;
|
|
12250
12259
|
|
|
12251
12260
|
case DISABLE_LOGIN_BUTTON:
|
|
12252
12261
|
return lib_7({ ...state,
|
|
@@ -12264,12 +12273,12 @@ const LoginContainer = ({
|
|
|
12264
12273
|
default:
|
|
12265
12274
|
return state;
|
|
12266
12275
|
}
|
|
12267
|
-
}, initialState$
|
|
12276
|
+
}, initialState$n);
|
|
12268
12277
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12269
12278
|
style: { ...style
|
|
12270
12279
|
},
|
|
12271
12280
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
12272
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
12281
|
+
}, /*#__PURE__*/React__default.createElement(Provider$n, {
|
|
12273
12282
|
value: {
|
|
12274
12283
|
state,
|
|
12275
12284
|
dispatch
|
|
@@ -12277,12 +12286,12 @@ const LoginContainer = ({
|
|
|
12277
12286
|
}, children.length ? children.map((child, i) => {
|
|
12278
12287
|
if (child) {
|
|
12279
12288
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
12280
|
-
store: store$
|
|
12289
|
+
store: store$n,
|
|
12281
12290
|
key: i
|
|
12282
12291
|
});
|
|
12283
12292
|
}
|
|
12284
12293
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
12285
|
-
store: store$
|
|
12294
|
+
store: store$n
|
|
12286
12295
|
})));
|
|
12287
12296
|
};
|
|
12288
12297
|
|
|
@@ -12590,7 +12599,7 @@ const LoginButton = ({
|
|
|
12590
12599
|
buttonDisabled
|
|
12591
12600
|
},
|
|
12592
12601
|
dispatch
|
|
12593
|
-
} = useContext(store$
|
|
12602
|
+
} = useContext(store$n);
|
|
12594
12603
|
const {
|
|
12595
12604
|
t
|
|
12596
12605
|
} = useTranslation("login");
|
|
@@ -12649,15 +12658,15 @@ const LoginRequestLoginToken = ({
|
|
|
12649
12658
|
};
|
|
12650
12659
|
|
|
12651
12660
|
const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
12652
|
-
store: store$
|
|
12661
|
+
store: store$n
|
|
12653
12662
|
}, props));
|
|
12654
12663
|
|
|
12655
12664
|
const LoginUsername = props => /*#__PURE__*/React__default.createElement(UserNameInput, Object.assign({
|
|
12656
|
-
store: store$
|
|
12665
|
+
store: store$n
|
|
12657
12666
|
}, props));
|
|
12658
12667
|
|
|
12659
12668
|
const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
12660
|
-
store: store$
|
|
12669
|
+
store: store$n
|
|
12661
12670
|
}, props));
|
|
12662
12671
|
|
|
12663
12672
|
var _path$t;
|
|
@@ -12727,15 +12736,6 @@ const AlertWithContext = ({
|
|
|
12727
12736
|
}, otherProps), alert.content));
|
|
12728
12737
|
};
|
|
12729
12738
|
|
|
12730
|
-
function VerticalSeparator({
|
|
12731
|
-
className = "",
|
|
12732
|
-
...otherProps
|
|
12733
|
-
}) {
|
|
12734
|
-
return /*#__PURE__*/React__default.createElement("span", Object.assign({
|
|
12735
|
-
className: `pelcro-vertical-separator ${className}`
|
|
12736
|
-
}, otherProps));
|
|
12737
|
-
}
|
|
12738
|
-
|
|
12739
12739
|
var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
12740
12740
|
!function(e,t){module.exports=t(React__default);}(commonjsGlobal,function(e){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){e.exports=o(4);},function(e,t,o){e.exports=o(6)();},function(t,o){t.exports=e;},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return decodeURIComponent(e.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))};},function(e,t,o){function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t);}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),u=o(2),d=n(u),l=o(1),p=n(l),f=o(5),b=n(f),y=o(3),h=n(y),g=function(){var e=!1;try{e=!!(window.navigator&&window.navigator.standalone||navigator.userAgent.match("CriOS")||navigator.userAgent.match(/mobile/i));}catch(t){}return e},k=function(e){function t(){var e,o,n,s;r(this,t);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return o=n=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={isSdkLoaded:!1,isProcessing:!1},n.responseApi=function(e){window.FB.api("/me",{locale:n.props.language,fields:n.props.fields},function(t){a(t,e),n.props.callback(t);});},n.checkLoginState=function(e){n.setStateIfMounted({isProcessing:!1}),e.authResponse?n.responseApi(e.authResponse):n.props.onFailure?n.props.onFailure({status:e.status}):n.props.callback({status:e.status});},n.checkLoginAfterRefresh=function(e){"connected"===e.status?n.checkLoginState(e):window.FB.login(function(e){return n.checkLoginState(e)},!0);},n.click=function(e){if(n.state.isSdkLoaded&&!n.state.isProcessing&&!n.props.isDisabled){n.setState({isProcessing:!0});var t=n.props,o=t.scope,r=t.appId,i=t.onClick,s=t.returnScopes,a=t.responseType,c=t.redirectUri,u=t.disableMobileRedirect,d=t.authType,l=t.state;if("function"!=typeof i||(i(e),!e.defaultPrevented)){var p={client_id:r,redirect_uri:c,state:l,return_scopes:s,scope:o,response_type:a,auth_type:d};if(n.props.isMobile&&!u)window.location.href="https://www.facebook.com/dialog/oauth"+(0, b["default"])(p);else {if(!window.FB)return void(n.props.onFailure&&n.props.onFailure({status:"facebookNotLoaded"}));window.FB.login(n.checkLoginState,{scope:o,return_scopes:s,auth_type:p.auth_type});}}}},s=o,i(n,s)}return s(t,e),c(t,[{key:"componentDidMount",value:function(){if(this._isMounted=!0,document.getElementById("facebook-jssdk"))return void this.sdkLoaded();this.setFbAsyncInit(),this.loadSdkAsynchronously();var e=document.getElementById("fb-root");e||(e=document.createElement("div"),e.id="fb-root",document.body.appendChild(e));}},{key:"componentWillReceiveProps",value:function(e){this.state.isSdkLoaded&&e.autoLoad&&!this.props.autoLoad&&window.FB.getLoginStatus(this.checkLoginAfterRefresh);}},{key:"componentWillUnmount",value:function(){this._isMounted=!1;}},{key:"setStateIfMounted",value:function(e){this._isMounted&&this.setState(e);}},{key:"setFbAsyncInit",value:function(){var e=this,t=this.props,o=t.appId,n=t.xfbml,r=t.cookie,i=t.version,s=t.autoLoad;window.fbAsyncInit=function(){window.FB.init({version:"v"+i,appId:o,xfbml:n,cookie:r}),e.setStateIfMounted({isSdkLoaded:!0}),(s||e.isRedirectedFromFb())&&window.FB.getLoginStatus(e.checkLoginAfterRefresh);};}},{key:"isRedirectedFromFb",value:function(){var e=window.location.search;return (0, h["default"])(e,"code")||(0, h["default"])(e,"granted_scopes")}},{key:"sdkLoaded",value:function(){this.setState({isSdkLoaded:!0});}},{key:"loadSdkAsynchronously",value:function(){var e=this.props.language;!function(t,o,n){var r=t.getElementsByTagName(o)[0],i=r,s=r;t.getElementById(n)||(s=t.createElement(o),s.id=n,s.src="https://connect.facebook.net/"+e+"/sdk.js",i.parentNode.insertBefore(s,i));}(document,"script","facebook-jssdk");}},{key:"render",value:function o(){var o=this.props.render;if(!o)throw new Error("ReactFacebookLogin requires a render prop to render");var e={onClick:this.click,isDisabled:!!this.props.isDisabled,isProcessing:this.state.isProcessing,isSdkLoaded:this.state.isSdkLoaded};return this.props.render(e)}}]),t}(d["default"].Component);k.propTypes={isDisabled:p["default"].bool,callback:p["default"].func.isRequired,appId:p["default"].string.isRequired,xfbml:p["default"].bool,cookie:p["default"].bool,authType:p["default"].string,scope:p["default"].string,state:p["default"].string,responseType:p["default"].string,returnScopes:p["default"].bool,redirectUri:p["default"].string,autoLoad:p["default"].bool,disableMobileRedirect:p["default"].bool,isMobile:p["default"].bool,fields:p["default"].string,version:p["default"].string,language:p["default"].string,onClick:p["default"].func,onFailure:p["default"].func,render:p["default"].func.isRequired},k.defaultProps={redirectUri:"undefined"!=typeof window?window.location.href:"/",scope:"public_profile,email",returnScopes:!1,xfbml:!1,cookie:!1,authType:"",fields:"name",version:"2.3",language:"en_US",disableMobileRedirect:!1,isMobile:g(),onFailure:null,state:"facebookdirect",responseType:"code"},t["default"]=k;},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return "?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")};},function(e,t,o){function n(){}var r=o(7);e.exports=function(){function e(e,t,o,n,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return o.checkPropTypes=n,o.PropTypes=o,o};},function(e,t){var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=o;}])});
|
|
12741
12741
|
});
|
|
@@ -12743,7 +12743,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
12743
12743
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
12744
12744
|
facebookLoginRenderProps.FacebookLogin;
|
|
12745
12745
|
|
|
12746
|
-
const initialState$
|
|
12746
|
+
const initialState$m = {
|
|
12747
12747
|
email: "",
|
|
12748
12748
|
password: "",
|
|
12749
12749
|
emailError: null,
|
|
@@ -12760,10 +12760,10 @@ const initialState$l = {
|
|
|
12760
12760
|
content: ""
|
|
12761
12761
|
}
|
|
12762
12762
|
};
|
|
12763
|
-
const store$
|
|
12763
|
+
const store$m = /*#__PURE__*/createContext(initialState$m);
|
|
12764
12764
|
const {
|
|
12765
|
-
Provider: Provider$
|
|
12766
|
-
} = store$
|
|
12765
|
+
Provider: Provider$m
|
|
12766
|
+
} = store$m;
|
|
12767
12767
|
|
|
12768
12768
|
const RegisterContainer = ({
|
|
12769
12769
|
style,
|
|
@@ -12954,7 +12954,7 @@ const RegisterContainer = ({
|
|
|
12954
12954
|
});
|
|
12955
12955
|
|
|
12956
12956
|
case RESET_LOGIN_FORM:
|
|
12957
|
-
return initialState$
|
|
12957
|
+
return initialState$m;
|
|
12958
12958
|
|
|
12959
12959
|
case DISABLE_REGISTRATION_BUTTON:
|
|
12960
12960
|
return lib_7({ ...state,
|
|
@@ -12972,12 +12972,12 @@ const RegisterContainer = ({
|
|
|
12972
12972
|
default:
|
|
12973
12973
|
return state;
|
|
12974
12974
|
}
|
|
12975
|
-
}, initialState$
|
|
12975
|
+
}, initialState$m);
|
|
12976
12976
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12977
12977
|
style: { ...style
|
|
12978
12978
|
},
|
|
12979
12979
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
12980
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
12980
|
+
}, /*#__PURE__*/React__default.createElement(Provider$m, {
|
|
12981
12981
|
value: {
|
|
12982
12982
|
state,
|
|
12983
12983
|
dispatch
|
|
@@ -12985,12 +12985,12 @@ const RegisterContainer = ({
|
|
|
12985
12985
|
}, children.length ? children.map((child, i) => {
|
|
12986
12986
|
if (child) {
|
|
12987
12987
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
12988
|
-
store: store$
|
|
12988
|
+
store: store$m,
|
|
12989
12989
|
key: i
|
|
12990
12990
|
});
|
|
12991
12991
|
}
|
|
12992
12992
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
12993
|
-
store: store$
|
|
12993
|
+
store: store$m
|
|
12994
12994
|
})));
|
|
12995
12995
|
};
|
|
12996
12996
|
/**
|
|
@@ -13020,7 +13020,7 @@ function SvgFacebookLogo(props) {
|
|
|
13020
13020
|
}
|
|
13021
13021
|
|
|
13022
13022
|
const FacebookLoginButton = ({
|
|
13023
|
-
label = "
|
|
13023
|
+
label = "Facebook",
|
|
13024
13024
|
className = "",
|
|
13025
13025
|
labelClassName = "",
|
|
13026
13026
|
iconClassName = ""
|
|
@@ -13030,10 +13030,10 @@ const FacebookLoginButton = ({
|
|
|
13030
13030
|
const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
|
|
13031
13031
|
const {
|
|
13032
13032
|
dispatch: loginDispatch
|
|
13033
|
-
} = useContext(store$
|
|
13033
|
+
} = useContext(store$n);
|
|
13034
13034
|
const {
|
|
13035
13035
|
dispatch: registerDispatch
|
|
13036
|
-
} = useContext(store$
|
|
13036
|
+
} = useContext(store$m);
|
|
13037
13037
|
|
|
13038
13038
|
const onSuccess = facebookUser => {
|
|
13039
13039
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -13189,7 +13189,7 @@ var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){/
|
|
|
13189
13189
|
gapi.load("",{callback:window["gapi_onload"],_c:{"jsl":{"ci":{"deviceType":"desktop","oauth-flow":{"authUrl":"https://accounts.google.com/o/oauth2/auth","proxyUrl":"https://accounts.google.com/o/oauth2/postmessageRelay","disableOpt":true,"idpIframeUrl":"https://accounts.google.com/o/oauth2/iframe","usegapi":false},"debug":{"reportExceptionRate":0.05,"forceIm":false,"rethrowException":false,"host":"https://apis.google.com"},"enableMultilogin":true,"googleapis.config":{"auth":{"useFirstPartyAuthV2":true}},"isPlusUser":false,"inline":{"css":1},"disableRealtimeCallback":false,"drive_share":{"skipInitCommand":true},"csi":{"rate":0.01},"client":{"cors":false},"isLoggedIn":true,"signInDeprecation":{"rate":0.0},"include_granted_scopes":true,"llang":"pt","iframes":{"youtube":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/youtube?usegapi\u003d1","methods":["scroll","openwindow"]},"ytsubscribe":{"url":"https://www.youtube.com/subscribe_embed?usegapi\u003d1"},"plus_circle":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/plus/circle?usegapi\u003d1"},"plus_share":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/+1/sharebutton?plusShare\u003dtrue\u0026usegapi\u003d1"},"rbr_s":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarsimplescroller"},":source:":"3p","playemm":{"url":"https://play.google.com/work/embedded/search?usegapi\u003d1\u0026usegapi\u003d1"},"savetoandroidpay":{"url":"https://pay.google.com/gp/v/widget/save"},"blogger":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/blogger?usegapi\u003d1","methods":["scroll","openwindow"]},"evwidget":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/events/widget?usegapi\u003d1"},"partnersbadge":{"url":"https://www.gstatic.com/partners/badge/templates/badge.html?usegapi\u003d1"},"dataconnector":{"url":"https://dataconnector.corp.google.com/:session_prefix:ui/widgetview?usegapi\u003d1"},"surveyoptin":{"url":"https://www.google.com/shopping/customerreviews/optin?usegapi\u003d1"},":socialhost:":"https://apis.google.com","shortlists":{"url":""},"hangout":{"url":"https://talkgadget.google.com/:session_prefix:talkgadget/_/widget"},"plus_followers":{"params":{"url":""},"url":":socialhost:/_/im/_/widget/render/plus/followers?usegapi\u003d1"},"post":{"params":{"url":""},"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/post?usegapi\u003d1"},":gplus_url:":"https://plus.google.com","signin":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/signin?usegapi\u003d1","methods":["onauth"]},"rbr_i":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarinvitation"},"share":{"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/share?usegapi\u003d1"},"plusone":{"params":{"count":"","size":"","url":""},"url":":socialhost:/:session_prefix::se:_/+1/fastbutton?usegapi\u003d1"},"comments":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/comments?usegapi\u003d1","methods":["scroll","openwindow"]},":im_socialhost:":"https://plus.googleapis.com","backdrop":{"url":"https://clients3.google.com/cast/chromecast/home/widget/backdrop?usegapi\u003d1"},"visibility":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/visibility?usegapi\u003d1"},"autocomplete":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/autocomplete"},"additnow":{"url":"https://apis.google.com/marketplace/button?usegapi\u003d1","methods":["launchurl"]},":signuphost:":"https://plus.google.com","ratingbadge":{"url":"https://www.google.com/shopping/customerreviews/badge?usegapi\u003d1"},"appcirclepicker":{"url":":socialhost:/:session_prefix:_/widget/render/appcirclepicker"},"follow":{"url":":socialhost:/:session_prefix:_/widget/render/follow?usegapi\u003d1"},"community":{"url":":ctx_socialhost:/:session_prefix::im_prefix:_/widget/render/community?usegapi\u003d1"},"sharetoclassroom":{"url":"https://classroom.google.com/sharewidget?usegapi\u003d1"},"ytshare":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/ytshare?usegapi\u003d1"},"plus":{"url":":socialhost:/:session_prefix:_/widget/render/badge?usegapi\u003d1"},"family_creation":{"params":{"url":""},"url":"https://families.google.com/webcreation?usegapi\u003d1\u0026usegapi\u003d1"},"commentcount":{"url":":socialhost:/:session_prefix:_/widget/render/commentcount?usegapi\u003d1"},"configurator":{"url":":socialhost:/:session_prefix:_/plusbuttonconfigurator?usegapi\u003d1"},"zoomableimage":{"url":"https://ssl.gstatic.com/microscope/embed/"},"appfinder":{"url":"https://workspace.google.com/:session_prefix:marketplace/appfinder?usegapi\u003d1"},"savetowallet":{"url":"https://pay.google.com/gp/v/widget/save"},"person":{"url":":socialhost:/:session_prefix:_/widget/render/person?usegapi\u003d1"},"savetodrive":{"url":"https://drive.google.com/savetodrivebutton?usegapi\u003d1","methods":["save"]},"page":{"url":":socialhost:/:session_prefix:_/widget/render/page?usegapi\u003d1"},"card":{"url":":socialhost:/:session_prefix:_/hovercard/card"}}},"h":"m;/_/scs/apps-static/_/js/k\u003doz.gapi.pt_BR.l4Bv_WkVC6g.O/am\u003dwQE/d\u003d1/ct\u003dzgms/rs\u003dAGLTcCOuH5S2uqmF6E8zOW7n3yiqiwhzNQ/m\u003d__features__","u":"https://apis.google.com/js/platform.js","hee":true,"fp":"821a251b140e4add32f87f4a7a08f044a59aa0e9","dpo":false},"platform":["additnow","backdrop","blogger","comments","commentcount","community","donation","family_creation","follow","hangout","health","page","partnersbadge","person","playemm","playreview","plus","plusone","post","ratingbadge","savetoandroidpay","savetodrive","savetowallet","sharetoclassroom","shortlists","signin2","surveyoptin","visibility","youtube","ytsubscribe","zoomableimage"],"fp":"821a251b140e4add32f87f4a7a08f044a59aa0e9","annotation":["interactivepost","recobar","signin2","autocomplete","profile"],"bimodal":["signin","share"]}});
|
|
13190
13190
|
|
|
13191
13191
|
const GoogleLoginButton = ({
|
|
13192
|
-
label = "
|
|
13192
|
+
label = "Google",
|
|
13193
13193
|
className = "",
|
|
13194
13194
|
labelClassName = "",
|
|
13195
13195
|
iconClassName = ""
|
|
@@ -13199,10 +13199,10 @@ const GoogleLoginButton = ({
|
|
|
13199
13199
|
const googleClientId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
|
|
13200
13200
|
const {
|
|
13201
13201
|
dispatch: loginDispatch
|
|
13202
|
-
} = useContext(store$
|
|
13202
|
+
} = useContext(store$n);
|
|
13203
13203
|
const {
|
|
13204
13204
|
dispatch: registerDispatch
|
|
13205
|
-
} = useContext(store$
|
|
13205
|
+
} = useContext(store$m);
|
|
13206
13206
|
useEffect(() => {
|
|
13207
13207
|
gapi.load("client:auth2", () => {
|
|
13208
13208
|
gapi.auth2.init({
|
|
@@ -13272,7 +13272,7 @@ function SvgAuth0Logo(props) {
|
|
|
13272
13272
|
}
|
|
13273
13273
|
|
|
13274
13274
|
const Auth0LoginButton = ({
|
|
13275
|
-
label = "
|
|
13275
|
+
label = "Auth0",
|
|
13276
13276
|
className = "",
|
|
13277
13277
|
labelClassName = "",
|
|
13278
13278
|
iconClassName = ""
|
|
@@ -13306,10 +13306,10 @@ const Auth0LoginButton = ({
|
|
|
13306
13306
|
}, [auth0Enabled, auth0Loaded]);
|
|
13307
13307
|
const {
|
|
13308
13308
|
dispatch: loginDispatch
|
|
13309
|
-
} = useContext(store$
|
|
13309
|
+
} = useContext(store$n);
|
|
13310
13310
|
const {
|
|
13311
13311
|
dispatch: registerDispatch
|
|
13312
|
-
} = useContext(store$
|
|
13312
|
+
} = useContext(store$m);
|
|
13313
13313
|
|
|
13314
13314
|
function handleClick() {
|
|
13315
13315
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -13409,7 +13409,8 @@ function LoginView(props) {
|
|
|
13409
13409
|
const {
|
|
13410
13410
|
t
|
|
13411
13411
|
} = useTranslation("login");
|
|
13412
|
-
const
|
|
13412
|
+
const auth0LoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.auth0_client_id;
|
|
13413
|
+
const socialLoginEnabled = ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.facebook_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.google_app_id) || auth0LoginEnabled;
|
|
13413
13414
|
const passwordlessEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.passwordless_enabled;
|
|
13414
13415
|
const enableLoginWithUsername = (_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.enableLoginWithUsername;
|
|
13415
13416
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13419,23 +13420,17 @@ function LoginView(props) {
|
|
|
13419
13420
|
className: "plc-mt-2 pelcro-form"
|
|
13420
13421
|
}, /*#__PURE__*/React__default.createElement(LoginContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), socialLoginEnabled && /*#__PURE__*/React__default.createElement("div", {
|
|
13421
13422
|
className: "plc-my-5"
|
|
13422
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("
|
|
13423
|
-
className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center
|
|
13424
|
-
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, {
|
|
13425
|
-
className: "plc-
|
|
13426
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
13427
|
-
className: "plc-
|
|
13428
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
13429
|
-
className: "plc-
|
|
13430
|
-
})), /*#__PURE__*/React__default.createElement("
|
|
13431
|
-
className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center plc-mt-4"
|
|
13432
|
-
}, /*#__PURE__*/React__default.createElement(Auth0LoginButton, {
|
|
13433
|
-
className: `plc-block sm:plc-flex plc-w-full sm:plc-w-auto plc-mb-4 sm:plc-mb-0 ${passwordlessEnabled ? "plc-flex-1" : "plc-w-1/2"}`
|
|
13434
|
-
}), passwordlessEnabled && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(VerticalSeparator, {
|
|
13435
|
-
className: "plc-hidden sm:plc-inline-grid plc-mx-2 plc-h-8"
|
|
13436
|
-
}), /*#__PURE__*/React__default.createElement(LoginRequestLoginToken, {
|
|
13423
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("ul", {
|
|
13424
|
+
className: `${auth0LoginEnabled && !passwordlessEnabled || !auth0LoginEnabled && passwordlessEnabled ? "threeColumns" : "twoColumns"} loginOptions plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center`
|
|
13425
|
+
}, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(GoogleLoginButton, {
|
|
13426
|
+
className: "plc-flex plc-w-full"
|
|
13427
|
+
})), /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(FacebookLoginButton, {
|
|
13428
|
+
className: "plc-flex plc-w-full"
|
|
13429
|
+
})), auth0LoginEnabled && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Auth0LoginButton, {
|
|
13430
|
+
className: "plc-flex plc-w-full"
|
|
13431
|
+
})), passwordlessEnabled && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(LoginRequestLoginToken, {
|
|
13437
13432
|
onClick: props.onPasswordlessRequest,
|
|
13438
|
-
className: "
|
|
13433
|
+
className: "plc-flex plc-w-full"
|
|
13439
13434
|
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
13440
13435
|
className: "plc-flex plc-items-center plc-justify-between plc-mt-5"
|
|
13441
13436
|
}, /*#__PURE__*/React__default.createElement("hr", {
|
|
@@ -13689,11 +13684,11 @@ function LoginModal({
|
|
|
13689
13684
|
LoginModal.viewId = "login";
|
|
13690
13685
|
|
|
13691
13686
|
const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
13692
|
-
store: store$
|
|
13687
|
+
store: store$m
|
|
13693
13688
|
}, props));
|
|
13694
13689
|
|
|
13695
13690
|
const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
13696
|
-
store: store$
|
|
13691
|
+
store: store$m
|
|
13697
13692
|
}, props));
|
|
13698
13693
|
|
|
13699
13694
|
const RegisterButton = ({
|
|
@@ -13713,7 +13708,7 @@ const RegisterButton = ({
|
|
|
13713
13708
|
buttonDisabled
|
|
13714
13709
|
},
|
|
13715
13710
|
dispatch
|
|
13716
|
-
} = useContext(store$
|
|
13711
|
+
} = useContext(store$m);
|
|
13717
13712
|
const {
|
|
13718
13713
|
t
|
|
13719
13714
|
} = useTranslation("register");
|
|
@@ -13851,7 +13846,7 @@ function FirstName({
|
|
|
13851
13846
|
}
|
|
13852
13847
|
|
|
13853
13848
|
const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
13854
|
-
store: store$
|
|
13849
|
+
store: store$m
|
|
13855
13850
|
}, props));
|
|
13856
13851
|
|
|
13857
13852
|
function LastName({
|
|
@@ -13882,7 +13877,7 @@ function LastName({
|
|
|
13882
13877
|
}
|
|
13883
13878
|
|
|
13884
13879
|
const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
13885
|
-
store: store$
|
|
13880
|
+
store: store$m
|
|
13886
13881
|
}, props));
|
|
13887
13882
|
|
|
13888
13883
|
/**
|
|
@@ -13896,7 +13891,8 @@ function RegisterView(props) {
|
|
|
13896
13891
|
t
|
|
13897
13892
|
} = useTranslation("register");
|
|
13898
13893
|
usePelcro();
|
|
13899
|
-
const
|
|
13894
|
+
const auth0LoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.auth0_client_id;
|
|
13895
|
+
const socialLoginEnabled = ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.facebook_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.google_app_id) || auth0LoginEnabled;
|
|
13900
13896
|
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;
|
|
13901
13897
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13902
13898
|
id: "pelcro-register-view"
|
|
@@ -13905,19 +13901,15 @@ function RegisterView(props) {
|
|
|
13905
13901
|
className: "plc-mt-2 pelcro-form"
|
|
13906
13902
|
}, /*#__PURE__*/React__default.createElement(RegisterContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), socialLoginEnabled && /*#__PURE__*/React__default.createElement("div", {
|
|
13907
13903
|
className: "plc-my-5"
|
|
13908
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("
|
|
13909
|
-
className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center
|
|
13910
|
-
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, {
|
|
13911
|
-
className: "plc-
|
|
13912
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
13913
|
-
className: "plc-
|
|
13914
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
13915
|
-
className: "plc-
|
|
13916
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13917
|
-
className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center plc-mt-4"
|
|
13918
|
-
}, /*#__PURE__*/React__default.createElement(Auth0LoginButton, {
|
|
13919
|
-
className: "plc-block sm:plc-flex plc-w-full sm:plc-w-1/2 plc-mb-4 sm:plc-mb-0"
|
|
13920
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
13904
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("ul", {
|
|
13905
|
+
className: `${auth0LoginEnabled ? "threeColumns" : "twoColumns"} loginOptions plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center`
|
|
13906
|
+
}, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(GoogleLoginButton, {
|
|
13907
|
+
className: "plc-flex plc-w-full"
|
|
13908
|
+
})), /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(FacebookLoginButton, {
|
|
13909
|
+
className: "plc-flex plc-w-full"
|
|
13910
|
+
})), auth0LoginEnabled && /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement(Auth0LoginButton, {
|
|
13911
|
+
className: "plc-flex plc-w-full"
|
|
13912
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
13921
13913
|
className: "plc-flex plc-items-center plc-justify-between plc-mt-5"
|
|
13922
13914
|
}, /*#__PURE__*/React__default.createElement("hr", {
|
|
13923
13915
|
className: "plc-w-full plc-border-gray-300"
|
|
@@ -14008,7 +14000,7 @@ function TextInput({
|
|
|
14008
14000
|
|
|
14009
14001
|
const RegisterTextInput = props => {
|
|
14010
14002
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
14011
|
-
store: store$
|
|
14003
|
+
store: store$m
|
|
14012
14004
|
}));
|
|
14013
14005
|
};
|
|
14014
14006
|
|
|
@@ -18842,26 +18834,26 @@ const NextArrow = ({
|
|
|
18842
18834
|
onClick,
|
|
18843
18835
|
className
|
|
18844
18836
|
}) => /*#__PURE__*/React__default.createElement("button", {
|
|
18845
|
-
className: `sm:plc-flex plc-hidden plc-text-
|
|
18837
|
+
className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--right-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
|
|
18846
18838
|
onClick: onClick
|
|
18847
18839
|
}, /*#__PURE__*/React__default.createElement(SvgArrowThinRight, {
|
|
18848
18840
|
stroke: "currentColor",
|
|
18849
18841
|
"aria-hidden": "true",
|
|
18850
18842
|
focusable: "false",
|
|
18851
|
-
className: "plc-h-
|
|
18843
|
+
className: "plc-h-7 plc-w-7"
|
|
18852
18844
|
}));
|
|
18853
18845
|
|
|
18854
18846
|
const PrevArrow = ({
|
|
18855
18847
|
onClick,
|
|
18856
18848
|
className
|
|
18857
18849
|
}) => /*#__PURE__*/React__default.createElement("button", {
|
|
18858
|
-
className: `sm:plc-flex plc-hidden plc-text-
|
|
18850
|
+
className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--left-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
|
|
18859
18851
|
onClick: onClick
|
|
18860
18852
|
}, /*#__PURE__*/React__default.createElement(SvgArrowThinLeft, {
|
|
18861
18853
|
stroke: "currentColor",
|
|
18862
18854
|
"aria-hidden": "true",
|
|
18863
18855
|
focusable: "false",
|
|
18864
|
-
className: "plc-h-
|
|
18856
|
+
className: "plc-h-7 plc-w-7"
|
|
18865
18857
|
}));
|
|
18866
18858
|
|
|
18867
18859
|
function Carousel({
|
|
@@ -18897,7 +18889,7 @@ function Carousel({
|
|
|
18897
18889
|
}]
|
|
18898
18890
|
};
|
|
18899
18891
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18900
|
-
className: "carousel-wrapper plc-relative sm:plc-px-
|
|
18892
|
+
className: "carousel-wrapper plc-relative sm:plc-px-8 plc-px-0"
|
|
18901
18893
|
}, /*#__PURE__*/React__default.createElement(Slider, Object.assign({
|
|
18902
18894
|
ref: ref
|
|
18903
18895
|
}, settings), children));
|
|
@@ -19128,9 +19120,9 @@ class SelectModal extends Component {
|
|
|
19128
19120
|
description
|
|
19129
19121
|
} = this.state.product;
|
|
19130
19122
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19131
|
-
className: "productTabs"
|
|
19123
|
+
className: "productTabs plc-flex plc-flex-col plc-items-center"
|
|
19132
19124
|
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
19133
|
-
className: "tabs plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
|
|
19125
|
+
className: "tabs plc-w-full plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
|
|
19134
19126
|
}, this.state.productList.map((product, index) => {
|
|
19135
19127
|
var _this$state$product;
|
|
19136
19128
|
|
|
@@ -19144,7 +19136,7 @@ class SelectModal extends Component {
|
|
|
19144
19136
|
className: "plc-px-4 plc-py-2 plc-rounded plc-text-gray-600 focus:plc-outline-none plc-whitespace-nowrap"
|
|
19145
19137
|
}, product.name));
|
|
19146
19138
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
19147
|
-
className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center"
|
|
19139
|
+
className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center plc-max-w-3xl"
|
|
19148
19140
|
}, image && /*#__PURE__*/React__default.createElement("figure", {
|
|
19149
19141
|
className: "plc-mb-2"
|
|
19150
19142
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -19195,7 +19187,7 @@ class SelectModal extends Component {
|
|
|
19195
19187
|
const isChecked = this.state.plan.id === plan.id ? true : false;
|
|
19196
19188
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19197
19189
|
key: plan.id,
|
|
19198
|
-
className: `${((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.plan.id) === plan.id ? "plc-border-2 plc-border-primary
|
|
19190
|
+
className: `${((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.plan.id) === plan.id ? "plc-border-2 plc-border-primary" : "plc-border plc-border-gray-300"} plc-h-full plc-flex plc-flex-col plc-items-start plc-text-gray-900 plc-border-solid plc-rounded-md plc-bg-white pelcro-select-plan-wrapper`
|
|
19199
19191
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
19200
19192
|
wrapperClassName: "plc-w-full plc-flex plc-h-full",
|
|
19201
19193
|
className: "plc-hidden pelcro-select-plan-radio",
|
|
@@ -19206,13 +19198,13 @@ class SelectModal extends Component {
|
|
|
19206
19198
|
"data-key": plan.id,
|
|
19207
19199
|
onChange: this.selectPlan
|
|
19208
19200
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
19209
|
-
className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full
|
|
19201
|
+
className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full"
|
|
19210
19202
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
19211
19203
|
className: "pelcro-select-plan-title plc-font-medium plc-text-xl plc-break-all"
|
|
19212
19204
|
}, plan.nickname), /*#__PURE__*/React__default.createElement("p", {
|
|
19213
19205
|
className: "plc-text-sm plc-mt-1 pelcro-select-plan-description plc-text-gray-400"
|
|
19214
19206
|
}, plan.description)), /*#__PURE__*/React__default.createElement("div", {
|
|
19215
|
-
className: "plc-mt-auto plc-px-4 plc-mb-4"
|
|
19207
|
+
className: "plc-mt-auto plc-px-4 plc-mb-4 plc-border-t plc-border-gray-300"
|
|
19216
19208
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
19217
19209
|
className: "plc-pt-4 plc-mb-4 plc-font-semibold pelcro-select-plan-price plc-px-4 plc-text-center plc-flex plc-items-end plc-justify-center"
|
|
19218
19210
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -19224,7 +19216,7 @@ class SelectModal extends Component {
|
|
|
19224
19216
|
}, plan.currency), /*#__PURE__*/React__default.createElement("span", {
|
|
19225
19217
|
className: "plc-capitalize"
|
|
19226
19218
|
}, "/ ", plan.interval))), /*#__PURE__*/React__default.createElement("div", {
|
|
19227
|
-
className: `${((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.plan.id) === plan.id ? "plc-bg-primary
|
|
19219
|
+
className: `${((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.plan.id) === plan.id ? "plc-bg-primary plc-text-white" : "plc-text-primary-800"} plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary`
|
|
19228
19220
|
}, this.locale("buttons.select")))));
|
|
19229
19221
|
});
|
|
19230
19222
|
return /*#__PURE__*/React__default.createElement(Carousel, {
|
|
@@ -19379,7 +19371,7 @@ class SelectModal extends Component {
|
|
|
19379
19371
|
}, this.state.mode === "plan" && /*#__PURE__*/React__default.createElement("button", {
|
|
19380
19372
|
type: "button",
|
|
19381
19373
|
onClick: this.goBack,
|
|
19382
|
-
className: "plc-absolute plc-w-6 plc-text-gray-500 focus:plc-text-black plc-z-max plc-top-1/2 plc-left-5 plc-transform plc--translate-y-1/2 plc-border-0 hover:plc-text-black hover:plc-shadow-none plc-bg-transparent hover:plc-bg-transparent focus:plc-bg-transparent"
|
|
19374
|
+
className: "plc-absolute plc-w-6 plc-text-gray-500 focus:plc-text-black plc-z-max plc-top-1/2 plc-left-2 sm:plc-left-5 plc-transform plc--translate-y-1/2 plc-border-0 hover:plc-text-black hover:plc-shadow-none plc-bg-transparent hover:plc-bg-transparent focus:plc-bg-transparent"
|
|
19383
19375
|
}, /*#__PURE__*/React__default.createElement(SvgArrowLeft, null)), /*#__PURE__*/React__default.createElement("h4", {
|
|
19384
19376
|
className: "plc-text-2xl plc-font-semibold"
|
|
19385
19377
|
}, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle)))), /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -19398,7 +19390,7 @@ class SelectModal extends Component {
|
|
|
19398
19390
|
disabled: this.state.disabled,
|
|
19399
19391
|
onClick: this.submitOption,
|
|
19400
19392
|
id: "pelcro-submit",
|
|
19401
|
-
className: "plc-w-full plc-
|
|
19393
|
+
className: "plc-mt-2 plc-w-full plc-max-w-sm plc-ml-auto plc-mr-auto plc-block"
|
|
19402
19394
|
}, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", {
|
|
19403
19395
|
className: "plc-mb-9"
|
|
19404
19396
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -21476,7 +21468,7 @@ class TapGateway {
|
|
|
21476
21468
|
|
|
21477
21469
|
/** @type {PaymentStateType} */
|
|
21478
21470
|
|
|
21479
|
-
const initialState$
|
|
21471
|
+
const initialState$l = {
|
|
21480
21472
|
disableSubmit: false,
|
|
21481
21473
|
isLoading: false,
|
|
21482
21474
|
disableCouponButton: false,
|
|
@@ -21501,10 +21493,10 @@ const initialState$k = {
|
|
|
21501
21493
|
content: ""
|
|
21502
21494
|
}
|
|
21503
21495
|
};
|
|
21504
|
-
const store$
|
|
21496
|
+
const store$l = /*#__PURE__*/createContext(initialState$l);
|
|
21505
21497
|
const {
|
|
21506
|
-
Provider: Provider$
|
|
21507
|
-
} = store$
|
|
21498
|
+
Provider: Provider$l
|
|
21499
|
+
} = store$l;
|
|
21508
21500
|
|
|
21509
21501
|
const PaymentMethodContainerWithoutStripe = ({
|
|
21510
21502
|
style,
|
|
@@ -23187,21 +23179,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
23187
23179
|
default:
|
|
23188
23180
|
return state;
|
|
23189
23181
|
}
|
|
23190
|
-
}, initialState$
|
|
23182
|
+
}, initialState$l);
|
|
23191
23183
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23192
23184
|
style: { ...style
|
|
23193
23185
|
},
|
|
23194
23186
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
23195
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
23187
|
+
}, /*#__PURE__*/React__default.createElement(Provider$l, {
|
|
23196
23188
|
value: {
|
|
23197
23189
|
state,
|
|
23198
23190
|
dispatch
|
|
23199
23191
|
}
|
|
23200
23192
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
23201
|
-
store: store$
|
|
23193
|
+
store: store$l,
|
|
23202
23194
|
key: i
|
|
23203
23195
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
23204
|
-
store: store$
|
|
23196
|
+
store: store$l
|
|
23205
23197
|
})));
|
|
23206
23198
|
};
|
|
23207
23199
|
|
|
@@ -23229,11 +23221,11 @@ const PaymentMethodContainer = props => {
|
|
|
23229
23221
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
23230
23222
|
locale: getPageOrDefaultLanguage()
|
|
23231
23223
|
}, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
|
|
23232
|
-
store: store$
|
|
23224
|
+
store: store$l
|
|
23233
23225
|
}, props))));
|
|
23234
23226
|
} else {
|
|
23235
23227
|
return /*#__PURE__*/React__default.createElement(PaymentMethodContainerWithoutStripe, Object.assign({
|
|
23236
|
-
store: store$
|
|
23228
|
+
store: store$l
|
|
23237
23229
|
}, props));
|
|
23238
23230
|
}
|
|
23239
23231
|
};
|
|
@@ -23284,7 +23276,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
23284
23276
|
currentPlan,
|
|
23285
23277
|
updatedPrice
|
|
23286
23278
|
}
|
|
23287
|
-
} = useContext(store$
|
|
23279
|
+
} = useContext(store$l);
|
|
23288
23280
|
|
|
23289
23281
|
const updatePaymentRequest = () => {
|
|
23290
23282
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -23366,7 +23358,7 @@ const DiscountedPrice = props => {
|
|
|
23366
23358
|
taxAmount,
|
|
23367
23359
|
percentOff
|
|
23368
23360
|
}
|
|
23369
|
-
} = useContext(store$
|
|
23361
|
+
} = useContext(store$l);
|
|
23370
23362
|
const {
|
|
23371
23363
|
order,
|
|
23372
23364
|
plan
|
|
@@ -23416,7 +23408,7 @@ const SubmitPaymentMethod = ({
|
|
|
23416
23408
|
isLoading,
|
|
23417
23409
|
updatedPrice
|
|
23418
23410
|
}
|
|
23419
|
-
} = useContext(store$
|
|
23411
|
+
} = useContext(store$l);
|
|
23420
23412
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
23421
23413
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
23422
23414
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -23448,7 +23440,7 @@ const ApplyCouponButton = ({
|
|
|
23448
23440
|
disableCouponButton
|
|
23449
23441
|
},
|
|
23450
23442
|
dispatch
|
|
23451
|
-
} = useContext(store$
|
|
23443
|
+
} = useContext(store$l);
|
|
23452
23444
|
const {
|
|
23453
23445
|
t
|
|
23454
23446
|
} = useTranslation("checkoutForm");
|
|
@@ -23482,7 +23474,7 @@ const CouponCodeField = props => {
|
|
|
23482
23474
|
couponCode,
|
|
23483
23475
|
couponError
|
|
23484
23476
|
}
|
|
23485
|
-
} = useContext(store$
|
|
23477
|
+
} = useContext(store$l);
|
|
23486
23478
|
|
|
23487
23479
|
const onCouponCodeChange = e => {
|
|
23488
23480
|
dispatch({
|
|
@@ -23538,7 +23530,7 @@ const CouponCode = ({
|
|
|
23538
23530
|
state: {
|
|
23539
23531
|
enableCouponField
|
|
23540
23532
|
}
|
|
23541
|
-
} = useContext(store$
|
|
23533
|
+
} = useContext(store$l);
|
|
23542
23534
|
const {
|
|
23543
23535
|
t
|
|
23544
23536
|
} = useTranslation("checkoutForm");
|
|
@@ -23795,7 +23787,7 @@ const PaypalSubscribeButton = props => {
|
|
|
23795
23787
|
const {
|
|
23796
23788
|
dispatch,
|
|
23797
23789
|
state
|
|
23798
|
-
} = useContext(store$
|
|
23790
|
+
} = useContext(store$l);
|
|
23799
23791
|
const {
|
|
23800
23792
|
product,
|
|
23801
23793
|
plan,
|
|
@@ -23928,7 +23920,7 @@ const SelectedPaymentMethod = () => {
|
|
|
23928
23920
|
state: {
|
|
23929
23921
|
isLoading
|
|
23930
23922
|
}
|
|
23931
|
-
} = useContext(store$
|
|
23923
|
+
} = useContext(store$l);
|
|
23932
23924
|
const {
|
|
23933
23925
|
switchView,
|
|
23934
23926
|
selectedPaymentMethodId
|
|
@@ -23970,7 +23962,7 @@ const TaxAmount = () => {
|
|
|
23970
23962
|
state: {
|
|
23971
23963
|
taxAmount
|
|
23972
23964
|
}
|
|
23973
|
-
} = useContext(store$
|
|
23965
|
+
} = useContext(store$l);
|
|
23974
23966
|
const {
|
|
23975
23967
|
plan
|
|
23976
23968
|
} = usePelcro();
|
|
@@ -23989,11 +23981,11 @@ const TaxAmount = () => {
|
|
|
23989
23981
|
};
|
|
23990
23982
|
|
|
23991
23983
|
const IncludeFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
23992
|
-
store: store$
|
|
23984
|
+
store: store$l
|
|
23993
23985
|
}, props));
|
|
23994
23986
|
|
|
23995
23987
|
const IncludeLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
23996
|
-
store: store$
|
|
23988
|
+
store: store$l
|
|
23997
23989
|
}, props));
|
|
23998
23990
|
|
|
23999
23991
|
function Phone({
|
|
@@ -24022,7 +24014,7 @@ function Phone({
|
|
|
24022
24014
|
}
|
|
24023
24015
|
|
|
24024
24016
|
const IncludePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
24025
|
-
store: store$
|
|
24017
|
+
store: store$l
|
|
24026
24018
|
}, props));
|
|
24027
24019
|
|
|
24028
24020
|
const SubscriptionCreateFreePlanButton = ({
|
|
@@ -24035,7 +24027,7 @@ const SubscriptionCreateFreePlanButton = ({
|
|
|
24035
24027
|
disableSubmit
|
|
24036
24028
|
},
|
|
24037
24029
|
dispatch
|
|
24038
|
-
} = useContext(store$
|
|
24030
|
+
} = useContext(store$l);
|
|
24039
24031
|
const {
|
|
24040
24032
|
t
|
|
24041
24033
|
} = useTranslation("common");
|
|
@@ -24251,13 +24243,13 @@ function SubscriptionRenewModal({
|
|
|
24251
24243
|
}
|
|
24252
24244
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
24253
24245
|
|
|
24254
|
-
const initialState$
|
|
24246
|
+
const initialState$k = {
|
|
24255
24247
|
cancelationReason: ""
|
|
24256
24248
|
};
|
|
24257
|
-
const store$
|
|
24249
|
+
const store$k = /*#__PURE__*/createContext(initialState$k);
|
|
24258
24250
|
const {
|
|
24259
|
-
Provider: Provider$
|
|
24260
|
-
} = store$
|
|
24251
|
+
Provider: Provider$k
|
|
24252
|
+
} = store$k;
|
|
24261
24253
|
|
|
24262
24254
|
const SubscriptionCancelContainer = ({
|
|
24263
24255
|
style,
|
|
@@ -24278,21 +24270,21 @@ const SubscriptionCancelContainer = ({
|
|
|
24278
24270
|
default:
|
|
24279
24271
|
return state;
|
|
24280
24272
|
}
|
|
24281
|
-
}, initialState$
|
|
24273
|
+
}, initialState$k);
|
|
24282
24274
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24283
24275
|
style: { ...style
|
|
24284
24276
|
},
|
|
24285
24277
|
className: `pelcro-container pelcro-subscription-cancel-container ${className}`
|
|
24286
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
24278
|
+
}, /*#__PURE__*/React__default.createElement(Provider$k, {
|
|
24287
24279
|
value: {
|
|
24288
24280
|
state,
|
|
24289
24281
|
dispatch
|
|
24290
24282
|
}
|
|
24291
24283
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24292
|
-
store: store$
|
|
24284
|
+
store: store$k,
|
|
24293
24285
|
key: i
|
|
24294
24286
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24295
|
-
store: store$
|
|
24287
|
+
store: store$k
|
|
24296
24288
|
})));
|
|
24297
24289
|
};
|
|
24298
24290
|
|
|
@@ -24377,7 +24369,7 @@ const SubscriptionCancelReason = props => {
|
|
|
24377
24369
|
const {
|
|
24378
24370
|
dispatch,
|
|
24379
24371
|
state
|
|
24380
|
-
} = useContext(store$
|
|
24372
|
+
} = useContext(store$k);
|
|
24381
24373
|
|
|
24382
24374
|
const handleOnTextAreaBlur = e => {
|
|
24383
24375
|
dispatch({
|
|
@@ -24425,7 +24417,7 @@ const SubscriptionCancelNowButton = ({
|
|
|
24425
24417
|
cancelationReason
|
|
24426
24418
|
},
|
|
24427
24419
|
dispatch
|
|
24428
|
-
} = useContext(store$
|
|
24420
|
+
} = useContext(store$k);
|
|
24429
24421
|
const {
|
|
24430
24422
|
t
|
|
24431
24423
|
} = useTranslation("subscriptionCancel");
|
|
@@ -24497,7 +24489,7 @@ const SubscriptionCancelLaterButton = ({
|
|
|
24497
24489
|
cancelationReason
|
|
24498
24490
|
},
|
|
24499
24491
|
dispatch
|
|
24500
|
-
} = useContext(store$
|
|
24492
|
+
} = useContext(store$k);
|
|
24501
24493
|
const {
|
|
24502
24494
|
t
|
|
24503
24495
|
} = useTranslation("subscriptionCancel");
|
|
@@ -24608,14 +24600,14 @@ const SubscriptionCancelModal = ({
|
|
|
24608
24600
|
};
|
|
24609
24601
|
SubscriptionCancelModal.viewId = "subscription-cancel";
|
|
24610
24602
|
|
|
24611
|
-
const initialState$
|
|
24603
|
+
const initialState$j = {
|
|
24612
24604
|
suspendDate: null,
|
|
24613
24605
|
buttonDisabled: false
|
|
24614
24606
|
};
|
|
24615
|
-
const store$
|
|
24607
|
+
const store$j = /*#__PURE__*/createContext(initialState$j);
|
|
24616
24608
|
const {
|
|
24617
|
-
Provider: Provider$
|
|
24618
|
-
} = store$
|
|
24609
|
+
Provider: Provider$j
|
|
24610
|
+
} = store$j;
|
|
24619
24611
|
|
|
24620
24612
|
const SubscriptionSuspendContainer = ({
|
|
24621
24613
|
style,
|
|
@@ -24641,21 +24633,21 @@ const SubscriptionSuspendContainer = ({
|
|
|
24641
24633
|
default:
|
|
24642
24634
|
return state;
|
|
24643
24635
|
}
|
|
24644
|
-
}, initialState$
|
|
24636
|
+
}, initialState$j);
|
|
24645
24637
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24646
24638
|
style: { ...style
|
|
24647
24639
|
},
|
|
24648
24640
|
className: `pelcro-container pelcro-subscription-suspend-container ${className}`
|
|
24649
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
24641
|
+
}, /*#__PURE__*/React__default.createElement(Provider$j, {
|
|
24650
24642
|
value: {
|
|
24651
24643
|
state,
|
|
24652
24644
|
dispatch
|
|
24653
24645
|
}
|
|
24654
24646
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24655
|
-
store: store$
|
|
24647
|
+
store: store$j,
|
|
24656
24648
|
key: i
|
|
24657
24649
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24658
|
-
store: store$
|
|
24650
|
+
store: store$j
|
|
24659
24651
|
})));
|
|
24660
24652
|
};
|
|
24661
24653
|
|
|
@@ -24704,7 +24696,7 @@ const SubscriptionSuspendDate = props => {
|
|
|
24704
24696
|
const {
|
|
24705
24697
|
dispatch,
|
|
24706
24698
|
state
|
|
24707
|
-
} = useContext(store$
|
|
24699
|
+
} = useContext(store$j);
|
|
24708
24700
|
|
|
24709
24701
|
const handleInputChange = value => {
|
|
24710
24702
|
if (value) {
|
|
@@ -24746,7 +24738,7 @@ const SubscriptionSuspendButton = ({
|
|
|
24746
24738
|
buttonDisabled
|
|
24747
24739
|
},
|
|
24748
24740
|
dispatch
|
|
24749
|
-
} = useContext(store$
|
|
24741
|
+
} = useContext(store$j);
|
|
24750
24742
|
const {
|
|
24751
24743
|
t
|
|
24752
24744
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -25216,7 +25208,7 @@ class DefaultNewsLetter extends Component {
|
|
|
25216
25208
|
|
|
25217
25209
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
25218
25210
|
|
|
25219
|
-
const initialState$
|
|
25211
|
+
const initialState$i = {
|
|
25220
25212
|
didSubToNewslettersBefore: false,
|
|
25221
25213
|
newsletters: [],
|
|
25222
25214
|
isListLoading: true,
|
|
@@ -25226,10 +25218,10 @@ const initialState$h = {
|
|
|
25226
25218
|
content: ""
|
|
25227
25219
|
}
|
|
25228
25220
|
};
|
|
25229
|
-
const store$
|
|
25221
|
+
const store$i = /*#__PURE__*/createContext(initialState$i);
|
|
25230
25222
|
const {
|
|
25231
|
-
Provider: Provider$
|
|
25232
|
-
} = store$
|
|
25223
|
+
Provider: Provider$i
|
|
25224
|
+
} = store$i;
|
|
25233
25225
|
|
|
25234
25226
|
const NewsletterUpdateContainer = ({
|
|
25235
25227
|
style,
|
|
@@ -25342,7 +25334,7 @@ const NewsletterUpdateContainer = ({
|
|
|
25342
25334
|
default:
|
|
25343
25335
|
return state;
|
|
25344
25336
|
}
|
|
25345
|
-
}, initialState$
|
|
25337
|
+
}, initialState$i);
|
|
25346
25338
|
useEffect(() => {
|
|
25347
25339
|
const getUserNewsletters = () => {
|
|
25348
25340
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -25386,7 +25378,7 @@ const NewsletterUpdateContainer = ({
|
|
|
25386
25378
|
style: { ...style
|
|
25387
25379
|
},
|
|
25388
25380
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
25389
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
25381
|
+
}, /*#__PURE__*/React__default.createElement(Provider$i, {
|
|
25390
25382
|
value: {
|
|
25391
25383
|
state,
|
|
25392
25384
|
dispatch
|
|
@@ -25394,12 +25386,12 @@ const NewsletterUpdateContainer = ({
|
|
|
25394
25386
|
}, children.length ? children.map((child, i) => {
|
|
25395
25387
|
if (child) {
|
|
25396
25388
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
25397
|
-
store: store$
|
|
25389
|
+
store: store$i,
|
|
25398
25390
|
key: i
|
|
25399
25391
|
});
|
|
25400
25392
|
}
|
|
25401
25393
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
25402
|
-
store: store$
|
|
25394
|
+
store: store$i
|
|
25403
25395
|
})));
|
|
25404
25396
|
};
|
|
25405
25397
|
|
|
@@ -25414,7 +25406,7 @@ const NewsletterUpdateButton = ({
|
|
|
25414
25406
|
isSubmitting,
|
|
25415
25407
|
isListLoading
|
|
25416
25408
|
}
|
|
25417
|
-
} = useContext(store$
|
|
25409
|
+
} = useContext(store$i);
|
|
25418
25410
|
const {
|
|
25419
25411
|
t
|
|
25420
25412
|
} = useTranslation("newsletter");
|
|
@@ -25444,7 +25436,7 @@ const NewsletterUpdateList = () => {
|
|
|
25444
25436
|
newsletters,
|
|
25445
25437
|
isListLoading
|
|
25446
25438
|
}
|
|
25447
|
-
} = useContext(store$
|
|
25439
|
+
} = useContext(store$i);
|
|
25448
25440
|
|
|
25449
25441
|
if (isListLoading) {
|
|
25450
25442
|
return /*#__PURE__*/React__default.createElement(Loader, {
|
|
@@ -25657,7 +25649,7 @@ function SubscriptionCreateModal({
|
|
|
25657
25649
|
}
|
|
25658
25650
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
25659
25651
|
|
|
25660
|
-
const initialState$
|
|
25652
|
+
const initialState$h = {
|
|
25661
25653
|
emails: "",
|
|
25662
25654
|
emailsError: null,
|
|
25663
25655
|
buttonDisabled: false,
|
|
@@ -25669,10 +25661,10 @@ const initialState$g = {
|
|
|
25669
25661
|
content: ""
|
|
25670
25662
|
}
|
|
25671
25663
|
};
|
|
25672
|
-
const store$
|
|
25664
|
+
const store$h = /*#__PURE__*/createContext(initialState$h);
|
|
25673
25665
|
const {
|
|
25674
|
-
Provider: Provider$
|
|
25675
|
-
} = store$
|
|
25666
|
+
Provider: Provider$h
|
|
25667
|
+
} = store$h;
|
|
25676
25668
|
|
|
25677
25669
|
const SubscriptionManageMembersContainer = ({
|
|
25678
25670
|
style,
|
|
@@ -25844,7 +25836,7 @@ const SubscriptionManageMembersContainer = ({
|
|
|
25844
25836
|
default:
|
|
25845
25837
|
return state;
|
|
25846
25838
|
}
|
|
25847
|
-
}, initialState$
|
|
25839
|
+
}, initialState$h);
|
|
25848
25840
|
useEffect(() => {
|
|
25849
25841
|
dispatch({
|
|
25850
25842
|
type: HANDLE_LIST_MEMBERS
|
|
@@ -25854,7 +25846,7 @@ const SubscriptionManageMembersContainer = ({
|
|
|
25854
25846
|
style: { ...style
|
|
25855
25847
|
},
|
|
25856
25848
|
className: `pelcro-container pelcro-manage-members-container ${className}`
|
|
25857
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
25849
|
+
}, /*#__PURE__*/React__default.createElement(Provider$h, {
|
|
25858
25850
|
value: {
|
|
25859
25851
|
state,
|
|
25860
25852
|
dispatch
|
|
@@ -25862,12 +25854,12 @@ const SubscriptionManageMembersContainer = ({
|
|
|
25862
25854
|
}, children.length ? children.map((child, i) => {
|
|
25863
25855
|
if (child) {
|
|
25864
25856
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
25865
|
-
store: store$
|
|
25857
|
+
store: store$h,
|
|
25866
25858
|
key: i
|
|
25867
25859
|
});
|
|
25868
25860
|
}
|
|
25869
25861
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
25870
|
-
store: store$
|
|
25862
|
+
store: store$h
|
|
25871
25863
|
})));
|
|
25872
25864
|
};
|
|
25873
25865
|
|
|
@@ -25883,7 +25875,7 @@ const SubscriptionManageMembersButton = ({
|
|
|
25883
25875
|
buttonDisabled
|
|
25884
25876
|
},
|
|
25885
25877
|
dispatch
|
|
25886
|
-
} = useContext(store$
|
|
25878
|
+
} = useContext(store$h);
|
|
25887
25879
|
const {
|
|
25888
25880
|
t
|
|
25889
25881
|
} = useTranslation("subscriptionManageMembers");
|
|
@@ -25913,7 +25905,7 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
25913
25905
|
emails: stateEmails,
|
|
25914
25906
|
emailsError
|
|
25915
25907
|
}
|
|
25916
|
-
} = useContext(store$
|
|
25908
|
+
} = useContext(store$h);
|
|
25917
25909
|
const [emails, setEmails] = useState(stateEmails);
|
|
25918
25910
|
const [finishedTyping, setFinishedTyping] = useState(false);
|
|
25919
25911
|
const handleInputChange = useCallback(value => {
|
|
@@ -25972,7 +25964,7 @@ function SubscriptionManageMembersList(props) {
|
|
|
25972
25964
|
removeMemberId,
|
|
25973
25965
|
loading
|
|
25974
25966
|
}
|
|
25975
|
-
} = useContext(store$
|
|
25967
|
+
} = useContext(store$h);
|
|
25976
25968
|
const getMemberStatus = useCallback(sub => {
|
|
25977
25969
|
if (sub.status === "pending") {
|
|
25978
25970
|
return {
|
|
@@ -26135,11 +26127,11 @@ function SubscriptionManageMembersModal({
|
|
|
26135
26127
|
}
|
|
26136
26128
|
SubscriptionManageMembersModal.viewId = "manage-members";
|
|
26137
26129
|
|
|
26138
|
-
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
|
|
26139
|
-
const initialState$
|
|
26140
|
-
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
26130
|
+
var _window$Pelcro$user$r$1, _window$Pelcro$user$r2$1, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
|
|
26131
|
+
const initialState$g = {
|
|
26132
|
+
email: (_window$Pelcro$user$r$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r$1 === void 0 ? void 0 : _window$Pelcro$user$r$1.email,
|
|
26141
26133
|
emailError: null,
|
|
26142
|
-
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
26134
|
+
firstName: (_window$Pelcro$user$r2$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2$1 === void 0 ? void 0 : _window$Pelcro$user$r2$1.first_name,
|
|
26143
26135
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
26144
26136
|
lastNameError: null,
|
|
26145
26137
|
username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
|
|
@@ -26153,10 +26145,10 @@ const initialState$f = {
|
|
|
26153
26145
|
content: ""
|
|
26154
26146
|
}
|
|
26155
26147
|
};
|
|
26156
|
-
const store$
|
|
26148
|
+
const store$g = /*#__PURE__*/createContext(initialState$g);
|
|
26157
26149
|
const {
|
|
26158
|
-
Provider: Provider$
|
|
26159
|
-
} = store$
|
|
26150
|
+
Provider: Provider$g
|
|
26151
|
+
} = store$g;
|
|
26160
26152
|
|
|
26161
26153
|
const UserUpdateContainer = ({
|
|
26162
26154
|
style,
|
|
@@ -26323,12 +26315,12 @@ const UserUpdateContainer = ({
|
|
|
26323
26315
|
default:
|
|
26324
26316
|
return state;
|
|
26325
26317
|
}
|
|
26326
|
-
}, initialState$
|
|
26318
|
+
}, initialState$g);
|
|
26327
26319
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26328
26320
|
style: { ...style
|
|
26329
26321
|
},
|
|
26330
26322
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
26331
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
26323
|
+
}, /*#__PURE__*/React__default.createElement(Provider$g, {
|
|
26332
26324
|
value: {
|
|
26333
26325
|
state,
|
|
26334
26326
|
dispatch
|
|
@@ -26336,12 +26328,12 @@ const UserUpdateContainer = ({
|
|
|
26336
26328
|
}, children.length ? children.map((child, i) => {
|
|
26337
26329
|
if (child) {
|
|
26338
26330
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
26339
|
-
store: store$
|
|
26331
|
+
store: store$g,
|
|
26340
26332
|
key: i
|
|
26341
26333
|
});
|
|
26342
26334
|
}
|
|
26343
26335
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
26344
|
-
store: store$
|
|
26336
|
+
store: store$g
|
|
26345
26337
|
})));
|
|
26346
26338
|
};
|
|
26347
26339
|
|
|
@@ -26367,7 +26359,7 @@ const UserUpdateEmail = props => {
|
|
|
26367
26359
|
email,
|
|
26368
26360
|
emailError
|
|
26369
26361
|
}
|
|
26370
|
-
} = useContext(store$
|
|
26362
|
+
} = useContext(store$g);
|
|
26371
26363
|
const [enableEmailEdit, setEnableEmailEdit] = useState(false);
|
|
26372
26364
|
const {
|
|
26373
26365
|
t
|
|
@@ -26393,7 +26385,7 @@ const UserUpdateEmail = props => {
|
|
|
26393
26385
|
className: "plc-flex plc-items-start plc-relative"
|
|
26394
26386
|
}, /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
26395
26387
|
disabled: !enableEmailEdit,
|
|
26396
|
-
store: store$
|
|
26388
|
+
store: store$g,
|
|
26397
26389
|
label: t("labels.email"),
|
|
26398
26390
|
enableEmailEdit: enableEmailEdit
|
|
26399
26391
|
}, props)), /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -26418,7 +26410,7 @@ const UserUpdateButton = ({
|
|
|
26418
26410
|
emailError
|
|
26419
26411
|
},
|
|
26420
26412
|
dispatch
|
|
26421
|
-
} = useContext(store$
|
|
26413
|
+
} = useContext(store$g);
|
|
26422
26414
|
const {
|
|
26423
26415
|
t
|
|
26424
26416
|
} = useTranslation("userEdit");
|
|
@@ -26509,19 +26501,19 @@ function UpdateUserNameInput({
|
|
|
26509
26501
|
}
|
|
26510
26502
|
|
|
26511
26503
|
const UserUpdateUsername = props => /*#__PURE__*/React__default.createElement(UpdateUserNameInput, Object.assign({
|
|
26512
|
-
store: store$
|
|
26504
|
+
store: store$g
|
|
26513
26505
|
}, props));
|
|
26514
26506
|
|
|
26515
26507
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
26516
|
-
store: store$
|
|
26508
|
+
store: store$g
|
|
26517
26509
|
}, props));
|
|
26518
26510
|
|
|
26519
26511
|
const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
26520
|
-
store: store$
|
|
26512
|
+
store: store$g
|
|
26521
26513
|
}, props));
|
|
26522
26514
|
|
|
26523
26515
|
const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
26524
|
-
store: store$
|
|
26516
|
+
store: store$g
|
|
26525
26517
|
}, props));
|
|
26526
26518
|
|
|
26527
26519
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
@@ -26608,7 +26600,7 @@ function Tin({
|
|
|
26608
26600
|
}
|
|
26609
26601
|
|
|
26610
26602
|
const UserUpdateTin = props => /*#__PURE__*/React__default.createElement(Tin, Object.assign({
|
|
26611
|
-
store: store$
|
|
26603
|
+
store: store$g
|
|
26612
26604
|
}, props));
|
|
26613
26605
|
|
|
26614
26606
|
function DisplayName({
|
|
@@ -26639,7 +26631,7 @@ function DisplayName({
|
|
|
26639
26631
|
}
|
|
26640
26632
|
|
|
26641
26633
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
|
|
26642
|
-
store: store$
|
|
26634
|
+
store: store$g
|
|
26643
26635
|
}, props));
|
|
26644
26636
|
|
|
26645
26637
|
const UserUpdateView = props => {
|
|
@@ -26734,11 +26726,11 @@ UserUpdateModal.viewId = "user-edit";
|
|
|
26734
26726
|
|
|
26735
26727
|
const UserUpdateTextInput = props => {
|
|
26736
26728
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
26737
|
-
store: store$
|
|
26729
|
+
store: store$g
|
|
26738
26730
|
}));
|
|
26739
26731
|
};
|
|
26740
26732
|
|
|
26741
|
-
const initialState$
|
|
26733
|
+
const initialState$f = {
|
|
26742
26734
|
isSubmitting: false,
|
|
26743
26735
|
firstName: "",
|
|
26744
26736
|
firstNameError: "",
|
|
@@ -26764,10 +26756,10 @@ const initialState$e = {
|
|
|
26764
26756
|
content: ""
|
|
26765
26757
|
}
|
|
26766
26758
|
};
|
|
26767
|
-
const store$
|
|
26759
|
+
const store$f = /*#__PURE__*/createContext(initialState$f);
|
|
26768
26760
|
const {
|
|
26769
|
-
Provider: Provider$
|
|
26770
|
-
} = store$
|
|
26761
|
+
Provider: Provider$f
|
|
26762
|
+
} = store$f;
|
|
26771
26763
|
|
|
26772
26764
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
26773
26765
|
|
|
@@ -27014,7 +27006,7 @@ const AddressCreateContainer = ({
|
|
|
27014
27006
|
default:
|
|
27015
27007
|
return state;
|
|
27016
27008
|
}
|
|
27017
|
-
}, initialState$
|
|
27009
|
+
}, initialState$f);
|
|
27018
27010
|
useEffect(() => {
|
|
27019
27011
|
const getStates = () => {
|
|
27020
27012
|
dispatch({
|
|
@@ -27046,16 +27038,16 @@ const AddressCreateContainer = ({
|
|
|
27046
27038
|
style: { ...style
|
|
27047
27039
|
},
|
|
27048
27040
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
27049
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
27041
|
+
}, /*#__PURE__*/React__default.createElement(Provider$f, {
|
|
27050
27042
|
value: {
|
|
27051
27043
|
state,
|
|
27052
27044
|
dispatch
|
|
27053
27045
|
}
|
|
27054
27046
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
27055
|
-
store: store$
|
|
27047
|
+
store: store$f,
|
|
27056
27048
|
key: i
|
|
27057
27049
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
27058
|
-
store: store$
|
|
27050
|
+
store: store$f
|
|
27059
27051
|
})));
|
|
27060
27052
|
};
|
|
27061
27053
|
|
|
@@ -27066,7 +27058,7 @@ function AddressCreateFirstName(props) {
|
|
|
27066
27058
|
firstName,
|
|
27067
27059
|
firstNameError
|
|
27068
27060
|
}
|
|
27069
|
-
} = useContext(store$
|
|
27061
|
+
} = useContext(store$f);
|
|
27070
27062
|
|
|
27071
27063
|
const handleInputChange = value => {
|
|
27072
27064
|
dispatch({
|
|
@@ -27102,7 +27094,7 @@ function AddressCreateLastName(props) {
|
|
|
27102
27094
|
lastName,
|
|
27103
27095
|
lastNameError
|
|
27104
27096
|
}
|
|
27105
|
-
} = useContext(store$
|
|
27097
|
+
} = useContext(store$f);
|
|
27106
27098
|
|
|
27107
27099
|
const handleInputChange = value => {
|
|
27108
27100
|
dispatch({
|
|
@@ -27137,7 +27129,7 @@ function AddressCreateLine1(props) {
|
|
|
27137
27129
|
line1,
|
|
27138
27130
|
line1Error
|
|
27139
27131
|
}
|
|
27140
|
-
} = useContext(store$
|
|
27132
|
+
} = useContext(store$f);
|
|
27141
27133
|
|
|
27142
27134
|
const handleBlur = () => {
|
|
27143
27135
|
return dispatch({
|
|
@@ -27180,7 +27172,7 @@ function AddressCreateCity(props) {
|
|
|
27180
27172
|
city,
|
|
27181
27173
|
cityError
|
|
27182
27174
|
}
|
|
27183
|
-
} = useContext(store$
|
|
27175
|
+
} = useContext(store$f);
|
|
27184
27176
|
|
|
27185
27177
|
const handleInputChange = value => {
|
|
27186
27178
|
dispatch({
|
|
@@ -27215,7 +27207,7 @@ function AddressCreatePostalCode(props) {
|
|
|
27215
27207
|
postalCode,
|
|
27216
27208
|
postalCodeError
|
|
27217
27209
|
}
|
|
27218
|
-
} = useContext(store$
|
|
27210
|
+
} = useContext(store$f);
|
|
27219
27211
|
|
|
27220
27212
|
const handleInputChange = value => {
|
|
27221
27213
|
dispatch({
|
|
@@ -27253,7 +27245,7 @@ const AddressCreateSubmit = ({
|
|
|
27253
27245
|
state: {
|
|
27254
27246
|
isSubmitting
|
|
27255
27247
|
}
|
|
27256
|
-
} = useContext(store$
|
|
27248
|
+
} = useContext(store$f);
|
|
27257
27249
|
const {
|
|
27258
27250
|
t
|
|
27259
27251
|
} = useTranslation("address");
|
|
@@ -27366,7 +27358,7 @@ function CountrySelect({
|
|
|
27366
27358
|
}
|
|
27367
27359
|
|
|
27368
27360
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
27369
|
-
store: store$
|
|
27361
|
+
store: store$f
|
|
27370
27362
|
}, props));
|
|
27371
27363
|
|
|
27372
27364
|
function StateSelect({
|
|
@@ -27455,14 +27447,14 @@ function StateSelect({
|
|
|
27455
27447
|
}
|
|
27456
27448
|
|
|
27457
27449
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
27458
|
-
store: store$
|
|
27450
|
+
store: store$f
|
|
27459
27451
|
}, props));
|
|
27460
27452
|
|
|
27461
27453
|
const AddressCreateSetDefault = props => {
|
|
27462
27454
|
const {
|
|
27463
27455
|
dispatch,
|
|
27464
27456
|
state
|
|
27465
|
-
} = useContext(store$
|
|
27457
|
+
} = useContext(store$f);
|
|
27466
27458
|
|
|
27467
27459
|
const handleCheckboxChange = e => {
|
|
27468
27460
|
dispatch({
|
|
@@ -27597,18 +27589,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
27597
27589
|
|
|
27598
27590
|
const AddressCreateTextInput = props => {
|
|
27599
27591
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
27600
|
-
store: store$
|
|
27592
|
+
store: store$f
|
|
27601
27593
|
}));
|
|
27602
27594
|
};
|
|
27603
27595
|
|
|
27604
27596
|
const AddressCreateLine2 = props => {
|
|
27605
27597
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
27606
27598
|
fieldName: "line2",
|
|
27607
|
-
store: store$
|
|
27599
|
+
store: store$f
|
|
27608
27600
|
}, props));
|
|
27609
27601
|
};
|
|
27610
27602
|
|
|
27611
|
-
const initialState$
|
|
27603
|
+
const initialState$e = {
|
|
27612
27604
|
isSubmitting: false,
|
|
27613
27605
|
firstName: "",
|
|
27614
27606
|
firstNameError: "",
|
|
@@ -27634,10 +27626,10 @@ const initialState$d = {
|
|
|
27634
27626
|
content: ""
|
|
27635
27627
|
}
|
|
27636
27628
|
};
|
|
27637
|
-
const store$
|
|
27629
|
+
const store$e = /*#__PURE__*/createContext(initialState$e);
|
|
27638
27630
|
const {
|
|
27639
|
-
Provider: Provider$
|
|
27640
|
-
} = store$
|
|
27631
|
+
Provider: Provider$e
|
|
27632
|
+
} = store$e;
|
|
27641
27633
|
|
|
27642
27634
|
const AddressUpdateContainer = ({
|
|
27643
27635
|
style,
|
|
@@ -27689,7 +27681,7 @@ const AddressUpdateContainer = ({
|
|
|
27689
27681
|
const thisAddress = addresses[address];
|
|
27690
27682
|
|
|
27691
27683
|
if (+thisAddress.id === +addressId) {
|
|
27692
|
-
const newState = { ...initialState$
|
|
27684
|
+
const newState = { ...initialState$e,
|
|
27693
27685
|
firstName: thisAddress.first_name,
|
|
27694
27686
|
lastName: thisAddress.last_name,
|
|
27695
27687
|
line1: thisAddress.line1,
|
|
@@ -27830,7 +27822,7 @@ const AddressUpdateContainer = ({
|
|
|
27830
27822
|
default:
|
|
27831
27823
|
return state;
|
|
27832
27824
|
}
|
|
27833
|
-
}, initialState$
|
|
27825
|
+
}, initialState$e);
|
|
27834
27826
|
useEffect(() => {
|
|
27835
27827
|
const getStates = () => {
|
|
27836
27828
|
dispatch({
|
|
@@ -27862,21 +27854,21 @@ const AddressUpdateContainer = ({
|
|
|
27862
27854
|
style: { ...style
|
|
27863
27855
|
},
|
|
27864
27856
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
27865
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
27857
|
+
}, /*#__PURE__*/React__default.createElement(Provider$e, {
|
|
27866
27858
|
value: {
|
|
27867
27859
|
state,
|
|
27868
27860
|
dispatch
|
|
27869
27861
|
}
|
|
27870
27862
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
27871
|
-
store: store$
|
|
27863
|
+
store: store$e,
|
|
27872
27864
|
key: i
|
|
27873
27865
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
27874
|
-
store: store$
|
|
27866
|
+
store: store$e
|
|
27875
27867
|
})));
|
|
27876
27868
|
};
|
|
27877
27869
|
|
|
27878
27870
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
27879
|
-
store: store$
|
|
27871
|
+
store: store$e
|
|
27880
27872
|
}, props));
|
|
27881
27873
|
|
|
27882
27874
|
function AddressUpdateFirstName(props) {
|
|
@@ -27886,7 +27878,7 @@ function AddressUpdateFirstName(props) {
|
|
|
27886
27878
|
firstName,
|
|
27887
27879
|
firstNameError
|
|
27888
27880
|
}
|
|
27889
|
-
} = useContext(store$
|
|
27881
|
+
} = useContext(store$e);
|
|
27890
27882
|
|
|
27891
27883
|
const handleBlur = () => {
|
|
27892
27884
|
return dispatch({
|
|
@@ -27929,7 +27921,7 @@ function AddressUpdateLastName(props) {
|
|
|
27929
27921
|
lastName,
|
|
27930
27922
|
lastNameError
|
|
27931
27923
|
}
|
|
27932
|
-
} = useContext(store$
|
|
27924
|
+
} = useContext(store$e);
|
|
27933
27925
|
|
|
27934
27926
|
const handleBlur = () => {
|
|
27935
27927
|
return dispatch({
|
|
@@ -27972,7 +27964,7 @@ function AddressUpdateLine1(props) {
|
|
|
27972
27964
|
line1,
|
|
27973
27965
|
line1Error
|
|
27974
27966
|
}
|
|
27975
|
-
} = useContext(store$
|
|
27967
|
+
} = useContext(store$e);
|
|
27976
27968
|
|
|
27977
27969
|
const handleBlur = () => {
|
|
27978
27970
|
return dispatch({
|
|
@@ -28012,7 +28004,7 @@ const AddressUpdateLine2 = props => {
|
|
|
28012
28004
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
28013
28005
|
fieldName: "line2"
|
|
28014
28006
|
}, props, {
|
|
28015
|
-
store: store$
|
|
28007
|
+
store: store$e
|
|
28016
28008
|
}));
|
|
28017
28009
|
};
|
|
28018
28010
|
|
|
@@ -28023,7 +28015,7 @@ function AddressUpdateCity(props) {
|
|
|
28023
28015
|
city,
|
|
28024
28016
|
cityError
|
|
28025
28017
|
}
|
|
28026
|
-
} = useContext(store$
|
|
28018
|
+
} = useContext(store$e);
|
|
28027
28019
|
|
|
28028
28020
|
const handleBlur = () => {
|
|
28029
28021
|
return dispatch({
|
|
@@ -28066,7 +28058,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
28066
28058
|
postalCode,
|
|
28067
28059
|
postalCodeError
|
|
28068
28060
|
}
|
|
28069
|
-
} = useContext(store$
|
|
28061
|
+
} = useContext(store$e);
|
|
28070
28062
|
|
|
28071
28063
|
const handleBlur = () => {
|
|
28072
28064
|
return dispatch({
|
|
@@ -28112,7 +28104,7 @@ const AddressUpdateSubmit = ({
|
|
|
28112
28104
|
state: {
|
|
28113
28105
|
isSubmitting
|
|
28114
28106
|
}
|
|
28115
|
-
} = useContext(store$
|
|
28107
|
+
} = useContext(store$e);
|
|
28116
28108
|
const {
|
|
28117
28109
|
t
|
|
28118
28110
|
} = useTranslation("address");
|
|
@@ -28128,7 +28120,7 @@ const AddressUpdateSubmit = ({
|
|
|
28128
28120
|
};
|
|
28129
28121
|
|
|
28130
28122
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
28131
|
-
store: store$
|
|
28123
|
+
store: store$e
|
|
28132
28124
|
}, props));
|
|
28133
28125
|
|
|
28134
28126
|
function AddressUpdateSetDefault(props) {
|
|
@@ -28137,7 +28129,7 @@ function AddressUpdateSetDefault(props) {
|
|
|
28137
28129
|
state: {
|
|
28138
28130
|
isDefault
|
|
28139
28131
|
}
|
|
28140
|
-
} = useContext(store$
|
|
28132
|
+
} = useContext(store$e);
|
|
28141
28133
|
|
|
28142
28134
|
const handleCheckboxChange = e => {
|
|
28143
28135
|
dispatch({
|
|
@@ -28245,7 +28237,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
28245
28237
|
|
|
28246
28238
|
const AddressUpdateTextInput = props => {
|
|
28247
28239
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
28248
|
-
store: store$
|
|
28240
|
+
store: store$e
|
|
28249
28241
|
}));
|
|
28250
28242
|
};
|
|
28251
28243
|
|
|
@@ -28327,7 +28319,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
28327
28319
|
};
|
|
28328
28320
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
28329
28321
|
|
|
28330
|
-
const initialState$
|
|
28322
|
+
const initialState$d = {
|
|
28331
28323
|
email: "",
|
|
28332
28324
|
password: "",
|
|
28333
28325
|
passwordError: null,
|
|
@@ -28340,10 +28332,10 @@ const initialState$c = {
|
|
|
28340
28332
|
content: ""
|
|
28341
28333
|
}
|
|
28342
28334
|
};
|
|
28343
|
-
const store$
|
|
28335
|
+
const store$d = /*#__PURE__*/createContext(initialState$d);
|
|
28344
28336
|
const {
|
|
28345
|
-
Provider: Provider$
|
|
28346
|
-
} = store$
|
|
28337
|
+
Provider: Provider$d
|
|
28338
|
+
} = store$d;
|
|
28347
28339
|
|
|
28348
28340
|
const PasswordResetContainer = ({
|
|
28349
28341
|
style,
|
|
@@ -28400,7 +28392,7 @@ const PasswordResetContainer = ({
|
|
|
28400
28392
|
type: SET_EMAIL,
|
|
28401
28393
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
28402
28394
|
});
|
|
28403
|
-
initialState$
|
|
28395
|
+
initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
|
|
28404
28396
|
dispatch({
|
|
28405
28397
|
type: SET_TOKEN,
|
|
28406
28398
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -28460,26 +28452,26 @@ const PasswordResetContainer = ({
|
|
|
28460
28452
|
default:
|
|
28461
28453
|
return state;
|
|
28462
28454
|
}
|
|
28463
|
-
}, initialState$
|
|
28455
|
+
}, initialState$d);
|
|
28464
28456
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28465
28457
|
style: { ...style
|
|
28466
28458
|
},
|
|
28467
28459
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
28468
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
28460
|
+
}, /*#__PURE__*/React__default.createElement(Provider$d, {
|
|
28469
28461
|
value: {
|
|
28470
28462
|
state,
|
|
28471
28463
|
dispatch
|
|
28472
28464
|
}
|
|
28473
28465
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
28474
|
-
store: store$
|
|
28466
|
+
store: store$d,
|
|
28475
28467
|
key: i
|
|
28476
28468
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
28477
|
-
store: store$
|
|
28469
|
+
store: store$d
|
|
28478
28470
|
})));
|
|
28479
28471
|
};
|
|
28480
28472
|
|
|
28481
28473
|
const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
28482
|
-
store: store$
|
|
28474
|
+
store: store$d
|
|
28483
28475
|
}, props));
|
|
28484
28476
|
|
|
28485
28477
|
const PasswordResetButton = ({
|
|
@@ -28492,7 +28484,7 @@ const PasswordResetButton = ({
|
|
|
28492
28484
|
buttonDisabled
|
|
28493
28485
|
},
|
|
28494
28486
|
dispatch
|
|
28495
|
-
} = useContext(store$
|
|
28487
|
+
} = useContext(store$d);
|
|
28496
28488
|
const {
|
|
28497
28489
|
t
|
|
28498
28490
|
} = useTranslation("passwordReset");
|
|
@@ -28509,14 +28501,14 @@ const PasswordResetButton = ({
|
|
|
28509
28501
|
};
|
|
28510
28502
|
|
|
28511
28503
|
const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
28512
|
-
store: store$
|
|
28504
|
+
store: store$d
|
|
28513
28505
|
}, props, {
|
|
28514
28506
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
28515
28507
|
disabled: true
|
|
28516
28508
|
}));
|
|
28517
28509
|
|
|
28518
28510
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
|
|
28519
|
-
store: store$
|
|
28511
|
+
store: store$d
|
|
28520
28512
|
}, props));
|
|
28521
28513
|
|
|
28522
28514
|
const PasswordResetView = props => {
|
|
@@ -28571,7 +28563,7 @@ const PasswordResetModal = ({
|
|
|
28571
28563
|
};
|
|
28572
28564
|
PasswordResetModal.viewId = "password-reset";
|
|
28573
28565
|
|
|
28574
|
-
const initialState$
|
|
28566
|
+
const initialState$c = {
|
|
28575
28567
|
email: "",
|
|
28576
28568
|
emailError: null,
|
|
28577
28569
|
buttonDisabled: false,
|
|
@@ -28580,10 +28572,10 @@ const initialState$b = {
|
|
|
28580
28572
|
content: ""
|
|
28581
28573
|
}
|
|
28582
28574
|
};
|
|
28583
|
-
const store$
|
|
28575
|
+
const store$c = /*#__PURE__*/createContext(initialState$c);
|
|
28584
28576
|
const {
|
|
28585
|
-
Provider: Provider$
|
|
28586
|
-
} = store$
|
|
28577
|
+
Provider: Provider$c
|
|
28578
|
+
} = store$c;
|
|
28587
28579
|
|
|
28588
28580
|
const PasswordForgotContainer = ({
|
|
28589
28581
|
style,
|
|
@@ -28661,21 +28653,21 @@ const PasswordForgotContainer = ({
|
|
|
28661
28653
|
default:
|
|
28662
28654
|
return state;
|
|
28663
28655
|
}
|
|
28664
|
-
}, initialState$
|
|
28656
|
+
}, initialState$c);
|
|
28665
28657
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28666
28658
|
style: { ...style
|
|
28667
28659
|
},
|
|
28668
28660
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
28669
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
28661
|
+
}, /*#__PURE__*/React__default.createElement(Provider$c, {
|
|
28670
28662
|
value: {
|
|
28671
28663
|
state,
|
|
28672
28664
|
dispatch
|
|
28673
28665
|
}
|
|
28674
28666
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
28675
|
-
store: store$
|
|
28667
|
+
store: store$c,
|
|
28676
28668
|
key: i
|
|
28677
28669
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
28678
|
-
store: store$
|
|
28670
|
+
store: store$c
|
|
28679
28671
|
})));
|
|
28680
28672
|
};
|
|
28681
28673
|
|
|
@@ -28691,7 +28683,7 @@ const PasswordForgotButton = ({
|
|
|
28691
28683
|
emailError
|
|
28692
28684
|
},
|
|
28693
28685
|
dispatch
|
|
28694
|
-
} = useContext(store$
|
|
28686
|
+
} = useContext(store$c);
|
|
28695
28687
|
const {
|
|
28696
28688
|
t
|
|
28697
28689
|
} = useTranslation("passwordForgot");
|
|
@@ -28712,7 +28704,7 @@ const PasswordForgotButton = ({
|
|
|
28712
28704
|
};
|
|
28713
28705
|
|
|
28714
28706
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
28715
|
-
store: store$
|
|
28707
|
+
store: store$c
|
|
28716
28708
|
}, props));
|
|
28717
28709
|
|
|
28718
28710
|
const PasswordForgotView = props => {
|
|
@@ -28766,7 +28758,7 @@ const PasswordForgotModal = ({
|
|
|
28766
28758
|
};
|
|
28767
28759
|
PasswordForgotModal.viewId = "password-forgot";
|
|
28768
28760
|
|
|
28769
|
-
const initialState$
|
|
28761
|
+
const initialState$b = {
|
|
28770
28762
|
email: "",
|
|
28771
28763
|
emailError: null,
|
|
28772
28764
|
buttonDisabled: false,
|
|
@@ -28775,10 +28767,10 @@ const initialState$a = {
|
|
|
28775
28767
|
content: ""
|
|
28776
28768
|
}
|
|
28777
28769
|
};
|
|
28778
|
-
const store$
|
|
28770
|
+
const store$b = /*#__PURE__*/createContext(initialState$b);
|
|
28779
28771
|
const {
|
|
28780
|
-
Provider: Provider$
|
|
28781
|
-
} = store$
|
|
28772
|
+
Provider: Provider$b
|
|
28773
|
+
} = store$b;
|
|
28782
28774
|
|
|
28783
28775
|
const PasswordlessRequestContainer = ({
|
|
28784
28776
|
style,
|
|
@@ -28856,21 +28848,21 @@ const PasswordlessRequestContainer = ({
|
|
|
28856
28848
|
default:
|
|
28857
28849
|
return state;
|
|
28858
28850
|
}
|
|
28859
|
-
}, initialState$
|
|
28851
|
+
}, initialState$b);
|
|
28860
28852
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28861
28853
|
style: { ...style
|
|
28862
28854
|
},
|
|
28863
28855
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
28864
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
28856
|
+
}, /*#__PURE__*/React__default.createElement(Provider$b, {
|
|
28865
28857
|
value: {
|
|
28866
28858
|
state,
|
|
28867
28859
|
dispatch
|
|
28868
28860
|
}
|
|
28869
28861
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
28870
|
-
store: store$
|
|
28862
|
+
store: store$b,
|
|
28871
28863
|
key: i
|
|
28872
28864
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
28873
|
-
store: store$
|
|
28865
|
+
store: store$b
|
|
28874
28866
|
})));
|
|
28875
28867
|
};
|
|
28876
28868
|
|
|
@@ -28886,7 +28878,7 @@ const PasswordlessRequestViewButton = ({
|
|
|
28886
28878
|
emailError
|
|
28887
28879
|
},
|
|
28888
28880
|
dispatch
|
|
28889
|
-
} = useContext(store$
|
|
28881
|
+
} = useContext(store$b);
|
|
28890
28882
|
const {
|
|
28891
28883
|
t
|
|
28892
28884
|
} = useTranslation("passwordlessRequest");
|
|
@@ -28907,7 +28899,7 @@ const PasswordlessRequestViewButton = ({
|
|
|
28907
28899
|
};
|
|
28908
28900
|
|
|
28909
28901
|
const PasswordlessRequestEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
28910
|
-
store: store$
|
|
28902
|
+
store: store$b
|
|
28911
28903
|
}, props));
|
|
28912
28904
|
|
|
28913
28905
|
const PasswordlessRequestView = props => {
|
|
@@ -28951,7 +28943,7 @@ const PasswordlessRequestModal = ({
|
|
|
28951
28943
|
};
|
|
28952
28944
|
PasswordlessRequestModal.viewId = "passwordless-request";
|
|
28953
28945
|
|
|
28954
|
-
const initialState$
|
|
28946
|
+
const initialState$a = {
|
|
28955
28947
|
currentPassword: "",
|
|
28956
28948
|
newPassword: "",
|
|
28957
28949
|
confirmNewPassword: "",
|
|
@@ -28965,10 +28957,10 @@ const initialState$9 = {
|
|
|
28965
28957
|
content: ""
|
|
28966
28958
|
}
|
|
28967
28959
|
};
|
|
28968
|
-
const store$
|
|
28960
|
+
const store$a = /*#__PURE__*/createContext(initialState$a);
|
|
28969
28961
|
const {
|
|
28970
|
-
Provider: Provider$
|
|
28971
|
-
} = store$
|
|
28962
|
+
Provider: Provider$a
|
|
28963
|
+
} = store$a;
|
|
28972
28964
|
const PasswordChangeContainer = ({
|
|
28973
28965
|
style,
|
|
28974
28966
|
className = "",
|
|
@@ -29120,21 +29112,21 @@ const PasswordChangeContainer = ({
|
|
|
29120
29112
|
default:
|
|
29121
29113
|
return state;
|
|
29122
29114
|
}
|
|
29123
|
-
}, initialState$
|
|
29115
|
+
}, initialState$a);
|
|
29124
29116
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29125
29117
|
style: { ...style
|
|
29126
29118
|
},
|
|
29127
29119
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
29128
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
29120
|
+
}, /*#__PURE__*/React__default.createElement(Provider$a, {
|
|
29129
29121
|
value: {
|
|
29130
29122
|
state,
|
|
29131
29123
|
dispatch
|
|
29132
29124
|
}
|
|
29133
29125
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
29134
|
-
store: store$
|
|
29126
|
+
store: store$a,
|
|
29135
29127
|
key: i
|
|
29136
29128
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
29137
|
-
store: store$
|
|
29129
|
+
store: store$a
|
|
29138
29130
|
})));
|
|
29139
29131
|
};
|
|
29140
29132
|
|
|
@@ -29145,7 +29137,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
29145
29137
|
currentPassword,
|
|
29146
29138
|
currentPasswordError
|
|
29147
29139
|
}
|
|
29148
|
-
} = useContext(store$
|
|
29140
|
+
} = useContext(store$a);
|
|
29149
29141
|
const handleBlur = useCallback(() => {
|
|
29150
29142
|
return dispatch({
|
|
29151
29143
|
type: VALIDATE_PASSWORD
|
|
@@ -29179,7 +29171,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
29179
29171
|
newPassword,
|
|
29180
29172
|
newPasswordError
|
|
29181
29173
|
}
|
|
29182
|
-
} = useContext(store$
|
|
29174
|
+
} = useContext(store$a);
|
|
29183
29175
|
const handleBlur = useCallback(() => {
|
|
29184
29176
|
return dispatch({
|
|
29185
29177
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -29213,7 +29205,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
29213
29205
|
confirmNewPassword,
|
|
29214
29206
|
confirmNewPasswordError
|
|
29215
29207
|
}
|
|
29216
|
-
} = useContext(store$
|
|
29208
|
+
} = useContext(store$a);
|
|
29217
29209
|
const handleBlur = useCallback(() => {
|
|
29218
29210
|
return dispatch({
|
|
29219
29211
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -29254,7 +29246,7 @@ const PasswordChangeButton = ({
|
|
|
29254
29246
|
confirmNewPasswordError
|
|
29255
29247
|
},
|
|
29256
29248
|
dispatch
|
|
29257
|
-
} = useContext(store$
|
|
29249
|
+
} = useContext(store$a);
|
|
29258
29250
|
const {
|
|
29259
29251
|
t
|
|
29260
29252
|
} = useTranslation("passwordChange");
|
|
@@ -29323,17 +29315,17 @@ const PasswordChangeModal = ({
|
|
|
29323
29315
|
};
|
|
29324
29316
|
PasswordChangeModal.viewId = "password-change";
|
|
29325
29317
|
|
|
29326
|
-
const initialState$
|
|
29318
|
+
const initialState$9 = {
|
|
29327
29319
|
buttonDisabled: false,
|
|
29328
29320
|
alert: {
|
|
29329
29321
|
type: "error",
|
|
29330
29322
|
content: ""
|
|
29331
29323
|
}
|
|
29332
29324
|
};
|
|
29333
|
-
const store$
|
|
29325
|
+
const store$9 = /*#__PURE__*/createContext(initialState$9);
|
|
29334
29326
|
const {
|
|
29335
|
-
Provider: Provider$
|
|
29336
|
-
} = store$
|
|
29327
|
+
Provider: Provider$9
|
|
29328
|
+
} = store$9;
|
|
29337
29329
|
|
|
29338
29330
|
const CartContainer = ({
|
|
29339
29331
|
style,
|
|
@@ -29424,21 +29416,21 @@ const CartContainer = ({
|
|
|
29424
29416
|
default:
|
|
29425
29417
|
return state;
|
|
29426
29418
|
}
|
|
29427
|
-
}, initialState$
|
|
29419
|
+
}, initialState$9);
|
|
29428
29420
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29429
29421
|
style: { ...style
|
|
29430
29422
|
},
|
|
29431
29423
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
29432
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
29424
|
+
}, /*#__PURE__*/React__default.createElement(Provider$9, {
|
|
29433
29425
|
value: {
|
|
29434
29426
|
state,
|
|
29435
29427
|
dispatch
|
|
29436
29428
|
}
|
|
29437
29429
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
29438
|
-
store: store$
|
|
29430
|
+
store: store$9,
|
|
29439
29431
|
key: i
|
|
29440
29432
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
29441
|
-
store: store$
|
|
29433
|
+
store: store$9
|
|
29442
29434
|
})));
|
|
29443
29435
|
};
|
|
29444
29436
|
|
|
@@ -29477,7 +29469,7 @@ const CartSubmit = ({
|
|
|
29477
29469
|
buttonDisabled
|
|
29478
29470
|
},
|
|
29479
29471
|
dispatch
|
|
29480
|
-
} = useContext(store$
|
|
29472
|
+
} = useContext(store$9);
|
|
29481
29473
|
const {
|
|
29482
29474
|
t
|
|
29483
29475
|
} = useTranslation("cart");
|
|
@@ -29511,7 +29503,7 @@ const CartTotalPrice = () => {
|
|
|
29511
29503
|
state: {
|
|
29512
29504
|
alert
|
|
29513
29505
|
}
|
|
29514
|
-
} = useContext(store$
|
|
29506
|
+
} = useContext(store$9);
|
|
29515
29507
|
const {
|
|
29516
29508
|
cartItems
|
|
29517
29509
|
} = usePelcro();
|
|
@@ -29835,7 +29827,7 @@ const OrderConfirmModal = props => {
|
|
|
29835
29827
|
};
|
|
29836
29828
|
OrderConfirmModal.viewId = "order-confirm";
|
|
29837
29829
|
|
|
29838
|
-
const initialState$
|
|
29830
|
+
const initialState$8 = {
|
|
29839
29831
|
email: "",
|
|
29840
29832
|
firstName: "",
|
|
29841
29833
|
lastName: "",
|
|
@@ -29847,10 +29839,10 @@ const initialState$7 = {
|
|
|
29847
29839
|
content: ""
|
|
29848
29840
|
}
|
|
29849
29841
|
};
|
|
29850
|
-
const store$
|
|
29842
|
+
const store$8 = /*#__PURE__*/createContext(initialState$8);
|
|
29851
29843
|
const {
|
|
29852
|
-
Provider: Provider$
|
|
29853
|
-
} = store$
|
|
29844
|
+
Provider: Provider$8
|
|
29845
|
+
} = store$8;
|
|
29854
29846
|
|
|
29855
29847
|
const GiftCreateContainer = ({
|
|
29856
29848
|
style,
|
|
@@ -29954,21 +29946,21 @@ const GiftCreateContainer = ({
|
|
|
29954
29946
|
default:
|
|
29955
29947
|
return state;
|
|
29956
29948
|
}
|
|
29957
|
-
}, initialState$
|
|
29949
|
+
}, initialState$8);
|
|
29958
29950
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
29959
29951
|
style: { ...style
|
|
29960
29952
|
},
|
|
29961
29953
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
29962
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
29954
|
+
}, /*#__PURE__*/React__default.createElement(Provider$8, {
|
|
29963
29955
|
value: {
|
|
29964
29956
|
state,
|
|
29965
29957
|
dispatch
|
|
29966
29958
|
}
|
|
29967
29959
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
29968
|
-
store: store$
|
|
29960
|
+
store: store$8,
|
|
29969
29961
|
key: i
|
|
29970
29962
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
29971
|
-
store: store$
|
|
29963
|
+
store: store$8
|
|
29972
29964
|
})));
|
|
29973
29965
|
};
|
|
29974
29966
|
|
|
@@ -29982,7 +29974,7 @@ const GiftCreateSubmitButton = ({
|
|
|
29982
29974
|
state: {
|
|
29983
29975
|
disableSubmit
|
|
29984
29976
|
}
|
|
29985
|
-
} = useContext(store$
|
|
29977
|
+
} = useContext(store$8);
|
|
29986
29978
|
const {
|
|
29987
29979
|
t
|
|
29988
29980
|
} = useTranslation("register");
|
|
@@ -29999,15 +29991,15 @@ const GiftCreateSubmitButton = ({
|
|
|
29999
29991
|
|
|
30000
29992
|
const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
30001
29993
|
initWithUserEmail: false,
|
|
30002
|
-
store: store$
|
|
29994
|
+
store: store$8
|
|
30003
29995
|
}, props));
|
|
30004
29996
|
|
|
30005
29997
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
30006
|
-
store: store$
|
|
29998
|
+
store: store$8
|
|
30007
29999
|
}, props));
|
|
30008
30000
|
|
|
30009
30001
|
const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
30010
|
-
store: store$
|
|
30002
|
+
store: store$8
|
|
30011
30003
|
}, props));
|
|
30012
30004
|
|
|
30013
30005
|
const nowDate = new Date();
|
|
@@ -30022,7 +30014,7 @@ const GiftCreateStartDate = props => {
|
|
|
30022
30014
|
const {
|
|
30023
30015
|
dispatch,
|
|
30024
30016
|
state
|
|
30025
|
-
} = useContext(store$
|
|
30017
|
+
} = useContext(store$8);
|
|
30026
30018
|
|
|
30027
30019
|
const handleInputChange = value => {
|
|
30028
30020
|
dispatch({
|
|
@@ -30057,7 +30049,7 @@ function GiftCreateMessage(props) {
|
|
|
30057
30049
|
const {
|
|
30058
30050
|
dispatch,
|
|
30059
30051
|
state
|
|
30060
|
-
} = useContext(store$
|
|
30052
|
+
} = useContext(store$8);
|
|
30061
30053
|
const MAX_CHARS_COUNT = 200;
|
|
30062
30054
|
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
30063
30055
|
|
|
@@ -30177,7 +30169,7 @@ const GiftCreateModal = ({
|
|
|
30177
30169
|
}, t("gift.titles.firstTitle")))), /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(GiftCreateView, Object.assign({}, otherProps, {
|
|
30178
30170
|
onSuccess: onSuccess
|
|
30179
30171
|
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement("p", {
|
|
30180
|
-
className: "plc-mb-
|
|
30172
|
+
className: "plc-mb-4"
|
|
30181
30173
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
30182
30174
|
className: "plc-font-medium"
|
|
30183
30175
|
}, t("messages.selectPlan") + " "), /*#__PURE__*/React__default.createElement(Link, {
|
|
@@ -30187,7 +30179,7 @@ const GiftCreateModal = ({
|
|
|
30187
30179
|
};
|
|
30188
30180
|
GiftCreateModal.viewId = "gift-create";
|
|
30189
30181
|
|
|
30190
|
-
const initialState$
|
|
30182
|
+
const initialState$7 = {
|
|
30191
30183
|
isSubmitting: false,
|
|
30192
30184
|
giftCode: "",
|
|
30193
30185
|
buttonDisabled: true,
|
|
@@ -30196,10 +30188,10 @@ const initialState$6 = {
|
|
|
30196
30188
|
content: ""
|
|
30197
30189
|
}
|
|
30198
30190
|
};
|
|
30199
|
-
const store$
|
|
30191
|
+
const store$7 = /*#__PURE__*/createContext(initialState$7);
|
|
30200
30192
|
const {
|
|
30201
|
-
Provider: Provider$
|
|
30202
|
-
} = store$
|
|
30193
|
+
Provider: Provider$7
|
|
30194
|
+
} = store$7;
|
|
30203
30195
|
|
|
30204
30196
|
const GiftRedeemContainer = ({
|
|
30205
30197
|
style,
|
|
@@ -30313,21 +30305,21 @@ const GiftRedeemContainer = ({
|
|
|
30313
30305
|
default:
|
|
30314
30306
|
return state;
|
|
30315
30307
|
}
|
|
30316
|
-
}, initialState$
|
|
30308
|
+
}, initialState$7);
|
|
30317
30309
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
30318
30310
|
style: { ...style
|
|
30319
30311
|
},
|
|
30320
30312
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
30321
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
30313
|
+
}, /*#__PURE__*/React__default.createElement(Provider$7, {
|
|
30322
30314
|
value: {
|
|
30323
30315
|
state,
|
|
30324
30316
|
dispatch
|
|
30325
30317
|
}
|
|
30326
30318
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
30327
|
-
store: store$
|
|
30319
|
+
store: store$7,
|
|
30328
30320
|
key: i
|
|
30329
30321
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
30330
|
-
store: store$
|
|
30322
|
+
store: store$7
|
|
30331
30323
|
})));
|
|
30332
30324
|
};
|
|
30333
30325
|
|
|
@@ -30364,7 +30356,7 @@ function GiftCode({
|
|
|
30364
30356
|
}
|
|
30365
30357
|
|
|
30366
30358
|
const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
|
|
30367
|
-
store: store$
|
|
30359
|
+
store: store$7
|
|
30368
30360
|
}, props));
|
|
30369
30361
|
|
|
30370
30362
|
const GiftRedeemSubmitButton = ({
|
|
@@ -30378,7 +30370,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
30378
30370
|
disableSubmit,
|
|
30379
30371
|
isSubmitting
|
|
30380
30372
|
}
|
|
30381
|
-
} = useContext(store$
|
|
30373
|
+
} = useContext(store$7);
|
|
30382
30374
|
const {
|
|
30383
30375
|
t
|
|
30384
30376
|
} = useTranslation("register");
|
|
@@ -30473,7 +30465,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
30473
30465
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
30474
30466
|
};
|
|
30475
30467
|
|
|
30476
|
-
const initialState$
|
|
30468
|
+
const initialState$6 = {
|
|
30477
30469
|
addresses: [],
|
|
30478
30470
|
selectedAddressId: null,
|
|
30479
30471
|
isSubmitting: false,
|
|
@@ -30482,10 +30474,10 @@ const initialState$5 = {
|
|
|
30482
30474
|
content: ""
|
|
30483
30475
|
}
|
|
30484
30476
|
};
|
|
30485
|
-
const store$
|
|
30477
|
+
const store$6 = /*#__PURE__*/createContext(initialState$6);
|
|
30486
30478
|
const {
|
|
30487
|
-
Provider: Provider$
|
|
30488
|
-
} = store$
|
|
30479
|
+
Provider: Provider$6
|
|
30480
|
+
} = store$6;
|
|
30489
30481
|
|
|
30490
30482
|
const AddressSelectContainer = ({
|
|
30491
30483
|
style,
|
|
@@ -30622,7 +30614,7 @@ const AddressSelectContainer = ({
|
|
|
30622
30614
|
default:
|
|
30623
30615
|
return state;
|
|
30624
30616
|
}
|
|
30625
|
-
}, initialState$
|
|
30617
|
+
}, initialState$6);
|
|
30626
30618
|
useEffect(() => {
|
|
30627
30619
|
var _window$Pelcro$user$r;
|
|
30628
30620
|
|
|
@@ -30635,16 +30627,16 @@ const AddressSelectContainer = ({
|
|
|
30635
30627
|
style: { ...style
|
|
30636
30628
|
},
|
|
30637
30629
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
30638
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
30630
|
+
}, /*#__PURE__*/React__default.createElement(Provider$6, {
|
|
30639
30631
|
value: {
|
|
30640
30632
|
state,
|
|
30641
30633
|
dispatch
|
|
30642
30634
|
}
|
|
30643
30635
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
30644
|
-
store: store$
|
|
30636
|
+
store: store$6,
|
|
30645
30637
|
key: i
|
|
30646
30638
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
30647
|
-
store: store$
|
|
30639
|
+
store: store$6
|
|
30648
30640
|
})));
|
|
30649
30641
|
};
|
|
30650
30642
|
|
|
@@ -30655,7 +30647,7 @@ const AddressSelectList = () => {
|
|
|
30655
30647
|
addresses,
|
|
30656
30648
|
selectedAddressId
|
|
30657
30649
|
}
|
|
30658
|
-
} = useContext(store$
|
|
30650
|
+
} = useContext(store$6);
|
|
30659
30651
|
|
|
30660
30652
|
const handleAddressSelect = event => {
|
|
30661
30653
|
dispatch({
|
|
@@ -30699,7 +30691,7 @@ const AddressSelectSubmit = ({
|
|
|
30699
30691
|
selectedAddressId,
|
|
30700
30692
|
isSubmitting
|
|
30701
30693
|
}
|
|
30702
|
-
} = useContext(store$
|
|
30694
|
+
} = useContext(store$6);
|
|
30703
30695
|
const {
|
|
30704
30696
|
t
|
|
30705
30697
|
} = useTranslation("address");
|
|
@@ -30809,7 +30801,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
30809
30801
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
30810
30802
|
};
|
|
30811
30803
|
|
|
30812
|
-
const initialState$
|
|
30804
|
+
const initialState$5 = {
|
|
30813
30805
|
paymentMethods: [],
|
|
30814
30806
|
selectedPaymentMethodId: null,
|
|
30815
30807
|
isSubmitting: false,
|
|
@@ -30818,10 +30810,10 @@ const initialState$4 = {
|
|
|
30818
30810
|
content: ""
|
|
30819
30811
|
}
|
|
30820
30812
|
};
|
|
30821
|
-
const store$
|
|
30813
|
+
const store$5 = /*#__PURE__*/createContext(initialState$5);
|
|
30822
30814
|
const {
|
|
30823
|
-
Provider: Provider$
|
|
30824
|
-
} = store$
|
|
30815
|
+
Provider: Provider$5
|
|
30816
|
+
} = store$5;
|
|
30825
30817
|
|
|
30826
30818
|
const PaymentMethodSelectContainer = ({
|
|
30827
30819
|
style,
|
|
@@ -30880,7 +30872,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
30880
30872
|
default:
|
|
30881
30873
|
return state;
|
|
30882
30874
|
}
|
|
30883
|
-
}, initialState$
|
|
30875
|
+
}, initialState$5);
|
|
30884
30876
|
useEffect(() => {
|
|
30885
30877
|
var _window$Pelcro$user$r3;
|
|
30886
30878
|
|
|
@@ -30893,16 +30885,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
30893
30885
|
style: { ...style
|
|
30894
30886
|
},
|
|
30895
30887
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
30896
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
30888
|
+
}, /*#__PURE__*/React__default.createElement(Provider$5, {
|
|
30897
30889
|
value: {
|
|
30898
30890
|
state,
|
|
30899
30891
|
dispatch
|
|
30900
30892
|
}
|
|
30901
30893
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
30902
|
-
store: store$
|
|
30894
|
+
store: store$5,
|
|
30903
30895
|
key: i
|
|
30904
30896
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
30905
|
-
store: store$
|
|
30897
|
+
store: store$5
|
|
30906
30898
|
})));
|
|
30907
30899
|
};
|
|
30908
30900
|
|
|
@@ -30916,7 +30908,7 @@ const PaymentMethodSelectList = () => {
|
|
|
30916
30908
|
paymentMethods,
|
|
30917
30909
|
selectedPaymentMethodId
|
|
30918
30910
|
}
|
|
30919
|
-
} = useContext(store$
|
|
30911
|
+
} = useContext(store$5);
|
|
30920
30912
|
|
|
30921
30913
|
const handlePaymentMethodSelect = event => {
|
|
30922
30914
|
dispatch({
|
|
@@ -30966,7 +30958,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
30966
30958
|
selectedPaymentMethodId,
|
|
30967
30959
|
isSubmitting
|
|
30968
30960
|
}
|
|
30969
|
-
} = useContext(store$
|
|
30961
|
+
} = useContext(store$5);
|
|
30970
30962
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
30971
30963
|
onClick: () => {
|
|
30972
30964
|
dispatch({
|
|
@@ -31052,6 +31044,217 @@ const PaymentMethodSelectModal = ({
|
|
|
31052
31044
|
};
|
|
31053
31045
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
31054
31046
|
|
|
31047
|
+
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
31048
|
+
const initialState$4 = {
|
|
31049
|
+
isOpen: false,
|
|
31050
|
+
activeDashboardLink: null,
|
|
31051
|
+
subscriptions: window.Pelcro.subscription.list(),
|
|
31052
|
+
giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
|
|
31053
|
+
disableSubmit: false,
|
|
31054
|
+
addresses: []
|
|
31055
|
+
};
|
|
31056
|
+
const store$4 = /*#__PURE__*/createContext(initialState$4);
|
|
31057
|
+
const {
|
|
31058
|
+
Provider: Provider$4
|
|
31059
|
+
} = store$4;
|
|
31060
|
+
|
|
31061
|
+
const DashboardContainer = ({
|
|
31062
|
+
onClose,
|
|
31063
|
+
style,
|
|
31064
|
+
className = "",
|
|
31065
|
+
children,
|
|
31066
|
+
...props
|
|
31067
|
+
}) => {
|
|
31068
|
+
const {
|
|
31069
|
+
t
|
|
31070
|
+
} = useTranslation("dashboard");
|
|
31071
|
+
useEffect(() => {
|
|
31072
|
+
var _ReactGA$event;
|
|
31073
|
+
|
|
31074
|
+
dispatch({
|
|
31075
|
+
type: SET_IS_OPEN,
|
|
31076
|
+
payload: true
|
|
31077
|
+
});
|
|
31078
|
+
window.Pelcro.insight.track("Modal Displayed", {
|
|
31079
|
+
name: "dashboard"
|
|
31080
|
+
});
|
|
31081
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
31082
|
+
category: "VIEWS",
|
|
31083
|
+
action: "Dashboard Modal Viewed",
|
|
31084
|
+
nonInteraction: true
|
|
31085
|
+
});
|
|
31086
|
+
const {
|
|
31087
|
+
addresses
|
|
31088
|
+
} = window.Pelcro.user.read();
|
|
31089
|
+
if (addresses) dispatch({
|
|
31090
|
+
type: SET_ADDRESSES,
|
|
31091
|
+
payload: addresses
|
|
31092
|
+
});
|
|
31093
|
+
return () => {};
|
|
31094
|
+
}, []);
|
|
31095
|
+
/**
|
|
31096
|
+
*
|
|
31097
|
+
* @param {*} payload
|
|
31098
|
+
* @param {*} dispatch
|
|
31099
|
+
*/
|
|
31100
|
+
|
|
31101
|
+
const cancelSubscription = ({
|
|
31102
|
+
subscription_id,
|
|
31103
|
+
onSuccess,
|
|
31104
|
+
onFailure
|
|
31105
|
+
}, dispatch) => {
|
|
31106
|
+
window.Pelcro.subscription.cancel({
|
|
31107
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
31108
|
+
subscription_id: subscription_id
|
|
31109
|
+
}, (err, res) => {
|
|
31110
|
+
var _ReactGA$event2;
|
|
31111
|
+
|
|
31112
|
+
dispatch({
|
|
31113
|
+
type: SET_DISABLESUBMIT,
|
|
31114
|
+
payload: false
|
|
31115
|
+
});
|
|
31116
|
+
|
|
31117
|
+
if (err) {
|
|
31118
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
31119
|
+
}
|
|
31120
|
+
|
|
31121
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
|
|
31122
|
+
category: "ACTIONS",
|
|
31123
|
+
action: "Canceled",
|
|
31124
|
+
nonInteraction: true
|
|
31125
|
+
});
|
|
31126
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
31127
|
+
});
|
|
31128
|
+
};
|
|
31129
|
+
/**
|
|
31130
|
+
*
|
|
31131
|
+
* @param {*} payload
|
|
31132
|
+
* @param {*} dispatch
|
|
31133
|
+
*/
|
|
31134
|
+
|
|
31135
|
+
|
|
31136
|
+
const unSuspendSubscription = ({
|
|
31137
|
+
subscription_id,
|
|
31138
|
+
onSuccess,
|
|
31139
|
+
onFailure
|
|
31140
|
+
}, dispatch) => {
|
|
31141
|
+
window.Pelcro.subscription.update({
|
|
31142
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
31143
|
+
subscription_id: subscription_id,
|
|
31144
|
+
suspend: 0
|
|
31145
|
+
}, (err, res) => {
|
|
31146
|
+
var _ReactGA$event3;
|
|
31147
|
+
|
|
31148
|
+
dispatch({
|
|
31149
|
+
type: SET_DISABLESUBMIT,
|
|
31150
|
+
payload: false
|
|
31151
|
+
});
|
|
31152
|
+
|
|
31153
|
+
if (err) {
|
|
31154
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
31155
|
+
}
|
|
31156
|
+
|
|
31157
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
|
|
31158
|
+
category: "ACTIONS",
|
|
31159
|
+
action: "UnSuspended",
|
|
31160
|
+
nonInteraction: true
|
|
31161
|
+
});
|
|
31162
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
31163
|
+
});
|
|
31164
|
+
};
|
|
31165
|
+
/**
|
|
31166
|
+
*
|
|
31167
|
+
* @param {*} payload
|
|
31168
|
+
* @param {*} dispatch
|
|
31169
|
+
*/
|
|
31170
|
+
|
|
31171
|
+
|
|
31172
|
+
const reactivateSubscription = ({
|
|
31173
|
+
subscription_id,
|
|
31174
|
+
onSuccess,
|
|
31175
|
+
onFailure
|
|
31176
|
+
}, dispatch) => {
|
|
31177
|
+
window.Pelcro.subscription.reactivate({
|
|
31178
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
31179
|
+
subscription_id: subscription_id
|
|
31180
|
+
}, (err, res) => {
|
|
31181
|
+
dispatch({
|
|
31182
|
+
type: SET_DISABLESUBMIT,
|
|
31183
|
+
payload: false
|
|
31184
|
+
});
|
|
31185
|
+
onClose();
|
|
31186
|
+
|
|
31187
|
+
if (err) {
|
|
31188
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
31189
|
+
return notify.error(t("messages.subReactivation.error"));
|
|
31190
|
+
}
|
|
31191
|
+
|
|
31192
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
31193
|
+
return notify.success(t("messages.subReactivation.success"));
|
|
31194
|
+
});
|
|
31195
|
+
};
|
|
31196
|
+
|
|
31197
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
31198
|
+
switch (action.type) {
|
|
31199
|
+
case SET_IS_OPEN:
|
|
31200
|
+
return lib_7({ ...state,
|
|
31201
|
+
isOpen: action.payload
|
|
31202
|
+
});
|
|
31203
|
+
|
|
31204
|
+
case CLOSE_DASHBOARD:
|
|
31205
|
+
return lib_7({ ...state,
|
|
31206
|
+
isOpen: false,
|
|
31207
|
+
activeDashboardLink: null
|
|
31208
|
+
});
|
|
31209
|
+
|
|
31210
|
+
case SET_ACTIVE_DASHBOARD_LINK:
|
|
31211
|
+
return lib_7({ ...state,
|
|
31212
|
+
activeDashboardLink: action.payload
|
|
31213
|
+
});
|
|
31214
|
+
|
|
31215
|
+
case SET_DISABLESUBMIT:
|
|
31216
|
+
{
|
|
31217
|
+
return lib_7({ ...state,
|
|
31218
|
+
disableSubmit: action.payload
|
|
31219
|
+
});
|
|
31220
|
+
}
|
|
31221
|
+
|
|
31222
|
+
case CANCEL_SUBSCRIPTION:
|
|
31223
|
+
return lib_5({ ...state,
|
|
31224
|
+
disableSubmit: true
|
|
31225
|
+
}, (state, dispatch) => cancelSubscription(action.payload, dispatch));
|
|
31226
|
+
|
|
31227
|
+
case UNSUSPEND_SUBSCRIPTION:
|
|
31228
|
+
return lib_5({ ...state,
|
|
31229
|
+
disableSubmit: true
|
|
31230
|
+
}, (state, dispatch) => unSuspendSubscription(action.payload, dispatch));
|
|
31231
|
+
|
|
31232
|
+
case REACTIVATE_SUBSCRIPTION:
|
|
31233
|
+
return lib_5({ ...state,
|
|
31234
|
+
disableSubmit: true
|
|
31235
|
+
}, (state, dispatch) => reactivateSubscription(action.payload, dispatch));
|
|
31236
|
+
|
|
31237
|
+
default:
|
|
31238
|
+
return state;
|
|
31239
|
+
}
|
|
31240
|
+
}, initialState$4);
|
|
31241
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
31242
|
+
style: { ...style
|
|
31243
|
+
},
|
|
31244
|
+
className: `pelcro-container pelcro-dashboard-container ${className}`
|
|
31245
|
+
}, /*#__PURE__*/React__default.createElement(Provider$4, {
|
|
31246
|
+
value: {
|
|
31247
|
+
state,
|
|
31248
|
+
dispatch
|
|
31249
|
+
}
|
|
31250
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
31251
|
+
store: store$4,
|
|
31252
|
+
key: i
|
|
31253
|
+
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
31254
|
+
store: store$4
|
|
31255
|
+
})));
|
|
31256
|
+
};
|
|
31257
|
+
|
|
31055
31258
|
function _extends$h() {
|
|
31056
31259
|
_extends$h = Object.assign || function (target) {
|
|
31057
31260
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -32581,6 +32784,14 @@ const SubscriptionsMenu = props => {
|
|
|
32581
32784
|
const {
|
|
32582
32785
|
t
|
|
32583
32786
|
} = useTranslation("dashboard");
|
|
32787
|
+
const {
|
|
32788
|
+
switchView
|
|
32789
|
+
} = usePelcro();
|
|
32790
|
+
|
|
32791
|
+
const displayRedeem = () => {
|
|
32792
|
+
return switchView("gift-redeem");
|
|
32793
|
+
};
|
|
32794
|
+
|
|
32584
32795
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
32585
32796
|
id: "pelcro-dashboard-subscriptions-menu",
|
|
32586
32797
|
className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
|
|
@@ -32619,22 +32830,23 @@ const SubscriptionsMenu = props => {
|
|
|
32619
32830
|
className: "plc-w-4 plc-h-4 plc-mr-1"
|
|
32620
32831
|
}),
|
|
32621
32832
|
className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase plc-rounded-none hover:plc-bg-gray-100",
|
|
32622
|
-
onClick:
|
|
32833
|
+
onClick: displayRedeem
|
|
32623
32834
|
}, t("labels.redeemGift")))))));
|
|
32624
32835
|
};
|
|
32625
32836
|
const SubscriptionsItems = ({
|
|
32626
32837
|
onClose,
|
|
32627
|
-
cancelSubscription,
|
|
32628
|
-
unSuspendSubscription,
|
|
32629
|
-
reactivateSubscription,
|
|
32630
32838
|
setProductAndPlan,
|
|
32631
32839
|
setSubscriptionIdToRenew,
|
|
32632
|
-
setView,
|
|
32633
32840
|
getSubscriptionStatus,
|
|
32634
|
-
disableSubmit,
|
|
32635
32841
|
activeMenu,
|
|
32636
32842
|
toggleActiveMenu
|
|
32637
32843
|
}) => {
|
|
32844
|
+
const {
|
|
32845
|
+
state: {
|
|
32846
|
+
disableSubmit
|
|
32847
|
+
},
|
|
32848
|
+
dispatch
|
|
32849
|
+
} = useContext(store$4);
|
|
32638
32850
|
const {
|
|
32639
32851
|
t
|
|
32640
32852
|
} = useTranslation("dashboard");
|
|
@@ -32666,7 +32878,14 @@ const SubscriptionsItems = ({
|
|
|
32666
32878
|
switchView(null);
|
|
32667
32879
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
32668
32880
|
notify.confirm((onSuccess, onFailure) => {
|
|
32669
|
-
|
|
32881
|
+
dispatch({
|
|
32882
|
+
type: CANCEL_SUBSCRIPTION,
|
|
32883
|
+
payload: {
|
|
32884
|
+
subscription_id: sub.id,
|
|
32885
|
+
onSuccess,
|
|
32886
|
+
onFailure
|
|
32887
|
+
}
|
|
32888
|
+
});
|
|
32670
32889
|
}, {
|
|
32671
32890
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
32672
32891
|
loadingMessage: t("messages.subCancellation.loading"),
|
|
@@ -32683,7 +32902,12 @@ const SubscriptionsItems = ({
|
|
|
32683
32902
|
return switchView("email-verify");
|
|
32684
32903
|
}
|
|
32685
32904
|
|
|
32686
|
-
|
|
32905
|
+
dispatch({
|
|
32906
|
+
type: REACTIVATE_SUBSCRIPTION,
|
|
32907
|
+
payload: {
|
|
32908
|
+
subscription_id: sub.id
|
|
32909
|
+
}
|
|
32910
|
+
});
|
|
32687
32911
|
}; // Renew click
|
|
32688
32912
|
|
|
32689
32913
|
|
|
@@ -32694,7 +32918,7 @@ const SubscriptionsItems = ({
|
|
|
32694
32918
|
const plan = window.Pelcro.plan.getById(plan_id);
|
|
32695
32919
|
setProductAndPlan(product, plan);
|
|
32696
32920
|
setSubscriptionIdToRenew(sub.id);
|
|
32697
|
-
|
|
32921
|
+
switchView("plan-select");
|
|
32698
32922
|
}; // Manage members click
|
|
32699
32923
|
|
|
32700
32924
|
|
|
@@ -32703,7 +32927,7 @@ const SubscriptionsItems = ({
|
|
|
32703
32927
|
set({
|
|
32704
32928
|
subscriptionToManageMembers
|
|
32705
32929
|
});
|
|
32706
|
-
|
|
32930
|
+
switchView("manage-members");
|
|
32707
32931
|
}; // Suspend click
|
|
32708
32932
|
|
|
32709
32933
|
|
|
@@ -32713,7 +32937,7 @@ const SubscriptionsItems = ({
|
|
|
32713
32937
|
}
|
|
32714
32938
|
|
|
32715
32939
|
setSubscriptionToSuspend(sub.id);
|
|
32716
|
-
return
|
|
32940
|
+
return switchView("subscription-suspend");
|
|
32717
32941
|
}; // UnSuspend click
|
|
32718
32942
|
|
|
32719
32943
|
|
|
@@ -32724,7 +32948,14 @@ const SubscriptionsItems = ({
|
|
|
32724
32948
|
|
|
32725
32949
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
32726
32950
|
notify.confirm((onSuccess, onFailure) => {
|
|
32727
|
-
|
|
32951
|
+
dispatch({
|
|
32952
|
+
type: UNSUSPEND_SUBSCRIPTION,
|
|
32953
|
+
payload: {
|
|
32954
|
+
subscription_id: sub.id,
|
|
32955
|
+
onSuccess,
|
|
32956
|
+
onFailure
|
|
32957
|
+
}
|
|
32958
|
+
});
|
|
32728
32959
|
}, {
|
|
32729
32960
|
confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
|
|
32730
32961
|
loadingMessage: t("messages.subUnSuspend.loading"),
|
|
@@ -33055,9 +33286,6 @@ const OrderItems = ({
|
|
|
33055
33286
|
};
|
|
33056
33287
|
|
|
33057
33288
|
const DonationsMenu = ({
|
|
33058
|
-
reactivateSubscription,
|
|
33059
|
-
disableSubmit,
|
|
33060
|
-
cancelSubscription,
|
|
33061
33289
|
getSubscriptionStatus,
|
|
33062
33290
|
onClose
|
|
33063
33291
|
}) => {
|
|
@@ -33068,6 +33296,12 @@ const DonationsMenu = ({
|
|
|
33068
33296
|
switchView,
|
|
33069
33297
|
setSubscriptionToCancel
|
|
33070
33298
|
} = usePelcro();
|
|
33299
|
+
const {
|
|
33300
|
+
state: {
|
|
33301
|
+
disableSubmit
|
|
33302
|
+
},
|
|
33303
|
+
dispatch
|
|
33304
|
+
} = useContext(store$4);
|
|
33071
33305
|
const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
|
|
33072
33306
|
// Cancel button click handlers
|
|
33073
33307
|
const onCancelClick = () => {
|
|
@@ -33085,7 +33319,14 @@ const DonationsMenu = ({
|
|
|
33085
33319
|
switchView(null);
|
|
33086
33320
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
33087
33321
|
notify.confirm((onSuccess, onFailure) => {
|
|
33088
|
-
|
|
33322
|
+
dispatch({
|
|
33323
|
+
type: CANCEL_SUBSCRIPTION,
|
|
33324
|
+
payload: {
|
|
33325
|
+
subscription_id: sub.id,
|
|
33326
|
+
onSuccess,
|
|
33327
|
+
onFailure
|
|
33328
|
+
}
|
|
33329
|
+
});
|
|
33089
33330
|
}, {
|
|
33090
33331
|
confirmMessage: t("messages.subCancellation.isSureToCancel"),
|
|
33091
33332
|
loadingMessage: t("messages.subCancellation.loading"),
|
|
@@ -33102,7 +33343,12 @@ const DonationsMenu = ({
|
|
|
33102
33343
|
return switchView("email-verify");
|
|
33103
33344
|
}
|
|
33104
33345
|
|
|
33105
|
-
|
|
33346
|
+
dispatch({
|
|
33347
|
+
type: REACTIVATE_SUBSCRIPTION,
|
|
33348
|
+
payload: {
|
|
33349
|
+
subscription_id: sub.id
|
|
33350
|
+
}
|
|
33351
|
+
});
|
|
33106
33352
|
};
|
|
33107
33353
|
|
|
33108
33354
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
@@ -33469,8 +33715,16 @@ const GiftsMenu = props => {
|
|
|
33469
33715
|
const {
|
|
33470
33716
|
t
|
|
33471
33717
|
} = useTranslation("dashboard");
|
|
33718
|
+
const {
|
|
33719
|
+
switchView,
|
|
33720
|
+
set
|
|
33721
|
+
} = usePelcro();
|
|
33472
33722
|
const giftRecipients = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
33473
33723
|
|
|
33724
|
+
const setIsRenewingGift = isRenewingGift => set({
|
|
33725
|
+
isRenewingGift
|
|
33726
|
+
});
|
|
33727
|
+
|
|
33474
33728
|
const renderGiftRecipients = ({
|
|
33475
33729
|
disableSubmit
|
|
33476
33730
|
}) => {
|
|
@@ -33487,8 +33741,8 @@ const GiftsMenu = props => {
|
|
|
33487
33741
|
const plan = window.Pelcro.plan.getById(planId);
|
|
33488
33742
|
props === null || props === void 0 ? void 0 : props.setProductAndPlan(product, plan);
|
|
33489
33743
|
props === null || props === void 0 ? void 0 : props.setSubscriptionIdToRenew(recipient.id);
|
|
33490
|
-
|
|
33491
|
-
|
|
33744
|
+
setIsRenewingGift(true);
|
|
33745
|
+
switchView("plan-select");
|
|
33492
33746
|
};
|
|
33493
33747
|
|
|
33494
33748
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
@@ -33557,11 +33811,28 @@ const AddressesMenu = props => {
|
|
|
33557
33811
|
const {
|
|
33558
33812
|
t
|
|
33559
33813
|
} = useTranslation("dashboard");
|
|
33814
|
+
const {
|
|
33815
|
+
switchView,
|
|
33816
|
+
set
|
|
33817
|
+
} = usePelcro();
|
|
33560
33818
|
const [requestStates, setRequestStates] = useState({
|
|
33561
33819
|
loading: false,
|
|
33562
33820
|
success: false,
|
|
33563
33821
|
failed: false
|
|
33564
33822
|
});
|
|
33823
|
+
|
|
33824
|
+
const displayAddressCreate = () => {
|
|
33825
|
+
return switchView("address-create");
|
|
33826
|
+
};
|
|
33827
|
+
|
|
33828
|
+
const displayAddressEdit = e => {
|
|
33829
|
+
const address = e.currentTarget.dataset.key;
|
|
33830
|
+
set({
|
|
33831
|
+
addressIdToEdit: address
|
|
33832
|
+
});
|
|
33833
|
+
return switchView("address-edit");
|
|
33834
|
+
};
|
|
33835
|
+
|
|
33565
33836
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
33566
33837
|
id: "pelcro-dashboard-addresses-menu",
|
|
33567
33838
|
className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
|
|
@@ -33570,10 +33841,10 @@ const AddressesMenu = props => {
|
|
|
33570
33841
|
}, /*#__PURE__*/React__default.createElement(AddressesItems, {
|
|
33571
33842
|
requestStates: requestStates,
|
|
33572
33843
|
setRequestStates: setRequestStates,
|
|
33573
|
-
displayAddressEdit:
|
|
33844
|
+
displayAddressEdit: displayAddressEdit
|
|
33574
33845
|
}), /*#__PURE__*/React__default.createElement(AddNew, {
|
|
33575
33846
|
title: t("labels.addAddress"),
|
|
33576
|
-
onClick:
|
|
33847
|
+
onClick: displayAddressCreate
|
|
33577
33848
|
}));
|
|
33578
33849
|
};
|
|
33579
33850
|
|
|
@@ -33670,22 +33941,54 @@ const getPaymentCardIcon = name => {
|
|
|
33670
33941
|
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"
|
|
33671
33942
|
}));
|
|
33672
33943
|
};
|
|
33944
|
+
const hasInvoices = () => {
|
|
33945
|
+
var _window$Pelcro$invoic, _window$Pelcro$invoic2;
|
|
33946
|
+
|
|
33947
|
+
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 : [];
|
|
33948
|
+
return invoices.length > 0;
|
|
33949
|
+
};
|
|
33950
|
+
const showNewsletters = () => {
|
|
33951
|
+
var _ref, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro$uiSett2;
|
|
33952
|
+
|
|
33953
|
+
const showNewslettersUiSettings = (_ref = ((_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$uiSett2 = _window$Pelcro$uiSett.newsletters) === null || _window$Pelcro$uiSett2 === void 0 ? void 0 : _window$Pelcro$uiSett2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
|
|
33954
|
+
return showNewslettersUiSettings;
|
|
33955
|
+
};
|
|
33956
|
+
const hasDonationSubs = () => {
|
|
33957
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
33958
|
+
|
|
33959
|
+
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
33960
|
+
const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
33961
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
33962
|
+
};
|
|
33963
|
+
const hasActiveMemberships = () => {
|
|
33964
|
+
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
33965
|
+
|
|
33966
|
+
return (_window$Pelcro$user$r3 = (_window$Pelcro$user$r4 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : false;
|
|
33967
|
+
};
|
|
33673
33968
|
|
|
33674
33969
|
const PaymentCardsMenu = props => {
|
|
33675
33970
|
const {
|
|
33676
33971
|
t
|
|
33677
33972
|
} = useTranslation("dashboard");
|
|
33973
|
+
const {
|
|
33974
|
+
switchView
|
|
33975
|
+
} = usePelcro();
|
|
33678
33976
|
const source = window.Pelcro.user.read().source;
|
|
33977
|
+
|
|
33978
|
+
const displaySourceCreate = () => {
|
|
33979
|
+
return switchView("payment-method-update");
|
|
33980
|
+
};
|
|
33981
|
+
|
|
33679
33982
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
33680
33983
|
id: "pelcro-dashboard-payment-menu",
|
|
33681
33984
|
className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
|
|
33682
33985
|
title: t("labels.paymentSource")
|
|
33683
33986
|
}, source ? /*#__PURE__*/React__default.createElement(PaymentCardsItems, {
|
|
33684
|
-
displaySourceCreate:
|
|
33987
|
+
displaySourceCreate: displaySourceCreate,
|
|
33685
33988
|
source: source
|
|
33686
33989
|
}) : /*#__PURE__*/React__default.createElement(AddNew, {
|
|
33687
33990
|
title: t("labels.addCard"),
|
|
33688
|
-
onClick:
|
|
33991
|
+
onClick: displaySourceCreate
|
|
33689
33992
|
}));
|
|
33690
33993
|
};
|
|
33691
33994
|
|
|
@@ -35318,625 +35621,399 @@ const SUB_MENUS = {
|
|
|
35318
35621
|
LOGOUT: "logout",
|
|
35319
35622
|
SAVED_ITEMS: "saved-items"
|
|
35320
35623
|
};
|
|
35321
|
-
|
|
35322
|
-
|
|
35323
|
-
*/
|
|
35324
|
-
|
|
35325
|
-
function DashboardWithHook(props) {
|
|
35326
|
-
React__default.useEffect(() => {
|
|
35327
|
-
var _props$onDisplay;
|
|
35624
|
+
const DashboardContent = props => {
|
|
35625
|
+
var _window$Pelcro$user$r, _window$Pelcro, _window$Pelcro$uiSett;
|
|
35328
35626
|
|
|
35329
|
-
|
|
35330
|
-
|
|
35627
|
+
const {
|
|
35628
|
+
state: {
|
|
35629
|
+
isOpen,
|
|
35630
|
+
activeDashboardLink,
|
|
35631
|
+
disableSubmit
|
|
35632
|
+
},
|
|
35633
|
+
dispatch
|
|
35634
|
+
} = useContext(store$4);
|
|
35331
35635
|
const {
|
|
35332
35636
|
switchView,
|
|
35333
|
-
|
|
35334
|
-
logout
|
|
35335
|
-
set
|
|
35637
|
+
set,
|
|
35638
|
+
logout
|
|
35336
35639
|
} = usePelcro();
|
|
35337
|
-
|
|
35338
|
-
|
|
35339
|
-
|
|
35340
|
-
|
|
35341
|
-
|
|
35342
|
-
|
|
35343
|
-
|
|
35344
|
-
|
|
35345
|
-
|
|
35346
|
-
}),
|
|
35347
|
-
onClose: () => {
|
|
35348
|
-
var _props$onClose;
|
|
35349
|
-
|
|
35350
|
-
(_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
35351
|
-
resetView();
|
|
35352
|
-
},
|
|
35353
|
-
logout: logout,
|
|
35354
|
-
setView: switchView,
|
|
35355
|
-
setProductAndPlan: (product, plan, isGift) => set({
|
|
35356
|
-
product,
|
|
35357
|
-
plan,
|
|
35358
|
-
isGift
|
|
35359
|
-
})
|
|
35360
|
-
});
|
|
35361
|
-
}
|
|
35362
|
-
DashboardWithHook.viewId = "dashboard";
|
|
35363
|
-
|
|
35364
|
-
class Dashboard extends Component {
|
|
35365
|
-
constructor(props) {
|
|
35366
|
-
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
35367
|
-
|
|
35368
|
-
super(props);
|
|
35369
|
-
|
|
35370
|
-
_defineProperty$3(this, "componentDidMount", () => {
|
|
35371
|
-
var _ReactGA$event;
|
|
35372
|
-
|
|
35373
|
-
this.setState({
|
|
35374
|
-
isOpen: true
|
|
35375
|
-
});
|
|
35376
|
-
window.Pelcro.insight.track("Modal Displayed", {
|
|
35377
|
-
name: "dashboard"
|
|
35378
|
-
});
|
|
35379
|
-
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
35380
|
-
category: "VIEWS",
|
|
35381
|
-
action: "Dashboard Modal Viewed",
|
|
35382
|
-
nonInteraction: true
|
|
35383
|
-
});
|
|
35384
|
-
const {
|
|
35385
|
-
addresses
|
|
35386
|
-
} = window.Pelcro.user.read();
|
|
35387
|
-
if (addresses) this.setState({
|
|
35388
|
-
addresses: addresses
|
|
35389
|
-
});
|
|
35390
|
-
});
|
|
35391
|
-
|
|
35392
|
-
_defineProperty$3(this, "componentWillUnmount", () => {
|
|
35393
|
-
document.removeEventListener("click", this.hideMenuIfClickedOutside);
|
|
35394
|
-
});
|
|
35395
|
-
|
|
35396
|
-
_defineProperty$3(this, "initializeHideMenuHandler", () => {
|
|
35397
|
-
document.addEventListener("click", this.hideMenuIfClickedOutside);
|
|
35398
|
-
});
|
|
35399
|
-
|
|
35400
|
-
_defineProperty$3(this, "hideMenuIfClickedOutside", event => {
|
|
35401
|
-
const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
|
|
35402
|
-
const didClickOutsideMenu = this.state.isOpen && this.menuRef.current && !this.menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
|
|
35403
|
-
|
|
35404
|
-
if (didClickOutsideMenu) {
|
|
35405
|
-
this.setState({
|
|
35406
|
-
isOpen: false,
|
|
35407
|
-
activeDashboardLink: null
|
|
35408
|
-
});
|
|
35409
|
-
}
|
|
35410
|
-
});
|
|
35411
|
-
|
|
35412
|
-
_defineProperty$3(this, "setActiveDashboardLink", submenuName => {
|
|
35413
|
-
this.setState({
|
|
35414
|
-
activeDashboardLink: submenuName !== null && submenuName !== void 0 ? submenuName : null
|
|
35415
|
-
});
|
|
35416
|
-
});
|
|
35417
|
-
|
|
35418
|
-
_defineProperty$3(this, "cancelSubscription", (subscription_id, onSuccess, onFailure) => {
|
|
35419
|
-
// disable the Login button to prevent repeated clicks
|
|
35420
|
-
window.Pelcro.subscription.cancel({
|
|
35421
|
-
auth_token: window.Pelcro.user.read().auth_token,
|
|
35422
|
-
subscription_id: subscription_id
|
|
35423
|
-
}, (err, res) => {
|
|
35424
|
-
var _ReactGA$event2;
|
|
35425
|
-
|
|
35426
|
-
if (err) {
|
|
35427
|
-
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
35428
|
-
}
|
|
35429
|
-
|
|
35430
|
-
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
|
|
35431
|
-
category: "ACTIONS",
|
|
35432
|
-
action: "Canceled",
|
|
35433
|
-
nonInteraction: true
|
|
35434
|
-
});
|
|
35435
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
35436
|
-
});
|
|
35437
|
-
});
|
|
35640
|
+
const {
|
|
35641
|
+
t
|
|
35642
|
+
} = useTranslation("dashboard");
|
|
35643
|
+
const menuRef = useRef(null);
|
|
35644
|
+
const user = window.Pelcro.user.read();
|
|
35645
|
+
const userHasName = user.first_name || user.last_name;
|
|
35646
|
+
const profilePicture = (_window$Pelcro$user$r = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : userSolidIcon;
|
|
35647
|
+
const newsletters = (_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.newsletters;
|
|
35648
|
+
Array.isArray(newsletters) && newsletters.length > 0;
|
|
35438
35649
|
|
|
35439
|
-
|
|
35440
|
-
|
|
35441
|
-
|
|
35442
|
-
subscription_id: subscription_id,
|
|
35443
|
-
suspend: 0
|
|
35444
|
-
}, (err, res) => {
|
|
35445
|
-
var _ReactGA$event3;
|
|
35650
|
+
const initializeHideMenuHandler = () => {
|
|
35651
|
+
document.addEventListener("click", hideMenuIfClickedOutside);
|
|
35652
|
+
};
|
|
35446
35653
|
|
|
35447
|
-
|
|
35448
|
-
|
|
35449
|
-
|
|
35654
|
+
const hideMenuIfClickedOutside = event => {
|
|
35655
|
+
const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
|
|
35656
|
+
const didClickOutsideMenu = isOpen && menuRef.current && !menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
|
|
35450
35657
|
|
|
35451
|
-
|
|
35452
|
-
|
|
35453
|
-
|
|
35454
|
-
nonInteraction: true
|
|
35455
|
-
});
|
|
35456
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
35658
|
+
if (didClickOutsideMenu) {
|
|
35659
|
+
dispatch({
|
|
35660
|
+
type: CLOSE_DASHBOARD
|
|
35457
35661
|
});
|
|
35458
|
-
}
|
|
35459
|
-
|
|
35460
|
-
_defineProperty$3(this, "displayRedeem", () => {
|
|
35461
|
-
return this.props.setView("gift-redeem");
|
|
35462
|
-
});
|
|
35463
|
-
|
|
35464
|
-
_defineProperty$3(this, "displaySourceCreate", () => {
|
|
35465
|
-
return this.props.setView("payment-method-update");
|
|
35466
|
-
});
|
|
35467
|
-
|
|
35468
|
-
_defineProperty$3(this, "displayUserEdit", () => {
|
|
35469
|
-
return this.props.setView("user-edit");
|
|
35470
|
-
});
|
|
35471
|
-
|
|
35472
|
-
_defineProperty$3(this, "displayChangePassword", () => {
|
|
35473
|
-
return this.props.setView("password-change");
|
|
35474
|
-
});
|
|
35662
|
+
}
|
|
35663
|
+
};
|
|
35475
35664
|
|
|
35476
|
-
|
|
35477
|
-
|
|
35665
|
+
const setActiveDashboardLink = submenuName => {
|
|
35666
|
+
dispatch({
|
|
35667
|
+
type: SET_ACTIVE_DASHBOARD_LINK,
|
|
35668
|
+
payload: submenuName !== null && submenuName !== void 0 ? submenuName : null
|
|
35478
35669
|
});
|
|
35670
|
+
};
|
|
35479
35671
|
|
|
35480
|
-
|
|
35481
|
-
|
|
35482
|
-
|
|
35672
|
+
const displayProfilePicChange = () => {
|
|
35673
|
+
return switchView("profile-picture");
|
|
35674
|
+
};
|
|
35483
35675
|
|
|
35484
|
-
|
|
35676
|
+
const setProductAndPlan = (product, plan, isGift) => {
|
|
35677
|
+
set({
|
|
35678
|
+
product,
|
|
35679
|
+
plan,
|
|
35485
35680
|
isGift
|
|
35486
|
-
}) => {
|
|
35487
|
-
if (isGift) {
|
|
35488
|
-
this.props.setProductAndPlan(null, null, true);
|
|
35489
|
-
}
|
|
35490
|
-
|
|
35491
|
-
return this.props.setView("plan-select");
|
|
35492
|
-
});
|
|
35493
|
-
|
|
35494
|
-
_defineProperty$3(this, "displayAddressCreate", () => {
|
|
35495
|
-
return this.props.setView("address-create");
|
|
35496
35681
|
});
|
|
35682
|
+
};
|
|
35497
35683
|
|
|
35498
|
-
|
|
35499
|
-
|
|
35500
|
-
|
|
35501
|
-
|
|
35502
|
-
|
|
35684
|
+
const displayProductSelect = ({
|
|
35685
|
+
isGift
|
|
35686
|
+
}) => {
|
|
35687
|
+
if (isGift) {
|
|
35688
|
+
setProductAndPlan(null, null, true);
|
|
35689
|
+
}
|
|
35503
35690
|
|
|
35504
|
-
|
|
35505
|
-
|
|
35506
|
-
});
|
|
35691
|
+
return switchView("plan-select");
|
|
35692
|
+
};
|
|
35507
35693
|
|
|
35508
|
-
|
|
35509
|
-
|
|
35510
|
-
|
|
35511
|
-
|
|
35512
|
-
|
|
35513
|
-
|
|
35694
|
+
const getSubscriptionStatusText = subscription => {
|
|
35695
|
+
if (subscription.status === "canceled") {
|
|
35696
|
+
const cancelDate = new Date(subscription.canceled_at);
|
|
35697
|
+
const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
|
|
35698
|
+
return `${t("labels.canceledOn")} ${formattedCancelDate}`;
|
|
35699
|
+
}
|
|
35514
35700
|
|
|
35515
|
-
|
|
35516
|
-
|
|
35517
|
-
|
|
35701
|
+
if (subscription.status === "incomplete") {
|
|
35702
|
+
return `${t("labels.status.incomplete")}`;
|
|
35703
|
+
}
|
|
35518
35704
|
|
|
35519
|
-
|
|
35520
|
-
|
|
35521
|
-
|
|
35522
|
-
|
|
35523
|
-
|
|
35524
|
-
|
|
35705
|
+
if (subscription.status === "extended") {
|
|
35706
|
+
// DateTime from BE is missing 3 zeros so we add them before instancing a date
|
|
35707
|
+
const expiryDate = new Date(Number(`${subscription.end_date}000`));
|
|
35708
|
+
const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
|
|
35709
|
+
return `${t("labels.until")} ${formattedExpiryDate}`;
|
|
35710
|
+
}
|
|
35525
35711
|
|
|
35526
|
-
|
|
35527
|
-
|
|
35528
|
-
|
|
35529
|
-
|
|
35530
|
-
|
|
35531
|
-
|
|
35712
|
+
if (subscription.cancel_at_period_end) {
|
|
35713
|
+
// DateTime from BE is missing 3 zeros so we add them before instancing a date
|
|
35714
|
+
const expiryDate = new Date(Number(`${subscription.expires_at}000`));
|
|
35715
|
+
const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
|
|
35716
|
+
return `${t("labels.expiresOn")} ${formattedExpiryDate}`;
|
|
35717
|
+
}
|
|
35532
35718
|
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
|
|
35719
|
+
const renewDate = new Date(Number(`${subscription.renews_at}000`));
|
|
35720
|
+
const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
|
|
35721
|
+
return `${t("labels.renewsOn")} ${formattedRenewDate}`;
|
|
35722
|
+
};
|
|
35537
35723
|
|
|
35538
|
-
|
|
35539
|
-
|
|
35540
|
-
|
|
35541
|
-
|
|
35542
|
-
|
|
35543
|
-
|
|
35544
|
-
auth_token: window.Pelcro.user.read().auth_token,
|
|
35545
|
-
subscription_id: subscription_id
|
|
35546
|
-
}, (err, res) => {
|
|
35547
|
-
this.setState({
|
|
35548
|
-
disableSubmit: false
|
|
35549
|
-
});
|
|
35550
|
-
this.props.onClose();
|
|
35724
|
+
const getSubscriptionStatus = sub => {
|
|
35725
|
+
const isSubscriptionEndingSoon = sub => {
|
|
35726
|
+
const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
|
|
35727
|
+
const endingAt = new Date(sub.expires_at * 1000).getTime();
|
|
35728
|
+
return weekFromNow > endingAt && sub.cancel_at_period_end;
|
|
35729
|
+
};
|
|
35551
35730
|
|
|
35552
|
-
|
|
35553
|
-
|
|
35554
|
-
|
|
35731
|
+
const isSubscriptionInTrial = sub => {
|
|
35732
|
+
if (!sub.trial_end) {
|
|
35733
|
+
return;
|
|
35734
|
+
}
|
|
35555
35735
|
|
|
35556
|
-
|
|
35557
|
-
|
|
35558
|
-
|
|
35736
|
+
const now = new Date().getTime();
|
|
35737
|
+
const trialEndDate = new Date(sub.trial_end).getTime();
|
|
35738
|
+
return now < trialEndDate;
|
|
35739
|
+
};
|
|
35559
35740
|
|
|
35560
|
-
|
|
35561
|
-
|
|
35562
|
-
|
|
35563
|
-
|
|
35564
|
-
|
|
35741
|
+
if (isSubscriptionEndingSoon(sub)) {
|
|
35742
|
+
return {
|
|
35743
|
+
title: t("labels.status.endingSoon"),
|
|
35744
|
+
content: getSubscriptionStatusText(sub),
|
|
35745
|
+
textColor: "plc-text-orange-700",
|
|
35746
|
+
bgColor: "plc-bg-orange-100",
|
|
35747
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
|
|
35565
35748
|
};
|
|
35749
|
+
}
|
|
35566
35750
|
|
|
35567
|
-
|
|
35568
|
-
|
|
35569
|
-
|
|
35570
|
-
|
|
35571
|
-
|
|
35572
|
-
|
|
35573
|
-
|
|
35574
|
-
return now < trialEndDate;
|
|
35751
|
+
if (isSubscriptionInTrial(sub)) {
|
|
35752
|
+
return {
|
|
35753
|
+
title: t("labels.status.inTrial"),
|
|
35754
|
+
content: getSubscriptionStatusText(sub),
|
|
35755
|
+
textColor: "plc-text-yellow-700",
|
|
35756
|
+
bgColor: "plc-bg-yellow-100",
|
|
35757
|
+
icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
|
|
35575
35758
|
};
|
|
35759
|
+
}
|
|
35576
35760
|
|
|
35577
|
-
|
|
35578
|
-
|
|
35579
|
-
|
|
35580
|
-
|
|
35581
|
-
|
|
35582
|
-
|
|
35583
|
-
|
|
35584
|
-
|
|
35585
|
-
|
|
35586
|
-
|
|
35587
|
-
if (isSubscriptionInTrial(sub)) {
|
|
35588
|
-
return {
|
|
35589
|
-
title: this.locale("labels.status.inTrial"),
|
|
35590
|
-
content: this.getSubscriptionStatusText(sub),
|
|
35591
|
-
textColor: "plc-text-yellow-700",
|
|
35592
|
-
bgColor: "plc-bg-yellow-100",
|
|
35593
|
-
icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
|
|
35594
|
-
};
|
|
35595
|
-
}
|
|
35596
|
-
|
|
35597
|
-
if (sub.status === "incomplete") {
|
|
35598
|
-
return {
|
|
35599
|
-
title: this.locale("labels.status.incomplete"),
|
|
35600
|
-
content: this.getSubscriptionStatusText(sub),
|
|
35601
|
-
textColor: "plc-text-orange-700",
|
|
35602
|
-
bgColor: "plc-bg-orange-100",
|
|
35603
|
-
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
|
|
35604
|
-
};
|
|
35605
|
-
}
|
|
35606
|
-
|
|
35607
|
-
if (sub.status === "canceled") {
|
|
35608
|
-
return {
|
|
35609
|
-
title: this.locale("labels.status.canceled"),
|
|
35610
|
-
content: this.getSubscriptionStatusText(sub),
|
|
35611
|
-
textColor: "plc-text-red-700",
|
|
35612
|
-
bgColor: "plc-bg-red-100",
|
|
35613
|
-
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
|
|
35614
|
-
};
|
|
35615
|
-
}
|
|
35761
|
+
if (sub.status === "incomplete") {
|
|
35762
|
+
return {
|
|
35763
|
+
title: t("labels.status.incomplete"),
|
|
35764
|
+
content: getSubscriptionStatusText(sub),
|
|
35765
|
+
textColor: "plc-text-orange-700",
|
|
35766
|
+
bgColor: "plc-bg-orange-100",
|
|
35767
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
|
|
35768
|
+
};
|
|
35769
|
+
}
|
|
35616
35770
|
|
|
35771
|
+
if (sub.status === "canceled") {
|
|
35617
35772
|
return {
|
|
35618
|
-
title:
|
|
35619
|
-
content:
|
|
35620
|
-
textColor: "plc-text-
|
|
35621
|
-
bgColor: "plc-bg-
|
|
35622
|
-
icon: /*#__PURE__*/React__default.createElement(
|
|
35773
|
+
title: t("labels.status.canceled"),
|
|
35774
|
+
content: getSubscriptionStatusText(sub),
|
|
35775
|
+
textColor: "plc-text-red-700",
|
|
35776
|
+
bgColor: "plc-bg-red-100",
|
|
35777
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
|
|
35623
35778
|
};
|
|
35624
|
-
}
|
|
35779
|
+
}
|
|
35625
35780
|
|
|
35626
|
-
|
|
35627
|
-
|
|
35628
|
-
|
|
35629
|
-
|
|
35630
|
-
|
|
35631
|
-
|
|
35632
|
-
|
|
35633
|
-
|
|
35634
|
-
|
|
35635
|
-
|
|
35636
|
-
|
|
35637
|
-
|
|
35638
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
35639
|
-
className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
|
|
35640
|
-
}, address.type === "shipping" ? this.locale("labels.shipping") : this.locale("labels.billing")), address.is_default && /*#__PURE__*/React__default.createElement("span", {
|
|
35641
|
-
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
35642
|
-
}, this.locale("labels.default")))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
35643
|
-
variant: "icon",
|
|
35644
|
-
className: "plc-text-gray-500",
|
|
35645
|
-
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
35646
|
-
id: "pelcro-button-update-address-" + index,
|
|
35647
|
-
"data-key": address.id,
|
|
35648
|
-
onClick: this.displayAddressEdit
|
|
35649
|
-
})));
|
|
35650
|
-
});
|
|
35651
|
-
return /*#__PURE__*/React__default.createElement("table", {
|
|
35652
|
-
className: "plc-w-full plc-table-fixed"
|
|
35653
|
-
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
35654
|
-
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
35655
|
-
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
35656
|
-
className: "plc-w-10/12"
|
|
35657
|
-
}, this.locale("labels.address")), /*#__PURE__*/React__default.createElement("th", {
|
|
35658
|
-
className: "plc-w-2/12"
|
|
35659
|
-
}, this.locale("labels.edit")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
35660
|
-
className: "plc-h-4"
|
|
35661
|
-
}), addresses, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
|
|
35662
|
-
colSpan: "2",
|
|
35663
|
-
className: "plc-p-1"
|
|
35664
|
-
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
35665
|
-
variant: "ghost",
|
|
35666
|
-
icon: /*#__PURE__*/React__default.createElement(SvgPlus, {
|
|
35667
|
-
className: "plc-w-4 plc-mr-1"
|
|
35668
|
-
}),
|
|
35669
|
-
className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100",
|
|
35670
|
-
onClick: this.displayAddressCreate
|
|
35671
|
-
}, this.locale("labels.addAddress"))))));
|
|
35781
|
+
return {
|
|
35782
|
+
title: t("labels.status.active"),
|
|
35783
|
+
content: getSubscriptionStatusText(sub),
|
|
35784
|
+
textColor: "plc-text-green-700",
|
|
35785
|
+
bgColor: "plc-bg-green-100",
|
|
35786
|
+
icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
|
|
35787
|
+
};
|
|
35788
|
+
};
|
|
35789
|
+
|
|
35790
|
+
const setSubscriptionIdToRenew = subscriptionIdToRenew => {
|
|
35791
|
+
set({
|
|
35792
|
+
subscriptionIdToRenew
|
|
35672
35793
|
});
|
|
35794
|
+
};
|
|
35673
35795
|
|
|
35674
|
-
|
|
35675
|
-
|
|
35676
|
-
|
|
35677
|
-
activeDashboardLink: null
|
|
35678
|
-
});
|
|
35796
|
+
const closeDashboard = () => {
|
|
35797
|
+
dispatch({
|
|
35798
|
+
type: CLOSE_DASHBOARD
|
|
35679
35799
|
});
|
|
35800
|
+
};
|
|
35680
35801
|
|
|
35681
|
-
|
|
35682
|
-
|
|
35683
|
-
|
|
35684
|
-
subscriptions: window.Pelcro.subscription.list(),
|
|
35685
|
-
giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
|
|
35686
|
-
disableSubmit: false,
|
|
35687
|
-
addresses: []
|
|
35802
|
+
useEffect(() => {
|
|
35803
|
+
return () => {
|
|
35804
|
+
document.removeEventListener("click", hideMenuIfClickedOutside);
|
|
35688
35805
|
};
|
|
35689
|
-
|
|
35690
|
-
|
|
35691
|
-
|
|
35692
|
-
|
|
35693
|
-
|
|
35694
|
-
|
|
35695
|
-
|
|
35696
|
-
|
|
35697
|
-
|
|
35698
|
-
|
|
35699
|
-
|
|
35700
|
-
|
|
35701
|
-
|
|
35702
|
-
|
|
35703
|
-
|
|
35704
|
-
|
|
35705
|
-
|
|
35706
|
-
|
|
35707
|
-
|
|
35708
|
-
|
|
35709
|
-
|
|
35710
|
-
|
|
35711
|
-
|
|
35712
|
-
|
|
35713
|
-
|
|
35714
|
-
|
|
35715
|
-
|
|
35716
|
-
|
|
35717
|
-
|
|
35718
|
-
|
|
35719
|
-
|
|
35720
|
-
|
|
35721
|
-
|
|
35722
|
-
|
|
35723
|
-
|
|
35724
|
-
|
|
35725
|
-
|
|
35726
|
-
|
|
35727
|
-
|
|
35728
|
-
|
|
35729
|
-
|
|
35730
|
-
|
|
35731
|
-
|
|
35732
|
-
|
|
35733
|
-
|
|
35734
|
-
|
|
35735
|
-
|
|
35736
|
-
|
|
35737
|
-
|
|
35738
|
-
|
|
35739
|
-
|
|
35740
|
-
|
|
35741
|
-
|
|
35742
|
-
|
|
35743
|
-
|
|
35744
|
-
|
|
35745
|
-
|
|
35746
|
-
|
|
35747
|
-
|
|
35748
|
-
|
|
35749
|
-
|
|
35750
|
-
|
|
35751
|
-
|
|
35752
|
-
|
|
35753
|
-
|
|
35754
|
-
|
|
35755
|
-
|
|
35756
|
-
|
|
35757
|
-
|
|
35758
|
-
|
|
35759
|
-
|
|
35760
|
-
|
|
35761
|
-
|
|
35762
|
-
|
|
35763
|
-
|
|
35764
|
-
|
|
35765
|
-
|
|
35766
|
-
|
|
35767
|
-
|
|
35768
|
-
|
|
35769
|
-
|
|
35770
|
-
|
|
35771
|
-
|
|
35772
|
-
|
|
35773
|
-
|
|
35774
|
-
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
|
|
35778
|
-
|
|
35779
|
-
|
|
35780
|
-
|
|
35781
|
-
|
|
35782
|
-
|
|
35783
|
-
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
|
|
35788
|
-
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
35792
|
-
|
|
35793
|
-
|
|
35794
|
-
|
|
35795
|
-
|
|
35796
|
-
|
|
35797
|
-
|
|
35798
|
-
|
|
35799
|
-
|
|
35800
|
-
className: "plc-
|
|
35801
|
-
},
|
|
35802
|
-
|
|
35803
|
-
|
|
35804
|
-
|
|
35805
|
-
|
|
35806
|
-
|
|
35807
|
-
|
|
35808
|
-
|
|
35809
|
-
|
|
35810
|
-
|
|
35811
|
-
|
|
35812
|
-
|
|
35813
|
-
|
|
35814
|
-
|
|
35815
|
-
|
|
35816
|
-
|
|
35817
|
-
|
|
35818
|
-
|
|
35819
|
-
|
|
35820
|
-
|
|
35821
|
-
|
|
35822
|
-
|
|
35823
|
-
|
|
35824
|
-
|
|
35825
|
-
|
|
35826
|
-
|
|
35827
|
-
|
|
35828
|
-
|
|
35829
|
-
|
|
35830
|
-
|
|
35831
|
-
|
|
35832
|
-
|
|
35833
|
-
|
|
35834
|
-
|
|
35835
|
-
|
|
35836
|
-
|
|
35837
|
-
|
|
35838
|
-
|
|
35839
|
-
|
|
35840
|
-
|
|
35841
|
-
|
|
35842
|
-
|
|
35843
|
-
|
|
35844
|
-
|
|
35845
|
-
|
|
35846
|
-
|
|
35847
|
-
|
|
35848
|
-
|
|
35849
|
-
|
|
35850
|
-
|
|
35851
|
-
|
|
35852
|
-
|
|
35853
|
-
|
|
35854
|
-
|
|
35855
|
-
|
|
35856
|
-
|
|
35857
|
-
|
|
35858
|
-
|
|
35859
|
-
|
|
35860
|
-
|
|
35861
|
-
|
|
35862
|
-
|
|
35863
|
-
|
|
35864
|
-
|
|
35865
|
-
|
|
35866
|
-
|
|
35867
|
-
|
|
35868
|
-
|
|
35869
|
-
|
|
35870
|
-
|
|
35871
|
-
|
|
35872
|
-
|
|
35873
|
-
|
|
35874
|
-
|
|
35875
|
-
|
|
35876
|
-
cancelSubscription: this.cancelSubscription,
|
|
35877
|
-
unSuspendSubscription: this.unSuspendSubscription,
|
|
35878
|
-
reactivateSubscription: this.reactivateSubscription,
|
|
35879
|
-
setProductAndPlan: this.props.setProductAndPlan,
|
|
35880
|
-
setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
|
|
35881
|
-
setView: this.props.setView,
|
|
35882
|
-
getSubscriptionStatus: this.getSubscriptionStatus,
|
|
35883
|
-
disableSubmit: this.state.disableSubmit
|
|
35884
|
-
}), this.state.activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default.createElement(MembershipsMenu, {
|
|
35885
|
-
getSubscriptionStatus: this.getSubscriptionStatus
|
|
35886
|
-
}), this.state.activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default.createElement(NewslettersMenu, null), this.state.activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default.createElement(DonationsMenu, {
|
|
35887
|
-
cancelSubscription: this.cancelSubscription,
|
|
35888
|
-
reactivateSubscription: this.reactivateSubscription,
|
|
35889
|
-
disableSubmit: this.state.disableSubmit,
|
|
35890
|
-
getSubscriptionStatus: this.getSubscriptionStatus
|
|
35891
|
-
}), this.state.activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default.createElement(GiftsMenu, {
|
|
35892
|
-
getSubscriptionStatus: this.getSubscriptionStatus,
|
|
35893
|
-
displayProductSelect: this.displayProductSelect,
|
|
35894
|
-
setProductAndPlan: this.props.setProductAndPlan,
|
|
35895
|
-
setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
|
|
35896
|
-
setIsRenewingGift: this.props.setIsRenewingGift,
|
|
35897
|
-
setView: this.props.setView,
|
|
35898
|
-
disableSubmit: this.state.disableSubmit
|
|
35899
|
-
}), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default.createElement(Button, {
|
|
35900
|
-
variant: "ghost",
|
|
35901
|
-
type: "button",
|
|
35902
|
-
className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
|
|
35903
|
-
onClick: this.closeDashboard
|
|
35904
|
-
}, /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
35905
|
-
className: "plc-fill-current"
|
|
35906
|
-
}))));
|
|
35907
|
-
}
|
|
35908
|
-
|
|
35909
|
-
}
|
|
35910
|
-
|
|
35911
|
-
function hasInvoices() {
|
|
35912
|
-
var _window$Pelcro$invoic, _window$Pelcro$invoic2;
|
|
35913
|
-
|
|
35914
|
-
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 : [];
|
|
35915
|
-
return invoices.length > 0;
|
|
35916
|
-
}
|
|
35917
|
-
|
|
35918
|
-
function showNewsletters() {
|
|
35919
|
-
var _ref, _window$Pelcro2, _window$Pelcro2$uiSet, _window$Pelcro2$uiSet2;
|
|
35920
|
-
|
|
35921
|
-
const showNewslettersUiSettings = (_ref = ((_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : (_window$Pelcro2$uiSet2 = _window$Pelcro2$uiSet.newsletters) === null || _window$Pelcro2$uiSet2 === void 0 ? void 0 : _window$Pelcro2$uiSet2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
|
|
35922
|
-
return showNewslettersUiSettings;
|
|
35923
|
-
}
|
|
35806
|
+
}, []);
|
|
35807
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Transition, {
|
|
35808
|
+
className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
|
|
35809
|
+
show: isOpen,
|
|
35810
|
+
enter: "plc-transform plc-transition plc-duration-500",
|
|
35811
|
+
enterFrom: "plc--translate-x-full",
|
|
35812
|
+
enterTo: "plc-translate-x-0",
|
|
35813
|
+
afterEnter: initializeHideMenuHandler,
|
|
35814
|
+
leave: "plc-transform plc-transition plc-duration-500",
|
|
35815
|
+
leaveFrom: "plc-translate-x-0",
|
|
35816
|
+
leaveTo: "plc--translate-x-full",
|
|
35817
|
+
afterLeave: props === null || props === void 0 ? void 0 : props.onClose
|
|
35818
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
35819
|
+
id: "pelcro-view-dashboard",
|
|
35820
|
+
ref: menuRef
|
|
35821
|
+
}, /*#__PURE__*/React__default.createElement("header", {
|
|
35822
|
+
className: "plc-bg-gray-200 plc-flex plc-py-5"
|
|
35823
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
35824
|
+
className: "plc-flex plc-items-center"
|
|
35825
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
35826
|
+
className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
|
|
35827
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
35828
|
+
className: "plc-relative plc-flex-shrink-0"
|
|
35829
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
35830
|
+
className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
|
|
35831
|
+
src: profilePicture,
|
|
35832
|
+
alt: "profile picture",
|
|
35833
|
+
onClick: displayProfilePicChange
|
|
35834
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
35835
|
+
className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
|
|
35836
|
+
}, userHasName && /*#__PURE__*/React__default.createElement("p", {
|
|
35837
|
+
className: "plc-font-bold plc-break-all"
|
|
35838
|
+
}, user.first_name, " ", user.last_name), /*#__PURE__*/React__default.createElement("p", {
|
|
35839
|
+
className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
|
|
35840
|
+
}, user.email)), /*#__PURE__*/React__default.createElement("div", {
|
|
35841
|
+
className: "lg:plc-hidden"
|
|
35842
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
35843
|
+
variant: "ghost",
|
|
35844
|
+
type: "button",
|
|
35845
|
+
className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
|
|
35846
|
+
onClick: closeDashboard
|
|
35847
|
+
}, /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
35848
|
+
className: "plc-fill-current"
|
|
35849
|
+
}))))), /*#__PURE__*/React__default.createElement("section", {
|
|
35850
|
+
className: "plc-mt-6 plc-shadow-sm"
|
|
35851
|
+
}, /*#__PURE__*/React__default.createElement("header", {
|
|
35852
|
+
className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
|
|
35853
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
35854
|
+
className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
|
|
35855
|
+
}, t("labels.mySettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35856
|
+
name: SUB_MENUS.PROFILE,
|
|
35857
|
+
icon: /*#__PURE__*/React__default.createElement(SvgUser, {
|
|
35858
|
+
className: "plc-w-6 plc-h-6 plc-mr-2"
|
|
35859
|
+
}),
|
|
35860
|
+
title: t("labels.profile"),
|
|
35861
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35862
|
+
activeDashboardLink: activeDashboardLink
|
|
35863
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35864
|
+
name: SUB_MENUS.QRCODE,
|
|
35865
|
+
icon: /*#__PURE__*/React__default.createElement(SvgQrcode, {
|
|
35866
|
+
className: "plc-w-6 plc-h-6 plc-mr-2"
|
|
35867
|
+
}),
|
|
35868
|
+
title: "My QR code",
|
|
35869
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35870
|
+
activeDashboardLink: activeDashboardLink
|
|
35871
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35872
|
+
name: SUB_MENUS.PASSWORDCHANGE,
|
|
35873
|
+
icon: /*#__PURE__*/React__default.createElement(SvgKey, {
|
|
35874
|
+
className: "plc-w-6 plc-h-6 plc-mr-2"
|
|
35875
|
+
}),
|
|
35876
|
+
title: t("labels.changePassword"),
|
|
35877
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35878
|
+
activeDashboardLink: activeDashboardLink
|
|
35879
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35880
|
+
name: SUB_MENUS.SAVED_ITEMS,
|
|
35881
|
+
icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
|
|
35882
|
+
title: t("labels.savedItems.label"),
|
|
35883
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35884
|
+
activeDashboardLink: activeDashboardLink
|
|
35885
|
+
}), /*#__PURE__*/React__default.createElement("header", {
|
|
35886
|
+
className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
|
|
35887
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
35888
|
+
className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
|
|
35889
|
+
}, t("labels.accountSettings"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35890
|
+
name: SUB_MENUS.PAYMENT_CARDS,
|
|
35891
|
+
icon: /*#__PURE__*/React__default.createElement(SvgPaymentCard, null),
|
|
35892
|
+
title: t("labels.paymentSource"),
|
|
35893
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35894
|
+
activeDashboardLink: activeDashboardLink
|
|
35895
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35896
|
+
name: SUB_MENUS.ADDRESSES,
|
|
35897
|
+
icon: /*#__PURE__*/React__default.createElement(SvgLocationPin, null),
|
|
35898
|
+
title: t("labels.addresses"),
|
|
35899
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35900
|
+
activeDashboardLink: activeDashboardLink
|
|
35901
|
+
}), /*#__PURE__*/React__default.createElement("header", {
|
|
35902
|
+
className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
|
|
35903
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
35904
|
+
className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
|
|
35905
|
+
}, t("labels.purchases"))), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35906
|
+
name: SUB_MENUS.SUBSCRIPTIONS,
|
|
35907
|
+
icon: /*#__PURE__*/React__default.createElement(SvgSubscription, {
|
|
35908
|
+
className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
|
|
35909
|
+
}),
|
|
35910
|
+
title: t("labels.subscriptions"),
|
|
35911
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35912
|
+
activeDashboardLink: activeDashboardLink
|
|
35913
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35914
|
+
show: showNewsletters(),
|
|
35915
|
+
name: SUB_MENUS.NEWSLETTERS,
|
|
35916
|
+
icon: /*#__PURE__*/React__default.createElement(SvgNewsletter, {
|
|
35917
|
+
className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
35918
|
+
}),
|
|
35919
|
+
title: t("labels.Newsletters"),
|
|
35920
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35921
|
+
activeDashboardLink: activeDashboardLink
|
|
35922
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35923
|
+
show: hasActiveMemberships(),
|
|
35924
|
+
name: SUB_MENUS.MEMBERSHIPS,
|
|
35925
|
+
icon: /*#__PURE__*/React__default.createElement(SvgMemberships, {
|
|
35926
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
35927
|
+
}),
|
|
35928
|
+
title: t("labels.memberships"),
|
|
35929
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35930
|
+
activeDashboardLink: activeDashboardLink
|
|
35931
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35932
|
+
show: hasDonationSubs(),
|
|
35933
|
+
name: SUB_MENUS.DONATIONS,
|
|
35934
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDonate, {
|
|
35935
|
+
className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
|
|
35936
|
+
}),
|
|
35937
|
+
title: t("labels.donations"),
|
|
35938
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35939
|
+
activeDashboardLink: activeDashboardLink
|
|
35940
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35941
|
+
name: SUB_MENUS.GIFTS,
|
|
35942
|
+
icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
|
|
35943
|
+
title: t("labels.gifts"),
|
|
35944
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35945
|
+
activeDashboardLink: activeDashboardLink
|
|
35946
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35947
|
+
show: window.Pelcro.site.read().ecommerce_enabled,
|
|
35948
|
+
name: SUB_MENUS.ORDERS,
|
|
35949
|
+
icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
|
|
35950
|
+
title: t("labels.orders.label"),
|
|
35951
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35952
|
+
activeDashboardLink: activeDashboardLink
|
|
35953
|
+
}), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35954
|
+
show: hasInvoices(),
|
|
35955
|
+
name: SUB_MENUS.INVOICES,
|
|
35956
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
|
|
35957
|
+
title: t("labels.invoices"),
|
|
35958
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35959
|
+
activeDashboardLink: activeDashboardLink
|
|
35960
|
+
})), /*#__PURE__*/React__default.createElement(DashboardLink, {
|
|
35961
|
+
name: SUB_MENUS.LOGOUT,
|
|
35962
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExit, null),
|
|
35963
|
+
title: t("labels.logout"),
|
|
35964
|
+
setActiveDashboardLink: setActiveDashboardLink,
|
|
35965
|
+
activeDashboardLink: activeDashboardLink
|
|
35966
|
+
}))), activeDashboardLink && isOpen && /*#__PURE__*/React__default.createElement("div", {
|
|
35967
|
+
id: "pelcro-view-dashboard-submenus",
|
|
35968
|
+
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"
|
|
35969
|
+
}, activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default.createElement(ProfileMenu, null), activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default.createElement(QRCodeMenu, null), activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default.createElement(PasswordChangeMenu, null), activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default.createElement(SavedItemsMenu, null), activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default.createElement(PaymentCardsMenu, null), activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default.createElement(AddressesMenu, null), activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default.createElement(SubscriptionsMenu, {
|
|
35970
|
+
displayProductSelect: displayProductSelect,
|
|
35971
|
+
setProductAndPlan: setProductAndPlan,
|
|
35972
|
+
setSubscriptionIdToRenew: setSubscriptionIdToRenew,
|
|
35973
|
+
getSubscriptionStatus: getSubscriptionStatus
|
|
35974
|
+
}), activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default.createElement(MembershipsMenu, {
|
|
35975
|
+
getSubscriptionStatus: getSubscriptionStatus
|
|
35976
|
+
}), activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default.createElement(NewslettersMenu, null), activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default.createElement(DonationsMenu, {
|
|
35977
|
+
getSubscriptionStatus: getSubscriptionStatus
|
|
35978
|
+
}), activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default.createElement(GiftsMenu, {
|
|
35979
|
+
getSubscriptionStatus: getSubscriptionStatus,
|
|
35980
|
+
displayProductSelect: displayProductSelect,
|
|
35981
|
+
setProductAndPlan: setProductAndPlan,
|
|
35982
|
+
setSubscriptionIdToRenew: setSubscriptionIdToRenew,
|
|
35983
|
+
disableSubmit: disableSubmit
|
|
35984
|
+
}), activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default.createElement(OrdersMenu, null), activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default.createElement(InvoicesMenu, null), activeDashboardLink === SUB_MENUS.LOGOUT && logout(), /*#__PURE__*/React__default.createElement(Button, {
|
|
35985
|
+
variant: "ghost",
|
|
35986
|
+
type: "button",
|
|
35987
|
+
className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
|
|
35988
|
+
onClick: closeDashboard
|
|
35989
|
+
}, /*#__PURE__*/React__default.createElement(SvgXIcon, {
|
|
35990
|
+
className: "plc-fill-current"
|
|
35991
|
+
}))));
|
|
35992
|
+
};
|
|
35924
35993
|
|
|
35925
|
-
|
|
35926
|
-
|
|
35994
|
+
/**
|
|
35995
|
+
*
|
|
35996
|
+
*/
|
|
35927
35997
|
|
|
35928
|
-
|
|
35929
|
-
|
|
35930
|
-
|
|
35931
|
-
}
|
|
35998
|
+
function Dashboard(props) {
|
|
35999
|
+
React__default.useEffect(() => {
|
|
36000
|
+
var _props$onDisplay;
|
|
35932
36001
|
|
|
35933
|
-
|
|
35934
|
-
|
|
36002
|
+
(_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
|
|
36003
|
+
}, []);
|
|
36004
|
+
const {
|
|
36005
|
+
resetView
|
|
36006
|
+
} = usePelcro();
|
|
36007
|
+
return /*#__PURE__*/React__default.createElement(DashboardContainer, props, /*#__PURE__*/React__default.createElement(DashboardContent, Object.assign({
|
|
36008
|
+
onClose: () => {
|
|
36009
|
+
var _props$onClose;
|
|
35935
36010
|
|
|
35936
|
-
|
|
36011
|
+
(_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
36012
|
+
resetView();
|
|
36013
|
+
}
|
|
36014
|
+
}, props)));
|
|
35937
36015
|
}
|
|
35938
|
-
|
|
35939
|
-
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
36016
|
+
Dashboard.viewId = "dashboard";
|
|
35940
36017
|
|
|
35941
36018
|
// The button in the lower left that shows the dashboard.
|
|
35942
36019
|
const DashboardOpenButton = () => {
|
|
@@ -38393,4 +38470,4 @@ const QrCodeModal = ({
|
|
|
38393
38470
|
};
|
|
38394
38471
|
QrCodeModal.viewId = "qrcode";
|
|
38395
38472
|
|
|
38396
|
-
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField,
|
|
38473
|
+
export { AddNew, AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AddressesMenu, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardContainer, DashboardContent, DashboardLink, DashboardOpenButton, DatePicker, DiscountedPrice, DonationsMenu, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GiftsMenu, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, InvoicesMenu, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MembershipsMenu, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, NewslettersMenu, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, OrderItems, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeMenu, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCardsMenu, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfileMenu, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QRCodeMenu, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, SavedItems, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, SubscriptionsItems, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
|