ru.coon 2.6.5 → 2.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/index.js +0 -1
- package/package.json +2 -2
- package/src/Function.js +1 -1
- package/src/common/component/characteristic/characteristicGroup/EditorOptionsWindow.js +150 -0
- package/src/common/component/characteristic/characteristicGroup/EditorOptionsWindowController.js +174 -0
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +23 -0
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditorController.js +38 -0
- package/src/common/component/editor/CharacteristicGridEditor.js +3 -0
- package/src/common/component/editor/TypedCharacteristicEditor.js +0 -5
- package/src/common/component/editor/creators/BaseEditorCreator.js +0 -3
- package/src/common/component/editor/creators/ByReportEditorCreator.js +0 -3
- package/src/common/component/editor/creators/CustomPanelEditorCreator.js +0 -3
- package/src/common/component/editor/creators/ForeignKeyEditorCreator.js +0 -3
- package/src/common/component/editor/creators/NoteEditorCreator.js +0 -3
- package/src/common/component/editor/creators/NumberEditorCreator.js +17 -4
- package/src/common/component/editor/creators/SimpleReportEditorCreator.js +0 -3
- package/src/common/component/editor/creators/TriggerFieldEditorCreator.js +0 -3
- package/src/common/component/formeditor/UiCFCard.js +86 -0
- package/src/common/component/formeditor/UiCFCardsGrid.js +69 -0
- package/src/common/component/formeditor/UiCFCell.js +12 -0
- package/src/common/component/formeditor/UiCFCellController.js +236 -0
- package/src/common/component/formeditor/UiCFCheckboxGroup.js +53 -0
- package/src/common/component/formeditor/UiCFContainer.js +15 -0
- package/src/common/component/formeditor/UiCFContainerController.js +217 -0
- package/src/common/component/formeditor/UiCFFieldsConfig.js +342 -0
- package/src/common/component/formeditor/UiCFRadioGrid.js +70 -0
- package/src/common/component/formeditor/UiCFRadioGroup.js +53 -0
- package/src/common/component/formeditor/UiCFReportField.js +48 -0
- package/src/common/component/formeditor/UiCFRow.js +13 -0
- package/src/common/component/formeditor/UiCFRowController.js +155 -0
- package/src/common/component/formeditor/UiCFSegmentedButton.js +62 -0
- package/src/common/component/formeditor/UiCFSegmentedButtonGrid.js +70 -0
- package/src/common/component/formeditor/UiCFSettingsWindow.js +62 -0
- package/src/common/component/formeditor/UiCFSpacer.js +8 -0
- package/src/common/component/formeditor/UiCFTab.js +51 -0
- package/src/common/component/formeditor/UiCustomForm.js +33 -0
- package/src/common/component/formeditor/UiCustomFormController.js +6 -0
- package/src/common/component/formeditor/UiCustomFormEditor.js +191 -0
- package/src/common/component/formeditor/UiCustomFormEditor.scss +13 -0
- package/src/common/component/formeditor/UiCustomFormEditorController.js +654 -0
- package/src/common/component/formeditor/UiCustomFormEditorView.js +7 -0
- package/src/report/component/settings/plugin/ReportFormPluginPanelController.js +1 -1
- package/src/report/plugin/grid/ReportColumnStatePlugin.js +18 -2
- package/src/uielement/component/SearchByPropCombo.js +53 -0
- package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +19 -2
- package/src/uielement/plugin/configPanel/MethodChainPluginConfigPanelFormEditor.js +10 -6
- package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +34 -46
- package/src/version.js +1 -1
|
@@ -20,7 +20,7 @@ Ext.define('Coon.report.plugin.grid.ReportColumnStatePlugin', {
|
|
|
20
20
|
if (this.report.getEnableAutoSize) {
|
|
21
21
|
Coon.log.log('To disable automatic column size, you need to set the enableAutoSize property of the report to "false"');
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
this.checkEnableAutoSize();
|
|
24
24
|
this.applySavedState();
|
|
25
25
|
|
|
26
26
|
const events = ['columnmove', 'columnhide', 'columnshow', 'columnresize'];
|
|
@@ -28,7 +28,22 @@ Ext.define('Coon.report.plugin.grid.ReportColumnStatePlugin', {
|
|
|
28
28
|
this.grid.on(e, this.columnInteractionHandler, this);
|
|
29
29
|
}.bind(this));
|
|
30
30
|
},
|
|
31
|
-
|
|
31
|
+
checkEnableAutoSize() {
|
|
32
|
+
if (this.grid.getEnableAutoSize() === true) {
|
|
33
|
+
const savedState = localStorage.getItem('reportsState');
|
|
34
|
+
let deserializedState; let currentReportState;
|
|
35
|
+
try {
|
|
36
|
+
deserializedState = JSON.parse(savedState);
|
|
37
|
+
currentReportState = deserializedState[this.report.reportId];
|
|
38
|
+
} catch (e) {
|
|
39
|
+
Coon.log.log('Incorrect JSON state');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (currentReportState) {
|
|
43
|
+
this.grid.setEnableAutoSize(false);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
32
47
|
columnInteractionHandler(_, col) {
|
|
33
48
|
const currentState = [];
|
|
34
49
|
const columns = this.grid.getColumns();
|
|
@@ -88,5 +103,6 @@ Ext.define('Coon.report.plugin.grid.ReportColumnStatePlugin', {
|
|
|
88
103
|
localStorage.removeItem('reportsState');
|
|
89
104
|
const newState = JSON.stringify(Object.assign({}, oldState, state));
|
|
90
105
|
localStorage.setItem('reportsState', newState);
|
|
106
|
+
this.checkEnableAutoSize();
|
|
91
107
|
},
|
|
92
108
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Ext.define('Coon.uielement.component.SearchByPropCombo', {
|
|
2
|
+
extend: 'Coon.common.field.combo.BaseComboBox',
|
|
3
|
+
xtype: 'SearchByPropCombo',
|
|
4
|
+
fieldLabel: 'Обработчик',
|
|
5
|
+
loadOnRender: false,
|
|
6
|
+
hideMode: 'offsets',
|
|
7
|
+
valueField: 'handlerName',
|
|
8
|
+
displayField: 'handlerWithPtype',
|
|
9
|
+
minChars: 2,
|
|
10
|
+
store: {
|
|
11
|
+
fields: [
|
|
12
|
+
{name: 'handlerName', type: 'string'},
|
|
13
|
+
{name: 'ptype', type: 'string'},
|
|
14
|
+
{
|
|
15
|
+
name: 'handlerWithPtype',
|
|
16
|
+
calculate: function(data) {
|
|
17
|
+
return data.handlerName + ' - ' + data.ptype;
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
autoLoad: false,
|
|
22
|
+
},
|
|
23
|
+
triggers: {
|
|
24
|
+
search: {
|
|
25
|
+
cls: 'svg-icon svg-icon-magnifying-glass',
|
|
26
|
+
handler: function(el) {
|
|
27
|
+
this.up('UiCustomPanelPluginPanel').getController().searchByProp(this.getValue());
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
getActualPlugins: function() {
|
|
32
|
+
const pluginGrid = this.up('UiCustomPanelEditor').down('UiCustomPanelPluginGrid');
|
|
33
|
+
if (pluginGrid) {
|
|
34
|
+
const data = pluginGrid.getStore().getRange().map((record) => {
|
|
35
|
+
if (record.get('handlerName') !== '-/-') {
|
|
36
|
+
return {
|
|
37
|
+
handlerName: record.get('handlerName'),
|
|
38
|
+
ptype: record.get('ptype'),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}).filter((item) => item!==undefined);
|
|
42
|
+
this.store.loadData(data);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
initComponent() {
|
|
46
|
+
this.on('focus', this.getActualPlugins, this);
|
|
47
|
+
this.on('render', this.getActualPlugins, this);
|
|
48
|
+
this.on('change', (el, newVal) => {
|
|
49
|
+
el.triggers.search.setHidden(!newVal);
|
|
50
|
+
}, this);
|
|
51
|
+
this.callParent();
|
|
52
|
+
},
|
|
53
|
+
});
|
|
@@ -14,15 +14,27 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
|
|
|
14
14
|
this.controller.callDialog = this.callDialog.bind(this);
|
|
15
15
|
view.on('afterrender', () => {
|
|
16
16
|
const window = view.up('WindowWrap');
|
|
17
|
-
if (window) {
|
|
17
|
+
if (window && this.checkChangesOnSave !== false) {
|
|
18
18
|
window.on('beforeclose', this.onBeforeCloseWindow, this);
|
|
19
19
|
}
|
|
20
|
+
this.controller.lookup('standardCancelButton').setHidden(!window);
|
|
20
21
|
}, this);
|
|
21
|
-
|
|
22
22
|
this.controller.unifiedButtonToolbar = Ext.create('Ext.toolbar.Toolbar', {
|
|
23
23
|
dock: this.dock,
|
|
24
24
|
items: [
|
|
25
25
|
'->',
|
|
26
|
+
{
|
|
27
|
+
xtype: 'button',
|
|
28
|
+
reference: 'standardCancelButton',
|
|
29
|
+
text: 'Закрыть',
|
|
30
|
+
hidden: true,
|
|
31
|
+
handler: () => {
|
|
32
|
+
const window = view.up('WindowWrap');
|
|
33
|
+
if (window) {
|
|
34
|
+
window.close();
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
},
|
|
26
38
|
{
|
|
27
39
|
xtype: 'button',
|
|
28
40
|
reference: 'standardSaveButton',
|
|
@@ -50,6 +62,11 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
|
|
|
50
62
|
title: 'Сохранить изменения?',
|
|
51
63
|
message: 'Были обнаружены изменения, сохранить их?',
|
|
52
64
|
buttons: Ext.Msg.YESNOCANCEL,
|
|
65
|
+
buttonText: {
|
|
66
|
+
yes: 'Сохранить и закрыть',
|
|
67
|
+
no: 'Закрыть без сохранения',
|
|
68
|
+
cancel: 'Вернуться',
|
|
69
|
+
},
|
|
53
70
|
icon: Ext.Msg.QUESTION,
|
|
54
71
|
fn: function(btn) {
|
|
55
72
|
if (btn === 'yes') {
|
|
@@ -60,19 +60,21 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
xtype: 'checkbox',
|
|
63
|
-
boxLabel: 'Прерывать выполнение последовательности если
|
|
64
|
-
flex: 1,
|
|
63
|
+
boxLabel: 'Прерывать выполнение последовательности если Обработчик возвращает false',
|
|
65
64
|
bind: {
|
|
66
65
|
value: '{breakChainOnFalse}',
|
|
67
66
|
},
|
|
68
67
|
},
|
|
69
68
|
{
|
|
70
69
|
xtype: 'ReportPropertiesGrid',
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
plugins: [
|
|
71
|
+
{ptype: 'cellediting', clicksToEdit: 2}
|
|
72
|
+
],
|
|
73
|
+
title: 'Последовательно вызываемые обработчики',
|
|
74
|
+
flex: 1,
|
|
73
75
|
columns: [
|
|
74
76
|
{
|
|
75
|
-
text: '
|
|
77
|
+
text: 'Обработчик',
|
|
76
78
|
dataIndex: 'value',
|
|
77
79
|
required: true,
|
|
78
80
|
flex: 1,
|
|
@@ -97,6 +99,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
101
|
xtype: 'widgetcolumn',
|
|
102
|
+
width: 40,
|
|
100
103
|
widget: {
|
|
101
104
|
xtype: 'SearchByPropButton',
|
|
102
105
|
tooltip: 'перейти к плагину с таким обработчиком',
|
|
@@ -104,7 +107,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
104
107
|
},
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
|
-
text: '
|
|
110
|
+
text: 'Обработчик ошибки (Когда основной обработчик вернет false)',
|
|
108
111
|
dataIndex: 'errorHandler',
|
|
109
112
|
required: true,
|
|
110
113
|
flex: 1,
|
|
@@ -137,6 +140,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
|
|
|
137
140
|
},
|
|
138
141
|
{
|
|
139
142
|
xtype: 'widgetcolumn',
|
|
143
|
+
width: 40,
|
|
140
144
|
widget: {
|
|
141
145
|
xtype: 'SearchByPropButton',
|
|
142
146
|
tooltip: 'перейти к плагину с таким обработчиком',
|
|
@@ -8,6 +8,7 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
8
8
|
prepareBeanHandlerName: '',
|
|
9
9
|
validateBeanHandlerName: '',
|
|
10
10
|
dock: 'bottom',
|
|
11
|
+
checkChangesOnSave: true,
|
|
11
12
|
},
|
|
12
13
|
},
|
|
13
14
|
layout: {
|
|
@@ -22,56 +23,24 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
xtype: '
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
labelWidth: 60,
|
|
30
|
-
flex: 1,
|
|
31
|
-
loadOnRender: false,
|
|
32
|
-
hideMode: 'offsets',
|
|
33
|
-
allowBlank: false,
|
|
34
|
-
store: 'codeHandlers',
|
|
35
|
-
bind: {
|
|
36
|
-
value: '{saveHandlerName}',
|
|
37
|
-
},
|
|
38
|
-
valueField: 'id',
|
|
39
|
-
displayField: 'id',
|
|
26
|
+
xtype: 'SearchByPropCombo',
|
|
27
|
+
fieldLabel: 'Обработчик валидации данных',
|
|
28
|
+
bind: {
|
|
29
|
+
value: '{validateBeanHandlerName}',
|
|
40
30
|
},
|
|
41
31
|
},
|
|
42
32
|
{
|
|
43
|
-
xtype: '
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
labelWidth: 60,
|
|
48
|
-
flex: 1,
|
|
49
|
-
loadOnRender: false,
|
|
50
|
-
hideMode: 'offsets',
|
|
51
|
-
allowBlank: false,
|
|
52
|
-
store: 'codeHandlers',
|
|
53
|
-
bind: {
|
|
54
|
-
value: '{prepareBeanHandlerName}',
|
|
55
|
-
},
|
|
56
|
-
valueField: 'id',
|
|
57
|
-
displayField: 'id',
|
|
33
|
+
xtype: 'SearchByPropCombo',
|
|
34
|
+
fieldLabel: 'Обработчик подготовки данных для сохранения',
|
|
35
|
+
bind: {
|
|
36
|
+
value: '{prepareBeanHandlerName}',
|
|
58
37
|
},
|
|
59
38
|
},
|
|
60
39
|
{
|
|
61
|
-
xtype: '
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
labelWidth: 60,
|
|
66
|
-
flex: 1,
|
|
67
|
-
loadOnRender: false,
|
|
68
|
-
hideMode: 'offsets',
|
|
69
|
-
store: 'codeHandlers',
|
|
70
|
-
bind: {
|
|
71
|
-
value: '{validateBeanHandlerName}',
|
|
72
|
-
},
|
|
73
|
-
valueField: 'id',
|
|
74
|
-
displayField: 'id',
|
|
40
|
+
xtype: 'SearchByPropCombo',
|
|
41
|
+
fieldLabel: 'Обработчик сохранения данных',
|
|
42
|
+
bind: {
|
|
43
|
+
value: '{saveHandlerName}',
|
|
75
44
|
},
|
|
76
45
|
},
|
|
77
46
|
{
|
|
@@ -88,6 +57,24 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
88
57
|
text: 'Отобразить вверху',
|
|
89
58
|
value: 'top',
|
|
90
59
|
}],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
fieldLabel: 'Отслеживать не сохраненные данные при закрытии',
|
|
63
|
+
xtype: 'combo',
|
|
64
|
+
store: {
|
|
65
|
+
fields: ['val', 'descr'],
|
|
66
|
+
data: [
|
|
67
|
+
{'val': true, 'descr': 'Да'},
|
|
68
|
+
{'val': false, 'descr': 'Нет'}
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
editable: false,
|
|
72
|
+
queryMode: 'local',
|
|
73
|
+
displayField: 'descr',
|
|
74
|
+
valueField: 'val',
|
|
75
|
+
bind: {
|
|
76
|
+
value: '{checkChangesOnSave}',
|
|
77
|
+
},
|
|
91
78
|
}
|
|
92
79
|
],
|
|
93
80
|
getData: function() {
|
|
@@ -108,11 +95,12 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
|
|
|
108
95
|
getConfiguration: function() {
|
|
109
96
|
const result = {};
|
|
110
97
|
const vm = this.getViewModel();
|
|
111
|
-
['saveHandlerName', 'prepareBeanHandlerName', 'validateBeanHandlerName', 'dock'].forEach((el) => {
|
|
112
|
-
if (vm.get(el)) {
|
|
98
|
+
['saveHandlerName', 'prepareBeanHandlerName', 'validateBeanHandlerName', 'dock', 'checkChangesOnSave'].forEach((el) => {
|
|
99
|
+
if (typeof vm.get(el) !== 'undefined') {
|
|
113
100
|
result[el] = vm.get(el);
|
|
114
101
|
}
|
|
115
102
|
});
|
|
116
103
|
return result;
|
|
117
104
|
},
|
|
105
|
+
|
|
118
106
|
});
|
package/src/version.js
CHANGED