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MAAQ,CAAC,QAAQ,SAAW,CAAC,MAAQ,IAAI,IAAM,MAAM,CAAC,KAAO,kCAAkC,SAAW,CAAC,MAAQ,IAAI,IAAM,KAAK,IAAM,WAAW,CAAC,KAAO,8BAA8B,MAAQ,MAAM,MAAQ,CAAC,OAAO,OAAO,SAAW,CAAC,MAAQ,IAAI,IAAM,QAAQ,CAAC,KAAO,MAAM,MAAQ,uBAAuB,SAAW,CAAC,MAAQ,IAAI,IAAM,QAAQ,SAAW,CAAC,KAAO,CAAC,MAAQ,IAAI,IAAM,KAAK,MAAQ,CAAC,MAAQ,IAAI,IAAM,OAAO,CAAC,KAAO,MAAM,MAAQ,KAAK,SAAW,CAAC,MAAQ,IAAI,IAAM,QAAQ,SAAW,CAAC,KAAO,CAAC,MAAQ,IAAI,IAAM,KAAK,MAAQ,CAAC,MAAQ,IAAI,IAAM,QAAQ,GAAK,8DAA8D,SAAU,IAC/xGC,EAAOC,QAAU,SAASC,GAAW,OAAOJ,EAAIK,OAAOD,EAAU,EACjEF,EAAOC,QAAQG,GAAK,8DACpBJ,EAAOC,QAAP,QAAyBD,EAAOC,O","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/molecules/m-finder-popup-form/m-finder-popup-form.controller.ts","webpack://@dgtls-pub/wolf-sb-integration/./src/wolf/components/molecules/m-alert/m-alert.template.twig"],"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 ControllerBase from '../../../../global/js/ControllerBase';\nimport { fromEvent, Observable, of, Subject } from 'rxjs';\nimport { catchError, map, takeUntil } from 'rxjs/operators';\nimport { fromFetch } from 'rxjs/fetch';\nimport { ModalFinderPopupFormResponseModel } from './m-finder-popup-form.model';\nimport { HttpActionResponse } from 'global/interfaces/http.interface';\nimport { ComponentEvents } from 'global/interfaces/component.interface';\n\nimport { MoleculeAlertProps } from '../m-alert/m-alert.data';\n\nconst alertTemplate = require('components/molecules/m-alert/m-alert.template.twig') as any;\n\nenum SubmitButtonUseCases {\n\tDisable,\n\tEnable,\n\tDone,\n}\n\nexport default class ControllerFinderPopupForm extends ControllerBase {\n\tprivate readonly componentRefs = {\n\t\talertWrapper: 'alertWrapper',\n\t\tformWrapper: 'formFinderWrapper',\n\t\tsubmitBtn: 'submitBtn',\n\t\tspinnerWrapper: 'spinnerWrapper',\n\t\tsubmitText: 'submitText',\n\t\tdoneWrapper: 'doneWrapper',\n\t};\n\n\tprivate componentEvents: ComponentEvents = {\n\t\tsuccess: '',\n\t\tfailure: '',\n\t};\n\n\t/** Subscription management */\n\tprivate _unsubscribeAll: Subject;\n\n\tprivate formUrl: string;\n\n\tconstructor(element: HTMLElement) {\n\t\tsuper(element);\n\n\t\tthis.init();\n\t\tthis.observeFormSubmissions();\n\t}\n\n\tprivate init() {\n\t\tthis._unsubscribeAll = new Subject();\n\t\twindow.addEventListener('unload', (e) => {\n\t\t\tthis._unsubscribeAll.next();\n\t\t\tthis._unsubscribeAll.complete();\n\t\t});\n\n\t\tthis.formUrl = this.$element.dataset.formurl;\n\n\t\tthis.componentEvents.success = this.$element.dataset.eventNameSuccess || '';\n\t\tthis.componentEvents.failure = this.$element.dataset.eventNameFailure || '';\n\t}\n\n\t/**\n\t * Returns the form html element\n\t * @returns HTMLFormElement\n\t */\n\tprivate getForm(): HTMLFormElement | undefined {\n\t\tconst form = this.$references[this.componentRefs.formWrapper];\n\t\tif (form) {\n\t\t\treturn form;\n\t\t}\n\t}\n\n\tprivate getSubmitButton(): HTMLElement | undefined {\n\t\tconst submitBtn = this.$references[this.componentRefs.submitBtn];\n\t\tif (submitBtn) {\n\t\t\treturn submitBtn;\n\t\t}\n\t}\n\n\tprivate getSpinnerWrapper(): HTMLElement | undefined {\n\t\tconst spinnerWrapper = this.$references[this.componentRefs.spinnerWrapper];\n\t\tif (spinnerWrapper) {\n\t\t\treturn spinnerWrapper;\n\t\t}\n\t}\n\n\tprivate getSubmitText(): HTMLElement | undefined {\n\t\tconst submitText = this.$references[this.componentRefs.submitText];\n\t\tif (submitText) {\n\t\t\treturn submitText;\n\t\t}\n\t}\n\n\tprivate getDoneWrapper(): HTMLElement | undefined {\n\t\tconst doneWrapper = this.$references[this.componentRefs.doneWrapper];\n\t\tif (doneWrapper) {\n\t\t\treturn doneWrapper;\n\t\t}\n\t}\n\n\t/**\n\t * Watch for form submitted events\n\t * @returns void\n\t */\n\tprivate observeFormSubmissions(): void {\n\t\tconst form = this.getForm();\n\t\tif (form) {\n\t\t\tfromEvent(form, 'submit')\n\t\t\t\t.pipe(takeUntil(this._unsubscribeAll))\n\t\t\t\t.subscribe((e) => {\n\t\t\t\t\tthis.handleDisableSubmitButton(SubmitButtonUseCases.Disable);\n\t\t\t\t\te && e.preventDefault();\n\t\t\t\t\t// send a form submission to the API\n\t\t\t\t\tthis.submitForm()\n\t\t\t\t\t\t.pipe(takeUntil(this._unsubscribeAll))\n\t\t\t\t\t\t.subscribe(\n\t\t\t\t\t\t\t(response) => {\n\t\t\t\t\t\t\t\t//after 30 secs reanable it\n\t\t\t\t\t\t\t\tsetTimeout(() => this.handleDisableSubmitButton(SubmitButtonUseCases.Enable), 30000);\n\n\t\t\t\t\t\t\t\tif (response) {\n\t\t\t\t\t\t\t\t\tif (response.message) {\n\t\t\t\t\t\t\t\t\t\tthis.handleDisableSubmitButton(SubmitButtonUseCases.Done);\n\t\t\t\t\t\t\t\t\t\tthis.showSubmissionAlert(response.message);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (response?.data?.success) {\n\t\t\t\t\t\t\t\t\tthis.handleDisableSubmitButton(SubmitButtonUseCases.Done);\n\t\t\t\t\t\t\t\t\t// emit eventNameSuccess\n\t\t\t\t\t\t\t\t\tthis.componentEvents.success\n\t\t\t\t\t\t\t\t\t\t? this.dispatchCustomEvent(this.componentEvents.success, response.data, true)\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.handleDisableSubmitButton(SubmitButtonUseCases.Enable);\n\t\t\t\t\t\t\t\t\t// emit eventNameFailure\n\t\t\t\t\t\t\t\t\tthis.componentEvents.failure ? this.dispatchCustomEvent(this.componentEvents.success, false, true) : undefined;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(response) => {\n\t\t\t\t\t\t\t\tthis.handleDisableSubmitButton(SubmitButtonUseCases.Enable);\n\t\t\t\t\t\t\t\t/** show generic error message */\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\talert: {\n\t\t\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tmessage: response.text(),\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'danger',\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});\n\t\t}\n\t}\n\n\tprivate handleDisableSubmitButton(disable: SubmitButtonUseCases) {\n\t\tconst submitBtn = this.getSubmitButton();\n\t\tconst spinnerWrapper = this.getSpinnerWrapper();\n\t\tconst submitText = this.getSubmitText();\n\t\tconst doneWrapper = this.getDoneWrapper();\n\t\tswitch (disable) {\n\t\t\tcase SubmitButtonUseCases.Disable:\n\t\t\t\tsubmitBtn?.setAttribute('disabled', 'disabled');\n\t\t\t\tspinnerWrapper?.setAttribute('style', 'display: unset;');\n\t\t\t\tsubmitText?.setAttribute('style', 'display: none;');\n\t\t\t\tbreak;\n\t\t\tcase SubmitButtonUseCases.Enable:\n\t\t\t\tsubmitBtn?.removeAttribute('disabled');\n\t\t\t\tspinnerWrapper?.setAttribute('style', 'display: none;');\n\t\t\t\tsubmitText?.setAttribute('style', 'display: block;');\n\t\t\t\tbreak;\n\t\t\tcase SubmitButtonUseCases.Done:\n\t\t\t\tsubmitBtn?.setAttribute('disabled', 'disabled');\n\t\t\t\tspinnerWrapper?.setAttribute('style', 'display: none;');\n\t\t\t\tsubmitText?.setAttribute('style', 'display: none;');\n\t\t\t\tdoneWrapper?.setAttribute('style', 'display: unset;');\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an observable of the API response\n\t * @returns Observable\n\t */\n\tprivate submitForm(): Observable | undefined> {\n\t\tconst form = this.getForm();\n\t\tif (form) {\n\t\t\t// get the form's submit URL\n\t\t\tconst submitUrl = this.getFormSubmitUrl();\n\t\t\treturn fromFetch>(submitUrl.toString(), {\n\t\t\t\tselector: (response) => response.json(),\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: JSON.stringify(this.getFormData()),\n\t\t\t}).pipe(\n\t\t\t\tmap((p) => {\n\t\t\t\t\tif (p && p) {\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\t\t\t\t\t// @todo - might be a message from the server here...\n\t\t\t\t\treturn of(undefined);\n\t\t\t\t}),\n\t\t\t\tcatchError((e) => {\n\t\t\t\t\t// handle error case or non-20x response\n\t\t\t\t\treturn of(e);\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\treturn of(undefined);\n\t}\n\n\t/**\n\t * Determines the form's submit URL for XHR submissions\n\t * @returns URL\n\t */\n\tprivate getFormSubmitUrl(): URL {\n\t\tconst form = this.getForm();\n\n\t\t// set the url, based on the data attrib, or the form action\n\t\tlet url = this.formUrl;\n\n\t\tif (this.formUrl.length === 0) {\n\t\t\turl = form ? form.getAttribute('action') || '' : '';\n\t\t}\n\n\t\treturn new URL(url);\n\t}\n\n\t/**\n\t * Returns the form data\n\t * @returns FormData\n\t */\n\tprivate getFormData() {\n\t\tconst form = this.getForm();\n\t\tconst data = {};\n\n\t\tif (form) {\n\t\t\tconst inputs = form.querySelectorAll('input.js-input');\n\t\t\tconst message: HTMLTextAreaElement | null = form.querySelector('textarea.js-input');\n\n\t\t\tinputs.forEach((input: HTMLInputElement) => {\n\t\t\t\tdata[input.name] = input.value;\n\t\t\t});\n\n\t\t\tif (message) {\n\t\t\t\tdata['message'] = message.value;\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * Show a success or error message on the page after form submission\n\t * @param {MoleculeAlertProps} alert\n\t * @returns void\n\t */\n\tprivate showSubmissionAlert(alert: MoleculeAlertProps): void {\n\t\tconst alertDiv = this.$references[this.componentRefs.alertWrapper];\n\t\tif (alert && alertDiv) {\n\t\t\tconst alertHtml = alertTemplate({\n\t\t\t\tdata: alert,\n\t\t\t});\n\t\t\talertDiv.innerHTML = alertHtml;\n\t\t}\n\t}\n}\n","require(\"@base/models/component.twig\"); \nvar twig = require(\"twig\").twig;\nvar tpl = twig({\"allowInlineIncludes\":true,\"data\":[{\"type\":\"logic\",\"token\":{\"type\":\"Twig.logic.type.extends\",\"stack\":[{\"type\":\"Twig.expression.type.string\",\"value\":\"src/base/models/component.twig\"}],\"position\":{\"start\":0,\"end\":43}},\"position\":{\"start\":0,\"end\":43}},{\"type\":\"raw\",\"value\":\"\\n\",\"position\":{\"start\":44,\"end\":45}},{\"type\":\"logic\",\"token\":{\"type\":\"Twig.logic.type.set\",\"key\":\"config\",\"expression\":[{\"type\":\"Twig.expression.type.object.start\",\"value\":\"{\",\"match\":[\"{\"]},{\"type\":\"Twig.expression.type.operator.binary\",\"value\":\":\",\"precidence\":16,\"associativity\":\"rightToLeft\",\"operator\":\":\",\"key\":\"name\"},{\"type\":\"Twig.expression.type.string\",\"value\":\"m-alert\"},{\"type\":\"Twig.expression.type.comma\"},{\"type\":\"Twig.expression.type.operator.binary\",\"value\":\":\",\"precidence\":16,\"associativity\":\"rightToLeft\",\"operator\":\":\",\"key\":\"tag\"},{\"type\":\"Twig.expression.type.string\",\"value\":\"div\"},{\"type\":\"Twig.expression.type.comma\"},{\"type\":\"Twig.expression.type.operator.binary\",\"value\":\":\",\"precidence\":16,\"associativity\":\"rightToLeft\",\"operator\":\":\",\"key\":\"controller\"},{\"type\":\"Twig.expression.type.string\",\"value\":\"\"},{\"type\":\"Twig.expression.type.object.end\",\"value\":\"}\",\"match\":[\"}\"]}],\"position\":{\"start\":45,\"end\":123}},\"position\":{\"start\":45,\"end\":123}},{\"type\":\"raw\",\"value\":\"\\n\",\"position\":{\"start\":124,\"end\":125}},{\"type\":\"logic\",\"token\":{\"type\":\"Twig.logic.type.block\",\"blockName\":\"body\",\"position\":{\"start\":125,\"end\":141},\"output\":[{\"type\":\"raw\",\"value\":\"\\n\\t\",\"position\":{\"start\":142,\"end\":144}},{\"type\":\"logic\",\"token\":{\"type\":\"Twig.logic.type.for\",\"keyVar\":null,\"valueVar\":\"item\",\"expression\":[{\"type\":\"Twig.expression.type.variable\",\"value\":\"data\",\"match\":[\"data\"]},{\"type\":\"Twig.expression.type.key.period\",\"key\":\"items\"}],\"position\":{\"start\":144,\"end\":172},\"output\":[{\"type\":\"raw\",\"value\":\"\\t\\t
\\n\\t\\t\\t\\n\\t\\t\\t

\",\"position\":{\"start\":267,\"end\":294}},{\"type\":\"output\",\"position\":{\"start\":294,\"end\":314},\"stack\":[{\"type\":\"Twig.expression.type.variable\",\"value\":\"item\",\"match\":[\"item\"],\"position\":{\"start\":294,\"end\":314}},{\"type\":\"Twig.expression.type.key.period\",\"position\":{\"start\":294,\"end\":314},\"key\":\"message\"},{\"type\":\"Twig.expression.type.filter\",\"value\":\"raw\",\"match\":[\"|raw\",\"raw\"],\"position\":{\"start\":294,\"end\":314}}]},{\"type\":\"raw\",\"value\":\"

\\n\\t\\t
\\n\\t\",\"position\":{\"start\":314,\"end\":329}}]},\"position\":{\"open\":{\"start\":144,\"end\":172},\"close\":{\"start\":329,\"end\":341}}},{\"type\":\"raw\",\"value\":\"\\n\",\"position\":{\"start\":342,\"end\":343}}]},\"position\":{\"open\":{\"start\":125,\"end\":141},\"close\":{\"start\":343,\"end\":357}}}],\"id\":\"src/wolf/components/molecules/m-alert/m-alert.template.twig\",\"rethrow\":true});\nmodule.exports = function(context) { return tpl.render(context); };\nmodule.exports.id = \"src/wolf/components/molecules/m-alert/m-alert.template.twig\";\nmodule.exports.default = module.exports;\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","alertTemplate","SubmitButtonUseCases","ControllerFinderPopupForm","super","componentRefs","alertWrapper","formWrapper","submitBtn","spinnerWrapper","submitText","doneWrapper","componentEvents","success","failure","init","observeFormSubmissions","_unsubscribeAll","addEventListener","e","complete","formUrl","formurl","eventNameSuccess","eventNameFailure","getForm","form","getSubmitButton","getSpinnerWrapper","getSubmitText","getDoneWrapper","handleDisableSubmitButton","Disable","preventDefault","submitForm","response","setTimeout","Enable","message","Done","showSubmissionAlert","alert","items","text","type","disable","submitUrl","getFormSubmitUrl","toString","selector","json","method","stringify","getFormData","p","of","url","getAttribute","URL","inputs","alertDiv","alertHtml","tpl","twig","module","exports","context","render","id"],"sourceRoot":""}