ru.coon 3.0.60 → 3.0.61
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/.husky/pre-commit +0 -0
- package/CHANGELOG.md +10 -2
- package/package.json +1 -1
- package/src/common/field/FieldsHelper.js +0 -0
- package/src/common/panel/WindowWrap.js +0 -0
- package/src/common/plugin/form/RequiredFlagPlugin.js +0 -29
- package/src/format.js +30 -0
- package/src/report/component/ReportFilterForm.js +10 -2
- package/src/report/component/ReportPanel.js +34 -40
- package/src/report/component/ReportPanel.scss +13 -0
- package/src/report/component/reportpanel/FilterPanel.js +2 -2
- package/src/report/component/reportpanel/FilterPanelLegend.js +8 -0
- package/src/report/component/reportpanel/FilterPanelLegend.scss +2 -2
- package/src/report/component/reportpanel/NorthPanel.js +132 -98
- package/src/report/component/reportpanel/NorthPanel.scss +75 -6
- package/src/report/component/reportpanel/ReportGrid.js +0 -1
- package/src/report/component/reportpanel/SideFilterPanel.js +512 -0
- package/src/report/component/reportpanel/SideFilterPanel.scss +88 -0
- package/src/report/plugin/configPanel/ControlColumnByParamPluginConfigPanel.js +56 -2
- package/src/report/plugin/configPanel/ControlColumnByParamPluginConfigPanelGrid.js +1 -1
- package/src/report/plugin/form/ReportGroupsFieldValidationPlugin.js +5 -8
- package/src/report/plugin/grid/ControlColumnByParamPlugin.js +34 -35
- package/src/report/util.js +27 -27
- package/src/uielement/component/formchips/FilterConditionToolbarController.js +7 -0
- package/src/util.js +9 -7
- package/src/validator.js +22 -33
- package/src/version.js +1 -1
- package/src/common/AbstractPlugin.js +0 -17
package/.husky/pre-commit
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
# Version 3.0.
|
|
1
|
+
# Version 3.0.61, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0a79e6af1f962bbf5062d7a242281b679c4b0f35)
|
|
2
|
+
* update: CHANGELOG.md ([dcc546], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dcc5460b35c3144e1f382de27906035b5a6057d8))
|
|
3
|
+
|
|
4
|
+
# Version 3.0.60, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/af6f2371e1efe0721b4d2419eb765236ad3678b2)
|
|
5
|
+
* ## Features
|
|
6
|
+
* <span style='color:green'>feat: [ControlColumnByParamPlugin] Добавлена поддержка диапазона чисел. Resolve HT-14601.</span> ([3fc25d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3fc25d2a05b22f90b02aa2d2798e2ce23d3a5197))
|
|
7
|
+
|
|
2
8
|
* ## Fixes
|
|
3
|
-
* <span style='color:red'>fix
|
|
9
|
+
* <span style='color:red'>HT-14119 fix double loading FilterPanel with FilterFormEditingPlugin</span> ([43e7be], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/43e7be1760d09b482bafc8bd9f75d146be266d50))
|
|
4
10
|
|
|
11
|
+
* HT-13993 добавлена боковая панель фильтров для репортов ([e2d5c7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e2d5c7436900d232cd48c9389a685affbacf721a))
|
|
12
|
+
* HT-14628 открытие компонента внутри репорта - закрытие через крестик ([fc4f4e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fc4f4e9112a3ba1a85cb4a064d65d7a7cfb8cec1))
|
|
5
13
|
* update: CHANGELOG.md ([e42a2a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/e42a2a6fb8b511ba174ab5060fc84c683a046945))
|
|
6
14
|
|
|
7
15
|
# Version 3.0.59, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/065a134b1f6c6211d56ef758b127778d5e104faa)
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -17,7 +17,6 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
|
|
|
17
17
|
|
|
18
18
|
setEnableHighlightingRequiredFields(enableHighlightingRequiredFields) {
|
|
19
19
|
this.enableHighlightingRequiredFields = enableHighlightingRequiredFields;
|
|
20
|
-
this.changeFieldFlag(this.isRequired());
|
|
21
20
|
},
|
|
22
21
|
getEnableHighlightingRequiredFields() {
|
|
23
22
|
return this.enableHighlightingRequiredFields;
|
|
@@ -60,19 +59,6 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
|
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
|
|
63
|
-
changeFieldFlag: function(isRequired) {
|
|
64
|
-
const field = this.field;
|
|
65
|
-
if (!field) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
field.isRequired = isRequired;
|
|
69
|
-
if (isRequired && this.enableHighlightingRequiredFields) {
|
|
70
|
-
field.getEl().dom.querySelector('.required-flag').textContent = '*';
|
|
71
|
-
} else {
|
|
72
|
-
field.getEl().dom.querySelector('.required-flag').textContent = '';
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
|
|
76
62
|
/**
|
|
77
63
|
* Allows specify flag of required field and change its color by requiredFlagColor prop (before rendering) or in runtime by setFlagColor method.
|
|
78
64
|
*/
|
|
@@ -93,24 +79,9 @@ Ext.define('Coon.common.plugin.form.RequiredFlagPlugin', {
|
|
|
93
79
|
return false;
|
|
94
80
|
}
|
|
95
81
|
|
|
96
|
-
this.changeFieldFlag(isRequired);
|
|
97
|
-
|
|
98
82
|
return true;
|
|
99
83
|
}.bind(this);
|
|
100
84
|
|
|
101
|
-
field.changeFieldFlag = function(isRequired) {
|
|
102
|
-
const field = this.field;
|
|
103
|
-
field.isRequired = isRequired;
|
|
104
|
-
if (!field.getEl()) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (isRequired) {
|
|
108
|
-
field.getEl().dom.querySelector('.required-flag').textContent = '*';
|
|
109
|
-
} else {
|
|
110
|
-
field.getEl().dom.querySelector('.required-flag').textContent = '';
|
|
111
|
-
}
|
|
112
|
-
}.bind(this);
|
|
113
|
-
|
|
114
85
|
field.on('afterrender', function(fld) {
|
|
115
86
|
if (fld.lastFlagColor) {
|
|
116
87
|
fld.setFlagColor(fld.lastFlagColor);
|
package/src/format.js
CHANGED
|
@@ -269,4 +269,34 @@ Ext.define('Coon.format', {
|
|
|
269
269
|
const index = value.lastIndexOf(s);
|
|
270
270
|
return index > 0 && index === (value.length - s.length);
|
|
271
271
|
},
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Преобразует строковое представление чисел в массив чисел.
|
|
275
|
+
* Поддерживает несколько форматов: диапазон (1-5), числа через запятую (1,3,5), одиночное число (5)
|
|
276
|
+
* @param {string} str - Строка для преобразования
|
|
277
|
+
* @returns {number[]} Массив чисел
|
|
278
|
+
* @example
|
|
279
|
+
* stringToNumbersArray('1-5'); возвращает [1, 2, 3, 4, 5]
|
|
280
|
+
* stringToNumbersArray('1,3,5'); возвращает [1, 3, 5]
|
|
281
|
+
* stringToNumbersArray('7'); возвращает [7]
|
|
282
|
+
* stringToNumbersArray(''); возвращает []
|
|
283
|
+
* stringToNumbersArray('abc'); возвращает []
|
|
284
|
+
*/
|
|
285
|
+
stringToNumbersArray: function(str) {
|
|
286
|
+
if (!str || typeof str !== 'string') {
|
|
287
|
+
return [];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Формат "1-5" (диапазон)
|
|
291
|
+
if (str.includes('-')) {
|
|
292
|
+
const [start, end] = str.split('-').map(Number);
|
|
293
|
+
if (!isNaN(start) && !isNaN(end) && start <= end) {
|
|
294
|
+
return Array.from({length: end - start + 1}, (_, i) => start + i);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Формат "1,2,3,4,5" или одиночное число "5" (через запятую или одиночное)
|
|
299
|
+
const numbers = str.split(',').map(Number).filter((n) => !isNaN(n));
|
|
300
|
+
return numbers.length > 0 ? numbers : [];
|
|
301
|
+
},
|
|
272
302
|
});
|
|
@@ -120,6 +120,9 @@ Ext.define('Coon.report.component.ReportFilterForm', {
|
|
|
120
120
|
], Ext.create('Coon.report.component.ReportPanel'), this, this);
|
|
121
121
|
|
|
122
122
|
this.setFilterDefaults(this.getFilterDefaults() || {});
|
|
123
|
+
|
|
124
|
+
const sideFilterPanelConfig = Ext.apply({enable: false}, this.sideFilterPanelConfig);
|
|
125
|
+
|
|
123
126
|
this.northPanel = Ext.widget('NorthPanel', {
|
|
124
127
|
hideFilterPanel: this.hideFilterPanel,
|
|
125
128
|
hideFilterButtons: this.hideFilterButtons,
|
|
@@ -130,6 +133,7 @@ Ext.define('Coon.report.component.ReportFilterForm', {
|
|
|
130
133
|
docked: 'top',
|
|
131
134
|
hidden: true,
|
|
132
135
|
header: false,
|
|
136
|
+
sideFilterPanelConfig: sideFilterPanelConfig,
|
|
133
137
|
});
|
|
134
138
|
|
|
135
139
|
this._visibleFieldsMap = new Map();
|
|
@@ -149,8 +153,8 @@ Ext.define('Coon.report.component.ReportFilterForm', {
|
|
|
149
153
|
|
|
150
154
|
// для совместимости со старым кодом.
|
|
151
155
|
this.filterContainer = this.northPanel.filterContainer;
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
156
|
+
this.dockedItems = [].concat(this.dockedItems || []);
|
|
157
|
+
this.dockedItems.push(this.northPanel);
|
|
154
158
|
|
|
155
159
|
this.callParent();
|
|
156
160
|
if (this.reportID) {
|
|
@@ -282,6 +286,10 @@ Ext.define('Coon.report.component.ReportFilterForm', {
|
|
|
282
286
|
|
|
283
287
|
reportPanel.northPanel.fillFilter(false, currentParams, reportPanel.getFilterDefaults());
|
|
284
288
|
reportPanel.filterHandler();
|
|
289
|
+
|
|
290
|
+
if (this.northPanel.filterConditionToolbar) {
|
|
291
|
+
this.northPanel.filterConditionToolbar.fireEvent('rememberconditions');
|
|
292
|
+
}
|
|
285
293
|
},
|
|
286
294
|
|
|
287
295
|
clearData() {
|
|
@@ -397,7 +397,10 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
397
397
|
itemId: 'centerPanel',
|
|
398
398
|
region: 'center',
|
|
399
399
|
minHeight: 100,
|
|
400
|
-
layout:
|
|
400
|
+
layout: {
|
|
401
|
+
type: 'hbox',
|
|
402
|
+
align: 'stretch',
|
|
403
|
+
},
|
|
401
404
|
cls: 'buttonsCenterFilterPanel',
|
|
402
405
|
})
|
|
403
406
|
];
|
|
@@ -754,25 +757,20 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
754
757
|
},
|
|
755
758
|
|
|
756
759
|
openInReport(component, params) {
|
|
760
|
+
const northPanelHidden = this.northPanel.hidden;
|
|
757
761
|
this.northPanel.hide();
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
handler: function() {
|
|
768
|
-
component.close();
|
|
769
|
-
},
|
|
770
|
-
}
|
|
771
|
-
],
|
|
772
|
-
}, 0);
|
|
762
|
+
const backTool = {
|
|
763
|
+
type: 'close',
|
|
764
|
+
tooltip: 'Закрыть',
|
|
765
|
+
handler: function() {
|
|
766
|
+
component.close();
|
|
767
|
+
},
|
|
768
|
+
};
|
|
769
|
+
component.addTool(backTool);
|
|
770
|
+
component.addCls('reportInReport');
|
|
773
771
|
component.on('close', function() {
|
|
774
772
|
this.setActiveItem(0);
|
|
775
|
-
this.northPanel.show();
|
|
773
|
+
(!northPanelHidden) && this.northPanel.show();
|
|
776
774
|
this.removeDocked(this.down('toolbar#backToReportBtn'));
|
|
777
775
|
}, this);
|
|
778
776
|
this.add(component);
|
|
@@ -809,24 +807,24 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
809
807
|
|
|
810
808
|
const configProperties = Coon.Function.convertAdvancedProperties(reportFormBean[ns.$properties]);
|
|
811
809
|
Ext.merge(this, configProperties, {configProperties});
|
|
812
|
-
if (this.getToggleFilterPanel() && !this.hideFilterPanel) {
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
}
|
|
810
|
+
// if (this.getToggleFilterPanel() && !this.hideFilterPanel) {
|
|
811
|
+
// this.addTool({
|
|
812
|
+
// iconCls: 'x-fa fa-eye-slash',
|
|
813
|
+
// tooltipTexts: {
|
|
814
|
+
// show: 'скрыть панель фильтров',
|
|
815
|
+
// hide: 'показать панель фильтров',
|
|
816
|
+
// },
|
|
817
|
+
// handler: function(event, toolEl, panelHeader, tool) {
|
|
818
|
+
// const panel = this.findParentByType('ReportPanel');
|
|
819
|
+
// panel && panel.northPanel.togglePanel(tool);
|
|
820
|
+
// },
|
|
821
|
+
// listeners: {
|
|
822
|
+
// afterrender: function(tool) {
|
|
823
|
+
// tool.setTooltip(tool.tooltipTexts.show);
|
|
824
|
+
// },
|
|
825
|
+
// },
|
|
826
|
+
// });
|
|
827
|
+
// }
|
|
830
828
|
|
|
831
829
|
|
|
832
830
|
this.configureGrid(reportFormBean);
|
|
@@ -868,11 +866,6 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
868
866
|
}
|
|
869
867
|
config[prefix + 'type'] = plugin[ns.$uiElement].xtype || plugin[ns.$xtype];
|
|
870
868
|
config[ns.$sortSequence] = plugin[ns.$sortSequence] || null;
|
|
871
|
-
config.pluginConfig = {
|
|
872
|
-
properties: Object.assign({}, config),
|
|
873
|
-
type,
|
|
874
|
-
name: prefix + 'type',
|
|
875
|
-
};
|
|
876
869
|
return config;
|
|
877
870
|
});
|
|
878
871
|
},
|
|
@@ -994,6 +987,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
994
987
|
timeout: this.timeout || undefined,
|
|
995
988
|
pageSize: this.pageSize || reportBean[ns.$rowCountPerPageValue],
|
|
996
989
|
sealedColumns: true,
|
|
990
|
+
flex: 1,
|
|
997
991
|
viewConfig: {
|
|
998
992
|
emptyText: 'Не найдено записей, удовлетворяющих условию.',
|
|
999
993
|
enableTextSelection: this.enableTextSelection,
|
|
@@ -66,4 +66,17 @@
|
|
|
66
66
|
.x-group-sub-header {
|
|
67
67
|
border-top: 0px solid #ebecee;
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
&.reportInReport {
|
|
71
|
+
.x-tool-close {
|
|
72
|
+
background-color: #707070 !important;
|
|
73
|
+
mask-size: 100%;
|
|
74
|
+
height: 20px;
|
|
75
|
+
}
|
|
76
|
+
.x-panel-header-title-default {
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
line-height: normal;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
69
82
|
}
|
|
@@ -300,9 +300,9 @@ Ext.define('Coon.report.component.reportpanel.FilterPanel', {
|
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
|
|
303
|
-
clearFilter() {
|
|
303
|
+
clearFilter(fields) {
|
|
304
304
|
Coon.Function.suspendEventsFromFieldsOnForm(this, true);
|
|
305
|
-
|
|
305
|
+
fields = fields || this.query('field');
|
|
306
306
|
fields = (fields || []).concat(this.query('fieldcontainer'));
|
|
307
307
|
for (let i = 0; i < fields.length; i++) {
|
|
308
308
|
if (fields[i].uncleanable) {
|
|
@@ -14,6 +14,14 @@ Ext.define('Coon.report.component.reportpanel.FilterPanelLegend', {
|
|
|
14
14
|
</span>
|
|
15
15
|
</div>`,
|
|
16
16
|
|
|
17
|
+
validity: undefined,
|
|
18
|
+
|
|
19
|
+
setValidity(isValid) {
|
|
20
|
+
Ext.defer(() => {
|
|
21
|
+
this.animateIcon(isValid);
|
|
22
|
+
}, 100, this);
|
|
23
|
+
},
|
|
24
|
+
|
|
17
25
|
initComponent() {
|
|
18
26
|
this.callParent();
|
|
19
27
|
this.on('destroy', this.onDestroy, this);
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
font-size: 12px;
|
|
5
5
|
//margin: 5px;
|
|
6
6
|
.required-flag {
|
|
7
|
-
font-size:
|
|
7
|
+
font-size: 12px;
|
|
8
8
|
color: $required-flag-color;
|
|
9
9
|
}
|
|
10
10
|
.required-text {
|
|
11
11
|
color: $required-text-color !important;
|
|
12
12
|
.info-icon {
|
|
13
|
-
font-size:
|
|
13
|
+
font-size: 12px;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
.blink_me {
|