{"version":3,"file":"cross-portal-menu.js","sources":["../../../../src/assets/scripts/cross-portal-menu.entry.ts"],"sourcesContent":["import { createWebComponentInstances, dispatchCustomEvent, getMetaData } from '@helpers/functions';\nimport {\n deleteApiMyarjofavouriteextendId,\n deleteApiMyarjofavouriteId,\n FavoritePageItemModel,\n getApiMyarjofavouriteextendGet,\n getApiMyarjofavouriteGet,\n postApiMyarjofavouriteCreate,\n postApiMyarjofavouriteextendCreate,\n} from '@_api/index';\n\nimport { globalCpmWebComponentName } from '../../web-components/globalCpm/_data';\nimport { WebComponent } from '@helpers/WebComponent';\nimport executionFunctionByRootNodeType from '@helpers/executionFunctionByRootNodeType';\nimport { favoriteTooltip } from '@assets/scripts/favorite-tooltip.entry';\nimport { RequestResponse } from '@_api/_base';\n\ndeclare namespace arjoJs {\n function isDesktop(): boolean;\n}\n\nclass CrossPortalMenu extends WebComponent {\n constructor(rootNode: Document | ShadowRoot) {\n super(rootNode);\n\n window.addEventListener('resize', () => this.setWidth());\n\n executionFunctionByRootNodeType({\n rootNode: rootNode,\n localCallback: () => {\n window.addEventListener('DOMContentLoaded', () => {\n this.initPrepare();\n });\n },\n webComponentCallback: () => {\n this.init(() => {\n this.initPrepare();\n });\n },\n });\n }\n\n initPrepare() {\n this.initPortalMenu();\n this.addEventToLogoutButton();\n this.setWidth();\n this.initFavoriteFeature();\n this.initUserFeature();\n this.addEventOutsideAccountMenuClick();\n }\n\n initFavoriteFeature() {\n this.addEventFavorite();\n this.handleCheckFavoriteStatus();\n }\n\n initUserFeature() {\n this.addEventToAvatarMenuDropdownItem();\n this.addEventToAvatar();\n }\n\n addEventToAvatar() {\n const avatarText = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__avatar-text');\n\n if (!avatarText) return;\n\n if (avatarText) {\n // While we need to re init this script base on external web component data, we need remove previous event listener on the element\n avatarText.removeEventListener('click', this.handleAvatarPortalMenuClick);\n\n avatarText.addEventListener('click', this.handleAvatarPortalMenuClick);\n }\n }\n\n handleAvatarPortalMenuClick(event: Event) {\n event.preventDefault();\n\n (event.currentTarget as HTMLElement).closest('.arjo-o-eshop-cross-portal-menu__avatar')?.classList.toggle('is-show');\n }\n\n handleAvatarMenuDropdownItemClick(event: Event) {\n event.preventDefault();\n const target = event.currentTarget as HTMLElement;\n\n if (!target) return;\n\n const href = target.getAttribute('href');\n const eventData = target.getAttribute('data-event-data');\n\n if (eventData) {\n dispatchCustomEvent({\n eventName: 'cpm-account',\n eventDict: {\n detail: {\n data: eventData,\n },\n },\n });\n return;\n }\n\n if (href) {\n const anchorTarget = target.getAttribute('target');\n\n if (anchorTarget === '_blank') {\n window.open(href, '_blank');\n } else {\n window.location.assign(href);\n }\n }\n }\n\n addEventToAvatarMenuDropdownItem() {\n const avatarDropdownMenu = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__avatar-dropdown');\n\n if (!avatarDropdownMenu) return;\n\n [...avatarDropdownMenu.querySelectorAll('a')].forEach((link) => {\n // While we need to re init this script base on external web component data, we need remove previous event listener on the element\n link.removeEventListener('click', this.handleAvatarMenuDropdownItemClick);\n\n link.addEventListener('click', this.handleAvatarMenuDropdownItemClick);\n });\n }\n\n addEventOutsideAccountMenuClick() {\n window.addEventListener('click', this.handleOutsideAccountMenuClick.bind(this));\n }\n\n handleOutsideAccountMenuClick(event: MouseEvent) {\n const elementClicked = event?.composedPath?.()?.[0] as HTMLElement;\n\n const avatarItem = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__avatar');\n\n if (avatarItem && !avatarItem.contains(elementClicked)) {\n this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__avatar')?.classList?.remove('is-show');\n }\n }\n\n initPortalMenu() {\n const currentItem = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__item--current');\n\n if (currentItem) {\n // While we need to re init this script base on external web component data, we need remove previous event listener on the element\n currentItem.removeEventListener('click', (event) => this.handleClickPortalMenuMobile(event, this.rootNode));\n\n currentItem.addEventListener('click', (event) => this.handleClickPortalMenuMobile(event, this.rootNode));\n }\n }\n\n handleClickPortalMenuMobile(event: Event, rootNode: Document | ShadowRoot) {\n event.preventDefault();\n\n // Only local cpm will run this logic\n if (arjoJs.isDesktop() && rootNode instanceof Document) {\n return;\n }\n\n let parent = (event.target as HTMLElement).closest('.arjo-o-eshop-cross-portal-menu__left');\n\n if (!parent) {\n return;\n }\n\n parent.classList.toggle('is-show');\n }\n\n setWidth() {\n const crossPortalMenu = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu');\n const header = this.rootNode.querySelector('.arjo-o-header');\n\n if (!header || !crossPortalMenu) {\n return;\n }\n\n crossPortalMenu?.style?.setProperty('--width', `${header.clientWidth}px`);\n\n // set height cpm\n header.style.setProperty('--height-cpm', `${crossPortalMenu.clientHeight}px`);\n }\n\n handleLogoutEvent(event: MouseEvent) {\n event.preventDefault();\n const target = event.currentTarget as HTMLElement;\n\n if (!target) return;\n\n const href = target.getAttribute('href');\n const eventData = target.getAttribute('data-event-data');\n\n if (eventData) {\n dispatchCustomEvent({\n eventName: 'cpm-log-out',\n });\n\n return;\n }\n\n if (href) {\n window.location.assign(href);\n }\n }\n\n addEventToLogoutButton() {\n const logoutButton = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__logout');\n\n if (!logoutButton) return;\n // While we need to re init this script base on external web component data, we need remove previous event listener on the element\n logoutButton.removeEventListener('click', this.handleLogoutEvent);\n\n logoutButton.addEventListener('click', this.handleLogoutEvent);\n }\n\n // Favorite page methods\n getFavoriteElements() {\n const favorite = this.rootNode.querySelector('.arjo-o-eshop-cross-portal-menu__add-favorite');\n const favoriteText = favorite?.querySelector('.arjo-o-eshop-cross-portal-menu__add-favorite-text');\n\n return { favorite, favoriteText };\n }\n\n addEventFavorite() {\n const { favorite } = this.getFavoriteElements();\n\n // While we need to re init this script base on external web component data, we need remove previous event listener on the element\n favorite?.removeEventListener('click', () => this.handleFavoriteClick());\n\n favorite?.addEventListener('click', () => this.handleFavoriteClick());\n }\n\n handleFavoriteButtonClass(target: HTMLElement) {\n target.classList.toggle('disabled');\n }\n\n handleChangeFavoriteButtonAttributes(data?: { isFavorite: string; id: number }) {\n const { favorite } = this.getFavoriteElements();\n\n if (!favorite) return;\n\n if (data) {\n favorite.setAttribute('data-marked-as-favorite', data.isFavorite);\n favorite.setAttribute('data-favorite-id', data?.id?.toString());\n } else {\n favorite.removeAttribute('data-marked-as-favorite');\n favorite.removeAttribute('data-favorite-id');\n }\n }\n\n onGetFavoriteStatusSuccess(response: void | RequestResponse) {\n if (!response) return;\n\n const { favorite, favoriteText } = this.getFavoriteElements();\n\n const { data } = response;\n\n const { id } = data;\n\n if (!favorite || !id) return;\n\n this.handleChangeFavoriteButtonAttributes({ isFavorite: 'true', id });\n\n if (favoriteText) {\n favoriteText.innerHTML = favorite?.dataset.removeFromFavorite || '';\n }\n }\n\n handleCheckFavoriteStatus() {\n const url = window.location.href;\n const { favorite } = this.getFavoriteElements();\n\n if (!favorite) return;\n\n executionFunctionByRootNodeType({\n rootNode: this.rootNode,\n localCallback: () => {\n getApiMyarjofavouriteGet({ url })\n .then((response) => {\n this.onGetFavoriteStatusSuccess(response);\n })\n .catch(() => {\n this.handleChangeFavoriteButtonAttributes();\n });\n },\n webComponentCallback: () => {\n getApiMyarjofavouriteextendGet({ url })\n .then((response) => {\n this.onGetFavoriteStatusSuccess(response);\n })\n .catch(() => {\n this.handleChangeFavoriteButtonAttributes();\n });\n },\n });\n }\n\n onRemoveFavoriteSuccess(response: void | RequestResponse, textAddFavorite: string | undefined, elementText: Element) {\n if (!response) return;\n\n const { success } = response;\n\n if (!success) return;\n\n this.handleChangeFavoriteButtonAttributes();\n\n if (textAddFavorite && elementText) {\n elementText.innerHTML = textAddFavorite;\n }\n\n favoriteTooltip && favoriteTooltip.onChangeFavoriteState('remove');\n }\n\n onCreateFavoriteSuccess(response: void | RequestResponse, textRemoveFavorite: string | undefined, elementText: Element) {\n if (!response) return;\n\n const { data, success } = response;\n\n if (!success) return;\n\n this.handleChangeFavoriteButtonAttributes({ isFavorite: 'true', id: data?.id as number });\n\n if (textRemoveFavorite && elementText) {\n elementText.innerHTML = textRemoveFavorite;\n }\n\n favoriteTooltip && favoriteTooltip.onChangeFavoriteState('create');\n }\n\n handleFavoriteClick() {\n const { favorite, favoriteText } = this.getFavoriteElements();\n\n if (!favoriteText || !favorite) return;\n\n const textAddFavorite = favorite.dataset.addToFavorite;\n const textRemoveFavorite = favorite.dataset.removeFromFavorite;\n\n const markedAsFavorite = favorite.dataset.markedAsFavorite;\n const rawUrl = window.location.href;\n const title = document.title;\n this.handleFavoriteButtonClass(favorite);\n const metaData = getMetaData();\n const portal = metaData?.sub_portal || metaData?.portal || null;\n\n if (markedAsFavorite) {\n const favoriteId = favorite.dataset.favoriteId;\n\n if (!favoriteId) return;\n\n executionFunctionByRootNodeType({\n rootNode: this.rootNode,\n localCallback: () => {\n deleteApiMyarjofavouriteId(+favoriteId)\n .then((response) => {\n this.onRemoveFavoriteSuccess(response, textAddFavorite, favoriteText);\n })\n .catch(console.error)\n .finally(() => this.handleFavoriteButtonClass(favorite));\n },\n webComponentCallback: () => {\n deleteApiMyarjofavouriteextendId(+favoriteId)\n .then((response) => {\n this.onRemoveFavoriteSuccess(response, textAddFavorite, favoriteText);\n })\n .catch(console.error)\n .finally(() => this.handleFavoriteButtonClass(favorite));\n },\n });\n } else {\n executionFunctionByRootNodeType({\n rootNode: this.rootNode,\n localCallback: () => {\n postApiMyarjofavouriteCreate({ rawUrl, title, portal })\n .then((response) => {\n this.onCreateFavoriteSuccess(response, textRemoveFavorite, favoriteText);\n })\n .catch(console.error)\n .finally(() => this.handleFavoriteButtonClass(favorite));\n },\n webComponentCallback: () => {\n postApiMyarjofavouriteextendCreate({ rawUrl, title, portal })\n .then((response) => {\n this.onCreateFavoriteSuccess(response, textRemoveFavorite, favoriteText);\n })\n .catch(console.error)\n .finally(() => this.handleFavoriteButtonClass(favorite));\n },\n });\n }\n }\n}\n\nconst crossPortalMenu = createWebComponentInstances(CrossPortalMenu, globalCpmWebComponentName);\n\n// Web component only cannot access into class instance without window object\nwindow.crossPortalMenu = crossPortalMenu;\n\nexport { CrossPortalMenu };\n"],"names":["CrossPortalMenu","WebComponent","rootNode","executionFunctionByRootNodeType","avatarText","event","_a","target","href","eventData","dispatchCustomEvent","avatarDropdownMenu","link","elementClicked","_b","avatarItem","_d","_c","currentItem","parent","crossPortalMenu","header","logoutButton","favorite","favoriteText","data","response","id","url","getApiMyarjofavouriteGet","getApiMyarjofavouriteextendGet","textAddFavorite","elementText","success","favoriteTooltip","textRemoveFavorite","markedAsFavorite","rawUrl","title","metaData","getMetaData","portal","favoriteId","deleteApiMyarjofavouriteId","deleteApiMyarjofavouriteextendId","postApiMyarjofavouriteCreate","postApiMyarjofavouriteextendCreate","createWebComponentInstances","globalCpmWebComponentName"],"mappings":"2bAqBA,MAAMA,UAAwBC,CAAa,CACzC,YAAYC,EAAiC,CAC3C,MAAMA,CAAQ,EAEd,OAAO,iBAAiB,SAAU,IAAM,KAAK,SAAU,CAAA,EAEvBC,EAAA,CAC9B,SAAAD,EACA,cAAe,IAAM,CACZ,OAAA,iBAAiB,mBAAoB,IAAM,CAChD,KAAK,YAAY,CAAA,CAClB,CACH,EACA,qBAAsB,IAAM,CAC1B,KAAK,KAAK,IAAM,CACd,KAAK,YAAY,CAAA,CAClB,CACH,CAAA,CACD,CACH,CAEA,aAAc,CACZ,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,CACvC,CAEA,qBAAsB,CACpB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,CACjC,CAEA,iBAAkB,CAChB,KAAK,iCAAiC,EACtC,KAAK,iBAAiB,CACxB,CAEA,kBAAmB,CACjB,MAAME,EAAa,KAAK,SAAS,cAAc,8CAA8C,EAExFA,GAEDA,IAESA,EAAA,oBAAoB,QAAS,KAAK,2BAA2B,EAE7DA,EA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