ru.coon 3.0.48 → 3.0.50

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,8 +1,32 @@
1
+ # Version 3.0.50, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/afdbae38fc7d35cb8df2ad696dc242e0ef3019b1)
2
+ * ## Fixes
3
+ * <span style='color:red'>HT-13994: fix column setVisible bug</span> ([b33727], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b33727b0f0a19ec9a9d502540684ebbc739d4a45))
4
+ * <span style='color:red'> OpenCustomPanelButtonPlugin.getComponentId</span> ([27d009], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/27d009042de742178ecb94de357391524d4aa1fa))
5
+
6
+ * HT-14010 fix: Исправление ситуации когда из-за невидимой колонки CHCK плагин SelectionModelPlugin не добавляет колонку с чекбоксами ([3b2e73], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3b2e73d1079496de3d6c54376b9ec929ac632cfc))
7
+ * Update 2 files
8
+
9
+ - /src/report/plugin/grid/SelectionModelPlugin.js ([- /src], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/- /src/report/component/ReportPanel.jsd76c501bac77bb8fe2a51cfb0e0d312c34dfb9a5))
10
+ * HT-14010 ([6a2864], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6a286433acbf0f803c40cbde3cef2a6a7448d20a))
11
+ * HT-14010 Исправления ([430040], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4300402c10c0b8c1d08b7a7da4ac22a43316bf19))
12
+ * update: CHANGELOG.md ([8b9dd8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b9dd8b58c8532e6554b72dba9e2668899ab5170))
13
+
14
+ # Version 3.0.49, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b638bfa4b3fbcedd6c23dded5a8229c66078bfb6)
15
+ * ## Fixes
16
+ * <span style='color:red'>fix ReportToolbarOverflow - always show overflow panel</span> ([7ee936], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7ee9365bb07903032896fdf874c15ad43571ef0c))
17
+
18
+ * HT-14010 fix: Исправление добавления плагина SelectionModelPlugin ([cd3112], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cd3112588153e414b42680967a05f13fe27da9a4))
19
+ * upd ([f547cd], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f547cd566e3cc3407b0bfff6e8f7e8b825a4a3fe))
20
+ * update: CHANGELOG.md ([2b9860], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2b9860b079d51497bb0ca5f5e05d9368b9d6b708))
21
+
1
22
  # Version 3.0.48, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/227c685c3c849b36bec245c8f91c338cb6ea40f7)
2
23
  * ## Fixes
3
24
  * <span style='color:red'>fix HT-14284 - remove title setting</span> ([29a26d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/29a26d463a68d1755820e08698100eea7fcfb59f))
4
25
 
5
26
  * HT-13994: Исправление работы плагина, добавление кнопки в тулбар для сброса состояния ([feaee6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/feaee672face5d48cdb74326966df8e1d1f6ede5))
27
+ * HT-14010 fix: Исправление ситуации когда из-за невидимой колонки CHCK плагин SelectionModelPlugin не добавляет колонку с чекбоксами ([9a32ac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9a32acd36afefb1cf4df4eb070205771ba20c8fa))
28
+ * HT-13973 Исправление отображения рамок у заголовков ReportTree ([f231b4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f231b43f4e65170e68c75425f84f54de64485bea))
29
+ * upd ([cb8dc8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cb8dc83365186de01f750504bf01cabd499cc03a))
6
30
  * update: CHANGELOG.md ([c2b6ce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c2b6ced6aafc5f28fec8ae207689d3eb5899c449))
7
31
 
8
32
  # Version 3.0.47, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3dd226d0cac935732115784118e6a1acdde75bae)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "3.0.48",
7
+ "version": "3.0.50",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -128,7 +128,8 @@ Ext.define('Coon.app.viewPort.CenterView', {
128
128
 
129
129
  this.add(component);
130
130
 
131
- component.on('titlechange', function(view, title) {
131
+ component.on('titlechange', function(_, title) {
132
+ title = title || '<span style="color:red">ошибка</span>';
132
133
  if (typeof title !== 'string') {
133
134
  if (typeof title.getTitle !== 'function') {
134
135
  return;
@@ -0,0 +1,20 @@
1
+ Ext.define('overrides.grid.header.Container', {
2
+ override: 'Ext.grid.header.Container',
3
+
4
+ getHeaderMenu: function() {
5
+ const menu = this.getMenu();
6
+ let item;
7
+
8
+ if (menu) {
9
+ item = menu.child('#columnItem');
10
+
11
+ if (item) {
12
+ item.menu.hideOnScroll = false;
13
+
14
+ return item.menu;
15
+ }
16
+ }
17
+
18
+ return null;
19
+ },
20
+ });
@@ -935,17 +935,6 @@ Ext.define('Coon.report.component.ReportPanel', {
935
935
  return plugins;
936
936
  },
937
937
 
938
- checkPluginsFeaturesCompat(plugins, features) {
939
- const selectionModelFeature = features.find((feature) => feature.ftype === 'SelectionModelFeature');
940
- if (selectionModelFeature) {
941
- const index = plugins.findIndex((item) => item.ptype === 'SelectionModelPlugin');
942
- if (index !== -1) {
943
- Coon.log.warn('Из-за наличия SelectionModelFeature отключен SelectionModelPlugin');
944
- plugins.splice(index, 1);
945
- }
946
- }
947
- },
948
-
949
938
  createGrid: function(reportBean) {
950
939
  const ns = Coon.report.model.ReportBeanFields;
951
940
  const gridPlugins = this.getPluginConfigByType(
@@ -955,18 +944,26 @@ Ext.define('Coon.report.component.ReportPanel', {
955
944
  );
956
945
 
957
946
  const features = this.getPluginConfigByType('GRID_FEATURE', 'f', reportBean[ns.$plugins]);
958
-
959
947
  const plugins = this.mixPlugins(gridPlugins, [
960
948
  {ptype: 'GridContextPlugin'},
961
949
  {ptype: 'GridContextMenu'},
962
950
  {ptype: 'gridexporter'},
963
951
  {ptype: 'AddFilterConditionPlugin'},
964
952
  {ptype: 'CalculatorPlugin'},
965
- {ptype: 'GridRowCountPlugin'},
966
- {ptype: 'SelectionModelPlugin', defaultMode: true}
953
+ {ptype: 'GridRowCountPlugin'}
967
954
  ]);
968
955
 
969
- this.checkPluginsFeaturesCompat(plugins, features);
956
+ const selectionModelPlugin = Coon.report.plugin.grid.SelectionModelPlugin;
957
+ if (
958
+ selectionModelPlugin.isPluginDefaultModeValid(
959
+ this.gridProperties,
960
+ reportBean,
961
+ plugins,
962
+ features
963
+ )
964
+ ) {
965
+ plugins.push(selectionModelPlugin.defaultModeConfig);
966
+ }
970
967
 
971
968
  plugins.sort(this.raiseUpGroupButton);
972
969
 
@@ -5,6 +5,7 @@ Ext.define('Coon.report.component.reportpanel.ReportTree', {
5
5
  'Coon.report.component.ReportTree'
6
6
  ],
7
7
  xtype: 'ReportTree',
8
+ cls: 'ReportTree',
8
9
  allowDeselect: false,
9
10
  frame: false,
10
11
  columnLines: true,
@@ -0,0 +1,19 @@
1
+ .ReportTree {
2
+ .x-grid-header-ct {
3
+
4
+ .x-column-header-group, .x-column-header-sub-group {
5
+ border-right: 1px solid $panel-header-background-color !important;
6
+ }
7
+
8
+ .x-group-header {
9
+ .x-column-header-group-item {
10
+ border-top: 1px solid $panel-header-background-color !important;
11
+ border-right: 1px solid $panel-header-background-color;
12
+ }
13
+
14
+ .x-column-header-sub-group {
15
+ border-top: 1px solid $panel-header-background-color;
16
+ }
17
+ }
18
+ }
19
+ }
@@ -113,17 +113,18 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
113
113
  return this.properties.reportId;
114
114
  },
115
115
 
116
- getComponentId() {
117
- return this.uiElementCd ? this.getUIElement() : this.getReportId();
116
+ getComponentId(config) {
117
+ return config.isCustomPanel ? this.getUIElement() : this.getReportId();
118
118
  },
119
119
 
120
120
  makeComponentConfig(config, params) {
121
+ const componentId = this.getComponentId(config);
121
122
  if (config.isReport) {
122
123
  config.params.params = Ext.apply({}, params);
123
124
  }
124
125
  const componentContextId = Coon.util.ContextManager.generateKey({
125
126
  params: config.params,
126
- id: this.getComponentId(),
127
+ id: componentId,
127
128
  xtype: config.xtype,
128
129
  source: this.$className.split('.').pop(),
129
130
  });
@@ -140,7 +141,9 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
140
141
  componentConfig: {
141
142
  parentComponent: this.getCmp(),
142
143
  context: Object.assign(
143
- {id: this.getComponentId()},
144
+ {
145
+ id: componentId,
146
+ },
144
147
  config.params
145
148
  ),
146
149
  },
@@ -25,6 +25,33 @@ Ext.define('Coon.report.plugin.grid.SelectionModelPlugin', {
25
25
  getModes: (mode) => ['SINGLE', 'SIMPLE', 'MULTI'].find((m) => !mode || m === mode),
26
26
  },
27
27
 
28
+ statics: {
29
+ defaultModeConfig: {
30
+ ptype: 'SelectionModelPlugin',
31
+ defaultMode: true,
32
+ },
33
+
34
+ isPluginDefaultModeValid(gridProperties, bean, plugins, features) {
35
+ if (!Ext.isObject(bean)) {
36
+ throw new Error('Не определена конфигурация отчета!');
37
+ }
38
+ const isTree = Ext.isObject(bean.properties) && bean.properties.isTree;
39
+ const checkColumn = bean.fields.find((field) => field.reportFieldCd === 'CHCK');
40
+ const selModel = gridProperties.selModel;
41
+ const selectionModelPluginExist = plugins.find((plugin) => plugin.ptype === 'SelectionModelPlugin');
42
+ const selectionModelFeatureExist = features.find((feature) => feature.ftype === 'SelectionModelFeature');
43
+
44
+ const hasBlockingConditions =
45
+ selectionModelPluginExist ||
46
+ selectionModelFeatureExist ||
47
+ checkColumn ||
48
+ isTree ||
49
+ selModel;
50
+
51
+ return !hasBlockingConditions;
52
+ },
53
+ },
54
+
28
55
  init: function(grid) {
29
56
  grid.addCls(
30
57
  this.ptype
@@ -34,7 +61,7 @@ Ext.define('Coon.report.plugin.grid.SelectionModelPlugin', {
34
61
  }, this);
35
62
 
36
63
  grid.on('beforerender', function() {
37
- if (this.defaultMode && this.checkDefaultModeImplementation()) {
64
+ if (this.defaultMode) {
38
65
  this.defaultModeInit();
39
66
  } else {
40
67
  this.byConfigInit();
@@ -55,23 +82,6 @@ Ext.define('Coon.report.plugin.grid.SelectionModelPlugin', {
55
82
  }, this);
56
83
  },
57
84
 
58
- checkDefaultModeImplementation() {
59
- const grid = this.getCmp();
60
- const reportPanel = grid.reportPanel;
61
- let status = true;
62
- if (grid.columns.find((el) => el.dataIndex === 'CHCK')) {
63
- status = false;
64
- } else if (grid.view.isTreeView) {
65
- status = false;
66
- }
67
- if (reportPanel) {
68
- if (reportPanel.gridProperties && reportPanel.gridProperties.selModel) {
69
- status = false;
70
- }
71
- }
72
- return status;
73
- },
74
-
75
85
  byConfigInit() {
76
86
  const grid = this.getCmp();
77
87
  const selModel = grid.getSelectionModel();
@@ -6,4 +6,9 @@
6
6
  .x-menu-item-overflowed {
7
7
  display: none;
8
8
  }
9
+
10
+ .x-btn-default-toolbar-small {
11
+ max-height: 30px;
12
+ padding: 6px 8px;
13
+ }
9
14
  }
@@ -366,7 +366,7 @@ Ext.define('Coon.report.toolbar.layout.ReportToolbarOverflow', {
366
366
  }
367
367
  }
368
368
  this.menuButton.setOverflowIndicator(indicator);
369
- this.enableMenuButton(indicator);
369
+ // this.enableMenuButton(indicator);
370
370
  owner.resumeLayouts();
371
371
  },
372
372
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  Ext.define('Coon.version', {
2
2
  singleton: true,
3
- number: '3.0.48',
3
+ number: '3.0.50',
4
4
  });