{"version":3,"sources":["Components/BasicLayout/index.tsx","Components/MutationForm/reducer/actions/index.ts","Components/MutationForm/types.ts","Components/MutationForm/reducer/actions/mutations.ts","Components/MutationForm/reducer/actions/step.ts","Hooks/useForm.ts","Components/Button/index.tsx","Components/Inputs/TextInput/index.tsx","Components/Inputs/TextAreaInput/index.tsx","Components/Inputs/NumberInput/index.tsx","Components/Inputs/SelectInput/index.tsx","Components/Inputs/CheckboxInput/index.tsx","Components/MutationForm/Mutations/index.ts","Components/MutationForm/Components/StepProvider/index.tsx","Components/MutationForm/reducer/selectors.ts","utils/index.tsx","Components/MutationForm/Components/PriceTable/index.tsx","Components/MutationForm/Components/TransferDisplay/index.tsx","Components/Modal/index.tsx","Components/MutationForm/Steps/People/Components/EditPersonForm/index.tsx","Components/MutationForm/reducer/actions/person.ts","Components/MutationForm/Steps/People/Components/PersonList/index.tsx","Components/MutationForm/Steps/PeopleTransfer/Components/PeopleTransferList/index.tsx","Components/MutationForm/Steps/PeopleTransfer/Components/EditPeopleTransferForm/index.tsx","Components/MutationForm/reducer/actions/transfer.ts","Components/MutationForm/Steps/SelectMutation/Components/MutationCheckbox.tsx","Components/Inputs/MailInput/index.tsx","Components/MutationForm/Steps/ContactDetails/index.tsx","Components/MutationForm/Steps/index.tsx","Components/MutationForm/Steps/Start/index.tsx","Components/MutationForm/Steps/ChooseLegalForm/index.tsx","Components/MutationForm/reducer/actions/companyInfoActions.ts","Components/MutationForm/Steps/SelectMutation/index.tsx","Components/MutationForm/Steps/NewCompanyName/index.tsx","Components/MutationForm/Steps/NewCompanyPurpose/index.tsx","Components/MutationForm/Steps/NewCompanyAddress/index.tsx","Components/MutationForm/Steps/People/index.tsx","Components/MutationForm/Steps/PeopleTransfer/index.tsx","Components/MutationForm/Steps/Overview/index.tsx","Components/MutationForm/reducer/actions/contact.ts","Components/MutationForm/Steps/Success/index.tsx","Components/MutationForm/reducer/index.tsx","Components/MutationForm/index.tsx","App.tsx","serviceWorker.ts","translation.ts","index.tsx"],"names":["BasicLayout","children","className","actions","legalForm","fieldNames","MutationTypes","setMutations","mutations","dispatch","a","async","type","SET_MUTATIONS","nextStep","NEXT_STEP","useForm","callback","initialState","useState","values","setValues","useEffect","isEqual","handleChange","event","target","name","persist","preValues","value","handleSubmit","preventDefault","Button","title","disabled","onClick","submit","style","block","ref","classes","push","join","TextInput","onChange","error","displayName","required","placeholder","tooltip","autoFocus","basicClasses","data-tip","TextAreaInput","cols","rows","maxLength","NumberInput","customStyles","singleValue","provided","color","control","borderStyle","borderRadius","container","border","marginTop","marginRight","fontSize","width","minHeight","marginBottom","textAlignLast","fontWeight","textTransform","letterSpacing","backgroundColor","fontFamily","option","data","textAlign","alignSelf","menuList","SelectInput","options","currentOption","find","Number","isInteger","parseInt","toString","translate","styles","label","map","o","isDisabled","CheckboxInput","id","checked","htmlFor","requiredFields","AG","CompanyName","newCompanyName","Address","newAddress","HeadOffice","newHeadOffice","Purpose","newCompanyPurpose","Person","valuePerShare","people","GmbH","Transfer","peopleTransfer","EF","KLG","prices","NotSet","stauteChange","price","additional","StepProvider","state","useContext","StateContext","currentStep","DispatchContext","history","pushState","window","onpopstate","e","step","index","isRequired","getLatestStep","SET_STEP","Fragment","Steps","module","legal","fields","m","reduce","b","includes","getTotalPrice","newPrices","Math","max","formatPrice","formatNumber","toFixed","replace","PriceTable","stateMutations","mutation","key","TransferDisplay","transfer","fromPerson","getPersonString","getPersonById","fromId","toPerson","toId","shares","parseFloat","p","person","firstName","lastName","companyName","Modal","open","onClose","display","gender","EditPersonForm","oldPerson","onSuccess","onSubmit","useCallback","stopPropagation","personToSubmit","SAVE_PERSON","savePerson","PersonList","onEdit","onDelete","list","useMemo","PersonListItem","PersonDisplay","DeletePersonButton","EditPersonButton","PeopleTransferList","t","height","undefined","EditPeopleTransferForm","show","operation","showModal","setShowModal","fromOptions","filter","toOptions","SAVE_PEOPLE_TRANSFER","Date","now","saveTransfer","closeAddPersonModal","closeAddPersonModalCancel","min","MutationCheckbox","MailInput","validateMobile","mobile","length","match","validateEmail","email","setTimeout","scrollTo","behavior","top","scrollY","left","regNum","validated","validate","form","SET_COMPANY","setCompanyName","SET_REG_NUM","setRegNum","SET_LEGAL_FORM","autoComplete","back","setState","newState","Checkboxes","Object","keys","mutationType","SET_NEW_COMPANY","setNewCompanyName","SET_PURPOSE","setNewCompanyPurpose","newHeadOfficeAddress","city","street","zip","isHeadOfficeChange","switchToHeadOffice","newMutations","address","SET_NEW_HEADQUARTER_ADDRESS","SET_NEW_ADDRESS","setNewAddress","edit","openAddPersonModal","DELETE_PERSON","onNext","minWidth","closeAddPersonTransferModal","openAddPersonTransferModal","DELETE_PEOPLE_TRANSFER","loading","setLoading","agb","setAgb","triedToSend","setTriedToSend","isValid","plainTextInputs","errorFields","contact","SET_CONTACT_DETAILS","axios","post","contactDetails","then","response","catch","data-price","inputExtraProps","autoFormat","defaultCountry","reducer","action","SET_PRICES","some","biggestId","newPerson","isLoading","note","createContext","MutationForm","useThunkReducer","loadPrices","fetchPrices","Provider","StepIndicator","Axios","get","effectiveStep","getCurrentEffectiveStep","totalStep","forEach","getTotalSteps","myRef","useRef","current","scrollIntoView","floor","withLocalize","addTranslation","fetch","translationRequest","json","translations","fetchTranslation","Boolean","location","hostname","onMissingTranslation","defaultTranslation","ReactDOM","render","initialize","search","slice","indexOf","split","params","hash","assign","val","decodeURIComponent","lang","requestedLanguage","defaultLanguage","moment","locale","languages","code","translation","globalTranslations","renderToStaticMarkup","getInitialize","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"wiQAEe,SAASA,EAAT,GAIX,IAHFC,EAGC,EAHDA,SAIA,OACE,yBAAKC,UAAU,eACb,yBAAKA,UAAU,wBAAwBD,I,ICejCE,ECrBAC,IAQAC,EA6BAC,E,cC5BL,SAASC,EAAaC,GAC3B,OAAO,SACLC,GADK,SAAAC,EAAAC,OAAA,gDAKLF,EAAS,CAAEG,KAAMT,EAAQU,cAAeL,cALnC,sCCPF,SAASM,IACd,OAAO,SAAeL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AIC,EAAQ,EACV,OAAO5F,OAAO+F,OAAOF,EAAd7F,OAAA,IAAAA,CAAA,GACJ8F,EAAO,OAIZ,IAAMpL,EAAMoL,EAAKJ,MAAM,EAAGE,GACpBI,EAAMF,EAAKJ,MAAME,EAAQ,GAE/B,OAAO5F,OAAO+F,OAAOF,EAAd7F,OAAA,IAAAA,CAAA,GAAyBtF,EAAMuL,mBAAmBD,OACxD,IASKE,KAAMC,OAHgB,MAGI,KAHJ,EAMxBC,EALqB,CAAC,KAAM,KAAM,MAKGtM,SAASqM,GAChDA,EACA,KAGJ,OAFAE,KAAOC,OAAOF,GAEP,CACLG,UAAW,CACT,CAAEpU,KAAM,UAAWqU,KAAM,MACzB,CAAErU,KAAM,UAAWqU,KAAM,MACzB,CAAErU,KAAM,cAAYqU,KAAM,OAE5BC,YAAaC,GACb5Q,QAAS,CAAE6Q,6CAAsBP,kBAAiBhB,0BCpCtBwB,IAC5B,kBAAC,GAAD,OAEFC,SAASC,eAAe,SF6HpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMzE,MAAK,SAAA0E,GACjCA,EAAaC,kB","file":"static/js/main.f15d2740.chunk.js","sourcesContent":["import React from 'react';\n\nexport default function BasicLayout({\n children,\n}: {\n children: React.ReactNode;\n}) {\n return (\n
\n
{children}
\n
\n );\n}\n","import { CompanyInfoActions } from './companyInfoActions';\nimport { MutationActions } from './mutations';\nimport { ContactActions } from './contact';\nimport { PersonActions } from './person';\nimport { TransferActions } from './transfer';\nimport { StepActions } from './step';\nimport { MutationLegalFormPriceList } from 'Components/MutationForm/Mutations';\n\nexport {\n setCompanyName,\n setLegalForm,\n setNewCompanyName,\n setNewCompanyPurpose,\n setRegNum,\n setNewAddress,\n setNewHeadOfficeAddress,\n} from './companyInfoActions';\n\nexport { setMutations } from './mutations';\nexport { setContact } from './contact';\nexport { deletePerson, savePerson } from './person';\nexport { nextStep, setStep } from './step';\nexport { deleteTransfer, saveTransfer } from './transfer';\n\nexport enum actions {\n NEXT_STEP = 'NEXT_STEP',\n SET_STEP = 'SET_STEP',\n SET_PRICES = 'SET_PRICES',\n SET_LEGAL_FORM = 'SET_LEGAL_FORM',\n SET_MUTATIONS = 'SET_MUTATIONS',\n SET_CONTACT_DETAILS = 'SET_CONTACT_DETAILS',\n SET_NEW_ADDRESS = 'SET_NEW_ADDRESS',\n SET_NEW_HEADQUARTER_ADDRESS = 'SET_NEW_HEADQUARTER_ADDRESS',\n SAVE_PERSON = 'SAVE_PERSON',\n DELETE_PERSON = 'DELETE_PERSON',\n SAVE_PEOPLE_TRANSFER = 'SAVE_PEOPLE_TRANSFER',\n DELETE_PEOPLE_TRANSFER = 'DELETE_PEOPLE_TRANSFER',\n SET_COMPANY = 'SET_COMPANY',\n SET_PURPOSE = 'SET_PURPOSE',\n SET_NEW_COMPANY = 'SET_NEW_COMPANY',\n SET_REG_NUM = 'SET_REG_NUM',\n}\n\nexport type MutationFormAction =\n | StepActions\n | CompanyInfoActions\n | MutationActions\n | ContactActions\n | PersonActions\n | TransferActions\n | { type: actions.SET_PRICES; prices: MutationLegalFormPriceList };\n","import { ContactDetailsState } from './Steps/ContactDetails';\nimport { MutationLegalFormPriceList } from './Mutations';\n\nexport enum legalForm {\n AG = 'AG',\n GmbH = 'GmbH',\n EF = 'EF',\n KLG = 'KLG',\n NotSet = 'NotSet',\n}\n\nexport enum fieldNames {\n newCompanyName = 'newCompanyName',\n newCompanyPurpose = 'newCompanyPurpose',\n newAddress = 'newAddress',\n newHeadOffice = 'newHeadOffice',\n people = 'people',\n peopleTransfer = 'peopleTransfer',\n valuePerShare = 'valuePerShare',\n totalShares = 'totalShares',\n}\n\nexport type Person = {\n id: number;\n type: 'person' | 'company';\n firstName: string;\n lastName: string;\n companyName: string;\n state: 'current' | 'new' | 'exit';\n gender: 'male' | 'female' | 'neutral';\n};\n\nexport type Transfer = {\n id: number;\n fromId: number;\n toId: number;\n shares: number;\n price: number;\n};\n\nexport enum MutationTypes {\n CompanyName = 'CompanyName',\n Address = 'Address',\n HeadOffice = 'HeadOffice',\n Purpose = 'Purpose',\n Person = 'Person',\n Transfer = 'Transfer',\n}\n\nexport type Address = {\n street: string;\n zip: number;\n city: string;\n};\n\nexport type MutationFormState = {\n currentStep: number;\n isLoading: boolean;\n companyName: string;\n newCompanyName: string;\n contactDetails: ContactDetailsState;\n newCompanyPurpose: string;\n newAddress: Address;\n newHeadOfficeAddress: Address;\n legalForm: keyof typeof legalForm;\n regNum: string;\n prices: MutationLegalFormPriceList;\n mutations: (keyof typeof MutationTypes)[];\n note: string;\n [fieldNames.people]: Person[];\n [fieldNames.peopleTransfer]: Transfer[];\n};\n","import { Thunk } from 'react-hook-thunk-reducer';\nimport {\n MutationTypes,\n MutationFormState,\n} from 'Components/MutationForm/types';\nimport { MutationFormAction, actions } from '.';\n\nexport type MutationActions = {\n type: actions.SET_MUTATIONS;\n mutations: (keyof typeof MutationTypes)[];\n};\n\nexport function setMutations(mutations: (keyof typeof MutationTypes)[]) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_MUTATIONS, mutations });\n };\n}\n","import { MutationFormAction, actions } from '../actions';\n\nexport type StepActions =\n | { type: actions.NEXT_STEP }\n | { type: actions.SET_STEP; step: number };\n\nexport function nextStep() {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.NEXT_STEP });\n };\n}\n\nexport function setStep(step: number) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.SET_STEP, step });\n };\n}\n","import { isEqual } from 'lodash';\r\nimport React, { useEffect, useState } from 'react';\r\n\r\nexport default function useForm(\r\n callback: () => void,\r\n initialState?: T,\r\n): {\r\n handleSubmit: (\r\n event:\r\n | React.FormEvent\r\n | React.FormEvent,\r\n ) => void;\r\n handleChange: (\r\n event: React.ChangeEvent<\r\n HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\r\n >,\r\n ) => void;\r\n values: T;\r\n} {\r\n const [values, setValues] = useState(initialState ? initialState : ({} as T));\r\n\r\n useEffect(() => {\r\n if (initialState && !isEqual(initialState, values)) {\r\n setValues(initialState);\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n const handleSubmit = (\r\n event:\r\n | React.FormEvent\r\n | React.FormEvent,\r\n ) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n callback();\r\n };\r\n\r\n const handleChange = (\r\n event: React.ChangeEvent<\r\n HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\r\n >,\r\n ) => {\r\n if (!event.target.name) {\r\n return;\r\n }\r\n\r\n const name = event.target.name;\r\n const target = event.target;\r\n\r\n if (isChangeEvent(event)) {\r\n event.persist();\r\n setValues(preValues => ({ ...preValues, [name]: target.value } as T));\r\n }\r\n };\r\n\r\n return {\r\n handleChange,\r\n handleSubmit,\r\n values,\r\n };\r\n}\r\n\r\nfunction isChangeEvent(\r\n e: React.ChangeEvent<\r\n HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\r\n >,\r\n): e is React.ChangeEvent<\r\n HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\r\n> {\r\n return 'value' in e.target;\r\n}\r\n","import React from 'react';\n\nexport interface IButton {\n title?: string | React.ReactNode;\n className?: string;\n onClick?: (e: React.MouseEvent) => void;\n submit?: boolean;\n style?: React.CSSProperties;\n disabled?: boolean;\n type?: 'primary' | 'danger' | 'info' | 'basic';\n block?: boolean;\n ref?: React.MutableRefObject;\n}\n\nexport default function Button({\n title = 'Click',\n disabled = false,\n onClick = () => {},\n submit = false,\n style = {},\n type = 'primary',\n className = '',\n block = false,\n ref,\n}: IButton) {\n let classes = ['Button', `Button--${type}`, className];\n if (block) {\n classes.push('Button--block');\n }\n return (\n \n {title}\n \n );\n}\n","import React from 'react';\n\nexport interface ITextInput {\n onChange: (\n e: React.ChangeEvent,\n ) => void;\n value: string;\n name: string;\n displayName?: string | React.ReactNode;\n error?: boolean;\n required?: boolean;\n autoFocus?: boolean;\n className?: string;\n tooltip?: string;\n placeholder?: string;\n}\n\nexport function TextInput({\n onChange,\n value,\n name,\n error,\n displayName,\n required,\n className,\n placeholder,\n tooltip,\n autoFocus,\n}: ITextInput) {\n const basicClasses = error ? 'input text-input error' : 'input text-input';\n return (\n \n \n \n \n );\n}\n","import React from 'react';\nimport { ITextInput } from '../TextInput';\n\nexport interface ITextAreaInput extends ITextInput {\n rows?: number;\n cols?: number;\n maxLength?: number;\n}\n\nexport function TextAreaInput({\n onChange,\n value,\n name,\n displayName,\n required,\n className,\n cols,\n rows,\n maxLength,\n}: ITextAreaInput) {\n return (\n \n \n \n \n );\n}\n","import React from 'react';\nimport { ITextInput } from '../TextInput';\n\nexport interface INumberInput extends Omit {\n value: number | string;\n min?: number;\n max?: number;\n step?: number;\n}\n\nexport function NumberInput({\n onChange,\n value,\n name,\n displayName,\n required,\n error,\n className,\n placeholder,\n}: INumberInput) {\n const basicClasses = error\n ? 'input number-input error'\n : 'input number-input';\n return (\n
\n \n \n
\n );\n}\n","import React from 'react';\nimport Select from 'react-select';\nimport { ITextInput } from '../TextInput';\nimport { Translate } from 'react-localize-redux';\nimport { StylesConfig } from 'react-select/src/styles';\n\nexport type SelectInputOption = {\n id: string | number;\n value: string | number;\n displayName: string;\n translate?: boolean;\n};\n\nexport interface ISelectInput extends Omit {\n onChange: (e: React.ChangeEvent) => void;\n options: SelectInputOption[];\n value: string | number;\n disabled?: boolean;\n}\n\nconst customStyles = {\n singleValue: provided => {\n return {\n ...provided,\n color: '#004350',\n };\n },\n control: provided => {\n return {\n ...provided,\n borderStyle: 'unset',\n borderRadius: '0px !important',\n };\n },\n container: provided => {\n return {\n ...provided,\n border: `1px solid #004350`,\n marginTop: '2px',\n marginRight: '10px',\n fontSize: '100%',\n width: '100%',\n minHeight: '32px',\n marginBottom: '5px',\n textAlignLast: 'center',\n fontWeight: 'bold',\n textTransform: 'uppercase',\n color: '#004350',\n borderRadius: '0px',\n letterSpacing: '-0.03em',\n backgroundColor: '#fff',\n fontFamily: \"font-family: 'Ebrima',Helvetica,Arial,Lucida,sans-serif\",\n };\n },\n option: (provided, { data }) => {\n return {\n ...provided,\n fontFamily: \"font-family: 'Ebrima',Helvetica,Arial,Lucida,sans-serif\",\n backgroundColor: data.value === -1 && '#fa003b',\n color: data.value === -1 ? 'white' : '#004350',\n textAlign: data.value === -1 ? 'center' : 'left',\n alignSelf: data.value === -1 ? 'center' : 'left',\n fontSize: data.value === -1 && '150%',\n };\n },\n menuList: provided => {\n return {\n ...provided,\n border: '1px solid #004350',\n };\n },\n} as StylesConfig;\n\nexport function SelectInput({\n onChange,\n options,\n value,\n error,\n name,\n displayName,\n disabled,\n required,\n placeholder,\n}: ISelectInput) {\n const basicClasses = error\n ? 'input select-input error'\n : 'input select-input';\n\n const currentOption = options.find(a => {\n if (Number.isInteger(parseInt(value.toString(), 10))) {\n return (\n parseInt(a.value.toString(), 10) === parseInt(value.toString(), 10)\n );\n }\n return a.value === value;\n });\n\n return (\n \n {({ translate }) => {\n return (\n
\n \n {\n onChange({ persist: () => {}, target: { name, value } } as any);\n }}\n options={options.map(o => ({\n value: o.value,\n label:\n o.value === -1\n ? `+ ${\n o.translate ? translate(o.displayName) : o.displayName\n }`\n : o.translate\n ? translate(o.displayName)\n : o.displayName,\n }))}\n required={required}\n isDisabled={disabled}\n />\n
\n );\n }}\n
\n );\n}\n","import React from 'react';\nimport { ITextInput } from '../TextInput';\n\nexport interface ICheckboxInput\n extends Omit {\n onChange: (b: React.ChangeEvent) => void;\n id: string;\n value: boolean;\n displayName?: string;\n}\n\nconst CheckboxInput = ({\n value,\n onChange,\n name,\n id,\n tooltip,\n error,\n displayName,\n}: ICheckboxInput) => {\n return (\n
\n \n \n \n \n {displayName && (\n \n )}\n
\n );\n};\n\nexport default CheckboxInput;\n","import { legalForm, MutationTypes, fieldNames } from '../types';\n\nexport const requiredFields = {\n [legalForm.AG]: {\n [MutationTypes.CompanyName]: [fieldNames.newCompanyName],\n [MutationTypes.Address]: [fieldNames.newAddress],\n [MutationTypes.HeadOffice]: [fieldNames.newHeadOffice],\n [MutationTypes.Purpose]: [fieldNames.newCompanyPurpose],\n [MutationTypes.Person]: [fieldNames.valuePerShare, fieldNames.people],\n },\n [legalForm.GmbH]: {\n [MutationTypes.CompanyName]: [fieldNames.newCompanyName],\n [MutationTypes.Address]: [fieldNames.newAddress],\n [MutationTypes.HeadOffice]: [fieldNames.newHeadOffice],\n [MutationTypes.Purpose]: [fieldNames.newCompanyPurpose],\n [MutationTypes.Person]: [fieldNames.people],\n [MutationTypes.Transfer]: [fieldNames.peopleTransfer],\n },\n [legalForm.EF]: {\n [MutationTypes.CompanyName]: [fieldNames.newCompanyName],\n [MutationTypes.Address]: [fieldNames.newAddress],\n [MutationTypes.HeadOffice]: [fieldNames.newHeadOffice],\n [MutationTypes.Purpose]: [fieldNames.newCompanyPurpose],\n [MutationTypes.Person]: [fieldNames.people],\n },\n [legalForm.KLG]: {\n [MutationTypes.CompanyName]: [fieldNames.newCompanyName],\n [MutationTypes.Address]: [fieldNames.newAddress],\n [MutationTypes.HeadOffice]: [fieldNames.newHeadOffice],\n [MutationTypes.Purpose]: [fieldNames.newCompanyPurpose],\n [MutationTypes.Person]: [fieldNames.people],\n },\n};\n\nexport type MutationPrice = {\n stauteChange: boolean;\n price: number;\n additional?: boolean;\n};\n\ntype MutationPriceList = {\n [P in MutationTypes]: MutationPrice;\n};\n\nexport type MutationLegalFormPriceList = {\n [P in legalForm]: MutationPriceList;\n};\nexport const prices: MutationLegalFormPriceList = {\n [legalForm.NotSet]: {} as MutationPriceList,\n [legalForm.AG]: {\n [MutationTypes.CompanyName]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Address]: {\n stauteChange: false,\n price: 150,\n },\n [MutationTypes.HeadOffice]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Purpose]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Person]: {\n stauteChange: false,\n price: 150,\n },\n } as MutationPriceList,\n [legalForm.GmbH]: {\n [MutationTypes.CompanyName]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Address]: {\n stauteChange: false,\n price: 150,\n },\n [MutationTypes.HeadOffice]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Purpose]: {\n stauteChange: true,\n price: 490,\n },\n [MutationTypes.Person]: {\n stauteChange: false,\n price: 150,\n },\n [MutationTypes.Transfer]: {\n stauteChange: false,\n price: 245,\n additional: true,\n },\n } as MutationPriceList,\n [legalForm.EF]: {\n [MutationTypes.CompanyName]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Address]: {\n stauteChange: false,\n price: 150,\n },\n [MutationTypes.HeadOffice]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Purpose]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Person]: {\n stauteChange: false,\n price: 150,\n },\n } as MutationPriceList,\n [legalForm.KLG]: {\n [MutationTypes.CompanyName]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Address]: {\n stauteChange: false,\n price: 150,\n },\n [MutationTypes.HeadOffice]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Purpose]: {\n stauteChange: true,\n price: 150,\n },\n [MutationTypes.Person]: {\n stauteChange: false,\n price: 150,\n },\n } as MutationPriceList,\n};\n","import React, { useContext, useEffect } from 'react';\nimport { requiredFields } from '../../Mutations';\nimport { nextStep, setStep } from '../../reducer/actions';\nimport { StateContext, DispatchContext } from '../../../MutationForm';\nimport Steps from '../../Steps';\nimport { getLatestStep } from 'Components/MutationForm/reducer/selectors';\n/**\n * StepProvider\n *\n * Step Provider coordinates which Step Module is mounted\n * based on the currentStep index in the state. However,\n * it also checks if the module at the currentStep is accutally required\n * based on the legalForm and the selected mutations. If the fields are not required\n * a nextStep event will be dispatched\n *\n */\nexport default function StepProvider() {\n const state = useContext(StateContext);\n const { currentStep, legalForm, mutations } = state;\n const dispatch = useContext(DispatchContext);\n\n useEffect(() => {\n // eslint-disable-next-line\n history.pushState(null, '', null);\n // eslint-disable-next-line\n window.onpopstate = function(e: any) {\n if (currentStep === 1) {\n return;\n }\n // eslint-disable-next-line\n history.pushState(null, '', null);\n\n return dispatch(setStep(getLatestStep(state)));\n };\n // eslint-disable-next-line\n }, [currentStep]);\n\n useEffect(() => {\n if (isRequired(currentStep, legalForm, mutations)) {\n return;\n }\n\n dispatch(nextStep());\n });\n return {Steps[currentStep - 1].module};\n}\n\nexport function isRequired(step: number, legal: any, mutations: any) {\n if (!Steps[step - 1].fields) {\n return true;\n }\n const fields = Steps[step - 1].fields;\n return mutations\n .map((m: any) => {\n // @ts-ignore\n if (!requiredFields[legal]) {\n return false;\n }\n // @ts-ignore\n return requiredFields[legal][m].reduce(\n // @ts-ignore\n (a, b) => a || fields.includes(b),\n false,\n );\n })\n .reduce((a: any, b: any) => a || b, false);\n}\n","import { MutationFormState } from '../types';\nimport Steps from '../Steps';\nimport { isRequired } from '../Components/StepProvider';\n\nexport function getTotalPrice(state: MutationFormState) {\n const newPrices: any = state.mutations.reduce(\n (a, b) =>\n state.prices[state.legalForm][b].additional\n ? {\n ...a,\n additional: a.additional + state.prices[state.legalForm][b].price,\n }\n : {\n ...a,\n price: Math.max(a.price, state.prices[state.legalForm][b].price),\n },\n {\n price: 0,\n additional: 0,\n },\n );\n return newPrices.price + newPrices.additional;\n}\n\nexport function getCurrentEffectiveStep({\n mutations,\n legalForm,\n currentStep,\n}: MutationFormState) {\n let effectiveStep = 0;\n for (let index = 1; index <= currentStep; index++) {\n if (isRequired(index, legalForm, mutations)) {\n effectiveStep += 1;\n }\n }\n return effectiveStep;\n}\n\nexport function getTotalSteps({ mutations, legalForm }: MutationFormState) {\n let effectiveStep = 0;\n Steps.forEach((a, b) => {\n if (isRequired(b + 1, legalForm, mutations)) {\n effectiveStep += 1;\n }\n });\n return effectiveStep;\n}\n\nexport function getLatestStep({\n mutations,\n currentStep,\n legalForm,\n}: MutationFormState) {\n for (let index = currentStep - 1; index > 1; index--) {\n if (isRequired(index, legalForm, mutations)) {\n return index;\n }\n }\n return 1;\n}\n","export function formatPrice(price: number) {\n return Number.isInteger(price)\n ? `CHF ${formatNumber(price.toFixed(0))}.–`\n : `CHF ${formatNumber(price.toFixed(2))}`;\n}\n\nexport function formatNumber(price: number | string): string {\n return price.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \"'\");\n}\n","import React, { useContext } from 'react';\nimport { StateContext } from 'Components/MutationForm';\nimport {\n MutationTypes,\n MutationFormState,\n} from 'Components/MutationForm/types';\nimport { getTotalPrice } from 'Components/MutationForm/reducer/selectors';\nimport { Translate } from 'react-localize-redux';\nimport { formatPrice } from 'utils';\n\ninterface IPriceTable {\n mutations?: (keyof typeof MutationTypes)[];\n}\n\n/**\n * PriceTable\n *\n * PriceTable displays the prices of all mutations in state\n * If a list of mutations is provided, only the provided mutations will be displayed\n *\n * @type React.FC\n */\nexport function PriceTable({ mutations: setMutations }: IPriceTable) {\n const state = useContext(StateContext);\n const { mutations: stateMutations, legalForm, prices } = state;\n\n const mutations = setMutations ? setMutations : stateMutations;\n\n return (\n
\n
\n {' '}\n \n
\n
    \n {mutations.map(mutation => {\n return (\n
  • \n \n
  • \n );\n })}\n
\n
\n
Total:
\n
\n {formatPrice(\n getTotalPrice({\n mutations,\n legalForm,\n prices,\n } as MutationFormState),\n )}{' '}\n
\n \n \n
\n
\n
\n
\n );\n}\n","import React, { useContext } from 'react';\nimport { Transfer, Person } from 'Components/MutationForm/types';\nimport { StateContext } from 'Components/MutationForm';\nimport { formatPrice, formatNumber } from 'utils';\nimport { Translate } from 'react-localize-redux';\n\n/**\n * TransferDisplay\n *\n * Displays a Transfer\n *\n * @export\n * @param {{ transfer: Transfer }} { transfer }\n * @returns\n */\nexport function TransferDisplay({ transfer }: { transfer: Transfer }) {\n const { people } = useContext(StateContext);\n\n const fromPerson = getPersonString(getPersonById(people, transfer.fromId));\n const toPerson = getPersonString(getPersonById(people, transfer.toId));\n\n return (\n
\n
{fromPerson}
{' '}\n
\n {formatNumber(transfer.shares)}{' '}\n \n
{' '}\n \n
\n
{toPerson}
\n  \n \n  \n
\n {formatPrice(parseFloat(`${transfer.price}`))}\n
\n
\n );\n}\n\nfunction getPersonById(people: Person[], id: number): undefined | Person {\n return people.find(p => p.id === id);\n}\n\nexport function getPersonString(person: Person | undefined): string {\n if (!person) {\n return '';\n }\n return person.type === 'person'\n ? `${person.firstName} ${person.lastName}`\n : person.companyName;\n}\n","import React from 'react';\n\nexport default function Modal({\n open,\n onClose,\n title,\n children,\n}: {\n open: boolean;\n children: React.ReactNode;\n onClose: () => void;\n title: string | React.ReactNode;\n}) {\n return (\n
\n
\n
\n \n ×\n \n

{title}

\n
\n
{children}
\n
\n
\n );\n}\n","import React, { useContext, useCallback } from 'react';\nimport { Translate } from 'react-localize-redux';\nimport { Person } from '../../../../types';\nimport useForm from 'Hooks/useForm';\nimport { DispatchContext } from 'Components/MutationForm';\nimport { savePerson } from 'Components/MutationForm/reducer/actions';\nimport { TextInput, SelectInput } from 'Components/Inputs';\nimport Button from 'Components/Button';\n\ntype EditPersonFormState = Person;\n\ninterface IEditPersonForm {\n person?: Person;\n onSuccess: (person: Person) => void;\n}\n\nconst initialState = {\n id: 0,\n type: 'person',\n companyName: '',\n firstName: '',\n lastName: '',\n gender: 'male',\n state: 'current',\n} as EditPersonFormState;\n\nexport function EditPersonForm({\n person: oldPerson,\n onSuccess,\n}: IEditPersonForm) {\n const dispatch = useContext(DispatchContext);\n const { handleChange, values: person } = useForm(\n () => {},\n oldPerson ? oldPerson : initialState,\n );\n\n // TODO validation\n const onSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n e.stopPropagation();\n const personToSubmit = {\n id: person.id,\n state: person.state,\n type: person.type,\n firstName: person.type === 'person' ? person.firstName : '',\n lastName: person.type === 'person' ? person.lastName : '',\n gender: person.type === 'person' ? person.gender : 'neutral',\n companyName: person.type === 'company' ? person.companyName : '',\n };\n dispatch(savePerson(personToSubmit));\n onSuccess(personToSubmit);\n },\n // eslint-disable-next-line\n [person],\n );\n\n return (\n
\n \n {({ translate }) => {\n return (\n
\n \n {person.type === 'person' && (\n \n \n \n \n \n )}\n\n {person.type === 'company' && (\n \n \n \n )}\n\n \n \n \n \n \n ) : (\n \n \n \n \n )\n }\n block={true}\n />\n \n );\n }}\n \n
\n );\n}\n","import { Person } from 'Components/MutationForm/types';\n\nimport { MutationFormAction, actions } from '../actions';\n\nexport type PersonActions =\n | { type: actions.SAVE_PERSON; person: Person }\n | { type: actions.DELETE_PERSON; id: number };\n\nexport function savePerson(person: Person) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.SAVE_PERSON, person });\n };\n}\n\nexport function deletePerson(id: number) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.DELETE_PERSON, id });\n };\n}\n","import React, { useContext, useMemo } from 'react';\nimport { Person } from 'Components/MutationForm/types';\nimport { StateContext } from 'Components/MutationForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { getPersonString } from 'Components/MutationForm/Components/TransferDisplay';\n\ninterface IPersonList {\n onEdit?: (p: Person) => void;\n onDelete?: (p: Person) => void;\n}\n\nexport default function PersonList({ onEdit, onDelete }: IPersonList) {\n const { people } = useContext(StateContext);\n const list = useMemo(() => {\n return (\n
\n {people.map(p => {\n return (\n \n );\n })}\n
\n );\n }, [people, onEdit, onDelete]);\n return
{list}
;\n}\n\nfunction PersonListItem({\n person,\n onEdit,\n onDelete,\n}: {\n person: Person;\n onEdit?: (p: Person) => void;\n onDelete?: (p: Person) => void;\n}) {\n return (\n
\n \n \n \n
\n );\n}\n\nfunction PersonDisplay({ person }: { person: Person }) {\n return (\n
\n {getPersonString(person)} (\n )\n
\n );\n}\n\nfunction EditPersonButton({\n person,\n onEdit,\n}: {\n person: Person;\n onEdit?: (p: Person) => void;\n}) {\n return (\n {\n onEdit && onEdit(person);\n }}\n title={}\n />\n );\n}\n\nfunction DeletePersonButton({\n person,\n onDelete,\n}: {\n person: Person;\n onDelete?: (p: Person) => void;\n}) {\n return (\n {\n onDelete && onDelete(person);\n }}\n title={}\n />\n );\n}\n","import React, { useContext, useMemo } from 'react';\nimport { Transfer } from 'Components/MutationForm/types';\nimport { StateContext } from 'Components/MutationForm';\nimport Button from 'Components/Button';\nimport { TransferDisplay } from 'Components/MutationForm/Components/TransferDisplay';\n\nexport default function PeopleTransferList({\n onEdit,\n onDelete,\n}: {\n onEdit?: (p: Transfer) => void;\n onDelete?: (p: Transfer) => void;\n}) {\n const { peopleTransfer } = useContext(StateContext);\n\n const list = useMemo(() => {\n return (\n
\n {peopleTransfer.map(t => {\n return (\n
\n \n
\n {\n onEdit(t);\n }\n : undefined\n }\n title={}\n />\n {\n onDelete(t);\n }\n : undefined\n }\n style={{\n backgroundColor: '#D6D6D7',\n color: '#A2A2A2',\n border: 'none',\n height: '100%',\n }}\n title={}\n type=\"danger\"\n />\n
\n
\n );\n })}\n
\n );\n }, [onEdit, onDelete, peopleTransfer]);\n\n return
{list}
;\n}\n","import { Transfer } from '../../../../types';\nimport React, {\n useContext,\n useMemo,\n useCallback,\n useState,\n useEffect,\n} from 'react';\nimport { StateContext, DispatchContext } from '../../../..';\nimport useForm from 'Hooks/useForm';\nimport { saveTransfer } from '../../../../reducer/actions';\nimport { SelectInput, NumberInput } from 'Components/Inputs';\nimport Button from 'Components/Button';\nimport Modal from 'Components/Modal';\nimport { EditPersonForm } from 'Components/MutationForm/Steps/People/Components/EditPersonForm';\nimport { getPersonString } from 'Components/MutationForm/Components/TransferDisplay';\nimport { Translate } from 'react-localize-redux';\n\ntype EditPeopleTransferFormState = {\n id?: number;\n fromId: number;\n toId: number;\n shares: number;\n price: number;\n};\n\nexport function EditPeopleTransferForm({\n transfer,\n onSuccess,\n}: {\n transfer?: Transfer;\n onSuccess: () => void;\n}) {\n const { people } = useContext(StateContext);\n const dispatch = useContext(DispatchContext);\n const [showModal, setShowModal] = useState({ show: false, operation: '' });\n\n const { values, handleChange } = useForm(\n () => {},\n transfer ? transfer : { fromId: 0, toId: 0, shares: 1, price: 0 },\n );\n\n const fromOptions = useMemo(() => {\n return [\n {\n id: 0,\n value: 0,\n translate: true,\n displayName: 'general.chooseSeller',\n },\n ...people\n .filter(p => p.id !== parseInt(values.toId.toString(), 10))\n .map(p => ({\n id: p.id,\n value: p.id,\n displayName: getPersonString(p),\n })),\n {\n id: -1,\n value: -1,\n translate: true,\n displayName: 'action.add',\n },\n ];\n }, [values, people]);\n\n const toOptions = useMemo(() => {\n return [\n { id: 0, value: 0, translate: true, displayName: 'general.chooseBuyer' },\n ...people\n .filter(p => p.id !== parseInt(values.fromId.toString(), 10))\n .map(p => ({\n id: p.id,\n value: p.id,\n displayName: getPersonString(p),\n })),\n\n { id: -1, value: -1, translate: true, displayName: 'action.add' },\n ];\n }, [values, people]);\n\n const fromPerson = useMemo(() => {\n return values.fromId !== 0\n ? people.find(p => p.id === parseInt(values.fromId.toString(), 10))\n : undefined;\n }, [values, people]);\n\n const onSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dispatch(\n saveTransfer({\n ...(values.id && { id: parseInt(values.id.toString(), 10) }),\n fromId: parseInt(values.fromId.toString(), 10),\n toId: parseInt(values.toId.toString(), 10),\n shares: parseInt(values.shares.toString(), 10),\n price: parseFloat(values.price.toString()),\n }),\n );\n onSuccess();\n },\n // eslint-disable-next-line\n [values],\n );\n\n const closeAddPersonModal = useCallback(() => {\n handleChange({\n target: {\n name: showModal.operation,\n value: (\n people.reduce((a, b) => (a > b.id ? a : b.id), 0) + 1\n ).toString(),\n },\n persist: () => {},\n } as React.ChangeEvent);\n setShowModal({ show: false, operation: '' });\n }, [showModal, handleChange, people]);\n\n const closeAddPersonModalCancel = useCallback(() => {\n setShowModal({ show: false, operation: '' });\n handleChange({\n target: {\n name: showModal.operation,\n value: '0',\n },\n persist: () => {},\n } as React.ChangeEvent);\n }, [handleChange, showModal]);\n\n useEffect(() => {\n if (parseInt(values.fromId.toString(), 10) === -1) {\n return setShowModal({ show: true, operation: 'fromId' });\n }\n if (parseInt(values.toId.toString(), 10) === -1) {\n return setShowModal({ show: true, operation: 'toId' });\n }\n }, [values]);\n\n return (\n
\n {showModal.show && (\n }\n >\n \n \n )}\n
\n }\n name=\"fromId\"\n onChange={handleChange}\n value={values.fromId}\n options={fromOptions}\n required\n />\n {fromPerson && (\n \n
\n }\n name=\"shares\"\n onChange={handleChange}\n value={values.shares}\n required\n />\n }\n name=\"price\"\n onChange={handleChange}\n value={values.price}\n required\n />\n
\n }\n name=\"toId\"\n onChange={handleChange}\n value={values.toId}\n options={toOptions}\n required\n />\n
\n )}\n\n {parseInt(values.toId.toString(), 10) > 0 &&\n parseInt(values.fromId.toString(), 10) > 0 &&\n values.shares > 0 &&\n values.price > 0 && (\n \n {transfer ? (\n \n ) : (\n \n )}\n \n }\n block\n />\n )}\n \n
\n );\n}\n","import { Transfer } from 'Components/MutationForm/types';\nimport { MutationFormAction, actions } from '../actions';\n\nexport type TransferActions =\n | { type: actions.SAVE_PEOPLE_TRANSFER; transfer: Transfer }\n | { type: actions.DELETE_PEOPLE_TRANSFER; id: number };\n\ntype PartialBy = Omit & Partial>;\n\nexport function saveTransfer(transfer: PartialBy) {\n return async function(dispatch: React.Dispatch) {\n dispatch({\n type: actions.SAVE_PEOPLE_TRANSFER,\n transfer: { id: transfer.id ? transfer.id : Date.now(), ...transfer },\n });\n };\n}\n\nexport function deleteTransfer(id: number) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.DELETE_PEOPLE_TRANSFER, id });\n };\n}\n","import React from 'react';\nimport { MutationTypes } from '../../../types';\nimport { MutationPrice } from '../../../Mutations';\nimport CheckboxInput from 'Components/Inputs/CheckboxInput';\nimport ReactTooltip from 'react-tooltip';\nimport { Translate } from 'react-localize-redux';\nimport { formatPrice } from 'utils';\n\ninterface MutationCheckboxProps {\n name: keyof typeof MutationTypes;\n displayName: string | React.ReactNode;\n checked: boolean;\n price: MutationPrice;\n onChange: (e: React.ChangeEvent) => void;\n}\n\nexport function MutationCheckbox({\n name,\n price,\n displayName,\n checked,\n onChange,\n}: MutationCheckboxProps) {\n return (\n \n {({ translate }) => {\n return (\n \n \n
\n \n
\n {formatPrice(price.price)}\n
\n
\n \n \n );\n }}\n
\n );\n}\n","import React from 'react';\nimport { ITextInput } from '../TextInput';\n\nexport interface IMailInput extends ITextInput {}\n\nexport function MailInput({\n onChange,\n value,\n name,\n displayName,\n required,\n error,\n className,\n}: IMailInput) {\n const basicClasses = error ? 'input text-input error' : 'input text-input';\n return (\n
\n \n \n
\n );\n}\n","import React, { useContext, useCallback, useMemo, useState } from 'react';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport { setContact, nextStep } from '../../reducer/actions';\nimport useForm from 'Hooks/useForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { TextInput, SelectInput } from 'Components/Inputs';\nimport { MailInput } from 'Components/Inputs/MailInput';\nimport PhoneInput from 'react-phone-input-2';\nimport axios from 'axios';\nimport 'react-phone-input-2/lib/style.css';\nimport CheckboxInput from 'Components/Inputs/CheckboxInput';\nimport { getTotalPrice } from 'Components/MutationForm/reducer/selectors';\n\nexport type ContactDetailsState = {\n gender: 'male' | 'female' | '';\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n city: string;\n email: string;\n mobile: string;\n};\n\nexport default function ContactDetails() {\n const dispatch = useContext(DispatchContext);\n const state = useContext(StateContext);\n const [loading, setLoading] = useState(false);\n const [agb, setAgb] = useState(false);\n\n const [triedToSend, setTriedToSend] = useState(false);\n\n const { handleChange, values } = useForm(() => {}, {\n gender: '',\n firstName: '',\n lastName: '',\n street: '',\n zip: '',\n city: '',\n email: '',\n mobile: '',\n });\n\n const validated = useMemo(() => {\n return validate(values, agb);\n }, [values, agb]);\n\n const errorFields = useMemo(() => {\n return {\n lastName: !(values.lastName.length > 0),\n firstName: !(values.firstName.length > 0),\n gender: !['male', 'female'].includes(values.gender),\n street: !(values.street.length > 0),\n zip: !(values.zip.length > 0),\n city: !(values.city.length > 0),\n email: !validateEmail(values.email),\n mobile: !validateMobile(values.mobile),\n };\n }, [values]);\n\n const callback = useCallback(() => {\n if (!validated || loading) {\n setTriedToSend(true);\n return;\n }\n setLoading(true);\n dispatch(setContact(values));\n axios\n .post('/wp-json/fasoon-backend/v1/request', {\n ...state,\n contactDetails: values,\n })\n .then(response => {\n dispatch(nextStep());\n setLoading(false);\n })\n .catch(error => {\n setLoading(false);\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, values, loading]);\n return (\n \n {({ translate }) => {\n return (\n
\n
\n \n
\n \n
\n \n \n }\n name=\"firstName\"\n />\n }\n name=\"lastName\"\n />\n }\n name=\"street\"\n />\n }\n name=\"zip\"\n />\n }\n name=\"city\"\n />\n }\n name=\"email\"\n />\n
\n \n {\n handleChange({\n persist: () => {},\n target: {\n name: 'mobile',\n value,\n },\n } as any);\n }}\n />\n
\n \n\n {\n setAgb(!agb);\n }}\n displayName={translate('steps.contactDetails.agb') as string}\n />\n\n
\n \n \n \n \n }\n type=\"primary\"\n className=\"contactDetails__button\"\n disabled={loading || !validated}\n onClick={callback}\n block={true}\n />\n\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n
\n );\n }}\n \n );\n}\n\nfunction validate(values: ContactDetailsState, agb: boolean) {\n let isValid = true as boolean;\n\n const plainTextInputs = [values.firstName, values.lastName, values.gender];\n\n isValid =\n agb &&\n plainTextInputs.reduce((a, b) => a && b.length > 0, isValid) &&\n values.mobile.length > 3 &&\n validateMobile(values.mobile) &&\n validateEmail(values.email);\n\n return isValid;\n}\n\nfunction validateMobile(mobile: string) {\n if (mobile.length <= 3) {\n return true;\n }\n var phoneno = /^\\+?([0-9]{2})\\)?[-. ]?([0-9]{2})[-. ]?([0-9]{3})[-. ]?([0-9]{2})[-. ]?([0-9]{2})$/;\n if (mobile.match(phoneno)) {\n return true;\n }\n return false;\n}\n\nfunction validateEmail(email: string) {\n var emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n if (email.match(emailRegex)) {\n return true;\n }\n return false;\n}\n","import React from 'react';\nimport ChooseLegalForm from './ChooseLegalForm';\nimport Overview from './Overview';\nimport People from './People';\nimport PeopleTransfer from './PeopleTransfer';\nimport SelectMutation from './SelectMutation';\nimport { fieldNames } from '../types';\nimport NewCompanyName from './NewCompanyName';\nimport NewCompanyPurpose from './NewCompanyPurpose';\nimport NewCompanyAddress from './NewCompanyAddress';\nimport ContactDetails from './ContactDetails';\nimport Success from './Success';\nimport Start from './Start';\n\ntype Module = {\n module: React.ReactNode;\n name: string;\n fields?: (keyof typeof fieldNames)[];\n};\n\nexport default [\n { module: , name: 'ChooseLegalForm' },\n { module: , name: 'ChooseLegalForm' },\n { module: , name: 'SelectMutation' },\n {\n module: ,\n name: 'New Company Name',\n fields: [fieldNames.newCompanyName],\n },\n {\n module: ,\n name: 'New Company Purpose',\n fields: [fieldNames.newCompanyPurpose],\n },\n {\n module: ,\n name: 'New Company Address',\n fields: [fieldNames.newAddress, fieldNames.newHeadOffice],\n },\n { module: , name: 'People', fields: [fieldNames.people] },\n {\n module: ,\n name: 'PeopleTransfer',\n fields: [fieldNames.peopleTransfer],\n },\n { module: , name: 'Overview' },\n { module: , name: 'ContactDetails' },\n { module: , name: 'Success' },\n] as Module[];\n","import React, { useContext, useCallback } from 'react';\nimport { DispatchContext } from 'Components/MutationForm';\nimport Button from 'Components/Button';\nimport { nextStep } from 'Components/MutationForm/reducer/actions';\nimport { Translate } from 'react-localize-redux';\n\nexport default function Start() {\n const dispatch = useContext(DispatchContext);\n\n const callback = useCallback(() => {\n setTimeout(() => {\n window.scrollTo({\n behavior: 'smooth',\n top: window.scrollY + 300,\n left: 0,\n });\n }, 500);\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n
\n \n {({ translate }) => {\n return (\n \n \n \n \n \n }\n />\n \n );\n }}\n \n
\n );\n}\n","import React, { useContext, useCallback, useMemo } from 'react';\nimport { legalForm } from 'Components/MutationForm/types';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport {\n setLegalForm,\n setCompanyName,\n setRegNum,\n nextStep,\n} from '../../reducer/actions';\nimport useForm from 'Hooks/useForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { TextInput } from 'Components/Inputs';\nimport CheckboxInput from 'Components/Inputs/CheckboxInput';\nimport ReactTooltip from 'react-tooltip';\n\ntype LegalFormState = {\n legalForm: keyof typeof legalForm;\n companyName: string;\n regNum: string;\n};\n\nexport default function ChooseLegalForm() {\n const dispatch = useContext(DispatchContext);\n const { legalForm: legalFormState, companyName, regNum } = useContext(\n StateContext,\n );\n\n const { handleChange, values } = useForm(() => {}, {\n legalForm: legalFormState,\n companyName,\n regNum,\n });\n\n const validated = useMemo(() => {\n return validate(values);\n }, [values]);\n\n const callback = useCallback(() => {\n if (!validated) {\n return;\n }\n dispatch(setCompanyName(values.companyName));\n dispatch(setRegNum(values.regNum));\n dispatch(setLegalForm(values.legalForm));\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, values]);\n\n return (\n
\n \n {({ translate }) => {\n return (\n \n {\n e.preventDefault();\n e.stopPropagation();\n callback();\n }}\n >\n \n \n
\n \n
\n
\n \n \n \n \n
\n \n \n
\n );\n }}\n
\n\n
\n \n \n \n \n }\n type=\"primary\"\n className=\"legal-form__button\"\n disabled={!validated}\n onClick={callback}\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n
\n );\n}\n\nfunction validate(values: LegalFormState) {\n return (\n values.legalForm.length > 0 &&\n values.legalForm !== legalForm.NotSet &&\n values.companyName.length > 0\n );\n}\n","import { Thunk } from 'react-hook-thunk-reducer';\nimport {\n legalForm,\n MutationFormState,\n Address,\n} from 'Components/MutationForm/types';\nimport { MutationFormAction, actions } from '../actions';\n\nexport type CompanyInfoActions =\n | { type: actions.SET_LEGAL_FORM; legalForm: keyof typeof legalForm }\n | { type: actions.SET_COMPANY; companyName: string }\n | { type: actions.SET_NEW_ADDRESS; address: Address }\n | { type: actions.SET_NEW_HEADQUARTER_ADDRESS; address: Address }\n | { type: actions.SET_NEW_COMPANY; newCompanyName: string }\n | { type: actions.SET_PURPOSE; newCompanyPurpose: string }\n | { type: actions.SET_REG_NUM; regNum: string };\n\nexport function setLegalForm(form: keyof typeof legalForm) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_LEGAL_FORM, legalForm: form });\n };\n}\n\nexport function setNewCompanyName(newCompanyName: string) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_NEW_COMPANY, newCompanyName });\n };\n}\n\nexport function setNewCompanyPurpose(newCompanyPurpose: string) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_PURPOSE, newCompanyPurpose });\n };\n}\n\nexport function setNewAddress(address: Address) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_NEW_ADDRESS, address });\n };\n}\n\nexport function setNewHeadOfficeAddress(address: Address) {\n return async function(\n dispatch: React.Dispatch<\n MutationFormAction | Thunk\n >,\n ) {\n dispatch({ type: actions.SET_NEW_HEADQUARTER_ADDRESS, address });\n };\n}\n\nexport function setCompanyName(companyName: string) {\n return async function(dispatch: React.Dispatch) {\n dispatch({\n type: actions.SET_COMPANY,\n companyName,\n });\n };\n}\n\nexport function setRegNum(regNum: string) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.SET_REG_NUM, regNum });\n };\n}\n","import React, { useContext, useCallback, useMemo, useState } from 'react';\nimport { Translate } from 'react-localize-redux';\nimport { MutationTypes } from 'Components/MutationForm/types';\nimport Button from 'Components/Button';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport { requiredFields } from '../../Mutations';\nimport { setMutations, nextStep } from '../../reducer/actions';\nimport { PriceTable } from '../../Components/PriceTable';\nimport { MutationCheckbox } from './Components/MutationCheckbox';\n\ntype SelectMutationState = {\n mutations: (keyof typeof MutationTypes)[];\n};\n\nexport default function SelectMutation() {\n const dispatch = useContext(DispatchContext);\n const { mutations: stateMutations } = useContext(StateContext);\n\n const { legalForm, prices } = useContext(StateContext);\n\n const [state, setState] = useState({\n mutations: stateMutations,\n } as SelectMutationState);\n\n const validated = useMemo(() => {\n return validate(state);\n }, [state]);\n\n const submit = useCallback(() => {\n if (!validated) {\n return;\n }\n\n dispatch(setMutations(state.mutations));\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, state]);\n\n const handleChange = useCallback(\n (e: any) => {\n let newState;\n if (state.mutations.includes(e.target.name)) {\n newState = {\n ...state,\n mutations: state.mutations.filter(a => a !== e.target.name),\n };\n } else {\n newState = {\n ...state,\n mutations: [...state.mutations, e.target.name],\n };\n }\n setState(newState);\n },\n [state],\n );\n\n const Checkboxes = useMemo(() => {\n const mutations = Object.keys(\n // @ts-ignore\n requiredFields[legalForm],\n ) as (keyof typeof MutationTypes)[];\n\n return mutations.map((mutationType: keyof typeof MutationTypes) => {\n return (\n \n }\n price={prices[legalForm][mutationType]}\n onChange={handleChange}\n />\n );\n });\n }, [state, legalForm, handleChange, prices]);\n\n return (\n
\n
\n
\n \n
\n
\n \n :\n {' '}\n \n
\n {Checkboxes}\n
\n \n\n
\n \n \n \n \n }\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n
\n );\n}\n\nfunction validate(state: SelectMutationState) {\n return state.mutations.length > 0;\n}\n","import React, { useContext, useCallback, useMemo } from 'react';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport { setNewCompanyName, nextStep } from '../../reducer/actions';\nimport useForm from 'Hooks/useForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { TextInput } from 'Components/Inputs';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\n\ntype NewCompanyNameState = {\n newCompanyName: string;\n};\n\nexport default function NewCompanyName() {\n const dispatch = useContext(DispatchContext);\n const { companyName, newCompanyName } = useContext(StateContext);\n\n const { handleChange, values } = useForm(() => {}, {\n newCompanyName: newCompanyName.length > 0 ? newCompanyName : companyName,\n });\n\n const validated = useMemo(() => {\n return validate(values);\n }, [values]);\n\n const callback = useCallback(() => {\n if (!validated) {\n return;\n }\n dispatch(setNewCompanyName(values.newCompanyName));\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, values]);\n\n return (\n \n {({ translate }) => {\n return (\n
\n
\n
\n \n
\n \n \n \n
\n\n
\n \n \n \n \n }\n type=\"primary\"\n className=\"newCompanyName__button\"\n disabled={!validated}\n onClick={callback}\n block={true}\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n \n
\n );\n }}\n
\n );\n}\n\nfunction validate(values: NewCompanyNameState) {\n return values.newCompanyName.length > 0;\n}\n","import React, { useContext, useCallback, useMemo } from 'react';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport { setNewCompanyPurpose, nextStep } from '../../reducer/actions';\nimport useForm from 'Hooks/useForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\nimport { TextAreaInput } from 'Components/Inputs';\n\ntype NewCompanyPurposeState = {\n newCompanyPurpose: string;\n};\n\nexport default function NewCompanyPurpose() {\n const dispatch = useContext(DispatchContext);\n const { newCompanyPurpose } = useContext(StateContext);\n\n const { handleChange, values } = useForm(() => {}, {\n newCompanyPurpose,\n });\n\n const validated = useMemo(() => {\n return validate(values);\n }, [values]);\n\n const callback = useCallback(() => {\n if (!validated) {\n return;\n }\n dispatch(setNewCompanyPurpose(values.newCompanyPurpose));\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, values]);\n\n return (\n
\n
\n
\n \n
\n \n }\n name=\"newCompanyPurpose\"\n />\n \n
\n\n
\n \n \n \n \n }\n type=\"primary\"\n className=\"newCompanyPurpose__button\"\n disabled={!validated}\n onClick={callback}\n block={true}\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n \n
\n );\n}\n\nfunction validate(values: NewCompanyPurposeState) {\n return values.newCompanyPurpose.length > 0;\n}\n","import React, { useContext, useCallback, useMemo } from 'react';\nimport { DispatchContext, StateContext } from 'Components/MutationForm';\nimport {\n nextStep,\n setNewHeadOfficeAddress,\n setNewAddress,\n setMutations,\n} from '../../reducer/actions';\nimport useForm from 'Hooks/useForm';\nimport Button from 'Components/Button';\nimport { Translate } from 'react-localize-redux';\nimport { TextInput, NumberInput } from 'Components/Inputs';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\nimport { MutationTypes } from 'Components/MutationForm/types';\n\ntype NewCompanyAddress = {\n street: string;\n zip: number;\n city: string;\n};\n\nexport default function NewCompanyAddress() {\n const dispatch = useContext(DispatchContext);\n const { mutations, newAddress, newHeadOfficeAddress } = useContext(\n StateContext,\n );\n\n const { handleChange, values } = useForm(\n () => {},\n mutations.includes(MutationTypes.HeadOffice)\n ? newHeadOfficeAddress\n : newAddress,\n );\n\n const validated = useMemo(() => {\n return validate(values);\n }, [values]);\n\n const isHeadOfficeChange = useMemo(\n () => mutations.includes(MutationTypes.HeadOffice),\n [mutations],\n );\n\n const switchToHeadOffice = useCallback(() => {\n const newMutations = mutations\n .filter(\n a => a !== MutationTypes.Address && a !== MutationTypes.HeadOffice,\n )\n .reduce(\n (a: (keyof typeof MutationTypes)[], b) => {\n return [...a, b];\n },\n [MutationTypes.HeadOffice],\n );\n dispatch(setMutations(newMutations));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [mutations]);\n\n const callback = useCallback(() => {\n if (!validated) {\n return;\n }\n\n if (isHeadOfficeChange) {\n dispatch(setNewHeadOfficeAddress(values));\n dispatch(nextStep());\n return;\n }\n dispatch(setNewAddress(values));\n dispatch(nextStep());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validated, values, isHeadOfficeChange]);\n\n return (\n \n {({ translate }) => {\n return (\n
\n
\n
\n {translate('steps.newCompanyAddress.header')}\n
\n {!isHeadOfficeChange && (\n
\n {translate('steps.newCompanyAddress.onlyAddress')}\n \n
\n )}\n \n \n 9999 || values.zip < 1000}\n placeholder={\n translate('steps.newCompanyAddress.label.zip') as string\n }\n name=\"zip\"\n min={1000}\n max={9999}\n step={1}\n />\n \n \n
\n\n
\n \n \n \n \n }\n type=\"primary\"\n className=\"newCompanyAddress__button\"\n disabled={!validated}\n onClick={callback}\n block={true}\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n \n
\n );\n }}\n
\n );\n}\n\nfunction validate(values: NewCompanyAddress) {\n return (\n values.city.length > 0 &&\n values.street.length > 0 &&\n values.zip >= 1000 &&\n values.zip <= 9999\n );\n}\n","import React, { useState, useCallback, useMemo, useContext } from 'react';\nimport { Translate } from 'react-localize-redux';\nimport { Person } from '../../types';\nimport { deletePerson, nextStep } from '../../reducer/actions';\nimport Modal from 'Components/Modal';\nimport { EditPersonForm } from './Components/EditPersonForm';\nimport PersonList from './Components/PersonList';\nimport { StateContext, DispatchContext } from 'Components/MutationForm';\nimport Button from 'Components/Button';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\n\ntype PeopleState = {\n showModal: boolean;\n edit: Person | undefined;\n};\n\nexport default function People() {\n const [state, setState] = useState({\n showModal: false,\n edit: undefined,\n } as PeopleState);\n\n const { people } = useContext(StateContext);\n const dispatch = useContext(DispatchContext);\n\n const closeAddPersonModal = useCallback(() => {\n setState({ ...state, edit: undefined, showModal: false });\n }, [state]);\n\n const openAddPersonModal = useCallback(() => {\n setState({ ...state, showModal: true });\n }, [state]);\n\n const onDelete = useCallback((p: Person) => {\n dispatch(deletePerson(p.id));\n // eslint-disable-next-line\n }, []);\n\n const onEdit = useCallback(\n (p: Person) => {\n setState({ ...state, edit: p, showModal: true });\n },\n [state],\n );\n\n const validated = useMemo(() => {\n return people.length > 0;\n }, [people]);\n\n const onNext = useCallback(() => {\n if (!validated) {\n return;\n }\n dispatch(nextStep());\n // eslint-disable-next-line\n }, [validated]);\n\n return (\n
\n
\n

\n \n

\n

\n : \n

\n\n \n {state.showModal && (\n }\n >\n \n \n )}\n\n \n \n \n \n }\n />\n
\n
\n \n \n \n \n }\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n \n
\n );\n}\n","import React, { useContext, useMemo, useCallback, useState } from 'react';\nimport { StateContext, DispatchContext } from 'Components/MutationForm';\nimport { Transfer } from 'Components/MutationForm/types';\nimport {\n nextStep,\n deleteTransfer,\n} from 'Components/MutationForm/reducer/actions';\nimport Modal from 'Components/Modal';\nimport PeopleTransferList from './Components/PeopleTransferList';\nimport Button from 'Components/Button';\nimport { EditPeopleTransferForm } from './Components/EditPeopleTransferForm';\nimport { Translate } from 'react-localize-redux';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\n\nexport default function PeopleTransfer() {\n const { peopleTransfer } = useContext(StateContext);\n const dispatch = useContext(DispatchContext);\n\n const [state, setState] = useState({\n showModal: false,\n edit: undefined as undefined | Transfer,\n });\n\n const closeAddPersonTransferModal = useCallback(() => {\n setState({ ...state, edit: undefined, showModal: false });\n }, [state]);\n\n const openAddPersonTransferModal = useCallback(() => {\n setState({ ...state, showModal: true });\n }, [state]);\n\n const onDelete = useCallback((t: Transfer) => {\n dispatch(deleteTransfer(t.id));\n // eslint-disable-next-line\n }, []);\n\n const onEdit = useCallback(\n (t: Transfer) => {\n setState({ ...state, edit: t, showModal: true });\n },\n [state],\n );\n\n const validated = useMemo(() => {\n return peopleTransfer.length > 0;\n }, [peopleTransfer]);\n\n const onNext = useCallback(() => {\n if (!validated) {\n return;\n }\n dispatch(nextStep());\n // eslint-disable-next-line\n }, [validated]);\n\n return (\n
\n
\n

\n \n

\n \n\n \n \n \n }\n block\n />\n\n {state.showModal && (\n }\n >\n \n \n )}\n
\n
\n \n \n \n \n }\n block\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n \n
\n );\n}\n","import React, { useContext } from 'react';\nimport { StateContext, DispatchContext } from 'Components/MutationForm';\nimport { PriceTable } from 'Components/MutationForm/Components/PriceTable';\nimport {\n TransferDisplay,\n getPersonString,\n} from '../../Components/TransferDisplay';\nimport Button from 'Components/Button';\nimport { MutationTypes } from 'Components/MutationForm/types';\nimport { Translate } from 'react-localize-redux';\nimport { nextStep } from 'Components/MutationForm/reducer/actions';\n\nexport default function Overview() {\n const state = useContext(StateContext);\n const dispatch = useContext(DispatchContext);\n return (\n
\n
\n

\n :\n

\n {state.mutations.includes(MutationTypes.CompanyName) && (\n
\n
\n \n
\n
\n : {state.newCompanyName}\n
\n
\n )}\n {state.mutations.includes(MutationTypes.Address) &&\n !state.mutations.includes(MutationTypes.HeadOffice) && (\n
\n
\n \n
\n
\n : {state.newAddress.street}{' '}\n {state.newAddress.zip} {state.newAddress.city}\n
\n
\n )}\n {state.mutations.includes(MutationTypes.HeadOffice) && (\n
\n
\n \n
\n
\n :{' '}\n {state.newHeadOfficeAddress.street}\n {', '}\n {state.newHeadOfficeAddress.zip} {state.newHeadOfficeAddress.city}\n
\n
\n )}\n {state.mutations.includes(MutationTypes.Purpose) && (\n
\n
\n \n
\n
\n : {state.newCompanyPurpose}\n
\n
\n )}\n {state.mutations.includes(MutationTypes.Person) && (\n
\n
\n \n
\n
\n {state.people.map(p => (\n
\n
{getPersonString(p)}
\n
\n \n
\n
\n ))}\n
\n
\n )}\n {state.mutations.includes(MutationTypes.Transfer) && (\n
\n
\n \n
\n
\n {state.peopleTransfer.map(t => (\n \n ))}\n
\n
\n )}\n
\n \n
\n \n \n \n \n }\n block={true}\n className=\"Overview__next\"\n onClick={() => {\n dispatch(nextStep());\n }}\n />\n \n \n \n \n }\n type=\"info\"\n className=\"legal-form__button\"\n onClick={() => {\n window.history.back();\n }}\n />\n
\n
\n );\n}\n","import { MutationFormAction, actions } from '../actions';\nimport { ContactDetailsState } from 'Components/MutationForm/Steps/ContactDetails';\n\nexport type ContactActions = {\n type: actions.SET_CONTACT_DETAILS;\n contact: ContactDetailsState;\n};\n\nexport function setContact(contact: ContactDetailsState) {\n return async function(dispatch: React.Dispatch) {\n dispatch({ type: actions.SET_CONTACT_DETAILS, contact });\n };\n}\n","import React from 'react';\nimport { Translate } from 'react-localize-redux';\nimport { MutationTypes } from 'Components/MutationForm/types';\n\ntype SelectMutationState = {\n mutations: (keyof typeof MutationTypes)[];\n};\n\nexport default function Success() {\n return (\n
\n
\n \n
\n
\n );\n}\n","import { MutationFormAction, actions } from './actions';\nimport {\n MutationFormState,\n legalForm,\n fieldNames,\n Person,\n Transfer,\n MutationTypes,\n} from '../types';\nimport Steps from '../Steps';\nimport { prices } from '../Mutations';\n\nexport const reducer = (\n state: MutationFormState,\n action: MutationFormAction,\n): MutationFormState => {\n switch (action.type) {\n case actions.NEXT_STEP:\n return {\n ...state,\n currentStep: state.currentStep + 1,\n };\n\n case actions.SET_STEP:\n return {\n ...state,\n currentStep: Math.min(action.step, Steps.length),\n };\n case actions.SET_LEGAL_FORM:\n return {\n ...state,\n legalForm: action.legalForm,\n };\n\n case actions.SET_PRICES:\n return {\n ...state,\n prices: action.prices,\n };\n\n case actions.SET_MUTATIONS:\n return {\n ...state,\n mutations: action.mutations,\n };\n\n case actions.SAVE_PEOPLE_TRANSFER:\n const includes = state.peopleTransfer.some(\n p => p.id === action.transfer.id,\n );\n return {\n ...state,\n peopleTransfer: [\n ...state.peopleTransfer.map(p => {\n if (p.id !== action.transfer.id) {\n return p;\n }\n return action.transfer;\n }),\n ...(!includes ? [action.transfer] : []),\n ],\n };\n\n case actions.DELETE_PEOPLE_TRANSFER:\n return {\n ...state,\n peopleTransfer: [\n ...state.peopleTransfer.filter(p => p.id !== action.id),\n ],\n };\n\n case actions.SAVE_PERSON:\n const biggestId = state.people.reduce((a, b) => Math.max(a, b.id), 0);\n const newPerson =\n action.person.id === 0\n ? { ...action.person, id: biggestId + 1 }\n : action.person;\n return {\n ...state,\n people: [...state.people.filter(p => p.id !== newPerson.id), newPerson],\n };\n\n case actions.DELETE_PERSON:\n return {\n ...state,\n people: [...state.people.filter(p => p.id !== action.id)],\n peopleTransfer: [\n ...state.peopleTransfer.filter(\n t => t.fromId !== action.id && t.toId !== action.id,\n ),\n ],\n };\n\n case actions.SET_COMPANY:\n return {\n ...state,\n companyName: action.companyName,\n };\n\n case actions.SET_NEW_ADDRESS:\n return {\n ...state,\n newAddress: action.address,\n };\n\n case actions.SET_NEW_HEADQUARTER_ADDRESS:\n return {\n ...state,\n newHeadOfficeAddress: action.address,\n };\n\n case actions.SET_CONTACT_DETAILS:\n return {\n ...state,\n contactDetails: action.contact,\n };\n\n case actions.SET_NEW_COMPANY:\n return {\n ...state,\n newCompanyName: action.newCompanyName,\n };\n\n case actions.SET_PURPOSE:\n return {\n ...state,\n newCompanyPurpose: action.newCompanyPurpose,\n };\n\n case actions.SET_REG_NUM:\n return {\n ...state,\n regNum: action.regNum,\n };\n\n default:\n return state;\n }\n};\n\n// TODO change intital state back to production values\n\nexport const initialState = {\n currentStep: 1,\n isLoading: false,\n companyName: '',\n newCompanyName: '',\n newCompanyPurpose: '',\n contactDetails: {\n firstName: '',\n lastName: '',\n email: '',\n city: '',\n gender: '',\n mobile: '',\n street: '',\n zip: '',\n },\n newAddress: {\n city: '',\n street: '',\n zip: 0,\n },\n newHeadOfficeAddress: {\n city: '',\n street: '',\n zip: 0,\n },\n legalForm: legalForm.NotSet,\n regNum: '',\n mutations: [] as (keyof typeof MutationTypes)[],\n note: '',\n prices: prices,\n [fieldNames.people]: [] as Person[],\n [fieldNames.peopleTransfer]: [] as Transfer[],\n} as MutationFormState;\n","import React, { createContext, useContext, useEffect, useRef } from 'react';\nimport useThunkReducer, { Thunk } from 'react-hook-thunk-reducer';\n\nimport BasicLayout from 'Components/BasicLayout';\n\nimport { MutationFormState } from './types';\nimport { reducer, initialState } from './reducer';\nimport { MutationFormAction, actions } from './reducer/actions';\nimport StepProvider from './Components/StepProvider';\nimport { getCurrentEffectiveStep, getTotalSteps } from './reducer/selectors';\nimport Steps from './Steps';\nimport Axios from 'axios';\nimport { MutationLegalFormPriceList } from './Mutations';\nimport { Translate } from 'react-localize-redux';\n\nexport const StateContext = createContext({\n ...initialState,\n} as MutationFormState);\n\nexport const DispatchContext = createContext({} as React.Dispatch<\n MutationFormAction | Thunk\n>);\n\nexport default function MutationForm() {\n const [state, dispatch] = useThunkReducer(reducer, initialState);\n useEffect(() => {\n async function fetchPrices() {\n const prices = await loadPrices();\n dispatch({ type: actions.SET_PRICES, prices });\n }\n\n fetchPrices();\n // eslint-disable-next-line\n }, []);\n return (\n \n \n \n \n \n \n \n \n );\n}\n\nasync function loadPrices() {\n const response = await Axios.get(\n '/wp-json/fasoon-backend/v1/prices',\n );\n return response.data as MutationLegalFormPriceList;\n}\n\nfunction StepIndicator() {\n const state = useContext(StateContext);\n const step = getCurrentEffectiveStep(state);\n const totalStep = getTotalSteps(state);\n const myRef = useRef(null);\n useEffect(() => {\n if (!myRef || !myRef.current) {\n return;\n }\n if (step === 1) {\n return;\n }\n // @ts-ignore\n myRef.current.scrollIntoView();\n }, [step, myRef]);\n if (step === 1 || Steps.length === state.currentStep) {\n return null;\n }\n return (\n
\n
\n \n
\n {step - 2 > 0 &&\n `${Math.floor((100 * (step - 2)) / (totalStep - 2) / 5) * 5}%`}\n
\n
\n
\n {step - 1}\n
\n
\n
\n );\n}\n","import React, { useEffect } from 'react';\nimport MutationForm from 'Components/MutationForm';\nimport { withLocalize, LocalizeContextProps } from 'react-localize-redux';\n\nimport 'App.css';\n\nfunction App({ addTranslation }: LocalizeContextProps) {\n useEffect(() => {\n async function fetchTranslation() {\n const translationRequest: any = await fetch(\n '/wp-json/fasoon-backend/v1/translations',\n );\n const translations = await translationRequest.json();\n addTranslation(translations);\n }\n fetchTranslation();\n }, [addTranslation]);\n // eslint-disable-next-line\n return ;\n}\n\nexport default withLocalize(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,\n ),\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href,\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.',\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import { renderToStaticMarkup } from 'react-dom/server';\n\nimport globalTranslations from './translations/global.json';\nimport moment from 'moment';\nimport 'moment/locale/de';\n\nconst decodeURLParams = (search: string): any => {\n const hashes = search.slice(search.indexOf('?') + 1).split('&');\n return hashes.reduce((params, hash) => {\n const split = hash.indexOf('=');\n\n if (split < 0) {\n return Object.assign(params, {\n [hash]: null,\n });\n }\n\n const key = hash.slice(0, split);\n const val = hash.slice(split + 1);\n\n return Object.assign(params, { [key]: decodeURIComponent(val) });\n }, {});\n};\n\nconst onMissingTranslation = ({ defaultTranslation }: any) =>\n defaultTranslation;\n\nexport function getInitialize() {\n const availableLanguages = ['en', 'de', 'fr'];\n\n const { lang: requestedLanguage = 'de' } = decodeURLParams(\n window.location.search,\n );\n const defaultLanguage = availableLanguages.includes(requestedLanguage)\n ? requestedLanguage\n : 'de';\n moment.locale(defaultLanguage);\n\n return {\n languages: [\n { name: 'English', code: 'en' },\n { name: 'Deutsch', code: 'de' },\n { name: 'Français', code: 'fr' },\n ],\n translation: globalTranslations,\n options: { renderToStaticMarkup, defaultLanguage, onMissingTranslation },\n };\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nimport { LocalizeProvider } from 'react-localize-redux';\nimport { getInitialize } from 'translation';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}