ru.coon 2.5.37 → 2.5.39

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,14 @@
1
+ # Version 2.5.39, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/197e1a48c71c978b75397d971309a8df6c4eae59)
2
+ * hotfix ExportReportDataToFilePlugin ([ccdd78], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ccdd78c5e826fc1c93493e9336bdfb3124b58f44))
3
+ * update: CHANGELOG.md ([35314e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/35314ed753380fa21254cf133f068f812e6b5031))
4
+
5
+ # Version 2.5.38, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cf1397fbbe07d11e5cdf281bdd82611040a1b31e)
6
+ * ## Features
7
+ * <span style='color:green'>feat: TR-67541 Исправление причину сообщений WRN callParent has no target при сборке wb</span> ([a5753d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5753dff2b7454b5d466e30cb4369f8632059805))
8
+
9
+ * rollback ExportReportDataToFilePlugin version ([abd98f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abd98fe930283d34326d00dad7d1f97ec08aabfd))
10
+ * update: CHANGELOG.md ([96c169], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/96c169bfcd80139251086e0b37e13589cd8267a8))
11
+
1
12
  # Version 2.5.37, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6d81ec7e9ac5bfbcbe04d3310a7e26088ac648fb)
2
13
  * ## Fixes
3
14
  * <span style='color:red'> CRM-7853 ParameterizedReportCombo исправлен expand при начитке стора с...</span> ([026277], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0262778f6eabba77c4af806b2819447a7711bb33))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.37",
7
+ "version": "2.5.39",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -27,9 +27,4 @@ Ext.define('Coon.common.component.editor.CharacteristicColumnModel', {
27
27
  prepareType: function(record) {
28
28
  this.activeEditor = this.factory.getEditorForType(record, this.context);
29
29
  },
30
-
31
- getCellEditor: function(colIndex, rowIndex) {
32
- const editor = this.callParent([colIndex, rowIndex]);
33
- return editor || this.activeEditor;
34
- },
35
30
  });
@@ -386,10 +386,5 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
386
386
  this.activeEditor.editingPlugin = this.editingPlugin;
387
387
  this.activeEditor.grid = this;
388
388
  return this.activeEditor;
389
- }, /* ,
390
-
391
- getUiElementPanelCellEditor: function (colIndex, rowIndex) {
392
- var editor = Coon.common.component.editor.CharacteristicColumnModel.superclass.getCellEditor.call(this, colIndex, rowIndex);
393
- return editor || this.activeEditor;
394
- }*/
389
+ },
395
390
  });
@@ -126,14 +126,6 @@ Ext.define('Coon.common.field.combo.GridComboBox', {
126
126
  }
127
127
  },
128
128
 
129
- doResize: function(w) {
130
- this.callParent([w]);
131
-
132
- if (!Ext.isDefined(this.listWidth) && !this.gridRendering) {
133
- this.grid.getView().refresh();
134
- }
135
- },
136
-
137
129
  // private
138
130
  onBeforeLoad: function() {
139
131
  if (!this.hasFocus) {
package/src/log.js CHANGED
@@ -79,7 +79,7 @@ Ext.define('Coon.log', {
79
79
  });
80
80
  },
81
81
 
82
- isDebug: !!Ext.util.Cookies.get('coon_log_debug'),
82
+ isDebug: !!['1', 'true'].includes(Ext.util.Cookies.get('coon_log_debug')),
83
83
 
84
84
  setDebug(flag) {
85
85
  this.isDebug = !!flag;
@@ -102,6 +102,7 @@ Ext.define('Coon.report.ReportEntity', {
102
102
  description: pluginClass.prototype.description,
103
103
  tags: prototype.tags || pluginClass.prototype.tags,
104
104
  isSingle: prototype.isSingle,
105
+ isDeprecated: prototype.isDeprecated || false,
105
106
  };
106
107
  }
107
108
  }
@@ -130,6 +131,7 @@ Ext.define('Coon.report.ReportEntity', {
130
131
  value: alias,
131
132
  description: prototype.description || '',
132
133
  tags: prototype.tags || [],
134
+ isDeprecated: prototype.isDeprecated || false,
133
135
  });
134
136
  this.existed.add(alias);
135
137
  }
@@ -24,7 +24,7 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
24
24
 
25
25
  execute: function(grid, config) {
26
26
  this.grid = grid;
27
- const form = this.getForm() || this.injectForm();
27
+ const form = this.getForm() || this.injectForm() && this.getForm();
28
28
 
29
29
  const filename = config.reportFileName ||
30
30
  this.grid.reportId ||
@@ -93,7 +93,6 @@ Ext.define('Coon.report.command.BaseReportDataCommand', {
93
93
  <input name="parameterList" id="toReportFormDataParameterList"/>
94
94
  `;
95
95
  document.body.append(form);
96
- return form;
97
96
  },
98
97
 
99
98
  });
@@ -21,7 +21,7 @@ Ext.define('Coon.report.component.report.NorthPanel', {
21
21
  enableHighlightingRequiredFields: false,
22
22
  },
23
23
  initComponent() {
24
- this.searchButton = Ext.widget('button', Ext.apply({
24
+ this.searchButton = Ext.widget('splitbutton', Ext.apply({
25
25
  ui: 'orange-button',
26
26
  text: 'Поиск',
27
27
  }, this.findButtonConfig || {}));
@@ -196,35 +196,39 @@ Ext.define('Coon.report.component.report.NorthPanel', {
196
196
  if (!menuItems.length) {
197
197
  return;
198
198
  }
199
- if (this.splitSearchButton) {
200
- menuItems.forEach((c) => {
201
- this.splitSearchButton.menu.insert(0,
202
- c.$className && c.isMenuItem ?
203
- c :
204
- Ext.create(Object.assign(c, {xtype: 'menuitem'}))
205
- );
206
- });
207
- } else {
208
- const btn = this.searchButton;
209
- if (btn) {
210
- this.splitSearchButton = Ext.create(
211
- Object.assign(
212
- {
213
- xtype: 'splitbutton',
214
- handler: btn.handler.bind(btn),
215
- menu: menuItems,
216
- },
217
- btn.initialConfig || {},
218
- {margin: btn.margin}
219
- )
220
- );
221
- btn.hide();
222
- btn.ownerCt.items.items.splice(
223
- btn.ownerCt.items.items.indexOf(btn),
224
- 0,
225
- this.splitSearchButton
226
- );
227
- }
228
- }
199
+ const btn = this.searchButton;
200
+ btn.setMenu(menuItems);
201
+ btn.setArrowVisible(true);
202
+ return;
203
+ // if (this.splitSearchButton) {
204
+ // menuItems.forEach((c) => {
205
+ // this.splitSearchButton.menu.insert(0,
206
+ // c.$className && c.isMenuItem ?
207
+ // c :
208
+ // Ext.create(Object.assign(c, {xtype: 'menuitem'}))
209
+ // );
210
+ // });
211
+ // } else {
212
+ // const btn = this.searchButton;
213
+ // if (btn) {
214
+ // this.splitSearchButton = Ext.create(
215
+ // Object.assign(
216
+ // {
217
+ // xtype: 'splitbutton',
218
+ // handler: btn.handler.bind(btn),
219
+ // menu: menuItems,
220
+ // },
221
+ // btn.initialConfig || {},
222
+ // {margin: btn.margin}
223
+ // )
224
+ // );
225
+ // btn.hide();
226
+ // btn.ownerCt.items.items.splice(
227
+ // btn.ownerCt.items.items.indexOf(btn),
228
+ // 0,
229
+ // this.splitSearchButton
230
+ // );
231
+ // }
232
+ // }
229
233
  },
230
234
  });
@@ -42,25 +42,6 @@ Ext.define('Coon.report.component.settings.ReportFieldPropertiesGrid', {
42
42
  );
43
43
  },
44
44
 
45
- load: function(list) {
46
- this.callParent(
47
- Ext.isArray(list) ? [
48
- list.map(function(r) {
49
- const ns = Coon.report.model.ReportFieldPropertyBeanFields;
50
- const type = r[ns.$type];
51
- const forWrap = type.indexOf('wp-') === 0;
52
- if (forWrap) {
53
- const copy = Ext.apply({}, r);
54
- copy[ns.$forWrap] = forWrap;
55
- copy[ns.$type] = type.substring(3);
56
- return copy;
57
- } else {
58
- return r;
59
- }
60
- })
61
- ] : []);
62
- },
63
-
64
45
  getData: function() {
65
46
  return this.processRecords(this.callParent());
66
47
  },
@@ -173,7 +173,7 @@ Ext.define('Coon.report.component.settings.plugin.PluginSelectWindow', {
173
173
 
174
174
  getData: function() {
175
175
  const plugins = Coon.report.ReportEntity.getNormalPlugins();
176
- return plugins.filter((plugin) => !plugin.isSingle || !this.exclude.has(plugin.value)).sort();
176
+ return plugins.filter((plugin) => (!plugin.isSingle || !this.exclude.has(plugin.value)) && !plugin.isDeprecated).sort();
177
177
  },
178
178
 
179
179
  selectButtonHandler: function(_, record, el, rowIndex, e) {
@@ -16,19 +16,6 @@ Ext.define('Coon.report.plugin.grid.ExecuteCommandAndSaveNotePlugin', {
16
16
  noteSaveTitle: 'Сообщение системы',
17
17
  noteSaveText: 'Создать запись в записной книжке?',
18
18
 
19
- executeCommand: function() {
20
- if (this.noteSave) {
21
- Ext.Msg.confirm(this.noteSaveTitle, this.noteSaveText, function(btn) {
22
- if (btn == 'yes') {
23
- this.saveNote(this.component.getContextManager().getContext());
24
- }
25
- this.callParent(arguments);
26
- }, this);
27
- } else {
28
- this.callParent(arguments);
29
- }
30
- },
31
-
32
19
  saveNote: function(context) {
33
20
  let noteId = '';
34
21
  if (this.notebookIdSource === 'field') {
@@ -14,26 +14,39 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
14
14
  },
15
15
 
16
16
  constructor(config) {
17
- config.invisibleByDefault = config.addToSearchButton === true;
17
+ // config.invisibleByDefault = config.addToSearchButton === true;
18
18
  this.callParent(arguments);
19
19
  },
20
20
 
21
+
21
22
  init(grid) {
22
23
  this.callParent([grid]);
23
24
  const format = this.config.exportFileFormat;
24
25
  this.buttonText = this.buttonText || (format && 'Экспорт в ' + format);
25
- grid.on('render', function() {
26
- this.report = grid.findParentByType('ReportPanel');
27
- if (this.getConfig('addToSearchButton') === true) {
28
- this.report.northPanel.addToSearchButtonMenu({
29
- text: this.buttonText,
30
- iconCls: this.buttonIconCls,
31
- handler: Ext.bind(this.handler, this),
32
- });
33
- }
34
- this.grid = grid;
35
- }, this);
36
- this.printPdfCommand = Ext.create('command.GetPdfReportDataCommand', {useRawFilterParams: this.getConfig('addToSearchButton')});
26
+ // grid.on(
27
+ // 'render',
28
+ // function() {
29
+ // this.report = grid.findParentByType('ReportPanel');
30
+ // if (this.getConfig('addToSearchButton') === true) {
31
+ // this.report.northPanel.addToSearchButtonMenu({
32
+ // text: this.buttonText,
33
+ // iconCls: this.buttonIconCls,
34
+ // handler: Ext.bind(this.handler, this),
35
+ // });
36
+ // }
37
+ // this.grid = grid;
38
+ // }, this,
39
+ // {single: true}
40
+ // );
41
+ this.getDataCommand = Ext.create(
42
+ `command.${
43
+ format === 'pdf' ?
44
+ 'GetPdfReportDataCommand' :
45
+ 'GetExcelFromRowsOrReportData'
46
+ }`,
47
+ {useRawFilterParams: this.getConfig('addToSearchButton') || true}
48
+ );
49
+ debugger;
37
50
  },
38
51
 
39
52
  handler: function() {
@@ -41,10 +54,8 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
41
54
  this.showPanel();
42
55
  } else {
43
56
  this.config.columns = this.config.columnList.map((record) => record.reportField);
44
- this.getRecordsToPrint();
45
- this.config.exportFileFormat === 'pdf' ?
46
- this.printPdfCommand.execute(this.report, this.config) :
47
- this.printExcelFile();
57
+ this.getSelections();
58
+ this.getDataCommand.execute(this.report, this.config);
48
59
  }
49
60
  },
50
61
 
@@ -110,10 +121,8 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
110
121
  title: 'Выводить колонки',
111
122
  });
112
123
  this.win.on('setColumns', function() {
113
- this.getRecordsToPrint();
114
- this.config.exportFileFormat === 'pdf' ?
115
- this.printPdfCommand.execute(this.report, this.config) :
116
- this.printExcelFile();
124
+ this.getSelections();
125
+ this.getDataCommand.execute(this.report, this.config);
117
126
  this.win.close();
118
127
  }, this);
119
128
  this.win.show();
@@ -124,60 +133,24 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
124
133
  },
125
134
 
126
135
  setColumns: function() {
127
- const checkedRecords = this.columnsGrid.getStore().queryRecords('checkbox', true);
128
- if (!checkedRecords.length) {
136
+ const selectedColumns = this.columnsGrid.getStore().queryRecords('checkbox', true);
137
+ if (!selectedColumns.length) {
129
138
  return;
130
139
  }
131
- this.config.columns = checkedRecords.map((record) => record.get('reportField'));
140
+ this.config.columns = selectedColumns.map((record) => record.get('reportField'));
132
141
  this.win.fireEvent('setColumns');
133
142
  },
134
143
 
135
- getSelectedRecords() {
136
- return this.grid.getSelectionModel().getSelection();
137
- },
138
-
139
- getRecordsToPrint: function() {
140
- this.config.toExcel = [];
141
- const selectedRecords = this.getSelectedRecords();
142
- const records = selectedRecords.length ? selectedRecords : this.grid.getStore().getRange();
143
-
144
- records.forEach((rec) => {
145
- const recData = rec.getData();
146
- delete recData['id'];
147
- this.config.toExcel.push(recData);
148
- });
149
- },
150
-
151
- printExcelFile: async function() {
152
- const fileName = this.config.reportFileName || this.report.reportId || 'defaultReportName';
153
- const currentParamList = this.report.currentParamList;
154
- const parameterList = [];
155
-
156
- for (const key in currentParamList) {
157
- if (currentParamList.hasOwnProperty(key) && !Ext.isEmpty(currentParamList[key])) {
158
- parameterList.push({type: key, value: currentParamList[key]});
144
+ getSelections: function() {
145
+ const rows = this.grid.getSelectionModel().getSelection();
146
+ if (rows.length > 0) {
147
+ this.config.toExcel = [];
148
+ for (const row of rows.length) {
149
+ const rowData = Object.assign({}, row.getData());
150
+ delete rowData['id'];
151
+ this.config.toExcel.push(rowData);
159
152
  }
160
153
  }
161
-
162
- const hasSelected = !!(this.getSelectedRecords() || []).length;
163
- const url = hasSelected && !this.getConfig('addToSearchButton') ?
164
- '/ReportFormData/getExcelFromRowsOrReport' :
165
- '/ReportFormData/getExcelReport';
166
-
167
- Ext.Ajax.request({
168
- url,
169
- method: 'POST',
170
- binary: true,
171
- params: {
172
- reportId: this.report.reportId,
173
- fileName: fileName,
174
- appendDateToFileName: Ext.isBoolean(this.config.appendDateToFileName) ? this.config.appendDateToFileName : true,
175
- parameterList: JSON.stringify(parameterList),
176
- columnList: JSON.stringify(this.config.columns),
177
- toExcel: JSON.stringify(this.config.toExcel),
178
- },
179
- success: (responce) => Coon.util.downloadFileFromBlob(new Blob([responce.responseBytes]), `${fileName}.xlsx`),
180
- });
181
154
  },
182
155
 
183
156
  });
@@ -6,10 +6,6 @@ Ext.define('Coon.report.plugin.grid.GridFiltersPlugin', {
6
6
  alias: 'plugin.GridFiltersPlugin',
7
7
  requires: [],
8
8
  uses: [],
9
- alternateClassName: [
10
- 'Sigma.components.plugins.ChangeableGridFiltersPlugin',
11
- 'Sigma.common.plugin.grid.GridFiltersPlugin'
12
- ],
13
9
  menuFilterText: 'Фильтр',
14
10
  editorConfig: undefined,
15
11
  configurePanelWizard: 'GridFiltersPluginConfigPanel',
@@ -27,17 +27,6 @@ Ext.define('Coon.report.plugin.grid.MenuPanel', {
27
27
  this.setText(this.label + ' ' + formattedValue);
28
28
  },
29
29
 
30
- getTemplateArgs: function() {
31
- const args = this.callParent();
32
- return Ext.apply(args, {
33
- labelCls: Ext.isString(this.labelCls) ? this.labelCls : '',
34
- valueCls: Ext.isString(this.valueCls) ? this.valueCls : '',
35
- label: this.label,
36
- value: this.value,
37
- labelWidth: this.labelWidth,
38
- });
39
- },
40
-
41
30
  getCopyData: function() {
42
31
  return this.value;
43
32
  },
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.5.37',
3
+ number: '2.5.39',
4
4
  });