ru.coon 2.5.66 → 2.5.68
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 +19 -8
- package/package.json +1 -1
- package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmList.js +3 -3
- package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmListController.js +2 -2
- package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js +3 -1
- package/src/common/component/editor/creators/ByReportEditorCreator.js +1 -0
- package/src/common/component/editor/creators/CustomPanelEditorCreator.js +1 -0
- package/src/common/component/editor/creators/ForeignKeyEditorCreator.js +1 -1
- package/src/common/component/editor/creators/NoteEditorCreator.js +1 -1
- package/src/common/component/editor/creators/NumberEditorCreator.js +1 -0
- package/src/common/component/editor/creators/PercentEditorCreator.js +1 -0
- package/src/common/component/editor/creators/SimpleReportEditorCreator.js +1 -1
- package/src/common/component/editor/creators/TimeEditorCreator.js +1 -1
- package/src/common/component/editor/creators/TriggerFieldEditorCreator.js +1 -0
- package/src/nav/editor/menu/form/NavMenuFormView.js +0 -1
- package/src/nav/editor/menu/form/NavMenuFormViewController.js +18 -1
- package/src/report/component/settings/ReportPropertiesAceEditor.js +0 -3
- package/src/report/component/settings/ReportPropertiesGrid.js +38 -15
- package/src/report/component/settings/ReportPropertiesGrid.scss +26 -0
- package/src/report/component/settings/ReportPropertiesGridController.js +131 -6
- package/src/report/component/settings/field/ReportFormFieldEditPanelController.js +3 -1
- package/src/report/plugin/configPanel/GridEditorPluginConfig.js +6 -3
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +7 -0
- package/src/uielement/component/settings/UiAceEditor.js +9 -11
- package/src/uielement/component/settings/config/UiCPConfigPanelController.js +2 -0
- package/src/uielement/component/settings/linter/UiAceLinterPlugin.js +7 -0
- package/src/version.js +1 -1
- package/src/uielement/component/UiCPVisualEditor.js +0 -896
- package/src/uielement/component/UiCPVisualEditor.scss +0 -108
- package/src/uielement/component/UiCPVisualEditorConfigWindow.js +0 -303
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
# Version 2.5.
|
|
2
|
-
*
|
|
1
|
+
# Version 2.5.68, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/98ad55fc31f43905c6600483ea3665275bccbcb0)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: NEVA-439: set null values before send on server for postgres</span> ([bf7739], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bf7739be43a2bb3e52932059699b493e31f2371f))
|
|
4
|
+
* <span style='color:green'>feat: HT-7969: set xtypes for editors</span> ([8c4edc], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8c4edc5c63f46d647bb4f3286e4517af31cbbe5b))
|
|
5
|
+
* <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))
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* <span style='color:red'> BFL-9170 GridRowStylePlugin in method renderer metadata equal nul</span> ([ac1868], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ac18684cc90b93256bc64067dc8a050d17fafa1d))
|
|
7
|
-
* <span style='color:red'> HT-7918 WindowWrap missing focus</span> ([0bdf38], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0bdf38c03dbd1cac10c9f2d8ea5d0786909d68e1))
|
|
7
|
+
* Resolve HT-7568 ([eb0297], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eb0297d1927ae6e2d3a8d492d368d5ea7bef89ef))
|
|
8
|
+
* update: CHANGELOG.md ([fed09b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/fed09bab2391b2ef0adde36107c4c8e9f8e9ad32))
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
# Version 2.5.67, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/eda77f29b413590ae650c8fb7ba1615c63cf104a)
|
|
11
|
+
* update: CHANGELOG.md ([c9c3ce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c9c3ceb588fa3e6bbf7e1cc4b1dec223a9f11a7f))
|
|
10
12
|
|
|
11
|
-
# Version 2.5.
|
|
13
|
+
# Version 2.5.66, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/dcba8ef34445cf8802926b747844bbbf086fd76d)
|
|
14
|
+
* update: CHANGELOG.md ([035aa3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/035aa331319ac8d972f5289467698bff54180bd1))
|
|
15
|
+
|
|
16
|
+
# Version 2.5.65, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3fe0112c646f6daed5bd7988f8c46b4b83c95d00)
|
|
17
|
+
* update: CHANGELOG.md ([0d40ec], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0d40ecf9ac3d6a716830785e5dc21c451ad9b233))
|
|
18
|
+
|
|
19
|
+
# Version 2.5.64, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d55fa844a67279117847d229fd7edcb5b5784fe9)
|
|
12
20
|
* ## Features
|
|
21
|
+
* <span style='color:green'>feat: HT-7281 GridEditorPlugin editor dependField</span> ([975be6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/975be69118652f7995b2bfd40e5a174deaa47c68))
|
|
13
22
|
* <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))
|
|
14
23
|
* <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))
|
|
15
24
|
* <span style='color:green'>feat: HT-7281 GridEditorPlugin editor dependField</span> ([387052], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/38705228276f86858100b6b43c0e204bcc6f26b7))
|
|
16
25
|
|
|
17
26
|
* ## Fixes
|
|
27
|
+
* <span style='color:red'> BFL-9170 GridRowStylePlugin in method renderer metadata equal nul</span> ([ac1868], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ac18684cc90b93256bc64067dc8a050d17fafa1d))
|
|
28
|
+
* <span style='color:red'> HT-7918 WindowWrap missing focus</span> ([0bdf38], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0bdf38c03dbd1cac10c9f2d8ea5d0786909d68e1))
|
|
18
29
|
* <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))
|
|
19
30
|
* <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))
|
|
20
31
|
|
package/package.json
CHANGED
package/src/common/component/characteristic/characteristicAlgorithm/CharacteristicAlgorithmList.js
CHANGED
|
@@ -66,7 +66,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
|
|
|
66
66
|
{
|
|
67
67
|
header: 'Тип элемента',
|
|
68
68
|
flex: 1,
|
|
69
|
-
dataIndex: '
|
|
69
|
+
dataIndex: 'AlgoritmChain',
|
|
70
70
|
renderer: function(value) {
|
|
71
71
|
return value ? 'Цепочка' : 'Алгоритм';
|
|
72
72
|
},
|
|
@@ -74,9 +74,9 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
|
|
|
74
74
|
{
|
|
75
75
|
header: 'Идентификатор',
|
|
76
76
|
flex: 1,
|
|
77
|
-
dataIndex: '
|
|
77
|
+
dataIndex: 'algoritmChain',
|
|
78
78
|
renderer: function(value, meta, record) {
|
|
79
|
-
return value ? value : record.get('
|
|
79
|
+
return value ? value : record.get('AlgoritmID');
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -19,7 +19,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
|
|
|
19
19
|
load: function() {
|
|
20
20
|
const command = Ext.create('Iswe.command.IsweGetAlgorithmChainBind');
|
|
21
21
|
command.on('complete', function(data) {
|
|
22
|
-
this.getViewModel().getStore('mainStore').loadData(data['
|
|
22
|
+
this.getViewModel().getStore('mainStore').loadData(data['algoritmChainList'] || []);
|
|
23
23
|
}, this);
|
|
24
24
|
command.execute(this.subentity);
|
|
25
25
|
},
|
|
@@ -111,7 +111,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicAlgorithm.Char
|
|
|
111
111
|
this.getView().unmask();
|
|
112
112
|
}
|
|
113
113
|
this.getView().fireEvent('save', this);
|
|
114
|
-
this.getViewModel().getStore('mainStore').loadData(response['
|
|
114
|
+
this.getViewModel().getStore('mainStore').loadData(response['algoritmChainList'] || []);
|
|
115
115
|
}, this);
|
|
116
116
|
command.execute(this.subentity, Ext.encode(this.getData()));
|
|
117
117
|
}
|
package/src/common/component/characteristic/characteristicGroup/EntityGroupCharacteristicEditor.js
CHANGED
|
@@ -128,6 +128,7 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
128
128
|
xtype: 'hintColumn',
|
|
129
129
|
editor: {
|
|
130
130
|
xtype: 'XTypeComboBox',
|
|
131
|
+
displayField: 'xtype',
|
|
131
132
|
xtypeBound: function(item) {
|
|
132
133
|
return item.prototype && item.prototype.isXType && item.prototype.isXType('BaseEditorCreator');
|
|
133
134
|
},
|
|
@@ -163,7 +164,8 @@ Ext.define('Coon.uielement.component.characteristic.characteristicGroup.EntityGr
|
|
|
163
164
|
],
|
|
164
165
|
features: [{
|
|
165
166
|
ftype: 'grouping',
|
|
166
|
-
groupHeaderTpl: '{name}',
|
|
167
|
+
groupHeaderTpl: '{name} - {[ values.children[0].data.groupDescription ]}',
|
|
168
|
+
|
|
167
169
|
}],
|
|
168
170
|
plugins: {
|
|
169
171
|
cellediting: {
|
|
@@ -4,6 +4,7 @@ Ext.define('Coon.common.component.editor.creators.CustomPanelEditorCreator', {
|
|
|
4
4
|
'SigmaUtilities.view.common.component.editor.creators.CustomPanelEditorCreator'
|
|
5
5
|
],
|
|
6
6
|
alias: 'widget.CustomPanelEditorCreator',
|
|
7
|
+
xtype: 'CustomPanelEditorCreator',
|
|
7
8
|
config: {
|
|
8
9
|
uiElementCd: null,
|
|
9
10
|
},
|
|
@@ -4,7 +4,7 @@ Ext.define('Coon.common.component.editor.creators.ForeignKeyEditorCreator', {
|
|
|
4
4
|
'SigmaUtilities.view.common.component.editor.creators.ForeignKeyEditorCreator'
|
|
5
5
|
],
|
|
6
6
|
alias: 'widget.ForeignKeyEditorCreator',
|
|
7
|
-
|
|
7
|
+
xtype: 'ForeignKeyEditorCreator',
|
|
8
8
|
disableInternalEditor: true,
|
|
9
9
|
|
|
10
10
|
createField: function(record, grid, context) {
|
|
@@ -4,7 +4,7 @@ Ext.define('Coon.common.component.editor.creators.NoteEditorCreator', {
|
|
|
4
4
|
'SigmaUtilities.view.common.component.editor.creators.NoteEditorCreator'
|
|
5
5
|
],
|
|
6
6
|
alias: 'widget.NoteEditorCreator',
|
|
7
|
-
|
|
7
|
+
xtype: 'NoteEditorCreator',
|
|
8
8
|
createField: function(record, parent) {
|
|
9
9
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
10
10
|
this.field = Ext.create('Coon.common.field.OpenDialogField', {
|
|
@@ -4,6 +4,7 @@ Ext.define('Coon.common.component.editor.creators.NumberEditorCreator', {
|
|
|
4
4
|
'SigmaUtilities.view.common.component.editor.creators.NumberEditorCreator'
|
|
5
5
|
],
|
|
6
6
|
alias: 'widget.NumberEditorCreator',
|
|
7
|
+
xtype: 'NumberEditorCreator',
|
|
7
8
|
decimalSeparator: ',',
|
|
8
9
|
|
|
9
10
|
normalizeRawValue(raw, separator) {
|
|
@@ -11,7 +11,7 @@ Ext.define('Coon.common.component.editor.creators.SimpleReportEditorCreator', {
|
|
|
11
11
|
'SigmaUtilities.view.common.component.editor.creators.SimpleReportEditorCreator'
|
|
12
12
|
],
|
|
13
13
|
alias: 'widget.SimpleReportEditorCreator',
|
|
14
|
-
|
|
14
|
+
xtype: 'SimpleReportEditorCreator',
|
|
15
15
|
createField: function(record, parent, context) {
|
|
16
16
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
17
17
|
const reportId = record.get(ns.$mask);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Ext.define('Coon.common.component.editor.creators.TimeEditorCreator', {
|
|
2
2
|
extend: 'Coon.common.component.editor.creators.BaseEditorCreator',
|
|
3
3
|
alias: 'widget.TimeEditorCreator',
|
|
4
|
-
|
|
4
|
+
xtype: 'TimeEditorCreator',
|
|
5
5
|
createField: function(record, parent) {
|
|
6
6
|
const charNs = Coon.report.model.CharacteristicBeanFields;
|
|
7
7
|
|
|
@@ -4,6 +4,7 @@ Ext.define('Coon.common.component.editor.creators.TriggerFieldEditorCreator', {
|
|
|
4
4
|
'SigmaUtilities.view.common.component.editor.creators.TriggerFieldEditorCreator'
|
|
5
5
|
],
|
|
6
6
|
alias: 'widget.TriggerFieldEditorCreator',
|
|
7
|
+
xtype: 'TriggerFieldEditorCreator',
|
|
7
8
|
assignDoubleClick: true,
|
|
8
9
|
updateOnClose: false,
|
|
9
10
|
editable: true,
|
|
@@ -129,7 +129,6 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormView', {
|
|
|
129
129
|
valueField: 'MENU_ENTRY_CD',
|
|
130
130
|
displayField: 'DESCR',
|
|
131
131
|
reportId: 'MENU_ENTRY_LIST',
|
|
132
|
-
fieldLabel: 'Родительское меню',
|
|
133
132
|
bind: {
|
|
134
133
|
value: '{menu.parentMenuId}',
|
|
135
134
|
disabled: '{!menu.parentMenuId}',
|
|
@@ -66,6 +66,23 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormViewController', {
|
|
|
66
66
|
return result;
|
|
67
67
|
},
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Срабатывает при сохранении формы
|
|
71
|
+
* Пелучаем данные формы и обрабатывает пустые значения (для postgres)
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
getSavedData() {
|
|
75
|
+
const vmData = this.getViewModel().get('menu');
|
|
76
|
+
const data = {};
|
|
77
|
+
if (Ext.isObject(vmData)) {
|
|
78
|
+
for (const [key, value] of Object.entries(vmData)) {
|
|
79
|
+
data[key] = !Ext.isString(value) || value.trim() ? value : null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return data;
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
|
|
69
86
|
/**
|
|
70
87
|
* Срабатывает при сохранении формы
|
|
71
88
|
* Вызывает команду по добавлению/сохранению данных о элементе меню
|
|
@@ -75,7 +92,7 @@ Ext.define('Coon.nav.editor.menu.form.NavMenuFormViewController', {
|
|
|
75
92
|
if (this.validate()) {
|
|
76
93
|
const vm = this.getViewModel();
|
|
77
94
|
const commandClass = vm.get('newMenu') ? 'AddMenuCommand' : 'SaveMenuCommand';
|
|
78
|
-
Coon.util.promisifyCmd('command.' + commandClass,
|
|
95
|
+
Coon.util.promisifyCmd('command.' + commandClass, this.getSavedData())
|
|
79
96
|
.then((menuBean) => {
|
|
80
97
|
vm.set('menu', menuBean);
|
|
81
98
|
this.getView().close();
|
|
@@ -2,6 +2,7 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
|
|
|
2
2
|
extend: 'Ext.grid.Panel',
|
|
3
3
|
alias: 'widget.ReportPropertiesGrid',
|
|
4
4
|
alternateClassName: 'Sigma.component.report.settings.ReportPropertiesGrid',
|
|
5
|
+
cls: 'ReportPropertiesGrid',
|
|
5
6
|
requires: [],
|
|
6
7
|
controller: 'reportPropertiesGridController',
|
|
7
8
|
config: {
|
|
@@ -24,7 +25,6 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
|
|
|
24
25
|
},
|
|
25
26
|
applyEnableAddProps: function(value) {
|
|
26
27
|
this.lookup('addButton').setDisabled(!value);
|
|
27
|
-
this.lookup('editorButton').setDisabled(!value);
|
|
28
28
|
},
|
|
29
29
|
title: 'Свойства',
|
|
30
30
|
selModel: {
|
|
@@ -48,33 +48,56 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGrid', {
|
|
|
48
48
|
handler: 'deleteHandler',
|
|
49
49
|
reference: 'deleteButton',
|
|
50
50
|
disabled: true,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
text: '{}',
|
|
54
|
-
tooltip: 'Открыть в редакторе',
|
|
55
|
-
ui: 'blue-text-button-border',
|
|
56
|
-
handler: 'openInEditor',
|
|
57
|
-
reference: 'editorButton',
|
|
58
51
|
}
|
|
59
52
|
],
|
|
60
53
|
}],
|
|
61
54
|
columns: {
|
|
62
55
|
defaults: {
|
|
63
|
-
required: true,
|
|
64
56
|
xtype: 'hintColumn',
|
|
65
|
-
|
|
66
|
-
xtype: 'textfield',
|
|
67
|
-
allowBlank: false,
|
|
68
|
-
},
|
|
57
|
+
required: true,
|
|
69
58
|
},
|
|
70
59
|
items: [
|
|
71
|
-
{
|
|
72
|
-
|
|
60
|
+
{
|
|
61
|
+
text: 'Номер',
|
|
62
|
+
dataIndex: 'sequenceNumber',
|
|
63
|
+
width: 50,
|
|
64
|
+
hidden: true,
|
|
65
|
+
|
|
66
|
+
editor: {
|
|
67
|
+
xtype: 'textfield',
|
|
68
|
+
allowBlank: true,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
text: 'Ключ',
|
|
73
|
+
dataIndex: 'key',
|
|
74
|
+
flex: 1,
|
|
75
|
+
editor: {
|
|
76
|
+
xtype: 'textfield',
|
|
77
|
+
allowBlank: false,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
73
80
|
{
|
|
74
81
|
text: 'Значение',
|
|
75
82
|
dataIndex: 'value',
|
|
76
83
|
flex: 1,
|
|
77
84
|
editor: 'textfield',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
xtype: 'actioncolumn',
|
|
88
|
+
width: 50,
|
|
89
|
+
items: [{
|
|
90
|
+
iconCls: 'svg-fa svg-fa-pencil',
|
|
91
|
+
tooltip: 'Редактировать',
|
|
92
|
+
handler: 'openValueEditor',
|
|
93
|
+
}],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
text: 'mode',
|
|
97
|
+
dataIndex: 'mode',
|
|
98
|
+
width: 50,
|
|
99
|
+
required: false,
|
|
100
|
+
hidden: true,
|
|
78
101
|
}
|
|
79
102
|
],
|
|
80
103
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.ReportPropertiesModifier {
|
|
2
|
+
.x-segmented-button {
|
|
3
|
+
border: 1px solid #3d6780;
|
|
4
|
+
border-radius: 6px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
|
|
7
|
+
.x-segmented-button-item {
|
|
8
|
+
padding: 6px 8px;
|
|
9
|
+
background-color: #ffffff;
|
|
10
|
+
.x-btn-inner {
|
|
11
|
+
color: #3d6780;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&.x-btn-pressed {
|
|
15
|
+
background-color: #3d6780;
|
|
16
|
+
.x-btn-inner {
|
|
17
|
+
color: #ffffff;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > *:not(:last-child) {
|
|
23
|
+
border-right: 1px solid #3d6780;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -40,12 +40,11 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
|
|
|
40
40
|
Coon.log.error('Unable to save data, some parameter properties have empty key or value');
|
|
41
41
|
isValid = false;
|
|
42
42
|
}
|
|
43
|
-
const columns = this.getView().getColumns()
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
43
|
+
const columns = this.getView().getColumns()
|
|
44
|
+
.filter((c) => c.xtype !== 'actioncolumn');
|
|
45
|
+
const columnsReq = columns
|
|
46
|
+
.filter((column) => column.required === true)
|
|
47
|
+
.map((column) => column.dataIndex);
|
|
49
48
|
|
|
50
49
|
properties.forEach((prop) => {
|
|
51
50
|
if (!prop['isDeleted']) {
|
|
@@ -193,4 +192,130 @@ Ext.define('Coon.report.component.settings.ReportPropertiesGridController', {
|
|
|
193
192
|
updateProperties: function() {
|
|
194
193
|
this.getView().publishState('data', Coon.Function.serializeRecords(this.getView().getStore().getRange()));
|
|
195
194
|
},
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* open editional editor to change value
|
|
198
|
+
*/
|
|
199
|
+
openValueEditor: function(grid, rowIndex, colIndex) {
|
|
200
|
+
const rec = grid.getStore().getAt(rowIndex);
|
|
201
|
+
const value = rec.get('value');
|
|
202
|
+
|
|
203
|
+
// set row as selected
|
|
204
|
+
grid.setSelection(rec);
|
|
205
|
+
|
|
206
|
+
const chooseMode = (button) => {
|
|
207
|
+
const mode = button.getText();
|
|
208
|
+
const value = win.down('UiAceEditor').getValue();
|
|
209
|
+
|
|
210
|
+
// rerender editor
|
|
211
|
+
win.removeAll();
|
|
212
|
+
const editor = Ext.widget('UiAceEditor', {
|
|
213
|
+
useLinter: mode === 'json' ? true : false,
|
|
214
|
+
mode,
|
|
215
|
+
enableEmptyValue: true,
|
|
216
|
+
});
|
|
217
|
+
editor.on('boxready', function() {
|
|
218
|
+
if (mode === 'javascript') {
|
|
219
|
+
// filter annotations
|
|
220
|
+
const doLint = new Ext.util.DelayedTask(function() {
|
|
221
|
+
editor.editor.getSession().$annotations.filter((a) => a.text !== 'Missing name in function declaration.');
|
|
222
|
+
editor.highlightErrors();
|
|
223
|
+
});
|
|
224
|
+
editor.editor.on('change', function(action, editor) {
|
|
225
|
+
const value = editor.getValue();
|
|
226
|
+
// remove annotation if Javascript mode enabled
|
|
227
|
+
doLint.delay(1000, undefined, undefined, [value]);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
win.add(editor);
|
|
232
|
+
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
win.down('UiAceEditor').setValue(value);
|
|
235
|
+
}, 0);
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const win = Ext.widget('WindowWrap', {
|
|
239
|
+
layout: 'fit',
|
|
240
|
+
width: 660,
|
|
241
|
+
height: 430,
|
|
242
|
+
title: 'Редактирование свойства ' + rec.get('key') || '',
|
|
243
|
+
cls: 'ReportPropertiesModifier',
|
|
244
|
+
tbar: [
|
|
245
|
+
{
|
|
246
|
+
xtype: 'segmentedbutton',
|
|
247
|
+
items: [
|
|
248
|
+
{
|
|
249
|
+
itemId: 'modeText',
|
|
250
|
+
text: 'text',
|
|
251
|
+
pressed: true,
|
|
252
|
+
handler: chooseMode,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
itemId: 'modeJavascript',
|
|
256
|
+
text: 'javascript',
|
|
257
|
+
handler: chooseMode,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
itemId: 'modeJson',
|
|
261
|
+
text: 'json',
|
|
262
|
+
handler: chooseMode,
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
items: [{
|
|
268
|
+
xtype: 'UiAceEditor',
|
|
269
|
+
useLinter: false,
|
|
270
|
+
mode: 'text',
|
|
271
|
+
}],
|
|
272
|
+
buttons: [
|
|
273
|
+
{
|
|
274
|
+
xtype: 'button',
|
|
275
|
+
text: 'Сохранить',
|
|
276
|
+
ui: 'orange-button',
|
|
277
|
+
handler: function() {
|
|
278
|
+
const me = this;
|
|
279
|
+
const hasErrors = me.up('WindowWrap').down('UiAceEditor').getErrors().length > 0;
|
|
280
|
+
|
|
281
|
+
// eslint-disable-next-line require-jsdoc
|
|
282
|
+
function save() {
|
|
283
|
+
rec.set({
|
|
284
|
+
value: me.up('WindowWrap').down('UiAceEditor').getValue(),
|
|
285
|
+
});
|
|
286
|
+
me.up('WindowWrap').close();
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
if (hasErrors) {
|
|
290
|
+
Ext.Msg.show({
|
|
291
|
+
title: 'Ошибка при вводе значения',
|
|
292
|
+
message: 'Сохранить значение?',
|
|
293
|
+
buttons: Ext.Msg.YESNO,
|
|
294
|
+
icon: Ext.Msg.WARNING,
|
|
295
|
+
fn: function(btn) {
|
|
296
|
+
if (btn === 'yes') {
|
|
297
|
+
save();
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
save();
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
xtype: 'button',
|
|
308
|
+
text: 'Закрыть',
|
|
309
|
+
ui: 'green-button',
|
|
310
|
+
handler: function() {
|
|
311
|
+
this.up('WindowWrap').close();
|
|
312
|
+
},
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
});
|
|
316
|
+
win.show();
|
|
317
|
+
|
|
318
|
+
win.down('UiAceEditor').setValue(value);
|
|
319
|
+
win.down('UiAceEditor').editor.focus();
|
|
320
|
+
},
|
|
196
321
|
});
|
|
@@ -33,11 +33,13 @@ Ext.define('Coon.report.component.settings.ReportFormFieldEditPanelController',
|
|
|
33
33
|
const fieldsPanel = Ext.widget('ReportGrid', Coon.report.component.ReportPanel.getColumnsConfig(fields));
|
|
34
34
|
fieldsPanelContainer.add(fieldsPanel);
|
|
35
35
|
fieldsPanelContainer.updateLayout();
|
|
36
|
+
this.fieldsDataSetted = true;
|
|
36
37
|
},
|
|
37
38
|
|
|
38
39
|
sendFieldsDataForSave: function() {
|
|
39
40
|
const fieldsGrid = this.lookup('fieldsGrid');
|
|
40
|
-
|
|
41
|
+
const fieldsData = this.fieldsDataSetted ? fieldsGrid.getData() : this.getViewModel().get('report.fields');
|
|
42
|
+
fieldsGrid.publishState('data', fieldsData);
|
|
41
43
|
},
|
|
42
44
|
|
|
43
45
|
beforeEditFieldPropertiesHandler: function(editor, context) {
|
|
@@ -70,7 +70,7 @@ Ext.define('Coon.report.plugin.configPanel.GridEditorPluginConfig', {
|
|
|
70
70
|
Coon.Function.clearAllFieldsOnForm(this.editForm);
|
|
71
71
|
const recordConfig = this.editorConfig.find((el) => el.type === record.get(ns.$type));
|
|
72
72
|
Coon.Function.fillFormFields(this.editForm, recordConfig);
|
|
73
|
-
if (recordConfig[ns.$mask]) {
|
|
73
|
+
if (recordConfig && recordConfig[ns.$mask]) {
|
|
74
74
|
this.editForm.down('UiAceEditor').setValue(recordConfig[ns.$mask]);
|
|
75
75
|
}
|
|
76
76
|
this.editForm.setDisabled(!record);
|
|
@@ -112,6 +112,7 @@ Ext.define('Coon.report.plugin.configPanel.GridEditorPluginConfig', {
|
|
|
112
112
|
xtype: 'fieldset',
|
|
113
113
|
checkboxName: 'dependsOnField',
|
|
114
114
|
checkboxToggle: true,
|
|
115
|
+
collapsed: true,
|
|
115
116
|
layout: {
|
|
116
117
|
type: 'vbox',
|
|
117
118
|
align: 'stretch',
|
|
@@ -169,7 +170,7 @@ Ext.define('Coon.report.plugin.configPanel.GridEditorPluginConfig', {
|
|
|
169
170
|
|
|
170
171
|
doInit: function(properties) {
|
|
171
172
|
if (properties) {
|
|
172
|
-
this.editorConfig = properties['editorConfig'];
|
|
173
|
+
this.editorConfig = properties['editorConfig'] || [];
|
|
173
174
|
if (Ext.isString(this.editorConfig)) {
|
|
174
175
|
this.editorConfig = Ext.decode(this.editorConfig);
|
|
175
176
|
}
|
|
@@ -197,7 +198,9 @@ Ext.define('Coon.report.plugin.configPanel.GridEditorPluginConfig', {
|
|
|
197
198
|
}
|
|
198
199
|
record.set('isDeleted', true);
|
|
199
200
|
const foundIndex = this.editorConfig.findIndex((el) => el.type === record.get('type'));
|
|
200
|
-
|
|
201
|
+
if (foundIndex !== -1) {
|
|
202
|
+
this.editorConfig.splice(foundIndex, 1);
|
|
203
|
+
}
|
|
201
204
|
Coon.Function.clearAllFieldsOnForm(this.editForm);
|
|
202
205
|
this.editForm.setDisabled(true);
|
|
203
206
|
this.grid.getStore().remove(record);
|
|
@@ -14,9 +14,11 @@ Ext.define('Coon.uielement.component.settings.UiAceEditor', {
|
|
|
14
14
|
value: '',
|
|
15
15
|
readOnly: false,
|
|
16
16
|
useLinter: false,
|
|
17
|
+
enableEmptyValue: false,
|
|
17
18
|
},
|
|
18
19
|
errors: [],
|
|
19
20
|
keyMapEnabled: true,
|
|
21
|
+
linterInitialized: false,
|
|
20
22
|
|
|
21
23
|
keyMap: {
|
|
22
24
|
'F4': {
|
|
@@ -249,20 +251,15 @@ Ext.define('Coon.uielement.component.settings.UiAceEditor', {
|
|
|
249
251
|
}.bind(this));
|
|
250
252
|
this.editor.setOptions(this.getEditModeConfig());
|
|
251
253
|
if (this.getUseLinter()) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
this.addPlugin({
|
|
255
|
+
ptype: 'UiAceLinterPlugin',
|
|
256
|
+
enableEmptyValue: this.enableEmptyValue,
|
|
257
|
+
});
|
|
258
|
+
if (typeof this.doLint === 'function') {
|
|
255
259
|
const doLint = new Ext.util.DelayedTask(this.doLint);
|
|
256
260
|
this.editor.on('change', (data) => {
|
|
257
|
-
|
|
258
|
-
doLint.delay(1000, undefined, undefined, [data]);
|
|
259
|
-
}
|
|
261
|
+
doLint.delay(1000, undefined, undefined, [data]);
|
|
260
262
|
}, this);
|
|
261
|
-
vm.bind('{iframeIsFirstLoad}', (iframeIsFirstLoad) => {
|
|
262
|
-
if (iframeIsFirstLoad) {
|
|
263
|
-
doLint.delay(1000, undefined, undefined, [this.editor.getSession().getValue()]);
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
263
|
}
|
|
267
264
|
}
|
|
268
265
|
if (this.type) {
|
|
@@ -277,6 +274,7 @@ Ext.define('Coon.uielement.component.settings.UiAceEditor', {
|
|
|
277
274
|
console.error(`${this.type} is not supported.`);
|
|
278
275
|
}
|
|
279
276
|
}
|
|
277
|
+
this.linterInitialized = true;
|
|
280
278
|
this.fireEvent('ready', this);
|
|
281
279
|
},
|
|
282
280
|
|
|
@@ -48,6 +48,8 @@ Ext.define('Coon.uielement.component.settings.config.UiCPConfigPanelController',
|
|
|
48
48
|
uiEditor.setCallback(
|
|
49
49
|
this.getConfigHandlerNames.bind(this)
|
|
50
50
|
);
|
|
51
|
+
const doLint = new Ext.util.DelayedTask(uiEditor.doLint);
|
|
52
|
+
doLint.delay(1000, undefined, undefined, [uiEditor.editor.getSession().getValue()]);
|
|
51
53
|
},
|
|
52
54
|
setHandlerList(data) {
|
|
53
55
|
this.lookup('uiEditor').setHandlerList(data);
|