This commit is contained in:
2024-06-07 16:15:42 +08:00
parent ea7f4f538a
commit 614a983aa8
15 changed files with 834 additions and 464 deletions

View File

@ -276,6 +276,7 @@ export default class CustomerCommunication {
} }
link.querySelector('input').disabled = flag; link.querySelector('input').disabled = flag;
const display = flag === true ? 'none' : ''; const display = flag === true ? 'none' : '';
this._var.container.querySelector('.title-company').style.display = display;
this._var.container.querySelector('.button-edit-contacts').style.display = display; this._var.container.querySelector('.button-edit-contacts').style.display = display;
this._var.container.querySelector('.button-edit-followers').style.display = display; this._var.container.querySelector('.button-edit-followers').style.display = display;
// this._var.enter.disabled = flag === true; // this._var.enter.disabled = flag === true;
@ -291,8 +292,13 @@ export default class CustomerCommunication {
if (this._var.container == null) { if (this._var.container == null) {
return; return;
} }
this._var.container.querySelector('.button-edit-contacts').style.display = flag === true ? 'none' : ''; const display = flag === true ? 'none' : '';
this._var.container.querySelector('.button-edit-followers').style.display = flag === true ? 'none' : ''; const companySelector = this._var.container.querySelector('.title-company .title-company-selector');
if (companySelector != null) {
companySelector.querySelector('.title-company-selector').style.display = display;
}
this._var.container.querySelector('.button-edit-contacts').style.display = display;
this._var.container.querySelector('.button-edit-followers').style.display = display;
} }
/** /**
@ -301,12 +307,18 @@ export default class CustomerCommunication {
set companyName(name) { set companyName(name) {
this._var.option.companyName = name; this._var.option.companyName = name;
const div = this._var.container.querySelector('.title-company'); const div = this._var.container.querySelector('.title-company');
if (nullOrEmpty(name)) { const companyCode = div.querySelector('.title-company-code');
div.style.display = 'none'; if (companyCode != null) {
} else { if (nullOrEmpty(name)) {
div.innerText = name; div.querySelector('.title-company-name').innerText = r('P_WO_NOCUSTOMERASSIGNED', 'No Customer Assigned');
div.style.display = ''; companyCode.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
companyCode.style.display = '';
} else {
div.querySelector('.title-company-name').innerText = name;
companyCode.style.display = 'none';
}
} }
div.style.display = '';
} }
/** /**
* @param {String} code * @param {String} code
@ -315,14 +327,23 @@ export default class CustomerCommunication {
const option = this._var.option; const option = this._var.option;
option.companyCode = code; option.companyCode = code;
const div = this._var.container.querySelector('.title-company'); const div = this._var.container.querySelector('.title-company');
if (nullOrEmpty(option.companyName)) { const companyCode = div.querySelector('.title-company-code');
div.style.display = 'none'; if (companyCode != null) {
} else { if (nullOrEmpty(option.companyName)) {
div.innerText = option.companyName; div.querySelector('.title-company-name').innerText = r('P_WO_NOCUSTOMERASSIGNED', 'No Customer Assigned');
if (!nullOrEmpty(code)) companyCode.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
div.innerText = option.companyName + "/" + code; companyCode.style.display = '';
div.style.display = ''; } else {
div.querySelector('.title-company-name').innerText = option.companyName;
if (nullOrEmpty(code)) {
companyCode.style.display = 'none';
} else {
companyCode.innerText = ' / ' + code;
companyCode.style.display = '';
}
}
} }
div.style.display = '';
} }
get followers() { get followers() {
@ -436,18 +457,42 @@ export default class CustomerCommunication {
}, },
createHideMessageTitleButton(this, 'showMessageHidden') createHideMessageTitleButton(this, 'showMessageHidden')
), ),
// option.allowCustomer === false ? createElement('div', 'title-company') :
createElement('div', div => { createElement('div', div => {
div.className = 'title-company'; div.className = 'title-company';
if (nullOrEmpty(option.companyName)) { // div.style.display = 'none';
div.style.display = 'none'; },
} else { createElement('span', span => {
if (nullOrEmpty(option.companyCode)) { span.className = 'title-company-name';
div.innerText = option.companyName; if (nullOrEmpty(option.companyName)) {
span.innerText = r('P_WO_NOCUSTOMERASSIGNED', 'No Customer Assigned');
} else { } else {
div.innerText = option.companyName + "/" + option.companyCode; span.innerText = option.companyName;
} }
} }),
}) createElement('span', span => {
span.className = 'title-company-code';
if (nullOrEmpty(option.companyName)) {
span.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
} else if (!nullOrEmpty(option.companyCode)) {
span.innerText = ' / ' + option.companyCode;
} else {
span.style.display = 'none';
}
}),
createElement('span', span => {
span.className = 'title-company-selector';
if (option.recordReadonly) {
span.style.display = 'none';
}
setTooltip(span, r('P_WO_SELECTCUSTOMER', 'Select Customer'));
if (typeof option.onAddCompany === 'function') {
span.addEventListener('click', () => option.onAddCompany.call(this));
}
},
createIcon('fa-light', 'search')
)
)
), ),
[ [
setTooltip(checkAutoUpdate, r('P_CU_AUTOUPDATESENABLED', 'Auto Updates Enabled')), setTooltip(checkAutoUpdate, r('P_CU_AUTOUPDATESENABLED', 'Auto Updates Enabled')),
@ -626,98 +671,67 @@ export default class CustomerCommunication {
button.appendChild(createIcon('fa-solid', 'user-edit')); button.appendChild(createIcon('fa-solid', 'user-edit'));
setTooltip(button, r('P_CU_EDITCONTACTS', 'Edit Contacts')); setTooltip(button, r('P_CU_EDITCONTACTS', 'Edit Contacts'));
button.addEventListener('click', () => { button.addEventListener('click', () => {
const pop = new Popup({ const editContacts = () => {
onMasking: option.onMasking, const pop = new Popup({
title: createElement('div', div => { onMasking: option.onMasking,
div.style.display = 'flex'; title: createElement('div', div => {
div.style.alignItems = 'center'; div.style.display = 'flex';
div.style.padding = '10px 0 6px 12px'; div.style.alignItems = 'center';
div.append( div.style.padding = '10px 0 6px 12px';
createElement('div', div => { div.append(
div.className = 'ui-popup-move';
div.style.flex = '1 1 auto';
},
createElement('div', div => div.innerText = r('P_CU_EDITCONTACTS', 'Edit Contacts')),
createElement('div', div => { createElement('div', div => {
div.className = 'title-company'; div.className = 'ui-popup-move';
div.style.maxWidth = '540px'; div.style.flex = '1 1 auto';
if (nullOrEmpty(option.companyName)) { },
div.style.display = 'none'; createElement('div', div => div.innerText = r('P_CU_EDITCONTACTS', 'Edit Contacts')),
} else { createElement('div', div => {
if (nullOrEmpty(option.companyCode)) { div.className = 'title-company';
div.innerText = option.companyName; div.style.maxWidth = '540px';
} else { if (nullOrEmpty(option.companyName)) {
div.innerText = option.companyName + "/" + option.companyCode; div.style.display = 'none';
} }
} },
}) createElement('span', span => {
), span.className = 'title-company-name';
createElement('button', button => { if (!nullOrEmpty(option.companyName)) {
button.style.flex = '0 0 auto'; span.innerText = option.companyName;
button.style.backgroundColor = 'rgb(1, 199, 172)';
button.style.marginRight = '10px';
button.className = 'roundbtn button-from-customer-record';
if (recordReadonly) {
button.style.display = 'none';
}
button.appendChild(createIcon('fa-solid', 'handshake', {
width: '16px',
height: '16px'
}));
button.addEventListener('click', () => {
const sel = new CustomerRecordContact({
getText: option.getText,
// onMasking: option.onMasking,
contacts: [],
onOk: list => {
if (typeof option.onSelectCRContacts === 'function') {
list?.map(c => {
delete c.selected;
return c;
});
const result = option.onSelectCRContacts(list);
} }
const r = this._var.data.contacts; }),
this._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => { createElement('span', span => {
if (c.OptOut || c.OptOut_BC) { span.className = 'title-company-code';
return c; if (!nullOrEmpty(option.companyCode)) {
span.innerText = '/' + option.companyCode;
}
})
)
),
createElement('button', button => {
button.style.flex = '0 0 auto';
button.style.backgroundColor = 'rgb(1, 199, 172)';
button.style.marginRight = '10px';
button.className = 'roundbtn button-from-customer-record';
if (recordReadonly || nullOrEmpty(option.companyName)) {
button.style.display = 'none';
}
button.appendChild(createIcon('fa-solid', 'handshake', {
width: '16px',
height: '16px'
}));
button.addEventListener('click', () => {
const sel = new CustomerRecordContact({
getText: option.getText,
// onMasking: option.onMasking,
contacts: [],
onOk: list => {
if (typeof option.onSelectCRContacts === 'function') {
list?.map(c => {
delete c.selected;
return c;
});
const result = option.onSelectCRContacts(list);
} }
if (typeof c.selected === 'undefined') { const r = this._var.data.contacts;
c.selected = true; this._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => {
}
return c;
});
this._var.gridWo.source = r.filter(c => c.Id < 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
}
});
var title = r('P_CU_SELECTFROMCUSTOMERRECORD', 'Select from Customer Record');
sel.show(title, container);
if (typeof option.onOpenSelectCRContacts === 'function') {
const result = option.onOpenSelectCRContacts();
if (typeof result?.then === 'function') {
return result.then(r => {
r.map(c => {
for (let cc of this._var.data.contacts) {
if (c.Id === cc.Id) {
c.selected = true;
break;
}
}
if (typeof c.selected === 'undefined') {
c.selected = false;
}
return c;
});
this._var.data.contacts.filter(c => c.Id >= 0).map(c => {
if (c.OptOut || c.OptOut_BC) { if (c.OptOut || c.OptOut_BC) {
return c; return c;
} }
@ -726,339 +740,402 @@ export default class CustomerCommunication {
} }
return c; return c;
}); });
this._var.gridWo.source = r.filter(c => c.Id < 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
}
});
var title = r('P_CU_SELECTFROMCUSTOMERRECORD', 'Select from Customer Record');
sel.show(title, container);
sel.source = r; if (typeof option.onOpenSelectCRContacts === 'function') {
return r; const result = option.onOpenSelectCRContacts();
}); if (typeof result?.then === 'function') {
} return result.then(r => {
return false; r.map(c => {
} for (let cc of this._var.data.contacts) {
}); if (c.Id === cc.Id) {
setTooltip(button, r('P_CU_SELECTFROMCUSTOMERRECORD', 'Select from Customer Record'))
}),
createElement('button', button => {
button.style.flex = '0 0 auto';
button.style.backgroundColor = 'rgb(1, 199, 172)';
button.style.marginRight = '10px';
button.className = 'roundbtn button-add-contact';
if (recordReadonly) {
button.style.display = 'none';
}
button.appendChild(createIcon('fa-solid', 'user-plus', {
width: '16px',
height: '16px'
}));
button.addEventListener('click', () => {
const add = new Contact({
getText: option.getText,
// onMasking: option.onMasking,
company: !nullOrEmpty(option.companyName),
onSave: item => {
const exists = this._var.gridContact.source.some(s => s.Name === item.Name && s.MobilePhone === item.MobilePhone);
if (exists) {
showAlert(r('P_CR_ADDCONTACT', 'Add Contact'), r('P_WO_CONTACTNAMEANDMOBILEUNIQUECOMBINATION', 'Contact name and contact mobile must be a unique combination.'), 'warn');
return false;
}
if (typeof option.onSave === 'function') {
const result = option.onSave(item, true);
if (typeof result?.then === 'function') {
return result.then(r => {
this._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true; c.selected = true;
break;
} }
return c; }
}); if (typeof c.selected === 'undefined') {
this._var.gridWo.source = r.filter(c => c.Id < 0).map(c => { c.selected = false;
if (c.OptOut || c.OptOut_BC) { }
return c; return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
return r;
}); });
} this._var.data.contacts.filter(c => c.Id >= 0).map(c => {
return false; if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
sel.source = r;
return r;
});
} }
return false;
} }
}); });
add.show(container); setTooltip(button, r('P_CU_SELECTFROMCUSTOMERRECORD', 'Select from Customer Record'))
}); }),
setTooltip(button, r('P_CR_ADDCONTACT', 'Add Contact')) createElement('button', button => {
button.style.flex = '0 0 auto';
button.style.backgroundColor = 'rgb(1, 199, 172)';
button.style.marginRight = '10px';
button.className = 'roundbtn button-add-contact';
if (recordReadonly) {
button.style.display = 'none';
}
button.appendChild(createIcon('fa-solid', 'user-plus', {
width: '16px',
height: '16px'
}));
button.addEventListener('click', () => {
const add = new Contact({
getText: option.getText,
// onMasking: option.onMasking,
company: !nullOrEmpty(option.companyName),
onSave: item => {
const exists = this._var.gridContact.source.some(s => s.Name === item.Name && s.MobilePhone === item.MobilePhone);
if (exists) {
showAlert(r('P_CR_ADDCONTACT', 'Add Contact'), r('P_WO_CONTACTNAMEANDMOBILEUNIQUECOMBINATION', 'Contact name and contact mobile must be a unique combination.'), 'warn');
return false;
}
if (typeof option.onSave === 'function') {
const result = option.onSave(item, true);
if (typeof result?.then === 'function') {
return result.then(r => {
this._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
this._var.gridWo.source = r.filter(c => c.Id < 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
return r;
});
}
return false;
}
}
});
add.show(container);
});
setTooltip(button, r('P_CR_ADDCONTACT', 'Add Contact'))
})
)
}),
content: createElement('div', null,
createElement('div', div => {
if (nullOrEmpty(option.companyName)) {
div.style.display = 'none';
}
div.style.fontWeight = 'bold';
div.innerText = r('P_CU_CONTACTSFROMCUSTOMERRECORD', 'Contacts from Customer Record');
}),
createElement('div', div => {
if (nullOrEmpty(option.companyName)) {
div.style.display = 'none';
}
div.className = 'contacts-record';
// div.style.maxHeight = '200px';
div.style.width = '675px';
// div.style.overflow = 'auto';
}),
createElement('div', div => {
div.style.fontWeight = 'bold';
div.innerText = r('P_CU_CONTACTSNOTCUSTOMERRECORD', 'Contacts not on Customer Record');
}),
createElement('div', div => {
div.className = 'contacts-wo';
// div.style.maxHeight = '200px';
div.style.width = '675px';
// div.style.overflow = 'auto';
}) })
) )
}), });
content: createElement('div', null, pop.show(container).then(() => {
createElement('div', div => { const selectedCol = This => {
if (nullOrEmpty(option.companyName)) { return {
div.style.display = 'none'; key: 'selected',
type: Grid.ColumnTypes.Checkbox,
width: 50,
enabled: item => !item.OptOut && !item.OptOut_BC,
onChanged: function () {
if (typeof option.onChanged === 'function') {
option.onChanged([...This._var.gridContact.source, ...This._var.gridWo.source]);
}
},
tooltip: item => item.selected ? r('P_CU_OPTEDIN', 'Opted In') : r('P_CU_OPTEDOUT', 'Opted Out')
} }
div.style.fontWeight = 'bold'; };
div.innerText = r('P_CU_CONTACTSFROMCUSTOMERRECORD', 'Contacts from Customer Record'); const iconCol = {
}), key: 'type',
createElement('div', div => { type: Grid.ColumnTypes.Icon,
if (nullOrEmpty(option.companyName)) {
div.style.display = 'none';
}
div.className = 'contacts-record';
// div.style.maxHeight = '200px';
div.style.width = '675px';
// div.style.overflow = 'auto';
}),
createElement('div', div => {
div.style.fontWeight = 'bold';
div.innerText = r('P_CU_CONTACTSNOTCUSTOMERRECORD', 'Contacts not on Customer Record');
}),
createElement('div', div => {
div.className = 'contacts-wo';
// div.style.maxHeight = '200px';
div.style.width = '675px';
// div.style.overflow = 'auto';
})
)
});
pop.show(container).then(() => {
const selectedCol = This => {
return {
key: 'selected',
type: Grid.ColumnTypes.Checkbox,
width: 50, width: 50,
enabled: item => !item.OptOut && !item.OptOut_BC, filter: c => {
onChanged: function () { switch (String(c.ContactPreference)) {
if (typeof option.onChanged === 'function') { case '0': return 'comment-lines';
option.onChanged([...This._var.gridContact.source, ...This._var.gridWo.source]); case '2': return 'mobile';
default: return 'envelope';
} }
}, },
tooltip: item => item.selected ? r('P_CU_OPTEDIN', 'Opted In') : r('P_CU_OPTEDOUT', 'Opted Out') className: 'icon-contact-type',
} iconType: 'fa-light'
}; };
const iconCol = { const nameCol = { key: 'Name', type: NoteCol, width: 160 };
key: 'type', const buttonCol = {
type: Grid.ColumnTypes.Icon, type: Grid.ColumnTypes.Icon,
width: 50, width: 40,
filter: c => { visible: !recordReadonly,
switch (String(c.ContactPreference)) { align: 'center',
case '0': return 'comment-lines'; iconType: 'fa-light'
case '2': return 'mobile'; };
default: return 'envelope'; const createEditCol = (This) => {
} return {
}, key: 'edit',
className: 'icon-contact-type', ...buttonCol,
iconType: 'fa-light' text: 'edit',
}; tooltip: r('P_WO_EDIT', 'Edit'),
const nameCol = { key: 'Name', type: NoteCol, width: 160 }; events: {
const buttonCol = { onclick: function () {
type: Grid.ColumnTypes.Icon, const edit = new Contact({
width: 40, getText: option.getText,
visible: !recordReadonly, // onMasking: option.onMasking,
align: 'center', contact: this,
iconType: 'fa-light' company: !nullOrEmpty(option.companyName),
}; onSave: (item, _op) => {
const createEditCol = (This) => { const exists =
return { This._var.gridContact.source.some(s => s !== this && s.Name === item.Name && s.MobilePhone === item.MobilePhone) ||
key: 'edit', This._var.gridWo.source.some(s => s !== this && s.Name === item.Name && s.MobilePhone === item.MobilePhone);
...buttonCol, if (exists) {
text: 'edit', showAlert(r('P_CR_EDITCONTACT', 'Edit Contact'), r('P_WO_CONTACTNAMEANDMOBILEUNIQUECOMBINATION', 'Contact name and contact mobile must be a unique combination.'), 'warn');
tooltip: r('P_WO_EDIT', 'Edit'), return false;
events: { }
onclick: function () { if (typeof option.onSave === 'function') {
const edit = new Contact({ const result = option.onSave(item);
getText: option.getText, if (typeof result?.then === 'function') {
// onMasking: option.onMasking, return result.then(r => {
contact: this, This._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => {
company: !nullOrEmpty(option.companyName), if (c.OptOut || c.OptOut_BC) {
onSave: (item, _op) => { return c;
const exists = }
This._var.gridContact.source.some(s => s !== this && s.Name === item.Name && s.MobilePhone === item.MobilePhone) || if (typeof c.selected === 'undefined') {
This._var.gridWo.source.some(s => s !== this && s.Name === item.Name && s.MobilePhone === item.MobilePhone); c.selected = true;
if (exists) { }
showAlert(r('P_CR_EDITCONTACT', 'Edit Contact'), r('P_WO_CONTACTNAMEANDMOBILEUNIQUECOMBINATION', 'Contact name and contact mobile must be a unique combination.'), 'warn'); return c;
return false; });
} This._var.gridWo.source = r.filter(c => c.Id < 0).map(c => {
if (typeof option.onSave === 'function') { if (c.OptOut || c.OptOut_BC) {
const result = option.onSave(item); return c;
if (typeof result?.then === 'function') { }
return result.then(r => { if (typeof c.selected === 'undefined') {
This._var.gridContact.source = r.filter(c => c.Id >= 0).map(c => { c.selected = true;
if (c.OptOut || c.OptOut_BC) { }
return c; return c;
} });
if (typeof c.selected === 'undefined') { return r;
c.selected = true; });
} }
return c; return false;
});
This._var.gridWo.source = r.filter(c => c.Id < 0).map(c => {
if (c.OptOut || c.OptOut_BC) {
return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c;
});
return r;
});
} }
return false;
} }
} });
}); edit.show(container);
edit.show(container); }
} }
} }
} };
}; // contacts from customer record
// contacts from customer record const grid = new Grid();
const grid = new Grid(); grid.height = 0;
grid.height = 0; grid.allowHtml = true;
grid.allowHtml = true; grid.headerVisible = false;
grid.headerVisible = false; grid.columns = [
grid.columns = [ selectedCol(this),
selectedCol(this), iconCol,
iconCol, nameCol,
nameCol, { key: 'Email', width: 180 },
{ key: 'Email', width: 180 }, { key: 'MobilePhoneDisplayText', width: 130 },
{ key: 'MobilePhoneDisplayText', width: 130 }, createEditCol(this),
createEditCol(this), {
{ key: 'delete',
key: 'delete', ...buttonCol,
...buttonCol, text: 'times',
text: 'times', tooltip: r('P_WO_DELETE', 'Delete'),
tooltip: r('P_WO_DELETE', 'Delete'), events: {
events: { onclick: function () {
onclick: function () { showConfirm(
showConfirm( r('P_CU_REMOVECONTACT', 'Remove Contact'),
r('P_CU_REMOVECONTACT', 'Remove Contact'), createElement('div', null,
createElement('div', null, createElement('div', div => {
createElement('div', div => { div.style.paddingLeft = '16px';
div.style.paddingLeft = '16px'; div.innerText = r('P_CU_REMOVEFROM', 'Remove {name} from').replace('{name}', this.Name);
div.innerText = r('P_CU_REMOVEFROM', 'Remove {name} from').replace('{name}', this.Name);
}),
createElement('div', div => {
div.style.display = 'flex';
div.style.justifyContent = 'center';
div.style.marginTop = '10px';
},
createRadiobox({
name: 'remove-type',
label: r('P_CUSTOMERRECORD', 'Customer Record'),
checked: true,
className: 'radio-customer-record'
}), }),
createRadiobox({ createElement('div', div => {
name: 'remove-type', div.style.display = 'flex';
label: r('P_WORKORDER', 'Work Order') div.style.justifyContent = 'center';
}) div.style.marginTop = '10px';
) },
), createRadiobox({
[ name: 'remove-type',
{ key: 'ok', text: r('P_WO_OK', 'OK') }, label: r('P_CUSTOMERRECORD', 'Customer Record'),
{ key: 'cancel', text: r('P_WO_CANCEL', 'Cancel') } checked: true,
] className: 'radio-customer-record'
).then(result => { }),
if (result?.key === 'ok') { createRadiobox({
const isRecord = result.popup.container.querySelector('.radio-customer-record>input').checked; name: 'remove-type',
if (typeof option.onDelete === 'function') { label: r('P_WORKORDER', 'Work Order')
option.onDelete(result.key, this, isRecord); })
)
),
[
{ key: 'ok', text: r('P_WO_OK', 'OK') },
{ key: 'cancel', text: r('P_WO_CANCEL', 'Cancel') }
]
).then(result => {
if (result?.key === 'ok') {
const isRecord = result.popup.container.querySelector('.radio-customer-record>input').checked;
if (typeof option.onDelete === 'function') {
option.onDelete(result.key, this, isRecord);
}
const index = grid.source.indexOf(this);
if (index >= 0) {
const source = grid.source;
source.splice(index, 1);
grid.extraRows = source.filter(c => !nullOrEmpty(c.Notes)).length;
grid.source = source;
}
} }
const index = grid.source.indexOf(this); });
if (index >= 0) { }
const source = grid.source;
source.splice(index, 1);
grid.extraRows = source.filter(c => !nullOrEmpty(c.Notes)).length;
grid.source = source;
}
}
});
} }
} }
} ];
]; grid.init(pop.container.querySelector('.contacts-record'));
grid.init(pop.container.querySelector('.contacts-record')); const customerRecords = this._var.data.contacts.filter(c => c.Id >= 0).map(c => {
const customerRecords = this._var.data.contacts.filter(c => c.Id >= 0).map(c => { if (c.OptOut || c.OptOut_BC) {
if (c.OptOut || c.OptOut_BC) { return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c; return c;
} });
if (typeof c.selected === 'undefined') { grid.extraRows = customerRecords.filter(c => !nullOrEmpty(c.Notes)).length;
c.selected = true; grid.source = customerRecords;
} grid.onSelectedRowChanged = index => {
return c; if (index >= 0 && this._var.gridWo.selectedIndexes?.length > 0) {
}); this._var.gridWo.selectedIndexes = [];
grid.extraRows = customerRecords.filter(c => !nullOrEmpty(c.Notes)).length; }
grid.source = customerRecords; };
grid.onSelectedRowChanged = index => { this._var.gridContact = grid;
if (index >= 0 && this._var.gridWo.selectedIndexes?.length > 0) {
this._var.gridWo.selectedIndexes = [];
}
};
this._var.gridContact = grid;
// contacts from work order only // contacts from work order only
const gridWo = new Grid(); const gridWo = new Grid();
gridWo.height = 0; gridWo.height = 0;
gridWo.allowHtml = true; gridWo.allowHtml = true;
gridWo.headerVisible = false; gridWo.headerVisible = false;
gridWo.columns = [ gridWo.columns = [
selectedCol(this), selectedCol(this),
iconCol, iconCol,
nameCol, nameCol,
{ key: 'Email', width: 180 }, { key: 'Email', width: 180 },
{ key: 'MobilePhoneDisplayText', width: 130 }, { key: 'MobilePhoneDisplayText', width: 130 },
createEditCol(this), createEditCol(this),
{ {
key: 'delete', key: 'delete',
...buttonCol, ...buttonCol,
text: 'times', text: 'times',
tooltip: r('P_WO_DELETE', 'Delete'), tooltip: r('P_WO_DELETE', 'Delete'),
events: { events: {
onclick: function () { onclick: function () {
showConfirm(r('P_CU_REMOVECONTACT', 'Remove Contact'), r('P_CU_REMOVEFROMWORKORDER', 'You are removing {name} from work order.\n\nDo you want to Continue?').replace('{name}', this.Name), [ showConfirm(r('P_CU_REMOVECONTACT', 'Remove Contact'), r('P_CU_REMOVEFROMWORKORDER', 'You are removing {name} from work order.\n\nDo you want to Continue?').replace('{name}', this.Name), [
{ key: 'continue', text: r('P_JS_CONTINUE', 'Continue') }, { key: 'continue', text: r('P_JS_CONTINUE', 'Continue') },
{ key: 'cancel', text: r('P_WO_CANCEL', 'Cancel') } { key: 'cancel', text: r('P_WO_CANCEL', 'Cancel') }
]).then(result => { ]).then(result => {
if (result?.key === 'continue') { if (result?.key === 'continue') {
if (typeof option.onDelete === 'function') { if (typeof option.onDelete === 'function') {
option.onDelete(result.key, this); option.onDelete(result.key, this);
}
const index = gridWo.source.indexOf(this);
if (index >= 0) {
const source = gridWo.source;
source.splice(index, 1);
gridWo.extraRows = source.filter(c => !nullOrEmpty(c.Notes)).length;
gridWo.source = source;
}
} }
const index = gridWo.source.indexOf(this); });
if (index >= 0) { }
const source = gridWo.source;
source.splice(index, 1);
gridWo.extraRows = source.filter(c => !nullOrEmpty(c.Notes)).length;
gridWo.source = source;
}
}
});
} }
} }
} ];
]; gridWo.init(pop.container.querySelector('.contacts-wo'));
gridWo.init(pop.container.querySelector('.contacts-wo')); const workOrderOnly = this._var.data.contacts.filter(c => c.Id < 0).map(c => {
const workOrderOnly = this._var.data.contacts.filter(c => c.Id < 0).map(c => { if (c.OptOut || c.OptOut_BC) {
if (c.OptOut || c.OptOut_BC) { return c;
}
if (typeof c.selected === 'undefined') {
c.selected = true;
}
return c; return c;
} });
if (typeof c.selected === 'undefined') { gridWo.extraRows = workOrderOnly.filter(c => !nullOrEmpty(c.Notes)).length;
c.selected = true; gridWo.source = workOrderOnly;
} gridWo.onSelectedRowChanged = index => {
return c; if (index >= 0 && this._var.gridContact.selectedIndexes?.length > 0) {
this._var.gridContact.selectedIndexes = [];
}
};
this._var.gridWo = gridWo;
}); });
gridWo.extraRows = workOrderOnly.filter(c => !nullOrEmpty(c.Notes)).length; };
gridWo.source = workOrderOnly; if (nullOrEmpty(option.companyName)) {
gridWo.onSelectedRowChanged = index => { showConfirm(
if (index >= 0 && this._var.gridContact.selectedIndexes?.length > 0) { r('P_CU_EDITCONTACTS', 'Edit Contacts'),
this._var.gridContact.selectedIndexes = []; r('P_CUSTOMER_ADDCOMPANYPROMPT', 'There is no company associated with this work order. Would you like to add one?\n\nIf no company is indicated, contacts must be added as "Work Order Only".'),
[
{ key: 'add', text: r('P_CUSTOMER_ADDCOMPANY', 'Add Company') },
{ key: 'skip', text: r('P_CUSTOMER_SKIPTHISSTEP', 'Skip This Step') }
]
).then(r => {
if (r == null) {
return;
} }
}; if (r.key === 'add') {
this._var.gridWo = gridWo; if (typeof option.onAddCompany === 'function') {
}); option.onAddCompany.call(this);
}
} else {
editContacts();
}
});
} else {
editContacts();
}
}); });
}) })
), ),

View File

@ -90,6 +90,33 @@
>div { >div {
flex: 1 1 auto; flex: 1 1 auto;
>.title-company {
line-height: 1rem;
padding: 2px 10px;
// background-color: rgba(0, 0, 0, .15);
>.title-company-name {
font-weight: bold;
}
>.title-company-selector {
cursor: pointer;
vertical-align: middle;
&:hover {
background-color: #ccc;
}
>svg {
width: 14px;
height: 14px;
fill: rgb(123, 28, 33);
margin: 0 5px 3px;
vertical-align: middle;
}
}
}
} }
>.title-functions { >.title-functions {

View File

@ -1,6 +1,8 @@
import "./element/style.scss"; import "./element/style.scss";
import ScheduleItem from "./element/schedule"; import ScheduleItem from "./element/schedule";
import AddWorkOrder from "./element/addworkorder";
export { export {
ScheduleItem ScheduleItem,
AddWorkOrder
} }

144
lib/element/addworkorder.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -94,4 +94,49 @@
.ui-drop-wrapper>.ui-drop-header { .ui-drop-wrapper>.ui-drop-header {
height: 24px; height: 24px;
} }
}
.open-wo-container {
display: flex;
flex-direction: column;
>.open-wo-header {
flex: 0 0 auto;
display: flex;
align-items: flex-start;
>h3 {
font-size: var(--font-header-size);
font-family: var(--header-font-family);
margin: 10px;
}
}
>.open-wo-content {
flex: 1 1 auto;
margin: 10px;
>.wo-line {
line-height: var(--settings-line-height);
&.wo-sub-line {
margin-left: 10px;
}
>.wo-title {
&.wo-title-required {
&::after {
content: '*';
color: var(--red-color);
}
}
}
>.ui-text {
width: 100%;
height: 80px;
box-sizing: border-box;
}
}
}
} }

View File

@ -14,6 +14,38 @@ import { validation, convertCssStyle } from './ui/extension';
import { createDateInput, toDateValue, getFormatter, formatDate, setDateValue, getDateValue, DateSelector } from './ui/date'; import { createDateInput, toDateValue, getFormatter, formatDate, setDateValue, getDateValue, DateSelector } from './ui/date';
import * as utility from './utility'; import * as utility from './utility';
function requestAnimationFrame(callback) {
if (typeof utility.global.requestAnimationFrame === 'function') {
utility.global.requestAnimationFrame(callback);
} else {
setTimeout(callback, 0);
}
}
function scrollLeft() {
const n = document.documentElement;
return (utility.global.scrollX || n.scrollLeft) - (n.clientLeft || 0);
}
function scrollTop() {
const n = document.documentElement;
return (utility.global.scrollY || n.scrollTop) - (n.clientTop || 0);
}
/**
* @private
* @param {HTMLElement} e
*/
function offset(e) {
const rect = e.getBoundingClientRect();
return {
top: rect.top + scrollTop(),
left: rect.left + scrollLeft(),
height: rect.height,
width: rect.width
};
}
export { export {
createElement, createElement,
// icon // icon
@ -63,5 +95,8 @@ export {
validation, validation,
convertCssStyle, convertCssStyle,
// utility // utility
utility utility,
// functions
requestAnimationFrame,
offset
} }

View File

@ -51,7 +51,6 @@
} }
.ui-switch { .ui-switch {
position: relative;
line-height: 1rem; line-height: 1rem;
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
@ -59,6 +58,7 @@
>span:first-of-type { >span:first-of-type {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
position: relative;
&::before { &::before {
content: ''; content: '';
@ -76,6 +76,7 @@
content: ''; content: '';
position: absolute; position: absolute;
left: 1px; left: 1px;
top: calc(50% - 7px);
width: 14px; width: 14px;
height: 14px; height: 14px;
background-color: white; background-color: white;

View File

@ -38,11 +38,14 @@
--border-radius: 2px; --border-radius: 2px;
--text-indent: 4px; --text-indent: 4px;
--line-height: 18px; --line-height: 18px;
--settings-line-height: 28px;
--font-size: .8125rem; // 13px --font-size: .8125rem; // 13px
--font-smaller-size: .75rem; // 12px --font-smaller-size: .75rem; // 12px
--font-larger-size: .875rem; // 14px --font-larger-size: .875rem; // 14px
--font-header-size: 1.5rem; // 24px
--font-family: "Franklin Gothic Book", "San Francisco", "Segoe UI", "Open Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei UI", sans-serif; --font-family: "Franklin Gothic Book", "San Francisco", "Segoe UI", "Open Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei UI", sans-serif;
--header-font-family: Arial, sans-serif;
} }
/*@media (prefers-color-scheme: dark) { /*@media (prefers-color-scheme: dark) {

View File

@ -1,5 +1,5 @@
import './css/dropdown.scss'; import './css/dropdown.scss';
import { r } from "../utility/lgres"; import { r as lang } from "../utility/lgres";
import { contains, nullOrEmpty } from "../utility/strings"; import { contains, nullOrEmpty } from "../utility/strings";
import { global, isPositive, throttle } from "../utility"; import { global, isPositive, throttle } from "../utility";
import { createElement } from "../functions"; import { createElement } from "../functions";
@ -9,6 +9,7 @@ import { createIcon } from "./icon"
const SymbolDropdown = Symbol.for('ui-dropdown'); const SymbolDropdown = Symbol.for('ui-dropdown');
const DropdownItemHeight = 30; const DropdownItemHeight = 30;
let r = lang;
let dropdownGlobal = global[SymbolDropdown]; let dropdownGlobal = global[SymbolDropdown];
if (dropdownGlobal == null) { if (dropdownGlobal == null) {
@ -51,8 +52,13 @@ if (dropdownGlobal == null) {
}); });
} }
function selectItems(label, itemlist, htmlkey, textkey) { function selectItems(label, itemlist, template, htmlkey, textkey) {
const htmls = itemlist.map(it => it[htmlkey]); let htmls;
if (typeof template === 'function') {
htmls = itemlist.map(it => template.call(this, it));
} else {
htmls = itemlist.map(it => it[htmlkey]);
}
if (htmls.some(it => it instanceof HTMLElement)) { if (htmls.some(it => it instanceof HTMLElement)) {
label.replaceChildren(...htmls.filter(it => it != null).map(it => it.cloneNode(true))); label.replaceChildren(...htmls.filter(it => it != null).map(it => it.cloneNode(true)));
} else { } else {
@ -87,6 +93,7 @@ function filterSource(searchkeys, textkey, key, source) {
* @property {string} [textKey=text] - 文本关键字 * @property {string} [textKey=text] - 文本关键字
* @property {string} [valueKey=value] - 值关键字 * @property {string} [valueKey=value] - 值关键字
* @property {string} [htmlKey=html] - 源码显示的关键字 * @property {string} [htmlKey=html] - 源码显示的关键字
* @property {Function} [htmlTemplate] - 模板创建函数
* @property {number} [maxLength=500] - 最大输入长度 * @property {number} [maxLength=500] - 最大输入长度
* @property {boolean} [multiSelect] - 是否允许多选 * @property {boolean} [multiSelect] - 是否允许多选
* @property {string} [selected] - 选中值 * @property {string} [selected] - 选中值
@ -129,6 +136,10 @@ export class Dropdown {
options.htmlKey ??= 'html'; options.htmlKey ??= 'html';
options.maxLength ??= 500; options.maxLength ??= 500;
this._var.options = options; this._var.options = options;
const getText = options.getText;
if (typeof getText === 'function') {
r = getText;
}
} }
create() { create() {
@ -300,6 +311,7 @@ export class Dropdown {
this._var.lastSelected = selected; this._var.lastSelected = selected;
const valuekey = this._var.options.valueKey; const valuekey = this._var.options.valueKey;
const textkey = this._var.options.textKey; const textkey = this._var.options.textKey;
const template = this._var.options.htmlTemplate;
const htmlkey = this._var.options.htmlKey; const htmlkey = this._var.options.htmlKey;
let item = this.source.find(it => (ignoreCase ? String(it[valuekey]).toLowerCase() : String(it[valuekey])) === selected); let item = this.source.find(it => (ignoreCase ? String(it[valuekey]).toLowerCase() : String(it[valuekey])) === selected);
if (this._var.options.input) { if (this._var.options.input) {
@ -317,7 +329,12 @@ export class Dropdown {
this._var.label.innerText = ' '; this._var.label.innerText = ' ';
return false; return false;
} }
const html = item[htmlkey]; let html;
if (typeof template === 'function') {
html = template.call(this, item);
} else {
html = item[htmlkey];
}
if (html instanceof HTMLElement) { if (html instanceof HTMLElement) {
this._var.label.replaceChildren(html.cloneNode(true)); this._var.label.replaceChildren(html.cloneNode(true));
} else if (typeof html === 'string') { } else if (typeof html === 'string') {
@ -354,6 +371,7 @@ export class Dropdown {
const source = this.source; const source = this.source;
const valuekey = this._var.options.valueKey; const valuekey = this._var.options.valueKey;
const textkey = this._var.options.textKey; const textkey = this._var.options.textKey;
const template = this._var.options.htmlTemplate;
const htmlkey = this._var.options.htmlKey; const htmlkey = this._var.options.htmlKey;
const itemlist = selectedlist.map(a => { const itemlist = selectedlist.map(a => {
const v = typeof a === 'string' ? a : String(a); const v = typeof a === 'string' ? a : String(a);
@ -371,7 +389,7 @@ export class Dropdown {
this._var.label.innerText = r('none', '( None )'); this._var.label.innerText = r('none', '( None )');
return false; return false;
} }
selectItems(this._var.label, itemlist, htmlkey, textkey); selectItems(this._var.label, itemlist, template, htmlkey, textkey);
this._var.selectedList = itemlist; this._var.selectedList = itemlist;
if (!silence && typeof this.onSelectedList === 'function') { if (!silence && typeof this.onSelectedList === 'function') {
this.onSelectedList(itemlist); this.onSelectedList(itemlist);
@ -563,6 +581,7 @@ export class Dropdown {
const multiselect = this.multiSelect; const multiselect = this.multiSelect;
const valuekey = this._var.options.valueKey; const valuekey = this._var.options.valueKey;
const textkey = this._var.options.textKey; const textkey = this._var.options.textKey;
const template = this._var.options.htmlTemplate;
const htmlkey = this._var.options.htmlKey; const htmlkey = this._var.options.htmlKey;
const selected = this.selected; const selected = this.selected;
let scrolled; let scrolled;
@ -575,7 +594,12 @@ export class Dropdown {
li.dataset.value = val; li.dataset.value = val;
li.title = item[textkey]; li.title = item[textkey];
let label; let label;
const html = item[htmlkey]; let html;
if (typeof template === 'function') {
html = template.call(this, item);
} else {
html = item[htmlkey];
}
if (html instanceof HTMLElement) { if (html instanceof HTMLElement) {
label = html; label = html;
} else if (typeof html === 'string') { } else if (typeof html === 'string') {
@ -617,6 +641,7 @@ export class Dropdown {
let list; let list;
const valuekey = this._var.options.valueKey; const valuekey = this._var.options.valueKey;
const textkey = this._var.options.textKey; const textkey = this._var.options.textKey;
const template = this._var.options.htmlTemplate;
const htmlkey = this._var.options.htmlKey; const htmlkey = this._var.options.htmlKey;
if (checkbox.getAttribute('isall') === '1') { if (checkbox.getAttribute('isall') === '1') {
const allchecked = this._var.allChecked = checkbox.checked; const allchecked = this._var.allChecked = checkbox.checked;
@ -653,7 +678,7 @@ export class Dropdown {
if (this._var.allChecked) { if (this._var.allChecked) {
this._var.label.innerText = r('allItem', '( All )'); this._var.label.innerText = r('allItem', '( All )');
} else { } else {
selectItems(this._var.label, list, htmlkey, textkey); selectItems(this._var.label, list, template, htmlkey, textkey);
} }
this._var.selectedList = list; this._var.selectedList = list;
if (typeof this.onSelectedList === 'function') { if (typeof this.onSelectedList === 'function') {

View File

@ -71,13 +71,13 @@ let r = lang;
/** /**
* 键值字典 * 键值字典
* @template T * @template T
* @typedef {{[key: string]: T}} KeyMap * @typedef {Map<string, T>} KeyMap
*/ */
/** /**
* 索引字典 * 索引字典
* @template T * @template T
* @typedef {{[index: number]: T}} IndexMap * @typedef {Map<number, T>} IndexMap
*/ */
/** /**
@ -1077,7 +1077,7 @@ export class Grid {
/** /**
* 行发生变化时触发的事件 * 行发生变化时触发的事件
* @event * @event
* @param {("update" | "add" | "remove")} action - 变动类型 * @param {("update" | "add" | "remove" | "drag")} action - 变动类型
* @param {GridRowItem[]} items - 发生变动的行对象 * @param {GridRowItem[]} items - 发生变动的行对象
* @param {(number | number[])} indexes - 变动的索引集合 * @param {(number | number[])} indexes - 变动的索引集合
* @this Grid * @this Grid
@ -1244,7 +1244,7 @@ export class Grid {
* 获取已过滤的数据数组,或者设置数据并刷新列表 * 获取已过滤的数据数组,或者设置数据并刷新列表
* @type {GridRowItem[]} * @type {GridRowItem[]}
*/ */
get source() { return this._var.currentSource?.map(s => s.values) } get source() { return this._var.currentSource?.map(s => s.values) ?? [] }
set source(list) { set source(list) {
if (!Array.isArray(list)) { if (!Array.isArray(list)) {
throw new Error('source is not an Array.') throw new Error('source is not an Array.')
@ -1463,6 +1463,9 @@ export class Grid {
this.removeItem(src); this.removeItem(src);
this.addItem(row, target); this.addItem(row, target);
this.selectedIndexes = [e.ctrlKey ? target : target - 1]; this.selectedIndexes = [e.ctrlKey ? target : target - 1];
if (typeof this.onRowChanged === 'function') {
this.onRowChanged('drag', [row], target);
}
}); });
} }
container.replaceChildren(grid); container.replaceChildren(grid);
@ -2862,6 +2865,9 @@ export class Grid {
this.removeItem(src); this.removeItem(src);
this.addItem(row, target); this.addItem(row, target);
this.selectedIndexes = [target]; this.selectedIndexes = [target];
if (typeof this.onRowChanged === 'function') {
this.onRowChanged('drag', [row], target);
}
}); });
} }
const virtualRow = { cells: {} }; const virtualRow = { cells: {} };
@ -3648,6 +3654,8 @@ export class Grid {
} }
]).then(result => { ]).then(result => {
if (result?.key === 'yes') { if (result?.key === 'yes') {
const sortCol = this.sortArray.find(c => c.column === col.key);
this.sortDirection = sortCol?.order === 'asc' ? -1 : 1;
this._onDoHeaderSort(col); this._onDoHeaderSort(col);
} }
}); });

View File

@ -1,5 +1,6 @@
import './css/tooltip.scss'; import './css/tooltip.scss';
import { createElement } from "../functions"; import { createElement } from "../functions";
import { global } from '../utility';
const pointerHeight = 12; const pointerHeight = 12;
@ -98,7 +99,7 @@ export function setTooltip(container, content, flag = false, parent = null) {
let lastWidth = p.clientWidth; let lastWidth = p.clientWidth;
let lastHeight = p.clientHeight; let lastHeight = p.clientHeight;
while (p != null) { while (p != null) {
const overflow = window.getComputedStyle(p).overflow; const overflow = global.getComputedStyle(p).overflow;
if (overflow !== 'visible') { if (overflow !== 'visible') {
break; break;
} }

View File

@ -1,5 +1,5 @@
import { getCookie, setCookie, deleteCookie } from "./utility/cookie"; import { getCookie, setCookie, deleteCookie } from "./utility/cookie";
import { init, r, lang } from "./utility/lgres"; import { domLoad, init, r, lang } from "./utility/lgres";
import { get, post, upload } from "./utility/request"; import { get, post, upload } from "./utility/request";
import { nullOrEmpty, contains, endsWith, padStart, formatUrl, escapeHtml, escapeEmoji } from "./utility/strings"; import { nullOrEmpty, contains, endsWith, padStart, formatUrl, escapeHtml, escapeEmoji } from "./utility/strings";
@ -100,5 +100,6 @@ export {
truncate, truncate,
isEmail, isEmail,
isPhone, isPhone,
verifyPassword verifyPassword,
domLoad
} }

View File

@ -109,6 +109,20 @@ function applyLanguage(dom, result) {
} }
} }
export function domLoad() {
if (document.readyState === 'loading') {
return new Promise((resolve, reject) => {
let tid = setTimeout(() => reject('timeout'), 30000);
document.addEventListener('DOMContentLoaded', () => {
clearTimeout(tid);
tid = void 0;
resolve();
});
});
}
return Promise.resolve();
}
export async function init(dom = document.body, options = {}) { export async function init(dom = document.body, options = {}) {
const lgid = getCurrentLgId(); const lgid = getCurrentLgId();
let lgres = localStorage.getItem(getStorageKey(lgid)); let lgres = localStorage.getItem(getStorageKey(lgid));
@ -126,20 +140,7 @@ export async function init(dom = document.body, options = {}) {
} }
try { try {
if (document.readyState === 'loading') { await domLoad();
return await new Promise((resolve, reject) => {
let tid = setTimeout(() => reject('timeout'), 30000);
document.addEventListener('DOMContentLoaded', () => {
clearTimeout(tid);
tid = void 0;
if (typeof options.callback === 'function') {
options.callback(result);
}
applyLanguage(dom, result);
resolve(result);
});
});
}
if (typeof options.callback === 'function') { if (typeof options.callback === 'function') {
options.callback(result); options.callback(result);
} }

34
package-lock.json generated
View File

@ -13,9 +13,9 @@
"docdash": "^2.0.2", "docdash": "^2.0.2",
"jsdoc": "^4.0.3", "jsdoc": "^4.0.3",
"postcss-preset-env": "^9.5.14", "postcss-preset-env": "^9.5.14",
"sass": "^1.77.2", "sass": "^1.77.4",
"typedoc": "^0.25.13", "typedoc": "^0.25.13",
"vite": "^5.2.11", "vite": "^5.2.12",
"vite-plugin-externals": "^0.6.2" "vite-plugin-externals": "^0.6.2"
} }
}, },
@ -1865,9 +1865,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001621", "version": "1.0.30001627",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz",
"integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", "integrity": "sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -2080,9 +2080,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.783", "version": "1.4.789",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.783.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.789.tgz",
"integrity": "sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ==", "integrity": "sha512-0VbyiaXoT++Fi2vHGo2ThOeS6X3vgRCWrjPeO2FeIAWL6ItiSJ9BqlH8LfCXe3X1IdcG+S0iLoNaxQWhfZoGzQ==",
"dev": true "dev": true
}, },
"node_modules/entities": { "node_modules/entities": {
@ -3366,9 +3366,9 @@
} }
}, },
"node_modules/sass": { "node_modules/sass": {
"version": "1.77.2", "version": "1.77.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz",
"integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==", "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chokidar": ">=3.0.0 <4.0.0", "chokidar": ">=3.0.0 <4.0.0",
@ -3503,9 +3503,9 @@
} }
}, },
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.6.2", "version": "2.6.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
"dev": true "dev": true
}, },
"node_modules/typedoc": { "node_modules/typedoc": {
@ -3601,9 +3601,9 @@
"dev": true "dev": true
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.2.11", "version": "5.2.12",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz",
"integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"esbuild": "^0.20.1", "esbuild": "^0.20.1",

View File

@ -33,9 +33,9 @@
"docdash": "^2.0.2", "docdash": "^2.0.2",
"jsdoc": "^4.0.3", "jsdoc": "^4.0.3",
"postcss-preset-env": "^9.5.14", "postcss-preset-env": "^9.5.14",
"sass": "^1.77.2", "sass": "^1.77.4",
"typedoc": "^0.25.13", "typedoc": "^0.25.13",
"vite": "^5.2.11", "vite": "^5.2.12",
"vite-plugin-externals": "^0.6.2" "vite-plugin-externals": "^0.6.2"
} }
} }