ru.coon 2.7.73 → 2.7.75

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,20 @@
1
+ # Version 2.7.75, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/07c180f0c622d325ab34f62f832e1ee801609fdc)
2
+ * ## Features
3
+ * <span style='color:green'>feat: HT-10115: chain plugin return result, log unified buttons call handlers result</span> ([408dab], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/408dab15c6afc49e47bd80729bf55e1a541522cc))
4
+ * <span style='color:green'>feat: [ReportTree][CharacteristicGridCopyPlugin] Added testId generation. Related to HT-8881.</span> ([2bc5e8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2bc5e899f6a5d390844fcc25fc4511b5d195fbb8))
5
+
6
+ * ## Fixes
7
+ * <span style='color:red'> TR-68748: set aceEditor value on render editor</span> ([0ec858], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ec858f3daaa04b6ae03ad6980b98e68795538f9))
8
+ * <span style='color:red'> TR-68748: set aceEditor value on render editor</span> ([5b4020], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b40206ef76c540beb44f030a005d074db7a5d1a))
9
+
10
+ * update: CHANGELOG.md ([83565d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/83565d922e173ad5755e121ba857db0b72281b9c))
11
+
12
+ # Version 2.7.74, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ad505a03bce73983ba14ee55f9132c91d9c9762)
13
+ * ## Fixes
14
+ * <span style='color:red'>fix executeComponentDoInit parameters initialization</span> ([454f38], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/454f389375cdb2280091eb41c1ecd0f0e0150f3f))
15
+
16
+ * update: CHANGELOG.md ([637d18], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/637d18bb19b23d867325ba60ad80c1e7e383c8ff))
17
+
1
18
  # Version 2.7.73, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/023f7c5fbe1cc722907329839a07e74212ec9153)
2
19
  * ## Fixes
3
20
  * <span style='color:red'> HT-9894 CharacteristicGridEditor getModifiedRecords</span> ([df27e0], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/df27e0d0006e93994a0bf407df47d3c7e1ea0add))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.73",
7
+ "version": "2.7.75",
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
@@ -491,7 +491,8 @@ Ext.define('Coon.Function', {
491
491
  return result;
492
492
  },
493
493
 
494
- executeComponentDoInit: function(component, parameters = {}) {
494
+ executeComponentDoInit: function(component, parameters) {
495
+ parameters = Ext.isObject(parameters) ? parameters : {};
495
496
  if (!component) {
496
497
  Coon.log.error('Coon.Function.executeComponentDoInit error: component cant be empty');
497
498
  return false;
@@ -54,6 +54,7 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
54
54
  widget.on('click', me.onPasteWidget, me, {args: [widget, type]});
55
55
  widget.on('mouseover', me.showSlaveIcon, me, {args: [type, false, me.masterWidgets]});
56
56
  widget.on('mouseout', me.showSlaveIcon, me, {args: [type, true, me.masterWidgets]});
57
+ widget.testIdToken = type;
57
58
  }
58
59
  },
59
60
  });
@@ -72,11 +73,13 @@ Ext.define('Coon.common.component.editor.CharacteristicGridCopyPlugin', {
72
73
  },
73
74
 
74
75
  showSlaveIcon(type, hideMasterIcon, masterWidgets) {
75
- masterWidgets.find((widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]).setHidden(hideMasterIcon);
76
+ masterWidgets.find((widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]).
77
+ setHidden(hideMasterIcon);
76
78
  },
77
79
 
78
80
  onPasteWidget(widget, type) {
79
- const masterWidget = this.masterWidgets.find((widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]);
81
+ const masterWidget = this.masterWidgets.find(
82
+ (widget) => widget.getWidgetRecord().get('type').trim() === this.slaveConfig[type]);
80
83
  const masterRecord = masterWidget && masterWidget.getWidgetRecord();
81
84
  const slaveRecord = widget.getWidgetRecord();
82
85
 
@@ -58,7 +58,8 @@ Ext.define('Coon.report.component.reportpanel.ReportTree', {
58
58
  if (!mapElement) {
59
59
  mapElement = {};
60
60
  mapElement[me.getIdIndex()] = parentId;
61
- mapElement[me.getTreeColumnIndex()] = 'Неверный родительский объект:' + parentId;
61
+ mapElement[me.getTreeColumnIndex()] = 'Неверный родительский объект:' +
62
+ parentId;
62
63
  }
63
64
 
64
65
  mapElement.list = mapElement.list || [];
@@ -107,6 +108,15 @@ Ext.define('Coon.report.component.reportpanel.ReportTree', {
107
108
  }
108
109
  this.callParent();
109
110
  this.relayEvents(this.getStore(), ['datachanged', 'load']);
111
+
112
+ // testId generation on tree nodes
113
+ this.getStore().on('load', (store) => {
114
+ for (const [index, domElement] of this.getView().getNodes().entries()) {
115
+ if (typeof Ext.Component.generateTestId === 'function') {
116
+ Ext.Component.generateTestId(store.getAt(index).get(this.idIndex), domElement);
117
+ }
118
+ }
119
+ }, this);
110
120
  },
111
121
 
112
122
  clear: function() {
@@ -31,61 +31,55 @@ Ext.define('Coon.uielement.plugin.MethodChainPlugin', {
31
31
  if (this.isTraceEnabled()) {
32
32
  this.tracePlugin();
33
33
  }
34
+ let result;
34
35
  for (const methodName of this.methodNames) {
35
- let result;
36
- if (typeof this.controller[methodName] === 'function') {
37
- try {
38
- result = this.controller[methodName].call();
39
- } catch (error) {
40
- this.showError(methodName);
41
- if (this.breakChainOnFalse) {
42
- break;
43
- }
44
- }
45
- const errorHandler = this.getErrorHandler(methodName);
36
+ if (typeof this.controller[methodName] !== 'function') {
37
+ this.showError(false, `Ошибка в обработчике ${methodName}, не найден метод ${this.handlerName}`);
38
+ return false;
39
+ }
40
+ try {
41
+ result = this.controller[methodName].call(this.controller, result);
42
+ } catch (error) {
43
+ this.showError(methodName);
44
+ throw error;
45
+ }
46
+ const errorHandler = this.getErrorHandler(methodName);
46
47
 
47
- if (result instanceof Promise) {
48
- const promiseResult = await result
49
- .then((result) => {
50
- return this.breakChainOnFalse && result === false ? '__error' : result;
51
- })
52
- .catch((error) => {
53
- return this.logError(methodName, error);
54
- });
48
+ if (result instanceof Promise) {
49
+ const promiseResult = await result
50
+ .then((result) => {
51
+ return this.breakChainOnFalse && result === false ? '__error' : result;
52
+ })
53
+ .catch((error) => {
54
+ return this.logError(methodName, error);
55
+ });
55
56
 
56
- if (promiseResult === '__error') {
57
- if (!errorHandler) {
58
- this.showError(methodName);
59
- } else {
60
- try {
61
- errorHandler.call();
62
- } catch (error) {
63
- this.showError(false, `Ошибка в обработчике ${this.errorHandlers[methodName]} в ${this.handlerName}`);
64
- }
57
+ if (promiseResult === '__error') {
58
+ if (!errorHandler) {
59
+ this.showError(methodName);
60
+ } else {
61
+ try {
62
+ errorHandler.call();
63
+ } catch (error) {
64
+ this.showError(false, `Ошибка в обработчике ${this.errorHandlers[methodName]} в ${this.handlerName}`);
65
+ throw error;
65
66
  }
66
- if (this.breakChainOnFalse) {
67
- break;
68
- }
69
- }
70
- } else {
71
- if (this.breakChainOnFalse && result === false) {
72
- if (errorHandler) {
73
- try {
74
- errorHandler.call();
75
- } catch (error) {
76
- this.showError(false, `Ошибка в обработчике ${this.errorHandlers[methodName]} в ${this.handlerName}`);
77
- }
78
- }
79
- break;
80
67
  }
68
+ return false;
81
69
  }
82
- } else {
83
- this.showError(false, `Ошибка в обработчике ${methodName}, не найден метод ${this.handlerName}`);
84
- if (this.breakChainOnFalse) {
85
- break;
70
+ } else if (this.breakChainOnFalse && result === false) {
71
+ if (errorHandler) {
72
+ try {
73
+ errorHandler.call();
74
+ } catch (error) {
75
+ this.showError(false, `Ошибка в обработчике ${this.errorHandlers[methodName]} в ${this.handlerName}`);
76
+ throw error;
77
+ }
86
78
  }
79
+ return false;
87
80
  }
88
81
  }
82
+ return result;
89
83
  },
90
84
 
91
85
  showError(methodName, msg) {
@@ -104,8 +104,7 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
104
104
 
105
105
  confirmHandler(btn) {
106
106
  if (btn === 'yes') {
107
- return this.callValidate()
108
- .then((valid) => valid && this.callSaveHandler(true));
107
+ return this.callValidate().then((valid) => valid && this.callSaveHandler(true));
109
108
  }
110
109
  if (btn === 'no') {
111
110
  this.suspendBeforeCloseEvent = true;
@@ -120,14 +119,20 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
120
119
  save(isWindowClose) {
121
120
  this.isWindowClose = isWindowClose;
122
121
  this.compareCash = true;
123
- this.callMethod(this.prepareBeanHandlerName);
122
+ this.callMethod(this.prepareBeanHandlerName).then((res) => {
123
+ Coon.log.debug(`Результат выполнения функции подготовки данных для сохранения ${this.prepareBeanHandlerName}: ${res}`);
124
+ return res;
125
+ });
124
126
  },
125
127
 
126
128
  callValidate() {
127
129
  return this.callMethod(
128
130
  this.validateBeanHandlerName,
129
131
  Promise.resolve(true)
130
- ).catch((error) => {
132
+ ).then((res) => {
133
+ Coon.log.debug(`Результат выполнения функции валидации данных ${this.validateBeanHandlerName}: ${res}`);
134
+ return res;
135
+ }).catch((error) => {
131
136
  Coon.log.error(error);
132
137
  Ext.Msg.alert('ошибка функции валидации');
133
138
  throw error;
@@ -155,6 +160,9 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
155
160
  }
156
161
  }
157
162
  const currentHash = Coon.util.generateHashFromObj(params);
163
+ if (this.controller.savedDataHash === currentHash) {
164
+ Coon.log.debug(`Данные не были измененны`);
165
+ }
158
166
  if (this.controller.savedDataHash !== currentHash) {
159
167
  if (this.isWindowClose) {
160
168
  this.callDialog();
@@ -167,16 +175,15 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
167
175
  }
168
176
  },
169
177
 
170
-
171
178
  callSaveHandler(closeAfterSave) {
172
- return this.callMethod(this.saveHandlerName)
173
- .then(() => {
174
- if (closeAfterSave) {
175
- this.suspendBeforeCloseEvent = true;
176
- this.closeWindow();
177
- } else {
178
- this.callMethod(this.prepareBeanHandlerName);
179
- }
180
- });
179
+ return this.callMethod(this.saveHandlerName).then((res) => {
180
+ Coon.log.debug(`Результат выполнения функции сохранения данных ${this.saveHandlerName}: ${res}`);
181
+ if (closeAfterSave) {
182
+ this.suspendBeforeCloseEvent = true;
183
+ this.closeWindow();
184
+ } else {
185
+ this.callMethod(this.prepareBeanHandlerName);
186
+ }
187
+ });
181
188
  },
182
189
  });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.73',
3
+ number: '2.7.75',
4
4
  });