{"version":3,"file":"render.mjs","sources":["src/common.mjs","src/render.mjs"],"sourcesContent":["/**\n * Common utilities class\n * Invoked by both render.mjs and compile.mjs\n */\nexport default class {\n\t/**\n\t * Fetch a set of assets of a given type based on a set of id values\n\t * @param {array} arIDs array of id strings representing assets to fetch\n\t * @param {string} strAssetType the asset type represented by the id values\n\t * @param {object} contentClient Content client used to fetch assets\n\t * @param {string} strFields comma separated list of fields to fetch\n\t * @returns object response from the server, hopefully with a .items result\n\t */\n\tstatic async fetchAssets(arIDs, strAssetType, contentClient, strFields) {\n\t\t// Assemble the id values together as a set of\n\t\t// 'id eq \"somevalue\"' strings joined together with \"or\" statements\n\t\tconst strIDs = arIDs.map((id) => `id eq \"${id}\"`).join(' OR ');\n\n\t\t// Assemble the full query string\n\t\tconst strQuery = `(type eq \"${strAssetType}\" AND (${strIDs}))`;\n\n\t\t// Perform our search\n\t\tconst objToReturn = await contentClient.queryItems({\n\t\t\tq: strQuery,\n\t\t\tfields: strFields,\n\t\t\tlinks: 'none',\n\t\t});\n\n\t\t//response data\n\t\treturn objToReturn;\n\t}\n\n\t/**\n\t * Lookup site config id and return a specific set of fields\n\t * @param {object} contentClient\n\t * @param {object} objAPI SCSRenderAPI or SCSCompileAPI depending on context\n\t * @returns\n\t */\n\tstatic async fetchSiteConfig(contentClient, objAPI) {\n\t\tconst strSiteConfigID = objAPI.getCustomSiteProperty('siteConfig');\n\n\t\t// Setup a list of fields to load with the site config\n\t\tconst arFields = [\n\t\t\t'fields.social_media_icons',\n\t\t\t'fields.legal_links',\n\t\t\t'fields.division_links_column_1',\n\t\t\t'fields.division_links_column_2',\n\t\t\t'fields.division_links_column_3',\n\t\t\t'fields.newsletter',\n\t\t\t'fields.structure_map',\n\t\t];\n\n\t\t// Using the site configuration's id, we fetch the site config and only expand the neccessary fields\n\t\treturn contentClient.getItem({\n\t\t\tid: strSiteConfigID,\n\t\t\texpand: arFields.join(','),\n\t\t\tlinks: 'none',\n\t\t});\n\t}\n\n\t/**\n\t * Expanding the legal links field\n\t * @param {object} objModel site configuration fields and view model\n\t * @param {object} contentClient\n\t */\n\tstatic async setupLegalLinks(objModel, contentClient) {\n\t\t// Assemble the legal link asset ids\n\t\tconst arLegalLinkIDs = objModel.fields.legal_links.map((i) => i.id);\n\n\t\t// Assemble the asset data with specified fields for all the legal link assets\n\t\tconst objLegalLinkAssets = await this.fetchAssets(\n\t\t\tarLegalLinkIDs,\n\t\t\t'MNH_Link',\n\t\t\tcontentClient,\n\t\t\t'fields.innerText,fields.url,fields.target,fields.anchor_id'\n\t\t);\n\n\t\t// Set legal links asset data into the model\n\t\tobjModel.fields.legal_links = objLegalLinkAssets.items;\n\t}\n\n\t/**\n\t * Expanding the Social_Media_Icons field\n\t * @param {object} objModel\n\t * @param {object} contentClient\n\t */\n\tstatic async setupSocialMediaLinks(objModel, contentClient) {\n\t\t// Assemble the social media icon asset ids\n\t\tconst arSocialMediaIconIDs = objModel.fields.social_media_icons.fields.link.map(\n\t\t\t(i) => i.id\n\t\t);\n\n\t\t// Assemble the asset data with specified fields for all the social media icon assets\n\t\tconst objSocialMediaAssets = await this.fetchAssets(\n\t\t\tarSocialMediaIconIDs,\n\t\t\t'MNH_Link',\n\t\t\tcontentClient,\n\t\t\t'fields.innerText,fields.url,fields.target,fields.icon,fields.dark_icon'\n\t\t);\n\n\t\t// set up media icon urls and default any empty accessibility titles\n\t\tconst arSocialMediaAssets = objSocialMediaAssets.items.map((objAsset) => {\n\t\t\tobjAsset.fields.icon.src = contentClient.getRenditionURL({\n\t\t\t\tid: objAsset.fields.icon.id,\n\t\t\t});\n\t\t\tobjAsset.fields.dark_icon.src = contentClient.getRenditionURL({\n\t\t\t\tid: objAsset.fields.dark_icon.id,\n\t\t\t});\n\n\t\t\tif (objAsset.fields.title == null) {\n\t\t\t\tobjAsset.fields.title = objAsset.fields.innerText;\n\t\t\t}\n\t\t\treturn objAsset;\n\t\t});\n\n\t\t// Set social media asset data into the model\n\t\tobjModel.fields.social_media_icons = arSocialMediaAssets;\n\n\t\t// sort the social media icons by order in which the IDs were entered from the arSocialMediaIconIDs array\n\t\tobjModel.fields.social_media_icons.sort((a, b) => {\n\t\t\treturn arSocialMediaIconIDs.indexOf(a.id) - arSocialMediaIconIDs.indexOf(b.id);\n\t\t});\n\t}\n\n\t/** Returns HTML of this template. Adds properties onto view model.\n\t * @param {object} objCommonContext\n\t * @returns rendered html which is the combination of the data and the template\n\t */\n\tstatic async shapeData(objCommonContext) {\n\t\t// extract all the required dependencies from the objCommonContext\n\t\tconst objAPI = objCommonContext.api;\n\t\tconst contentClient = objCommonContext.contentClient;\n\t\tconst Mustache = objCommonContext.Mustache;\n\n\t\t// fetch site config which we will use as the basis for our view model\n\t\tconst objModel = await this.fetchSiteConfig(contentClient, objAPI);\n\n\t\t// Add a ThisYear property to the Model\n\t\tobjModel.ThisYear = new Date().getFullYear();\n\n\t\t//function calls to expand legal links field and social media field respectively\n\t\tawait this.setupLegalLinks(objModel, contentClient);\n\t\tawait this.setupSocialMediaLinks(objModel, contentClient);\n\n\t\t//setting the eho logo url on the model\n\t\tobjModel.fields.equal_housing_opportunity_logo.url = contentClient.getRenditionURL({\n\t\t\tid: objModel.fields.equal_housing_opportunity_logo.id,\n\t\t});\n\t\treturn objModel;\n\t}\n\n\tstatic renderModel(objCommonContext, template, objModel) {\n\t\t/**\n\t\t * Expand custom macros in the returned HTML\n\t\t * @param {string} strInput\n\t\t * @param {boolean} boolNotMain\n\t\t * @param {object} objModel\n\t\t * @returns {string} HTML string with macros expanded\n\t\t */\n\t\tconst expandMacros = (strInput, boolNotMain, objModel) => {\n\t\t\tif (!boolNotMain) {\n\t\t\t\t// replace \"[[page-221]]\" with \"[!--$SCS_PAGE--]221[/!--$SCS_PAGE--]\"\n\t\t\t\tlet strOutput = strInput.replace(\n\t\t\t\t\t/\\[\\[page-(\\d+)\\]\\]/g,\n\t\t\t\t\t'[!--$SCS_PAGE--]$1[/!--$SCS_PAGE--]'\n\t\t\t\t);\n\n\t\t\t\t// replace \"[[asset-221]]\" with \"[!--$CEC_DIGITAL_ASSET--]221[/--$CEC_DIGITAL_ASSET--]\"\n\t\t\t\tstrOutput = strOutput.replace(/\\[\\[asset-(\\w+)\\]\\]/g, (group) => {\n\t\t\t\t\tconst strAssetId = group\n\t\t\t\t\t\t.replace('[[asset-', '')\n\t\t\t\t\t\t.replace(']]', '')\n\t\t\t\t\t\t.split(',')[0];\n\t\t\t\t\treturn this.contentClient.getRenditionURL({\n\t\t\t\t\t\t'id': group.replace('[[asset-', '').replace(']]', '').split(',')[0],\n\t\t\t\t\t\t'download':\n\t\t\t\t\t\t\tgroup.replace('[[asset-', '').replace(']]', '').split(',')[1] || false,\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t//replace [[phone-111-222-3333]] with 111.222.3333\n\t\t\t\tstrOutput = strOutput.replace(\n\t\t\t\t\t/\\[\\[phone-(\\d{3})-(\\d{3})-(\\d{4})\\]\\]/g,\n\t\t\t\t\t'$1.$2.$3'\n\t\t\t\t);\n\n\t\t\t\t//replace [[phone-1-222-333-4444]] with +1 222.333.4444\n\t\t\t\tstrOutput = strOutput.replace(\n\t\t\t\t\t/\\[\\[phone-(\\d{1,2})-(\\d{3})-(\\d{3})-(\\d{4})\\]\\]/g,\n\t\t\t\t\t'+$1 $2.$3.$4'\n\t\t\t\t);\n\n\t\t\t\tstrOutput = contentClient.expandMacros(strOutput);\n\t\t\t\treturn strOutput;\n\t\t\t} else {\n\t\t\t\tlet strOutput = strInput;\n\t\t\t\tconst structureMap = JSON.parse(objModel.fields.structure_map);\n\t\t\t\tfor (const [key, value] of Object.entries(structureMap)) {\n\t\t\t\t\tstrOutput = strOutput.replaceAll(\n\t\t\t\t\t\t`[[page-${value.id}]]`,\n\t\t\t\t\t\t'https://mnhousing.gov/' + value.pageUrl\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// replace \"[[asset-221]]\" with \"[!--$CEC_DIGITAL_ASSET--]221[/--$CEC_DIGITAL_ASSET--]\"\n\t\t\t\tstrOutput = strOutput.replace(/\\[\\[asset-(\\w+)\\]\\]/g, (group) => {\n\t\t\t\t\tconst strAssetId = group\n\t\t\t\t\t\t.replace('[[asset-', '')\n\t\t\t\t\t\t.replace(']]', '')\n\t\t\t\t\t\t.split(',')[0];\n\t\t\t\t\treturn this.contentClient.getRenditionURL({\n\t\t\t\t\t\t'id': group.replace('[[asset-', '').replace(']]', '').split(',')[0],\n\t\t\t\t\t\t'download':\n\t\t\t\t\t\t\tgroup.replace('[[asset-', '').replace(']]', '').split(',')[1] || false,\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t//replace [[phone-111-222-3333]] with 111.222.3333\n\t\t\t\tstrOutput = strOutput.replace(\n\t\t\t\t\t/\\[\\[phone-(\\d{3})-(\\d{3})-(\\d{4})\\]\\]/g,\n\t\t\t\t\t'$1.$2.$3'\n\t\t\t\t);\n\t\t\t\t//replace [[phone-1-222-333-4444]] with +1 222.333.4444\n\t\t\t\tstrOutput = strOutput.replace(\n\t\t\t\t\t/\\[\\[phone-(\\d{1,2})-(\\d{3})-(\\d{3})-(\\d{4})\\]\\]/g,\n\t\t\t\t\t'+$1 $2.$3.$4'\n\t\t\t\t);\n\n\t\t\t\tstrOutput = contentClient.expandMacros(strOutput);\n\t\t\t\treturn strOutput;\n\t\t\t}\n\t\t};\n\n\t\tconst Mustache = objCommonContext.Mustache;\n\t\tconst contentClient = objCommonContext.contentClient;\n\t\t// Render the contents\n\t\t// First render marries asset data with the template\n\t\t// Second render marries mustache tokens from within the asset data\n\t\t// to the model, example {{ThisYear}}\n\t\tlet strRenderedHTML = Mustache.render(template, objModel);\n\t\tstrRenderedHTML = Mustache.render(strRenderedHTML, objModel);\n\t\tlet html = expandMacros(strRenderedHTML, objCommonContext.boolNotMain, objModel);\n\t\treturn html;\n\t}\n}\n","import CommonUtils from './common.mjs';\n\n/**\n * The Custom Component class will be the \"default\" export from the module\n */\nexport default class {\n\n\t/**\n\t * Constructor\n\t * @param {object} objArgs used to get bring the SitesSDK into the project\n\t */\n\tconstructor(objArgs) {\n\t\t// store the path to the /assets folder\n\t\tthis.assetsPath = import.meta.url.replace('/render.mjs', '');\n\n\t\t// get the OCM environment resources\n\t\tthis.sitesSDK = objArgs.SitesSDK;\n\t\tthis.Mustache = SCSRenderAPI.getMustache();\n\t}\n\n\t// insert the component's HTML into the page\n\t// after it has added the component, it applies any clickHandlers to elements that were added to the page\n\trenderComponent() {\n\t\tconst objCommonContext = {\n\t\t\tMustache: this.Mustache,\n\t\t\tcomponentLayout: this.sitesSDK.getProperty('componentLayout'),\n\t\t\tcustomSettingsData: this.sitesSDK.getProperty('customSettingsData'),\n\t\t\tcontentClient: this.sitesSDK.getProperty('contentClient'),\n\t\t\tapi: SCSRenderAPI,\n\t\t\tboolNotMain: SCSRenderAPI.siteInfo.properties.siteName !== 'MN-Housing',\n\t\t};\n\t\tconst dateCurrent = new Date()\n\t\t//dateToday in format mm/dd/yyyy - changed from mm/dd/yy for decision made on 12/28/2022\n\t\tconst dateToday = dateCurrent.getMonth() + 1 + \"/\" + dateCurrent.getDate() + \"/\" + dateCurrent.getFullYear()\n\t\tPromise.all([\n\t\t\tSCSRenderAPI.importText(this.assetsPath + '/template.html'),\n\t\t\tSCSRenderAPI.importCSS(this.assetsPath + '/styles/design.css'),\n\t\t]).then(async (componentResources) => {\n\t\t\tobjCommonContext.template = componentResources[0];\n\t\t\tobjCommonContext.css = componentResources[1];\n\n\t\t\t// use the common code to generate the HTML for this component based on the componentLayout and customSettingsData\n\t\t\tconst objModel = await CommonUtils.shapeData(objCommonContext);\n\t\t\tconst componentHTML = await CommonUtils.renderModel(objCommonContext, objCommonContext.template, objModel);\n\n\t\t\t// replace the content of the container with the rendered HTML\n\t\t\tthis.container.innerHTML = componentHTML;\n\t\t\tdocument.querySelector(\".printFooter\").innerHTML=`Printed ${dateToday}`\n\t\t\tif (window.parent.location.href !== 'https://www.mnhousing.gov') this.updateUrls();\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {string} strContainer rendered HTML\n\t */\n\t// the render method is called to render the component dynamically onto the page\n\tasync render(container) {\n\t\tthis.container = container;\n\t\tawait this.renderComponent();\n\t}\n\n\thydrate(container) {\n\t\tthis.container = container;\n\t\tif (window.parent.location.href !== 'https://www.mnhousing.gov') this.updateUrls(container);\n\t}\n\tupdateUrls() {\n\t\tconst urls = this.container.querySelectorAll('a');\n\t\tconst hostname = window.parent.location.hostname;\n\t\tconst mnHousing = 'mnhousing.gov';\n\t\tconst wwwMNHousing = 'www.mnhousing.gov';\n\t\tconst ocmSitesUrl = window.parent.location.href.includes(\"oraclecloud.com/site/\");\n\t\t[...urls].forEach((url) => {\n\n\t\t\tconst urlObj = new URL(url.href);\n\t\t\tif ((urlObj.origin === 'https://mnhousing.gov' || urlObj.origin === 'https://www.mnhousing.gov') && (hostname !== mnHousing && hostname !== wwwMNHousing)){\n\t\t\t\tswitch (SCSRenderAPI.renderMode) {\n\t\t\t\t\tcase \"preview\":\n\t\t\t\t\t\turl.setAttribute(\"href\", `/sites/preview/MN-Housing/en-US${urlObj.pathname}`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"view\":\n\t\t\t\t\t\turl.setAttribute(\"href\", ocmSitesUrl ? `/site/MN-Housing${urlObj.pathname}` : `https://www.mnhousing.gov${urlObj.pathname}`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"],"names":["CommonUtils","static","arIDs","strAssetType","contentClient","strFields","strIDs","map","id","join","queryItems","q","strQuery","fields","links","objAPI","strSiteConfigID","getCustomSiteProperty","getItem","expand","objModel","legal_links","i","objLegalLinkAssets","this","fetchAssets","arLegalLinkIDs","items","arSocialMediaIconIDs","social_media_icons","link","objAsset","icon","src","getRenditionURL","dark_icon","title","innerText","arSocialMediaAssets","sort","a","b","indexOf","objCommonContext","api","Mustache","fetchSiteConfig","ThisYear","getFullYear","setupLegalLinks","setupSocialMediaLinks","equal_housing_opportunity_logo","url","template","render","strRenderedHTML","html","strInput","boolNotMain","strOutput","structureMap","JSON","parse","structure_map","key","value","Object","entries","replaceAll","pageUrl","replace","group","split","download","expandMacros","constructor","objArgs","assetsPath","import","meta","sitesSDK","SitesSDK","SCSRenderAPI","getMustache","renderComponent","componentLayout","getProperty","customSettingsData","siteInfo","properties","siteName","dateCurrent","Date","dateToday","getMonth","getDate","Promise","all","importText","importCSS","then","async","componentResources","css","shapeData","componentHTML","renderModel","container","innerHTML","document","querySelector","window","parent","location","href","updateUrls","hydrate","urls","querySelectorAll","hostname","ocmSitesUrl","includes","forEach","urlObj","origin","renderMode","setAttribute","pathname","concat"],"mappings":"MAIqBA,EASIC,yBAACC,EAAOC,EAAcC,EAAeC,GAG5D,MAAYC,EAAGJ,EAAMK,KAAKC,GAAiBA,UAAAA,OAAAA,SAAOC,KAAK,UAGzBN,aAAAA,OAAAA,EAAsBG,WAAAA,OAAAA,QAUpD,aAP0BF,EAAcM,WAAW,CAClDC,EAAGC,EACHC,OAAQR,EACRS,MAAO,QAKR,CAQ2Bb,6BAACG,EAAeW,GAC3C,MAAMC,EAAkBD,EAAOE,sBAAsB,cAcrD,OAAOb,EAAcc,QAAQ,CAC5BV,GAAIQ,EACJG,OAbgB,CAChB,4BACA,qBACA,iCACA,iCACA,iCACA,oBACA,wBAMiBV,KAAK,KACtBK,MAAO,QAER,CAO2Bb,6BAACmB,EAAUhB,GAEtC,QAAuBgB,EAASP,OAAOQ,YAAYd,KAAKe,GAAMA,EAAEd,KAGxCe,QAASC,KAAKC,YACrCC,EACA,WACAtB,EACA,8DAIDgB,EAASP,OAAOQ,YAAcE,EAAmBI,KACjD,CAOiC1B,mCAACmB,EAAUhB,GAE5C,MAAMwB,EAAuBR,EAASP,OAAOgB,mBAAmBhB,OAAOiB,KAAKvB,KAC1Ee,GAAMA,EAAEd,cAIyBgB,KAAKC,YACvCG,EACA,WACAxB,EACA,2EAIgDuB,MAAMpB,KAAKwB,IAC3DA,EAASlB,OAAOm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