ru.coon 2.7.2 → 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.
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.2',
3
+ number: '2.7.3',
4
4
  });
@@ -1,332 +0,0 @@
1
- Ext.define('Coon.uielement.plugin.configPanel.ExecuteCommandPluginConfigPanelFormEditor', {
2
- extend: 'Ext.panel.Panel',
3
- alias: 'widget.ExecuteCommandPluginConfigPanelFormEditor',
4
- description: 'Выполняет команду, позволяет отслеживать её выполнение и менять сообщения об различных событиях в ходе выполнения',
5
- viewModel: {
6
- data: {
7
- parameters: '{}',
8
- handlerName: '',
9
- ctype: '',
10
- propertyPath: '',
11
- disabledReference: undefined,
12
- completeHandler: undefined,
13
- errorHandler: undefined,
14
-
15
- successMessage: false,
16
- successTitle: 'Операция завершена',
17
- successText: 'Операция завершена успешно',
18
-
19
-
20
- confirmExecution: false,
21
- confirmTitle: 'Сообщение системы',
22
- confirmText: 'Вы уверены, что хотите выполнить действие?',
23
-
24
- requiredValidView: false,
25
- requiredValidReference: '',
26
- requiredValidTitle: 'Сообщение системы',
27
- requiredValidMessage: 'Не все обязательные поля заполнены.',
28
-
29
- saveAnimation: false,
30
-
31
- mappingMode: 'object',
32
- dataMapping: '{}',
33
- activeAceTab: 'parameters',
34
-
35
- },
36
- formulas: {
37
- objectMode: {
38
- bind: {bindTo: '{mappingMode}'},
39
- get: function(mappingMode) {
40
- const hideMapping = mappingMode !== 'map';
41
- const tabpanel = this.getView().down('tabpanel');
42
- tabpanel.getTabBar().items.getAt(tabpanel.items.findIndex('title', 'dataMapping')).setHidden(hideMapping);
43
- return mappingMode === 'object';
44
- },
45
- },
46
- },
47
- },
48
- layout: {
49
- type: 'vbox',
50
- align: 'stretch',
51
- },
52
- scrollable: 'y',
53
- items: [
54
- {
55
- xtype: 'pluginDescriptionLabel',
56
- bind: {
57
- value: '{description}',
58
- },
59
- },
60
- {
61
- xtype: 'textfield',
62
- fieldLabel: 'Имя комманды',
63
- bind: '{ctype}',
64
- },
65
- {
66
- xtype: 'comboBtnWrapper',
67
- combobox: {
68
- reference: 'handlerCombo',
69
- xtype: 'BaseComboBox',
70
- fieldLabel: 'handlerName',
71
- labelWidth: 60,
72
- flex: 1,
73
- loadOnRender: false,
74
- hideMode: 'offsets',
75
- allowBlank: false,
76
- store: 'codeHandlers',
77
- bind: {
78
- value: '{handlerName}',
79
- },
80
- valueField: 'id',
81
- displayField: 'id',
82
- },
83
- },
84
- {
85
- xtype: 'ConstantList',
86
- data: [
87
- ['object', 'object'],
88
- ['map', 'map'],
89
- ['data', 'data']
90
- ],
91
- fieldLabel: 'mappingMode',
92
- bind: {
93
- value: '{mappingMode}',
94
- },
95
- allowBlank: true,
96
- },
97
- {
98
- xtype: 'textfield',
99
- fieldLabel: 'propertyPath',
100
- bind: {
101
- value: '{propertyPath}',
102
- visible: '{objectMode}',
103
- },
104
- },
105
- {
106
- xtype: 'tabpanel',
107
- default: {
108
- xtype: 'panel',
109
- },
110
- items: [
111
- {
112
- title: 'Параметры',
113
- vmName: 'parameters',
114
- },
115
- {
116
- title: 'dataMapping',
117
- vmName: 'dataMapping',
118
- hidden: true,
119
- }
120
- ],
121
- listeners: {
122
- tabchange: function(sender, value, oldValue) {
123
- const vm = sender.up().getViewModel();
124
- const {vmName} = value;
125
- vm.set('activeAceTab', vmName);
126
- const aceEditor = sender.up().down('UiAceEditor');
127
- aceEditor.flush();
128
- if (Ext.isEmpty(aceEditor.editor.session.getAnnotations())) {
129
- vm.set(oldValue.vmName, aceEditor.getValue());
130
- } else {
131
- Ext.Msg.alert('Ошибка', 'В редакторе присутствуют ошибки. Параметры прошлого плагина не сохранены');
132
- }
133
- vm.set('aceData', vm.get(vmName));
134
- },
135
- },
136
- },
137
- {
138
- xtype: 'UiAceEditorPanel',
139
- hideSearchPanel: true,
140
- text: `
141
- передать свойства команде можно через свойство _commandProperties, пример:<br/>
142
- <code>
143
- {<br/>
144
- &Tab;_commandProperties: {processIDAsCode: 'processId', parametersName: 'parameters'}<br/>
145
- }
146
- </code>
147
- `,
148
- layout: 'fit',
149
- flex: 1,
150
- bind: {
151
- value: '{aceData}',
152
- },
153
- },
154
- {
155
- xtype: 'checkbox',
156
- boxLabel: 'successMessage',
157
- boxLabelAlign: 'after',
158
- padding: '0 0 0 10',
159
- bind: '{successMessage}',
160
- },
161
- {
162
- xtype: 'textfield',
163
- fieldLabel: 'successText',
164
- bind: {
165
- value: '{successText}',
166
- visible: '{successMessage}',
167
- },
168
- },
169
- {
170
- xtype: 'textfield',
171
- fieldLabel: 'successTitle',
172
- bind: {
173
- value: '{successTitle}',
174
- visible: '{successMessage}',
175
- },
176
- },
177
- {
178
- xtype: 'checkbox',
179
- boxLabel: 'confirmExecution',
180
- boxLabelAlign: 'after',
181
- padding: '0 0 0 10',
182
- bind: '{confirmExecution}',
183
- },
184
- {
185
- xtype: 'textfield',
186
- fieldLabel: 'confirmText',
187
- bind: {
188
- value: '{confirmText}',
189
- visible: '{confirmExecution}',
190
- },
191
- },
192
- {
193
- xtype: 'checkbox',
194
- padding: '0 0 0 10',
195
- boxLabel: 'saveAnimation',
196
- bind: {
197
- value: '{saveAnimation}',
198
- },
199
- },
200
- {
201
- xtype: 'textfield',
202
- fieldLabel: 'confirmTitle',
203
- bind: {
204
- value: '{confirmTitle}',
205
- visible: '{confirmExecution}',
206
- },
207
- },
208
- {
209
- xtype: 'checkbox',
210
- boxLabel: 'нужна ли валидация view[requiredValidView]',
211
- boxLabelAlign: 'after',
212
- padding: '0 0 0 10',
213
- bind: '{requiredValidView}',
214
- },
215
- {
216
- xtype: 'textfield',
217
- fieldLabel: 'референс компонента для валидации[requiredValidReference]',
218
- bind: {
219
- value: '{requiredValidReference}',
220
- visible: '{requiredValidView}',
221
- },
222
- },
223
- {
224
- xtype: 'textfield',
225
- fieldLabel: 'requiredValidMessage',
226
- bind: {
227
- value: '{requiredValidMessage}',
228
- visible: '{requiredValidView}',
229
- },
230
- },
231
- {
232
- xtype: 'textfield',
233
- fieldLabel: 'requiredValidTitle',
234
- bind: {
235
- value: '{requiredValidTitle}',
236
- visible: '{requiredValidView}',
237
- },
238
- },
239
- {
240
- xtype: 'textfield',
241
- fieldLabel: 'disabledReference',
242
- bind: '{disabledReference}',
243
- },
244
- {
245
- xtype: 'textfield',
246
- fieldLabel: 'completeHandler',
247
- bind: '{completeHandler}',
248
- },
249
- {
250
- xtype: 'textfield',
251
- fieldLabel: 'errorHandler',
252
- bind: '{errorHandler}',
253
- }
254
-
255
- ],
256
- getData: function() {
257
- return this.getConfiguration();
258
- },
259
- setData: function(data) {
260
- data && this.doInit(data);
261
- },
262
- doInit: function(config) {
263
- this.getViewModel().set('description', this.description);
264
- for (const parameterName in config) {
265
- if (!config.hasOwnProperty(parameterName) || parameterName === 'ptype') {
266
- continue;
267
- }
268
- if (parameterName === 'parameters' || parameterName === 'dataMapping') {
269
- const stringParam = JSON5.stringify(config[parameterName], {
270
- space: 4,
271
- quote: '\'',
272
- });
273
- this.getViewModel().set(parameterName, stringParam);
274
- continue;
275
- }
276
- this.getViewModel().set(parameterName, config[parameterName]);
277
- }
278
- const params = this.getViewModel().get('parameters');
279
- if (params) {
280
- this.getViewModel().set('aceData', params);
281
- }
282
- },
283
- getConfiguration: function() {
284
- const result = {};
285
- const vm = this.getViewModel();
286
- const aceEditor = this.down('UiAceEditor');
287
-
288
- if (aceEditor.isJSON5Valid()) {
289
- vm.set(vm.get('activeAceTab'), aceEditor.getValue());
290
- } else {
291
- Ext.Msg.alert('Ошибка', 'В параметрах присутствуют ошибки. Параметры прошлого плагина не сохранены');
292
- }
293
- result['parameters'] = JSON5.parse(this.getViewModel().get('parameters'));
294
- if (vm.get('mappingMode') === 'map') {
295
- result['dataMapping'] = JSON5.parse(this.getViewModel().get('dataMapping'));
296
- } else if (vm.get('mappingMode') === 'object') {
297
- result['propertyPath'] = vm.get('propertyPath');
298
- }
299
- result['mappingMode'] = vm.get('mappingMode');
300
- result['handlerName'] = vm.get('handlerName');
301
- result['ctype'] = vm.get('ctype');
302
- if (vm.get('confirmExecution')) {
303
- result['confirmExecution'] = vm.get('confirmExecution');
304
- result['confirmTitle'] = vm.get('confirmTitle');
305
- result['confirmText'] = vm.get('confirmText');
306
- }
307
- if (vm.get('completeHandler')) {
308
- result['completeHandler'] = vm.get('completeHandler');
309
- }
310
- if (vm.get('errorHandler')) {
311
- result['errorHandler'] = vm.get('errorHandler');
312
- }
313
- if (vm.get('disabledReference')) {
314
- result['disabledReference'] = vm.get('disabledReference');
315
- }
316
- if (vm.get('successMessage')) {
317
- result['successMessage'] = vm.get('successMessage');
318
- result['successTitle'] = vm.get('successTitle');
319
- result['successText'] = vm.get('successText');
320
- }
321
- if (vm.get('requiredValidView')) {
322
- result['requiredValidView'] = vm.get('requiredValidView');
323
- result['requiredValidTitle'] = vm.get('requiredValidTitle');
324
- result['requiredValidMessage'] = vm.get('requiredValidMessage');
325
- result['requiredValidReference'] = vm.get('requiredValidReference') ? vm.get('requiredValidReference'):undefined;
326
- }
327
- if (vm.get('saveAnimation')) {
328
- result['saveAnimation'] = vm.get('saveAnimation');
329
- }
330
- return result;
331
- },
332
- });