ru.coon 2.6.23 → 2.7.0
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 +28 -0
- package/package.json +1 -1
- package/src/common/field/ForeignField.js +1 -1
- package/src/common/panel/WindowWrap.js +9 -0
- package/src/report/component/ReportPanel.js +42 -1
- package/src/report/component/reportpanel/NorthPanel.js +3 -0
- package/src/report/component/reportpanel/ReportGrid.scss +4 -0
- package/src/report/component/settings/property/ReportPropertiesPanel.js +0 -1
- package/src/report/component/settings/property/ReportPropertyDictionary.js +11 -0
- package/src/report/plugin/configPanel/AddFilterConditionPluginConfigPanel.js +195 -0
- package/src/report/plugin/configPanel/AddFilterConditionPluginConfigPanel.scss +53 -0
- package/src/report/plugin/grid/AddFilterConditionPlugin.js +178 -0
- package/src/report/plugin/grid/GridContextMenu.js +50 -12
- package/src/uielement/component/formchips/Chip.js +35 -5
- package/src/uielement/component/formchips/FilterConditionToolbar.js +59 -21
- package/src/uielement/component/formchips/FilterConditionToolbar.scss +29 -8
- package/src/uielement/component/formchips/FilterConditionToolbarController.js +235 -72
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
# Version 2.7.0, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c03c093df3594cbec9b0b6a2e3e4ca8d24b07e76)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: HT-7850 Включение FilterConditionToolbar в ReportPanel</span> ([02015f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/02015fd6518dec2fbbf4a16e8e29ff958fe4f1b3))
|
|
4
|
+
|
|
5
|
+
* refactoring ([1c317f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1c317fadf1591a82907cdff905e69d4978dae061))
|
|
6
|
+
* upd ([e79155], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e791556cf00505255593cd1bf6ad022d75c19d79))
|
|
7
|
+
* HT-7444 Исправление ([043abe], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/043abea7c90d62b17a3c4819845a1e20dda36790))
|
|
8
|
+
* HT-7444 разные проверки ([8255f3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8255f3fd46e907425aca877334cf3d52c42f9232))
|
|
9
|
+
* HT-7444 пункт контекстного меню фильтрации по дате. исправил. ([c36f45], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c36f45ebc46c21bddfb08a9421dd4c6158c29bcb))
|
|
10
|
+
* update: CHANGELOG.md ([f6cba4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f6cba486672b6801c57464bbc8521a59177ec60d))
|
|
11
|
+
|
|
1
12
|
# Version 2.6.23, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e68f6b9665bae4d8969249f451f473ed7298d86f)
|
|
2
13
|
* ## Fixes
|
|
3
14
|
* <span style='color:red'>fix Coon.Function.getDataFromForm - will correct work with fieldcontainers</span> ([87d0f1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/87d0f1faf59496c1f41cc7b2f1c8a153c25ca97c))
|
|
4
15
|
* <span style='color:red'>Fix:HT-7885 Refactoring getDataFromForm function</span> ([158037], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1580375d0b9d430a8a9379bee7806ea1c5bfc85c))
|
|
5
16
|
|
|
17
|
+
* HT-7444 рефакторинг ([80ecef], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/80ecef5a7d9f190e7427df6b4d9d6f3ec065d6aa))
|
|
18
|
+
* HT-7444 adding a filter for different value types ([7c090d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7c090d51a331b021260b15fba7e9136ba9dc3952))
|
|
6
19
|
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/Function.jsb3713a036513a22b8c920b2d4d230fcaf1eb0779))
|
|
7
20
|
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/Function.js3fa4edf5ab6e11a419ed4995c949a0cfe459c1db))
|
|
8
21
|
* update: CHANGELOG.md ([cca905], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cca905a14180478df3c9f460ceb07b2950c14fba))
|
|
@@ -55,24 +68,31 @@
|
|
|
55
68
|
* ## Fixes
|
|
56
69
|
* <span style='color:red'> PrintPdfPlugin.handler call parseProperty on 'string'</span> ([8dec18], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8dec18c777cd4e6f3daf9fb1540726e613639220))
|
|
57
70
|
|
|
71
|
+
* HT-7444: editing contextMenu display and cell data-qtip visibility ([9590ed], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9590edbc2eb57d22e4de581b1fe6b8f5c82617e7))
|
|
58
72
|
* update: CHANGELOG.md ([e7aec8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e7aec82f66947539e462f813c3d8249a6f071b6f))
|
|
59
73
|
|
|
60
74
|
# Version 2.6.16, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0fda3b6a033bacf1d07829445c44a4fab42b440d)
|
|
61
75
|
* ## Fixes
|
|
62
76
|
* <span style='color:red'>fix SummaryPluginConfigPanelSummaryGrid, BFL-11632</span> ([c3c46a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c3c46a8581698ea75ccebe42105d0b36e59b3f25))
|
|
77
|
+
* <span style='color:red'>HT-7444 fix rename context menu items</span> ([07fd4d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/07fd4d89f598b5d54807d280c82133ca6cd98a5a))
|
|
63
78
|
|
|
64
79
|
* update: CHANGELOG.md ([5f6155], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5f615546aaa0efa9b209cb9705cab4af5a958f05))
|
|
65
80
|
|
|
66
81
|
# Version 2.6.15, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9ad5ed1315f5d90adfe7569f83a8f354025f96dd)
|
|
67
82
|
* ## Fixes
|
|
68
83
|
* <span style='color:red'>fix BFL-11632</span> ([8600ec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8600ec86a3b2b824530ae8116416d7b29b087f3b))
|
|
84
|
+
* <span style='color:red'>HT-7444 fix применение стиля для колонки</span> ([ababf6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ababf67488b952fb9db3645b8bc51d72477872cb))
|
|
69
85
|
|
|
70
86
|
* update: CHANGELOG.md ([08f451], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/08f45144a4d946fd328a2b43645f08e5b06903aa))
|
|
71
87
|
|
|
72
88
|
# Version 2.6.14, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2fa5952910e2d64f357d1c17486ab785686f3cc2)
|
|
89
|
+
* ## Features
|
|
90
|
+
* <span style='color:green'>feat: HT-7444 upd</span> ([14ccc5], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/14ccc55d54a00ca81907a98b7ef7f5d4e9c58206))
|
|
91
|
+
|
|
73
92
|
* ## Fixes
|
|
74
93
|
* <span style='color:red'> HT-8113 synchronization of fileName in ExportReportDataToFilePlagin</span> ([2dee16], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2dee167031e2cf5071092a81b437d4748513de30))
|
|
75
94
|
|
|
95
|
+
* HT-7444 ([7f7452], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7f74526970bda8e8bfc9caa975d43409f98726fc))
|
|
76
96
|
* update: CHANGELOG.md ([122574], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/12257435ce3081dc5641232b789cfa8b2b188e82))
|
|
77
97
|
|
|
78
98
|
# Version 2.6.13, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b546bb7b481a9dbc4b408c99b9ce158b676a15fa)
|
|
@@ -85,7 +105,9 @@
|
|
|
85
105
|
* ## Fixes
|
|
86
106
|
* <span style='color:red'>BFL-11558 hot fix</span> ([66e78d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/66e78dfde422a1b5938be7d43b607eadac52bd04))
|
|
87
107
|
|
|
108
|
+
* upd ([b2f552], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b2f5528db3b6c93036fd778c09be388682c559d3))
|
|
88
109
|
* HT-8094 fix: hide fields on hideFilterPanel only if isReportFilterField is true ([c88510], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c885109cb5e6bd483089022fe0707e0ad2ad2e23))
|
|
110
|
+
* HT-7444 ([2f4045], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2f4045751c2f6cc0fc173660e3cd48e3119fb5c9))
|
|
89
111
|
* update: CHANGELOG.md ([700118], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/70011848b4cda27669d8de9e54ceca0a895153c7))
|
|
90
112
|
|
|
91
113
|
# Version 2.6.11, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ad47b54f189ab04b20780d2b553a03a1166ebd1b)
|
|
@@ -189,6 +211,7 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
|
|
|
189
211
|
* <span style='color:green'>feat: HT-7969: view group description, fix fields name in chain</span> ([e19b98], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e19b98356ac3738d40afdd92401d8433d3b86056))
|
|
190
212
|
|
|
191
213
|
* Resolve HT-7568 ([eb0297], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb0297d1927ae6e2d3a8d492d368d5ea7bef89ef))
|
|
214
|
+
* HT-7444 ([9a2226], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9a2226a1c70795e683cdad35a130cbf99cf40c52))
|
|
192
215
|
* Revert "feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200."
|
|
193
216
|
|
|
194
217
|
This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/312854f7d59d711c9921f394c6849d398e529e10))
|
|
@@ -273,6 +296,7 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
|
|
|
273
296
|
* ## Fixes
|
|
274
297
|
* <span style='color:red'> BFL-10584: fix bug in plugin, set max width window size when param > then desctop</span> ([1baf31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1baf31449e4bbd8d8cdbfa5447595594c4434e78))
|
|
275
298
|
|
|
299
|
+
* HT-7444 рефакторинг ([984a3f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/984a3f4eb024c1f8ff999f411ab29c952baac3e4))
|
|
276
300
|
* update: CHANGELOG.md ([72405e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/72405e2ac16f89228c352fc1e340a349f07e0846))
|
|
277
301
|
|
|
278
302
|
# Version 2.5.59, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/16dce0c2c65b36beafbff497648e510988b59693)
|
|
@@ -280,16 +304,20 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
|
|
|
280
304
|
* <span style='color:green'>feat: HT-7726: reject promise when data not valid in ExecuteCommandPlugin.js</span> ([ad2d2e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ad2d2e4b3609b15c9d16b13965829d13b6ed76be))
|
|
281
305
|
* <span style='color:green'>feat: HT-7726: reject promise when data not valid in ExecuteCommandPlugin.js</span> ([aebed3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/aebed31251643b89d87bec03484ef3bda2590fa0))
|
|
282
306
|
|
|
307
|
+
* HT-7444 ([da63c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da63c77d0df1950efe348b3482fcd443ebe9c4c9))
|
|
308
|
+
* HT-7444 ([bb5c04], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bb5c046d8029e4db32a062b8e2a64dbb4dbc62db))
|
|
283
309
|
* update: CHANGELOG.md ([c37b2e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c37b2e65b934e7fa9a20a6526469dfa1e14eeee3))
|
|
284
310
|
|
|
285
311
|
# Version 2.5.58, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0bc705cdb14b90982a31dfff10ebf7d4c4819fd2)
|
|
286
312
|
* ## Features
|
|
287
313
|
* <span style='color:green'>feat: BFL-9258: add PercentEditorCreator</span> ([3998d6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3998d6908cf7b9bd59e659c5652808e39b5ea4f4))
|
|
314
|
+
* <span style='color:green'>feat: HT-7444 Добавление плагина фильтрации полей репорта</span> ([0cdfc7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0cdfc7a1c1642f39548f070f9a8e900a1fcf505d))
|
|
288
315
|
* <span style='color:green'>feat: TR-68113: move visual editor to other directory, add CP wrapper element</span> ([b4632e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b4632ee2adeb6f8fe0c6a7c414734909b5165fd5))
|
|
289
316
|
|
|
290
317
|
* ## Fixes
|
|
291
318
|
* <span style='color:red'> CRM-8161 Исправлен доступ к FilterPanel. Исправлено поведение IsweBindCustomPanelPlugin.</span> ([f54bee], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f54beedaf28f9be18c3f0b588c0af2ec340b50a5))
|
|
292
319
|
|
|
320
|
+
* HT-7444 стилизация сегментированной кнопки ([c058a2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c058a2b4ded5a5cd586f2eef722c093af17bc73a))
|
|
293
321
|
* update: CHANGELOG.md ([44feda], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44fedab2d737c9d50e1f3bb802ab16f7af5d581c))
|
|
294
322
|
|
|
295
323
|
# Version 2.5.57, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98c71c4543fd95e80906b6fff0c955031a86eca1)
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ Ext.define('Coon.common.field.ForeignField', {
|
|
|
39
39
|
if (this.searchForm) {
|
|
40
40
|
console.warn('Not lazy initialization for Foreign field. ' +
|
|
41
41
|
'Use createSearchForm function instead explicit set searchForm property');
|
|
42
|
-
|
|
42
|
+
Coon.log.trace();
|
|
43
43
|
}
|
|
44
44
|
this.callParent(arguments);
|
|
45
45
|
},
|
|
@@ -48,6 +48,15 @@ Ext.define('Coon.common.panel.WindowWrap', {
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
|
|
51
|
+
addToolBefore: function(toolsCfg) {
|
|
52
|
+
const header = this.getHeader();
|
|
53
|
+
const tool = Ext.ComponentManager.create(toolsCfg, 'tool');
|
|
54
|
+
if (header.getComponent(1)) {
|
|
55
|
+
header.insert(tool);
|
|
56
|
+
header.moveBefore(tool, header.getComponent(1));
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
|
|
51
60
|
ghost: function(cls) {
|
|
52
61
|
return this.callParent([cls || 'window-wrap']);
|
|
53
62
|
},
|
|
@@ -62,6 +62,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
62
62
|
groupSortFunc: null,
|
|
63
63
|
preventDblClick: false,
|
|
64
64
|
enableHighlightingRequiredFields: false,
|
|
65
|
+
enableChipToolbar: false,
|
|
65
66
|
},
|
|
66
67
|
defaults: {
|
|
67
68
|
split: true,
|
|
@@ -343,7 +344,14 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
343
344
|
cls: 'buttonsCenterFilterPanel',
|
|
344
345
|
}));
|
|
345
346
|
this.dockedItems = [].concat(this.dockedItems || []);
|
|
347
|
+
|
|
348
|
+
this.filterConditionToolbar = Ext.widget('FilterConditionToolbar', {
|
|
349
|
+
closableFilterCondition: false,
|
|
350
|
+
dock: 'top',
|
|
351
|
+
});
|
|
352
|
+
|
|
346
353
|
this.dockedItems.push(this.northPanel);
|
|
354
|
+
this.dockedItems.push(this.filterConditionToolbar);
|
|
347
355
|
|
|
348
356
|
this.items = [
|
|
349
357
|
this.centerPanel
|
|
@@ -401,7 +409,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
401
409
|
return this.fireEvent('beforeselect', this, record);
|
|
402
410
|
}, this);
|
|
403
411
|
|
|
404
|
-
this.relayEvents(this.grid, ['needReload', 'shouldReload', 'close', 'configured', 'datachanged', 'load', 'itemdblclick']);
|
|
412
|
+
this.relayEvents(this.grid, ['needReload', 'shouldReload', 'close', 'configured', 'datachanged', 'load', 'itemdblclick', 'filterchange']);
|
|
405
413
|
},
|
|
406
414
|
|
|
407
415
|
/**
|
|
@@ -532,6 +540,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
532
540
|
|
|
533
541
|
configureGrid: function(ReportBean) {
|
|
534
542
|
this.grid = this.createGrid(ReportBean);
|
|
543
|
+
this.grid.on('added', this.chipsInit, this);
|
|
535
544
|
this.centerPanel.add(this.grid);
|
|
536
545
|
this.initGridEvents();
|
|
537
546
|
// this.grid.getColumnModel().autoSizeAllColumn();
|
|
@@ -633,6 +642,10 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
633
642
|
});
|
|
634
643
|
}
|
|
635
644
|
|
|
645
|
+
if (this.getEnableChipToolbar()) {
|
|
646
|
+
this.filterConditionToolbar && this.filterConditionToolbar.show();
|
|
647
|
+
}
|
|
648
|
+
|
|
636
649
|
this.configureGrid(reportFormBean);
|
|
637
650
|
|
|
638
651
|
this.configureNorthPanel(reportFormBean);
|
|
@@ -894,6 +907,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
894
907
|
if (this.northPanel.isValid()) {
|
|
895
908
|
this.grid.clear();
|
|
896
909
|
this.currentParamList = this.northPanel.collectParams();
|
|
910
|
+
this.fireEvent('filterhandlerevent');
|
|
897
911
|
this.beforeCommandExecuter(this.beforeApplyFilterCommand(this), [this.currentParamList], function() {
|
|
898
912
|
this.loadData(this.currentParamList, typeof invalidateCache === 'boolean' && invalidateCache);
|
|
899
913
|
});
|
|
@@ -974,4 +988,31 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
974
988
|
const selectedRecords = this.grid.getSelection();
|
|
975
989
|
return selectedRecords && selectedRecords.length > 0 && firstSelectedOnly ? selectedRecords[0] : selectedRecords;
|
|
976
990
|
},
|
|
991
|
+
|
|
992
|
+
chipsInit: function() {
|
|
993
|
+
const grid = this.grid;
|
|
994
|
+
const panel = grid.findParentByType('ReportPanel');
|
|
995
|
+
|
|
996
|
+
if (this.getEnableChipToolbar()) {
|
|
997
|
+
this.filterConditionToolbar.on('chipdelete', this.onChipDelete.bind(this, panel));
|
|
998
|
+
this.filterConditionToolbar.on('clear', function() {
|
|
999
|
+
this.clearFilter();
|
|
1000
|
+
this.clearData();
|
|
1001
|
+
}, this);
|
|
1002
|
+
this.filterConditionToolbar.on('needreload', function() {
|
|
1003
|
+
this.filterHandler();
|
|
1004
|
+
}, this);
|
|
1005
|
+
|
|
1006
|
+
panel && panel.on('filterhandlerevent', function() {
|
|
1007
|
+
this.filterConditionToolbar.fireEvent('rememberconditions');
|
|
1008
|
+
}, this);
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
|
|
1012
|
+
onChipDelete: function(reportPanel) {
|
|
1013
|
+
if (!reportPanel) {
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
reportPanel.filterHandler();
|
|
1017
|
+
},
|
|
977
1018
|
});
|
|
@@ -77,6 +77,9 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
77
77
|
findButtonConfig: {
|
|
78
78
|
onVal: true,
|
|
79
79
|
},
|
|
80
|
+
enableChipToolbar: {
|
|
81
|
+
onVal: true,
|
|
82
|
+
},
|
|
80
83
|
},
|
|
81
84
|
},
|
|
82
85
|
{
|
|
@@ -177,6 +180,14 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
177
180
|
singleValue: true,
|
|
178
181
|
description: 'Свойство даёт возможность скрывать/показывать фильтры панели по кнопке.',
|
|
179
182
|
},
|
|
183
|
+
{
|
|
184
|
+
id: 'enableChipToolbar',
|
|
185
|
+
leaf: true,
|
|
186
|
+
singleValue: true,
|
|
187
|
+
description: 'Свойство включает видимость тулбара с чипами. В чипах отображаются критерии поиска. ' +
|
|
188
|
+
'<a href="https://confluence.sigma-it.ru/pages/viewpage.action?pageId=636874446" target="_blank"> ' +
|
|
189
|
+
'Описание <i class="fas fa-external-link-alt"></i></a>',
|
|
190
|
+
},
|
|
180
191
|
{
|
|
181
192
|
id: 'enableHighlightingRequiredFields',
|
|
182
193
|
leaf: true,
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Ext.define('Coon.report.plugin.configPanel.AddFilterConditionPluginConfigPanel', {
|
|
2
|
+
extend: 'Coon.report.plugin.configPanel.BasePluginConfig',
|
|
3
|
+
alias: 'widget.AddFilterConditionPluginConfigPanel',
|
|
4
|
+
description: 'Плагин, позволяющий фильтровать данные репорта локально по значению выбранной ячейки.' +
|
|
5
|
+
' Добавляет в контекстное меню ячейки пункты меню, отвечающие за фильтрацию. Меню открывается правым кликом мыши по ячейке грида.',
|
|
6
|
+
tags: ['ФИЛЬТРЫ'],
|
|
7
|
+
config: {
|
|
8
|
+
pluginTypeSettings: {
|
|
9
|
+
defaultType: 'GRID_PLUGIN',
|
|
10
|
+
allowedTypes: [
|
|
11
|
+
'GRID_PLUGIN'
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
cls: 'AddFilterConditionPluginConfigPanel',
|
|
16
|
+
createItems: function() {
|
|
17
|
+
this.filterField = Ext.create('Ext.panel.Panel', {
|
|
18
|
+
width: 700,
|
|
19
|
+
tbar: [
|
|
20
|
+
{
|
|
21
|
+
xtype: 'toolbar',
|
|
22
|
+
layout: 'hbox',
|
|
23
|
+
items: [
|
|
24
|
+
{
|
|
25
|
+
xtype: 'segmentedbutton',
|
|
26
|
+
allowMultiple: false,
|
|
27
|
+
items: [
|
|
28
|
+
{
|
|
29
|
+
text: 'All',
|
|
30
|
+
ui: 'FilterSegmentedButton',
|
|
31
|
+
tooltip: 'показать все',
|
|
32
|
+
handler: this.showAll.bind(this),
|
|
33
|
+
pressed: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
tooltip: 'показать видимые',
|
|
37
|
+
ui: 'FilterSegmentedButton',
|
|
38
|
+
iconCls: 'x-fa fa-eye',
|
|
39
|
+
handler: this.showVisibleFields.bind(this),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
tooltip: 'показать невидимые',
|
|
43
|
+
iconCls: 'x-fa fa-eye-slash',
|
|
44
|
+
handler: this.showInvisibleFields.bind(this),
|
|
45
|
+
ui: 'FilterSegmentedButton',
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
xtype: 'textfield',
|
|
51
|
+
fieldLabel: 'Поиск',
|
|
52
|
+
width: 300,
|
|
53
|
+
labelWidth: 50,
|
|
54
|
+
listeners: {
|
|
55
|
+
change: {
|
|
56
|
+
fn: this.filter,
|
|
57
|
+
buffer: 300,
|
|
58
|
+
scope: this,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
triggers: {
|
|
62
|
+
clear: {
|
|
63
|
+
cls: 'svg-icon svg-icon-cancel-small',
|
|
64
|
+
tooltip: 'Очистить поле',
|
|
65
|
+
hidden: false,
|
|
66
|
+
handler: function() {
|
|
67
|
+
this.clear();
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
this.grid = Ext.create('Ext.grid.Panel', {
|
|
78
|
+
title: 'Поля репорта',
|
|
79
|
+
height: 'auto',
|
|
80
|
+
store: {
|
|
81
|
+
fields: [
|
|
82
|
+
'byCellValueFilterable', 'visibleSwitch', 'reportFieldCd', 'description', 'reportFieldTypeLookup'
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
columns: [
|
|
86
|
+
{
|
|
87
|
+
xtype: 'actioncolumn',
|
|
88
|
+
width: 50,
|
|
89
|
+
menuDisabled: true,
|
|
90
|
+
sortable: false,
|
|
91
|
+
items: [{
|
|
92
|
+
getClass(v, meta, record) {
|
|
93
|
+
meta.tdAttr = `data-qtip = "${record.get('visibleSwitch') ? 'поле видимо' : 'поле не видимо'}"`;
|
|
94
|
+
return record.get('visibleSwitch') ? 'x-fa fa-eye' : 'x-fa fa-eye-slash';
|
|
95
|
+
},
|
|
96
|
+
}],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
xtype: 'checkcolumn',
|
|
100
|
+
dataIndex: 'byCellValueFilterable',
|
|
101
|
+
text: 'Фильтрация</br>по полю',
|
|
102
|
+
tooltip: 'Фильтрация по полю',
|
|
103
|
+
width: 100,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
dataIndex: 'reportFieldCd',
|
|
107
|
+
text: 'Поле',
|
|
108
|
+
width: 200,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
xtype: 'hintColumn',
|
|
112
|
+
dataIndex: 'description',
|
|
113
|
+
text: 'Описание',
|
|
114
|
+
flex: 1,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
xtype: 'hintColumn',
|
|
118
|
+
dataIndex: 'reportFieldTypeLookup',
|
|
119
|
+
text: 'Тип',
|
|
120
|
+
width: 150,
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
return [
|
|
126
|
+
this.addToContextMenu,
|
|
127
|
+
this.filterField,
|
|
128
|
+
this.grid
|
|
129
|
+
];
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
filter: function(_, value) {
|
|
133
|
+
const store = this.grid.getStore();
|
|
134
|
+
store.clearFilter();
|
|
135
|
+
store.filterBy(function(record) {
|
|
136
|
+
const result = record.get('reportFieldCd').includes(value) ||
|
|
137
|
+
record.get('description').includes(value) ||
|
|
138
|
+
record.get('reportFieldTypeLookup').includes(value);
|
|
139
|
+
return result;
|
|
140
|
+
}, this);
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
showAll: function() {
|
|
144
|
+
const store = this.grid.getStore();
|
|
145
|
+
store.clearFilter();
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
showVisibleFields: function() {
|
|
149
|
+
const store = this.grid.getStore();
|
|
150
|
+
store.clearFilter();
|
|
151
|
+
store.filterBy((record) => record.get('visibleSwitch'));
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
showInvisibleFields: function() {
|
|
155
|
+
const store = this.grid.getStore();
|
|
156
|
+
store.clearFilter();
|
|
157
|
+
store.filterBy((record) => !record.get('visibleSwitch'));
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
setContext(context) {
|
|
161
|
+
this.context = Ext.clone(context);
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
doInit: function(config) {
|
|
165
|
+
this.callParent(arguments);
|
|
166
|
+
const filterOptions = Ext.decode(config.filterOptions, true);
|
|
167
|
+
if (this.context.fields.length) {
|
|
168
|
+
const newData = [];
|
|
169
|
+
this.context.fields.forEach(function(field) {
|
|
170
|
+
newData.push({
|
|
171
|
+
reportFieldCd: field.reportFieldCd,
|
|
172
|
+
description: field.description,
|
|
173
|
+
reportFieldTypeLookup: field.reportFieldTypeLookup,
|
|
174
|
+
byCellValueFilterable: filterOptions ? filterOptions[field.reportFieldCd] : false,
|
|
175
|
+
visibleSwitch: field.visibleSwitch,
|
|
176
|
+
});
|
|
177
|
+
}, this);
|
|
178
|
+
this.grid.getStore().loadData(newData);
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
getConfiguration() {
|
|
183
|
+
return {
|
|
184
|
+
filterOptions: JSON.stringify(this.grid.getStore().getRange().reduce(
|
|
185
|
+
function(acc, current) {
|
|
186
|
+
if (current.get('byCellValueFilterable')) {
|
|
187
|
+
acc[current.get('reportFieldCd')] = current.get('byCellValueFilterable');
|
|
188
|
+
}
|
|
189
|
+
return acc;
|
|
190
|
+
},
|
|
191
|
+
{}
|
|
192
|
+
)),
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.AddFilterConditionPluginConfigPanel {
|
|
2
|
+
.svg-icon{
|
|
3
|
+
height: 24px;
|
|
4
|
+
width: 24px;
|
|
5
|
+
}
|
|
6
|
+
.fa{
|
|
7
|
+
height: 24px;
|
|
8
|
+
width: 24px;
|
|
9
|
+
padding-top: 6px;
|
|
10
|
+
color: black;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.x-segmented-button-item{
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
.x-segmented-button-item:hover{
|
|
17
|
+
background-color: rgba(61, 103, 128, 0.04);
|
|
18
|
+
}
|
|
19
|
+
.x-segmented-button-item:active{
|
|
20
|
+
background-color: rgba(61, 103, 128, 0.12);
|
|
21
|
+
}
|
|
22
|
+
.x-btn-pressed .x-btn-icon-el {
|
|
23
|
+
color: #ffffff !important;
|
|
24
|
+
}
|
|
25
|
+
.x-segmented-button .x-segmented-button-item .x-btn-inner{
|
|
26
|
+
color: #3D6780;
|
|
27
|
+
}
|
|
28
|
+
.x-segmented-button .x-segmented-button-item .x-btn-icon-el{
|
|
29
|
+
color: #3D6780;
|
|
30
|
+
}
|
|
31
|
+
.x-btn-icon-el{
|
|
32
|
+
color: #3D6780;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include extjs-button-small-ui(
|
|
37
|
+
$ui: 'FilterSegmentedButton',
|
|
38
|
+
$padding: 8px 12px,
|
|
39
|
+
$color: #3D6780,
|
|
40
|
+
$icon-size: 16px,
|
|
41
|
+
|
|
42
|
+
$background-color-over: rgba(61, 103, 128, 0.04),
|
|
43
|
+
$background-color-focus-over: rgba(61, 103, 128, 0.04),
|
|
44
|
+
|
|
45
|
+
$background-color-pressed: rgba(61, 103, 128, 0.12),
|
|
46
|
+
$background-color-focus-pressed: rgba(61, 103, 128, 0.12),
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
$border-color: 'none',
|
|
50
|
+
$background-color: transparent,
|
|
51
|
+
$border-color-focus: #3D6780,
|
|
52
|
+
$background-color-focus: rgba(61, 103, 128, 0.12)
|
|
53
|
+
);
|