@crystaldesign/products-component 24.14.0-beta.9 → 24.14.0-rc.0
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/cjs/index.js +18 -13
- package/build/esm/index.js +18 -13
- package/build/types/products-component/src/hooks/useProductState.d.ts +4 -1
- package/build/types/products-component/src/hooks/useProductState.d.ts.map +1 -1
- package/build/umd/113.products-component.umd.min.js +2 -0
- package/build/umd/113.products-component.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/192.products-component.umd.min.js +1 -1
- package/build/umd/225.products-component.umd.min.js +1 -1
- package/build/umd/337.products-component.umd.min.js +1 -1
- package/build/umd/617.products-component.umd.min.js +1 -1
- package/build/umd/723.products-component.umd.min.js +1 -1
- package/build/umd/788.products-component.umd.min.js +1 -1
- package/build/umd/797.products-component.umd.min.js +2 -0
- package/build/umd/797.products-component.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/839.products-component.umd.min.js +1 -1
- package/build/umd/902.products-component.umd.min.js +2 -0
- package/build/umd/902.products-component.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/944.products-component.umd.min.js +1 -1
- package/build/umd/products-component.umd.min.js +74 -1
- package/build/umd/products-component.umd.min.js.LICENSE.txt +8 -0
- package/build/umd/report.html +1 -1
- package/package.json +2 -2
- package/build/umd/460.products-component.umd.min.js +0 -2
- package/build/umd/460.products-component.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/473.products-component.umd.min.js +0 -2
- package/build/umd/473.products-component.umd.min.js.LICENSE.txt +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/products-component",
|
|
3
|
-
"version": "24.14.0-
|
|
3
|
+
"version": "24.14.0-rc.0",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"main": "build/cjs/index.js",
|
|
21
21
|
"module": "build/esm/index.js",
|
|
22
22
|
"types": "./build/types/products-component/src/index.d.ts",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "2190f60535f48fcdd045d2085d313b10bd03ed0d"
|
|
24
24
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 460.products-component.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignProductsComponent=self.webpackChunkCrystaldesignProductsComponent||[]).push([[460],{9460:(e,t,n)=>{n.r(t),n.d(t,{default:()=>q});var r=n(7363),o=n(7446),a=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),x=n(5515),w=n.n(x),f=n(7514);function OpenId(){var e,t,n,r=(0,o.KH)(),a=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:w()(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:w()(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:a.theme.palette.secondary.main,color:null!==(n=l.generic.color)&&void 0!==n?n:a.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,o.KH)(),x=u.authorizationStore,w=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=x.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)(x.state.invitationId),U=(0,i.Z)(R,2),B=U[0],G=U[1],H=(0,r.useState)("LOGIN"==(null===(n=x.state)||void 0===n?void 0:n.type)?x.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,a.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,w.getInvitationValue("id",N);case 4:(e=n.sent)&&(e.isNewUser&&(x.close(),x.showRegister(void 0,N,!0)),G(!0),_(!0));case 6:return n.next=8,w.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?C("login"):x.openOAuthLogin(t.provider,x.state.organizationId,x.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,a.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)(x.login(N,E,!1,x.state.organizationId,x.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,a.Z)(l().mark((function _callee3(){return l().wrap((function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:x.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=x.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,o.KH)(),s=n.authorizationStore,u=n.apiHandler,h=n.loadingAndErrorStore,x=(0,r.useState)(t),w=(0,i.Z)(x,2),m=w[0],j=w[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,a.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,o.KH)(),u=s.configurationStore,h=s.authorizationStore,x=s.apiHandler,w=(s.loadingAndErrorStore,(0,r.useState)("")),m=(0,i.Z)(w,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,a.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,x.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,o.KH)(),d=u.authorizationStore,h=u.authorizationHandler,v=(0,r.useState)(""),x=(0,i.Z)(v,2),w=x[0],m=x[1],j=(0,g.$G)().t,k=function(){var e=(0,a.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,a.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,a.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")}),w&&(0,f.jsxs)("div",{className:c.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:j(w)})]}),t&&!w&&(0,f.jsx)(p.Z,{onClick:y,children:j("auth.title.register")}),!t&&!w&&(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=r.createContext();const z=b;var D=n(9843),P=n(9071),F=r.forwardRef((function SwitchBase(e,t){var n=e.autoFocus,o=e.checked,a=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,x=e.onChange,w=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:o,default:Boolean(l),name:"SwitchBase",state:"checked"}),L=(0,I.Z)(M,2),b=L[0],D=L[1],F=function useFormControl_useFormControl(){return r.useContext(z)}(),O=c;F&&void 0===O&&(O=F.disabled);var A="checkbox"===k||"radio"===k;return r.createElement(P.Z,(0,N.Z)({component:"span",className:(0,Z.Z)(i.root,s,b&&i.checked,O&&i.disabled),disabled:O,tabIndex:null,role:void 0,onFocus:function handleFocus(e){w&&w(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:o,defaultChecked:l,className:i.input,disabled:O,id:A&&d,name:p,onChange:function handleInputChange(e){var t=e.target.checked;D(t),x&&x(e,t)},readOnly:f,ref:v,required:m,tabIndex:j,type:k,value:y},h)),b?a:u)}));const O=(0,D.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"})(F);var A=n(4805);const T=(0,A.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"),_=(0,A.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 R=n(7702);const U=(0,A.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 B=n(674),G=r.createElement(_,null),H=r.createElement(T,null),K=r.createElement(U,null),$=r.forwardRef((function Checkbox(e,t){var n=e.checkedIcon,o=void 0===n?G:n,a=e.classes,i=e.color,s=void 0===i?"secondary":i,l=e.icon,c=void 0===l?H:l,u=e.indeterminate,d=void 0!==u&&u,h=e.indeterminateIcon,v=void 0===h?K:h,p=e.inputProps,g=e.size,x=void 0===g?"medium":g,w=(0,S.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),f=d?v:c,m=d?v:o;return r.createElement(O,(0,N.Z)({type:"checkbox",classes:{root:(0,Z.Z)(a.root,a["color".concat((0,B.Z)(s))],d&&a.indeterminate),checked:a.checked,disabled:a.disabled},color:s,inputProps:(0,N.Z)({"data-indeterminate":d},p),icon:r.cloneElement(f,{fontSize:void 0===f.props.fontSize&&"small"===x?x:f.props.fontSize}),checkedIcon:r.cloneElement(m,{fontSize:void 0===m.props.fontSize&&"small"===x?x:m.props.fontSize}),ref:t},w))}));const V=(0,D.Z)((function styles(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,R.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,R.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})($);var Q=(0,m.jl)("Framework","Register");const W=(0,u.Pi)((function Register(){var e,t,n,s,u,x,w=(0,o.KH)(),m=w.authorizationStore,j=w.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],$=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,a.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),$("auth.error.invitationotp"),Q.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)}}(),oe=null===(n=m.state)||void 0===n?void 0:n.useOtp,ae=function validPassword(){return oe?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:[oe&&(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)(V,{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!==(x=j.navigation.privacyUrl)&&void 0!==x?x:"https://www.diva-portal.de/datenschutz",children:k("auth.privacypolicy")})]})]})]}),(0,f.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:ae(),children:k("auth.input.passwordsnotmatch")})]}),(0,f.jsx)(p.Z,{disabled:!ae(),onClick:ae()?re:void 0,children:k("auth.input.login")})]})]})}));var Y=(0,u.Pi)((function(){var e,t=(0,o.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)(W,{});case"INVITATION_EXPIRED":return(0,f.jsx)("h1",{children:"Abgelaufen"});default:return(0,f.jsx)(f.Fragment,{})}}));const q=(0,u.Pi)((function Auth(){var e,t,n,a=(0,o.KH)(),i=a.authorizationStore,s=a.configurationStore,l=a.dataStore,u=(a.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 o;r=null===(o=s.navigation)||void 0===o?void 0:o.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)(Y,{})]}),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:460 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 473.products-component.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignProductsComponent=self.webpackChunkCrystaldesignProductsComponent||[]).push([[473],{5617:(e,n,t)=>{t.r(n),t.d(n,{default:()=>ModalsWrapper});var o=t(7363),a=t(9420),l=t(7446),i=t(7689),d=t(6512),r=t(7088),s=t(3821),c=t(1944),m=t(1747),u=t(3379),p=t.n(u),h=t(7795),v=t.n(h),x=t(569),f=t.n(x),g=t(3565),y=t.n(g),b=t(9216),j=t.n(b),k=t(4589),w=t.n(k),Z=t(5297),P={};P.styleTagTransform=w(),P.setAttributes=y(),P.insert=f().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=j();p()(Z.Z,P);Z.Z&&Z.Z.locals&&Z.Z.locals;var C=t(789),E=t(4988),S=t(5054),I={};I.styleTagTransform=w(),I.setAttributes=y(),I.insert=f().bind(null,"head"),I.domAPI=v(),I.insertStyleElement=j();p()(S.ZP,I);S.ZP&&S.ZP.locals&&S.ZP.locals;var F=t(7514);const A=(0,a.Pi)((function Progress(e){var n=e.children,t=e.progress,a=(0,o.useState)(),l=(0,E.Z)(a,2),i=l[0],d=l[1];return(0,o.useEffect)((function(){d(t)}),[t]),(0,F.jsxs)("div",{className:S.YS,children:[!!n&&n,(0,F.jsx)("div",{className:S.l9,children:(0,F.jsx)("div",{className:S.YJ,style:{width:100*(null!=i?i:0)+"%"},children:(0,F.jsx)("div",{className:S.zn})})})]})}));var M=t(9071),W=t(211);const z=(0,a.Pi)((function Modal(){var e,n=(0,l.KH)().contentStore,t=(0,C.$G)().t,a=function onAccept(e){var t,o=n.modal;n.closeModal(),null==o||null===(t=o.callback)||void 0===t||t.call(o,!o.content||e)},u=function onReject(){var e,t=n.modal;n.closeModal(),null==t||null===(e=t.callback)||void 0===e||e.call(t,!1)},p=(0,o.useCallback)((function(e){n.modal&&"Escape"===e.key&&u()}),[]);(0,o.useEffect)((function(){return document.addEventListener("keydown",p,!1),function(){document.removeEventListener("keydown",p,!1)}}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",h,!1),function(){document.removeEventListener("keydown",h,!1)}}),[]);var h=(0,o.useCallback)((function(e){if(n.modal)if("Enter"!==e.key||n.modal.doNotAcceptOnEnter)"ESC"!==e.key&&"Escape"!=e.key||(u(),e.preventDefault());else{var t=document.getElementById("diva-modal-form");if(!t)return;a(new FormData(t)),e.preventDefault()}}),[]);if(!n.modal)return(0,F.jsx)(F.Fragment,{});var v=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s.Z,{style:n.modal.maxWidth?{maxWidth:n.modal.maxWidth}:void 0,children:n.modal.iFrame?(0,F.jsx)(IFrame,{link:n.modal.iFrame}):"string"==typeof n.modal.text&&null==n.modal.content?(0,F.jsx)(c.Z,{component:"div",dangerouslySetInnerHTML:{__html:function tryDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(n){return e}}(n.modal.text)}}):(0,F.jsxs)(c.Z,{component:"div",children:[n.modal.text,n.modal.content&&n.modal.content]})}),(n.modal.reject||n.modal.accept)&&(0,F.jsxs)(r.Z,{children:[n.modal.reject&&(0,F.jsx)(i.Z,{color:"primary",onClick:u,children:"string"==typeof n.modal.reject?t(n.modal.reject):t("modal.reject")}),n.modal.accept&&(0,F.jsx)(i.Z,{color:"primary",type:"submit",id:"diva-dialog-submitbtn",children:"string"==typeof n.modal.accept?t(n.modal.accept):t("modal.accept")})]}),(0,F.jsxs)("div",{style:{margin:10},children:[n.modal.image&&(0,F.jsx)("img",{src:n.modal.image,style:{maxWidth:480}}),void 0!==n.modal.progress&&(0,F.jsx)(A,{progress:n.modal.progress}),null===(e=n.modal.actions)||void 0===e?void 0:e.map((function(e){var o;return(0,F.jsx)(i.Z,{fullWidth:!0,style:{marginBottom:10},variant:null!==(o=e.variant)&&void 0!==o?o:"contained",color:"primary",onClick:function onClick(){return function onSelect(e,t){var o,a=n.modal;0!=t&&n.closeModal(),null==a||null===(o=a.callback)||void 0===o||o.call(a,e)}(e.id,e.closeable)},children:t(e.text)})}))]})]}),x=!0===n.modal.fullscreen||"mobile"==n.modal.fullscreen&&n.containerDimensions.isMobile;return(0,F.jsx)("div",{className:Z.I,id:"diva-dialog",children:(0,F.jsxs)(d.Z,{open:!0,disablePortal:!0,hideBackdrop:!0,disableEnforceFocus:!0,style:{position:"absolute",zIndex:0},maxWidth:"lg",fullScreen:x,PaperProps:{style:{width:n.modal.width,height:n.modal.height}},children:[(0,F.jsx)(m.Z,{children:n.modal.title}),n.modal.rejectByIcon&&(0,F.jsx)(M.Z,{onClick:u,style:{position:"absolute",right:8,top:8,zIndex:1000001},children:(0,F.jsx)(W.Z,{})}),n.modal.dontRenderForm&&v,!n.modal.dontRenderForm&&(0,F.jsx)("form",{id:"diva-modal-form",autoComplete:"off",onSubmit:function onSubmit(e){e.preventDefault(),a(new FormData(e.target))},children:v})]})})}));function IFrame(e){var n=e.link;return(0,F.jsx)("iframe",{style:{border:0,width:"100%",height:"99%"},src:n})}function ModalsWrapper(){return(0,F.jsx)(z,{})}},5297:(e,n,t)=>{t.d(n,{I:()=>d,Z:()=>r});var o=t(8081),a=t.n(o),l=t(3645),i=t.n(l)()(a());i.push([e.id,".index-module--AtOcs {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 1001;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n",""]);var d="index-module--AtOcs";const r=i},5054:(e,n,t)=>{t.d(n,{YJ:()=>s,YS:()=>d,ZP:()=>m,l9:()=>r,zn:()=>c});var o=t(8081),a=t.n(o),l=t(3645),i=t.n(l)()(a());i.push([e.id,".index-module--Pww9z {\n display: flex;\n width: 100%;\n}\n\n.index-module--thPSh {\n height: 10px;\n position: relative;\n border-radius: 5px;\n width: 100%;\n}\n\n@keyframes index-module--_9_PO {\n from {\n background-position-x: 0;\n }\n to {\n background-position-x: 113px;\n }\n}\n\n.index-module--HhvXv {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n transition: width 0.4s ease-out;\n overflow: hidden;\n border-radius: 5px;\n}\n.index-module--f7imw {\n border-radius: 5px;\n height: 100%;\n background-color: var(--diva-theme-palette-primary-main);\n background-image: repeating-linear-gradient(\n 45deg,\n transparent,\n transparent 10px,\n var(--diva-theme-palette-secondary-dark) 10px,\n var(--diva-theme-palette-secondary-dark) 20px\n );\n animation: index-module--_9_PO 4s linear infinite;\n will-change: background-position;\n}\n",""]);var d="index-module--Pww9z",r="index-module--thPSh",s="index-module--HhvXv",c="index-module--f7imw";const m=i}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:473 */
|