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AM,CAAC,SAAS,CAAC,CAAC;gBAC9B,CAAC;gBACH,uBAAC;YAAD,CAAC,AA9CD,IA8CC;YA9CY,kCAAgB,mBA8C5B,CAAA;QACH,CAAC,EAvVqB,iBAAiB,GAAjB,oBAAiB,KAAjB,oBAAiB,QAuVtC;IAAD,CAAC,EAvVkB,EAAE,GAAF,WAAE,KAAF,WAAE,QAuVpB;AAAD,CAAC,EAvVS,QAAQ,KAAR,QAAQ,QAuVjB","sourcesContent":["namespace Dataport.OD.ErhAnMiZuWohngeld {\r\n export enum AdressSelectionOptions {\r\n Adress = '01',\r\n Postbox = '02'\r\n }\r\n\r\n export class HTMLElement {\r\n selector: string\r\n isRequired?: boolean\r\n }\r\n\r\n export enum GeneralOptions {\r\n NoSelection = \"\",\r\n No = '001',\r\n Yes = '002',\r\n AnswerLater = '003',\r\n Other = '999'\r\n }\r\n\r\n export enum GeneralDropdownOptions {\r\n PleaseChoose = '',\r\n No = '01',\r\n Yes = '02',\r\n AnswerLater = '03',\r\n Other = '999',\r\n Other006 = '006'\r\n }\r\n\r\n export enum RadioButtonOptions {\r\n Yes = '01',\r\n No = '02'\r\n }\r\n\r\n export enum DisabilityDegree {\r\n Option_10 = '010'\r\n }\r\n\r\n export enum DropdownListARepresentation {\r\n Nein = '01',\r\n GesetzlicheVertretungNatuerlichePerson = '02',\r\n GesetzlicheVertretungJuristischePerson = '03',\r\n BevollmaechtigePersonNatuerlichePerson = '04',\r\n BevollmaechtigePersonJuristischePerson = '05'\r\n }\r\n\r\n export enum AddressLocation {\r\n InsideGermany = '001',\r\n OutsideGermany = '002'\r\n }\r\n\r\n export enum Citizenship {\r\n NoSelection = \"910\",\r\n NoCitizenship = \"997\",\r\n Undefined = \"998\",\r\n NoInformation = \"999\",\r\n German = \"000\",\r\n Swiss = \"158\"\r\n }\r\n\r\n export enum DateSelection {\r\n Requested = 1,\r\n Approved = 2,\r\n Omiteted = 3,\r\n Rejected = 4\r\n }\r\n\r\n export enum CivilStatus {\r\n Single = \"001\",\r\n Married = '002',\r\n RegisteredPartnership = '005'\r\n }\r\n\r\n export enum EAQPRecipientPersonRadio {\r\n Person = '001',\r\n Organisation = '002'\r\n }\r\n\r\n export enum EAQPRecipientRadioTwo {\r\n Option2 = '002'\r\n }\r\n\r\n export class Common {\r\n SetVisible(parent: JQuery<Element>, isVisible: boolean): void {\r\n if (isVisible) {\r\n parent.show();\r\n } else {\r\n parent.hide();\r\n }\r\n }\r\n\r\n /**\r\n * Sets the required attribute for the given radio button group\r\n *\r\n * @param input selector for the field to change\r\n * @param isRequired required status\r\n * @param message error message, if field is left empty\r\n */\r\n static SetFieldRequired(input: JQuery<Element>, isRequired: boolean, message: string = ''): void {\r\n if (isRequired) {\r\n input.attr('data-val', 'true').attr('aria-required', 'true').attr('required', 'true');\r\n if (message) {\r\n input.attr('data-val-required', message);\r\n }\r\n } else {\r\n input.removeAttr('data-val').removeAttr('data-val-required').removeAttr('aria-required').removeAttr('required');\r\n }\r\n }\r\n\r\n static SetDocumentTitle(title: string = null): void {\r\n const ODName: string = i18n_format(\"Common_ServiceName\");\r\n\r\n if (title === null) {\r\n document.title = `${ODName} - ${document.title}`;\r\n } else {\r\n document.title = `${ODName} - ${title}`;\r\n }\r\n }\r\n\r\n static GetRadioButtonSelectedValue(element: JQuery<Element>): string {\r\n let valueList: any[] = (element as any).osiRadioButtonList().value();\r\n let selectedItem = valueList.find(s => s.Selected === true);\r\n return selectedItem ? selectedItem.Value : \"\";\r\n }\r\n\r\n static SetRadioButtonSelectedValue(element: JQuery<Element>, value: string): void {\r\n (element as any).osiRadioButtonList().value(value);\r\n }\r\n\r\n static ResetChangeState(): void {\r\n setTimeout(() => {\r\n (Dataport.OD as any).CancelDialog.changeState = 'false';\r\n }, 300);\r\n }\r\n }\r\n\r\n export class CardList {\r\n private $selector: string;\r\n private $cardCountSelector: string;\r\n private $addCardButtonSelector: string;\r\n private $events: Array<any>;\r\n private isIntialized: boolean = false;\r\n private reference;\r\n private canDeleteFirstCard = false;\r\n public cards: Array<any> = [];\r\n\r\n public $CloseButtonSelector: string = '.close';\r\n public $CardWrapperSelector: string = \"card-wrapper\";\r\n\r\n constructor(\r\n $selector: string,\r\n $cardCountSelector: string,\r\n $addCardButtonSelector: string,\r\n $events: Array<any>,\r\n reference) {\r\n this.$selector = $selector;\r\n this.$cardCountSelector = $cardCountSelector;\r\n this.$addCardButtonSelector = $addCardButtonSelector;\r\n this.$events = $events;\r\n this.reference = reference;\r\n\r\n this.OnAddCard();\r\n }\r\n\r\n InitCards(displayFirstCard: boolean = true): void {\r\n if (displayFirstCard) {\r\n this.DisplayFirstCard();\r\n }\r\n\r\n let $cards = this.GetAllDisplayedCards();\r\n\r\n this.StoreAndInitializeCards($cards);\r\n this.HideFirstCardCloseButton();\r\n }\r\n\r\n GetAllDisplayedCards(): JQuery<any> {\r\n let $cards = $(this.$selector)\r\n .children()\r\n .filter(`[class~='${this.$CardWrapperSelector}']`);\r\n\r\n return $cards;\r\n }\r\n\r\n StoreAndInitializeCards($cards): void {\r\n $cards.each((index, item) => {\r\n this.AddNewCard($(item), index);\r\n });\r\n }\r\n\r\n DisplayFirstCard(): void {\r\n if (this.cards.length === 0 && !this.isIntialized) {\r\n let eventData: any = {\r\n currentTarget: this.$addCardButtonSelector\r\n };\r\n (Dataport.OD as any).AddContentButton.AddContent(eventData);\r\n }\r\n this.isIntialized = true;\r\n }\r\n\r\n OnAddCard(): void {\r\n if (!this.isIntialized) {\r\n $(document).ajaxComplete(() => {\r\n let $cards = this.GetAllDisplayedCards();\r\n this.StoreAndInitializeCards($cards);\r\n this.HideFirstCardCloseButton();\r\n });\r\n }\r\n }\r\n\r\n AddNewCard($card: JQuery<Element>, index: number): void {\r\n if (!this.cards[index]) {\r\n this.cards.push($card);\r\n this.AttachEvents(this.cards[index], index);\r\n }\r\n }\r\n\r\n RemoveCards(): void {\r\n for (let i in this.cards) {\r\n $(this.cards[i]).remove()\r\n }\r\n\r\n this.SetCardHiddenInput();\r\n\r\n this.cards = [];\r\n this.isIntialized = false;\r\n }\r\n\r\n SetCardHiddenInput(): void {\r\n $(this.$cardCountSelector).val(0);\r\n }\r\n\r\n HideFirstCardCloseButton(): void {\r\n if (this.cards[0]) {\r\n if (!this.canDeleteFirstCard) {\r\n let $first = this.cards[0];\r\n $first.find(this.$CloseButtonSelector).hide();\r\n }\r\n }\r\n }\r\n\r\n AttachEvents($card: JQuery<Element>, index: number): void {\r\n for (let i in this.$events) {\r\n this.$events[i].apply(this.reference, [$card, index]);\r\n }\r\n }\r\n\r\n CanDeleteFirstCardElement(canDelete: boolean) {\r\n this.canDeleteFirstCard = canDelete;\r\n }\r\n }\r\n\r\n export class RequiredHelper {\r\n mandatoryRadio(selector: string, state: boolean, message: string) {\r\n if (state) {\r\n $(selector + '_val')\r\n .attr(\"data-val\", \"true\")\r\n .attr(\"data-val-required\", message)\r\n .attr(\"aria-required\", \"true\")\r\n .attr('required', 'true');\r\n } else {\r\n $(selector + '_val')\r\n .removeAttr(\"data-val\")\r\n .removeAttr(\"data-val-required\")\r\n .removeAttr(\"aria-required\")\r\n .removeAttr(\"required\");\r\n }\r\n }\r\n\r\n mandatoryUpload(selector: string, state: boolean, message: string) {\r\n if (state) {\r\n $(selector + \"_value\").attr(\"data-val\", \"true\")\r\n .attr(\"data-val-required\", message)\r\n .attr(\"aria-required\", \"true\")\r\n .attr('required', 'true');\r\n } else {\r\n $(selector + \"_value\").removeAttr(\"data-val\")\r\n .removeAttr(\"data-val-required\")\r\n .removeAttr(\"aria-required\")\r\n .removeAttr(\"required\");\r\n }\r\n }\r\n\r\n mandatoryDropdown(selector: string, state: boolean, message: string) {\r\n if (state) {\r\n $(selector).attr(\"data-val\", \"true\")\r\n .attr(\"data-val-required\", message)\r\n .attr(\"aria-required\", \"true\")\r\n .attr('required', 'true');\r\n } else {\r\n $(selector).removeAttr(\"data-val\")\r\n .removeAttr(\"data-val-required\")\r\n .removeAttr(\"aria-required\")\r\n .removeAttr(\"required\");\r\n }\r\n }\r\n }\r\n\r\n export class BreadcrumbHelper {\r\n private breadcrumbSelector: string = \"ol.breadcrumb\";\r\n private searchBreadCrumbInterval: number;\r\n private searchBreadCrumbRetries: number = 1;\r\n private overviewLabel: string = i18n_format(\"Common_OverviewLabel\");\r\n private allServicesLabel: string = i18n_format(\"Common_AllServicesLabel\");\r\n private retryInterval: number = 200;\r\n\r\n Init() {\r\n this.searchBreadCrumbInterval = setInterval(this.AdjustBreadcrumb.bind(this), this.retryInterval);\r\n }\r\n\r\n private AdjustBreadcrumb(): void {\r\n const breadcrumbContainer = $(this.breadcrumbSelector);\r\n if (breadcrumbContainer.length === 1) {\r\n this.AddBreadcrumbItem(this.allServicesLabel, this.GetAllServicesUrl(), breadcrumbContainer);\r\n this.AddBreadcrumbItem(this.overviewLabel, this.GetOverviewUrl(), breadcrumbContainer);\r\n\r\n clearInterval(this.searchBreadCrumbInterval);\r\n } else {\r\n if (this.searchBreadCrumbRetries > 5) {\r\n // clear search for breadcrumb after 5 retries\r\n clearInterval(this.searchBreadCrumbInterval);\r\n }\r\n\r\n this.searchBreadCrumbRetries++;\r\n }\r\n }\r\n\r\n GetOverviewUrl(): string {\r\n let url = document.location.href;\r\n let finalUrl = `${url.substring(0, url.lastIndexOf(\"/\"))}/HousingAllowanceRequest`;\r\n return finalUrl;\r\n }\r\n\r\n GetAllServicesUrl(): string {\r\n const parts = window.location.pathname.split('/')[1];\r\n return `${location.origin}/${parts}/Service/List`;\r\n }\r\n\r\n AddBreadcrumbItem(label: string, url: string, container: JQuery<Element>): void {\r\n let liElement = $(\"<li class=\\\"breadcrumb-item\\\"></li>\");\r\n let aElement = $(`<a href=\"${url}\" class=\"breadcrumb__link\">${label}</a>`);\r\n liElement.append(aElement);\r\n container.append(liElement);\r\n }\r\n }\r\n}\r\n"]}