ru.coon 2.5.55 → 2.5.56

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,9 @@
1
+ # Version 2.5.56, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/128444f42dc670412319a7f3bf6c53407f8ca3c7)
2
+ * ## Features
3
+ * <span style='color:green'>feat: HT-7788: check execute chain function result on error, add validation function in unified toolbar plugin</span> ([9af285], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9af28505fd7c8761aa0cfe51d258892307a25d5d))
4
+
5
+ * update: CHANGELOG.md ([cb4c2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb4c2a146ce95de7c03a07b1e3ac2c7fbc6f96d3))
6
+
1
7
  # Version 2.5.55, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/445f548a2eab2e58d40a1546de00e01a3c1e916c)
2
8
  * ## Features
3
9
  * <span style='color:green'>feat: BFL-10334: download file with blob</span> ([e42e68], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e42e682f7375feffb124b6f5179f2a1b96d7757c))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.55",
7
+ "version": "2.5.56",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -48,6 +48,10 @@ Ext.define('Coon.uielement.plugin.MethodChainPlugin', {
48
48
  }
49
49
  break;
50
50
  }
51
+ } else {
52
+ if (result === false) {
53
+ break;
54
+ }
51
55
  }
52
56
  }
53
57
  },
@@ -94,6 +94,26 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
94
94
  }
95
95
  },
96
96
  async callSaveHandler(closeAfterSave) {
97
+ if (
98
+ this.validateBeanHandlerName &&
99
+ this.controller[this.validateBeanHandlerName] &&
100
+ typeof this.controller[this.validateBeanHandlerName] === 'function'
101
+ ) {
102
+ const result = this.controller[this.validateBeanHandlerName].call(this.controller);
103
+ if (result instanceof Promise) {
104
+ result.then(() => {
105
+ this.controller[this.validateBeanHandlerName].call(this.controller);
106
+ });
107
+ const isError = await result.catch(() => 'error');
108
+ if (isError === 'error') {
109
+ return false;
110
+ }
111
+ } else {
112
+ if (result !== true) {
113
+ return false;
114
+ }
115
+ }
116
+ }
97
117
  if (
98
118
  this.saveHandlerName &&
99
119
  this.controller[this.saveHandlerName] &&
@@ -6,6 +6,7 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
6
6
  data: {
7
7
  saveHandlerName: '',
8
8
  prepareBeanHandlerName: '',
9
+ validateBeanHandlerName: '',
9
10
  dock: 'bottom',
10
11
  },
11
12
  },
@@ -56,6 +57,23 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
56
57
  displayField: 'id',
57
58
  },
58
59
  },
60
+ {
61
+ xtype: 'comboBtnWrapper',
62
+ combobox: {
63
+ xtype: 'BaseComboBox',
64
+ fieldLabel: 'Функция валидации данных',
65
+ labelWidth: 60,
66
+ flex: 1,
67
+ loadOnRender: false,
68
+ hideMode: 'offsets',
69
+ store: 'codeHandlers',
70
+ bind: {
71
+ value: '{validateBeanHandlerName}',
72
+ },
73
+ valueField: 'id',
74
+ displayField: 'id',
75
+ },
76
+ },
59
77
  {
60
78
  xtype: 'segmentedbutton',
61
79
  allowMultiple: false,
@@ -90,7 +108,7 @@ Ext.define('Coon.uielement.plugin.configPanel.UnifiedButtonToolbarPluginConfigPa
90
108
  getConfiguration: function() {
91
109
  const result = {};
92
110
  const vm = this.getViewModel();
93
- ['saveHandlerName', 'prepareBeanHandlerName', 'dock'].forEach((el) => {
111
+ ['saveHandlerName', 'prepareBeanHandlerName', 'validateBeanHandlerName', 'dock'].forEach((el) => {
94
112
  if (vm.get(el)) {
95
113
  result[el] = vm.get(el);
96
114
  }
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.5.55',
3
+ number: '2.5.56',
4
4
  });