ru.coon 2.8.65 → 3.0.2

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 (130) hide show
  1. package/CHANGELOG.md +319 -6
  2. package/package.json +1 -1
  3. package/src/Function.js +1 -1
  4. package/src/VisualLinker.js +610 -0
  5. package/src/VisualLinker.scss +219 -0
  6. package/src/app/Application.js +1 -0
  7. package/src/app/ApplicationSettings.js +49 -0
  8. package/src/app/Config.js +60 -0
  9. package/src/app/Router.js +37 -21
  10. package/src/app/viewPort/CVWrapperPanel.js +53 -0
  11. package/src/app/viewPort/CenterView.js +153 -46
  12. package/src/app/viewPort/CenterView.scss +151 -0
  13. package/src/app/viewPort/ComponentContextManager.js +24 -0
  14. package/src/app/viewPort/Main.js +4 -1
  15. package/src/app/viewPort/Routing.d2 +23 -0
  16. package/src/app/viewPort/TabHistory.js +81 -0
  17. package/src/common/ComponentFactory.js +167 -0
  18. package/src/common/button/DropdownContentButton.js +146 -0
  19. package/src/common/button/DropdownContentButton.scss +92 -0
  20. package/src/common/button/DropdownContentButtonController.js +60 -0
  21. package/src/common/component/editor/EditorFactory.js +3 -1
  22. package/src/common/component/formeditor/UiCustomFilterForm.scss +0 -1
  23. package/src/common/component/settings/modules/settingClosePageConfirmation.js +1 -3
  24. package/src/common/component/settings/modules/settingFavoritePanelShow.js +21 -0
  25. package/src/common/component/settings/modules/settingReportCalculator.js +22 -0
  26. package/src/common/component/settings/modules/settingShowNeedReloadMessage.js +1 -3
  27. package/src/common/component/settings/modules/settingwindowHolder.js +2 -3
  28. package/src/common/panel/WindowWrap.js +19 -11
  29. package/src/common/tree/BaseContextMenu.js +4 -3
  30. package/src/log.js +4 -5
  31. package/src/nav/AppNavCalcButton.js +23 -0
  32. package/src/nav/AppNavCalcButton.scss +6 -0
  33. package/src/nav/AppNavigationBar.js +1 -1
  34. package/src/nav/AppNavigationMenuController.js +2 -2
  35. package/src/nav/AppNavigationMenuMinimized.js +61 -0
  36. package/src/nav/AppNavigationPanel.js +115 -0
  37. package/src/nav/AppNavigationPanel.scss +178 -0
  38. package/src/nav/AppNavigationPanelController.js +386 -0
  39. package/src/nav/FavoriteCfg.js +18 -0
  40. package/src/nav/MenuEntity.js +23 -15
  41. package/src/nav/MenuFavoritesBar.js +100 -0
  42. package/src/nav/MenuFavoritesBar.scss +92 -0
  43. package/src/nav/editor/NavigateElementEditorView.js +2 -2
  44. package/src/nav/editor/workspace/NavWorkspaceListView.js +1 -4
  45. package/src/nav/menu/WorkspaceMenuViewMinimized.js +22 -0
  46. package/src/overrides/panel/TabPanel.js +36 -0
  47. package/src/overrides/panel/TabPanel.scss +65 -0
  48. package/src/report/component/ClearFiltersButton.js +4 -1
  49. package/src/report/component/CopyCellValueMenuItem.js +18 -0
  50. package/src/report/component/ReportFieldMap.js +274 -0
  51. package/src/report/component/ReportPanel.js +73 -44
  52. package/src/report/component/ReportPanel.scss +2 -2
  53. package/src/report/component/ReportTagLookup.js +59 -2
  54. package/src/report/component/calculator/ReportCalculatorController.js +266 -0
  55. package/src/report/component/calculator/ReportCalculatorField.js +47 -0
  56. package/src/report/component/calculator/ReportCalculatorHistoryPlugin.js +128 -0
  57. package/src/report/component/calculator/ReportCalculatorHistoryPlugin.scss +33 -0
  58. package/src/report/component/calculator/ReportCalculatorMenuItem.js +101 -0
  59. package/src/report/component/calculator/ReportCalculatorMenuItem.scss +41 -0
  60. package/src/report/component/calculator/ReportCalculatorPanel.js +363 -0
  61. package/src/report/component/calculator/ReportCalculatorPanel.scss +86 -0
  62. package/src/report/component/reportpanel/CopyReportPanelController.js +1 -1
  63. package/src/report/component/reportpanel/FilterPanel.js +13 -15
  64. package/src/report/component/reportpanel/FilterPanel.scss +5 -1
  65. package/src/report/component/reportpanel/FormFieldFocusPlugin.js +157 -0
  66. package/src/report/component/reportpanel/FormFieldFocusPlugin.scss +14 -0
  67. package/src/report/component/reportpanel/NorthPanel.js +16 -17
  68. package/src/report/component/reportpanel/NorthPanel.scss +1 -1
  69. package/src/report/component/reportpanel/ReportContextMenu.js +219 -0
  70. package/src/report/component/reportpanel/ReportGrid.js +1 -0
  71. package/src/report/component/reportpanel/ReportGrid.scss +4 -0
  72. package/src/report/component/settings/field/ReportFormFieldsGrid.js +2 -2
  73. package/src/report/component/settings/field/ReportFormFieldsGridController.js +2 -2
  74. package/src/report/component/settings/property/ReportPropertiesPanelController.js +1 -1
  75. package/src/report/component/settings/property/ReportPropertyDictionary.js +7 -0
  76. package/src/report/plugin/configPanel/AddFilterConditionPluginConfigPanel.js +34 -11
  77. package/src/report/plugin/configPanel/GridFiltersPluginConfigPanelFiltersGrid.js +3 -2
  78. package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.js +274 -255
  79. package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.scss +17 -0
  80. package/src/report/plugin/grid/AddFilterConditionPlugin.js +530 -87
  81. package/src/report/plugin/grid/CalculatorPlugin.js +90 -0
  82. package/src/report/plugin/grid/GridContextMenu.js +12 -10
  83. package/src/report/plugin/grid/GridRowCountPlugin.js +0 -1
  84. package/src/report/plugin/grid/GridToolbarButtonPlugin.js +11 -2
  85. package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +126 -89
  86. package/src/report/plugin/grid/ReportCharacteristicBindPlugin.js +6 -4
  87. package/src/report/plugin/grid/ReportColumnStatePlugin.js +15 -3
  88. package/src/report/plugin/grid/SetSingleParameterPlugin.js +1 -1
  89. package/src/report/plugin/grid/ToolbarButtonPlugin.js +1 -1
  90. package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanel.js +55 -0
  91. package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanelController.js +226 -0
  92. package/src/report/plugin/grid/addFilterConditionPlugin/FilterConfigMixin.js +138 -0
  93. package/src/report/plugin/grid/addFilterConditionPlugin/FilterFieldFactory.js +223 -0
  94. package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.js +164 -0
  95. package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.scss +21 -0
  96. package/src/report/plugin/grid/addFilterConditionPlugin/FilterMenu.js +29 -0
  97. package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanel.js +53 -0
  98. package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanelController.js +57 -0
  99. package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.js +111 -0
  100. package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.scss +83 -0
  101. package/src/report/plugin/grid/addFilterConditionPlugin/SelectColumnPanel.js +102 -0
  102. package/src/report/selectionModels/MixedRowSelectionModel.js +36 -45
  103. package/src/report/toolbar/dropdown/ToolbarOverflowButton.js +16 -5
  104. package/src/report/toolbar/dropdown/ToolbarOverflowPanel.scss +26 -14
  105. package/src/report/toolbar/layout/ReportToolbarOverflow.js +5 -2
  106. package/src/ringBuffer.js +7 -3
  107. package/src/uielement/command/GetUIElementCommand.js +0 -1
  108. package/src/uielement/component/UiCPWrapper.js +26 -36
  109. package/src/uielement/component/UiCustomController.js +7 -0
  110. package/src/uielement/component/UiCustomPanel.js +46 -2
  111. package/src/uielement/component/settings/UiCustomPanelEditorController.js +35 -29
  112. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.js +146 -33
  113. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.scss +28 -0
  114. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGridController.js +366 -22
  115. package/src/uielement/component/settings/plugin/UiCustomPanelPluginModel.js +1 -0
  116. package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanel.js +10 -4
  117. package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanelController.js +28 -30
  118. package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +203 -22
  119. package/src/uielement/plugin/configPanel/ExecuteFunctionPluginConfigPanelFormEditor.js +4 -36
  120. package/src/uielement/plugin/configPanel/FireEventPluginConfigPanelFormEditor.js +5 -36
  121. package/src/uielement/plugin/configPanel/MethodChainPluginConfigPanelFormEditor.js +4 -36
  122. package/src/uielement/plugin/configPanel/OpenPanelPluginConfigPanelFormEditor.js +2 -38
  123. package/src/uielement/plugin/configPanel/PrintPdfPluginConfigPanelFormEditor.js +2 -35
  124. package/src/uielement/plugin/configPanel/UiCPPluginFormPanel.js +54 -0
  125. package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +28 -18
  126. package/src/userSettings.js +1 -0
  127. package/src/util/ContextManager.js +109 -0
  128. package/src/util.js +96 -15
  129. package/src/version.js +1 -1
  130. package/src/app/viewPort/CenterViewController.js +0 -158
@@ -7,6 +7,7 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
7
7
  compareCash: false,
8
8
  configurePanelWizardForFormEditor: 'UnifiedButtonToolbarPluginConfigPanelFormEditor',
9
9
  suspendBeforeCloseEvent: false,
10
+ unsavedComponents: new Set,
10
11
 
11
12
  callMethod(method, defValue) {
12
13
  if (typeof method === 'string') {
@@ -37,14 +38,200 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
37
38
  init: function(view) {
38
39
  this.controller = view && view.getController();
39
40
  this.controller.on('generateHash', this.generateHash, this);
41
+
42
+ if (view.isChildCP) {
43
+ this.createToolbarButtons(view);
44
+ view.on('activate', this.checkDirtyStatus, this);
45
+ view.on('deactivate', this.checkDirtyStatus, this);
46
+ } else if (view.isParentCP) {
47
+ this.setBeforeCloseListener(view);
48
+ this.setDirtychangeListeners(view);
49
+ } else {
50
+ this.setBeforeCloseListener(view);
51
+ this.createToolbarButtons(view);
52
+ }
53
+ },
54
+
55
+ /**
56
+ * Установка слушателей несохраненных изменений на дочернии панели.
57
+ * @param view
58
+ */
59
+ setDirtychangeListeners(view) {
60
+ this.unsavedComponents = new Set();
61
+ const childComponents = view.query('UICPWrapper');
62
+ if (childComponents) {
63
+ this.childComponents = childComponents;
64
+ childComponents.forEach((component) => {
65
+ component.on('dirtychange', (component, isUnsaved) => {
66
+ if (isUnsaved) {
67
+ this.unsavedComponents.add(component);
68
+ } else {
69
+ this.unsavedComponents.delete(component);
70
+ }
71
+ });
72
+ });
73
+ }
74
+ },
75
+
76
+ /**
77
+ * Проверка наличия несохраненных изменений дочерней панели.
78
+ * @returns {Boolean}
79
+ */
80
+ checkDirtyStatus() {
81
+ this.compareCash = true;
82
+ const hashDiff = this.checkHashDiff();
83
+ if (hashDiff !== undefined) {
84
+ this.getCmp().fireEvent('dirtychange', this.getCmp(), !hashDiff);
85
+ return hashDiff;
86
+ }
87
+ },
88
+
89
+ /**
90
+ * Сравнение хеша текущего и сохраненного.
91
+ * Хеш сохраняется если compareCash не равно true.
92
+ * Возвращает true если хеши равны, false если нет.
93
+ * @returns {Boolean}
94
+ */
95
+ checkHashDiff(params) {
96
+ if (!params && this.getHashDataHandlerName) {
97
+ const getHashDataHandler = this.getMethod(this.getHashDataHandlerName);
98
+ try {
99
+ params = getHashDataHandler.call(this.controller);
100
+ } catch (error) {
101
+ Coon.log.error('Ошибка выполнения getHashDataHandler.', error);
102
+ }
103
+ }
104
+ if (!Ext.isObject(params)) {
105
+ if (this.isWindowClose && !this.getCmp().isChildCP) {
106
+ this.suspendBeforeCloseEvent = true;
107
+ this.closeWindow();
108
+ }
109
+ return;
110
+ }
111
+ if (this.compareCash !== true) {
112
+ this.controller.savedDataHash = Coon.util.generateHashFromObj(params);
113
+ return;
114
+ }
115
+
116
+ this.compareCash = false;
117
+ if (!this.isWindowClose) {
118
+ const valid = this.callValidate();
119
+ if (!valid) {
120
+ return;
121
+ }
122
+ }
123
+ const currentHash = Coon.util.generateHashFromObj(params);
124
+ return (this.controller.savedDataHash === currentHash);
125
+ },
126
+
127
+ setBeforeCloseListener(view) {
40
128
  this.controller.callDialog = this.callDialog.bind(this);
41
129
  view.on('afterrender', () => {
42
130
  const window = view.up('WindowWrap');
43
131
  if (window && this.checkChangesOnSave !== false) {
44
- window.on('beforeclose', this.onBeforeCloseWindow, this);
132
+ if (this.getCmp().isParentCP) {
133
+ window.on('beforeclose', this.onBeforeCloseWindowByParent, this);
134
+ } else {
135
+ window.on('beforeclose', this.onBeforeCloseWindow, this);
136
+ }
45
137
  }
46
- this.controller.lookup('standardCancelButton').setHidden(!window);
47
138
  }, this);
139
+ },
140
+
141
+ /**
142
+ * Проверка наличия несохраненных изменений в дочерних панелях.
143
+ * Если они есть, выводится диалоговое окно с их перечнем.
144
+ * @param win
145
+ * @returns {boolean}
146
+ */
147
+ onBeforeCloseWindowByParent(win) {
148
+ const cp = win.down('UiCustomPanel');
149
+ if (cp) {
150
+ cp.focus();
151
+ }
152
+ if (this.suspendBeforeCloseEvent) {
153
+ this.suspendBeforeCloseEvent = false;
154
+ return true;
155
+ }
156
+ this.childComponents.forEach((component) => {
157
+ const cp = component.down('UiCustomPanel');
158
+ const plugin = cp.findPlugin('UnifiedButtonToolbarPlugin');
159
+ if (plugin) {
160
+ plugin.isWindowClose = true;
161
+ plugin.checkDirtyStatus();
162
+ plugin.isWindowClose = false;
163
+ }
164
+ });
165
+ if (this.unsavedComponents.size > 0) {
166
+ this.callParentDialog();
167
+ return false;
168
+ }
169
+ return true;
170
+ },
171
+
172
+ callParentDialog() {
173
+ let tabTitles = '';
174
+ this.unsavedComponents.forEach((tab) => {
175
+ tabTitles += `<li>${tab.title}</li>`;
176
+ });
177
+ const me = this;
178
+ Ext.create('Ext.window.Window', {
179
+ title: 'Внимение',
180
+ width: 400,
181
+ layout: {
182
+ type: 'hbox',
183
+ },
184
+ modal: true,
185
+ closable: false,
186
+ padding: '20 10 5 20',
187
+ items: [
188
+ {
189
+ xtype: 'container',
190
+ height: 20,
191
+ width: 23,
192
+ layout: 'fit',
193
+ style: {
194
+ display: 'flex',
195
+ justifyContent: 'center',
196
+ },
197
+ margin: '0 10 10 0',
198
+ html: `<div class="svg-icon svg-icon-attention-critical svg-icon-color-red"
199
+ style="height: 100%;
200
+ width: 100%;
201
+ background-color: #DCA644">
202
+ </div>`,
203
+ },
204
+ {
205
+ flex: 1,
206
+ margin: '0 0 15 0',
207
+ html: `Несохраненные изменения в:<br />
208
+ <ul style="margin: 0">${tabTitles}</ul>`,
209
+ }
210
+ ],
211
+ buttons: [
212
+ {
213
+ xtype: 'button',
214
+ text: 'вернуться',
215
+ itemId: 'cancel',
216
+ ui: 'orange-button',
217
+ handler: (el) => {
218
+ el.up('window').close();
219
+ },
220
+ },
221
+ {
222
+ text: 'закрыть без сохранения',
223
+ itemId: 'no',
224
+ ui: 'green-button',
225
+ handler: (el) => {
226
+ me.confirmHandler('no');
227
+ el.up('window').close();
228
+ },
229
+ }
230
+ ],
231
+ }).show();
232
+ },
233
+
234
+ createToolbarButtons(view) {
48
235
  this.controller.unifiedButtonToolbar = Ext.create('Ext.toolbar.Toolbar', {
49
236
  dock: this.dock,
50
237
  items: [
@@ -70,6 +257,10 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
70
257
  }
71
258
  ],
72
259
  });
260
+ view.on('afterrender', () => {
261
+ const window = view.up('WindowWrap');
262
+ this.controller.lookup('standardCancelButton').setHidden(!window);
263
+ }, this);
73
264
  view.addDocked(this.controller.unifiedButtonToolbar, this.dock === 'bottom' ? null : 0);
74
265
  },
75
266
 
@@ -140,30 +331,14 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
140
331
  },
141
332
 
142
333
  async generateHash(params) {
143
- if (!Ext.isObject(params)) {
144
- if (this.isWindowClose) {
145
- this.suspendBeforeCloseEvent = true;
146
- this.closeWindow();
147
- }
334
+ const hashDiff = this.checkHashDiff(params);
335
+ if (hashDiff === undefined) {
148
336
  return;
149
337
  }
150
- if (this.compareCash !== true) {
151
- this.controller.savedDataHash = Coon.util.generateHashFromObj(params);
152
- return;
153
- }
154
-
155
- this.compareCash = false;
156
- if (!this.isWindowClose) {
157
- const valid = await this.callValidate();
158
- if (!valid) {
159
- return;
160
- }
161
- }
162
- const currentHash = Coon.util.generateHashFromObj(params);
163
- if (this.controller.savedDataHash === currentHash) {
338
+ if (hashDiff) {
164
339
  Coon.log.debug(`Данные не были измененны`);
165
340
  }
166
- if (this.controller.savedDataHash !== currentHash) {
341
+ if (!hashDiff) {
167
342
  if (this.isWindowClose) {
168
343
  this.callDialog();
169
344
  } else {
@@ -178,10 +353,16 @@ Ext.define('Coon.uielement.plugin.UnifiedButtonToolbarPlugin', {
178
353
  callSaveHandler(closeAfterSave) {
179
354
  return this.callMethod(this.saveHandlerName).then((res) => {
180
355
  Coon.log.debug(`Результат выполнения функции сохранения данных ${this.saveHandlerName}: ${res}`);
356
+ if (this.needReloadEventOnSave) {
357
+ this.getCmp().fireEvent('needReload');
358
+ }
181
359
  if (closeAfterSave) {
182
360
  this.suspendBeforeCloseEvent = true;
183
361
  this.closeWindow();
184
362
  } else {
363
+ if (this.getCmp().isChildCP) {
364
+ this.getCmp().fireEvent('dirtychange', this.getCmp(), false);
365
+ }
185
366
  this.callMethod(this.prepareBeanHandlerName);
186
367
  }
187
368
  });
@@ -1,5 +1,7 @@
1
1
  Ext.define('Coon.uielement.plugin.configPanel.ExecuteFunctionPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
2
+ extend: 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
3
+
4
+ requires: ['Coon.uielement.plugin.configPanel.UiCPPluginFormPanel'],
3
5
 
4
6
  alias: 'widget.ExecuteFunctionPluginConfigPanelFormEditor',
5
7
  description: 'Плагин позволяет выполнить написанную вами функцию (fnBody) после срабатывания определенного события (handler)',
@@ -9,36 +11,7 @@ Ext.define('Coon.uielement.plugin.configPanel.ExecuteFunctionPluginConfigPanelFo
9
11
  handlerName: '',
10
12
  },
11
13
  },
12
- layout: {
13
- type: 'vbox',
14
- align: 'stretch',
15
- },
16
14
  items: [
17
- {
18
- xtype: 'pluginDescriptionLabel',
19
- bind: {
20
- value: '{description}',
21
- },
22
- },
23
- {
24
- xtype: 'comboBtnWrapper',
25
- combobox: {
26
- reference: 'handlerCombo',
27
- xtype: 'BaseComboBox',
28
- fieldLabel: 'handlerName',
29
- labelWidth: 60,
30
- flex: 1,
31
- loadOnRender: false,
32
- hideMode: 'offsets',
33
- allowBlank: false,
34
- store: 'codeHandlers',
35
- bind: {
36
- value: '{handlerName}',
37
- },
38
- valueField: 'id',
39
- displayField: 'id',
40
- },
41
- },
42
15
  {
43
16
  xtype: 'textfield',
44
17
  fieldLabel: 'Параметры функции',
@@ -59,12 +32,7 @@ Ext.define('Coon.uielement.plugin.configPanel.ExecuteFunctionPluginConfigPanelFo
59
32
  },
60
33
  }
61
34
  ],
62
- getData: function() {
63
- return this.getConfiguration();
64
- },
65
- setData: function(data) {
66
- data && this.doInit(data);
67
- },
35
+
68
36
  doInit: function(config) {
69
37
  this.getViewModel().set('description', this.description);
70
38
  for (const parameterName in config) {
@@ -1,5 +1,8 @@
1
1
  Ext.define('Coon.uielement.plugin.configPanel.FireEventPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
2
+ extend: 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
3
+
4
+ requires: ['Coon.uielement.plugin.configPanel.UiCPPluginFormPanel'],
5
+
3
6
  alias: 'widget.FireEventPluginConfigPanelFormEditor',
4
7
  description: 'Вызывает определенное событие панели',
5
8
  viewModel: {
@@ -9,36 +12,7 @@ Ext.define('Coon.uielement.plugin.configPanel.FireEventPluginConfigPanelFormEdit
9
12
  parameters: '[]',
10
13
  },
11
14
  },
12
- layout: {
13
- type: 'vbox',
14
- align: 'stretch',
15
- },
16
15
  items: [
17
- {
18
- xtype: 'pluginDescriptionLabel',
19
- bind: {
20
- value: '{description}',
21
- },
22
- },
23
- {
24
- xtype: 'comboBtnWrapper',
25
- combobox: {
26
- reference: 'handlerCombo',
27
- xtype: 'BaseComboBox',
28
- fieldLabel: 'handlerName',
29
- labelWidth: 60,
30
- flex: 1,
31
- loadOnRender: false,
32
- hideMode: 'offsets',
33
- allowBlank: false,
34
- store: 'codeHandlers',
35
- bind: {
36
- value: '{handlerName}',
37
- },
38
- valueField: 'id',
39
- displayField: 'id',
40
- },
41
- },
42
16
  {
43
17
  xtype: 'textfield',
44
18
  fieldLabel: 'eventName',
@@ -57,12 +31,7 @@ Ext.define('Coon.uielement.plugin.configPanel.FireEventPluginConfigPanelFormEdit
57
31
  },
58
32
  }
59
33
  ],
60
- getData: function() {
61
- return this.getConfiguration();
62
- },
63
- setData: function(data) {
64
- data && this.doInit(data);
65
- },
34
+
66
35
  doInit: function(config) {
67
36
  this.getViewModel().set('description', this.description);
68
37
  for (const parameterName in config) {
@@ -1,7 +1,9 @@
1
1
  Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
2
+ extend: 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
3
+
3
4
  alias: 'widget.MethodChainPluginConfigPanelFormEditor',
4
5
  requires: [
6
+ 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
5
7
  'Coon.report.plugin.SearchByPropButton'
6
8
  ],
7
9
  description: 'Запускает последовательно цепочку методов по срабатыванию handler',
@@ -28,36 +30,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
28
30
  },
29
31
  },
30
32
  },
31
- layout: {
32
- type: 'vbox',
33
- align: 'stretch',
34
- },
35
33
  items: [
36
- {
37
- xtype: 'pluginDescriptionLabel',
38
- bind: {
39
- value: '{description}',
40
- },
41
- },
42
- {
43
- xtype: 'comboBtnWrapper',
44
- combobox: {
45
- reference: 'handlerCombo',
46
- xtype: 'BaseComboBox',
47
- fieldLabel: 'handlerName',
48
- labelWidth: 60,
49
- flex: 1,
50
- loadOnRender: false,
51
- hideMode: 'offsets',
52
- allowBlank: false,
53
- store: 'codeHandlers',
54
- bind: {
55
- value: '{handlerName}',
56
- },
57
- valueField: 'id',
58
- displayField: 'id',
59
- },
60
- },
61
34
  {
62
35
  xtype: 'checkbox',
63
36
  boxLabel: 'Прерывать выполнение последовательности если Обработчик возвращает false',
@@ -171,12 +144,7 @@ Ext.define('Coon.uielement.plugin.configPanel.MethodChainPluginConfigPanelFormEd
171
144
  },
172
145
  }
173
146
  ],
174
- getData: function() {
175
- return this.getConfiguration();
176
- },
177
- setData: function(data) {
178
- data && this.doInit(data);
179
- },
147
+
180
148
  doInit: function(config) {
181
149
  this.getViewModel().set('description', this.description);
182
150
  if (config['handlerName']) {
@@ -1,7 +1,8 @@
1
1
  Ext.define('Coon.uielement.plugin.configPanel.OpenPanelPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
2
+ extend: 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
3
3
  alias: 'widget.OpenPanelPluginConfigPanelFormEditor',
4
4
  requires: [
5
+ 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
5
6
  'Coon.report.plugin.SearchByPropButton'
6
7
  ],
7
8
 
@@ -18,42 +19,13 @@ Ext.define('Coon.uielement.plugin.configPanel.OpenPanelPluginConfigPanelFormEdit
18
19
  activeAceTab: 'parameters',
19
20
  },
20
21
  },
21
- layout: {
22
- type: 'vbox',
23
- align: 'stretch',
24
- },
25
22
  scrollable: 'y',
26
23
  items: [
27
- {
28
- xtype: 'pluginDescriptionLabel',
29
- bind: {
30
- value: '{description}',
31
- },
32
- },
33
24
  {
34
25
  xtype: 'textfield',
35
26
  fieldLabel: 'uiElementCd',
36
27
  bind: '{uiElementCd}',
37
28
  },
38
- {
39
- xtype: 'comboBtnWrapper',
40
- combobox: {
41
- reference: 'handlerCombo',
42
- xtype: 'BaseComboBox',
43
- fieldLabel: 'handlerName',
44
- labelWidth: 60,
45
- flex: 1,
46
- loadOnRender: false,
47
- hideMode: 'offsets',
48
- allowBlank: false,
49
- store: 'codeHandlers',
50
- bind: {
51
- value: '{handlerName}',
52
- },
53
- valueField: 'id',
54
- displayField: 'id',
55
- },
56
- },
57
29
  {
58
30
  xtype: 'textfield',
59
31
  fieldLabel: 'panelXType',
@@ -154,14 +126,6 @@ Ext.define('Coon.uielement.plugin.configPanel.OpenPanelPluginConfigPanelFormEdit
154
126
  aceEditor.setValue(vm.get(curPanel.vmName));
155
127
  },
156
128
 
157
- getData: function() {
158
- return this.getConfiguration();
159
- },
160
-
161
- setData: function(data) {
162
- data && this.doInit(data);
163
- },
164
-
165
129
  doInit: function(config) {
166
130
  const vm = this.getViewModel();
167
131
  vm.set('description', this.description);
@@ -1,5 +1,6 @@
1
1
  Ext.define('Coon.uielement.plugin.configPanel.PrintPdfPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
2
+ extend: 'Coon.uielement.plugin.configPanel.UiCPPluginFormPanel',
3
+ requires: ['Coon.uielement.plugin.configPanel.UiCPPluginFormPanel'],
3
4
  alias: 'widget.PrintPdfPluginConfigPanelFormEditor',
4
5
  description: 'Выполняет команду, позволяет отслеживать её выполнение и менять сообщения об различных событиях в ходе выполнения',
5
6
  viewModel: {
@@ -47,42 +48,8 @@ Ext.define('Coon.uielement.plugin.configPanel.PrintPdfPluginConfigPanelFormEdito
47
48
  },
48
49
  },
49
50
  },
50
- layout: {
51
- type: 'vbox',
52
- align: 'stretch',
53
- },
54
51
  scrollable: 'y',
55
52
  items: [
56
- {
57
- xtype: 'pluginDescriptionLabel',
58
- bind: {
59
- value: '{description}',
60
- },
61
- },
62
- /* {
63
- xtype: 'textfield',
64
- fieldLabel: 'Имя комманды',
65
- bind: '{ctype}',
66
- }, */
67
- {
68
- xtype: 'comboBtnWrapper',
69
- combobox: {
70
- reference: 'handlerCombo',
71
- xtype: 'BaseComboBox',
72
- fieldLabel: 'handlerName',
73
- labelWidth: 60,
74
- flex: 1,
75
- loadOnRender: false,
76
- hideMode: 'offsets',
77
- allowBlank: false,
78
- store: 'codeHandlers',
79
- bind: {
80
- value: '{handlerName}',
81
- },
82
- valueField: 'id',
83
- displayField: 'id',
84
- },
85
- },
86
53
  {
87
54
  xtype: 'ConstantList',
88
55
  data: [
@@ -0,0 +1,54 @@
1
+ Ext.define('Coon.uielement.plugin.configPanel.UiCPPluginFormPanel', {
2
+ extend: 'Ext.panel.Panel',
3
+ xtype: 'UiCPPluginFormPanel',
4
+
5
+ layout: {
6
+ type: 'vbox',
7
+ align: 'stretch',
8
+ },
9
+
10
+ commonItems: [
11
+ {
12
+ xtype: 'pluginDescriptionLabel',
13
+ bind: {
14
+ value: '{description}',
15
+ },
16
+ },
17
+ {
18
+ xtype: 'comboBtnWrapper',
19
+ combobox: {
20
+ reference: 'handlerCombo',
21
+ xtype: 'BaseComboBox',
22
+ fieldLabel: 'handlerName',
23
+ labelWidth: 60,
24
+ flex: 1,
25
+ loadOnRender: false,
26
+ hideMode: 'offsets',
27
+ allowBlank: false,
28
+ store: 'codeHandlers',
29
+ bind: {
30
+ value: '{handlerName}',
31
+ },
32
+ valueField: 'id',
33
+ displayField: 'id',
34
+ },
35
+ }
36
+ ],
37
+
38
+
39
+ initComponent() {
40
+ this.items = this.items || [];
41
+ this.items = this.commonItems.concat(this.items);
42
+ this.callParent(arguments);
43
+ },
44
+
45
+ getData: function() {
46
+ return typeof this.getConfiguration === 'function' && this.getConfiguration();
47
+ },
48
+ setData: function(data) {
49
+ if (data && typeof this.doInit === 'function') {
50
+ this.doInit(data);
51
+ }
52
+ },
53
+
54
+ });