ru.coon 2.7.40 → 2.7.41

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.7.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/272f9a2bc799a85971259fa4725466066e367b6e)
2
+ * ## Fixes
3
+ * <span style='color:red'> HT-9216 Исправлена конфигурация плагина.</span> ([94b8b8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/94b8b873bd5a4e07a17c2307564f80375b7b73ba))
4
+
5
+ * GridEditorsPlugin bugfix ([f3173d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f3173da424eb34ed09084823808e132371fd3e4b))
6
+ * update: CHANGELOG.md ([b2b71f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b2b71f45159d707002c487a58f55c0f804440838))
7
+
1
8
  # Version 2.7.40, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e0a01b717b9f88b71673e0189ceb38398062429)
2
9
  * revert formatting ([c7f075], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c7f0750da50341cfc0944199d7133c61713f8d6f))
3
10
  * update: CHANGELOG.md ([7344ec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7344ec3d1b25c19993dff603d06ab907a4ade06e))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.40",
7
+ "version": "2.7.41",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -179,20 +179,23 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
179
179
  {
180
180
  xtype: 'container',
181
181
  html: `
182
- <div style="font-size:12px;color: gray">
182
+ <ul style="font-size:12px;color: gray">
183
+ <li>Имя файла может отсутствовать. В этом случае будет использован заголовок отчета.</li>
183
184
  <li>Имя файла может быть шаблоном
184
185
  <a style="color:var(--base-color);" href="https://docs.sencha.com/extjs/7.5.0/classic/Ext.XTemplate.html" target="_blank">
185
186
  Ext.XTemplate
186
187
  </a>
187
188
  </li>
188
189
  <li>
189
- Для указания параметра введите <b>{parameters.[Название параметра]}</b>
190
+ Для указания параметра введите <b>{parameters.Название_параметра}</b>
190
191
  </li>
191
192
  Пример:<br>
192
193
  <li>
193
- Строка "Строка 'Файл {parameters.ADDRESS}' будет преобразована в "Файл_г_Санкт-Петербург_Невский_проспект".
194
+ Если имя файла будет задано так: "'Файл {parameters.ADDRESS}' то будет преобразовано в
195
+ "Файл г.Санкт-Петербург Невский проспект".
194
196
  </li>
195
- </div>
197
+ <li>Если имя файла получится более 128 символов, то оно будет усечено.</li>
198
+ </ul>
196
199
  `,
197
200
  },
198
201
  {
@@ -209,8 +212,7 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
209
212
  {
210
213
  xtype: 'container',
211
214
  html: `
212
- <div style="font-size:12px;color: gray">
213
- <ul>Логика работы:
215
+ <ul style="font-size:12px;color: gray">
214
216
  <li>
215
217
  Формат даты по умолчанию: Y-m-d_h-i
216
218
  </li>
@@ -220,15 +222,20 @@ Ext.define('Coon.report.plugin.configPanel.CopyRowsFromGridConfigPanel', {
220
222
  Формат даты
221
223
  </a>
222
224
  </li>
223
- </ul>
224
- </div>
225
+ </ul>
225
226
  `,
226
227
  },
227
228
  {
228
- xtype: 'textfield',
229
+ xtype: 'ConstantList',
229
230
  fieldLabel: 'Символ, для замены недопустимых символов',
230
231
  name: 'forbiddenSymbolReplacer',
231
- value: '_',
232
+ value: 'underscore',
233
+ data: [
234
+ ['underscore', 'Нижнее подчеркивание "_"'],
235
+ ['space', 'Пробел " "'],
236
+ ['hyphen', 'Дефис "-"'],
237
+ ['cut', 'Вырезать']
238
+ ],
232
239
  }
233
240
  ],
234
241
  };
@@ -27,7 +27,7 @@ Ext.define('Coon.report.plugin.grid.CopyRowsFromGrid', {
27
27
  return '___CRFG';
28
28
  },
29
29
  defaultDateFormat: 'Y-m-d_h-i',
30
- forbiddenSymbolReplacer: '_',
30
+ forbiddenSymbolReplacer: 'underscore',
31
31
 
32
32
  injectForm() {
33
33
  // if element already exist
@@ -437,6 +437,15 @@ Ext.define('Coon.report.plugin.grid.CopyRowsFromGrid', {
437
437
  },
438
438
 
439
439
  normalizeFileName: function(fileName) {
440
+ const forbiddenSymbolMap = {
441
+ underscore: '_',
442
+ space: ' ',
443
+ hyphen: '-',
444
+ cut: '',
445
+ };
446
+
447
+ fileName = fileName.trim();
448
+ fileName = fileName.replace(/ {1,}/g, ' '); // убираем множественные пробелы
440
449
  const regexs = [
441
450
  {rg: /s|:|\\*|"|\\?|>|<|\||\\|\//g, isGlobal: true}, // запрещенные символы \ / : * ? " < > |
442
451
  {rg: /nul|prn|con|lpt[0-9]|com[0-9]/}, // запрещенные имена файлов
@@ -444,9 +453,9 @@ Ext.define('Coon.report.plugin.grid.CopyRowsFromGrid', {
444
453
  ];
445
454
  regexs.forEach((_regex) => {
446
455
  if (_regex.isGlobal) {
447
- fileName.replaceAll(_regex.rg, this.forbiddenSymbolReplacer);
456
+ fileName.replaceAll(_regex.rg, forbiddenSymbolMap[this.forbiddenSymbolReplacer]);
448
457
  } else {
449
- fileName.replace(_regex.rg, this.forbiddenSymbolReplacer);
458
+ fileName.replace(_regex.rg, forbiddenSymbolMap[this.forbiddenSymbolReplacer]);
450
459
  }
451
460
  });
452
461
  if (fileName.length>128) {
@@ -60,7 +60,7 @@ Ext.define('Coon.report.plugin.grid.GridEditorsPlugin', {
60
60
  metaData.tdCls = editable ? 'editable-cell' : 'hover-cell';
61
61
  }
62
62
  }
63
- record.allowEditWithEditorPlugin = {};
63
+ record.allowEditWithEditorPlugin = record.allowEditWithEditorPlugin || {};
64
64
  record.allowEditWithEditorPlugin[editorConfig.type] = editable;
65
65
  if (typeof customStyle === 'string') {
66
66
  metaData.tdStyle = customStyle;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.40',
3
+ number: '2.7.41',
4
4
  });