ru.coon 2.7.1 → 2.7.3

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +1 -1
  3. package/src/command/ASyncBaseCommand.js +4 -0
  4. package/src/common/component/editor/CharacteristicLoaderPlugin.js +12 -2
  5. package/src/common/field/combo/CommandComboBox.js +20 -0
  6. package/src/report/component/settings/ReportPropertiesGrid.js +22 -0
  7. package/src/report/component/settings/ReportPropertiesGridController.js +60 -1
  8. package/src/report/component/settings/context/ReportFormContextParametersGrid.js +73 -88
  9. package/src/report/plugin/configPanel/ExecuteCommandButtonPluginConfigPanel.js +92 -59
  10. package/src/report/plugin/grid/ExecuteCommandButtonPlugin.js +23 -8
  11. package/src/report/plugin/grid/ReportColumnStatePlugin.js +10 -7
  12. package/src/uielement/component/UiCustomController.js +6 -15
  13. package/src/uielement/component/settings/UiAceEditor.js +1 -1
  14. package/src/uielement/component/settings/UiAceEditorPanel.js +6 -1
  15. package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanel.scss +19 -0
  16. package/src/uielement/plugin/ExecuteCommandPlugin.js +5 -3
  17. package/src/uielement/plugin/configPanel/executeCommand/DataMappingPanel.js +215 -0
  18. package/src/uielement/plugin/configPanel/executeCommand/ExecuteCommandPluginConfigPanelFormEditor.js +625 -0
  19. package/src/uielement/plugin/configPanel/executeCommand/ExecuteCommandPluginConfigPanelFormEditor.scss +22 -0
  20. package/src/util.js +4 -3
  21. package/src/version.js +1 -1
  22. package/src/uielement/plugin/configPanel/ExecuteCommandPluginConfigPanelFormEditor.js +0 -332
package/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
+ # Version 2.7.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e9a311b868bd00ad5e46a868e7f0b829122ffa06)
2
+ * refactoring ([1385c2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1385c2bf065c0e57f6d8484cf360a1201cdbb656))
3
+ * update: CHANGELOG.md ([10bd16], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/10bd16df0b8d6d43c2a41f2651b8610c35dcd899))
4
+
5
+ # Version 2.7.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3b94df2c23f76552c5c626a4bfda4a317e33abff)
6
+ * ## Features
7
+ * <span style='color:green'>feat: HT-8199: trim string values in request</span> ([cfc709], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cfc709daacaad1522f4dff858e04966a758bcb6a))
8
+
9
+ * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/common/component/editor/CharacteristicLoaderPlugin.js929fc3b32d028554706e1d64c6ca40fedc615f39))
10
+ * update: CHANGELOG.md ([44e78b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44e78b830a9a374db90e2fc1554188c9154ce462))
11
+
1
12
  # Version 2.7.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9028ecb552a8341a78e6a7e0d2f9eee91554c2d0)
13
+ * ## Fixes
14
+ * <span style='color:red'>fix</span> ([abf529], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abf5294343d6597b0e45303be0bb85c77db8bb65))
15
+
2
16
  * upd ([901f4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/901f4c345d1025ef8861b1b649d84590c6a6a7ec))
3
17
  * update: CHANGELOG.md ([1a5ea6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1a5ea663b234831a73ec046c23b951b71797481a))
4
18
 
@@ -161,6 +175,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
161
175
  * <span style='color:red'> HT-8036: remove override view config</span> ([f13055], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1305573f3761f2657e995310a79a7d75887c091))
162
176
 
163
177
  * update extjs_iconpack to 1.3.19 ([adff9d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/adff9d7411fad6a04e153065c9c472b080d7e719))
178
+ * HT-7448 рефакторинг по замечаниям. ([786627], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/786627361a1236661118c9ec6d5ae7fdd89bcfe4))
179
+ * HT-7448 удаление неиспользуемых компонентов ([3e25a3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3e25a33e765403cb1eda1d16f80fce2c4b1e4cb0))
180
+ * HT-7448 переделка layout панели конфигурировая плагина ExecuteCommandButtonPluginConfigPanel ([b922d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b922d4d984db425fea0ac2c660ecb7b4ddc97e51))
164
181
  * update: CHANGELOG.md ([f82d7f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f82d7f36520836cc6733ac936ef98bf0589b15d2))
165
182
 
166
183
  # Version 2.6.5, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5695d2c215ad6469aacd802ca46a536c81845c35)
@@ -191,6 +208,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
191
208
  * <span style='color:green'>feat: Добавлено редактирование значений по умолчанию для плагинов. Closes TR-67200.</span> ([cd9502], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cd950235c2b0180f2b73fb87dc3b05a4f5b397ae))
192
209
 
193
210
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/report/component/settings/plugin/ReportFormPluginPanelController.jsb52d37cb6c33e6a74d2f3d7cae1654f93b60a2e1))
211
+ * HT-7448 по умолчанию скрыта кнопка загрузки свойств команды в grid ([5328e2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5328e27d49b2092fe75b5fbe5c8a7dea231402a7))
212
+ * HT-7448 исправление найденной после мержа ошибки. ([e76d4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e76d4c3ada4813a01c2b10167a92f4cc808940d6))
213
+ * HT-7448 исправление замечаний ([862d72], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/862d7293a4fb82c872b2d11b17cfbf47550756fc))
194
214
  * update: CHANGELOG.md ([bb6944], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb6944320af0388b296ad97429195c6188908738))
195
215
 
196
216
  # Version 2.6.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2b7d5d8cd09bf94320d149f9cf3aa78ef27594a8)
@@ -219,6 +239,9 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
219
239
  * Revert "feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200."
220
240
 
221
241
  This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/312854f7d59d711c9921f394c6849d398e529e10))
242
+ * HT-7448 Рефакторинг ExecuteCommandPluginConfigPanelFormEditor ([74a393], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/74a393cb2781622d4eafc981e153bd4a5edf7cdf))
243
+ * HT-7448 Рефакторинг ExecuteCommandPluginConfigPanelFormEditor ([18090f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/18090f5c72e1595cb54e6ae7cf9e9645b9fec0e6))
244
+ * HT-7448 Исправлена ошибка, возникающая в AceEditor в окне редактирования свойств команды. ([5b3f57], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5b3f57d189f98ccf55f169c3ad29db778b27570c))
222
245
  * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([ff9d88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ff9d88c6e8f12d59ea7fd4f8be344696670d13af))
223
246
  * update: CHANGELOG.md ([fed09b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fed09bab2391b2ef0adde36107c4c8e9f8e9ad32))
224
247
 
@@ -235,6 +258,7 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
235
258
  * ## Features
236
259
  * <span style='color:green'>feat: HT-7281 GridEditorPlugin editor dependField</span> ([975be6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/975be69118652f7995b2bfd40e5a174deaa47c68))
237
260
 
261
+ * HT-7448 Рефакторинг внешнего вида ExecuteCommandPluginConfigPanelFormEditor. Компонент для упрощения мапинга. ([3c3380], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3c33806c30b08c23a2b161543c3e11be94477902))
238
262
  * update: CHANGELOG.md ([d8027e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8027e3fe08b900d1cb6da3bfe688684b5764008))
239
263
 
240
264
  # Version 2.5.66, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4e253ae2e8836166212d3886d091d342673deaee)
@@ -262,7 +286,10 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
262
286
 
263
287
  * remove unnecessary filterItemsOnRow property ([772f61], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/772f6190df8b958bd6ff97e5731a59971c9a11fc))
264
288
  * HT-7885 ([601a41], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/601a4199efef15290c161766431908ab8993862b))
289
+ * HT-7448 Исправление вызова completeHandler и errorHandler в работе плагина репорта ExecuteCommandButtonPlugin ([ea4774], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ea477445f344d94c59b1116738b464ba49e79c57))
265
290
  * Update getDataFromForm function ([d79274], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d79274267b970ea0b4a31f1724d3dfc54d82d9d5))
291
+ * HT-7448 Проверка результатов выполнения команды перед переносом данных во viewModel при работе ExecuteCommandPlugin ([c74d65], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c74d656fc1fb764b5dc24d5e96f1cf9b9f8ee27c))
292
+ * HT-7448 исправление работы completeHandler и responseHandler в ExecuteCommandButtonPlugin ([23ee69], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/23ee69a6d1bb084cff6402e0cc4cc36c2a6c3c51))
266
293
  * HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([507490], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5074900afb170d9f11aa10de6549e05cef12f7cb))
267
294
  * Combine query in one row ([6fbb49], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6fbb496601a46bef0506b56d34d179d3d10148ca))
268
295
  * update: CHANGELOG.md ([2ec18c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2ec18ccddcb1d571ef6a1d00b9cde439355c8304))
@@ -412,6 +439,7 @@ fix ReportPanel.loadData - abort previous request</span> ([03cfbd], [link](http:
412
439
  * add decimal-light - arbitrary-precision Decimal type for JavaScript
413
440
  fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/09a4ad9879f025371db56475252ec93eeb52b265))
414
441
  * перенос чекбокса и работа с value ([c56525], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c5652553cca0934ec1549f6e0762f481161b2998))
442
+ * HT-7448 Исправления по замечаниям код ревью ([8fbd95], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8fbd95f08c83c36817363401641fe4ae333ec02f))
415
443
  * исправление ошибок ([44fc10], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44fc1038ab848989c56bf51ad56933f5fe2f2535))
416
444
  * исправление ошибок ([fcc83e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fcc83e4aa4d85b241723c2fd1d317bafe5b44689))
417
445
  * доработка ([dbc2bf], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dbc2bf69be0d31423c93275b01e320703823dbb2))
@@ -425,6 +453,7 @@ fix Coon.format.MoneyFormat, zero always format as positive value ([09a4ad], [li
425
453
  * <span style='color:red'>fix promisifyCmd
426
454
  fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler</span> ([f8c65b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f8c65b552adfb698809815fc5f2d80f3f5fdb5ee))
427
455
 
456
+ * HT-7447 Рефакторинг CommandComboBox (компонента выбора команад). Рефакторинг настроек плагина ExecuteCommandPlugin ([636f06], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/636f06e2885d7830e2e48c8f95acf902407a8820))
428
457
  * update: CHANGELOG.md ([4d5a2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4d5a2ac3120c4aba6a672256fc7cc977014f3591))
429
458
 
430
459
  # Version 2.5.46, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a60918e34030d42d694153e8a86fa2c13c97e3a0)
@@ -444,6 +473,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
444
473
 
445
474
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/util.js5a11846bc2f75dd40b3c0f2239047d95f1a9371c))
446
475
  * BFL-9850 Ошибка при сохранении пункта меню ([270e31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/270e3170b5a70b306591730dce53023dcebf6f34))
476
+ * HT-7448 доработка панели конфигурирования плагина ExecuteCommandButtonPluginConfigPanel ([69c652], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/69c652c2e69719a7ef5964a274c3be30c2980b85))
447
477
  * update: CHANGELOG.md ([8b0186], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b0186d787ec77ad2a4dfc211e85c8ffadee6559))
448
478
 
449
479
  # Version 2.5.44, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c4d4a663ae3451dec321c0d68bf1d5c8d70ff58)
@@ -454,6 +484,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
454
484
  * <span style='color:red'> HT-7469: commit store state on doInit action. This method remove all modified records from store state</span> ([34c025], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34c02583013b66314a74c2fbc9512f04f218d85e))
455
485
 
456
486
  * hotfix Coon.Function.executeComponentDoInit ([c9e04c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c9e04c22329f1d7822b91a47eca899c6f6e7f95e))
487
+ * HT-7448 Исправление работы кнопки "копировать" ([9ad7a8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9ad7a853bc8753f768e401f068f2a72c9cd205ae))
457
488
  * update: CHANGELOG.md ([f47bce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f47bce91314446c8f88961ba976fc132e11318d0))
458
489
 
459
490
  # Version 2.5.43, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bc0bf6f30c6fa63c8af9ccfaa0ee75431bda6029)
@@ -465,6 +496,7 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
465
496
  * BFL-8607 Доработка редактора характеристики типа "Дата" ([20c221], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/20c2210c3c15817168bf0a3465a219fe49f7d2fe))
466
497
  * BFL-8607 Доработка редактора характеристики типа "Дата" ([0c7529], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c752984e1e82cdf68d9aa25413375319adfe30e))
467
498
  * Merge with develop ([2f0b72], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2f0b7296a4764645e248dfe2f2e4d5399f695dc4))
499
+ * HT-7448 рефакторинг грида конфигурирования параметров команды ([9f9005], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9f900557a6ce4364c47ae9c7c0881e00afedc071))
468
500
  * update: CHANGELOG.md ([892608], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/892608eb6ddd2ef85d205ba9e1e857aa27672320))
469
501
 
470
502
  # Version 2.5.42, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a6256f14a891eda0974a2af1ee2c108c8904feab)
@@ -481,12 +513,17 @@ fix ExecuteCommandPlugin - remove reject on failure if command hasnt erorHandler
481
513
  # Version 2.5.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/612fb7573419ad9857649f7211c8d7a56e52cdb4)
482
514
  * ## Features
483
515
  * <span style='color:green'>feat: Перенесен ShowReportEditorCreator из ISWE. Closes BFL-9446.</span> ([1d7ee3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1d7ee326527f9d14d332bb115bd68a15a7e9c22e))
516
+ * <span style='color:green'>feat: HT-7448 пример рефакторинга</span> ([44f741], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44f7414c76e59454b0635c9b7f4982003adad8d0))
484
517
  * <span style='color:green'>feat: BFL-9521: init dependent form params anytime</span> ([2e5aa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2e5aa16eeace7205cff9e01295f43d0f4ce956c6))
485
518
 
486
519
  * ## Fixes
520
+ * <span style='color:red'>fix ExecuteCommandButtonPlugin</span> ([a5308e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5308eb7b674a12e0b4d8665d2c9a939c7d33b80))
487
521
  * <span style='color:red'> BFL-9515 исправления по проверке безопасности фронтенда в части взаимодействия с iswe в iframe</span> ([f34b8f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f34b8fdf31285fd53f932dfe277e961ffa275fd0))
488
522
  * <span style='color:red'> postMessage origin fix. Closes BFL-9515.</span> ([21ab56], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/21ab56a1998efe4b6cd4e4d35337c8fbc5b47729))
489
523
 
524
+ * HT-7448 перенос complete handler и error handler в табпанель ([833aab], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/833aab66900669e885cea97fd7fd614d83d10303))
525
+ * ([В пике], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/В пикер списка команд добавлен тултип в виде описания из класса команды.a90290c3aa288a6201af96a155874f8b4c51459c))
526
+ * ([В getA], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/В getAllCommandsList добавлено описание из класса команды.44653fabe5289074830acffedfd6494c463a9193))
490
527
  * ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/uielement/component/settings/UiCustomPanelEditorController.js9987a0e79de3a1fa5fa93216f0ffd4bdb50c59fc))
491
528
  * update: CHANGELOG.md ([958f76], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/958f76b4fca9844ca6bae88260580ff2340843e5))
492
529
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.1",
7
+ "version": "2.7.3",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -192,4 +192,8 @@ Ext.define('Coon.command.ASyncBaseCommand', {
192
192
  getLastParams: function() {
193
193
  return this.lastParams;
194
194
  },
195
+
196
+ commandProperties: function() {
197
+ return [];
198
+ },
195
199
  });
@@ -84,7 +84,17 @@ Ext.define('Coon.common.component.editor.CharacteristicLoaderPlugin', {
84
84
  clearCache: function() {
85
85
  this.cache = {};
86
86
  },
87
-
87
+ prepareData(data) {
88
+ if (!Ext.isArray(data)) {
89
+ return data;
90
+ }
91
+ return data.map((el) => {
92
+ if (typeof el.value === 'string') {
93
+ el.value = el.value.trim()
94
+ }
95
+ return el
96
+ })
97
+ },
88
98
  load: function() {
89
99
  if (this.caching) {
90
100
  const key = this.getCacheKey();
@@ -109,7 +119,7 @@ Ext.define('Coon.common.component.editor.CharacteristicLoaderPlugin', {
109
119
  }
110
120
 
111
121
  this.clear();
112
- this.loadFromData(answer['characteristics'], answer['characteristicTypes'], answer['isEffective']);
122
+ this.loadFromData(this.prepareData(answer['characteristics']), answer['characteristicTypes'], answer['isEffective']);
113
123
  this.model.subentityId = answer.subentityId || null;
114
124
  }.bind(this),
115
125
  params: this.model,
@@ -14,4 +14,24 @@ Ext.define('Coon.common.field.combo.CommandComboBox', {
14
14
  const isValid = !!this.getStore().findRecord('description', value);
15
15
  return isValid || `команда ${value} не найдена!`;
16
16
  },
17
+ listConfig: {
18
+ itemTpl: [
19
+ '<div data-qtip="{ruDescription}"><b>{xtype}</b> : <i style="opacity:.8;font-size: 1rem;">{description}</i> </div>'
20
+ ],
21
+ },
22
+ /**
23
+ * Получение свойств выбранной команды
24
+ * @returns {*|*[]}
25
+ */
26
+ getProperties: function() {
27
+ const commandName = this.getValue();
28
+ let properties = [];
29
+ if (commandName) {
30
+ const fullSource = Ext.ClassManager.aliasToName['command.' + commandName];
31
+ properties = fullSource && Ext.ClassManager.classes[fullSource].prototype.commandProperties &&
32
+ Ext.ClassManager.classes[fullSource].prototype.commandProperties();
33
+ }
34
+
35
+ return properties || [];
36
+ },
17
37
  });
@@ -48,6 +48,20 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
48
48
  handler: 'deleteHandler',
49
49
  reference: 'deleteButton',
50
50
  disabled: true,
51
+ },
52
+ {
53
+ text: 'Загрузить свойства',
54
+ ui: 'blue-text-button-border',
55
+ handler: 'loadPropertiesHandler',
56
+ reference: 'loadPropertiesButton',
57
+ hidden: true,
58
+ },
59
+ {
60
+ text: '{}',
61
+ tooltip: 'Открыть в редакторе',
62
+ ui: 'blue-text-button-border',
63
+ handler: 'openInEditor',
64
+ reference: 'editorButton',
51
65
  }
52
66
  ],
53
67
  }],
@@ -83,6 +97,11 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
83
97
  flex: 1,
84
98
  editor: 'textfield',
85
99
  },
100
+ {
101
+ text: 'Описание',
102
+ dataIndex: 'description',
103
+ flex: 2,
104
+ },
86
105
  {
87
106
  xtype: 'actioncolumn',
88
107
  width: 50,
@@ -120,4 +139,7 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
120
139
  },
121
140
  }
122
141
  ],
142
+ listeners: {
143
+ boxready: 'onGridReady',
144
+ },
123
145
  });
@@ -13,6 +13,11 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
13
13
  view.updateProperties = this.updateProperties.bind(this);
14
14
  },
15
15
 
16
+ onGridReady: function() {
17
+ const loadPropertiesSource = this.getView().loadPropertiesSource;
18
+ this.lookup('loadPropertiesButton').setHidden(!loadPropertiesSource);
19
+ },
20
+
16
21
  onSelectionChange: function(view, selection) {
17
22
  const deleteButton = this.lookup('deleteButton');
18
23
  deleteButton.setDisabled(Ext.isEmpty(selection));
@@ -66,11 +71,15 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
66
71
  * @param {Object[]} data
67
72
  */
68
73
  setData: function(data) {
74
+ if (this.getView().loadParametersSource) {
75
+ this.lastSource = this.getView().loadParametersSource.field.getValue();
76
+ }
69
77
  const store = this.getView().getStore();
70
78
  if (Ext.isFunction(store.loadData)) {
71
79
  store.reload();
72
80
  if (Ext.isArray(data)) {
73
81
  store.loadData(data);
82
+ this.addDescriptions();
74
83
  }
75
84
  }
76
85
  },
@@ -145,6 +154,56 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
145
154
  this.updateProperties();
146
155
  },
147
156
 
157
+ loadPropertiesHandler: function() {
158
+ const grid = this.getView();
159
+ this.lastSource = grid.loadPropertiesSource && grid.loadPropertiesSource.field.getValue();
160
+ if (!this.lastSource) {
161
+ Coon.log.warn('Не выбрана команда!');
162
+ }
163
+ const properties = Ext.ClassManager.getByAlias('command.' + this.lastSource).prototype.commandProperties();
164
+
165
+ const dataForLoad = properties.map(function(property, i) {
166
+ const newProperty = {
167
+ sequenceNumber: i,
168
+ key: property.name,
169
+ description: property.description,
170
+ };
171
+ if (property.defaultValue) {
172
+ newProperty.value = property.defaultValue;
173
+ }
174
+ return newProperty;
175
+ }, this).filter((property) => {
176
+ return !grid.getStore().findRecord('key', property['key']);
177
+ });
178
+
179
+ grid.getStore().loadData(dataForLoad, true);
180
+ },
181
+
182
+ /**
183
+ * Добавление описаний к свойствам команды
184
+ */
185
+ addDescriptions: function() {
186
+ const grid = this.getView();
187
+ const commandCombo = grid.loadPropertiesSource && grid.loadPropertiesSource.field;
188
+ if (!commandCombo) {
189
+ return;
190
+ }
191
+ const command = commandCombo.getValue();
192
+ if (!command) {
193
+ return;
194
+ }
195
+
196
+ const descriptions = Ext.ClassManager.getByAlias('command.' + command).prototype.commandProperties().reduce((acc, property) => {
197
+ acc[property['name']] = property['description'];
198
+ return acc;
199
+ }, {});
200
+
201
+ Object.entries(descriptions).forEach(function([key, value]) {
202
+ const rec = grid.getStore().findRecord('key', key);
203
+ rec && rec.set('description', value, {dirty: false});
204
+ });
205
+ },
206
+
148
207
  /**
149
208
  * Открытие свойств параметра в редакторе кода
150
209
  */
@@ -157,7 +216,7 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
157
216
 
158
217
  /**
159
218
  * Загрузка изменений, внесенных в редакторе кода, в store.
160
- * @param {Object} changes
219
+ * @param {Object} data
161
220
  */
162
221
  loadChangesFromEditor: function(data) {
163
222
  const store = this.getView().getStore();