ru.coon 2.7.71 → 2.7.72
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 +11 -0
- package/package.json +1 -1
- package/src/Function.js +20 -18
- package/src/common/component/editor/creators/NoteEditorCreator.js +25 -17
- package/src/report/plugin/configPanel/ExportReportDataToFilePluginConfigPanel.js +4 -4
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +6 -6
- package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +14 -11
- package/src/uielement/plugin/AddDoInitSupportPlugin.js +6 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# Version 2.7.72, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3f8a4ef311ec96763166dbe8024b538f84ef3059)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <span style='color:red'> BFL-15221 NoteEditorCreator save char</span> ([f84fbe], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f84fbe281e0bc8a0b63f1ebc0e7f99ef6bc13703))
|
|
4
|
+
* <span style='color:red'> BFL-15221 NoteEditorCreator save char</span> ([867ac3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/867ac3aae8286bdaeb28cbdb6621835c64b46e02))
|
|
5
|
+
* <span style='color:red'> BFL-15221 NoteEditorCreator save char</span> ([763e5e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/763e5e9698c48152030d556b70e7118c8f9fbef6))
|
|
6
|
+
* <span style='color:red'> HT-9812 ExportReportToData mini refactoring</span> ([587848], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/587848edd5af1f741ddc7955c01fc9f5b8a15b84))
|
|
7
|
+
|
|
8
|
+
* refactoring Coon.Function.executeComponentDoInit, OpenCustomPanelButtonPlugin ([257c38], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/257c38fc91c1c8eff31848d28e63e1d63d423a6c))
|
|
9
|
+
* update: CHANGELOG.md ([92e4c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/92e4c7496c4a5a87501a676805165c328272c1f8))
|
|
10
|
+
|
|
1
11
|
# Version 2.7.71, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/71f09381b29db031d26baa580e8c18fc436a5a81)
|
|
2
12
|
* ## Fixes
|
|
3
13
|
* <span style='color:red'>fix GetUIStructure
|
|
@@ -238,6 +248,7 @@ fix: restore version of custom panel in editor</span> ([53a300], [link](http://g
|
|
|
238
248
|
* ## Fixes
|
|
239
249
|
* <span style='color:red'> Remove scrollbar visibility && revert menu width. Related to HT-9095.</span> ([acc197], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/acc1977f32526ee7b49c8d60f95af9ed1d87faf1))
|
|
240
250
|
* <span style='color:red'> HT-9208 submit button disabled until file is selected</span> ([c55498], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c55498ff17153280cfc025f435eea7acf4be8b0c))
|
|
251
|
+
* <span style='color:red'> HT-9272 ExportReportDataToFilePlugin add property exportAllRows</span> ([b6de17], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b6de17fbd7687720d45595ba372669b076176e3f))
|
|
241
252
|
|
|
242
253
|
* update: CHANGELOG.md ([c4f6c0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c4f6c05b996abea0c49849086c9aef2a4c9e2e6b))
|
|
243
254
|
|
package/package.json
CHANGED
package/src/Function.js
CHANGED
|
@@ -491,26 +491,28 @@ Ext.define('Coon.Function', {
|
|
|
491
491
|
return result;
|
|
492
492
|
},
|
|
493
493
|
|
|
494
|
-
executeComponentDoInit: function(component, parameters) {
|
|
495
|
-
|
|
496
|
-
|
|
494
|
+
executeComponentDoInit: function(component, parameters = {}) {
|
|
495
|
+
if (!component) {
|
|
496
|
+
Coon.log.error('Coon.Function.executeComponentDoInit error: component cant be empty');
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
const scope = typeof component.getController === 'function' &&
|
|
497
500
|
component.getController() || component;
|
|
498
|
-
if (
|
|
499
|
-
|
|
500
|
-
const p = parameters || [];
|
|
501
|
-
const pObject = parameters || {};
|
|
502
|
-
if (Ext.isFunction(appropriateToInit.inputParameters)) {
|
|
503
|
-
Ext.each(appropriateToInit.inputParameters(), function(field) {
|
|
504
|
-
const parameterName = field.name;
|
|
505
|
-
const parameterValue = p[parameterName];
|
|
506
|
-
initArguments.push(parameterValue);
|
|
507
|
-
pObject[parameterName] = parameterValue;
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
appropriateToInit.doInit.apply(appropriateToInit, initArguments);
|
|
511
|
-
return pObject;
|
|
501
|
+
if (typeof scope.doInit !== 'function') {
|
|
502
|
+
return false;
|
|
512
503
|
}
|
|
513
|
-
|
|
504
|
+
const inputParameters = typeof scope.inputParameters === 'function' &&
|
|
505
|
+
Array.isArray(scope.inputParameters()) &&
|
|
506
|
+
scope.inputParameters() ||
|
|
507
|
+
[];
|
|
508
|
+
const args = inputParameters.reduce((acc, {name}) => {
|
|
509
|
+
if (typeof name === 'string' && name) {
|
|
510
|
+
acc.push(parameters[name]);
|
|
511
|
+
}
|
|
512
|
+
return acc;
|
|
513
|
+
}, []);
|
|
514
|
+
scope.doInit.apply(scope, args);
|
|
515
|
+
return parameters;
|
|
514
516
|
},
|
|
515
517
|
|
|
516
518
|
getDecimalSeparator: function() {
|
|
@@ -3,13 +3,12 @@ Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
|
3
3
|
alias: 'widget.NoteEditorCreator',
|
|
4
4
|
xtype: 'NoteEditorCreator',
|
|
5
5
|
createField: function(record, parent) {
|
|
6
|
-
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
7
6
|
this.field = Ext.create(Ext.apply({
|
|
8
7
|
xtype: 'OpenDialogField',
|
|
9
8
|
dialogForm: this.showPanel(record, parent),
|
|
10
9
|
getValue: this.getValue,
|
|
11
|
-
noteID: record.get(
|
|
12
|
-
text: record.get(
|
|
10
|
+
noteID: record.get('value'),
|
|
11
|
+
text: record.get('valueDescription'),
|
|
13
12
|
setVisibleValue: function(visibleValue) {
|
|
14
13
|
this.visibleValue = visibleValue;
|
|
15
14
|
},
|
|
@@ -21,10 +20,7 @@ Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
|
21
20
|
},
|
|
22
21
|
|
|
23
22
|
showPanel: function(record, parent) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.noteID = record.get(ns.$value);
|
|
27
|
-
this.text = record.get(ns.$valueDescription);
|
|
23
|
+
this.noteID = record.get('value');
|
|
28
24
|
this.textField = Ext.create({
|
|
29
25
|
xtype: 'textarea',
|
|
30
26
|
width: '99%',
|
|
@@ -58,7 +54,9 @@ Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
|
58
54
|
xtype: 'button',
|
|
59
55
|
ui: 'orange-button',
|
|
60
56
|
text: 'Сохранить',
|
|
61
|
-
handler:
|
|
57
|
+
handler: function() {
|
|
58
|
+
this.saveValue(record, parent);
|
|
59
|
+
}.bind(this),
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
62
|
xtype: 'button',
|
|
@@ -71,33 +69,43 @@ Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
|
71
69
|
],
|
|
72
70
|
}],
|
|
73
71
|
|
|
74
|
-
title: 'Редактирование характеристики ' + record.get(
|
|
72
|
+
title: 'Редактирование характеристики ' + record.get('typeDescription'),
|
|
75
73
|
});
|
|
76
|
-
this.win.on('setValue', function() {
|
|
77
|
-
record.set(ns.$value, this.textField.getValue().trim() ? this.getValue() : '');
|
|
78
|
-
record.set(ns.$valueDescription, this.textField.getValue());
|
|
79
|
-
this.win.close();
|
|
80
|
-
}, this);
|
|
81
74
|
return this.win;
|
|
82
75
|
},
|
|
83
76
|
|
|
84
|
-
saveValue: function() {
|
|
77
|
+
saveValue: function(record, parent) {
|
|
85
78
|
if (!this.textField.validate()) {
|
|
86
79
|
return;
|
|
87
80
|
}
|
|
88
81
|
if (Ext.isEmpty(this.textField.getValue().trim())) {
|
|
89
82
|
this.noteID = '';
|
|
90
|
-
this.
|
|
83
|
+
this.setValueInField(record, parent);
|
|
91
84
|
} else {
|
|
92
85
|
const saveCommand = Ext.create('Coon.common.command.AddNoteCommand');
|
|
93
86
|
saveCommand.on('complete', function(response) {
|
|
94
87
|
this.noteID = response.noteId;
|
|
95
|
-
this.
|
|
88
|
+
this.setValueInField(record, parent);
|
|
96
89
|
}, this);
|
|
97
90
|
saveCommand.execute(this.noteID, this.textField.getValue());
|
|
98
91
|
}
|
|
99
92
|
},
|
|
100
93
|
|
|
94
|
+
setValueInField(record, parent) {
|
|
95
|
+
const value = this.textField.getValue().trim() ? this.getValue() : '';
|
|
96
|
+
const description = this.textField.getValue();
|
|
97
|
+
record.set('value', value);
|
|
98
|
+
record.set('valueDescription', description);
|
|
99
|
+
this.field.setVisibleValue(description);
|
|
100
|
+
this.field.setValue(value);
|
|
101
|
+
const context = {
|
|
102
|
+
value: value,
|
|
103
|
+
record: record,
|
|
104
|
+
};
|
|
105
|
+
parent.fireEvent('edit', null, context);
|
|
106
|
+
this.win.close();
|
|
107
|
+
},
|
|
108
|
+
|
|
101
109
|
getValue: function() {
|
|
102
110
|
return this.noteID;
|
|
103
111
|
},
|
|
@@ -118,10 +118,10 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
118
118
|
<br>border - символ начала и окончания строки, по умолчанию '"' (двойные кавычки)
|
|
119
119
|
<br>separator - разделитель значений ячеек, по умолчанию ',' (запятая)
|
|
120
120
|
<br>Пример конфига:
|
|
121
|
-
{
|
|
122
|
-
border: '',
|
|
123
|
-
separator: ';'
|
|
124
|
-
}
|
|
121
|
+
<br>{
|
|
122
|
+
<br>border: '',
|
|
123
|
+
<br>separator: ';'
|
|
124
|
+
<br>}
|
|
125
125
|
</div>`,
|
|
126
126
|
},
|
|
127
127
|
{
|
|
@@ -36,7 +36,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
36
36
|
this.buttonText = this.buttonText || (format && 'Экспорт в ' + format);
|
|
37
37
|
grid.on('render', function() {
|
|
38
38
|
this.report = grid.findParentByType('ReportPanel');
|
|
39
|
-
if (this.
|
|
39
|
+
if (this.getAddToSearchButton() === true) {
|
|
40
40
|
this.report.northPanel.addToSearchButtonMenu({
|
|
41
41
|
text: this.buttonText,
|
|
42
42
|
iconCls: this.buttonIconCls,
|
|
@@ -51,7 +51,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
51
51
|
this.fileName += Ext.Date.format(new Date(), dateFormat);
|
|
52
52
|
}
|
|
53
53
|
}, this);
|
|
54
|
-
this.printPdfCommand = Ext.create('command.GetPdfReportDataCommand', {useRawFilterParams: this.
|
|
54
|
+
this.printPdfCommand = Ext.create('command.GetPdfReportDataCommand', {useRawFilterParams: this.getAddToSearchButton()});
|
|
55
55
|
},
|
|
56
56
|
callExportByType() {
|
|
57
57
|
switch (this.config.exportFileFormat) {
|
|
@@ -190,7 +190,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
190
190
|
},
|
|
191
191
|
printCsvFile: async function(extension) {
|
|
192
192
|
this.grid.mask('подождите пожалуйста...');
|
|
193
|
-
const currentParamList = this.
|
|
193
|
+
const currentParamList = this.getAddToSearchButton() ? this.report.northPanel.collectParams() : this.report.currentParamList;
|
|
194
194
|
|
|
195
195
|
const parameterList = [];
|
|
196
196
|
|
|
@@ -201,7 +201,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
/* const hasSelected = !!(this.getSelectedRecords() || []).length;
|
|
204
|
-
const url = hasSelected && !this.
|
|
204
|
+
const url = hasSelected && !this.getAddToSearchButton() ?
|
|
205
205
|
'/ReportFormData/getExcelFromRowsOrReport' :
|
|
206
206
|
'/ReportFormData/getCSVReport';*/
|
|
207
207
|
const url = '/ReportFormData/getCSVReport';
|
|
@@ -238,7 +238,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
238
238
|
},
|
|
239
239
|
printExcelFile: async function() {
|
|
240
240
|
this.grid.mask('подождите пожалуйста...');
|
|
241
|
-
const currentParamList = this.
|
|
241
|
+
const currentParamList = this.getAddToSearchButton() ? this.report.northPanel.collectParams() : this.report.currentParamList;
|
|
242
242
|
|
|
243
243
|
const parameterList = [];
|
|
244
244
|
|
|
@@ -249,7 +249,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
const hasSelected = !!(this.getSelectedRecords() || []).length;
|
|
252
|
-
const url = hasSelected && !this.
|
|
252
|
+
const url = hasSelected && !this.getAddToSearchButton() ?
|
|
253
253
|
'/ReportFormData/getExcelFromRowsOrReport' :
|
|
254
254
|
'/ReportFormData/getExcelReport';
|
|
255
255
|
|
|
@@ -66,29 +66,32 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
|
|
|
66
66
|
Ext.Msg.alert('Сообщение системы', 'Для плагина OpenCustomPanelButtonPlugin не определен тип панели (xtype) для открытия');
|
|
67
67
|
} else {
|
|
68
68
|
if (this.xtypeSelector === 'UI_LIST') {
|
|
69
|
-
if (!this.
|
|
69
|
+
if (!this.getUIElement()) {
|
|
70
70
|
Coon.log.log('UIElement не указан');
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
const command = Ext.create('command.GetUIElementCommand');
|
|
74
|
-
command.on('complete', function(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (exists === undefined) {
|
|
78
|
-
Coon.log.log(UIElementBean[elementNS.$xtype] + ' does not exist');
|
|
74
|
+
command.on('complete', function(uIElementBean) {
|
|
75
|
+
if (!uIElementBean || !uIElementBean.xtype) {
|
|
76
|
+
Coon.log.error('UIElement dont exist or invalid');
|
|
79
77
|
return;
|
|
80
78
|
}
|
|
81
|
-
|
|
79
|
+
const exists = Ext.ClassManager.getByAlias('widget.' + uIElementBean.xtype);
|
|
80
|
+
if (!exists) {
|
|
81
|
+
Coon.log.log(uIElementBean.xtype + ' does not exist');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.effectiveXTypeObject.effectiveXType = uIElementBean.xtype;
|
|
82
85
|
this.effectiveXTypeObject.properties =
|
|
83
86
|
this.effectiveXTypeObject.effectiveXType === 'UiCustomPanel' ?
|
|
84
|
-
JSON5.parse(
|
|
87
|
+
JSON5.parse(uIElementBean.propertyData) :
|
|
85
88
|
(
|
|
86
|
-
Ext.decode(
|
|
87
|
-
Coon.Function.convertAdvancedProperties(
|
|
89
|
+
Ext.decode(uIElementBean.propertyData) ||
|
|
90
|
+
Coon.Function.convertAdvancedProperties(uIElementBean.properties)
|
|
88
91
|
);
|
|
89
92
|
this.component.getContextManager().executeFunction(Ext.bind(this.openPanel, this), this.parameters);
|
|
90
93
|
}, this);
|
|
91
|
-
command.execute(this.
|
|
94
|
+
command.execute(this.getUIElement());
|
|
92
95
|
} else {
|
|
93
96
|
this.component.getContextManager().executeFunction(Ext.bind(this.openPanel, this), this.parameters);
|
|
94
97
|
}
|
|
@@ -10,6 +10,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
isSingle: true,
|
|
13
|
+
|
|
13
14
|
init: function(view) {
|
|
14
15
|
const controller = view.getController();
|
|
15
16
|
if (controller) {
|
|
@@ -20,6 +21,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
20
21
|
view.getController().inputParameters = Ext.bind(this.inputParameters, this);
|
|
21
22
|
}
|
|
22
23
|
},
|
|
24
|
+
|
|
23
25
|
convertToNewFormat() { // Привести данные к новому формату хранения
|
|
24
26
|
this.getParametersToModel().forEach((param, index) => {
|
|
25
27
|
if (Ext.isObject(param)) {
|
|
@@ -32,6 +34,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
36
|
},
|
|
37
|
+
|
|
35
38
|
validatePath(path) {
|
|
36
39
|
const pathes = path.split('.');
|
|
37
40
|
return !pathes.some((path) => {
|
|
@@ -40,6 +43,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
40
43
|
}
|
|
41
44
|
});
|
|
42
45
|
},
|
|
46
|
+
|
|
43
47
|
setDefaultValueToViewModel() { // Инициализируем во ViewModel локальные параметры
|
|
44
48
|
const dataMapping = this.getLocalParameters();
|
|
45
49
|
dataMapping.forEach((el) => {
|
|
@@ -48,6 +52,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
48
52
|
}
|
|
49
53
|
});
|
|
50
54
|
},
|
|
55
|
+
|
|
51
56
|
handler: function(...parameters) { // Инициализируем во ViewModel входные параметры
|
|
52
57
|
if (this.isTraceEnabled()) {
|
|
53
58
|
this.tracePlugin(...parameters);
|
|
@@ -61,6 +66,7 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
|
|
|
61
66
|
}
|
|
62
67
|
});
|
|
63
68
|
},
|
|
69
|
+
|
|
64
70
|
inputParameters: function() {
|
|
65
71
|
return this.inputParams.map((param) => {
|
|
66
72
|
return {name: param.value};
|
package/src/version.js
CHANGED