ru.coon 2.8.53 → 2.8.55

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.8.55, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/64f911d4d6fb3907fa76bd53d21e5d260ebeb655)
2
+ # Version 2.8.54, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/57cf1e02a88adae16228d487145fd5b1fa012078)
3
+ * ## Features
4
+ * <span style='color:green'>feat: AddDoInitSupportPlugin predefine input parameters in viewModel, UiCPWrapper add inheritViewModel property</span> ([cf7bf1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cf7bf17cf68a551b8746f750158964df33c22788))
5
+
6
+ * update: CHANGELOG.md ([c15697], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c15697ca7b353c5521c832f5fc574fca5c5f8b94))
7
+
1
8
  # Version 2.8.53, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bcfb669a9fd715244f642af2782f77713ec4d9c5)
2
9
  # Version 2.8.52, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f09d0df73622befab3f7f6d08aaea3ad696e036d)
3
10
  * UiCustomPanel - force init empty parameters as 'null' (AddDoInitSupportPlugin) ([aed95f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aed95f7586a370fbee59166203d0482bc0a7ee42))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "2.8.53",
7
+ "version": "2.8.55",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -260,6 +260,9 @@ Ext.define('Coon.report.component.SimplestReportCombo', {
260
260
  },
261
261
 
262
262
  onComplete: function(map) {
263
+ if (this.destroyed) {
264
+ return;
265
+ };
263
266
  this.setBusy(false);
264
267
  if (this.DANGEROUS_AMOUNT_OF_DATA && map.length > this.DANGEROUS_AMOUNT_OF_DATA) {
265
268
  if (this.getCutDangerousAmount()) {
@@ -63,6 +63,11 @@ Ext.define('Coon.uielement.component.UiCPWrapper', {
63
63
 
64
64
  renderPanel: function(panelConfig) {
65
65
  const config = Object.assign({}, panelConfig, this.initConfig);
66
+ config.inheritViewModel = this.inheritViewModel;
67
+ if (this.inheritViewModel) {
68
+ const parentViewModel = this.findParentByType('UiCustomPanel').getViewModel();
69
+ config.viewModel = parentViewModel;
70
+ }
66
71
  const panel = Ext.create('widget.UiCustomPanel', config);
67
72
  this.uiPanel = panel;
68
73
  panel.on('afterrender', function() {
@@ -57,4 +57,26 @@ Ext.define('Coon.uielement.component.UiCustomPanel', {
57
57
 
58
58
  copyLink: false,
59
59
 
60
+ initComponent() {
61
+ if (!this.inheritViewModel) {
62
+ this.viewModel = this.viewModel || {type: 'UiCustomPanelViewModel'};
63
+ this.viewModel.data = this.viewModel.data || {};
64
+ this.viewModel = {
65
+ data: Ext.applyIf(this.viewModel.data, this.getViewModelData()),
66
+ };
67
+ }
68
+ this.callParent();
69
+ },
70
+
71
+ getViewModelData() {
72
+ const data = {};
73
+ const addDoInitSupportPlugin = this.plugins && this.plugins.find((plugin) => plugin.ptype === 'AddDoInitSupportPlugin');
74
+ if (addDoInitSupportPlugin) {
75
+ addDoInitSupportPlugin.parametersToModel.forEach((param) => {
76
+ data[param.value] = undefined;
77
+ });
78
+ }
79
+ return data;
80
+ },
81
+
60
82
  });
@@ -59,10 +59,9 @@ Ext.define('Coon.uielement.plugin.AddDoInitSupportPlugin', {
59
59
  }
60
60
  const dataMapping = this.getInputParams();
61
61
  parameters.forEach((el, index) => {
62
- if (!this.validatePath(dataMapping[index].valuePath)) {
63
- return;
62
+ if (this.validatePath(dataMapping[index].valuePath) && (el !== null)) {
63
+ this.vm.set(dataMapping[index].valuePath, el);
64
64
  }
65
- this.vm.set(dataMapping[index].valuePath, el || null);
66
65
  });
67
66
  },
68
67
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '2.8.53',
3
+ number: '2.8.55',
4
4
  });