|
|
@ -193,6 +193,14 @@ function csvEscape(value = '') {
|
|
|
|
return String(value).replace(/"/g, '""')
|
|
|
|
return String(value).replace(/"/g, '""')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function parseEmail(fullEmail) {
|
|
|
|
|
|
|
|
const email = fullEmail.replace(/^[^<]*<([^>]+)>/, '$1')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [name, title] = fullEmail.replace(/ <([^>]+)>$/, '').split(' -- ')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { email, name, title }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Popup = {
|
|
|
|
const Popup = {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Initialise popup
|
|
|
|
* Initialise popup
|
|
|
@ -758,13 +766,32 @@ const Popup = {
|
|
|
|
a.href = value.to
|
|
|
|
a.href = value.to
|
|
|
|
a.textContent = value.text
|
|
|
|
a.textContent = value.text
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
if (['email', 'verifiedEmail', 'safeEmail'].includes(key)) {
|
|
|
|
['social', 'keywords'].includes(set) ||
|
|
|
|
const { email, name, title } = parseEmail(value.text)
|
|
|
|
['phone', 'email'].includes(key)
|
|
|
|
|
|
|
|
) {
|
|
|
|
a.textContent = email
|
|
|
|
a.classList.add('chip')
|
|
|
|
|
|
|
|
|
|
|
|
const elName = document.createElement('span')
|
|
|
|
|
|
|
|
const elTitle = document.createElement('span')
|
|
|
|
|
|
|
|
const elBreak1 = document.createElement('br')
|
|
|
|
|
|
|
|
const elBreak2 = document.createElement('br')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elName.textContent = name
|
|
|
|
|
|
|
|
elTitle.textContent = `${title}`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elTitle.className = 'light-text'
|
|
|
|
|
|
|
|
|
|
|
|
td.appendChild(a)
|
|
|
|
td.appendChild(a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (name) {
|
|
|
|
|
|
|
|
td.appendChild(elBreak1)
|
|
|
|
|
|
|
|
td.appendChild(elName)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (title) {
|
|
|
|
|
|
|
|
td.appendChild(elBreak2)
|
|
|
|
|
|
|
|
td.appendChild(elTitle)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
div.appendChild(a)
|
|
|
|
div.appendChild(a)
|
|
|
|
td.appendChild(div)
|
|
|
|
td.appendChild(div)
|
|
|
@ -774,14 +801,18 @@ const Popup = {
|
|
|
|
|
|
|
|
|
|
|
|
const [name, title] = value.split(' -- ')
|
|
|
|
const [name, title] = value.split(' -- ')
|
|
|
|
|
|
|
|
|
|
|
|
const strong = document.createElement('strong')
|
|
|
|
const elName = document.createElement('span')
|
|
|
|
const span = document.createElement('span')
|
|
|
|
const elTitle = document.createElement('span')
|
|
|
|
|
|
|
|
const elBreak = document.createElement('br')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elTitle.className = 'light-text'
|
|
|
|
|
|
|
|
|
|
|
|
strong.textContent = name
|
|
|
|
elName.textContent = name
|
|
|
|
span.textContent = title
|
|
|
|
elTitle.textContent = title
|
|
|
|
|
|
|
|
|
|
|
|
div.appendChild(strong)
|
|
|
|
div.appendChild(elName)
|
|
|
|
div.appendChild(span)
|
|
|
|
div.appendChild(elBreak)
|
|
|
|
|
|
|
|
div.appendChild(elTitle)
|
|
|
|
td.appendChild(div)
|
|
|
|
td.appendChild(div)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
attributeValues[key].push(value)
|
|
|
|
attributeValues[key].push(value)
|
|
|
|