ru.coon 2.5.44 → 2.5.46
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 +20 -0
- package/package.json +1 -1
- package/src/SystemProperties.js +1 -1
- package/src/chart/editor/CoonChartEditorController.js +1 -1
- package/src/common/component/editor/CharacteristicGridEditor.js +1 -0
- package/src/common/field/EditorJs.js +91 -0
- package/src/common/field/EditorJs.scss +41 -0
- package/src/common/field/EditorJsField.js +36 -0
- package/src/nav/editor/menu/NavMenuTreeController.js +1 -1
- package/src/report/component/ParameterizedReportCombo.js +2 -2
- package/src/report/component/ReportLookupCombo.js +6 -4
- package/src/report/component/ReportPickerLookupCombo.js +1 -1
- package/src/report/component/settings/ReportCustomPluginPropertiesGrid.js +2 -1
- package/src/report/component/settings/history/ReportFormHistoryPanelController.js +5 -5
- package/src/report/component/settings/plugin/ReportFormPluginGridController.js +1 -1
- package/src/research/command/GetCoonChartStructure.js +1 -1
- package/src/research/command/GetReportStructure.js +1 -1
- package/src/research/command/GetUiStructure.js +1 -1
- package/src/research/command/GetWidgetPanelStructure.js +1 -1
- package/src/uielement/component/settings/version/UiCPVersionPanelController.js +5 -5
- package/src/util.js +34 -3
- package/src/version.js +1 -1
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
+
# Version 2.5.46, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a60918e34030d42d694153e8a86fa2c13c97e3a0)
|
|
2
|
+
* Update src/util.js ([da9c30], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da9c307688b60cfa198137929578f257e3d0645f))
|
|
3
|
+
* HT-7570 Падает SelectionModelFeature ([df48e2], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/df48e24511eec0e5572d30984fbf6d24ec2e09cd))
|
|
4
|
+
* HT-7570 Падает SelectionModelFeature ([09366e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/09366ee08c7700ba03ea46ebb5bc9461963ea9d3))
|
|
5
|
+
* execute commands by alias ([8bbb51], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8bbb5103462c18d7e82050feaaa119188a96f5a9))
|
|
6
|
+
* Update src/util.js ([d8230b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8230b854d313a82eab2243bb264da9b239ebd6b))
|
|
7
|
+
* update: CHANGELOG.md ([0ba408], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0ba4083336d6e3a3ea078bb20c8bf40e8c19c9c7))
|
|
8
|
+
|
|
9
|
+
# Version 2.5.45, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1e28ba95e77bbe4be40d19ea9fde58a74fbb645)
|
|
10
|
+
* ## Fixes
|
|
11
|
+
* <span style='color:red'> hot-fix: move EditorJs to coon from project</span> ([12daf8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/12daf8abb9dbaf48910870616b0e6d52f3b2bbfd))
|
|
12
|
+
|
|
13
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/util.js5a11846bc2f75dd40b3c0f2239047d95f1a9371c))
|
|
14
|
+
* BFL-9850 Ошибка при сохранении пункта меню ([270e31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/270e3170b5a70b306591730dce53023dcebf6f34))
|
|
15
|
+
* update: CHANGELOG.md ([8b0186], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b0186d787ec77ad2a4dfc211e85c8ffadee6559))
|
|
16
|
+
|
|
1
17
|
# Version 2.5.44, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c4d4a663ae3451dec321c0d68bf1d5c8d70ff58)
|
|
18
|
+
* ## Fixes
|
|
19
|
+
* <span style='color:red'> HT-7469: commit store state on doInit action. This method remove all modified records from store state</span> ([34c025], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34c02583013b66314a74c2fbc9512f04f218d85e))
|
|
20
|
+
|
|
2
21
|
* hotfix Coon.Function.executeComponentDoInit ([c9e04c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c9e04c22329f1d7822b91a47eca899c6f6e7f95e))
|
|
3
22
|
* update: CHANGELOG.md ([f47bce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f47bce91314446c8f88961ba976fc132e11318d0))
|
|
4
23
|
|
|
@@ -39,6 +58,7 @@
|
|
|
39
58
|
* <span style='color:red'>fix</span> ([5400c1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5400c17b624f78acfa1dbe8c27742e7a1f4b1cc1))
|
|
40
59
|
* <span style='color:red'> Переделан механизм добавления меню в кнопку "Поиск"</span> ([0437f3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0437f3f77c410d545f65d75516091db6ba41ad80))
|
|
41
60
|
|
|
61
|
+
* CRM-7853 ParameterizedReportCombo исправлена ошибка отображения параметров поиска ([702d8a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/702d8a5a99970682b0ad3ac50112553685b27e34))
|
|
42
62
|
* revert to bf9339051130805e551f48ce07bd5bac3d49d140 ([80394d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/80394d8e7b64a12c3e137d74661c529d6162004c))
|
|
43
63
|
* update: CHANGELOG.md ([14b820], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/14b8208316d9994deafbbd54ccab2fdae4900e74))
|
|
44
64
|
|
package/package.json
CHANGED
package/src/SystemProperties.js
CHANGED
|
@@ -140,7 +140,7 @@ Ext.define('Coon.SystemProperties', {
|
|
|
140
140
|
return Promise.resolve(valuesMap.get(prop));
|
|
141
141
|
} else {
|
|
142
142
|
return Coon.util.promisifyCmd(
|
|
143
|
-
'
|
|
143
|
+
'command.GetPropertyFromConfigurationCommand',
|
|
144
144
|
prop
|
|
145
145
|
)
|
|
146
146
|
.then((data) => {
|
|
@@ -172,7 +172,7 @@ Ext.define('Coon.chart.editor.CoonChartEditorController', {
|
|
|
172
172
|
},
|
|
173
173
|
|
|
174
174
|
getReportFieldsData(reportId) {
|
|
175
|
-
return Coon.util.promisifyCmd('command.LoadDynamicReportCommand', {reportId: reportId});
|
|
175
|
+
return Coon.util.promisifyCmd({command: 'command.LoadDynamicReportCommand', params: {reportId: reportId}});
|
|
176
176
|
},
|
|
177
177
|
|
|
178
178
|
getCommandsList() {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Ext.define('Coon.common.field.EditorJs', {
|
|
2
|
+
extend: 'Ext.Component',
|
|
3
|
+
xtype: 'EditorJs',
|
|
4
|
+
cls: 'EditorJs',
|
|
5
|
+
config: {
|
|
6
|
+
value: '',
|
|
7
|
+
name: '',
|
|
8
|
+
},
|
|
9
|
+
countColumns: 1,
|
|
10
|
+
twoWayBindable: ['value', 'countColumns'],
|
|
11
|
+
|
|
12
|
+
margin: '40 0 0 0',
|
|
13
|
+
|
|
14
|
+
listeners: {
|
|
15
|
+
boxready: function() {
|
|
16
|
+
this.renderEditor();
|
|
17
|
+
},
|
|
18
|
+
beforedestroy: function() {
|
|
19
|
+
if (this.editor) {
|
|
20
|
+
Ext.dom.Query.select('[data-id="' + this.getId() + '"]').forEach((elem) => {
|
|
21
|
+
elem.remove();
|
|
22
|
+
});
|
|
23
|
+
typeof this.editor.destroy === 'function' && this.editor.destroy();
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
setCountColumns: function(value) {
|
|
28
|
+
// console.log(this.editor,value)
|
|
29
|
+
this.countColumns = value;
|
|
30
|
+
},
|
|
31
|
+
getCountColumns: function() {
|
|
32
|
+
return this.countColumns;
|
|
33
|
+
},
|
|
34
|
+
setValue: function(value) {
|
|
35
|
+
if (this.editor && typeof this.editor.render === 'function' && value) {
|
|
36
|
+
this.editor.render(JSON.parse(value));
|
|
37
|
+
}
|
|
38
|
+
this.value = value;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
getValue: function() {
|
|
42
|
+
return this.editor && typeof this.editor.save === 'function' && this.editor.save();
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
renderEditor: function() {
|
|
46
|
+
const me = this;
|
|
47
|
+
this.editor = new Ext.xEditorJS({
|
|
48
|
+
logLevel: 'ERROR',
|
|
49
|
+
tools: {
|
|
50
|
+
table: {
|
|
51
|
+
class: Ext.xTable,
|
|
52
|
+
inlineToolbar: false,
|
|
53
|
+
config: {
|
|
54
|
+
rows: 1,
|
|
55
|
+
cols: this.getCountColumns(),
|
|
56
|
+
dataTarget: this.getId(),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
i18n: {
|
|
61
|
+
messages: {
|
|
62
|
+
tools: {
|
|
63
|
+
table: {
|
|
64
|
+
'Merge Cells': 'Объеденить ячейки',
|
|
65
|
+
'Divide Cell': 'Разъеденить ячейки',
|
|
66
|
+
'Insert Column On Right': 'Добавить колонку справа',
|
|
67
|
+
'Insert Row Below': 'Добавить строку ниже',
|
|
68
|
+
'Remove Column': 'Удалить колонку',
|
|
69
|
+
'Remove Row': 'Удалить строку',
|
|
70
|
+
'Cell Color': 'Стили ячейки',
|
|
71
|
+
'Header Row': 'Заголавная строка',
|
|
72
|
+
'Header Column': 'Заглавная колонка',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
holder: this.getId(),
|
|
78
|
+
onChange: (api, event) => {
|
|
79
|
+
api.saver.save().then((data) => {
|
|
80
|
+
me.value = JSON.stringify(data);
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
onReady: () => {
|
|
84
|
+
me.setValue(me.value);
|
|
85
|
+
if (me.getEl() && me.getEl().dom) {
|
|
86
|
+
Ext.dom.Query.select('[data-item-name="paragraph"]', me.getEl().dom).forEach((el) => el.style.display = 'none');
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.tc-table__color-palette, .tc-table__option_table {
|
|
2
|
+
z-index: 9999999 !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.codex-editor__redactor {
|
|
6
|
+
padding-bottom: 50px !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.EditorJs {
|
|
10
|
+
.ce-block {
|
|
11
|
+
max-width: 650px;
|
|
12
|
+
border: 1px solid #dddddd;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.codex-editor__redactor {
|
|
16
|
+
padding-bottom: 50px !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ce-block__content {
|
|
20
|
+
margin: 5px 0 0 50px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ce-toolbar__content {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ce-toolbar__actions {
|
|
28
|
+
left: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tc-editor {
|
|
32
|
+
padding: 0 10px 10px 10px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tc-table__container {
|
|
36
|
+
padding: 40px 2px 16px 40px;
|
|
37
|
+
}
|
|
38
|
+
.codex-editor--narrow .ce-toolbox .ce-popover{
|
|
39
|
+
left: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Ext.define('Coon.common.field.EditorJsField', {
|
|
2
|
+
extend: 'Ext.form.FieldContainer',
|
|
3
|
+
xtype: 'EditorJsField',
|
|
4
|
+
config: {
|
|
5
|
+
value: '',
|
|
6
|
+
name: '',
|
|
7
|
+
},
|
|
8
|
+
countColumns: 1,
|
|
9
|
+
twoWayBindable: ['value', 'countColumns'],
|
|
10
|
+
layout: {
|
|
11
|
+
type: 'hbox',
|
|
12
|
+
align: 'stretch',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
initComponent: function() {
|
|
16
|
+
this.editor = Ext.create('Coon.common.field.EditorJs', {overflowY: true, width: '100%'});
|
|
17
|
+
this.items = [
|
|
18
|
+
{height: 40},
|
|
19
|
+
this.editor
|
|
20
|
+
];
|
|
21
|
+
this.callParent();
|
|
22
|
+
},
|
|
23
|
+
setCountColumns: function(value) {
|
|
24
|
+
this.editor && this.editor.setCountColumns(value);
|
|
25
|
+
},
|
|
26
|
+
getCountColumns: function() {
|
|
27
|
+
return this.countColumns;
|
|
28
|
+
},
|
|
29
|
+
setValue: function(value) {
|
|
30
|
+
this.editor && this.editor.setValue(value);
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
getValue: function() {
|
|
34
|
+
return this.editor && this.editor.getValue();
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -88,7 +88,7 @@ Ext.define('Coon.nav.editor.menu.NavMenuTreeController', {
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
loadMenuData: function(record) {
|
|
91
|
-
Coon.util.promisifyCmd('
|
|
91
|
+
Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ENTRY_LIST')
|
|
92
92
|
.then((data) => {
|
|
93
93
|
if (Ext.isArray(data.list)) {
|
|
94
94
|
const groupWorkspace = this.getGroupMenuByWorkspaceCd(data.list);
|
|
@@ -98,8 +98,8 @@ Ext.define('Coon.report.component.ParameterizedReportCombo', {
|
|
|
98
98
|
const memberFn = Ext.applyIf(this.memberFn || {}, {
|
|
99
99
|
getLastOptions: function() {
|
|
100
100
|
const data = [];
|
|
101
|
-
const searchParamsConfig = !Ext.isEmpty(this.getSearchParams()) ?
|
|
102
|
-
this.getSearchParams() :
|
|
101
|
+
const searchParamsConfig = !Ext.isEmpty(this.combo.getSearchParams()) ?
|
|
102
|
+
this.combo.getSearchParams() :
|
|
103
103
|
Coon.report.component.ParameterizedReportCombo.searchRules;
|
|
104
104
|
for (let i = 0; i < searchParamsConfig.length; i++) {
|
|
105
105
|
const obj = searchParamsConfig[i];
|
|
@@ -262,11 +262,13 @@ Ext.define('Coon.report.component.ReportLookupCombo', {
|
|
|
262
262
|
);
|
|
263
263
|
this.disable();
|
|
264
264
|
return Coon.util.promisifyCmd(
|
|
265
|
-
'command.GetDynamicReportDataCommand',
|
|
266
265
|
{
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
command: 'command.GetDynamicReportDataCommand',
|
|
267
|
+
params: {
|
|
268
|
+
reportId: this.reportId,
|
|
269
|
+
parameterList: this.prepareParams(parameters),
|
|
270
|
+
necessaryFields: this.useNecessaryFields && this.getReportFields(),
|
|
271
|
+
},
|
|
270
272
|
}
|
|
271
273
|
).then((result) => {
|
|
272
274
|
if (this.destroyed) {
|
|
@@ -444,7 +444,7 @@ Ext.define('Coon.report.component.ReportPickerLookupCombo', {
|
|
|
444
444
|
if (this.reportConfig) {
|
|
445
445
|
return Promise.resolve(this.reportConfig);
|
|
446
446
|
}
|
|
447
|
-
return Coon.util.promisifyCmd('command.LoadDynamicReportCommand', {reportId: this.reportId})
|
|
447
|
+
return Coon.util.promisifyCmd({command: 'command.LoadDynamicReportCommand', params: {reportId: this.reportId}})
|
|
448
448
|
.then((config) => {
|
|
449
449
|
this.reportConfig = config;
|
|
450
450
|
return this.reportConfig;
|
|
@@ -25,7 +25,8 @@ Ext.define('Coon.report.component.settings.ReportCustomPluginPropertiesGrid', {
|
|
|
25
25
|
if (config.isDeleted || !config.xtype) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const alias = (config.type === 'GRID_FEATURE' ? 'feature.' : 'plugin.') + config.xtype;
|
|
29
|
+
const plugin = Ext.createByAlias(alias, config.jsonProperties);
|
|
29
30
|
if (!plugin) {
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
@@ -33,7 +33,7 @@ Ext.define('Coon.report.component.settings.history.ReportFormHistoryPanelControl
|
|
|
33
33
|
if (id) {
|
|
34
34
|
grid.mask();
|
|
35
35
|
Coon.util.promisifyCmd(
|
|
36
|
-
'
|
|
36
|
+
'command.GetReportVersionListCommand',
|
|
37
37
|
id)
|
|
38
38
|
.then((rows) => {
|
|
39
39
|
grid.unmask();
|
|
@@ -60,7 +60,7 @@ Ext.define('Coon.report.component.settings.history.ReportFormHistoryPanelControl
|
|
|
60
60
|
const mainInfoSqlPanel = this.lookupReference('mainInfoSqlPanel');
|
|
61
61
|
ct.mask();
|
|
62
62
|
Coon.util.promisifyCmd(
|
|
63
|
-
'
|
|
63
|
+
'command.GetReportRevisionCommand',
|
|
64
64
|
record.get('reportId'),
|
|
65
65
|
record.get('revisionId')
|
|
66
66
|
)
|
|
@@ -192,12 +192,12 @@ Ext.define('Coon.report.component.settings.history.ReportFormHistoryPanelControl
|
|
|
192
192
|
if (this.getViewModel().get('selectionCount') == 2) {
|
|
193
193
|
promises = [
|
|
194
194
|
Coon.util.promisifyCmd(
|
|
195
|
-
'
|
|
195
|
+
'command.GetReportRevisionCommand',
|
|
196
196
|
selection[0].get('reportId'),
|
|
197
197
|
selection[0].get('revisionId')
|
|
198
198
|
),
|
|
199
199
|
Coon.util.promisifyCmd(
|
|
200
|
-
'
|
|
200
|
+
'command.GetReportRevisionCommand',
|
|
201
201
|
selection[1].get('reportId'),
|
|
202
202
|
selection[1].get('revisionId')
|
|
203
203
|
)
|
|
@@ -211,7 +211,7 @@ Ext.define('Coon.report.component.settings.history.ReportFormHistoryPanelControl
|
|
|
211
211
|
const mainData = this.getViewModel().get('report');
|
|
212
212
|
promises = [
|
|
213
213
|
Coon.util.promisifyCmd(
|
|
214
|
-
'
|
|
214
|
+
'command.GetReportRevisionCommand',
|
|
215
215
|
selection[0].get('reportId'),
|
|
216
216
|
selection[0].get('revisionId')
|
|
217
217
|
)
|
|
@@ -25,7 +25,7 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
25
25
|
|
|
26
26
|
addHandler: function(xtype) {
|
|
27
27
|
const defaultUiElementCd = `${xtype}_DEFAULTS`;
|
|
28
|
-
Coon.util.promisifyCmd('
|
|
28
|
+
Coon.util.promisifyCmd('command.GetUIElementCommand', defaultUiElementCd)
|
|
29
29
|
.then(function(data) {
|
|
30
30
|
this.addNewPlugin(xtype, Ext.decode(data.propertyData, true), defaultUiElementCd);
|
|
31
31
|
}.bind(this))
|
|
@@ -54,7 +54,7 @@ Ext.define('Coon.research.command.GetCoonChartStructure', {
|
|
|
54
54
|
|
|
55
55
|
async get(uiElementCd) {
|
|
56
56
|
try {
|
|
57
|
-
const ui = await Coon.util.promisifyCmd('
|
|
57
|
+
const ui = await Coon.util.promisifyCmd('command.GetUIElementCommand', uiElementCd);
|
|
58
58
|
return this.decode(ui);
|
|
59
59
|
} catch (ex) {
|
|
60
60
|
Coon.log.error('[ERROR], GetCoonChartStructure: ', ex);
|
|
@@ -144,7 +144,7 @@ Ext.define('Coon.research.command.GetReportStructure', {
|
|
|
144
144
|
|
|
145
145
|
async get(reportId) {
|
|
146
146
|
try {
|
|
147
|
-
const cfg = await Coon.util.promisifyCmd('
|
|
147
|
+
const cfg = await Coon.util.promisifyCmd('command.LoadDynamicReportCommand', reportId, true);
|
|
148
148
|
return this.decode(cfg);
|
|
149
149
|
} catch (ex) {
|
|
150
150
|
Coon.log.error('[ERROR], GetReportStructure: ', ex);
|
|
@@ -114,7 +114,7 @@ Ext.define('Coon.research.command.GetUIStructure', {
|
|
|
114
114
|
|
|
115
115
|
async get(uiElementCd, nullable) {
|
|
116
116
|
try {
|
|
117
|
-
const ui = await Coon.util.promisifyCmd('
|
|
117
|
+
const ui = await Coon.util.promisifyCmd('command.GetUIElementCommand', uiElementCd, nullable);
|
|
118
118
|
return this.decode(ui);
|
|
119
119
|
} catch (ex) {
|
|
120
120
|
Coon.log.error('[ERROR], GetUIStructure: ', ex);
|
|
@@ -66,7 +66,7 @@ Ext.define('Coon.research.command.GetWidgetPanelStructure', {
|
|
|
66
66
|
|
|
67
67
|
async get(uiElementCd) {
|
|
68
68
|
try {
|
|
69
|
-
const ui = await Coon.util.promisifyCmd('
|
|
69
|
+
const ui = await Coon.util.promisifyCmd('command.GetUIElementCommand', uiElementCd);
|
|
70
70
|
return this.decode(ui);
|
|
71
71
|
} catch (ex) {
|
|
72
72
|
Coon.log.error('[ERROR], GetWidgetPanelStructure: ', ex);
|
|
@@ -28,7 +28,7 @@ Ext.define('Coon.uielement.component.settings.version.UiCPVersionPanelController
|
|
|
28
28
|
if (id) {
|
|
29
29
|
grid.mask();
|
|
30
30
|
Coon.util.promisifyCmd(
|
|
31
|
-
'
|
|
31
|
+
'command.GetUIElementVersionListCommand',
|
|
32
32
|
id)
|
|
33
33
|
.then((rows) => {
|
|
34
34
|
grid.unmask();
|
|
@@ -53,7 +53,7 @@ Ext.define('Coon.uielement.component.settings.version.UiCPVersionPanelController
|
|
|
53
53
|
const viewer = ct.down('UiAceEditor');
|
|
54
54
|
ct.mask();
|
|
55
55
|
Coon.util.promisifyCmd(
|
|
56
|
-
'
|
|
56
|
+
'command.GetUIElementRevisionCommand',
|
|
57
57
|
record.get('uiElementId'),
|
|
58
58
|
record.get('revisionId')
|
|
59
59
|
)
|
|
@@ -179,12 +179,12 @@ Ext.define('Coon.uielement.component.settings.version.UiCPVersionPanelController
|
|
|
179
179
|
if (this.getViewModel().get('selectionCount') == 2) {
|
|
180
180
|
promises = [
|
|
181
181
|
Coon.util.promisifyCmd(
|
|
182
|
-
'
|
|
182
|
+
'command.GetUIElementRevisionCommand',
|
|
183
183
|
selection[0].get('uiElementId'),
|
|
184
184
|
selection[0].get('revisionId')
|
|
185
185
|
),
|
|
186
186
|
Coon.util.promisifyCmd(
|
|
187
|
-
'
|
|
187
|
+
'command.GetUIElementRevisionCommand',
|
|
188
188
|
selection[1].get('uiElementId'),
|
|
189
189
|
selection[1].get('revisionId')
|
|
190
190
|
)
|
|
@@ -201,7 +201,7 @@ Ext.define('Coon.uielement.component.settings.version.UiCPVersionPanelController
|
|
|
201
201
|
const UiCustomPanelEditor = this.getView().up('UiCustomPanelEditor');
|
|
202
202
|
UiCustomPanelEditor.getController().beatify();
|
|
203
203
|
Coon.util.promisifyCmd(
|
|
204
|
-
'
|
|
204
|
+
'command.GetUIElementRevisionCommand',
|
|
205
205
|
selection[0].get('uiElementId'),
|
|
206
206
|
selection[0].get('revisionId')
|
|
207
207
|
).then((versionData) => {
|
package/src/util.js
CHANGED
|
@@ -18,11 +18,42 @@ Ext.define('Coon.util', {
|
|
|
18
18
|
return Ext.isObject(cmd) && cmd.isCommand;
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
+
isCommandAlias(cmd) {
|
|
22
|
+
return typeof cmd === 'string' && cmd.startsWith('command.') && typeof Ext.ClassManager.getByAlias(cmd) === 'function';
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
isCommandClass(cmd) {
|
|
26
|
+
return typeof cmd === 'string' &&
|
|
27
|
+
Ext.ClassManager.classes[cmd] &&
|
|
28
|
+
Ext.ClassManager.classes[cmd].prototype &&
|
|
29
|
+
Ext.ClassManager.classes[cmd].prototype.isCommand;
|
|
30
|
+
},
|
|
31
|
+
|
|
21
32
|
promisifyCmd(cls, ...args) {
|
|
22
|
-
|
|
33
|
+
let alias = cls;
|
|
34
|
+
if (Ext.isObject(cls)) {
|
|
35
|
+
alias = cls.command;
|
|
36
|
+
cls.getParamsFromObject = true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let command;
|
|
40
|
+
if (this.isCommand(alias)) {
|
|
41
|
+
command = alias;
|
|
42
|
+
} else {
|
|
43
|
+
if (!Coon.util.isCommandAlias(alias)) {
|
|
44
|
+
if (!this.isCommandClass(alias)) {
|
|
45
|
+
throw new Error(alias + ' is not a command class!');
|
|
46
|
+
}
|
|
47
|
+
Coon.log.debug(alias, 'is not a command alias');
|
|
48
|
+
}
|
|
49
|
+
command = Ext.create(alias, {processError: true});
|
|
50
|
+
}
|
|
51
|
+
if (!command) {
|
|
52
|
+
throw new Error('promisifyCmd command is invalid!');
|
|
53
|
+
}
|
|
23
54
|
return new Promise((resolve, reject) => {
|
|
24
|
-
if (
|
|
25
|
-
command.executeWith(
|
|
55
|
+
if (cls.getParamsFromObject) {
|
|
56
|
+
command.executeWith(cls.params);
|
|
26
57
|
} else {
|
|
27
58
|
command.execute(...args);
|
|
28
59
|
}
|
package/src/version.js
CHANGED