@crystaldesign/diva-support 24.14.0-beta.30 → 24.14.0-beta.32
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/build/esm/{incomingcall-479f3c9b.js → incomingcall-7d463414.js} +16 -16
- package/build/esm/{incomingmessage-44f48674.js → incomingmessage-44990708.js} +16 -16
- package/build/esm/{incomingothermessage-06ead268.js → incomingothermessage-c8d9c9af.js} +16 -16
- package/build/esm/index.js +21 -21
- package/build/esm/{outgoingcall-10e09aa1.js → outgoingcall-1fadd0a4.js} +16 -16
- package/build/esm/{outgoingmessage-34700b6f.js → outgoingmessage-ed340bd7.js} +16 -16
- package/build/umd/192.diva-support.umd.min.js +1 -1
- package/build/umd/225.diva-support.umd.min.js +1 -1
- package/build/umd/276.diva-support.umd.min.js +2 -0
- package/build/umd/276.diva-support.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/337.diva-support.umd.min.js +1 -1
- package/build/umd/617.diva-support.umd.min.js +1 -1
- package/build/umd/723.diva-support.umd.min.js +1 -1
- package/build/umd/788.diva-support.umd.min.js +1 -1
- package/build/umd/839.diva-support.umd.min.js +1 -1
- package/build/umd/944.diva-support.umd.min.js +1 -1
- package/build/umd/944.diva-support.umd.min.js.LICENSE.txt +9 -0
- package/build/umd/diva-support.umd.min.js +74 -1
- package/build/umd/diva-support.umd.min.js.LICENSE.txt +8 -9
- package/build/umd/report.html +1 -1
- package/package.json +5 -4
- package/build/umd/599.diva-support.umd.min.js +0 -2
- package/build/umd/599.diva-support.umd.min.js.LICENSE.txt +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-support",
|
|
3
|
-
"version": "24.14.0-beta.
|
|
3
|
+
"version": "24.14.0-beta.32",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
6
6
|
},
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@cometchat-pro/chat": "3.0.11",
|
|
18
|
-
"@crystaldesign/diva-core": "24.14.0-beta.
|
|
19
|
-
"@crystaldesign/live-planner": "24.14.0-beta.
|
|
18
|
+
"@crystaldesign/diva-core": "24.14.0-beta.32",
|
|
19
|
+
"@crystaldesign/live-planner": "24.14.0-beta.32",
|
|
20
20
|
"@emotion/react": "^11.13.3",
|
|
21
|
+
"@emotion/styled": "^11.13.0",
|
|
21
22
|
"@twemoji/api": "14.1.0",
|
|
22
23
|
"dateformat": "5.0.3",
|
|
23
24
|
"html-react-parser": "1.4.5"
|
|
@@ -34,5 +35,5 @@
|
|
|
34
35
|
"react": "^18.3.1",
|
|
35
36
|
"react-dom": "^18.3.1"
|
|
36
37
|
},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "b89fe6b81ed298dcb3b5f8af60f6df9fd749d62e"
|
|
38
39
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 599.diva-support.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaSupport=self.webpackChunkCrystaldesignDivaSupport||[]).push([[599],{3434:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Y});var r=n(7363),a=n(7446),o=n(4658),i=n(4988),s=n(747),l=n.n(s),c=n(523),u=n(9420),d=n(1413),h=n(8623),v=n(3096),p=n(7995),g=n(789),w=n(5515),x=n.n(w),f=n(7514);function OpenId(){var e,t,n,r=(0,a.KH)(),o=r.configurationStore,i=r.authorizationStore,s=(0,g.$G)().t,l=null===(e=i.state)||void 0===e?void 0:e.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(null==l?void 0:l.google)&&(0,f.jsxs)(p.Z,{className:x()(c.FI,c.lk),onClick:function onClick(){var e;return i.openOAuthLogin("google",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.google")]}),(null==l?void 0:l.microsoft)&&(0,f.jsxs)(p.Z,{className:x()(c.FI,c.Eg),onClick:function onClick(){var e;return i.openOAuthLogin("microsoft",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.microsoft")]}),(null==l?void 0:l.generic)&&(0,f.jsxs)(p.Z,{className:c.FI,style:{backgroundColor:null!==(t=l.generic.backgroundColor)&&void 0!==t?t:o.theme.palette.secondary.main,color:null!==(n=l.generic.color)&&void 0!==n?n:o.theme.palette.secondary.contrastText},onClick:function onClick(){var e;return i.openOAuthLogin("genericOpenId",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{style:l.generic.logo?{backgroundImage:"url(".concat(l.generic.logo,")")}:{}}),s("auth.login.generic")]})]})}var m=n(4680),j=(0,m.jl)("Framework","Login");const k=(0,u.Pi)((function Login(){var e,t,n,s,u=(0,a.KH)(),w=u.authorizationStore,x=u.authorizationHandler,m=(0,r.useState)("enter"),k=(0,i.Z)(m,2),y=k[0],C=k[1],M=(0,r.useState)(null!==(e=null===(t=w.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),L=(0,i.Z)(M,2),N=L[0],S=L[1],Z=(0,r.useState)(""),I=(0,i.Z)(Z,2),E=I[0],b=I[1],z=(0,r.useState)(""),D=(0,i.Z)(z,2),P=D[0],F=D[1],O=(0,r.useState)(!1),A=(0,i.Z)(O,2),T=A[0],_=A[1],R=(0,r.useState)(w.state.invitationId),U=(0,i.Z)(R,2),B=U[0],G=U[1],H=(0,r.useState)("LOGIN"==(null===(n=w.state)||void 0===n?void 0:n.type)?w.state.error:void 0),K=(0,i.Z)(H,2),$=K[0],V=K[1],Q=(0,g.$G)().t,W=function(){var e=(0,o.Z)(l().mark((function _callee(){var e,t;return l().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,B){n.next=6;break}return n.next=4,x.getInvitationValue("id",N);case 4:(e=n.sent)&&(e.isNewUser&&(w.close(),w.showRegister(void 0,N,!0)),G(!0),_(!0));case 6:return n.next=8,x.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?C("login"):w.openOAuthLogin(t.provider,w.state.organizationId,w.state.invitationId),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),j.error(new d.GE("Error while fetching login provider",{cause:n.t0})),V("auth.error.password");case 16:case"end":return n.stop()}}),_callee,null,[[0,12]])})));return function onContinue(){return e.apply(this,arguments)}}(),Y=function(){var e=(0,o.Z)(l().mark((function _callee2(){return l().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.fl)(w.login(N,E,!1,w.state.organizationId,w.state.invitationId,P));case 3:S(""),b(""),V(void 0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),j.error(new d.GE("Error while logging in",{cause:e.t0})),V(B?"auth.error.passwordotp":"auth.error.password");case 12:case"end":return e.stop()}}),_callee2,null,[[0,8]])})));return function onLogin(){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.Z)(l().mark((function _callee3(){return l().wrap((function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:w.showRequestNewPassword(N);case 1:case"end":return e.stop()}}),_callee3)})));return function resetPassword(){return e.apply(this,arguments)}}(),J="enter"==y&&0==N.length||"enter"!=y&&0==E.length;T&&!J&&(J=0==P.length);var X=null===(s=w.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:Q("auth.title.login")}),(0,f.jsx)("p",{children:Q("auth.text.login","")}),!!$&&(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{id:"loginerrortext",children:Q($)})]}),(0,f.jsx)(OpenId,{}),((null==X?void 0:X.generic)||(null==X?void 0:X.google)||(null==X?void 0:X.microsoft))&&X.standard&&(0,f.jsx)("div",{className:c.kr,children:"or"}),(null==X?void 0:X.standard)&&(0,f.jsxs)(f.Fragment,{children:["enter"==y&&(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{id:"username",value:N,autoComplete:"username",autoFocus:!0,placeholder:Q("auth.input.email"),onChange:function onChange(e){return S(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&W()}}),(0,f.jsx)(v.Z,{value:E,id:"password",type:"password",autoComplete:"current-password",hidden:!0,autoFocus:!0,placeholder:Q("auth.input.password"),onChange:function onChange(e){return b(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}})]}),"login"==y&&(0,f.jsxs)("form",{children:[T&&(0,f.jsx)(v.Z,{value:P,type:"text",autoFocus:!0,placeholder:Q("auth.input.otp"),onChange:function onChange(e){return F(e.target.value)}}),(0,f.jsx)("label",{className:c.TL,onClick:function reset(){C("enter"),S(""),b(""),V(void 0)},children:(0,f.jsx)(v.Z,{value:N,readOnly:!0,placeholder:Q("auth.input.email")})}),(0,f.jsx)(v.Z,{value:E,type:"password",id:"password",autoFocus:!0,placeholder:Q("auth.input.password"),onChange:function onChange(e){return b(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}}),(0,f.jsx)("div",{className:c.p4,style:{textAlign:"right"},onClick:q,children:Q("auth.button.forgotpassword")})]}),(0,f.jsx)(p.Z,{id:"submit",disabled:J,onClick:"enter"==y?W:Y,children:Q("enter"==y?"auth.button.continue":"auth.button.login")})]})]})}));var y=(0,m.jl)("Framework","RequestNewPassword");function RequestNewPassword(e){var t=e.initEmail,n=(0,a.KH)(),s=n.authorizationStore,u=n.apiHandler,h=n.loadingAndErrorStore,w=(0,r.useState)(t),x=(0,i.Z)(w,2),m=x[0],j=x[1],k=(0,r.useState)(!1),C=(0,i.Z)(k,2),M=C[0],L=C[1],N=(0,r.useState)(),S=(0,i.Z)(N,2),Z=S[0],I=S[1],E=(0,r.useState)(),b=(0,i.Z)(E,2),z=b[0],D=b[1],P=(0,g.$G)().t,F=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,D(!0),h.toggleLoading("SendPassword"),e.next=5,u.sendPasswordRecoveryMail({email:m});case 5:D(!1),h.toggleLoading("SendPassword"),L(!0),I(void 0),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),y.error(new d.GE("Error while sending password recovery mail",{cause:e.t0})),I("auth.error.resetpassword"),D(!1),h.toggleLoading("SendPassword");case 17:case"end":return e.stop()}}),_callee,null,[[0,11]])})));return function resetPassword(){return e.apply(this,arguments)}}();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:P("auth.title.resetpassword")}),(0,f.jsx)("p",{children:P("auth.info.resetdescription")}),!!Z&&(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P(Z)})]}),M&&(0,f.jsxs)("div",{className:c.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P("auth.info.resetpassword")})]}),!M&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.Z,{value:m,autoFocus:!0,placeholder:P("auth.input.email"),onChange:function onChange(e){return j(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&F()}}),(0,f.jsx)(p.Z,{disabled:0==m.length,onClick:F,children:P("auth.button.resetpassword")})]}),M&&(0,f.jsx)(p.Z,{disabled:z,onClick:function toLogin(){s.close(),s.showLogin()},children:P("auth.button.login")})]})}function Errormessage(e){var t=e.hasError,n=e.authErrorsg,r=(0,g.$G)().t;return(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),"INVALID"==t&&(0,f.jsx)("div",{children:r("auth.error.verifypassword")}),"SERVER"==t&&(0,f.jsx)("div",{children:n})]})}var C=(0,m.jl)("Framework","cfhange-password");function ChangePassword(e){var t,n=e.token,s=(0,a.KH)(),u=s.configurationStore,h=s.authorizationStore,w=s.apiHandler,x=(s.loadingAndErrorStore,(0,r.useState)("")),m=(0,i.Z)(x,2),j=m[0],k=m[1],y=(0,r.useState)(""),M=(0,i.Z)(y,2),L=M[0],N=M[1],S=(0,r.useState)(!1),Z=(0,i.Z)(S,2),I=Z[0],E=Z[1],b=(0,r.useState)(),z=(0,i.Z)(b,2),D=z[0],P=z[1],F=(0,r.useState)(""),O=(0,i.Z)(F,2),A=O[0],T=O[1],_=(0,r.useRef)(null),R=(0,g.$G)().t;(0,r.useEffect)((function(){j===L&&P(void 0)}),[j,L]);var U=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:if(T(R("auth.error.verifypasswordserver")),!(j.length<8||j!==L)){e.next=4;break}return P("INVALID"),e.abrupt("return");case 4:return e.prev=4,e.next=7,w.resetPassword({password:j,token:n});case 7:E(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),B(e.t0);case 13:case"end":return e.stop()}}),_callee,null,[[4,10]])})));return function resetPassword(){return e.apply(this,arguments)}}(),B=function handleError(e){if(e instanceof d.GE){if("AUTH_0003"===e.name)T(R("auth.error.verifypasswordtokenerror",{errormsg:R("auth.error.tokenexpired")}));else T(R("auth.error.verifypasswordserver",e.message));C.error(e)}C.error(new d.GE("Error while resetting password",{cause:e})),P("SERVER")};return"SERVER"===D?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Errormessage,{hasError:D,authErrorsg:A}),(0,f.jsx)(p.Z,{onClick:function onClickRequestNewPassword(){h.showRequestNewPassword("")},children:R("auth.button.resetpassword")})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:R("auth.title.verifypassword")}),I&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:c.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:R("auth.info.verifypassword")})]}),(null===(t=u.authentication.resetPassword)||void 0===t?void 0:t.returnToLogin)&&(0,f.jsx)(p.Z,{onClick:function goToLogin(){h.close(),h.showLogin()},children:R("auth.button.login")})]}),!I&&(0,f.jsxs)(f.Fragment,{children:[D&&(0,f.jsx)(Errormessage,{hasError:D,authErrorsg:A}),(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{value:j,autoFocus:!0,placeholder:R("auth.input.password"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return k(e.target.value)},onKeyPress:function onKeyPress(e){var t;return"Enter"==e.key&&(null===(t=_.current)||void 0===t?void 0:t.focus())}}),(0,f.jsx)(v.Z,{ref:_,value:L,placeholder:R("auth.input.verifypassword"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return N(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&U()}})]}),(0,f.jsx)(p.Z,{disabled:!j||!L,onClick:U,children:R("auth.button.save")})]})]})}var M=n(5486);function WelcomeScreen(e){var t=e.isNewUser,n=e.invitationId,s=e.invitationOrgId,u=(0,a.KH)(),d=u.authorizationStore,h=u.authorizationHandler,v=(0,r.useState)(""),w=(0,i.Z)(v,2),x=w[0],m=w[1],j=(0,g.$G)().t,k=function(){var e=(0,o.Z)(l().mark((function _callee(){var e;return l().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showLogin(void 0,void 0,s,n,e));case 4:case"end":return t.stop()}}),_callee)})));return function toLogin(){return e.apply(this,arguments)}}(),y=function(){var e=(0,o.Z)(l().mark((function _callee2(){var e;return l().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showRegister(n,e));case 4:case"end":return t.stop()}}),_callee2)})));return function toRegister(){return e.apply(this,arguments)}}();function checkInvitation(){return _checkInvitation.apply(this,arguments)}function _checkInvitation(){return _checkInvitation=(0,o.Z)(l().mark((function _callee3(){var e,t,n;return l().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return t=null===(e=d.state)||void 0===e?void 0:e.invitationId,r.next=3,h.getInvitationValue("email",t);case 3:if(!(n=r.sent)){r.next=8;break}return r.abrupt("return",n.email);case 8:return m("Invitation not found"),r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),_callee3)}))),_checkInvitation.apply(this,arguments)}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:j("auth.title.welcome")}),(0,f.jsx)("p",{children:j("auth.info.welcomedescription")}),x&&(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:j(x)})]}),t&&!x&&(0,f.jsx)(p.Z,{onClick:y,children:j("auth.title.register")}),!t&&!x&&(0,f.jsx)(p.Z,{onClick:k,children:j("auth.button.login")})]})}var L=n(9963),N=n(9538),S=n(8541),Z=n(3389),I=n(3524),E=n(7463),b=n(6242),z=n(9843),D=n(9071),P=r.forwardRef((function SwitchBase(e,t){var n=e.autoFocus,a=e.checked,o=e.checkedIcon,i=e.classes,s=e.className,l=e.defaultChecked,c=e.disabled,u=e.icon,d=e.id,h=e.inputProps,v=e.inputRef,p=e.name,g=e.onBlur,w=e.onChange,x=e.onFocus,f=e.readOnly,m=e.required,j=e.tabIndex,k=e.type,y=e.value,C=(0,S.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),M=(0,E.Z)({controlled:a,default:Boolean(l),name:"SwitchBase",state:"checked"}),L=(0,I.Z)(M,2),z=L[0],P=L[1],F=(0,b.Z)(),O=c;F&&void 0===O&&(O=F.disabled);var A="checkbox"===k||"radio"===k;return r.createElement(D.Z,(0,N.Z)({component:"span",className:(0,Z.Z)(i.root,s,z&&i.checked,O&&i.disabled),disabled:O,tabIndex:null,role:void 0,onFocus:function handleFocus(e){x&&x(e),F&&F.onFocus&&F.onFocus(e)},onBlur:function handleBlur(e){g&&g(e),F&&F.onBlur&&F.onBlur(e)},ref:t},C),r.createElement("input",(0,N.Z)({autoFocus:n,checked:a,defaultChecked:l,className:i.input,disabled:O,id:A&&d,name:p,onChange:function handleInputChange(e){var t=e.target.checked;P(t),w&&w(e,t)},readOnly:f,ref:v,required:m,tabIndex:j,type:k,value:y},h)),z?o:u)}));const F=(0,z.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(P);var O=n(4805);const A=(0,O.Z)(r.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),T=(0,O.Z)(r.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");var _=n(7702);const R=(0,O.Z)(r.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var U=n(674),B=r.createElement(T,null),G=r.createElement(A,null),H=r.createElement(R,null),K=r.forwardRef((function Checkbox(e,t){var n=e.checkedIcon,a=void 0===n?B:n,o=e.classes,i=e.color,s=void 0===i?"secondary":i,l=e.icon,c=void 0===l?G:l,u=e.indeterminate,d=void 0!==u&&u,h=e.indeterminateIcon,v=void 0===h?H:h,p=e.inputProps,g=e.size,w=void 0===g?"medium":g,x=(0,S.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),f=d?v:c,m=d?v:a;return r.createElement(F,(0,N.Z)({type:"checkbox",classes:{root:(0,Z.Z)(o.root,o["color".concat((0,U.Z)(s))],d&&o.indeterminate),checked:o.checked,disabled:o.disabled},color:s,inputProps:(0,N.Z)({"data-indeterminate":d},p),icon:r.cloneElement(f,{fontSize:void 0===f.props.fontSize&&"small"===w?w:f.props.fontSize}),checkedIcon:r.cloneElement(m,{fontSize:void 0===m.props.fontSize&&"small"===w?w:m.props.fontSize}),ref:t},x))}));const $=(0,z.Z)((function styles(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,_.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,_.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(K);var V=(0,m.jl)("Framework","Register");const Q=(0,u.Pi)((function Register(){var e,t,n,s,u,w,x=(0,a.KH)(),m=x.authorizationStore,j=x.configurationStore,k=(0,g.$G)().t,y=(0,r.useState)(null!==(e=null===(t=m.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),C=(0,i.Z)(y,2),M=C[0],N=C[1],S=(0,r.useState)(""),Z=(0,i.Z)(S,2),I=Z[0],E=Z[1],b=(0,r.useState)(""),z=(0,i.Z)(b,2),D=z[0],P=z[1],F=(0,r.useState)(""),O=(0,i.Z)(F,2),A=O[0],T=O[1],_=(0,r.useState)(""),R=(0,i.Z)(_,2),U=R[0],B=R[1],G=(0,r.useState)(""),H=(0,i.Z)(G,2),K=H[0],Q=H[1],W=(0,r.useState)(""),Y=(0,i.Z)(W,2),q=Y[0],J=Y[1],X=(0,r.useState)(!1),ee=(0,i.Z)(X,2),te=ee[0],ne=ee[1],re=function(){var e=(0,o.Z)(l().mark((function _callee(){var e;return l().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,h.fl)(m.register(M,I,U,A,null===(e=m.state)||void 0===e?void 0:e.invitationId,q));case 3:N(""),E(""),P(""),B(""),T(""),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),Q("auth.error.invitationotp"),V.error(new d.GE("Error while registering",{cause:t.t0}));case 14:case"end":return t.stop()}}),_callee,null,[[0,10]])})));return function onRegister(){return e.apply(this,arguments)}}(),ae=null===(n=m.state)||void 0===n?void 0:n.useOtp,oe=function validPassword(){return ae?null!=q&&""!==q&&I==D&&""!=I&&null!=I&&te:I==D&&""!=I&&null!=I&&te},ie=null===(s=m.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:k("auth.title.register")}),(0,f.jsx)("p",{children:k("auth.text.register","")}),!!K&&(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:k(K)})]}),(0,f.jsx)(OpenId,{}),((null==ie?void 0:ie.generic)||(null==ie?void 0:ie.google)||(null==ie?void 0:ie.microsoft))&&ie.standard&&(0,f.jsx)("div",{className:c.kr,children:"or"}),(null==ie?void 0:ie.standard)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("form",{children:[ae&&(0,f.jsx)(v.Z,{type:"text",value:q,placeholder:k("auth.input.otp"),onChange:function onChange(e){return J(e.target.value)}}),(0,f.jsx)(v.Z,{value:U,autoFocus:!0,placeholder:k("backoffice.form.userdetails.items.name"),onChange:function onChange(e){return B(e.target.value)}}),(0,f.jsx)(v.Z,{value:A,autoFocus:!0,placeholder:k("backoffice.form.userdetails.items.familyName"),onChange:function onChange(e){return T(e.target.value)}}),(0,f.jsx)(v.Z,{value:M,autoComplete:"email",autoFocus:!0,placeholder:k("auth.input.email"),disabled:!0}),(0,f.jsx)(v.Z,{value:I,type:"password",autoFocus:!0,placeholder:k("auth.input.password"),onChange:function onChange(e){return E(e.target.value)}}),(0,f.jsx)(v.Z,{value:D,type:"password",autoFocus:!0,placeholder:k("auth.input.repeatpassword"),onChange:function onChange(e){return P(e.target.value)}}),(0,f.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[(0,f.jsx)($,{name:"checkAGB",checked:te,onClick:function onClick(){return ne(!te)}}),(0,f.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:9},children:[(0,f.jsx)("span",{children:k("auth.acceptprivacyandagb")}),(0,f.jsxs)("span",{children:[(0,f.jsx)("a",{target:"_blank",href:null!==(u=j.navigation.tosUrl)&&void 0!==u?u:"https://www.diva-portal.de/agb",children:k("auth.GeneralTerms")}),", ",(0,f.jsx)("a",{target:"_blank",href:null!==(w=j.navigation.privacyUrl)&&void 0!==w?w:"https://www.diva-portal.de/datenschutz",children:k("auth.privacypolicy")})]})]})]}),(0,f.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:oe(),children:k("auth.input.passwordsnotmatch")})]}),(0,f.jsx)(p.Z,{disabled:!oe(),onClick:oe()?re:void 0,children:k("auth.input.login")})]})]})}));var W=(0,u.Pi)((function(){var e,t=(0,a.KH)().authorizationStore;switch(null===(e=t.state)||void 0===e?void 0:e.type){case"LOGIN":return(0,f.jsx)(k,{});case"REQUEST_NEW_PASSWORD":return(0,f.jsx)(RequestNewPassword,{initEmail:t.state.email});case"CHANGE_PASSWORD":return(0,f.jsx)(ChangePassword,{token:t.state.token});case"WELCOME":return(0,f.jsx)(WelcomeScreen,{isNewUser:t.state.isNewUser,invitationId:t.state.invitationId,invitationOrgId:t.state.invitationOrgId});case"REGISTER":return(0,f.jsx)(Q,{});case"INVITATION_EXPIRED":return(0,f.jsx)("h1",{children:"Abgelaufen"});default:return(0,f.jsx)(f.Fragment,{})}}));const Y=(0,u.Pi)((function Auth(){var e,t,n,o=(0,a.KH)(),i=o.authorizationStore,s=o.configurationStore,l=o.dataStore,u=(o.authorizationHandler,(0,r.useMemo)((function(){var e,t,n,r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMTAwMCAyOTMuNjUiPjxwYXRoIGQ9Ik0yNTAuODksMTQ3LjNjLTMuMTgtNzQtMzAuNC0xNDMuMTgtMTQxLjczLTE0My4xOEwwLDQuMjZBMzA3Ljg2LDMwNy44NiwwLDAsMSwyNi4xMiw2MC43aDc0LjJjNTIuODYsMCw3NiwyNS42OCw3OC42MSw4NS4yOSwyLjY2LDYxLjgxLTE4LjI5LDg3LjkyLTcxLjE1LDg3LjkySDc5LjJsLTQ2LjcxLjUyYTI4Ny4yOSwyODcuMjksMCwwLDEtMjAsNTMuODhoMTA5YzExMS4zMiwwLDEzMi42Ny02NywxMjkuNDgtMTQxTTMwNi44NCwyODloNzEuMjNWMGEzMDAuMDcsMzAwLjA3LDAsMCwxLTcxLjIzLDI1LjkyWm0zMTguOC42Mkw3MjYuNTkuODVhMzAwLDMwMCwwLDAsMS04My42NSwzMi4yNEw1NzcuMTEsMjI0LDUxMS4yOSwzMy4wOUEzMDAsMzAwLDAsMCwxLDQyNy42NC44NWwxMDEsMjg4Ljc2Wm0zNzQuMzYsNEw4OTkuMDUsNC45MUg4MDJMNzc1LjE0LDgxLjc0LDcwMS4wNSwyOTMuNjVBMzAwLjMyLDMwMC4zMiwwLDAsMSw3ODUsMjYxLjM1bDYuNzktMjEsMTkuMTQtNTcuNTRMODUwLjUyLDYybDQwLjA3LDEyMC44NSwxOC43LDU3LjU0LDcsMjFBMzAwLjIsMzAwLjIsMCwwLDEsMTAwMCwyOTMuNjUiIGZpbGw9IiNiM2IzYjMiLz48L3N2Zz4=";if(null!==(e=l.organization)&&void 0!==e&&e.logoUrl)r=null===(n=l.organization)||void 0===n?void 0:n.logoUrl;else if(null!==(t=s.navigation)&&void 0!==t&&t.logoUrl){var a;r=null===(a=s.navigation)||void 0===a?void 0:a.logoUrl}return r}),[null===(e=s.navigation)||void 0===e?void 0:e.logoUrl,null===(t=l.organization)||void 0===t?void 0:t.logoUrl]));return null==i.state?(0,f.jsx)(f.Fragment,{}):(0,f.jsxs)("div",{className:c.I8,children:[(0,f.jsxs)("div",{className:c.NB,children:[(0,f.jsx)("div",{className:c.tn,style:{height:null!==(n=s.configuration.loginLogoHeight)&&void 0!==n?n:50,backgroundImage:"url(".concat(u,")")}}),(0,f.jsx)(W,{})]}),s.authentication.contentBox&&(0,f.jsx)("div",{style:{width:"calc(100% - 400px)",height:"100%",position:"relative",overflow:"hidden"},children:(0,f.jsx)(M.p,{settings:{contentBoxProps:(0,h.ZN)(s.authentication.contentBox.props)}})})]})}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:599 */
|