ru.coon 3.0.60 → 3.0.62

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.
Files changed (34) hide show
  1. package/.husky/pre-commit +0 -0
  2. package/CHANGELOG.md +21 -2
  3. package/package.json +1 -1
  4. package/src/app/Application.js +2 -1
  5. package/src/app/Router.js +41 -19
  6. package/src/app/viewPort/CenterView.js +8 -3
  7. package/src/common/ComponentFactory.js +1 -0
  8. package/src/common/component/OpenComponent.js +514 -0
  9. package/src/common/field/FieldsHelper.js +0 -0
  10. package/src/common/panel/WindowWrap.js +0 -0
  11. package/src/common/plugin/form/RequiredFlagPlugin.js +0 -29
  12. package/src/format.js +30 -0
  13. package/src/report/component/ReportFilterForm.js +10 -2
  14. package/src/report/component/ReportPanel.js +34 -40
  15. package/src/report/component/ReportPanel.scss +13 -0
  16. package/src/report/component/reportpanel/FilterPanel.js +2 -2
  17. package/src/report/component/reportpanel/FilterPanelLegend.js +8 -0
  18. package/src/report/component/reportpanel/FilterPanelLegend.scss +2 -2
  19. package/src/report/component/reportpanel/NorthPanel.js +132 -98
  20. package/src/report/component/reportpanel/NorthPanel.scss +75 -6
  21. package/src/report/component/reportpanel/ReportGrid.js +0 -1
  22. package/src/report/component/reportpanel/SideFilterPanel.js +512 -0
  23. package/src/report/component/reportpanel/SideFilterPanel.scss +88 -0
  24. package/src/report/plugin/configPanel/ControlColumnByParamPluginConfigPanel.js +71 -2
  25. package/src/report/plugin/configPanel/ControlColumnByParamPluginConfigPanelGrid.js +1 -1
  26. package/src/report/plugin/form/ReportGroupsFieldValidationPlugin.js +5 -8
  27. package/src/report/plugin/grid/ControlColumnByParamPlugin.js +34 -35
  28. package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +384 -362
  29. package/src/report/util.js +27 -27
  30. package/src/uielement/component/formchips/FilterConditionToolbarController.js +7 -0
  31. package/src/util.js +9 -7
  32. package/src/validator.js +28 -34
  33. package/src/version.js +1 -1
  34. package/src/common/AbstractPlugin.js +0 -17
package/.husky/pre-commit CHANGED
File without changes
package/CHANGELOG.md CHANGED
@@ -1,7 +1,26 @@
1
- # Version 3.0.60, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b3ba3aeb89954b8e1650cb40e052a4509b4809fb)
1
+ # Version 3.0.62, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/84377986f250a0a6d0428be0f0b4439bc8e4b080)
2
+ * sync ([368524], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/368524d52dd3f4fe03818291c6418246af14d81f))
3
+ * sync ([7896b3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7896b3427c19ff691b961deca2c28bac9e39145d))
4
+ * sync ([aa2c61], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aa2c61b0e9f0d57e1f8fa1a5a47231cc70cc7813))
5
+ * update: CHANGELOG.md ([0624d1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0624d16d97c878b4e695b775a6a08cb00d3f12bd))
6
+
7
+ # Version 3.0.61, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0a79e6af1f962bbf5062d7a242281b679c4b0f35)
8
+ * update: CHANGELOG.md ([dcc546], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dcc5460b35c3144e1f382de27906035b5a6057d8))
9
+
10
+ # Version 3.0.60, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/af6f2371e1efe0721b4d2419eb765236ad3678b2)
11
+ * ## Features
12
+ * <span style='color:green'>feat: [ControlColumnByParamPlugin] Добавлена поддержка диапазона чисел. Resolve HT-14601.</span> ([3fc25d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3fc25d2a05b22f90b02aa2d2798e2ce23d3a5197))
13
+
2
14
  * ## Fixes
3
- * <span style='color:red'>fix validator, util.getByPath</span> ([608e70], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/608e7096603a0ed31656b0f45686bab7a4ee302b))
15
+ * <span style='color:red'>HT-14119 fix double loading FilterPanel with FilterFormEditingPlugin</span> ([43e7be], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/43e7be1760d09b482bafc8bd9f75d146be266d50))
4
16
 
17
+ * HT-13993 добавлена боковая панель фильтров для репортов ([e2d5c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e2d5c7436900d232cd48c9389a685affbacf721a))
18
+ * HT-14628 открытие компонента внутри репорта - закрытие через крестик ([fc4f4e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fc4f4e9112a3ba1a85cb4a064d65d7a7cfb8cec1))
19
+ * prerelease urls ([da6a94], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da6a94022df090290d9ff8f7ae96adf2f486fed8))
20
+ * sync ([4f0a82], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4f0a82ba634e89ef75c8c7006d691725c5252ba1))
21
+ * sync ([f650de], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f650de035c4135485bbe05745b372095d807c565))
22
+ * upd ([47ade3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/47ade3ed0f9782d87c3271b98fa746cb1f4d9157))
23
+ * upd ([7f6bc5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7f6bc58a66df2cac0f35853416c2ef3a0c9a8455))
5
24
  * update: CHANGELOG.md ([e42a2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e42a2a6fb8b511ba174ab5060fc84c683a046945))
6
25
 
7
26
  # Version 3.0.59, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/065a134b1f6c6211d56ef758b127778d5e104faa)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "ru.coon"
5
5
  },
6
6
  "description": "",
7
- "version": "3.0.60",
7
+ "version": "3.0.62",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+http://gitlab-dbr.sigma-it.local/dbr/ru.coon"
@@ -7,6 +7,8 @@ Ext.define('Coon.app.Application', {
7
7
  applicationMainView: null,
8
8
  },
9
9
 
10
+ links: {},
11
+
10
12
  init() {
11
13
  this.appRouter = Coon.app.Router;
12
14
  },
@@ -256,7 +258,6 @@ Ext.define('Coon.app.Application', {
256
258
  },
257
259
 
258
260
  launch: function() {
259
- this.appRouter.onBeforeRouteEnterFn = this.isAuthenticated.bind(this);
260
261
  Ext.on('auth:logout', this.onLogout, this);
261
262
  let jwtToken;
262
263
  let beforeAuth = () => Promise.resolve();
package/src/app/Router.js CHANGED
@@ -1,6 +1,8 @@
1
1
  Ext.define('Coon.app.Router', {
2
2
  mixins: ['Ext.route.Mixin'],
3
3
  singleton: true,
4
+
5
+ maxUrlLength: 2048,
4
6
  constructor() {
5
7
  this.setRoutes({
6
8
  '*': {before: 'onAny'},
@@ -8,6 +10,17 @@ Ext.define('Coon.app.Router', {
8
10
  action: 'onRouteEnter',
9
11
  before: 'validateMenuItem',
10
12
  },
13
+ 'route/:{cmpId}?:{parameters}': {
14
+ action: 'onSpecificRoute',
15
+ conditions: {
16
+ parameters: {
17
+ re: '(.*)?',
18
+ parse: function(values) {
19
+ return Ext.isEmpty(values) ? {} : Ext.urlDecode(values);
20
+ },
21
+ },
22
+ },
23
+ },
11
24
  });
12
25
  Ext.on('router:goToLastRoute', () => {
13
26
  this.onRouteEnter(this.lastRoute);
@@ -16,9 +29,27 @@ Ext.define('Coon.app.Router', {
16
29
 
17
30
  lastRoute: null,
18
31
 
32
+ onSpecificRoute(route) {
33
+ route.urlHash = window.location.hash;
34
+ if (route.urlHash.length > Coon.app.Router.maxUrlLength) {
35
+ return;
36
+ }
37
+
38
+ if (this.getRouterView()) {
39
+ Ext.create('Coon.common.component.OpenComponent', {})
40
+ .loadUIElement(route.cmpId, route.parameters, {urlHash: route.urlHash});
41
+ } else {
42
+ Ext.getApplication().on('centerview:init', () => {
43
+ Ext.create('Coon.common.component.OpenComponent', {})
44
+ .loadUIElement(route.cmpId, route.parameters, {urlHash: route.urlHash});
45
+ });
46
+ }
47
+ },
48
+
19
49
  onAny(action) {
20
50
  if (Ext.getApplication().isAuthenticated()) {
21
51
  action.resume();
52
+ return true;
22
53
  } else {
23
54
  Coon.log.debug('beforeAnyRoute: not authorized');
24
55
  if (action.stop) {
@@ -46,6 +77,7 @@ Ext.define('Coon.app.Router', {
46
77
  route.stop();
47
78
  return;
48
79
  }
80
+ route.urlHash = window.location.hash;
49
81
  return true;
50
82
  } catch (ex) {
51
83
  route.stop();
@@ -53,24 +85,6 @@ Ext.define('Coon.app.Router', {
53
85
  }
54
86
  },
55
87
 
56
- onBeforeRouteEnterFn: null,
57
-
58
- onBeforeRouteEnter() {
59
- if (typeof this.onBeforeRouteEnterFn === 'function') {
60
- return this.onBeforeRouteEnterFn();
61
- }
62
- return true;
63
- },
64
-
65
- onBeforeRouteEnterFailedFn: null,
66
-
67
- onBeforeRouteEnterFailed() {
68
- if (typeof this.onBeforeRouteEnterFailedFn === 'function') {
69
- return this.onBeforeRouteEnterFailedFn();
70
- }
71
- return true;
72
- },
73
-
74
88
  getLastRoute() {
75
89
  return this.lastRoute;
76
90
  },
@@ -85,7 +99,7 @@ Ext.define('Coon.app.Router', {
85
99
  },
86
100
 
87
101
  getRouterView() {
88
- return Ext.ComponentQuery.query('centerview')[0];
102
+ return Ext.getApplication().links && Ext.getApplication().links.centerView;
89
103
  },
90
104
 
91
105
  getActiveComponent() {
@@ -103,4 +117,12 @@ Ext.define('Coon.app.Router', {
103
117
  return jwtToken;
104
118
  },
105
119
 
120
+ assign(urlHash) {
121
+ if (urlHash.length <= Coon.app.Router.maxUrlLength) {
122
+ window.location.assign(urlHash);
123
+ } else {
124
+ Coon.log.debug('urlHash too long');
125
+ }
126
+ },
127
+
106
128
  });
@@ -32,14 +32,17 @@ Ext.define('Coon.app.viewPort.CenterView', {
32
32
 
33
33
  initComponent() {
34
34
  this.callParent();
35
-
35
+ Ext.getApplication().links.centerView = this;
36
36
  Ext.on('route:change', this.setMenuComponent, this);
37
-
38
37
  this.on('beforeadd', function() {
39
38
  return !this.isTabLimit();
40
39
  }, this);
41
-
42
40
  this.on('add', function(_, component) {
41
+ component.on('activate', function(component) {
42
+ if (typeof component.urlHash === 'string' && component.urlHash.startsWith('#')) {
43
+ Coon.app.Router.assign(component.urlHash);
44
+ }
45
+ }, this);
43
46
  component.on('render', function() {
44
47
  this.setScrollButtonVisibility();
45
48
  }, this, {single: true});
@@ -47,6 +50,8 @@ Ext.define('Coon.app.viewPort.CenterView', {
47
50
  this.on('remove', function() {
48
51
  this.setScrollButtonVisibility();
49
52
  }, this);
53
+
54
+ Ext.getApplication().fireEvent('centerview:init');
50
55
  },
51
56
 
52
57
  setScrollButtonVisibility() {
@@ -161,6 +161,7 @@ Ext.define('Coon.common.ComponentFactory', {
161
161
  }
162
162
  const instanceConfig = {
163
163
  xtype: 'CVWrapperPanel',
164
+ urlHash: route.urlHash,
164
165
  closable: true,
165
166
  componentContext: config.componentContext,
166
167
  menuItem: config.menuItem,