ru.coon 2.5.47 → 2.5.49

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.5.49, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/322a8954fd81ce96ca3e60a23d7b46b4659f839b)
2
+ * ## Fixes
3
+ * <span style='color:red'>fix Coon.util.promisifyCmd
4
+ fix ReportPanel.loadData - abort previous request</span> ([03cfbd], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/03cfbdf8eabc0a6fde879fa2ce52bd5126a823ee))
5
+
6
+ * update: CHANGELOG.md ([d298b4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d298b44d4f63889dc665577ca11e622bfb176422))
7
+
8
+ # Version 2.5.48, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ab1fb66dd225271b18992c928a288a9d5115ff7b)
9
+ * ## Fixes
10
+ * <span style='color:red'>fix SimpleReportTag styles</span> ([1b1713], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1b1713313b25b5724e465c418daf5b1db3b803da))
11
+
12
+ * add decimal-light - arbitrary-precision Decimal type for JavaScript
13
+ fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/09a4ad9879f025371db56475252ec93eeb52b265))
14
+ * HT-7447 feat: возможность создавать свойства команды с описанием ([cc129c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cc129c3265992db5f859f9e32fdc95cd8a3ad88f))
15
+ * HT-7594 При добавлении УУТЭ иногда значения характеристик с датами не отображаются ([2348bf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2348bf78876bcb5c0e81d37b36f89d5a85a7d9d4))
16
+ * update: CHANGELOG.md ([b7579a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b7579a137a55be1d35602720fa3aef2909b7b635))
17
+
1
18
  # Version 2.5.47, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a3061f6bf3784b7dde9188ca397ea6534832223c)
2
19
  * ## Fixes
3
20
  * <span style='color:red'>fix promisifyCmd
package/index.js CHANGED
@@ -7,6 +7,7 @@ import xAceJson from 'ace-builds/src-noconflict/mode-json5';
7
7
  import xAceLangTool from 'ace-builds/src-noconflict/ext-language_tools';
8
8
  import xAceSnippets from 'ace-builds/src-noconflict/snippets/snippets';
9
9
  import JSON5 from 'json5';
10
+ import Decimal from 'decimal.js-light';
10
11
  import {format as formatSQL} from 'sql-formatter';
11
12
  import 'extjs_iconpack';
12
13
  import 'ace-diff/dist/ace-diff.min.css';
@@ -24,7 +25,7 @@ import 'ace-builds/src-noconflict/snippets/pgsql';
24
25
 
25
26
  xAceEditor.config.set('basePath', '/node_modules/ace-builds/src-noconflict/');
26
27
 
27
- Object.assign(window, {JSON5, ace: xAceEditor});
28
+ Object.assign(window, {JSON5, ace: xAceEditor, Decimal});
28
29
 
29
30
  Object.assign(Ext || {}, {
30
31
  xEchartsJs,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.5.47",
7
+ "version": "2.5.49",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -25,6 +25,7 @@
25
25
  "dependencies": {
26
26
  "ace-builds": "1.4.12",
27
27
  "ace-diff": "^3.0.3",
28
+ "decimal.js-light": "^2.5.1",
28
29
  "echarts": "^5.3.3",
29
30
  "extjs_iconpack": "1.3.15",
30
31
  "json5": "2.2.3",
@@ -18,12 +18,41 @@ Ext.define('Coon.command.ASyncBaseCommand', {
18
18
  makeLoadEventConfig: {
19
19
  buffer: 100,
20
20
  },
21
+ /**
22
+ * Функция, возвращающая список свойств команды.
23
+ * Свойства команды загружаются в редакторе отчетов в плагине для удобства конфигурирования команды.
24
+ * В случае, если в конфиге команды свойства будут отсутствовать, в конструкторе они будут добавлены со значениями по умолчанию.
25
+ * @example
26
+ * commandProperties: function() {
27
+ * return [
28
+ * {
29
+ * name: 'processIDAsCode', // имя свойства команды
30
+ * description: 'Параметр ...', // описание, которое отобразится в редакторе отчетов и будет полезно конфигуратору
31
+ * defaultValue: undefined, // значение по умолчанию для свойства команды
32
+ * },
33
+ * ]
34
+ * }
35
+ */
36
+ commandProperties: undefined,
21
37
 
22
38
  constructor: function(config) {
23
39
  this.isActive = false;
24
40
  this.requestCount = 0;
25
41
  this.executedRequestCount = 0;
26
42
  this.callParent([config]);
43
+
44
+ if (typeof this.commandProperties === 'function') {
45
+ Ext.applyIf(
46
+ config,
47
+ Object.fromEntries(
48
+ this.commandProperties().map(
49
+ (el) => [el.name, el.defaultValue]
50
+ )
51
+ )
52
+ );
53
+ }
54
+ Ext.apply(this, config);
55
+
27
56
  this.on('makeLoad', async function(params, jsonData, requestCount) {
28
57
  try {
29
58
  const isEnabled = this.requiredAuth && await Coon.common.component.Auth.isEnabled();
@@ -261,10 +261,10 @@ Ext.define('Coon.common.component.editor.DateTypeEditor', {
261
261
  const ns = Coon.report.model.CharacteristicBeanFields;
262
262
  this.mask = this.parseMask(record.get(ns.$mask));
263
263
  if (this.mask['valueFormat']) {
264
- this.record.set(ns.$value,
264
+ record.set(ns.$value,
265
265
  Ext.util.Format.dateRenderer(this.mask['valueFormat'])(value));
266
266
  }
267
- this.record.set(ns.$valueDescription,
267
+ record.set(ns.$valueDescription,
268
268
  Ext.util.Format.dateRenderer(this.mask['displayFormat'] || 'd.m.Y')(value));
269
269
  },
270
270
 
package/src/format.js CHANGED
@@ -118,8 +118,9 @@ Ext.define('Coon.format', {
118
118
  stringValue.length : (stringValue.indexOf('.') + 1));
119
119
  },
120
120
 
121
- MoneyFormat: function(v) {
122
- return this.bigNumFormat(v, '.', ' ', 2);
121
+ MoneyFormat: function(v, decSeparator, groupSeparator) {
122
+ const result = this.bigNumFormat(v, decSeparator || '.', groupSeparator || ' ', 2);
123
+ return Number.parseFloat(result) === 0 ? result.replace('-', '') : result;
123
124
  },
124
125
 
125
126
  comboRenderer: function(combo, customStyle) {
@@ -896,10 +896,11 @@ Ext.define('Coon.report.component.ReportPanel', {
896
896
  }
897
897
  }
898
898
  }
899
+ const store = this.grid.getStore();
900
+ store.getProxy().abort();
899
901
  const command = typeof this.getStoreDataCommand === 'function' && this.getStoreDataCommand({});
900
902
  if (command) {
901
903
  command.on('complete', function(response) {
902
- const store = this.grid.getStore();
903
904
  if (!store.lastOptions) {
904
905
  store.lastOptions = {};
905
906
  }
@@ -917,8 +918,8 @@ Ext.define('Coon.report.component.ReportPanel', {
917
918
  invalidateCache,
918
919
  });
919
920
  } else {
920
- if (this.grid.getStore() != null) {
921
- this.grid.getStore().load({
921
+ if (store != null) {
922
+ store.load({
922
923
  params: {
923
924
  parameterList: Ext.encode(parameterList),
924
925
  reportId: this.reportId,
@@ -5,7 +5,7 @@
5
5
  overflow-x: hidden;
6
6
  }
7
7
  .x-tagfield-item{
8
- margin: 0 6px 6px 0;
8
+ margin: 4px 6px 2px 0;
9
9
  &.mark-to-remove{
10
10
  background-color: #ef5350;
11
11
  }
@@ -15,4 +15,8 @@
15
15
  padding-bottom: 3px;
16
16
  }
17
17
  }
18
+
19
+ .x-placeholder-label {
20
+ display: none;
21
+ }
18
22
  }
@@ -0,0 +1,7 @@
1
+ **спецификация:**
2
+
3
+ входные параметры:
4
+
5
+ - exportFileFormat [xls/pdf]
6
+ - allowUserSelectColumnsToUpload
7
+ - addToSearchButton добавить в кнопку "поиск", в этом случае в качестве параметра отправляем текущие параметры из FilterPanel(useRawFilterParams: true)
package/src/util.js CHANGED
@@ -37,10 +37,10 @@ Ext.define('Coon.util', {
37
37
  if (Ext.isObject(cmd) && (this.isCommandAlias(cmd.command) || this.isCommandClass(cmd.command))) {
38
38
  args = cmd.params;
39
39
  cmd.getParamsFromObject = true;
40
- return Ext.create(cmd.command, {process: typeof cmd.process === 'boolean' ? cmd.process : true});
40
+ return Ext.create(cmd.command, {processError: typeof cmd.processError === 'boolean' ? cmd.processError : true});
41
41
  }
42
42
  if (this.isCommandAlias(cmd) || this.isCommandClass(cmd)) {
43
- return Ext.create(cmd, {process: true});
43
+ return Ext.create(cmd, {processError: true});
44
44
  }
45
45
  throw new Error(`promisifyCmd error: this command is neither an alias nor a class`);
46
46
  };
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.5.47',
3
+ number: '2.5.49',
4
4
  });