ru.coon 2.8.66 → 3.0.2

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 (128) hide show
  1. package/CHANGELOG.md +317 -10
  2. package/package.json +1 -1
  3. package/src/Function.js +1 -1
  4. package/src/VisualLinker.js +610 -0
  5. package/src/VisualLinker.scss +219 -0
  6. package/src/app/Application.js +1 -0
  7. package/src/app/ApplicationSettings.js +49 -0
  8. package/src/app/Config.js +60 -0
  9. package/src/app/Router.js +37 -21
  10. package/src/app/viewPort/CVWrapperPanel.js +53 -0
  11. package/src/app/viewPort/CenterView.js +153 -46
  12. package/src/app/viewPort/CenterView.scss +151 -0
  13. package/src/app/viewPort/ComponentContextManager.js +24 -0
  14. package/src/app/viewPort/Main.js +4 -1
  15. package/src/app/viewPort/Routing.d2 +23 -0
  16. package/src/app/viewPort/TabHistory.js +81 -0
  17. package/src/common/ComponentFactory.js +167 -0
  18. package/src/common/button/DropdownContentButton.js +146 -0
  19. package/src/common/button/DropdownContentButton.scss +92 -0
  20. package/src/common/button/DropdownContentButtonController.js +60 -0
  21. package/src/common/component/formeditor/UiCustomFilterForm.scss +0 -1
  22. package/src/common/component/settings/modules/settingClosePageConfirmation.js +1 -3
  23. package/src/common/component/settings/modules/settingFavoritePanelShow.js +21 -0
  24. package/src/common/component/settings/modules/settingReportCalculator.js +22 -0
  25. package/src/common/component/settings/modules/settingShowNeedReloadMessage.js +1 -3
  26. package/src/common/component/settings/modules/settingwindowHolder.js +2 -3
  27. package/src/common/panel/WindowWrap.js +19 -11
  28. package/src/common/tree/BaseContextMenu.js +4 -3
  29. package/src/log.js +4 -5
  30. package/src/nav/AppNavCalcButton.js +23 -0
  31. package/src/nav/AppNavCalcButton.scss +6 -0
  32. package/src/nav/AppNavigationBar.js +1 -1
  33. package/src/nav/AppNavigationMenuController.js +2 -2
  34. package/src/nav/AppNavigationMenuMinimized.js +61 -0
  35. package/src/nav/AppNavigationPanel.js +115 -0
  36. package/src/nav/AppNavigationPanel.scss +178 -0
  37. package/src/nav/AppNavigationPanelController.js +386 -0
  38. package/src/nav/FavoriteCfg.js +18 -0
  39. package/src/nav/MenuEntity.js +23 -15
  40. package/src/nav/MenuFavoritesBar.js +100 -0
  41. package/src/nav/MenuFavoritesBar.scss +92 -0
  42. package/src/nav/editor/NavigateElementEditorView.js +2 -2
  43. package/src/nav/editor/workspace/NavWorkspaceListView.js +1 -4
  44. package/src/nav/menu/WorkspaceMenuViewMinimized.js +22 -0
  45. package/src/overrides/panel/TabPanel.js +36 -0
  46. package/src/overrides/panel/TabPanel.scss +65 -0
  47. package/src/report/component/ClearFiltersButton.js +4 -1
  48. package/src/report/component/CopyCellValueMenuItem.js +18 -0
  49. package/src/report/component/ReportFieldMap.js +274 -0
  50. package/src/report/component/ReportPanel.js +73 -44
  51. package/src/report/component/ReportPanel.scss +2 -2
  52. package/src/report/component/ReportTagLookup.js +59 -2
  53. package/src/report/component/calculator/ReportCalculatorController.js +266 -0
  54. package/src/report/component/calculator/ReportCalculatorField.js +47 -0
  55. package/src/report/component/calculator/ReportCalculatorHistoryPlugin.js +128 -0
  56. package/src/report/component/calculator/ReportCalculatorHistoryPlugin.scss +33 -0
  57. package/src/report/component/calculator/ReportCalculatorMenuItem.js +101 -0
  58. package/src/report/component/calculator/ReportCalculatorMenuItem.scss +41 -0
  59. package/src/report/component/calculator/ReportCalculatorPanel.js +363 -0
  60. package/src/report/component/calculator/ReportCalculatorPanel.scss +86 -0
  61. package/src/report/component/reportpanel/CopyReportPanelController.js +1 -1
  62. package/src/report/component/reportpanel/FilterPanel.js +13 -15
  63. package/src/report/component/reportpanel/FilterPanel.scss +5 -1
  64. package/src/report/component/reportpanel/FormFieldFocusPlugin.js +157 -0
  65. package/src/report/component/reportpanel/FormFieldFocusPlugin.scss +14 -0
  66. package/src/report/component/reportpanel/NorthPanel.js +16 -17
  67. package/src/report/component/reportpanel/NorthPanel.scss +1 -1
  68. package/src/report/component/reportpanel/ReportContextMenu.js +219 -0
  69. package/src/report/component/reportpanel/ReportGrid.js +1 -0
  70. package/src/report/component/reportpanel/ReportGrid.scss +4 -0
  71. package/src/report/component/settings/field/ReportFormFieldsGrid.js +2 -2
  72. package/src/report/component/settings/field/ReportFormFieldsGridController.js +2 -2
  73. package/src/report/component/settings/property/ReportPropertiesPanelController.js +1 -1
  74. package/src/report/component/settings/property/ReportPropertyDictionary.js +7 -0
  75. package/src/report/plugin/configPanel/AddFilterConditionPluginConfigPanel.js +34 -11
  76. package/src/report/plugin/configPanel/GridFiltersPluginConfigPanelFiltersGrid.js +3 -2
  77. package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.js +274 -255
  78. package/src/report/plugin/configPanel/openCustomPanelButtonPlugin/OpenCustomPanelButtonPluginConfigPanel.scss +17 -0
  79. package/src/report/plugin/grid/AddFilterConditionPlugin.js +530 -87
  80. package/src/report/plugin/grid/CalculatorPlugin.js +90 -0
  81. package/src/report/plugin/grid/GridContextMenu.js +12 -10
  82. package/src/report/plugin/grid/GridRowCountPlugin.js +0 -1
  83. package/src/report/plugin/grid/GridToolbarButtonPlugin.js +11 -2
  84. package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +126 -89
  85. package/src/report/plugin/grid/ReportColumnStatePlugin.js +15 -3
  86. package/src/report/plugin/grid/SetSingleParameterPlugin.js +1 -1
  87. package/src/report/plugin/grid/ToolbarButtonPlugin.js +1 -1
  88. package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanel.js +55 -0
  89. package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanelController.js +226 -0
  90. package/src/report/plugin/grid/addFilterConditionPlugin/FilterConfigMixin.js +138 -0
  91. package/src/report/plugin/grid/addFilterConditionPlugin/FilterFieldFactory.js +223 -0
  92. package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.js +164 -0
  93. package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.scss +21 -0
  94. package/src/report/plugin/grid/addFilterConditionPlugin/FilterMenu.js +29 -0
  95. package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanel.js +53 -0
  96. package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanelController.js +57 -0
  97. package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.js +111 -0
  98. package/src/report/plugin/grid/addFilterConditionPlugin/InfoMenuItem.scss +83 -0
  99. package/src/report/plugin/grid/addFilterConditionPlugin/SelectColumnPanel.js +102 -0
  100. package/src/report/selectionModels/MixedRowSelectionModel.js +36 -45
  101. package/src/report/toolbar/dropdown/ToolbarOverflowButton.js +16 -5
  102. package/src/report/toolbar/dropdown/ToolbarOverflowPanel.scss +26 -14
  103. package/src/report/toolbar/layout/ReportToolbarOverflow.js +5 -2
  104. package/src/ringBuffer.js +7 -3
  105. package/src/uielement/command/GetUIElementCommand.js +0 -1
  106. package/src/uielement/component/UiCPWrapper.js +26 -36
  107. package/src/uielement/component/UiCustomController.js +7 -0
  108. package/src/uielement/component/UiCustomPanel.js +46 -2
  109. package/src/uielement/component/settings/UiCustomPanelEditorController.js +35 -29
  110. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.js +146 -33
  111. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGrid.scss +28 -0
  112. package/src/uielement/component/settings/plugin/UiCustomPanelPluginGridController.js +366 -22
  113. package/src/uielement/component/settings/plugin/UiCustomPanelPluginModel.js +1 -0
  114. package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanel.js +10 -4
  115. package/src/uielement/component/settings/plugin/UiCustomPanelPluginPanelController.js +28 -30
  116. package/src/uielement/plugin/UnifiedButtonToolbarPlugin.js +203 -22
  117. package/src/uielement/plugin/configPanel/ExecuteFunctionPluginConfigPanelFormEditor.js +4 -36
  118. package/src/uielement/plugin/configPanel/FireEventPluginConfigPanelFormEditor.js +5 -36
  119. package/src/uielement/plugin/configPanel/MethodChainPluginConfigPanelFormEditor.js +4 -36
  120. package/src/uielement/plugin/configPanel/OpenPanelPluginConfigPanelFormEditor.js +2 -38
  121. package/src/uielement/plugin/configPanel/PrintPdfPluginConfigPanelFormEditor.js +2 -35
  122. package/src/uielement/plugin/configPanel/UiCPPluginFormPanel.js +54 -0
  123. package/src/uielement/plugin/configPanel/UnifiedButtonToolbarPluginConfigPanelFormEditor.js +28 -18
  124. package/src/userSettings.js +1 -0
  125. package/src/util/ContextManager.js +109 -0
  126. package/src/util.js +96 -15
  127. package/src/version.js +1 -1
  128. package/src/app/viewPort/CenterViewController.js +0 -158
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Компонент DropdownContentButton представляет собой кнопку,
3
+ * при активации которой появляется модальное окно, визуально связанное с кнопкой общими границами и бэкграундом.
4
+ * При инициализации компонента в качестве конфига можно передавать как параметры для самой кнопки,
5
+ * так и конфигурационные параметры для всплывающей панели (в стиле 'camelCase' с префиксом panel: 'panelItems')
6
+ * Параметры конфига компонента:
7
+ * Все валидные параметры для компонентов класса Ext.button.Button
8
+ * Все валидные параметры для компонентов класса Ext.panel.Panel:
9
+ * * должны начинать с префикса 'panel' в стиле 'camelCase',
10
+ * * параметры будут перенесены в конфиг дочерней панели без префикса, пример:
11
+ * * panelWidth: 500 -> width: 500
12
+ * alignment: выравнивание модального окна относительно кнопки.
13
+ * * Принимает строку (пример: 'br'), в которой:
14
+ * * первая буква ('b'/'t') - вертикальное позиционирование контента относительно кнопки (bottom/top)
15
+ * * вторая буква ('r'/'l'/'f') - по какой из горизонтальных сторон кнопки выравнивается контент (left / right), либо 'f' - full-screen mode
16
+ * verticalOffset: размер отступа между кнопкой и контентной частью
17
+ * roundCorners: true | false - добавляет скругление углов при соединении элементов
18
+ * bgColor: цвет фона кнопки и контент-части;
19
+ * borderColor: цвет общей рамки;
20
+ * outerBgColor: цвет фона внешнего окружения
21
+ */
22
+ Ext.define('Coon.common.button.DropdownContentButton', {
23
+ extend: 'Ext.button.Button',
24
+ xtype: 'DropdownContentButton',
25
+
26
+ requires: [
27
+ 'Coon.util.VisualLinker'
28
+ ],
29
+
30
+ cls: 'dropdownContentButton',
31
+ iconCls: 'dropdownContentButton-icon',
32
+ overCls: '',
33
+ focusCls: '',
34
+
35
+ // конфигурируемые свойства элемента
36
+ contentPanelConfig: null,
37
+ alignment: 'br',
38
+ verticalOffset: 8,
39
+ roundCorners: false,
40
+ bgColor: null,
41
+ outerBgColor: '#fff',
42
+
43
+ controller: 'DropdownContentButtonController',
44
+
45
+ viewModel: {
46
+ data: {
47
+ isActive: false,
48
+ },
49
+ },
50
+
51
+ listeners: {
52
+ click: 'onMainBtnClick',
53
+ move: 'onMove',
54
+ },
55
+
56
+ initComponent() {
57
+ this.callParent();
58
+
59
+ const defaultPanelConfig = [
60
+ ['xtype', 'panel'],
61
+ ['layout', 'fit'],
62
+ ['floating', true],
63
+ ['shadow', false],
64
+ ['scrollable', true],
65
+ ['alwaysOnTop', false]
66
+ ];
67
+
68
+ // Создаём контент панель, дефолтные параметры конфига при этом в приоритете
69
+ this.contentPanel = Ext.create('Ext.panel.Panel', Ext.apply(
70
+ {
71
+ viewModel: {
72
+ parent: this.getViewModel(),
73
+ },
74
+ },
75
+ Ext.applyIf(Object.fromEntries(defaultPanelConfig), this.contentPanelConfig)
76
+ ));
77
+ this.contentPanel.on({
78
+ beforeshow: 'contentBanelBeforeShow',
79
+ show: function(panel) {
80
+ this.setButtonZIndex(panel);
81
+ const content = panel.items.first();
82
+ if (!content) {
83
+ return;
84
+ }
85
+ content.fireEvent('ownerShow');
86
+ },
87
+ hide: 'returnButtonZIndex',
88
+ scope: this,
89
+ });
90
+ this.setButtonCssVariables();
91
+ },
92
+
93
+ onBoxReady() {
94
+ Coon.util.VisualLinker.createLinkedPair(
95
+ this,
96
+ this.contentPanel,
97
+ {
98
+ leadComponentClass: 'dropdownContentButton',
99
+ alignment: this.alignment,
100
+ outerBgColor: this.outerBgColor,
101
+ verticalOffset: this.verticalOffset,
102
+ roundCorners: this.roundCorners,
103
+ }
104
+ );
105
+ },
106
+
107
+ getContentPanel() {
108
+ return this.contentPanel;
109
+ },
110
+
111
+ setButtonCssVariables() {
112
+ if (this.bgColor) {
113
+ this.setStyle('--bg-color', this.bgColor);
114
+ }
115
+ },
116
+
117
+ setButtonZIndex(panel) {
118
+ if (!panel.modal) {
119
+ return;
120
+ }
121
+ this.savedZIndex = this.getEl().dom.style.zIndex;
122
+ this.setStyle({
123
+ zIndex: panel.getEl().dom.style.zIndex+5,
124
+ });
125
+ },
126
+
127
+ returnButtonZIndex(panel) {
128
+ if (!panel.modal) {
129
+ return;
130
+ }
131
+
132
+ this.setStyle({
133
+ zIndex: this.savedZIndex || undefined,
134
+ });
135
+ },
136
+
137
+ contentBanelBeforeShow(panel) {
138
+ if (panel.autoSize) {
139
+ const body = Ext.getBody();
140
+ const widthDecrement = panel.widthDecrement || 60;
141
+ const heightDecrement = panel.heightDecrement || 100;
142
+ this.getContentPanel().setWidth(body.getWidth() - widthDecrement);
143
+ this.getContentPanel().setHeight(body.getHeight() - heightDecrement);
144
+ }
145
+ },
146
+ });
@@ -0,0 +1,92 @@
1
+ .dropdownContentButton {
2
+ --btn-width: 30px;
3
+ --btn-height: 30px;
4
+ // переменная --base-foreground-color из material-theme
5
+ --bg-color: var(--base-foreground-color);
6
+ --icon-hover-color: #5fa2dd;
7
+
8
+ border-radius: 6px;
9
+ overflow: hidden;
10
+ background-color: var(--bg-color);
11
+
12
+ &.dropdownContentButton--active {
13
+ .dropdownContentButton-icon {
14
+ transform: rotateX(180deg);
15
+ }
16
+
17
+ &.dropdownContentButton--bottom {
18
+ border-bottom: none;
19
+ border-bottom-left-radius: 0;
20
+ border-bottom-right-radius: 0;
21
+ }
22
+
23
+ &.dropdownContentButton--top {
24
+ border-top: none;
25
+ border-top-left-radius: 0;
26
+ border-top-right-radius: 0;
27
+ }
28
+ }
29
+
30
+ &-btn {
31
+ border-radius: 4px;
32
+ background-color: var(--bg-color);
33
+ transition: background-color 0.2s;
34
+
35
+ &:hover {
36
+ background-color: var(--bg-color);
37
+
38
+ & .dropdownContentButton-icon {
39
+ color: var(--icon-hover-color);
40
+ }
41
+ }
42
+ }
43
+
44
+ &-icon {
45
+ mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjI5Mjg5IDcuMjkyODlDMy42ODM0MiA2LjkwMjM3IDQuMzE2NTggNi45MDIzNyA0LjcwNzExIDcuMjkyODlMMTIgMTQuNTg1OEwxOS4yOTI5IDcuMjkyODlDMTkuNjgzNCA2LjkwMjM3IDIwLjMxNjYgNi45MDIzNyAyMC43MDcxIDcuMjkyODlDMjEuMDk3NiA3LjY4MzQyIDIxLjA5NzYgOC4zMTY1OCAyMC43MDcxIDguNzA3MTFMMTIuNzA3MSAxNi43MDcxQzEyLjMxNjYgMTcuMDk3NiAxMS42ODM0IDE3LjA5NzYgMTEuMjkyOSAxNi43MDcxTDMuMjkyODkgOC43MDcxMUMyLjkwMjM3IDguMzE2NTggMi45MDIzNyA3LjY4MzQyIDMuMjkyODkgNy4yOTI4OVoiIGZpbGw9ImJsYWNrIi8+PC9zdmc+");
46
+ mask-size: 100%;
47
+ mask-repeat: no-repeat;
48
+ mask-position: center;
49
+ background-color: #3d6780;
50
+ }
51
+
52
+ .x-btn-default-small {
53
+ border: none;
54
+ }
55
+ }
56
+
57
+ .dropdownContentButton-content {
58
+ --border-color: #a5a5a5;
59
+ --bg-color: white;
60
+ --shadow-color: #a5a5a5;
61
+
62
+ background-color: var(--bg-color);
63
+ border: 1px solid var(--border-color);
64
+
65
+ &.dropdownContentButton-content--bottom {
66
+ &.dropdownContentButton-content--right {
67
+ box-shadow:
68
+ -2px 4px 6px -1px var(--shadow-color);
69
+ }
70
+
71
+ &.dropdownContentButton-content--left {
72
+ box-shadow:
73
+ 2px 4px 6px -1px var(--shadow-color);
74
+ }
75
+ }
76
+
77
+ &.dropdownContentButton-content--top {
78
+ &.dropdownContentButton-content--right {
79
+ box-shadow:
80
+ -2px -4px 6px -1px var(--shadow-color);
81
+ }
82
+
83
+ &.dropdownContentButton-content--left {
84
+ box-shadow:
85
+ 2px -4px 6px -1px var(--shadow-color);
86
+ }
87
+ }
88
+
89
+ .x-panel-body {
90
+ background-color: var(--bg-color);
91
+ }
92
+ }
@@ -0,0 +1,60 @@
1
+ Ext.define('Coon.common.button.DropdownContentButtonController', {
2
+ extend: 'Ext.app.ViewController',
3
+ alias: 'controller.DropdownContentButtonController',
4
+
5
+ listen: {
6
+ global: {
7
+ mousedown: 'checkDismissClick',
8
+ },
9
+ },
10
+
11
+ onMainBtnClick() {
12
+ const vm = this.getViewModel();
13
+ const isActive = vm.get('isActive');
14
+
15
+ if (!isActive) {
16
+ this.showContent();
17
+ vm.set('isActive', true);
18
+ } else {
19
+ this.hideContent();
20
+ }
21
+ },
22
+
23
+ onMove() {
24
+ const vm = this.getViewModel();
25
+ const isActive = vm.get('isActive');
26
+ if (isActive) {
27
+ this.hideContent();
28
+ }
29
+ },
30
+
31
+ checkDismissClick: function(event) {
32
+ const isActive = this.getViewModel().get('isActive');
33
+ if (isActive) {
34
+ if (!this.getView().contentPanel.owns(event.getTarget()) && !this.getView().owns(event.getTarget())) {
35
+ this.hideContent();
36
+ this.getView().getViewModel().set('isActive', false);
37
+ }
38
+ }
39
+ },
40
+
41
+ showContent() {
42
+ const panel = this.getView().contentPanel;
43
+ const btn = this.getView();
44
+
45
+ panel.show();
46
+ Coon.util.VisualLinker.link(btn, panel);
47
+ },
48
+
49
+ hideContent() {
50
+ const panel = this.getView().contentPanel;
51
+ const vm = this.getViewModel();
52
+ const btn = this.getView();
53
+
54
+ Coon.util.VisualLinker.unlink(btn, panel);
55
+
56
+ panel.hide();
57
+ vm.set('isActive', false);
58
+ this.getView().updateLayout();
59
+ },
60
+ });
@@ -1,5 +1,4 @@
1
1
  .UiCustomFilterForm{
2
- margin-bottom: 20px;
3
2
  margin-top: 5px;
4
3
  .x-form-layout-wrap{
5
4
  border-spacing: 0;
@@ -4,10 +4,8 @@ Ext.define('Coon.common.component.settings.modules.settingClosePageConfirmation'
4
4
  getFieldComponent: (get, set) => {
5
5
  return {
6
6
  xtype: 'checkbox',
7
- fieldLabel: 'Предупреждать при закрытии страницы',
8
- labelAlign: 'left',
7
+ boxLabel: 'Предупреждать при закрытии страницы',
9
8
  value: get(),
10
- labelWidth: 300,
11
9
  listeners: {
12
10
  change: function(_, value) {
13
11
  set(value);
@@ -0,0 +1,21 @@
1
+ Ext.define('Coon.common.component.settings.modules.settingFavoritePanelShow', {
2
+ alias: 'usersetting.favoritePanelHidden',
3
+ requires: ['Coon.setup'],
4
+ defaultValue: false,
5
+ getFieldComponent: (get, set) => {
6
+ return {
7
+ xtype: 'checkbox',
8
+ boxLabel: 'Скрыть панель избранного',
9
+ value: get(),
10
+ listeners: {
11
+ change: function(_, value) {
12
+ set(value);
13
+ Ext.fireEvent('nav:setvisiblefavoritepanel', value);
14
+ },
15
+ },
16
+ };
17
+ },
18
+ init(get) {
19
+ Coon.setup.set('favoritePanelHidden', get());
20
+ },
21
+ });
@@ -0,0 +1,22 @@
1
+ Ext.define('Coon.common.component.settings.modules.settingReportCalculator', {
2
+ alias: 'usersetting.settingReportCalculator',
3
+ requires: ['Coon.setup'],
4
+ defaultValue: false,
5
+ getFieldComponent: (get, set) => {
6
+ return {
7
+ xtype: 'checkbox',
8
+ boxLabel: 'Показывать калькулятор',
9
+ value: get(),
10
+ listeners: {
11
+ change: function(_, value) {
12
+ Coon.setup.set('showReportCalculator', !!value);
13
+ Ext.fireEvent('enableReportCalculator', !!value);
14
+ set(value);
15
+ },
16
+ },
17
+ };
18
+ },
19
+ init(get) {
20
+ Coon.setup.set('showReportCalculator', get());
21
+ },
22
+ });
@@ -4,10 +4,8 @@ Ext.define('Coon.common.component.settings.modules.settingShowNeedReloadMessage'
4
4
  getFieldComponent: (get, set) => {
5
5
  return {
6
6
  xtype: 'checkbox',
7
- fieldLabel: 'Выводить сообщение о необходимости перезагрузить старницу после обновления приложения',
8
- labelAlign: 'left',
7
+ boxLabel: 'Выводить сообщение о необходимости перезагрузить старницу после обновления приложения',
9
8
  value: get(),
10
- labelWidth: 300,
11
9
  listeners: {
12
10
  change: function(_, value) {
13
11
  set(value);
@@ -5,12 +5,11 @@ Ext.define('Coon.common.component.settings.modules.settingwindowHolder', {
5
5
  getFieldComponent: (get, set) => {
6
6
  return {
7
7
  xtype: 'checkbox',
8
- fieldLabel: 'сворачивать окно добавления/редактирования',
9
- labelAlign: 'left',
8
+ boxLabel: 'Сворачивать окно добавления/редактирования',
10
9
  value: get(),
11
- labelWidth: 300,
12
10
  listeners: {
13
11
  change: function(_, value) {
12
+ Coon.setup.set('windowHolderMode', !!value);
14
13
  set(value);
15
14
  },
16
15
  },
@@ -10,7 +10,7 @@ Ext.define('Coon.common.panel.WindowWrap', {
10
10
  },
11
11
  addCloseButton: false,
12
12
  closable: true,
13
- constrain: true,
13
+ // constrain: true,
14
14
  scrollable: false,
15
15
  maximizable: true,
16
16
  maximized: false,
@@ -20,7 +20,7 @@ Ext.define('Coon.common.panel.WindowWrap', {
20
20
  layout: 'fit',
21
21
  frame: false,
22
22
  border: false,
23
- modal: true,
23
+ modal: false,
24
24
  closeAction: 'destroy',
25
25
  alwaysInCenter: false,
26
26
  callbackFn: undefined,
@@ -62,13 +62,11 @@ Ext.define('Coon.common.panel.WindowWrap', {
62
62
  },
63
63
 
64
64
  updateConstraints: function() {
65
- const viewPortSize = Ext.getBody().getViewSize();
65
+ const viewPortSize = this.constrainView.getSize();
66
66
  this.maxWidth = viewPortSize.width;
67
67
  this.maxHeight = viewPortSize.height;
68
-
69
68
  const isWinMaximized = this.height >= this.maxHeight && this.width >= this.maxWidth;
70
69
  this.maximized = this.maximized || isWinMaximized;
71
-
72
70
  if (this.maximized) {
73
71
  const defaultRestoreSize = {
74
72
  height: 500,
@@ -77,10 +75,10 @@ Ext.define('Coon.common.panel.WindowWrap', {
77
75
  this.height = Ext.isEmpty(this.height) ? defaultRestoreSize.height : this.height;
78
76
  this.width = Ext.isEmpty(this.width) ? defaultRestoreSize.width : this.width;
79
77
  }
80
-
81
78
  if (this.alwaysInCenter) {
82
79
  this.center();
83
80
  }
81
+ this.updateLayout();
84
82
  },
85
83
 
86
84
  updateDem(panel) {
@@ -103,8 +101,10 @@ Ext.define('Coon.common.panel.WindowWrap', {
103
101
  const me = this;
104
102
  const panel = this.items;
105
103
  panel.header = false;
104
+ this.constrainView = Ext.getBody();// Coon.app.Config.get('mainViewXType');
105
+ // this.constrainTo = this.constrainView.getEl();
106
106
  this.updateDimensions(panel);
107
- this.resizerDestroier = Ext.on('resize', this.updateConstraints, this);
107
+ this.constrainView.on('resize', this.updateConstraints, this);
108
108
  this.tools = this.tools || [];
109
109
  if (this.canHold) {
110
110
  this.tools.unshift({
@@ -130,6 +130,18 @@ Ext.define('Coon.common.panel.WindowWrap', {
130
130
  handler: Ext.bind(this.openInNewWindow, this),
131
131
  }];
132
132
  }
133
+ this.on({
134
+ show: () => {
135
+ this.constrainView.mask();
136
+ },
137
+ hide: () => {
138
+ this.constrainView.unmask();
139
+ },
140
+ destroy: () => {
141
+ this.constrainView.unmask();
142
+ },
143
+ scope: this,
144
+ });
133
145
  this.callParent();
134
146
  this.setFocusTarget(panel);
135
147
  this.content = this.items.getAt(0);
@@ -211,8 +223,4 @@ Ext.define('Coon.common.panel.WindowWrap', {
211
223
  window.open(url);
212
224
  },
213
225
 
214
- onDestroy: function() {
215
- // Ext.destroy(this.resizerDestroier);
216
- },
217
-
218
226
  });
@@ -10,12 +10,13 @@ Ext.define('Coon.common.tree.BaseContextMenu', {
10
10
  validate: function() {
11
11
  let count = 0;
12
12
  if (this.items) {
13
+ this.shouldDisplaySeparator = false;
13
14
  this.items.each(Ext.bind(function(item) {
14
- if (item.xtype == 'menuseparator') {
15
+ if (item.xtype === 'menuseparator') {
15
16
  item.setVisible(this.shouldDisplaySeparator);
16
17
  this.shouldDisplaySeparator = false;
17
18
  }
18
- if (item.isValid) {
19
+ if (Ext.isFunction(item.isValid)) {
19
20
  const valid = item.isValid();
20
21
  item.setVisible(valid);
21
22
  if (valid) {
@@ -23,7 +24,7 @@ Ext.define('Coon.common.tree.BaseContextMenu', {
23
24
  this.shouldDisplaySeparator = true;
24
25
  }
25
26
  }
26
- }, this), {shouldDisplaySeparator: false});
27
+ }, this));
27
28
  }
28
29
  return count;
29
30
  },
package/src/log.js CHANGED
@@ -19,9 +19,6 @@ Ext.define('Coon.log', {
19
19
  const me = this;
20
20
  if (!this.getInit() && this.isDebug) {
21
21
  this.setInit(true);
22
- if (this.isDebug) {
23
- this.injectViewer();
24
- }
25
22
  }
26
23
  this.consoleError = window.console.error;
27
24
  this.getConsoleError = function() {
@@ -98,7 +95,7 @@ Ext.define('Coon.log', {
98
95
  // eslint-disable-next-line no-console
99
96
  console.trace(...args);
100
97
  } else {
101
- if (Coon.log.isProduction && level === 'error') {
98
+ if (Coon.log.isProduction() && level === 'error') {
102
99
  Coon.log.getConsoleError()(` [${level}]: `, ...args);
103
100
  } else {
104
101
  // eslint-disable-next-line no-console
@@ -160,7 +157,9 @@ Ext.define('Coon.log', {
160
157
  getEmptyProxy() {
161
158
  const proxy = new Proxy({}, {
162
159
  get() {
163
- return () => proxy;
160
+ return function() {
161
+ return proxy;
162
+ };
164
163
  },
165
164
  });
166
165
  return proxy;
@@ -0,0 +1,23 @@
1
+ Ext.define('Coon.nav.AppNavCalcButton', {
2
+ extend: 'Ext.button.Button',
3
+ xtype: 'AppNavCalcButton',
4
+ cls: 'AppNavCalcButton',
5
+ iconCls: 'svg-icon svg-icon-calculator',
6
+ hidden: false,
7
+ width: 40,
8
+ height: 40,
9
+ margin: 0,
10
+
11
+ initComponent() {
12
+ this.setVisible(Coon.setup.get('showReportCalculator'));
13
+ Ext.on('enableReportCalculator', (enabled) => {
14
+ this.setVisible(enabled);
15
+ }, this);
16
+ this.callParent();
17
+ },
18
+
19
+ handler() {
20
+ Coon.report.component.calculator.ReportCalculatorPanel.open();
21
+ this.blur();
22
+ },
23
+ });
@@ -0,0 +1,6 @@
1
+ .AppNavCalcButton{
2
+ .x-btn-icon-el.svg-icon{
3
+ width: 20;
4
+ height: 28;
5
+ }
6
+ }
@@ -7,6 +7,7 @@ Ext.define('Coon.nav.AppNavigationBar', {
7
7
  controller: 'AppNavigationBarViewController',
8
8
 
9
9
  cls: 'AppNavigationBar',
10
+ hidden: true,
10
11
 
11
12
  layout: {
12
13
  type: 'hbox',
@@ -42,7 +43,6 @@ Ext.define('Coon.nav.AppNavigationBar', {
42
43
  const el = Ext.create({
43
44
  xtype: 'AppNavTab',
44
45
  tabId: tab.id,
45
- hidden: !Coon.setup.get('overrides.displacedMode'),
46
46
  tooltip: text,
47
47
  text,
48
48
  first: idx === 0,
@@ -12,14 +12,14 @@ Ext.define('Coon.nav.AppNavigationMenuController', {
12
12
  menuUpdate: false,
13
13
  lastRoute: false,
14
14
  init: function(view) {
15
+ this.router = Ext.getApplication().appRouter;
15
16
  view.updateSelection = this.updateSelection.bind(this);
16
17
  view.getMenuReady = this.getMenuReady.bind(this);
17
18
  view.getFirstAvailable = this.getFirstAvailable.bind(this);
18
19
  view.changeMicro = this.changeMicro.bind(this);
19
20
  view.changeWorkspace = this.changeWorkspace.bind(this);
20
21
  this.view.on('selectionchange', this.onSelectMenuItem, this);
21
- const appRouter = Ext.getApplication().appRouter;
22
- this.lastRoute = appRouter && appRouter.lastRoute;
22
+ this.lastRoute = this.router && this.router.lastRoute;
23
23
  this.loadMenu(false, !!this.lastRoute);
24
24
  Ext.on('route:initial', (route) => {
25
25
  this.selectThenMenuReady = route.id;
@@ -0,0 +1,61 @@
1
+ Ext.define('Coon.nav.AppNavigationMenuMinimized', {
2
+ extend: 'Ext.Panel',
3
+ xtype: 'AppNavigationMenuMinimized',
4
+ // mixins: ['Coon.mixin.RelayMethods'],
5
+ requires: [
6
+ 'Coon.nav.menu.WorkspaceMenuView',
7
+ 'Coon.nav.AppNavigationMenuController'
8
+ ],
9
+ scrollable: 'y',
10
+ selectFirstOnLoad: true,
11
+ controller: 'AppNavigationMenuController',
12
+ viewModel: {
13
+ data: {
14
+ workspace_descr: null,
15
+ workspace_list: null,
16
+ workspace_icon: null,
17
+ navCollapsed: true,
18
+ collapsedWidth: 44,
19
+ fullWidth: 260,
20
+ },
21
+ },
22
+ fullWidth: 260,
23
+ cls: 'AppNavigationMenu',
24
+ layout: {
25
+ type: 'vbox',
26
+ align: 'stretch',
27
+ },
28
+ items: [
29
+ {
30
+ xtype: 'button',
31
+ textAlign: 'left',
32
+ margin: '0 0 15px 0',
33
+ bind: {
34
+ text: '{workspace_descr}',
35
+ menu: '{workspace_list}',
36
+ iconCls: '{workspace_icon}',
37
+ arrowVisible: '{!navCollapsed}',
38
+ },
39
+ },
40
+ {
41
+ xtype: 'WorkspaceMenuViewMinimized',
42
+ width: 260,
43
+ reference: 'WorkspaceMenuView',
44
+ store: {
45
+ root: {
46
+ expanded: true,
47
+ children: null,
48
+ },
49
+ },
50
+ }
51
+ ],
52
+
53
+ bind: {
54
+ width: `{!navCollapsed ? fullWidth : collapsedWidth}`,
55
+ },
56
+ initComponent: function() {
57
+ this.callParent();
58
+ this.relayEvents(this.lookup('WorkspaceMenuView'), ['selectionchange']);
59
+ },
60
+
61
+ });