ru.coon 3.0.30 → 3.0.32
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 +13 -0
- package/core-uls.d2 +12 -0
- package/core-urls.json +54 -0
- package/package.json +1 -1
- package/src/common/ComponentFactory.js +10 -2
- package/src/report/column/BigNumColumn.js +10 -19
- package/src/report/component/ReportPanel.js +56 -9
- package/src/report/plugin/grid/AddFilterConditionPlugin.js +230 -85
- package/src/report/plugin/grid/OpenCustomPanelButtonPlugin.js +2 -2
- package/src/report/plugin/grid/ToolbarButtonPlugin.js +16 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanel.js +20 -0
- package/src/report/plugin/grid/addFilterConditionPlugin/AdvancedSearchPanelController.js +8 -5
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterFieldFactory.js +2 -1
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterItem.js +6 -5
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanel.js +26 -19
- package/src/report/plugin/grid/addFilterConditionPlugin/FilterWrapPanelController.js +5 -3
- package/src/report/plugin/report/ReportToolbarPlugin.js +14 -0
- package/src/report/toolbar/ButtonsByType.scss +55 -11
- package/src/report/toolbar/OptionsMenuButton.js +98 -0
- package/src/report/toolbar/dropdown/ToolbarOverflowButton.scss +6 -0
- package/src/report/toolbar/dropdown/ToolbarOverflowPanel.js +33 -9
- package/src/report/toolbar/layout/ReportToolbarOverflow.js +55 -36
- package/src/version.js +1 -1
- package/src/util/SimLoadReportCommand.js +0 -71
- package/src/util/SimUpsertReportCommand.js +0 -4
- /package/src/{VisualLinker.js → util/VisualLinker.js} +0 -0
- /package/src/{VisualLinker.scss → util/VisualLinker.scss} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# Version 3.0.32, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/54a1adc38f21829b195830d3eced818bf79b9ae8)
|
|
2
|
+
* HT-13143 feat: Доработка функционала тулбара ([143359], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/14335922547e88e2da04be44ecd90b62b10ba9bb))
|
|
3
|
+
* upd ([bfda87], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bfda878d1063c5c85d7e606457e925186fe99c02))
|
|
4
|
+
* upd ([567480], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/567480f225764cfdfce2ffc5ab2e132d23d7c80f))
|
|
5
|
+
* update: CHANGELOG.md ([aec290], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aec29006235ca1d8f82e3dc1eaa594c797f1a14c))
|
|
6
|
+
|
|
7
|
+
# Version 3.0.31, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9665b81ba1d0a4cded52d8755f915381c0753074)
|
|
8
|
+
* ## Fixes
|
|
9
|
+
* <span style='color:red'>fix OCPB</span> ([d9f750], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d9f7501828ec8437a029d6eb0ef7582e43bac2ba))
|
|
10
|
+
|
|
11
|
+
* TR-13285 fix: BigNumColumn renderer function refactoring ([d80c93], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d80c934d5c5236708918bbaf2b66c3abd6537213))
|
|
12
|
+
* update: CHANGELOG.md ([000f57], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/000f5736911e558f1cf5629700025633e9c820f7))
|
|
13
|
+
|
|
1
14
|
# Version 3.0.30, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/834d4e43ba0766daf8e6fd774f052303d0be81ed)
|
|
2
15
|
* ## Fixes
|
|
3
16
|
* <span style='color:red'> componentContextId not found in cmp config. Related to NEVA-821.</span> ([7627d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7627d4b7d7acd918ee99f1a11bd960844676a0c0))
|
package/core-uls.d2
ADDED
package/core-urls.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"loginPhase": [
|
|
3
|
+
"/info",
|
|
4
|
+
"/revision.json",
|
|
5
|
+
"/login",
|
|
6
|
+
"/generateCSRFToken"
|
|
7
|
+
],
|
|
8
|
+
"readNavMenu": [
|
|
9
|
+
{ "url": "/ReportFormData/get", "params": "reportId:MENU_ALLITEMS" },
|
|
10
|
+
{ "url": "/ReportFormData/get", "params": "reportId.MENU_PROFILE" }
|
|
11
|
+
],
|
|
12
|
+
"uiElement": [
|
|
13
|
+
"/UIElement/get",
|
|
14
|
+
"/UIElement/copy",
|
|
15
|
+
"/UIElement/delete",
|
|
16
|
+
"/UIElement/version/revision/get",
|
|
17
|
+
"/UIElement/version/get",
|
|
18
|
+
"/UIElement/save",
|
|
19
|
+
"/UIElement/import",
|
|
20
|
+
"/UIElement/editor/import",
|
|
21
|
+
"/UIElement/getNameProperties"
|
|
22
|
+
],
|
|
23
|
+
"report": [
|
|
24
|
+
"/ReportConfiguration/get",
|
|
25
|
+
"/ReportConfiguration/delete",
|
|
26
|
+
"/ReportFormData/get",
|
|
27
|
+
"/ReportFormData/getCSVReport",
|
|
28
|
+
"/ReportFormData/getExcelFromRowsOrReport",
|
|
29
|
+
"/ReportFormData/getExcelReport",
|
|
30
|
+
"/ReportFormData/getPdfReport",
|
|
31
|
+
"/ReportFormData/getReportSqlText",
|
|
32
|
+
"/ReportField/get",
|
|
33
|
+
"/Report/version/get",
|
|
34
|
+
"/Report/version/revision/get",
|
|
35
|
+
"/ReportFormMaintenance/save"
|
|
36
|
+
],
|
|
37
|
+
"common": [
|
|
38
|
+
"/personification/personify",
|
|
39
|
+
"/configurationProperty/get",
|
|
40
|
+
"/configurationProperty/getAllPropertiesWithDefault",
|
|
41
|
+
"/configurationProperty/save"
|
|
42
|
+
],
|
|
43
|
+
"entities": [
|
|
44
|
+
"/externalSystem/proxy/SWE/LookUpService/getLookUpList.do",
|
|
45
|
+
"/externalSystem/proxy/SWE/AlgoritmChainBind/get.do",
|
|
46
|
+
"/externalSystem/proxy/SWE/CharacteristicList/get.do",
|
|
47
|
+
"/externalSystem/proxy/SWE/CharacteristicList/getAll.do",
|
|
48
|
+
"externalSystem/proxy/SWE/Entity/getWithAllCharacteristicsByGroups.do",
|
|
49
|
+
"/externalSystem/proxy/SWE/Entity/save.do",
|
|
50
|
+
"/externalSystem/proxy/SWE/EntityGroup/saveCharacters.do",
|
|
51
|
+
"/externalSystem/proxy/SWE/CharacteristicList/save.do",
|
|
52
|
+
"externalSystem/proxy/SWE/AlgoritmChainBind/save.do"
|
|
53
|
+
]
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -56,8 +56,6 @@ Ext.define('Coon.common.ComponentFactory', {
|
|
|
56
56
|
}
|
|
57
57
|
const config = route.uiElement;
|
|
58
58
|
const paramsObject = this.paramsToObject(params);
|
|
59
|
-
const filterDefaults =
|
|
60
|
-
(paramsObject && Object.assign(paramsObject, {doFilter: true})) || {};
|
|
61
59
|
|
|
62
60
|
if (!Ext.isObject(config)) {
|
|
63
61
|
throw new Error('неверный формат элемента пункта меню');
|
|
@@ -76,6 +74,16 @@ Ext.define('Coon.common.ComponentFactory', {
|
|
|
76
74
|
}
|
|
77
75
|
);
|
|
78
76
|
}
|
|
77
|
+
|
|
78
|
+
if (Ext.isObject(paramsObject)) {
|
|
79
|
+
paramsObject.doFilter = 'doFilter' in paramsObject ? paramsObject.doFilter : true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const filterDefaults = Object.assign(
|
|
83
|
+
paramsObject || {},
|
|
84
|
+
config.propertyData?.filterDefaults || {}
|
|
85
|
+
);
|
|
86
|
+
|
|
79
87
|
Object.assign(
|
|
80
88
|
config,
|
|
81
89
|
{xtype: config.xtype, itemId: uiElementCd},
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Ext.define('Coon.report.column.BigNumColumn', {
|
|
2
|
-
extend: 'Ext.grid.Column',
|
|
2
|
+
extend: 'Ext.grid.column.Column',
|
|
3
3
|
alias: 'widget.BigNumColumn',
|
|
4
4
|
alternateClassName: [
|
|
5
5
|
'Sigma.common.column.BigNumColumn',
|
|
6
6
|
'Sigma.grid.column.BigNumColumn'
|
|
7
7
|
],
|
|
8
|
-
uses: [],
|
|
9
|
-
requires: [],
|
|
10
8
|
align: 'right',
|
|
11
9
|
cellSumPluginConfig: {
|
|
12
10
|
valueType: 'float',
|
|
@@ -18,24 +16,17 @@ Ext.define('Coon.report.column.BigNumColumn', {
|
|
|
18
16
|
},
|
|
19
17
|
|
|
20
18
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
23
|
-
* @param {Object} cellValues
|
|
19
|
+
* @param value
|
|
20
|
+
* @param {Object} metaData
|
|
24
21
|
* @returns {string|null}
|
|
25
22
|
*/
|
|
26
|
-
renderer: function(
|
|
27
|
-
const column =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
} else if (Ext.isFunction(this.getDecSeparator)) {
|
|
34
|
-
me = this;
|
|
35
|
-
}
|
|
36
|
-
const value = me ? Coon.format.bigNumFormat(v, me.getDecSeparator(), me.getGroupSeparator(), me.getPrecision()): null;
|
|
37
|
-
if (value !== null) {
|
|
38
|
-
return `<div data-qtip="${Ext.util.Format.htmlEncode(value)}">${value}</div>`;
|
|
23
|
+
renderer: function(value, metaData) {
|
|
24
|
+
const column = this.isXType('gridcolumn') ? this : metaData && metaData.column;
|
|
25
|
+
const formattedValue = column && Ext.isFunction(column.getDecSeparator) ?
|
|
26
|
+
Coon.format.bigNumFormat(value, column.getDecSeparator(), column.getGroupSeparator(), column.getPrecision()) :
|
|
27
|
+
null;
|
|
28
|
+
if (formattedValue !== null) {
|
|
29
|
+
return `<div data-qtip="${Ext.util.Format.htmlEncode(formattedValue)}">${formattedValue}</div>`;
|
|
39
30
|
}
|
|
40
31
|
return null;
|
|
41
32
|
},
|
|
@@ -68,6 +68,13 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
68
68
|
enableChipToolbar: false,
|
|
69
69
|
filtered: false,
|
|
70
70
|
customButtons: false,
|
|
71
|
+
locals: {
|
|
72
|
+
/**
|
|
73
|
+
* Точка монтирования api плагинов репорта
|
|
74
|
+
*/
|
|
75
|
+
api: new Map(),
|
|
76
|
+
plugins: new Map(),
|
|
77
|
+
},
|
|
71
78
|
},
|
|
72
79
|
defaults: {
|
|
73
80
|
split: true,
|
|
@@ -77,9 +84,6 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
77
84
|
|
|
78
85
|
lazyConfigLoading: Coon.setup.get('lazyConfigLoading'),
|
|
79
86
|
|
|
80
|
-
locals: {
|
|
81
|
-
plugins: new Map(),
|
|
82
|
-
},
|
|
83
87
|
/**
|
|
84
88
|
* @property {Coon.report.component.ReportFieldMap}
|
|
85
89
|
*/
|
|
@@ -353,6 +357,11 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
353
357
|
return 'complete loadFakeData';
|
|
354
358
|
},
|
|
355
359
|
|
|
360
|
+
constructor(config) {
|
|
361
|
+
this.callParent(arguments);
|
|
362
|
+
this.getLocals().api = new Map();
|
|
363
|
+
},
|
|
364
|
+
|
|
356
365
|
initComponent: function() {
|
|
357
366
|
this.gridProperties = this.gridProperties || {};
|
|
358
367
|
this.centerProperties = this.centerProperties || {};
|
|
@@ -603,12 +612,23 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
603
612
|
this.addPlugin(config);
|
|
604
613
|
},
|
|
605
614
|
|
|
615
|
+
preprocessPluginConfig(config, xtype) {
|
|
616
|
+
return ![
|
|
617
|
+
'GridQuickSearchPlugin',
|
|
618
|
+
'GridFiltersPlugin', // Исключается, т.к. есть альтернатива - плагин по умолчанию AddFilterConditionPlugin
|
|
619
|
+
'ReportToolbarPlugin',
|
|
620
|
+
'ToolbarSeparatorPlugin' // Не совместим с ReportToolbarPlugin
|
|
621
|
+
].includes(xtype) && config;
|
|
622
|
+
},
|
|
623
|
+
|
|
606
624
|
preprocessPlugins(plugins) {
|
|
625
|
+
const isReportToolbarPlugin = plugins.find((item) => item.uiElement.xtype === 'ReportToolbarPlugin');
|
|
626
|
+
this.isReportToolbarPlugin = isReportToolbarPlugin;
|
|
627
|
+
const defaultConfig = Coon.report.plugin.form.ReportToolbarPlugin.getDefaultConfig();
|
|
628
|
+
this.addToolbarPlugin(isReportToolbarPlugin ?
|
|
629
|
+
Object.assign({}, isReportToolbarPlugin) : defaultConfig
|
|
630
|
+
);
|
|
607
631
|
return plugins.reduce((acc, plugin) => {
|
|
608
|
-
if (plugin.uiElement.xtype === 'ReportToolbarPlugin') {
|
|
609
|
-
this.addToolbarPlugin(Object.assign({}, plugin));
|
|
610
|
-
plugin = false;
|
|
611
|
-
}
|
|
612
632
|
if (typeof this.preprocessPluginConfig === 'function') {
|
|
613
633
|
plugin = this.preprocessPluginConfig(plugin, plugin.uiElement && plugin.uiElement.xtype);
|
|
614
634
|
}
|
|
@@ -715,7 +735,10 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
715
735
|
},
|
|
716
736
|
|
|
717
737
|
clearData: function() {
|
|
718
|
-
|
|
738
|
+
if (this.grid) {
|
|
739
|
+
this.grid.getStore().clearFilter();
|
|
740
|
+
this.grid.clear();
|
|
741
|
+
}
|
|
719
742
|
this.fireEvent('clearData');
|
|
720
743
|
},
|
|
721
744
|
|
|
@@ -1138,6 +1161,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1138
1161
|
},
|
|
1139
1162
|
|
|
1140
1163
|
loadDataByStore(parameterList, invalidateCache) {
|
|
1164
|
+
const stop = Coon.perf.start(`Report.load: ${this.reportId}`);
|
|
1141
1165
|
const store = this.grid.getStore();
|
|
1142
1166
|
store.getProxy().abort();
|
|
1143
1167
|
return new Promise((resolve) => {
|
|
@@ -1148,15 +1172,17 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1148
1172
|
invalidateCache,
|
|
1149
1173
|
},
|
|
1150
1174
|
callback: function(records, operation, success) {
|
|
1175
|
+
Coon.log.debug(Coon.perf.getLog(stop()));
|
|
1151
1176
|
resolve(records);
|
|
1152
1177
|
},
|
|
1178
|
+
scope: this,
|
|
1153
1179
|
});
|
|
1154
1180
|
});
|
|
1155
1181
|
},
|
|
1156
1182
|
|
|
1157
1183
|
loadDataByCommand(command, parameterList, invalidateCache) {
|
|
1158
1184
|
const store = this.grid.getStore();
|
|
1159
|
-
return new Promise((resolve)
|
|
1185
|
+
return new Promise(function(resolve) {
|
|
1160
1186
|
command.on('complete', function(response) {
|
|
1161
1187
|
if (!store.lastOptions) {
|
|
1162
1188
|
store.lastOptions = {};
|
|
@@ -1169,6 +1195,9 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1169
1195
|
store.fireEvent('load', store);
|
|
1170
1196
|
resolve(response && response.list);
|
|
1171
1197
|
}, this);
|
|
1198
|
+
command.on('failure', function(exception) {
|
|
1199
|
+
}, this);
|
|
1200
|
+
|
|
1172
1201
|
|
|
1173
1202
|
this.executeStoreDataCommand(command, {
|
|
1174
1203
|
reportID: this.reportID,
|
|
@@ -1200,4 +1229,22 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
1200
1229
|
const selectedRecords = this.grid.getSelection();
|
|
1201
1230
|
return selectedRecords && selectedRecords.length > 0 && firstSelectedOnly ? selectedRecords[0] : selectedRecords;
|
|
1202
1231
|
},
|
|
1232
|
+
|
|
1233
|
+
registerApi(apiKey, api) {
|
|
1234
|
+
if (this.getLocals().api.has(apiKey)) {
|
|
1235
|
+
Coon.log.warn('Дублирование api ' + apiKey);
|
|
1236
|
+
}
|
|
1237
|
+
this.getLocals().api.set(apiKey, api);
|
|
1238
|
+
},
|
|
1239
|
+
|
|
1240
|
+
getApi(apiKey) {
|
|
1241
|
+
return this.getLocals().api.get(apiKey);
|
|
1242
|
+
},
|
|
1243
|
+
|
|
1244
|
+
isStoreEmpty() {
|
|
1245
|
+
if (!this.grid) {
|
|
1246
|
+
return true;
|
|
1247
|
+
}
|
|
1248
|
+
return this.grid.getStore().getDataSource().getCount() === 0;
|
|
1249
|
+
},
|
|
1203
1250
|
});
|