{"version":3,"file":"EncompassHelp.min.js","sources":["EncompassWebServices/Controls/EncompassHelp.js"],"sourcesContent":["\"use strict\";\r\n\r\nEWS.Ready(() => {\r\n if (UserType !== \"Guest\") {\r\n requestIdleCallback(() => {\r\n InitEncompassHelp();\r\n });\r\n }\r\n});\r\n\r\nlet bevMenu;\r\n\r\nfunction InitEncompassHelp() {\r\n const pageHeader = document.querySelector(\"#Header .Inner\");\r\n\r\n if (pageHeader && !IsImpersonateUser) {\r\n const notDSDLink = window.location.hostname !== \"dsdlink.com\" && window.location.hostname !== \"dsdlink.encompass8.com\" && Distributor !== \"DSDLink\";\r\n const ecpHelpButton = document.createElement(\"ecp-btn\");\r\n ecpHelpButton.setAttribute(\"type\", \"ghost\");\r\n ecpHelpButton.setAttribute(\"size\", \"large\");\r\n ecpHelpButton.setAttribute(\"icon\", \"ews-icon-aihelp\");\r\n ecpHelpButton.id = \"encompasshelpicon\";\r\n\r\n pageHeader.insertBefore(ecpHelpButton, pageHeader.children[pageHeader.children.length - 2]);\r\n\r\n ecpHelpButton.addEventListener(\"click\", (event) => {\r\n let helpMenu = document.getElementById(\"ecp-help-menu\");\r\n\r\n if (!helpMenu) {\r\n helpMenu = WriteEncompassHelpMenu(notDSDLink);\r\n WriteCurrentHelpResources();\r\n }\r\n\r\n helpMenu.ShowMenu(event.currentTarget);\r\n });\r\n\r\n const whatsNewPopUp = notDSDLink && !EC_Fmt.isMobile && EC_Fmt.GetCookie(\"DisplayWhatsNewPopup\") === \"true\";\r\n if (whatsNewPopUp && EC_Fmt.GetPageParameter(\"DashboardID\") !== \"162470\") {\r\n setTimeout(() => {\r\n const whatsNewAttention = document.createElement(\"div\");\r\n whatsNewAttention.classList.add(\"attentionDialog\");\r\n whatsNewAttention.id = \"whatsNewAttentionDialog\";\r\n\r\n whatsNewAttention.innerHTML = \"
\"\r\n + `
Encompass ${EC_Fmt.Trn(\"has been updated\")}
`\r\n + `
${EC_Fmt.Trn(\"Read about changes and how to take advantage of new features in the\")} ${EC_Fmt.Left(ECPVersion, 5)} ${EC_Fmt.Trn(\"release\")}
`\r\n + `
${EC_Fmt.Trn(\"View release notes\")}${EC_Fmt.Trn(\"Dismiss\")}
`\r\n + \"
\";\r\n\r\n document.body.appendChild(whatsNewAttention);\r\n\r\n const releaseNotesButton = whatsNewAttention.querySelector(\"ecp-btn[type=permanent]\");\r\n const dismissButton = whatsNewAttention.querySelector(\"ecp-btn[type=primary]\");\r\n\r\n const clickWhatsNewButton = (event) => {\r\n whatsNewAttention.style.display = \"none\";\r\n\r\n const myRequest = new ECP.EC_Request(\"SetUserSetting\");\r\n myRequest.SetReturnType(ECP.EC_ReturnType.Text);\r\n myRequest.AddRequestVariable(\"SettingName\", \"hasSeenWhatsNewPopup\");\r\n myRequest.AddRequestVariable(\"SettingValue\", \"true\");\r\n myRequest.Submit();\r\n EC_Fmt.DeleteCookie(\"DisplayWhatsNewPopup\");\r\n\r\n if (event.currentTarget === releaseNotesButton) {\r\n window.open(\"Home?DashboardID=162470\");\r\n }\r\n };\r\n\r\n releaseNotesButton.addEventListener(\"click\", clickWhatsNewButton);\r\n dismissButton.addEventListener(\"click\", clickWhatsNewButton);\r\n\r\n dismissButton.shadowRoot.querySelector(\"Button\").style = \"background:var(--neutral-90);color:var(--neutral-10);border:0\";\r\n\r\n const EnableBetaDialog = document.getElementById(\"EnableBeta\");\r\n if (EnableBetaDialog) {\r\n const whatsNewRectangle = whatsNewAttention.getBoundingClientRect();\r\n EnableBetaDialog.style.top = `${whatsNewRectangle.top + whatsNewRectangle.height + 20}px`;\r\n }\r\n }, 1000);\r\n }\r\n }\r\n}\r\n\r\nfunction WriteEncompassHelpMenu(notDSDLink) {\r\n let html = \"\";\r\n\r\n if (notDSDLink) {\r\n html += ``\r\n + \"
\"\r\n + \"\"\r\n + `${EC_Fmt.Trn(\"What’s new\")}`\r\n + `${EC_Fmt.Trn(\"Latest Release Notes\")}`\r\n + \"\"\r\n + \"
\"\r\n\r\n + \"\"\r\n + \"\"\r\n + \"\"\r\n + `${EC_Fmt.Trn(\"Ask\")} Bev`\r\n + `${EC_Fmt.Trn(\"AI Assistant\")}`\r\n + \"\"\r\n + \"\";\r\n }\r\n\r\n html += \"\"\r\n + \"\"\r\n + `Help resources`\r\n + `${EC_Fmt.Trn(\"Based on your current page\")}`\r\n + \"\"\r\n + \"\"\r\n\r\n + \"\"\r\n + \"\"\r\n + \"\"\r\n + \"
\"\r\n + \"
\";\r\n\r\n // Task 1175731: Remove the 'Ask a Question' link from the help resources dialog in DSDLink only\r\n if (notDSDLink) {\r\n html += \"\"\r\n + \"
\"\r\n + \"\"\r\n + `${EC_Fmt.Trn(\"More support options\")}`\r\n + `Encompass Support Pourtal`\r\n + \"\"\r\n + \"
\";\r\n }\r\n\r\n html += \"
\";\r\n\r\n const helpMenu = document.createElement(\"ecp-menu\");\r\n helpMenu.id = \"ecp-help-menu\";\r\n helpMenu.innerHTML = html;\r\n document.body.appendChild(helpMenu);\r\n\r\n EC_Fmt.AfterInput(helpMenu.querySelector(\"#ecp-help-dialog-input\"), 0, 350, async (_, search) => {\r\n if (search.length >= 3) {\r\n const myRequest = new ECP.EC_Request(\"EncompassHelp_HelpResourcesSearch\");\r\n myRequest.AddRequestVariable(\"SearchStr\", search);\r\n\r\n const result = await myRequest.Submit();\r\n WriteEncompassHelpContent(result, search);\r\n } else if (search.length === 0) {\r\n WriteCurrentHelpResources();\r\n }\r\n });\r\n\r\n const askBevItem = helpMenu.querySelector(\"#ask-bev-list-item\");\r\n if (askBevItem) {\r\n askBevItem.addEventListener(\"click\", () => {\r\n if (!bevMenu) {\r\n const pageDescription = document.querySelector(\"head > meta[name='Description'][content]\");\r\n let context = `You are a chatbot for the Encompass system that is embedded on the Encompass website. `\r\n + `The user is viewing the ${encodeURIComponent(document.querySelector(\"head > title\").innerText)} dashboard page on the Encompass website.`;\r\n if (Settings.DashboardID === ECP.CommonDashboards.TableView) {\r\n context += ` The following is a description of the page: This is a table view of the ${EC_Fmt.GetPageParameter(\"TableName\")} table. Showing all of the rows in this table, with a default set of columns. Users can modify the columns (which are displayed, sequence) and add filters, as well as add sub-tables to the view, visit audits on each record, or navigate to other associated records through the database.`;\r\n } else if (Settings.DashboardID === ECP.CommonDashboards.TableEdit) {\r\n context += ` The following is a description of the page: This is edit for a single record on the ${EC_Fmt.GetPageParameter(\"TableName\")} table. Allows user to modify values on this record if they have the required edit permission for each field.`;\r\n } else if (Settings.DashboardID === ECP.CommonDashboards.TableMerge) {\r\n context += ` The following is a description of the page: This is delete and merge for a single record on the ${EC_Fmt.GetPageParameter(\"TableName\")} table. This is displayed as a confirmation before deleting a record, and to allow the user to decide what action to take with other records associated with the record being deleted.`;\r\n } else if (Settings.DashboardID === ECP.CommonDashboards.TableCopy) {\r\n context += ` The following is a description of the page: This is a copy page for one or many records on the ${EC_Fmt.GetPageParameter(\"TableName\")} table. This allows the user to create a copy of the record(s) and decide if any of the sub-table records associated with them should be copied as well. Users can also tweak the ending values on the newly created records before they are created.`;\r\n } else if (pageDescription) {\r\n context += ` The following is a description of the page: ${encodeURIComponent(pageDescription.getAttribute(\"content\"))}`;\r\n }\r\n\r\n bevMenu = EC_Fmt.HtmlStrToElement(\"\"\r\n + \"\"\r\n\r\n + \"\"\r\n + \"
\"\r\n + \"\"\r\n + `Back to all support options`\r\n + \"\"\r\n + \"
\"\r\n\r\n + \"\"\r\n + ``\r\n + \"\"\r\n\r\n + \"
\");\r\n\r\n document.body.appendChild(bevMenu);\r\n\r\n bevMenu.querySelector(\"#ask-bev-go-back\").addEventListener(\"click\", () => {\r\n bevMenu.ShowMenu();\r\n });\r\n }\r\n\r\n bevMenu.ShowMenu(document.getElementById(\"encompasshelpicon\"));\r\n\r\n setTimeout(() => {\r\n const isSmallScreen = window.innerWidth <= 600;\r\n bevMenu.style.maxHeight = `calc(99vh - ${isSmallScreen ? 0 : bevMenu.getBoundingClientRect().top}px)`;\r\n\r\n const iFrame = bevMenu.querySelector(\"#ecp-bev-iframe-item\");\r\n iFrame.style.maxHeight = `calc(99vh - ${isSmallScreen ? 0 : iFrame.getBoundingClientRect().top + 24}px)`; // 24 = padding at the bottom of the frame\r\n }, 160);\r\n });\r\n }\r\n\r\n return helpMenu;\r\n}\r\n\r\nasync function WriteCurrentHelpResources() {\r\n const helpContent = document.querySelector(\"#ecp-help-menu .ecp-help-content\");\r\n const timer = setTimeout(() => {\r\n ECP.Dialog.ShowLoading(\"\", helpContent);\r\n }, 1000);\r\n\r\n const myRequest = new ECP.EC_Request(\"EncompassHelp_GetCurrentHelpResources\");\r\n myRequest.AddRequestVariable(\"DashboardID\", Settings.DashboardID);\r\n\r\n if (Settings.DashboardID === ECP.CommonDashboards.TableView) {\r\n myRequest.AddRequestVariable(\"TableName\", EC_Fmt.GetPageParameter(\"TableName\"));\r\n }\r\n\r\n const result = await myRequest.Submit();\r\n\r\n clearTimeout(timer);\r\n helpContent.style.minHeight = \"auto\";\r\n\r\n WriteEncompassHelpContent(result);\r\n}\r\n\r\nfunction WriteEncompassHelpContent(result, search) {\r\n const helpContent = document.querySelector(\"#ecp-help-menu .ecp-help-content\");\r\n const helpEmpty = document.querySelector(\"#ecp-help-menu .ecp-help-empty\");\r\n helpContent.innerHTML = \"\";\r\n helpEmpty.innerHTML = \"\";\r\n\r\n const AvailableResourceLength = result.AvailableResourceLength;\r\n const ResourceResult = result.ResourceResult;\r\n let html = \"\";\r\n let ApplicationID = 0;\r\n\r\n if (ResourceResult?.length > 0) {\r\n for (let i = 0; i < ResourceResult.length; i++) {\r\n const ApplicationObj = ResourceResult[i];\r\n ApplicationID = ApplicationObj.ApplicationID;\r\n\r\n for (let j = 0; j < ApplicationObj.HelpResources.length; j++) {\r\n const HelpResourcesObj = ApplicationObj.HelpResources[j];\r\n const Url = `Home?DashboardID=184447&HelpResourcesID=${HelpResourcesObj.HelpResourcesID}&`;\r\n\r\n html += ``\r\n + \"\"\r\n + `${HelpResourcesObj.Title}`;\r\n\r\n if (!EC_Fmt.isNull(search)) {\r\n html += `${ApplicationObj.Application}`;\r\n }\r\n\r\n html += \"\"\r\n + ``\r\n + \"\";\r\n }\r\n }\r\n } else {\r\n let title;\r\n let message;\r\n\r\n if (EC_Fmt.isNull(search)) {\r\n title = \"Search help resources\";\r\n message = \"Use the box above to find a help resource and get started.\";\r\n } else {\r\n title = \"No resources found\";\r\n message = \"There aren’t any resources that match your search. Try adjusting your search, or browse all help resources using the link below.\";\r\n }\r\n\r\n let emptyHtml = ``\r\n + `${title}`\r\n + `${message}`;\r\n\r\n if (!EC_Fmt.isNull(search)) {\r\n emptyHtml += \"
\"\r\n + \"Clear search\"\r\n + \"Browse all help resources\"\r\n + \"
\";\r\n }\r\n\r\n emptyHtml += \"
\";\r\n\r\n helpEmpty.innerHTML = emptyHtml;\r\n }\r\n\r\n if (AvailableResourceLength > 0 && (EC_Fmt.isNull(search) || (ResourceResult?.length > 0))) {\r\n let title;\r\n let Url;\r\n\r\n if (ResourceResult?.length > 0) {\r\n title = `+${AvailableResourceLength} more relevant resources`;\r\n\r\n let queryString = \"\";\r\n\r\n if (!EC_Fmt.isNull(search)) {\r\n queryString = `SearchStr=${encodeURIComponent(search)}`;\r\n } else if (ApplicationID > 0) {\r\n queryString = `ApplicationID=${ApplicationID}`;\r\n }\r\n\r\n Url = `Home?DashboardID=184447&${queryString}`;\r\n } else {\r\n title = `${AvailableResourceLength} total resources available`;\r\n Url = \"Home?DashboardID=184447&\";\r\n }\r\n\r\n html += ``\r\n + `${title}`\r\n + `View all`\r\n + \"\";\r\n }\r\n\r\n helpContent.innerHTML = html;\r\n\r\n const helpClear = helpEmpty.querySelector(\".ecp-help-clear\");\r\n if (helpClear) {\r\n helpClear.addEventListener(\"click\", () => {\r\n const helpDialogInput = document.getElementById(\"ecp-help-dialog-input\");\r\n helpDialogInput.value = \"\";\r\n helpDialogInput.querySelector(\"input\").value = \"\";\r\n WriteCurrentHelpResources();\r\n });\r\n }\r\n\r\n ECP.Dialog.HideLoading();\r\n}\r\n"],"names":["EWS","Ready","UserType","requestIdleCallback","InitEncompassHelp","let","bevMenu","pageHeader","document","querySelector","IsImpersonateUser","notDSDLink","window","location","hostname","Distributor","ecpHelpButton","createElement","setAttribute","id","insertBefore","children","length","addEventListener","helpMenu","getElementById","WriteEncompassHelpMenu","WriteCurrentHelpResources","ShowMenu","event","currentTarget","whatsNewPopUp","EC_Fmt","isMobile","GetCookie","GetPageParameter","setTimeout","whatsNewAttention","classList","add","innerHTML","Trn","Left","ECPVersion","body","appendChild","releaseNotesButton","dismissButton","clickWhatsNewButton","style","display","myRequest","ECP","EC_Request","SetReturnType","EC_ReturnType","Text","AddRequestVariable","Submit","DeleteCookie","open","shadowRoot","EnableBetaDialog","whatsNewRectangle","getBoundingClientRect","top","height","html","AfterInput","async","_","search","result","await","WriteEncompassHelpContent","askBevItem","pageDescription","context","encodeURIComponent","innerText","Settings","DashboardID","CommonDashboards","TableView","TableEdit","TableMerge","TableCopy","getAttribute","HtmlStrToElement","AuthenticationID","isSmallScreen","innerWidth","maxHeight","iFrame","helpContent","timer","Dialog","ShowLoading","clearTimeout","minHeight","helpEmpty","AvailableResourceLength","ResourceResult","ApplicationID","i","ApplicationObj","j","HelpResources","HelpResourcesObj","Url","HelpResourcesID","Notes","Title","isNull","Application","title","message","emptyHtml","queryString","helpClear","helpDialogInput","value","HideLoading"],"mappings":"AAAA,aAEAA,IAAIC,MAAM,KACN,GAAIC,WAAa,QAAS,CACtBC,oBAAoB,KAChBC,kBAAkB,CACtB,CAAC,CACL,CACJ,CAAC,EAEDC,IAAIC,QAEJ,SAASF,oBACL,MAAMG,EAAaC,SAASC,cAAc,gBAAgB,EAE1D,GAAIF,GAAc,CAACG,kBAAmB,CAClC,MAAMC,EAAaC,OAAOC,SAASC,WAAa,eAAiBF,OAAOC,SAASC,WAAa,0BAA4BC,cAAgB,UAC1I,MAAMC,EAAgBR,SAASS,cAAc,SAAS,EACtDD,EAAcE,aAAa,OAAQ,OAAO,EAC1CF,EAAcE,aAAa,OAAQ,OAAO,EAC1CF,EAAcE,a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