ru.coon 2.7.35 → 2.7.37
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 +17 -0
- package/package.json +1 -1
- package/src/app/viewPort/Main.js +1 -0
- package/src/report/component/SimpleReportTag.js +9 -0
- package/src/report/component/reportpanel/NorthPanel.js +1 -1
- package/src/report/plugin/configPanel/CopyRowsFromGridConfigPanel.js +1 -1
- package/src/report/plugin/configPanel/ExportReportDataToFilePluginConfigPanel.js +7 -1
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +2 -1
- package/src/report/plugin/grid/GridEditorsPlugin.js +60 -65
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# Version 2.7.37, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9c30533f4a94a056b7723c7bf7e07379a979e3fd)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <span style='color:red'> HT-9272 ExportReportDataToFilePlugin add property exportAllRows</span> ([58af00], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/58af00a085a964d6fcc2c2eca42ec98d4137b373))
|
|
4
|
+
|
|
5
|
+
* update: CHANGELOG.md ([0ed1ed], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ed1edefa3a1a5c3bee5bf4cac0da1ba663026b3))
|
|
6
|
+
|
|
7
|
+
# Version 2.7.36, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9857ca304c8428bc53cddfa0e1476f6af4ec1778)
|
|
8
|
+
* ## Fixes
|
|
9
|
+
* <span style='color:red'> HT-9057 GridEditorsPlugin fix date format</span> ([b702c4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b702c4eefab3c75b8c2be1857d510e70b9c0e52a))
|
|
10
|
+
* <span style='color:red'> HT-9057 GridEditorsPlugin fix date format</span> ([18109c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/18109c790b243796ec018b98bc1a4add82814378))
|
|
11
|
+
* <span style='color:red'> HT-9043 set filter panel height on afterlayout</span> ([a7c47b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a7c47b732b32f629e7329a2c33be2b38b1a28354))
|
|
12
|
+
* <span style='color:red'> HT-9043 add getSubmitValue for SimpleReportTag and set filter panel height on afterlayout</span> ([3b815e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3b815ef047e51ff023a191abf3af0a6e220cb26a))
|
|
13
|
+
|
|
14
|
+
* TR-69031 :fix возвращено событие appready в Main ([ec2a2c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ec2a2c43c03849e19c50df245aa16d544297e879))
|
|
15
|
+
* upd ([90f4cf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/90f4cfad61c07e88f68c48c0000e3f9141e082a2))
|
|
16
|
+
* update: CHANGELOG.md ([9104da], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9104daa43944f2f1bf49ee8e1298bc31d251f091))
|
|
17
|
+
|
|
1
18
|
# Version 2.7.35, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8a36c677b3a30a03bfb3b7045d0c663fdf090bf3)
|
|
2
19
|
* update: CHANGELOG.md ([78b2a5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/78b2a5573bdea9aede4f354a0584f5e606f7c573))
|
|
3
20
|
|
package/package.json
CHANGED
package/src/app/viewPort/Main.js
CHANGED
|
@@ -106,6 +106,15 @@ Ext.define('Coon.report.component.SimpleReportTag', {
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
|
|
109
|
+
getSubmitValue: function() {
|
|
110
|
+
const valueArray = this.callParent();
|
|
111
|
+
if (Ext.isArray(valueArray)) {
|
|
112
|
+
return valueArray.join();
|
|
113
|
+
} else {
|
|
114
|
+
return valueArray;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
|
|
109
118
|
updateReportId: function(newReportId, OldReportId) {
|
|
110
119
|
if (this.initComplete && ((this.getDefaultParameters() && this.getDefaultParameters().doLoad) || this.getAutoLoadData())) {
|
|
111
120
|
this.loadHandler({});
|
|
@@ -211,7 +211,7 @@ Ext.define('Coon.report.component.report.NorthPanel', {
|
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
213
|
if (this.enableHighlightingRequiredFields || this.getEnableChipToolbar()) {
|
|
214
|
-
tbarsHeight += tbarH;
|
|
214
|
+
tbarsHeight += tbarH + 10;
|
|
215
215
|
tbar.show();
|
|
216
216
|
if (this.isLegendHidden() && this.enableHighlightingRequiredFields && !this.legend) {
|
|
217
217
|
this.legend = this.buildLegend();
|
|
@@ -362,7 +362,7 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
|
|
|
362
362
|
getAllRowsCheckBox: function() {
|
|
363
363
|
return {
|
|
364
364
|
xtype: 'checkbox',
|
|
365
|
-
boxLabel: 'выгружать все строки',
|
|
365
|
+
boxLabel: 'выгружать все строки (если false, то выгружаются только выделенные)',
|
|
366
366
|
name: 'exportAllRows',
|
|
367
367
|
value: true,
|
|
368
368
|
};
|
|
@@ -75,6 +75,7 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
this.createAddButtonPanel(),
|
|
78
|
+
this.getAllRowsCheckBox(),
|
|
78
79
|
this.createCustomColumnsFieldset()
|
|
79
80
|
],
|
|
80
81
|
defaults: {
|
|
@@ -116,6 +117,11 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
116
117
|
Конфиг. Для выгрузки в csv можно задать значение параметров:
|
|
117
118
|
<br>border - символ начала и окончания строки, по умолчанию '"' (двойные кавычки)
|
|
118
119
|
<br>separator - разделитель значений ячеек, по умолчанию ',' (запятая)
|
|
120
|
+
<br>Пример конфига:
|
|
121
|
+
{
|
|
122
|
+
border: '',
|
|
123
|
+
separator: ';'
|
|
124
|
+
}
|
|
119
125
|
</div>`,
|
|
120
126
|
},
|
|
121
127
|
{
|
|
@@ -138,7 +144,7 @@ Ext.define('Coon.report.plugin.configPanel.ExportReportDataToFilePluginConfigPan
|
|
|
138
144
|
},
|
|
139
145
|
checkboxName: 'allowUserColumns',
|
|
140
146
|
checkboxToggle: true,
|
|
141
|
-
|
|
147
|
+
collapsed: true,
|
|
142
148
|
labelWidth: 130,
|
|
143
149
|
width: '100%',
|
|
144
150
|
title: 'Пользовательский набор полей для экспорта',
|
|
@@ -9,6 +9,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
9
9
|
reportFileName: undefined,
|
|
10
10
|
appendDateToFileName: true,
|
|
11
11
|
exportFileFormat: undefined,
|
|
12
|
+
exportAllRows: true,
|
|
12
13
|
allowUserSelectColumnsToUpload: undefined,
|
|
13
14
|
addToSearchButton: false,
|
|
14
15
|
},
|
|
@@ -166,7 +167,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
166
167
|
getRecordsToPrint: function() {
|
|
167
168
|
this.config.toExcel = [];
|
|
168
169
|
const selectedRecords = this.getSelectedRecords();
|
|
169
|
-
const records = selectedRecords.length ? selectedRecords : this.grid.getStore().getRange();
|
|
170
|
+
const records = !this.exportAllRows && selectedRecords.length ? selectedRecords : this.grid.getStore().getRange();
|
|
170
171
|
|
|
171
172
|
records.forEach((rec) => {
|
|
172
173
|
const recData = rec.getData();
|
|
@@ -18,85 +18,80 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
|
|
|
18
18
|
configurePanelWizard: 'GridEditorPluginConfig',
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
getEditorConfig() {
|
|
22
|
+
this.editorConfig = this.editorConfig || [];
|
|
23
|
+
if (Array.isArray(this.editorConfig)) {
|
|
24
|
+
return this.editorConfig;
|
|
25
|
+
} else {
|
|
26
|
+
return [this.editorConfig];
|
|
26
27
|
}
|
|
27
|
-
const c = config || {};
|
|
28
|
-
Ext.apply(this, c);
|
|
29
|
-
this.callParent([config]);
|
|
30
28
|
},
|
|
31
29
|
|
|
32
|
-
init
|
|
30
|
+
init(grid) {
|
|
33
31
|
this.grid = grid;
|
|
34
32
|
this.grid.on('afterrender', this.setEditors, this);
|
|
35
33
|
},
|
|
36
34
|
|
|
37
|
-
setEditors
|
|
38
|
-
|
|
35
|
+
setEditors() {
|
|
36
|
+
const hasEditor = this.grid.findPlugin('cellediting') || this.grid.findPlugin('rowediting');
|
|
39
37
|
if (!hasEditor) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
Coon.log.log('component is not editable');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
for (const editorConfig of this.getEditorConfig()) {
|
|
42
|
+
const column = this.grid.getColumnModel().findColumnByDataIndex(editorConfig.type);
|
|
43
|
+
if (!column) {
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
const editor = this.createEditorItem(editorConfig);
|
|
47
|
+
if (Ext.isFunction(column.setEditor)) {
|
|
48
|
+
column.setEditor(editor);
|
|
49
|
+
}
|
|
50
|
+
const needComboRenderer = editor.isXType('BaseComboBox') && column.useComboRenderer !== false;
|
|
51
|
+
const customStyle = column.renderer && column.renderer.customStyle;
|
|
52
|
+
const columnFormat = column.format;
|
|
53
|
+
column.renderer = (value, metaData, record) => {
|
|
54
|
+
let editable = true;
|
|
55
|
+
if (editorConfig.dependsOnField && editorConfig.dependsOnFieldName) {
|
|
56
|
+
const dependsOnFieldName = editorConfig.dependsOnFieldName;
|
|
57
|
+
const invertValue = editorConfig.invertValue;
|
|
58
|
+
editable = invertValue === !record.get(dependsOnFieldName);
|
|
59
|
+
if (editorConfig.highlightEditableCells) {
|
|
60
|
+
metaData.tdCls = editable ? 'editable-cell' : 'hover-cell';
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
column.renderer = (value, metaData, record) => {
|
|
60
|
-
let editable = true;
|
|
61
|
-
if (editorObj['dependsOnField'] && editorObj['dependsOnFieldName']) {
|
|
62
|
-
const dependsOnFieldName = editorObj['dependsOnFieldName'];
|
|
63
|
-
const invertValue = editorObj['invertValue'];
|
|
64
|
-
editable = invertValue === !record.get(dependsOnFieldName);
|
|
65
|
-
record.allowEditWithEditorPlugin = editable;
|
|
66
|
-
if (editorObj['highlightEditableCells']) {
|
|
67
|
-
metaData.tdCls = editable ? 'editable-cell' : 'hover-cell';
|
|
68
|
-
}
|
|
69
|
-
hasEditor.on('beforeedit', function(editor, context) {
|
|
70
|
-
return context.record.allowEditWithEditorPlugin;
|
|
71
|
-
}, this);
|
|
72
|
-
}
|
|
73
|
-
if (typeof customStyle === 'string') {
|
|
74
|
-
metaData.tdStyle = customStyle;
|
|
75
|
-
}
|
|
76
|
-
if (needComboRenderer) {
|
|
77
|
-
editor.store.clearFilter();
|
|
78
|
-
const editorRecord = editor.findRecord(editor.valueField, value);
|
|
79
|
-
return editorRecord ? editorRecord.get(editor.displayField) : editor.valueNotFoundText;
|
|
80
|
-
} else {
|
|
81
|
-
return value;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
column.renderer.customStyle = customStyle;
|
|
63
|
+
record.allowEditWithEditorPlugin = {};
|
|
64
|
+
record.allowEditWithEditorPlugin[editorConfig.type] = editable;
|
|
65
|
+
if (typeof customStyle === 'string') {
|
|
66
|
+
metaData.tdStyle = customStyle;
|
|
85
67
|
}
|
|
86
|
-
|
|
68
|
+
if (needComboRenderer) {
|
|
69
|
+
editor.store.clearFilter();
|
|
70
|
+
const editorRecord = editor.findRecord(editor.valueField, value);
|
|
71
|
+
return editorRecord ? editorRecord.get(editor.displayField) : editor.valueNotFoundText;
|
|
72
|
+
}
|
|
73
|
+
if (Ext.isDate(value)) {
|
|
74
|
+
return Ext.Date.format(value, editorConfig.mask.format || columnFormat);
|
|
75
|
+
} else {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
hasEditor.on('beforeedit', function(editor, context) {
|
|
80
|
+
return context.record.allowEditWithEditorPlugin[context.column.dataIndex] || false;
|
|
81
|
+
}, this);
|
|
82
|
+
column.renderer.customStyle = customStyle;
|
|
87
83
|
}
|
|
88
84
|
},
|
|
89
85
|
|
|
90
|
-
createEditorItem
|
|
91
|
-
const
|
|
92
|
-
const entity = configuration[ns.$entity];
|
|
86
|
+
createEditorItem(configuration) {
|
|
87
|
+
const entity = configuration.entity;
|
|
93
88
|
|
|
94
89
|
const defaultConfig = {
|
|
95
|
-
allowBlank: configuration
|
|
90
|
+
allowBlank: !configuration.required,
|
|
96
91
|
};
|
|
97
92
|
let config;
|
|
98
|
-
if (entity
|
|
99
|
-
const typeOfValue = configuration
|
|
93
|
+
if (entity === 'ADV') {
|
|
94
|
+
const typeOfValue = configuration.typeOfValue;
|
|
100
95
|
switch (typeOfValue) {
|
|
101
96
|
case 'TEXT':
|
|
102
97
|
config = {
|
|
@@ -137,9 +132,9 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
|
|
|
137
132
|
};
|
|
138
133
|
break;
|
|
139
134
|
}
|
|
140
|
-
} else if (entity
|
|
135
|
+
} else if (entity === 'DFV') {
|
|
141
136
|
|
|
142
|
-
} else if (entity
|
|
137
|
+
} else if (entity === 'FKV') {
|
|
143
138
|
|
|
144
139
|
}
|
|
145
140
|
if (!config) {
|
|
@@ -147,10 +142,10 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
|
|
|
147
142
|
}
|
|
148
143
|
let properties;
|
|
149
144
|
try {
|
|
150
|
-
properties = Ext.isEmpty(configuration
|
|
151
|
-
(Ext.isObject(configuration
|
|
145
|
+
properties = Ext.isEmpty(configuration.mask) ? {} :
|
|
146
|
+
(Ext.isObject(configuration.mask) ? configuration.mask : Ext.decode(configuration.mask.trim()));
|
|
152
147
|
} catch (e) {
|
|
153
|
-
Coon.log.log('!!!!!' + configuration
|
|
148
|
+
Coon.log.log('!!!!!' + configuration.mask + '!!!!!');
|
|
154
149
|
Coon.log.log(e);
|
|
155
150
|
}
|
|
156
151
|
config = Ext.apply(config, properties, defaultConfig);
|
package/src/version.js
CHANGED