ru.coon 2.7.5 → 2.7.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 CHANGED
@@ -1,3 +1,12 @@
1
+ # Version 2.7.7, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f0c25945de971960d59df2b576e159e08fb535ef)
2
+ * HT-7850 fix: В FilterConditionToolbar убрано отображение чипов для скрытых полей фильтра. ([8b16f9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b16f9de62121e0d9d562dcd6e032655d100a417))
3
+ * update: CHANGELOG.md ([e0b4b0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e0b4b04a9ddfe329cdcbb440f61d33219ce1cf73))
4
+
5
+ # Version 2.7.6, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ab36a4fa8f1d7894eb9bbf8bac33276c7659f90d)
6
+ * HT-8373 fix: Исправлена ошибка валидации параметров (свойств параметра)... ([46513a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/46513a1a976cb7440777508f13356667e72fd98f))
7
+ * HT-7448 feat: Изменяемый размер и сохранение состояния панели "Настройки команды" в ExecuteCommandButtonPluginConfigPanel. ([933ca2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/933ca2edf1999a4e0f8bdfb0c54a4d4da4bfa603))
8
+ * update: CHANGELOG.md ([baca35], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/baca356d93e141e0bb134de87f2cb60b1c15d0dc))
9
+
1
10
  # Version 2.7.5, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98f5d7b3391db7e90e8818d6071c674b71cb6afd)
2
11
  * ## Features
3
12
  * <span style='color:green'>feat: TR-67883: reload main navigation on change menu structure</span> ([a6a849], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a6a849e812bc3988abadc526aa4829830eb89ed2))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.5",
7
+ "version": "2.7.7",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
package/src/Function.js CHANGED
@@ -120,12 +120,16 @@ Ext.define('Coon.Function', {
120
120
  return encode ? Ext.encode(result) : result;
121
121
  },
122
122
 
123
+ getFormFields: function(formPanel) {
124
+ return formPanel.query('field,fieldcontainer[getValue]');
125
+ },
126
+
123
127
  /**
124
128
  * Получение всех значений полей панели в качестве структуры.
125
129
  * Если поле имеет флаг local - оно не включается в результат
126
130
  */
127
131
  getDataFromForm: function(formPanel, valuesAsIs, dateFormat, excludeReadOnly, excludeDisabled) {
128
- const fields = formPanel.query('field,fieldcontainer[getValue]');
132
+ const fields = this.getFormFields(formPanel);
129
133
  const params = {};
130
134
 
131
135
  /**
@@ -0,0 +1,23 @@
1
+ Ext.define('Coon.nav.MenuLoader', {
2
+ singleton: true,
3
+
4
+ isLoaded: false,
5
+
6
+ load() {
7
+ return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
8
+ .then((data) => {
9
+ if (Array.isArray(data.list)) {
10
+ this.uiElementMap = data.list.reduce();
11
+ }
12
+ this.isLoaded = true;
13
+ });
14
+ },
15
+
16
+ get() {
17
+
18
+ },
19
+
20
+ isValidMenuItem(uiEmentId) {
21
+ return this.uiElementMap.has(uiEmentId);
22
+ },
23
+ });
@@ -1,3 +1,16 @@
1
+ /**
2
+ * При инстанцировании компонента можно задать свойство extraColumns, содержащее список дополнительных колонок грида.
3
+ * extraColumns: [
4
+ * {
5
+ * text: 'Описание',
6
+ * dataIndex: 'description',
7
+ * insertAfter: {
8
+ * dataIndex: 'value',
9
+ * },
10
+ * }
11
+ * ],
12
+ * insertAfter означает, что колонка "Описание " будет добавлена после колонки с dataIndex='value'. Можно также использовать insertBefore.
13
+ */
1
14
  Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
2
15
  extend: 'Ext.grid.Panel',
3
16
  alias: 'widget.ReportPropertiesGrid',
@@ -65,61 +78,51 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
65
78
  }
66
79
  ],
67
80
  }],
68
- columns: {
69
- defaults: {
70
- xtype: 'hintColumn',
71
- required: true,
72
- },
73
- items: [
74
- {
75
- text: 'Номер',
76
- dataIndex: 'sequenceNumber',
77
- width: 50,
78
- hidden: true,
81
+ columns: [
82
+ {
83
+ text: 'Номер',
84
+ dataIndex: 'sequenceNumber',
85
+ width: 50,
86
+ hidden: true,
79
87
 
80
- editor: {
81
- xtype: 'textfield',
82
- allowBlank: true,
83
- },
84
- },
85
- {
86
- text: 'Ключ',
87
- dataIndex: 'key',
88
- flex: 1,
89
- editor: {
90
- xtype: 'textfield',
91
- allowBlank: false,
92
- },
88
+ editor: {
89
+ xtype: 'textfield',
90
+ allowBlank: true,
93
91
  },
94
- {
95
- text: 'Значение',
96
- dataIndex: 'value',
97
- flex: 1,
98
- editor: 'textfield',
99
- },
100
- {
101
- text: 'Описание',
102
- dataIndex: 'description',
103
- flex: 2,
104
- },
105
- {
106
- xtype: 'actioncolumn',
107
- width: 50,
108
- items: [{
109
- iconCls: 'svg-fa svg-fa-pencil',
110
- tooltip: 'Редактировать',
111
- handler: 'openValueEditor',
112
- }],
92
+ },
93
+ {
94
+ text: 'Ключ',
95
+ dataIndex: 'key',
96
+ flex: 1,
97
+ editor: {
98
+ xtype: 'textfield',
99
+ allowBlank: false,
113
100
  },
114
- {
115
- text: 'mode',
116
- dataIndex: 'mode',
117
- width: 50,
118
- required: false,
119
- hidden: true,
120
- }
121
- ],
122
- },
101
+ },
102
+ {
103
+ text: 'Значение',
104
+ dataIndex: 'value',
105
+ flex: 1,
106
+ editor: 'textfield',
107
+ },
108
+ {
109
+ xtype: 'actioncolumn',
110
+ width: 50,
111
+ items: [{
112
+ iconCls: 'svg-fa svg-fa-pencil',
113
+ tooltip: 'Редактировать',
114
+ handler: 'openValueEditor',
115
+ }],
116
+ },
117
+ {
118
+ text: 'mode',
119
+ dataIndex: 'mode',
120
+ width: 50,
121
+ required: false,
122
+ hidden: true,
123
+ }
124
+ ],
125
+
123
126
  plugins: [
124
127
  {ptype: 'cellediting', clicksToEdit: 2},
125
128
  {ptype: 'CopyRowsFromGrid'},
@@ -142,4 +145,20 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
142
145
  listeners: {
143
146
  boxready: 'onGridReady',
144
147
  },
148
+ initComponent() {
149
+ if (Array.isArray(this.extraColumns) && this.extraColumns.length) {
150
+ this.columns = this.columns.reduce((acc, column) => {
151
+ const foundBefore = this.extraColumns.find((extraColumn) =>
152
+ Ext.isObject(extraColumn.insertBefore) && extraColumn.insertBefore.dataIndex === column.dataIndex);
153
+ foundBefore && acc.push(foundBefore);
154
+ acc.push(column);
155
+ const foundAfter = this.extraColumns.find((extraColumn) =>
156
+ Ext.isObject(extraColumn.insertAfter) && extraColumn.insertAfter.dataIndex === column.dataIndex);
157
+ foundAfter && acc.push(foundAfter);
158
+ return acc;
159
+ }, []);
160
+ }
161
+ this.columns.map((el) => Ext.applyIf(el, {xtype: 'hintColumn', required: true}));
162
+ this.callParent(arguments);
163
+ },
145
164
  });
@@ -183,7 +183,18 @@ Ext.define('Coon.report.plugin.configPanel.ExecuteCommandButtonPluginConfigPanel
183
183
  this.propertiesGrid = Ext.create('Coon.report.component.settings.ReportPropertiesGrid', {
184
184
  flex: 1,
185
185
  title: 'Свойства команды',
186
- autoExpandColumn: 2,
186
+ extraColumns: [
187
+ {
188
+ text: 'Описание',
189
+ dataIndex: 'description',
190
+ required: false,
191
+ hidden: false,
192
+ flex: 2,
193
+ insertAfter: {
194
+ dataIndex: 'value',
195
+ },
196
+ }
197
+ ],
187
198
  loadPropertiesSource: {
188
199
  field: this.commandCombo,
189
200
  type: this.commandCombo.commandType,
@@ -227,8 +238,10 @@ Ext.define('Coon.report.plugin.configPanel.ExecuteCommandButtonPluginConfigPanel
227
238
  });
228
239
  this.southRegion = Ext.create('Ext.panel.Panel', {
229
240
  title: 'Настройки команды',
230
- flex: 0.5,
231
- minHeight: 300,
241
+ stateful: true,
242
+ stateId: 'ExecuteCommandButtonPluginConfigPanel',
243
+ resizable: true,
244
+ height: 300,
232
245
  layout: {
233
246
  type: 'vbox',
234
247
  align: 'stretch',
@@ -251,7 +264,7 @@ Ext.define('Coon.report.plugin.configPanel.ExecuteCommandButtonPluginConfigPanel
251
264
  items: [
252
265
  {
253
266
  title: 'Параметры плагина',
254
- flex: 1,
267
+ flex: 2,
255
268
  autoScroll: true,
256
269
  layout: 'form',
257
270
  defaults: {
@@ -62,7 +62,6 @@ Ext.define('Coon.report.plugin.configPanel.PrintPdfButtonPluginConfigPanel', {
62
62
  this.propertiesGrid = Ext.create('Coon.report.component.settings.ReportPropertiesGrid', {
63
63
  flex: 1,
64
64
  title: 'Свойства команды',
65
- autoExpandColumn: 2,
66
65
  });
67
66
 
68
67
  this.tabs = Ext.create('Ext.tab.Panel', {
@@ -44,7 +44,6 @@ Ext.define('Coon.report.plugin.configPanel.SetReportParameterPluginConfigPanel',
44
44
  this.propertiesGrid = Ext.create('Coon.report.component.settings.ReportPropertiesGrid', {
45
45
  flex: 1,
46
46
  title: 'Свойства панели параметров',
47
- autoExpandColumn: 2,
48
47
  });
49
48
 
50
49
  this.tabs = new Ext.TabPanel({
@@ -58,10 +58,9 @@ Ext.define('Coon.report.plugin.grid.DataSourceSelectionPluginConfigPanel', {
58
58
  loadParametersHandler: this.loadParametersHandler.bind(this),
59
59
  });
60
60
 
61
- this.propertiesGrid = new Coon.report.component.settings.ReportPropertiesGrid({
61
+ this.propertiesGrid = Ext.create('Coon.report.component.settings.ReportPropertiesGrid', {
62
62
  flex: 1,
63
63
  title: 'Свойства команды',
64
- autoExpandColumn: 2,
65
64
  });
66
65
 
67
66
  this.tabs = new Ext.TabPanel({
@@ -0,0 +1,7 @@
1
+ **спецификация:**
2
+
3
+ входные параметры:
4
+
5
+ - exportFileFormat [xls/pdf]
6
+ - allowUserSelectColumnsToUpload
7
+ - addToSearchButton добавить в кнопку "поиск", в этом случае в качестве параметра отправляем текущие параметры из FilterPanel(useRawFilterParams: true)
@@ -51,7 +51,7 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
51
51
  let fields = this.searchForm.query('field');
52
52
  fields = (fields || []).concat(this.searchForm.query('fieldcontainer'));
53
53
  fields.forEach(function(field) {
54
- field.on('change', this.onReloadChipsHandler, this, {buffer: 1000});
54
+ field.on('change', this.onReloadChipsHandler, this, {buffer: 500});
55
55
  }, this);
56
56
  },
57
57
 
@@ -213,24 +213,23 @@ Ext.define('Coon.uielement.component.formchips.FilterConditionToolbarController'
213
213
  * @returns {{fieldLink: *, label: *, value: *}[]}
214
214
  */
215
215
  getCompletedFields: function(formPanel) {
216
- let fields = formPanel.query('field');
217
- fields = (fields || []).concat(formPanel.query('fieldcontainer'));
218
- const retFields = fields.map((f) => {
219
- let value;
220
- if (Ext.isFunction(f.getRawValue)) {
221
- value = f.getRawValue();
222
- } else {
223
- value = f.getValue();
216
+ const fields = Coon.Function.getFormFields(formPanel);
217
+
218
+ const result = [];
219
+ for (const field of fields) {
220
+ const value = Ext.isFunction(field.getRawValue) ? field.getRawValue(): field.getValue();
221
+ const isInitiallyHidden = field.initialConfig && field.initialConfig.hidden;
222
+ if (!isInitiallyHidden && value) {
223
+ result.push({
224
+ fieldLink: field,
225
+ label: field.fieldLabel,
226
+ rawValue: value,
227
+ value: field.getValue(),
228
+ });
224
229
  }
225
- return {
226
- fieldLink: f,
227
- label: f.fieldLabel,
228
- rawValue: value,
229
- value: f.getValue(),
230
- };
231
- });
230
+ }
232
231
 
233
- return retFields.filter((f) => !!f.rawValue);
232
+ return result;
234
233
  },
235
234
 
236
235
  onReloadChipsHandler() {
@@ -337,6 +337,18 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
337
337
  title: 'Свойства команды {ctype}',
338
338
  },
339
339
  reference: 'reportPropertiesGrid',
340
+ extraColumns: [
341
+ {
342
+ text: 'Описание',
343
+ dataIndex: 'description',
344
+ required: false,
345
+ hidden: false,
346
+ flex: 2,
347
+ insertAfter: {
348
+ dataIndex: 'value',
349
+ },
350
+ }
351
+ ],
340
352
  loadPropertiesSource: {
341
353
  field: undefined,
342
354
  },
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.5',
3
+ number: '2.7.7',
4
4
  });