ru.coon 2.6.20 → 2.6.22

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,23 @@
1
+ # Version 2.6.22, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a580a8a4150b16d4f73ad7a4c1689d610822ee10)
2
+ * ## Fixes
3
+ * <span style='color:red'> loadData on SimplestReportCombo CRM-8429</span> ([e88546], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e88546f3413c2aa5520453b04abe000f4345bfea))
4
+
5
+ * update: CHANGELOG.md ([c765e5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c765e541f9875b873ba2ecffb85f2284845e217b))
6
+
7
+ # Version 2.6.21, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6f24834f0ffadd1fcf91e6545544a0e6db569481)
8
+ * ## Features
9
+ * <span style='color:green'>feat: HT-8139: refactoring</span> ([e0404c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e0404c9c462d41b8a68eefe90d4204d9f12ab92d))
10
+ * <span style='color:green'>feat: HT-8139: validate function call after dialog on close window</span> ([8eec24], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8eec24fb0dcad82d6ce2fcd3c81d1bee92261bdb))
11
+
12
+ * ## Fixes
13
+ * <span style='color:red'>Fix:HT-8128 Fix groupButton property in CopyRowsFromGridConfigPanel</span> ([7fc721], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7fc721f71b53faa54c451645c1c03f4cc5d4ec23))
14
+ * <span style='color:red'> Added "requires". Related to TR-63848.</span> ([1d6623], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1d66232357d6fc3d3e7a0dabad7183da4aac41ad))
15
+
16
+ * refactoring UnifiedButtonToolbarPlugin ([2db2e5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2db2e5926168f46feabe6bf65ea709f26c546a7e))
17
+ * upd ([22b8d8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/22b8d81d9172f57072ac04a8e28017b3ed67ec0d))
18
+ * up extjs_iconpack version ([7fb046], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7fb04651c866be77a8165800b6625f6675188f50))
19
+ * update: CHANGELOG.md ([50ce89], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/50ce8936ea4f63c17b4af73991a600bfb1e9f0b2))
20
+
1
21
  # Version 2.6.20, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1d42d4ab7a1038b842d1e06e9cc352e268f16b0f)
2
22
  * ## Features
3
23
  * <span style='color:green'>feat: HT-8139: validate function call always on save</span> ([1f2415], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1f2415782cd840069c6600c5598ce353387e1d6c))
@@ -10,6 +30,9 @@
10
30
  * <span style='color:green'>feat: HT-8044 ExportReportDataToFilePlugin add exportConfig field</span> ([0df785], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0df785630853bcaf2291476fd7007f9a29761d63))
11
31
  * <span style='color:green'>feat: HT-8145: remove and set table view empty text on load / before load</span> ([e14b0b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e14b0b784256fc854be3d042bb695575eac83269))
12
32
 
33
+ * ## Fixes
34
+ * <span style='color:red'> BFL-11383 editing values setting in ReportLookupCombo</span> ([25f19c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/25f19c68cf394733dd397e0445669f755c2fd045))
35
+
13
36
  * update extjs_iconpack ([648132], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/648132fadfa22e609d17317e40aee2e99ac289ca))
14
37
  * update: CHANGELOG.md ([7b85e2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7b85e26648ab43868b4b1db32f11fb04113645dc))
15
38
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.6.20",
7
+ "version": "2.6.22",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -27,7 +27,7 @@
27
27
  "ace-diff": "^3.0.3",
28
28
  "decimal.js-light": "^2.5.1",
29
29
  "echarts": "^5.3.3",
30
- "extjs_iconpack": "1.3.20",
30
+ "extjs_iconpack": "1.3.21",
31
31
  "json5": "2.2.3",
32
32
  "object-hash": "^3.0.0",
33
33
  "sigma-printjs": "^1.0.1",
@@ -5,6 +5,7 @@
5
5
  Ext.define('Coon.common.panel.SelectIconClassPanel', {
6
6
  extend: 'Ext.tab.Panel',
7
7
  xtype: 'SelectIconClassPanel',
8
+ requires: ['Iconpack.modal.Icons'],
8
9
  cls: 'SelectIconClassPanel',
9
10
  title: 'Выберите подходящий значок',
10
11
  width: 1080,
@@ -98,9 +98,9 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
98
98
  this.setValue = function(value) {
99
99
  this._setValue(value);
100
100
  if (!this._inited && value) {
101
- this._inited = true;
102
101
  this.loadReportData(value);
103
102
  }
103
+ this._inited = true;
104
104
  };
105
105
  if (Ext.isObject(this.defaultParameters)) {
106
106
  this.setFilterDefaults(this.defaultParameters);
@@ -239,7 +239,7 @@ Ext.define('Coon.report.component.SimpleReportTag', {
239
239
  return typeof item === 'string' ? {name: item} : item;
240
240
  });
241
241
  this.store.getModel().addFields(newFields);
242
- this.store.loadData(data, true);
242
+ this.store.loadData(data);
243
243
  this.store.fireEvent('load', this.store, this.store.getRange(), true);
244
244
  this.fireEvent('load', this, this.store);
245
245
  if (this.value) {
@@ -95,6 +95,7 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
95
95
  ];
96
96
  },
97
97
  setContext: function(context) {
98
+ this.callParent(arguments);
98
99
  const visibleFields = context && context.fields ? context.fields.filter((field) => field.visibleSwitch === true) : [];
99
100
  if (visibleFields && visibleFields.length) {
100
101
  Ext.ComponentQuery.query('[xtype="EditorJsField"]', this).forEach((cmp) => {
@@ -262,7 +263,7 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
262
263
  ['xlsx', 'xlsx']
263
264
  ],
264
265
  fieldLabel: 'Отобразить редактор',
265
- name: 'position',
266
+ local: true,
266
267
  allowBlank: true,
267
268
  listeners: {
268
269
  change: this.onChangeFormat.bind(this),
@@ -3,11 +3,37 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
3
3
  alias: 'plugin.UnifiedButtonToolbarPlugin',
4
4
  uses: [],
5
5
  controller: null,
6
- windowClose: false,
6
+ isWindowClose: false,
7
7
  compareCash: false,
8
8
  configurePanelWizardForFormEditor: 'UnifiedButtonToolbarPluginConfigPanelFormEditor',
9
9
  suspendBeforeCloseEvent: false,
10
10
 
11
+ callMethod(method, defValue) {
12
+ if (typeof method === 'string') {
13
+ method = this.getMethod(method);
14
+ }
15
+ if (!method) {
16
+ return defValue;
17
+ }
18
+ try {
19
+ const res = method.call(this.controller);
20
+ if (res instanceof Promise) {
21
+ return res;
22
+ } else {
23
+ return Promise.resolve(res);
24
+ }
25
+ } catch (e) {
26
+ return Promise.reject(e);
27
+ }
28
+ },
29
+
30
+ getMethod(methodName) {
31
+ return methodName &&
32
+ this.controller[methodName] &&
33
+ typeof this.controller[methodName] === 'function' &&
34
+ this.controller[methodName];
35
+ },
36
+
11
37
  init: function(view) {
12
38
  this.controller = view && view.getController();
13
39
  this.controller.on('generateHash', this.generateHash, this);
@@ -23,6 +49,13 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
23
49
  dock: this.dock,
24
50
  items: [
25
51
  '->',
52
+ {
53
+ xtype: 'button',
54
+ reference: 'standardSaveButton',
55
+ text: 'Сохранить',
56
+ ui: 'orange-button',
57
+ handler: this.save.bind(this, false),
58
+ },
26
59
  {
27
60
  xtype: 'button',
28
61
  reference: 'standardCancelButton',
@@ -34,17 +67,12 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
34
67
  window.close();
35
68
  }
36
69
  },
37
- },
38
- {
39
- xtype: 'button',
40
- reference: 'standardSaveButton',
41
- text: 'Сохранить',
42
- handler: this.save.bind(this, false),
43
70
  }
44
71
  ],
45
72
  });
46
73
  view.addDocked(this.controller.unifiedButtonToolbar, this.dock === 'bottom' ? null : 0);
47
74
  },
75
+
48
76
  onBeforeCloseWindow(win) {
49
77
  const cp = win.down('UiCustomPanel');
50
78
  if (cp) {
@@ -57,6 +85,7 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
57
85
  this.save(true);
58
86
  return false;
59
87
  },
88
+
60
89
  callDialog() {
61
90
  Ext.Msg.show({
62
91
  title: 'Сохранить изменения?',
@@ -68,98 +97,86 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
68
97
  cancel: 'Вернуться',
69
98
  },
70
99
  icon: Ext.Msg.QUESTION,
71
- fn: function(btn) {
72
- if (btn === 'yes') {
73
- this.callSaveHandler(true);
74
- } else if (btn === 'no') {
75
- this.suspendBeforeCloseEvent = true;
76
- this.closeWindow();
77
- }
78
- },
100
+ fn: this.confirmHandler,
79
101
  scope: this,
80
102
  });
81
103
  },
104
+
105
+ confirmHandler(btn) {
106
+ if (btn === 'yes') {
107
+ return this.callValidate()
108
+ .then((valid) => valid && this.callSaveHandler(true));
109
+ }
110
+ if (btn === 'no') {
111
+ this.suspendBeforeCloseEvent = true;
112
+ this.closeWindow();
113
+ }
114
+ },
115
+
82
116
  closeWindow() {
83
117
  this.controller.getView().up('WindowWrap').close();
84
118
  },
85
- save(windowClose) {
86
- this.windowClose = windowClose;
87
- this.callPrepareBeanHandler();
119
+
120
+ save(isWindowClose) {
121
+ this.isWindowClose = isWindowClose;
122
+ this.compareCash = true;
123
+ this.callMethod(this.prepareBeanHandlerName);
124
+ },
125
+
126
+ callValidate() {
127
+ return this.callMethod(
128
+ this.validateBeanHandlerName,
129
+ Promise.resolve(true)
130
+ ).catch((error) => {
131
+ Coon.log.error(error);
132
+ Ext.Msg.alert('ошибка функции валидации');
133
+ throw error;
134
+ });
88
135
  },
136
+
89
137
  async generateHash(params) {
90
- if (params && Ext.isObject(params)) {
91
- if (this.compareCash === true) {
92
- this.compareCash = false;
138
+ if (!Ext.isObject(params)) {
139
+ if (this.isWindowClose) {
140
+ this.suspendBeforeCloseEvent = true;
141
+ this.closeWindow();
142
+ }
143
+ return;
144
+ }
145
+ if (this.compareCash !== true) {
146
+ this.controller.savedDataHash = Coon.util.generateHashFromObj(params);
147
+ return;
148
+ }
93
149
 
94
- if (
95
- this.validateBeanHandlerName &&
96
- this.controller[this.validateBeanHandlerName] &&
97
- typeof this.controller[this.validateBeanHandlerName] === 'function'
98
- ) {
99
- const result = this.controller[this.validateBeanHandlerName].call(this.controller);
100
- if (result instanceof Promise) {
101
- const isError = await result.catch(() => 'error');
102
- if (isError === 'error') {
103
- return false;
104
- }
105
- } else {
106
- if (result !== true) {
107
- return false;
108
- }
109
- }
110
- }
111
- const currentHash = Coon.util.generateHashFromObj(params);
112
- if (this.controller.savedDataHash !== currentHash) {
113
- if (this.windowClose) {
114
- this.callDialog();
115
- } else {
116
- this.callSaveHandler();
117
- }
118
- } else if (this.windowClose) {
119
- this.suspendBeforeCloseEvent = true;
120
- this.closeWindow();
121
- }
150
+ this.compareCash = false;
151
+ if (!this.isWindowClose) {
152
+ const valid = await this.callValidate();
153
+ if (!valid) {
154
+ return;
155
+ }
156
+ }
157
+ const currentHash = Coon.util.generateHashFromObj(params);
158
+ if (this.controller.savedDataHash !== currentHash) {
159
+ if (this.isWindowClose) {
160
+ this.callDialog();
122
161
  } else {
123
- this.controller.savedDataHash = Coon.util.generateHashFromObj(params);
162
+ this.callSaveHandler();
124
163
  }
125
- } else if (this.windowClose) {
164
+ } else if (this.isWindowClose) {
126
165
  this.suspendBeforeCloseEvent = true;
127
166
  this.closeWindow();
128
167
  }
129
168
  },
130
- callPrepareBeanHandler(compareCash = true) {
131
- if (this.prepareBeanHandlerName &&
132
- this.controller[this.prepareBeanHandlerName] &&
133
- typeof this.controller[this.prepareBeanHandlerName] === 'function') {
134
- this.compareCash = compareCash;
135
- this.controller[this.prepareBeanHandlerName].call();
136
- }
137
- },
138
- async callSaveHandler(closeAfterSave) {
139
- if (
140
- this.saveHandlerName &&
141
- this.controller[this.saveHandlerName] &&
142
- typeof this.controller[this.saveHandlerName] === 'function'
143
- ) {
144
- const result = this.controller[this.saveHandlerName].call(this.controller);
145
- if (result instanceof Promise) {
146
- result.then(() => {
147
- this.controller[this.prepareBeanHandlerName].call(this.controller);
148
- });
149
- const isError = await result.catch(() => 'error');
150
- if (isError === 'error') {
151
- closeAfterSave = false;
152
- }
153
- } else {
154
- if (result !== true) {
155
- closeAfterSave = false;
169
+
170
+
171
+ callSaveHandler(closeAfterSave) {
172
+ return this.callMethod(this.saveHandlerName)
173
+ .then(() => {
174
+ if (closeAfterSave) {
175
+ this.suspendBeforeCloseEvent = true;
176
+ this.closeWindow();
156
177
  } else {
157
- this.controller[this.prepareBeanHandlerName].call(this.controller);
178
+ this.callMethod(this.prepareBeanHandlerName);
158
179
  }
159
- }
160
- if (closeAfterSave) {
161
- this.closeWindow();
162
- }
163
- }
180
+ });
164
181
  },
165
182
  });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.6.20',
3
+ number: '2.6.22',
4
4
  });
@@ -1,23 +0,0 @@
1
- Ext.define('Coon.nav.MenuLoader', {
2
- singleton: true,
3
-
4
- isLoaded: false,
5
-
6
- load() {
7
- return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
8
- .then((data) => {
9
- if (Array.isArray(data.list)) {
10
- this.uiElementMap = data.list.reduce();
11
- }
12
- this.isLoaded = true;
13
- });
14
- },
15
-
16
- get() {
17
-
18
- },
19
-
20
- isValidMenuItem(uiEmentId) {
21
- return this.uiElementMap.has(uiEmentId);
22
- },
23
- });
@@ -1,7 +0,0 @@
1
- **спецификация:**
2
-
3
- входные параметры:
4
-
5
- - exportFileFormat [xls/pdf]
6
- - allowUserSelectColumnsToUpload
7
- - addToSearchButton добавить в кнопку "поиск", в этом случае в качестве параметра отправляем текущие параметры из FilterPanel(useRawFilterParams: true)