This commit is contained in:
root
2025-11-13 19:52:28 +03:00
parent 8aeeb05b7d
commit 807dec3b6c
4646 changed files with 163445 additions and 626017 deletions
@@ -31,6 +31,7 @@ return [
"/bitrix/js/ui/entity-editor/js/user-field.js",
"/bitrix/js/ui/entity-editor/js/validator.js",
"/bitrix/js/ui/entity-editor/js/pull.js",
"/bitrix/js/ui/entity-editor/user-field-configurators/tooltip-configurator.js",
],
"rel" => [
"ajax",
@@ -52,6 +53,7 @@ return [
"ui.entity-selector",
"ui.design-tokens",
"ui.fonts.opensans",
"ui.entity-editor.user-field-configurators.tooltip-configurator",
],
'settings' => [
'isFileUserFieldViewingModesAvailable' => method_exists(FileType::class, 'isAvailableDefaultView'),
@@ -329,6 +329,14 @@ input.ui-entity-editor-header-title-text {
cursor: pointer;
}
.ui-entity-editor-new-field-visibility-wrapper {
padding: 10px 0;
}
.ui-entity-editor-user-field-setting-error-text {
color: #d0011b;
}
/* addiction step*/
.ui-entity-new-field-addiction-label { white-space: nowrap; }
@@ -2057,6 +2065,19 @@ input.ui-entity-editor-header-title-text {
justify-content: center;
}
.ui-entity-editor-block-title-text .ui-hint {
display: inline-flex;
margin-left: 4px;
width: fit-content;
height: fit-content;
}
.ui-entity-editor-block-title-text .ui-hint-icon {
margin: 0;
width: 1.2em;
height: 1.2em;
}
.ui-entity-editor-block-title-text-right-icon {
display: flex;
align-items: center;
File diff suppressed because one or more lines are too long
+45 -19
View File
@@ -1,3 +1,5 @@
/* eslint-disable */
BX.namespace("BX.UI");
if(typeof BX.UI.EntityConfigType === "undefined")
@@ -63,6 +65,9 @@ if(typeof BX.UI.EntityConfig === "undefined")
this.categoryName = '';
this.moduleId = '';
this.onAddPostfix = 'on_add';
this.onUpdatePostfix = 'on_update';
};
BX.UI.EntityConfig.prototype =
{
@@ -252,7 +257,7 @@ if(typeof BX.UI.EntityConfig === "undefined")
{
return this._scope;
},
setScope: function(scope, userScopeId, moduleId)
setScope: function(scope, userScopeId, moduleId, entityId)
{
var promise = new BX.Promise();
if(
@@ -284,7 +289,8 @@ if(typeof BX.UI.EntityConfig === "undefined")
moduleId: this.moduleId,
guid: this._id,
scope: this._scope,
userScopeId: (this._userScopeId || 0)
userScopeId: (this._userScopeId || 0),
entityId,
}
}).then(function (response) {
promise.fulfill();
@@ -378,34 +384,54 @@ if(typeof BX.UI.EntityConfig === "undefined")
return promise;
},
reset: function(forAllUsers)
reset(forAllUsers, entityId)
{
var data = { guid: this._id, params: { scope: this._scope }, categoryName: this.categoryName };
if(forAllUsers)
const data = { guid: this._id, params: { scope: this._scope }, categoryName: this.categoryName };
if (forAllUsers)
{
data["params"]["forAllUsers"] = "Y";
data.params.forAllUsers = 'Y';
}
data['signedConfigParams'] = this._signedParams;
var promise = new BX.Promise();
if (!BX.Type.isUndefined(entityId) && BX.Type.isInteger(entityId))
{
data.params.type = entityId > 0 ? this.onUpdatePostfix : this.onAddPostfix;
}
data.signedConfigParams = this._signedParams;
const promise = new BX.Promise();
BX.ajax.runComponentAction(
"bitrix:ui.form",
"resetConfiguration",
{ mode: "ajax", data: data }
).then(function(){ promise.fulfill(); });
'bitrix:ui.form',
'resetConfiguration',
{ mode: 'ajax', data },
).then(() => {
promise.fulfill();
}).catch((response) => {});
return promise;
},
forceCommonScopeForAll: function()
forceCommonScopeForAll(entityId)
{
var promise = new BX.Promise();
const promise = new BX.Promise();
const data = {
guid: this._id,
categoryName: this.categoryName,
signedConfigParams: this._signedParams
};
if (!BX.Type.isUndefined(entityId) && BX.Type.isInteger(entityId))
{
data.type = entityId > 0 ? this.onUpdatePostfix : this.onAddPostfix;
}
BX.ajax.runComponentAction(
"bitrix:ui.form",
"forceCommonScopeForAll",
{ mode: "ajax", data: { guid: this._id, categoryName: this.categoryName, signedConfigParams: this._signedParams } }
).then(function(){ promise.fulfill(); });
'bitrix:ui.form',
'forceCommonScopeForAll',
{ mode: 'ajax', data },
).then(() => {
promise.fulfill();
}).catch((response) => {});
return promise;
},
@@ -785,4 +811,4 @@ if(typeof BX.UI.EntityConfigField === "undefined")
self.initialize(settings);
return self;
};
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+12 -3
View File
@@ -4705,13 +4705,14 @@ if(typeof BX.UI.EntityEditorSection === "undefined")
fieldData["SETTINGS"] = settings;
}
fieldData['HELP_MESSAGE'] = params?.HELP_MESSAGE ?? '';
var showAlways = BX.prop.getBoolean(params, "showAlways", null);
var label = BX.prop.getString(params, "label", "");
var field = BX.prop.get(params, "field", null);
if(field)
{
var previousLabel = field.getTitle();
if(label !== "" || showAlways !== null)
{
field.setTitle(label);
@@ -4738,9 +4739,17 @@ if(typeof BX.UI.EntityEditorSection === "undefined")
fieldData["FIELD"] = field.getName();
fieldData["ENTITY_VALUE_ID"] = field.getEntityValueId();
if(this._editor.getConfigScope() === BX.UI.EntityConfigScope.common && label !== '' && previousLabel !== label)
if(this._editor.getConfigScope() === BX.UI.EntityConfigScope.common && label !== '')
{
fieldData["EDIT_FORM_LABEL"] = fieldData["LIST_COLUMN_LABEL"] = fieldData["LIST_FILTER_LABEL"] = label;
fieldData['EDIT_FORM_LABEL'] = label;
fieldData['LIST_COLUMN_LABEL'] = label;
fieldData['LIST_FILTER_LABEL'] = label;
}
else
{
fieldData['EDIT_FORM_LABEL'] = field._schemeElement._originalTitle;
fieldData['LIST_COLUMN_LABEL'] = field._schemeElement._originalTitle;
fieldData['LIST_FILTER_LABEL'] = field._schemeElement._originalTitle;
}
fieldData["VALUE"] = field.getFieldValue();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+156 -72
View File
@@ -2240,8 +2240,6 @@ if(typeof BX.UI.EntityEditor === "undefined")
this._toolPanel.setLocked(true);
}
this.registerSaveAnalyticsEvent('attempt');
var result = BX.UI.EntityValidationResult.create();
this.validate(result).then(
BX.delegate(
@@ -3246,22 +3244,31 @@ if(typeof BX.UI.EntityEditor === "undefined")
{
for (var userScopeId in this._config._userScopes)
{
items.push(
{
text: BX.message('UI_ENTITY_EDITOR_CHECK_SCOPE').replace('#SCOPE_NAME#', this._config._userScopes[userScopeId]['NAME']),
onclick: callback,
attributes: {
'data-id': userScopeId
},
className:
(
this._config.getScope() === BX.UI.EntityConfigScope.custom
&& this._config._userScopeId === userScopeId
)
? "menu-popup-item-accept" : "menu-popup-item-none"
const item = {
text: BX.Loc.getMessage('UI_ENTITY_EDITOR_CHECK_SCOPE', {
'#SCOPE_NAME#': this._config._userScopes[userScopeId]['NAME']
}),
onclick: callback,
attributes: {
'data-id': userScopeId,
},
className:
(
this._config.getScope() === BX.UI.EntityConfigScope.custom
&& this._config._userScopeId === userScopeId
)
? 'menu-popup-item-accept' : 'menu-popup-item-none',
}
);
};
if (this._entityId <= 0 && this._config._userScopes[userScopeId]['ON_ADD'] === 'Y')
{
items.push(item);
}
else if (this._entityId > 0 && this._config._userScopes[userScopeId]['ON_UPDATE'] === 'Y')
{
items.push(item);
}
}
}
@@ -3272,14 +3279,17 @@ if(typeof BX.UI.EntityEditor === "undefined")
items.push({ delimiter: true });
}
items.push(
{
id: "resetConfig",
text: BX.message("UI_ENTITY_EDITOR_RESET_CONFIG_MSGVER_2"),
onclick: callback,
className: "menu-popup-item-none"
}
);
if (!this._config._userScopeId)
{
items.push(
{
id: "resetConfig",
text: BX.message("UI_ENTITY_EDITOR_RESET_CONFIG_MSGVER_2"),
onclick: callback,
className: "menu-popup-item-none"
}
);
}
if(BX.prop.getBoolean(this._settings, "enableSettingsForAll", false))
{
@@ -3309,7 +3319,7 @@ if(typeof BX.UI.EntityEditor === "undefined")
items.push(
{
id: "editCommonConfig",
text: BX.message('UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_1'),
text: BX.message('UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_2'),
onclick: callback,
className: "menu-popup-item-none"
}
@@ -3545,9 +3555,22 @@ if(typeof BX.UI.EntityEditor === "undefined")
//region Configuration
getCommonConfigEditUrl: function(entityTypeId, moduleId)
{
return this._commonConfigEditUrl
let editUrl = this._commonConfigEditUrl
.replace(/#ENTITY_TYPE_ID_VALUE#/gi, entityTypeId)
.replace(/#MODULE_ID#/gi, moduleId);
let categoryId = BX.prop.getInteger(this._context.PARAMS, 'CATEGORY_ID');
if (BX.Type.isUndefined(categoryId))
{
categoryId = BX.prop.getInteger(this._context, 'CATEGORY_ID');
}
if (moduleId === 'crm' && BX.Type.isInteger(categoryId))
{
editUrl = editUrl + `&apply_filter=Y&CATEGORY=${categoryId}`;
}
return editUrl;
},
onMenuItemClick: function(event, menuItem)
{
@@ -3571,7 +3594,9 @@ if(typeof BX.UI.EntityEditor === "undefined")
case 'editCommonConfig':
BX.SidePanel.Instance.open(
this.getCommonConfigEditUrl(this._config._id, this.moduleId),
{width: 980}
{
cacheable: false,
}
);
break;
default:
@@ -3605,7 +3630,7 @@ if(typeof BX.UI.EntityEditor === "undefined")
return;
}
this._config.setScope(scope, userScopeId, this.moduleId).then(
this._config.setScope(scope, userScopeId, this.moduleId, this._entityId).then(
function()
{
var eventArgs = {
@@ -3625,19 +3650,24 @@ if(typeof BX.UI.EntityEditor === "undefined")
},
createConfigScopeForCheckedUsers: function()
{
var config = BX.UI.EntityEditorScopeConfig.create(
const options = BX.prop.getObject(this._settings, 'options', {});
const useHumanResourcesModule = BX.prop.getString(options, 'useHumanResourcesModule', 'N');
const useOnAddOnUpdateSegregation = BX.prop.getString(options, 'useOnAddOnUpdateSegregation', 'N');
const config = BX.UI.EntityEditorScopeConfig.create(
this._id+'_config', {
editor: this,
config: this._config.toJSON(),
entityTypeId: this._config._id,
isCommonConfig: true,
moduleId: this.moduleId
moduleId: this.moduleId,
useHumanResourcesModule: useHumanResourcesModule === 'Y',
useOnAddOnUpdateSegregation: useOnAddOnUpdateSegregation === 'Y'
});
config.open();
},
forceCommonConfigScopeForAll: function()
{
this._config.forceCommonScopeForAll().then(
this._config.forceCommonScopeForAll(this._entityId).then(
function()
{
var scope = this._config.getScope();
@@ -3653,7 +3683,7 @@ if(typeof BX.UI.EntityEditor === "undefined")
},
resetConfig: function()
{
this._config.reset(false).then(
this._config.reset(false, this._entityId).then(
function()
{
var scope = this._config.getScope();
@@ -4044,6 +4074,7 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
this._popup = null;
this._selector = null;
this._popupSaveButton = {};
this._name = "";
this._items = [];
@@ -4064,6 +4095,8 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
this.moduleId = null;
this._onSquareClick = BX.delegate(this.onSquareClick, this);
this._onAddInput = {};
this._onUpdateInput = {};
};
BX.UI.EntityEditorScopeConfig.prototype =
@@ -4084,6 +4117,8 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
this._entityTypeId = this.getSetting('entityTypeId', null);
this.moduleId = this.getSetting('moduleId', null);
this.useHumanResourcesModule = this.getSetting('useHumanResourcesModule', false);
this.useOnAddOnUpdateSegregation = this.getSetting('useOnAddOnUpdateSegregation', false);
},
getId: function()
{
@@ -4142,6 +4177,11 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
container.appendChild(this.prepareNameControl());
container.appendChild(this.prepareUserSelectControl());
container.appendChild(this.prepareForceSetToUsersControl());
if (this.useOnAddOnUpdateSegregation)
{
container.appendChild(this.prepareAvailableOnAddControl());
container.appendChild(this.prepareAvailableonUpdateControl());
}
return container;
},
@@ -4224,10 +4264,10 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
id: 'project',
},
{
id: 'department',
id: this.useHumanResourcesModule === true ? 'structure-node' : 'department',
options: {
selectMode: 'usersAndDepartments'
}
selectMode: 'usersAndDepartments',
},
},
],
}
@@ -4237,48 +4277,78 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
return container;
},
prepareForceSetToUsersControl: function()
prepareInputCheckboxTag()
{
var container = BX.create('div', {
style: {
paddingBottom: '10px',
borderBottom: '1px solid #f2f2f4'
}
});
return BX.Tag.render`
<input class="ui-ctl-element" type="checkbox" checked="checked">
`;
},
prepareCheckBoxField(controlObject, text, hint)
{
if (
!BX.Type.isElementNode(controlObject)
|| !BX.Type.isString(text)
)
{
return;
}
var control = BX.create('div', {
props:{
className: 'ui-ctl ui-ctl-checkbox ui-ctl-w100'
}
});
const container = BX.Tag.render`
<div style="padding-bottom: 10px; border-bottom: 1px solid #f2f2f4"></div>
`;
this._forceSetInput = BX.create("input", {
props:{
className: 'ui-ctl-element',
type: 'checkbox',
checked: true
},
});
const control = BX.Tag.render`
<div class="ui-ctl ui-ctl-checkbox ui-ctl-w100"></div
`;
control.appendChild(this._forceSetInput);
control.appendChild(BX.create('div', {
props:{
className: 'ui-ctl-label-text',
},
text: BX.message('UI_ENTITY_EDITOR_CONFIG_SCOPE_FORCE_INSTALL_TO_USERS_MSGVER_1')
}));
control.appendChild(
BX.UI.Hint.createNode(BX.message('UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS'))
);
BX.Dom.append(controlObject, control)
BX.Dom.append(BX.Tag.render`
<div class="ui-ctl-label-text">${text}</div
`, control);
container.appendChild(control);
if (BX.Type.isElementNode(hint))
{
BX.Dom.append(hint, control);
}
BX.Dom.append(control, container)
return container;
},
prepareForceSetToUsersControl: function()
{
this._forceSetInput = this.prepareInputCheckboxTag();
return this.prepareCheckBoxField(
this._forceSetInput,
BX.Loc.getMessage('UI_ENTITY_EDITOR_CONFIG_SCOPE_FORCE_INSTALL_TO_USERS_MSGVER_1'),
BX.UI.Hint.createNode(BX.message('UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS')),
);
},
prepareAvailableOnAddControl: function()
{
this._onAddInput = this.prepareInputCheckboxTag();
return this.prepareCheckBoxField(
this._onAddInput,
BX.Loc.getMessage('UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_ADD'),
BX.UI.Hint.createNode(BX.message('UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_ADD')),
);
},
prepareAvailableonUpdateControl: function()
{
this._onUpdateInput = this.prepareInputCheckboxTag();
return this.prepareCheckBoxField(
this._onUpdateInput,
BX.Loc.getMessage('UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_UPDATE'),
BX.UI.Hint.createNode(BX.message('UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_UPDATE')),
);
},
prepareButtons: function()
{
return [
new BX.UI.Button({
this._popupSaveButton = new BX.UI.Button({
text: BX.message('UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVE'),
tag: BX.UI.Button.Tag.LINK,
color: BX.UI.Button.Color.PRIMARY,
@@ -4286,8 +4356,10 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
click: function(params, event) {
event.preventDefault();
this.processSave();
}.bind(this)
}
}.bind(this),
},
useAirDesign: true,
style: BX.UI.Button.AirStyle.FILLED,
}),
new BX.UI.Button({
text: BX.message('UI_ENTITY_EDITOR_CONFIG_SCOPE_CANCEL'),
@@ -4297,9 +4369,11 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
click: function(params, event) {
event.preventDefault();
this.processCancel();
}.bind(this)
}
})
}.bind(this),
},
useAirDesign: true,
style: BX.UI.Button.AirStyle.PLAIN,
}),
];
},
close: function()
@@ -4339,6 +4413,12 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
},
processSave: function()
{
if (this._popupSaveButton.isWaiting())
{
return;
}
this._popupSaveButton.setWaiting();
this.clearErrors();
this.setName(this._nameInput.value);
@@ -4356,18 +4436,22 @@ if(typeof(BX.UI.EntityEditorScopeConfig) === "undefined")
forceSetToUsers: this._forceSetInput.checked,
categoryName: this._editor._config.categoryName,
common: 'Y',
availableOnAdd: this._onAddInput.checked,
availableOnUpdate: this._onUpdateInput.checked,
}
}
}
)
.then(
function(response) {
this._popupSaveButton.setWaiting(false);
this.close();
BX.UI.EntityEditorScopeConfig.prototype.notifyShow(response);
var scopeId = parseInt(response.data, 10);
this._editor.setConfigScope(BX.UI.EntityConfigScope.custom, scopeId);
}.bind(this)
).catch(function(response){
this._popupSaveButton.setWaiting(false);
//todo show errors some other way
this.fillErrors(response.data);
}.bind(this));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -132,16 +132,27 @@ if(typeof BX.UI.EntityConfigurationManager === "undefined")
typeId = BX.prop.get(params, "typeId", BX.UI.EntityUserFieldType.string);
}
let tooltipConfigurator = null;
if (params?.enableTooltipConfigurator)
{
tooltipConfigurator = new BX.UI.EntityEditorUfConfigurators.TooltipConfigurator(
this._id,
this._editor,
field,
);
}
return BX.UI.EntityEditorUserFieldConfigurator.create(
"",
{
parent,
typeId,
field,
tooltipConfigurator,
editor: this._editor,
schemeElement: null,
model: parent.getModel(),
mode: BX.UI.EntityEditorMode.edit,
parent: parent,
typeId: typeId,
field: field,
enableMandatoryControl: BX.prop.getBoolean(params, "enableMandatoryControl", true),
mandatoryConfigurator: params.mandatoryConfigurator,
showAlways: true
@@ -180,6 +191,8 @@ if (typeof BX.UI.EntityEditorFieldConfigurator === "undefined")
this._enableMandatoryControl = true;
this._mandatoryConfigurator = null;
this.tooltipConfigurator = null;
};
BX.extend(BX.UI.EntityEditorFieldConfigurator, BX.UI.EntityEditorControl);
BX.UI.EntityEditorFieldConfigurator.prototype.doInitialize = function()
@@ -194,6 +207,8 @@ if (typeof BX.UI.EntityEditorFieldConfigurator === "undefined")
this._enableMandatoryControl = BX.prop.getBoolean(this._settings, "enableMandatoryControl", true);
this._mandatoryConfigurator = BX.prop.get(this._settings, "mandatoryConfigurator", null);
this.tooltipConfigurator = this._settings?.tooltipConfigurator;
this._typeId = BX.prop.getString(this._settings, "typeId", "");
};
BX.UI.EntityEditorFieldConfigurator.prototype.checkField = function()
@@ -563,6 +578,11 @@ if (typeof BX.UI.EntityEditorFieldConfigurator === "undefined")
return;
}
if (this.tooltipConfigurator && !this.tooltipConfigurator.validateInputText())
{
return;
}
if(this._mandatoryConfigurator)
{
if(this._mandatoryConfigurator.isChanged())
@@ -613,6 +633,11 @@ if (typeof BX.UI.EntityEditorFieldConfigurator === "undefined")
params["enumeration"] = this._enumConfigurator.prepareSaveParams();
}
if (this.tooltipConfigurator)
{
params['HELP_MESSAGE'] = this.tooltipConfigurator.getTooltip();
}
return params;
};
BX.UI.EntityEditorFieldConfigurator.prototype.onCancelButtonClick = function(e)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -179,6 +179,11 @@ if(typeof BX.UI.EntitySchemeElement === "undefined")
}
this._hint = hint;
if (!this._hint)
{
this._hint = BX.util.htmlspecialchars(settings?.data?.fieldInfo?.HELP_MESSAGE ?? '');
}
this._title = title;
this._originalTitle = originalTitle;
this._lockText = lockText;
@@ -645,4 +650,4 @@ if(typeof BX.UI.EntitySchemeElement === "undefined")
self.initialize(settings);
return self;
}
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -330,6 +330,11 @@ if(typeof BX.UI.EntityUserFieldManager === "undefined")
fieldData["ENTITY_ID"] = this._fieldEntityId;
fieldData["SIGNATURE"] = this._creationSignature;
if (BX.type.isNotEmptyString(fieldData['HELP_MESSAGE']))
{
this.addFieldLabel('HELP_MESSAGE', fieldData['HELP_MESSAGE'], fieldData);
}
if(BX.type.isNotEmptyString(fieldData["EDIT_FORM_LABEL"]))
{
this.addFieldLabel("EDIT_FORM_LABEL", fieldData["EDIT_FORM_LABEL"], fieldData);
@@ -1963,6 +1968,18 @@ if(typeof BX.UI.EntityEditorUserFieldConfigurator === "undefined")
: this._field.checkOptionFlag(BX.UI.EntityEditorControlOptions.showAlways);
//endregion
//region Tooltip configurator
if (this.tooltipConfigurator)
{
this.tooltipConfiguratorCheckBox = this.createOption({
caption: this.tooltipConfigurator.getCaption(),
elements: [this.tooltipConfigurator.getInput().prepareLayout()],
});
this.tooltipConfigurator.getInput().adjustVisibility();
this.tooltipConfigurator.setCheckBox(this.tooltipConfiguratorCheckBox);
}
//endregion
if (
this.getEditor().canChangeCommonConfiguration()
&& this._typeId === BX.UI.EntityUserFieldType.file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,8 @@ $MESS["UI_ENTITY_EDITOR_CLOSE_CONFIRMATION"] = "Die Änderungen wurden nicht ges
$MESS["UI_ENTITY_EDITOR_COLLAPSE_HTML"] = "Minimieren";
$MESS["UI_ENTITY_EDITOR_CONFIGURE"] = "Konfigurieren";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS"] = "Dieses Formular-Layout wird für die gesamte Abteilung und alle Nutzer angewendet, die später beitreten. Es wird auch für ausgewählte Nutzer und Gruppen angewendet.";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_ADD"] = "Dieses Layout wird zur Auswahl verfügbar sein, wenn ein Element von diesem Typ erstellt wird.";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Dieses Layout wird zur Auswahl verfügbar sein, wenn ein Element von diesem Typ bearbeitet wird.";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_CANCEL"] = "Abbrechen";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON"] = "Standardmäßige Profilansicht";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON_MSGVER_2"] = "Standard-Layout";
@@ -19,6 +21,8 @@ $MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL"] = "Benutzerdefinierte Profilansi
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL_MSGVER_2"] = "Eigenes Layout";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVE"] = "Speichern";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVED_MSGVER_1"] = "Formular-Layout wurde gespeichert.";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_ADD"] = "Layout verfügbar machen, wenn ein Element erstellt wird";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Layout verfügbar machen, wenn ein Element bearbeitet wird";
$MESS["UI_ENTITY_EDITOR_CONFIRMATION"] = "Bestätigen";
$MESS["UI_ENTITY_EDITOR_CONTINUE"] = "Fortfahren";
$MESS["UI_ENTITY_EDITOR_COULD_NOT_FIND_ENTITY_ID"] = "Die ID des erstellten Elements kann nicht abgerufen werden.";
@@ -116,4 +120,5 @@ $MESS["UI_ENTITY_EDITOR_UF_STRING_TITLE"] = "Zeile";
$MESS["UI_ENTITY_EDITOR_UF_URL_LEGEND"] = "Gibt Web-Links an.";
$MESS["UI_ENTITY_EDITOR_UF_URL_TITLE"] = "Link";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_1"] = "Einstellungen";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_2"] = "Layouts...";
$MESS["UI_ENTITY_EDITOR_YES"] = "Ja";
@@ -9,6 +9,8 @@ $MESS["UI_ENTITY_EDITOR_CLOSE_CONFIRMATION"] = "The changes have not been saved.
$MESS["UI_ENTITY_EDITOR_COLLAPSE_HTML"] = "Collapse";
$MESS["UI_ENTITY_EDITOR_CONFIGURE"] = "Configure";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS"] = "This form layout will be applied to the entire department and users who join at a later time. It will also be applied to the selected users and workgroups.";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_ADD"] = "This layout will be available for selection when creating an item of this type.";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "This layout will be available for selection when editing an item of this type.";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_CANCEL"] = "Cancel";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON"] = "Standard profile view";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON_MSGVER_2"] = "Standard layout";
@@ -19,6 +21,8 @@ $MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL"] = "Custom profile view";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL_MSGVER_2"] = "Custom layout";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVE"] = "Save";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVED_MSGVER_1"] = "Form layout has been saved.";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_ADD"] = "Make layout available when creating an item";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Make layout available when editing an item";
$MESS["UI_ENTITY_EDITOR_CONFIRMATION"] = "Confirm";
$MESS["UI_ENTITY_EDITOR_CONTINUE"] = "Continue";
$MESS["UI_ENTITY_EDITOR_COULD_NOT_FIND_ENTITY_ID"] = "Cannot get the ID of the created entity.";
@@ -116,4 +120,5 @@ $MESS["UI_ENTITY_EDITOR_UF_STRING_TITLE"] = "String";
$MESS["UI_ENTITY_EDITOR_UF_URL_LEGEND"] = "Specifies web links.";
$MESS["UI_ENTITY_EDITOR_UF_URL_TITLE"] = "Link";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_1"] = "Settings";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_2"] = "Layouts...";
$MESS["UI_ENTITY_EDITOR_YES"] = "Yes";
@@ -9,28 +9,24 @@ $MESS["UI_ENTITY_EDITOR_CLOSE_CONFIRMATION"] = "Сіз өзгерістерді
$MESS["UI_ENTITY_EDITOR_COLLAPSE_HTML"] = "орау";
$MESS["UI_ENTITY_EDITOR_CONFIGURE"] = "Баптау";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS"] = "Карточканың түрі бүкіл бөлімге және бөлімге кейінірек қосылатын қызметкерлерге орнатылады. Оны таңдалған қызметкерлер мен топ мүшелері де көреді";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_ADD"] = "Осы типтегі элементті жасау кезінде карточканың түрін таңдауға болады";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Осы түрдегі элементті өңдеу кезінде карточканың түрін таңдауға болады";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_CANCEL"] = "Болдырмау";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON"] = "Карточканың жалпы түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON_MSGVER_1"] = "Карточканың жалпы түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_COMMON_MSGVER_2"] = "Карточканың жалпы түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_FORCE_INSTALL_TO_USERS"] = "Таңдалған пайдаланушыларға таныстыруды орнату";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_FORCE_INSTALL_TO_USERS_MSGVER_1"] = "Автоматты түрде орнатыңыз";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_MEMBERS"] = "Таныстыруға қатыстыларды таңдау:";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_MEMBERS_MSGVER_1"] = "Кімге қолжетімді:";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_NAME"] = "Ұсыныс атауы:";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_NAME_MSGVER_1"] = "Атауы:";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_NAME_PLACEHOLDER"] = "Атауын енгізіңіз";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL"] = "Менің карточкамның түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL_MSGVER_1"] = "Менің карточкамның түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_PERSONAL_MSGVER_2"] = "Менің карточкамның түрі";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVE"] = "Сақтау";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVED"] = "Таныстыру сақталды";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVED_MSGVER_1"] = "Карточка түрі сақталды";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_ADD"] = "Элементті жасау кезінде қолжетімді";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Элементті өңдеу кезінде қолжетімді";
$MESS["UI_ENTITY_EDITOR_CONFIRMATION"] = "Растау";
$MESS["UI_ENTITY_EDITOR_CONTINUE"] = "Жалғастыру";
$MESS["UI_ENTITY_EDITOR_COULD_NOT_FIND_ENTITY_ID"] = "Құрылған мән идентификаторын алу мүмкін болмады.";
$MESS["UI_ENTITY_EDITOR_CREATE_FIELD"] = "Өрісті құру";
$MESS["UI_ENTITY_EDITOR_CREATE_SCOPE"] = "Жаңа таныстыру жасау";
$MESS["UI_ENTITY_EDITOR_CREATE_SCOPE_MSGVER_1"] = "Карточканың жаңа түрі";
$MESS["UI_ENTITY_EDITOR_CREATE_SECTION"] = "Бөлімді құру";
$MESS["UI_ENTITY_EDITOR_DELETE"] = "Жою";
@@ -48,7 +44,6 @@ $MESS["UI_ENTITY_EDITOR_FIELD_SEARCH_PLACEHOLDER"] = "Өрістер бойын
$MESS["UI_ENTITY_EDITOR_FIELD_TITLE"] = "Өріс атауы";
$MESS["UI_ENTITY_EDITOR_FIELD_TRANSFER_DIALOG_TITLE"] = "Өрістерді таңдау";
$MESS["UI_ENTITY_EDITOR_FORCE_COMMON_CONFIG_FOR_ALL"] = "Барлық пайдаланушылар үшін ортақ карточканы орнату";
$MESS["UI_ENTITY_EDITOR_FORCE_COMMON_CONFIG_FOR_ALL_MSGVER_1"] = "Барлық пайдаланушылар үшін ортақ карточканы орнату";
$MESS["UI_ENTITY_EDITOR_FORCE_COMMON_CONFIG_FOR_ALL_MSGVER_2"] = "Барлық пайдаланушылар үшін ортақ карточканы орнату";
$MESS["UI_ENTITY_EDITOR_HIDE"] = "Жасыру";
$MESS["UI_ENTITY_EDITOR_HIDE_DENIED"] = "Міндетті өрісті жасыру мүмкін емес, оның параметрлерін өзгертіп көріңіз.";
@@ -67,8 +62,6 @@ $MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL_PLURAL_0"] = "#TOTAL# сомаға
$MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL_PLURAL_1"] = "#TOTAL# сомаға #COUNT# позиция";
$MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL_PLURAL_2"] = "#TOTAL# сомаға #COUNT# позиция";
$MESS["UI_ENTITY_EDITOR_REQUIRED_FIELD_ERROR"] = "Өтінеміз, мәнді енгізіңіз.";
$MESS["UI_ENTITY_EDITOR_RESET_CONFIG"] = "Баптауларды бастапқы карточка түріне келтіру";
$MESS["UI_ENTITY_EDITOR_RESET_CONFIG_MSGVER_1"] = "Баптауларды бастапқы карточка түріне келтіру";
$MESS["UI_ENTITY_EDITOR_RESET_CONFIG_MSGVER_2"] = "Баптауларды бастапқы карточка түріне келтіру";
$MESS["UI_ENTITY_EDITOR_SAVE"] = "Сақтау";
$MESS["UI_ENTITY_EDITOR_SAVE_ERROR_CONTENT"] = "Сақтау кезінде қате орын алды";
@@ -79,11 +72,7 @@ $MESS["UI_ENTITY_EDITOR_SELECT"] = "Таңдау";
$MESS["UI_ENTITY_EDITOR_SELECT_FIELD"] = "Өрісті таңдау";
$MESS["UI_ENTITY_EDITOR_SELECT_FIELD_FROM_OTHER_SECTION"] = "Басқа бөлімнен таңдау";
$MESS["UI_ENTITY_EDITOR_SHOW_ALWAYS"] = "Әрқашан көрсету";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_COMMON_CONFIG"] = "Карточканың жалпы түрін қосу";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_COMMON_CONFIG_MSGVER_1"] = "Карточканың жалпы түрін қосу";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_COMMON_CONFIG_MSGVER_2"] = "Карточканың жалпы түрін қосу";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_PERSONAL_CONFIG"] = "Менің карточкамның түрін қосу";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_PERSONAL_CONFIG_MSGVER_1"] = "Менің карточкамның түрін қосу";
$MESS["UI_ENTITY_EDITOR_SWITCH_TO_PERSONAL_CONFIG_MSGVER_2"] = "Менің карточкамның түрін қосу";
$MESS["UI_ENTITY_EDITOR_TITLE_EDIT"] = "Атауды редакциялау";
$MESS["UI_ENTITY_EDITOR_TITLE_EDIT_UNSAVED_CHANGES"] = "Атауды редакциялау үшін карточкаға енгізілген өзгертулерді сақтаңыз.";
@@ -130,6 +119,6 @@ $MESS["UI_ENTITY_EDITOR_UF_STRING_LEGEND"] = "Мәтін, символдар н
$MESS["UI_ENTITY_EDITOR_UF_STRING_TITLE"] = "Жол";
$MESS["UI_ENTITY_EDITOR_UF_URL_LEGEND"] = "Веб-парақшаларға сілтемелерді сақтау үшін";
$MESS["UI_ENTITY_EDITOR_UF_URL_TITLE"] = "Сілтеме";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE"] = "Таныстыруды өзгерту/жою...";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_1"] = "Баптаулар";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_2"] = "Карточка түрінің баптаулары";
$MESS["UI_ENTITY_EDITOR_YES"] = "Иә";
@@ -1,4 +1,4 @@
<?
<?php
$MESS["UI_ENTITY_EDITOR_YES"] = "Да";
$MESS["UI_ENTITY_EDITOR_NO"] = "Нет";
$MESS["UI_ENTITY_EDITOR_SELECT"] = "Выбрать";
@@ -97,6 +97,7 @@ $MESS["UI_ENTITY_EDITOR_SECTION_OPEN_DETAILS"] = "открыть";
$MESS["UI_ENTITY_EDITOR_CHECK_SCOPE"] = "Выбрать \"#SCOPE_NAME#\"";
$MESS["UI_ENTITY_EDITOR_CREATE_SCOPE_MSGVER_1"] = "Новый вид карточки";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_1"] = "Настройки";
$MESS["UI_ENTITY_EDITOR_UPDATE_SCOPE_MSGVER_2"] = "Настройки вида карточки";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_NAME_MSGVER_1"] = "Название";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_MEMBERS_MSGVER_1"] = "Кому доступен";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_FORCE_INSTALL_TO_USERS_MSGVER_1"] = "Установить автоматически";
@@ -104,6 +105,10 @@ $MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_FORCE_INSTALL_TO_USERS"] = "Вид к
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVE"] = "Сохранить";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_CANCEL"] = "Отменить";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SAVED_MSGVER_1"] = "Вид карточки сохранён";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_ADD"] = "Вид карточки можно будет выбрать при создании элемента этого типа";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_ADD"] = "Доступен при создании элемента";
$MESS["UI_ENTITY_EDITOR_CONFIG_HINT_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Вид карточки можно будет выбрать при редактировании элемента этого типа";
$MESS["UI_ENTITY_EDITOR_CONFIG_SCOPE_SET_AVAILABLE_ON_UPDATE"] = "Доступен при редактировании элемента";
$MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL"] = "#COUNT# позиций на сумму #TOTAL#";
$MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL_PLURAL_0"] = "#COUNT# позиция на сумму #TOTAL#";
$MESS["UI_ENTITY_EDITOR_PRODUCT_SUMMARY_TOTAL_PLURAL_1"] = "#COUNT# позиции на сумму #TOTAL#";
@@ -0,0 +1,5 @@
module.exports = {
input: 'src/tooltip-configurator.js',
output: 'dist/tooltip-configurator.bundle.js',
namespace: 'BX.UI.EntityEditorUfConfigurators',
};
@@ -0,0 +1,14 @@
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
{
die();
}
return [
'css' => 'dist/tooltip-configurator.bundle.css',
'js' => 'dist/tooltip-configurator.bundle.js',
'rel' => [
'main.core',
],
'skip_core' => false,
];
@@ -0,0 +1,12 @@
textarea.ui-ctl-element {
width: 100%;
height: auto;
min-height: 40px;
padding-top: 12px;
padding-bottom: 12px;
resize: vertical;
-webkit-box-flex: 1;
-ms-flex: auto;
flex: auto;
text-wrap: auto;
}
@@ -0,0 +1,220 @@
/* eslint-disable */
this.BX = this.BX || {};
this.BX.UI = this.BX.UI || {};
(function (exports,main_core) {
'use strict';
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
var _id = /*#__PURE__*/new WeakMap();
var _inputText = /*#__PURE__*/new WeakMap();
var _labelText = /*#__PURE__*/new WeakMap();
var _configurator = /*#__PURE__*/new WeakMap();
var _errorLayout = /*#__PURE__*/new WeakMap();
var _inputLayout = /*#__PURE__*/new WeakMap();
var _wrapper = /*#__PURE__*/new WeakMap();
var TextInput = /*#__PURE__*/function () {
function TextInput(id, configurator, inputText) {
babelHelpers.classCallCheck(this, TextInput);
_classPrivateFieldInitSpec(this, _id, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _inputText, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _labelText, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _configurator, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _errorLayout, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _inputLayout, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec(this, _wrapper, {
writable: true,
value: void 0
});
babelHelpers.classPrivateFieldSet(this, _id, id !== '' ? id : main_core.util.getRandomString(4));
babelHelpers.classPrivateFieldSet(this, _configurator, configurator);
babelHelpers.classPrivateFieldSet(this, _inputText, inputText);
babelHelpers.classPrivateFieldSet(this, _labelText, main_core.Loc.getMessage('UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL'));
babelHelpers.classPrivateFieldSet(this, _errorLayout, null);
babelHelpers.classPrivateFieldSet(this, _inputLayout, null);
babelHelpers.classPrivateFieldSet(this, _wrapper, null);
}
babelHelpers.createClass(TextInput, [{
key: "prepareLayout",
value: function prepareLayout() {
babelHelpers.classPrivateFieldSet(this, _inputLayout, main_core.Tag.render(_templateObject || (_templateObject = babelHelpers.taggedTemplateLiteral(["\n\t\t\t<textarea \n\t\t\t\tclass=\"ui-ctl-element\"\n\t\t\t\trows=\"3\"\n\t\t\t\tid=\"", "\"\n\t\t\t>", "</textarea>\n\t\t"])), babelHelpers.classPrivateFieldGet(this, _id), babelHelpers.classPrivateFieldGet(this, _inputText)));
var label = main_core.Tag.render(_templateObject2 || (_templateObject2 = babelHelpers.taggedTemplateLiteral(["\n\t\t\t<label class=\"ui-entity-editor-block-title\">\n\t\t\t\t", "\n\t\t\t</label>\n\t\t"])), babelHelpers.classPrivateFieldGet(this, _labelText));
babelHelpers.classPrivateFieldSet(this, _wrapper, main_core.Tag.render(_templateObject3 || (_templateObject3 = babelHelpers.taggedTemplateLiteral(["\n\t\t\t<div class=\"ui-entity-editor-new-field-visibility-wrapper\">\n\t\t\t\t", "\n\t\t\t\t", "\n\t\t\t</div>\n\t\t"])), label, babelHelpers.classPrivateFieldGet(this, _inputLayout)));
return babelHelpers.classPrivateFieldGet(this, _wrapper);
}
}, {
key: "renderError",
value: function renderError(errorText) {
if (main_core.Type.isNull(babelHelpers.classPrivateFieldGet(this, _errorLayout))) {
babelHelpers.classPrivateFieldSet(this, _errorLayout, main_core.Tag.render(_templateObject4 || (_templateObject4 = babelHelpers.taggedTemplateLiteral(["\n\t\t\t\t<label class=\"ui-entity-editor-user-field-setting-error-text\"></label>\n\t\t\t"]))));
babelHelpers.classPrivateFieldGet(this, _wrapper).append(babelHelpers.classPrivateFieldGet(this, _errorLayout));
}
babelHelpers.classPrivateFieldGet(this, _errorLayout).innerHTML = errorText;
}
}, {
key: "adjustVisibility",
value: function adjustVisibility() {
if (babelHelpers.classPrivateFieldGet(this, _configurator).isInputEnabled()) {
main_core.Dom.show(babelHelpers.classPrivateFieldGet(this, _wrapper));
} else {
main_core.Dom.hide(babelHelpers.classPrivateFieldGet(this, _wrapper));
}
}
}, {
key: "getInputText",
value: function getInputText() {
return babelHelpers.classPrivateFieldGet(this, _inputLayout).value;
}
}]);
return TextInput;
}();
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration$1(obj, privateSet); privateSet.add(obj); }
function _classPrivateFieldInitSpec$1(obj, privateMap, value) { _checkPrivateRedeclaration$1(obj, privateMap); privateMap.set(obj, value); }
function _checkPrivateRedeclaration$1(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
var MAX_TOOLTIP_LENGTH = 250;
var _id$1 = /*#__PURE__*/new WeakMap();
var _editor = /*#__PURE__*/new WeakMap();
var _field = /*#__PURE__*/new WeakMap();
var _previousTooltip = /*#__PURE__*/new WeakMap();
var _caption = /*#__PURE__*/new WeakMap();
var _textInput = /*#__PURE__*/new WeakMap();
var _checkBox = /*#__PURE__*/new WeakMap();
var _isShowInput = /*#__PURE__*/new WeakMap();
var _checkBoxHandler = /*#__PURE__*/new WeakMap();
var _onCheckBoxClick = /*#__PURE__*/new WeakSet();
var TooltipConfigurator = /*#__PURE__*/function () {
function TooltipConfigurator(id, editor, field) {
var _babelHelpers$classPr, _babelHelpers$classPr2, _babelHelpers$classPr3;
babelHelpers.classCallCheck(this, TooltipConfigurator);
_classPrivateMethodInitSpec(this, _onCheckBoxClick);
_classPrivateFieldInitSpec$1(this, _id$1, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _editor, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _field, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _previousTooltip, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _caption, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _textInput, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _checkBox, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _isShowInput, {
writable: true,
value: void 0
});
_classPrivateFieldInitSpec$1(this, _checkBoxHandler, {
writable: true,
value: void 0
});
babelHelpers.classPrivateFieldSet(this, _id$1, id !== '' ? id : main_core.util.getRandomString(4));
babelHelpers.classPrivateFieldSet(this, _editor, editor);
babelHelpers.classPrivateFieldSet(this, _field, field);
babelHelpers.classPrivateFieldSet(this, _previousTooltip, (_babelHelpers$classPr = (_babelHelpers$classPr2 = babelHelpers.classPrivateFieldGet(this, _field)) === null || _babelHelpers$classPr2 === void 0 ? void 0 : (_babelHelpers$classPr3 = _babelHelpers$classPr2._schemeElement) === null || _babelHelpers$classPr3 === void 0 ? void 0 : _babelHelpers$classPr3._hint) !== null && _babelHelpers$classPr !== void 0 ? _babelHelpers$classPr : '');
babelHelpers.classPrivateFieldSet(this, _isShowInput, Boolean(babelHelpers.classPrivateFieldGet(this, _previousTooltip)));
babelHelpers.classPrivateFieldSet(this, _checkBoxHandler, _classPrivateMethodGet(this, _onCheckBoxClick, _onCheckBoxClick2).bind(this));
babelHelpers.classPrivateFieldSet(this, _textInput, null);
babelHelpers.classPrivateFieldSet(this, _checkBox, null);
babelHelpers.classPrivateFieldSet(this, _caption, main_core.Loc.getMessage('UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL'));
}
babelHelpers.createClass(TooltipConfigurator, [{
key: "validateInputText",
value: function validateInputText() {
var input = this.getInput();
var text = input.getInputText();
if (text.length > MAX_TOOLTIP_LENGTH) {
var errorText = main_core.Loc.getMessage('UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR', {
'#MAX_LENGTH#': MAX_TOOLTIP_LENGTH
});
input.renderError(errorText);
return false;
}
input.renderError('');
return true;
}
}, {
key: "setCheckBox",
value: function setCheckBox(checkBox) {
if (!main_core.Type.isNull(babelHelpers.classPrivateFieldGet(this, _checkBox))) {
main_core.Event.unbind(babelHelpers.classPrivateFieldGet(this, _checkBox), 'click', babelHelpers.classPrivateFieldGet(this, _checkBoxHandler));
}
babelHelpers.classPrivateFieldSet(this, _checkBox, checkBox);
if (this.isInputEnabled()) {
babelHelpers.classPrivateFieldGet(this, _checkBox).checked = true;
}
if (!main_core.Type.isNull(babelHelpers.classPrivateFieldGet(this, _checkBox))) {
main_core.Event.bind(babelHelpers.classPrivateFieldGet(this, _checkBox), 'click', babelHelpers.classPrivateFieldGet(this, _checkBoxHandler));
}
}
}, {
key: "getTooltip",
value: function getTooltip() {
return this.isInputEnabled() ? this.getInput().getInputText() : '';
}
}, {
key: "getCaption",
value: function getCaption() {
return babelHelpers.classPrivateFieldGet(this, _caption);
}
}, {
key: "isInputEnabled",
value: function isInputEnabled() {
return babelHelpers.classPrivateFieldGet(this, _isShowInput);
}
}, {
key: "getInput",
value: function getInput() {
if (main_core.Type.isNull(babelHelpers.classPrivateFieldGet(this, _textInput))) {
babelHelpers.classPrivateFieldSet(this, _textInput, new TextInput(babelHelpers.classPrivateFieldGet(this, _id$1), this, babelHelpers.classPrivateFieldGet(this, _previousTooltip)));
}
return babelHelpers.classPrivateFieldGet(this, _textInput);
}
}]);
return TooltipConfigurator;
}();
function _onCheckBoxClick2() {
babelHelpers.classPrivateFieldSet(this, _isShowInput, !babelHelpers.classPrivateFieldGet(this, _isShowInput));
babelHelpers.classPrivateFieldGet(this, _textInput).adjustVisibility();
}
exports.TooltipConfigurator = TooltipConfigurator;
}((this.BX.UI.EntityEditorUfConfigurators = this.BX.UI.EntityEditorUfConfigurators || {}),BX));
//# sourceMappingURL=tooltip-configurator.bundle.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
textarea.ui-ctl-element{width:100%;height:auto;min-height:40px;padding-top:12px;padding-bottom:12px;resize:vertical;-webkit-box-flex:1;-ms-flex:auto;flex:auto;text-wrap:auto}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
<?php
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL'] = 'Tooltipp für Feld aktivieren';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL'] = 'Tooltipp-Text';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR'] = 'Tooltipp-Text darf #MAX_LENGTH# Zeichen nicht überschreiten.';
@@ -0,0 +1,5 @@
<?php
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL'] = 'Enable field tooltip';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL'] = 'Tooltip text';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR'] = 'Tooltip text must not exceed #MAX_LENGTH# characters.';
@@ -0,0 +1,5 @@
<?php
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL'] = 'Өріске арналған кеңес';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL'] = 'Ишара мәтіні';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR'] = 'Ишара мәтіні #MAX_LENGTH# таңбаларынан аспауы керек';
@@ -0,0 +1,5 @@
<?php
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL'] = 'Подсказка для поля';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL'] = 'Текст подсказки';
$MESS['UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR'] = 'Текст подсказки должен быть не больше #MAX_LENGTH# символов';
@@ -0,0 +1,10 @@
textarea.ui-ctl-element {
width: 100%;
height: auto;
min-height: 40px;
padding-top: 12px;
padding-bottom: 12px;
resize: vertical;
flex: auto;
text-wrap: auto;
}
@@ -0,0 +1,87 @@
import { Type, Tag, Loc, util, Dom } from 'main.core';
import type { TooltipConfigurator } from './tooltip-configurator';
import './style.css';
export class TextInput
{
#id: string;
#inputText: string;
#labelText: string;
#configurator: TooltipConfigurator;
#errorLayout: HTMLElement;
#inputLayout: HTMLInputElement;
#wrapper: HTMLElement;
constructor(
id: string,
configurator: TooltipConfigurator,
inputText: string,
)
{
this.#id = id !== '' ? id : util.getRandomString(4);
this.#configurator = configurator;
this.#inputText = inputText;
this.#labelText = Loc.getMessage('UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_INPUT_LABEL');
this.#errorLayout = null;
this.#inputLayout = null;
this.#wrapper = null;
}
prepareLayout(): HTMLElement
{
this.#inputLayout = Tag.render`
<textarea
class="ui-ctl-element"
rows="3"
id="${this.#id}"
>${this.#inputText}</textarea>
`;
const label = Tag.render`
<label class="ui-entity-editor-block-title">
${this.#labelText}
</label>
`;
this.#wrapper = Tag.render`
<div class="ui-entity-editor-new-field-visibility-wrapper">
${label}
${this.#inputLayout}
</div>
`;
return this.#wrapper;
}
renderError(errorText): void
{
if (Type.isNull(this.#errorLayout))
{
this.#errorLayout = Tag.render`
<label class="ui-entity-editor-user-field-setting-error-text"></label>
`;
this.#wrapper.append(this.#errorLayout);
}
this.#errorLayout.innerHTML = errorText;
}
adjustVisibility(): void
{
if (this.#configurator.isInputEnabled())
{
Dom.show(this.#wrapper);
}
else
{
Dom.hide(this.#wrapper);
}
}
getInputText(): string
{
return this.#inputLayout.value;
}
}
@@ -0,0 +1,113 @@
import { Type, Event, Loc, util } from 'main.core';
import { TextInput } from './text-input';
const MAX_TOOLTIP_LENGTH = 250;
export class TooltipConfigurator
{
#id: string;
#editor: BX.UI.EntityEditor;
#field: BX.UI.EntityEditorUserField;
#previousTooltip: string;
#caption: string;
#textInput: TextInput;
#checkBox: HTMLElement;
#isShowInput: boolean;
#checkBoxHandler: function;
constructor(
id: string,
editor: BX.UI.EntityEditor,
field: BX.UI.EntityEditorUserField,
)
{
this.#id = id !== '' ? id : util.getRandomString(4);
this.#editor = editor;
this.#field = field;
this.#previousTooltip = this.#field?._schemeElement?._hint ?? '';
this.#isShowInput = Boolean(this.#previousTooltip);
this.#checkBoxHandler = this.#onCheckBoxClick.bind(this);
this.#textInput = null;
this.#checkBox = null;
this.#caption = Loc.getMessage('UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_CHECKBOX_LABEL');
}
validateInputText(): boolean
{
const input = this.getInput();
const text = input.getInputText();
if (text.length > MAX_TOOLTIP_LENGTH)
{
const errorText = Loc.getMessage(
'UI_ENTITY_EDITOR_UF_CONFIGURATORS_TOOLTIP_LENGTH_VALIDATION_ERROR',
{
'#MAX_LENGTH#': MAX_TOOLTIP_LENGTH,
},
);
input.renderError(errorText);
return false;
}
input.renderError('');
return true;
}
setCheckBox(checkBox: HTMLElement)
{
if (!Type.isNull(this.#checkBox))
{
Event.unbind(this.#checkBox, 'click', this.#checkBoxHandler);
}
this.#checkBox = checkBox;
if (this.isInputEnabled())
{
this.#checkBox.checked = true;
}
if (!Type.isNull(this.#checkBox))
{
Event.bind(this.#checkBox, 'click', this.#checkBoxHandler);
}
}
getTooltip(): string
{
return this.isInputEnabled() ? this.getInput().getInputText() : '';
}
getCaption(): string
{
return this.#caption;
}
isInputEnabled(): boolean
{
return this.#isShowInput;
}
getInput(): TextInput
{
if (Type.isNull(this.#textInput))
{
this.#textInput = new TextInput(
this.#id,
this,
this.#previousTooltip,
);
}
return this.#textInput;
}
#onCheckBoxClick(): void
{
this.#isShowInput = !this.#isShowInput;
this.#textInput.adjustVisibility();
}
}