ru.coon 2.8.39 → 2.8.41

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,22 @@
1
+ # Version 2.8.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c45413739316cff439a7f2e8500750f87fb43c8b)
2
+ * ## Fixes
3
+ * <span style='color:red'>fix echarts</span> ([f76957], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f76957ec1bf26b826309173c94b6c1c71f968ee8))
4
+
5
+ * update: CHANGELOG.md ([accf0b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/accf0b1f1ace3074fbb4a6a7ba6926bc5d8ec709))
6
+
7
+ # Version 2.8.40, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bc0448568232ca2c596981b5be2958423b37b25d)
8
+ * ## Features
9
+ * <span style='color:green'>feat: HT-11237: refactoring, fix bug on show by param</span> ([648ec9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/648ec982082f53a97615ff816bbee3b38da32efe))
10
+ * <span style='color:green'>feat: HT-11237: refactoring, fix bug on show by param</span> ([cb3a84], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb3a84876a0d3c4b521e8ea024c0ba8dd1046d59))
11
+ * <span style='color:green'>feat: HT-11237: refactoring, fix bug on show by param</span> ([a94d48], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a94d483235af416242a59940b5af180bd2573376))
12
+ * <span style='color:green'>feat: HT-11237: refactoring, fix bug on show by param</span> ([defeb7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/defeb7353a40b93a6afef58eb2cf941bf855a04d))
13
+ * <span style='color:green'>feat: HT-11237: refactoring, fix bug on show by param</span> ([e8d552], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e8d552e0094cf9e32e1c20652586ee8b8f9791ad))
14
+
15
+ * ## Fixes
16
+ * <span style='color:red'> HT-11130 FilterConditionToolbar location and width</span> ([9dddf6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9dddf6739c500bb2a1f5a2a6558a9021ff40f192))
17
+
18
+ * update: CHANGELOG.md ([2191ec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2191eceb941229d37de6cafd03e47132a38fe8ec))
19
+
1
20
  # Version 2.8.39, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4b6a41e64accf9c50f08e6404130431c4543fdb3)
2
21
  * ## Features
3
22
  * <span style='color:green'>feat: opa show user roles in roleEditPanel</span> ([78a03a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/78a03ac67f21b7d9053d7ec67c785f108ce65ad7))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.8.39",
7
+ "version": "2.8.41",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -26,7 +26,7 @@
26
26
  "ace-builds": "1.4.12",
27
27
  "ace-diff": "^3.0.3",
28
28
  "decimal.js-light": "^2.5.1",
29
- "echarts": "^5.3.3",
29
+ "echarts": "5.3.3",
30
30
  "extjs_iconpack": "1.3.27",
31
31
  "json5": "2.2.3",
32
32
  "object-hash": "^3.0.0",
@@ -5,6 +5,12 @@ Ext.define('Coon.report.column.HintColumn', {
5
5
  'Sigma.common.column.HintColumn',
6
6
  'Sigma.grid.column.HintColumn'
7
7
  ],
8
+
9
+ $metaConfig: {
10
+ type: 'column',
11
+ description: `компонент выпадающего списка`,
12
+ },
13
+
8
14
  initComponent: function() {
9
15
  if (typeof this.renderer !== 'function') {
10
16
  if (this.hintProperty) {
@@ -45,6 +45,11 @@
45
45
  Ext.define('Coon.report.component.ReportLookupCombo', {
46
46
  extend: 'Ext.form.field.ComboBox',
47
47
 
48
+ $metaConfig: {
49
+ type: 'inputField',
50
+ description: `компонент выпадающего списка`,
51
+ },
52
+
48
53
  requires: [
49
54
  'Coon.common.panel.WindowWrap'
50
55
  ],
@@ -100,7 +100,7 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
100
100
  }
101
101
 
102
102
  if (currentLayout) {
103
- height += currentLayout.height + 15;
103
+ height += currentLayout.height;
104
104
  this.items.push(currentLayout);
105
105
  }
106
106
  this.height = Math.max(height, 50);
@@ -4,9 +4,8 @@ Ext.define('Coon.report.component.report.NorthPanel', {
4
4
  xtype: 'NorthPanel',
5
5
  cls: 'NorthPanel',
6
6
  minimalHeight: 55,
7
- alignButtons: -15,
8
7
  layout: {
9
- type: 'hbox',
8
+ type: 'vbox',
10
9
  align: 'stretch',
11
10
  },
12
11
  tbar: {
@@ -46,13 +45,6 @@ Ext.define('Coon.report.component.report.NorthPanel', {
46
45
  }
47
46
  ],
48
47
  },
49
- bbar: {
50
- hidden: true,
51
- reference: 'bbar',
52
- items: [{
53
- xtype: 'tbfill',
54
- }],
55
- },
56
48
  requires: [
57
49
  'Coon.Function',
58
50
  'Coon.report.component.SimplestReportCombo',
@@ -76,7 +68,7 @@ Ext.define('Coon.report.component.report.NorthPanel', {
76
68
  }
77
69
  this.filterContainer.setHidden(btn.pressed);
78
70
  if (!btn.pressed) {
79
- this.setHeight(this.getHeight()-15);
71
+ this.setHeight(this.getHeight());
80
72
  }
81
73
  },
82
74
  initComponent() {
@@ -121,8 +113,28 @@ Ext.define('Coon.report.component.report.NorthPanel', {
121
113
  });
122
114
 
123
115
  this.items = [
124
- this.filterContainer,
125
- this.buttonsContainer
116
+ {
117
+ xtype: 'container',
118
+ reference: 'topContainer',
119
+ layout: {
120
+ type: 'hbox',
121
+ align: 'stretchmax',
122
+ },
123
+ items: [
124
+ this.filterContainer,
125
+ this.buttonsContainer
126
+ ],
127
+ },
128
+ {
129
+ xtype: 'container',
130
+ reference: 'bottomContainer',
131
+ layout: {
132
+ type: 'hbox',
133
+ align: 'stretch',
134
+ },
135
+ flex: 1,
136
+ hidden: true,
137
+ }
126
138
  ];
127
139
 
128
140
  /**
@@ -179,8 +191,8 @@ Ext.define('Coon.report.component.report.NorthPanel', {
179
191
  }, this);
180
192
 
181
193
  this.filterContainer.removeAll();
182
- filterPanel.on('afterlayout', (cmp) => {
183
- this.setHeight(Math.max(cmp.getHeight(), this.minimalHeight) + (this.tbarsHeight || this.alignButtons));
194
+ filterPanel.on('afterlayout', function(cmp) {
195
+ this.recalculateHeight(cmp.getHeight());
184
196
  }, this, {single: true});
185
197
  this.filterContainer.add(filterPanel);
186
198
  if (this.hideFilterButtons) {
@@ -198,16 +210,20 @@ Ext.define('Coon.report.component.report.NorthPanel', {
198
210
  this.changeTbarStates();
199
211
  },
200
212
 
213
+ recalculateHeight(filterPanelHeight) {
214
+ this.setHeight(Math.max(filterPanelHeight, this.minimalHeight) + this.tbarsHeight);
215
+ },
216
+
201
217
  changeTbarStates() {
202
218
  if (!this.items) {
203
219
  return;
204
220
  }
205
221
  const tbar = this.down('[reference="tbar"]');
206
- const bbar = this.down('[reference="bbar"]');
222
+ const bottomContainer = this.down('[reference="bottomContainer"]');
207
223
  let tbarsHeight = 0;
208
224
  const tbarH = 20;
209
- const bbarH = 30;
210
- if (!tbar || !bbar || this.hideFilterPanel) {
225
+ const bottomContainerH = 30;
226
+ if (!tbar || !bottomContainer || this.hideFilterPanel) {
211
227
  return;
212
228
  }
213
229
  if (this.enableHighlightingRequiredFields || this.getEnableChipToolbar()) {
@@ -222,31 +238,32 @@ Ext.define('Coon.report.component.report.NorthPanel', {
222
238
  }
223
239
  if (!this.filterConditionToolbar) {
224
240
  this.filterConditionToolbar = Ext.widget('FilterConditionToolbar', {
241
+ flex: 1,
225
242
  closableFilterCondition: false,
226
243
  searchForm: this,
227
244
  });
228
- bbar.insert(0, this.filterConditionToolbar);
245
+ bottomContainer.add(this.filterConditionToolbar);
229
246
  this.chipsInit();
230
247
  }
231
248
  if (this.getEnableChipToolbar()) {
232
249
  this.down('[reference="toggleBtn"]').show();
250
+ bottomContainer.show();
233
251
  this.filterConditionToolbar.show();
234
252
  if (!this.buttonsContainer.hidden) {
235
- bbar.add(this.buttonsContainer);
253
+ bottomContainer.add(this.buttonsContainer);
236
254
  }
237
- tbarsHeight += bbarH;
238
- bbar.show();
255
+ tbarsHeight += bottomContainerH;
239
256
  this.filterConditionToolbar.getController().addChangeReaction();
240
257
  } else {
241
258
  this.down('[reference="toggleBtn"]').hide();
242
- bbar.hide();
259
+ bottomContainer.hide();
243
260
  if (!this.buttonsContainer.hidden) {
244
- this.add(this.buttonsContainer);
261
+ this.down('[reference="topContainer"]').add(this.buttonsContainer);
245
262
  }
246
263
  }
247
264
  this.tbarsHeight = tbarsHeight;
248
265
  if (this.filterPanel.getEl()) {
249
- this.setHeight(Math.max(this.filterPanel.getHeight(), this.minimalHeight) + (this.tbarsHeight || this.alignButtons));
266
+ this.recalculateHeight(this.filterPanel.getHeight());
250
267
  }
251
268
  },
252
269
 
@@ -45,43 +45,33 @@ Ext.define('Coon.report.plugin.grid.ControlColumnByParamPlugin', {
45
45
  const fields = this.grid.up('ReportPanel').filterContainer.query('field')
46
46
  .filter((field) => field.getValue && field.getValue())
47
47
  .map((field) => ({name: field.name, value: field.getValue()})) || [];
48
- const columnsActions = this.valueConfig.reduce((res, item) => {
49
- const columnName = item['columnName'];
50
- const paramName = item['paramName'];
51
- if (typeof res[columnName] === 'undefined') {
52
- res[columnName] = {};
53
- res[columnName][paramName] = 0;
48
+
49
+ const checkFn = (val, hideAction) => {
50
+ return (val === 'false' || val === '0' || !val) ? (hideAction ? 1 : 0): (hideAction ? 0 : 1);
51
+ };
52
+
53
+ const columnsActions = this.valueConfig.reduce((acc, item) => {
54
+ const columnName = item.columnName;
55
+ const paramName = item.paramName;
56
+ if (!Ext.isObject(acc[columnName])) {
57
+ acc[columnName] = {};
58
+ acc[columnName][paramName] = 0;
54
59
  }
55
60
  const filter = fields.filter((f) => f.name === paramName);
56
- const hideAction = item['show'] === true;
57
- const itemValue = (item['paramValue'] + '').trim().toLowerCase();
58
- if (!filter.length) {
59
- if (itemValue === 'false' || itemValue === '0' || !itemValue) {
60
- res[columnName][paramName] += (hideAction ? 1 : 0);
61
- } else {
62
- res[columnName][paramName] += (hideAction ? 0 : 1);
63
- }
61
+ const hideAction = item.show === true;
62
+ const itemValue = (item.paramValue + '').trim();
63
+
64
+ if (!filter.length || !(filter[0].value + '').trim()) {
65
+ acc[columnName][paramName] += checkFn(itemValue, hideAction);
64
66
  } else {
65
- const filterValue = (filter.pop()['value'] + '').trim().toLowerCase();
66
- if (!filterValue) {
67
- if (itemValue === 'false' || itemValue === '0' || !itemValue) {
68
- res[columnName][paramName] += (hideAction ? 1 : 0);
69
- } else {
70
- res[columnName][paramName] += (hideAction ? 0 : 1);
71
- }
67
+ const filterValue = (filter.pop().value + '').trim();
68
+ if (itemValue === 'false' || itemValue === '0' || !itemValue) {
69
+ acc[columnName][paramName] += checkFn(filterValue, hideAction);
72
70
  } else {
73
- if (itemValue === 'false' || itemValue === '0' || !itemValue) {
74
- if (filterValue === 'false' || filterValue === '0' || !filterValue) {
75
- res[columnName][paramName] += (hideAction ? 1 : 0);
76
- } else {
77
- res[columnName][paramName] += (hideAction ? 0 : 1);
78
- }
79
- } else {
80
- res[columnName][paramName] += (hideAction && filterValue === itemValue ? 1 : 0);
81
- }
71
+ acc[columnName][paramName] += (filterValue === itemValue) ? (hideAction ? 1 : 0) : (hideAction ? 0 : 1);
82
72
  }
83
73
  }
84
- return res;
74
+ return acc;
85
75
  }, {});
86
76
  const me = this;
87
77
  Object.keys(columnsActions).forEach((columnName) => {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.8.39',
3
+ number: '2.8.41',
4
4
  });