ru.coon 2.8.2 → 2.8.4
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 +15 -0
- package/package.json +1 -1
- package/src/Function.js +19 -0
- package/src/app/Application.js +29 -13
- package/src/app/Router.js +9 -0
- package/src/chart/editor/CoonChartEditorController.js +2 -2
- package/src/chart/editor/DataSourceChartBindForm.js +12 -12
- package/src/report/component/settings/field/ReportFormFieldsGrid.js +1 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
# Version 2.8.4, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/79f9eb3363e07fb47ac3ac23659b94b34c7423b9)
|
|
2
|
+
* TR-69542 fix: восстановление утраченной авторизации по токену. ([402a8a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/402a8a5e63da1342b44b6e95a7eed96d5b9a42aa))
|
|
3
|
+
* update: CHANGELOG.md ([b11b4c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b11b4c53ff53f0dde24c4e017e09046a77609ac4))
|
|
4
|
+
|
|
5
|
+
# Version 2.8.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f2bd405e3421aa5e65c5c112ce39cd61806e1e09)
|
|
6
|
+
* update: CHANGELOG.md ([f52e7b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f52e7b66d3bb410cfe89272d0eccd0632d1c30e3))
|
|
7
|
+
|
|
1
8
|
# Version 2.8.2, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b2e3da084c82fa409dca30ef2388bab2f3ef267b)
|
|
9
|
+
* ## Features
|
|
10
|
+
* <span style='color:green'>feat: Added createFromString function. Related to BFL-15767.</span> ([cea621], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/cea6218e44b5768116718379e25cc52706ef8a75))
|
|
11
|
+
|
|
2
12
|
* ## Fixes
|
|
13
|
+
* <span style='color:red'> Разрешены html теги в колонке "Описание". Related to BFL-13996.</span> ([8a1793], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8a1793a93a87dcb10f92d854d491c31aefcd2563))
|
|
3
14
|
* <span style='color:red'> TR-69409 исправление проверки значения свойства successMessage в ExecuteCommandPlugin</span> ([b77390], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b77390cabfdbdf3ad837c896b805a4bc7e5e92f3))
|
|
4
15
|
|
|
16
|
+
* ([Update], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/Update Function.js35da450c2734c57db4cc7bd13380f6da400a9a96))
|
|
5
17
|
* update: CHANGELOG.md ([ad61a8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ad61a8c449000e7b9ff6e921d39eecd97ddabea2))
|
|
6
18
|
|
|
7
19
|
# Version 2.8.1, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/88c146ad577ce2a14d194c245e3d5151081af6af)
|
|
20
|
+
* ## Fixes
|
|
21
|
+
* <span style='color:red'> HT-9264 CoonChart lite fix</span> ([d8e2d7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d8e2d7a5994649ea9707fd6e901d1201813bbc36))
|
|
22
|
+
|
|
8
23
|
* add unconditional versioning ([187668], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/187668ff86c8e91b440ce9b8a1052a191a7989d6))
|
|
9
24
|
* update: CHANGELOG.md ([8386a7], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8386a79fae89b882f1a3baf81849bb08ffd7a298))
|
|
10
25
|
|
package/package.json
CHANGED
package/src/Function.js
CHANGED
|
@@ -783,4 +783,23 @@ Ext.define('Coon.Function', {
|
|
|
783
783
|
beforeRequest(requestOptions, requestHash) {
|
|
784
784
|
return this.debounceRequest(requestOptions, requestHash);
|
|
785
785
|
},
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Создает функцию из строки с определением функции.
|
|
789
|
+
* @param fnText
|
|
790
|
+
* @returns {Function | undefined}
|
|
791
|
+
* @throws {Error}
|
|
792
|
+
*/
|
|
793
|
+
createFromString(fnText = '') {
|
|
794
|
+
if (typeof fnText === 'string' && fnText.startsWith('function')) {
|
|
795
|
+
// Extract the function body
|
|
796
|
+
const fnBody = fnText.slice(fnText.indexOf('{') + 1, fnText.lastIndexOf('}')).trim();
|
|
797
|
+
|
|
798
|
+
// Extract the parameter names
|
|
799
|
+
const argsMatch = fnText.match(/\(([^)]*)\)/);
|
|
800
|
+
const argNames = argsMatch ? argsMatch[1].split(',').map((arg) => arg.trim()) : [];
|
|
801
|
+
|
|
802
|
+
return new Function(...argNames, fnBody);
|
|
803
|
+
}
|
|
804
|
+
},
|
|
786
805
|
});
|
package/src/app/Application.js
CHANGED
|
@@ -196,25 +196,41 @@ Ext.define('Coon.app.Application', {
|
|
|
196
196
|
});
|
|
197
197
|
},
|
|
198
198
|
|
|
199
|
-
|
|
200
199
|
launch: function() {
|
|
201
200
|
this.appRouter.onBeforeRouteEnterFn = this.isAuthenticated.bind(this);
|
|
202
201
|
Ext.on('auth:logout', this.onLogout, this);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
202
|
+
let jwtToken;
|
|
203
|
+
let beforeAuth = () => Promise.resolve();
|
|
204
|
+
if (Ext.isFunction(this.checkJwtAuth)) {
|
|
205
|
+
jwtToken = this.appRouter.getAuthToken();
|
|
206
|
+
if (jwtToken) {
|
|
207
|
+
beforeAuth = this.checkJwtAuth;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
beforeAuth.call(this, jwtToken)
|
|
212
|
+
.then(this.checkAuth.bind(this))
|
|
213
|
+
.then(() => {
|
|
214
|
+
this.stopAnimation();
|
|
215
|
+
this.afterCheckAuth();
|
|
213
216
|
});
|
|
214
|
-
|
|
215
|
-
});
|
|
217
|
+
|
|
216
218
|
this.afterLaunch();
|
|
217
219
|
},
|
|
220
|
+
|
|
221
|
+
stopAnimation() {
|
|
222
|
+
Ext.get('splash').fadeOut({
|
|
223
|
+
duration: 1000,
|
|
224
|
+
listeners: {
|
|
225
|
+
afteranimate: {
|
|
226
|
+
fn: this.afterLoad,
|
|
227
|
+
single: true,
|
|
228
|
+
scope: this,
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
|
|
218
234
|
afterAuthorized() {},
|
|
219
235
|
|
|
220
236
|
afterLaunch() {},
|
package/src/app/Router.js
CHANGED
|
@@ -75,5 +75,14 @@ Ext.define('Coon.app.Router', {
|
|
|
75
75
|
const routerView = this.getRouterView();
|
|
76
76
|
return routerView && routerView.getLayout().getActiveItem();
|
|
77
77
|
},
|
|
78
|
+
getAuthToken() {
|
|
79
|
+
const search = document.location.search;
|
|
80
|
+
let jwtToken;
|
|
81
|
+
if (Ext.isString(search) && search.includes('?')) {
|
|
82
|
+
const urlParameters = Ext.Object.fromQueryString(search);
|
|
83
|
+
jwtToken = urlParameters.jwtToken;
|
|
84
|
+
}
|
|
85
|
+
return jwtToken;
|
|
86
|
+
},
|
|
78
87
|
|
|
79
88
|
});
|
|
@@ -246,8 +246,8 @@ Ext.define('Coon.chart.editor.CoonChartEditorController', {
|
|
|
246
246
|
// vm.set('coonChart.propertyData', JSON.stringify(coonChart.propertyData));
|
|
247
247
|
const validation = await this.validate();
|
|
248
248
|
if (validation.state) {
|
|
249
|
-
const commandName = vm.get('mode') === 'EDIT' ? 'SaveUIElementCommand' : 'AddUIElementCommand';
|
|
250
|
-
const command = Ext.create('command.'
|
|
249
|
+
// const commandName = vm.get('mode') === 'EDIT' ? 'SaveUIElementCommand' : 'AddUIElementCommand';
|
|
250
|
+
const command = Ext.create('command.SaveUIElementCommand', {activeComponent: this.getView()});
|
|
251
251
|
command.on('complete', function(coonChartBean) {
|
|
252
252
|
vm.set('editorMode', 'edit');
|
|
253
253
|
}, this);
|
|
@@ -48,9 +48,9 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
loadReportFields(data) {
|
|
51
|
-
const fields = data.map((r) => r.description);
|
|
51
|
+
// const fields = data.map((r) => r.description);
|
|
52
52
|
this.links.form.removeAll();
|
|
53
|
-
|
|
53
|
+
data.forEach((field) => {
|
|
54
54
|
this.links.form.add({
|
|
55
55
|
xtype: 'panel',
|
|
56
56
|
margin: 4,
|
|
@@ -61,12 +61,12 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
|
|
|
61
61
|
pack: 'center',
|
|
62
62
|
},
|
|
63
63
|
items: [
|
|
64
|
-
{xtype: 'displayfield', value: field, width: 130, fieldStyle: 'text-align: right'},
|
|
64
|
+
{xtype: 'displayfield', value: field.description, width: 130, fieldStyle: 'text-align: right'},
|
|
65
65
|
{
|
|
66
66
|
xtype: 'combo',
|
|
67
|
-
itemId: field,
|
|
67
|
+
itemId: field.reportFieldCd,
|
|
68
68
|
maxWidth: 350,
|
|
69
|
-
reference: field,
|
|
69
|
+
reference: field.reportFieldCd,
|
|
70
70
|
flex: 1,
|
|
71
71
|
displayField: 'name',
|
|
72
72
|
valueField: 'value',
|
|
@@ -80,7 +80,7 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
|
|
|
80
80
|
// ],
|
|
81
81
|
// },
|
|
82
82
|
bind: {
|
|
83
|
-
value: `{coonChart.fieldset.${field}}`,
|
|
83
|
+
value: `{coonChart.fieldset.${field.reportFieldCd}}`,
|
|
84
84
|
store: '{comboStore}',
|
|
85
85
|
},
|
|
86
86
|
listeners: {
|
|
@@ -114,14 +114,14 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
|
|
|
114
114
|
// },
|
|
115
115
|
{
|
|
116
116
|
xtype: 'textfield',
|
|
117
|
-
itemId: `${field}_defval`,
|
|
117
|
+
itemId: `${field.reportFieldCd}_defval`,
|
|
118
118
|
fieldLabel: 'default',
|
|
119
119
|
tooltip: 'значение по умолчанию(если получили пустое)',
|
|
120
120
|
width: 100,
|
|
121
121
|
disabled: true,
|
|
122
122
|
bind: {
|
|
123
|
-
value: `{coonChart.fieldDefaults.${field}}`,
|
|
124
|
-
disabled: `{!coonChart.fieldset.${field}}`,
|
|
123
|
+
value: `{coonChart.fieldDefaults.${field.reportFieldCd}}`,
|
|
124
|
+
disabled: `{!coonChart.fieldset.${field.reportFieldCd}}`,
|
|
125
125
|
},
|
|
126
126
|
listeners: {
|
|
127
127
|
disable: function(field) {
|
|
@@ -131,20 +131,20 @@ Ext.define('Coon.chart.editor.DataSourceChartBindForm', {
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
xtype: 'displayfield',
|
|
134
|
-
itemId: `${field}_alertMsg`,
|
|
134
|
+
itemId: `${field.reportFieldCd}_alertMsg`,
|
|
135
135
|
fieldStyle: {
|
|
136
136
|
color: 'red',
|
|
137
137
|
},
|
|
138
138
|
tooltip: 'уведомление о некорректных данных',
|
|
139
139
|
flex: 1,
|
|
140
140
|
bind: {
|
|
141
|
-
value: `{fieldAlerts.${field}}`,
|
|
141
|
+
value: `{fieldAlerts.${field.reportFieldCd}}`,
|
|
142
142
|
},
|
|
143
143
|
}
|
|
144
144
|
],
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
-
this.links.grid.reconfigure(null,
|
|
147
|
+
this.links.grid.reconfigure(null, data.map((key) => ({dataIndex: `${key.reportFieldCd}`, text: `${key.description}`, flex: 1})));
|
|
148
148
|
},
|
|
149
149
|
|
|
150
150
|
loadData(rows) {
|
package/src/version.js
CHANGED