ru.coon 2.7.74 → 2.7.76

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.76, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aba7291e49ef3d047503bdb2b8dae078d617a8f2)
2
+ * ## Fixes
3
+ * <span style='color:red'>fix precision in CopyRowsFromGrid, HT-9263</span> ([a02eb9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a02eb9443ebf6794e35abdc924c45763c815b245))
4
+
5
+ * update: CHANGELOG.md ([a0b693], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a0b693884f48f4d3489f7511c01c5f85e6d7a798))
6
+
7
+ # Version 2.7.75, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/07c180f0c622d325ab34f62f832e1ee801609fdc)
8
+ * ## Features
9
+ * <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))
10
+ * <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))
11
+
12
+ * ## Fixes
13
+ * <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))
14
+ * <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))
15
+
16
+ * update: CHANGELOG.md ([83565d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/83565d922e173ad5755e121ba857db0b72281b9c))
17
+
1
18
  # Version 2.7.74, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ad505a03bce73983ba14ee55f9132c91d9c9762)
2
19
  * ## Fixes
3
20
  * <span style='color:red'>fix executeComponentDoInit parameters initialization</span> ([454f38], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/454f389375cdb2280091eb41c1ecd0f0e0150f3f))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.74",
7
+ "version": "2.7.76",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -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() {
@@ -7,6 +7,7 @@ Ext.define('Coon.report.plugin.grid.CopyRowsFromGrid', {
7
7
  'Sigma.common.grid.plugin.CopyRowsFromGrid',
8
8
  'Sigma.common.plugin.grid.CopyRowsFromGrid'
9
9
  ],
10
+ defaultFloatPrecision: 2,
10
11
  configurePanelWizard: 'CopyRowsFromGridConfigPanel',
11
12
  position: -1,
12
13
  allowAddRowOnPaste: false,
@@ -1058,9 +1059,12 @@ Ext.define('Coon.report.plugin.grid.CopyRowsFromGrid', {
1058
1059
  this.getRowStyleXlsx(grid, record, workbook)
1059
1060
  );
1060
1061
  if (valueType === 'float') {
1061
- const precision = Number(columnConfig.precision) || this.getConfig('floatPrecision') || 2;
1062
+ let precision = Number(columnConfig.precision);
1063
+ if (!Number.isInteger(precision)) {
1064
+ precision = Number(this.getConfig('floatPrecision') || this.defaultFloatPrecision);
1065
+ }
1062
1066
  col['styleId'] = workbook.addCellStyle({
1063
- format: '0.'.padEnd(Number(precision) + 2, '0'),
1067
+ format: precision !== 0 ? '0.'.padEnd(precision + 2, '0') : '0',
1064
1068
  });
1065
1069
  if (col['value'].length) {
1066
1070
  col['value'] = parseFloat(col['value'].replace(/\s/g, '').replace(',', '.'));
@@ -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.74',
3
+ number: '2.7.76',
4
4
  });