ru.coon 2.7.24 → 2.7.26

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.25, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/568fd6aae3e5756be342c7e74d434b7976700dae)
2
+ * ## Features
3
+ * <span style='color:green'>feat: HT-8513: add copy item in cell context menu</span> ([5355d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5355d48244eceb3add5e5002bfe970b8059e235d))
4
+ * <span style='color:green'>feat: HT-8513: add copy item in cell context menu</span> ([5c8b74], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5c8b74e40d74471bd8eb4fa54e82539c136fe088))
5
+ * <span style='color:green'>feat: HT-8513: add copy item in cell context menu</span> ([915abe], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/915abebc3f710ae7236d2584292d7fd62b2067e0))
6
+ * <span style='color:green'>feat: HT-8763: search footer view by reference</span> ([2648fe], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2648fe29ea96319055c586e4cea1015115c19494))
7
+
8
+ * update: CHANGELOG.md ([971505], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9715050f4ce08854c84792001dea4c334fd74a0f))
9
+
1
10
  # Version 2.7.24, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8e3cc36a693f048a9feceada5eb46f979eda23db)
2
11
  * ## Features
3
12
  * <span style='color:green'>feat: HT-8422: set dynamic size on filter panel</span> ([e5816e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e5816e9be17f9ca40fad6ba2d86e79318455b633))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.24",
7
+ "version": "2.7.26",
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
@@ -17,7 +17,7 @@ Ext.define('Coon.Function', {
17
17
 
18
18
  /**
19
19
  *
20
- * @param {*} win Ext component
20
+ * @param {*} component Ext component
21
21
  * @param {*} requestOptions
22
22
  * @param {String} requestOptions.url url
23
23
  * @param {Boolean} requestOptions.binary
@@ -26,18 +26,15 @@ Ext.define('Coon.Function', {
26
26
  * @param {Boolean} sync sync|async request
27
27
  * @returns
28
28
  */
29
- doRequest: function(win, requestOptions, sync) {
29
+ doRequest: function(component, requestOptions, sync) {
30
30
  const requestHash = Coon.util.generateHashFromObj(requestOptions);
31
31
  if (!this.beforeRequest(requestOptions, requestHash)) {
32
32
  return;
33
33
  }
34
34
  let myMask;
35
- if (win) {
36
- if (!win.isComponent) {
37
- Coon.log.error('win parameter is element instead component');
38
- }
35
+ if (component && !this.isComponentRendered(component)) {
39
36
  myMask = new Ext.LoadMask({
40
- target: win,
37
+ target: component,
41
38
  msg: requestOptions.text || 'Загрузка...',
42
39
  });
43
40
  myMask.show();
@@ -63,7 +60,7 @@ Ext.define('Coon.Function', {
63
60
  response.responseJSON = Ext.decode(response.responseText, true);
64
61
  }
65
62
  try {
66
- requestOptions.callback.call(this, win, true, response, requestOptions);
63
+ requestOptions.callback.call(this, component, true, response, requestOptions);
67
64
  } catch (e) {
68
65
  Coon.log.error(e);
69
66
  }
@@ -79,7 +76,7 @@ Ext.define('Coon.Function', {
79
76
  response.responseJSON = Ext.decode(response.responseText, true);
80
77
  }
81
78
  try {
82
- requestOptions.failure.call(this, win, requestOptions, response);
79
+ requestOptions.failure.call(this, component, requestOptions, response);
83
80
  } catch (e) {
84
81
  console.warn(e);
85
82
  }
@@ -95,6 +92,13 @@ Ext.define('Coon.Function', {
95
92
  return request;
96
93
  },
97
94
 
95
+ isComponentRendered: function(component) {
96
+ return
97
+ component &&
98
+ component.isComponent &&
99
+ component.rendered
100
+ },
101
+
98
102
  /**
99
103
  * Сериализация содержимого Store
100
104
  * @param store
@@ -26,6 +26,7 @@ Ext.define('Coon.common.component.editor.creators.SimpleReportEditorCreator', {
26
26
  valueField: 'VALUE',
27
27
  displayField: 'DESCRIPTION',
28
28
  searchBySubstring: true,
29
+ forceSelection: true,
29
30
  }, record.get('editorConfig')));
30
31
  },
31
32
 
@@ -41,7 +41,6 @@ Ext.define('Coon.common.field.fieldset.DateTimeField', {
41
41
 
42
42
  initComponent: function() {
43
43
  this.callParent();
44
- this.on('change', this.publishValue, this);
45
44
  this.triggers.time.setHidden(!!this.hideTimeTrigger);
46
45
  },
47
46
 
@@ -136,8 +135,4 @@ Ext.define('Coon.common.field.fieldset.DateTimeField', {
136
135
  this.picker.setValue(Ext.isDate(value) ? value : this.createInitialDate());
137
136
  }
138
137
  },
139
-
140
- publishValue: function() {
141
- this.publishState('value', this.getValue());
142
- },
143
138
  });
@@ -15,7 +15,7 @@ Ext.define('Coon.nav.windowHolder', {
15
15
 
16
16
  getFooter() {
17
17
  if (!this.locals.footer) {
18
- this.locals.footer = Ext.ComponentQuery.query('footerview')[0];
18
+ this.locals.footer = Ext.ComponentQuery.query('[reference="footerview"]')[0];
19
19
  }
20
20
  return this.locals.footer;
21
21
  },
@@ -777,10 +777,25 @@ Ext.define('Coon.report.component.ReportPanel', {
777
777
  this.getIsTree() ? 'ReportTree' : 'ReportGrid',
778
778
  Ext.apply(defaultGridConfig, this.gridProperties, {reportId: reportBean[ns.$reportId]})
779
779
  );
780
+
781
+ if (widget.contextMenu) {
782
+ const copyButton = new Ext.menu.Item({
783
+ text: 'Копировать',
784
+ handler: this.onCopyCellClick.bind(widget.contextMenu),
785
+ });
786
+ widget.contextMenu.add(copyButton);
787
+ widget.contextMenu.on('requestMenuItems', (params) => {
788
+ copyButton.setHidden(!params.td);
789
+ }, this);
790
+ }
780
791
  widget.on('buttonIsAdded', this.sortButtons, this);
781
792
  return widget;
782
793
  },
783
-
794
+ onCopyCellClick() {
795
+ if (this.context && this.context.td) {
796
+ Coon.util.copyToClipboard(this.context.td.innerText);
797
+ }
798
+ },
784
799
  sortButtons: function(params) {
785
800
  if (params.bar.items.length === 1) {
786
801
  return;
@@ -280,6 +280,11 @@ Ext.define('Coon.report.component.SimplestReportCombo', {
280
280
  const find = map.find((e) => e[this.defaultValueFlg || 'IS_DEFAULT'] === 'Y');
281
281
  const defaultValue = this.value || (find && find[this.valueField]);
282
282
  if (defaultValue) {
283
+ const foundByValueField = map.find((e) => e[this.valueField] === this.value);
284
+ if (!foundByValueField) {
285
+ this.setValue(null);
286
+ return;
287
+ }
283
288
  this.setValue(defaultValue);
284
289
  if (Ext.isFunction(this.publishState)) {
285
290
  this.publishState('value', this.getValue());
@@ -10,9 +10,15 @@ Ext.define('Coon.report.model.CharacteristicBean', {
10
10
  requires: 'Coon.report.model.CharacteristicBeanFields',
11
11
  fields: [
12
12
  {name: Coon.report.model.CharacteristicBeanFields.$effectiveDate, type: 'date'},
13
- {name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string'},
13
+ {
14
+ name: Coon.report.model.CharacteristicBeanFields.$value, type: 'string', convert: (val) => {
15
+ return typeof val === 'string' ? val.trim() : val;
16
+ },
17
+ },
14
18
  {name: Coon.report.model.CharacteristicBeanFields.$valueDescription, type: 'string'},
15
- {name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string'},
19
+ {name: Coon.report.model.CharacteristicBeanFields.$type, type: 'string', convert: (val) => {
20
+ return typeof val === 'string' ? val.trim() : val;
21
+ }},
16
22
  {name: Coon.report.model.CharacteristicBeanFields.$typeDescription, type: 'string'},
17
23
  {name: Coon.report.model.CharacteristicBeanFields.$editable, type: 'boolean', defaultValue: true},
18
24
  {name: Coon.report.model.CharacteristicBeanFields.$visible, type: 'boolean', defaultValue: true},
@@ -96,6 +96,7 @@ Ext.define('Coon.report.plugin.grid.GridContextMenu', {
96
96
  if (record) {
97
97
  contextMenu.record = record;
98
98
  }
99
+ contextMenu.context = {view, td, cellIndex, record, tr, rowIndex, event},
99
100
  cellIndex && (contextMenu.cellIndex = cellIndex);
100
101
  const store = this.grid.getStore();
101
102
  let params;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.24',
3
+ number: '2.7.25',
4
4
  });