ru.coon 2.7.68 → 2.7.69

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.69, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9d58f22601dbf5121b56d8fa32a6316c64b48a22)
2
+ * ## Fixes
3
+ * <span style='color:red'> PropertyDataParser.js : check if node is object before generating id.</span> ([e40912], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e409122912b679d8c5dcf41d57f9e031f96cf1b7))
4
+
5
+ * TR-69409 Добавить возможность в ExecuteCommandPlugin выводить подтверждающее сообщение как Ext.toast ([524553], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/524553f5861fc4438f800edbe4bb92ede80ccdf4))
6
+ * update: CHANGELOG.md ([9064f2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9064f2d31af96906452b2d8e8d9818f7b85831e8))
7
+
1
8
  # Version 2.7.68, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/474af33a28e0c286c4e3d7e2b85eda7f2af80211)
2
9
  * ## Features
3
10
  * <span style='color:green'>feat: HT-9900, add 'hideable' column property to Report Editor</span> ([924696], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/924696184b6bfc3735c440b2df1cf8b397d54aec))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.7.68",
7
+ "version": "2.7.69",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -35,6 +35,9 @@ Ext.define('Coon.security.PropertyDataParser', {
35
35
  return property.idProperty && typeof node[property.idProperty] === 'string' && node[property.idProperty].length;
36
36
  },
37
37
  generateIdProperty(node, generateIdFrom) {
38
+ if (!Ext.isObject(node)) {
39
+ return;
40
+ }
38
41
  generateIdFrom = generateIdFrom || this.generateIdFrom;
39
42
  const idSequence = [];
40
43
  for (const propCfg of generateIdFrom) {
@@ -181,7 +181,9 @@ Ext.define('Coon.uielement.plugin.ExecuteCommandPlugin', {
181
181
  break;
182
182
  }
183
183
  if (this.successMessage) {
184
- Ext.Msg.alert(this.successTitle, this.successText);
184
+ Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPluginConfigPanelFormEditor.showMessage(
185
+ this.asAlert, this.successTitle, this.successText
186
+ );
185
187
  }
186
188
 
187
189
  if (this.completeHandler) {
@@ -92,6 +92,9 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
92
92
  commandProperties && this.lookup('reportPropertiesGrid').setData(
93
93
  this.convertProperties(commandProperties)
94
94
  );
95
+ if (typeof config.successMessage !== 'string' && config.successMessage) {
96
+ config.successMessage = 'alert';
97
+ }
95
98
  this.getViewModel().set('description', this.description);
96
99
  for (const parameterName in config) {
97
100
  if (!config.hasOwnProperty(parameterName) || parameterName === 'ptype') {
@@ -265,29 +268,74 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
265
268
  align: 'stretch',
266
269
  },
267
270
  scrollable: true,
271
+ defaults: {
272
+ margin: 4,
273
+ },
268
274
  items: [
269
275
  {
270
- xtype: 'checkbox',
271
- boxLabel: 'successMessage',
272
- boxLabelAlign: 'after',
273
- padding: '0 0 0 10',
274
- bind: '{successMessage}',
275
- },
276
- {
277
- xtype: 'textfield',
278
- fieldLabel: 'successText',
279
- bind: {
280
- value: '{successText}',
281
- visible: '{successMessage}',
282
- },
283
- },
284
- {
285
- xtype: 'textfield',
286
- fieldLabel: 'successTitle',
287
- bind: {
288
- value: '{successTitle}',
289
- visible: '{successMessage}',
276
+ xtype: 'fieldset',
277
+ title: 'Выводить сообщение об успешном выполнении',
278
+ layout: {type: 'vbox', align: 'stretch'},
279
+ defaults: {
280
+ margin: 4,
290
281
  },
282
+ items: [
283
+ {
284
+ xtype: 'container',
285
+ layout: 'vbox',
286
+ defaults: {
287
+ margin: 4,
288
+ },
289
+ items: [
290
+ {
291
+ xtype: 'segmentedbutton',
292
+ bind: {
293
+ value: '{successMessage}',
294
+ },
295
+ items: [
296
+ {
297
+ value: false,
298
+ iconCls: 'svg-fa svg-fa-xmark',
299
+ },
300
+ {
301
+ text: 'alert',
302
+ value: 'alert',
303
+ },
304
+ {
305
+ text: 'toast',
306
+ value: 'toast',
307
+ }
308
+ ],
309
+ },
310
+ {
311
+ xtype: 'button',
312
+ ui: 'green-button',
313
+ text: 'протестировать',
314
+ handler: this.successMessageExample.bind(this),
315
+ bind: {
316
+ visible: '{!!successMessage}',
317
+ },
318
+ }
319
+ ],
320
+
321
+ },
322
+ {
323
+ xtype: 'textfield',
324
+ fieldLabel: 'successText',
325
+ bind: {
326
+ value: '{successText}',
327
+ visible: '{!!successMessage}',
328
+ },
329
+ },
330
+ {
331
+ xtype: 'textfield',
332
+ fieldLabel: 'successTitle',
333
+ bind: {
334
+ value: '{successTitle}',
335
+ visible: '{!!successMessage}',
336
+ },
337
+ }
338
+ ],
291
339
  },
292
340
  {
293
341
  xtype: 'checkbox',
@@ -641,4 +689,38 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
641
689
  Ext.ClassManager.classes[fullSource].prototype.inputParameters();
642
690
  }
643
691
  },
692
+
693
+ successMessageExample() {
694
+ const vm = this.getViewModel();
695
+ const successTitle = vm.get('successTitle');
696
+ const exampleSuccessText= 'Сообщение для примера с <b>html</b> разметкой. <br>Оно используется потому что вы не ввели свой текст';
697
+ const successText = vm.get('successText') || exampleSuccessText;
698
+ this.self.showMessage(
699
+ vm.get('successMessage'),
700
+ successTitle,
701
+ successText
702
+ );
703
+ },
704
+
705
+ statics: {
706
+ /**
707
+ * Вывод сообщения об результате
708
+ * @param successMessage
709
+ * @param title
710
+ * @param html
711
+ */
712
+ showMessage(successMessage, title, html) {
713
+ if (successMessage === 'alert') {
714
+ return Ext.Msg.alert(title, html);
715
+ }
716
+ if (successMessage === 'toast') {
717
+ const toastConfig = {
718
+ closable: true,
719
+ html,
720
+ };
721
+ title && (toastConfig.title = title);
722
+ return Ext.toast(toastConfig);
723
+ }
724
+ },
725
+ },
644
726
  });
@@ -1,7 +1,6 @@
1
1
  .ExecuteCommandPluginConfigPanelFormEditor {
2
2
  $required-flag-color: dynamic(#bf1313);
3
3
  font-size: 12px;
4
- margin: 5px;
5
4
  .required-flag {
6
5
  font-size: 18px;
7
6
  color: $required-flag-color;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.7.68',
3
+ number: '2.7.69',
4
4
  });