ru.coon 2.7.13 → 2.7.15
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 +17 -0
- package/package.json +1 -1
- package/src/common/field/checkbox/ToggleBox.js +15 -0
- package/src/common/field/checkbox/ToggleBox.scss +9 -0
- package/src/common/field/combo/CommandComboBox.js +1 -1
- package/src/report/component/ReportPanel.js +4 -1
- package/src/report/component/reportpanel/ReportGrid.js +22 -1
- package/src/report/component/settings/property/ReportPropertiesPanelController.js +7 -2
- package/src/report/plugin/grid/GridRowStylePlugin.js +17 -5
- package/src/report/plugin/grid/UpdateGridPlugin.js +8 -4
- package/src/uielement/plugin/configPanel/executeCommand/ExecuteCommandPluginConfigPanelFormEditor.js +31 -30
- package/src/version.js +1 -1
- package/src/common/field/checkbox/RoundCheckbox.js +0 -5
- package/src/common/field/checkbox/RoundCheckbox.scss +0 -48
- package/src/nav/MenuLoader.js +0 -23
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.md +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# Version 2.7.15, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/1e27a6d56071c26951813a36d45daf805a6f750d)
|
|
2
|
+
* ## Features
|
|
3
|
+
* <span style='color:green'>feat: Вывод сообщения об ошибках при инициализации плагинов отчета. Closes HT-8531.</span> ([a35d09], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a35d09c39f20263dd032f6accc9d175a8241e111))
|
|
4
|
+
* <span style='color:green'>feat: Добавлено логирование ошибки, при возврате отчетом более одной строки. Related to HT-8223.</span> ([34491c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/34491c4ee3f5dc6d26f5c04652796d563c9fb6c4))
|
|
5
|
+
|
|
6
|
+
* ## Fixes
|
|
7
|
+
* <span style='color:red'> HT-8257: publish state only on tab change and prepare data to save</span> ([81e5a6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/81e5a64bf6c1f106f477877a94d61d5da55faf36))
|
|
8
|
+
|
|
9
|
+
* HT-7448 feat: В ExecuteCommandPluginConfigPanelFormEditor первая вкладка - Параметры. В списке выбора команд выбранная команда отображается без пути. ([f375d4], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f375d4fed40c394cde8b4a92f8ec2e1ea8419093))
|
|
10
|
+
* update: CHANGELOG.md ([13e1ac], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/13e1ac4f0c51b95aaecfb0a6bd8b32f4370db067))
|
|
11
|
+
|
|
12
|
+
# Version 2.7.14, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8e9321ed8ae4de458b50e7821b2ff5169eabb199)
|
|
13
|
+
* ## Fixes
|
|
14
|
+
* <span style='color:red'> BFL-3938: check plugin attribute is no=t empty and check row objects</span> ([94ce92], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/94ce92a1ee3d9a7313462b061a1b7ec8868c3275))
|
|
15
|
+
|
|
16
|
+
* update: CHANGELOG.md ([91bb31], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/91bb31ecc6eac439793205fd9b9d7f748483ff8d))
|
|
17
|
+
|
|
1
18
|
# Version 2.7.13, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/c2a509ebbdf7d3ddd07faaf3a42f0ef759a31cc4)
|
|
2
19
|
* ## Fixes
|
|
3
20
|
* <span style='color:red'>fix report property editor</span> ([ba33a6], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/ba33a6f5379601e92e243ee8f971fc5811ac648f))
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Ext.define('Coon.common.field.checkbox.ToggleBox', {
|
|
2
|
+
extend: 'Ext.form.field.Checkbox', // Ext.form.field.Base
|
|
3
|
+
xtype: ['togglebox', 'ToggleBox'],
|
|
4
|
+
|
|
5
|
+
// // inputEl should always retain the same size, never stretch
|
|
6
|
+
// stretchInputElFixed: false,
|
|
7
|
+
|
|
8
|
+
baseCls: 'ext-togglebox',
|
|
9
|
+
|
|
10
|
+
fieldIconCls: 'offIcon',
|
|
11
|
+
|
|
12
|
+
tpl: `
|
|
13
|
+
<span class={fieldIconCls} />
|
|
14
|
+
`,
|
|
15
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.ext-togglebox {
|
|
2
|
+
.onIcon {
|
|
3
|
+
background-image: url("data:image/svg+xml,%3Csvg width='25' height='16' viewBox='0 0 25 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16H17C21.4183 16 25 12.4183 25 8C25 3.58172 21.4183 0 17 0H8ZM17 13C19.7614 13 22 10.7614 22 8C22 5.23858 19.7614 3 17 3C14.2386 3 12 5.23858 12 8C12 10.7614 14.2386 13 17 13Z' fill='black'/%3E%3C/svg%3E");
|
|
4
|
+
}
|
|
5
|
+
.offIcon {
|
|
6
|
+
background-image: url("data:image/svg+xml,%3Csvg width='25' height='16' viewBox='0 0 25 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 8C0 3.58172 3.58172 0 8 0H17C21.4183 0 25 3.58172 25 8C25 12.4183 21.4183 16 17 16H8C3.58172 16 0 12.4183 0 8ZM13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C10.7614 3 13 5.23858 13 8Z' fill='black'/%3E%3C/svg%3E");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
@@ -11,7 +11,7 @@ Ext.define('Coon.common.field.combo.CommandComboBox', {
|
|
|
11
11
|
getData: Coon.util.getAllCommandsList,
|
|
12
12
|
errorMsgCls: 'combo-field-error',
|
|
13
13
|
validator(value) {
|
|
14
|
-
const isValid =
|
|
14
|
+
const isValid = this.getStore().findBy((record) => record.get('description') === value || record.get('xtype') === value) !== -1;
|
|
15
15
|
return isValid || `команда ${value} не найдена!`;
|
|
16
16
|
},
|
|
17
17
|
listConfig: {
|
|
@@ -780,7 +780,10 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
780
780
|
|
|
781
781
|
const defaultGridConfig = Coon.report.component.ReportPanel.getColumnsConfig(reportBean[ns.$fields], gridConfig);
|
|
782
782
|
|
|
783
|
-
const widget = Ext.widget(
|
|
783
|
+
const widget = Ext.widget(
|
|
784
|
+
this.getIsTree() ? 'ReportTree' : 'ReportGrid',
|
|
785
|
+
Ext.apply(defaultGridConfig, this.gridProperties, {reportId: reportBean[ns.$reportId]})
|
|
786
|
+
);
|
|
784
787
|
widget.on('buttonIsAdded', this.sortButtons, this);
|
|
785
788
|
return widget;
|
|
786
789
|
},
|
|
@@ -50,7 +50,28 @@ Ext.define('Coon.report.component.reportpanel.ReportGrid', {
|
|
|
50
50
|
this.bbar = Ext.create({xtype: 'toolbar', hidden: true, enableOverflow: true, items: [].concat(this.bbar || [])});
|
|
51
51
|
this.fbar = Ext.create({xtype: 'toolbar', hidden: true, enableOverflow: true, items: [].concat(this.fbar || [])});
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const plugins = this.plugins;
|
|
54
|
+
delete this.plugins;
|
|
55
|
+
const pluginErrors = [];
|
|
56
|
+
if (Array.isArray(plugins)) {
|
|
57
|
+
plugins.forEach((plugin) => {
|
|
58
|
+
try {
|
|
59
|
+
this.addPlugin(plugin);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
pluginErrors.push(e.message);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (pluginErrors.length) {
|
|
66
|
+
const trace = ['CM_REPORT_CD: ' + this.reportId].concat(Array.from(new Set(pluginErrors))).join('\n');
|
|
67
|
+
Coon.log.error(trace);
|
|
68
|
+
Ext.create('Coon.report.component.ErrorWindow', {
|
|
69
|
+
autoShow: true,
|
|
70
|
+
title: 'Ошибка инициализации отчета',
|
|
71
|
+
trace,
|
|
72
|
+
message: 'Произошла ошибка при инициализации плагинов отчета, некоторые функции будут не доступны.',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
54
75
|
this.callParent();
|
|
55
76
|
this.relayEvents(this.getStore(), ['datachanged', 'load']);
|
|
56
77
|
},
|
|
@@ -9,6 +9,11 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
|
|
|
9
9
|
dictionary: Coon.report.component.settings.property.ReportPropertyDictionary,
|
|
10
10
|
|
|
11
11
|
init: function(view) {
|
|
12
|
+
view.up().on('beforetabchange', (cmp, newTab, oldTab) => {
|
|
13
|
+
if (oldTab.id === view.id) {
|
|
14
|
+
this.recordChangeHandler();
|
|
15
|
+
}
|
|
16
|
+
}, this);
|
|
12
17
|
view.validate = this.validate.bind(this);
|
|
13
18
|
view.getData = this.getData.bind(this);
|
|
14
19
|
view.setData = this.setData.bind(this);
|
|
@@ -130,7 +135,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
|
|
|
130
135
|
const value = vm.get('editorValue');
|
|
131
136
|
const record = vm.get('propertyGrid.selection');
|
|
132
137
|
record.set('value', value);
|
|
133
|
-
this.getView().fireEvent('propertyChanged');
|
|
138
|
+
// this.getView().fireEvent('propertyChanged');
|
|
134
139
|
},
|
|
135
140
|
|
|
136
141
|
onShowContextMenu: function(_, record, __, ___, e) {
|
|
@@ -160,7 +165,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertiesPanelControl
|
|
|
160
165
|
}
|
|
161
166
|
this.lookup('descriptionField').reset();
|
|
162
167
|
this.lookup('propertyValueContainer').removeAll();
|
|
163
|
-
this.getView().fireEvent('propertyChanged');
|
|
168
|
+
// this.getView().fireEvent('propertyChanged');
|
|
164
169
|
},
|
|
165
170
|
|
|
166
171
|
onAddHandler() {
|
|
@@ -216,12 +216,18 @@ Ext.define('Coon.report.plugin.grid.GridRowStylePlugin', {
|
|
|
216
216
|
applyStylesOnExpand(node) {
|
|
217
217
|
if (node.parentNode) {
|
|
218
218
|
if (node.parentNode.isRoot()) {
|
|
219
|
-
this.grid.getView().getRow(node)
|
|
219
|
+
const row = this.grid.getView().getRow(node);
|
|
220
|
+
if (row) {
|
|
221
|
+
row.setAttribute('style', `background-color: ${this.getRootColor()};`);
|
|
222
|
+
}
|
|
220
223
|
if (node.hasChildNodes()) {
|
|
221
224
|
node.childNodes.forEach((item) => {
|
|
222
225
|
if (item.get('leaf') === false && item.isExpanded()) {
|
|
223
226
|
this.getLastLevelElems(item).forEach((rec) => {
|
|
224
|
-
this.grid.getView().getRow(rec)
|
|
227
|
+
const row = this.grid.getView().getRow(rec);
|
|
228
|
+
if (row) {
|
|
229
|
+
row.setAttribute('style', `background-color: ${this.getLastExpandedColor()};`);
|
|
230
|
+
}
|
|
225
231
|
});
|
|
226
232
|
}
|
|
227
233
|
});
|
|
@@ -233,12 +239,18 @@ Ext.define('Coon.report.plugin.grid.GridRowStylePlugin', {
|
|
|
233
239
|
if (item.get('leaf') === false && item.isExpanded()) {
|
|
234
240
|
this.getLastLevelElems(item).forEach((rec) => {
|
|
235
241
|
hasLast = true;
|
|
236
|
-
this.grid.getView().getRow(rec)
|
|
242
|
+
const row = this.grid.getView().getRow(rec);
|
|
243
|
+
if (row) {
|
|
244
|
+
row.setAttribute('style', `background-color: ${this.getLastExpandedColor()};`);
|
|
245
|
+
}
|
|
237
246
|
});
|
|
238
247
|
}
|
|
239
248
|
});
|
|
240
249
|
if (!hasLast) {
|
|
241
|
-
this.grid.getView().getRow(node)
|
|
250
|
+
const row = this.grid.getView().getRow(node);
|
|
251
|
+
if (row) {
|
|
252
|
+
row.setAttribute('style', `background-color: ${this.getLastExpandedColor()};`);
|
|
253
|
+
}
|
|
242
254
|
}
|
|
243
255
|
}
|
|
244
256
|
}
|
|
@@ -270,7 +282,7 @@ Ext.define('Coon.report.plugin.grid.GridRowStylePlugin', {
|
|
|
270
282
|
}
|
|
271
283
|
grid.addCls('gridrowstyleplugin');
|
|
272
284
|
}
|
|
273
|
-
if (this.treeNodesColors !== false) {
|
|
285
|
+
if (this.treeNodesColors !== false && this.treeNodesColors !== '') {
|
|
274
286
|
const proto = Ext.ClassManager.classes[Ext.ClassManager.aliasToName['widget.'+grid.xtype]].prototype;
|
|
275
287
|
if (proto && proto.xtypesMap && proto.xtypesMap.treepanel === true) {
|
|
276
288
|
grid.on('itemexpand', this.applyStylesOnExpand, this);
|
|
@@ -2,7 +2,10 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
|
|
|
2
2
|
extend: 'Ext.AbstractPlugin',
|
|
3
3
|
alias: 'plugin.UpdateGridPlugin',
|
|
4
4
|
uses: [],
|
|
5
|
-
requires: [
|
|
5
|
+
requires: [
|
|
6
|
+
'Coon.report.command.GetDynamicReportDataCommand',
|
|
7
|
+
'Coon.log'
|
|
8
|
+
],
|
|
6
9
|
alternateClassName: [
|
|
7
10
|
'Sigma.common.grid.plugin.UpdateGridPlugin',
|
|
8
11
|
'Sigma.common.plugin.grid.UpdateGridPlugin'
|
|
@@ -41,8 +44,7 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
|
|
|
41
44
|
},
|
|
42
45
|
|
|
43
46
|
execute: function(parameters) {
|
|
44
|
-
const command = Ext.create('
|
|
45
|
-
command.on('complete', Ext.bind(this.updateRecords, this), this);
|
|
47
|
+
const command = Ext.create('command.GetDynamicReportDataCommand');
|
|
46
48
|
parameters = parameters || {};
|
|
47
49
|
const params = [];
|
|
48
50
|
for (const key in parameters) {
|
|
@@ -50,14 +52,16 @@ Ext.define('Coon.report.plugin.grid.UpdateGridPlugin', {
|
|
|
50
52
|
params.push({type: key, value: parameters[key]});
|
|
51
53
|
}
|
|
52
54
|
}
|
|
55
|
+
command.on('complete', (response) => this.updateRecords.call(this, response, params));
|
|
53
56
|
command.execute(this.reportID, Ext.encode(params));
|
|
54
57
|
},
|
|
55
58
|
|
|
56
|
-
updateRecords: function(response) {
|
|
59
|
+
updateRecords: function(response, params) {
|
|
57
60
|
if (!response.list || response.list.length === 0) {
|
|
58
61
|
return;
|
|
59
62
|
} else if (response.list.length > 1) {
|
|
60
63
|
Ext.Msg.alert('Сообщение системы', 'Отчет, используемый для обновления записи, вернул больше одной строки');
|
|
64
|
+
Coon.log.error(`[UpdateGridPlugin] Отчет ${this.reportID} вернул больше одной строки. Параметры: `, params);
|
|
61
65
|
} else {
|
|
62
66
|
this.setDataToRecords(response.list[0]);
|
|
63
67
|
}
|
package/src/uielement/plugin/configPanel/executeCommand/ExecuteCommandPluginConfigPanelFormEditor.js
CHANGED
|
@@ -209,6 +209,7 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
|
|
|
209
209
|
xtype: 'CommandComboBox',
|
|
210
210
|
reference: 'commandComboBox',
|
|
211
211
|
fieldLabel: 'Команда',
|
|
212
|
+
displayField: 'xtype',
|
|
212
213
|
bind: '{ctype}',
|
|
213
214
|
listeners: {
|
|
214
215
|
change: this.onChangeCommand.bind(this),
|
|
@@ -226,6 +227,36 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
|
|
|
226
227
|
xtype: 'tabpanel',
|
|
227
228
|
flex: 1,
|
|
228
229
|
items: [
|
|
230
|
+
{
|
|
231
|
+
xtype: 'panel',
|
|
232
|
+
title: 'Параметры',
|
|
233
|
+
tooltip: 'Настройка параметров команды',
|
|
234
|
+
layout: 'fit',
|
|
235
|
+
tbar: [
|
|
236
|
+
{
|
|
237
|
+
text: 'Загрузить параметры',
|
|
238
|
+
tooltip: 'Параметры, определенные в классе команды, будут созданы в редакторе с пустыми значениями.' +
|
|
239
|
+
'Если параметры уже определены в редакторе, то они не будут изменены.',
|
|
240
|
+
ui: 'blue-text-button-border',
|
|
241
|
+
hidden: true,
|
|
242
|
+
bind: {
|
|
243
|
+
hidden: '{!commandComboBox.selection}',
|
|
244
|
+
},
|
|
245
|
+
handler: this.loadParametersHandler.bind(this),
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
items: [
|
|
249
|
+
{
|
|
250
|
+
xtype: 'UiAceEditorPanel',
|
|
251
|
+
reference: 'parametersRef',
|
|
252
|
+
hideSearchPanel: true,
|
|
253
|
+
layout: 'fit',
|
|
254
|
+
bind: {
|
|
255
|
+
value: '{parameters}',
|
|
256
|
+
},
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
},
|
|
229
260
|
{
|
|
230
261
|
xtype: 'panel',
|
|
231
262
|
title: 'Настройки',
|
|
@@ -358,36 +389,6 @@ Ext.define('Coon.uielement.plugin.configPanel.executeCommand.ExecuteCommandPlugi
|
|
|
358
389
|
}
|
|
359
390
|
],
|
|
360
391
|
},
|
|
361
|
-
{
|
|
362
|
-
xtype: 'panel',
|
|
363
|
-
title: 'Параметры',
|
|
364
|
-
tooltip: 'Настройка параметров команды',
|
|
365
|
-
layout: 'fit',
|
|
366
|
-
tbar: [
|
|
367
|
-
{
|
|
368
|
-
text: 'Загрузить параметры',
|
|
369
|
-
tooltip: 'Параметры, определенные в классе команды, будут созданы в редакторе с пустыми значениями.' +
|
|
370
|
-
'Если параметры уже определены в редакторе, то они не будут изменены.',
|
|
371
|
-
ui: 'blue-text-button-border',
|
|
372
|
-
hidden: true,
|
|
373
|
-
bind: {
|
|
374
|
-
hidden: '{!commandComboBox.selection}',
|
|
375
|
-
},
|
|
376
|
-
handler: this.loadParametersHandler.bind(this),
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
items: [
|
|
380
|
-
{
|
|
381
|
-
xtype: 'UiAceEditorPanel',
|
|
382
|
-
reference: 'parametersRef',
|
|
383
|
-
hideSearchPanel: true,
|
|
384
|
-
layout: 'fit',
|
|
385
|
-
bind: {
|
|
386
|
-
value: '{parameters}',
|
|
387
|
-
},
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
},
|
|
391
392
|
{
|
|
392
393
|
title: 'Отражение результатов',
|
|
393
394
|
scrollable: true,
|
package/src/version.js
CHANGED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
.x-form-fieldCheckbox {
|
|
2
|
-
.x-form-field {
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.x-form-field label {
|
|
7
|
-
background-color: #fff;
|
|
8
|
-
border: 1px solid #ccc;
|
|
9
|
-
border-radius: 50%;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
height: 28px;
|
|
12
|
-
left: 0;
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
width: 28px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.x-form-field label:after {
|
|
19
|
-
border: 2px solid #fff;
|
|
20
|
-
border-top: none;
|
|
21
|
-
border-right: none;
|
|
22
|
-
content: "";
|
|
23
|
-
height: 6px;
|
|
24
|
-
left: 7px;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 8px;
|
|
28
|
-
transform: rotate(-45deg);
|
|
29
|
-
width: 12px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.x-form-field input[type="checkbox"] {
|
|
33
|
-
visibility: hidden;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.x-form-field input[type="checkbox"]:checked + label {
|
|
37
|
-
background-color: #66bb6a;
|
|
38
|
-
border-color: #66bb6a;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.x-form-field input[type="checkbox"]:checked + label:after {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.x-form-item-body, .x-form-cb-wrap-inner {
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
}
|
|
48
|
-
}
|
package/src/nav/MenuLoader.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Ext.define('Coon.nav.MenuLoader', {
|
|
2
|
-
singleton: true,
|
|
3
|
-
|
|
4
|
-
isLoaded: false,
|
|
5
|
-
|
|
6
|
-
load() {
|
|
7
|
-
return Coon.util.promisifyCmd('command.GetDynamicReportDataCommand', 'MENU_ALLITEMS')
|
|
8
|
-
.then((data) => {
|
|
9
|
-
if (Array.isArray(data.list)) {
|
|
10
|
-
this.uiElementMap = data.list.reduce();
|
|
11
|
-
}
|
|
12
|
-
this.isLoaded = true;
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
get() {
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
isValidMenuItem(uiEmentId) {
|
|
21
|
-
return this.uiElementMap.has(uiEmentId);
|
|
22
|
-
},
|
|
23
|
-
});
|