{"version":3,"file":"staff.min.js","sources":["../js/staff.js","../js/util/_loader.js"],"sourcesContent":["import debug from 'bows';\nimport Selectr from 'selectr';\nimport loader from './util/_loader';\n\nconst log = debug('staff');\n\nclass Staff {\n\n\tconstructor(opts = {}) {\n\t\tthis.defaultOpts = {\n\t\t\twpJson: '/wp-json/',\n\t\t\talpha: true\n\t\t}\n\t\tthis.opts = {};\n\n\t\tfor (var opt in opts) {\n\t\t\tthis.opts[opt] = (opts.hasOwnProperty(opt) && typeof opts[opt] !== 'undefined') ? opts[opt] : this.defaultOpts[opt];\n\t\t}\n\n\t\tthis.alphaGroups = {\n\t\t\t'A-F': 'ABCDEF'.split(''),\n\t\t\t'G-L': 'GHIJKL'.split(''),\n\t\t\t'M-Q': 'MNOPQ'.split(''),\n\t\t\t'R-W': 'RSTUVW'.split(''),\n\t\t\t'X-Z': 'XYZ'.split('')\n\t\t}\n\t\tthis.alphaGroupKeys = Object.keys(this.alphaGroups);\n\n\t\tthis.departments = {};\n\n\t\tconst select = document.querySelector('select.selectr');\n\t\tif (select) {\n\t\t\tthis.selectr = new Selectr('select.selectr', {\n\t\t\t\tplaceholder: 'Select One',\n\t\t\t\tdefaultSelected: false,\n\t\t\t\tallowDeselect: true\n\t\t\t});\n\n\t\t\tthis.selectr.on('selectr.change', (option) => {\n\t\t\t\tthis.filter(option.value);\n\t\t\t});\n\t\t}\n\n\t\tthis.loading = false;\n\t\tthis.opened = false;\n\t\tthis.cache = {};\n\n\t\tthis.template = `\n\t\t\t<div class=\"staff__modal-content\">\n\t\t\t\t<div class=\"staff__modal-col1\">\n\t\t\t\t\t<figure class=\"staff__modal-figure staff__modal-figure--desktop\">\n\t\t\t\t\t\t<img src=\"{{image}}\" alt=\"{{title}}\">\n\t\t\t\t\t</figure>\n\t\t\t\t\t<div class=\"staff__modal-quote--desktop\">\n\t\t\t\t\t\t{{quote}}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"staff__modal-col2\">\n\t\t\t\t\t<a href=\"#modal-close\" class=\"staff__modal-close\">&times;</a>\n\t\t\t\t\t<h3 class=\"staff__modal-name\">{{display_name}}</h3>\n\t\t\t\t\t<p class=\"staff__modal-title\"><strong>{{title}}</strong></p>\n\t\t\t\t\t<hr class=\"hr--short hr--left\">\n\n\t\t\t\t\t<figure class=\"staff__modal-figure staff__modal-figure--mobile\">\n\t\t\t\t\t\t<img src=\"{{image}}\" alt=\"{{title}}\">\n\t\t\t\t\t</figure>\n\t\t\t\t\t<div class=\"staff__modal-quote--mobile\">\n\t\t\t\t\t\t{{quote}}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{{content}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`.trim();\n\n\t\tthis.modal = document.createElement('div');\n\t\tthis.modal.classList.add('staff__modal');\n\t\tthis.modal.addEventListener('click', (e) => {\n\t\t\tif (e.target.matches('a[href=\"#modal-close\"]') || e.target === this.modal) {\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t});\n\t\tdocument.body.addEventListener('keyup', this.keyup.bind(this));\n\n\t\tthis.list = document.querySelector('.staff__list-content');\n\t\tthis.members = Array.from(document.querySelectorAll('.staff__member'));\n\n\t\tthis.loader = document.createElement('div');\n\t\tthis.loader.classList.add('staff__loader');\n\t\tthis.loader.insertAdjacentHTML('beforeend', loader);\n\n\t\tif (this.members.length) {\n\t\t\tthis.list.addEventListener('click', (e) => {\n\t\t\t\tif (this.loading === true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet node = e.target;\n\t\t\t\twhile (!node.matches('.staff__member')) {\n\t\t\t\t\tif (node === this.list) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\tthis.load( node );\n\t\t\t});\n\n\t\t\tthis.members.forEach((member) => {\n\t\t\t\tconst departments = member.dataset.departments.trim().split(' ');\n\t\t\t\tdepartments.forEach((dpmnt) => {\n\t\t\t\t\tif (!this.departments[dpmnt]) {\n\t\t\t\t\t\tthis.departments[dpmnt] = [];\n\t\t\t\t\t}\n\t\t\t\t\tthis.departments[dpmnt].push(member);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tif (this.opts.alpha) {\n\t\t\tlog('alpha', this.opts.alpha);\n\t\t\tthis.nav = document.querySelector('.staff__nav');\n\t\t\tthis.navItems = Array.from(document.querySelectorAll('.staff__nav .staff__nav-item'));\n\t\t\tif (this.navItems.length) {\n\t\t\t\tthis.nav.addEventListener('click', (e) => {\n\t\t\t\t\tlet node = e.target;\n\t\t\t\t\twhile (!node.matches('.staff__nav-item a')) {\n\t\t\t\t\t\tif (node === this.nav) {\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.paginate(node);\n\t\t\t\t});\n\n\t\t\t\tthis.navPrevious = this.navItems.filter((item) => item.matches('.staff__nav-item--prev')).shift();\n\t\t\t\tthis.navNext = this.navItems.filter((item) => item.matches('.staff__nav-item--next')).shift();\n\t\t\t}\n\n\t\t\tlet activeGroup = this.navItems.filter((item) => item.classList.contains('staff__nav-item--active'));\n\t\t\tif (activeGroup) {\n\t\t\t\tthis.paginate(activeGroup.shift().querySelector('a'), true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.showAll();\n\t\t}\n\n\t\tif (window.location.hash) {\n\t\t\tlet openMember = document.querySelector(`.staff__member[data-slug=\"${window.location.hash.substr(1)}\"]`);\n\t\t\tlog(openMember);\n\t\t\tif (openMember) {\n\t\t\t\tthis.load(openMember);\n\t\t\t}\n\t\t}\n\n\t\tdocument.body.classList.add('staff--active');\n\t}\n\n\tload(member) {\n\t\tif (this.cache[member.dataset.id]) {\n\t\t\tthis.open(member);\n\t\t\treturn;\n\t\t}\n\n\t\tconst promise = new Promise((resolve, reject) => {\n\t\t\tmember.classList.add('staff__member--loading');\n\t\t\tmember.appendChild(this.loader);\n\t\t\tthis.loading = true;\n\n\t\t\tconst endpoint = `${(member.dataset.national === '1') ? '/wp-json/' : this.opts.wpJson}wp/v2/staff/${member.dataset.id}`;\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open('GET', endpoint);\n\t\t\txhr.addEventListener('load', () => {\n\t\t\t\tif (xhr.status >= 200 && xhr.status < 300) {\n\t\t\t\t\tconst data = JSON.parse(xhr.responseText);\n\t\t\t\t\tresolve(data);\n\t\t\t\t} else {\n\t\t\t\t\treject('HTTP Error');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tlog('promise', xhr);\n\t\t\txhr.send();\n\t\t}).then((data) => {\n\t\t\tconsole.log(data);\n\t\t\tthis.cache[member.dataset.id] = data;\n\t\t\tmember.classList.remove('staff__member--loading');\n\t\t\tthis.loader.parentNode.removeChild(this.loader);\n\t\t\tthis.loading = false;\n\n\t\t\tthis.open(member);\n\t\t}).catch((e) => {\n\t\t\tlog(e);\n\t\t});\n\t}\n\n\topen( member ) {\n\t\tconsole.log(this.cache[member.dataset.id]);\n\n\t\tconst data = this.cache[member.dataset.id];\n\n\t\tlet tpl = new String(this.template);\n\t\ttpl = tpl.replace(/{{title}}/g, data.staff_data.title)\n\t\t\t.replace(/{{image}}/g, data.staff_data.image)\n\t\t\t.replace(/{{content}}/g, data.content.rendered)\n\t\t\t.replace(/{{display_name}}/g, data.staff_data.display_name)\n\t\t\t.replace(/{{thumbnail}}/g, data.staff_data.thumbnail)\n\t\t\t.replace(/{{quote}}/g, data.staff_data.quote)\n\t\t\t.replace(/{{(.*)}}/g, '');\n\n\t\tthis.modal.insertAdjacentHTML('beforeend', tpl);\n\n\t\tthis.opened = true;\n\t\tdocument.body.appendChild(this.modal);\n\t\tdocument.documentElement.style.overflow = 'hidden';\n\n\t\tsetTimeout(() => {\n\t\t\tthis.modal.style.opacity = 1;\n\t\t}, 5);\n\t}\n\n\tclose() {\n\t\tlet transend = () => {\n\t\t\tthis.modal.innerHTML = '';\n\t\t\tthis.modal.parentNode.removeChild(this.modal);\n\t\t\tthis.modal.removeEventListener('transitionend', transend);\n\t\t}\n\n\t\tthis.opened = false;\n\t\tthis.modal.addEventListener('transitionend', transend);\n\t\tthis.modal.style.opacity = 0;\n\t\tdocument.documentElement.style.overflow = '';\n\t}\n\n\tkeyup(e) {\n\t\tif (e.which === 27 && this.opened) {\n\t\t\tthis.close();\n\t\t\tdocument.body.removeEventListener('keyup', this.keyup.bind(this));\n\t\t}\n\t}\n\n\tfilter(department) {\n\t\tlog('filter', department);\n\t\tthis.members.forEach((member) => {\n\t\t\tif (this.departments[department].indexOf(member) > -1) {\n\t\t\t\tmember.classList.add('staff__member--active');\n\t\t\t} else {\n\t\t\t\tmember.classList.remove('staff__member--active');\n\t\t\t}\n\t\t});\n\n\t\tthis.navPrevious.classList.add('staff__nav-item--disabled');\n\t\tthis.navNext.classList.add('staff__nav-item--disabled');\n\n\t\tthis.navItems.filter((item) => item.classList.contains('staff__nav-item--active')).forEach((item) => {\n\t\t\titem.classList.remove('staff__nav-item--active');\n\t\t});\n\t}\n\n\tpaginate(node, showPriority = false) {\n\t\tlet group = node.hash.replace(/^#staff-/, '').toUpperCase();\n\n\t\tif (group === 'PREVIOUS' || group === 'NEXT') {\n\t\t\tlet alphaGroupIndex = this.alphaGroupKeys.indexOf(this.activeGroup);\n\t\t\tgroup = this.alphaGroupKeys[((group === 'NEXT') ? alphaGroupIndex + 1 : alphaGroupIndex - 1)];\n\n\t\t\tif (group < 0) {\n\t\t\t\tgroup = this.alphaGroupKeys[0];\n\t\t\t} else if (group >= this.alphaGroupKeys.length) {\n\t\t\t\tgroup = this.alphaGroupKeys[this.alphaGroupKeys.length - 1];\n\t\t\t}\n\t\t}\n\n\t\tthis.activeGroup = group;\n\t\tthis.activeGroupIndex = this.alphaGroupKeys.indexOf(this.activeGroup);\n\n\t\tthis.members.forEach((member) => {\n\t\t\tif (this.alphaGroups[this.activeGroup].indexOf(member.dataset.group) > -1 || (showPriority === true && member.classList.contains('staff__member--priority'))) {\n\t\t\t\tmember.classList.add('staff__member--active');\n\t\t\t} else {\n\t\t\t\tmember.classList.remove('staff__member--active');\n\t\t\t}\n\t\t});\n\n\t\tthis.navItems.filter((item) => item.classList.contains('staff__nav-item--active')).forEach((item) => {\n\t\t\titem.classList.remove('staff__nav-item--active');\n\t\t});\n\n\t\tthis.navItems.filter((item) => item.dataset.group === this.activeGroup).forEach((item) => {\n\t\t\titem.classList.add('staff__nav-item--active');\n\t\t});\n\n\t\tthis.navItems.filter((item) => item.matches('.staff__nav-item--disabled')).forEach((item) => {\n\t\t\titem.classList.remove('staff__nav-item--disabled');\n\t\t});\n\n\t\tif (this.activeGroup === this.alphaGroupKeys[0]) {\n\t\t\tthis.navPrevious.classList.add('staff__nav-item--disabled');\n\t\t\tthis.navNext.classList.remove('staff__nav-item--disabled');\n\t\t} else if (this.activeGroupIndex === this.alphaGroupKeys.length - 1) {\n\t\t\tthis.navPrevious.classList.remove('staff__nav-item--disabled');\n\t\t\tthis.navNext.classList.add('staff__nav-item--disabled');\n\t\t} else {\n\t\t\tthis.navPrevious.classList.remove('staff__nav-item--disabled');\n\t\t\tthis.navNext.classList.remove('staff__nav-item--disabled');\n\t\t}\n\n\t\tif (this.selectr) {\n\t\t\tthis.selectr.reset('');\n\t\t}\n\t\tlog(window.pageYOffset, this.list.getBoundingClientRect().top, window.pageYOffset + this.list.getBoundingClientRect().top);\n\n\t\tlet scrollTo = window.pageYOffset + this.list.getBoundingClientRect().top;\n\t\tif (scrollTo < document.documentElement.scrollTop) {\n\t\t\twindow.scrollTo( 0,  scrollTo);\n\t\t}\n\n\t\tlog('paginate', node, group, this.alphaGroups[this.activeGroup]);\n\t}\n\n\tshowAll() {\n\t\tthis.members.forEach((member) => {\n\t\t\tmember.classList.add('staff__member--active');\n\t\t});\n\t}\n}\n\nexport default Staff;\n","export default `<svg class=\"svg--loader\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 512 512\">\n\t<path d=\"M208 464c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM0 256c0-26.51 21.491-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM416 256c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM60.922 108.922c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM355.078 403.078c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM60.922 403.078c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48zM355.078 108.922c0-26.51 21.49-48 48-48s48 21.49 48 48c0 26.51-21.49 48-48 48s-48-21.49-48-48z\"></path>\n</svg>`.trim();\n"],"names":["Staff","opts","opt","openMember","this","defaultOpts","wpJson","alpha","hasOwnProperty","alphaGroups","A-F","split","G-L","M-Q","R-W","X-Z","alphaGroupKeys","Object","keys","departments","document","querySelector","selectr","Selectr","placeholder","defaultSelected","allowDeselect","on","option","filter","value","loading","opened","cache","template","trim","modal","createElement","classList","add","addEventListener","e","target","matches","preventDefault","close","body","keyup","bind","list","members","Array","from","querySelectorAll","loader","insertAdjacentHTML","length","let","node","stopPropagation","parentNode","load","forEach","member","dataset","dpmnt","push","log","nav","navItems","paginate","navPrevious","item","shift","navNext","activeGroup","contains","showAll","window","location","hash","substr","debug","id","open","Promise","resolve","reject","appendChild","const","endpoint","national","xhr","XMLHttpRequest","data","status","JSON","parse","responseText","send","then","console","remove","removeChild","catch","tpl","String","replace","staff_data","title","image","content","rendered","display_name","thumbnail","quote","documentElement","style","overflow","setTimeout","opacity","transend","innerHTML","removeEventListener","which","department","indexOf","showPriority","group","toU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