define("views/import/record/panels/imported", ["exports", "views/record/panels/relationship"], function (_exports, _relationship) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_relationship = _interopRequireDefault(_relationship);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class ImportImportedPanelView extends _relationship.default {
link = 'imported';
readOnly = true;
rowActionsView = 'views/record/row-actions/relationship-no-unlink';
setup() {
this.entityType = this.model.get('entityType');
this.title = this.title || this.translate('Imported', 'labels', 'Import');
super.setup();
}
}
var _default = _exports.default = ImportImportedPanelView;
});
define("views/email-account/record/detail", ["exports", "views/record/detail"], function (_exports, _detail) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_detail = _interopRequireDefault(_detail);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class _default extends _detail.default {
setup() {
super.setup();
this.setupFieldsBehaviour();
this.initSslFieldListening();
this.initSmtpFieldsControl();
if (this.getUser().isAdmin()) {
this.setFieldNotReadOnly('assignedUser');
} else {
this.setFieldReadOnly('assignedUser');
}
}
modifyDetailLayout(layout) {
layout.filter(panel => panel.tabLabel === '$label:SMTP').forEach(panel => {
panel.rows.forEach(row => {
row.forEach(item => {
const labelText = this.translate(item.name, 'fields', 'EmailAccount');
if (labelText && labelText.indexOf('SMTP ') === 0) {
item.labelText = Espo.Utils.upperCaseFirst(labelText.substring(5));
}
});
});
});
}
setupFieldsBehaviour() {
this.controlStatusField();
this.listenTo(this.model, 'change:status', (model, value, o) => {
if (o.ui) {
this.controlStatusField();
}
});
this.listenTo(this.model, 'change:useImap', (model, value, o) => {
if (o.ui) {
this.controlStatusField();
}
});
if (this.wasFetched()) {
this.setFieldReadOnly('fetchSince');
} else {
this.setFieldNotReadOnly('fetchSince');
}
}
controlStatusField() {
const list = ['username', 'port', 'host', 'monitoredFolders'];
if (this.model.get('status') === 'Active' && this.model.get('useImap')) {
list.forEach(item => {
this.setFieldRequired(item);
});
return;
}
list.forEach(item => {
this.setFieldNotRequired(item);
});
}
wasFetched() {
if (!this.model.isNew()) {
return !!(this.model.get('fetchData') || {}).lastUID;
}
return false;
}
initSslFieldListening() {
this.listenTo(this.model, 'change:security', (model, value, o) => {
if (!o.ui) {
return;
}
if (value === 'SSL') {
this.model.set('port', 993);
} else {
this.model.set('port', 143);
}
});
this.listenTo(this.model, 'change:smtpSecurity', (model, value, o) => {
if (o.ui) {
if (value === 'SSL') {
this.model.set('smtpPort', 465);
} else if (value === 'TLS') {
this.model.set('smtpPort', 587);
} else {
this.model.set('smtpPort', 25);
}
}
});
}
initSmtpFieldsControl() {
this.controlSmtpFields();
this.listenTo(this.model, 'change:useSmtp', this.controlSmtpFields, this);
this.listenTo(this.model, 'change:smtpAuth', this.controlSmtpFields, this);
}
controlSmtpFields() {
if (this.model.get('useSmtp')) {
this.showField('smtpHost');
this.showField('smtpPort');
this.showField('smtpAuth');
this.showField('smtpSecurity');
this.showField('smtpTestSend');
this.setFieldRequired('smtpHost');
this.setFieldRequired('smtpPort');
this.controlSmtpAuthField();
return;
}
this.hideField('smtpHost');
this.hideField('smtpPort');
this.hideField('smtpAuth');
this.hideField('smtpUsername');
this.hideField('smtpPassword');
this.hideField('smtpAuthMechanism');
this.hideField('smtpSecurity');
this.hideField('smtpTestSend');
this.setFieldNotRequired('smtpHost');
this.setFieldNotRequired('smtpPort');
this.setFieldNotRequired('smtpUsername');
}
controlSmtpAuthField() {
if (this.model.get('smtpAuth')) {
this.showField('smtpUsername');
this.showField('smtpPassword');
this.showField('smtpAuthMechanism');
this.setFieldRequired('smtpUsername');
return;
}
this.hideField('smtpUsername');
this.hideField('smtpPassword');
this.hideField('smtpAuthMechanism');
this.setFieldNotRequired('smtpUsername');
}
}
_exports.default = _default;
});
define("views/personal-data/record/record", ["exports", "views/record/base"], function (_exports, _base) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_base = _interopRequireDefault(_base);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class PersonalDataRecordView extends _base.default {
template = 'personal-data/record/record';
additionalEvents = {
/** @this PersonalDataRecordView */
'click .checkbox': function (e) {
const name = $(e.currentTarget).data('name');
if (e.currentTarget.checked) {
if (!~this.checkedFieldList.indexOf(name)) {
this.checkedFieldList.push(name);
}
if (this.checkedFieldList.length === this.fieldList.length) {
this.$el.find('.checkbox-all').prop('checked', true);
} else {
this.$el.find('.checkbox-all').prop('checked', false);
}
} else {
const index = this.checkedFieldList.indexOf(name);
if (~index) {
this.checkedFieldList.splice(index, 1);
}
this.$el.find('.checkbox-all').prop('checked', false);
}
this.trigger('check', this.checkedFieldList);
},
/** @this PersonalDataRecordView */
'click .checkbox-all': function (e) {
if (e.currentTarget.checked) {
this.checkedFieldList = Espo.Utils.clone(this.fieldList);
this.$el.find('.checkbox').prop('checked', true);
} else {
this.checkedFieldList = [];
this.$el.find('.checkbox').prop('checked', false);
}
this.trigger('check', this.checkedFieldList);
}
};
checkedFieldList;
data() {
const data = {};
data.fieldDataList = this.getFieldDataList();
data.scope = this.scope;
data.editAccess = this.editAccess;
return data;
}
setup() {
super.setup();
this.events = {
...this.additionalEvents,
...this.events
};
this.scope = this.model.entityType;
this.fieldList = [];
this.checkedFieldList = [];
this.editAccess = this.getAcl().check(this.model, 'edit');
const fieldDefs = this.getMetadata().get(['entityDefs', this.scope, 'fields']) || {};
const fieldList = [];
for (const field in fieldDefs) {
const defs = /** @type {Record} */fieldDefs[field];
if (defs.isPersonalData) {
fieldList.push(field);
}
}
fieldList.forEach(field => {
const type = fieldDefs[field].type;
const attributeList = this.getFieldManager().getActualAttributeList(type, field);
let isNotEmpty = false;
attributeList.forEach(attribute => {
const value = this.model.get(attribute);
if (value) {
if (Object.prototype.toString.call(value) === '[object Array]') {
if (value.length) {
return;
}
}
isNotEmpty = true;
}
});
const hasAccess = !this.getAcl().getScopeForbiddenFieldList(this.scope).includes(field);
if (isNotEmpty && hasAccess) {
this.fieldList.push(field);
}
});
this.fieldList = this.fieldList.sort((v1, v2) => {
return this.translate(v1, 'fields', this.scope).localeCompare(this.translate(v2, 'fields', this.scope));
});
this.fieldList.forEach(field => {
this.createField(field, null, null, 'detail', true);
});
}
getFieldDataList() {
const forbiddenList = this.getAcl().getScopeForbiddenFieldList(this.scope, 'edit');
const list = [];
this.fieldList.forEach(field => {
list.push({
name: field,
key: field + 'Field',
editAccess: this.editAccess && !~forbiddenList.indexOf(field)
});
});
return list;
}
}
var _default = _exports.default = PersonalDataRecordView;
});
define("views/personal-data/modals/personal-data", ["exports", "views/modal"], function (_exports, _modal) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_modal = _interopRequireDefault(_modal);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class _default extends _modal.default {
template = 'personal-data/modals/personal-data';
className = 'dialog dialog-record';
backdrop = true;
setup() {
super.setup();
this.buttonList = [{
name: 'cancel',
label: 'Close'
}];
this.headerText = this.getLanguage().translate('Personal Data');
this.headerText += ': ' + this.model.get('name');
if (this.getAcl().check(this.model, 'edit')) {
this.buttonList.unshift({
name: 'erase',
label: 'Erase',
style: 'danger',
disabled: true,
onClick: () => this.actionErase()
});
}
this.fieldList = [];
this.scope = this.model.entityType;
this.createView('record', 'views/personal-data/record/record', {
selector: '.record',
model: this.model
}, view => {
this.listenTo(view, 'check', fieldList => {
this.fieldList = fieldList;
if (fieldList.length) {
this.enableButton('erase');
} else {
this.disableButton('erase');
}
});
if (!view.fieldList.length) {
this.disableButton('export');
}
});
}
actionErase() {
this.confirm({
message: this.translate('erasePersonalDataConfirmation', 'messages'),
confirmText: this.translate('Erase')
}, () => {
this.disableButton('erase');
Espo.Ajax.postRequest('DataPrivacy/action/erase', {
fieldList: this.fieldList,
entityType: this.scope,
id: this.model.id
}).then(() => {
Espo.Ui.success(this.translate('Done'));
this.trigger('erase');
}).catch(() => {
this.enableButton('erase');
});
});
}
}
_exports.default = _default;
});
define("views/outbound-email/modals/test-send", ["exports", "views/modal"], function (_exports, _modal) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_modal = _interopRequireDefault(_modal);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class _default extends _modal.default {
cssName = 'test-send';
templateContent = `
`;
data() {
return {
emailAddress: this.options.emailAddress
};
}
setup() {
this.buttonList = [{
name: 'send',
text: this.translate('Send', 'labels', 'Email'),
style: 'primary',
onClick: () => {
const emailAddress = this.$el.find('input').val();
if (emailAddress === '') {
return;
}
this.trigger('send', emailAddress);
}
}, {
name: 'cancel',
label: 'Cancel',
onClick: dialog => {
dialog.close();
}
}];
}
}
_exports.default = _default;
});
define("views/import-error/fields/validation-failures", ["exports", "views/fields/base"], function (_exports, _base) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_base = _interopRequireDefault(_base);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class ValidationFailuresFieldView extends _base.default {
// language=Handlebars
detailTemplateContent = `
{{#if itemList.length}}
{{translate field category='fields' scope=entityType}}
{{translate type category='fieldValidations'}}
{{#if popoverText}}
{{/if}}
{{/each}}
{{else}}
{{translate 'None'}}
{{/if}}
`;
data() {
const data = super.data();
data.itemList = this.getDataList();
return data;
}
afterRenderDetail() {
this.$el.find('.popover-anchor').each((i, /** HTMLElement */el) => {
const text = this.getHelper().transformMarkdownText(el.dataset.text).toString();
Espo.Ui.popover($(el), {
content: text
}, this);
});
}
/**
* @return {Object[]}
*/
getDataList() {
const itemList = Espo.Utils.cloneDeep(this.model.get(this.name)) || [];
const entityType = this.model.get('entityType');
if (Array.isArray(itemList)) {
itemList.forEach(item => {
const fieldManager = this.getFieldManager();
const language = this.getLanguage();
const fieldType = fieldManager.getEntityTypeFieldParam(entityType, item.field, 'type');
if (!fieldType) {
return;
}
const key = fieldType + '_' + item.type;
if (!language.has(key, 'fieldValidationExplanations', 'Global')) {
if (!language.has(item.type, 'fieldValidationExplanations', 'Global')) {
return;
}
item.popoverText = language.translate(item.type, 'fieldValidationExplanations');
return;
}
item.popoverText = language.translate(key, 'fieldValidationExplanations');
});
}
return itemList;
}
}
// noinspection JSUnusedGlobalSymbols
var _default = _exports.default = ValidationFailuresFieldView;
});
define("views/import-error/fields/line-number", ["exports", "views/fields/int"], function (_exports, _int) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_int = _interopRequireDefault(_int);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class _default extends _int.default {
disableFormatting = true;
data() {
const data = super.data();
data.valueIsSet = this.model.has(this.sourceName);
data.isNotEmpty = this.model.has(this.sourceName);
return data;
}
setup() {
super.setup();
this.sourceName = this.name === 'exportLineNumber' ? 'exportRowIndex' : 'rowIndex';
}
getAttributeList() {
return [this.sourceName];
}
getValueForDisplay() {
let value = this.model.get(this.sourceName);
value++;
return this.formatNumber(value);
}
}
_exports.default = _default;
});
define("views/import/step2", ["exports", "view", "ui/select"], function (_exports, _view, _select) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
_view = _interopRequireDefault(_view);
_select = _interopRequireDefault(_select);
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
class Step2ImportView extends _view.default {
template = 'import/step-2';
allowedFieldList = ['createdAt', 'createdBy'];
events = {
/** @this Step2ImportView */
'click button[data-action="back"]': function () {
this.back();
},
/** @this Step2ImportView */
'click button[data-action="next"]': function () {
this.next();
},
/** @this Step2ImportView */
'click a[data-action="addField"]': function (e) {
const field = $(e.currentTarget).data('name');
this.addField(field);
},
/** @this Step2ImportView */
'click a[data-action="removeField"]': function (e) {
const field = $(e.currentTarget).data('name');
this.$el.find('a[data-action="addField"]').parent().removeClass('hidden');
const index = this.additionalFields.indexOf(field);
if (~index) {
this.additionalFields.splice(index, 1);
}
this.$el.find('.field[data-name="' + field + '"]').parent().remove();
},
/** @this Step2ImportView */
'keyup input.add-field-quick-search-input': function (e) {
this.processFieldFilterQuickSearch(e.currentTarget.value);
}
};
data() {
return {
scope: this.scope,
fieldList: this.getFieldList()
};
}
setup() {
this.formData = this.options.formData;
this.scope = this.formData.entityType;
const mapping = [];
this.additionalFields = [];
if (this.formData.previewArray) {
let index = 0;
if (this.formData.headerRow) {
index = 1;
}
if (this.formData.previewArray.length > index) {
this.formData.previewArray[index].forEach((value, i) => {
const d = {
value: value
};
if (this.formData.headerRow) {
d.name = this.formData.previewArray[0][i];
}
mapping.push(d);
});
}
}
this.wait(true);
this.getModelFactory().create(this.scope, model => {
this.model = model;
if (this.formData.defaultValues) {
this.model.set(this.formData.defaultValues);
}
this.wait(false);
});
this.mapping = mapping;
/** @type {string[]} */
this.fieldList = this.getFieldList();
this.fieldTranslations = this.fieldList.reduce((map, item) => {
map[item] = this.translate(item, 'fields', this.scope);
return map;
}, {});
}
afterRender() {
const $container = $('#mapping-container');
const $table = $('
').addClass('table').addClass('table-bordered').css('table-layout', 'fixed');
const $tbody = $('').appendTo($table);
let $row = $('
');
if (this.formData.headerRow) {
const $cell = $('