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,OAXA,IAAAyH,YAAU,KACT,MAAMpW,EAAOC,SAASC,etCbY,2BsCclC,GAAIF,EAAM,CACT,MAAMqiB,EAAWliB,KAAKC,MAAMJ,EAAKK,WACjCsO,EAAS9B,EAAarB,QAAQ6W,IAC9B1T,EAAS1B,EAAoBD,iBAAiBqV,EAASlV,c,IAGtD,IAGI,gBAAC,GAAkB,KAAG,ECdf,SAASmV,KACvB,OACC,gBAAC,EAAAC,EAAuB,CAACC,MAAO,KAC/B,gBAACC,EAAA,EAAa,CAAC9U,MAAOA,EAAA,GACrB,gBAAC+U,EAAA,GAAW,MACZ,gBAAC,KAAQ,CAACC,MAAO,GAChB,gBAAC,GAAc,QAKpB,CCde,MAAMC,WAA8Ble,EAAA,EAKlD,WAAArH,CAAYC,GACXulB,MAAMvlB,EAAS,GAAIkB,OAAOuK,OAAO6Z,GAAsBE,gBACvDxkB,KAAKkN,SACN,CAMQ,OAAAA,GACP,MAAMuX,EAAYzkB,KAAKsG,SAASrD,OAAoBqhB,GAAsBE,cAAcE,KCfzD,IAAC1lB,EDgB5BylB,IChB4BzlB,EDiBbylB,GChBP,OAAWzlB,GACnB2lB,OAAO,gBAAC,GAAG,ODiBhB,EAlBwB,GAAAH,cAA+B,CACtDE,IAAK,mB","sources":["webpack://@dgtls-pub/wolf-sb-integration/./src/global/js/DomServices.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/global/js/InputsServices.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/global/js/ControllerBase.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/services/validateStepApi/validateStepApi.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/mocks/utils.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/constants/index.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/utils.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/services/thunkApi/api.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/steps/thunks.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/steps/reducer.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/steps/initialState.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/translations/reducer.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/index.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/layout/MainLayout/MainLayout.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/steps/selectors.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/SidebarArea/SidebarArea.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormStepTitle/FormStepTitle.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/store/modules/translations/selectors.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/SelectBox/styles.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/SelectBox/SelectBox.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/InputBox/styles.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/InputBox/InputBox.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/CheckBox/styles.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/CheckBox/CheckBox.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormControls/CustomFormField/CustomFormField.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/MainEnquiry/MainEnquiry.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/ProductCategory/ProductCategory.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/CustomerAddress/CustomerAddress.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/AdditionalInformation/AdditionalInformation.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/FileAttachments/FileDetails/FileDetails.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/FileAttachments/AlertBox/AlertBox.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/FileAttachments/FileAttachments.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormStepSummary/ResumeSlice/ResumeSlice.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormStepSummary/FormStepSummary.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/FormSummary/FormSummary.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormStepContent/FormStepContent.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormFiles/FormFiles.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/FormSteps.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/StepComponents/FormStepsNav/FormStepsNav.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/FormSteps/CompleteScreen/CompleteScreen.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/ContentArea/Alert/Alert.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/components/ContentArea/ContentArea.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/views/HeatingFormStepper/HeatingFormStepper.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/views/Main.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/react/index.tsx","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/o-heating-form.controller.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/organisms/o-heating-form/o-heating-form.app.tsx"],"sourcesContent":["import { IDomServices } from 'global/interfaces/controller.interface';\nimport { Subject } from 'rxjs';\n\nexport class DomServices implements IDomServices {\n\tprotected $element: HTMLElement;\n\tprotected $references: Record;\n\tonDomElementChanged: Subject = new Subject();\n\n\tconstructor(element: HTMLElement, references: Record) {\n\t\tthis.$references = references;\n\t\tthis.$element = element;\n\t}\n\n\tstatic collectReferences(\n\t\telement: HTMLElement,\n\t\tignoredReferences: string[],\n\t\tincludedReferences: string[],\n\t): Partial> {\n\t\tconst refs: Partial> = {};\n\n\t\tArray.from(element.querySelectorAll('[data-ref]')).forEach((el: HTMLElement) => {\n\t\t\tlet referenceName: string = '';\n\t\t\tif (el.dataset.ref) {\n\t\t\t\treferenceName = el.dataset.ref;\n\t\t\t}\n\n\t\t\t// skip ignored references\n\t\t\tif (ignoredReferences.includes(referenceName)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (referenceName) {\n\t\t\t\t// if the included list has items, only include these references, otherwise consider all\n\t\t\t\tif (includedReferences.length > 0) {\n\t\t\t\t\tif (includedReferences.includes(referenceName)) {\n\t\t\t\t\t\trefs[referenceName] = el;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(refs, referenceName)) {\n\t\t\t\t\t\tif (window.location.hostname === 'localhost') {\n\t\t\t\t\t\t\tconsole.warn(`A reference called '${referenceName}' has already been registered in ${this.constructor.name}!\\n Element:`, element);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trefs[referenceName] = el;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn refs;\n\t}\n\n\tgetRef(ref: string): T | undefined {\n\t\tif (this.$references) {\n\t\t\treturn Object.prototype.hasOwnProperty.call(this.$references, ref) ? (this.$references[ref] as T) : undefined;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tparseStringToHtml = (htmlAsString: string): void | ChildNode => {\n\t\tconst parsedNode = new DOMParser().parseFromString(htmlAsString, 'text/html').body.firstChild;\n\t\tif (parsedNode) return parsedNode;\n\t};\n\n\trenderDomElement = (ref: string, html: string, renderOnParent: boolean = false): void => {\n\t\tconst refExists = this.$references ? Object.prototype.hasOwnProperty.call(this.$references, ref) : undefined;\n\t\tif (renderOnParent) {\n\t\t\tthis.$element.innerHTML = html;\n\t\t\tthis.domElementChanged(ref);\n\t\t} else if (this.$references && refExists) {\n\t\t\t(this.$references as any)[ref].innerHTML = html;\n\t\t\tthis.domElementChanged(ref);\n\t\t} else {\n\t\t\tconsole.warn('DOM ref does not exist!', ref);\n\t\t}\n\t};\n\n\tappendRawHtmlToDomElement = (\n\t\tnode: HTMLElement,\n\t\thtmlAsString: string,\n\t\tposition: 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend' = 'afterend',\n\t): void | ChildNode => {\n\t\tconst htmlNode = this.parseStringToHtml(htmlAsString);\n\t\tnode.insertAdjacentElement(position, htmlNode as Element);\n\t\tif (htmlNode) {\n\t\t\treturn htmlNode;\n\t\t}\n\t};\n\n\treplaceLastChildElementWithRawHtml = (ref: string, htmlAsString: string): void | ChildNode => {\n\t\tconst refExists = this.$references ? Object.prototype.hasOwnProperty.call(this.$references, ref) : undefined;\n\t\tif (refExists) {\n\t\t\tconst htmlNode = this.parseStringToHtml(htmlAsString);\n\t\t\tconst lastNode = this.$references[ref].childNodes[this.$references[ref].childNodes.length - 1];\n\t\t\t(this.$references as any)[ref].replaceChild(htmlNode, lastNode);\n\t\t\tthis.domElementChanged(ref);\n\t\t\tif (htmlNode) {\n\t\t\t\treturn htmlNode;\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.warn('DOM ref does not exist!', ref);\n\t\t}\n\t};\n\n\ttoggleElementState(control: HTMLElement, newState: Array<'enable' | 'disable' | 'show' | 'hide' | 'check' | 'uncheck'>): void {\n\t\tif (!control) return;\n\t\tnewState &&\n\t\t\tnewState.forEach((state) => {\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase 'enable': {\n\t\t\t\t\t\tcontrol.removeAttribute('disabled');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'disable': {\n\t\t\t\t\t\tcontrol.setAttribute('disabled', 'true');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'show': {\n\t\t\t\t\t\tcontrol.removeAttribute('hidden');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'hide': {\n\t\t\t\t\t\tcontrol.setAttribute('hidden', 'true');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'uncheck': {\n\t\t\t\t\t\tcontrol.removeAttribute('checked');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'check': {\n\t\t\t\t\t\tcontrol.setAttribute('checked', 'true');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tdomElementChanged = (reference: string): void => {\n\t\tthis.onDomElementChanged.next(reference);\n\t};\n\n\tparseDOMScriptTag = (elementId: string): TJSON => {\n\t\tconst data = document.getElementById(elementId) as HTMLScriptElement;\n\t\ttry {\n\t\t\tconst out = JSON.parse(data.innerText);\n\t\t\treturn out as TJSON;\n\t\t} catch (error) {\n\t\t\tconsole.warn('Cannot parse component form config', error);\n\t\t}\n\t\treturn {} as TJSON;\n\t};\n\n\trenderDomElementInHTMLElement(element: HTMLElement, html: string): void {\n\t\telement.innerHTML = html;\n\t}\n}\n","import { IInputServicesBase } from 'global/interfaces/controller.interface';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nexport enum InputClasses {\n\terrorClass = 'uk-form-danger',\n\thiddenClass = 'uk-hidden',\n}\nexport class InputServices implements IInputServicesBase {\n\tprivate observedInputs: Record = {};\n\n\taddFocusToInput({ element, inputName }: { element: HTMLElement; inputName: string }): void {\n\t\tconst input = element?.querySelector(`input[name='${inputName}']`);\n\t\tif (input) (input as HTMLInputElement).focus();\n\t}\n\n\tobserveElementEvents(\n\t\telement: HTMLInputElement | HTMLSelectElement | HTMLButtonElement,\n\t\tinputEvent: 'input' | 'change' | 'click',\n\t\tonChange: (value: string, event: InputEvent) => any,\n\t): void {\n\t\tconst inputToObserve$ = fromEvent(element, inputEvent);\n\n\t\tthis.observedInputs[element.name] = inputToObserve$.pipe(map(this.mapInputEvent)).subscribe(({ value, event }) =>\n\t\t\tthis.subscribeInputWithErrorRemovalOnInputChange({\n\t\t\t\tvalue,\n\t\t\t\tevent,\n\t\t\t\tonChange,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/**\n\t * This method is in charge of adding error classes to the correct element within an input group on a defined element\n\t * @param {HTMLElement | null} element - The element to update\n\t * @param {Record} errors - The errors to manage\n\t */\n\taddErrorsToFieldset({\n\t\telement,\n\t\terrors,\n\t\tonErrorsUpdated,\n\t}: {\n\t\telement: HTMLElement | null;\n\t\terrors: Record;\n\t\tonErrorsUpdated?: () => void;\n\t}): void {\n\t\tif (element) {\n\t\t\tObject.keys(errors).forEach((inputName) => {\n\t\t\t\tconst input = element?.querySelector(`input[name='${inputName}']`) as HTMLElement;\n\n\t\t\t\tif (input) {\n\t\t\t\t\tconst errorMessage = errors[inputName] || '';\n\t\t\t\t\tthis.addOrRemoveFormValidationError('SHOW_VALIDATION_ERROR', input, errorMessage);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (onErrorsUpdated) onErrorsUpdated();\n\t\t\tif (errors) {\n\t\t\t\tconst inputNameToFocus = Object.keys(errors)[0];\n\t\t\t\tconst firstErrorElement = element?.querySelector(`input[name='${inputNameToFocus}']`);\n\t\t\t\tif (firstErrorElement) firstErrorElement.scrollIntoView();\n\t\t\t\tif (inputNameToFocus) this.addFocusToInput({ element, inputName: inputNameToFocus });\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(`ADD ERRORS TO FIELDSET: Looks like the element you want to update doesn't exist`);\n\t\t}\n\t}\n\n\taddOrRemoveFormValidationError(showOrHide: 'SHOW_VALIDATION_ERROR' | 'HIDE_VALIDATION_ERROR', input: HTMLElement, errorMessage: string = ''): void {\n\t\tif (!input) return;\n\n\t\tconst label = input.previousElementSibling;\n\t\tconst errorMessageContainer = input.nextElementSibling;\n\n\t\tif (showOrHide === 'SHOW_VALIDATION_ERROR') {\n\t\t\t// add error class to label\n\t\t\tif (label && label.classList) label.classList.add(InputClasses.errorClass);\n\t\t\t// add error class to input\n\t\t\tinput.classList.add(InputClasses.errorClass);\n\t\t\t// if there's an error message, inject it, show the div and add an error class\n\t\t\tif (errorMessageContainer) {\n\t\t\t\terrorMessageContainer.classList.add(InputClasses.errorClass);\n\t\t\t\terrorMessageContainer.classList.remove(InputClasses.hiddenClass);\n\t\t\t\terrorMessageContainer.innerHTML = errorMessage;\n\t\t\t}\n\t\t} else if (showOrHide === 'HIDE_VALIDATION_ERROR') {\n\t\t\t// remove error class from label\n\t\t\tif (label && label.classList) label.classList.remove(InputClasses.errorClass);\n\t\t\t// remove error class from input\n\t\t\tinput.classList.remove(InputClasses.errorClass);\n\t\t\t// remove error message and class\n\t\t\tif (errorMessageContainer) {\n\t\t\t\terrorMessageContainer.classList.remove(InputClasses.errorClass);\n\t\t\t\terrorMessageContainer.classList.add(InputClasses.hiddenClass);\n\t\t\t\terrorMessageContainer.innerHTML = '';\n\t\t\t}\n\t\t}\n\t}\n\n\tsubscribeInputWithErrorRemovalOnInputChange = ({\n\t\tvalue,\n\t\tevent,\n\t\tonChange,\n\t}: {\n\t\tvalue: string;\n\t\tevent: InputEvent;\n\t\tonChange?: (value: string, event: InputEvent) => void;\n\t}): void => {\n\t\tconst castEvent = event.target as HTMLElement;\n\n\t\tconst label = castEvent && castEvent.previousElementSibling;\n\t\tif (label && label.classList.contains(InputClasses.errorClass)) label.classList.remove(InputClasses.errorClass);\n\n\t\tconst input = event.target as HTMLElement;\n\t\tif (input && input.classList.contains(InputClasses.errorClass)) input.classList.remove(InputClasses.errorClass);\n\n\t\tconst errorMessage = castEvent && castEvent.nextElementSibling;\n\t\tif (errorMessage) {\n\t\t\terrorMessage.classList.remove(InputClasses.errorClass);\n\t\t\terrorMessage.classList.add('uk-hidden');\n\t\t}\n\n\t\tif (onChange) onChange(value, event);\n\t};\n\n\tmapInputEvent = (event: InputEvent): { value: string; event: InputEvent } => {\n\t\treturn { value: (event.target as HTMLInputElement | HTMLSelectElement).value, event };\n\t};\n}\n","import { IControllerBase, IDomServices } from 'global/interfaces/controller.interface';\nimport { DomServices } from './DomServices';\nimport { InputServices } from './InputsServices';\nexport default class ControllerBase = Record> implements IControllerBase {\n\treadonly $element: HTMLElement;\n\treadonly $references: Record;\n\treadonly ignoredReferences: string[];\n\treadonly includedReferences: string[];\n\treadonly disableReferenceCollection: boolean;\n\t/** See {@link DomServices} */\n\treadonly domUtils: IDomServices;\n\t/** See {@link InputServices} */\n\treadonly inputUtils: InputServices;\n\n\tconstructor(element: HTMLElement, ignoredReferences?: string[], includedReferences?: string[], disableReferenceCollection?: boolean) {\n\t\tthis.$element = element;\n\t\tthis.ignoredReferences = ignoredReferences || [];\n\t\tthis.includedReferences = includedReferences || [];\n\t\tthis.disableReferenceCollection = disableReferenceCollection || false;\n\n\t\tif (!this.disableReferenceCollection) {\n\t\t\tconst references = DomServices.collectReferences(this.$element, this.ignoredReferences, this.includedReferences);\n\t\t\tif (references && Object.keys(references).length > 0) {\n\t\t\t\tthis.$references = references as Record;\n\t\t\t} else {\n\t\t\t\tthis.$references = {} as Record;\n\t\t\t}\n\t\t}\n\n\t\tthis.domUtils = new DomServices(this.$element, this.$references);\n\t\tthis.inputUtils = new InputServices();\n\t}\n\n\tdispatchCustomEvent(\n\t\tname: string,\n\t\tdetail: T,\n\t\tbubbles: boolean = false,\n\t\tdispatchOnWindow: boolean = false,\n\t\tdispatchOnSpecificElement?: HTMLElement,\n\t): void {\n\t\tconst customEvent = new CustomEvent(name, { detail: detail, bubbles: bubbles });\n\t\tif (true === dispatchOnWindow) {\n\t\t\twindow.dispatchEvent(customEvent);\n\t\t} else if (dispatchOnSpecificElement) {\n\t\t\tdispatchOnSpecificElement.dispatchEvent(customEvent);\n\t\t} else {\n\t\t\tthis.$element.dispatchEvent(customEvent);\n\t\t}\n\t}\n}\n","import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';\nimport { endpointStub } from '../../../../../mocks/utils';\nimport queryString from 'query-string';\n\nconst queryBuilder = (endpoint: string, step: any): string => {\n\t// const stringifiedQuery = queryString.stringify(cleanedFilters, { arrayFormat: 'comma' });\n\tconst stringifiedQuery = '';\n\tconst builtQuery = endpoint + '?' + stringifiedQuery;\n\treturn builtQuery;\n};\n\nexport const validateStepApi = createApi({\n\treducerPath: 'validateStepApi',\n\tbaseQuery: fetchBaseQuery({ baseUrl: endpointStub }),\n\tendpoints: (builder) => ({\n\t\t// getPartnerProfile: builder.query({\n\t\t// \tquery: ({ value, endpoint }) => endpoint + '?id=' + value\n\t\t// }),\n\t\tvalidateStep: builder.query({\n\t\t\tquery: ({ step, endpoint }) => queryBuilder(endpoint, step),\n\t\t}),\n\t}),\n});\n\n// Hooks are auto-generated based on the defined endpoints\n// export const { useGetPartnersQuery, useGetLocationSuggestionQuery, useGetPartnerProfileQuery } = searchPartnersApi\nexport const { useValidateStepQuery } = validateStepApi;\n","import { FormFieldErrors } from 'global/interfaces/http.interface';\nimport { StepValidationPayload } from '../o-heating-form.types';\nimport { HeatingFormEndpoints } from '../react/model/global';\n\nexport const endpointStub = 'path:/o-heating-form/';\nexport const endpoints: Record = {\n\tsubmitForm: 'submitForm',\n\tvalidateMainEnquiry: 'validateMainEnquiry',\n\tvalidateProductCategory: 'validateProductCategory',\n\tvalidateCustomerAddress: 'validateCustomerAddress',\n\tvalidateAdditionalInformation: 'validateAdditionalInformation',\n\tvalidateFileAttachments: 'validateFileAttachments',\n\tvalidateFormSummary: 'validateFormSummary',\n};\n\nexport type PostValueType = string | number | boolean;\n\n// export function getFormPostFields(formBody: FormData): Map {\n// \tconst fieldsMap = new Map();\n\n// \tif (formBody instanceof FormData) {\n// \t\t[...formBody.entries()].map((field: any[]) => {\n// \t\t\tfieldsMap.set(field[0], field[1]);\n// \t\t});\n// \t}\n// \treturn fieldsMap;\n// }\nexport function getFormPostFields(formBody: StepValidationPayload): Map {\n\tconst fieldsMap = new Map();\n\n\tObject.entries(formBody.payload).map((field: any[]) => {\n\t\tfieldsMap.set(field[0], field[1]);\n\t});\n\treturn fieldsMap;\n}\n\n// export function validateFormFieldsRequired(postFieldsMap: Map, checkFields: string[]): FormFieldErrors {\nexport function validateFormFieldsRequired(postFieldsMap: Map, checkFields: string[]): FormFieldErrors {\n\tconst errors: FormFieldErrors = {};\n\n\tconst checkFieldMinlength = 1; // check for strings being required\n\n\tpostFieldsMap.size > 0 &&\n\t\tcheckFields.forEach((field) => {\n\t\t\tconst fieldData = postFieldsMap.get(field);\n\t\t\tswitch (true) {\n\t\t\t\tcase typeof fieldData === 'string': {\n\t\t\t\t\tif (fieldData.length < checkFieldMinlength) {\n\t\t\t\t\t\terrors[field] = `Error: ${field} is a required field`;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\treturn errors;\n}\n","export const HEATING_FORM_DATA_ID = 'react-data-heating-form';\n/** A prefix for form fields, so that they are unique. E.g. id=\"name\" would be prefixed to id=\"o-heating-form_name\" */\nexport const FORM_FIELD_ID_PREFIX = 'o-heating-form_';\nexport const CSS_FONT_SAIRA = 'Saira';\nexport const CSS_FONT_INTER = 'Inter';\n","import { FORM_FIELD_ID_PREFIX } from '../constants';\nimport { FileUploadData, FormControlType, FormStep, StepsState } from '../model/global';\nimport { v4 as uuidv4 } from 'uuid';\nimport { CustomFormFieldState } from './FormControls/CustomFormField/CustomFormField';\n\n/** Gets a form control by ID from an array of controls for a step */\nexport const getFormStepField = (fieldname: string, steps: FormControlType[]): FormControlType | undefined => {\n\tif (!Array.isArray(steps)) return undefined;\n\treturn steps.find((step) => step.id === fieldname);\n};\n\n/** Extracts a form control from the JSON data by ID and determines its initial state */\nexport const getFormControlInitialState = (fieldId: string, steps: FormControlType[]): CustomFormFieldState | undefined => {\n\tif (!Array.isArray(steps)) return undefined;\n\tconst control = steps.find((step) => step.id === fieldId);\n\tif (!control) return undefined;\n\tconst invalid = (control.value === '' || control.value === undefined) && control.required === true;\n\treturn {\n\t\tname: control.name as string,\n\t\tvalue: control.value,\n\t\toriginalField: control,\n\t\trequired: !!control.required,\n\t\tvalid: !invalid,\n\t\tinvalidReason: '',\n\t};\n};\n\n/** Return a specific summary field from one of the step summaries */\nexport const getFormSummaryField = (\n\tsummary: StepsState['formSummary'],\n\tstepTemplate: FormStep['stepTemplate'],\n\tcontrolName: FormControlType['name'],\n): CustomFormFieldState | undefined => {\n\tif (!controlName) return undefined;\n\tconst item = summary.steps[stepTemplate][controlName] ? summary.steps[stepTemplate][controlName] : undefined;\n\treturn item;\n};\n\nexport const getPrefixedFieldId = (id: string | undefined): string => {\n\tif (!id) return FORM_FIELD_ID_PREFIX + uuidv4();\n\tconst newId = id.replace(' ', '-');\n\treturn `${FORM_FIELD_ID_PREFIX}_${newId}`;\n};\n\nexport const getFileslotId = (index: number): string => {\n\tconst fileId = 'file' + index.toString();\n\treturn `${FORM_FIELD_ID_PREFIX}_${fileId}`;\n};\n\n/**\n * Convert bytes to a human readable string\n * @link https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript\n * @param bytes\n * @param decimals\n * @returns\n */\nexport const formatBytes = (bytes: number, decimals: number = 2): string => {\n\tif (bytes === 0) return '0 Bytes';\n\n\tconst k = 1024;\n\tconst dm = decimals < 0 ? 0 : decimals;\n\tconst sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\n\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\nexport const checkFileValidity = (theFile: File, uploads: CustomFormFieldState[], fileUploadData: FileUploadData): string => {\n\tconst allowedContentTypes = fileUploadData.allowedContentTypes || ['image/jpeg', 'image/webp', 'image/png'];\n\tconst maxFileSize = fileUploadData.maxFileSize || 1024 * 1024 * 4; // 4MB\n\n\tlet addError = '';\n\n\t// check to make sure file is unique - use might add same one twice\n\tif (!fileIsUnique(uploads, theFile)) {\n\t\t// console.log('Already added this file')\n\t\t// setFileAddError(step.stepData.fieldTranslations.uniqueFileAlert || 'Error: File must be unique')\n\t\t// return;\n\t\taddError = 'Error: File must be unique';\n\t} else if (fileIsInvalidType(allowedContentTypes || [], theFile)) {\n\t\t// const typeError = step.stepData.fieldTranslations.invalidFileType || 'Error: Invalid file type';\n\t\tconst typeError = 'Error: Invalid file type';\n\t\t// setFileAddError(`${typeError}: ${theFile.type}`)\n\t\t// return;\n\t\tif (theFile.type) {\n\t\t\taddError = `${typeError}: ${theFile.type}`;\n\t\t} else {\n\t\t\taddError = `${typeError}`;\n\t\t}\n\t} else if (filesizeExceedsLimit(Number(maxFileSize), theFile)) {\n\t\t// const sizeError = step.stepData.fieldTranslations.invalidFileSize || 'Error: Invalid file size';\n\t\tconst sizeError = 'Error: Invalid file size';\n\t\t// setFileAddError(`${sizeError}`)\n\t\t// return;\n\t\taddError = `${sizeError}`;\n\t}\n\treturn addError;\n};\n// export const fileIsUnique = (uploadsList: File[], theFile: File): boolean => {\n// \tconst existsAlready = uploadsList.some(f => {\n// \t\treturn (\n// \t\t\tf.type === theFile.type && f.name === theFile.name && f.size === theFile.size && f.lastModified === theFile.lastModified\n// \t\t)\n// \t});\n// \treturn !existsAlready\n// }\nexport const fileIsUnique = (uploadsList: CustomFormFieldState[], theFile: File): boolean => {\n\tconst existsAlready = uploadsList.some((f) => {\n\t\tif (!f.fileDetails) return false;\n\t\treturn (\n\t\t\tf.fileDetails.fileType === theFile.type &&\n\t\t\tf.fileDetails.fileName === theFile.name &&\n\t\t\tf.fileDetails.fileSize === theFile.size &&\n\t\t\tf.fileDetails.lastModified === theFile.lastModified\n\t\t);\n\t});\n\treturn !existsAlready;\n};\n\nexport const fileIsInvalidType = (allowedContentType: string[], theFile: File): boolean => {\n\tconst formatAllowed = allowedContentType.find((t) => {\n\t\treturn t.toLowerCase() === theFile.type.toLowerCase();\n\t});\n\treturn formatAllowed === undefined;\n};\n\nexport const filesizeExceedsLimit = (maxFileSizeBytes: number, theFile: File): boolean => {\n\treturn theFile.size > maxFileSizeBytes;\n};\n","import {\n\tStepValidationPayload,\n\tSubmitFormResponse as SubmitFormResponse,\n\tValidateFormStepResponse,\n} from 'wolf/components/organisms/o-heating-form/o-heating-form.types';\nimport { CustomFieldFieldTypes } from '../../../../model/global';\nclass HeatingApi implements IHeatingApi {\n\tasync runAsyncValidation(url: string, stepPayload: StepValidationPayload): ReturnType {\n\t\tlet endpoint: URL;\n\t\ttry {\n\t\t\tendpoint = new URL(url);\n\t\t} catch (error) {\n\t\t\tthrow new Error(error);\n\t\t}\n\n\t\ttry {\n\t\t\tconst resp = await fetch(endpoint.toString(), {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcredentials: 'same-origin',\n\t\t\t\tbody: JSON.stringify(stepPayload),\n\t\t\t});\n\n\t\t\tconst response = (await resp.json()) as ValidateFormStepResponse;\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tthrow new Error(error);\n\t\t}\n\t}\n\n\tasync submitFinalForm(url: string, payload: FinalFormPayload): ReturnType {\n\t\tlet endpoint: URL;\n\t\ttry {\n\t\t\tendpoint = new URL(url);\n\t\t} catch (error) {\n\t\t\tthrow new Error(error);\n\t\t}\n\n\t\ttry {\n\t\t\tconst resp = await fetch(endpoint.toString(), {\n\t\t\t\tmethod: 'POST',\n\t\t\t\t// credentials: 'same-origin',\n\t\t\t\tbody: payload.formData,\n\t\t\t\t// body: JSON.stringify(payload.payload),\n\t\t\t});\n\n\t\t\tconst response = (await resp.json()) as SubmitFormResponse;\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\t// console.log(error);\n\t\t\tthrow new Error(error);\n\t\t}\n\t}\n}\n\nexport default new HeatingApi();\n\nexport interface IHeatingApi {\n\trunAsyncValidation: (url: string, stepPayload: any) => Promise;\n\tsubmitFinalForm: (url: string, payload: any) => Promise;\n}\n\nexport interface PostField {\n\tname: string;\n\tvalue: any;\n\tfieldType: CustomFieldFieldTypes;\n\tchecked?: boolean;\n}\nexport interface FinalFormPayload {\n\tpayload: Record>;\n\tformData: FormData;\n}\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { StepValidationPayload } from 'wolf/components/organisms/o-heating-form/o-heating-form.types';\nimport { RootState } from '../..';\nimport { getFileslotId } from '../../../components/utils';\nimport { StepsState, StepTemplate } from '../../../model/global';\nimport Api, { FinalFormPayload } from '../services/thunkApi/api';\n\nexport const validateStep = createAsyncThunk('heatingAppSlice/validateStep', async (_, thunkAPI) => {\n\tconst state = thunkAPI.getState() as RootState;\n\n\t// get current step index\n\tconst activeIndex = state.steps.activeStepIndex;\n\t// get step template name\n\tconst { stepTemplate } = state.steps.steps[activeIndex];\n\t// get current step field data for a payload\n\tconst stepSummary = state.steps.formSummary.steps[stepTemplate];\n\t// get endpoint for validation\n\tconst endpoint: string = state.steps.steps[activeIndex].stepData.validation.url;\n\t// init payload obj\n\tconst payload: Record = {};\n\t// build payload - @todo - abstract this\n\tObject.values(stepSummary).forEach((e) => {\n\t\tconst value = e?.originalField.fieldType === 'checkbox' ? (e.checked ? e.value : null) : e?.value;\n\t\tpayload[e?.name as string] = value;\n\t});\n\tconst stepPayload: StepValidationPayload = {\n\t\tstepTemplate,\n\t\tpayload,\n\t};\n\t// call validation endpoint\n\tconst response = await Api.runAsyncValidation(endpoint, stepPayload);\n\n\treturn response;\n});\n\nconst buildFormSubmitPayload = (summary: StepsState['formSummary']): FinalFormPayload => {\n\tconst data: FinalFormPayload = {\n\t\tpayload: {},\n\t\tformData: new FormData(),\n\t};\n\n\tconst FILE_ATTACHMENTS: StepTemplate = 'FILE_ATTACHMENTS';\n\n\tfor (const [key, elements] of Object.entries(summary.steps)) {\n\t\tdata.payload[key] = {};\n\n\t\tfor (const [fieldKey, field] of Object.entries(elements)) {\n\t\t\tconst fieldType = field?.originalField.fieldType;\n\n\t\t\tdata.payload[key][fieldKey] = {\n\t\t\t\tname: field!.name,\n\t\t\t\tvalue: field!.value,\n\t\t\t\tfieldType: fieldType!,\n\t\t\t};\n\t\t\tlet checked = false;\n\t\t\tif (fieldType === 'checkbox') {\n\t\t\t\tchecked = !!field?.checked;\n\t\t\t\tdata.payload[key][fieldKey]['checked'] = checked;\n\t\t\t}\n\n\t\t\t// add to form data\n\t\t\tlet formDataValue = data.payload[key][fieldKey].value;\n\t\t\tif (fieldType === 'checkbox' && checked === false) {\n\t\t\t\t// support for checkboxes/values\n\t\t\t\tformDataValue = '';\n\t\t\t}\n\n\t\t\t// append to form data\n\t\t\tif (key === FILE_ATTACHMENTS) {\n\t\t\t\t// get file values from the page\n\t\t\t\tconst fileId = getFileslotId(field!.fileDetails!.fileIndex);\n\t\t\t\t// const theFile = document.getElementById('o-heating-form__file0')\n\t\t\t\tconst theFile = document.getElementById(fileId) as HTMLInputElement;\n\t\t\t\tif (theFile && theFile.files && theFile.files[0]) {\n\t\t\t\t\t// data.formData.append(fieldKey, theFile.files[0])\n\t\t\t\t\tdata.formData.append('files[]', theFile.files[0]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata.formData.append(fieldKey, formDataValue);\n\t\t\t}\n\t\t}\n\t}\n\treturn data;\n};\n\nexport const submitForm = createAsyncThunk('heatingAppSlice/submitForm', async (_, thunkAPI) => {\n\tconst state = thunkAPI.getState() as RootState;\n\n\t// get submit URL\n\tconst endpoint: string = state.steps.formSubmitUrl;\n\tif (!endpoint) throw new Error('Missing form submit URL!');\n\n\t// build payload based on Redux data\n\tconst payload = buildFormSubmitPayload(state.steps.formSummary);\n\n\treturn await Api.submitFinalForm(endpoint, payload);\n});\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { CustomFormFieldState } from '../../../components/FormControls/CustomFormField/CustomFormField';\nimport { FormStep, OrganismHeatingFormProps, StepsState } from '../../../model/global';\nimport initialState from './initialState';\nimport { submitForm, validateStep } from './thunks';\n\nconst stepsSlice = createSlice({\n\tname: 'stepsSlice',\n\tinitialState,\n\treducers: {\n\t\tinitApp(state, { payload }: PayloadAction) {\n\t\t\t// save step data in specified order\n\t\t\tstate.steps = payload.steps\n\t\t\t\t// .filter(s => (s.stepName === 'step-5' || s.stepName === 'step-6'))\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\treturn a.stepOrder < b.stepOrder ? -1 : 1;\n\t\t\t\t}) as any[];\n\t\t\tstate.endScreen = payload.endScreen;\n\t\t\tstate.activeStepIndex = 0;\n\t\t\tstate.formSubmitUrl = payload.formSubmitUrl;\n\t\t},\n\n\t\tsetRequestedStep(state, { payload }: PayloadAction) {\n\t\t\tstate.requestedStepIndex = payload;\n\t\t},\n\t\tsetActiveStep(state, { payload }: PayloadAction) {\n\t\t\t// do not go to step if the form has been submitted\n\t\t\tconst { formIsSubmitted } = state;\n\t\t\tif (formIsSubmitted) return;\n\n\t\t\tif (payload >= 0 && payload < state.steps.length) {\n\t\t\t\tstate.activeStepIndex = payload;\n\t\t\t}\n\t\t},\n\t\tsetFormSubmitError(state, { payload }: PayloadAction) {\n\t\t\tstate.formSubmitError = payload;\n\t\t},\n\t\t/**\n\t\t * Initializes step payload data (using useEffect on step init)\n\t\t */\n\t\tinitializeStepPayloadValues(\n\t\t\tstate,\n\t\t\t{\n\t\t\t\tpayload: { stepTemplate, stepPayload, initialize },\n\t\t\t}: PayloadAction<{\n\t\t\t\tstepTemplate: FormStep['stepTemplate'];\n\t\t\t\tstepPayload: Record>;\n\t\t\t\tinitialize: boolean;\n\t\t\t}>,\n\t\t) {\n\t\t\tstate.formSummary.steps[stepTemplate] = stepPayload as any;\n\t\t\tif (initialize) {\n\t\t\t\tstate.formSummary.initialized[stepTemplate] = initialize;\n\t\t\t}\n\t\t\t// state.formSummary.steps[payload.stepTemplate] = payload.steps\n\t\t},\n\t\t/**\n\t\t * Update one or more form control values for a step\n\t\t * Accepts a single field or an array of fields\n\t\t * All form fields are flattened into a single object where the key name is the field name\n\t\t */\n\t\tupdateStepPayloadValues(\n\t\t\tstate,\n\t\t\t{\n\t\t\t\tpayload: { stepTemplate, stepPayload, refreshSummary },\n\t\t\t}: PayloadAction<{\n\t\t\t\tstepTemplate: FormStep['stepTemplate'];\n\t\t\t\tstepPayload: CustomFormFieldState | CustomFormFieldState[];\n\t\t\t\trefreshSummary?: boolean;\n\t\t\t}>,\n\t\t) {\n\t\t\tif (Array.isArray(stepPayload)) {\n\t\t\t\t// files fields are dynamic so need rebuilding each time!\n\t\t\t\tif (refreshSummary) {\n\t\t\t\t\tstate.formSummary.steps[stepTemplate] = {};\n\t\t\t\t}\n\n\t\t\t\tif (stepPayload.length === 0) {\n\t\t\t\t\tstate.formSummary.steps[stepTemplate] = {};\n\t\t\t\t} else {\n\t\t\t\t\tstepPayload.forEach((step) => {\n\t\t\t\t\t\tif (state.formSummary.steps[stepTemplate][step.name]) {\n\t\t\t\t\t\t\tstate.formSummary.steps[stepTemplate][step.name] = step as any;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// @todo...\n\t\t\t\t\t\t\t// file uploads uses this exception - because fields are dynamically built and do not exist in the JSON data!\n\t\t\t\t\t\t\tstate.formSummary.steps[stepTemplate][step.name] = step as any;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (state.formSummary.steps[stepTemplate][stepPayload.name]) {\n\t\t\t\t\tstate.formSummary.steps[stepTemplate][stepPayload.name] = stepPayload as any;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// compute the validity of the overall step\n\t\t\tlet stepIsValid = true;\n\t\t\tfor (const [key, element] of Object.entries(state.formSummary.steps[stepTemplate])) {\n\t\t\t\tif (element?.valid === false) {\n\t\t\t\t\tstepIsValid = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// update validity of this step\n\t\t\tstate.formSummary.validatedStepsHTML5[stepTemplate] = stepIsValid;\n\t\t},\n\t\t/** Allow external components to explicity declare a step as valid/invalid, depending on external logic */\n\t\tdeclareStepValidity(\n\t\t\tstate,\n\t\t\t{\n\t\t\t\tpayload: { stepTemplate, validity },\n\t\t\t}: PayloadAction<{\n\t\t\t\tstepTemplate: FormStep['stepTemplate'];\n\t\t\t\tvalidity: boolean;\n\t\t\t}>,\n\t\t) {\n\t\t\tstate.formSummary.validatedStepsHTML5[stepTemplate] = validity;\n\t\t},\n\t},\n\textraReducers: (builder) => {\n\t\tbuilder.addCase(validateStep.fulfilled, (state, { payload }) => {\n\t\t\tconst stepTemplate = state.steps[state.activeStepIndex].stepTemplate;\n\t\t\t// check payload for success or otherwise\n\t\t\tif (payload && payload.success === true) {\n\t\t\t\t// update step validity\n\t\t\t\tstate.formSummary.validationErrors[stepTemplate] = {};\n\t\t\t\tstate.formSummary.validatedSteps[stepTemplate] = true;\n\t\t\t} else {\n\t\t\t\t// record errors for UI\n\t\t\t\tstate.formSummary.validationErrors[stepTemplate] = payload.error || {};\n\t\t\t\tstate.formSummary.validatedSteps[stepTemplate] = false;\n\t\t\t}\n\t\t});\n\n\t\t// builder.addCase(validateStep.rejected, (state, payload) => {\n\t\t// \tconst stepTemplate = state.steps[state.activeStepIndex].stepTemplate\n\t\t// \tstate.formSummary.validationErrors[stepTemplate] = payload.payload.error\n\t\t// });\n\n\t\tbuilder.addCase(submitForm.fulfilled, (state, { payload }) => {\n\t\t\t// check payload for success or otherwise\n\t\t\tif (payload && payload.success === true) {\n\t\t\t\tstate.formSubmitError = '';\n\t\t\t\t// show welcome screen by toggling submitted state\n\t\t\t\tstate.formIsSubmitted = true;\n\t\t\t} else {\n\t\t\t\t// console.log('Error submitting', payload)\n\t\t\t\tstate.formSubmitError = payload.error.toString();\n\t\t\t\t// state.formSummary.validationErrors[stepTemplate] = payload.error || {}\n\t\t\t\t// state.formSummary.validatedSteps[stepTemplate] = false\n\t\t\t}\n\t\t});\n\t\tbuilder.addCase(submitForm.rejected, (state, { error }) => {\n\t\t\tif (error.message) state.formSubmitError = 'Something went wrong while sending a form!';\n\t\t});\n\t},\n});\n\nexport const stepsActions = stepsSlice.actions;\nexport default stepsSlice.reducer;\n","import { StepsState } from '../../../model/global';\n\nconst initialState: StepsState = {\n\tformSubmitUrl: '',\n\tformSubmitError: '',\n\trequestedStepIndex: -1,\n\tactiveStepIndex: 0,\n\tformIsSubmitted: false,\n\tsteps: [],\n\tformSummary: {\n\t\tsteps: {\n\t\t\tMAIN_ENQUIRY: {},\n\t\t\tPRODUCT_CATEGORY: {},\n\t\t\tCUSTOMER_ADDRESS: {},\n\t\t\tADDITIONAL_INFORMATION: {},\n\t\t\tFILE_ATTACHMENTS: {},\n\t\t\tFORM_SUMMARY: {},\n\t\t},\n\t\tinitialized: {\n\t\t\tMAIN_ENQUIRY: false,\n\t\t\tPRODUCT_CATEGORY: false,\n\t\t\tCUSTOMER_ADDRESS: false,\n\t\t\tADDITIONAL_INFORMATION: false,\n\t\t\tFILE_ATTACHMENTS: false,\n\t\t\tFORM_SUMMARY: false,\n\t\t},\n\t\tvalidationErrors: {\n\t\t\tMAIN_ENQUIRY: {},\n\t\t\tPRODUCT_CATEGORY: {},\n\t\t\tCUSTOMER_ADDRESS: {},\n\t\t\tADDITIONAL_INFORMATION: {},\n\t\t\tFILE_ATTACHMENTS: {},\n\t\t\tFORM_SUMMARY: {},\n\t\t},\n\t\tvalidatedSteps: {\n\t\t\tMAIN_ENQUIRY: false,\n\t\t\tPRODUCT_CATEGORY: false,\n\t\t\tCUSTOMER_ADDRESS: false,\n\t\t\tADDITIONAL_INFORMATION: false,\n\t\t\tFILE_ATTACHMENTS: false,\n\t\t\tFORM_SUMMARY: false,\n\t\t},\n\t\tvalidatedStepsHTML5: {\n\t\t\tMAIN_ENQUIRY: false,\n\t\t\tPRODUCT_CATEGORY: false,\n\t\t\tCUSTOMER_ADDRESS: false,\n\t\t\tADDITIONAL_INFORMATION: false,\n\t\t\tFILE_ATTACHMENTS: false,\n\t\t\tFORM_SUMMARY: false,\n\t\t},\n\t},\n\tendScreen: {\n\t\theadline: {\n\t\t\ttext: '',\n\t\t},\n\t\ttext: '',\n\t\tbutton: {\n\t\t\thref: '',\n\t\t\ttitle: '',\n\t\t\ttext: '',\n\t\t\ttarget: '_self',\n\t\t},\n\t},\n};\nexport default initialState;\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { OrganismHeatingFormProps } from '../../../model/global';\n\nconst initialState: OrganismHeatingFormProps['translations'] = {};\n\nconst translationsSlice = createSlice({\n\tname: 'translationsSlice',\n\tinitialState,\n\treducers: {\n\t\tinitTranslations(state, { payload }: PayloadAction) {\n\t\t\t// state = payload\n\t\t\treturn payload;\n\t\t},\n\t},\n});\n\nexport const translationsActions = translationsSlice.actions;\nexport default translationsSlice.reducer;\n","import { configureStore, combineReducers } from '@reduxjs/toolkit';\nimport { validateStepApi } from './modules/services/validateStepApi/validateStepApi';\nimport stepsReducer from './modules/steps/reducer';\nimport translationsReducer from './modules/translations/reducer';\n\nconst rootReducer = combineReducers({\n\ttranslations: translationsReducer,\n\tsteps: stepsReducer,\n\t[validateStepApi.reducerPath]: validateStepApi.reducer,\n});\n\n// export type RootState = typeof rootReducer;\nexport type RootState = ReturnType;\n\nconst store = configureStore({\n\treducer: rootReducer,\n\tmiddleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(validateStepApi.middleware),\n\tdevTools: process.env.NODE_ENV !== 'production',\n});\n\n// investigate: setupListeners\nexport default store;\n","import React, { forwardRef } from 'react';\nimport { Box, createStyles, withStyles, Theme, BoxProps } from '@material-ui/core';\nimport createNameSpacedComponent from 'global/react/utils/ts/createNamespacedComponent';\n\nconst GridContainer = withStyles((theme: Theme) => createStyles({}))((props: BoxProps) => (\n\t\n));\nconst SidebarArea = (props: BoxProps) => ;\nconst Content = forwardRef((props: BoxProps & { ref: React.MutableRefObject }, ref) => (\n\t\n));\nexport default createNameSpacedComponent(GridContainer, { SidebarArea, Content });\n","import { createSelector } from '@reduxjs/toolkit';\nimport { RootState } from '../..';\n\nconst getSteps = (state: RootState) => state.steps;\nconst activeStepIndex = (state: RootState) => state.steps.activeStepIndex;\nconst getCurrentStep = (state: RootState) => {\n\treturn state.steps.steps.length > 0 ? state.steps.steps[state.steps.activeStepIndex] : undefined;\n};\nconst getFormSummary = (state: RootState) => {\n\treturn state.steps.formSummary;\n};\n\nconst getTotalSteps = (state: RootState) => {\n\treturn state.steps.steps.length;\n};\n\nconst getEndScreen = (state: RootState) => {\n\treturn state.steps.endScreen;\n};\n\nconst getFormSubmissionError = (state: RootState) => {\n\treturn state.steps.formSubmitError;\n};\n\n// SELECTORS\nexport const stepsSelector = createSelector(getSteps, (steps) => steps);\n\nexport const activeStepIndexSelector = createSelector(activeStepIndex, (active) => active);\n\n/** Gets the current step data, based on the active step index */\nexport const currentStepSelector = createSelector(getCurrentStep, (step) => step);\n/** Get the total number of steps in the stepper */\nexport const totalStepsSelector = createSelector(getTotalSteps, (total) => total);\n\nexport const formSummarySelector = createSelector(getFormSummary, (summary) => summary);\n\nexport const endScreenSelector = createSelector(getEndScreen, (data) => data);\n\nexport const formSubmitErrorSelector = createSelector(getFormSubmissionError, (message) => message);\n\n/** Gets a specific form field in the store */\n// export const formSummaryField = createSelector(\n// \tgetFormSummaryField,\n// field => field,\n// \t(state: any, props: any) => {\n// \t\treturn state\n// \t},\n// )\n","import React from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { stepsActions } from '../../store/modules/steps/reducer';\nimport { stepsSelector } from '../../store/modules/steps/selectors';\nimport IconRenderer from 'global/react-mui/atoms/IconRenderer';\n\nconst Sidebar: React.FC> = () => {\n\tconst dispatch = useDispatch();\n\tconst { steps, activeStepIndex } = useSelector(stepsSelector);\n\tconst jumpToStep = (e: React.MouseEvent, stepIndex: number): void => {\n\t\te && e.preventDefault();\n\t\tif (stepIndex < activeStepIndex) dispatch(stepsActions.setRequestedStep(stepIndex));\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{steps?.map((step, stepIndex) => {\n\t\t\t\tconst activeLi = stepIndex === activeStepIndex ? 'uk-active' : '';\n\t\t\t\tconst activeBadge =\n\t\t\t\t\tstepIndex < activeStepIndex\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tclassName: 'badge-success',\n\t\t\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tclassName: '',\n\t\t\t\t\t\t\t\tcontent: stepIndex + 1,\n\t\t\t\t\t\t };\n\n\t\t\t\treturn (\n\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t);\n\t\t\t})}\n\t\t
\n\t);\n};\n\nexport default Sidebar;\n","import React, { memo } from 'react';\nimport { FormStep } from '../../../model/global';\n\ninterface Props {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tstep: Pick;\n}\n\nconst FormStepTitle: React.FC = (props) => {\n\tconst { currentStep, totalSteps, step } = props;\n\n\tconst stepIndicator: {\n\t\tfractionTop: string;\n\t\tfractionBottom: string;\n\t} = {\n\t\tfractionTop: (currentStep + 1).toString().padStart(2, '0'),\n\t\tfractionBottom: totalSteps.toString().padStart(2, '0'),\n\t};\n\n\tconst ukPosition = step?.stepInfo?.helpButton ? 'uk-flex-bottom' : 'uk-flex-middle';\n\tconst stepInfoClassName =\n\t\t'a-button m-formstep-step-title__more-info uk-visible@l uk-button uk-flex-inline uk-flex-middle uk-text-center uk-button-ghost has-icon has-no-text extra-info';\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t{step?.stepTitle &&

{step?.stepTitle}

}\n\t\t\t\t
\n\t\t\t\t\t{step?.stepInfo?.copy &&
{step.stepInfo.copy}
}\n\n\t\t\t\t\t{step?.stepInfo?.helpButton && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
{step?.stepInfo?.helpButton?.title}
\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t
\n\t\t\t{stepIndicator?.fractionTop && stepIndicator?.fractionBottom && (\n\t\t\t\t
\n\t\t\t\t\t{stepIndicator.fractionTop}/{stepIndicator.fractionBottom}\n\t\t\t\t
\n\t\t\t)}\n\t\t
\n\t);\n};\n\nexport default memo(FormStepTitle);\n","import { createSelector } from '@reduxjs/toolkit';\nimport { RootState } from '../..';\n\nconst getTranslations = (state: RootState) => state.translations;\n\nexport const translationsSelector = createSelector(getTranslations, (translations) => translations);\n","import { makeStyles } from '@material-ui/core';\nimport { colors } from 'global/react-mui/theme/colors';\n\nconst useStyles = makeStyles((theme) => ({\n\tformControl: {\n\t\t// margin: theme.spacing(1),\n\t\tmargin: 0,\n\t\tminWidth: 120,\n\t},\n\tformControlFull: {\n\t\tminWidth: '100%',\n\t},\n\tselectEmpty: {\n\t\tmarginTop: theme.spacing(2),\n\t},\n\tlabel: {\n\t\t[theme.breakpoints.down('md')]: {\n\t\t\tcolor: colors['text-grey'],\n\t\t},\n\t},\n\tselect: {\n\t\t[theme.breakpoints.down('md')]: {\n\t\t\t'&::before': {\n\t\t\t\tborderColor: colors['text-grey'],\n\t\t\t},\n\t\t\t'&:hover::before': {\n\t\t\t\tborderColor: 'rgba(255, 255, 255, 1) !important',\n\t\t\t},\n\t\t\t'& svg': {\n\t\t\t\tcolor: '#d3dbe8',\n\t\t\t},\n\t\t\tcolor: '#d3dbe8',\n\t\t},\n\t},\n\tvalidationWrapper: {\n\t\tpadding: 12,\n\t\tcolor: colors['wolf-red'],\n\t},\n}));\n\nexport default useStyles;\n","import React, { memo } from 'react';\nimport { FormControl, FormHelperText, InputLabel, Select } from '@material-ui/core';\nimport { CustomFormControlProps, CustomSelectType, CustomSelectTypeOptions } from '../../../model/global';\nimport { CustomFormFieldState } from '../CustomFormField/CustomFormField';\nimport { useSelector } from 'react-redux';\nimport { translationsSelector } from '../../../store/modules/translations/selectors';\nimport { getPrefixedFieldId } from '../../utils';\nimport useStyles from './styles';\n\nconst SelectBox: React.FC = ({ field, onChange, fullWidth, validationError }): JSX.Element => {\n\tconst classes = useStyles();\n\tconst { formRequiredField } = useSelector(translationsSelector);\n\n\tconst [validationMessageState, setValidationMessageState] = React.useState('');\n\n\tconst handleChange = (event: React.ChangeEvent) => {\n\t\tconst {\n\t\t\tname,\n\t\t\tvalue,\n\t\t\trequired,\n\t\t\tvalidity: { valid },\n\t\t} = event.target as HTMLSelectElement;\n\n\t\tif (valid === false) {\n\t\t\tsetValidationMessageState(formRequiredField || 'This field is required');\n\t\t} else {\n\t\t\tsetValidationMessageState('');\n\t\t}\n\n\t\tconst change: CustomFormFieldState = {\n\t\t\tname,\n\t\t\tvalue,\n\t\t\trequired,\n\t\t\tvalid,\n\t\t\tinvalidReason: field.invalidReason || '',\n\t\t\toriginalField: field.originalField,\n\t\t};\n\t\t// support for having options which are not the original field options!\n\t\tif (field.options) {\n\t\t\tchange['options'] = field.options;\n\t\t}\n\t\t// callback on select change\n\t\tonChange(change);\n\t};\n\n\tconst renderOption = (option: CustomSelectType['options'][0], key: number): JSX.Element => {\n\t\treturn (\n\t\t\t\n\t\t);\n\t};\n\tconst renderGroup = (group: CustomSelectTypeOptions, key: number): JSX.Element => {\n\t\treturn (\n\t\t\t\n\t\t\t\t{group.options ? group.options.map((option, idx) => renderOption(option, idx)) : null}\n\t\t\t\n\t\t);\n\t};\n\n\t/** Support for external field validation messages */\n\tconst getHelperText = (): string => {\n\t\treturn validationError || validationMessageState || '';\n\t};\n\n\tconst renderControlOptions = (field: CustomFormFieldState): JSX.Element => {\n\t\tconst selectControl = field.originalField as CustomSelectType;\n\n\t\tconst hasCustomOptions = field.options && field.options.length > 0;\n\n\t\tconst isGroup = selectControl.optionsGroup && selectControl.optionsGroup.length > 0;\n\n\t\tconst hasOriginalOptions = selectControl.options && selectControl.options.length > 0;\n\n\t\tswitch (true) {\n\t\t\tcase isGroup: {\n\t\t\t\treturn (\n\t\t\t\t\t(field.originalField as CustomSelectType).optionsGroup &&\n\t\t\t\t\t(field.originalField as any).optionsGroup.map((group, idx) => {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn renderGroup(group, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase hasCustomOptions: {\n\t\t\t\treturn (\n\t\t\t\t\t(field.options as any) &&\n\t\t\t\t\t(field.options as any).map((option, idx) => {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn renderOption(option, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase hasOriginalOptions: {\n\t\t\t\treturn (\n\t\t\t\t\t(selectControl.options as any) &&\n\t\t\t\t\t(selectControl.options as any).map((option, idx) => {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn renderOption(option, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn <>;\n\t};\n\n\t// setup an ID for the label htmlFor\n\tconst controlId = getPrefixedFieldId(field.originalField.id || field.originalField.name);\n\n\tconst controlClasses: string[] = [classes.formControl];\n\t// if (fullWidth) {\n\t// \tcontrolClasses.push(classes.formControlFull);\n\t// }\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t{field.originalField.title}\n\t\t\t\n\t\t\t handleChange(e)}\n\t\t\t\tinputProps={{\n\t\t\t\t\tname: field.name,\n\t\t\t\t\tid: controlId,\n\t\t\t\t}}>\n\t\t\t\t{renderControlOptions(field)}\n\t\t\t\n\t\t\t{getHelperText()}\n\t\t\n\t);\n};\n\nexport default memo(SelectBox);\n","import { makeStyles } from '@material-ui/core';\nimport { colors } from 'global/react-mui/theme/colors';\n\nconst useStyles = makeStyles((theme) => ({\n\tformControl: {},\n\tinputText: {\n\t\t[theme.breakpoints.down('md')]: {\n\t\t\t'& label': {\n\t\t\t\tcolor: colors['text-grey'],\n\t\t\t},\n\t\t\t'& input': {\n\t\t\t\tcolor: '#d3dbe8',\n\t\t\t},\n\t\t\t'& fieldset': {\n\t\t\t\tborderColor: colors['text-grey'],\n\t\t\t},\n\t\t\t'&:hover fieldset': {\n\t\t\t\tborderColor: 'rgba(255, 255, 255, 1) !important',\n\t\t\t},\n\t\t},\n\t},\n\tvalidationWrapper: {\n\t\tpadding: '10px 0',\n\t\tcolor: `${colors['wolf-red']} !important`,\n\t},\n}));\n\nexport default useStyles;\n","import React, { memo } from 'react';\nimport { TextField } from '@material-ui/core';\nimport { CustomFormControlProps, CustomInputType, CustomTextareaType } from '../../../model/global';\nimport { getPrefixedFieldId } from '../../utils';\nimport { useSelector } from 'react-redux';\nimport { translationsSelector } from '../../../store/modules/translations/selectors';\nimport useStyles from './styles';\n\nconst InputBox: React.FC = ({ field, onChange, fullWidth, validationError }): JSX.Element => {\n\tconst classes = useStyles();\n\tconst { formRequiredField } = useSelector(translationsSelector);\n\n\tconst [validationMessageState, setValidationMessageState] = React.useState('');\n\n\tconst handleTextFieldChange = (\n\t\tevent: React.ChangeEvent,\n\t\t_field: CustomInputType | CustomTextareaType,\n\t): void => {\n\t\tconst {\n\t\t\tname,\n\t\t\tvalue,\n\t\t\trequired,\n\t\t\tvalidity: { valid },\n\t\t} = event.target;\n\n\t\tif (valid === false) {\n\t\t\tsetValidationMessageState(formRequiredField || 'This field is required');\n\t\t} else {\n\t\t\tsetValidationMessageState('');\n\t\t}\n\n\t\tonChange({\n\t\t\tname,\n\t\t\tvalue,\n\t\t\trequired,\n\t\t\tvalid,\n\t\t\tinvalidReason: field.invalidReason || '',\n\t\t\toriginalField: _field,\n\t\t});\n\t};\n\n\t/** Support for external field validation messages */\n\tconst getHelperText = (): string => {\n\t\treturn validationError || validationMessageState || '';\n\t};\n\n\tconst controlId = getPrefixedFieldId(field.originalField.id || field.originalField.name);\n\n\treturn (\n\t\t handleTextFieldChange(e, field.originalField as CustomInputType)}\n\t\t\t// support for text areas\n\t\t\tmultiline={field.originalField?.fieldType === 'textarea'}\n\t\t\tminRows={field.originalField?.fieldType === 'textarea' ? (field.originalField as CustomTextareaType).minRows || 5 : 1}\n\t\t\tmaxRows={field.originalField?.fieldType === 'textarea' ? (field.originalField as CustomTextareaType).maxRows || 8 : 1}\n\t\t/>\n\t);\n};\n\nexport default memo(InputBox);\n","import { makeStyles } from '@material-ui/core';\nimport { colors } from 'global/react-mui/theme/colors';\n\nconst useStyles = makeStyles((theme) => ({\n\tlabelWrapper: {\n\t\t'& > *:first-child': {\n\t\t\tmarginTop: 0,\n\t\t\tmarginBottom: 0,\n\t\t},\n\t\t'& > * + *': {\n\t\t\tmarginTop: 16,\n\t\t\tmarginBottom: 0,\n\t\t},\n\t\t'& a': {\n\t\t\t// colors usually come from uk-link so add styles\n\t\t\tcolor: colors['wolf-red'],\n\t\t},\n\t},\n\tlabel: {\n\t\t[theme.breakpoints.down('md')]: {\n\t\t\t'& span': {\n\t\t\t\tcolor: colors['text-grey'],\n\t\t\t\tfontSize: 14,\n\t\t\t},\n\t\t},\n\t},\n\tcheckbox: {\n\t\t[theme.breakpoints.down('md')]: {\n\t\t\t'& svg': {\n\t\t\t\tfill: colors['text-grey'],\n\t\t\t},\n\t\t},\n\t},\n\tvalidationWrapper: {\n\t\tpadding: 12,\n\t\tcolor: colors['wolf-red'],\n\t},\n}));\n\nexport default useStyles;\n","import React, { memo } from 'react';\nimport { Checkbox, FormControlLabel, FormHelperText } from '@material-ui/core';\nimport { CustomInputType } from '../../../model/global';\nimport { getPrefixedFieldId } from '../../utils';\nimport { CustomFormFieldState } from '../CustomFormField/CustomFormField';\nimport { useSelector } from 'react-redux';\nimport { translationsSelector } from '../../../store/modules/translations/selectors';\nimport useStyles from './styles';\n\ninterface Props {\n\tfield: CustomFormFieldState;\n\tonChange: (event: CustomFormFieldState) => void;\n\tvalidationError: string;\n}\nconst CheckBox: React.FC = ({ field, validationError, onChange }): JSX.Element => {\n\tconst classes = useStyles();\n\tconst { formRequiredField } = useSelector(translationsSelector);\n\n\tconst [validationMessageState, setValidationMessageState] = React.useState('');\n\n\tconst handleCheckboxChange = (event: React.ChangeEvent, _field: CustomInputType): void => {\n\t\tconst {\n\t\t\tname,\n\t\t\tvalue,\n\t\t\trequired,\n\t\t\tvalidity: { valid },\n\t\t\tchecked,\n\t\t} = event.target;\n\n\t\tif (valid) {\n\t\t\tsetValidationMessageState('');\n\t\t} else {\n\t\t\tsetValidationMessageState(formRequiredField);\n\t\t}\n\n\t\tonChange({\n\t\t\tname,\n\t\t\tvalue,\n\t\t\toriginalField: _field,\n\t\t\tvalid,\n\t\t\tinvalidReason: formRequiredField,\n\t\t\tchecked: checked,\n\t\t\trequired,\n\t\t});\n\t};\n\n\t/** Support for external field validation messages */\n\tconst getHelperText = (): string => {\n\t\treturn validationError || validationMessageState || '';\n\t};\n\n\tconst controlId = getPrefixedFieldId(field.originalField.id || field.originalField.name);\n\n\treturn (\n\t\t<>\n\t\t\t handleCheckboxChange(e, field.originalField as CustomInputType)}\n\t\t\t\t\t\tname={field.name}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\tvalue={field.value}\n\t\t\t\t\t\trequired={field.required}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tlabel={\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{getHelperText()}\n\t\t\n\t);\n};\n\nexport default memo(CheckBox);\n","import React, { memo } from 'react';\nimport { Box } from '@material-ui/core';\nimport { FormControlType } from '../../../model/global';\nimport SelectBox from '../SelectBox';\nimport InputBox from '../InputBox';\nimport CheckBox from '../CheckBox';\n\nexport interface CustomFormFieldState {\n\tname: string;\n\tvalue: V;\n\trequired: boolean;\n\tvalid: boolean;\n\tinvalidReason: string;\n\t// dirty: boolean;\n\tchecked?: boolean;\n\toptions?: any[];\n\toriginalField: FormControlType;\n\tfileDetails?: {\n\t\tfileName: string;\n\t\tfileSize: number;\n\t\tfileType: string;\n\t\tfileIndex: number;\n\t\tlastModified: number;\n\t};\n}\ninterface Props {\n\t// field: FormControlType;\n\tfield: CustomFormFieldState;\n\tonFieldChange: (event: CustomFormFieldState) => void;\n\tfieldErrors: Record;\n}\nconst CustomFormField: React.FC = ({ field, fieldErrors, onFieldChange }) => {\n\t// extract field error for this field, if exists\n\tconst fieldError = fieldErrors[field.name] || '';\n\n\tconst renderFormField = (field: CustomFormFieldState): JSX.Element | undefined => {\n\t\tswitch (field.originalField.fieldType) {\n\t\t\tcase 'textarea': // todo? TextField?\n\t\t\tcase 'text':\n\t\t\tcase 'email': {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase 'checkbox': {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase 'select': {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst respWidthDefault = field.originalField.responsiveWidth?.default || '';\n\tconst respWidthDesktop = field.originalField.responsiveWidth?.desktop || '';\n\n\tconst customClasses: string = [\n\t\trespWidthDefault ? 'uk-width-' + respWidthDefault : '',\n\t\trespWidthDesktop ? 'uk-width-' + respWidthDesktop + '@s' : '',\n\t]\n\t\t.filter((c) => c)\n\t\t.join(' ');\n\n\treturn (\n\t\t\n\t\t\t{renderFormField(field) || null}\n\t\t
\n\t);\n};\n\nexport default memo(CustomFormField);\n","import React, { memo, useEffect, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport CustomFormField from '../../FormControls/CustomFormField';\nimport { getFormControlInitialState } from '../../utils';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\n\nconst MainEnquiry: React.FC = ({ onStepControlsChange, data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\tconst step = useSelector(currentStepSelector) as FormStep<'main'>;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst stepErrors = summary.validationErrors[step.stepTemplate];\n\n\tconst fields: {\n\t\tenquiryTopic: CustomFormFieldState | undefined;\n\t\ttargetGroup: CustomFormFieldState | undefined;\n\t} = useMemo(() => {\n\t\treturn {\n\t\t\tenquiryTopic: getFormControlInitialState('enquiry_topic', step.stepData.fields.main),\n\t\t\ttargetGroup: getFormControlInitialState('target_group', step.stepData.fields.main),\n\t\t};\n\t}, [step.stepData.fields.main]);\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\n\t\t// fill in state with initial field values and validity\n\t\tfor (const [key, element] of Object.entries(fields)) {\n\t\t\tif (!element || !element.name) continue;\n\n\t\t\tconst invalid = element.value === '' && element.required === true;\n\t\t\tinitialData[element.name] = {\n\t\t\t\tname: element.name as string,\n\t\t\t\toriginalField: element.originalField,\n\t\t\t\tvalue: element.value,\n\t\t\t\trequired: !!element.required,\n\t\t\t\tvalid: !invalid,\n\t\t\t\tinvalidReason: element.invalidReason || '',\n\t\t\t};\n\t\t}\n\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\t}, [dispatch, fields, stepTemplate, summary.initialized]);\n\n\tconst fieldChangeHandler = (event: CustomFormFieldState): void => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t};\n\n\tif (!step) return null;\n\tconst enquiryTopic = summary.steps[stepTemplate]['enquiry_topic'] ? summary.steps[stepTemplate]['enquiry_topic'] : undefined;\n\tconst targetGroup = summary.steps[stepTemplate]['target_group'] ? summary.steps[stepTemplate]['target_group'] : undefined;\n\n\tconst attributeOBJ = (item: any) => {\n\t\treturn {\n\t\t\tfield: item,\n\t\t\tfieldErrors: stepErrors,\n\t\t\tonFieldChange: (e: any) => fieldChangeHandler(e),\n\t\t};\n\t};\n\n\treturn (\n\t\t
\n\t\t\t{/* Two select boxes like on here: https://www.wolf.eu/service/kundendienstbeauftragung/ */}\n\t\t\t{enquiryTopic && }\n\t\t\t{targetGroup && }\n\t\t
\n\t);\n};\n\nexport default memo(MainEnquiry);\n","import React, { memo, useEffect, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { CustomSelectType, CustomSelectTypeOptions, FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport CustomFormField from '../../FormControls/CustomFormField';\nimport { getFormControlInitialState, getFormSummaryField } from '../../utils';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\n\nconst ProductCategory: React.FC = ({ onStepControlsChange, data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\tconst step = useSelector(currentStepSelector) as FormStep<'main'>;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst stepErrors = summary.validationErrors[step.stepTemplate];\n\tconst mainField = step.stepData.fields.main;\n\n\tconst fields: {\n\t\tproductCategory: CustomFormFieldState | undefined;\n\t\tproductRelated: CustomFormFieldState | undefined;\n\t\tserialNumber: CustomFormFieldState | undefined;\n\t\torderNumber: CustomFormFieldState | undefined;\n\t\tinstallationYear: CustomFormFieldState | undefined;\n\t} = useMemo(() => {\n\t\treturn {\n\t\t\tproductCategory: getFormControlInitialState('product_category', mainField),\n\t\t\tproductRelated: getFormControlInitialState('product_related', mainField),\n\t\t\tserialNumber: getFormControlInitialState('serial_number', mainField),\n\t\t\torderNumber: getFormControlInitialState('order_number', mainField),\n\t\t\tinstallationYear: getFormControlInitialState('installation_year', mainField),\n\t\t};\n\t}, [mainField]);\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\n\t\t// fill in state with initial field values and validity\n\t\tfor (const [key, element] of Object.entries(fields)) {\n\t\t\tif (!element || !element.name) continue;\n\n\t\t\tconst invalid = element.value === '' && element.required === true;\n\t\t\tinitialData[element.name] = {\n\t\t\t\tname: element.name as string,\n\t\t\t\toriginalField: element.originalField,\n\t\t\t\tvalue: element.value,\n\t\t\t\trequired: !!element.required,\n\t\t\t\tinvalidReason: element.invalidReason || '',\n\t\t\t\tvalid: !invalid,\n\t\t\t};\n\t\t}\n\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\t}, [dispatch, fields, stepTemplate, summary.initialized]);\n\n\tconst fieldChangeHandler = (event: CustomFormFieldState): void => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t};\n\n\tconst categoryChangeHandler = (selectField: CustomFormFieldState): void => {\n\t\tselectField.value; // heizsysteme\n\t\tconst field = selectField.originalField as CustomSelectType;\n\t\tconst groupItem = field.optionsGroup\n\t\t\t?.map((o) => o.options)\n\t\t\t?.find((g) => {\n\t\t\t\tif (!g) return undefined;\n\t\t\t\tconst exists = g.findIndex((o) => o.value === selectField.value);\n\t\t\t\treturn exists > -1 ? g[exists] : undefined;\n\t\t\t});\n\n\t\tconst optionItems: CustomSelectTypeOptions[] | undefined = groupItem && groupItem.filter((g) => g.value === selectField.value);\n\t\tif (!optionItems) return;\n\n\t\t// get the list of form controls which become required, now that the product category has been chosen\n\t\t// this list is in the data feed\n\t\tconst additionalControls: CustomSelectTypeOptions['requiredAdditionalControls'] = optionItems[0].requiredAdditionalControls || [];\n\n\t\t// handle required state for serial and order numbers\n\t\t// ...\n\n\t\t// get controls from redux\n\t\tconst relatedProductField = getFormSummaryField(summary, step.stepTemplate, 'product_related');\n\t\tconst serialNumberField = getFormSummaryField(summary, step.stepTemplate, 'serial_number');\n\t\tconst orderNumberField = getFormSummaryField(summary, step.stepTemplate, 'order_number');\n\n\t\t// make a copy as redux vals are readonly\n\t\tconst newRelatedProductField = JSON.parse(JSON.stringify(relatedProductField)) as CustomFormFieldState;\n\t\tconst newSerialNumber = JSON.parse(JSON.stringify(serialNumberField)) as CustomFormFieldState;\n\t\tconst newOrderNumber = JSON.parse(JSON.stringify(orderNumberField)) as CustomFormFieldState;\n\n\t\t// require all 3 form controls for logic after\n\t\tif (!serialNumberField || !orderNumberField || !relatedProductField) return;\n\n\t\t// reset serial and order number\n\t\tnewSerialNumber.value = '';\n\t\tnewSerialNumber.required = false;\n\t\tnewSerialNumber.valid = true;\n\n\t\tnewOrderNumber.value = '';\n\t\tnewOrderNumber.required = false;\n\t\tnewOrderNumber.valid = true;\n\n\t\tif (additionalControls.length > 0) {\n\t\t\t// for each requiredAdditionalControls, get the form control and set the required=true\n\t\t\tadditionalControls.forEach((controlName) => {\n\t\t\t\tif (controlName === 'serial_number') {\n\t\t\t\t\tnewSerialNumber.value = '';\n\t\t\t\t\tnewSerialNumber.required = true;\n\t\t\t\t\tnewSerialNumber.valid = false;\n\t\t\t\t}\n\t\t\t\tif (controlName === 'order_number') {\n\t\t\t\t\tnewOrderNumber.value = '';\n\t\t\t\t\tnewOrderNumber.required = true;\n\t\t\t\t\tnewOrderNumber.valid = false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// build the list of options for the related product dropdown\n\t\tconst relatedProductOptions = field.options.filter((o) => o.groupParent === selectField.value);\n\t\t// inject options into control data - Note: they will be rendered before the originalField.options\n\t\tnewRelatedProductField.options = relatedProductOptions;\n\t\t// newRelatedProductField.value = '' // set the value back to empty\n\t\tnewRelatedProductField.value = relatedProductOptions.length > 0 ? relatedProductOptions[0].value : ''; // set the value to the first item\n\t\t// newRelatedProductField.valid = false // reset validity\n\t\tnewRelatedProductField.valid = newRelatedProductField.value !== ''; // update validity\n\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: [selectField, newRelatedProductField, newSerialNumber, newOrderNumber],\n\t\t\t}),\n\t\t);\n\t};\n\n\tif (!step) return null;\n\n\tconst sumStepTemp = (item: string) => summary.steps[stepTemplate][item];\n\n\tconst productCategory = sumStepTemp('product_category') ? sumStepTemp('product_category') : undefined;\n\tconst productRelated = sumStepTemp('product_related') ? sumStepTemp('product_related') : undefined;\n\tconst serialNumber = sumStepTemp('serial_number') ? sumStepTemp('serial_number') : undefined;\n\tconst orderNumber = sumStepTemp('order_number') ? sumStepTemp('order_number') : undefined;\n\tconst installationYear = sumStepTemp('installation_year') ? sumStepTemp('installation_year') : undefined;\n\n\tconst attributeOBJ = (item: any, handler: any) => {\n\t\treturn {\n\t\t\tfield: item,\n\t\t\tfieldErrors: stepErrors,\n\t\t\tonFieldChange: (e: any) => handler(e),\n\t\t};\n\t};\n\n\treturn (\n\t\t
\n\t\t\t{/* product category * */}\n\t\t\t{productCategory && }\n\n\t\t\t{/* product (related to product category selection!) (This will be in a JSON (not an Ajax request)) */}\n\t\t\t{productRelated && }\n\n\t\t\t{/* (* Note: Based on the main product category, the serial number and/or order number is/are required, or not) */}\n\t\t\t{serialNumber && }\n\t\t\t{orderNumber && }\n\t\t\t{installationYear && }\n\t\t
\n\t);\n};\n\nexport default memo(ProductCategory);\n","import React, { memo, useEffect, useMemo, useState } from 'react';\nimport { Box } from '@material-ui/core';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { CustomSelectTypeOptions, FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport CustomFormField from '../../FormControls/CustomFormField';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { getFormSummaryField } from '../../utils';\nimport { getFormControlInitialState } from '../../utils';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\n\n/** See keys of the fields object in src/wolf/components/organisms/o-heating-form/o-heating-form.data-utils.ts */\n// type CustomKeys = 'customerAddress' | 'checkboxes' | 'commissionData' | 'installerData';\n\nconst CustomerAddress: React.FC = ({ data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\tconst step = useSelector(currentStepSelector) as FormStep<'checkboxes' | 'commissionData' | 'customerAddress' | 'installerData'>;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst stepErrors = summary.validationErrors[step.stepTemplate];\n\n\tconst fields: {\n\t\tcommissionDataCheckbox: CustomFormFieldState | undefined;\n\t\tinstallerDataCheckbox: CustomFormFieldState | undefined;\n\t} = useMemo(() => {\n\t\treturn {\n\t\t\tcommissionDataCheckbox: getFormControlInitialState('commission_data_checkbox', step.stepData.fields.checkboxes),\n\t\t\tinstallerDataCheckbox: getFormControlInitialState('installer_data_checkbox', step.stepData.fields.checkboxes),\n\t\t};\n\t}, [step.stepData.fields.checkboxes]);\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\n\t\t// fill in state with initial field values and validity\n\t\tfor (const [key, element] of Object.entries(fields)) {\n\t\t\tif (!element || !element.name) continue;\n\n\t\t\tconst value = summary.steps.CUSTOMER_ADDRESS;\n\t\t\tlet elementValue = element.value;\n\t\t\tif (value[element.name] && value[element.name]?.value) {\n\t\t\t\telementValue = value[element.name]?.value;\n\t\t\t}\n\n\t\t\tconst invalid = element.value === '' && element.required === true;\n\t\t\tinitialData[element.name] = {\n\t\t\t\tname: element.name as string,\n\t\t\t\toriginalField: element.originalField,\n\t\t\t\tvalue: elementValue,\n\t\t\t\trequired: element.required,\n\t\t\t\tvalid: !invalid,\n\t\t\t\tinvalidReason: element.invalidReason || '',\n\t\t\t};\n\t\t}\n\n\t\tconst partners = summary.steps.MAIN_ENQUIRY.target_group?.originalField['options'];\n\t\tconst requiredPartners: Array = [];\n\t\tif (partners) {\n\t\t\tpartners.forEach((partner: CustomSelectTypeOptions) => {\n\t\t\t\tif (partner.options && partner.options[0].label === 'companyFieldRequired' && partner.options[0].value === 'true') {\n\t\t\t\t\tif (typeof partner.value === 'string') {\n\t\t\t\t\t\trequiredPartners.push(partner.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// build customer address fields\n\t\tstep.stepData.fields.customerAddress.forEach((element) => {\n\t\t\tif (!element || !element.name) return;\n\t\t\tconst item = getFormControlInitialState(element.name, step.stepData.fields.customerAddress);\n\t\t\tif (item && item.name === 'customer_company') {\n\t\t\t\titem.required = !!(summary.steps.MAIN_ENQUIRY.target_group && requiredPartners.includes(summary.steps.MAIN_ENQUIRY.target_group.value));\n\t\t\t}\n\n\t\t\tconst value = summary.steps.CUSTOMER_ADDRESS;\n\t\t\tif (item && value[item.name] && value[item.name]?.value) {\n\t\t\t\titem.value = value[item.name]?.value;\n\t\t\t}\n\n\t\t\tif (item) initialData[element.name] = item;\n\t\t});\n\n\t\t// build commission address fields\n\t\tstep.stepData.fields.commissionData.forEach((element) => {\n\t\t\tif (!element || !element.name) return;\n\t\t\tconst item = getFormControlInitialState(element.name, step.stepData.fields.commissionData);\n\t\t\tif (item && item.name === 'commission_company') {\n\t\t\t\titem.required = !!(summary.steps.MAIN_ENQUIRY.target_group && requiredPartners.includes(summary.steps.MAIN_ENQUIRY.target_group.value));\n\t\t\t}\n\n\t\t\tconst value = summary.steps.CUSTOMER_ADDRESS;\n\t\t\tif (item && value[item.name] && value[item.name]?.value) {\n\t\t\t\titem.value = value[item.name]?.value;\n\t\t\t}\n\n\t\t\tif (item) initialData[element.name] = item;\n\t\t});\n\n\t\t// build installer address fields\n\t\tstep.stepData.fields.installerData.forEach((element) => {\n\t\t\tif (!element || !element.name) return;\n\t\t\tconst item = getFormControlInitialState(element.name, step.stepData.fields.installerData);\n\t\t\tif (item) initialData[element.name] = item;\n\t\t});\n\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [\n\t\tdispatch,\n\t\tfields,\n\t\tstep.stepData.fields.commissionData,\n\t\tstep.stepData.fields.customerAddress,\n\t\tstep.stepData.fields.installerData,\n\t\tstepTemplate,\n\t\tsummary.initialized,\n\t\tsummary.steps.MAIN_ENQUIRY.target_group,\n\t]);\n\n\tconst handleCheckboxChange = (event: CustomFormFieldState, field?: 'checkbox1' | 'checkbox2') => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t\tif (!event.checked) return;\n\n\t\t// if the field is checked, populate the 2nd or 3rd form\n\t\t// checkbox1 is connected to commissionFields (step.stepData.fields.commissionData)\n\t\t// checkbox2 is connected to installerFields (step.stepData.fields.installerData)\n\n\t\t// @todo - refactor this one day?\n\t\tif (field === 'checkbox1') {\n\t\t\tconst allRelated: CustomFormFieldState[] = [];\n\t\t\tstep.stepData.fields.commissionData.forEach((f) => {\n\t\t\t\tconst reduxItem = getFormSummaryField(summary, stepTemplate, f.name);\n\t\t\t\tif (!reduxItem || !reduxItem.originalField.relatedField) return;\n\t\t\t\t// put the corresponding main address value in the commission address field\n\t\t\t\tconst { relatedField } = reduxItem.originalField;\n\t\t\t\t// get the related field data from the address\n\t\t\t\tconst relatedAddressFormControl = getFormSummaryField(summary, stepTemplate, relatedField);\n\t\t\t\tif (!relatedAddressFormControl) return;\n\n\t\t\t\t// only copy values which are valid\n\t\t\t\tif (relatedAddressFormControl.valid) {\n\t\t\t\t\tconst newRelatedItem = JSON.parse(JSON.stringify(reduxItem)) as CustomFormFieldState;\n\t\t\t\t\tnewRelatedItem.value = relatedAddressFormControl.value;\n\t\t\t\t\tnewRelatedItem.valid = relatedAddressFormControl.valid; // also update validity?\n\t\t\t\t\tallRelated.push(newRelatedItem);\n\t\t\t\t}\n\t\t\t});\n\t\t\tdispatch(\n\t\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\t\tstepTemplate,\n\t\t\t\t\tstepPayload: allRelated,\n\t\t\t\t}),\n\t\t\t);\n\t\t} else if (field === 'checkbox2') {\n\t\t\tconst allRelated: CustomFormFieldState[] = [];\n\t\t\tstep.stepData.fields.installerData.forEach((f) => {\n\t\t\t\tconst reduxItem = getFormSummaryField(summary, stepTemplate, f.name);\n\t\t\t\tif (!reduxItem || !reduxItem.originalField.relatedField) return;\n\t\t\t\t// put the corresponding main address value in the installer address field\n\t\t\t\tconst { relatedField } = reduxItem.originalField;\n\t\t\t\t// get the related field data from the address\n\t\t\t\tconst relatedAddressFormControl = getFormSummaryField(summary, stepTemplate, relatedField);\n\t\t\t\tif (!relatedAddressFormControl) return;\n\n\t\t\t\t// only copy values which are valid\n\t\t\t\tif (relatedAddressFormControl.valid) {\n\t\t\t\t\tconst newRelatedItem = JSON.parse(JSON.stringify(reduxItem)) as CustomFormFieldState;\n\t\t\t\t\tnewRelatedItem.value = relatedAddressFormControl.value;\n\t\t\t\t\tnewRelatedItem.valid = relatedAddressFormControl.valid; // also update validity?\n\t\t\t\t\tallRelated.push(newRelatedItem);\n\t\t\t\t}\n\t\t\t});\n\t\t\tdispatch(\n\t\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\t\tstepTemplate,\n\t\t\t\t\tstepPayload: allRelated,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t};\n\n\tconst fieldChangeHandler = (event: CustomFormFieldState): void => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t};\n\n\tif (!step) return null;\n\n\t// get the 2 checkbox fields\n\tconst sumStepTemp = (item: string) => (item ? summary.steps[stepTemplate][item] : undefined);\n\tconst commissionDataCheckbox = sumStepTemp('commission_data_checkbox') ? sumStepTemp('commission_data_checkbox') : undefined;\n\tconst installerDataCheckbox = sumStepTemp('installer_data_checkbox') ? sumStepTemp('installer_data_checkbox') : undefined;\n\n\t// get redux main address fields\n\tconst addressFields: CustomFormFieldState[] = [];\n\tstep.stepData.fields.customerAddress.forEach((f) => {\n\t\tif (!f.name) return;\n\t\tif (Object.keys(summary.steps[stepTemplate]).length === 0) return;\n\t\tconst item = getFormSummaryField(summary, stepTemplate, f.name);\n\t\titem && addressFields.push({ ...item, required: item?.originalField?.required || false });\n\t});\n\n\tconst commissionFields: CustomFormFieldState[] = [];\n\tstep.stepData.fields.commissionData.forEach((f) => {\n\t\tif (!f.name) return;\n\t\tif (Object.keys(summary.steps[stepTemplate]).length === 0) return;\n\t\tconst item = getFormSummaryField(summary, stepTemplate, f.name);\n\t\titem && commissionFields.push({ ...item, required: item?.originalField?.required || false });\n\t});\n\n\tconst installerFields: CustomFormFieldState[] = [];\n\tstep.stepData.fields.installerData.forEach((f) => {\n\t\tif (!f.name) return;\n\t\tif (Object.keys(summary.steps[stepTemplate]).length === 0) return;\n\t\tconst item = getFormSummaryField(summary, stepTemplate, f.name);\n\t\titem && installerFields.push({ ...item, required: item?.originalField?.required || false });\n\t});\n\n\tconst attributeOBJ = (field: any) => {\n\t\treturn { field, fieldErrors: stepErrors };\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t

{step.stepData.fieldTranslations.customerAddress}

\n\t\t\t\t\t
\n\t\t\t\t\t\t{/* 1. ALL Customer Address fields */}\n\t\t\t\t\t\t{addressFields?.map((field, key) => {\n\t\t\t\t\t\t\treturn fieldChangeHandler(e)} />;\n\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t{/* CHECKBOX 1 */}\n\t\t\t\t\t\t{commissionDataCheckbox && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t handleCheckboxChange(e, 'checkbox1')} />\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{/* CHECKBOX 2 */}\n\t\t\t\t\t\t{installerDataCheckbox && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t handleCheckboxChange(e, 'checkbox2')} />\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t

{step.stepData.fieldTranslations.commissionData}

\n\t\t\t\t\t
\n\t\t\t\t\t\t{/* 2. Commission Data (connected to checkbox 1) */}\n\t\t\t\t\t\t{commissionFields?.map((field, key) => {\n\t\t\t\t\t\t\treturn fieldChangeHandler(e)} />;\n\t\t\t\t\t\t})}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t

{step.stepData.fieldTranslations.installerData}

\n\t\t\t\t\t
\n\t\t\t\t\t\t{/* 3. Installer Data (connected to checkbox 2) */}\n\t\t\t\t\t\t{installerFields?.map((field, key) => {\n\t\t\t\t\t\t\treturn fieldChangeHandler(e)} />;\n\t\t\t\t\t\t})}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\nexport default memo(CustomerAddress);\n","import React, { memo, useEffect, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { getFormControlInitialState } from '../../utils';\nimport CustomFormField from '../../FormControls/CustomFormField';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\n\nconst AdditionalInformation: React.FC = ({ data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\tconst step = useSelector(currentStepSelector) as FormStep<'main'>;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst stepErrors = summary.validationErrors[step.stepTemplate];\n\n\tconst fields: {\n\t\terrorCode: CustomFormFieldState | undefined;\n\t\tdisorder: CustomFormFieldState | undefined;\n\t\twolfService: CustomFormFieldState | undefined;\n\t\tappointmentWith: CustomFormFieldState | undefined;\n\t\tappointmentTime: CustomFormFieldState | undefined;\n\t\terrorDescription: CustomFormFieldState | undefined;\n\t} = useMemo(() => {\n\t\treturn {\n\t\t\terrorCode: getFormControlInitialState('error_code', step.stepData.fields.main),\n\t\t\tdisorder: getFormControlInitialState('disorder', step.stepData.fields.main),\n\t\t\twolfService: getFormControlInitialState('wolf_service_checkbox', step.stepData.fields.main),\n\t\t\tappointmentWith: getFormControlInitialState('appointment_with', step.stepData.fields.main),\n\t\t\tappointmentTime: getFormControlInitialState('appointment_time', step.stepData.fields.main),\n\t\t\terrorDescription: getFormControlInitialState('error_description', step.stepData.fields.main),\n\t\t};\n\t}, [step.stepData.fields.main]);\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\n\t\t// fill in state with initial field values and validity\n\t\tfor (const [key, element] of Object.entries(fields)) {\n\t\t\tif (!element || !element.name) continue;\n\n\t\t\tconst invalid = element.value === '' && element.required === true;\n\t\t\tinitialData[element.name] = {\n\t\t\t\tname: element.name as string,\n\t\t\t\toriginalField: element.originalField,\n\t\t\t\tvalue: element.value,\n\t\t\t\trequired: !!element.required,\n\t\t\t\tvalid: !invalid,\n\t\t\t\tinvalidReason: element.invalidReason || '',\n\t\t\t};\n\t\t}\n\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\t}, [dispatch, fields, stepTemplate, summary.initialized]);\n\n\tconst fieldChangeHandler = (event: CustomFormFieldState): void => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t};\n\n\tif (!step) return null;\n\n\tconst allFields: CustomFormFieldState[] = [];\n\tstep.stepData.fields.main.forEach((f) => {\n\t\tif (!f.name) return;\n\t\tif (Object.keys(summary.steps[stepTemplate]).length === 0) return;\n\t\tconst item = summary.steps[stepTemplate][f.name] ? summary.steps[stepTemplate][f.name] : undefined;\n\t\titem && allFields.push(item);\n\t});\n\n\treturn (\n\t\t
\n\t\t\t{allFields?.map((field, key) => {\n\t\t\t\treturn fieldChangeHandler(e) }} />;\n\t\t\t})}\n\t\t
\n\t);\n};\n\nexport default memo(AdditionalInformation);\n","import React, { memo } from 'react';\nimport { formatBytes } from '../../../utils';\nimport { CustomFormFieldState } from '../../../FormControls/CustomFormField/CustomFormField';\n\ntype FileDetailsProps = {\n\tfileNameLabel: string;\n\tfileTypeLabel: string;\n\tfileSizeLabel: string;\n\tfileDetails: CustomFormFieldState['fileDetails'];\n};\nconst FileDetails: React.FC = (props: FileDetailsProps) => {\n\tconst { fileNameLabel, fileTypeLabel, fileSizeLabel, fileDetails } = props;\n\n\tif (!fileDetails) return null;\n\treturn (\n\t\t
\n\t\t\t
{fileNameLabel}:
\n\t\t\t
{fileDetails?.fileName || ''}
\n\t\t\t
{fileTypeLabel}:
\n\t\t\t
{fileDetails?.fileType}
\n\t\t\t
{fileSizeLabel}:
\n\t\t\t
{formatBytes(fileDetails?.fileSize)}
\n\t\t
\n\t);\n};\nexport default memo(FileDetails);\n","import React, { memo } from 'react';\n\ntype AlertProps = { alert: string };\n\nconst AlertBox: React.FC = ({ alert }: AlertProps) => {\n\treturn (\n\t\t
\n\t\t\t{/* */}\n\t\t\t

{alert}

\n\t\t
\n\t);\n};\nexport default memo(AlertBox);\n","import React, { memo, useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { getFileslotId } from '../../utils';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport FileDetails from './FileDetails';\nimport AlertBox from './AlertBox';\nimport IconRenderer from 'global/react-mui/atoms/IconRenderer';\nimport Button from 'global/react-mui/atoms/Button';\n\nconst FileAttachments: React.FC = ({ onStepControlsChange, data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\n\tconst step = useSelector(currentStepSelector) as FormStep<'main'>;\n\tconst translation = step?.stepData?.fieldTranslations;\n\tconst uploadSettings = step?.stepData?.fileUploadData;\n\n\t// check data spec for if at least one file is required for the step to be considered valid or not\n\tlet minFilesRequired = 0;\n\tif (uploadSettings?.requiresAtLeastOneFile === true) minFilesRequired = 1;\n\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst currentFiles = Object.values(summary.steps[stepTemplate]);\n\n\tconst fileAddError = currentFiles && currentFiles.length ? currentFiles[currentFiles.length - 1]?.invalidReason || '' : '';\n\tconst [fileSlots, setFileSlots] = useState(\n\t\t[...new Array(currentFiles.length)].map((c) => {\n\t\t\treturn 'coffee';\n\t\t}),\n\t);\n\n\tconst toggleFileSlot = (mode: 'add' | 'remove', event?: React.MouseEvent): void => {\n\t\tevent && event.preventDefault();\n\t\tmode === 'add' ? setFileSlots([...fileSlots, 'coffee']) : setFileSlots([...fileSlots.splice(-1)]);\n\t};\n\n\tconst getFileDetailsAtSlotIndex = (index: number): CustomFormFieldState['fileDetails'] | undefined => {\n\t\tif (index >= 0 && currentFiles.length > index) {\n\t\t\treturn currentFiles[index]?.fileDetails;\n\t\t}\n\t};\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: [],\n\t\t\t}),\n\t\t);\n\n\t\t// set validitiy manually\n\t\tlet validity = true;\n\t\tif (currentFiles.length === 0 && minFilesRequired > 0) validity = false;\n\t\tdispatch(\n\t\t\tstepsActions.declareStepValidity({\n\t\t\t\tstepTemplate,\n\t\t\t\tvalidity,\n\t\t\t}),\n\t\t);\n\t}, [currentFiles.length, dispatch, minFilesRequired, stepTemplate, summary.initialized]);\n\n\tconst removeFileUpload = (event: React.MouseEvent, fileIndex: number): void => {\n\t\tevent.preventDefault();\n\t\tconst id = getFileslotId(fileIndex);\n\t\tconst fileInput = document.getElementById(id) as HTMLInputElement;\n\t\tif (fileInput) {\n\t\t\t// reset the actual file input to empty\n\t\t\tfileInput.value = '';\n\t\t\t// update redux\n\t\t\tconst newFilesList = [...Object.values(summary.steps[stepTemplate])];\n\t\t\tnewFilesList.splice(newFilesList.length - 1, 1);\n\n\t\t\tdispatch(\n\t\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\t\tstepTemplate,\n\t\t\t\t\tstepPayload: newFilesList as any,\n\t\t\t\t\trefreshSummary: true,\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\t// set validitiy manually\n\t\t\tlet validity = true;\n\t\t\tif ((newFilesList as Array).length === 0 && minFilesRequired > 0) validity = false;\n\t\t\tdispatch(\n\t\t\t\tstepsActions.declareStepValidity({\n\t\t\t\t\tstepTemplate,\n\t\t\t\t\tvalidity,\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\t// finally remove a file slot\n\t\t\ttoggleFileSlot('remove');\n\t\t}\n\t};\n\n\tconst toggleFixedInput = (index: number) => {\n\t\tconst id = getFileslotId(index);\n\t\tdocument.getElementById(id)?.click();\n\t};\n\n\tconst shouldShowAddFileButton = (): boolean => {\n\t\treturn uploadSettings && Number.isInteger(uploadSettings.maxFileSlots) ? uploadSettings.maxFileSlots > currentFiles.length : false;\n\t};\n\n\tconst getAddButtonDisabledState = (): boolean => {\n\t\t// check current file error\n\t\tif (fileAddError) return true;\n\n\t\t// check if latest file has been added yet\n\t\tif (fileSlots.length > currentFiles.length) return true;\n\n\t\t// haven't added a file yet so enable it\n\t\tif (currentFiles.length === 0) return false;\n\n\t\t// const fileChosen = getFileDetailsAtSlotIndex(currentFiles.length - 1);\n\t\t// if (!fileChosen) return true;\n\t\treturn false;\n\t};\n\n\treturn (\n\t\t
\n\t\t\t{fileSlots?.map((file, fileIndex) => {\n\t\t\t\tconst fileChosen = getFileDetailsAtSlotIndex(fileIndex);\n\t\t\t\treturn (\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t toggleFixedInput(fileIndex)}\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t\t\tdisabled={fileSlots.length - 1 !== fileIndex}\n\t\t\t\t\t\t\t\tclassName={'file-choose'}>\n\t\t\t\t\t\t\t\t{fileChosen ? translation?.changeFile : translation?.chooseAFile}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{fileChosen && fileSlots?.length > 0 && fileSlots?.length - 1 === fileIndex && (\n\t\t\t\t\t\t\t\t removeFileUpload(e, fileIndex)}>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t{fileChosen && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t})}\n\n\t\t\t{fileAddError && }\n\n\t\t\t{shouldShowAddFileButton() && (\n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t);\n};\n\nexport default memo(FileAttachments);\n","import React, { memo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { v4 as uuidv4 } from 'uuid';\nimport { formSummarySelector } from '../../../../store/modules/steps/selectors';\nimport { CustomSelectType, FormControlType, FormStep, StepsState } from '../../../../model/global';\nimport { getFormSummaryField } from '../../../utils';\nimport { CustomFormFieldState } from '../../../FormControls/CustomFormField/CustomFormField';\n\ntype Props = {\n\tsliceKeyName: string;\n\tsliceTitle: string;\n\tformFieldsList: FormControlType[];\n\ttheStep: FormStep;\n};\n\nconst ResumeSlice: React.FC = ({ sliceKeyName, sliceTitle, formFieldsList, theStep }) => {\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\t// const step = useSelector(currentStepSelector) as FormStep<'main'> // used for translations\n\n\tconst getSummaryFieldValue = (field: CustomFormFieldState): string => {\n\t\tlet value = '';\n\t\tswitch (field.originalField.fieldType) {\n\t\t\tcase 'select': {\n\t\t\t\t// get the value from the options\n\t\t\t\tif (field.options && field.options.length > 0) {\n\t\t\t\t\tconst val1 = field.options.find((f) => f.value === field.value);\n\t\t\t\t\tif (val1) value = (val1.label || '').toString();\n\t\t\t\t} else if ((field.originalField as CustomSelectType).optionsGroup && (field.originalField as CustomSelectType).optionsGroup.length > 0) {\n\t\t\t\t\t// crunch the multidimensional array into a single one\n\t\t\t\t\tconst group = (field.originalField as CustomSelectType).optionsGroup.flatMap((o) => o.options).filter((e) => e);\n\t\t\t\t\tconst optionSelected = group.find((o) => o?.value === field.value);\n\t\t\t\t\tif (optionSelected) {\n\t\t\t\t\t\t// take the label for display purposes\n\t\t\t\t\t\tvalue = optionSelected.label;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// as a backup, use the raw value\n\t\t\t\t\t\tvalue = field.value;\n\t\t\t\t\t}\n\t\t\t\t} else if ((field.originalField as CustomSelectType).options && (field.originalField as CustomSelectType).options.length > 0) {\n\t\t\t\t\tconst val3 = (field.originalField as CustomSelectType).options.find((f) => f.value === field.value);\n\t\t\t\t\tif (val3) value = (val3.label || '').toString();\n\t\t\t\t} else {\n\t\t\t\t\tvalue = field.value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'checkbox': {\n\t\t\t\t// check if is checked. Return something like 'checked' or 'unchecked'\n\t\t\t\tvalue = field.checked ? theStep.stepData.fieldTranslations.checked : theStep.stepData.fieldTranslations.unchecked;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'file': {\n\t\t\t\t// return something like 'attached filed'\n\t\t\t\tvalue = theStep.stepData.fieldTranslations.attachedField;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tvalue = field.value || '-';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn value || '';\n\t};\n\n\treturn (\n\t\t
\n\t\t\t
{sliceTitle}
\n\t\t\t
\n\t\t\t\t{formFieldsList?.map((fieldControl) => {\n\t\t\t\t\t// get the current value from redux\n\t\t\t\t\tconst item = getFormSummaryField(summary, theStep.stepTemplate, fieldControl.name);\n\t\t\t\t\tif (!item) return;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{item.originalField.title || item.name}\n\t\t\t\t\t\t\t

{getSummaryFieldValue(item)}

\n\t\t\t\t\t\t
\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default memo(ResumeSlice);\n","import React, { memo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport { formSummarySelector, stepsSelector } from '../../../store/modules/steps/selectors';\nimport { translationsSelector } from '../../../store/modules/translations/selectors';\nimport { StepsState, StepTemplate } from '../../../model/global';\nimport IconRenderer from 'global/react-mui/atoms/IconRenderer';\nimport ResumeSlice from './ResumeSlice';\n\nconst FormStepSummary: React.FC = () => {\n\tconst FILE_ATTACHMENTS: StepTemplate = 'FILE_ATTACHMENTS';\n\tconst dispatch = useDispatch();\n\tconst allSteps = useSelector(stepsSelector).steps;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst filesList = Object.values(summary.steps[FILE_ATTACHMENTS] || {});\n\tconst { noFiles, fileLabel } = useSelector(translationsSelector);\n\n\tconst jumpToStep = (event: React.MouseEvent, stepIndex: number): void => {\n\t\tevent && event.preventDefault();\n\t\tdispatch(stepsActions.setRequestedStep(stepIndex));\n\t};\n\n\treturn (\n\t\t\n\t\t\t{allSteps?.map((theStep, stepIndex) => {\n\t\t\t\tif (theStep.stepTemplate === 'FORM_SUMMARY') return null; // ignore summary fields!\n\t\t\t\treturn (\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{theStep.stepData.fieldTranslations.stepText} {stepIndex + 1}: {theStep.stepTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t jumpToStep(e, stepIndex)}>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{/* apply a specific resume slice for file uploads, since they are structured differently and dynamic */}\n\t\t\t\t\t\t{theStep?.stepTemplate === FILE_ATTACHMENTS ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{filesList.length === 0 ? (\n\t\t\t\t\t\t\t\t\t
{noFiles || ''}
\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tfilesList?.map((f, fIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t{fileLabel}: {f?.value || ''}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tObject.entries(theStep?.stepData?.fields)?.map(([fieldsKeyName, formFields], fieldMapIndex) => {\n\t\t\t\t\t\t\t\t// loop through each field\n\t\t\t\t\t\t\t\t// build a custom list of form fields to be displayed on this resume slice,\n\t\t\t\t\t\t\t\t// excluding one's which should not show in the summary\n\t\t\t\t\t\t\t\tconst formFieldsList = formFields.filter((f) => !f.excludeFromSummary);\n\t\t\t\t\t\t\t\tif (formFieldsList.length === 0) return null;\n\t\t\t\t\t\t\t\tconst resumeSliceTitle = theStep.stepData.fieldTranslations[fieldsKeyName] || '';\n\t\t\t\t\t\t\t\tconst sliceKeyName = fieldsKeyName + fieldMapIndex.toString();\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t})}\n\t\t
\n\t);\n};\n\nexport default memo(FormStepSummary);\n","import React, { memo, useEffect, useMemo } from 'react';\nimport { makeStyles } from '@material-ui/core';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { currentStepSelector, formSummarySelector } from '../../../store/modules/steps/selectors';\nimport { FormStep, FormStepProps, StepsState } from '../../../model/global';\nimport CustomFormField from '../../FormControls/CustomFormField';\nimport { getFormControlInitialState } from '../../utils';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport FormStepSummary from '../../StepComponents/FormStepSummary';\n\nconst FormSummary: React.FC = ({ onStepControlsChange, data: { stepTemplate } }) => {\n\tconst dispatch = useDispatch();\n\tconst classes = useStyles();\n\tconst step = useSelector(currentStepSelector) as FormStep<'main'>;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\tconst stepErrors = summary.validationErrors[step.stepTemplate];\n\n\tconst fields: {\n\t\ttermsCheckbox: CustomFormFieldState | undefined;\n\t\tprivacyCheckbox: CustomFormFieldState | undefined;\n\t} = useMemo(() => {\n\t\treturn {\n\t\t\ttermsCheckbox: getFormControlInitialState('terms_checkbox', step.stepData.fields.main),\n\t\t\tprivacyCheckbox: getFormControlInitialState('privacy_checkbox', step.stepData.fields.main),\n\t\t};\n\t}, [step.stepData.fields.main]);\n\n\t// initialise the step data once\n\tuseEffect(() => {\n\t\t// don't re-init fields\n\t\tif (summary.initialized[stepTemplate]) return;\n\n\t\tconst initialData: Record = {};\n\n\t\t// fill in state with initial field values and validity\n\t\tfor (const [key, element] of Object.entries(fields)) {\n\t\t\tif (!element || !element.name) continue;\n\n\t\t\t// @todo - use a util for the below, like getFormControlInitialState() ?\n\t\t\tconst invalid = element.value === '' && element.required === true;\n\t\t\tinitialData[element.name] = {\n\t\t\t\tname: element.name as string,\n\t\t\t\toriginalField: element.originalField,\n\t\t\t\tvalue: element.value,\n\t\t\t\trequired: !!element.required,\n\t\t\t\tvalid: !invalid,\n\t\t\t\tinvalidReason: element.invalidReason || '',\n\t\t\t};\n\t\t\tif (element.originalField.fieldType === 'checkbox') {\n\t\t\t\tinitialData[element.name]['checked'] = !!element.checked;\n\t\t\t\tif (element.required && !element.checked) {\n\t\t\t\t\tinitialData[element.name]['valid'] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdispatch(\n\t\t\tstepsActions.initializeStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: initialData,\n\t\t\t\tinitialize: true,\n\t\t\t}),\n\t\t);\n\t}, [dispatch, fields, stepTemplate, summary.initialized]);\n\n\tconst fieldChangeHandler = (event: CustomFormFieldState): void => {\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: event,\n\t\t\t}),\n\t\t);\n\t};\n\n\tif (!step) return null;\n\n\tconst termsCheckbox = summary.steps[stepTemplate]['terms_checkbox'] ? summary.steps[stepTemplate]['terms_checkbox'] : undefined;\n\tconst privacyCheckbox = summary.steps[stepTemplate]['privacy_checkbox'] ? summary.steps[stepTemplate]['privacy_checkbox'] : undefined;\n\n\treturn (\n\t\t
\n\t\t\t\n\n\t\t\t
\n\t\t\t\t{termsCheckbox && (\n\t\t\t\t\t fieldChangeHandler(e)}>\n\t\t\t\t)}\n\t\t\t\t{privacyCheckbox && (\n\t\t\t\t\t fieldChangeHandler(e)}>\n\t\t\t\t)}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default memo(FormSummary);\n\nconst useStyles = makeStyles((theme) => ({\n\tsummaryWrapper: {\n\t\twidth: 'fit-content',\n\t\tmargin: '0 auto',\n\t\t// width: '90%',\n\t\t// margin: '0 auto',\n\t},\n}));\n","import React, { memo, useEffect } from 'react';\nimport { FormStep, FormStepInternalState, StepsState } from '../../../model/global';\nimport MainEnquiry from '../../FormSteps/MainEnquiry';\nimport ProductCategory from '../../FormSteps/ProductCategory';\nimport CustomerAddress from '../../FormSteps/CustomerAddress';\nimport AdditionalInformation from '../../FormSteps/AdditionalInformation';\nimport FileAttachments from '../../FormSteps/FileAttachments';\nimport FormSummary from '../../FormSteps/FormSummary';\nimport { useValidateStepQuery } from '../../../store/modules/services/validateStepApi/hooks';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { validateStep } from '../../../store/modules/steps/thunks';\nimport { formSummarySelector } from '../../../store/modules/steps/selectors';\n\ninterface Props {\n\tstep: FormStep;\n}\nconst FormStepContent: React.FC = ({ step }) => {\n\tconst dispatch = useDispatch();\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\n\tconst handleStepControlsChange = (stepFields: FormStepInternalState['fields'], stepTemplate: FormStep['stepTemplate']): void => {\n\t\t// @todo - handle file fields?\n\t};\n\n\tconst renderStep = (step: FormStep): JSX.Element | undefined => {\n\t\tswitch (step.stepTemplate) {\n\t\t\tcase 'MAIN_ENQUIRY':\n\t\t\t\treturn handleStepControlsChange(e, step.stepTemplate)}>;\n\t\t\tcase 'PRODUCT_CATEGORY':\n\t\t\t\treturn handleStepControlsChange(e, step.stepTemplate)}>;\n\t\t\tcase 'CUSTOMER_ADDRESS':\n\t\t\t\treturn handleStepControlsChange(e, step.stepTemplate)}>;\n\t\t\tcase 'ADDITIONAL_INFORMATION':\n\t\t\t\treturn (\n\t\t\t\t\t handleStepControlsChange(e, step.stepTemplate)}>\n\t\t\t\t);\n\t\t\tcase 'FILE_ATTACHMENTS':\n\t\t\t\treturn handleStepControlsChange(e, step.stepTemplate)}>;\n\t\t\tcase 'FORM_SUMMARY':\n\t\t\t\treturn handleStepControlsChange(e, step.stepTemplate)}>;\n\t\t\tdefault:\n\t\t\t\treturn undefined;\n\t\t}\n\t};\n\treturn <>{renderStep(step) || null};\n};\n\nexport default memo(FormStepContent);\n","import React, { memo, useState } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport { getFileslotId, checkFileValidity } from '../../utils';\nimport { CustomFormFieldState } from '../../FormControls/CustomFormField/CustomFormField';\nimport { FileUploadData, FormStep } from '../../../model/global';\ninterface Props {\n\tfileUploadData: FileUploadData | undefined;\n\tstepTemplate: FormStep['stepTemplate'];\n}\n\nconst FormFiles: React.FC = ({ fileUploadData, stepTemplate }) => {\n\tconst dispatch = useDispatch();\n\tconst [uploads, setUploads] = useState([]);\n\tconst changeHandler = (event: React.ChangeEvent, fileIndex: number) => {\n\t\tif (!(event.target.files && event.target.files.length > 0)) return;\n\n\t\tconst theFile = event.target.files[0];\n\t\tconst validationError = checkFileValidity(theFile, uploads, fileUploadData || ({} as FileUploadData));\n\n\t\t// update field value\n\t\tconst {\n\t\t\t//name,\n\t\t\t//value,\n\t\t\trequired,\n\t\t\tvalidity: { valid },\n\t\t} = event.target;\n\t\tconst newFile: CustomFormFieldState = {\n\t\t\tname: `file-${fileIndex + 1}`,\n\t\t\t// value: newUploads.map(f => f.name), // todo...\n\t\t\tvalue: theFile.name,\n\t\t\trequired,\n\t\t\tvalid: validationError === '',\n\t\t\tinvalidReason: validationError,\n\t\t\toriginalField: Object.assign({}, fileUploadData || {}) as any,\n\t\t\tfileDetails: {\n\t\t\t\tfileName: theFile.name,\n\t\t\t\tfileSize: theFile.size,\n\t\t\t\tfileType: theFile.type,\n\t\t\t\tfileIndex: fileIndex,\n\t\t\t\tlastModified: theFile.lastModified,\n\t\t\t},\n\t\t};\n\n\t\t// update file at index or insert a new one\n\t\tconst updating = uploads.length >= fileIndex + 1;\n\n\t\tlet newUploads: CustomFormFieldState[];\n\n\t\tif (updating) {\n\t\t\tnewUploads = [...uploads];\n\t\t\tnewUploads[fileIndex] = newFile;\n\t\t} else newUploads = [...uploads, newFile];\n\t\tsetUploads(newUploads);\n\n\t\tdispatch(\n\t\t\tstepsActions.updateStepPayloadValues({\n\t\t\t\tstepTemplate,\n\t\t\t\tstepPayload: newUploads,\n\t\t\t}),\n\t\t);\n\t};\n\n\tconst maxNumberOfFiles = fileUploadData ? fileUploadData.maxFileSlots : 10;\n\tconst required = fileUploadData ? !!fileUploadData.requiresAtLeastOneFile : false;\n\n\treturn (\n\t\t
\n\t\t\t{[...new Array(maxNumberOfFiles)].map((f, fileIndex) => {\n\t\t\t\tconst fileId = getFileslotId(fileIndex);\n\t\t\t\treturn (\n\t\t\t\t\t changeHandler(e, fileIndex)}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t})}\n\t\t
\n\t);\n};\n\nexport default memo(FormFiles);\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { stepsSelector, totalStepsSelector } from '../../store/modules/steps/selectors';\nimport FormStepTitle from '../StepComponents/FormStepTitle';\nimport FormStepContent from '../StepComponents/FormStepContent';\nimport FormFiles from '../StepComponents/FormFiles';\nimport { StepTemplate } from '../../model/global';\n\nconst FILE_ATTACHMENTS: StepTemplate = 'FILE_ATTACHMENTS';\n\nconst FormSteps: React.FC = () => {\n\tconst { steps, activeStepIndex: activeStep, formSubmitUrl } = useSelector(stepsSelector);\n\tconst totalSteps = useSelector(totalStepsSelector);\n\tconst fileStep = steps?.find((s) => s.stepTemplate === FILE_ATTACHMENTS);\n\tconst formFileOBJ = { fileUploadData: fileStep?.stepData?.fileUploadData, stepTemplate: FILE_ATTACHMENTS };\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t{steps?.map((step, stepIndex) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstepIndex === activeStep && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t{fileStep && }\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default FormSteps;\n","import Button from 'global/react-mui/atoms/Button';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { FormStep, StepsState } from '../../../model/global';\nimport { stepsActions } from '../../../store/modules/steps/reducer';\nimport { currentStepSelector, formSummarySelector, stepsSelector } from '../../../store/modules/steps/selectors';\nimport { submitForm, validateStep } from '../../../store/modules/steps/thunks';\nimport { translationsSelector } from '../../../store/modules/translations/selectors';\nimport { Box, CircularProgress } from '@material-ui/core';\n\nconst FormStepsNav: React.FC = () => {\n\tconst dispatch = useDispatch();\n\tconst { prevButtonText, nextButtonText, submitButtonText } = useSelector(translationsSelector);\n\tconst { activeStepIndex, requestedStepIndex, steps, formSubmitError } = useSelector(stepsSelector);\n\tconst [submitButtonShouldBeDisabled, setSubmitButtonShouldBeDisabled] = useState(false);\n\tconst currentStep = useSelector(currentStepSelector) as FormStep;\n\tconst summary = useSelector(formSummarySelector) as StepsState['formSummary'];\n\n\t// if last step, show submit button instead\n\tconst isSubmit = activeStepIndex >= steps.length - 1;\n\n\tconst goToStep = (direction: 'next' | 'prev') => {\n\t\tconst newStep = direction === 'prev' ? activeStepIndex - 1 : activeStepIndex + 1;\n\n\t\tif (newStep < 0) return;\n\t\tdispatch(stepsActions.setRequestedStep(newStep));\n\t\tif (direction === 'prev') return;\n\n\t\tconst validationUrl = currentStep?.stepData.validation.url;\n\t\tif (validationUrl) {\n\t\t\t// console.log('call validation API here...', validationUrl)\n\t\t\tdispatch(validateStep());\n\t\t} else {\n\t\t\t// do this if no validation URL?\n\t\t\t//console.log(\"entered here\")\n\t\t\tdispatch(stepsActions.declareStepValidity({ stepTemplate: currentStep?.stepTemplate, validity: true }));\n\t\t}\n\t};\n\n\tconst submitTheForm = () => {\n\t\tsetSubmitButtonShouldBeDisabled(true);\n\t\tdispatch(submitForm());\n\t};\n\n\tuseEffect(() => {\n\t\t// if going back, just go to step\n\t\tif (requestedStepIndex > -1 && requestedStepIndex < activeStepIndex) {\n\t\t\tdispatch(stepsActions.setActiveStep(requestedStepIndex));\n\t\t\treturn;\n\t\t}\n\n\t\tconst elem = document.getElementById('form-top');\n\t\tif (activeStepIndex > 0) {\n\t\t\tif (elem) setTimeout(() => elem.scrollIntoView({ behavior: 'smooth', block: 'start' }), 400);\n\t\t}\n\t}, [activeStepIndex, dispatch, requestedStepIndex]);\n\n\tuseEffect(() => {\n\t\t// if step is valid, go to step\n\t\tif (!currentStep || !currentStep.stepTemplate) return;\n\t\tif (\n\t\t\tsummary.validatedSteps[currentStep.stepTemplate] === true ||\n\t\t\t(currentStep.stepTemplate === 'FILE_ATTACHMENTS' && summary.validatedStepsHTML5[currentStep.stepTemplate])\n\t\t) {\n\t\t\tdispatch(stepsActions.setActiveStep(requestedStepIndex));\n\t\t}\n\t}, [currentStep, dispatch, requestedStepIndex, summary.validatedSteps, summary.validatedStepsHTML5]);\n\n\t// allow users to click submit after 30 secs\n\tuseEffect(() => {\n\t\tif (formSubmitError.length <= 0) return;\n\n\t\tconst result = setTimeout(function () {\n\t\t\tsetSubmitButtonShouldBeDisabled(false);\n\t\t\tdispatch(stepsActions.setFormSubmitError(''));\n\t\t}, 30000);\n\n\t\treturn () => clearTimeout(result);\n\t}, [formSubmitError, dispatch]);\n\n\tconst getNextButtonDisabledState = () => {\n\t\tconst isValid = summary.validatedStepsHTML5[currentStep.stepTemplate];\n\t\treturn !isValid;\n\t};\n\n\tconst getSubmitButtonDisabledState = () => {\n\t\tconst isValid = summary.validatedStepsHTML5[currentStep.stepTemplate];\n\t\treturn !isValid;\n\t};\n\n\tif (!currentStep) return null;\n\n\tconst disabled = isSubmit ? getSubmitButtonDisabledState() : getNextButtonDisabledState();\n\tconst tabIndex = isSubmit ? -1 : 0;\n\tconst btnText = isSubmit ? submitButtonText : nextButtonText;\n\n\treturn (\n\t\t
\n\t\t\t goToStep('prev'),\n\t\t\t\t\tdisabled: activeStepIndex === 0,\n\t\t\t\t\tvariant: 'outlined',\n\t\t\t\t\tsize: 'large',\n\t\t\t\t\tclassName: 'btn-step btn-prev',\n\t\t\t\t}}>\n\t\t\t\t{prevButtonText}\n\t\t\t\n\n\t\t\t submitTheForm() : (e) => goToStep('next')}\n\t\t\t\t{...{\n\t\t\t\t\ttabIndex,\n\t\t\t\t\tdisabled: submitButtonShouldBeDisabled ? submitButtonShouldBeDisabled : disabled,\n\t\t\t\t\tvariant: 'outlined',\n\t\t\t\t\tsize: 'large',\n\t\t\t\t\tclassName: 'btn-step btn-next',\n\t\t\t\t}}>\n\t\t\t\t{isSubmit && submitButtonShouldBeDisabled ? : btnText}\n\t\t\t\n\t\t
\n\t);\n};\n\nexport default FormStepsNav;\n","import React, { memo } from 'react';\nimport { OrganismHeatingFormProps } from '../../../model/global';\n\n// use welcome screen in data\ntype Props = OrganismHeatingFormProps['endScreen'];\n\nconst CompleteScreen: React.FC = (props) => {\n\tconst { headline, text, button } = props;\n\n\tReact.useEffect(() => {\n\t\tconst elem = document.getElementById('form-top');\n\t\tif (elem) setTimeout(() => elem.scrollIntoView({ behavior: 'smooth', block: 'start' }), 400);\n\t}, []);\n\t// removed logo because of pro-klima\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t

{headline?.text || ''}

\n\t\t\t\t

{text}

\n\t\t\t\t{button && button?.href && button?.href !== undefined && button?.href !== '' && button?.text && (\n\t\t\t\t\t\n\t\t\t\t\t\t{button?.text}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default memo(CompleteScreen);\n","import React, { memo } from 'react';\nimport { makeStyles } from '@material-ui/core';\n\ntype Props = {\n\tchildren: React.ReactNode;\n\thideAlert: () => void;\n};\nconst Alert: React.FC = ({ children, hideAlert }) => {\n\tconst classes = useStyles();\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t

{children}

\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default Alert;\n// export default memo(Alert);\n\nconst useStyles = makeStyles((theme) => ({\n\t// colours here if needed: src/wolf/components/molecules/m-alert/m-alert.styles.scss\n\n\talertWrapper: {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tzIndex: 10000,\n\t},\n}));\n","import React, { memo } from 'react';\nimport FormSteps from '../FormSteps';\nimport FormStepsNav from '../StepComponents/FormStepsNav';\nimport CompleteScreen from '../FormSteps/CompleteScreen';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { endScreenSelector, formSubmitErrorSelector, stepsSelector } from '../../store/modules/steps/selectors';\nimport Alert from './Alert';\nimport { stepsActions } from '../../store/modules/steps/reducer';\n\nconst ContentArea: React.FC = () => {\n\tconst dispatch = useDispatch();\n\tconst { formIsSubmitted } = useSelector(stepsSelector);\n\tconst submitError = useSelector(formSubmitErrorSelector);\n\tconst endScreen = useSelector(endScreenSelector);\n\n\tconst handleHideAlert = (): void => {\n\t\tdispatch(stepsActions.setFormSubmitError(''));\n\t};\n\t// removed logo because of pro-klima\n\treturn (\n\t\t
\n\t\t\t{submitError && {submitError}}\n\t\t\t
\n\t\t\t\t{formIsSubmitted ? (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default memo(ContentArea);\n","import React from 'react';\nimport MainLayout from '../../layout/MainLayout';\nimport Sidebar from '../../components/SidebarArea';\nimport ContentArea from '../../components/ContentArea';\n\nconst HeatingFormStepper = (): JSX.Element => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default HeatingFormStepper;\n","import React, { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { HEATING_FORM_DATA_ID } from '../constants';\nimport { translationsActions } from '../store/modules/translations/reducer';\nimport HeatingFormStepper from './HeatingFormStepper';\nimport { OrganismHeatingFormProps } from '../model/global';\nimport { stepsActions } from '../store/modules/steps/reducer';\n\nconst HeatingFormApp = (): JSX.Element => {\n\tconst dispatch = useDispatch();\n\t// const apiUrls = useSelector(stepsSelector);\n\n\tuseEffect(() => {\n\t\tconst data = document.getElementById(HEATING_FORM_DATA_ID) as HTMLScriptElement;\n\t\tif (data) {\n\t\t\tconst initdata = JSON.parse(data.innerText) as OrganismHeatingFormProps;\n\t\t\tdispatch(stepsActions.initApp(initdata));\n\t\t\tdispatch(translationsActions.initTranslations(initdata.translations));\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// if (!apiUrls) return <>Hola\n\treturn ;\n};\n\nexport default HeatingFormApp;\n","import React from 'react';\nimport { Provider } from 'react-redux';\nimport { CssBaseline, ThemeProvider } from '@material-ui/core';\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\nimport theme from '../../../../../global/react-mui/theme';\nimport store from './store';\nimport DateFnsUtils from '@date-io/date-fns';\nimport HeatingFormApp from './views/Main';\n\nexport default function Root(): JSX.Element {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import ControllerBase from '../../../../global/js/ControllerBase';\nimport { HeatingFormOutlet } from './o-heating-form.app';\n\ntype ComponentRefs = {\n\tapp: 'heating-form-app';\n};\nexport default class ControllerHeatingForm extends ControllerBase {\n\tprivate static readonly componentRefs: ComponentRefs = {\n\t\tapp: 'heating-form-app',\n\t};\n\n\tconstructor(element: HTMLElement) {\n\t\tsuper(element, [], Object.values(ControllerHeatingForm.componentRefs));\n\t\tthis.initApp();\n\t}\n\n\t/**\n\t * Render the components to the DOM\n\t * @returns void\n\t */\n\tprivate initApp(): void {\n\t\tconst domOutlet = this.domUtils.getRef(ControllerHeatingForm.componentRefs.app);\n\t\tif (domOutlet) {\n\t\t\tHeatingFormOutlet(domOutlet);\n\t\t}\n\t}\n}\n","/* eslint-disable react/no-render-return-value */\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from './react/index';\n\n/** The master component render outlet */\nexport const HeatingFormOutlet = (element: HTMLElement): void => {\n\tconst root = createRoot(element!);\n\troot.render();\n};\n"],"names":["DomServices","constructor","element","references","onDomElementChanged","Subject","parseStringToHtml","htmlAsString","parsedNode","DOMParser","parseFromString","body","firstChild","renderDomElement","ref","html","renderOnParent","refExists","this","$references","Object","prototype","hasOwnProperty","call","undefined","$element","innerHTML","domElementChanged","console","warn","appendRawHtmlToDomElement","node","position","htmlNode","insertAdjacentElement","replaceLastChildElementWithRawHtml","lastNode","childNodes","length","replaceChild","reference","next","parseDOMScriptTag","elementId","data","document","getElementById","JSON","parse","innerText","error","collectReferences","ignoredReferences","includedReferences","refs","Array","from","querySelectorAll","forEach","el","referenceName","dataset","includes","window","location","hostname","name","getRef","toggleElementState","control","newState","state","removeAttribute","setAttribute","renderDomElementInHTMLElement","InputClasses","InputServices","observedInputs","subscribeInputWithErrorRemovalOnInputChange","value","event","onChange","castEvent","target","label","previousElementSibling","classList","contains","errorClass","remove","input","errorMessage","nextElementSibling","add","mapInputEvent","addFocusToInput","inputName","querySelector","focus","observeElementEvents","inputEvent","inputToObserve$","fromEvent","pipe","map","subscribe","addErrorsToFieldset","errors","onErrorsUpdated","Error","keys","addOrRemoveFormValidationError","inputNameToFocus","firstErrorElement","scrollIntoView","showOrHide","errorMessageContainer","hiddenClass","ControllerBase","disableReferenceCollection","domUtils","inputUtils","dispatchCustomEvent","detail","bubbles","dispatchOnWindow","dispatchOnSpecificElement","customEvent","CustomEvent","dispatchEvent","validateStepApi","reducerPath","baseQuery","baseUrl","endpoints","builder","validateStep","query","step","endpoint","queryBuilder","useValidateStepQuery","FORM_FIELD_ID_PREFIX","getFormControlInitialState","fieldId","steps","isArray","find","id","invalid","required","originalField","valid","invalidReason","getFormSummaryField","summary","stepTemplate","controlName","getPrefixedFieldId","newId","replace","getFileslotId","index","fileId","toString","runAsyncValidation","url","stepPayload","URL","resp","fetch","method","credentials","stringify","json","submitFinalForm","payload","formData","_","thunkAPI","getState","activeIndex","activeStepIndex","stepSummary","formSummary","stepData","validation","values","e","fieldType","checked","submitForm","formSubmitUrl","FormData","key","elements","entries","fieldKey","field","formDataValue","fileDetails","fileIndex","theFile","files","append","buildFormSubmitPayload","stepsSlice","initialState","formSubmitError","requestedStepIndex","formIsSubmitted","MAIN_ENQUIRY","PRODUCT_CATEGORY","CUSTOMER_ADDRESS","ADDITIONAL_INFORMATION","FILE_ATTACHMENTS","FORM_SUMMARY","initialized","validationErrors","validatedSteps","validatedStepsHTML5","endScreen","headline","text","button","href","title","reducers","initApp","sort","a","b","stepOrder","setRequestedStep","setActiveStep","setFormSubmitError","initializeStepPayloadValues","initialize","updateStepPayloadValues","refreshSummary","stepIsValid","declareStepValidity","validity","extraReducers","addCase","fulfilled","success","rejected","message","stepsActions","actions","translationsSlice","initTranslations","translationsActions","rootReducer","translations","reducer","middleware","getDefaultMiddleware","concat","devTools","GridContainer","withStyles","theme","createStyles","props","Box","className","Content","forwardRef","SidebarArea","stepsSelector","currentStepSelector","active","totalStepsSelector","total","formSummarySelector","endScreenSelector","formSubmitErrorSelector","dispatch","stepIndex","activeLi","activeBadge","content","IconRenderer","icon","shape","size","color","viewbox","stepName","type","onClick","preventDefault","jumpToStep","stepTitle","memo","currentStep","totalSteps","stepIndicator","fractionTop","padStart","fractionBottom","ukPosition","stepInfo","helpButton","copy","translationsSelector","useStyles","makeStyles","formControl","margin","minWidth","formControlFull","selectEmpty","marginTop","spacing","breakpoints","down","colors","select","borderColor","validationWrapper","padding","fullWidth","validationError","classes","formRequiredField","validationMessageState","setValidationMessageState","renderOption","option","controlId","controlClasses","FormControl","join","InputLabel","htmlFor","shrink","Select","native","change","options","handleChange","inputProps","selectControl","hasCustomOptions","isGroup","optionsGroup","hasOriginalOptions","group","idx","renderGroup","renderControlOptions","FormHelperText","inputText","getHelperText","TextField","variant","style","marginLeft","marginRight","InputLabelProps","helperText","FormHelperTextProps","_field","handleTextFieldChange","multiline","minRows","maxRows","labelWrapper","marginBottom","fontSize","checkbox","fill","FormControlLabel","Checkbox","handleCheckboxChange","dangerouslySetInnerHTML","__html","fieldErrors","onFieldChange","fieldError","respWidthDefault","responsiveWidth","default","respWidthDesktop","desktop","customClasses","filter","c","sx","renderFormField","onStepControlsChange","stepErrors","fields","useMemo","enquiryTopic","main","targetGroup","useEffect","initialData","attributeOBJ","item","fieldChangeHandler","mainField","productCategory","productRelated","serialNumber","orderNumber","installationYear","sumStepTemp","handler","selectField","groupItem","o","g","exists","findIndex","optionItems","additionalControls","requiredAdditionalControls","relatedProductField","serialNumberField","orderNumberField","newRelatedProductField","newSerialNumber","newOrderNumber","relatedProductOptions","groupParent","commissionDataCheckbox","checkboxes","installerDataCheckbox","elementValue","partners","target_group","requiredPartners","partner","push","customerAddress","commissionData","installerData","allRelated","f","reduxItem","relatedField","relatedAddressFormControl","newRelatedItem","addressFields","commissionFields","installerFields","fieldTranslations","errorCode","disorder","wolfService","appointmentWith","appointmentTime","errorDescription","allFields","fileNameLabel","fileTypeLabel","fileSizeLabel","fileName","fileType","bytes","decimals","dm","i","Math","floor","log","parseFloat","pow","toFixed","formatBytes","fileSize","alert","translation","uploadSettings","fileUploadData","minFilesRequired","requiresAtLeastOneFile","currentFiles","fileAddError","fileSlots","setFileSlots","useState","toggleFileSlot","mode","splice","file","fileChosen","getFileDetailsAtSlotIndex","Button","click","toggleFixedInput","disabled","changeFile","chooseAFile","fileInput","newFilesList","removeFileUpload","boxProps","justifyContent","Number","isInteger","maxFileSlots","addAnotherFile","sliceKeyName","sliceTitle","formFieldsList","theStep","fieldControl","val1","optionSelected","flatMap","val3","unchecked","attachedField","getSummaryFieldValue","allSteps","filesList","noFiles","fileLabel","stepText","fIndex","fieldsKeyName","formFields","fieldMapIndex","excludeFromSummary","resumeSliceTitle","termsCheckbox","privacyCheckbox","summaryWrapper","width","renderStep","uploads","setUploads","maxNumberOfFiles","height","tabIndex","allowedContentTypes","maxFileSize","addError","uploadsList","some","lastModified","fileIsUnique","allowedContentType","t","toLowerCase","fileIsInvalidType","typeError","maxFileSizeBytes","filesizeExceedsLimit","checkFileValidity","newFile","assign","newUploads","changeHandler","activeStep","fileStep","s","formFileOBJ","action","encType","prevButtonText","nextButtonText","submitButtonText","submitButtonShouldBeDisabled","setSubmitButtonShouldBeDisabled","isSubmit","goToStep","direction","newStep","validationUrl","elem","setTimeout","behavior","block","result","clearTimeout","btnText","CircularProgress","children","hideAlert","alertWrapper","top","left","right","zIndex","submitError","MainLayout","initdata","Root","M","utils","ThemeProvider","CssBaseline","store","ControllerHeatingForm","super","componentRefs","domOutlet","app","render"],"sourceRoot":""}