-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.c9c50b35.js.map
1 lines (1 loc) · 4.09 KB
/
index.c9c50b35.js.map
1
{"mappings":"AAAA,MAAMA,EAAY,CAChB,CACEC,KAAM,MACNC,IAAK,kBACLC,UAAW,IAAIC,KAAK,KAAM,GAC1BC,QAAS,MAEX,CACEJ,KAAM,gBACNC,IAAK,uBACLC,UAAW,IAAIC,KAAK,KAAM,GAC1BC,QAAS,IAAID,KAAK,KAAM,IAE1B,CACEH,KAAM,OACNC,IAAK,mBACLC,UAAW,IAAIC,KAAK,KAAM,GAC1BC,QAAS,IAAID,KAAK,KAAM,IAE1B,CACEH,KAAM,eACNC,IAAK,gCACLC,UAAW,IAAIC,KAAK,KAAM,IAC1BC,QAAS,IAAID,KAAK,KAAM,KAE1B,CACEH,KAAM,MACNC,IAAK,qBACLC,UAAW,IAAIC,KAAK,KAAM,GAC1BC,QAAS,IAAID,KAAK,KAAM,MC3B5B,MAAME,UAAsBC,YAC1BC,cACEC,QAEA,MAAMC,EAAWC,KAAKC,oBAEtBD,KAAKE,YAAYH,EAASI,QAAQC,WAAU,IAU9CC,wBAAwBC,GACtB,OAAQ,IAAMA,GAAYC,OAAM,GAQlCC,yBAAyBC,GACvB,MAAMC,EAAQD,EAAKE,WAAa,EAChC,MAAO,GAAGX,KAAKK,wBAAwBK,MAAUD,EAAKG,gBAGxDX,oBACE,MAAMF,EAAWc,SAASC,cAAc,YAyBxC,OAxBAf,EAASgB,UAAY,gDAEjB1B,EACC2B,KACCC,GACE,6IAEqCA,EAAQ1B,2EACrC0B,EAAQ3B,iKAKJU,KAAKQ,yBAAyBS,EAAQzB,0KAGtCyB,EAAQvB,QAAUM,KAAKQ,yBAAyBS,EAAQvB,SAAW,uFAKlFwB,KAAK,iBAGHnB,GAIXoB,OAAOC,eAAeC,OAAO,iBAAkB1B","sources":["js/companies.js","js/companies-list.js"],"sourcesContent":["const companies = [\n {\n name: 'OLX',\n url: 'https://olx.pt/',\n startDate: new Date(2022, 3),\n endDate: null\n },\n {\n name: 'Moxy & Uphold',\n url: 'https://moxy.studio/',\n startDate: new Date(2019, 9),\n endDate: new Date(2022, 2)\n },\n {\n name: 'Blip',\n url: 'https://blip.pt/',\n startDate: new Date(2018, 0),\n endDate: new Date(2019, 8)\n },\n {\n name: 'Pixelmatters',\n url: 'https://www.pixelmatters.com/',\n startDate: new Date(2016, 11),\n endDate: new Date(2017, 11)\n },\n {\n name: 'FYI',\n url: 'https://www.fyi.pt',\n startDate: new Date(2016, 3),\n endDate: new Date(2016, 10)\n }\n];\n\nexport { companies };\n","import { companies } from './companies';\n\nclass CompaniesList extends HTMLElement {\n constructor() {\n super();\n\n const template = this.getRenderTemplate();\n\n this.appendChild(template.content.cloneNode(true));\n }\n\n /**\n * Adds a leading zero when needed\n * @example 1 should be formatted to 01.\n * @example 10 should be formatted to 10.\n * @param {string} date The day or month to add a leading zero if needed\n * @memberof CompaniesList\n */\n getDateWithLeadingZeros(dayOrMonth) {\n return ('0' + dayOrMonth).slice(-2);\n }\n\n /**\n *\n * @param {Date} date The date to format in a Month/Year format.\n * @returns {string} The formatted date\n */\n formatDateToMonthAndYear(date) {\n const month = date.getMonth() + 1;\n return `${this.getDateWithLeadingZeros(month)}/${date.getFullYear()}`;\n }\n\n getRenderTemplate() {\n const template = document.createElement('template');\n template.innerHTML = `\n <ul class=\"company__container\">\n ${companies\n .map(\n company =>\n `<li class=\"company\" vocab=\"https://schema.org/\" typeof=\"Corporation\">\n <h3>\n <a class=\"company__name\" href=\"${company.url}\" rel=\"noopener\" target=\"_blank\" property=\"name\">\n ${company.name}\n </a>\n </h3>\n <p class=\"company__info\">\n <span class=\"company__time\">\n <time>${this.formatDateToMonthAndYear(company.startDate)}</time>\n <span class=\"company__arrow\"></span>\n <span class=\"company__arrow company__arrow--2\"></span>\n <time>${company.endDate ? this.formatDateToMonthAndYear(company.endDate) : 'Current day'}</time>\n </span>\n </p>\n </li>`\n )\n .join('')}\n </ul>`;\n\n return template;\n }\n}\n\nwindow.customElements.define('companies-list', CompaniesList);\n"],"names":["$0cb88e25c171dae2$export$d9f4fb13de619c2b","name","url","startDate","Date","endDate","$9d734edbf6717e15$var$CompaniesList","HTMLElement","constructor","super","template","this","getRenderTemplate","appendChild","content","cloneNode","getDateWithLeadingZeros","dayOrMonth","slice","formatDateToMonthAndYear","date","month","getMonth","getFullYear","document","createElement","innerHTML","map","company","join","window","customElements","define"],"version":3,"file":"index.c9c50b35.js.map"}