ru.coon 2.5.37 → 2.5.38

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,10 @@
1
+ # Version 2.5.38, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cf1397fbbe07d11e5cdf281bdd82611040a1b31e)
2
+ * ## Features
3
+ * <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))
4
+
5
+ * rollback ExportReportDataToFilePlugin version ([abd98f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abd98fe930283d34326d00dad7d1f97ec08aabfd))
6
+ * update: CHANGELOG.md ([96c169], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/96c169bfcd80139251086e0b37e13589cd8267a8))
7
+
1
8
  # Version 2.5.37, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6d81ec7e9ac5bfbcbe04d3310a7e26088ac648fb)
2
9
  * ## Fixes
3
10
  * <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.38",
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
  }
@@ -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') {
@@ -17,7 +17,6 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
17
17
  config.invisibleByDefault = config.addToSearchButton === true;
18
18
  this.callParent(arguments);
19
19
  },
20
-
21
20
  init(grid) {
22
21
  this.callParent([grid]);
23
22
  const format = this.config.exportFileFormat;
@@ -33,7 +32,14 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
33
32
  }
34
33
  this.grid = grid;
35
34
  }, this);
36
- this.printPdfCommand = Ext.create('command.GetPdfReportDataCommand', {useRawFilterParams: this.getConfig('addToSearchButton')});
35
+ this.getDataCommand = Ext.create(
36
+ `command.${
37
+ format === 'pdf' ?
38
+ 'GetPdfReportDataCommand' :
39
+ 'GetExcelFromRowsOrReportData'
40
+ }`,
41
+ {useRawFilterParams: this.getConfig('addToSearchButton')}
42
+ );
37
43
  },
38
44
 
39
45
  handler: function() {
@@ -41,10 +47,8 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
41
47
  this.showPanel();
42
48
  } else {
43
49
  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();
50
+ this.getSelections();
51
+ this.getDataCommand.execute(this.report, this.config);
48
52
  }
49
53
  },
50
54
 
@@ -110,10 +114,8 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
110
114
  title: 'Выводить колонки',
111
115
  });
112
116
  this.win.on('setColumns', function() {
113
- this.getRecordsToPrint();
114
- this.config.exportFileFormat === 'pdf' ?
115
- this.printPdfCommand.execute(this.report, this.config) :
116
- this.printExcelFile();
117
+ this.getSelections();
118
+ this.getDataCommand.execute(this.report, this.config);
117
119
  this.win.close();
118
120
  }, this);
119
121
  this.win.show();
@@ -124,60 +126,24 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
124
126
  },
125
127
 
126
128
  setColumns: function() {
127
- const checkedRecords = this.columnsGrid.getStore().queryRecords('checkbox', true);
128
- if (!checkedRecords.length) {
129
+ const selectedColumns = this.columnsGrid.getStore().queryRecords('checkbox', true);
130
+ if (!selectedColumns.length) {
129
131
  return;
130
132
  }
131
- this.config.columns = checkedRecords.map((record) => record.get('reportField'));
133
+ this.config.columns = selectedColumns.map((record) => record.get('reportField'));
132
134
  this.win.fireEvent('setColumns');
133
135
  },
134
136
 
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]});
137
+ getSelections: function() {
138
+ const rows = this.grid.getSelectionModel().getSelection();
139
+ if (rows.length > 0) {
140
+ this.config.toExcel = [];
141
+ for (let i = 0; i < rows.length; i++) {
142
+ const rowData = rows[i].getData();
143
+ delete rowData['id'];
144
+ this.config.toExcel.push(rowData);
159
145
  }
160
146
  }
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
147
  },
182
148
 
183
149
  });
@@ -0,0 +1,7 @@
1
+ **спецификация:**
2
+
3
+ входные параметры:
4
+
5
+ - exportFileFormat [xls/pdf]
6
+ - allowUserSelectColumnsToUpload
7
+ - addToSearchButton добавить в кнопку "поиск", в этом случае в качестве параметра отправляем текущие параметры из FilterPanel(useRawFilterParams: true)
@@ -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.38',
4
4
  });