@crystaldesign/diva-core 25.4.0-beta.27 → 25.4.0-beta.28
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/{ModalsWrapper-d87efa75.js → ModalsWrapper-75e84739.js} +1 -1
- package/build/esm/{index-f8ee7009.js → index-07ad5886.js} +4 -4
- package/build/esm/{index-cbfd5a62.js → index-e04ca5d9.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/umd/126.diva-core.umd.min.js +2 -0
- package/build/umd/126.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/146.diva-core.umd.min.js +1 -1
- package/build/umd/429.diva-core.umd.min.js +2 -0
- package/build/umd/429.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/83.diva-core.umd.min.js +1 -1
- package/build/umd/diva-core.umd.min.js +29 -2
- package/build/umd/diva-core.umd.min.js.LICENSE.txt +11 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/umd/806.diva-core.umd.min.js +0 -2
- package/build/umd/806.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/902.diva-core.umd.min.js +0 -2
- package/build/umd/902.diva-core.umd.min.js.LICENSE.txt +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as styleInject, u as useDivaCoreContext } from './index-
|
|
1
|
+
import { i as styleInject, u as useDivaCoreContext } from './index-07ad5886.js';
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
4
|
import Button from '@mui/material/Button';
|
|
@@ -44,7 +44,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
44
44
|
import * as Styles from '@mui/styles';
|
|
45
45
|
|
|
46
46
|
(function() {
|
|
47
|
-
const env = {"STAGE":"production","VERSION":"25.4.0-beta.
|
|
47
|
+
const env = {"STAGE":"production","VERSION":"25.4.0-beta.28"};
|
|
48
48
|
try {
|
|
49
49
|
if (process) {
|
|
50
50
|
process.env = Object.assign({}, process.env);
|
|
@@ -9575,7 +9575,7 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9575
9575
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9576
9576
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9577
9577
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9578
|
-
return import('./ModalsWrapper-
|
|
9578
|
+
return import('./ModalsWrapper-75e84739.js');
|
|
9579
9579
|
});
|
|
9580
9580
|
function Fullscreen() {
|
|
9581
9581
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
@@ -10029,10 +10029,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10029
10029
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10030
10030
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10031
10031
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10032
|
-
return import('./index-
|
|
10032
|
+
return import('./index-e04ca5d9.js');
|
|
10033
10033
|
});
|
|
10034
10034
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10035
|
-
return import('./ModalsWrapper-
|
|
10035
|
+
return import('./ModalsWrapper-75e84739.js');
|
|
10036
10036
|
});
|
|
10037
10037
|
function ContentComponent() {
|
|
10038
10038
|
var context = useDivaCoreContext();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-
|
|
1
|
+
import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-07ad5886.js';
|
|
2
2
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
3
3
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { k as AnalyticsHandler, A as AuthorizationHandler, o as ClientArticleHandler, C as Content, p as DivaMockProvider, H as HelpButton, O as ONE_DAY_UNIX, n as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, D as default, a as getLogger, q as storyBookCoreMock, j as useDivaCore } from './index-
|
|
1
|
+
export { k as AnalyticsHandler, A as AuthorizationHandler, o as ClientArticleHandler, C as Content, p as DivaMockProvider, H as HelpButton, O as ONE_DAY_UNIX, n as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, D as default, a as getLogger, q as storyBookCoreMock, j as useDivaCore } from './index-07ad5886.js';
|
|
2
2
|
export { DivaError, default as DivaUtils } from '@crystaldesign/diva-utils';
|
|
3
3
|
export { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
export * from '@crystaldesign/basket-model';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 126.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[126],{1705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(7363),o=n(7726),a=n(4062),s=n(9074),i=n(1522),c=n(1684),l=n(7843);const d=function useControlled({controlled:e,default:t,name:n,state:o="value"}){const{current:a}=r.useRef(void 0!==e),[s,i]=r.useState(t);return[a?e:s,r.useCallback((e=>{a||i(e)}),[])]};const u=r.createContext(void 0);var f=n(189),p=n(3966),h=n(431);function getSwitchBaseUtilityClass(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,p.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=n(7204),g=n(7514);const y=(0,l.ZP)(f.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),w=(0,l.ZP)("input",{shouldForwardProp:c.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),v=r.forwardRef((function SwitchBase(e,t){const{autoFocus:n,checked:o,checkedIcon:s,defaultChecked:c,disabled:l,disableFocusRipple:f=!1,edge:p=!1,icon:h,id:v,inputProps:x,inputRef:k,name:S,onBlur:C,onChange:b,onFocus:P,readOnly:F,required:z=!1,tabIndex:Z,type:R,value:M,slots:E={},slotProps:O={},...I}=e,[j,B]=d({controlled:o,default:Boolean(c),name:"SwitchBase",state:"checked"}),q=function useFormControl(){return r.useContext(u)}();let A=l;q&&void 0===A&&(A=q.disabled);const T="checkbox"===R||"radio"===R,$={...e,checked:j,disabled:A,disableFocusRipple:f,edge:p},N=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,s={root:["root",n&&"checked",r&&"disabled",o&&`edge${(0,i.Z)(o)}`],input:["input"]};return(0,a.Z)(s,getSwitchBaseUtilityClass,t)})($),L={slots:E,slotProps:{input:x,...O}},[U,H]=(0,m.Z)("root",{ref:t,elementType:y,className:N.root,shouldForwardComponentProp:!0,externalForwardedProps:{...L,component:"span",...I},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{P&&P(e),q&&q.onFocus&&q.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{C&&C(e),q&&q.onBlur&&q.onBlur(e)})(t)}}),ownerState:$,additionalProps:{centerRipple:!0,focusRipple:!f,disabled:A,role:void 0,tabIndex:null}}),[W,D]=(0,m.Z)("input",{ref:k,elementType:w,className:N.input,externalForwardedProps:L,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;B(t),b&&b(e,t)})(t)}}),ownerState:$,additionalProps:{autoFocus:n,checked:o,defaultChecked:c,disabled:A,id:T?v:void 0,name:S,readOnly:F,required:z,tabIndex:Z,type:R,..."checkbox"===R&&void 0===M?{}:{value:M}}});return(0,g.jsxs)(U,{...H,children:[(0,g.jsx)(W,{...D}),j?s:h]})}));var x=n(6177);const k=(0,x.Z)((0,g.jsx)("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"),S=(0,x.Z)((0,g.jsx)("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"),C=(0,x.Z)((0,g.jsx)("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");function getCheckboxUtilityClass(e){return(0,h.ZP)("MuiCheckbox",e)}const b=(0,p.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var P=n(518),F=n(8981),z=n(2893);function mergeSlotProps(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const r="function"==typeof t?t(n):t,a="function"==typeof e?e({...n,...r}):e,s=(0,o.Z)(n?.className,r?.className,a?.className);return{...r,...a,...!!s&&{className:s},...r?.style&&a?.style&&{style:{...r.style,...a.style}},...r?.sx&&a?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};const n=t,r=(0,o.Z)(n?.className,e?.className);return{...t,...e,...!!r&&{className:r},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const Z=(0,l.ZP)(v,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,i.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,i.Z)(n.color)}`]]}})((0,P.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,F.Z)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,F.Z)()).map((([t])=>({props:{color:t},style:{[`&.${b.checked}, &.${b.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),R=(0,g.jsx)(S,{}),M=(0,g.jsx)(k,{}),E=(0,g.jsx)(C,{}),O=r.forwardRef((function Checkbox(e,t){const n=(0,z.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=R,color:c="primary",icon:l=M,indeterminate:d=!1,indeterminateIcon:u=E,inputProps:f,size:p="medium",disableRipple:h=!1,className:y,slots:w={},slotProps:v={},...x}=n,k=d?u:l,S=d?u:s,C={...n,disableRipple:h,color:c,indeterminate:d,size:p},b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,s={root:["root",n&&"indeterminate",`color${(0,i.Z)(r)}`,`size${(0,i.Z)(o)}`]},c=(0,a.Z)(s,getCheckboxUtilityClass,t);return{...t,...c}})(C),P=v.input??f,[F,O]=(0,m.Z)("root",{ref:t,elementType:Z,className:(0,o.Z)(b.root,y),shouldForwardComponentProp:!0,externalForwardedProps:{slots:w,slotProps:v,...x},ownerState:C,additionalProps:{type:"checkbox",icon:r.cloneElement(k,{fontSize:k.props.fontSize??p}),checkedIcon:r.cloneElement(S,{fontSize:S.props.fontSize??p}),disableRipple:h,slots:w,slotProps:{input:mergeSlotProps("function"==typeof P?P(C):P,{"data-indeterminate":d})}}});return(0,g.jsx)(F,{...O,classes:b})}))},8942:(e,t,n)=>{var r=n(5108),o="undefined"!=typeof Element,a="function"==typeof Map,s="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,c,l;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!equal(e[r],t[r]))return!1;return!0}if(a&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(l=e.entries();!(r=l.next()).done;)if(!t.has(r.value[0]))return!1;for(l=e.entries();!(r=l.next()).done;)if(!equal(r.value[1],t.get(r.value[0])))return!1;return!0}if(s&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(l=e.entries();!(r=l.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(c=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,c[r]))return!1;if(o&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==c[r]&&"__v"!==c[r]&&"__o"!==c[r]||!e.$$typeof)&&!equal(e[c[r]],t[c[r]]))return!1;return!0}return e!=e&&t!=t}e.exports=function isEqual(e,t){try{return equal(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return r.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},4376:(e,t,n)=>{"use strict";n.d(t,{Z:()=>lib_Snowfall});var r=n(7363),o=n(8942);function random(e,t){const n=Math.random()*(t-e+1)+e;return Number.isInteger(e)&&Number.isInteger(t)?Math.floor(n):n}function lerp(e,t,n){return(1-n)*e+n*t}function getSize(e){return e?{height:e.offsetHeight,width:e.offsetWidth}:{height:0,width:0}}const a=2*Math.PI,s={color:"#dee4fd",radius:[.5,3],speed:[1,3],wind:[-.5,2],changeFrequency:200,rotationSpeed:[-1,1],opacity:[1,1]};class Snowflake{static createSnowflakes(e,t,n){if(!e)return[];const r=[];for(let o=0;o<t;o++)r.push(new Snowflake(e,n));return r}constructor(e,t={}){this.updateConfig(t);const{radius:n,wind:r,speed:o,rotationSpeed:a,opacity:s}=this.config;this.params={x:random(0,e.offsetWidth),y:random(-e.offsetHeight,0),rotation:random(0,360),radius:random(...n),speed:random(...o),wind:random(...r),rotationSpeed:random(...a),nextSpeed:random(...o),nextWind:random(...r),nextRotationSpeed:random(...a),opacity:random(...s)},this.framesSinceLastUpdate=0}selectImage(){this.config.images&&this.config.images.length>0?this.image=function randomElement(e){return e[Math.floor(Math.random()*e.length)]}(this.config.images):this.image=void 0}updateConfig(e){const t=this.config;this.config={...s,...e},this.config.changeFrequency=random(this.config.changeFrequency,1.5*this.config.changeFrequency),this.params&&!o(this.config.radius,null==t?void 0:t.radius)&&(this.params.radius=random(...this.config.radius)),o(this.config.images,null==t?void 0:t.images)||this.selectImage()}updateTargetParams(){this.params.nextSpeed=random(...this.config.speed),this.params.nextWind=random(...this.config.wind),this.image&&(this.params.nextRotationSpeed=random(...this.config.rotationSpeed))}update(e,t,n=1){const{x:r,y:o,rotation:a,rotationSpeed:s,nextRotationSpeed:i,wind:c,speed:l,nextWind:d,nextSpeed:u,radius:f}=this.params;this.params.x=(r+c*n)%(e+2*f),this.params.x>e+f&&(this.params.x=-f),this.params.y=(o+l*n)%(t+2*f),this.params.y>t+f&&(this.params.y=-f),this.image&&(this.params.rotation=(a+s)%360),this.params.speed=lerp(l,u,.01),this.params.wind=lerp(c,d,.01),this.params.rotationSpeed=lerp(s,i,.01),this.framesSinceLastUpdate++>this.config.changeFrequency&&(this.updateTargetParams(),this.framesSinceLastUpdate=0)}getImageOffscreenCanvas(e,t){var n,r;if(e instanceof HTMLImageElement&&e.loading)return e;let o=Snowflake.offscreenCanvases.get(e);if(o||(o={},Snowflake.offscreenCanvases.set(e,o)),!(t in o)){const r=document.createElement("canvas");r.width=t,r.height=t,null===(n=r.getContext("2d"))||void 0===n||n.drawImage(e,0,0,t,t),o[t]=r}return null!==(r=o[t])&&void 0!==r?r:e}drawCircle(e){e.moveTo(this.params.x,this.params.y),e.arc(this.params.x,this.params.y,this.params.radius,0,a)}drawImage(e){const{x:t,y:n,rotation:r,radius:o}=this.params,a=r*Math.PI/180,s=Math.cos(a),i=Math.sin(a);1!==this.params.opacity&&(e.save(),e.globalAlpha=this.params.opacity),e.setTransform(s,i,-i,s,t,n);const c=this.getImageOffscreenCanvas(this.image,o);e.drawImage(c,-o/2,-o/2,o,o),1!==this.params.opacity&&e.restore()}}Snowflake.offscreenCanvases=new WeakMap;const i=Snowflake,c={pointerEvents:"none",backgroundColor:"transparent",position:"absolute",top:0,left:0,width:"100%",height:"100%"};var l,d,__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n};class SnowfallCanvas{get ctx(){return __classPrivateFieldGet(this,l,"f")}get canvas(){return __classPrivateFieldGet(this,d,"f")}set canvas(e){__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,l,e.getContext("2d"),"f")}constructor(e,t){this.lastUpdate=Date.now(),this.snowflakes=[],l.set(this,void 0),d.set(this,void 0),__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,l,e.getContext("2d"),"f"),this.config={snowflakeCount:150,...s,...t},this.snowflakes=[],this.snowflakes=i.createSnowflakes(e,t.snowflakeCount||150,t),this.play()}updateConfig(e){this.config={...this.config,...e};const t=this.config.snowflakeCount-this.snowflakes.length;t>0&&(this.snowflakes=[...this.snowflakes,...i.createSnowflakes(this.canvas,t,e)]),t<0&&(this.snowflakes=this.snowflakes.slice(0,this.config.snowflakeCount));for(const e of this.snowflakes)e.updateConfig(this.config)}render(e=1){const{ctx:t,canvas:n,snowflakes:r}=this;if(!t||!n)return;const{offsetWidth:o,offsetHeight:a}=n;for(const t of r)t.update(o,a,e);if(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,o,a),this.config.images&&this.config.images.length>0)for(const e of r)e.drawImage(t);else{t.beginPath();for(const e of r)e.drawCircle(t);t.fillStyle=this.config.color,t.fill()}}loop(){const e=Date.now(),t=Date.now()-this.lastUpdate;this.lastUpdate=e;const n=t/16.666666666666668;this.render(n),this.animationFrame=requestAnimationFrame((()=>this.loop()))}play(){this.loop()}pause(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0)}}l=new WeakMap,d=new WeakMap;function useDeepMemo(e){const[t,n]=(0,r.useState)(e);return function useDeepCompareEffect(e,t){const n=(0,r.useRef)(t);return o(t,n.current)||(n.current=t),(0,r.useEffect)(e,n.current)}((()=>n(e)),[e]),t}const lib_Snowfall=({color:e=s.color,changeFrequency:t=s.changeFrequency,radius:n=s.radius,speed:o=s.speed,wind:a=s.wind,rotationSpeed:i=s.rotationSpeed,opacity:l=s.opacity,snowflakeCount:d=150,images:u,style:f}={})=>{const p=(h=f,(0,r.useMemo)((()=>({...c,...h||{}})),[h]));var h;const m=(0,r.useRef)(null),g=(e=>{const[t,n]=(0,r.useState)(getSize(e.current)),o=(0,r.useCallback)((()=>{e.current&&n(getSize(e.current))}),[e]);return(0,r.useEffect)((()=>{const{ResizeObserver:t}=window;if(e.current){if(o(),"function"==typeof t){const n=new t(o);return n.observe(e.current),()=>n.disconnect()}return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)}}),[e,o]),t})(m),y=useDeepMemo({color:e,changeFrequency:t,radius:n,speed:o,wind:a,rotationSpeed:i,images:u,snowflakeCount:d,opacity:l}),w=(0,r.useRef)(y),v=(0,r.useRef)();return(0,r.useEffect)((()=>(!v.current&&m.current&&(v.current=new SnowfallCanvas(m.current,w.current)),()=>{var e;null===(e=v.current)||void 0===e||e.pause(),v.current=void 0})),[]),(0,r.useEffect)((()=>{v.current&&v.current.updateConfig(y)}),[y]),r.createElement("canvas",{ref:m,height:g.height,width:g.width,style:p,"data-testid":"SnowfallCanvas"})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:126 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 146.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[146],{1146:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var r=n(7363),a=n(7095),o=n(4658),s=n(4988),i=n(747),l=n.n(i),u=n(523),c=n(9420),d=n(3693),h=n(8623),v=n(3096),g=n(7995),p=n(789),w=n(5515),x=n.n(w),j=n(7514);function OpenId(){var e,t,n,r=(0,a.KH)(),o=r.configurationStore,s=r.authorizationStore,i=(0,p.$G)().t,l=null===(e=s.state)||void 0===e?void 0:e.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(null==l?void 0:l.google)&&(0,j.jsxs)(g.Z,{className:x()(u.FI,u.lk),onClick:function onClick(){var e;return s.openOAuthLogin("google",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{}),i("auth.login.google")]}),(null==l?void 0:l.microsoft)&&(0,j.jsxs)(g.Z,{className:x()(u.FI,u.Eg),onClick:function onClick(){var e;return s.openOAuthLogin("microsoft",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{}),i("auth.login.microsoft")]}),(null==l?void 0:l.generic)&&(0,j.jsxs)(g.Z,{className:u.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 s.openOAuthLogin("genericOpenId",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{style:l.generic.logo?{backgroundImage:"url(".concat(l.generic.logo,")")}:{}}),i("auth.login.generic")]})]})}var f=n(4680),m=(0,f.jl)("Framework","Login");const y=(0,c.Pi)((function Login(){var e,t,n,i,c=(0,a.KH)(),w=c.authorizationStore,x=c.authorizationHandler,f=(0,r.useState)("enter"),y=(0,s.Z)(f,2),M=y[0],k=y[1],C=(0,r.useState)(null!==(e=null===(t=w.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),L=(0,s.Z)(C,2),N=L[0],S=L[1],I=(0,r.useState)(""),Z=(0,s.Z)(I,2),E=Z[0],z=Z[1],D=(0,r.useState)(""),b=(0,s.Z)(D,2),A=b[0],P=b[1],T=(0,r.useState)(!1),O=(0,s.Z)(T,2),_=O[0],F=O[1],U=(0,r.useState)(w.state.invitationId),R=(0,s.Z)(U,2),G=R[0],K=R[1],H=(0,r.useState)("LOGIN"==(null===(n=w.state)||void 0===n?void 0:n.type)?w.state.error:void 0),$=(0,s.Z)(H,2),Q=$[0],V=$[1],W=(0,p.$G)().t,Y=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,G){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,!!e.useotp)),K(!0),e.useotp&&F(!0));case 6:return n.next=8,x.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?k("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),m.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)}}(),B=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,A));case 3:S(""),z(""),V(void 0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),m.error(new d.GE("Error while logging in",{cause:e.t0})),V(G?"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"==M&&0==N.length||"enter"!=M&&0==E.length;_&&!J&&(J=0==A.length);var X=null===(i=w.state)||void 0===i?void 0:i.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:W("auth.title.login")}),(0,j.jsx)("p",{children:W("auth.text.login","")}),!!Q&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{id:"loginerrortext",children:W(Q)})]}),(0,j.jsx)(OpenId,{}),((null==X?void 0:X.generic)||(null==X?void 0:X.google)||(null==X?void 0:X.microsoft))&&X.standard&&(0,j.jsx)("div",{className:u.kr,children:"or"}),(null==X?void 0:X.standard)&&(0,j.jsxs)(j.Fragment,{children:["enter"==M&&(0,j.jsxs)("form",{children:[(0,j.jsx)(v.Z,{id:"username",value:N,autoComplete:"username",autoFocus:!0,placeholder:W("auth.input.email"),onChange:function onChange(e){return S(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}}),(0,j.jsx)(v.Z,{value:E,id:"password",type:"password",autoComplete:"current-password",hidden:!0,autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}})]}),"login"==M&&(0,j.jsxs)("form",{children:[_&&(0,j.jsx)(v.Z,{value:A,type:"text",autoFocus:!0,placeholder:W("auth.input.otp"),onChange:function onChange(e){return P(e.target.value)}}),(0,j.jsx)("label",{className:u.TL,onClick:function reset(){k("enter"),S(""),z(""),V(void 0)},children:(0,j.jsx)(v.Z,{value:N,readOnly:!0,placeholder:W("auth.input.email")})}),(0,j.jsx)(v.Z,{value:E,type:"password",id:"password",autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}}),(0,j.jsx)("div",{className:u.p4,style:{textAlign:"right"},onClick:q,children:W("auth.button.forgotpassword")})]}),(0,j.jsx)(g.Z,{id:"submit",disabled:J,onClick:"enter"==M?Y:B,children:W("enter"==M?"auth.button.continue":"auth.button.login")})]})]})}));var M=(0,f.jl)("Framework","RequestNewPassword");function RequestNewPassword(e){var t=e.initEmail,n=(0,a.KH)(),i=n.authorizationStore,c=n.apiHandler,h=n.loadingAndErrorStore,w=(0,r.useState)(t),x=(0,s.Z)(w,2),f=x[0],m=x[1],y=(0,r.useState)(!1),k=(0,s.Z)(y,2),C=k[0],L=k[1],N=(0,r.useState)(),S=(0,s.Z)(N,2),I=S[0],Z=S[1],E=(0,r.useState)(),z=(0,s.Z)(E,2),D=z[0],b=z[1],A=(0,p.$G)().t,P=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,b(!0),h.toggleLoading("SendPassword"),e.next=5,c.sendPasswordRecoveryMail({email:f});case 5:b(!1),h.toggleLoading("SendPassword"),L(!0),Z(void 0),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),M.error(new d.GE("Error while sending password recovery mail",{cause:e.t0})),Z("auth.error.resetpassword"),b(!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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:A("auth.title.resetpassword")}),(0,j.jsx)("p",{children:A("auth.info.resetdescription")}),!!I&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:A(I)})]}),C&&(0,j.jsxs)("div",{className:u.Vp,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:A("auth.info.resetpassword")})]}),!C&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v.Z,{value:f,autoFocus:!0,placeholder:A("auth.input.email"),onChange:function onChange(e){return m(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&P()}}),(0,j.jsx)(g.Z,{disabled:0==f.length,onClick:P,children:A("auth.button.resetpassword")})]}),C&&(0,j.jsx)(g.Z,{disabled:D,onClick:function toLogin(){i.close(),i.showLogin()},children:A("auth.button.login")})]})}function Errormessage(e){var t=e.hasError,n=e.authErrorsg,r=(0,p.$G)().t;return(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),"INVALID"==t&&(0,j.jsx)("div",{children:r("auth.error.verifypassword")}),"SERVER"==t&&(0,j.jsx)("div",{children:n})]})}var k=(0,f.jl)("Framework","cfhange-password");function ChangePassword(e){var t,n=e.token,i=(0,a.KH)(),c=i.configurationStore,h=i.authorizationStore,w=i.apiHandler,x=(i.loadingAndErrorStore,(0,r.useState)("")),f=(0,s.Z)(x,2),m=f[0],y=f[1],M=(0,r.useState)(""),C=(0,s.Z)(M,2),L=C[0],N=C[1],S=(0,r.useState)(!1),I=(0,s.Z)(S,2),Z=I[0],E=I[1],z=(0,r.useState)(),D=(0,s.Z)(z,2),b=D[0],A=D[1],P=(0,r.useState)(""),T=(0,s.Z)(P,2),O=T[0],_=T[1],F=(0,r.useRef)(null),U=(0,p.$G)().t;(0,r.useEffect)((function(){m===L&&A(void 0)}),[m,L]);var R=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(_(U("auth.error.verifypasswordserver")),!(m.length<8||m!==L)){e.next=4;break}return A("INVALID"),e.abrupt("return");case 4:return e.prev=4,e.next=7,w.resetPassword({password:m,token:n});case 7:E(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),G(e.t0);case 13:case"end":return e.stop()}}),_callee,null,[[4,10]])})));return function resetPassword(){return e.apply(this,arguments)}}(),G=function handleError(e){if(e instanceof d.GE){if("AUTH_0003"===e.name)_(U("auth.error.verifypasswordtokenerror",{errormsg:U("auth.error.tokenexpired")}));else _(U("auth.error.verifypasswordserver",e.message));k.error(e)}k.error(new d.GE("Error while resetting password",{cause:e})),A("SERVER")};return"SERVER"===b?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Errormessage,{hasError:b,authErrorsg:O}),(0,j.jsx)(g.Z,{onClick:function onClickRequestNewPassword(){h.showRequestNewPassword("")},children:U("auth.button.resetpassword")})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:U("auth.title.verifypassword")}),Z&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:u.Vp,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:U("auth.info.verifypassword")})]}),(null===(t=c.authentication.resetPassword)||void 0===t?void 0:t.returnToLogin)&&(0,j.jsx)(g.Z,{onClick:function goToLogin(){h.close(),h.showLogin()},children:U("auth.button.login")})]}),!Z&&(0,j.jsxs)(j.Fragment,{children:[b&&(0,j.jsx)(Errormessage,{hasError:b,authErrorsg:O}),(0,j.jsxs)("form",{children:[(0,j.jsx)(v.Z,{value:m,autoFocus:!0,placeholder:U("auth.input.password"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return y(e.target.value)},onKeyPress:function onKeyPress(e){var t;return"Enter"==e.key&&(null===(t=F.current)||void 0===t?void 0:t.focus())}}),(0,j.jsx)(v.Z,{ref:F,value:L,placeholder:U("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&&R()}})]}),(0,j.jsx)(g.Z,{disabled:!m||!L,onClick:R,children:U("auth.button.save")})]})]})}var C=n(4614);function WelcomeScreen(e){var t=e.isNewUser,n=e.invitationId,i=e.invitationOrgId,c=(0,a.KH)(),d=c.authorizationStore,h=c.authorizationHandler,v=(0,r.useState)(""),w=(0,s.Z)(v,2),x=w[0],f=w[1],m=(0,p.$G)().t,y=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,i,n,e));case 4:case"end":return t.stop()}}),_callee)})));return function toLogin(){return e.apply(this,arguments)}}(),M=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 f("Invitation not found"),r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),_callee3)}))),_checkInvitation.apply(this,arguments)}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:m("auth.title.welcome")}),(0,j.jsx)("p",{children:m("auth.info.welcomedescription")}),x&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:m(x)})]}),t&&!x&&(0,j.jsx)(g.Z,{onClick:M,children:m("auth.title.register")}),!t&&!x&&(0,j.jsx)(g.Z,{onClick:y,children:m("auth.button.login")})]})}var L=n(5282),N=n(5113),S=(0,f.jl)("Framework","Register");const I=(0,c.Pi)((function Register(){var e,t,n,i,c,w,x=(0,a.KH)(),f=x.authorizationStore,m=x.configurationStore,y=(0,p.$G)().t,M=(0,r.useState)(null!==(e=null===(t=f.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),k=(0,s.Z)(M,2),C=k[0],I=k[1],Z=(0,r.useState)(""),E=(0,s.Z)(Z,2),z=E[0],D=E[1],b=(0,r.useState)(""),A=(0,s.Z)(b,2),P=A[0],T=A[1],O=(0,r.useState)(""),_=(0,s.Z)(O,2),F=_[0],U=_[1],R=(0,r.useState)(""),G=(0,s.Z)(R,2),K=G[0],H=G[1],$=(0,r.useState)(""),Q=(0,s.Z)($,2),V=Q[0],W=Q[1],Y=(0,r.useState)(""),B=(0,s.Z)(Y,2),q=B[0],J=B[1],X=(0,r.useState)(!1),ee=(0,s.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)(f.register(C,z,K,F,null===(e=f.state)||void 0===e?void 0:e.invitationId,ae?q:void 0));case 3:I(""),D(""),T(""),H(""),U(""),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),W("auth.error.invitationotp"),S.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=f.state)||void 0===n?void 0:n.useOtp,oe=function validPassword(){return ae?null!=q&&""!==q&&z==P&&""!=z&&null!=z&&te:z==P&&""!=z&&null!=z&&te},se=null===(i=f.state)||void 0===i?void 0:i.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:y("auth.title.register")}),(0,j.jsx)("p",{children:y("auth.text.register","")}),!!V&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:y(V)})]}),(0,j.jsx)(OpenId,{}),((null==se?void 0:se.generic)||(null==se?void 0:se.google)||(null==se?void 0:se.microsoft))&&se.standard&&(0,j.jsx)("div",{className:u.kr,children:"or"}),(null==se?void 0:se.standard)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("form",{children:[ae&&(0,j.jsx)(v.Z,{type:"text",value:q,placeholder:y("auth.input.otp"),onChange:function onChange(e){return J(e.target.value)}}),(0,j.jsx)(v.Z,{value:K,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.name"),onChange:function onChange(e){return H(e.target.value)}}),(0,j.jsx)(v.Z,{value:F,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.familyName"),onChange:function onChange(e){return U(e.target.value)}}),(0,j.jsx)(v.Z,{value:C,autoComplete:"email",autoFocus:!0,placeholder:y("auth.input.email"),disabled:!0}),(0,j.jsx)(v.Z,{value:z,type:"password",autoFocus:!0,placeholder:y("auth.input.newpassword"),onChange:function onChange(e){return D(e.target.value)}}),(0,j.jsx)(v.Z,{value:P,type:"password",autoFocus:!0,placeholder:y("auth.input.repeatpassword"),onChange:function onChange(e){return T(e.target.value)}}),(0,j.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[(0,j.jsx)(N.Z,{name:"checkAGB",checked:te,onClick:function onClick(){return ne(!te)}}),(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:9},children:[(0,j.jsx)("span",{children:y("auth.acceptprivacyandagb")}),(0,j.jsxs)("span",{children:[(0,j.jsx)("a",{target:"_blank",href:null!==(c=m.navigation.tosUrl)&&void 0!==c?c:"https://www.diva-portal.de/agb",children:y("auth.GeneralTerms")}),", ",(0,j.jsx)("a",{target:"_blank",href:null!==(w=m.navigation.privacyUrl)&&void 0!==w?w:"https://www.diva-portal.de/datenschutz",children:y("auth.privacypolicy")})]})]})]}),(0,j.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:oe(),children:y("auth.input.passwordsnotmatch")})]}),(0,j.jsx)(g.Z,{disabled:!oe(),onClick:oe()?re:void 0,children:y("auth.input.login")})]})]})}));var Z=n(4376);var E=(0,c.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,j.jsx)(y,{});case"REQUEST_NEW_PASSWORD":return(0,j.jsx)(RequestNewPassword,{initEmail:t.state.email});case"CHANGE_PASSWORD":return(0,j.jsx)(ChangePassword,{token:t.state.token});case"WELCOME":return(0,j.jsx)(WelcomeScreen,{isNewUser:t.state.isNewUser,invitationId:t.state.invitationId,invitationOrgId:t.state.invitationOrgId});case"REGISTER":return(0,j.jsx)(I,{});case"INVITATION_EXPIRED":return(0,j.jsx)("h1",{children:"Abgelaufen"});default:return(0,j.jsx)(j.Fragment,{})}}));const z=(0,c.Pi)((function Auth(){var e,t,n,o,s=(0,a.KH)(),i=s.authorizationStore,l=s.configurationStore,c=s.dataStore,d=(0,r.useMemo)((function(){var e,t,n,r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMTAwMCAyOTMuNjUiPjxwYXRoIGQ9Ik0yNTAuODksMTQ3LjNjLTMuMTgtNzQtMzAuNC0xNDMuMTgtMTQxLjczLTE0My4xOEwwLDQuMjZBMzA3Ljg2LDMwNy44NiwwLDAsMSwyNi4xMiw2MC43aDc0LjJjNTIuODYsMCw3NiwyNS42OCw3OC42MSw4NS4yOSwyLjY2LDYxLjgxLTE4LjI5LDg3LjkyLTcxLjE1LDg3LjkySDc5LjJsLTQ2LjcxLjUyYTI4Ny4yOSwyODcuMjksMCwwLDEtMjAsNTMuODhoMTA5YzExMS4zMiwwLDEzMi42Ny02NywxMjkuNDgtMTQxTTMwNi44NCwyODloNzEuMjNWMGEzMDAuMDcsMzAwLjA3LDAsMCwxLTcxLjIzLDI1LjkyWm0zMTguOC42Mkw3MjYuNTkuODVhMzAwLDMwMCwwLDAsMS04My42NSwzMi4yNEw1NzcuMTEsMjI0LDUxMS4yOSwzMy4wOUEzMDAsMzAwLDAsMCwxLDQyNy42NC44NWwxMDEsMjg4Ljc2Wm0zNzQuMzYsNEw4OTkuMDUsNC45MUg4MDJMNzc1LjE0LDgxLjc0LDcwMS4wNSwyOTMuNjVBMzAwLjMyLDMwMC4zMiwwLDAsMSw3ODUsMjYxLjM1bDYuNzktMjEsMTkuMTQtNTcuNTRMODUwLjUyLDYybDQwLjA3LDEyMC44NSwxOC43LDU3LjU0LDcsMjFBMzAwLjIsMzAwLjIsMCwwLDEsMTAwMCwyOTMuNjUiIGZpbGw9IiNiM2IzYjMiLz48L3N2Zz4=";if(null!==(e=c.organization)&&void 0!==e&&e.logoUrl)r=null===(n=c.organization)||void 0===n?void 0:n.logoUrl;else if(null!==(t=l.navigation)&&void 0!==t&&t.logoUrl){var a;r=null===(a=l.navigation)||void 0===a?void 0:a.logoUrl}return r}),[null===(e=l.navigation)||void 0===e?void 0:e.logoUrl,null===(t=c.organization)||void 0===t?void 0:t.logoUrl]);return null==i.state?(0,j.jsx)(j.Fragment,{}):(0,j.jsxs)("div",{className:u.I8,children:[(null==l||null===(n=l.navigation)||void 0===n?void 0:n.showSnow)&&(0,j.jsx)(Z.Z,{color:"#a7b6eb",speed:[0,2.5],wind:[-1,.5],snowflakeCount:300,radius:[.5,2],style:{zIndex:1e3}}),(0,j.jsxs)("div",{className:u.NB,children:[(0,j.jsx)("div",{className:u.tn,style:{height:null!==(o=l.configuration.loginLogoHeight)&&void 0!==o?o:50,backgroundImage:"url(".concat(d,")")}}),(0,j.jsx)(E,{})]}),l.authentication.contentBox&&(0,j.jsx)("div",{style:{width:"calc(100% - 400px)",height:"100%",position:"relative",overflow:"hidden"},children:(0,j.jsx)(C.p,{settings:{contentBoxProps:(0,h.ZN)(l.authentication.contentBox.props)}})})]})}))}}]);
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[146],{1146:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var r=n(7363),a=n(7095),o=n(4658),s=n(4988),i=n(747),l=n.n(i),u=n(523),c=n(9420),d=n(3693),h=n(8623),v=n(3096),g=n(7995),p=n(789),w=n(5515),x=n.n(w),j=n(7514);function OpenId(){var e,t,n,r=(0,a.KH)(),o=r.configurationStore,s=r.authorizationStore,i=(0,p.$G)().t,l=null===(e=s.state)||void 0===e?void 0:e.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(null==l?void 0:l.google)&&(0,j.jsxs)(g.Z,{className:x()(u.FI,u.lk),onClick:function onClick(){var e;return s.openOAuthLogin("google",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{}),i("auth.login.google")]}),(null==l?void 0:l.microsoft)&&(0,j.jsxs)(g.Z,{className:x()(u.FI,u.Eg),onClick:function onClick(){var e;return s.openOAuthLogin("microsoft",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{}),i("auth.login.microsoft")]}),(null==l?void 0:l.generic)&&(0,j.jsxs)(g.Z,{className:u.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 s.openOAuthLogin("genericOpenId",s.state.organizationId,null===(e=s.state)||void 0===e?void 0:e.invitationId)},children:[(0,j.jsx)("div",{style:l.generic.logo?{backgroundImage:"url(".concat(l.generic.logo,")")}:{}}),i("auth.login.generic")]})]})}var f=n(4680),m=(0,f.jl)("Framework","Login");const y=(0,c.Pi)((function Login(){var e,t,n,i,c=(0,a.KH)(),w=c.authorizationStore,x=c.authorizationHandler,f=(0,r.useState)("enter"),y=(0,s.Z)(f,2),M=y[0],k=y[1],C=(0,r.useState)(null!==(e=null===(t=w.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),L=(0,s.Z)(C,2),N=L[0],S=L[1],I=(0,r.useState)(""),Z=(0,s.Z)(I,2),E=Z[0],z=Z[1],D=(0,r.useState)(""),b=(0,s.Z)(D,2),A=b[0],P=b[1],T=(0,r.useState)(!1),O=(0,s.Z)(T,2),_=O[0],F=O[1],U=(0,r.useState)(w.state.invitationId),R=(0,s.Z)(U,2),G=R[0],K=R[1],H=(0,r.useState)("LOGIN"==(null===(n=w.state)||void 0===n?void 0:n.type)?w.state.error:void 0),$=(0,s.Z)(H,2),Q=$[0],V=$[1],W=(0,p.$G)().t,Y=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,G){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,!!e.useotp)),K(!0),e.useotp&&F(!0));case 6:return n.next=8,x.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?k("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),m.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)}}(),B=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,A));case 3:S(""),z(""),V(void 0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),m.error(new d.GE("Error while logging in",{cause:e.t0})),V(G?"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"==M&&0==N.length||"enter"!=M&&0==E.length;_&&!J&&(J=0==A.length);var X=null===(i=w.state)||void 0===i?void 0:i.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:W("auth.title.login")}),(0,j.jsx)("p",{children:W("auth.text.login","")}),!!Q&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{id:"loginerrortext",children:W(Q)})]}),(0,j.jsx)(OpenId,{}),((null==X?void 0:X.generic)||(null==X?void 0:X.google)||(null==X?void 0:X.microsoft))&&X.standard&&(0,j.jsx)("div",{className:u.kr,children:"or"}),(null==X?void 0:X.standard)&&(0,j.jsxs)(j.Fragment,{children:["enter"==M&&(0,j.jsxs)("form",{children:[(0,j.jsx)(v.Z,{id:"username",value:N,autoComplete:"username",autoFocus:!0,placeholder:W("auth.input.email"),onChange:function onChange(e){return S(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}}),(0,j.jsx)(v.Z,{value:E,id:"password",type:"password",autoComplete:"current-password",hidden:!0,autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}})]}),"login"==M&&(0,j.jsxs)("form",{children:[_&&(0,j.jsx)(v.Z,{value:A,type:"text",autoFocus:!0,placeholder:W("auth.input.otp"),onChange:function onChange(e){return P(e.target.value)}}),(0,j.jsx)("label",{className:u.TL,onClick:function reset(){k("enter"),S(""),z(""),V(void 0)},children:(0,j.jsx)(v.Z,{value:N,readOnly:!0,placeholder:W("auth.input.email")})}),(0,j.jsx)(v.Z,{value:E,type:"password",id:"password",autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}}),(0,j.jsx)("div",{className:u.p4,style:{textAlign:"right"},onClick:q,children:W("auth.button.forgotpassword")})]}),(0,j.jsx)(g.Z,{id:"submit",disabled:J,onClick:"enter"==M?Y:B,children:W("enter"==M?"auth.button.continue":"auth.button.login")})]})]})}));var M=(0,f.jl)("Framework","RequestNewPassword");function RequestNewPassword(e){var t=e.initEmail,n=(0,a.KH)(),i=n.authorizationStore,c=n.apiHandler,h=n.loadingAndErrorStore,w=(0,r.useState)(t),x=(0,s.Z)(w,2),f=x[0],m=x[1],y=(0,r.useState)(!1),k=(0,s.Z)(y,2),C=k[0],L=k[1],N=(0,r.useState)(),S=(0,s.Z)(N,2),I=S[0],Z=S[1],E=(0,r.useState)(),z=(0,s.Z)(E,2),D=z[0],b=z[1],A=(0,p.$G)().t,P=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,b(!0),h.toggleLoading("SendPassword"),e.next=5,c.sendPasswordRecoveryMail({email:f});case 5:b(!1),h.toggleLoading("SendPassword"),L(!0),Z(void 0),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),M.error(new d.GE("Error while sending password recovery mail",{cause:e.t0})),Z("auth.error.resetpassword"),b(!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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:A("auth.title.resetpassword")}),(0,j.jsx)("p",{children:A("auth.info.resetdescription")}),!!I&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:A(I)})]}),C&&(0,j.jsxs)("div",{className:u.Vp,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:A("auth.info.resetpassword")})]}),!C&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v.Z,{value:f,autoFocus:!0,placeholder:A("auth.input.email"),onChange:function onChange(e){return m(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&P()}}),(0,j.jsx)(g.Z,{disabled:0==f.length,onClick:P,children:A("auth.button.resetpassword")})]}),C&&(0,j.jsx)(g.Z,{disabled:D,onClick:function toLogin(){i.close(),i.showLogin()},children:A("auth.button.login")})]})}function Errormessage(e){var t=e.hasError,n=e.authErrorsg,r=(0,p.$G)().t;return(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),"INVALID"==t&&(0,j.jsx)("div",{children:r("auth.error.verifypassword")}),"SERVER"==t&&(0,j.jsx)("div",{children:n})]})}var k=(0,f.jl)("Framework","cfhange-password");function ChangePassword(e){var t,n=e.token,i=(0,a.KH)(),c=i.configurationStore,h=i.authorizationStore,w=i.apiHandler,x=(i.loadingAndErrorStore,(0,r.useState)("")),f=(0,s.Z)(x,2),m=f[0],y=f[1],M=(0,r.useState)(""),C=(0,s.Z)(M,2),L=C[0],N=C[1],S=(0,r.useState)(!1),I=(0,s.Z)(S,2),Z=I[0],E=I[1],z=(0,r.useState)(),D=(0,s.Z)(z,2),b=D[0],A=D[1],P=(0,r.useState)(""),T=(0,s.Z)(P,2),O=T[0],_=T[1],F=(0,r.useRef)(null),U=(0,p.$G)().t;(0,r.useEffect)((function(){m===L&&A(void 0)}),[m,L]);var R=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(_(U("auth.error.verifypasswordserver")),!(m.length<8||m!==L)){e.next=4;break}return A("INVALID"),e.abrupt("return");case 4:return e.prev=4,e.next=7,w.resetPassword({password:m,token:n});case 7:E(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),G(e.t0);case 13:case"end":return e.stop()}}),_callee,null,[[4,10]])})));return function resetPassword(){return e.apply(this,arguments)}}(),G=function handleError(e){if(e instanceof d.GE){if("AUTH_0003"===e.name)_(U("auth.error.verifypasswordtokenerror",{errormsg:U("auth.error.tokenexpired")}));else _(U("auth.error.verifypasswordserver",e.message));k.error(e)}k.error(new d.GE("Error while resetting password",{cause:e})),A("SERVER")};return"SERVER"===b?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Errormessage,{hasError:b,authErrorsg:O}),(0,j.jsx)(g.Z,{onClick:function onClickRequestNewPassword(){h.showRequestNewPassword("")},children:U("auth.button.resetpassword")})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:U("auth.title.verifypassword")}),Z&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:u.Vp,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:U("auth.info.verifypassword")})]}),(null===(t=c.authentication.resetPassword)||void 0===t?void 0:t.returnToLogin)&&(0,j.jsx)(g.Z,{onClick:function goToLogin(){h.close(),h.showLogin()},children:U("auth.button.login")})]}),!Z&&(0,j.jsxs)(j.Fragment,{children:[b&&(0,j.jsx)(Errormessage,{hasError:b,authErrorsg:O}),(0,j.jsxs)("form",{children:[(0,j.jsx)(v.Z,{value:m,autoFocus:!0,placeholder:U("auth.input.password"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return y(e.target.value)},onKeyPress:function onKeyPress(e){var t;return"Enter"==e.key&&(null===(t=F.current)||void 0===t?void 0:t.focus())}}),(0,j.jsx)(v.Z,{ref:F,value:L,placeholder:U("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&&R()}})]}),(0,j.jsx)(g.Z,{disabled:!m||!L,onClick:R,children:U("auth.button.save")})]})]})}var C=n(4614);function WelcomeScreen(e){var t=e.isNewUser,n=e.invitationId,i=e.invitationOrgId,c=(0,a.KH)(),d=c.authorizationStore,h=c.authorizationHandler,v=(0,r.useState)(""),w=(0,s.Z)(v,2),x=w[0],f=w[1],m=(0,p.$G)().t,y=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,i,n,e));case 4:case"end":return t.stop()}}),_callee)})));return function toLogin(){return e.apply(this,arguments)}}(),M=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 f("Invitation not found"),r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),_callee3)}))),_checkInvitation.apply(this,arguments)}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:m("auth.title.welcome")}),(0,j.jsx)("p",{children:m("auth.info.welcomedescription")}),x&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:m(x)})]}),t&&!x&&(0,j.jsx)(g.Z,{onClick:M,children:m("auth.title.register")}),!t&&!x&&(0,j.jsx)(g.Z,{onClick:y,children:m("auth.button.login")})]})}var L=n(5282),N=n(1705),S=(0,f.jl)("Framework","Register");const I=(0,c.Pi)((function Register(){var e,t,n,i,c,w,x=(0,a.KH)(),f=x.authorizationStore,m=x.configurationStore,y=(0,p.$G)().t,M=(0,r.useState)(null!==(e=null===(t=f.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),k=(0,s.Z)(M,2),C=k[0],I=k[1],Z=(0,r.useState)(""),E=(0,s.Z)(Z,2),z=E[0],D=E[1],b=(0,r.useState)(""),A=(0,s.Z)(b,2),P=A[0],T=A[1],O=(0,r.useState)(""),_=(0,s.Z)(O,2),F=_[0],U=_[1],R=(0,r.useState)(""),G=(0,s.Z)(R,2),K=G[0],H=G[1],$=(0,r.useState)(""),Q=(0,s.Z)($,2),V=Q[0],W=Q[1],Y=(0,r.useState)(""),B=(0,s.Z)(Y,2),q=B[0],J=B[1],X=(0,r.useState)(!1),ee=(0,s.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)(f.register(C,z,K,F,null===(e=f.state)||void 0===e?void 0:e.invitationId,ae?q:void 0));case 3:I(""),D(""),T(""),H(""),U(""),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),W("auth.error.invitationotp"),S.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=f.state)||void 0===n?void 0:n.useOtp,oe=function validPassword(){return ae?null!=q&&""!==q&&z==P&&""!=z&&null!=z&&te:z==P&&""!=z&&null!=z&&te},se=null===(i=f.state)||void 0===i?void 0:i.loginMethods;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("h1",{children:y("auth.title.register")}),(0,j.jsx)("p",{children:y("auth.text.register","")}),!!V&&(0,j.jsxs)("div",{className:u.vU,children:[(0,j.jsx)("span",{}),(0,j.jsx)("div",{children:y(V)})]}),(0,j.jsx)(OpenId,{}),((null==se?void 0:se.generic)||(null==se?void 0:se.google)||(null==se?void 0:se.microsoft))&&se.standard&&(0,j.jsx)("div",{className:u.kr,children:"or"}),(null==se?void 0:se.standard)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("form",{children:[ae&&(0,j.jsx)(v.Z,{type:"text",value:q,placeholder:y("auth.input.otp"),onChange:function onChange(e){return J(e.target.value)}}),(0,j.jsx)(v.Z,{value:K,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.name"),onChange:function onChange(e){return H(e.target.value)}}),(0,j.jsx)(v.Z,{value:F,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.familyName"),onChange:function onChange(e){return U(e.target.value)}}),(0,j.jsx)(v.Z,{value:C,autoComplete:"email",autoFocus:!0,placeholder:y("auth.input.email"),disabled:!0}),(0,j.jsx)(v.Z,{value:z,type:"password",autoFocus:!0,placeholder:y("auth.input.newpassword"),onChange:function onChange(e){return D(e.target.value)}}),(0,j.jsx)(v.Z,{value:P,type:"password",autoFocus:!0,placeholder:y("auth.input.repeatpassword"),onChange:function onChange(e){return T(e.target.value)}}),(0,j.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[(0,j.jsx)(N.Z,{name:"checkAGB",checked:te,onClick:function onClick(){return ne(!te)}}),(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:9},children:[(0,j.jsx)("span",{children:y("auth.acceptprivacyandagb")}),(0,j.jsxs)("span",{children:[(0,j.jsx)("a",{target:"_blank",href:null!==(c=m.navigation.tosUrl)&&void 0!==c?c:"https://www.diva-portal.de/agb",children:y("auth.GeneralTerms")}),", ",(0,j.jsx)("a",{target:"_blank",href:null!==(w=m.navigation.privacyUrl)&&void 0!==w?w:"https://www.diva-portal.de/datenschutz",children:y("auth.privacypolicy")})]})]})]}),(0,j.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:oe(),children:y("auth.input.passwordsnotmatch")})]}),(0,j.jsx)(g.Z,{disabled:!oe(),onClick:oe()?re:void 0,children:y("auth.input.login")})]})]})}));var Z=n(4376);var E=(0,c.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,j.jsx)(y,{});case"REQUEST_NEW_PASSWORD":return(0,j.jsx)(RequestNewPassword,{initEmail:t.state.email});case"CHANGE_PASSWORD":return(0,j.jsx)(ChangePassword,{token:t.state.token});case"WELCOME":return(0,j.jsx)(WelcomeScreen,{isNewUser:t.state.isNewUser,invitationId:t.state.invitationId,invitationOrgId:t.state.invitationOrgId});case"REGISTER":return(0,j.jsx)(I,{});case"INVITATION_EXPIRED":return(0,j.jsx)("h1",{children:"Abgelaufen"});default:return(0,j.jsx)(j.Fragment,{})}}));const z=(0,c.Pi)((function Auth(){var e,t,n,o,s=(0,a.KH)(),i=s.authorizationStore,l=s.configurationStore,c=s.dataStore,d=(0,r.useMemo)((function(){var e,t,n,r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMTAwMCAyOTMuNjUiPjxwYXRoIGQ9Ik0yNTAuODksMTQ3LjNjLTMuMTgtNzQtMzAuNC0xNDMuMTgtMTQxLjczLTE0My4xOEwwLDQuMjZBMzA3Ljg2LDMwNy44NiwwLDAsMSwyNi4xMiw2MC43aDc0LjJjNTIuODYsMCw3NiwyNS42OCw3OC42MSw4NS4yOSwyLjY2LDYxLjgxLTE4LjI5LDg3LjkyLTcxLjE1LDg3LjkySDc5LjJsLTQ2LjcxLjUyYTI4Ny4yOSwyODcuMjksMCwwLDEtMjAsNTMuODhoMTA5YzExMS4zMiwwLDEzMi42Ny02NywxMjkuNDgtMTQxTTMwNi44NCwyODloNzEuMjNWMGEzMDAuMDcsMzAwLjA3LDAsMCwxLTcxLjIzLDI1LjkyWm0zMTguOC42Mkw3MjYuNTkuODVhMzAwLDMwMCwwLDAsMS04My42NSwzMi4yNEw1NzcuMTEsMjI0LDUxMS4yOSwzMy4wOUEzMDAsMzAwLDAsMCwxLDQyNy42NC44NWwxMDEsMjg4Ljc2Wm0zNzQuMzYsNEw4OTkuMDUsNC45MUg4MDJMNzc1LjE0LDgxLjc0LDcwMS4wNSwyOTMuNjVBMzAwLjMyLDMwMC4zMiwwLDAsMSw3ODUsMjYxLjM1bDYuNzktMjEsMTkuMTQtNTcuNTRMODUwLjUyLDYybDQwLjA3LDEyMC44NSwxOC43LDU3LjU0LDcsMjFBMzAwLjIsMzAwLjIsMCwwLDEsMTAwMCwyOTMuNjUiIGZpbGw9IiNiM2IzYjMiLz48L3N2Zz4=";if(null!==(e=c.organization)&&void 0!==e&&e.logoUrl)r=null===(n=c.organization)||void 0===n?void 0:n.logoUrl;else if(null!==(t=l.navigation)&&void 0!==t&&t.logoUrl){var a;r=null===(a=l.navigation)||void 0===a?void 0:a.logoUrl}return r}),[null===(e=l.navigation)||void 0===e?void 0:e.logoUrl,null===(t=c.organization)||void 0===t?void 0:t.logoUrl]);return null==i.state?(0,j.jsx)(j.Fragment,{}):(0,j.jsxs)("div",{className:u.I8,children:[(null==l||null===(n=l.navigation)||void 0===n?void 0:n.showSnow)&&(0,j.jsx)(Z.Z,{color:"#a7b6eb",speed:[0,2.5],wind:[-1,.5],snowflakeCount:300,radius:[.5,2],style:{zIndex:1e3}}),(0,j.jsxs)("div",{className:u.NB,children:[(0,j.jsx)("div",{className:u.tn,style:{height:null!==(o=l.configuration.loginLogoHeight)&&void 0!==o?o:50,backgroundImage:"url(".concat(d,")")}}),(0,j.jsx)(E,{})]}),l.authentication.contentBox&&(0,j.jsx)("div",{style:{width:"calc(100% - 400px)",height:"100%",position:"relative",overflow:"hidden"},children:(0,j.jsx)(C.p,{settings:{contentBoxProps:(0,h.ZN)(l.authentication.contentBox.props)}})})]})}))}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 429.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[429],{956:(e,t,n)=>{n.d(t,{Z:()=>z});var o=n(7363),r=n(7726),i=n(4062),a=n(8556),s=n(1522),l=n(2793),d=n(9045),c=n(7582),u=n(7514);const p=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function defaultGetTabbable(e){const t=[],n=[];return Array.from(e.querySelectorAll(p)).forEach(((e,o)=>{const r=function getTabIndex(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function isNodeMatchingSelectorFocusable(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function isNonTabbableRadio(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const getRadio=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let t=getRadio(`[name="${e.name}"]:checked`);return t||(t=getRadio(`[name="${e.name}"]`)),t!==e}(e))}(e)&&(0===r?t.push(e):n.push({documentOrder:o,tabIndex:r,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function defaultIsEnabled(){return!0}const f=function FocusTrap(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=defaultGetTabbable,isEnabled:s=defaultIsEnabled,open:p}=e,f=o.useRef(!1),m=o.useRef(null),g=o.useRef(null),h=o.useRef(null),b=o.useRef(null),x=o.useRef(!1),v=o.useRef(null),y=(0,l.Z)((0,d.Z)(t),v),w=o.useRef(null);o.useEffect((()=>{p&&v.current&&(x.current=!n)}),[n,p]),o.useEffect((()=>{if(!p||!v.current)return;const e=(0,c.Z)(v.current);return v.current.contains(e.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),x.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(f.current=!0,h.current.focus()),h.current=null)}}),[p]),o.useEffect((()=>{if(!p||!v.current)return;const e=(0,c.Z)(v.current),loopFocus=t=>{w.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(f.current=!0,g.current&&g.current.focus())},contain=()=>{const t=v.current;if(null===t)return;if(!e.hasFocus()||!s()||f.current)return void(f.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==m.current&&e.activeElement!==g.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!x.current)return;let n=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(n=a(v.current)),n.length>0){const e=Boolean(w.current?.shiftKey&&"Tab"===w.current?.key),t=n[0],o=n[n.length-1];"string"!=typeof t&&"string"!=typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",contain),e.addEventListener("keydown",loopFocus,!0);const t=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&contain()}),50);return()=>{clearInterval(t),e.removeEventListener("focusin",contain),e.removeEventListener("keydown",loopFocus,!0)}}),[n,r,i,s,p,a]);const handleFocusSentinel=e=>{null===h.current&&(h.current=e.relatedTarget),x.current=!0};return(0,u.jsxs)(o.Fragment,{children:[(0,u.jsx)("div",{tabIndex:p?0:-1,onFocus:handleFocusSentinel,ref:m,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:y,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),x.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,u.jsx)("div",{tabIndex:p?0:-1,onFocus:handleFocusSentinel,ref:g,"data-testid":"sentinelEnd"})]})};var m=n(1533),g=n(2950),h=n(2221);const b=o.forwardRef((function Portal(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),c=(0,l.Z)(o.isValidElement(n)?(0,d.Z)(n):null,t);if((0,g.Z)((()=>{i||s(function getContainer(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,i]),(0,g.Z)((()=>{if(a&&!i)return(0,h.Z)(t,a),()=>{(0,h.Z)(t,null)}}),[t,a,i]),i){if(o.isValidElement(n)){const e={ref:c};return o.cloneElement(n,e)}return n}return a?m.createPortal(n,a):a}));var x=n(7843),v=n(518),y=n(2893),w=n(7204),Z=n(3767),C=n(1499),E=n(23),P=n(8080);const S={entering:{opacity:1},entered:{opacity:1}},k=o.forwardRef((function Fade(e,t){const n=(0,C.Z)(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:p,onEntered:f,onEntering:m,onExit:g,onExited:h,onExiting:b,style:x,timeout:v=r,TransitionComponent:y=Z.ZP,...w}=e,k=o.useRef(null),R=(0,P.Z)(k,(0,d.Z)(s),t),normalizedTransitionCallback=e=>t=>{if(e){const n=k.current;void 0===t?e(n):e(n,t)}},T=normalizedTransitionCallback(m),M=normalizedTransitionCallback(((e,t)=>{(0,E.n)(e);const o=(0,E.C)({style:x,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",o),e.style.transition=n.transitions.create("opacity",o),p&&p(e,t)})),D=normalizedTransitionCallback(f),F=normalizedTransitionCallback(b),I=normalizedTransitionCallback((e=>{const t=(0,E.C)({style:x,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),g&&g(e)})),W=normalizedTransitionCallback(h);return(0,u.jsx)(y,{appear:a,in:c,nodeRef:k,onEnter:M,onEntered:D,onEntering:T,onExit:I,onExited:W,onExiting:F,addEndListener:e=>{i&&i(k.current,e)},timeout:v,...w,children:(e,{ownerState:t,...n})=>o.cloneElement(s,{style:{opacity:0,visibility:"exited"!==e||c?void 0:"hidden",...S[e],...x,...s.props.style},ref:R,...n})})}));var R=n(3966),T=n(431);function getBackdropUtilityClass(e){return(0,T.ZP)("MuiBackdrop",e)}(0,R.Z)("MuiBackdrop",["root","invisible"]);const M=(0,x.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),D=o.forwardRef((function Backdrop(e,t){const n=(0,y.i)({props:e,name:"MuiBackdrop"}),{children:o,className:a,component:s="div",invisible:l=!1,open:d,components:c={},componentsProps:p={},slotProps:f={},slots:m={},TransitionComponent:g,transitionDuration:h,...b}=n,x={...n,component:s,invisible:l},v=(e=>{const{classes:t,invisible:n}=e,o={root:["root",n&&"invisible"]};return(0,i.Z)(o,getBackdropUtilityClass,t)})(x),Z={slots:{transition:g,root:c.Root,...m},slotProps:{...p,...f}},[C,E]=(0,w.Z)("root",{elementType:M,externalForwardedProps:Z,className:(0,r.Z)(v.root,a),ownerState:x}),[P,S]=(0,w.Z)("transition",{elementType:k,externalForwardedProps:Z,ownerState:x});return(0,u.jsx)(P,{in:d,timeout:h,...b,...S,children:(0,u.jsx)(C,{"aria-hidden":!0,...E,classes:v,ref:t,children:o})})}));var F=n(5325);function createChainedFunction(...e){return e.reduce(((e,t)=>null==t?e:function chainedFunction(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}var I=n(5422);function ownerWindow(e){return(0,c.Z)(e).defaultView||window}function ariaHidden(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function getPaddingRight(e){return parseInt(ownerWindow(e).getComputedStyle(e).paddingRight,10)||0}function ariaHiddenSiblings(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function isAriaHiddenForbiddenOnElement(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&ariaHidden(e,r)}))}function findIndexOf(e,t){let n=-1;return e.some(((e,o)=>!!t(e)&&(n=o,!0))),n}function handleContainer(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(function isOverflowing(e){const t=(0,c.Z)(e);return t.body===e?ownerWindow(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){const e=function getScrollbarSize(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}(ownerWindow(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${getPaddingRight(o)+e}px`;const t=(0,c.Z)(o).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${getPaddingRight(t)+e}px`}))}let e;if(o.parentNode instanceof DocumentFragment)e=(0,c.Z)(o).body;else{const t=o.parentElement,n=ownerWindow(o);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:o}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const noop=()=>{},W=new class ModalManager{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&ariaHidden(e.modalRef,!1);const o=function getHiddenSiblings(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ariaHiddenSiblings(t,e.mount,e.modalRef,o,!0);const r=findIndexOf(this.containers,(e=>e.container===t));return-1!==r?(this.containers[r].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),n)}mount(e,t){const n=findIndexOf(this.containers,(t=>t.modals.includes(e))),o=this.containers[n];o.restore||(o.restore=handleContainer(o,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const o=findIndexOf(this.containers,(t=>t.modals.includes(e))),r=this.containers[o];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(n,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&ariaHidden(e.modalRef,t),ariaHiddenSiblings(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(o,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&ariaHidden(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const A=function useModal(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:d,onClose:u,open:p,rootRef:f}=e,m=o.useRef({}),g=o.useRef(null),h=o.useRef(null),b=(0,l.Z)(h,f),[x,v]=o.useState(!p),y=function getHasTransition(e){return!!e&&e.props.hasOwnProperty("in")}(d);let w=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(w=!1);const getModal=()=>(m.current.modalRef=h.current,m.current.mount=g.current,m.current),handleMounted=()=>{W.mount(getModal(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},Z=(0,F.Z)((()=>{const e=function useModal_getContainer(e){return"function"==typeof e?e():e}(t)||(0,c.Z)(g.current).body;W.add(getModal(),e),h.current&&handleMounted()})),isTopModal=()=>W.isTopModal(getModal()),C=(0,F.Z)((e=>{g.current=e,e&&(p&&isTopModal()?handleMounted():h.current&&ariaHidden(h.current,w))})),E=o.useCallback((()=>{W.remove(getModal(),w)}),[w]);o.useEffect((()=>()=>{E()}),[E]),o.useEffect((()=>{p?Z():y&&i||E()}),[p,E,y,i,Z]);const createHandleKeyDown=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&isTopModal()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},createHandleBackdropClick=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,I.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const o={...n,...t};return{role:"presentation",...o,onKeyDown:createHandleKeyDown(o),ref:b}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:createHandleBackdropClick(t),open:p}},getTransitionProps:()=>({onEnter:createChainedFunction((()=>{v(!1),a&&a()}),d?.props.onEnter??noop),onExited:createChainedFunction((()=>{v(!0),s&&s(),i&&E()}),d?.props.onExited??noop)}),rootRef:b,portalRef:C,isTopModal,exited:x,hasTransition:y}};function getModalUtilityClass(e){return(0,T.ZP)("MuiModal",e)}(0,R.Z)("MuiModal",["root","hidden","backdrop"]);const N=(0,x.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,v.Z)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),B=(0,x.ZP)(D,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),j=o.forwardRef((function Modal(e,t){const n=(0,y.i)({name:"MuiModal",props:e}),{BackdropComponent:a=B,BackdropProps:s,classes:l,className:d,closeAfterTransition:c=!1,children:p,container:m,component:g,components:h={},componentsProps:x={},disableAutoFocus:v=!1,disableEnforceFocus:Z=!1,disableEscapeKeyDown:C=!1,disablePortal:E=!1,disableRestoreFocus:P=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:R=!1,onBackdropClick:T,onClose:M,onTransitionEnter:D,onTransitionExited:F,open:I,slotProps:W={},slots:j={},theme:O,...L}=n,U={...n,closeAfterTransition:c,disableAutoFocus:v,disableEnforceFocus:Z,disableEscapeKeyDown:C,disablePortal:E,disableRestoreFocus:P,disableScrollLock:S,hideBackdrop:k,keepMounted:R},{getRootProps:$,getBackdropProps:H,getTransitionProps:K,portalRef:Y,isTopModal:z,exited:V,hasTransition:X}=A({...U,rootRef:t}),q={...U,exited:V},G=(e=>{const{open:t,exited:n,classes:o}=e,r={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.Z)(r,getModalUtilityClass,o)})(q),_={};if(void 0===p.props.tabIndex&&(_.tabIndex="-1"),X){const{onEnter:e,onExited:t}=K();_.onEnter=e,_.onExited=t}const J={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...x,...W}},[Q,ee]=(0,w.Z)("root",{ref:t,elementType:N,externalForwardedProps:{...J,...L,component:g},getSlotProps:$,ownerState:q,className:(0,r.Z)(d,G?.root,!q.open&&q.exited&&G?.hidden)}),[te,ne]=(0,w.Z)("backdrop",{ref:s?.ref,elementType:a,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:e=>H({...e,onClick:t=>{T&&T(t),e?.onClick&&e.onClick(t)}}),className:(0,r.Z)(s?.className,G?.backdrop),ownerState:q});return R||I||X&&!V?(0,u.jsx)(b,{ref:Y,container:m,disablePortal:E,children:(0,u.jsxs)(Q,{...ee,children:[!k&&a?(0,u.jsx)(te,{...ne}):null,(0,u.jsx)(f,{disableEnforceFocus:Z,disableAutoFocus:v,disableRestoreFocus:P,isEnabled:z,open:I,children:o.cloneElement(p,_)})]})}):null}));var O=n(9173);function getDialogUtilityClass(e){return(0,T.ZP)("MuiDialog",e)}const L=(0,R.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var U=n(5814);const $=(0,x.ZP)(D,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),H=(0,x.ZP)(j,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),K=(0,x.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,s.Z)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Y=(0,x.ZP)(O.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,s.Z)(n.scroll)}`],t[`paperWidth${(0,s.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,v.Z)((({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${L.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter((e=>"xs"!==e)).map((t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${L.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${L.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),z=o.forwardRef((function Dialog(e,t){const n=(0,y.i)({props:e,name:"MuiDialog"}),l=(0,C.Z)(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":c,"aria-labelledby":p,"aria-modal":f=!0,BackdropComponent:m,BackdropProps:g,children:h,className:b,disableEscapeKeyDown:x=!1,fullScreen:v=!1,fullWidth:Z=!1,maxWidth:E="sm",onBackdropClick:P,onClick:S,onClose:R,open:T,PaperComponent:M=O.Z,PaperProps:D={},scroll:F="paper",slots:I={},slotProps:W={},TransitionComponent:A=k,transitionDuration:N=d,TransitionProps:B,...j}=n,L={...n,disableEscapeKeyDown:x,fullScreen:v,fullWidth:Z,maxWidth:E,scroll:F},z=(e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:a}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(n)}`],paper:["paper",`paperScroll${(0,s.Z)(n)}`,`paperWidth${(0,s.Z)(String(o))}`,r&&"paperFullWidth",a&&"paperFullScreen"]};return(0,i.Z)(l,getDialogUtilityClass,t)})(L),V=o.useRef(),X=(0,a.Z)(p),q=o.useMemo((()=>({titleId:X})),[X]),G={slots:{transition:A,...I},slotProps:{transition:B,paper:D,backdrop:g,...W}},[_,J]=(0,w.Z)("root",{elementType:H,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.root,b),ref:t}),[Q,ee]=(0,w.Z)("backdrop",{elementType:$,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L}),[te,ne]=(0,w.Z)("paper",{elementType:Y,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.paper,D.className)}),[oe,re]=(0,w.Z)("container",{elementType:K,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.container)}),[ie,ae]=(0,w.Z)("transition",{elementType:k,externalForwardedProps:G,ownerState:L,additionalProps:{appear:!0,in:T,timeout:N,role:"presentation"}});return(0,u.jsx)(_,{closeAfterTransition:!0,slots:{backdrop:Q},slotProps:{backdrop:{transitionDuration:N,as:m,...ee}},disableEscapeKeyDown:x,onClose:R,open:T,onClick:e=>{S&&S(e),V.current&&(V.current=null,P&&P(e),R&&R(e,"backdropClick"))},...J,...j,children:(0,u.jsx)(ie,{...ae,children:(0,u.jsx)(oe,{onMouseDown:e=>{V.current=e.target===e.currentTarget},...re,children:(0,u.jsx)(te,{as:M,elevation:24,role:"dialog","aria-describedby":c,"aria-labelledby":X,"aria-modal":f,...ne,children:(0,u.jsx)(U.Z.Provider,{value:q,children:h})})})})})}))},5814:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(7363);const r=o.createContext({})},9400:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(7363),r=n(7726),i=n(4062),a=n(7843),s=n(2893),l=n(3966),d=n(431);function getDialogActionsUtilityClass(e){return(0,d.ZP)("MuiDialogActions",e)}(0,l.Z)("MuiDialogActions",["root","spacing"]);var c=n(7514);const u=(0,a.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),p=o.forwardRef((function DialogActions(e,t){const n=(0,s.i)({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1,...l}=n,d={...n,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:n}=e,o={root:["root",!n&&"spacing"]};return(0,i.Z)(o,getDialogActionsUtilityClass,t)})(d);return(0,c.jsx)(u,{className:(0,r.Z)(p.root,o),ownerState:d,ref:t,...l})}))},4415:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(7363),r=n(7726),i=n(4062),a=n(7843),s=n(518),l=n(2893),d=n(3966),c=n(431);function getDialogContentUtilityClass(e){return(0,c.ZP)("MuiDialogContent",e)}(0,d.Z)("MuiDialogContent",["root","dividers"]);var u=n(9416),p=n(7514);const f=(0,a.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,s.Z)((({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${u.Z.root} + &`]:{paddingTop:0}}}]})))),m=o.forwardRef((function DialogContent(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...s}=n,d={...n,dividers:a},c=(e=>{const{classes:t,dividers:n}=e,o={root:["root",n&&"dividers"]};return(0,i.Z)(o,getDialogContentUtilityClass,t)})(d);return(0,p.jsx)(f,{className:(0,r.Z)(c.root,o),ownerState:d,ref:t,...s})}))},1824:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(7363),r=n(7726),i=n(4062),a=n(1684),s=n(7843),l=n(2893),d=n(5282),c=n(3966),u=n(431);function getDialogContentTextUtilityClass(e){return(0,u.ZP)("MuiDialogContentText",e)}(0,c.Z)("MuiDialogContentText",["root"]);var p=n(7514);const f=(0,s.ZP)(d.Z,{shouldForwardProp:e=>(0,a.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),m=o.forwardRef((function DialogContentText(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContentText"}),{children:o,className:a,...s}=n,d=(e=>{const{classes:t}=e,n=(0,i.Z)({root:["root"]},getDialogContentTextUtilityClass,t);return{...t,...n}})(s);return(0,p.jsx)(f,{component:"p",variant:"body1",color:"textSecondary",ref:t,ownerState:s,className:(0,r.Z)(d.root,a),...n,classes:d})}))},9763:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(7363),r=n(7726),i=n(4062),a=n(5282),s=n(7843),l=n(2893),d=n(9416),c=n(5814),u=n(7514);const p=(0,s.ZP)(a.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),f=o.forwardRef((function DialogTitle(e,t){const n=(0,l.i)({props:e,name:"MuiDialogTitle"}),{className:a,id:s,...f}=n,m=n,g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d.a,t)})(m),{titleId:h=s}=o.useContext(c.Z);return(0,u.jsx)(p,{component:"h2",className:(0,r.Z)(g.root,a),ownerState:m,ref:t,variant:"h6",id:s??h,...f})}))},9416:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>getDialogTitleUtilityClass});var o=n(3966),r=n(431);function getDialogTitleUtilityClass(e){return(0,r.ZP)("MuiDialogTitle",e)}const i=(0,o.Z)("MuiDialogTitle",["root"])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:429 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 83.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[83],{2581:(e,n,t)=>{t.r(n),t.d(n,{default:()=>ModalsWrapper});var i=t(7363),r=t(9420),o=t(7095),l=t(1578),a=t(
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[83],{2581:(e,n,t)=>{t.r(n),t.d(n,{default:()=>ModalsWrapper});var i=t(7363),r=t(9420),o=t(7095),l=t(1578),a=t(956),d=t(9400),s=t(4415),c=t(1824),u=t(9763),m=t(3379),p=t.n(m),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),Z=t.n(k),w=t(5297),P={};P.styleTagTransform=Z(),P.setAttributes=y(),P.insert=f().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=j();p()(w.Z,P);w.Z&&w.Z.locals&&w.Z.locals;var C=t(789),S=t(4988),I=t(5054),E={};E.styleTagTransform=Z(),E.setAttributes=y(),E.insert=f().bind(null,"head"),E.domAPI=v(),E.insertStyleElement=j();p()(I.ZP,E);I.ZP&&I.ZP.locals&&I.ZP.locals;var F=t(7514);const D=(0,r.Pi)((function Progress(e){var n=e.children,t=e.progress,r=(0,i.useState)(),o=(0,S.Z)(r,2),l=o[0],a=o[1];return(0,i.useEffect)((function(){a(t)}),[t]),(0,F.jsxs)("div",{className:I.YS,children:[!!n&&n,(0,F.jsx)("div",{className:I.l9,children:(0,F.jsx)("div",{className:I.YJ,style:{width:100*(null!=l?l:0)+"%"},children:(0,F.jsx)("div",{className:I.zn})})})]})}));var z=t(3697),A=t(1682),M=t(8623);const W=(0,r.Pi)((function Modal(){var e,n,t=(0,o.KH)().contentStore,r=(0,C.$G)().t,m=function onAccept(e){var n,i=t.modal;t.closeModal(),null==i||null===(n=i.callback)||void 0===n||n.call(i,!i.content||e)},p=function onReject(){var e,n=t.modal;t.closeModal(),null==n||null===(e=n.callback)||void 0===e||e.call(n,!1)};(0,i.useEffect)((function(){return document.addEventListener("keydown",h,!1),function(){document.removeEventListener("keydown",h,!1)}}),[]);var h=(0,i.useCallback)((function(e){if(t.modal)if("Enter"!==e.key||t.modal.doNotAcceptOnEnter)"ESC"!==e.key&&"Escape"!=e.key||(p(),e.preventDefault());else{var n=document.getElementById("diva-modal-form");if(!n)return;m(new FormData(n)),e.preventDefault()}}),[]);if(!t.modal)return(0,F.jsx)(F.Fragment,{});var v=(0,M.ZN)(t.modal),x="string"==typeof v.text?r(v.text):v.text,f=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s.Z,{style:v.maxWidth?{maxWidth:v.maxWidth}:void 0,children:v.iFrame?(0,F.jsx)(IFrame,{link:v.iFrame}):"string"==typeof x&&null==v.content?(0,F.jsx)(c.Z,{component:"div",dangerouslySetInnerHTML:{__html:function tryDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(n){return e}}(x)}}):(0,F.jsxs)(c.Z,{component:"div",children:[x,v.content&&v.content]})}),(v.reject||v.accept)&&(0,F.jsxs)(d.Z,{children:[v.reject&&(0,F.jsx)(l.Z,{color:"primary",onClick:p,children:"string"==typeof v.reject?r(v.reject):r("modal.reject")}),v.accept&&(0,F.jsx)(l.Z,{color:"primary",type:"submit",id:"diva-dialog-submitbtn",children:"string"==typeof v.accept?r(v.accept):r("modal.accept")})]}),!!(v.image||void 0!==v.progress||null!==(e=v.actions)&&void 0!==e&&e.length)&&(0,F.jsxs)("div",{style:{margin:10},children:[v.image&&(0,F.jsx)("img",{src:v.image,style:{maxWidth:480}}),void 0!==v.progress&&(0,F.jsx)(D,{progress:v.progress}),null===(n=v.actions)||void 0===n?void 0:n.map((function(e){var n;return(0,F.jsx)(l.Z,{fullWidth:!0,style:{marginBottom:10},variant:null!==(n=e.variant)&&void 0!==n?n:"contained",color:"primary",onClick:function onClick(){return function onSelect(e,n){var i,r=t.modal;0!=n&&t.closeModal(),null==r||null===(i=r.callback)||void 0===i||i.call(r,e)}(e.id,e.closeable)},children:r(e.text)})}))]})]}),g=!0===v.fullscreen||"mobile"==v.fullscreen&&t.containerDimensions.isMobile;return(0,F.jsx)("div",{className:w.I,id:"diva-dialog",children:(0,F.jsxs)(a.Z,{open:!0,disablePortal:!0,hideBackdrop:!0,disableEnforceFocus:!0,style:{position:"absolute",zIndex:0},maxWidth:"lg",fullScreen:g,PaperProps:{style:{width:v.width,height:v.height}},children:[(0,F.jsx)(u.Z,{children:"string"==typeof v.title?r(v.title):v.title}),v.rejectByIcon&&(0,F.jsx)(z.Z,{onClick:p,style:{position:"absolute",right:8,top:8,zIndex:1000001},size:"large",children:(0,F.jsx)(A.Z,{})}),v.dontRenderForm&&f,!v.dontRenderForm&&(0,F.jsx)("form",{id:"diva-modal-form",autoComplete:"off",onSubmit:function onSubmit(e){e.preventDefault(),m(new FormData(e.target))},children:f})]})})}));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)(W,{})}},5297:(e,n,t)=>{t.d(n,{I:()=>a,Z:()=>d});var i=t(8081),r=t.n(i),o=t(3645),l=t.n(o)()(r());l.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 a="index-module--AtOcs";const d=l},5054:(e,n,t)=>{t.d(n,{YJ:()=>s,YS:()=>a,ZP:()=>u,l9:()=>d,zn:()=>c});var i=t(8081),r=t.n(i),o=t(3645),l=t.n(o)()(r());l.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 a="index-module--Pww9z",d="index-module--thPSh",s="index-module--HhvXv",c="index-module--f7imw";const u=l}}]);
|