ru.coon 2.5.44 → 2.5.45
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 +12 -0
- package/package.json +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/report/component/ParameterizedReportCombo.js +2 -2
- package/src/report/component/ReportLookupCombo.js +6 -4
- package/src/report/component/ReportPickerLookupCombo.js +1 -1
- package/src/util.js +17 -3
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
# Version 2.5.45, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1e28ba95e77bbe4be40d19ea9fde58a74fbb645)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <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))
|
|
4
|
+
|
|
5
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update src/util.js5a11846bc2f75dd40b3c0f2239047d95f1a9371c))
|
|
6
|
+
* BFL-9850 Ошибка при сохранении пункта меню ([270e31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/270e3170b5a70b306591730dce53023dcebf6f34))
|
|
7
|
+
* update: CHANGELOG.md ([8b0186], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8b0186d787ec77ad2a4dfc211e85c8ffadee6559))
|
|
8
|
+
|
|
1
9
|
# Version 2.5.44, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0c4d4a663ae3451dec321c0d68bf1d5c8d70ff58)
|
|
10
|
+
* ## Fixes
|
|
11
|
+
* <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))
|
|
12
|
+
|
|
2
13
|
* hotfix Coon.Function.executeComponentDoInit ([c9e04c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c9e04c22329f1d7822b91a47eca899c6f6e7f95e))
|
|
3
14
|
* update: CHANGELOG.md ([f47bce], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f47bce91314446c8f88961ba976fc132e11318d0))
|
|
4
15
|
|
|
@@ -39,6 +50,7 @@
|
|
|
39
50
|
* <span style='color:red'>fix</span> ([5400c1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5400c17b624f78acfa1dbe8c27742e7a1f4b1cc1))
|
|
40
51
|
* <span style='color:red'> Переделан механизм добавления меню в кнопку "Поиск"</span> ([0437f3], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0437f3f77c410d545f65d75516091db6ba41ad80))
|
|
41
52
|
|
|
53
|
+
* CRM-7853 ParameterizedReportCombo исправлена ошибка отображения параметров поиска ([702d8a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/702d8a5a99970682b0ad3ac50112553685b27e34))
|
|
42
54
|
* revert to bf9339051130805e551f48ce07bd5bac3d49d140 ([80394d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/80394d8e7b64a12c3e137d74661c529d6162004c))
|
|
43
55
|
* update: CHANGELOG.md ([14b820], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/14b8208316d9994deafbbd54ccab2fdae4900e74))
|
|
44
56
|
|
package/package.json
CHANGED
|
@@ -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
|
+
});
|
|
@@ -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;
|
package/src/util.js
CHANGED
|
@@ -18,11 +18,25 @@ Ext.define('Coon.util', {
|
|
|
18
18
|
return Ext.isObject(cmd) && cmd.isCommand;
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
+
isCommandAlias(cmd) {
|
|
22
|
+
return typeof cmd === 'string' && typeof Ext.ClassManager.getByAlias(cmd) === 'function';
|
|
23
|
+
},
|
|
24
|
+
|
|
21
25
|
promisifyCmd(cls, ...args) {
|
|
22
|
-
|
|
26
|
+
let alias = cls;
|
|
27
|
+
if (Ext.isObject(cls)) {
|
|
28
|
+
alias = cls.command;
|
|
29
|
+
cls.getParamsFromObject = true;
|
|
30
|
+
}
|
|
31
|
+
let command;
|
|
32
|
+
command = Coon.util.isCommand(alias) && alias;
|
|
33
|
+
command = Coon.util.isCommandAlias(alias) && Ext.create(alias, {processError: true})
|
|
34
|
+
if (!command) {
|
|
35
|
+
throw new Error('promisifyCmd command in invalid!')
|
|
36
|
+
}
|
|
23
37
|
return new Promise((resolve, reject) => {
|
|
24
|
-
if (
|
|
25
|
-
command.executeWith(
|
|
38
|
+
if (cls.getParamsFromObject) {
|
|
39
|
+
command.executeWith(cls.params);
|
|
26
40
|
} else {
|
|
27
41
|
command.execute(...args);
|
|
28
42
|
}
|
package/src/version.js
CHANGED