ru.coon 3.0.61 → 3.0.67
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 +28 -0
- package/package.json +1 -1
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +9 -3
- package/src/common/component/editor/CharacteristicGridEditor.js +12 -0
- package/src/common/component/editor/CharacteristicGridEditor.scss +10 -0
- package/src/common/component/editor/TypedCharacteristicEditor.js +10 -0
- package/src/report/component/ReportPanel.js +1 -1
- package/src/report/component/reportpanel/ReportTreeStore.js +3 -0
- package/src/report/plugin/grid/GridToolbarButtonPlugin.js +50 -21
- package/src/report/toolbar/ReportGridToolbar.js +3 -4
- package/src/report/toolbar/layout/ReportToolbarOverflow.js +14 -18
- package/src/uielement/component/UiCustomController.js +1 -1
- package/src/validator.js +1 -4
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# Version 3.0.67, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d850ee12048246ba85557eef4475595043fc9d00)
|
|
2
|
+
* HT-14811: исправление открытия редактора для характеристик FKV ([becf94], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/becf94689878553b8c8287c6260ca986a314b08e))
|
|
3
|
+
* update: CHANGELOG.md ([ef54a3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ef54a339c72c36ce13a27672dff3cf89e35ddded))
|
|
4
|
+
|
|
5
|
+
# Version 3.0.66, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/75bb3540f20b528ed830505b80d99216d572121c)
|
|
6
|
+
* HT-14811: доработан внешний вид и открытие на редактирование характеристик FKV ([c55804], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c558045e343890c69c03801984b203b238cae552))
|
|
7
|
+
* update: CHANGELOG.md ([dd323a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dd323a40af65c90d5ac4e59b03d48f365cbf003f))
|
|
8
|
+
|
|
9
|
+
# Version 3.0.65, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b313f77a0208579201ce66ff042e5f548b54533d)
|
|
10
|
+
* ## Fixes
|
|
11
|
+
* <span style='color:red'> validator.mixin</span> ([8eadf3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8eadf3f0b3b2843e2ea42bc3e577ed6db9f1b62b))
|
|
12
|
+
|
|
13
|
+
* update: CHANGELOG.md ([196fe2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/196fe2b32f8bacb0551b5517ce7b458548945f6a))
|
|
14
|
+
|
|
15
|
+
# Version 3.0.64, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/977abbf84dfd6b813420431d11c1202170cd2fe8)
|
|
16
|
+
* ## Fixes
|
|
17
|
+
* <span style='color:red'>fix show title only with staticText</span> ([05d479], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/05d479ef92447495d4246dda085656e2042b0889))
|
|
18
|
+
|
|
19
|
+
* update: CHANGELOG.md ([9b97b4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9b97b4c4ca9abfda170712cf594ffb725b9e9f03))
|
|
20
|
+
|
|
21
|
+
# Version 3.0.63, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb48b260e66b233a4cad92d0d856d0d8da4c021b)
|
|
22
|
+
# Version 3.0.62, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8f3faa85fc70860397b0074b43d93aa9b9ffa00)
|
|
23
|
+
* ## Fixes
|
|
24
|
+
* <span style='color:red'>fix csrf in ReportTreeStore</span> ([cb402a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb402a1790a7b1081a5e8a17968db947ba583df9))
|
|
25
|
+
|
|
26
|
+
* HT-14775 fix: Исправление ширины системного тулбара ([bdd783], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bdd7836f8eef889ec642e486e896d3910eeb1850))
|
|
27
|
+
* update: CHANGELOG.md ([0624d1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0624d16d97c878b4e695b775a6a08cb00d3f12bd))
|
|
28
|
+
|
|
1
29
|
# Version 3.0.61, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0a79e6af1f962bbf5062d7a242281b679c4b0f35)
|
|
2
30
|
* update: CHANGELOG.md ([dcc546], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dcc5460b35c3144e1f382de27906035b5a6057d8))
|
|
3
31
|
|
package/package.json
CHANGED
package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js
CHANGED
|
@@ -200,10 +200,16 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
200
200
|
if (context.field === 'mask') {
|
|
201
201
|
const editor = context.record.get('editor');
|
|
202
202
|
if (editor) {
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
|
|
203
|
+
const editorClass = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+editor]];
|
|
204
|
+
if (editorClass) {
|
|
205
|
+
const proto = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+editor]].prototype;
|
|
206
|
+
if (Ext.isObject(proto.editorOptions)) {
|
|
207
|
+
context.column.field.triggers.info.show();
|
|
208
|
+
} else {
|
|
209
|
+
context.column.field.triggers.info.hide();
|
|
210
|
+
}
|
|
206
211
|
} else {
|
|
212
|
+
console.error(`Редактор ${editor} не найден.`);
|
|
207
213
|
context.column.field.triggers.info.hide();
|
|
208
214
|
}
|
|
209
215
|
} else {
|
|
@@ -226,6 +226,15 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
|
|
|
226
226
|
} else {
|
|
227
227
|
visibleValue = '';
|
|
228
228
|
}
|
|
229
|
+
} else if (record.get('entity') == 'FKV') {
|
|
230
|
+
const mask = record.get('mask');
|
|
231
|
+
const maskText = mask.match(/link:"(.*?)"/);
|
|
232
|
+
if (maskText) {
|
|
233
|
+
meta.tdCls += ' FVK-cell_link';
|
|
234
|
+
visibleValue = maskText[1];
|
|
235
|
+
} else {
|
|
236
|
+
visibleValue = val;
|
|
237
|
+
}
|
|
229
238
|
} else if (record.get(ns.$entity) === 'FLV' && !Ext.isEmpty(val)) {
|
|
230
239
|
visibleValue = val.substring(40);
|
|
231
240
|
} else {
|
|
@@ -237,6 +246,9 @@ Ext.define('Coon.common.component.editor.CharacteristicGridEditor', {
|
|
|
237
246
|
return Coon.format.withHint(visibleValue, visibleValue || tooltip);
|
|
238
247
|
},
|
|
239
248
|
getEditor: function(record) {
|
|
249
|
+
if ((record.get('entity') === 'FKV') && record.get('mask')) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
240
252
|
return Ext.create('Ext.grid.CellEditor', {
|
|
241
253
|
field: Ext.create('Ext.form.field.Text', {
|
|
242
254
|
allowBlank: false,
|
|
@@ -92,6 +92,8 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
92
92
|
|
|
93
93
|
this.on('edit', this.afterEditHandler, this);
|
|
94
94
|
this.factory = this.createFactory();
|
|
95
|
+
|
|
96
|
+
this.on('cellclick', this.cellclickHandler, this);
|
|
95
97
|
},
|
|
96
98
|
|
|
97
99
|
createAdditionButtons: function() {
|
|
@@ -292,6 +294,14 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
292
294
|
}
|
|
293
295
|
},
|
|
294
296
|
|
|
297
|
+
cellclickHandler(cmp, td, cellIndex, record) {
|
|
298
|
+
if (this.isEditableChar(record)) {
|
|
299
|
+
if ((record.get('entity') === 'FKV') && record.get('mask')) {
|
|
300
|
+
this.prepareType(record);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
|
|
295
305
|
// private
|
|
296
306
|
calculateState: function() {
|
|
297
307
|
if (this.addTypeButton) {
|
|
@@ -1033,7 +1033,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1033
1033
|
if (params.bar.items.length === 1) {
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
|
-
params.bar.items.
|
|
1036
|
+
params.bar.items.sortBy((a, b) => {
|
|
1037
1037
|
if (a.position !== b.position) {
|
|
1038
1038
|
if (a.position < b.position) {
|
|
1039
1039
|
return -1;
|
|
@@ -16,6 +16,9 @@ Ext.define('Coon.report.component.reportpanel.ReportTreeStore', {
|
|
|
16
16
|
getMethod: function() {
|
|
17
17
|
return 'POST';
|
|
18
18
|
},
|
|
19
|
+
getHeaders: function() {
|
|
20
|
+
return {'X-CSRF-Token': localStorage.getItem('CSRFToken')};
|
|
21
|
+
},
|
|
19
22
|
url: 'ReportFormData/get',
|
|
20
23
|
reader: {
|
|
21
24
|
type: 'json',
|
|
@@ -108,7 +108,6 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
108
108
|
|
|
109
109
|
computeInteractUIState() {
|
|
110
110
|
const state = {disabled: false, hidden: !!this.invisibleByDefault};
|
|
111
|
-
|
|
112
111
|
if (this.isButtonAdded()) {
|
|
113
112
|
if (!this.dependOnGridParameters && !this.dependOnGridRow) {
|
|
114
113
|
return state;
|
|
@@ -120,9 +119,20 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
120
119
|
state.disabled = this.isFilterDependedParamEmpty();
|
|
121
120
|
}
|
|
122
121
|
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
if (
|
|
123
|
+
!state.disabled &&
|
|
124
|
+
this.inputParametersConfig.haveRequiredReportParameters
|
|
125
|
+
) {
|
|
126
|
+
state.disabled = !this.isRequiredParametersPassed('PRM');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (
|
|
130
|
+
!state.disabled &&
|
|
131
|
+
this.dependOnGridRow &&
|
|
132
|
+
this.isValidForRequiredParametersChecking()
|
|
133
|
+
) {
|
|
134
|
+
const isRequiredFLDParametersPassed = this.isRequiredParametersPassed('FLD');
|
|
135
|
+
state.disabled = this.skipRowValueCheck ? false : !isRequiredFLDParametersPassed;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
state.hidden = this.isButtonHidden(state.disabled);
|
|
@@ -179,12 +189,27 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
179
189
|
*/
|
|
180
190
|
computeRowInteractState() {
|
|
181
191
|
let rowInteractEnabled= this.isRowInteractBySelection();
|
|
182
|
-
if (
|
|
192
|
+
if (
|
|
193
|
+
rowInteractEnabled &&
|
|
194
|
+
!Ext.isEmpty(this.dependOnGridParameters)
|
|
195
|
+
) {
|
|
183
196
|
rowInteractEnabled = !this.isFilterDependedParamEmpty();
|
|
184
197
|
}
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
|
|
199
|
+
if (
|
|
200
|
+
rowInteractEnabled &&
|
|
201
|
+
this.inputParametersConfig.haveRequiredReportParameters
|
|
202
|
+
) {
|
|
203
|
+
rowInteractEnabled = this.isRequiredParametersPassed('PRM');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (
|
|
207
|
+
rowInteractEnabled &&
|
|
208
|
+
this.dependOnGridRow
|
|
209
|
+
) {
|
|
210
|
+
rowInteractEnabled = this.skipRowValueCheck ? true : this.isRequiredParametersPassed('FLD');
|
|
187
211
|
}
|
|
212
|
+
|
|
188
213
|
return {
|
|
189
214
|
rowInteractEnabled,
|
|
190
215
|
};
|
|
@@ -225,6 +250,10 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
225
250
|
}
|
|
226
251
|
});
|
|
227
252
|
|
|
253
|
+
const haveRequiredReportParameters=
|
|
254
|
+
parameters.filter((param) => param.editable &&
|
|
255
|
+
param.reportNavigationOptionContextSource === 'PRM').length > 0;
|
|
256
|
+
|
|
228
257
|
return {
|
|
229
258
|
selectionDependencyType: multiDependencyParameters.length > 0 ? 'multi' : 'single',
|
|
230
259
|
multiDependencyParameters,
|
|
@@ -232,6 +261,7 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
232
261
|
notRequiredMultiParameters,
|
|
233
262
|
defaultParameters: reportIndependentParameters,
|
|
234
263
|
onlyIndependentParameters,
|
|
264
|
+
haveRequiredReportParameters,
|
|
235
265
|
};
|
|
236
266
|
},
|
|
237
267
|
|
|
@@ -276,32 +306,31 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
276
306
|
},
|
|
277
307
|
|
|
278
308
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* PRM - параметр отчета
|
|
282
|
-
* FLD - поле выбранной записи.
|
|
283
|
-
* Достаточно чтобы значение было определено.
|
|
309
|
+
* Обязательные параметры плагина типа type (зависит от значения параметра репорта) настроены и заполнены.
|
|
310
|
+
* @param {string} type тип пареметра плагина (FLD, PRM)
|
|
284
311
|
* @returns {boolean}
|
|
285
312
|
*/
|
|
286
|
-
isRequiredParametersPassed() {
|
|
287
|
-
const parameters = this.getRequiredParameters();
|
|
313
|
+
isRequiredParametersPassed(type) {
|
|
314
|
+
const parameters = this.getRequiredParameters(type);
|
|
288
315
|
if (parameters.length === 0) {
|
|
289
316
|
return true;
|
|
290
317
|
}
|
|
291
|
-
const selected = this.component.getSelectionModel().getLastSelected();
|
|
292
|
-
|
|
293
318
|
return parameters.every((param) => {
|
|
294
|
-
const paramValue = this.getParamValue(param
|
|
319
|
+
const paramValue = this.getParamValue(param);
|
|
295
320
|
return !Ext.isEmpty(paramValue);
|
|
296
321
|
});
|
|
297
322
|
},
|
|
298
323
|
|
|
299
|
-
getRequiredParameters() {
|
|
324
|
+
getRequiredParameters(type) {
|
|
300
325
|
const params = Array.isArray(this.parameters) ? this.parameters : [this.parameters];
|
|
301
|
-
return params.filter((param) =>
|
|
326
|
+
return params.filter((param) =>
|
|
327
|
+
param &&
|
|
328
|
+
param.editable &&
|
|
329
|
+
(!type || type === param.reportNavigationOptionContextSource)
|
|
330
|
+
);
|
|
302
331
|
},
|
|
303
332
|
|
|
304
|
-
getParamValue(param
|
|
333
|
+
getParamValue(param) {
|
|
305
334
|
const {
|
|
306
335
|
defaultValue,
|
|
307
336
|
reportNavigationOptionContextSource: source,
|
|
@@ -314,7 +343,7 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
|
|
|
314
343
|
|
|
315
344
|
switch (source) {
|
|
316
345
|
case 'FLD':
|
|
317
|
-
return
|
|
346
|
+
return this.component.getContextManager()?.getSelectedRecord()?.get(field);
|
|
318
347
|
case 'PRM':
|
|
319
348
|
return this.component.contextMenu?.params?.[field];
|
|
320
349
|
default:
|
|
@@ -215,9 +215,8 @@ Ext.define('Coon.report.toolbar.ReportGridToolbar', {
|
|
|
215
215
|
applyUserPreferences: function() {
|
|
216
216
|
this.readUserPreferences();
|
|
217
217
|
this.moveButtons();
|
|
218
|
-
this.
|
|
219
|
-
this.
|
|
220
|
-
this.layout.overflowHandler.menuButton.dropDownMenu.show();
|
|
218
|
+
this.getLayout().overflowHandler.menuButton.dropDownMenu.hide();
|
|
219
|
+
this.getLayout().overflowHandler.menuButton.dropDownMenu.show();
|
|
221
220
|
},
|
|
222
221
|
|
|
223
222
|
reInitMenu(item) {
|
|
@@ -236,7 +235,7 @@ Ext.define('Coon.report.toolbar.ReportGridToolbar', {
|
|
|
236
235
|
moveButtons() {
|
|
237
236
|
const userFolded = this.foldItemsContainer;
|
|
238
237
|
// пока hack. Иначе кнопки в скрытом контейнере торчат наружу
|
|
239
|
-
this.
|
|
238
|
+
this.getLayout().overflowHandler.menuButton.dropDownMenu.getController().clearContainer(this);
|
|
240
239
|
// Переносим спрятанные элементы в скрытый контейнер userFolded
|
|
241
240
|
Object.entries(this.userPreferences)
|
|
242
241
|
.filter((cfgItem) => cfgItem[1].folded)
|
|
@@ -146,7 +146,6 @@ Ext.define('Coon.report.toolbar.layout.ReportToolbarOverflow', {
|
|
|
146
146
|
|
|
147
147
|
// Добавление кнопки в системный тулбар
|
|
148
148
|
addButton: function(button) {
|
|
149
|
-
const me = this;
|
|
150
149
|
if (button.pType !== 'ToolbarOverflowButton') {
|
|
151
150
|
button.setTooltip(button.getText());
|
|
152
151
|
button.setText('');
|
|
@@ -155,27 +154,25 @@ Ext.define('Coon.report.toolbar.layout.ReportToolbarOverflow', {
|
|
|
155
154
|
if (!button.arrowRequired === true) {
|
|
156
155
|
button.arrowVisible = false;
|
|
157
156
|
}
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
this.systemItems.push(button);
|
|
158
|
+
this.systemContainer.insert(0, button);
|
|
160
159
|
this.setButtonsPositionsByPType();
|
|
161
160
|
this.sortButtons();
|
|
162
161
|
this.addMargins();
|
|
163
162
|
|
|
164
|
-
if (!
|
|
165
|
-
|
|
166
|
-
this.
|
|
167
|
-
},
|
|
163
|
+
if (!this.systemContainer.rendered) {
|
|
164
|
+
this.systemContainer.on('boxready', function() {
|
|
165
|
+
this.ReportGridToolbar.updateLayout();
|
|
166
|
+
}, this, {single: true});
|
|
168
167
|
}
|
|
169
168
|
},
|
|
170
169
|
|
|
171
170
|
addMargins() {
|
|
172
|
-
this.systemContainer.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const visibleButtons = this.systemContainer.items.filterBy(function(button) {
|
|
176
|
-
return !button.hidden;
|
|
171
|
+
const visibleButtons = this.systemContainer.query('button{isHidden()==false}');
|
|
172
|
+
visibleButtons.forEach((button) => {
|
|
173
|
+
button.setMargin('0 0 0 8px');
|
|
177
174
|
});
|
|
178
|
-
const lastVisibleButton = visibleButtons.
|
|
175
|
+
const lastVisibleButton = visibleButtons.at(-1);
|
|
179
176
|
if (lastVisibleButton) {
|
|
180
177
|
lastVisibleButton.setMargin('0 8px');
|
|
181
178
|
}
|
|
@@ -225,10 +222,9 @@ Ext.define('Coon.report.toolbar.layout.ReportToolbarOverflow', {
|
|
|
225
222
|
if (buttonsCount <= 1) {
|
|
226
223
|
return false;
|
|
227
224
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
225
|
+
|
|
226
|
+
this.systemContainer.query('button:not(OptionsMenuButton):not(ToolbarOverflowButton):not(#actionButton)').forEach((button) => {
|
|
227
|
+
button.position = this.pTypePriority[button.pType] || 0;
|
|
232
228
|
});
|
|
233
229
|
},
|
|
234
230
|
|
|
@@ -236,7 +232,7 @@ Ext.define('Coon.report.toolbar.layout.ReportToolbarOverflow', {
|
|
|
236
232
|
if (this.systemContainer.items.length <= 1) {
|
|
237
233
|
return;
|
|
238
234
|
}
|
|
239
|
-
this.systemContainer.items.
|
|
235
|
+
this.systemContainer.items.sortBy((a, b) => {
|
|
240
236
|
if (a.position < b.position) {
|
|
241
237
|
return -1;
|
|
242
238
|
}
|
package/src/validator.js
CHANGED
package/src/version.js
CHANGED