ru.coon 2.6.22 → 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 +43 -0
- package/package.json +1 -1
- package/src/Function.js +37 -28
- 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/UiCustomController.js +4 -0
- 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,3 +1,25 @@
|
|
|
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
|
+
|
|
12
|
+
# Version 2.6.23, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e68f6b9665bae4d8969249f451f473ed7298d86f)
|
|
13
|
+
* ## Fixes
|
|
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))
|
|
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))
|
|
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))
|
|
19
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/Function.jsb3713a036513a22b8c920b2d4d230fcaf1eb0779))
|
|
20
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/Function.js3fa4edf5ab6e11a419ed4995c949a0cfe459c1db))
|
|
21
|
+
* update: CHANGELOG.md ([cca905], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cca905a14180478df3c9f460ceb07b2950c14fba))
|
|
22
|
+
|
|
1
23
|
# Version 2.6.22, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a580a8a4150b16d4f73ad7a4c1689d610822ee10)
|
|
2
24
|
* ## Fixes
|
|
3
25
|
* <span style='color:red'> loadData on SimplestReportCombo CRM-8429</span> ([e88546], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e88546f3413c2aa5520453b04abe000f4345bfea))
|
|
@@ -46,24 +68,31 @@
|
|
|
46
68
|
* ## Fixes
|
|
47
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))
|
|
48
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))
|
|
49
72
|
* update: CHANGELOG.md ([e7aec8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e7aec82f66947539e462f813c3d8249a6f071b6f))
|
|
50
73
|
|
|
51
74
|
# Version 2.6.16, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0fda3b6a033bacf1d07829445c44a4fab42b440d)
|
|
52
75
|
* ## Fixes
|
|
53
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))
|
|
54
78
|
|
|
55
79
|
* update: CHANGELOG.md ([5f6155], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5f615546aaa0efa9b209cb9705cab4af5a958f05))
|
|
56
80
|
|
|
57
81
|
# Version 2.6.15, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9ad5ed1315f5d90adfe7569f83a8f354025f96dd)
|
|
58
82
|
* ## Fixes
|
|
59
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))
|
|
60
85
|
|
|
61
86
|
* update: CHANGELOG.md ([08f451], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/08f45144a4d946fd328a2b43645f08e5b06903aa))
|
|
62
87
|
|
|
63
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
|
+
|
|
64
92
|
* ## Fixes
|
|
65
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))
|
|
66
94
|
|
|
95
|
+
* HT-7444 ([7f7452], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7f74526970bda8e8bfc9caa975d43409f98726fc))
|
|
67
96
|
* update: CHANGELOG.md ([122574], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/12257435ce3081dc5641232b789cfa8b2b188e82))
|
|
68
97
|
|
|
69
98
|
# Version 2.6.13, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b546bb7b481a9dbc4b408c99b9ce158b676a15fa)
|
|
@@ -76,7 +105,9 @@
|
|
|
76
105
|
* ## Fixes
|
|
77
106
|
* <span style='color:red'>BFL-11558 hot fix</span> ([66e78d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/66e78dfde422a1b5938be7d43b607eadac52bd04))
|
|
78
107
|
|
|
108
|
+
* upd ([b2f552], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b2f5528db3b6c93036fd778c09be388682c559d3))
|
|
79
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))
|
|
80
111
|
* update: CHANGELOG.md ([700118], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/70011848b4cda27669d8de9e54ceca0a895153c7))
|
|
81
112
|
|
|
82
113
|
# Version 2.6.11, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ad47b54f189ab04b20780d2b553a03a1166ebd1b)
|
|
@@ -180,6 +211,7 @@ This reverts commit ec83613d1dd2673b448c9fabee62287e9160f6bf. ([e6e94a], [link](
|
|
|
180
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))
|
|
181
212
|
|
|
182
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))
|
|
183
215
|
* Revert "feat: Добавлено предупреждение при выборе дефолтной конфигурации плагина. Closes TR-67200."
|
|
184
216
|
|
|
185
217
|
This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/312854f7d59d711c9921f394c6849d398e529e10))
|
|
@@ -214,15 +246,21 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
|
|
|
214
246
|
# Version 2.5.64, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9f48777236abed76cf08cd5cef56e7f9be0dac63)
|
|
215
247
|
* ## Features
|
|
216
248
|
* <span style='color:green'>feat: HT-7955: focus CP before save action, set cell editing values in grids</span> ([4c6578], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4c6578c6873cd21c509de304494938276e7367a9))
|
|
249
|
+
* <span style='color:green'>Feat:HT-7885 Deprecate Coon.Function.getDataFromForm</span> ([43cd8a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/43cd8a2edbafe76c7d5881789a6236b6e23c21cf))
|
|
217
250
|
* <span style='color:green'>feat: BFL-9365 move TimeEditorCreator and DeliveryTimeField from ISWE</span> ([12c3c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/12c3c701ac9387f4d2918a9feb1840bf0f7fb3ea))
|
|
218
251
|
* <span style='color:green'>feat: HT-7281 GridEditorPlugin editor dependField</span> ([387052], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/38705228276f86858100b6b43c0e204bcc6f26b7))
|
|
219
252
|
|
|
220
253
|
* ## Fixes
|
|
221
254
|
* <span style='color:red'>Fix:HT-7887 fix filterItemsOnRow property in ReportFormParameterEditPanel</span> ([c10ca9], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c10ca98610970df2f51ca39fe698e278db6fe719))
|
|
255
|
+
* <span style='color:red'>Fix:HT-7885 change excelEditorType to local in CopyRowsFromGridConfigPanel</span> ([1ed44e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1ed44e4bb22f4e15a3b06221e0d8870da1ecf025))
|
|
222
256
|
* <span style='color:red'> HT-7941: check if do not have saved data object then close window</span> ([0baf4e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0baf4ea72862a4a61230ffc3ac0af7f8b065d794))
|
|
257
|
+
* <span style='color:red'>Fix:HT-7885 fix group button and position number properties in CopyRowsFromGridConfigPanel</span> ([e0a4d8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e0a4d888c88dfa70c14e649bb027625c769d64ce))
|
|
223
258
|
|
|
224
259
|
* remove unnecessary filterItemsOnRow property ([772f61], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/772f6190df8b958bd6ff97e5731a59971c9a11fc))
|
|
260
|
+
* HT-7885 ([601a41], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/601a4199efef15290c161766431908ab8993862b))
|
|
261
|
+
* Update getDataFromForm function ([d79274], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d79274267b970ea0b4a31f1724d3dfc54d82d9d5))
|
|
225
262
|
* HT-7882 поддержать возможность передачи свойств редактора х-ки в поле mask в формате json ([507490], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5074900afb170d9f11aa10de6549e05cef12f7cb))
|
|
263
|
+
* Combine query in one row ([6fbb49], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6fbb496601a46bef0506b56d34d179d3d10148ca))
|
|
226
264
|
* update: CHANGELOG.md ([2ec18c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2ec18ccddcb1d571ef6a1d00b9cde439355c8304))
|
|
227
265
|
|
|
228
266
|
# Version 2.5.63, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/49035e56acea653959f01f96ea96a10d962b1424)
|
|
@@ -258,6 +296,7 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
|
|
|
258
296
|
* ## Fixes
|
|
259
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))
|
|
260
298
|
|
|
299
|
+
* HT-7444 рефакторинг ([984a3f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/984a3f4eb024c1f8ff999f411ab29c952baac3e4))
|
|
261
300
|
* update: CHANGELOG.md ([72405e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/72405e2ac16f89228c352fc1e340a349f07e0846))
|
|
262
301
|
|
|
263
302
|
# Version 2.5.59, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/16dce0c2c65b36beafbff497648e510988b59693)
|
|
@@ -265,16 +304,20 @@ This reverts commit 92855b1225a747f15d977c0f23c8d9794523352d. ([312854], [link](
|
|
|
265
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))
|
|
266
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))
|
|
267
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))
|
|
268
309
|
* update: CHANGELOG.md ([c37b2e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c37b2e65b934e7fa9a20a6526469dfa1e14eeee3))
|
|
269
310
|
|
|
270
311
|
# Version 2.5.58, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0bc705cdb14b90982a31dfff10ebf7d4c4819fd2)
|
|
271
312
|
* ## Features
|
|
272
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))
|
|
273
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))
|
|
274
316
|
|
|
275
317
|
* ## Fixes
|
|
276
318
|
* <span style='color:red'> CRM-8161 Исправлен доступ к FilterPanel. Исправлено поведение IsweBindCustomPanelPlugin.</span> ([f54bee], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f54beedaf28f9be18c3f0b588c0af2ec340b50a5))
|
|
277
319
|
|
|
320
|
+
* HT-7444 стилизация сегментированной кнопки ([c058a2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c058a2b4ded5a5cd586f2eef722c093af17bc73a))
|
|
278
321
|
* update: CHANGELOG.md ([44feda], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/44fedab2d737c9d50e1f3bb802ab16f7af5d581c))
|
|
279
322
|
|
|
280
323
|
# Version 2.5.57, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98c71c4543fd95e80906b6fff0c955031a86eca1)
|
package/package.json
CHANGED
package/src/Function.js
CHANGED
|
@@ -122,38 +122,47 @@ Ext.define('Coon.Function', {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Получение всех значений полей панели в качестве структуры.
|
|
125
|
-
* Если поле
|
|
125
|
+
* Если поле имеет флаг local - оно не включается в результат
|
|
126
126
|
*/
|
|
127
127
|
getDataFromForm: function(formPanel, valuesAsIs, dateFormat, excludeReadOnly, excludeDisabled) {
|
|
128
|
-
|
|
129
|
-
fields = (fields || []).concat(formPanel.query('fieldcontainer')).concat(formPanel.query('UiCFSegmentedButton'));
|
|
128
|
+
const fields = formPanel.query('field,fieldcontainer[getValue]');
|
|
130
129
|
const params = {};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Проверяет, включать ли данные из поля в результат
|
|
133
|
+
*/
|
|
134
|
+
const isValid = function(field, name) {
|
|
135
|
+
return (
|
|
136
|
+
!(excludeDisabled && field.disabled) &&
|
|
137
|
+
!(excludeReadOnly && field.readOnly) &&
|
|
138
|
+
!field.local &&
|
|
139
|
+
name
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
for (const field of fields) {
|
|
144
|
+
const name = Ext.isObject(field.initialConfig) && field.initialConfig.name;
|
|
145
|
+
if (!(isValid(field, name))) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const value = field.submitFormat ? field.getSubmitValue() : field.getValue();
|
|
149
|
+
if (field.isXType('radiofield') && value && Ext.isFunction(value.getGroupValue)) {
|
|
150
|
+
params[name] = value.getGroupValue();
|
|
151
|
+
} else if (Ext.isDate(value)) {
|
|
152
|
+
// !!!ВНИМАНИЕ - при использовании этой функции в web-billing :
|
|
153
|
+
// из-за override form.field.Date в web-billing сюда мы не попадем, так как value всегда будет строкой,
|
|
154
|
+
// Следовательно, valuesAsIs и dateFormat не используются для обработки дат
|
|
155
|
+
params[name] = valuesAsIs ? value : Ext.Date.format(value, dateFormat || Coon.format.dateTimeInternal);
|
|
156
|
+
} else if (Ext.isFunction(field.getCleanValue)) {
|
|
157
|
+
params[name] = field.getCleanValue();
|
|
158
|
+
} else if (Ext.isString(value) || value === undefined || Ext.isBoolean(value) || Ext.isNumber(value) ||
|
|
146
159
|
(field.submitFormat && field.isXType('combobox'))
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
} else {
|
|
154
|
-
Ext.apply(params, value);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
160
|
+
) {
|
|
161
|
+
params[name] = value;
|
|
162
|
+
} else if (field.submitFormat) {
|
|
163
|
+
params[name] = value;
|
|
164
|
+
} else {
|
|
165
|
+
Ext.apply(params, value);
|
|
157
166
|
}
|
|
158
167
|
}
|
|
159
168
|
return params;
|
|
@@ -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
|
+
);
|