ru.coon 3.0.74 → 3.0.75

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,12 @@
1
+ # Version 3.0.75, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bca8dfcc721f5bf5f9150e54f382e6224565f427)
2
+ * ## Fixes
3
+ * <span style='color:red'> исправление в PeriodPickerPlugin сообщений minText и maxText</span> ([552b34], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/552b3430b8535edf87c420f54cc16f8d5dc03011))
4
+
5
+ * HT-14725: исправление работы BindCustomPanelPlugin ([26547e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/26547e340cec89c0019b98ddf5c3ecd6a8b24438))
6
+ * HT-14681 исправление ошибки редактирования характеристик ([bb5a7a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb5a7acab1af722623ef497234221bd3762a7b50))
7
+ * HT-15218: исправление ошибки формирования itemId ([b233ed], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b233ed8ba44305ca10acc8a1062573bbe7250124))
8
+ * update: CHANGELOG.md ([c0892b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c0892bd2441c94e5168773b008a262b28a31b39d))
9
+
1
10
  # Version 3.0.74, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/723e4a3b5562fe1ce81ea131cba9987cfe286001)
2
11
  * HT-10758: исправление доступности кнопок в зависимости от типа параметра ([db308d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/db308d95a02df99e875998bc2039380dff4c87c7))
3
12
  * update: CHANGELOG.md ([734d0f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/734d0fed9b45fffbff8d29a7b43723e06d9265fb))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "3.0.74",
7
+ "version": "3.0.75",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -92,7 +92,7 @@ Ext.define('Coon.app.Application', {
92
92
 
93
93
  reAuthorize(action) {
94
94
  if (action === 'show') {
95
- this.reAuthWindow = this.getReAuthWindow();
95
+ this.reAuthWindow = this.reAuthWindow || this.getReAuthWindow();
96
96
  this.reAuthWindow.show();
97
97
  return;
98
98
  }
@@ -348,17 +348,9 @@ Ext.define('Coon.common.component.editor.DFVTypeEditor', {
348
348
  this.field.on('load', function() {
349
349
  this.field.setValue(value);
350
350
  }, this, {single: true});
351
- this.field.on('select', this.afterEdit, this);
352
351
  this.field.doInit();
353
352
  }
354
353
  },
355
-
356
- afterEdit: function() {
357
- this.completeEdit && this.completeEdit();
358
- if (this.boundEl || (this.context && this.context.getCell)) {
359
- this.restoreCell();
360
- }
361
- },
362
354
  });
363
355
 
364
356
  /**
@@ -382,7 +382,11 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
382
382
  this.activeEditor = this.factory.getEditorForType(record, this.context);
383
383
  this.activeEditor.editingPlugin = this.editingPlugin;
384
384
  this.activeEditor.grid = this;
385
- return this.activeEditor;
385
+ if (this.activeEditor.field && this.activeEditor.field.externalEditor) {
386
+ return false;
387
+ } else {
388
+ return this.activeEditor;
389
+ }
386
390
  },
387
391
 
388
392
  applyContext: function(context) {
@@ -3,6 +3,8 @@ Ext.define('Coon.common.field.OpenDialogField', {
3
3
  alternateClass: 'SigmaUtilities.view.common.field.OpenDialogField',
4
4
  alias: 'widget.OpenDialogField',
5
5
 
6
+ externalEditor: true,
7
+
6
8
  dialogForm: undefined,
7
9
 
8
10
  setValue: function(value) {
@@ -18,6 +18,8 @@ Ext.define('Coon.common.plugin.form.PeriodPickerPlugin', {
18
18
 
19
19
  init: function(component) {
20
20
  component.format = component.hasOwnProperty('format') ? component.format : this.defaultFormat;
21
+ component.minText = this.minText;
22
+ component.maxText = this.maxText;
21
23
  component.createPicker = function() {
22
24
  const me = this;
23
25
 
@@ -30,6 +32,8 @@ Ext.define('Coon.common.plugin.form.PeriodPickerPlugin', {
30
32
  focusOnShow: true,
31
33
  minDate: me.minValue,
32
34
  maxDate: me.maxValue,
35
+ minText: Ext.String.format(me.minText, me.formatDate(me.minValue)),
36
+ maxText: Ext.String.format(me.maxText, me.formatDate(me.maxValue)),
33
37
  format: me.format,
34
38
  listeners: {
35
39
  scope: me,
@@ -0,0 +1,15 @@
1
+ Ext.define('Coon.overrides.grid.feature.Grouping', {
2
+ override: 'Ext.grid.feature.Grouping',
3
+
4
+ }, function() {
5
+ Ext.Function.interceptBefore(this.prototype, 'onGroupClick', function() {
6
+ if (
7
+ this.grid &&
8
+ this.grid.activeEditor &&
9
+ !this.grid.activeEditor.destroyed &&
10
+ this.grid.activeEditor.completeEdit
11
+ ) {
12
+ this.grid.activeEditor.completeEdit();
13
+ }
14
+ });
15
+ });
@@ -166,7 +166,7 @@ Ext.define('Coon.report.component.report.NorthPanel', {
166
166
  },
167
167
 
168
168
  configureFilterPanel: function(reportFormBean) {
169
- this.reportPanel = this.reportPanel || this.up('ReportPanel');
169
+ this.reportPanel = this.reportPanel || this.up('ReportPanel,ReportFilterForm');
170
170
  const properties = this.reportPanel && this.reportPanel.configProperties ||
171
171
  Coon.Function.convertAdvancedProperties(reportFormBean.properties) || {};
172
172
  Ext.merge(this, properties);
@@ -208,7 +208,6 @@ Ext.define('Coon.report.plugin.configPanel.BindCustomPanelPluginConfigPanel', {
208
208
  items: [
209
209
  this.createDependsOnGridRow(),
210
210
  this.createDependsOnGridParameter(),
211
- // panelCombo,
212
211
  {
213
212
  xtype: 'container',
214
213
  layout: {
@@ -346,6 +345,31 @@ Ext.define('Coon.report.plugin.configPanel.BindCustomPanelPluginConfigPanel', {
346
345
  }
347
346
  ],
348
347
  },
348
+ {
349
+ xtype: 'checkbox',
350
+ boxLabel: 'Блокировка и очистка компонента, если не выбрана строка',
351
+ boxLabelAlign: 'before',
352
+ checked: true,
353
+ margin: '20 0 0 0',
354
+ name: 'enableOnlyWhenSelected',
355
+ bind: '{enableOnlyWhenSelected}',
356
+ },
357
+ {
358
+ xtype: 'container',
359
+ width: '100%',
360
+ margin: '0 0 15 0',
361
+ bind: {
362
+ hidden: '{!enableOnlyWhenSelected}',
363
+ },
364
+ html: `
365
+ <div style="font-size:12px;padding:0 0 0 10px;color:gray">
366
+ <p style="margin:0">Если в качестве компонента выбран Репорт,
367
+ очистка будет осуществлена автоматически.</p>
368
+ <p style="margin:0">В ином случае, будет вызвано событие
369
+ <span style="font-weight: 800;">"clearComponentData"</span>.</p>
370
+ </div>
371
+ `,
372
+ },
349
373
  {
350
374
  xtype: 'checkbox',
351
375
  boxLabel: 'Выключить обработку параметров',
@@ -380,19 +404,72 @@ Ext.define('Coon.report.plugin.configPanel.BindCustomPanelPluginConfigPanel', {
380
404
  ];
381
405
  },
382
406
 
407
+ createDependsOnGridRow() {
408
+ return {
409
+ xtype: 'fieldset',
410
+ title: 'ВСЕГДА зависит от строки отчета',
411
+ checkboxToggle: true,
412
+ checkbox: {
413
+ name: 'dependOnGridRow',
414
+ readOnly: true,
415
+ disabled: true,
416
+ checked: true,
417
+ },
418
+ defaults: {
419
+ flex: 1,
420
+ },
421
+ layout: {
422
+ type: 'vbox',
423
+ align: 'stretch',
424
+ },
425
+ items: [
426
+ {
427
+ xtype: 'container',
428
+ width: '100%',
429
+ html: `
430
+ <div style="font-size:12px;color: red">
431
+ <p>Данное свойство в плагине является неизменяемым!</p>
432
+ <ul style="padding:0 0 0 15px; color: gray">Логика работы:
433
+ <li>Компонент, указанный в плагине, будет получать входные параметры при выборе сроки отчета.</li>
434
+ </ul>
435
+ </div>
436
+ `,
437
+ }
438
+ ],
439
+ };
440
+ },
441
+
383
442
  setContext: function(context) {
384
443
  this.context = context;
444
+ this.setDependOnGridParameterData();
385
445
  this.grid.changeFieldsList(context.fields);
386
446
  this.grid.changeParametersList(context.parameters);
387
447
  this.grid.updateTypeEditor(context.additionalContext);
388
448
  },
389
449
 
450
+ setDependOnGridParameterData() {
451
+ const dependOnGridParameter = this.down('[name=dependOnGridParameters]');
452
+ if (dependOnGridParameter) {
453
+ const data = this.context.parameters.map((item) => {
454
+ item.descriptionFull = `${item.reportParameterCd} (${item.description})`;
455
+ return item;
456
+ });
457
+ dependOnGridParameter.getStore().loadData(data);
458
+ }
459
+ },
460
+
390
461
  doInit: function(config) {
391
462
  this.callParent(arguments);
392
463
  this.grid.doInit(this.convertParameters(config['parameters']) || []);
393
464
  const panelXTypeField = this.lookup('panelXTypeField');
394
465
  this.propertiesGrid.setData(this.convertProperties(config['properties']) || []);
395
466
  this.initPanelXType(panelXTypeField, panelXTypeField.getValue());
467
+
468
+ const dependOnGridRow = this.down('[name=dependOnGridRow]');
469
+ if (!config.dependOnGridRow) {
470
+ config.dependOnGridRow = true;
471
+ dependOnGridRow.setValue(true);
472
+ }
396
473
  },
397
474
 
398
475
  getConfiguration: function() {
@@ -244,7 +244,7 @@ Ext.define('Coon.report.plugin.grid.GridToolbarButtonPlugin', {
244
244
  multiDependencyParameters.push(param);
245
245
  onlyIndependentParameters = false;
246
246
  } else {
247
- reportIndependentParameters.push(param);
247
+ (param.reportNavigationOptionContextSource === 'DFLT') && reportIndependentParameters.push(param);
248
248
  }
249
249
  });
250
250
 
@@ -104,7 +104,7 @@ Ext.define('Coon.report.plugin.grid.ToolbarItemPlugin', {
104
104
  position: this.position,
105
105
  sortSequence: this.sortSequence,
106
106
  pType: this.pluginConfig ? this.pluginConfig.ptype : '',
107
- itemId: this.pluginId,
107
+ itemId: 'p_' + this.pluginId,
108
108
  };
109
109
  if (!this.position || isNaN(Number(this.position)) || Number(this.position) <= 0) {
110
110
  cfg.position = this.sortSequence;
@@ -1,5 +1,5 @@
1
1
  Ext.define('Coon.report.plugin.report.BindCustomPanelPlugin', {
2
- extend: 'Ext.AbstractPlugin',
2
+ extend: 'Coon.report.plugin.grid.GridToolbarButtonPlugin',
3
3
  alias: 'plugin.BindCustomPanelPlugin',
4
4
  uses: [
5
5
  'Coon.report.component.ReportPanel'
@@ -45,6 +45,7 @@ Ext.define('Coon.report.plugin.report.BindCustomPanelPlugin', {
45
45
  this.panel = Ext.widget(this.panelXType, properties);
46
46
  }
47
47
  this.report.addSidePanel(this.panel, this.position, config);
48
+ this.inputParametersConfig = this.getInputParametersConfig();
48
49
  this.afterCreatePanel(config);
49
50
  }, this);
50
51
  },
@@ -86,20 +87,16 @@ Ext.define('Coon.report.plugin.report.BindCustomPanelPlugin', {
86
87
  contextPlugin.buildParamsOnContextChange(events, this.parameters, initPanelCallback);
87
88
  };
88
89
 
89
- addContextEventsListener(['load']);
90
+ addContextEventsListener(['load', 'clear', 'selectionchange', 'filterchange']);
91
+ this.panel.on('save', this.saveHandler, this);
92
+ if (this.reloadAfterComplete && this.panelXType === 'ReportPanel') {
93
+ this.panel.on('needReload', this.saveHandler, this);
94
+ };
90
95
 
91
- if (this.dependOnGridRow) {
92
- addContextEventsListener(['clear', 'selectionchange', 'filterchange']);
93
- this.panel.on('save', this.saveHandler, this);
94
- if (this.reloadAfterComplete && this.panelXType === 'ReportPanel') {
95
- this.panel.on('needReload', this.saveHandler, this);
96
- }
97
- contextPlugin.executeFunction(this.parameters, initPanelCallback);
98
- } else if (this.dependOnGridParameters) {
99
- addContextEventsListener(['clear']);
100
- } else {
101
- contextPlugin.executeFunction(this.parameters, initPanelCallback);
102
- }
96
+ this.enableOnlyWhenSelected = this.enableOnlyWhenSelected === undefined ? true : this.enableOnlyWhenSelected;
97
+ this.panel.setDisabled(this.enableOnlyWhenSelected);
98
+
99
+ this.doInitOnReady(contextPlugin.getParameters(this.parameters));
103
100
  this.panel.on('close', this.closeHandler, this);
104
101
  },
105
102
 
@@ -122,13 +119,53 @@ Ext.define('Coon.report.plugin.report.BindCustomPanelPlugin', {
122
119
  }
123
120
  },
124
121
 
122
+ doInitOnReady(parameters) {
123
+ if (this.panelXType === 'UiCustomPanel') {
124
+ this.panel.on('add', () => {
125
+ this.doInitDependForm(parameters);
126
+ });
127
+ } else if (this.panelXType === 'ReportPanel') {
128
+ this.panel.on('configured', () => {
129
+ this.doInitDependForm(parameters);
130
+ }, this, {single: true});
131
+ } else {
132
+ this.panel.on('afterrender', () => {
133
+ this.doInitDependForm(parameters);
134
+ }, this, {single: true});
135
+ }
136
+ },
137
+
125
138
  doInitDependForm: function(params) {
139
+ const state = this.computeState();
126
140
  if (!params.params) {
127
141
  params.params = Ext.apply({}, params);
128
142
  }
129
143
  if (this.panel.currentParamList && this.mergeParameters) {
130
144
  params.params = Ext.applyIf(params.params, this.panel.currentParamList);
131
145
  }
132
- Coon.Function.executeComponentDoInit(this.panel, params);
146
+ if (!state.disabled) {
147
+ this.enableOnlyWhenSelected && this.panel.setDisabled(false);
148
+ Coon.Function.executeComponentDoInit(this.getTargetComponent(), params);
149
+ } else if (this.enableOnlyWhenSelected) {
150
+ this.panel.setDisabled(true);
151
+ this.clearTargetComponent();
152
+ }
153
+ },
154
+
155
+ getTargetComponent() {
156
+ if (this.panelXType === 'UiCustomPanel') {
157
+ return this.panel.uiPanel;
158
+ } else {
159
+ return this.panel;
160
+ }
161
+ },
162
+
163
+ clearTargetComponent() {
164
+ if (this.panelXType === 'ReportPanel') {
165
+ this.panel.clearFilter();
166
+ this.panel.clearData();
167
+ } else {
168
+ this.panel.fireEvent('clearComponentData');
169
+ }
133
170
  },
134
171
  });
@@ -126,12 +126,8 @@ Ext.define('Coon.uielement.component.UiCPWrapper', {
126
126
  if (Array.isArray(this.customBubbleEvents) && this.customBubbleEvents.length) {
127
127
  this.setCustomBubbleEvents(panel);
128
128
  }
129
- this.on('activate', () => {
130
- panel.fireEvent('activate');
131
- });
132
- this.on('deactivate', () => {
133
- panel.fireEvent('deactivate');
134
- });
129
+
130
+ panel.relayEvents(this, ['activate', 'deactivate']);
135
131
  panel.on('dirtychange', (component, state) => {
136
132
  this.fireEvent('dirtychange', this, state);
137
133
  });
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '3.0.74',
3
+ number: '3.0.75',
4
4
  });