ru.coon 3.0.29 → 3.0.31
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
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# Version 3.0.31, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/9665b81ba1d0a4cded52d8755f915381c0753074)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <span style='color:red'>fix OCPB</span> ([d9f750], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d9f7501828ec8437a029d6eb0ef7582e43bac2ba))
|
|
4
|
+
|
|
5
|
+
* TR-13285 fix: BigNumColumn renderer function refactoring ([d80c93], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/d80c934d5c5236708918bbaf2b66c3abd6537213))
|
|
6
|
+
* update: CHANGELOG.md ([000f57], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/000f5736911e558f1cf5629700025633e9c820f7))
|
|
7
|
+
|
|
8
|
+
# Version 3.0.30, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/834d4e43ba0766daf8e6fd774f052303d0be81ed)
|
|
9
|
+
* ## Fixes
|
|
10
|
+
* <span style='color:red'> componentContextId not found in cmp config. Related to NEVA-821.</span> ([7627d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7627d4b7d7acd918ee99f1a11bd960844676a0c0))
|
|
11
|
+
|
|
12
|
+
* update: CHANGELOG.md ([0d409f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0d409f04256f1d1d0e977f22dbc557be16198a93))
|
|
13
|
+
|
|
1
14
|
# Version 3.0.29, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b6a41718051c6d94703539202ec2f58d6c5382da)
|
|
2
15
|
* upd ([adee34], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/adee34983691322c146d3a60d2f1a64f674ae72a))
|
|
3
16
|
* update: CHANGELOG.md ([b35442], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/b35442505415f72a6602ff3d8939d7ece509252a))
|
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Ext.define('Coon.report.column.BigNumColumn', {
|
|
2
|
-
extend: 'Ext.grid.Column',
|
|
2
|
+
extend: 'Ext.grid.column.Column',
|
|
3
3
|
alias: 'widget.BigNumColumn',
|
|
4
4
|
alternateClassName: [
|
|
5
5
|
'Sigma.common.column.BigNumColumn',
|
|
6
6
|
'Sigma.grid.column.BigNumColumn'
|
|
7
7
|
],
|
|
8
|
-
uses: [],
|
|
9
|
-
requires: [],
|
|
10
8
|
align: 'right',
|
|
11
9
|
cellSumPluginConfig: {
|
|
12
10
|
valueType: 'float',
|
|
@@ -18,24 +16,17 @@ Ext.define('Coon.report.column.BigNumColumn', {
|
|
|
18
16
|
},
|
|
19
17
|
|
|
20
18
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
23
|
-
* @param {Object} cellValues
|
|
19
|
+
* @param value
|
|
20
|
+
* @param {Object} metaData
|
|
24
21
|
* @returns {string|null}
|
|
25
22
|
*/
|
|
26
|
-
renderer: function(
|
|
27
|
-
const column =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
} else if (Ext.isFunction(this.getDecSeparator)) {
|
|
34
|
-
me = this;
|
|
35
|
-
}
|
|
36
|
-
const value = me ? Coon.format.bigNumFormat(v, me.getDecSeparator(), me.getGroupSeparator(), me.getPrecision()): null;
|
|
37
|
-
if (value !== null) {
|
|
38
|
-
return `<div data-qtip="${Ext.util.Format.htmlEncode(value)}">${value}</div>`;
|
|
23
|
+
renderer: function(value, metaData) {
|
|
24
|
+
const column = this.isXType('gridcolumn') ? this : metaData && metaData.column;
|
|
25
|
+
const formattedValue = column && Ext.isFunction(column.getDecSeparator) ?
|
|
26
|
+
Coon.format.bigNumFormat(value, column.getDecSeparator(), column.getGroupSeparator(), column.getPrecision()) :
|
|
27
|
+
null;
|
|
28
|
+
if (formattedValue !== null) {
|
|
29
|
+
return `<div data-qtip="${Ext.util.Format.htmlEncode(formattedValue)}">${formattedValue}</div>`;
|
|
39
30
|
}
|
|
40
31
|
return null;
|
|
41
32
|
},
|
|
@@ -121,6 +121,13 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
|
|
|
121
121
|
if (config.isReport) {
|
|
122
122
|
config.params.params = Ext.apply({}, params);
|
|
123
123
|
}
|
|
124
|
+
const componentContextId = Coon.util.ContextManager.generateKey({
|
|
125
|
+
params: config.params,
|
|
126
|
+
id: this.getComponentId(),
|
|
127
|
+
xtype: config.xtype,
|
|
128
|
+
source: this.$className.split('.').pop(),
|
|
129
|
+
});
|
|
130
|
+
config.componentContextId = componentContextId;
|
|
124
131
|
config.properties = Ext.apply(
|
|
125
132
|
{
|
|
126
133
|
xtype: config.xtype,
|
|
@@ -129,12 +136,7 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
|
|
|
129
136
|
source: 'OpenCustomPanelButtonPlugin',
|
|
130
137
|
params: config.params,
|
|
131
138
|
},
|
|
132
|
-
componentContextId
|
|
133
|
-
params: config.params,
|
|
134
|
-
id: this.getComponentId(),
|
|
135
|
-
xtype: config.xtype,
|
|
136
|
-
source: this.$className.split('.').pop(),
|
|
137
|
-
}),
|
|
139
|
+
componentContextId,
|
|
138
140
|
componentConfig: {
|
|
139
141
|
parentComponent: this.getCmp(),
|
|
140
142
|
context: Object.assign(
|
|
@@ -316,13 +318,13 @@ Ext.define('Coon.report.plugin.grid.OpenCustomPanelButtonPlugin', {
|
|
|
316
318
|
this.addNavigationThroughRecords(config.targetComponent);
|
|
317
319
|
}
|
|
318
320
|
config.targetComponent.on('afterrender', function() {
|
|
319
|
-
Coon.Function.executeComponentDoInit(config.targetComponent
|
|
321
|
+
Coon.Function.executeComponentDoInit(config.targetComponent, config.params);
|
|
320
322
|
});
|
|
321
323
|
if (this.oldFrame) {
|
|
322
324
|
window.oldFrameWindow = config.targetComponent;
|
|
323
325
|
window.addEventListener('message', this.receiveMessage, false);
|
|
324
326
|
}
|
|
325
|
-
config.
|
|
327
|
+
config.targetWindow.show();
|
|
326
328
|
},
|
|
327
329
|
|
|
328
330
|
openPanel(params) {
|
package/src/version.js
CHANGED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
Ext.define('Coon.util.SimLoadReportCommand', {
|
|
2
|
-
mixins: ['Ext.mixin.Observable'],
|
|
3
|
-
alias: 'command.SimLoadReportCommand',
|
|
4
|
-
|
|
5
|
-
constructor: function(config) {
|
|
6
|
-
this.mixins.observable.constructor.call(this, config);
|
|
7
|
-
Ext.apply(this, config);
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
loadReportConfig(id) {
|
|
11
|
-
return Coon.util.promisifyCmd(
|
|
12
|
-
'command.GetReportCommand',
|
|
13
|
-
id,
|
|
14
|
-
true
|
|
15
|
-
);
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
async execute(reportId, generateFakeData) {
|
|
19
|
-
const config = await this.loadReportConfig(reportId);
|
|
20
|
-
console.log({config});
|
|
21
|
-
if (!config) {
|
|
22
|
-
this.fireEvent('failure', 'report not found');
|
|
23
|
-
}
|
|
24
|
-
if (generateFakeData) {
|
|
25
|
-
const fakeData = this.loadFakeData(config.fields, generateFakeData);
|
|
26
|
-
this.setList(reportId, fakeData);
|
|
27
|
-
}
|
|
28
|
-
const list = this.getList(reportId);
|
|
29
|
-
this.fireEvent('complete', {list, totalCount: list.length});
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
loadFakeData(fields, len) {
|
|
33
|
-
len = Math.min(len, 100);
|
|
34
|
-
const getValue = (type) => {
|
|
35
|
-
const strGen = Ext.create('Ext.data.identifier.Uuid');
|
|
36
|
-
if (type === 'number') {
|
|
37
|
-
return Math.random() * 99999;
|
|
38
|
-
}
|
|
39
|
-
if (type === 'boolean') {
|
|
40
|
-
return Math.random() > 0.5;
|
|
41
|
-
}
|
|
42
|
-
if (type === 'date') {
|
|
43
|
-
return new Date(Math.ceil(Math.random() * 2e12));
|
|
44
|
-
}
|
|
45
|
-
return strGen.generate();
|
|
46
|
-
};
|
|
47
|
-
const columns = fields.filter((column) => column.visibleSwitch);
|
|
48
|
-
const getRow = () => columns.reduce((acc, {reportFieldCd, reportFieldTypeLookup}) => {
|
|
49
|
-
acc[reportFieldCd] = getValue(
|
|
50
|
-
(reportFieldTypeLookup || '').toLowerCase()
|
|
51
|
-
);
|
|
52
|
-
return acc;
|
|
53
|
-
}, {id: Ext.id(false, 'fakeid-')});
|
|
54
|
-
return [...Array(len)].map(getRow);
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
getList(id) {
|
|
58
|
-
return Ext.decode(localStorage.getItem('simlet.' + id), true) || [];
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
setList(id, list) {
|
|
62
|
-
return localStorage.setItem('simlet.' + id, Ext.encode(list, true));
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
inputParameters: function() {
|
|
66
|
-
return [
|
|
67
|
-
{name: 'reportId', description: 'reportId'},
|
|
68
|
-
{name: 'fake', description: 'generate fake data'}
|
|
69
|
-
];
|
|
70
|
-
},
|
|
71
|
-
});
|